]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Document linespec/explicit locations & completion improvements (manual + NEWS)
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
d044bac8
PA
12017-11-24 Pedro Alves <palves@redhat.com>
2
3 * NEWS: Mention linespecs and explicit locations, and completion
4 improvements.
5
e8d58cba
YQ
62017-11-24 Yao Qi <yao.qi@linaro.org>
7
8 * regcache.c (regcache::dump): Remove footnote_register_size.
9
a63f2d2f
YQ
102017-11-24 Yao Qi <yao.qi@linaro.org>
11
12 * regcache.c (cooked_read_test): Add more test for readonly
13 regcache.
14
1b30aaa5
YQ
152017-11-24 Yao Qi <yao.qi@linaro.org>
16
17 * gdbarch-selftests.c (test_target_has_registers): Move it to
18 target.c.
19 (test_target_has_stack): Likewise.
20 (test_target_has_memory): Likewise.
21 (test_target_prepare_to_store): Likewise.
22 (test_target_store_registers): Likewise.
23 (test_target_ops): Likewise.
24 * regcache.c: Include selftest-arch.h and gdbthread.h.
25 (target_ops_no_register): New class.
26 (test_target_fetch_registers): New.
27 (test_target_store_registers): New.
28 (test_target_xfer_partial): New.
29 (readwrite_regcache): New.
30 (cooked_read_test): New.
31 (_initialize_regcache): Register the test.
32 * target.c: (test_target_has_registers): Moved from
33 gdbarch-selftests.c.
34 (test_target_has_stack): Likewise.
35 (test_target_has_memory): Likewise.
36 (test_target_prepare_to_store): Likewise.
37 (test_target_store_registers): Likewise.
38 * target.h (test_target_ops): New class.
39
6654d750
AH
402017-11-24 Alan Hayward <alan.hayward@arm.com>
41
42 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
43 selftest.
44
49bdb7ee
AH
452017-11-24 Alan Hayward <alan.hayward@arm.com>
46
47 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
48 * arch/aarch64.c (aarch64_create_target_description): Create
49 new target description.
50 * features/Makefile: Add new files.
51 * features/aarch64.c: Remove file.
52 * features/aarch64-core.c: New autogenerated file.
53 * features/aarch64-fpu.c: New autogenerated file.
54 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
55
562017-11-24 Alan Hayward <alan.hayward@arm.com>
57
58 * Makefile.in: Add new files.
59 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
60 aarch64_read_description.
61 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
62 Call aarch64_read_description.
63 * aarch64-tdep.c (aarch64_read_description): New function.
64 (aarch64_gdbarch_init): Call aarch64_read_description.
65 * aarch64-tdep.h (aarch64_read_description): New function.
66 * arch/aarch64.c: New file.
67 * configure.tgt: Add new files.
68
98ead37e
YQ
692017-11-24 Yao Qi <yao.qi@linaro.org>
70
71 * mi/mi-main.c (register_changed_p): Update.
72 * value.c (value_contents_bits_eq): Change return type.
73 (value_contents_eq): Likewise.
74 * value.h: Update comments.
75
62ad7ce7
YQ
762017-11-24 Yao Qi <yao.qi@linaro.org>
77
78 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
79 local 'changed'. Remove error.
80 (register_changed_p): Change return type to bool.
81
506fe5f4
YQ
822017-11-24 Yao Qi <yao.qi@linaro.org>
83
84 * arch/tic6x.c: New file.
85 * arch/tic6x.h: New file.
86 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
87 tic6x-core.xml and tic6x-gp.xml.
88 * features/tic6x-c6xp.c: Generated.
89 * features/tic6x-core.c: Generated.
90 * features/tic6x-gp.c: Generated.
91 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
92 "tic6x-".
93
00ea2e2a
SM
942017-11-23 Simon Marchi <simon.marchi@ericsson.com>
95
96 * mi/mi-main.c (list_available_thread_groups): Change map value
97 type to std::vector.
98
f45e2a77
SM
992017-11-23 Simon Marchi <simon.marchi@ericsson.com>
100
101 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
102
bd046f64
SM
1032017-11-23 Simon Marchi <simon.marchi@ericsson.com>
104
105 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
106 back to...
107 <children_requested>: ... this.
108 (varobj_get_num_children, varobj_update): Adjust.
109
4c37490d
SM
1102017-11-23 Simon Marchi <simon.marchi@ericsson.com>
111
112 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
113 (ada_value_has_mutated): Likewise.
114 * c-varobj.c (varobj_is_anonymous_child): Likewise.
115 (c_is_path_expr_parent): Likewise.
116 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
117 (mi_cmd_var_set_frozen): Likewise.
118 (mi_cmd_var_update_iter): Likewise.
119 (mi_cmd_var_update): Likewise.
120 * varobj.c (pretty_printing): Likewise.
121 (varobj_enable_pretty_printing): Likewise.
122 (struct varobj_root) <floating, is_valid>: Likewise.
123 (struct varobj_dynamic) <children_requested>: Likewise.
124 (delete_variable): Likewise.
125 (delete_variable_1): Likewise.
126 (install_variable): Likewise.
127 (update_type_if_necessary): Likewise.
128 (install_new_value): Likewise.
129 (value_of_root): Likewise.
130 (is_root_p): Likewise.
131 (varobj_create): Likewise.
132 (varobj_delete): Likewise.
133 (varobj_has_more): Likewise.
134 (varobj_set_frozen): Likewise.
135 (varobj_get_frozen): Likewise.
136 (install_dynamic_child): Likewise.
137 (dynamic_varobj_has_child_method): Likewise.
138 (update_dynamic_varobj_children): Likewise.
139 (varobj_get_num_children): Likewise.
140 (varobj_list_children): Likewise.
141 (is_path_expr_parent): Likewise.
142 (varobj_default_is_path_expr_parent): Likewise.
143 (varobj_is_dynamic_p): Likewise.
144 (varobj_set_value): Likewise.
145 (varobj_value_has_mutated): Likewise.
146 (varobj_update): Likewise.
147 (check_scope): Likewise.
148 (value_of_root_1): Likewise.
149 (varobj_value_get_print_value): Likewise.
150 (varobj_editable_p): Likewise.
151 (varobj_value_is_changeable_p): Likewise.
152 (varobj_floating_p): Likewise.
153 (varobj_default_value_is_changeable_p): Likewise.
154 (varobj_invalidate_iter): Likewise.
155 * varobj.h (struct varobj_update_result) <type_changed,
156 children_changed, changed, value_installed>: Likewise.
157 (struct varobj) <updated, frozen, not_fetched>: Likewise.
158 (struct lang_varobj_ops) <value_is_changeable_p,
159 value_has_mutated, is_path_expr_parent>: Likewise.
160 (varobj_delete): Likewise.
161 (varobj_set_frozen): Likewise.
162 (varobj_get_frozen): Likewise.
163 (varobj_set_value): Likewise.
164 (varobj_update): Likewise.
165 (varobj_editable_p): Likewise.
166 (varobj_floating_p): Likewise.
167 (varobj_has_more): Likewise.
168 (varobj_is_dynamic_p): Likewise.
169 (varobj_default_value_is_changeable_p): Likewise.
170 (varobj_value_is_changeable_p): Likewise.
171 (varobj_is_anonymous_child): Likewise.
172 (varobj_default_is_path_expr_parent): Likewise.
173
9c23b42f
SDJ
1742017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
175
176 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
177 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
178 <type_str>: Convert to 'std::string'.
179 <expr>: Convert to 'expression_up'.
180 (dtrace_probe_arg_s): Delete type and VEC.
181 (dtrace_probe_enabler_s): Likewise.
182 (struct dtrace_probe): Replace by...
183 (class dtrace_static_probe_ops): ...this and...
184 (class dtrace_probe): ...this.
185 (dtrace_probe_is_linespec): Rename to...
186 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
187 to reflect change.
188 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
189 Adjust code. Create new instance of 'dtrace_probe'.
190 (dtrace_build_arg_exprs): Rename to...
191 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
192 reflect change.
193 (dtrace_get_probes): Rename to...
194 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
195 to reflect change.
196 (dtrace_get_arg): Rename to...
197 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
198 reflect change.
199 (dtrace_probe_is_enabled): Rename to...
200 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
201 change.
202 (dtrace_get_probe_address): Rename to...
203 (dtrace_probe::get_relocated_address): ...this. Adjust code
204 to reflect change.
205 (dtrace_get_probe_argument_count): Rename to...
206 (dtrace_probe::get_argument_count): ...this. Adjust code to
207 reflect change.
208 (dtrace_can_evaluate_probe_arguments): Rename to...
209 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
210 to reflect change.
211 (dtrace_evaluate_probe_argument): Rename to...
212 (dtrace_probe::evaluate_argument): ...this. Adjust code to
213 reflect change.
214 (dtrace_compile_to_ax): Rename to...
215 (dtrace_probe::compile_to_ax): ...this. Adjust code to
216 reflect change.
217 (dtrace_probe_destroy): Delete.
218 (dtrace_type_name): Rename to...
219 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
220 reflect change.
221 (dtrace_probe::get_static_ops): New method.
222 (dtrace_gen_info_probes_table_header): Rename to...
223 (dtrace_static_probe_ops::gen_info_probes_table_header):
224 ...this. Adjust code to reflect change.
225 (dtrace_gen_info_probes_table_values): Rename to...
226 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
227 code to reflect change.
228 (dtrace_enable_probe): Rename to...
229 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
230 change.
231 (dtrace_disable_probe): Rename to...
232 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
233 change.
234 (struct probe_ops dtrace_probe_ops): Delete.
235 (info_probes_dtrace_command): Call 'info_probes_for_spops'
236 instead of 'info_probes_for_ops'.
237 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
238 of 'all_probe_ops'.
239
0e9ae10f
SDJ
2402017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
241 Simon Marchi <simark@simark.ca>
242
243 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
244 variable.
245 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
246 <aexpr>: Change type to 'expression_up'.
247 (stap_probe_arg_s): Delete type and VEC.
248 (struct stap_probe): Delete. Replace by...
249 (class stap_static_probe_ops): ...this and...
250 (class stap_probe): ...this. Rename variables to add 'm_'
251 prefix. Do not use 'union' for arguments anymore.
252 (stap_get_expected_argument_type): Receive probe name instead
253 of 'struct stap_probe'. Adjust code.
254 (stap_parse_probe_arguments): Rename to...
255 (stap_probe::parse_arguments): ...this. Adjust code to
256 reflect change.
257 (stap_get_probe_address): Rename to...
258 (stap_probe::get_relocated_address): ...this. Adjust code
259 to reflect change.
260 (stap_get_probe_argument_count): Rename to...
261 (stap_probe::get_argument_count): ...this. Adjust code
262 to reflect change.
263 (stap_get_arg): Rename to...
264 (stap_probe::get_arg_by_number'): ...this. Adjust code to
265 reflect change.
266 (can_evaluate_probe_arguments): Rename to...
267 (stap_probe::can_evaluate_arguments): ...this. Adjust code
268 to reflect change.
269 (stap_evaluate_probe_argument): Rename to...
270 (stap_probe::evaluate_argument): ...this. Adjust code
271 to reflect change.
272 (stap_compile_to_ax): Rename to...
273 (stap_probe::compile_to_ax): ...this. Adjust code to
274 reflect change.
275 (stap_probe_destroy): Delete.
276 (stap_modify_semaphore): Adjust comment.
277 (stap_set_semaphore): Rename to...
278 (stap_probe::set_semaphore): ...this. Adjust code to reflect
279 change.
280 (stap_clear_semaphore): Rename to...
281 (stap_probe::clear_semaphore): ...this. Adjust code to
282 reflect change.
283 (stap_probe::get_static_ops): New method.
284 (handle_stap_probe): Adjust code to create instance of
285 'stap_probe'.
286 (stap_get_probes): Rename to...
287 (stap_static_probe_ops::get_probes): ...this. Adjust code to
288 reflect change.
289 (stap_probe_is_linespec): Rename to...
290 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
291 reflect change.
292 (stap_type_name): Rename to...
293 (stap_static_probe_ops::type_name): ...this. Adjust code to
294 reflect change.
295 (stap_gen_info_probes_table_header): Rename to...
296 (stap_static_probe_ops::gen_info_probes_table_header):
297 ...this. Adjust code to reflect change.
298 (stap_gen_info_probes_table_values): Rename to...
299 (stap_probe::gen_info_probes_table_values): ...this. Adjust
300 code to reflect change.
301 (struct probe_ops stap_probe_ops): Delete.
302 (info_probes_stap_command): Use 'info_probes_for_spops'
303 instead of 'info_probes_for_ops'.
304 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
305 of 'all_probe_ops'.
306
935676c9
SDJ
3072017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
308
309 * break-catch-throw.c (fetch_probe_arguments): Use
310 'probe.prob' instead of 'probe.probe'.
311 * breakpoint.c (create_longjmp_master_breakpoint): Call
312 'can_evaluate_arguments' and 'get_relocated_address' methods
313 from probe.
314 (create_exception_master_breakpoint): Likewise.
315 (add_location_to_breakpoint): Use 'sal->prob' instead of
316 'sal->probe'.
317 (bkpt_probe_insert_location): Call 'set_semaphore' method from
318 probe.
319 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
320 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
321 of 'probe_ops'.
322 (probe_key_free): Call 'delete' on probe.
323 (check_exception_resume): Use 'probe.prob' instead of
324 'probe.probe'.
325 * location.c (string_to_event_location_basic): Call
326 'probe_linespec_to_static_ops'.
327 * probe.c (class any_static_probe_ops): New class.
328 (any_static_probe_ops any_static_probe_ops): New variable.
329 (parse_probes_in_pspace): Receive 'static_probe_ops' as
330 argument. Adjust code to reflect change.
331 (parse_probes): Use 'static_probe_ops' instead of
332 'probe_ops'. Adjust code to reflect change.
333 (find_probes_in_objfile): Call methods to get name and
334 provider from probe.
335 (find_probe_by_pc): Use 'result.prob' instead of
336 'result.probe'. Call 'get_relocated_address' method from
337 probe.
338 (collect_probes): Adjust comment and argument list to receive
339 'static_probe_ops' instead of 'probe_ops'. Adjust code to
340 reflect change. Call necessary methods from probe.
341 (compare_probes): Call methods to get name and provider from
342 probes.
343 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
344 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
345 adjust code accordingly.
346 (print_ui_out_not_applicables): Likewise.
347 (info_probes_for_ops): Rename to...
348 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
349 as argument instead of 'probe_ops'. Adjust code. Call
350 necessary methods from probe.
351 (info_probes_command): Use 'info_probes_for_spops'.
352 (enable_probes_command): Pass correct argument to
353 'collect_probes'. Call methods from probe.
354 (disable_probes_command): Likewise.
355 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
356 (get_probe_argument_count): Move to
357 'any_static_probe_ops::get_argument_count'.
358 (can_evaluate_probe_arguments): Move to
359 'any_static_probe_ops::can_evaluate_arguments'.
360 (evaluate_probe_argument): Move to
361 'any_static_probe_ops::evaluate_argument'.
362 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
363 'probe.probe'.
364 (probe_linespec_to_ops): Rename to...
365 (probe_linespec_to_static_ops): ...this. Adjust code.
366 (probe_any_is_linespec): Rename to...
367 (any_static_probe_ops::is_linespec): ...this.
368 (probe_any_get_probes): Rename to...
369 (any_static_probe_ops::get_probes): ...this.
370 (any_static_probe_ops::type_name): New method.
371 (any_static_probe_ops::gen_info_probes_table_header): New
372 method.
373 (compute_probe_arg): Use 'pc_probe.prob' instead of
374 'pc_probe.probe'. Call methods from probe.
375 (compile_probe_arg): Likewise.
376 (std::vector<const probe_ops *> all_probe_ops): Delete.
377 (std::vector<const static_probe_ops *> all_static_probe_ops):
378 New variable.
379 (_initialize_probe): Use 'all_static_probe_ops' instead of
380 'all_probe_ops'.
381 * probe.h (struct info_probe_column) <field_name>: Delete
382 extraneous newline
383 (info_probe_column_s): Delete type and VEC.
384 (struct probe_ops): Delete. Replace with...
385 (class static_probe_ops): ...this and...
386 (clas probe): ...this.
387 (struct bound_probe) <bound_probe>: Delete extraneous
388 newline. Adjust constructor to receive 'probe' instead of
389 'struct probe'.
390 <probe>: Rename to...
391 <prob>: ...this. Delete extraneous newline.
392 <objfile>: Delete extraneous newline.
393 (register_probe_ops): Delete unused prototype.
394 (info_probes_for_ops): Rename to...
395 (info_probes_for_spops): ...this. Adjust comment.
396 (get_probe_address): Move to 'probe::get_address'.
397 (get_probe_argument_count): Move to
398 'probe::get_argument_count'.
399 (can_evaluate_probe_arguments): Move to
400 'probe::can_evaluate_arguments'.
401 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
402 * solib-svr4.c (struct svr4_info): Adjust comment.
403 (struct probe_and_action) <probe>: Rename to...
404 <prob>: ...this.
405 (register_solib_event_probe): Receive 'probe' instead of
406 'struct probe' as argument. Use 'prob' instead of 'probe'
407 when applicable.
408 (solib_event_probe_action): Call 'get_argument_count' method
409 from probe. Adjust comment.
410 (svr4_handle_solib_event): Adjust comment. Call
411 'evaluate_argument' method from probe.
412 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
413 from probe.
414 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
415 'struct probe'. Call 'can_evaluate_arguments' from probe.
416 * symfile.h: Forward declare 'class probe' instead of 'struct
417 probe'.
418 * symtab.h: Likewise.
419 (struct symtab_and_line) <probe>: Rename to...
420 <prob>: ...this.
421 * tracepoint.c (start_tracing): Use 'prob' when applicable.
422 Call probe methods.
423 (stop_tracing): Likewise.
424
8f6cb6c3
JB
4252017-11-22 Joel Brobecker <brobecker@adacore.com>
426
427 * ravenscar-thread.c (ravenscar_inferior_created): Remove
428 trailing newline at end of string in call to warning.
429
479f8de1
SM
4302017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
431
432 * osdata.h: Include vector isntead of vec.h.
433 (osdata_column_s): Remove typedef.
434 (struct osdata_column): Add constructor.
435 <name, value>: Change type to std::string.
436 (DEF_VEC_O (osdata_column_s)): Remove.
437 (osdata_item_s): Remove typedef.
438 (struct osdata_item) <columns>: Change type to std::vector.
439 (DEF_VEC_O (osdata_item_s)): Remove.
440 (struct osdata): Add constructor.
441 <type>: Change type to std::string.
442 <items>: Change type to std::vector.
443 (osdata_p): Remove typedef.
444 (DEF_VEC_P (osdata_p)): Remove.
445 (osdata_parse): Return a unique_ptr.
446 (osdata_free): Remove.
447 (make_cleanup_osdata_free): Remove.
448 (get_osdata): Return a unique_ptr.
449 (get_osdata_column): Return pointer to std::string, take a
450 reference to osdata_item as parameter.
451 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
452 unique_ptr.
453 <property_name>: Change type to std::string.
454 (osdata_start_osdata): Allocate osdata with new and adjust.
455 (osdata_start_item): Adjust.
456 (osdata_start_column): Adjust.
457 (osdata_end_column): Adjust.
458 (clear_parsing_data): Remove.
459 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
460 (osdata_item_clear): Remove.
461 (get_osdata): return a unique_ptr and adjust.
462 (get_osdata_column): Return a pointer to std::string and adjust.
463 (info_osdata): Adjust.
464 * mi/mi-main.c: Include <map>.
465 (free_vector_of_osdata_items): Remove.
466 (list_available_thread_groups): Adjust, use std::map instead of
467 splay tree.
468
41bd68f5
SM
4692017-11-22 Simon Marchi <simon.marchi@ericsson.com>
470
471 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
472 case in switch.
473
7e2fd2f4
SM
4742017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
475
476 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
477
0604393c
SM
4782017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
479
480 * varobj.h (struct varobj_update_result): Add constructor, add
481 move constructor, disable copy and assign, initialize fields.
482 <newobj>: Change type to std::vector.
483 (varobj_update): Return std::vector.
484 * varobj.c (install_dynamic_child): Change VEC parameters to
485 std::vector and adjust.
486 (update_dynamic_varobj_children): Likewise.
487 (varobj_update): Return std::vector and adjust.
488 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
489
ddf0ea08
SM
4902017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
491
492 * varobj.h (struct varobj) <parent>: Remove const.
493 <children>: Change type to std::vector.
494 (varobj_list_children): Return std::vector const reference.
495 (varobj_restrict_range): Change parameter type to std::vector
496 const reference.
497 * varobj.c (varobj_has_more): Adjust.
498 (varobj_restrict_range): Change parameter type to std::vector
499 const reference and adjust.
500 (install_dynamic_child): Adjust.
501 (update_dynamic_varobj_children): Adjust.
502 (varobj_list_children): Return std::vector const reference and
503 adjust.
504 (varobj_add_child): Adjust.
505 (update_type_if_necessary): Adjust.
506 (varobj_update): Adjust.
507 (delete_variable_1): Adjust.
508 * ada-varobj.c (ada_value_has_mutated): Adjust.
509 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
510
9e5b9d2b
SM
5112017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
512
513 * varobj.h (struct varobj): Add constructor and destructor,
514 initialize fields.
515 * varobj.c (struct varobj_root): Initialize fields.
516 (struct varobj_dynamic): Initialize fields.
517 (varobj_create): Use unique_ptr instead of cleanup. Create
518 varobj with new instead of new_root_variable.
519 (delete_variable_1): Free variable with delete instead of
520 free_variable.
521 (create_child_with_value): Create variable with new instead of
522 new_variable.
523 (varobj::varobj): New.
524 (varobj::~varobj): New (body mostly coming from free_variable).
525 (new_variable): Remove.
526 (free_variable): Remove.
527 (do_free_variable_cleanup): Remove.
528 (make_cleanup_free_variable): Remove.
529
fc35dab1
UW
5302017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
531
532 * core-regset.c: Remove file.
533 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
534
2400729e
UW
5352017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
536
537 * NEWS: Document use of GNU MPFR.
538 * README: Likewise.
539
540 * Makefile.in (LIBMPFR): Add define.
541 (CLIBS): Add $(LIBMPFR).
542 * configure.ac: Add --with-mpfr configure option.
543 * configure: Regenerate.
544 * config.in: Regenerate.
545
546 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
547 (class mpfr_float_ops): New type.
548 (mpfr_float_ops::from_target): Two new overloaded functions.
549 (mpfr_float_ops::to_target): Likewise.
550 (mpfr_float_ops::to_string): New function.
551 (mpfr_float_ops::from_string): Likewise.
552 (mpfr_float_ops::to_longest): Likewise.
553 (mpfr_float_ops::from_longest): Likewise.
554 (mpfr_float_ops::from_ulongest): Likewise.
555 (mpfr_float_ops::to_host_double): Likewise.
556 (mpfr_float_ops::from_host_double): Likewise.
557 (mpfr_float_ops::convert): Likewise.
558 (mpfr_float_ops::binop): Likewise.
559 (mpfr_float_ops::compare): Likewise.
560 (get_target_float_ops): Use mpfr_float_ops if available.
561
7a26362d
UW
5622017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
563
564 * target-float.c: Do not include <math.h>.
565 Include <cmath> and <limits>.
566 (DOUBLEST): Do not define.
567 (class target_float_ops): New type.
568 (class host_float_ops): New templated type.
569 (class decimal_float_ops): New type.
570
571 (floatformat_to_doublest): Rename to ...
572 (host_float_ops<T>::from_target): ... this. Use template type T
573 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
574 (host_float_ops<T>::from_target): New overload using a type argument.
575 (floatformat_from_doublest): Rename to ...
576 (host_float_ops<T>::to_target): ... this. Use template type T
577 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
578 (host_float_ops<T>::to_target): New overload using a type argument.
579 (floatformat_printf_format): New function.
580 (struct printf_length_modifier): New templated type.
581 (floatformat_to_string): Rename to ...
582 (host_float_ops<T>::to_string): ... this. Use type instead of
583 floatformat argument. Use floatformat_printf_format and
584 printf_length_modifier. Remove special handling of invalid numbers,
585 infinities and NaN (moved to target_float_to_string).
586 (struct scanf_length_modifier): New templated type.
587 (floatformat_from_string): Rename to ...
588 (host_float_ops<T>::from_string): ... this. Use type instead of
589 floatformat argument. Use scanf_length_modifier.
590 (floatformat_to_longest): Rename to ...
591 (host_float_ops<T>::to_longest): ... this. Use type instead of
592 floatformat argument. Handle out-of-range values deterministically.
593 (floatformat_from_longest): Rename to ...
594 (host_float_ops<T>::from_longest): ... this. Use type instead of
595 floatformat argument.
596 (floatformat_from_ulongest): Rename to ...
597 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
598 floatformat argument.
599 (floatformat_to_host_double): Rename to ...
600 (host_float_ops<T>::to_host_double): ... this. Use type instead of
601 floatformat argument.
602 (floatformat_from_host_double): Rename to ...
603 (host_float_ops<T>::from_host_double): ... this. Use type instead of
604 floatformat argument.
605 (floatformat_convert): Rename to ...
606 (host_float_ops<T>::convert): ... this. Use type instead of
607 floatformat arguments. Remove handling of no-op conversions.
608 (floatformat_binop): Rename to ...
609 (host_float_ops<T>::binop): ... this. Use type instead of
610 floatformat arguments.
611 (floatformat_compare): Rename to ...
612 (host_float_ops<T>::compare): ... this. Use type instead of
613 floatformat arguments.
614
615 (match_endianness): Use type instead of length/byte_order arguments.
616 (set_decnumber_context): Likewise.
617 (decimal_from_number): Likewise. Update calls.
618 (decimal_to_number): Likewise.
619 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
620 (decimal_float_ops::to_host_double): New dummy function.
621 (decimal_float_ops::from_host_double): Likewise.
622 (decimal_to_string): Rename to ...
623 (decimal_float_ops::to_string): ... this. Use type instead of
624 length/byte_order arguments. Update calls.
625 (decimal_from_string): Rename to ...
626 (decimal_float_ops::from_string): ... this. Use type instead of
627 length/byte_order arguments. Update calls.
628 (decimal_from_longest): Rename to ...
629 (decimal_float_ops::from_longest): ... this. Use type instead of
630 length/byte_order arguments. Update calls.
631 (decimal_from_ulongest): Rename to ...
632 (decimal_float_ops::from_ulongest): ... this. Use type instead of
633 length/byte_order arguments. Update calls.
634 (decimal_to_longest): Rename to ...
635 (decimal_float_ops::to_longest): ... this. Use type instead of
636 length/byte_order arguments. Update calls.
637 (decimal_binop): Rename to ...
638 (decimal_float_ops::binop): ... this. Use type instead of
639 length/byte_order arguments. Update calls.
640 (decimal_compare): Rename to ...
641 (decimal_float_ops::compare): ... this. Use type instead of
642 length/byte_order arguments. Update calls.
643 (decimal_convert): Rename to ...
644 (decimal_float_ops::convert): ... this. Use type instead of
645 length/byte_order arguments. Update calls.
646
647 (target_float_same_category_p): New function.
648 (target_float_same_format_p): Likewise.
649 (target_float_format_length): Likewise.
650 (enum target_float_ops_kind): New type.
651 (get_target_float_ops_kind): New function.
652 (get_target_float_ops): Three new overloaded functions.
653
654 (target_float_is_zero): Update call.
655 (target_float_to_string): Add special handling of invalid numbers,
656 infinities and NaN (moved from floatformat_to_string). Use
657 target_float_ops callback.
658 (target_float_from_string): Use target_float_ops callback.
659 (target_float_to_longest): Likewise.
660 (target_float_from_longest): Likewise.
661 (target_float_from_ulongest): Likewise.
662 (target_float_to_host_double): Likewise.
663 (target_float_from_host_double): Likewise.
664 (target_float_convert): Add special case for no-op conversions.
665 Use target_float_ops callback.
666 (target_float_binop): Use target_float_ops callback.
667 (target_float_compare): Likewise.
668
a9f26f60
YQ
6692017-11-22 Yao Qi <yao.qi@linaro.org>
670
671 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
672
29f9a567
YQ
6732017-11-22 Yao Qi <yao.qi@linaro.org>
674
675 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
676 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
677
3b1b69bf
JG
6782017-11-21 Jerome Guitton <guitton@adacore.com>
679
680 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
681 with event ptid from the lower layer before doing the
682 ravenscar-specific update.
683
54aa6c67
JB
6842017-11-21 Joel Brobecker <brobecker@adacore.com>
685
686 * ravenscar-thread.c (is_ravenscar_task): Also verify that
687 the ptid's TID is nonzero.
688
cf3fbed4
JB
6892017-11-21 Joel Brobecker <brobecker@adacore.com>
690
691 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
692 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
693 Make non-static. Change return type to char *. Adjust code
694 accordingly. Rewrite the function's documentation.
695 (read_atcb): Adjust call to get_tcb_types_info accordingly.
696 * ravenscar-thread.c (ravenscar_inferior_created): Check that
697 we have enough debugging information in the runtime to support
698 Ada task debugging before we enable the ravenscar-thread layer.
699
9edcc12f
JB
7002017-11-21 Joel Brobecker <brobecker@adacore.com>
701
702 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
703 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
704 * ravenscar-thread.c: Add into comment.
705 (base_magic_null_ptid): Delete.
706 (base_ptid): Change documentation.
707 (ravenscar_active_task): Renames ravenscar_running_thread.
708 All callers updated throughout.
709 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
710 (ravenscar_task_is_currently_active): Likewise.
711 (get_base_thread_from_ravenscar_task): Ditto.
712 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
713 (ravenscar_runtime_initialized): Likewise.
714 (get_running_thread_id): Add new parameter "cpu". Adjust
715 implementation to handle this new parameter.
716 (ravenscar_fetch_registers): Small adjustment to use
717 is_ravenscar_task and ravenscar_task_is_currently_active in
718 order to decide whether to use the target beneath or this
719 module's arch_ops.
720 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
721 (ravenscar_stopped_by_sw_breakpoint): Use
722 get_base_thread_from_ravenscar_task to get the underlying
723 thread, rather than using base_ptid.
724 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
725 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
726 Likewise.
727 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
728
65d40437
JB
7292017-11-21 Joel Brobecker <brobecker@adacore.com>
730
731 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
732 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
733 (get_tcb_types_info): Set fieldnos.base_cpu.
734 (read_atcb): Set task_info->base_cpu.
735 (info_task): Print "Base CPU" info if set by runtime.
736
e02544b2
JB
7372017-11-21 Joel Brobecker <brobecker@adacore.com>
738
739 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
740 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
741 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
742 New functions.
743 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
744 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
745 to_stopped_data_address and to_core_of_thread fields of
746 ravenscar_ops.
747
ed0f4273
UW
7482017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
749
750 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
751 (struct gdbarch_tdep): New member long_double_abi.
752 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
753 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
754 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
755 format depending on long_double_abi tdep member.
756 (ppc_floatformat_for_type): Handle __ibm128 type.
757
0fc76421
SM
7582017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
759
760 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
761
e6b2f5ef
PA
7622017-11-21 Pedro Alves <palves@redhat.com>
763
764 * dwarf2read.c (mapped_index::find_name_components_bounds)
765 <completion mode, upper bound>: Use std::lower_bound instead of
766 std::upper_bound.
767 (test_mapped_index_find_name_component_bounds): Remove incorrect
768 "t1_fund" from expected symbols.
769
5c58de74
PA
7702017-11-21 Pedro Alves <palves@redhat.com>
771
772 * dwarf2read.c (mapped_index::name_components_casing): New field.
773 (mapped_index) <build_name_components,
774 find_name_components_bounds): Declare new methods.
775 (mapped_index::find_name_components_bounds)
776 (mapped_index::build_name_components): New methods, factored out
777 from dw2_expand_symtabs_matching_symbol.
778 (check_find_bounds_finds)
779 (test_mapped_index_find_name_component_bounds): New.
780 (run_test): Rename to ...
781 (test_dw2_expand_symtabs_matching_symbol): ... this.
782 (run_test): Reimplement.
783
e1ef7d7a
PA
7842017-11-21 Pedro Alves <palves@redhat.com>
785
786 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
787 (symbol_end): Use cp_ident_is_alnum.
788 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
789 * dwarf2read.c (make_sort_after_prefix_name): New function.
790 (dw2_expand_symtabs_matching_symbol): Use it.
791 (test_symbols): Add more symbols.
792 (run_test): Add tests.
793
cf724bc9
TT
7942017-11-17 Tom Tromey <tom@tromey.com>
795
796 * symtab.h (enum symbol_subclass_kind): New.
797 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
798 Remove.
799 <subclass>: New member.
800 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
801 * rust-lang.c (rust_get_trait_object_pointer): Update.
802 * dwarf2read.c (read_func_scope): Update.
803 (read_variable): Update.
804
68e745e3
TT
8052017-11-17 Tom Tromey <tom@tromey.com>
806
807 * dwarf2read.c (read_func_scope): Update.
808 * symtab.h (struct template_symbol): Derive from symbol.
809 <base>: Remove.
810
71a3c369
TT
8112017-11-17 Tom Tromey <tom@tromey.com>
812
813 * symtab.h (struct symbol) <is_rust_vtable>: New member.
814 (struct rust_vtable_symbol): New.
815 (find_symbol_at_address): Declare.
816 * symtab.c (find_symbol_at_address): New function.
817 * symfile.h (struct quick_symbol_functions)
818 <find_compunit_symtab_by_address>: New member.
819 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
820 function.
821 (debug_sym_quick_functions): Link to
822 debug_qf_find_compunit_symtab_by_address.
823 * rust-lang.c (rust_get_trait_object_pointer): New function.
824 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
825 rust_get_trait_object_pointer.
826 * psymtab.c (psym_relocate): Clear psymbol_map.
827 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
828 functions.
829 (psym_functions): Link to psym_find_compunit_symtab_by_address.
830 * objfiles.h (struct objfile) <psymbol_map>: New member.
831 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
832 (process_die) <DW_TAG_variable>: New case. Call read_variable.
833 (rust_containing_type, read_variable): New functions.
834
7468702d
SM
8352017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
836
837 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
838
37269bc9
SM
8392017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
840
841 * common/filestuff.c: Include <algorithm>.
842 (open_fds): Change type to std::vector<int>.
843 (do_mark_open_fd): Adjust.
844 (unmark_fd_no_cloexec): Adjust.
845 (do_close): Adjust.
846
5c632425
SM
8472017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
848
849 * breakpoint.c (output_thread_groups): Take an std::vector.
850 (print_one_breakpoint_location): Adjust.
851
ced9779b
JB
8522017-11-17 Joel Brobecker <brobecker@adacore.com>
853
854 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
855 (ada_evaluate_subexp_for_cast): New function.
856 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
857 ada_evaluate_subexp_for_cast.
858 (ada_evaluate_subexp) <nosideret>: Replace code by call to
859 eval_skip_value.
860 * eval.c (evaluate_var_value): Make non-static.
861 (evaluate_var_msym_value, eval_skip_value): Likewise.
862 * value.h (evaluate_var_value, evaluate_var_msym_value)
863 (eval_skip_value): Declare.
864
b7e22850
JB
8652017-11-16 Joel Brobecker <brobecker@adacore.com>
866
867 * ada-lang.c (ada_value_cast): Remove parameter "noside".
868 Update all callers.
869
9ccabccd
PA
8702017-11-16 Pedro Alves <palves@redhat.com>
871
872 * python/py-unwind.c (pyuw_sniffer): Translate
873 PyExc_KeyboardInterrupt to a GDB Quit exception.
874
d930703d
PA
8752017-11-16 Pedro Alves <palves@redhat.com>
876
877 * infrun.c (resume_cleanups): Delete.
878 (resume): No longer install a resume_cleanups cleanup nor call
879 QUIT.
880 (proceed): Pass the terminal to the inferior.
881 (keep_going_pass_signal): No longer install a resume_cleanups
882 cleanup.
883
38dc2859
PA
8842017-11-16 Pedro Alves <palves@redhat.com>
885
886 * inf-loop.c (inferior_event_handler): Don't swallow the exception
887 if the prompt is blocked.
888
688fca4f
PA
8892017-11-16 Pedro Alves <palves@redhat.com>
890
891 * breakpoint.c (insert_bp_location): Replace bp_err and
892 bp_err_message locals by a gdb_exception local.
893
e2c33ac7
PA
8942017-11-16 Pedro Alves <palves@redhat.com>
895
896 * inflow.c (scoped_ignore_sigttou): New class.
897 (child_terminal_ours_1, new_tty): Use it.
898
d7236961
UW
8992017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
900
901 * target-float.c (decimal_from_number): Add byte_order argument and
902 call match_endianness. Error if unknown floating-point type.
903 (decimal_to_number): Add byte_order argument and call match_endianness.
904 (decimal_from_longest): Update call. Do not call match_endianness.
905 (decimal_from_ulongest): Likewise.
906 (decimal_binop): Likewise.
907 (decimal_is_zero): Likewise.
908 (decimal_compare): Likewise.
909 (decimal_convert): Likewise.
910
d8ae99a7
PM
9112017-11-16 Phil Muldoon <pmuldoon@redhat.com>
912
913 * python/python.c (gdbpy_rbreak): New function.
914 * NEWS: Document Python rbreak feature.
915
c632b645
YQ
9162017-11-16 Yao Qi <yao.qi@linaro.org>
917
918 * features/tic6x-c62x.xml: Remove.
919 * features/tic6x-c64x.xml: Remove.
920 * features/tic6x-c64xp.xml: Remove.
921
a014b87a
JB
9222017-11-15 John Baldwin <jhb@FreeBSD.org>
923
924 * symtab.h: Include <array>.
925
94765011
JB
9262017-11-15 John Baldwin <jhb@FreeBSD.org>
927
928 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
929 (bsd_kvm_proc_cmd): Likewise.
930
625ad440
SM
9312017-11-15 Simon Marchi <simon.marchi@ericsson.com>
932
933 * tui/tui-win.c (window_name_completer): Replace VEC with
934 std::vector.
935
c0c11fa9
AC
9362017-11-15 Andrew Cagney <cagney@gnu.org>
937
938 * MAINTAINERS: Remove no-longer applicable entries.
939
34a7ebaf
AC
9402017-11-15 Andrew Cagney <cagney@gnu.org>
941
942 * MAINTAINERS: Move self to Past Maintainers.
943
5334ef39
YQ
9442017-11-15 Yao Qi <yao.qi@linaro.org>
945
946 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
947 * features/nios2-linux.c: Remove.
948 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
949 initialize_tdesc_nios2_linux.
950
a714b0d6
YQ
9512017-11-15 Yao Qi <yao.qi@linaro.org>
952
953 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
954 M68HC11_LAST_HARD_REG + 1.
955
92ffd475
PC
9562017-11-14 Paul Carroll <pcarroll@codesourcery.com>
957
958 PR gdb/22388
959 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
960 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
961 Return TARGET_XFER_EOF if size of returned data is 0.
962
07431908
SM
9632017-11-14 Simon Marchi <simon.marchi@ericsson.com>
964
965 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
966 memory-map-selftests.c.
967 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
968 * memory-map.c (memory_map_start_memory): Fix computation of hi
969 address.
970 * unittests/memory-map-selftests.c: New file.
971
31432a67
JB
9722017-11-09 Joel Brobecker <brobecker@adacore.com>
973
974 * ada-lang.c: Fix some typos in the general command documenting
975 how Ada expressions are being evaluated and how their result
976 is printed.
977
e793c052
TT
9782017-11-09 Tom Tromey <tom@tromey.com>
979
980 * psymtab.c (psymbol_hash): Do not hash string contents.
981 (psymbol_compare): Add comment.
982
7e8835c5
TT
9832017-11-09 Tom Tromey <tom@tromey.com>
984
985 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
986
286acbb5
JB
9872017-11-08 Joel Brobecker <brobecker@adacore.com>
988
989 * ada-exp.y (write_var_from_sym): Remove parameter
990 "orig_left_context". Update all callers.
991
b44ec619
SM
9922017-11-08 Simon Marchi <simon.marchi@ericsson.com>
993
994 * tracepoint.h (class collection_list) <stringify>: Return
995 std::vector<std::string>.
996 (encode_actions_rsp): Change parameters to
997 std::vector<std::string> *.
998 * tracepoint.c (collection_list::stringify): Return
999 std::vector<std::string> and adjust accordingly.
1000 (encode_actions_rsp): Changee parameters to
1001 std::vector<std::string> and adjust accordingly.
1002 * remote.c (free_actions_list),
1003 free_actions_list_cleanup_wrapper): Remove.
1004 (remote_download_tracepoint): Adjust to std::vector.
1005
2f4732b0
TT
10062017-11-08 Tom Tromey <tom@tromey.com>
1007
1008 * dwarf2read.c (symbolp): Remove typedef.
1009 (read_func_scope): Use std::vector.
1010 (process_structure_scope): Use std::vector.
1011
f9d67a22
PA
10122017-11-08 Pedro Alves <palves@redhat.com>
1013
1014 * ada-lang.c (ada_make_symbol_completion_list): Use
1015 completion_skip_symbol.
1016 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1017 (symbol_is_function_or_method(symbol*)): New.
1018 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1019 completion_skip_symbol.
1020 (default_collect_symbol_completion_matches_break_on): Use
1021 completion_skip_symbol. Pass down mode.
1022 (collect_file_symbol_completion_matches): Pass down mode.
1023 * symtab.h (symbol_is_function_or_method): New declarations.
1024 (completion_skip_symbol): New template function.
1025
56d87ef7
PA
10262017-11-08 Pedro Alves <palves@redhat.com>
1027
1028 * linespec.c (iterate_over_all_matching_symtabs): Add
1029 search_domain parameter. Pass it down to expand_symtabs_matching.
1030 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1031 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1032 search_domain.
1033 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1034 Pass it down.
1035 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1036 symbols.
1037 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1038 it down.
1039
1b026119
PA
10402017-11-08 Pedro Alves <palves@redhat.com>
1041
1042 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1043 text_len locals and don't pass them down.
1044 * symtab.c (completion_list_add_name): Remove
1045 sym_text/sym_text_len parameters and adjust.
1046 (completion_list_add_symbol, completion_list_add_msymbol)
1047 (completion_list_objc_symbol, completion_list_add_fields)
1048 (add_symtab_completions): Likewise.
1049 (default_collect_symbol_completion_matches_break_on)
1050 (collect_file_symbol_completion_matches): Remove sym_text_len
1051 local and don't pass it down.
1052 * symtab.h (completion_list_add_name): Remove
1053 sym_text/sym_text_len parameters.
1054
c62446b1
PA
10552017-11-08 Pedro Alves <palves@redhat.com>
1056
1057 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1058 unittests/lookup_name_info-selftests.c.
1059 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1060 * cp-support.c: Include "selftest.h".
1061 (cp_remove_params_1): Rename from cp_remove_params. Add
1062 'require_param' parameter, and handle it.
1063 (cp_remove_params): Reimplement.
1064 (cp_remove_params_if_any): New.
1065 (selftests::quote): New.
1066 (selftests::check_remove_params): New.
1067 (selftests::test_cp_remove_params): New.
1068 (_initialize_cp_support): Install
1069 selftests::test_cp_remove_params.
1070 * cp-support.h (cp_remove_params_if_any): Declare.
1071 * dwarf2read.c :Include "selftest.h".
1072 (dw2_expand_symtabs_matching_symbol): Use
1073 lookup_name_info::make_ignore_params.
1074 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1075 (selftests::dw2_expand_symtabs_matching::string_or_null)
1076 (selftests::dw2_expand_symtabs_matching::check_match)
1077 (selftests::dw2_expand_symtabs_matching::test_symbols)
1078 (selftests::dw2_expand_symtabs_matching::run_test): New.
1079 (_initialize_dwarf2_read): Register
1080 selftests::dw2_expand_symtabs_matching::run_test.
1081 * psymtab.c (psym_expand_symtabs_matching): Use
1082 lookup_name_info::make_ignore_params.
1083 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1084 If the lookup name wants to ignore parameters, strip them.
1085 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1086 code handling '('.
1087 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1088 (default_collect_symbol_completion_matches_break_on): Don't try to
1089 strip parameters.
1090 * symtab.h (lookup_name_info::lookup_name_info): Add
1091 'ignore_parameters' parameter.
1092 (lookup_name_info::ignore_parameters)
1093 (lookup_name_info::make_ignore_params): New methods.
1094 (lookup_name_info::m_ignore_parameters): New field.
1095 * unittests/lookup_name_info-selftests.c: New file.
1096
61920122
PA
10972017-11-08 Pedro Alves <palves@redhat.com>
1098
1099 * dwarf2read.c (dw2_expand_marked_cus)
1100 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1101 (dw2_expand_symtabs_matching): Move further below.
1102 (dw2_expand_marked_cus): Reindent.
1103
3f563c84
PA
11042017-11-08 Pedro Alves <palves@redhat.com>
1105
1106 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1107 (struct name_component): New.
1108 (mapped_index::name_components): New field.
1109 (mapped_index::symbol_name_at): New method.
1110 (dwarf2_read_index): Call mapped_index ctor.
1111 (dw2_map_matching_symbols): Add comment about name_components
1112 table.
1113 (dw2_expand_symtabs_matching): Factor part to...
1114 (dw2_expand_symtabs_matching_symbol): ... this new function.
1115 Build name components table, and lookup symbols in it before
1116 calling the name matcher.
1117 (dw2_expand_marked_cus): New, factored out from
1118 dw2_expand_symtabs_matching.
1119 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1120
b5ec771e
PA
11212017-11-08 Pedro Alves <palves@redhat.com>
1122
1123 * ada-lang.c (ada_encode): Rename to ..
1124 (ada_encode_1): ... this. Add throw_errors parameter and handle
1125 it.
1126 (ada_encode): Reimplement.
1127 (match_name): Delete, folded into full_name.
1128 (resolve_subexp): No longer pass the encoded name to
1129 ada_lookup_symbol_list.
1130 (should_use_wild_match): Delete.
1131 (name_match_type_from_name): New.
1132 (ada_lookup_simple_minsym): Use lookup_name_info and the
1133 language's symbol_name_matcher_ftype.
1134 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1135 (ada_add_block_renamings): Adjust to use lookup_name_info.
1136 (ada_lookup_name): New.
1137 (add_nonlocal_symbols, ada_add_all_symbols)
1138 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1139 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1140 (ada_name_for_lookup): Delete.
1141 (ada_lookup_encoded_symbol): Construct a verbatim name.
1142 (wild_match): Reverse sense of return type. Use bool.
1143 (full_match): Reverse sense of return type. Inline bits of old
1144 match_name here.
1145 (ada_add_block_symbols): Adjust to use lookup_name_info.
1146 (symbol_completion_match): Delete, folded into...
1147 (ada_lookup_name_info::matches): ... .this new method.
1148 (symbol_completion_add): Delete.
1149 (ada_collect_symbol_completion_matches): Add name_match_type
1150 parameter. Adjust to use lookup_name_info and
1151 completion_list_add_name.
1152 (get_var_value, ada_add_global_exceptions): Adjust to use
1153 lookup_name_info.
1154 (ada_get_symbol_name_cmp): Delete.
1155 (do_wild_match, do_full_match): New functions.
1156 (ada_lookup_name_info::ada_lookup_name_info): New method.
1157 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1158 functions.
1159 (ada_language_defn): Install ada_get_symbol_name_matcher.
1160 * ada-lex.l (processId): If name starts with '<', copy it
1161 verbatim.
1162 * block.c (block_iter_match_step, block_iter_match_first)
1163 (block_iter_match_next, block_lookup_symbol)
1164 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1165 lookup_name_info.
1166 * block.h (block_iter_match_first, block_iter_match_next)
1167 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1168 * c-lang.c (c_language_defn, cplus_language_defn)
1169 (asm_language_defn, minimal_language_defn): Adjust comments to
1170 refer to la_get_symbol_name_matcher.
1171 * completer.c (complete_files_symbols)
1172 (collect_explicit_location_matches, symbol_completer): Pass a
1173 symbol_name_match_type down.
1174 * completer.h (class completion_match, completion_match_result):
1175 New classes.
1176 (completion_tracker::reset_completion_match_result): New method.
1177 (completion_tracker::m_completion_match_result): New field.
1178 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1179 lookup_name_info.
1180 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1181 functions.
1182 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1183 * d-lang.c: Adjust comments to refer to
1184 la_get_symbol_name_matcher.
1185 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1186 Adjust to use lookup_name_info.
1187 (dict_iter_match_first, dict_iter_match_next)
1188 (iter_match_first_hashed, iter_match_next_hashed)
1189 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1190 with a lookup_name_info.
1191 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1192 Likewise.
1193 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1194 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1195 (gdb_index_symbol_name_matcher): New class.
1196 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1197 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1198 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1199 with a symbol_name_match_type.
1200 (f_language_defn): Adjust comments to refer to
1201 la_get_symbol_name_matcher.
1202 * go-lang.c (go_language_defn): Adjust comments to refer to
1203 la_get_symbol_name_matcher.
1204 * language.c (default_symbol_name_matcher)
1205 (language_get_symbol_name_matcher): New functions.
1206 (unknown_language_defn, auto_language_defn): Adjust comments to
1207 refer to la_get_symbol_name_matcher.
1208 * language.h (symbol_name_cmp_ftype): Delete.
1209 (language_defn) <la_collect_symbol_completion_matches>: Add match
1210 type parameter.
1211 <la_get_symbol_name_cmp>: Delete field.
1212 <la_get_symbol_name_matcher>: New field.
1213 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1214 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1215 Declare.
1216 * linespec.c (iterate_over_all_matching_symtabs)
1217 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1218 (find_methods): Add language parameter, and use lookup_name_info
1219 and the language's symbol_name_matcher_ftype.
1220 (linespec_complete_function): Adjust.
1221 (lookup_prefix_sym): Use lookup_name_info.
1222 (add_all_symbol_names_from_pspace): Adjust.
1223 (find_superclass_methods): Add language parameter and pass it
1224 down.
1225 (find_method): Pass symbol language down.
1226 (find_linespec_symbols): Don't demangle or Ada encode here.
1227 (search_minsyms_for_name): Add lookup_name_info parameter.
1228 (add_matching_symbols_to_info): Add name_match_type parameter.
1229 Use lookup_name_info.
1230 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1231 la_get_symbol_name_matcher.
1232 * minsyms.c: Include <algorithm>.
1233 (add_minsym_to_demangled_hash_table): Remove table parameter and
1234 add objfile parameter. Use search_name_hash, and add language to
1235 demangled languages vector.
1236 (struct found_minimal_symbols): New struct.
1237 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1238 New functions.
1239 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1240 input names here. Use lookup_name_info instead. Lookup up
1241 demangled names once for each language in the demangled names
1242 vector.
1243 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1244 demangled names once for each language in the demangled names
1245 vector.
1246 (build_minimal_symbol_hash_tables): Adjust.
1247 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1248 lookup_name_info.
1249 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1250 la_get_symbol_name_matcher.
1251 * objfiles.h: Include <vector>.
1252 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1253 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1254 la_get_symbol_name_matcher.
1255 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1256 la_get_symbol_name_matcher.
1257 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1258 (match_partial_symbol): Use symbol_name_match_type,
1259 lookup_name_info and psymbol_name_matches.
1260 (lookup_partial_symbol): Use lookup_name_info.
1261 (map_block): Use symbol_name_match_type and lookup_name_info.
1262 (psym_map_matching_symbols): Use symbol_name_match_type.
1263 (psymbol_name_matches): New.
1264 (recursively_search_psymtabs): Use lookup_name_info and
1265 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1266 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1267 'kind' parameter to 'domain'.
1268 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1269 la_get_symbol_name_matcher.
1270 * symfile-debug.c (debug_qf_map_matching_symbols)
1271 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1272 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1273 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1274 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1275 Adjust to use symbol_name_match_type.
1276 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1277 (expand_symtabs_matching): Adjust to use lookup_name_info.
1278 * symmisc.c (maintenance_expand_symtabs): Use
1279 lookup_name_info::match_any ().
1280 * symtab.c (symbol_matches_search_name): New.
1281 (eq_symbol_entry): Adjust to use lookup_name_info and the
1282 language's matcher.
1283 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1284 (lookup_name_info::match_any): New.
1285 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1286 (compare_symbol_name): Add language, lookup_name_info and
1287 completion_match_result parameters, and use them.
1288 (completion_list_add_name): Make extern. Add language and
1289 lookup_name_info parameters. Use them.
1290 (completion_list_add_symbol, completion_list_add_msymbol)
1291 (completion_list_objc_symbol): Add lookup_name_info parameters and
1292 adjust. Pass down language.
1293 (completion_list_add_fields): Add lookup_name_info parameters and
1294 adjust. Pass down language.
1295 (add_symtab_completions): Add lookup_name_info parameters and
1296 adjust.
1297 (default_collect_symbol_completion_matches_break_on): Add
1298 name_match_type parameter, and use it. Use lookup_name_info.
1299 (default_collect_symbol_completion_matches)
1300 (collect_symbol_completion_matches): Add name_match_type
1301 parameter, and pass it down.
1302 (collect_symbol_completion_matches_type): Adjust.
1303 (collect_file_symbol_completion_matches): Add name_match_type
1304 parameter, and use lookup_name_info.
1305 * symtab.h: Include <string> and "common/gdb_optional.h".
1306 (enum class symbol_name_match_type): New.
1307 (class ada_lookup_name_info): New.
1308 (struct demangle_for_lookup_info): New.
1309 (class lookup_name_info): New.
1310 (symbol_name_matcher_ftype): New.
1311 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1312 (symbol_matches_search_name): Declare.
1313 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1314 (default_collect_symbol_completion_matches)
1315 (collect_symbol_completion_matches)
1316 (collect_file_symbol_completion_matches): Add name_match_type
1317 parameter.
1318 (iterate_over_symbols): Use lookup_name_info.
1319 (completion_list_add_name): Declare.
1320 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1321 (strncmp_iw_with_mode): Now extern.
1322 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1323 (strncmp_iw_with_mode): Declare.
1324
5ffa0793
PA
13252017-11-08 Keith Seitz <keiths@redhat.com>
1326 Pedro Alves <palves@redhat.com>
1327
1328 * ada-lang.c (ada_language_defn): Install
1329 default_search_name_hash.
1330 * buildsym.c (struct buildsym_compunit): <language>: New field.
1331 (finish_block_internal): Pass language when creating dictionaries.
1332 (start_buildsym_compunit, start_symtab): New language parameters.
1333 Use them.
1334 (restart_symtab): Pass down compilation unit's language.
1335 * buildsym.h (enum language): Forward declare.
1336 (start_symtab): New 'language' parameter.
1337 * c-lang.c (c_language_defn, cplus_language_defn)
1338 (asm_language_defn, minimal_language_defn): Install
1339 default_search_name_hash.
1340 * coffread.c (coff_start_symtab): Adjust.
1341 * d-lang.c (d_language_defn): Install default_search_name_hash.
1342 * dbxread.c (struct symloc): Add 'pst_language' field.
1343 (PST_LANGUAGE): Define.
1344 (start_psymtab, read_ofile_symtab): Use it.
1345 (process_one_symbol): New 'language' parameter. Pass it down.
1346 * dictionary.c (struct dictionary) <language>: New field.
1347 (DICT_LANGUAGE): Define.
1348 (dict_create_hashed, dict_create_hashed_expandable)
1349 (dict_create_linear, dict_create_linear_expandable): New parameter
1350 'language'. Set the dictionary's language.
1351 (iter_match_first_hashed): Adjust to rename.
1352 (insert_symbol_hashed): Assert we don't see mismatching
1353 languages. Adjust to rename.
1354 (dict_hash): Rename to ...
1355 (default_search_name_hash): ... this and make extern.
1356 * dictionary.h (struct language_defn): Forward declare.
1357 (dict_create_hashed): New parameter 'language'.
1358 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1359 * f-lang.c (f_language_defn): Install default_search_name_hash.
1360 * go-lang.c (go_language_defn): Install default_search_name_hash.
1361 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1362 creation.
1363 * language.c (unknown_language_defn, auto_language_defn):
1364 * language.h (language_defn::la_search_name_hash): New field.
1365 (default_search_name_hash): Declare.
1366 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1367 * mdebugread.c (new_block): New parameter 'language'.
1368 * mdebugread.c (parse_symbol): Pass symbol language to block
1369 allocation.
1370 (psymtab_to_symtab_1): Pass down language.
1371 (new_symtab): Pass compunit's language to block allocation.
1372 * objc-lang.c (objc_language_defn): Install
1373 default_search_name_hash.
1374 * opencl-lang.c (opencl_language_defn):
1375 * p-lang.c (pascal_language_defn): Install
1376 default_search_name_hash.
1377 * rust-lang.c (rust_language_defn): Install
1378 default_search_name_hash.
1379 * stabsread.h (enum language): Forward declare.
1380 (process_one_symbol): Add 'language' parameter.
1381 * symtab.c (search_name_hash): New function.
1382 * symtab.h (search_name_hash): Declare.
1383 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1384
2a1dde5d
PA
13852017-11-08 Pedro Alves <palves@redhat.com>
1386
1387 * cp-name-parser.y (main): Don't initialize extra_chars.
1388
95a6b0a1
TT
13892017-11-07 Tom Tromey <tom@tromey.com>
1390
1391 * event-top.h (command_handler): Constify.
1392 * record-full.c (cmd_record_full_start): Update.
1393 * thread.c (thread_apply_all_command): Update.
1394 * printcmd.c (eval_command): Update.
1395 * mi/mi-main.c (mi_execute_cli_command): Update.
1396 (mi_execute_async_cli_command): Update.
1397 * tui/tui-stack.c (tui_update_command): Update.
1398 * cli/cli-interp.c (safe_execute_command): Constify.
1399 * record.c (record_start): Update.
1400 (record_start, record_stop, cmd_record_start): Update.
1401 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1402 (cmd_record_btrace_pt_start): Update.
1403 (cmd_record_btrace_start): Update.
1404 (cmd_record_btrace_start): Update.
1405 * reverse.c (exec_reverse_once): Update.
1406 * python/python.c (execute_gdb_command): Don't copy the command.
1407 * event-top.c (command_line_handler): Update.
1408 (command_handler): Constify.
1409 * defs.h (deprecated_call_command_hook): Constify.
1410 * cli/cli-script.h (execute_user_command): Constify.
1411 * cli/cli-script.c (execute_user_command): Constify.
1412 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1413 (enum command_control_type): Update.
1414 * main.c (catch_command_errors): Remove non-const overload.
1415 (catch_command_errors_ftype): Remove.
1416 * python/py-cmd.c (cmdpy_function): Constify.
1417 * guile/scm-cmd.c (cmdscm_function): Constify.
1418 * cli/cli-dump.c (call_dump_func): Constify.
1419 * cli/cli-decode.c (do_const_cfunc): Constify.
1420 (do_sfunc): Constify.
1421 (cmd_func): Constify.
1422 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1423 * top.h (execute_command): Constify.
1424 * top.c (execute_command): Constify.
1425 (execute_command_to_string): Constify.
1426 (deprecated_call_command_hook): Constify.
1427 * command.h (cmd_func): Constify.
1428 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1429
eb4c3f4a
TT
14302017-11-07 Tom Tromey <tom@tromey.com>
1431
1432 * ada-lang.c (catch_ada_exception_command): Constify.
1433 (catch_assert_command): Constify.
1434 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1435 (catch_rethrow_command): Constify.
1436 (catch_exception_command_1): Constify.
1437 * breakpoint.h (add_catch_command): Constify.
1438 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1439 (catch_syscall_split_args): Constify.
1440 * break-catch-sig.c (catch_signal_command): Constify.
1441 (catch_signal_split_args): Constify.
1442 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1443 cmd_const_sfunc_ftype.
1444 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1445 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1446 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1447 (add_setshow_string_cmd, struct cmd_list_element)
1448 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1449 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1450 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1451 Constify.
1452 (set_cmd_sfunc): Constify.
1453 (empty_sfunc): Constify.
1454 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1455 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1456 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1457 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1458 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1459 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1460 Constify.
1461 (set_cmd_sfunc): Constify.
1462 (cmd_sfunc_ftype): Remove.
1463 * compile/compile.c (set_compile_args): Constify.
1464 * infrun.c (set_disable_randomization): Constify.
1465 * infcmd.c (set_args_command, set_cwd_command): Constify.
1466 * breakpoint.c (set_condition_evaluation_mode): Constify.
1467 (add_catch_command): Constify.
1468 (catch_fork_command_1, catch_exec_command_1)
1469 (catch_load_command_1, catch_unload_command_1): Constify.
1470 (catch_load_or_unload): Constify.
1471 * guile/scm-param.c (pascm_set_func): Constify.
1472 (add_setshow_generic): Constify.
1473 * python/py-param.c (get_set_value): Constify.
1474 * top.h (set_verbose): Constify.
1475 * tui/tui-win.c (tui_set_var_cmd): Constify.
1476 * mi/mi-main.c (set_mi_async_command): Constify.
1477 * cli/cli-logging.c (set_logging_overwrite)
1478 (set_logging_redirect): Constify.
1479 * value.c (set_max_value_size): Constify.
1480 * valprint.c (set_input_radix, set_output_radix): Constify.
1481 * utils.c (set_width_command, set_height_command): Constify.
1482 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1483 * tracepoint.c (set_disconnected_tracing)
1484 (set_circular_trace_buffer, set_trace_buffer_size)
1485 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1486 * top.c (set_history_size_command, set_verbose, set_editing)
1487 (set_gdb_datadir, set_history_filename): Constify.
1488 * target.c (set_targetdebug, maint_set_target_async_command)
1489 (maint_set_target_non_stop_command, set_target_permissions)
1490 (set_write_memory_permission): Constify.
1491 (open_target): Constify.
1492 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1493 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1494 * symtab.c (set_symbol_cache_size_handler): Constify.
1495 * symfile.c (set_ext_lang_command): Constify.
1496 * symfile-debug.c (set_debug_symfile): Constify.
1497 * source.c (set_directories_command): Constify.
1498 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1499 * serial.c (set_parity): Constify.
1500 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1501 * remote.c (set_remote_exec_file, set_remotebreak)
1502 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1503 * record.c (set_record_insn_history_size)
1504 (set_record_call_history_size): Constify.
1505 * record-full.c (set_record_full_insn_max_num): Constify.
1506 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1507 * osabi.c (set_osabi): Constify.
1508 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1509 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1510 * maint.c (maintenance_set_profile_cmd): Constify.
1511 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1512 * language.c (set_language_command, set_range_command)
1513 (set_case_command): Constify.
1514 * infrun.c (set_non_stop, set_observer_mode)
1515 (set_stop_on_solib_events, set_schedlock_func)
1516 (set_exec_direction_func): Constify.
1517 * infcmd.c (set_inferior_tty_command): Constify.
1518 * disasm.c (set_disassembler_options_sfunc): Constify.
1519 * demangle.c (set_demangling_command): Constify.
1520 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1521 * cris-tdep.c (set_cris_version, set_cris_mode)
1522 (set_cris_dwarf2_cfi): Constify.
1523 * corefile.c (set_gnutarget_command): Constify.
1524 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1525 (set_target_wide_charset_sfunc): Constify.
1526 * breakpoint.c (update_dprintf_commands): Constify.
1527 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1528 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1529 (set_disassembly_style_sfunc): Constify.
1530 * arch-utils.c (set_endian, set_architecture): Constify.
1531 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1532 * agent.c (set_can_use_agent): Constify.
1533
5fed81ff
TT
15342017-11-07 Tom Tromey <tom@tromey.com>
1535
1536 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1537 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1538 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1539 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1540 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1541 (parse_int_arg, show_thread_default_detach_sc_cmd)
1542 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1543 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1544 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1545 (show_task_pause_cmd, set_task_detach_sc_cmd)
1546 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1547 (set_noninvasive_cmd, set_thread_pause_cmd)
1548 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1549 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1550 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1551 * windows-nat.c (display_selectors): Constify.
1552 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1553 non-const "cfunc".
1554 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1555 (cmd_cfunc_eq): Likewise.
1556 (struct cmd_list_element): Likewise.
1557 (do_cfunc): Remove.
1558 (cli_user_command_p): Update.
1559 * command.h (add_cmd): Remove non-const overload.
1560 (cmd_cfunc_ftype): Remove typedef.
1561 (cmd_cfunc_eq): Remove non-const overload.
1562 * value.c (show_values): Constify.
1563 * thread.c (thread_apply_all_command): Constify.
1564 * symfile.c (load_command): Constify.
1565 * source.c (directory_command): Constify.
1566 * maint.c (maintenance_internal_error)
1567 (maintenance_demangler_warning, maintenance_space_display)
1568 (maintenance_print_architecture, maintenance_translate_address)
1569 (maintenance_info_selftests, maintenance_internal_warning):
1570 Constify.
1571 * breakpoint.c (disable_trace_command, enable_trace_command):
1572 Constify.
1573 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1574 Constify.
1575 (add_auto_load_safe_path): Constify.
1576 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1577 * top.h (show_commands): Constify.
1578 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1579 * sparc64-tdep.c (adi_examine_command): Constify.
1580 (adi_assign_command): Constify.
1581
1d12d88f
TT
15822017-11-07 Tom Tromey <tom@tromey.com>
1583
1584 * frame.h (info_locals_command, info_args_command): Constify.
1585 * auto-load.h (auto_load_info_scripts): Constify.
1586 * inferior.h (registers_info): Constify.
1587 * copying.c: Rebuild.
1588 * copying.awk: Constify generated commands.
1589 * auto-load.c (auto_load_info_scripts)
1590 (info_auto_load_gdb_scripts): Constify.
1591 * cli/cli-decode.c (struct cmd_list_element): Take a
1592 cmd_const_cfunc_ftype.
1593 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1594 * tui/tui-win.c (tui_all_windows_info): Constify.
1595 * python/py-auto-load.c (info_auto_load_python_scripts):
1596 Constify.
1597 * cli/cli-cmds.c (show_command): Remove non-const overload.
1598 * tracepoint.c (info_tvariables_command, info_scope_command):
1599 Constify.
1600 (info_static_tracepoint_markers_command): Constify.
1601 * thread.c (info_threads_command): Constify.
1602 (print_thread_info_1): Constify.
1603 * target.c (info_target_command): Constify.
1604 * symtab.c (info_sources_command, info_functions_command)
1605 (info_types_command): Constify.
1606 (info_variables_command): Remove non-const overload.
1607 * symfile.c (info_ext_lang_command): Constify.
1608 * stack.c (info_frame_command, info_locals_command)
1609 (info_args_command): Constify.
1610 (backtrace_command): Remove non-const overload.
1611 * source.c (info_source_command, info_line_command): Constify.
1612 * solib.c (info_sharedlibrary_command): Constify.
1613 * skip.c (info_skip_command): Constify.
1614 * ser-go32.c (info_serial_command): Constify.
1615 * reverse.c (info_bookmarks_command): Constify.
1616 * printcmd.c (info_symbol_command, info_address_command)
1617 (info_display_command): Constify.
1618 * osdata.c (info_osdata_command): Constify.
1619 * objc-lang.c (info_selectors_command, info_classes_command):
1620 Constify.
1621 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1622 * memattr.c (info_mem_command): Constify.
1623 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1624 * linux-fork.c (info_checkpoints_command): Constify.
1625 * infrun.c (info_signals_command): Constify.
1626 * inflow.c (info_terminal_command): Constify.
1627 * inferior.c (info_inferiors_command): Constify.
1628 (print_inferior): Constify.
1629 * infcmd.c (info_program_command, info_all_registers_command)
1630 (info_registers_command, info_vector_command)
1631 (info_float_command): Constify.
1632 (registers_info): Constify.
1633 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1634 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1635 Constify.
1636 * f-valprint.c (info_common_command): Constify.
1637 * dcache.c (info_dcache_command): Constify.
1638 (dcache_info_1): Constify.
1639 * darwin-nat-info.c (info_mach_tasks_command)
1640 (info_mach_task_command, info_mach_ports_command)
1641 (info_mach_port_command, info_mach_threads_command)
1642 (info_mach_thread_command, info_mach_regions_command)
1643 (info_mach_regions_recurse_command, info_mach_region_command)
1644 (info_mach_exceptions_command): Constify.
1645 (get_task_from_args): Constify.
1646 * cp-support.c (info_vtbl_command): Constify.
1647 * breakpoint.c (info_watchpoints_command)
1648 (info_tracepoints_command): Constify.
1649 (info_breakpoints_command): Remove non-const overload.
1650 * avr-tdep.c (avr_io_reg_read_command): Constify.
1651 * auxv.c (info_auxv_command): Constify.
1652 * ada-tasks.c (info_tasks_command): Constify.
1653 (info_task): Constify.
1654 * ada-lang.c (info_exceptions_command): Constify.
1655
0b39b52e
TT
16562017-11-07 Tom Tromey <tom@tromey.com>
1657
1658 * solib.h (no_shared_libraries): Constify.
1659 * frame.h (return_command): Constify.
1660 * cli/cli-cmds.h (quit_command): Constify.
1661 * top.h (quit_command, execute_command): Constify.
1662 * target.h (flash_erase_command): Constify.
1663 * inferior.h (set_inferior_args, attach_command): Constify.
1664 * tracepoint.h (start_tracing, stop_tracing): Constify.
1665 * breakpoint.h (break_command, tbreak_command)
1666 (hbreak_command_wrapper, thbreak_command_wrapper)
1667 (rbreak_command_wrapper, watch_command_wrapper)
1668 (awatch_command_wrapper, rwatch_command_wrapper)
1669 (get_tracepoint_by_number): Constify.
1670 * symtab.c (info_variables_command, rbreak_command)
1671 (symtab_symbol_info): Constify.
1672 (info_variables_command): Add non-const overload.
1673 * top.c (dont_repeat_command): Constify.
1674 * breakpoint.c (ignore_command, commands_command)
1675 (condition_command, tbreak_command, hbreak_command)
1676 (thbreak_command, clear_command, break_command)
1677 (info_breakpoints_command, watch_command, rwatch_command)
1678 (awatch_command, trace_command, ftrace_command, strace_command)
1679 (trace_pass_command, break_range_command, dprintf_command)
1680 (agent_printf_command, get_tracepoint_by_number)
1681 (watch_maybe_just_location, trace_pass_command): Constify.
1682 (info_breakpoints_command): Add non-const overload.
1683 * tracefile.c (tsave_command): Constify.
1684 * infcmd.c (attach_command, disconnect_command, signal_command)
1685 (queue_signal_command, stepi_command, nexti_command)
1686 (finish_command, next_command, step_command, until_command)
1687 (advance_command, jump_command, continue_command, run_command)
1688 (start_command, starti_command, interrupt_command)
1689 (run_command_1, set_inferior_args, step_1): Constify.
1690 * inferior.c (add_inferior_command, remove_inferior_command)
1691 (clone_inferior_command): Constify.
1692 * linux-fork.c (checkpoint_command, restart_command): Constify.
1693 * windows-nat.c (signal_event_command): Constify.
1694 * guile/guile.c (guile_repl_command, guile_command): Constify.
1695 * printcmd.c (x_command, display_command, printf_command)
1696 (output_command, set_command, call_command, print_command)
1697 (eval_command): Constify.
1698 (non_const_set_command): Remove.
1699 (_initialize_printcmd): Update.
1700 * source.c (forward_search_command, reverse_search_command):
1701 Constify.
1702 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1703 Constify.
1704 * infrun.c (handle_command): Constify.
1705 * memattr.c (mem_command): Constify.
1706 * stack.c (return_command, up_command, up_silently_command)
1707 (down_command, down_silently_command, frame_command)
1708 (backtrace_command, func_command, backtrace_command_1): Constify.
1709 (backtrace_command): Add non-const overload.
1710 * remote-sim.c (simulator_command): Constify.
1711 * exec.c (set_section_command): Constify.
1712 * tracepoint.c (tdump_command, trace_variable_command)
1713 (tstatus_command, tstop_command, tstart_command)
1714 (end_actions_pseudocommand, while_stepping_pseudocommand)
1715 (collect_pseudocommand, teval_pseudocommand, actions_command)
1716 (start_tracing, stop_tracing): Constify.
1717 * value.c (init_if_undefined_command): Constify.
1718 * tui/tui-stack.c (tui_update_command): Constify.
1719 * tui/tui-win.c (tui_refresh_all_command)
1720 (tui_set_tab_width_command, tui_set_win_height_command)
1721 (tui_set_focus_command, tui_scroll_forward_command)
1722 (tui_scroll_backward_command, tui_scroll_left_command)
1723 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1724 (tui_set_win_height): Constify.
1725 * tui/tui-layout.c (tui_layout_command): Constify.
1726 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1727 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1728 (proc_untrace_sysexit_cmd): Constify.
1729 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1730 (threadset_test_cmd, threadlist_update_test_cmd)
1731 (threadalive_test): Constify.
1732 * objc-lang.c (print_object_command): Constify.
1733 * command.h (add_com): Constify.
1734 * cli/cli-dump.c (restore_command): Constify.
1735 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1736 (help_command, complete_command, shell_command, edit_command)
1737 (list_command, disassemble_command, make_command)
1738 (apropos_command, alias_command): Constify.
1739 * cli/cli-script.c (document_command, define_command)
1740 (while_command, if_command, validate_comname): Constify.
1741 * cli/cli-decode.c (struct cmd_list_element): Change type of
1742 "fun".
1743 * target.c (do_monitor_command, flash_erase_command): Constify.
1744 * regcache.c (reg_flush_command): Constify.
1745 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1746 (reverse_nexti, reverse_continue, reverse_finish)
1747 (save_bookmark_command, goto_bookmark_command)
1748 (exec_reverse_once): Constify.
1749 * python/python.c (python_interactive_command, python_command):
1750 Constify.
1751 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1752 Constify.
1753 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1754 * gcore.c (gcore_command): Constify.
1755
85c4be7c
TT
17562017-11-07 Tom Tromey <tom@tromey.com>
1757
1758 * printcmd.c (x_command): Call set_repeat_arguments.
1759 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1760 * top.c (repeat_arguments): New global.
1761 (set_repeat_arguments): New function.
1762 (execute_command): Handle repeat_arguments.
1763 (show_commands): Calls set_repeat_arguments.
1764 * command.h (set_repeat_arguments): Declare.
1765
022643b4
TT
17662017-11-07 Tom Tromey <tom@tromey.com>
1767
1768 * stack.c (backtrace_command): Use std::string.
1769 (backtrace_command_1): Make "count_exp" const.
1770
5614fb77
TT
17712017-11-07 Tom Tromey <tom@tromey.com>
1772
1773 * source.c (directory_switch, mod_path, add_path): Constify.
1774 * defs.h (add_path, mod_path, directory_switch): Constify.
1775 * mi/mi-cmd-env.c (env_mod_path): Constify.
1776
6be9a197
TT
17772017-11-07 Tom Tromey <tom@tromey.com>
1778
1779 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1780 (run_command_1, continue_command, step_1, jump_command)
1781 (signal_command, until_command, advance_command, finish_command)
1782 (attach_command): Update.
1783
c2252c0d
TT
17842017-11-07 Tom Tromey <tom@tromey.com>
1785
1786 * command.h (set_cmd_cfunc): Don't declare.
1787 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1788
1ee870c5
TT
17892017-11-07 Tom Tromey <tom@tromey.com>
1790
1791 * stack.c (select_frame_command): Constify.
1792 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1793 * command.h (add_com_suppress_notification): Constify.
1794
ee7ddd71
TT
17952017-11-07 Tom Tromey <tom@tromey.com>
1796
1797 * breakpoint.c (stop_command): Constify.
1798 * cli/cli-decode.c (struct cmd_list_element): Constify.
1799 * command.h (add_abbrev_prefix_cmd): Constify.
1800
95e95a6d
PA
18012017-11-07 Pedro Alves <palves@redhat.com>
1802
1803 * breakpoint.c (extract_bp_kind): New enum.
1804 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1805 factored out from ...
1806 (extract_bp_number_and_location): ... here.
1807 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1808
cc638e86
PA
18092017-11-07 Pedro Alves <palves@redhat.com>
1810
1811 * breakpoint.c (extract_bp_number_and_location): Change return
1812 type to void. Throw error instead of warning.
1813 (enable_disable_command): Adjust.
1814
d0fe4701
XR
18152017-11-07 Xavier Roirand <roirand@adacore.com>
1816 Pedro Alves <palves@redhat.com>
1817
1818 * breakpoint.c (map_breakpoint_number_range): New, factored out
1819 from ...
1820 (map_breakpoint_numbers): ... here.
1821 (find_location_by_number): Change parameters from string to
1822 breakpoint number and location.
1823 (extract_bp_number_and_location): New function.
1824 (enable_disable_bp_num_loc)
1825 (enable_disable_breakpoint_location_range)
1826 (enable_disable_command): New functions, factored out ...
1827 (enable_command, disable_command): ... these functions, and
1828 adjusted to support ranges.
1829 * NEWS: Document enable/disable breakpoint location range feature.
1830
635dc5b2
LM
18312017-11-06 Luis Machado <luis.machado@linaro.org>
1832
1833 * MAINTAINERS (Write After Approval): Update my e-mail address.
1834
556e5da5
PA
18352017-11-06 Pedro Alves <palves@redhat.com>
1836
1837 * gnu-nat.c (gnu_terminal_init): Delete.
1838 (gnu_target): Don't install gnu_terminal_init.
1839 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1840 (child_terminal_init): ... this function.
1841
d1928160
PA
18422017-11-06 Pedro Alves <palves@redhat.com>
1843
1844 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1845 sgtty.h.
1846 * config.in, configure: Regenerate.
1847
6aa899ce
PA
18482017-11-06 Pedro Alves <palves@redhat.com>
1849
1850 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1851 (async_init_signals): Adjust.
1852 (handle_stop_sig): Rename to ...
1853 (handle_sigtstp): ... this.
1854 (async_stop_sig): Rename to ...
1855 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1856 SIGTSTP path.
1857 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1858 instead of STOP_SIGNAL thoughout.
1859 (handle_stop_sig): Rename to ...
1860 (handle_sigtstp): ... this.
1861 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1862
a94799ac
PA
18632017-11-06 Pedro Alves <palves@redhat.com>
1864
1865 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1866 longer set flags twice in row.
1867
726e1356
PA
18682017-11-06 Pedro Alves <palves@redhat.com>
1869
1870 * Makefile.in (SER_HARDWIRE): Update comment.
1871 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1872 * common/gdb_termios.h: Delete file.
1873 * common/job-control.c: Include termios.h and unistd.h instead of
1874 gdb_termios.h.
1875 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1876 check.
1877 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1878 Remove sgtty code.
1879 * configure.ac: No longer check for termio.h and sgtty.h.
1880 * configure: Regenerate.
1881 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1882 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1883 Replace PROCESS_GROUP_TYPE references with pid_t references
1884 throughout.
1885 (gdb_getpgrp): Delete.
1886 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1887 (child_terminal_inferior): Remove comment. Remove sgtty code.
1888 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1889 gdb_getpgrp. Use serial_set_tty_state instead aof
1890 serial_noflush_set_tty_state. Remove sgtty code.
1891 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1892 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1893 (inferior_process_group): Now returns pid_t.
1894 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1895 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1896 * ser-event.c (serial_event_ops): Update.
1897 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1898 (dos_ops): Update.
1899 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1900 * ser-pipe.c (pipe_ops): Update.
1901 * ser-tcp.c (tcp_ops): Update.
1902 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1903 HAVE_TERMIOS checks.
1904 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1905 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1906 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1907 assume termios.
1908 (hardwire_noflush_set_tty_state): Delete.
1909 (hardwire_print_tty_state, hardwire_drain_output)
1910 (hardwire_flush_output, hardwire_flush_input)
1911 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1912 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1913 code, and assume termios.
1914 (hardwire_ops): Update.
1915 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1916 * serial.c (serial_noflush_set_tty_state): Delete.
1917 * serial.h (serial_noflush_set_tty_state): Delete.
1918 (serial_ops::noflush_set_tty_state): Delete.
1919
1cfb73db
UW
19202017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1921
1922 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1923 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1924 (COMMON_OBS): Remove doublest.o and dfp.o.
1925 Do not build target-float.c (instead of doublest.c)
1926 with -Wformat-nonliteral.
1927
1928 * doublest.c: Remove file.
1929 * doublest.h: Remove file.
1930 * dfp.c: Remove file.
1931 * dfp.h: Remove file.
1932
1933 * target-float.c: Do not include "doublest.h" and "dfp.h".
1934 (DOUBLEST): Move here from doublest.h.
1935 (enum float_kind): Likewise.
1936 (FLOATFORMAT_CHAR_BIT): Likewise.
1937 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1938 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1939 (floatformat_precision): Likewise.
1940 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1941 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1942 Likewise.
1943 (host_float_format, host_double_format, host_long_double_format):
1944 Likewise.
1945 (floatformat_to_string, floatformat_from_string): Likewise.
1946 (floatformat_to_doublest): Likewise. Also, inline the original
1947 convert_floatformat_to_doublest.
1948 (floatformat_from_doublest): Likewise. Also, inline the original
1949 convert_floatformat_from_doublest.
1950
1951 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1952 (MAX_DECIMAL_STRING): Move here from dfp.c.
1953 (match_endianness): Likewise.
1954 (set_decnumber_context, decimal_check_errors): Likewise.
1955 (decimal_from_number, decimal_to_number): Likewise.
1956 (decimal_to_string, decimal_from_string): Likewise. Make static.
1957 (decimal_from_longest, decimal_from_ulongest): Likewise.
1958 (decimal_to_longest): Likewise.
1959 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1960 (decimal_convert): Likewise.
1961
b07e9c46
UW
19622017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1963
1964 * doublest.c: Do not include "gdbtypes.h".
1965 (extract_typed_floating): Remove.
1966 (store_typed_floating): Remove.
1967 (convert_typed_floating): Remove.
1968 * doublest.h (struct type): Remove.
1969 (DOUBLEST_PRINT_FORMAT): Remove.
1970 (DOUBLEST_SCAN_FORMAT): Remove.
1971 (extract_typed_floating): Remove.
1972 (store_typed_floating): Remove.
1973 (convert_typed_floating): Remove.
1974
1975 * dfp.c (decimal_from_doublest): Remove.
1976 (decimal_to_doublest): Remove.
1977 * dfp.h: Do not include "doublest.h".
1978 (decimal_from_doublest): Remove.
1979 (decimal_to_doublest): Remove.
1980
1981 * value.c: Do not include "doublest.h" and "dfp.h".
1982 (value_as_double): Remove.
1983 (unpack_double): Remove.
1984 (value_from_double): Remove.
1985 (value_from_decfloat): Remove.
1986 * value.h: Do not include "doublest.h".
1987 (value_as_double): Remove.
1988 (unpack_double): Remove.
1989 (value_from_double): Remove.
1990 (value_from_decfloat): Remove.
1991
3b2ca824
UW
19922017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1993
1994 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1995 (i386_extract_return_value): Use target_float_convert.
1996 (i386_store_return_value): Likewise.
1997 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1998 (i387_value_to_register): Likewise.
1999 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2000 (ia64_register_to_value): Use target_float_convert.
2001 (ia64_value_to_register): Likewise.
2002 (ia64_extract_return_value): Likewise.
2003 (ia64_store_return_value): Likewise.
2004 (ia64_push_dummy_call): Likewise.
2005 * m68k-tdep.c: Include "target-float.h".
2006 (m68k_register_to_value): Use target_float_convert.
2007 (m68k_value_to_register): Likewise.
2008 (m68k_svr4_extract_return_value): Likewise.
2009 (m68k_svr4_store_return_value): Likewise.
2010 * ppc-sysv-tdep.c: Include "target-float.h".
2011 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2012 (do_ppc_sysv_return_value): Likewise.
2013 (ppc64_sysv_abi_push_freg): Likewise.
2014 (ppc64_sysv_abi_return_value_base): Likewise.
2015 * rs6000-aix-tdep.c: Include "target-float.h".
2016 (rs6000_push_dummy_call): Use target_float_convert.
2017 (rs6000_return_value): Likewise.
2018 * rs6000-lynx178-tdep.c: Include "target-float.h".
2019 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2020 (rs6000_lynx178_return_value): Likewise.
2021 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2022 (rs6000_register_to_value): Use target_float_convert.
2023 (rs6000_value_to_register): Likewise.
2024 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2025 (arm_extract_return_value): Use target_float_convert.
2026 (arm_store_return_value): Likewise.
2027 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2028 (sh_register_convert_to_virtual): Use target_float_convert.
2029 (sh_register_convert_to_raw): Likewise.
2030 * sh64-tdep.c: Include "target-float.h".
2031 (sh64_extract_return_value): Use target_float_convert.
2032 (sh64_register_convert_to_virtual): Likewise.
2033 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2034
14ad9311
UW
20352017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2036
2037 * target-float.c (floatformat_to_host_double): New function.
2038 (floatformat_from_host_double): Likewise.
2039 (target_float_to_host_double): Likewise.
2040 (target_float_from_host_double): Likewise.
2041 * target-float.h (target_float_to_host_double): Add prototype.
2042 (target_float_from_host_double): Likewise.
2043
2044 * guile/scm-value.c: Include "target-float.h".
2045 (gdbscm_value_to_real): Use target_float_to_host_double.
2046 Handle integer source values via value_as_long.
2047 * guile/scm-math.c: Include "target-float.h". Do not include
2048 "doublest.h", "dfp.h", and "expression.h".
2049 (vlscm_convert_typed_number): Use target_float_from_host_double.
2050 (vlscm_convert_number): Likewise.
2051
2052 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2053 (convert_value_from_python): Use target_float_from_host_double.
2054
50eff16b
UW
20552017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2056
2057 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2058 (cast_from_fixed): Likewise.
2059 (ada_scaling_type): New function.
2060 (ada_delta): Return value instead of DOUBLEST. Perform target
2061 arithmetic instead of host arithmetic.
2062 (scaling_factor): Rename to ...
2063 (ada_scaling_factor) ... this. Make non-static. Return value instead
2064 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2065 (ada_fixed_to_float): Remove.
2066 (ada_float_to_fixed): Remove.
2067 * ada-lang.h (ada_fixed_to_float): Remove.
2068 (ada_float_to_fixed): Remove.
2069 (ada_delta): Return value instead of DOUBLEST.
2070 (ada_scaling_factor): Add prototype.
2071
2072 * ada-typeprint.c: Include "target-float.h".
2073 (print_fixed_point_type): Perform target arithmetic instead of
2074 host arithmetic.
2075 * ada-valprint.c: Include "target-float.h".
2076 (ada_val_print_num): Perform target arithmetic instead of
2077 host arithmetic for fixed-point types.
2078
66c02b9e
UW
20792017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2080
2081 * target-float.c: Include <math.h>.
2082 (floatformat_binop): New function.
2083 (floatformat_compare): Likewise.
2084 (target_float_binop): Likewise.
2085 (target_float_compare): Likewise.
2086 * target-float.h: Include "expression.h".
2087 (target_float_binop): Add prototype.
2088 (target_float_compare): Likewise.
2089
2090 * valarith.c: Do not include "doublest.h" and "dfp.h".
2091 Include "common/byte-vector.h".
2092 (value_args_as_decimal): Remove, replace by ...
2093 (value_args_as_target_float): ... this function. Handle both
2094 binary and decimal target floating-point formats.
2095 (scalar_binop): Handle both binary and decimal FP using
2096 value_args_as_target_float and target_float_binop.
2097 (value_equal): Handle both binary and decimal FP using
2098 value_args_as_target_float and target_float_compare.
2099 (value_less): Likewise.
2100 (value_pos): Handle all scalar types as simple copy.
2101 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2102 * dfp.c (decimal_binop): Throw error instead of internal_error
2103 when called with an unsupported operation code.
2104
f69fdf9b
UW
21052017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2106
2107 * target-float.c (target_float_to_string): New function.
2108 (target_float_from_string): New function.
2109 * target-float.h (target_float_to_string): Add prototype.
2110 (target_float_from_string): Add prototype.
2111
2112 * valprint.c: Include "target-float.h". Do not include
2113 "doublest.h" and "dfp.h".
2114 (print_floating): Use target_float_to_string.
2115 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2116 (printf_floating): Use target_float_to_string.
2117 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2118 (print_i387_value): Use target_float_to_string.
2119 * mips-tdep.c: Include "target-float.h".
2120 (mips_print_fp_register): Use target_float_to_string.
2121 * sh64-tdep.c: Include "target-float.h".
2122 (sh64_do_fp_register): Use target_float_to_string.
2123
2124 * parse.c: Include "target-float.h". Do not include
2125 "doublest.h" and "dfp.h".
2126 (parse_float): Use target_float_from_string.
2127 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2128 (define_symbol): Use target_float_from_string.
2129 * gdbarch-selftests.c: Include "target-float.h".
2130 (register_to_value_test): Use target_float_from_string.
2131
70100014
UW
21322017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2133
2134 * Makefile.c (SFILES): Add target-float.c.
2135 (HFILES_NO_SRCDIR): Add target-float.h.
2136 (COMMON_OBS): Add target-float.o.
2137 * target-float.h: New file.
2138 * target-float.c: New file.
2139
2140 * doublest.c (floatformat_classify): Fix detection of float_zero.
2141
2142 * gdbtypes.c (is_floating_type): New function.
2143 * gdbtypes.h (is_floating_type): Add prototype.
2144
2145 * value.c: Do not include "floatformat.h".
2146 (unpack_double): Use target_float_is_valid.
2147 (is_floating_value): New function.
2148 * value.h (is_floating_value): Add prototype-
2149
2150 * valarith.c: Include "target-float.h".
2151 (value_logical_not): Use target_float_is_zero.
2152
2153 * python/py-value.c: Include "target-float.h".
2154 (valpy_nonzero): Use target_float_is_zero.
2155
ab4b1c46
TT
21562017-11-04 Tom Tromey <tom@tromey.com>
2157
2158 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2159
454dafbd
TT
21602017-11-04 Tom Tromey <tom@tromey.com>
2161
2162 * breakpoint.c (set_momentary_breakpoint): Return
2163 breakpoint_up.
2164 (until_break_command): Update.
2165 (new_until_break_fsm): Change argument types to
2166 breakpoint_up.
2167 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2168 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2169 Remove.
2170 * infcmd.c (finish_forward): Update.
2171 * breakpoint.h (set_momentary_breakpoint)
2172 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2173 (make_cleanup_delete_breakpoint): Remove.
2174 (struct breakpoint_deleter): New.
2175 (breakpoint_up): New typedef.
2176 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2177 (insert_exception_resume_breakpoint): Update.
2178 (insert_exception_resume_from_probe): Update.
2179 (insert_longjmp_resume_breakpoint): Update.
2180 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2181 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2182 * infcall.c (call_function_by_hand_dummy): Update
2183
331b71e5
TT
21842017-11-04 Tom Tromey <tom@tromey.com>
2185
2186 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2187
9f584b37
TT
21882017-11-04 Tom Tromey <tom@tromey.com>
2189
2190 * linux-tdep.c (linux_core_info_proc_mappings): Use
2191 gdb::def_vector.
2192 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2193 "size" argument.
2194 (linux_corefile_thread): Update.
2195 (linux_make_corefile_notes): Remove unused variable.
2196
779bc38e
TT
21972017-11-04 Tom Tromey <tom@tromey.com>
2198
2199 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2200 gdb::byte_vector.
2201
ed2b3126
TT
22022017-11-04 Tom Tromey <tom@tromey.com>
2203
2204 * objfiles.c (do_free_objfile_cleanup): Remove.
2205 * compile/compile-object-load.c (compile_object_load): Update.
2206 * objfiles.h (make_cleanup_free_objfile): Remove.
2207
7f6743fd
TT
22082017-11-04 Tom Tromey <tom@tromey.com>
2209
2210 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2211 (adi_read_versions): Change "tags" to "gdb_byte *".
2212 (adi_print_versions): Likewise.
2213
c80049d3
TT
22142017-11-04 Tom Tromey <tom@tromey.com>
2215
2216 * breakpoint.c
2217 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2218 from start_rbreak_breakpoints.
2219 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2220 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2221 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2222 * symtab.c (do_end_rbreak_breakpoints): Remove.
2223 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2224
167b0be1
TT
22252017-11-04 Tom Tromey <tom@tromey.com>
2226
2227 * cp-namespace.c (reset_directive_searched): Remove.
2228 (cp_lookup_symbol_via_imports): Use scoped_restore.
2229 * cp-support.c (reset_directive_searched): Remove.
2230 (make_symbol_overload_list_using): Use scoped_restore.
2231 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2232 (reset_directive_searched): Remove.
2233
5eae7aea
TT
22342017-11-04 Tom Tromey <tom@tromey.com>
2235
2236 * symfile.c (find_separate_debug_file_by_debuglink): Use
2237 unique_xmalloc_ptr.
2238
c6bcad5f
TT
22392017-11-04 Tom Tromey <tom@tromey.com>
2240
2241 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2242 type of "info".
2243 (compute_stack_depth): Likewise.
2244 (do_compile_dwarf_expr_to_c): Use std::vector.
2245
20dcd8ca
TT
22462017-11-04 Tom Tromey <tom@tromey.com>
2247
2248 * compile/compile-object-load.c (link_callbacks_einfo): Use
2249 std::string.
2250
33c7c59d
TT
22512017-11-04 Tom Tromey <tom@tromey.com>
2252
2253 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2254 Use scoped_free_pendings.
2255 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2256 scoped_free_pendings.
2257 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2258 (xcoff_initial_scan): Likewise.
2259 * buildsym.c (reset_symtab_globals): Update comment.
2260 (scoped_free_pendings): Rename from really_free_pendings.
2261 (prepare_for_building): Update comment.
2262 (buildsym_init): Likewise.
2263 * buildsym.h (class scoped_free_pendings): New class.
2264 (really_free_pendings): Don't declare.
2265
67fa57cf
UW
22662017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2267
2268 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2269 output when converting a zero value to a special byteorder format.
2270
f26ae15b
YQ
22712017-11-02 Yao Qi <yao.qi@linaro.org>
2272
2273 * frame.c (do_frame_register_read): Remove aspace.
2274 * jit.c (jit_frame_sniffer): Likwise.
2275 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2276 * regcache.c (regcache::regcache): Pass nullptr.
2277 (regcache_print): Caller updated.
2278 * regcache.h (regcache::regcache): Remove one constructor
2279 parameter aspace.
2280
6c6e9412
YQ
22812017-11-02 Yao Qi <yao.qi@linaro.org>
2282
2283 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2284
8b86c959
YQ
22852017-11-02 Yao Qi <yao.qi@linaro.org>
2286
2287 * breakpoint.c (insert_single_step_breakpoints): Update.
2288 * frame.c (struct frame_info) <aspace>: Add const.
2289 (frame_save_as_regcache): Add const.
2290 (get_frame_address_space): Return const address_space *.
2291 * frame.h (get_frame_address_space): Update declaration.
2292 * infrun.c (struct step_over_info) <aspace>: Add const.
2293 (set_step_over_info): Make aspace const.
2294 (displaced_step_prepare_throw): Change variable const.
2295 (resume): Likewise.
2296 (proceed): Likewise.
2297 (adjust_pc_after_break): Likewise.
2298 (save_waitstatus): Likewise.
2299 (handle_signal_stop): Likewise.
2300 (keep_going_pass_signal): Likewise.
2301 * jit.c (jit_frame_sniffer): Add const.
2302 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2303 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2304 * record-full.c (record_full_wait_1): Likewise.
2305 * regcache.c (regcache::regcache): Change parameter to const.
2306 * regcache.h (regcache::regcache): Likewise.
2307 (regcache::aspace): Return const address_space *.
2308 (regcache) <m_aspace>: Add const.
2309
a01bda52
YQ
23102017-11-02 Yao Qi <yao.qi@linaro.org>
2311
2312 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2313 * frame.c (create_sentinel_frame): Likewise.
2314 * infrun.c (displaced_step_prepare_throw): Likewise.
2315 (resume): Likewise.
2316 (thread_still_needs_step_over_bp): Likewise.
2317 (proceed): Likewise.
2318 (do_target_wait): Likewise.
2319 (adjust_pc_after_break): Likewise.
2320 (handle_syscall_event): Likewise.
2321 (save_waitstatus): Likewise.
2322 (handle_inferior_event_1): Likewise.
2323 (handle_signal_stop): Likewise.
2324 (keep_going_pass_signal): Likewise.
2325 * linux-nat.c (status_callback): Likewise.
2326 (save_stop_reason): Likewise.
2327 (resume_stopped_resumed_lwps): Likewise.
2328 * record-full.c (record_full_exec_insn): Likewise.
2329 (record_full_wait_1): Likewise.
2330 * regcache.c (get_regcache_aspace): Remove.
2331 * regcache.h (get_regcache_aspace): Remove.
2332
d999647b
YQ
23332017-11-02 Yao Qi <yao.qi@linaro.org>
2334
2335 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2336 (init_regcache_descr): Use gdbarch_num_regs.
2337 (regcache::regcache): Likewise.
2338 (regcache::get_register_status): Likewise.
2339 (regcache::assert_raw_regnum): Likewise.
2340 (regcache::cooked_read): Likewise.
2341 (regcache::cooked_read_value): Likewise.
2342 (regcache::cooked_write): Likewise.
2343 (regcache::dump): Likewise.
2344 (regcache::num_raw_registers): New method.
2345 * regcache.h (class regcache) <num_raw_registers>: New.
2346
4e888c28
YQ
23472017-11-02 Yao Qi <yao.qi@linaro.org>
2348
2349 * regcache.c (regcache::assert_regnum): New method.
2350 (regcache::invalidate): Call assert_regnum.
2351 (regcache::raw_update): Likewise.
2352 (regcache::raw_write): Likewise.
2353 (regcache::raw_read_part): Likewise.
2354 (regcache::raw_write_part): Likewise.
2355 (regcache::raw_supply): Likewise.
2356 (regcache::raw_supply_integer): Likewise.
2357 (regcache::raw_supply_zeroed): Likewise.
2358 (regcache::raw_collect): Likewise.
2359 (regcache::raw_collect_integer): Likewise.
2360 * regcache.h (regcache::assert_regnum): Declare.
2361
2e1b49b3
YQ
23622017-11-02 Yao Qi <yao.qi@linaro.org>
2363
2364 * regcache.c (regcache::dump): Remove code.
2365
6c5218df
YQ
23662017-11-02 Yao Qi <yao.qi@linaro.org>
2367
2368 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2369 Remove.
2370 <sizeof_cooked_register_status>: Remove.
2371 (init_regcache_descr): Update.
2372 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2373 (regcache::save): Likewise.
2374 (regcache::dump): Likewise.
2375
dcc31d28
JB
23762017-11-01 James Bowman <james.bowman@ftdichip.com>
2377
2378 * ft32-tdep.c (ft32_fetch_instruction): New function.
2379 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2380
3a87ae65
SM
23812017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2382
2383 * cli/cli-script.c (execute_control_command): Rename to ...
2384 (execute_control_command_1): ... this.
2385 (execute_control_command): New function.
2386
09b847f3
SM
23872017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2388
2389 * tracepoint.c (tfind_command): Remove const_cast.
2390
f871c485
MG
23912017-10-30 Mike Gulick <mgulick@mathworks.com>
2392
2393 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2394
b020ff80
SM
23952017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2396
2397 * common/common-utils.h (in_inclusive_range): New function.
2398 * arm-tdep.c (arm_record_extension_space): Use
2399 in_inclusive_range.
2400 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2401 * cris-tdep.c (cris_spec_reg_applicable): Use
2402 in_inclusive_range.
2403
1b81856f
PA
24042017-10-30 Pedro Alves <palves@redhat.com>
2405 Simon Marchi <simon.marchi@ericsson.com>
2406
2407 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2408 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2409
31b833b3
PA
24102017-10-30 Pedro Alves <palves@redhat.com>
2411
2412 * common/common-utils.c (string_appendf, string_vappendf): New
2413 functions.
2414 * common/common-utils.h (string_appendf, string_vappendf): New
2415 declarations.
2416 * unittests/common-utils-selftests.c (string_appendf_func)
2417 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2418 (string_vappendf_tests): New functions.
2419 (_initialize_common_utils_selftests): Register "string_appendf" and
2420 "string_vappendf tests".
2421
4a250334
PA
24222017-10-30 Pedro Alves <palves@redhat.com>
2423
2424 * unittests/common-utils-selftests.c (format_func): New typedef.
2425 (string_printf_tests, string_vprintf_tests): Tests factored out
2426 and merged to ...
2427 (test_format_func): ... this new function.
2428 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2429 test_format_func.
2430
16c5c17e
SM
24312017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2432
2433 * darwin-nat.c: Remove include of gdb.h.
2434
7ca51576
SM
24352017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2436
2437 * xtensa-xtregs.c: Fix formatting issues.
2438
c1342859
SM
24392017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2442
484d8d36
MD
24432017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2444
2445 PR python/21213
2446 * python/py-infthread.c (thpy_get_inferior): Increment reference
2447 of inferior before returning it.
2448
b5540b5f
SM
24492017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2450
2451 * unittests/common-utils-selftests.c (format): Add
2452 ATTRIBUTE_PRINTF.
2453
5a9dcda1
SM
24542017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2455
2456 * xml-syscall.c (struct syscall_desc): Add constructor.
2457 <name>: Change type to std::string.
2458 (syscall_desc_up): New typedef.
2459 (syscall_desc_p): Remove typeder.
2460 (DEF_VEC_P(syscall_desc_p)): Remove.
2461 (struct syscall_group_desc): Add constructor.
2462 <name>: Change type to std::string.
2463 <syscalls>: Change type to std::vector.
2464 (syscall_group_desc_up): New typedef.
2465 (syscall_group_desc_p): Remove typedef.
2466 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2467 (struct syscalls_info) <syscalls>: Change type to std::vector of
2468 unique_ptr.
2469 <groups>: Likewise.
2470 <my_gdb_datadir>: Change type to std::string.
2471 (syscalls_info_up): New typedef.
2472 (allocate_syscalls_info): Remove.
2473 (syscalls_info_free_syscalls_desc): Remove.
2474 (syscalls_info_free_syscall_group_desc): Remove.
2475 (free_syscalls_info): Remove.
2476 (make_cleanup_free_syscalls_info): Remove.
2477 (syscall_group_create_syscall_group_desc): Adjust.
2478 (syscall_group_add_syscall): Adjust.
2479 (syscall_create_syscall_desc): Adjust.
2480 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2481 (init_syscalls_info): Adjust.
2482 (syscall_group_get_group_by_name): Adjust.
2483 (xml_get_syscall_number): Adjust.
2484 (xml_get_syscall_name): Adjust.
2485 (xml_list_of_syscalls): Adjust.
2486 (xml_list_syscalls_by_group): Adjust.
2487 (xml_list_of_groups): Adjust.
2488
45461e0d
SM
24892017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2490
2491 * probe.h: Don't include gdb_vecs.h.
2492 (DEF_VEC_P (probe_p)): Remove.
2493 (find_probes_in_objfile): Return an std::vector.
2494 * probe.c (find_probes_in_objfile): Likewise.
2495 * breakpoint.c (breakpoint_objfile_data)
2496 <longjmp_probes>: Change type to std::vector.
2497 <exception_probes>: Likewise.
2498 (free_breakpoint_probes): Don't manually free vectors.
2499 (create_longjmp_master_breakpoint): Adjust.
2500 (create_exception_master_breakpoint): Adjust.
2501 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2502 parameter type, adjust.
2503 (svr4_create_solib_event_breakpoints): Adjust.
2504
43dce439
SM
25052017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2506
2507 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2508 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2509 with new.
2510 (free_breakpoint_probes): Rename to ...
2511 (free_breakpoint_objfile_data): ... this, and call delete on
2512 bp_objfile_data..
2513
6a1b9516
SM
25142017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2515
2516 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2517 (loaded_script_ptr): Remove typedef.
2518 (DEF_VEC_P (loaded_script_ptr)): Remove.
2519 (struct collect_matching_scripts_data): Add constructor.
2520 <scripts_p>: Change type to (pointer to) std::vector.
2521 (collect_matching_scripts_data): Adjust.
2522 (sort_scripts_by_name): Make suitable for std::sort.
2523 (print_scripts): Don't sort vector, adjust to std::vector.
2524 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2525
593e3209
SM
25262017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2527
2528 * symfile.c (filename_language): Make struct, not typedef. Add
2529 constructor.
2530 <ext>: Change type to std::string.
2531 (DEF_VEC_O (filename_language)): Remove.
2532 (filename_language_table): Change type to std::vector.
2533 (add_filename_language): Adjust.
2534 (set_ext_lang_command): Adjust.
2535 (info_ext_lang_command): Adjust.
2536 (deduce_language_from_filename): Adjust.
2537 (class scoped_restore_filename_language_table): Remove.
2538 (test_filename_language): Use scoped_restore.
2539 (test_set_ext_lang_command): Use scoped_restore, adjust to
2540 std::vector change.
2541
32fa66eb
SM
25422017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2543
2544 * symfile.c: Include selftest.h.
2545 (class scoped_restore_filename_language_table): New.
2546 (test_filename_language): New test.
2547 (test_set_ext_lang_command): New test.
2548 (_initialize_symfile): Register tests.
2549
4a27f119
KS
25502017-10-27 Keith Seitz <keiths@redhat.com>
2551
2552 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2553 in the bp_location, falling back to find_pc_sect_function when
2554 needed.
2555 (add_location_to_breakpoint): Save sal->symbol.
2556 * breakpoint.h (struct bp_location) <symbol>: New field.
2557 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2558 * symtab.h (struct symtab_and_line) <symbol>: New field.
2559
a43f3893
PF
25602017-10-26 Patrick Frants <osscontribute@gmail.com>
2561
7453e6b2 2562 PR gdb/13669
a43f3893
PF
2563 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2564 to rewind obstack.
2565
23cc4e1b
PA
25662017-10-26 Pedro Alves <palves@redhat.com>
2567
2568 * remote.c (remote_async_terminal_ours_p): Delete.
2569 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2570 Remove references to 'remote_async_terminal_ours_p'.
2571
6abc18bb
YQ
25722017-10-26 Yao Qi <yao.qi@linaro.org>
2573
2574 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2575
bd522513
YQ
25762017-10-26 Yao Qi <yao.qi@linaro.org>
2577
2578 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2579 aspace const.
2580 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2581 Likewise.
2582 * breakpoint.c (bpstat_check_location): Remove cast.
2583 (breakpoint_hit_catch_fork): Make aspce const.
2584 (breakpoint_hit_catch_solib): Likewise.
2585 (breakpoint_hit_catch_exec): Likewise.
2586 (breakpoint_hit_ranged_breakpoint): Likewise.
2587 (breakpoint_hit_watchpoint): Likewise.
2588 (base_breakpoint_breakpoint_hit): Likewise.
2589 (bkpt_breakpoint_hit): Likewise.
2590 (dprintf_breakpoint_hit): Likewise.
2591 (tracepoint_breakpoint_hit): Likewise.
2592 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2593
accd0bcd
YQ
25942017-10-26 Yao Qi <yao.qi@linaro.org>
2595
2596 * breakpoint.c (breakpoint_location_address_match): Change
2597 "struct address_space *" to "const address_space".
2598 (breakpoint_location_address_range_overlap): Likewise.
2599 (breakpoint_here_p): Likewise.
2600 (breakpoint_in_range_p): Likewise.
2601 (moribund_breakpoint_here_p): Likewise.
2602 (bp_location_inserted_here_p): Likewise.
2603 (software_breakpoint_inserted_here_p): Likewise.
2604 (hardware_breakpoint_inserted_here_p): Likewise.
2605 (hardware_watchpoint_inserted_in_range): Likewise.
2606 (bpstat_check_location): Likewise.
2607 (bpstat_stop_status): Likewise.
2608 (breakpoint_address_match): Likewise.
2609 (breakpoint_address_match_range): Likewise.
2610 (breakpoint_location_address_match): Likewise.
2611 (breakpoint_location_address_range_overlap): Likewise.
2612 (insert_single_step_breakpoint): Likewise.
2613 (breakpoint_has_location_inserted_here): Likewise.
2614 (single_step_breakpoint_inserted_here_p): Likewise.
2615 (pc_at_non_inline_function): Likewise.
2616 * breakpoint.h (bpstat_stop_status): Update declaration.
2617 (breakpoint_here_p): Likewise.
2618 (breakpoint_in_range_p): Likewise.
2619 (moribund_breakpoint_here_p): Likewise.
2620 (breakpoint_inserted_here_p): Likewise.
2621 (software_breakpoint_inserted_here_p): Likewise.
2622 (hardware_breakpoint_inserted_here_p): Likewise.
2623 (breakpoint_has_location_inserted_here): Likewise.
2624 (single_step_breakpoint_inserted_here_p): Likewise.
2625 (hardware_watchpoint_inserted_in_range): Likewise.
2626 (breakpoint_address_match): Likewise.
2627 (insert_single_step_breakpoint): Likewise.
2628 (pc_at_non_inline_function): Likewise.
2629 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2630 * record.c (record_check_stopped_by_breakpoint): Likewise.
2631 * record.h (record_check_stopped_by_breakpoint): Likewise.
2632 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2633
ac7936df
YQ
26342017-10-25 Yao Qi <yao.qi@linaro.org>
2635
2636 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2637 regcache->arch () instead get_regcache_arch.
2638 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2639 Likewise.
2640 (aarch64_fbsd_store_inferior_registers): Likewise.
2641 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2642 (store_gregs_to_thread): Likewise.
2643 (fetch_fpregs_from_thread): Likewise.
2644 (store_fpregs_to_thread): Likewise.
2645 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2646 (aarch64_store_return_value): Likewise.
2647 (aarch64_software_single_step): Likewise.
2648 * aix-thread.c (aix_thread_wait): Likewise.
2649 (supply_reg32): Likewise.
2650 (supply_sprs64): Likewise.
2651 (supply_sprs32): Likewise.
2652 (fill_gprs64): Likewise.
2653 (fill_gprs32): Likewise.
2654 (fill_sprs64): Likewise.
2655 (fill_sprs32): Likewise.
2656 (store_regs_user_thread): Likewise.
2657 (store_regs_kernel_thread): Likewise.
2658 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2659 (alphabsd_store_inferior_registers): Likewise.
2660 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2661 (alpha_store_return_value): Likewise.
2662 (alpha_deal_with_atomic_sequence): Likewise.
2663 (alpha_next_pc): Likewise.
2664 (alpha_software_single_step): Likewise.
2665 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2666 (amd64bsd_store_inferior_registers): Likewise.
2667 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2668 Likewise.
2669 (amd64_linux_store_inferior_registers): Likewise.
2670 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2671 (amd64_collect_native_gregset): Likewise.
2672 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2673 (amd64obsd_collect_uthread): Likewise.
2674 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2675 (amd64_collect_fpregset): Likewise.
2676 (amd64_supply_fxsave): Likewise.
2677 (amd64_supply_xsave): Likewise.
2678 (amd64_collect_fxsave): Likewise.
2679 (amd64_collect_xsave): Likewise.
2680 * arc-tdep.c (arc_write_pc): Likewise.
2681 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2682 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2683 (arm_fbsd_store_inferior_registers): Likewise.
2684 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2685 (store_vfp_regs): Likewise.
2686 (arm_linux_fetch_inferior_registers): Likewise.
2687 (arm_linux_store_inferior_registers): Likewise.
2688 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2689 (arm_linux_sigreturn_next_pc): Likewise.
2690 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2691 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2692 (fetch_register): Likewise.
2693 (store_register): Likewise.
2694 * arm-tdep.c (arm_is_thumb): Likewise.
2695 (displaced_in_arm_mode): Likewise.
2696 (bx_write_pc): Likewise.
2697 (arm_get_next_pcs_addr_bits_remove): Likewise.
2698 (arm_software_single_step): Likewise.
2699 (arm_extract_return_value): Likewise.
2700 (arm_store_return_value): Likewise.
2701 (arm_write_pc): Likewise.
2702 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2703 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2704 (bsd_uthread_store_registers): Likewise.
2705 * core-regset.c (fetch_core_registers): Likewise.
2706 * corelow.c (get_core_registers): Likewise.
2707 * cris-tdep.c (cris_store_return_value): Likewise.
2708 (cris_extract_return_value): Likewise.
2709 (find_step_target): Likewise.
2710 (find_step_target): Likewise.
2711 (cris_software_single_step): Likewise.
2712 * ctf.c (ctf_fetch_registers): Likewise.
2713 * darwin-nat.c (cancel_breakpoint): Likewise.
2714 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2715 * frv-tdep.c (frv_extract_return_value): Likewise.
2716 * ft32-tdep.c (ft32_store_return_value): Likewise.
2717 (ft32_extract_return_value): Likewise.
2718 * go32-nat.c (fetch_register): Likewise.
2719 (go32_fetch_registers): Likewise.
2720 (go32_store_registers): Likewise.
2721 (store_register): Likewise.
2722 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2723 (h8300_store_return_value): Likewise.
2724 * hppa-linux-nat.c (fetch_register): Likewise.
2725 (store_register): Likewise.
2726 (hppa_linux_fetch_inferior_registers): Likewise.
2727 (hppa_linux_store_inferior_registers): Likewise.
2728 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2729 (i386_darwin_store_inferior_registers): Likewise.
2730 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2731 (gnu_store_registers): Likewise.
2732 * i386-linux-nat.c (fetch_register): Likewise.
2733 (store_register): Likewise.
2734 (supply_gregset): Likewise.
2735 (fill_gregset): Likewise.
2736 (i386_linux_fetch_inferior_registers): Likewise.
2737 (i386_linux_store_inferior_registers): Likewise.
2738 (i386_linux_resume): Likewise.
2739 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2740 Likewise.
2741 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2742 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2743 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2744 (i386obsd_collect_uthread): Likewise.
2745 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2746 (i386_supply_gregset): Likewise.
2747 (i386_collect_gregset): Likewise.
2748 (i386_supply_fpregset): Likewise.
2749 (i386_collect_fpregset): Likewise.
2750 (i386_mpx_bd_base): Likewise.
2751 * i386-v4-nat.c (supply_fpregset): Likewise.
2752 (fill_fpregset): Likewise.
2753 * i387-tdep.c (i387_supply_fsave): Likewise.
2754 (i387_collect_fsave): Likewise.
2755 (i387_supply_fxsave): Likewise.
2756 (i387_collect_fxsave): Likewise.
2757 (i387_supply_xsave): Likewise.
2758 (i387_collect_xsave): Likewise.
2759 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2760 (ia64_linux_store_registers): Likewise.
2761 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2762 (ia64_extract_return_value): Likewise.
2763 (ia64_store_return_value): Likewise.
2764 (find_func_descr): Likewise.
2765 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2766 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2767 (inf_ptrace_store_registers): Likewise.
2768 * infrun.c (use_displaced_stepping): Likewise.
2769 (displaced_step_prepare_throw): Likewise.
2770 (resume): Likewise.
2771 (proceed): Likewise.
2772 (do_target_wait): Likewise.
2773 (adjust_pc_after_break): Likewise.
2774 (handle_inferior_event_1): Likewise.
2775 (handle_signal_stop): Likewise.
2776 (save_infcall_suspend_state): Likewise.
2777 (restore_infcall_suspend_state): Likewise.
2778 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2779 * jit.c (jit_frame_prev_register): Likewise.
2780 * linux-nat.c (save_stop_reason): Likewise.
2781 (linux_nat_wait_1): Likewise.
2782 (resume_stopped_resumed_lwps): Likewise.
2783 * linux-record.c (record_linux_sockaddr): Likewise.
2784 (record_linux_msghdr): Likewise.
2785 (record_linux_system_call): Likewise.
2786 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2787 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2788 (lm32_store_return_value): Likewise.
2789 * m32c-tdep.c (m32c_read_flg): Likewise.
2790 (m32c_pseudo_register_read): Likewise.
2791 (m32c_pseudo_register_write): Likewise.
2792 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2793 (m32r_linux_collect_gregset): Likewise.
2794 * m32r-tdep.c (m32r_store_return_value): Likewise.
2795 (m32r_extract_return_value): Likewise.
2796 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2797 (m68kbsd_collect_fpregset): Likewise.
2798 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2799 * m68k-linux-nat.c (fetch_register): Likewise.
2800 (old_fetch_inferior_registers): Likewise.
2801 (old_store_inferior_registers): Likewise.
2802 (store_regs): Likewise.
2803 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2804 (m68k_svr4_store_return_value): Likewise.
2805 * m88k-tdep.c (m88k_store_arguments): Likewise.
2806 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2807 (mi_cmd_data_write_register_values): Likewise.
2808 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2809 (mips_fbsd_store_inferior_registers): Likewise.
2810 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2811 (mips_fbsd_supply_gregs): Likewise.
2812 (mips_fbsd_collect_fpregs): Likewise.
2813 (mips_fbsd_collect_gregs): Likewise.
2814 (mips_fbsd_supply_fpregset): Likewise.
2815 (mips_fbsd_collect_fpregset): Likewise.
2816 (mips_fbsd_supply_gregset): Likewise.
2817 (mips_fbsd_collect_gregset): Likewise.
2818 * mips-linux-nat.c (supply_gregset): Likewise.
2819 (fill_gregset): Likewise.
2820 (supply_fpregset): Likewise.
2821 (fill_fpregset): Likewise.
2822 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2823 (mips_fill_gregset): Likewise.
2824 (mips_supply_fpregset): Likewise.
2825 (mips_fill_fpregset): Likewise.
2826 (mips64_supply_gregset): Likewise.
2827 (micromips_linux_sigframe_validate): Likewise.
2828 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2829 (mipsnbsd_fetch_inferior_registers): Likewise.
2830 (mipsnbsd_store_inferior_registers): Likewise.
2831 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2832 (mipsnbsd_supply_gregset): Likewise.
2833 (mipsnbsd_iterate_over_regset_sections): Likewise.
2834 (mipsnbsd_supply_reg): Likewise.
2835 (mipsnbsd_supply_fpreg): Likewise.
2836 * mips-tdep.c (mips_in_frame_stub): Likewise.
2837 (mips_dummy_id): Likewise.
2838 (is_octeon_bbit_op): Likewise.
2839 (micromips_bc1_pc): Likewise.
2840 (extended_mips16_next_pc): Likewise.
2841 (mips16_next_pc): Likewise.
2842 (deal_with_atomic_sequence): Likewise.
2843 * moxie-tdep.c (moxie_process_readu): Likewise.
2844 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2845 * nto-procfs.c (procfs_store_registers): Likewise.
2846 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2847 (ppcfbsd_store_inferior_registers): Likewise.
2848 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2849 (fetch_altivec_register): Likewise.
2850 (get_spe_registers): Likewise.
2851 (fetch_spe_register): Likewise.
2852 (fetch_altivec_registers): Likewise.
2853 (fetch_all_gp_regs): Likewise.
2854 (fetch_all_fp_regs): Likewise.
2855 (store_vsx_register): Likewise.
2856 (store_altivec_register): Likewise.
2857 (set_spe_registers): Likewise.
2858 (store_spe_register): Likewise.
2859 (store_altivec_registers): Likewise.
2860 (store_all_gp_regs): Likewise.
2861 (store_all_fp_regs): Likewise.
2862 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2863 (ppc_linux_collect_gregset): Likewise.
2864 (ppc_canonicalize_syscall): Likewise.
2865 (ppc_linux_record_signal): Likewise.
2866 (ppu2spu_prev_register): Likewise.
2867 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2868 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2869 (ppcobsd_store_registers): Likewise.
2870 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2871 Likewise.
2872 (ppc_ravenscar_generic_store_registers): Likewise.
2873 * procfs.c (procfs_fetch_registers): Likewise.
2874 (procfs_store_registers): Likewise.
2875 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2876 (ravenscar_store_registers): Likewise.
2877 (ravenscar_prepare_to_store): Likewise.
2878 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2879 * record-full.c (record_full_wait_1): Likewise.
2880 (record_full_registers_change): Likewise.
2881 (record_full_store_registers): Likewise.
2882 (record_full_core_fetch_registers): Likewise.
2883 (record_full_save): Likewise.
2884 (record_full_goto_insn): Likewise.
2885 * regcache.c (regcache_register_size): Likewise.
2886 (get_regcache_arch): Remove.
2887 (regcache_read_pc): Likewise.
2888 * regcache.h (get_regcache_arch): Remove.
2889 * remote-sim.c (gdbsim_fetch_register): Likewise.
2890 (gdbsim_store_register): Likewise.
2891 * remote.c (fetch_register_using_p): Likewise.
2892 (send_g_packet): Likewise.
2893 (remote_prepare_to_store): Likewise.
2894 (store_registers_using_G): Likewise.
2895 * reverse.c (save_bookmark_command): Likewise.
2896 (goto_bookmark_command): Likewise.
2897 * rs6000-aix-tdep.c (branch_dest): Likewise.
2898 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2899 (fetch_register): Likewise.
2900 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2901 (ppc_collect_reg): Likewise.
2902 (ppc_collect_gregset): Likewise.
2903 (ppc_collect_fpregset): Likewise.
2904 (ppc_collect_vsxregset): Likewise.
2905 (ppc_collect_vrregset): Likewise.
2906 (ppc_displaced_step_hw_singlestep): Likewise.
2907 (rs6000_pseudo_register_read): Likewise.
2908 (rs6000_pseudo_register_write): Likewise.
2909 * s390-linux-nat.c (supply_gregset): Likewise.
2910 (fill_gregset): Likewise.
2911 (s390_linux_fetch_inferior_registers): Likewise.
2912 * s390-linux-tdep.c (s390_write_pc): Likewise.
2913 (s390_software_single_step): Likewise.
2914 (s390_all_but_pc_registers_record): Likewise.
2915 (s390_linux_syscall_record): Likewise.
2916 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2917 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2918 (shnbsd_store_inferior_registers): Likewise.
2919 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2920 (sh_extract_return_value_fpu): Likewise.
2921 (sh_store_return_value_nofpu): Likewise.
2922 (sh_corefile_supply_regset): Likewise.
2923 (sh_corefile_collect_regset): Likewise.
2924 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2925 (sh64_store_return_value): Likewise.
2926 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2927 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2928 (sparc_store_inferior_registers): Likewise.
2929 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2930 (sparc_ravenscar_prepare_to_store): Likewise.
2931 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2932 (sparc_analyze_control_transfer): Likewise.
2933 (sparc_step_trap): Likewise.
2934 (sparc_software_single_step): Likewise.
2935 (sparc32_gdbarch_init): Likewise.
2936 (sparc_supply_rwindow): Likewise.
2937 (sparc_collect_rwindow): Likewise.
2938 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2939 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2940 (sparc64nbsd_collect_gregset): Likewise.
2941 (sparc64nbsd_supply_fpregset): Likewise.
2942 (sparc64nbsd_collect_fpregset): Likewise.
2943 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2944 (sparc64_supply_gregset): Likewise.
2945 (sparc64_collect_gregset): Likewise.
2946 (sparc64_supply_fpregset): Likewise.
2947 (sparc64_collect_fpregset): Likewise.
2948 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2949 * spu-tdep.c (spu_unwind_sp): Likewise.
2950 (spu2ppu_prev_register): Likewise.
2951 (spu_memory_remove_breakpoint): Likewise.
2952 * stack.c (return_command): Likewise.
2953 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2954 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2955 * tracefile.c (trace_save_ctf): Likewise.
2956 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2957 (do_windows_store_inferior_registers): Likewise.
2958 (windows_resume): Likewise.
2959 * xtensa-linux-nat.c (fill_gregset): Likewise.
2960 (supply_gregset_reg): Likewise.
2961 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2962 (xtensa_register_read_masked): Likewise.
2963 (xtensa_supply_gregset): Likewise.
2964 (xtensa_extract_return_value): Likewise.
2965 (xtensa_store_return_value): Likewise.
2966
edd079d9
UW
29672017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2968
2969 * doublest.c (floatformat_from_string): New function.
2970 * doublest.h (floatformat_from_string): Add prototype.
2971
2972 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2973 (OP_FLOAT): ... this.
2974 * expression.h: Do not include "doublest.h".
2975 (union exp_element): Replace doubleconst and decfloatconst by
2976 new element floatconst.
2977 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2978 (ada_evaluate_subexp): Likewise.
2979 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2980 OP_DOUBLE and OP_DECFLOAT.
2981 * expprint.c (print_subexp_standard): Likewise.
2982 (dump_subexp_body_standard): Likewise.
2983 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2984
2985 * parse.c: Include "dfp.h".
2986 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2987 (write_exp_elt_floatcst): New function.
2988 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2989 and OP_DECFLOAT.
2990 (operator_check_standard): Likewise.
2991 (parse_float): Do not accept suffix. Take type as input. Return bool.
2992 Return target format buffer instead of host DOUBLEST.
2993 Use floatformat_from_string and decimal_from_string to parse
2994 either binary or decimal floating-point types.
2995 (parse_c_float): Remove.
2996 * parser-defs.h: Do not include "doublest.h".
2997 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2998 (write_exp_elt_floatcst): Add prototype.
2999 (parse_float): Update prototype.
3000 (parse_c_float): Remove.
3001
3002 * c-exp.y: Do not include "dfp.h".
3003 (typed_val_float): Use byte buffer instead of DOUBLEST.
3004 (typed_val_decfloat): Remove.
3005 (DECFLOAT): Remove.
3006 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3007 (parse_number): Update to new parse_float interface.
3008 Parse suffixes and determine type before calling parse_float.
3009 Handle decimal and binary FP types the same way.
3010
3011 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3012 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3013 (parse_number): Update to new parse_float interface.
3014 Parse suffixes and determine type before calling parse_float.
3015
3016 * f-exp.y: Replace dval by typed_val_float.
3017 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3018 (parse_number): Use parse_float instead of atof.
3019
3020 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3021 (parse_go_float): Remove.
3022 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3023 (parse_number): Call parse_float instead of parse_go_float.
3024 Parse suffixes and determine type before calling parse_float.
3025
3026 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3027 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3028 (parse_number): Update to new parse_float interface.
3029 Parse suffixes and determine type before calling parse_float.
3030
3031 * m2-exp.y: Replace dval by byte buffer val.
3032 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3033 (parse_number): Call parse_float instead of atof.
3034
3035 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3036 (lex_number): Call parse_float instead of strtod.
3037 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3038 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3039 Use write_exp_elt_floatcst.
3040 (unit_testing): Remove static variable.
3041 (rust_type): Do not check unit_testing.
3042 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3043
3044 * ada-exp.y (type_float, type_double): Remove.
3045 (typed_val_float): Use byte buffer instead of DOUBLEST.
3046 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3047 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3048
cc628f3d
AH
30492017-10-25 Alan Hayward <alan.hayward@arm.com>
3050
3051 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3052 * arch/aarch64.h: New file.
3053
09a7c6aa
UW
30542017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3055
3056 * dfp.h (decimal_from_string): Use const reference for argument.
3057 * dfp.c (decimal_from_string): Likewise.
3058
8ba0dd51
UW
30592017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3060
3061 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3062 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3063 * mips-tdep.c (mips_print_fp_register): Likewise.
3064
16e812b2
UW
30652017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3066
3067 * common/format.h (enum argclass): Replace decfloat_arg by
3068 dec32float_arg, dec64float_arg, and dec128float_arg.
3069 * common/format.c (parse_format_string): Update to return
3070 new decimal float argument classes.
3071
3072 * printcmd.c (printf_decfloat): Rename to ...
3073 (printf_floating): ... this. Add argclass argument, and use it
3074 instead of parsing the format string again. Add support for
3075 binary floating-point values, using floatformat_to_string.
3076 Convert value to the target format if it doesn't already match.
3077 (ui_printf): Call printf_floating instead of printf_decfloat,
3078 also for double_arg / long_double_arg. Pass argclass.
3079
3080 * dfp.c (decimal_to_string): Add format string argument.
3081 * dfp.h (decimal_to_string): Likewise.
3082
3083 * doublest.c (floatformat_to_string): Add format string argument.
3084 * doublest.h (floatformat_to_string): Likewise.
3085
fdf0cbc2
UW
30862017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3087
3088 * doublest.c (floatformat_precision): New routine.
3089 (floatformat_to_string): Likewise.
3090 * doublest.c (floatformat_to_string): Add prototype.
3091
3092 * printcmd.c (print_scalar_formatted): Only call print_floating
3093 on floating-point types.
3094 * valprint.c: Do not include "floatformat.h".
3095 (generic_val_print_decfloat): Remove.
3096 (generic_val_print): Call generic_val_print_float for both
3097 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3098 (print_floating): Use floatformat_to_string. Handle decimal float.
3099 (print_decimal_floating): Remove, merge into floatformat_to_string.
3100 * value.h (print_decimal_floating): Remove.
3101
3102 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3103
5033013f
UW
31042017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3105
3106 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3107
a664f67e
SM
31082017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3109
3110 * memattr.h: Don't include vec.h.
3111 (struct mem_attrib): Initialize fields.
3112 <unknown>: New static method.
3113 (struct mem_region): Add constructors, operator<, initialize
3114 fields.
3115 * memattr.c: Include algorithm.
3116 (default_mem_attrib, unknown_mem_attrib): Remove.
3117 (user_mem_region_list): New global.
3118 (target_mem_region_list, mem_region_list): Change type to
3119 std::vector<mem_region>.
3120 (mem_use_target): Now a function.
3121 (target_mem_regions_valid): Change type to bool.
3122 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3123 (require_user_regions): Adjust.
3124 (require_target_regions): Adjust.
3125 (create_mem_region): Adjust.
3126 (lookup_mem_region): Adjust.
3127 (invalidate_target_mem_regions): Adjust.
3128 (mem_clear): Rename to...
3129 (user_mem_clear): ... this, and adjust.
3130 (mem_command): Adjust.
3131 (info_mem_command): Adjust.
3132 (mem_enable, enable_mem_command, mem_disable,
3133 disable_mem_command): Adjust.
3134 (mem_delete): Adjust.
3135 (delete_mem_command): Adjust.
3136 * memory-map.h (parse_memory_map): Return an std::vector.
3137 * memory-map.c (parse_memory_map): Likewise.
3138 (struct memory_map_parsing_data): Add constructor.
3139 <memory_map>: Point to std::vector.
3140 (memory_map_start_memory): Adjust.
3141 (memory_map_end_memory): Adjust.
3142 (memory_map_end_property): Adjust.
3143 (clear_result): Remove.
3144 * remote.c (remote_memory_map): Return an std::vector.
3145 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3146 Remove.
3147 (target_debug_print_mem_region_vector): New.
3148 * target-delegates.c: Regenerate.
3149 * target.h (mem_region_vector): New typedef.
3150 (to_memory_map): Return mem_region_vector.
3151 (target_memory_map): Return an std::vector.
3152 * target.c (target_memory_map): Return an std::vector.
3153 (flash_erase_command): Adjust.
3154
6e17c565
SM
31552017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3156
3157 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3158 Change type to std::string.
3159 (memory_map_start_property): Adjust.
3160 (memory_map_end_property): Adjust.
3161
cfba9872
SM
31622017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3163
3164 * infrun.h: Include common/byte-vector.h.
3165 (struct displaced_step_closure): New struct.
3166 (struct buf_displaced_step_closure): New struct.
3167 * infrun.c (displaced_step_closure::~displaced_step_closure):
3168 Provide default implementation.
3169 (displaced_step_clear): Deallocate step closure with delete.
3170 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3171 (aarch64_displaced_step_closure): ... this, extend
3172 displaced_step_closure.
3173 (aarch64_displaced_step_data) <dsc>: Change type to
3174 aarch64_displaced_step_closure.
3175 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3176 unique_ptr.
3177 (aarch64_displaced_step_fixup): Add cast for displaced step
3178 closure.
3179 * amd64-tdep.c (displaced_step_closure): Rename to ...
3180 (amd64_displaced_step_closure): ... this, extend
3181 displaced_step_closure.
3182 <insn_buf>: Change type to std::vector<gdb_byte>.
3183 <max_len>: Remove.
3184 (fixup_riprel): Change type of DSC parameter, adjust to type
3185 change of insn_buf.
3186 (fixup_displaced_copy): Change type of DSC parameter.
3187 (amd64_displaced_step_copy_insn): Instantiate
3188 amd64_displaced_step_closure.
3189 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3190 to type change of insn_buf.
3191 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3192 parameter DSC.
3193 (arm_linux_copy_svc): Likewise.
3194 (cleanup_kernel_helper_return): Likewise.
3195 (arm_catch_kernel_helper_return): Likewise.
3196 (arm_linux_displaced_step_copy_insn): Instantiate
3197 arm_displaced_step_closure.
3198 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3199 (displaced_read_reg): Change type of parameter DSC.
3200 (branch_write_pc): Likewise.
3201 (load_write_pc): Likewise.
3202 (alu_write_pc): Likewise.
3203 (displaced_write_reg): Likewise.
3204 (arm_copy_unmodified): Likewise.
3205 (thumb_copy_unmodified_32bit): Likewise.
3206 (thumb_copy_unmodified_16bit): Likewise.
3207 (cleanup_preload): Likewise.
3208 (install_preload): Likewise.
3209 (arm_copy_preload): Likewise.
3210 (thumb2_copy_preload): Likewise.
3211 (install_preload_reg): Likewise.
3212 (arm_copy_preload_reg): Likewise.
3213 (cleanup_copro_load_store): Likewise.
3214 (install_copro_load_store): Likewise.
3215 (arm_copy_copro_load_store) Likewise.
3216 (thumb2_copy_copro_load_store): Likewise.
3217 (cleanup_branch): Likewise.
3218 (install_b_bl_blx): Likewise.
3219 (arm_copy_b_bl_blx): Likewise.
3220 (thumb2_copy_b_bl_blx): Likewise.
3221 (thumb_copy_b): Likewise.
3222 (install_bx_blx_reg): Likewise.
3223 (arm_copy_bx_blx_reg): Likewise.
3224 (thumb_copy_bx_blx_reg): Likewise.
3225 (cleanup_alu_imm): Likewise.
3226 (arm_copy_alu_imm): Likewise.
3227 (thumb2_copy_alu_imm): Likewise.
3228 (cleanup_alu_reg): Likewise.
3229 (install_alu_reg): Likewise.
3230 (arm_copy_alu_reg): Likewise.
3231 (thumb_copy_alu_reg): Likewise.
3232 (cleanup_alu_shifted_reg): Likewise.
3233 (install_alu_shifted_reg): Likewise.
3234 (arm_copy_alu_shifted_reg): Likewise.
3235 (cleanup_load): Likewise.
3236 (cleanup_store): Likewise.
3237 (arm_copy_extra_ld_st): Likewise.
3238 (install_load_store): Likewise.
3239 (thumb2_copy_load_literal): Likewise.
3240 (thumb2_copy_load_reg_imm): Likewise.
3241 (arm_copy_ldr_str_ldrb_strb): Likewise.
3242 (cleanup_block_load_all): Likewise.
3243 (cleanup_block_store_pc): Likewise.
3244 (cleanup_block_load_pc): Likewise.
3245 (arm_copy_block_xfer): Likewise.
3246 (thumb2_copy_block_xfer): Likewise.
3247 (cleanup_svc): Likewise.
3248 (install_svc): Likewise.
3249 (arm_copy_svc): Likewise.
3250 (thumb_copy_svc): Likewise.
3251 (arm_copy_undef): Likewise.
3252 (thumb_32bit_copy_undef): Likewise.
3253 (arm_copy_unpred): Likewise.
3254 (arm_decode_misc_memhint_neon): Likewise.
3255 (arm_decode_unconditional): Likewise.
3256 (arm_decode_miscellaneous): Likewise.
3257 (arm_decode_dp_misc): Likewise.
3258 (arm_decode_ld_st_word_ubyte): Likewise.
3259 (arm_decode_media): Likewise.
3260 (arm_decode_b_bl_ldmstm): Likewise.
3261 (arm_decode_ext_reg_ld_st): Likewise.
3262 (thumb2_decode_dp_shift_reg): Likewise.
3263 (thumb2_decode_ext_reg_ld_st): Likewise.
3264 (arm_decode_svc_copro): Likewise.
3265 (thumb2_decode_svc_copro): Likewise.
3266 (install_pc_relative): Likewise.
3267 (thumb_copy_pc_relative_16bit): Likewise.
3268 (thumb_decode_pc_relative_16bit): Likewise.
3269 (thumb_copy_pc_relative_32bit): Likewise.
3270 (thumb_copy_16bit_ldr_literal): Likewise.
3271 (thumb_copy_cbnz_cbz): Likewise.
3272 (thumb2_copy_table_branch): Likewise.
3273 (cleanup_pop_pc_16bit_all): Likewise.
3274 (thumb_copy_pop_pc_16bit): Likewise.
3275 (thumb_process_displaced_16bit_insn): Likewise.
3276 (decode_thumb_32bit_ld_mem_hints): Likewise.
3277 (thumb_process_displaced_32bit_insn): Likewise.
3278 (thumb_process_displaced_insn): Likewise.
3279 (arm_process_displaced_insn): Likewise.
3280 (arm_displaced_init_closure): Likewise.
3281 (arm_displaced_step_fixup): Add cast for closure.
3282 * arm-tdep.h: Include infrun.h.
3283 (displaced_step_closure): Rename to ...
3284 (arm_displaced_step_closure): ... this, extend
3285 displaced_step_closure.
3286 <u::svc::copy_svc_os>: Change type of parameter DSC.
3287 <cleanup>: Likewise.
3288 (arm_process_displaced_insn): Likewise.
3289 (arm_displaced_init_closure): Likewise.
3290 (displaced_read_reg): Likewise.
3291 (displaced_write_reg): Likewise.
3292 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3293 Adjust.
3294 * i386-tdep.h: Include infrun.h.
3295 (i386_displaced_step_closure): New typedef.
3296 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3297 i386_displaced_step_closure.
3298 (i386_displaced_step_fixup): Adjust.
3299 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3300 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3301 and unique_ptr.
3302 (ppc_displaced_step_fixup): Adjust.
3303 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3304 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3305 and unique_ptr.
3306 (s390_displaced_step_fixup): Adjust.
3307
b392b304
SM
33082017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3309
3310 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3311 Remove declarations.
3312
d5833c62
TT
33132017-10-20 Tom Tromey <tom@tromey.com>
3314
3315 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3316 std::vector.
3317 (gdb_bfd_record_inclusion): Update.
3318 (bfdp): Remove typedef.
3319
06d5bbc8
TT
33202017-10-20 Tom Tromey <tom@tromey.com>
3321
3322 * gdb_bfd.c (gdb_bfd_ref): Use new.
3323 (struct gdb_bfd_data): Add constructor, destructor, and member
3324 initializers.
3325 (gdb_bfd_unref): Use delete.
3326
2712ce2e
TT
33272017-10-20 Tom Tromey <tom@tromey.com>
3328
3329 * exec.c (exec_file_attach): Use new_bfd_ref.
3330 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3331 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3332 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3333 new_bfd_ref.
3334 * gdb_bfd.h (new_bfd_ref): New function.
3335
fcc8fb2f
PA
33362017-10-20 Pedro Alves <palves@redhat.com>
3337
3338 * main.c (captured_command_loop): Add attribute noinline.
3339
4c2287b0
SM
33402017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3341
3342 * interps.c (struct interp_factory): Add constructor.
3343 (interp_factory_p): Remove typedef.
3344 (DEF_VEC_P(interp_factory_p)): Remove.
3345 (interpreter_factories): Change type to std::vector.
3346 (interp_factory_register): Adjust.
3347 (interp_lookup): Adjust.
3348 (interpreter_completer): Adjust.
3349
3d415c26
TT
33502017-10-19 Tom Tromey <tom@tromey.com>
3351
3352 * break-catch-syscall.c (catch_syscall_completer): Use
3353 std::string, gdb::unique_xmalloc_ptr.
3354
395423c4
TT
33552017-10-19 Tom Tromey <tom@tromey.com>
3356
3357 * infcall.c (call_function_by_hand_dummy): Use std::string.
3358
54f70bc1
TT
33592017-10-19 Tom Tromey <tom@tromey.com>
3360
3361 * mi/mi-main.c (mi_cmd_execute): Update.
3362 * top.h (prepare_execute_command): Return scoped_value_mark.
3363 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3364 Add move constructor.
3365 * top.c (prepare_execute_command): Return scoped_value_mark.
3366 (execute_command): Update.
3367
63929e84
PA
33682017-10-19 Pedro Alves <palves@redhat.com>
3369
3370 * xml-support.c (xml_fetch_content_from_file): Check fread's
3371 return.
3372
a75868f5
PA
33732017-10-19 Pedro Alves <palves@redhat.com>
3374
3375 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3376 async.
3377 (handle_error_fd): New function.
3378 (ser_base_async): Add/delete an event loop file handler for
3379 error_fd.
3380
2edf834e
PA
33812017-10-19 Pedro Alves <palves@redhat.com>
3382
3383 * xml-support.c (xml_fetch_content_from_file): Don't read in
3384 chunks. Instead use fseek to determine the file's size, and read
3385 it in one go.
3386
c8ba13ad
KS
33872017-11-18 Keith Seitz <keiths@redhat.com>
3388
3389 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3390 types.
3391 Add whitespace to front of type name.
3392
37534686
KS
33932017-10-18 Keith Seitz <keiths@redhat.com>
3394
3395 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3396 DW_AT_accessibility.
3397
28c7c158
YQ
33982017-10-18 Yao Qi <yao.qi@linaro.org>
3399
3400 * features/tic6x-c62x-linux.c: Remove.
3401
30f0b101
TT
34022017-10-17 Tom Tromey <tom@tromey.com>
3403
3404 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3405 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3406 (do_mixed_source_and_assembly): Likewise.
3407
57e12da9
TT
34082017-10-17 Tom Tromey <tom@tromey.com>
3409
3410 * regcache.c (regcache::xfer_part): Remove assertion.
3411
7b700999
PA
34122017-10-17 Pedro Alves <palves@redhat.com>
3413
3414 * xml-support.c (xml_fetch_content_from_file): Call
3415 unique_ptr::release() instead unique_ptr::get() when passing
3416 through xrealloc.
3417
d3037ba6
YQ
34182017-10-17 Yao Qi <yao.qi@linaro.org>
3419
3420 * regcache.c (regcache::xfer_part): Remove parameters read and
3421 write, add parameter is_raw. All callers are updated.
3422
83d5a34d
KS
34232017-10-16 Keith Seitz <keiths@redhat.com>
3424
3425 * c-typeprint.c (enum access_specifier): Moved here from
3426 c_type_print_base.
3427 (output_access_specifier): New function.
3428 (c_type_print_base): Consider typedefs when assessing
3429 whether access labels are needed.
3430 Use output_access_specifier as needed.
3431 Output access specifier for typedefs, if needed.
3432 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3433 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3434 fields.
3435 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3436 accessor macros.
3437
87028b87
TT
34382017-10-16 Tom Tromey <tom@tromey.com>
3439
3440 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3441 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3442 * target.c (target_fileio_read_stralloc): Update.
3443 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3444 * target.h (target_fileio_read_stralloc): Return
3445 unique_xmalloc_ptr.
3446
b7b030ad
TT
34472017-10-16 Tom Tromey <tom@tromey.com>
3448
3449 * xml-syscall.c (xml_init_syscalls_info): Update.
3450 * xml-support.c (xinclude_start_include): Update.
3451 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3452 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3453 (xml_fetch_content_from_file): Likewise.
3454 * osdata.c (get_osdata): Update.
3455 * target.h (target_read_stralloc, target_get_osdata): Return
3456 unique_xmalloc_ptr.
3457 * solib-aix.c (solib_aix_get_library_list): Update.
3458 * solib-target.c (solib_target_current_sos): Update.
3459 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3460 * xml-tdesc.c (fetch_available_features_from_target): Update.
3461 (target_fetch_description_xml): Update.
3462 (file_read_description_xml): Update.
3463 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3464 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3465 (remote_pid_to_exec_file): Update.
3466 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3467 (target_get_osdata): Likewise.
3468
b80406ac
TT
34692017-10-16 Tom Tromey <tom@tromey.com>
3470
3471 * remote.c (remote_register_number_and_offset): Use std::vector.
3472 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3473 (putpkt_binary): Use gdb::def_vector.
3474 (compare_sections_command): Use gdb::byte_vector.
3475
a90ecff8
TT
34762017-10-16 Tom Tromey <tom@tromey.com>
3477
3478 * ppc-linux-nat.c (hwdebug_insert_point): Use
3479 gdb::unique_xmalloc_ptr, XDUP.
3480
2dc0e219
TT
34812017-10-16 Tom Tromey <tom@tromey.com>
3482
3483 * probe.c (parse_probes): Use std::string.
3484 (info_probes_for_ops, enable_probes_command)
3485 (disable_probes_command): Remove cleanups.
3486
b05628f0
TT
34872017-10-16 Tom Tromey <tom@tromey.com>
3488
3489 * buildsym.c (block_compar): Remove.
3490 (end_symtab_get_static_block): Use std::vector.
3491
a79b1bc6
SM
34922017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3493
3494 * memrange.h (struct mem_range): Define operator< and operator==.
3495 (mem_range_s): Remove.
3496 (DEF_VEC_O (mem_range_s)): Remove.
3497 (normalize_mem_ranges): Change parameter type to std::vector.
3498 * memrange.c (compare_mem_ranges): Remove.
3499 (normalize_mem_ranges): Change parameter type to std::vector,
3500 adjust to vector change.
3501 * exec.c (section_table_available_memory): Return vector, remove
3502 parameter.
3503 (section_table_read_available_memory): Adjust to std::vector
3504 change.
3505 * remote.c (remote_read_bytes): Adjust to std::vector
3506 change.
3507 * tracepoint.h (traceframe_available_memory): Change parameter
3508 type to std::vector.
3509 * tracepoint.c (traceframe_available_memory): Change parameter
3510 type to std::vector, adjust.
3511 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3512 std::vector change.
3513 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3514 unittests/memrange-selftests.c.
3515 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3516 * gdb/unittests/memrange-selftests.c: New file.
3517
63f0e930
PA
35182017-10-16 Pedro Alves <palves@redhat.com>
3519
3520 * elfread.c (probe_key_free): Rename range-for variable.
3521 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3522 (find_probe_by_pc, collect_probes): Rename range-for variable.
3523
c40c7bfc
YQ
35242017-10-16 Yao Qi <yao.qi@linaro.org>
3525
3526 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3527 * features/tic6x-c62x.c: Remove.
3528 * features/tic6x-c64x-linux.c: Remove.
3529 * features/tic6x-c64x.c: Remove.
3530 * features/tic6x-c64xp-linux.c: Remove.
3531 * features/tic6x-c64xp.c: Remove.
3532 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3533 initialize_tdesc_tic6x_*_linux functions.
3534 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3535 initialize_tdesc_tic6x_* functions.
3536
df27ae6a
YQ
35372017-10-16 Yao Qi <yao.qi@linaro.org>
3538
3539 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3540 tic6x-c62x.
3541 * regformats/tic6x-c62x.dat: Remove.
3542 * regformats/tic6x-c64x.dat: Remove.
3543 * regformats/tic6x-c64xp.dat: Remove.
3544
86766165
SM
35452017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3546
3547 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3548 (the !HAVE_LIBEXPAT version).
3549
824dfcc3
SM
35502017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3551
3552 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3553 const.
3554
2098b393
SM
35552017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3556
3557 * target.h: Include tracepoint.h.
3558 (enum trace_find_type): Move to tracepoint.h.
3559 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3560 * tracepoint.h: Don't include target.h
3561 (enum trace_find_type): Move from target.h.
3562 (parse_traceframe_info): Return a unique ptr.
3563 * tracepoint.c (current_traceframe_info): Change type to unique
3564 ptr.
3565 (free_traceframe_info): Remove.
3566 (clear_traceframe_info): Don't manually free
3567 current_traceframe_info.
3568 (free_result): Remove.
3569 (parse_traceframe_info): Return a unique ptr.
3570 (get_traceframe_info): Adjust to unique ptr.
3571 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3572 * remote.c (remote_traceframe_info): Return a unique ptr.
3573 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3574 ptr.
3575 * target-debug.h (target_debug_print_traceframe_info_up): New
3576 macro.
3577 * target-delegates.c: Regenerate.
3578
4cdd21a8
SM
35792017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3580
3581 * memrange.h (struct mem_range): Add constructors.
3582 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3583 std::vector<mem_range>.
3584 * tracepoint.c (free_traceframe_info): Don't manually free
3585 vector.
3586 (traceframe_info_start_memory): Adjust to vector change.
3587 (traceframe_available_memory): Likewise.
3588 * tracefile-tfile.c (build_traceframe_info): Likewise.
3589 * ctf.c (ctf_traceframe_info): Likewise.
3590
d0d292a2
SM
35912017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3592
3593 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3594 std::vector<int>.
3595 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3596 (traceframe_info_start_tvar): Adjust to vector change.
3597 (parse_traceframe_info): Allocate with new.
3598 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3599 vector change.
3600 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3601 change.
3602 tfile_traceframe_info): Allocate with new.
3603 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3604 change.
3605
8d3c73ef
SM
36062017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3607
3608 * tracepoint.c (traceframe_info): Rename to...
3609 (current_traceframe_info): ...this.
3610 (clear_traceframe_info): Adjust.
3611 (get_traceframe_info): Adjust.
3612
b129dcac
SM
36132017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3614
3615 * nat/linux-osdata.c: Include algorithm.
3616 (compare_processes): Remove.
3617 (struct pid_pgid_entry): New struct.
3618 (linux_xfer_osdata_processgroups): Use std::vector instead of
3619 XNEWVEC.
3620
af5bf4ad
SM
36212017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3622
3623 * objfiles.h: Don't include symfile.h.
3624 (struct partial_symbol): Remove forward-declaration.
3625 (struct objfile) <global_psymbols, static_psymbols>: Change type
3626 to std::vector<partial_symbol *>.
3627 * objfiles.c (objfile::objfile): Don't memset those fields.
3628 (objfile::~objfile): Don't free those fields.
3629 * psympriv.h (struct psymbol_allocation_list): Remove
3630 forward-declaration.
3631 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3632 to std::vector.
3633 (start_psymtab_common): Change parameters to std::vector.
3634 * psymtab.c: Include algorithm.
3635 (require_partial_symbols): Call shrink_to_fit.
3636 (find_pc_sect_psymbol): Adjust to vector change.
3637 (match_partial_symbol): Likewise.
3638 (lookup_partial_symbol): Likewise.
3639 (psym_relocate): Likewise.
3640 (dump_psymtab): Likewise.
3641 (recursively_search_psymtabs): Likewise.
3642 (compare_psymbols): Remove.
3643 (sort_pst_symbols): Adjust to vector change.
3644 (start_psymtab_common): Likewise.
3645 (end_psymtab_common): Likewise.
3646 (psymbol_bcache_full): De-constify return value.
3647 (add_psymbol_to_bcache): Likewise.
3648 (extend_psymbol_list): Remove.
3649 (append_psymbol_to_list): Adjust to vector change.
3650 (add_psymbol_to_list): Likewise.
3651 (init_psymbol_list): Likewise.
3652 (maintenance_info_psymtabs): Likewise.
3653 (maintenance_check_psymtabs): Likewise.
3654 * symfile.h (struct psymbol_allocation_list): Remove.
3655 * symfile.c (reread_symbols): Adjust to vector change.
3656 * dbxread.c (start_psymtab): Change type of parameters.
3657 (dbx_symfile_read): Adjust to vector change.
3658 (read_dbx_symtab): Likewise.
3659 (start_psymtab): Change type of parameters.
3660 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3661 (create_partial_symtab): Likewise.
3662 (add_partial_symbol): Likewise.
3663 (write_one_signatured_type): Likewise.
3664 (recursively_write_psymbols): Likewise.
3665 * mdebugread.c (parse_partial_symbols): Likewise.
3666 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3667 (scan_xcoff_symtab): Adjust to vector change.
3668 (xcoff_initial_scan): Likewise.
3669
3ec5942f
SM
36702017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3671
3672 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3673
2399fe6a
YQ
36742017-10-13 Yao Qi <yao.qi@linaro.org>
3675
3676 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3677 Remove s390x-*-expedite, add s390x-expedite.
3678
4bf3f4a8
YQ
36792017-10-13 Yao Qi <yao.qi@linaro.org>
3680
3681 * features/s390-gs-linux64.c: Regenerated.
3682 * features/s390x-gs-linux64.c: Regenerated.
3683
9e86da07
TT
36842017-10-13 Tom Tromey <tom@tromey.com>
3685
3686 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3687 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3688 delete.
3689 * symfile.c (symbol_file_add_with_addrs): Use new.
3690 (symbol_file_add_separate): Update comment.
3691 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3692 * jit.c (jit_object_close_impl): Use new.
3693 (jit_unregister_code): Use delete.
3694 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3695 (~objfile): Rename from free_objfile.
3696 (free_objfile_separate_debug, do_free_objfile_cleanup)
3697 (free_all_objfiles, objfile_purge_solibs): Use delete.
3698 * objfiles.h (struct objfile): Add constructor and destructor.
3699 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3700 (allocate_objfile, free_objfile): Don't declare.
3701 (struct objstats): Add initializers.
3702
c2508e90
SM
37032017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3704
3705 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3706 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3707 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3708 * gdbarch.h: Regenerate.
3709 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3710 Adjust comment.
3711 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3712 (i386_displaced_step_fixup): Adjust comment.
3713 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3714
a900ff72
TT
37152017-10-12 Tom Tromey <tom@tromey.com>
3716
3717 * prologue-value.h (pv_area::store_would_trash): Return bool.
3718 (pv_area::find_reg): Likewise.
3719 * prologue-value.c (pv_area::store_would_trash): Return bool.
3720 (pv_area::find_reg): Likewise.
3721
f7b7ed97
TT
37222017-10-12 Tom Tromey <tom@tromey.com>
3723
3724 * s390-linux-tdep.c (s390_store, s390_load)
3725 (s390_check_for_saved, s390_analyze_prologue): Update.
3726 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3727 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3728 * prologue-value.h (class pv_area): Move from prologue-value.c.
3729 Change names of members. Add constructor, destructor, member
3730 functions.
3731 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3732 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3733 (pv_area_fetch, pv_area_scan): Don't declare.
3734 * prologue-value.c (struct pv_area::area_entry): Now member of
3735 pv_area.
3736 (struct pv_area): Move to prologue-value.h.
3737 (pv_area::pv_area): Rename from make_pv_area.
3738 (pv_area::~pv_area): Rename from free_pv_area.
3739 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3740 (clear_entries, find_entry, overlaps, store_would_trash, store)
3741 (fetch, find_reg, scan): Now member of pv_area.
3742 Remove "area" argument. Update.
3743 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3744 Update.
3745 * mn10300-tdep.c (push_reg, check_for_saved)
3746 (mn10300_analyze_prologue): Update.
3747 * mep-tdep.c (is_arg_spill, check_for_saved)
3748 (mep_analyze_prologue): Update.
3749 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3750 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3751 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3752 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3753 Update.
3754 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3755 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3756
466eecee
SM
37572017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3758
3759 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3760 * linux-nat.c (linux_nat_delete_thread): New variable.
3761 (lwp_free): Invoke linux_nat_delete_thread if set.
3762 (linux_nat_set_delete_thread): New function.
3763 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3764 thread delete callback.
3765 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3766 (_initialize_arm_linux_nat): Assign thread delete callback.
3767 * s390-linux-nat.c (s390_delete_thread): New function.
3768 (_initialize_s390_nat): Assign thread delete callback.
3769 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3770 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3771 function.
3772 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3773 declaration.
3774 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3775 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3776
f71c8822
TT
37772017-10-09 Tom Tromey <tom@tromey.com>
3778
3779 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3780 std::string.
3781 * tui/tui-layout.c (enum tui_status): Use std::string.
3782
981a3fb3
TT
37832017-10-11 Tom Tromey <tom@tromey.com>
3784
3785 * gdbthread.h (thread_command): Constify.
3786 * inferior.h (detach_command): Constify.
3787 * top.h (set_history, show_history): Constify.
3788 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3789 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3790 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3791 * printcmd.c (set_command): Constify.
3792 (non_const_set_command): New function.
3793 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3794 * breakpoint.c (enable_command, disable_command, delete_command)
3795 (catch_command, tcatch_command, set_breakpoint_cmd)
3796 (show_breakpoint_cmd): Constify.
3797 * macrocmd.c (macro_command): Constify.
3798 * infcmd.c (unset_command, kill_command, detach_command)
3799 (info_proc_cmd): Constify.
3800 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3801 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3802 (info_auto_load_cmd): Constify.
3803 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3804 (unset_tdesc_cmd): Constify.
3805 * ada-lang.c (set_ada_command, show_ada_command)
3806 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3807 * guile/guile.c (set_guile_command, show_guile_command)
3808 (info_guile_command): Constify.
3809 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3810 Constify.
3811 * skip.c (skip_command): Constify.
3812 * compile/compile.c (_initialize_compile): Constify.
3813 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3814 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3815 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3816 (maint_btrace_pt_show_cmd): Constify.
3817 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3818 Constify.
3819 * python/python.c (user_show_python, user_set_python): Constify.
3820 * mips-tdep.c (set_mips_command, show_mips_command)
3821 (set_mipsfpu_command): Constify.
3822 * record-btrace.c (cmd_record_btrace_start)
3823 (cmd_set_record_btrace, cmd_show_record_btrace)
3824 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3825 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3826 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3827 Constify.
3828 * symfile.c (overlay_command): Constify.
3829 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3830 * cli/cli-logging.c (set_logging_command, show_logging_command):
3831 Constify.
3832 * cli/cli-dump.c (dump_command, append_command)
3833 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3834 (tekhex_dump_command, binary_dump_command)
3835 (binary_append_command): Constify.
3836 * cli/cli-decode.c (struct cmd_list_element): Change type of
3837 "fun".
3838 * cli/cli-cmds.c (info_command, show_command, set_debug)
3839 (show_debug): Constify.
3840 (show_command): Add non-const overload.
3841 * top.c (set_history, show_history): Constify.
3842 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3843 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3844 * target.c (target_command): Constify.
3845 * sparc64-tdep.c (info_adi_command): Constify.
3846 * record-full.c (cmd_record_full_start): Constify.
3847 (set_record_full_command): Constify. Fix typo.
3848 (show_record_full_command): Constify.
3849 * thread.c (thread_command, thread_apply_command): Constify.
3850 * memattr.c (dummy_cmd): Constify.
3851 * value.c (function_command): Constify.
3852 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3853 * probe.c (info_probes_command): Constify.
3854 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3855 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3856 (show_thread_cmd, set_thread_default_cmd)
3857 (show_thread_default_cmd): Constify.
3858 (check_empty): Constify.
3859 * tracepoint.c (tfind_command): Constify.
3860 * cp-support.c (maint_cplus_command): Constify.
3861 * windows-tdep.c (info_w32_command): Constify.
3862 * record.c (cmd_record_start, set_record_command)
3863 (show_record_command, info_record_command, cmd_record_goto):
3864 Constify.
3865 * ravenscar-thread.c (set_ravenscar_command)
3866 (show_ravenscar_command): Constify.
3867 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3868 Constify.
3869 (add_internal_problem_command): Remove casts.
3870 * arc-tdep.c (maintenance_print_arc_command): Constify.
3871 * valprint.c (set_print, show_print, set_print_raw)
3872 (show_print_raw): Constify.
3873 * maint.c (maintenance_command, maintenance_info_command)
3874 (maintenance_print_command, maintenance_set_cmd)
3875 (maintenance_show_cmd, set_per_command_cmd)
3876 (show_per_command_cmd, maintenance_check_command): Constify.
3877 * language.c (set_check, show_check): Constify.
3878 * typeprint.c (show_print_type, set_print_type): Constify.
3879 * go32-nat.c (go32_info_dos_command): Constify.
3880
fdf44873
TT
38812017-10-11 Tom Tromey <tom@tromey.com>
3882
3883 * breakpoint.c (prepare_re_set_context): Remove.
3884 (breakpoint_re_set_one): Update. Don't use cleanups.
3885 (breakpoint_re_set): Use scoped_restore, std::string, and
3886 scoped_restore_current_language.
3887
81b1e71c
TT
38882017-10-11 Tom Tromey <tom@tromey.com>
3889
3890 * breakpoint.c (commands_command_1): Use std::string.
3891 (cleanup_executing_breakpoints): Remove.
3892 (bpstat_do_actions_1): Use scoped_restore.
3893 (bpstat_check_watchpoint): Use std::string.
3894 (decode_static_tracepoint_spec): Likewise.
3895 (break_range_command): Likewise.
3896 (watch_command_1): Likewise.
3897 (compare_breakpoints): Change argument types.
3898 (clear_command): Use std::vector.
3899 (cleanup_executing_breakpoints): Remove.
3900 (update_global_location_list): Use unique_xmalloc_ptr.
3901 (strace_command): Remove unused declaration.
3902
4f9d9906
JB
39032017-10-11 John Baldwin <jhb@FreeBSD.org>
3904
3905 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3906 * NEWS: Mention new FreeBSD/arm native configuration.
3907 * configure.host: Add arm*-*-freebsd*.
3908 * configure.nat: Likewise.
3909 * arm-fbsd-nat.c: New file.
3910
7176dfd2
JB
39112017-10-11 John Baldwin <jhb@FreeBSD.org>
3912
3913 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3914 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3915 * NEWS: Mention new FreeBSD/arm target.
3916 * configure.tgt: Add arm*-*-freebsd*.
3917 * arm-fbsd-tdep.c: New file.
3918 * arm-fbsd-tdep.h: New file.
3919
fe220226
MR
39202017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3921
3922 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3923 `gdbarch_elfcore_write_linux_prpsinfo'.
3924 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3925 method.
3926 (elf_internal_linux_prpsinfo): Remove declaration.
3927 * gdbarch.h: Regenerate.
3928 * gdbarch.c: Regenerate.
3929
a2f63b2e
MR
39302017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3931
3932 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3933 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3934
458ca1d0
PA
39352017-10-11 Pedro Alves <palves@redhat.com>
3936
3937 * breakpoint.c (reattach_breakpoints): Delete.
3938 * breakpoint.h (reattach_breakpoints): Delete.
3939
905014d7
SM
39402017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3941
3942 * symfile.c (registered_sym_fns): Make struct, not typedef.
3943 (DEF_VEC_O (registered_sym_fns)): Remove.
3944 (symtab_fns): Change type to std::vector.
3945 (add_symtab_fns): Adjust.
3946 (find_sym_fns): Adjust.
3947
56d704da
AK
39482017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3949
3950 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3951 * arc-tdep.h (arc_arch_is_em): New function.
3952 (arc_arch_is_hs): Likewise.
3953
7fa29be9
EB
39542017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3955
3956 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3957 parentheses in the declaration.
3958 (macro_lookup_inclusion): Likewise.
3959 (macro_lookup_definition): Likewise.
3960 * p-lang.h (pascal_builtin_types): Likewise.
3961 * tui/tui-data.c (tui_win_list): Likewise.
3962 * tui/tui-data.h (tui_win_list): Likewise.
3963 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3964
d9b477e3
KB
39652017-10-11 Mark Rages <markrages@gmail.com>
3966
3967 * target-memory.c (block_boundaries): Fix for block address not
3968 aligned on block size.
3969
65630365
PA
39702017-10-10 Pedro Alves <palves@redhat.com>
3971 Tom Tromey <tom@tromey.com>
3972
3973 * breakpoint.c (struct captured_breakpoint_query_args)
3974 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3975 (print_breakpoint): New.
3976 * breakpoint.h (print_breakpoint): Declare.
3977 * common/common-exceptions.h (enum return_reason): Remove
3978 references to catch_exceptions.
3979 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3980 Delete.
3981 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3982 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3983 * gdb.h: Delete.
3984 * gdbthread.h (thread_select): Declare.
3985 * mi/mi-cmd-break.c: Don't include gdb.h.
3986 (breakpoint_notify): Use print_breakpoint.
3987 * mi/mi-cmd-catch.c: Don't include gdb.h.
3988 * mi/mi-interp.c: Don't include gdb.h.
3989 (mi_print_breakpoint_for_event): New.
3990 (mi_breakpoint_created, mi_breakpoint_modified): Use
3991 mi_print_breakpoint_for_event.
3992 * mi/mi-main.c: Don't include gdb.h.
3993 (mi_cmd_thread_select): Parse the global thread ID here. Use
3994 thread_select instead of gdb_thread_select.
3995 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3996 of using gdb_list_thread_ids.
3997 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3998 FILEIO_ENOSYS here.
3999 (remote_fileio_request): Use TRY/CATCH instead of
4000 catch_exceptions.
4001 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4002 (symbol_file_add_from_memory_wrapper): Delete.
4003 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4004 * thread.c: Don't include gdb.h.
4005 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4006 (thread_alive): Use thread_select.
4007 (do_captured_thread_select): Delete, parts salvaged as ...
4008 (thread_select): ... this new function.
4009 (gdb_thread_select): Delete.
4010
bf469271
PA
40112017-10-10 Pedro Alves <palves@redhat.com>
4012 Tom Tromey <tom@tromey.com>
4013
4014 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4015 and reverse logic.
4016 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4017 No longer macros. Instead ...
4018 (enum wp_check_result): They're now values of this new
4019 enumeration.
4020 (watchpoint_check): Change return type to wp_check_result and
4021 parameter type to bpstat.
4022 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4023 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4024 catch_errors. Reverse logic of watchpoint_check call.
4025 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4026 pointer as parameter.
4027 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4028 * common/common-exceptions.c (throw_exception_sjlj): Update
4029 comments to avoid mentioning catch_errors.
4030 * exceptions.c (catch_errors): Delete.
4031 * exceptions.h: Update comments to avoid mentioning catch_errors.
4032 (catch_errors_ftype, catch_errors): Delete.
4033 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4034 (hook_stop_stub): Delete.
4035 (restore_selected_frame): Change return type to void, and
4036 parameter type to const frame_id &.
4037 (restore_infcall_control_state): Use TRY/CATCH instead of
4038 catch_errors.
4039 * main.c (captured_command_loop): Return void and remove
4040 parameter. Remove references to catch_errors.
4041 (captured_main): Use TRY/CATCH instead of catch_errors.
4042 * objc-lang.c (objc_submethod_helper_data)
4043 (find_objc_msgcall_submethod_helper): Delete.
4044 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4045 catch_errors.
4046 * record-full.c (record_full_message): Return void.
4047 (record_full_message_args, record_full_message_wrapper): Delete.
4048 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4049 instead of catch_errors.
4050 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4051 parameter type to int.
4052 * solib-darwin.c (open_symbol_file_object): Ditto.
4053 * solib-dsbt.c (open_symbol_file_object): Ditto.
4054 * solib-frv.c (open_symbol_file_object): Ditto.
4055 * solib-svr4.c (open_symbol_file_object): Ditto.
4056 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4057 * solib.c (update_solib_list): Use TRY/CATCH instead of
4058 catch_errors.
4059 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4060 Change type.
4061 * symmisc.c (struct print_symbol_args): Remove.
4062 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4063 (print_symbol): Change type.
4064 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4065 and remove parameters.
4066 (catch_errors): New.
4067 (get_windows_debug_event): Adjust.
4068
1a56bfa5
TT
40692017-10-09 Tom Tromey <tom@tromey.com>
4070
4071 * mi/mi-main.c (free_splay_tree): Remove.
4072 (list_available_thread_groups): Use splay_tree_up.
4073 * common/gdb_splay_tree.h: New file.
4074
0c478e2d
TT
40752017-10-09 Tom Tromey <tom@tromey.com>
4076
4077 * mi/mi-main.c (do_nothing): Remove.
4078 (list_available_thread_groups): Update.
4079
cbd2b4e3
PA
40802017-10-09 Pedro Alves <palves@redhat.com>
4081
4082 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4083 reading registers when switching context.
4084
a181c0bf
JB
40852017-10-09 John Baldwin <jhb@FreeBSD.org>
4086
4087 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4088 (fbsd_convert_siginfo): Likewise.
4089 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4090
6e66f753
SM
40912017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4092
4093 * configure.ac (try_guile_versions): Remove guile-2.2.
4094 * configure: Regenerate.
4095
890e9790
TT
40962017-10-09 Tom Tromey <tom@tromey.com>
4097
4098 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4099 (COMPILE.pre): Use $(CXX).
4100
109483d9
PA
41012017-10-09 Pedro Alves <palves@redhat.com>
4102
4103 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4104 Use bool.
4105 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4106 * cp-support.h (cp_remove_params): Now returns a
4107 gdb::unique_xmalloc_ptr.
4108 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4109 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4110 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4111 returning a gdb::unique_xmalloc_ptr.
4112 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4113 * stack.c (find_frame_funname): Adjust to cp_remove_params
4114 returning a gdb::unique_xmalloc_ptr.
4115
791afaa2
TT
41162017-10-08 Tom Tromey <tom@tromey.com>
4117
4118 * dwarf2read.c (dwarf2_get_dwz_file): Use
4119 gdb::unique_xmalloc_ptr.
4120 (find_slot_in_mapped_hash): Likewise.
4121 (dwarf2_physname): Likewise.
4122 (create_dwo_unit_in_dwp_v1): Use std::string.
4123 (create_dwo_unit_in_dwp_v2): Likewise.
4124 (lookup_dwo_cutu): Likewise.
4125 (inherit_abstract_dies): Use std::vector.
4126 (read_array_type): Likewise.
4127 (dwarf_decode_macros): Remove unused declaration.
4128 (unsigned_int_compar): Remove.
4129 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4130 (psymtabs_addrmap_cleanup): Remove.
4131
30a9c02f
TT
41322017-10-08 Tom Tromey <tom@tromey.com>
4133
4134 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4135 * frame.h (frame_cleanup_after_sniffer): Declare.
4136 (frame_prepare_for_sniffer): Return void.
4137 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4138 type of argument.
4139 (frame_prepare_for_sniffer): Return void.
4140
757325a3
TT
41412017-10-08 Tom Tromey <tom@tromey.com>
4142
4143 * utils.h (make_cleanup_value_free): Remove.
4144 * utils.c (do_value_free, struct cleanup): Remove.
4145 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4146 Use gdb_value_up.
4147 * value.h (struct value_deleter): New.
4148 (gdb_value_up): New typedef.
4149
b9c04fb2
TT
41502017-10-08 Tom Tromey <tom@tromey.com>
4151
4152 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4153 (make_cleanup_free_search_symbols): Remove.
4154 (search_symbols): Return std::vector.
4155 (symbol_search::compare_search_syms): Now member of
4156 symbol_search. Change arguments.
4157 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4158 (symtab_symbol_info, rbreak_command): Update.
4159 * symtab.h (struct symbol_search) <next>: Remove.
4160 Add constructors.
4161 (symbol_search::operator<): New function.
4162 (symbol_search::operator==): New function.
4163 (search_symbols): Remove std::vector.
4164 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4165 (symbol_search::compare_search_syms): Declare.
4166
0d28b0a5
YQ
41672017-10-06 Yao Qi <yao.qi@linaro.org>
4168
4169 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4170 arch/aarch64-insn.o.
4171 Remove one rule.
4172 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4173
71917808
YQ
41742017-10-06 Yao Qi <yao.qi@linaro.org>
4175
4176 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4177 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4178 arch/arm-linux.o respectively.
4179 * configure.tgt: Likewise.
4180
2081b2b2
YQ
41812017-10-06 Yao Qi <yao.qi@linaro.org>
4182
4183 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4184 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4185
a1b85d28
PA
41862017-10-06 Pedro Alves <palves@redhat.com>
4187
4188 * windows-nat.c: Include <algorithm>.
4189
d97987e2
YQ
41902017-10-06 Yao Qi <yao.qi@linaro.org>
4191
4192 * configure.tgt (i386_tobjs): New variable.
4193 (amd64_tobjs): New variable.
4194 Set $cpu_obs and $os_obs.
4195
f38307f5
YQ
41962017-10-06 Yao Qi <yao.qi@linaro.org>
4197
4198 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4199 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4200 (clean): Remove object files and dependency files.
4201 (distclean): Remove the directory.
4202 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4203 * configure: Re-generated.
4204 * configure.tgt: Replace amd64.o with arch/amd64.o.
4205
2f924de6
JM
42062017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4207
4208 PR build/22188
4209 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4210 and SETEND.
4211
2fd9d7ca
PA
42122017-10-05 Pedro Alves <palves@redhat.com>
4213
4214 * linux-nat.c (linux_child_follow_fork): When following the parent
4215 and detaching the child, consult the parent thread's architecture
4216 instead of the child's.
4217
d13b8493
UW
42182017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4219
4220 * ax.h: Do not include "doublest.h".
4221 (union agent_val): Remove.
4222
3b4b2f16
UW
42232017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4224
4225 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4226 (decimal_to_string): Return std::string object.
4227 (decimal_from_string): Accept std::string object. Return bool.
4228 (decimal_from_integral, decimal_from_doublest): Remove.
4229 (decimal_from_longest): Add prototype.
4230 (decimal_from_ulongest): Likewise.
4231 (decimal_to_longest): Likewise.
4232 (decimal_from_doublest): Likewise.
4233 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4234 (MAX_DECIMAL_STRING): Move here.
4235 (decimal_to_string): Return std::string object.
4236 (decimal_from_string): Accept std::string object. Return bool.
4237 (decimal_from_integral): Remove, replace by ...
4238 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4239 (decimal_to_longest): New function.
4240 (decimal_from_floating): Remove, replace by ...
4241 (decimal_from_doublest): ... this new function.
4242 (decimal_to_doublest): Update to new decimal_to_string interface.
4243
4244 * value.c (unpack_long): Use decimal_to_longest.
4245 * valops.c (value_cast): Use decimal_from_doublest instead of
4246 decimal_from_floating. Use decimal_from_[u]longest isntead of
4247 decimal_from_integral.
4248 * valarith.c (value_args_as_decimal): Likewise.
4249 * valprint.c (print_decimal_floating): Update to new
4250 decimal_to_string interface.
4251 * printcmd.c (printf_decfloat): Likewise.
4252 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4253
1841ee5d
UW
42542017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4255
4256 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4257 * gdbtypes.c: Include "floatformat.h".
4258 * value.c: Likewise.
4259 * m68k-tdep.c: Likewise.
4260
4261 * findvar.c: Do not include "floatformat.h".
4262 * amd64-darwin-tdep.c: Likewise.
4263 * arm-linux-tdep.c: Likewise.
4264 * i386-darwin-tdep.c: Likewise.
4265 * i387-tdep.c: Likewise.
4266 * m68k-linux-tdep.c: Likewise.
4267 * mep-tdep.c: Likewise.
4268 * mips-tdep.c: Likewise.
4269 * nios2-tdep.c: Likewise.
4270 * s390-linux-tdep.c: Likewise.
4271 * sparc-obsd-tdep.c: Likewise.
4272 * sparc-tdep.c: Likewise.
4273 * sparc64-tdep.c: Likewise.
4274 * spu-tdep.c: Likewise.
4275 * tic6x-tdep.c: Likewise.
4276 * tilegx-tdep.c: Likewise.
4277 * vax-tdep.c: Likewise.
4278 * xstormy16-tdep.c: Likewise.
4279 * xtensa-tdep.c: Likewise.
4280
4281 * top.c: Do not include "doublest.h".
4282 * aarch64-tdep.c: Likewise.
4283 * alpha-tdep.c: Likewise.
4284 * arm-linux-tdep.c: Likewise.
4285 * m68k-linux-tdep.c: Likewise.
4286 * tilegx-tdep.c: Likewise.
4287 * xstormy16-tdep.c: Likewise.
4288
a80a6471
JB
42892017-10-05 John Baldwin <jhb@FreeBSD.org>
4290
4291 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4292 (mipsn32_fbsd_sigframe): Define.
4293 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4294 for FreeBSD/mipsn32.
4295
12c4bd7f
JB
42962017-10-05 John Baldwin <jhb@FreeBSD.org>
4297
4298 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4299 AT_HWCAP.
4300
c91933e9
TG
43012017-10-05 Tristan Gingold <tgingold@free.fr>
4302
4303 * MAINTAINERS (Misc): Update my email address.
4304
5cd63fda
PA
43052017-10-04 Pedro Alves <palves@redhat.com>
4306
4307 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4308 it instead of target_gdbarch.
4309 (get_remote_state, get_remote_packet_size): Adjust
4310 get_remote_arch_state calls, passing down target_gdbarch
4311 explicitly.
4312 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4313 'gdbarch' and use it instead of target_gdbarch.
4314 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4315 passing down target_gdbarch explicitly.
4316 (struct stop_reply) <arch>: New field.
4317 (remote_parse_stop_reply): Use the stopped thread's architecture,
4318 not the current inferior's. Save the architecture in the
4319 stop_reply.
4320 (process_stop_reply): Use the stop reply's architecture.
4321 (process_g_packet, remote_fetch_registers)
4322 (remote_prepare_to_store, store_registers_using_G)
4323 (remote_store_registers): Adjust get_remote_arch_state calls,
4324 using the regcache's architecture.
4325 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4326 passing down target_gdbarch explicitly.
4327 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4328 beneath instead of calling target_gdbarch.
4329 * target.c (default_thread_architecture): Use the specified
4330 inferior's architecture, instead of the current inferior's
4331 architecture (via target_gdbarch).
4332
ed4227b7
PA
43332017-10-04 Pedro Alves <palves@redhat.com>
4334
4335 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4336 case.
4337 (regcache_print): Handle !target_has_registers here instead.
4338
55b11ddf
PA
43392017-10-04 Pedro Alves <palves@redhat.com>
4340
4341 * frame.c (create_test_frame): Delete.
4342 * frame.h (create_test_frame): Delete.
4343 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4344 (class regcache_test): Delete.
4345 (test_target_has_registers, test_target_has_stack)
4346 (test_target_has_memory, test_target_prepare_to_store)
4347 (test_target_store_registers): New functions.
4348 (test_target_ops): New class.
4349 (register_to_value_test): Error out if there's already a
4350 process_stratum (or higher) target pushed. Create a fuller mock
4351 environment, with mock target_ops, inferior, address space, thread
4352 and inferior_ptid.
4353 * progspace.c (struct address_space): Move to ...
4354 * progspace.h (struct address_space): ... here.
4355 * regcache.h (regcache::~regcache, regcache::raw_write)
4356 [GDB_SELF_TEST]: No longer virtual.
4357
4c71c105
SM
43582017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4359
4360 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4361
73dcd72d
PA
43622017-10-04 Pedro Alves <palves@redhat.com>
4363
4364 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4365 out of 'between TRY and CATCH'.
4366
44704526
PA
43672017-10-04 Pedro Alves <palves@redhat.com>
4368
4369 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4370 * common/common-exceptions.h (TRY): Open an outermost scope.
4371 Expand intro comment.
4372 (CATCH): Reindent.
4373 (END_CATCH): Close the outermost scope.
4374 * completer.c (complete_line_internal): Add missing END_CATCH.
4375
bc3b087d
SDJ
43762017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4377
4378 * NEWS (Changes since GDB 8.0): Add entry about new
4379 'set-cwd-on-gdbserver' feature.
4380 (New remote packets): Add entry for QSetWorkingDir.
4381 * common/common-inferior.h (set_inferior_cwd): New prototype.
4382 * infcmd.c (set_inferior_cwd): Remove "static".
4383 (show_cwd_command): Expand text to include remote debugging.
4384 * remote.c: Add PACKET_QSetWorkingDir.
4385 (remote_protocol_features) <QSetWorkingDir>: New entry for
4386 PACKET_QSetWorkingDir.
4387 (extended_remote_set_inferior_cwd): New function.
4388 (extended_remote_create_inferior): Call
4389 "extended_remote_set_inferior_cwd".
4390 (_initialize_remote): Call "add_packet_config_cmd" for
4391 QSetWorkingDir.
4392
d092c5a2
SDJ
43932017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4394
4395 * NEWS (New commands): Mention "set/show cwd".
4396 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4397 "cd" command's help text.
4398 * common/common-inferior.h (get_inferior_cwd): New prototype.
4399 * infcmd.c (inferior_cwd_scratch): New global variable.
4400 (set_inferior_cwd): New function.
4401 (get_inferior_cwd): Likewise.
4402 (set_cwd_command): Likewise.
4403 (show_cwd_command): Likewise.
4404 (_initialize_infcmd): Add "set/show cwd" commands.
4405 * inferior.h (class inferior) <cwd>: New field.
4406 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4407 (fork_inferior): Change inferior's cwd before its execution.
4408 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4409 to CreateProcess.
4410
7da0a886
SDJ
44112017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4412
4413 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4414 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4415 (COMMON_OBS): Add gdb_tilde_expand.o.
4416 * common/gdb_tilde_expand.c: New file.
4417 * common/gdb_tilde_expand.h: Likewise.
4418
db8dd160
MR
44192017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4420
4421 * gdbarch.sh (objfile): Remove duplicate declaration.
4422 * gdbarch.h: Regenerate.
4423
f8bfbf22
TT
44242017-10-03 Tom Tromey <tom@tromey.com>
4425
4426 * utils.c (internal_vproblem): Use string_vprintf.
4427
5178ed48
TT
44282017-10-03 Tom Tromey <tom@tromey.com>
4429
4430 * printcmd.c (info_symbol_command): Use std::string.
4431
8cff8730
TT
44322017-10-03 Tom Tromey <tom@tromey.com>
4433
4434 * top.c (gdb_safe_append_history): Use std::string.
4435
895b8f30
TT
44362017-10-03 Tom Tromey <tom@tromey.com>
4437
4438 * event-top.c (stdin_event_handler): Update.
4439 * main.c (captured_main_1): Update.
4440 * top.h (make_delete_ui_cleanup): Remove.
4441 (struct ui): Add constructor and destructor.
4442 (new_ui, delete_ui): Remove.
4443 * top.c (make_delete_ui_cleanup): Remove.
4444 (new_ui_command): Use std::unique_ptr.
4445 (delete_ui_cleanup): Remove.
4446 (ui::ui): Rename from new_ui. Update.
4447 (free_ui): Remove.
4448 (ui::~ui): Rename from delete_ui. Update.
4449
0efef640
TT
44502017-10-03 Tom Tromey <tom@tromey.com>
4451
4452 * symfile.c (load_progress): Use gdb::byte_vector.
4453
245ad7d3
TT
44542017-10-03 Tom Tromey <tom@tromey.com>
4455
4456 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4457 declaration.
4458 * printcmd.c (x_command): Remove unused declaration.
4459 * symfile.c (symbol_file_command): Remove unused declaration.
4460
e05550d7
TT
44612017-10-03 Tom Tromey <tom@tromey.com>
4462
4463 * utils.c (internal_vproblem): Use std::string.
4464 (defaulted_query): Likewise.
4465
b95de2b7
TT
44662017-10-03 Tom Tromey <tom@tromey.com>
4467
4468 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4469 * top.c (execute_command_to_string): Update.
4470 * utils.c (make_cleanup_restore_page_info): Remove.
4471 (do_restore_page_info_cleanup): Remove.
4472 (set_batch_flag_and_restore_page_info):
4473 New.
4474 (make_cleanup_restore_page_info): Remove.
4475 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4476 (~set_batch_flag_and_restore_page_info): New
4477 (make_cleanup_restore_uinteger): Remove.
4478 (make_cleanup_restore_integer): Remove.
4479 (struct restore_integer_closure): Remove.
4480 (restore_integer): Remove.
4481 * utils.h (struct set_batch_flag_and_restore_page_info): New
4482 class.
4483 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4484 (make_cleanup_restore_page_info): Remove.
4485 (make_cleanup_restore_uinteger) Remove.
4486 (make_cleanup_restore_integer) Remove.
4487
07036511
TT
44882017-10-03 Tom Tromey <tom@tromey.com>
4489
4490 * record-full.h (record_full_gdb_operation_disable_set): Return
4491 scoped_restore_tmpl<int>.
4492 * infrun.c (adjust_pc_after_break): Update.
4493 (handle_signal_stop): Update.
4494 * record-full.c (record_full_gdb_operation_disable_set): Return
4495 scoped_restore_tmpl<int>.
4496 (record_full_wait_1, record_full_insert_breakpoint)
4497 (record_full_remove_breakpoint, record_full_save)
4498 (record_full_goto_insn): Update.
4499
45320ffa
TT
45002017-10-02 Tom Tromey <tom@tromey.com>
4501
4502 PR rust/22236:
4503 * rust-lang.c (rust_val_print_str): New function.
4504 (val_print_struct): Call it.
4505 (rust_subscript): Preserve name of slice type.
4506
b3e3859b
TT
45072017-10-02 Tom Tromey <tom@tromey.com>
4508
4509 * rust-lang.c (rust_subscript): Handle slices in
4510 EVAL_AVOID_SIDE_EFFECTS case.
4511
01af5e0d
TT
45122017-10-02 Tom Tromey <tom@tromey.com>
4513
4514 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4515
888e3ddb
TT
45162017-10-02 Tom Tromey <tom@tromey.com>
4517
4518 * rust-lang.h (rust_slice_type): Add "extern".
4519
cc536b21
PA
45202017-10-02 Tom Tromey <tom@tromey.com>
4521 Pedro Alves <palves@redhat.com>
4522
4523 * ada-lang.h (ada_exc_info::operator<): Make const.
4524 (ada_exc_info::operator==): Make const.
4525 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4526 Make const.
4527
386c8614
TT
45282017-09-29 Tom Tromey <tom@tromey.com>
4529
4530 * target.c (read_whatever_is_readable): Change type of "result".
4531 Update.
4532 (free_memory_read_result_vector): Remove.
4533 (read_memory_robust): Change return type. Update.
4534 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4535 bin2hex, std::string.
4536 * target.h (memory_read_result_s): Remove typedef.
4537 (free_memory_read_result_vector): Remove.
4538 (read_memory_robust): Return std::vector.
4539
789c4b5e
TT
45402017-09-29 Tom Tromey <tom@tromey.com>
4541
4542 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4543
ab816a27
TT
45442017-09-29 Tom Tromey <tom@tromey.com>
4545
4546 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4547 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4548 operator< and operator==.
4549 (ada_exceptions_list): Return a std::vector.
4550 * ada-lang.c (ada_exc_info::operator<): Rename from
4551 compare_ada_exception_info.
4552 (ada_exc_info::operator==): New.
4553 (sort_remove_dups_ada_exceptions_list): Change type of
4554 "exceptions".
4555 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4556 (ada_add_global_exceptions): Likewise.
4557 (ada_exceptions_list_1): Return a std::vector.
4558 (ada_exceptions_list): Likewise.
4559
52f9abe4
TT
45602017-09-29 Tom Tromey <tom@tromey.com>
4561
4562 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4563 'std::set *'.
4564 (print_one_inferior): Update.
4565 (free_vector_of_ints): Remove.
4566 (list_available_thread_groups): Change "ids" to std::set.
4567 (mi_cmd_list_thread_groups): Update.
4568 (struct collect_cores_data) <core>: Now a std::set.
4569 (collect_cores): Update.
4570 (unique): Remove.
4571 (print_one_inferior): Update.
4572
dcd5ddcc
TT
45732017-09-29 Tom Tromey <tom@tromey.com>
4574
4575 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4576 (mi_execute_async_cli_command): Likewise.
4577 (mi_cmd_trace_frame_collected): Use field_fmt.
4578
45d288cc
TT
45792017-09-29 Tom Tromey <tom@tromey.com>
4580
4581 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4582 gdb::byte_vector.
4583
6afe2f4a
TT
45842017-09-29 Tom Tromey <tom@tromey.com>
4585
4586 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4587
9813429a
TT
45882017-09-29 Tom Tromey <tom@tromey.com>
4589
4590 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4591
2d6960b4
TT
45922017-09-29 Tom Tromey <tom@tromey.com>
4593
4594 * varobj.h (varobj_gen_name): Return std::string.
4595 * varobj.c (varobj_gen_name): Return std::string.
4596 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4597 (mi_cmd_var_delete): Don't copy "name".
4598
784c453a
TT
45992017-09-29 Tom Tromey <tom@tromey.com>
4600
4601 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4602 (mi_cmd_break_insert_1): Update.
4603
a9bc57b9
TT
46042017-09-29 Tom Tromey <tom@tromey.com>
4605
4606 * target.h (make_scoped_defer_target_commit_resume): Update.
4607 * target.c (make_scoped_defer_target_commit_resume): Rename from
4608 make_cleanup_defer_target_commit_resume. Return a
4609 scoped_restore.
4610 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4611
9754d8c4
TT
46122017-09-29 Tom Tromey <tom@tromey.com>
4613
4614 * main.c (captured_main_1): Remove unused declaration.
4615 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4616
99ef965c
TT
46172017-09-29 Tom Tromey <tom@tromey.com>
4618
4619 * symtab.c (search_symbols): Remove unused outer cleanup.
4620 (make_source_files_completion_list): Remove unused declaration.
4621
42518ba7
TT
46222017-09-29 Tom Tromey <tom@tromey.com>
4623
4624 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4625
726b2169
TT
46262017-09-29 Tom Tromey <tom@tromey.com>
4627
4628 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4629 gdb::byte_vector.
4630
55b06432
TT
46312017-09-29 Tom Tromey <tom@tromey.com>
4632
4633 * complaints.c (vcomplaint): Use std::string.
4634
8abcee91
TT
46352017-09-29 Tom Tromey <tom@tromey.com>
4636
4637 * tracepoint.c (trace_variable_command): Use std::string.
4638 (encode_actions_1): Remove unused declarations.
4639 (create_tsv_from_upload): Use std::string.
4640
6ad94bc7
TT
46412017-09-29 Tom Tromey <tom@tromey.com>
4642
4643 * cp-support.c (gdb_demangle): Use std::string.
4644
2003f3d8
TT
46452017-09-29 Tom Tromey <tom@tromey.com>
4646
4647 * stack.c (parse_frame_specification): Use std::string
4648 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4649
8f8accb5
TT
46502017-09-29 Tom Tromey <tom@tromey.com>
4651
4652 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4653
200aa7b1
TT
46542017-09-29 Tom Tromey <tom@tromey.com>
4655
4656 * utils.c (vfprintf_maybe_filtered): Use std::string.
4657 (vfprintf_unfiltered): Likewise.
4658
606aae8a
TT
46592017-09-29 Tom Tromey <tom@tromey.com>
4660
4661 * event-top.c (top_level_prompt): Return std::string.
4662 (display_gdb_prompt): Update.
4663
bd413795
TT
46642017-09-29 Tom Tromey <tom@tromey.com>
4665
4666 * unittests/common-utils-selftests.c (format): New function.
4667 (string_vprintf_tests): New function.
4668 (_initialize_common_utils_selftests): Register new tests.
4669 * common/common-utils.c (string_vprintf): New function.
4670 * common/common-utils.h (string_vprintf): Declare.
4671
256642e8
PA
46722017-09-29 Pedro Alves <palves@redhat.com>
4673
4674 * common/rsp-low.c (unpack_varlen_hex): Constify.
4675 * common/rsp-low.h (unpack_varlen_hex): Constify.
4676 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4677 Constify.
4678 * remote.c (remote_set_permissions, read_ptid)
4679 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4680 (remote_static_tracepoint_marker_at)
4681 (remote_static_tracepoint_markers_by_strid)
4682 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4683 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4684 (parse_tracepoint_definition, parse_tsv_definition)
4685 (parse_static_tracepoint_marker_definition): Constify.
4686 * tracepoint.h (parse_static_tracepoint_marker_definition)
4687 (parse_trace_status, parse_tracepoint_status)
4688 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4689
b6bb3468
PA
46902017-09-29 Pedro Alves <palves@redhat.com>
4691
4692 * remote.c (target_buf, target_buf_size): Delete.
4693 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4694 Use the connection's packet buffer instead.
4695 All callers adjusted.
4696 (_initialize_remote): Remove references to target_buf and
4697 target_buf_size.
4698
b2f8eb7a
PA
46992017-09-28 Pedro Alves <palves@redhat.com>
4700
4701 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4702 unittests/common-utils-selftests.c.
4703 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4704 (COMMON_OBS): Remove utils-selftests.o.
4705 * utils-selftests.c: Move to ...
4706 * unittests/common-utils-selftests.c: ... here and rename self
4707 test to "string_printf".
4708
08302ed2
DE
47092017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4710
4711 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4712 having NULL cus or tus.
4713
96a5a1d3
UW
47142017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4715
4716 * arm-tdep.c: (convert_from_extended): Remove.
4717 (convert_to_extended): Likewise.
4718 (arm_extract_return_value): Use convert_typed_floating.
4719 (arm_store_return_value): Likewise.
4720
4721 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4722 * sh-tdep.c: Do not include "floatformat.h".
4723 (sh_littlebyte_bigword_type): New function.
4724 (sh_register_convert_to_virtual): Use convert_typed_floating.
4725 (sh_register_convert_to_raw): Likewise.
4726 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4727 (sh64_littlebyte_bigword_type): New function.
4728 (sh64_extract_return_value): Use convert_typed_floating.
4729 (sh64_register_convert_to_virtual): Likewise.
4730 (sh64_register_convert_to_raw): Likewise.
4731
0db7851f
UW
47322017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4733
4734 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4735 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4736
4737 * gdbtypes.h (union type_specific): Make field floatformat hold
4738 just a single struct floatformat, not an array.
4739 (floatformat_from_type): Move here.
4740 * gdbtypes.c (floatformat_from_type): Move here. Update to
4741 changed TYPE_FLOATFORMAT definition.
4742 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4743 (recursive_dump_type): Likewise.
4744 (init_float_type): Install correct floatformat for byte order.
4745 (arch_float_type): Likewise.
4746
77b7c781
UW
47472017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4748
4749 * gdbtypes.c (init_type): Change incoming argument from
4750 length-in-bytes to length-in-bits. Assert length is a
4751 multiple of TARGET_CHAR_BITS.
4752 (arch_type, arch_flags_type): Likewise.
4753 (init_integer_type): Update call to init_type.
4754 (init_character_type): Likewise.
4755 (init_boolean_type): Likewise.
4756 (init_float_type): Likewise.
4757 (init_decfloat_type): Likewise.
4758 (init_complex_type): Likewise.
4759 (init_pointer_type): Likewise.
4760 (objfile_type): Likewise.
4761 (arch_integer_type): Update call to arch_type.
4762 (arch_character_type): Likewise.
4763 (arch_boolean_type): Likewise.
4764 (arch_float_type): Likewise.
4765 (arch_decfloat_type): Likewise.
4766 (arch_complex_type): Likewise.
4767 (arch_pointer_type): Likewise.
4768 (gdbtypes_post_init): Likewise.
4769
4770 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4771 (read_base_type): Likewise.
4772 * mdebugread.c (basic_type): Likewise.
4773 * stabsread.c (dbx_init_float_type): Likewise.
4774 (rs6000_builtin_type): Likewise.
4775 (read_range_type): Likewise. Also, fix call to init_integer_type
4776 with erroneous length argument.
4777
4778 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4779 * d-lang.c (build_d_types): Likewise.
4780 * f-lang.c (build_fortran_types): Likewise.
4781 * go-lang.c (build_go_types): Likewise.
4782 * opencl-lang.c (build_opencl_types): Likewise.
4783 * jit.c (finalize_symtab): Likewise.
4784 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4785 (build_std_type_info_type): Likewise.
4786 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4787 update call to arch_flags_type.
4788
4789 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4790 arch_type.
4791 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4792 * windows-tdep.c (windows_get_tlb_type): Likewise.
4793
4794 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4795 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4796 * m32c-tdep.c (make_types): Likewise.
4797 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4798 (rl78_psw_type): Update call to arch_flags_type.
4799 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4800 * rx-tdep.c (rx_psw_type): Likewise.
4801 (rx_fpsw_type): Likewise.
4802 * sparc-tdep.c (sparc_psr_type): Likewise.
4803 (sparc_fsr_type): Likewise.
4804 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4805 (sparc64_ccr_type): Likewise.
4806 (sparc64_fsr_type): Likewise.
4807 (sparc64_fprs_type): Likewise.
4808
f21b4d5c
TT
48092017-09-27 Tom Tromey <tom@tromey.com>
4810
4811 * findcmd.c (find_command): Constify.
4812
643c2ffa
TT
48132017-09-27 Tom Tromey <tom@tromey.com>
4814
4815 * ada-tasks.c (task_command_1, task_command): Constify.
4816
510e5e56
TT
48172017-09-27 Tom Tromey <tom@tromey.com>
4818
4819 * symtab.c (maintenance_print_symbol_cache)
4820 (maintenance_flush_symbol_cache)
4821 (maintenance_print_symbol_cache_statistics): Constify.
4822
e503b191
TT
48232017-09-27 Tom Tromey <tom@tromey.com>
4824
4825 * inferior.c (detach_inferior_command, kill_inferior_command)
4826 (inferior_command): Constify.
4827
4e001312
TT
48282017-09-27 Tom Tromey <tom@tromey.com>
4829
4830 * regcache.c (regcache_print, maintenance_print_registers)
4831 (maintenance_print_raw_registers)
4832 (maintenance_print_cooked_registers)
4833 (maintenance_print_register_groups)
4834 (maintenance_print_remote_registers): Constify.
4835
77763700
TT
48362017-09-27 Tom Tromey <tom@tromey.com>
4837
4838 * printcmd.c (map_display_numbers, undisplay_command)
4839 (enable_disable_display_command, enable_display_command)
4840 (disable_display_command): Constify.
4841
4495129a
TT
48422017-09-27 Tom Tromey <tom@tromey.com>
4843
4844 * breakpoint.h (delete_command): Don't declare.
4845 * breakpoint.c (delete_command, enable_once_command)
4846 (enable_count_command, enable_delete_command, breakpoint_1)
4847 (maintenance_info_breakpoints, stopin_command, stopat_command)
4848 (delete_command, delete_trace_command, save_breakpoints)
4849 (save_breakpoints_command, save_tracepoints_command): Constify.
4850
3088cf40
TT
48512017-09-27 Tom Tromey <tom@tromey.com>
4852
4853 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4854 (skip_ws, extract_identifier, macro_define_command)
4855 (macro_undef_command, macro_list_command): Constify.
4856
69f476a3
TT
48572017-09-27 Tom Tromey <tom@tromey.com>
4858
4859 * infcmd.c (environment_info, set_environment_command)
4860 (unset_environment_command, path_info, info_proc_cmd_1)
4861 (info_proc_cmd_mappings, info_proc_cmd_stat)
4862 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4863 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4864
c4a3e68e
TT
48652017-09-27 Tom Tromey <tom@tromey.com>
4866
4867 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4868 Constify.
4869
c9d31bd6
TT
48702017-09-27 Tom Tromey <tom@tromey.com>
4871
4872 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4873
1f3f85eb
TT
48742017-09-27 Tom Tromey <tom@tromey.com>
4875
4876 * demangle.c (demangle_command): Constify.
4877
9c504b5d
TT
48782017-09-27 Tom Tromey <tom@tromey.com>
4879
4880 * progspace.c (maintenance_info_program_spaces_command):
4881 Constify.
4882
6663cf91
TT
48832017-09-27 Tom Tromey <tom@tromey.com>
4884
4885 * compile/compile.c (check_raw_argument, compile_file_command)
4886 (compile_code_command, compile_print_command): Constify.
4887
34e5fa26
TT
48882017-09-27 Tom Tromey <tom@tromey.com>
4889
4890 * reggroups.c (maintenance_print_reggroups): Constify.
4891
8384c356
TT
48922017-09-27 Tom Tromey <tom@tromey.com>
4893
4894 * dwarf2read.c (save_gdb_index_command): Constify.
4895
884beb0c
TT
48962017-09-27 Tom Tromey <tom@tromey.com>
4897
4898 * stap-probe.c (info_probes_stap_command): Constify.
4899
e0b2930c
TT
49002017-09-27 Tom Tromey <tom@tromey.com>
4901
4902 * fork-child.c (unset_exec_wrapper_command): Constify.
4903
f938677d
TT
49042017-09-27 Tom Tromey <tom@tromey.com>
4905
4906 * btrace.c (get_uint, get_context_size, no_chunk)
4907 (maint_btrace_packet_history_cmd)
4908 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4909 (maint_info_btrace_cmd): Constify.
4910
8949cb87
TT
49112017-09-27 Tom Tromey <tom@tromey.com>
4912
4913 * reverse.c (delete_bookmark_command): Constify.
4914
ac88e2de
TT
49152017-09-27 Tom Tromey <tom@tromey.com>
4916
4917 * remote.c (set_memory_packet_size)
4918 (set_memory_write_packet_size, show_memory_write_packet_size)
4919 (set_memory_read_packet_size, show_memory_read_packet_size)
4920 (compare_sections_command, packet_command, remote_put_command)
4921 (remote_get_command, remote_delete_command): Constify.
4922
bd4c9dfe
TT
49232017-09-27 Tom Tromey <tom@tromey.com>
4924
4925 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4926 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4927 (set_mipsfpu_auto_command): Constify.
4928
5e93d4c6
TT
49292017-09-27 Tom Tromey <tom@tromey.com>
4930
4931 * cli/cli-cmds.h (cd_command): Constify.
4932 * cli/cli-cmds.c (cd_command): Constify.
4933
fc41a75b
TT
49342017-09-27 Tom Tromey <tom@tromey.com>
4935
4936 * thread.c (thread_name_command, thread_find_command): Constify.
4937
67810076
TT
49382017-09-27 Tom Tromey <tom@tromey.com>
4939
4940 * probe.c (enable_probes_command, disable_probes_command):
4941 Constify.
4942
1d8b34a7
TT
49432017-09-27 Tom Tromey <tom@tromey.com>
4944
4945 * symfile.c (symbol_file_command): Constify.
4946 * gdbcore.h (deprecated_file_changed_hook): Constify.
4947 * exec.c (deprecated_file_changed_hook, exec_file_command)
4948 (file_command): Constify.
4949 * defs.h (symbol_file_command): Constify.
4950
442019e1
TT
49512017-09-27 Tom Tromey <tom@tromey.com>
4952
4953 * remote-fileio.c (set_system_call_allowed)
4954 (show_system_call_allowed): Constify.
4955
2983f7cb
TT
49562017-09-27 Tom Tromey <tom@tromey.com>
4957
4958 * tracepoint.c (delete_trace_variable_command)
4959 (tfind_end_command, tfind_start_command, tfind_pc_command)
4960 (tfind_tracepoint_command, tfind_line_command)
4961 (tfind_range_command, tfind_outside_command): Constify.
4962
4fd41b24
TT
49632017-09-27 Tom Tromey <tom@tromey.com>
4964
4965 * ax-gdb.c (maint_agent_printf_command, agent_command)
4966 (agent_eval_command): Constify.
4967
f2fc3015
TT
49682017-09-27 Tom Tromey <tom@tromey.com>
4969
4970 * tracepoint.c (info_scope_command): Constify.
4971 * python/python.c (gdbpy_decode_line): Constify.
4972 * python/py-breakpoint.c (bppy_init): Constify.
4973 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4974 * location.h: (new_linespec_location)
4975 (string_to_event_location_basic, string_to_event_location):
4976 Constify.
4977 * location.c (new_linespec_location)
4978 (string_to_event_location_basic, string_to_event_location):
4979 Constify.
4980 * linespec.h (decode_line_with_current_source)
4981 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4982 * linespec.c (linespec_lex_to_end)
4983 (decode_line_with_current_source)
4984 (decode_line_with_last_displayed): Constify.
4985 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4986 Constify.
4987 * cli/cli-cmds.c (edit_command, list_command): Constify.
4988 * breakpoint.h (until_break_command, watch_command_wrapper)
4989 (awatch_command_wrapper, rwatch_command_wrapper)
4990 (init_ada_exception_breakpoint): Constify.
4991 * breakpoint.c (break_command_1, dprintf_command)
4992 (break_range_command, watch_command_wrapper)
4993 (rwatch_command_wrapper, awatch_command_wrapper)
4994 (until_break_command, init_ada_exception_breakpoint)
4995 (strace_marker_create_sals_from_location, trace_command)
4996 (ftrace_command, strace_command, struct tracepoint): Constify.
4997 * ax-gdb.c (agent_command_1): Constify.
4998 * ada-lang.c (ada_exception_sal): Constify.
4999
8c2f95f4
TT
50002017-09-27 Tom Tromey <tom@tromey.com>
5001
5002 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5003 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5004 (get_context_size, no_chunk, get_insn_history_modifiers)
5005 (cmd_record_insn_history, get_call_history_modifiers)
5006 (cmd_record_call_history): Constify.
5007
a0d65762
TT
50082017-09-27 Tom Tromey <tom@tromey.com>
5009
5010 * source.c (show_substitute_path_command)
5011 (unset_substitute_path_command, set_substitute_path_command):
5012 Constify.
5013
58971144
TT
50142017-09-27 Tom Tromey <tom@tromey.com>
5015
5016 * typeprint.c (maintenance_print_type): Constify.
5017 * maint.c (maintenance_dump_me, maintenance_demangle)
5018 (maintenance_time_display, maintenance_info_sections)
5019 (maintenance_print_statistics, maintenance_deprecate)
5020 (maintenance_undeprecate): Constify.
5021 (maintenance_do_deprecate): Constify. Use std::string.
5022 (maintenance_selftest): Constify.
5023 * gdbtypes.h (maintenance_print_type): Constify.
5024
c482f52c
TT
50252017-09-27 Tom Tromey <tom@tromey.com>
5026
5027 * hppa-tdep.c (unwind_command): Constify.
5028
e100df1a
TT
50292017-09-27 Tom Tromey <tom@tromey.com>
5030
5031 * target-descriptions.c (unset_tdesc_filename_cmd)
5032 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5033 Constify.
5034
31d56ade
TT
50352017-09-27 Tom Tromey <tom@tromey.com>
5036
5037 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5038
b961da0b
TT
50392017-09-27 Tom Tromey <tom@tromey.com>
5040
5041 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5042
e2d8ae16
TT
50432017-09-27 Tom Tromey <tom@tromey.com>
5044
5045 * tui/tui-regs.c (tui_reg_command): Constify.
5046
863779b0
TT
50472017-09-27 Tom Tromey <tom@tromey.com>
5048
5049 * skip.c (skip_file_command, skip_function_command)
5050 (skip_enable_command, skip_disable_command, skip_delete_command):
5051 Constify.
5052
cdb34d4a
TT
50532017-09-27 Tom Tromey <tom@tromey.com>
5054
5055 * record-btrace.c (cmd_record_btrace_bts_start)
5056 (cmd_record_btrace_pt_start): Constify.
5057
e99c83e7
TT
50582017-09-27 Tom Tromey <tom@tromey.com>
5059
5060 * symmisc.c (maintenance_print_symbols)
5061 (maintenance_print_msymbols, maintenance_print_objfiles)
5062 (maintenance_info_symtabs, maintenance_check_symtabs)
5063 (maintenance_expand_symtabs, maintenance_info_line_tables):
5064 Constify.
5065
32faf971
TT
50662017-09-27 Tom Tromey <tom@tromey.com>
5067
5068 * top.c (new_ui_command): Constify.
5069
2cf311eb
TT
50702017-09-27 Tom Tromey <tom@tromey.com>
5071
5072 * symfile.c (add_symbol_file_command)
5073 (remove_symbol_file_command, list_overlays_command)
5074 (map_overlay_command, unmap_overlay_command)
5075 (overlay_auto_command, overlay_manual_command)
5076 (overlay_off_command, overlay_load_command): Constify.
5077
e6738699
TT
50782017-09-27 Tom Tromey <tom@tromey.com>
5079
5080 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5081 (info_spu_mailbox_command, info_spu_dma_command)
5082 (info_spu_proxydma_command): Constify.
5083
aa360cd5
TT
50842017-09-27 Tom Tromey <tom@tromey.com>
5085
5086 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5087
898241a5
TT
50882017-09-27 Tom Tromey <tom@tromey.com>
5089
5090 * cli/cli-script.c (user_defined_command): Constify.
5091
2d0ac106
TT
50922017-09-27 Tom Tromey <tom@tromey.com>
5093
5094 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5095 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5096 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5097 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5098 (dump_binary_value, append_binary_memory, append_binary_value):
5099 Constify.
5100 (struct dump_context) <func>: Constify.
5101 (add_dump_command): Update.
5102
dede02ce
TT
51032017-09-27 Tom Tromey <tom@tromey.com>
5104
5105 * cli/cli-cmds.c (show_version, show_configuration)
5106 (source_command, show_user): Constify.
5107
d3cb6b99
TT
51082017-09-27 Tom Tromey <tom@tromey.com>
5109
5110 * target.c (maintenance_print_target_stack): Constify.
5111
1970a12f
TT
51122017-09-27 Tom Tromey <tom@tromey.com>
5113
5114 * interps.c (interpreter_exec_cmd): Constify.
5115
41243651
TT
51162017-09-27 Tom Tromey <tom@tromey.com>
5117
5118 * record-full.c (cmd_record_full_restore): Constify.
5119
4465d9db
TT
51202017-09-27 Tom Tromey <tom@tromey.com>
5121
5122 * memattr.c (enable_mem_command, disable_mem_command)
5123 (delete_mem_command): Constify.
5124
ad25e423
TT
51252017-09-27 Tom Tromey <tom@tromey.com>
5126
5127 * value.c (show_convenience): Constify.
5128
d64097b1
TT
51292017-09-27 Tom Tromey <tom@tromey.com>
5130
5131 * gdbcore.h (core_file_command): Update.
5132 * corefile.c (core_file_command): Constify.
5133
4d4589ef
TT
51342017-09-27 Tom Tromey <tom@tromey.com>
5135
5136 * user-regs.c (maintenance_print_user_registers): Constify.
5137
32a7bf17
TT
51382017-09-27 Tom Tromey <tom@tromey.com>
5139
5140 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5141
4a475551
TT
51422017-09-27 Tom Tromey <tom@tromey.com>
5143
5144 * cp-support.c (first_component_command): Constify.
5145
990b9f9f
TT
51462017-09-27 Tom Tromey <tom@tromey.com>
5147
5148 * psymtab.c (maintenance_print_psymbols)
5149 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5150 Constify.
5151
c281872e
TT
51522017-09-27 Tom Tromey <tom@tromey.com>
5153
5154 * windows-tdep.c (display_tib): Constify.
5155
5b64bf74
TT
51562017-09-27 Tom Tromey <tom@tromey.com>
5157
5158 * linux-fork.c (delete_checkpoint_command)
5159 (detach_checkpoint_command): Constify.
5160
4ada038f
TT
51612017-09-27 Tom Tromey <tom@tromey.com>
5162
5163 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5164
57f5a81b
TT
51652017-09-27 Tom Tromey <tom@tromey.com>
5166
5167 * arc-tdep.c (dump_arc_instruction_command): Constify.
5168
b0a8e6c4
TT
51692017-09-27 Tom Tromey <tom@tromey.com>
5170
5171 * valprint.c (set_radix, show_radix): Constify.
5172
8d97dc1c
TT
51732017-09-27 Tom Tromey <tom@tromey.com>
5174
5175 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5176
eb7c454d
TT
51772017-09-27 Tom Tromey <tom@tromey.com>
5178
5179 * command.h (not_just_help_class_command): Update.
5180 * cli/cli-decode.h (not_just_help_class_command): Update.
5181 * cli/cli-decode.c (not_just_help_class_command): Constify.
5182
e4e33335
TT
51832017-09-27 Tom Tromey <tom@tromey.com>
5184
5185 * gdb_bfd.c (maintenance_info_bfds): Constify.
5186
0450cc4c
TT
51872017-09-27 Tom Tromey <tom@tromey.com>
5188
5189 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5190 overloads.
5191 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5192 (do_const_cfunc): New function.
5193 (cmd_cfunc_eq): New overload.
5194 (cli_user_command_p): Check do_const_cfunc.
5195 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5196 const_cfunc.
5197 * command.h (add_cmd): Add const overload and no-function
5198 overload.
5199 (set_cmd_cfunc): Add const overload.
5200 (cmd_const_cfunc_ftype): Declare.
5201 (cmd_cfunc_eq): Add const overload.
5202 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5203 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5204 overload.
5205
a9bbfbd8
TT
52062017-09-27 Tom Tromey <tom@tromey.com>
5207
5208 * macroexp.c (get_next_token_for_substitution): New function.
5209 (substitute_args): Call it. Check for __VA_OPT__.
5210
5230b05a
WT
52112017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5212 Pedro Alves <palves@redhat.com>
5213
5214 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5215 producer_is_icc_lt_14.
5216 (producer_is_icc_lt_14): New function.
5217 (check_producer): Add code for checking version of ICC.
5218 (producer_is_icc): Move to producer.c.
5219 (read_structure_type): Restrict ICC workaround to ICC<14.
5220 * producer.c: Include selftest.h.
5221 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5222 New functions.
5223 * producer.h (producer_is_icc): New declaration.
5224
b32b108a
WT
52252017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5226
5227 * Makefile.in (SFILES): Add producer.c.
5228 (COMMON_OBS): Add producer.o
5229 * amd64-tdep.c (producer.h): Add new include.
5230 * dwarf2read.c (producer.h): Add new include.
5231 * producer.c: New file.
5232 * producer.h: New file.
5233 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5234 producer.c.
5235 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5236 producer.h.
5237
5007d765
MK
52382017-09-26 Matthias Klose <doko@ubuntu.com>
5239
5240 * configure.ac: Search ncursesw before ncurses.
5241 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5242 * gdb_curses.h: Include <ncursesw/ncurses.h>
5243 * config.in, configure: Regenerate.
5244
281c4447
RO
52452017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5246
5247 PR gdb/22185
5248 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5249 obsolete.
5250 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5251 Remove i386sol2 support.
5252 * configure.nat <i386sol2>: Remove.
5253 <sol2-64>: Fold into ...
5254 <sol2>: ... this.
5255 Move common settings to default section.
5256 Add sol-thread.o.
5257 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5258 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5259 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5260 <i[34567]86-*-solaris*>: Remove.
5261 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5262
5263 * configure.ac: Remove wctype in libw check.
5264 (_MSE_INT_H): Don't define on Solaris 7-9.
5265 <solaris*>: Remove libthread_db.so.1 check.
5266 * configure: Regenerate.
5267 * config.in: Regenerate.
5268
5269 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5270 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5271 (gdb_ps_size_t): Remove.
5272 Use base types in users.
5273 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5274
5275 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5276
39b06c20
RO
52772017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5278
5279 PR build/22206
5280 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5281 (adi_is_addr_mapped): Likewise.
5282 (PSR_ICC): Don't redefine.
5283 (PSR_IMPL): Likewise.
5284
6c3e20f1
TT
52852017-09-25 Tom Tromey <tom@tromey.com>
5286
5287 * regcache.c (regcache::dump): Use string_printf.
5288
b292235f
TT
52892017-09-25 Tom Tromey <tom@tromey.com>
5290
5291 * regcache.c (class regcache_invalidator): New.
5292 (struct register_to_invalidate): Remove.
5293 (make_cleanup_regcache_invalidate): Remove.
5294 (regcache::raw_write): Use regcache_invalidator.
5295
9ac86b52
TT
52962017-09-25 Tom Tromey <tom@tromey.com>
5297
5298 * spu-tdep.c (spu2ppu_sniffer): Update.
5299 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5300 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5301 Remove.
5302 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5303 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5304 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5305 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5306 (frame_pop): Update.
5307
c0e383c6
TT
53082017-09-25 Tom Tromey <tom@tromey.com>
5309
5310 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5311 * regcache.h (regcache_xfree): Don't declare.
5312 * regcache.c (regcache_xfree): Remove.
5313 (do_regcache_xfree): Use delete.
5314 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5315 * linux-fork.c (free_fork): Use delete.
5316 (fork_save_infrun_state): Likewise.
5317 * jit.c (jit_dealloc_cache): Use delete.
5318 * infrun.c (discard_infcall_suspend_state): Use delete.
5319
791199cc
TT
53202017-09-25 Tom Tromey <tom@tromey.com>
5321
5322 * regcache.h (regcache_xmalloc): Don't declare.
5323 (regcache_raw_set_cached_value): Update comment.
5324 * regcache.c (regcache_xmalloc): Remove.
5325 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5326 * jit.c (jit_frame_sniffer): Use new.
5327 * frame.c (frame_save_as_regcache): Use new.
5328
289e23aa
AA
53292017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5330
5331 * NEWS: Advertise support for guarded-storage registers on IBM z.
5332
1b63490c
AA
53332017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5334
5335 * s390-linux-nat.c (have_regset_gs): New static variable.
5336 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5337 control block and guarded-storage broadcast control regsets.
5338 (s390_read_description): Detect whether the target has
5339 guarded-storage support, return appropriate tdesc.
5340 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5341 (features/s390x-gs-linux64.c): Likewise.
5342 (struct gdbarch_tdep) <have_gs>: New field.
5343 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5344 (s390_gsbc_regset): New variables.
5345 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5346 and s390_gsbc_regset, if applicable.
5347 (s390_core_read_description): Check whether core file was from a
5348 target with guarded-storage support; include appropriate regsets.
5349 (s390_gdbarch_init): Add registers for guarded-storage support.
5350 (_initialize_s390_tdep): Initialize new target descriptions that
5351 include registers for guarded-storage support.
5352 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5353 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5354 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5355 (S390_NUM_REGS): Adjust macro definition.
5356 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5357 (tdesc_s390x_gs_linux64): New declarations.
5358
96235dc1
AA
53592017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5360
5361 * features/s390-gs-linux64.xml: New file.
5362 * features/s390-gs.xml: New file.
5363 * features/s390-gsbc.xml: New file.
5364 * features/s390x-gs-linux64.xml: New file.
5365 * features/Makefile (WHICH): Add s390-gs-linux64 and
5366 s390x-gs-linux64.
5367 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5368 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5369 * features/s390-gs-linux64.c: New generated file.
5370 * features/s390x-gs-linux64.c: New file.
5371 * regformats/s390-gs-linux64.dat: New file.
5372 * regformats/s390x-gs-linux64.dat: New file.
5373
b4a7c699
TT
53742017-09-23 Tom Tromey <tom@tromey.com>
5375
5376 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5377
c2f97536
TT
53782017-09-22 Tom Tromey <tom@tromey.com>
5379
5380 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5381 type to scoped_restore_tmpl.
5382 <scoped_input_handler>: Initialize m_quit_handler directly.
5383
43573013
SDJ
53842017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5385
5386 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5387 (cd_command): Likewise. Free "current_directory" before
5388 assigning to it.
5389 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5390 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5391 * top.c (gdb_dirbuf): Remove global declaration.
5392 * top.h (gdb_dirbuf): Likewise.
5393
6ec2e0f5
SDJ
53942017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5395
5396 * gnulib/aclocal.m4: Regenerate.
5397 * gnulib/config.in: Regenerate.
5398 * gnulib/configure: Regenerate.
5399 * gnulib/import/Makefile.am: Regenerate.
5400 * gnulib/import/Makefile.in: Regenerate.
5401 * gnulib/import/assure.h: New file.
5402 * gnulib/import/at-func.c: Likewise
5403 * gnulib/import/chdir-long.c: New file.
5404 * gnulib/import/chdir-long.h: New file.
5405 * gnulib/import/cloexec.c: New file.
5406 * gnulib/import/cloexec.h: New file.
5407 * gnulib/import/close.c: New file.
5408 * gnulib/import/closedir.c: New file.
5409 * gnulib/import/dirent-private.h: New file.
5410 * gnulib/import/dup-safer.c: New file.
5411 * gnulib/import/dup.c: New file.
5412 * gnulib/import/dup2.c: New file.
5413 * gnulib/import/error.c: New file.
5414 * gnulib/import/error.h: New file.
5415 * gnulib/import/exitfail.c: New file.
5416 * gnulib/import/exitfail.h: New file.
5417 * gnulib/import/fchdir.c: New file.
5418 * gnulib/import/fcntl.c: New file.
5419 * gnulib/import/fcntl.in.h: New file.
5420 * gnulib/import/fd-hook.c: New file.
5421 * gnulib/import/fd-hook.h: New file.
5422 * gnulib/import/fd-safer.c: New file.
5423 * gnulib/import/fdopendir.c: New file.
5424 * gnulib/import/filename.h: New file.
5425 * gnulib/import/filenamecat-lgpl.c: New file.
5426 * gnulib/import/filenamecat.h: New file.
5427 * gnulib/import/fstat.c: New file.
5428 * gnulib/import/fstatat.c: New file.
5429 * gnulib/import/getcwd-lgpl.c: New file.
5430 * gnulib/import/getcwd.c: New file.
5431 * gnulib/import/getdtablesize.c: New file.
5432 * gnulib/import/getlogin_r.c: New file.
5433 * gnulib/import/getprogname.c: New file.
5434 * gnulib/import/getprogname.h: New file.
5435 * gnulib/import/gettext.h: New file.
5436 * gnulib/import/glob-libc.h: New file.
5437 * gnulib/import/glob.c: New file.
5438 * gnulib/import/glob.in.h: New file.
5439 * gnulib/import/intprops.h: New file.
5440 * gnulib/import/m4/chdir-long.m4: New file.
5441 * gnulib/import/m4/close.m4: New file.
5442 * gnulib/import/m4/closedir.m4: New file.
5443 * gnulib/import/m4/d-ino.m4: New file.
5444 * gnulib/import/m4/d-type.m4: New file.
5445 * gnulib/import/m4/dup.m4: New file.
5446 * gnulib/import/m4/dup2.m4: New file.
5447 * gnulib/import/m4/error.m4: New file.
5448 * gnulib/import/m4/fchdir.m4: New file.
5449 * gnulib/import/m4/fcntl.m4: New file.
5450 * gnulib/import/m4/fcntl_h.m4: New file.
5451 * gnulib/import/m4/fdopendir.m4: New file.
5452 * gnulib/import/m4/filenamecat.m4: New file.
5453 * gnulib/import/m4/fstat.m4: New file.
5454 * gnulib/import/m4/fstatat.m4: New file.
5455 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5456 * gnulib/import/m4/getcwd-path-max.m4: New file.
5457 * gnulib/import/m4/getcwd.m4: New file.
5458 * gnulib/import/m4/getdtablesize.m4: New file.
5459 * gnulib/import/m4/getlogin_r.m4: New file.
5460 * gnulib/import/m4/getprogname.m4: New file.
5461 * gnulib/import/m4/glob.m4: New file.
5462 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5463 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5464 * gnulib/import/m4/mempcpy.m4: New file.
5465 * gnulib/import/m4/memrchr.m4: New file.
5466 * gnulib/import/m4/mode_t.m4: New file.
5467 * gnulib/import/m4/msvc-inval.m4: New file.
5468 * gnulib/import/m4/msvc-nothrow.m4: New file.
5469 * gnulib/import/m4/open.m4: New file.
5470 * gnulib/import/m4/openat.m4: New file.
5471 * gnulib/import/m4/opendir.m4: New file.
5472 * gnulib/import/m4/readdir.m4: New file.
5473 * gnulib/import/m4/realloc.m4: New file.
5474 * gnulib/import/m4/rewinddir.m4: New file.
5475 * gnulib/import/m4/save-cwd.m4: New file.
5476 * gnulib/import/m4/strdup.m4: New file.
5477 * gnulib/import/m4/strerror.m4: New file.
5478 * gnulib/import/m4/unistd-safer.m4: New file.
5479 * gnulib/import/mempcpy.c: New file.
5480 * gnulib/import/memrchr.c: New file.
5481 * gnulib/import/msvc-inval.c: New file.
5482 * gnulib/import/msvc-inval.h: New file.
5483 * gnulib/import/msvc-nothrow.c: New file.
5484 * gnulib/import/msvc-nothrow.h: New file.
5485 * gnulib/import/open.c: New file.
5486 * gnulib/import/openat-die.c: New file.
5487 * gnulib/import/openat-priv.h: New file.
5488 * gnulib/import/openat-proc.c: New file.
5489 * gnulib/import/openat.c: New file.
5490 * gnulib/import/openat.h: New file.
5491 * gnulib/import/opendir.c: New file.
5492 * gnulib/import/pipe-safer.c: New file.
5493 * gnulib/import/readdir.c: New file.
5494 * gnulib/import/realloc.c: New file.
5495 * gnulib/import/rewinddir.c: New file.
5496 * gnulib/import/save-cwd.c: New file.
5497 * gnulib/import/save-cwd.h: New file.
5498 * gnulib/import/strdup.c: New file.
5499 * gnulib/import/strerror-override.c: New file.
5500 * gnulib/import/strerror-override.h: New file.
5501 * gnulib/import/strerror.c: New file.
5502 * gnulib/import/unistd--.h: New file.
5503 * gnulib/import/unistd-safer.h: New file.
5504 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5505 "getcwd" and "glob".
5506 * ser-tcp.c: Undefine "close" before redefining it.
5507
432ae719
SM
55082017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5509
5510 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5511 get rid of res_val.
5512
4fa7574e
RO
55132017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5514
5515 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5516 <sol2,sparc>: Likewise.
5517 <sol2-64,i386>: Likewise.
5518
5519 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5520 -Wdeprecated-declarations on *-*-solaris*.
5521 * configure: Regenerate.
5522
5523 * procfs.c: Include "nat/inferior.h".
5524 (procfs_info_proc): Fix typo.
5525
f6327dcb
KB
55262017-09-21 Kevin Buettner <kevinb@redhat.com>
5527
5528 * remote.c (vector): Include.
5529 (struct private_thread_info): Add field, thread_handle.
5530 (free_private_thread_info): Deallocate storage associated with
5531 thread handle.
5532 (get_private_info_thread): Initialize `thread_handle' field.
5533 (struct thread_item): Add field, thread_handle.
5534 (clear_threads_listing_context): Deallocate storage associated
5535 with thread handle.
5536 (start_thread): Add support for "handle" attribute.
5537 (thread_attributes): Add "handle".
5538 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5539 field.
5540 (remote_update_thread_list): Update thread_handle.
5541 (remote_thread_handle_to_thread_info): New function.
5542 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5543
fbbe5337
KB
55442017-09-21 Kevin Buettner <kevinb@redhat.com>
5545
5546 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5547 function.
5548 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5549 * python/python-internal.h (thread_object_type): Declare.
5550
e04ee09e
KB
55512017-09-21 Kevin Buettner <kevinb@redhat.com>
5552
5553 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5554 (target_thread_handle_to_thread_info): Declare.
5555 * target.c (target_thread_handle_to_thread_info): New function.
5556 * target-delegates.c: Regenerate.
5557 * gdbthread.h (find_thread_by_handle): Declare.
5558 * thread.c (find_thread_by_handle): New function.
5559 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5560 function.
5561 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5562
1e5b66ed
SM
55632017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5564
5565 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5566
ebe48ba0
SM
55672017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5568
5569 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5570
0a0bf5dc
YQ
55712017-09-21 Yao Qi <yao.qi@linaro.org>
5572
5573 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5574 to gdb_target_obs.
5575
d1b0a7bf
TT
55762017-09-20 Tom Tromey <tom@tromey.com>
5577
5578 * breakpoint.c (struct counted_command_line): Remove.
5579 (breakpoint_commands): Update.
5580 (alloc_counted_command_line, incref_counted_command_line)
5581 (decref_counted_command_line, do_cleanup_counted_command_line)
5582 (make_cleanup_decref_counted_command_line): Remove.
5583 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5584 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5585 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5586 (save_breakpoints): Update.
5587 * breakpoint.h (counted_command_line): Now a typedef to
5588 shared_ptr.
5589 (struct breakpoint) <commands>: Now a counted_command_line.
5590 (struct bpstats) <command>: Likewise.
5591
48649e1b
TT
55922017-09-20 Tom Tromey <tom@tromey.com>
5593
5594 * breakpoint.c (struct commands_info, do_map_commands_command):
5595 Remove.
5596 (commands_command_1): Update.
5597 (iterate_over_related_breakpoints): Take a function_view.
5598 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5599 (delete_command): Update.
5600 (map_breakpoint_numbers): Take a function_view.
5601 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5602 (disable_command): Update.
5603 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5604 (enable_command): Update.
5605 (struct disp_data, do_enable_breakpoint_disp)
5606 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5607 (do_map_enable_delete_breakpoint): Remove.
5608 (enable_once_command, enable_count_command, enable_delete_command)
5609 (delete_trace_variable_command): Update.
5610
04afa70c
TT
56112017-09-20 Tom Tromey <tom@tromey.com>
5612
5613 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5614 (bpstat_clear): Use delete.
5615 (bpstats): New constructors.
5616 (bpstat_copy, bpstat_stop_status): Use new.
5617 (dprintf_after_condition_true): Update.
5618 * breakpoint.h (bpstats::bpstats): Add constructors.
5619 (bpstats::~bpstats): Add destructor.
5620
c83833f4
PA
56212017-09-20 Pedro Alves <palves@redhat.com>
5622
5623 * eval.c (make_params): Delete, refactored as ...
5624 (class fake_method): ... this new type's ctor.
5625 (fake_method::~fake_method): New.
5626 (evaluate_subexp_standard): Use 'fake_method'.
5627
223ffa71
TT
56282017-09-20 Tom Tromey <tom@tromey.com>
5629
5630 * windows-nat.c (get_windows_debug_event, windows_wait)
5631 (do_initial_windows_stuff, windows_attach): Update.
5632 * utils.c (vwarning, internal_vproblem): Update.
5633 (ui_unregister_input_event_handler_cleanup)
5634 (prepare_to_handle_input): Remove.
5635 (class scoped_input_handler): New.
5636 (defaulted_query, prompt_for_continue): Update.
5637 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5638 Update.
5639 * top.c (undo_terminal_modifications_before_exit): Update.
5640 * target/target.h (target_terminal_init, target_terminal_inferior)
5641 (target_terminal_ours): Don't declare.
5642 (class target_terminal): New.
5643 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5644 (target_terminal_ours_for_output)
5645 (make_cleanup_restore_target_terminal): Don't declare.
5646 (target_terminal_info): Remove.
5647 * target.c (enum terminal_state, terminal_state): Remove.
5648 (target_terminal::terminal_state): Define.
5649 (target_terminal::init): Rename from target_terminal_init.
5650 (target_terminal::inferior): Rename from
5651 target_terminal_inferior.
5652 (target_terminal::ours): Rename from target_terminal_ours.
5653 (target_terminal::ours_for_output): Rename from
5654 target_terminal_ours_for_output.
5655 (target_terminal::info): New method.
5656 (cleanup_restore_target_terminal)
5657 (make_cleanup_restore_target_terminal): Remove.
5658 * solib.c (handle_solib_event): Update.
5659 * remote.c (remote_serial_quit_handler): Update.
5660 (remote_terminal_inferior, remote_wait_as): Update.
5661 * record-full.c (record_full_wait_1): Update.
5662 * nto-procfs.c (procfs_create_inferior): Update.
5663 * nat/fork-inferior.c (startup_inferior): Update.
5664 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5665 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5666 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5667 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5668 (mi_breakpoint_created, mi_breakpoint_deleted)
5669 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5670 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5671 (mi_user_selected_context_changed, report_initial_inferior):
5672 Update.
5673 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5674 (linux_nat_terminal_inferior): Update.
5675 * infrun.c (follow_fork_inferior)
5676 (handle_vfork_child_exec_or_exit, do_target_resume)
5677 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5678 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5679 Update.
5680 * inflow.c (child_terminal_init, info_terminal_command): Update.
5681 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5682 (attach_command): Update.
5683 * infcall.c (call_thread_fsm_should_stop): Update.
5684 * gnu-nat.c (gnu_attach): Update.
5685 * extension.c (struct active_ext_lang_state)
5686 (restore_active_ext_lang): Update.
5687 * exceptions.c (print_flush): Update.
5688 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5689 (struct quit_handler_cleanup_data, restore_quit_handler)
5690 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5691 Remove.
5692 * cp-support.c (gdb_demangle): Update.
5693 * breakpoint.c (update_inserted_breakpoint_locations)
5694 (insert_breakpoint_locations, handle_jit_event)
5695 (disable_breakpoints_in_unloaded_shlib): Update.
5696 * annotate.c (annotate_breakpoints_invalid)
5697 (annotate_frames_invalid): Update.
5698
013af3fc
TT
56992017-09-20 Tom Tromey <tom@tromey.com>
5700
5701 * main.c (catch_command_errors): Rename from
5702 catch_command_errors_const.
5703 (captured_main_1): Update.
5704
06871ae8
PA
57052017-09-20 Pedro Alves <palves@redhat.com>
5706
5707 * cli/cli-cmds.c (list_command): Use print_sal_location.
5708 (print_sal_location): New function.
5709 (ambiguous_line_spec): Use print_sal_location.
5710 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5711 * symtab.c (find_function_start_sal): Likewise.
5712 * symtab.h (symtab_and_line::symbol): New field.
5713
e5f25bc5
PA
57142017-09-20 Pedro Alves <palves@redhat.com>
5715
5716 * linespec.c (minsym_found): Handle non-text minsyms.
5717 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5718
1b7fa39e
WT
57192017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5720
5721 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5722 backslash.
5723
37dd0825
WT
57242017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5725
5726 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5727 vmovups instead vmovaps.
5728 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5729
4e5a4f58
JB
57302017-09-19 John Baldwin <jhb@FreeBSD.org>
5731
5732 * NEWS (Changes since GDB 8.0): Add starti.
5733 * infcmd.c (enum run_break): New.
5734 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5735 case.
5736 (run_command): Use enum run_how.
5737 (start_command): Likewise.
5738 (starti_command): New function.
5739 (RUN_ARGS_HELP): New macro.
5740 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5741 commands. Add starti command.
5742
aa70c9f1
YQ
57432017-09-19 Yao Qi <yao.qi@linaro.org>
5744
5745 * Makefile.in (monitor.o): Remove the rule.
5746
d6541620
YQ
57472017-09-19 Yao Qi <yao.qi@linaro.org>
5748
5749 * annotate.h (struct annotate_arg_emitter): Use
5750 DISABLE_COPY_AND_ASSIGN.
5751 * common/refcounted-object.h (refcounted_object): Likewise.
5752 * completer.h (struct completion_result): Likewise.
5753 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5754 * filename-seen-cache.h (filename_seen_cache): Likewise.
5755 * gdbcore.h (thread_section_name): Likewise.
5756 * gdb_regex.h (compiled_regex): Likewise.
5757 * gdbthread.h (scoped_restore_current_thread): Likewise.
5758 * inferior.h (scoped_restore_current_inferior): Likewise.
5759 * jit.c (jit_reader): Likewise.
5760 * linespec.h (struct linespec_result): Likewise.
5761 * mi/mi-parse.h (struct mi_parse): Likewise.
5762 * nat/fork-inferior.c (execv_argv): Likewise.
5763 * progspace.h (scoped_restore_current_program_space): Likewise.
5764 * python/python-internal.h (class gdbpy_enter): Likewise.
5765 * regcache.h (regcache): Likewise.
5766 * target-descriptions.c (struct tdesc_reg): Likewise.
5767 (struct tdesc_type): Likewise.
5768 (struct tdesc_feature): Likewise.
5769 * ui-out.h (ui_out_emit_type): Likewise.
5770
0615127c
SM
57712017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5772
5773 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5774 label abort_expression.
5775
5e187554
SM
57762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5777
5778 * common/buffer.c (buffer_xml_printf): Adjust.
5779 * common/xml-utils.c (xml_escape_text): Change return type to
5780 std::string, update code accordingly.
5781 * common/xml-utils.h (xml_escape_text): Change return type to
5782 std::string.
5783 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5784 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5785 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5786 Adjust.
5787
c3d7b541
SM
57882017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5789
5790 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5791 (SUBDIR_UNITTESTS_OBS): Add new object file.
5792 * unittests/xml-utils-selftests.c: New file.
5793
1526853e
SM
57942017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5795
5796 * common/selftest.h (selftest): New struct/interface.
5797 (register_test): Add name parameter, add new overload.
5798 (run_tests): Add filter parameter.
5799 (for_each_selftest_ftype): New typedef.
5800 (for_each_selftest): New declaration.
5801 * common/selftest.c (tests): Change type to
5802 map<string, unique_ptr<selftest>>.
5803 (simple_selftest): New struct.
5804 (register_test): New function.
5805 (register_test): Add name parameter and use it.
5806 (run_tests): Add filter parameter and use it. Add prints.
5807 Adjust to vector -> map change.
5808 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5809 registering selftests.
5810 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5811 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5812 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5813 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5814 * findvar.c (_initialize_findvar): Likewise.
5815 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5816 * maint.c (maintenance_selftest): Update call to run_tests.
5817 (maintenance_info_selftests): New function.
5818 (_initialize_maint_cmds): Register "maintenance info selftests"
5819 command. Update "maintenance selftest" doc.
5820 * regcache.c (_initialize_regcache): Add names when registering
5821 selftests.
5822 * rust-exp.y (_initialize_rust_exp): Likewise.
5823 * selftest-arch.c (gdbarch_selftest): New struct.
5824 (gdbarch_tests): Remove.
5825 (register_test_foreach_arch): Add name parameter. Call
5826 register_test.
5827 (tests_with_arch): Remove, move most content to
5828 gdbarch_selftest::operator().
5829 (_initialize_selftests_foreach_arch): Remove.
5830 * selftest-arch.h (register_test_foreach_arch): Add name
5831 parameter.
5832 (run_tests_with_arch): New declaration.
5833 * utils-selftests.c (_initialize_utils_selftests): Add names
5834 when registering selftests.
5835 * utils.c (_initialize_utils): Likewise.
5836 * unittests/array-view-selftests.c
5837 (_initialize_array_view_selftests): Likewise.
5838 * unittests/environ-selftests.c (_initialize_environ_selftests):
5839 Likewise.
5840 * unittests/function-view-selftests.c
5841 (_initialize_function_view_selftests): Likewise.
5842 * unittests/offset-type-selftests.c
5843 (_initialize_offset_type_selftests): Likewise.
5844 * unittests/optional-selftests.c
5845 (_initialize_optional_selftests): Likewise.
5846 * unittests/scoped_restore-selftests.c
5847 (_initialize_scoped_restore_selftests): Likewise.
5848 * NEWS: Document "maintenance selftest" and "maint info
5849 selftests".
5850
5846367a
SM
58512017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5852
5853 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5854 scoped_restore.
5855
bd77e8ff
SM
58562017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5857
5858 * mi/mi-main.c (mi_load_progress): Make uiout variable
5859 a unique_ptr.
5860
26a67918
PA
58612017-09-15 Pedro Alves <palves@redhat.com>
5862
5863 * compile/compile-c-types.c (convert_enum, convert_int)
5864 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5865
3f8a7804
SM
58662017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5867
5868 * dwarf2read.c (copy_string): Remove.
5869 (parse_macro_definition): Replace copy_string with savestring.
5870
8d200706
YQ
58712017-09-15 Yao Qi <yao.qi@linaro.org>
5872
5873 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5874 gdb_target_obs.
5875 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5876 Likewise.
5877 (i[34567]86-*-linux*): Likewise.
5878
d185219d
SM
58792017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5880
5881 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5882 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5883 <stack>: Change type to std::vector.
5884 <stack_len, stack_allocated>: Remove.
5885 <grow_stack>: Remove.
5886 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5887 (dwarf_expr_context::~dwarf_expr_context): Remove.
5888 (dwarf_expr_context::grow_stack): Remove.
5889 (dwarf_expr_context::push): Adjust.
5890 (dwarf_expr_context::pop): Adjust.
5891 (dwarf_expr_context::fetch): Adjust.
5892 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5893 (dwarf_expr_context::stack_empty_p): Adjust.
5894 (dwarf_expr_context::execute_stack_op): Adjust.
5895
eccd80d6
SM
58962017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5897
5898 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5899 return type to bool.
5900 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5901
69009882
SM
59022017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5903
5904 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5905 Change type to bool.
5906 (dwarf_stack_value) <in_stack_memory>: Likewise.
5907 (dwarf_expr_context) <push_address>: Change parameter type to
5908 bool.
5909 <fetch_in_stack_memory>: Change return type to bool.
5910 <push>: Change parameter type to bool.
5911 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5912 to bool.
5913 (dwarf_expr_context::push_address): Likewise.
5914 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5915 to bool.
5916 (dwarf_expr_context::execute_stack_op): Adjust.
5917 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5918
1e467161
SM
59192017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5920
5921 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5922 (struct dwarf_expr_context) <n_pieces>: Remove.
5923 <pieces>: Change type to std::vector.
5924 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5925 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5926 pieces.
5927 (dwarf_expr_context::add_piece): Adjust.
5928 * dwarf2loc.c (struct piece_closure): Initialize fields.
5929 <n_pieces>: Remove.
5930 <pieces>: Change type to std::vector.
5931 (allocate_piece_closure): Adjust, change parameter to
5932 std::vector rvalue and std::move it to piece_closure.
5933 (rw_pieced_value): Adjust.
5934 (check_pieced_synthetic_pointer): Adjust.
5935 (indirect_synthetic_pointer): Adjust.
5936 (coerce_pieced_ref): Adjust.
5937 (free_pieced_value_closure): Adjust. Use delete to free
5938 piece_closure.
5939 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5940 to allocate_piece_closure.
5941 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5942
0782db84
SM
59432017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5944
5945 * probe.h (probe_ops_cp): Remove typedef.
5946 (DEF_VEC_P (probe_ops_cp)): Remove.
5947 (all_probe_ops): Change type to std::vector.
5948 * probe.c (info_probes_for_ops): Adjust to vector change.
5949 (probe_linespec_to_ops): Likewise.
5950 (all_probe_ops): Change type to std::vector.
5951 (_initialize_probe): Adjust to vector change.
5952 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5953 * elfread.c (elf_get_probes): Likewise.
5954 * stap-probe.c (_initialize_stap_probe): Likewise.
5955
1eac6bea
SM
59562017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5957
5958 * probe.h (struct bound_probe): Define constructors.
5959 * probe.c (bound_probe_s): Remove typedef.
5960 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5961 (collect_probes): Change return type to std::vector, remove
5962 cleanup.
5963 (compare_probes): Return bool, change parameter type. Change
5964 semantic to "less than".
5965 (gen_ui_out_table_header_info): Change parameter to std::vector
5966 and update.
5967 (exists_probe_with_pops): Likewise.
5968 (info_probes_for_ops): Update to std::vector change.
5969 (enable_probes_command): Likewise.
5970 (disable_probes_command): Likewise.
5971
aaa63a31
SM
59722017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5973
5974 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5975 vec to std::vector.
5976 * probe.c (parse_probes_in_pspace): Update.
5977 (find_probes_in_objfile): Update.
5978 (find_probe_by_pc): Update.
5979 (collect_probes): Update.
5980 (probe_any_get_probes): Update.
5981 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5982 return type to reference to std::vector.
5983 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5984 std::vector and update.
5985 (dtrace_process_dof): Likewise.
5986 (dtrace_get_probes): Likewise.
5987 * elfread.c (elf_get_probes): Change return type to std::vector,
5988 store an std::vector in bfd_data.
5989 (probe_key_free): Update to std::vector.
5990 * stap-probe.c (handle_stap_probe): Change parameter to
5991 std::vector and update.
5992 (stap_get_probes): Likewise.
5993 * symfile-debug.c (debug_sym_get_probes): Change return type to
5994 std::vector and update.
5995
cb85b21b
TT
59962017-09-11 Tom Tromey <tom@tromey.com>
5997
5998 * breakpoint.c (program_breakpoint_here_p): Update.
5999 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6000 from make_show_memory_breakpoints_cleanup. Return a
6001 scoped_restore_tmpl<int>.
6002 (restore_show_memory_breakpoints): Remove.
6003 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6004 * mem-break.c (memory_validate_breakpoint): Update.
6005 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6006 (ia64_memory_remove_breakpoint): Update.
6007 (ia64_breakpoint_from_pc): Update.
6008 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6009 from make_show_memory_breakpoints_cleanup.
6010
8fbc99ef
TT
60112017-09-11 Tom Tromey <tom@tromey.com>
6012
6013 * d-namespace.c (d_lookup_symbol): Use std::string.
6014 (find_symbol_in_baseclass): Likewise.
6015
50feb4bd
TT
60162017-09-11 Tom Tromey <tom@tromey.com>
6017
6018 * ctf.c (ctf_start): Use std::string.
6019
c6dc63a1
TT
60202017-09-11 Tom Tromey <tom@tromey.com>
6021
6022 * ada-lang.c (is_known_support_routine): Update.
6023 (ada_unhandled_exception_name_addr_from_raise): Update.
6024 * guile/scm-frame.c (gdbscm_frame_name): Update.
6025 * python/py-frame.c (frapy_name): Update.
6026 (frapy_function): Update.
6027 * stack.h (find_frame_funname): Update.
6028 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6029 (print_frame): Update.
6030
d6b9b80f
TT
60312017-09-11 Tom Tromey <tom@tromey.com>
6032
6033 * findcmd.c (put_bits): Take a gdb::byte_vector.
6034 (parse_find_args): Return gdb::byte_vector. "args" now const.
6035 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6036 cleanups.
6037 (find_command): Update.
6038
a9921622
TT
60392017-09-11 Tom Tromey <tom@tromey.com>
6040
6041 * cli/cli-script.c (class scoped_restore_hook_in): New.
6042 (clear_hook_in_cleanup): Remove.
6043 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6044 scoped_restore_hook_in.
6045
be0d7abb
TT
60462017-09-11 Tom Tromey <tom@tromey.com>
6047
6048 * cli/cli-script.c (restore_interp): Remove.
6049 (read_command_lines): Use scoped_restore_interp.
6050 * interps.c (scoped_restore_interp::set_temp): Rename from
6051 interp_set_temp.
6052 * interps.h (class scoped_restore_interp): New.
6053 (interp_set_temp): Remove.
6054
00f675ff
TT
60552017-09-11 Tom Tromey <tom@tromey.com>
6056
6057 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6058 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6059 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6060 scoped_restore.
6061 (mi_cmd_break_insert_1): Update.
6062 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6063 scoped_restore.
6064
cb791d59
TT
60652017-09-11 Tom Tromey <tom@tromey.com>
6066
6067 * demangle.c (demangle_command): Update.
6068 * breakpoint.c (disable_command): Update.
6069 (enable_command): Update.
6070 (find_location_by_number): Make "number" const. Use
6071 get_number_trailer.
6072 * cli/cli-utils.c (extract_arg): Return std::string.
6073 * probe.c (parse_probe_linespec): Update. Change types.
6074 (collect_probes): Take string arguments.
6075 (parse_probe_linespec): Likewise.
6076 (info_probes_for_ops): Update.
6077 (enable_probes_command): Update.
6078 (disable_probes_command): Update.
6079 * break-catch-sig.c (catch_signal_split_args): Update.
6080 * mi/mi-parse.c (mi_parse): Update.
6081
2039bd9f
TT
60822017-09-11 Tom Tromey <tom@tromey.com>
6083
6084 * language.h (language_enum): Make argument const.
6085 * language.c (language_enum): Make argument const.
6086
f1735a53
TT
60872017-09-11 Tom Tromey <tom@tromey.com>
6088
6089 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6090 as function.
6091 (skip_to_space): Rename from skip_to_space_const.
6092 * common/common-utils.c (skip_to_space): New function.
6093 (skip_to_space): Rename from skip_to_space_const.
6094 * cli/cli-utils.h (get_number): Rename from get_number_const.
6095 (extract_arg): Rename from extract_arg_const.
6096 * cli/cli-utils.c (get_number): Rename from get_number_const.
6097 (extract_arg): Rename from extract_arg_const.
6098 (number_or_range_parser::get_number): Use ::get_number.
6099 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6100 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6101 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6102 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6103 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6104 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6105 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6106 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6107
7d221d74
TT
61082017-09-11 Tom Tromey <tom@tromey.com>
6109
6110 * python/python.c (do_start_initialization): Use
6111 py-event-types.def to initialize types.
6112 Define all object type structures.
6113 * python/python-internal.h: Don't declare event initialization
6114 functions.
6115 * python/py-threadevent.c (thread_event_object_type): Don't
6116 define.
6117 * python/py-stopevent.c (stop_event_object_type): Don't define.
6118 * python/py-signalevent.c (signal_event_object_type): Don't
6119 declare or define.
6120 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6121 (clear_objfiles_event_object_type): Don't declare or define.
6122 * python/py-infevents.c (inferior_call_pre_event_object_type)
6123 (inferior_call_post_event_object_type)
6124 (register_changed_event_object_type)
6125 (memory_changed_event_object_type): Don't declare or define.
6126 * python/py-inferior.c (new_thread_event_object_type)
6127 (new_inferior_event_object_type)
6128 (inferior_deleted_event_object_type): Don't declare or define.
6129 * python/py-exitedevent.c (exited_event_object_type): Don't
6130 declare or define.
6131 * python/py-evts.c (gdbpy_initialize_py_events): Use
6132 py-all-events.def.
6133 * python/py-events.h (thread_event_object_type): Don't declare.
6134 (events_object): Use py-all-events.def.
6135 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6136 py-event-types.def.
6137 * python/py-event-types.def: New file.
6138 * python/py-continueevent.c (create_continue_event_object): Don't
6139 declare or define.
6140 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6141 declare or define.
6142 * python/py-all-events.def: New file.
6143
35c61a1d
TT
61442017-09-11 Tom Tromey <tom@tromey.com>
6145
6146 * python/py-threadevent.c (create_thread_event_object): Return
6147 gdbpy_ref.
6148 * python/py-stopevent.h (create_stop_event_object)
6149 (create_breakpoint_event_object, create_signal_event_object):
6150 Update.
6151 * python/py-stopevent.c (create_stop_event_object): Return
6152 gdbpy_ref.
6153 (emit_stop_event): Update.
6154 * python/py-signalevent.c (create_signal_event_object): Return
6155 gdbpy_ref.
6156 * python/py-infevents.c (create_inferior_call_event_object):
6157 Update.
6158 * python/py-event.h (create_event_object)
6159 (create_thread_event_object): Update.
6160 * python/py-event.c (create_event_object): Return gdbpy_ref.
6161 * python/py-continueevent.c: Return gdbpy_ref.
6162 * python/py-bpevent.c (create_breakpoint_event_object): Return
6163 gdbpy_ref.
6164
7c96f8c1
TT
61652017-09-11 Tom Tromey <tom@tromey.com>
6166
6167 PR python/15622:
6168 * NEWS: Add entry.
6169 * python/python.c (do_start_initialization): Initialize new event
6170 types.
6171 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6172 (gdbpy_initialize_inferior_deleted_event)
6173 (gdbpy_initialize_new_thread_event): Declare.
6174 * python/py-threadevent.c (create_thread_event_object): Add option
6175 "thread" parameter.
6176 * python/py-inferior.c (new_thread_event_object_type)
6177 (new_inferior_event_object_type)
6178 (inferior_deleted_event_object_type): Declare.
6179 (python_new_inferior, python_inferior_deleted): New functions.
6180 (add_thread_object): Emit new_thread event.
6181 (gdbpy_initialize_inferior): Attach new functions to corresponding
6182 observers.
6183 (new_thread, new_inferior, inferior_deleted): Define new event
6184 types.
6185 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6186 registries.
6187 * python/py-events.h (events_object) <new_inferior,
6188 inferior_deleted, new_thread>: New fields.
6189 * python/py-event.h (create_thread_event_breakpoint): Add optional
6190 "thread" parameter.
6191
72542b8e
AB
61922017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6193
6194 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6195 check current_ui instead.
6196 (internal_vproblem): Likewise.
6197
0d64823e
SM
61982017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6199
6200 * thread.c (print_thread_info_1): Remove unnecessary calls to
6201 uiout->is_mi_like_p.
6202
eb1e02fd
TT
62032017-09-09 Tom Tromey <tom@tromey.com>
6204
6205 * namespace.h (add_using_directive): Update.
6206 * namespace.c (add_using_directive): Change type of excludes to
6207 std::vector.
6208 * dwarf2read.c (read_import_statement): Use std::vector.
6209 (read_namespace): Update.
6210 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6211
0fc21fd8
TT
62122017-09-09 Tom Tromey <tom@tromey.com>
6213
6214 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6215
49663d05
TT
62162017-09-09 Tom Tromey <tom@tromey.com>
6217
6218 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6219
0b868b60
TT
62202017-09-09 Tom Tromey <tom@tromey.com>
6221
6222 * stack.c (func_command): Use gdb::def_vector.
6223
c0470d48
TT
62242017-09-09 Tom Tromey <tom@tromey.com>
6225
6226 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6227 ui_out_emit_list, ui_out_emit_tuple.
6228 (mi_cmd_var_update): Likewise.
6229
ca5909c7
TT
62302017-09-09 Tom Tromey <tom@tromey.com>
6231
6232 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6233 ui_out_redirect_pop.
6234 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6235 ui_out_redirect_pop.
6236 * utils.c (do_ui_out_redirect_pop)
6237 (make_cleanup_ui_out_redirect_pop): Remove.
6238 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6239 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6240 * ui-out.h (ui_out_redirect_pop): New class.
6241
e6a2252a
TT
62422017-09-09 Tom Tromey <tom@tromey.com>
6243
6244 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6245 (list_available_thread_groups, mi_cmd_list_thread_groups)
6246 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6247 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6248 Likewise.
6249
393702cd
TT
62502017-09-09 Tom Tromey <tom@tromey.com>
6251
6252 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6253 ui_out_emit_tuple.
6254
76f9c9cf
TT
62552017-09-09 Tom Tromey <tom@tromey.com>
6256
6257 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6258 * stack.c (print_frame): Use ui_out_emit_tuple.
6259 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6260 (info_spu_mailbox_command, info_spu_dma_command)
6261 (info_spu_proxydma_command): Likewise.
6262 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6263 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6264 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6265 ui_out_emit_tuple.
6266 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6267
dc9fe180
TT
62682017-09-09 Tom Tromey <tom@tromey.com>
6269
6270 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6271 (class ui_out_emit_table): Update comment.
6272 * ui-out.c (do_cleanup_table_end)
6273 (make_cleanup_ui_out_table_begin_end): Remove.
6274 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6275 (info_spu_dma_cmdlist): Likewise.
6276 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6277 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6278 ui_out_emit_table.
6279
f8cc3da6
TT
62802017-09-09 Tom Tromey <tom@tromey.com>
6281
6282 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6283 ui_out_emit_list, gdb::optional.
6284
481695ed
JB
62852017-09-09 John Baldwin <jhb@FreeBSD.org>
6286
6287 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6288 prototype.
6289 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6290 prototype.
6291 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6292 prototype.
6293 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6294 * ada-exp.y: Remove _initialize_ada_exp prototype.
6295 * ada-lang.c: Remove _initialize_ada_language prototype.
6296 * ada-tasks.c: Remove _initialize_tasks prototype.
6297 * addrmap.c: Remove _initialize_addrmap prototype.
6298 * agent.c: Remove _initialize_agent prototype.
6299 * aix-thread.c: Remove _initialize_aix_thread prototype.
6300 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6301 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6302 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6303 prototype.
6304 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6305 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6306 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6307 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6308 prototype.
6309 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6310 prototype.
6311 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6312 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6313 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6314 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6315 prototype.
6316 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6317 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6318 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6319 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6320 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6321 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6322 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6323 prototype.
6324 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6325 prototype.
6326 * annotate.c: Remove _initialize_annotate prototype.
6327 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6328 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6329 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6330 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6331 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6332 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6333 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6334 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6335 prototype.
6336 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6337 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6338 * auto-load.c: Remove _initialize_auto_load prototype.
6339 * auxv.c: Remove _initialize_auxv prototype.
6340 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6341 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6342 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6343 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6344 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6345 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6346 prototype.
6347 * break-catch-throw.c: Remove _initialize_break_catch_throw
6348 prototype.
6349 * breakpoint.c: Remove _initialize_breakpoint prototype.
6350 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6351 * btrace.c: Remove _initialize_btrace prototype.
6352 * charset.c: Remove _initialize_charset prototype.
6353 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6354 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6355 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6356 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6357 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6358 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6359 * coffread.c: Remove _initialize_coffread prototype.
6360 * compile/compile.c: Remove _initialize_compile prototype.
6361 * complaints.c: Remove _initialize_complaints prototype.
6362 * completer.c: Remove _initialize_completer prototype.
6363 * copying.awk: Remove _initialize_copying prototype.
6364 * copying.c: Regenerate.
6365 * core-regset.c: Remove _initialize_core_regset prototype.
6366 * corefile.c: Remove _initialize_core prototype.
6367 * corelow.c: Remove _initialize_corelow prototype.
6368 * cp-abi.c: Remove _initialize_cp_abi prototype.
6369 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6370 * cp-support.c: Remove _initialize_cp_support prototype.
6371 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6372 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6373 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6374 * ctf.c: Remove _initialize_ctf prototype.
6375 * d-lang.c: Remove _initialize_d_language prototype.
6376 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6377 prototype.
6378 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6379 * dbxread.c: Remove _initialize_dbxread prototype.
6380 * dcache.c: Remove _initialize_dcache prototype.
6381 * demangle.c: Remove _initialize_demangler prototype.
6382 * disasm-selftests.c: Remove _initialize_disasm_selftests
6383 prototype.
6384 * disasm.c: Remove _initialize_disasm prototype.
6385 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6386 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6387 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6388 prototype.
6389 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6390 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6391 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6392 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6393 * elfread.c: Remove _initialize_elfread prototype.
6394 * exec.c: Remove _initialize_exec prototype.
6395 * extension.c: Remove _initialize_extension prototype.
6396 * f-lang.c: Remove _initialize_f_language prototype.
6397 * f-valprint.c: Remove _initialize_f_valprint prototype.
6398 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6399 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6400 * filesystem.c: Remove _initialize_filesystem prototype.
6401 * findcmd.c: Remove _initialize_mem_search prototype.
6402 * fork-child.c: Remove _initialize_fork_child prototype.
6403 * frame-base.c: Remove _initialize_frame_base prototype.
6404 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6405 * frame.c: Remove _initialize_frame prototype.
6406 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6407 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6408 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6409 * gcore.c: Remove _initialize_gcore prototype.
6410 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6411 * gdbarch.c: Regenerate.
6412 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6413 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6414 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6415 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6416 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6417 * go-lang.c: Remove _initialize_go_language prototype.
6418 * go32-nat.c: Remove _initialize_go32_nat prototype.
6419 * guile/guile.c: Remove _initialize_guile prototype.
6420 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6421 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6422 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6423 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6424 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6425 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6426 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6427 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6428 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6429 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6430 prototype.
6431 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6432 prototype.
6433 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6434 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6435 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6436 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6437 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6438 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6439 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6440 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6441 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6442 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6443 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6444 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6445 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6446 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6447 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6448 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6449 prototype.
6450 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6451 prototype.
6452 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6453 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6454 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6455 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6456 * infcall.c: Remove _initialize_infcall prototype.
6457 * infcmd.c: Remove _initialize_infcmd prototype.
6458 * inferior.c: Remove _initialize_inferiors prototype.
6459 * inflow.c: Remove _initialize_inflow prototype.
6460 * infrun.c: Remove _initialize_infrun prototype.
6461 * interps.c: Remove _initialize_interpreter prototype.
6462 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6463 * jit.c: Remove _initialize_jit prototype.
6464 * language.c: Remove _initialize_language prototype.
6465 * linux-fork.c: Remove _initialize_linux_fork prototype.
6466 * linux-nat.c: Remove _initialize_linux_nat prototype.
6467 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6468 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6469 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6470 * m2-lang.c: Remove _initialize_m2_language prototype.
6471 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6472 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6473 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6474 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6475 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6476 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6477 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6478 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6479 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6480 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6481 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6482 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6483 * machoread.c: Remove _initialize_machoread prototype.
6484 * macrocmd.c: Remove _initialize_macrocmd prototype.
6485 * macroscope.c: Remove _initialize_macroscope prototype.
6486 * maint.c: Remove _initialize_maint_cmds prototype.
6487 * mdebugread.c: Remove _initialize_mdebugread prototype.
6488 * memattr.c: Remove _initialize_mem prototype.
6489 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6490 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6491 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6492 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6493 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6494 * microblaze-linux-tdep.c: Remove
6495 _initialize_microblaze_linux_tdep prototype.
6496 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6497 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6498 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6499 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6500 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6501 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6502 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6503 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6504 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6505 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6506 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6507 prototype.
6508 * mipsread.c: Remove _initialize_mipsread prototype.
6509 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6510 prototype.
6511 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6512 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6513 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6514 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6515 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6516 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6517 prototype.
6518 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6519 * nto-procfs.c: Remove _initialize_procfs prototype.
6520 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6521 * objc-lang.c: Remove _initialize_objc_language prototype.
6522 * objfiles.c: Remove _initialize_objfiles prototype.
6523 * observer.c: Remove observer_test_first_notification_function,
6524 observer_test_second_notification_function,
6525 observer_test_third_notification_function, and
6526 _initialize_observer prototypes.
6527 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6528 * osabi.c: Remove _initialize_gdb_osabi prototype.
6529 * osdata.c: Remove _initialize_osdata prototype.
6530 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6531 * parse.c: Remove _initialize_parse prototype.
6532 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6533 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6534 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6535 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6536 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6537 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6538 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6539 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6540 * printcmd.c: Remove _initialize_printcmd prototype.
6541 * probe.c: Remove _initialize_probe prototype.
6542 * proc-api.c: Remove _initialize_proc_api prototype.
6543 * proc-events.c: Remove _initialize_proc_events prototype.
6544 * proc-service.c: Remove _initialize_proc_service prototype.
6545 * procfs.c: Remove _initialize_procfs prototype.
6546 * psymtab.c: Remove _initialize_psymtab prototype.
6547 * python/python.c: Remove _initialize_python prototype.
6548 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6549 * record-btrace.c: Remove _initialize_record_btrace prototype.
6550 * record-full.c: Remove _initialize_record_full prototype.
6551 * record.c: Remove _initialize_record prototype.
6552 * regcache.c: Remove _initialize_regcache prototype.
6553 * reggroups.c: Remove _initialize_reggroup prototype.
6554 * remote-notif.c: Remove _initialize_notif prototype.
6555 * remote-sim.c: Remove _initialize_remote_sim prototype.
6556 * remote.c: Remove _initialize_remote prototype.
6557 * reverse.c: Remove _initialize_reverse prototype.
6558 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6559 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6560 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6561 prototype.
6562 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6563 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6564 * rust-exp.y: Remove _initialize_rust_exp prototype.
6565 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6566 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6567 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6568 * score-tdep.c: Remove _initialize_score_tdep prototype.
6569 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6570 prototype.
6571 * ser-go32.c: Remove _initialize_ser_dos prototype.
6572 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6573 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6574 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6575 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6576 * serial.c: Remove _initialize_serial prototype.
6577 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6578 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6579 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6580 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6581 * skip.c: Remove _initialize_step_skip prototype.
6582 * sol-thread.c: Remove _initialize_sol_thread prototype.
6583 * solib-aix.c: Remove _initialize_solib_aix prototype.
6584 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6585 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6586 * solib-frv.c: Remove _initialize_frv_solib prototype.
6587 * solib-spu.c: Remove _initialize_spu_solib prototype.
6588 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6589 * solib-target.c: Remove _initialize_solib_target prototype.
6590 * solib.c: Remove _initialize_solib prototype.
6591 * source.c: Remove _initialize_source prototype.
6592 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6593 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6594 prototype.
6595 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6596 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6597 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6598 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6599 prototype.
6600 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6601 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6602 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6603 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6604 prototype.
6605 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6606 prototype.
6607 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6608 prototype.
6609 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6610 prototype.
6611 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6612 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6613 prototype.
6614 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6615 prototype.
6616 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6617 prototype.
6618 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6619 prototype.
6620 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6621 prototype.
6622 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6623 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6624 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6625 * stabsread.c: Remove _initialize_stabsread prototype.
6626 * stack.c: Remove _initialize_stack prototype.
6627 * stap-probe.c: Remove _initialize_stap_probe prototype.
6628 * std-regs.c: Remove _initialize_frame_reg prototype.
6629 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6630 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6631 * symfile.c: Remove _initialize_symfile prototype.
6632 * symmisc.c: Remove _initialize_symmisc prototype.
6633 * symtab.c: Remove _initialize_symtab prototype.
6634 * target-dcache.c: Remove _initialize_target_dcache prototype.
6635 * target-descriptions.c: Remove _initialize_target_descriptions
6636 prototype.
6637 * thread.c: Remove _initialize_thread prototype.
6638 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6639 prototype.
6640 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6641 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6642 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6643 prototype.
6644 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6645 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6646 * tracefile.c: Remove _initialize_tracefile prototype.
6647 * tracepoint.c: Remove _initialize_tracepoint prototype.
6648 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6649 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6650 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6651 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6652 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6653 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6654 * tui/tui.c: Remove _initialize_tui prototype.
6655 * typeprint.c: Remove _initialize_typeprint prototype.
6656 * user-regs.c: Remove _initialize_user_regs prototype.
6657 * utils.c: Remove _initialize_utils prototype.
6658 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6659 * valarith.c: Remove _initialize_valarith prototype.
6660 * valops.c: Remove _initialize_valops prototype.
6661 * valprint.c: Remove _initialize_valprint prototype.
6662 * value.c: Remove _initialize_values prototype.
6663 * varobj.c: Remove _initialize_varobj prototype.
6664 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6665 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6666 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6667 * windows-nat.c: Remove _initialize_windows_nat,
6668 _initialize_check_for_gdb_ini, and _initialize_loadable
6669 prototypes.
6670 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6671 * xcoffread.c: Remove _initialize_xcoffread prototype.
6672 * xml-support.c: Remove _initialize_xml_support prototype.
6673 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6674 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6675 prototype.
6676 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6677 prototype.
6678 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6679
a611b5cb
KS
66802017-09-08 Keith Seitz <keiths@redhat.com>
6681
6682 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6683 field.
6684
469412dd
CW
66852017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6686
6687 * f-valprint.c (f_val_print): Remove check for one byte
6688 sized integers. Remove printing of character type.
6689
a5ad232b
FP
66902017-09-08 Frank Penczek <frank.penczek@intel.com>
6691 Christoph Weinmann <christoph.t.weinmann@intel.com>
6692 Bernhard Heckel <bernhard.heckel@intel.com>
6693
6694 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6695 to maintain proper indentation when printing pointers/refs.
6696
e5014227
JB
66972017-09-07 Joel Brobecker <brobecker@adacore.com>
6698
6699 GDB 8.0.1 released.
6700
63c99141
JB
67012017-09-07 Joel Brobecker <brobecker@adacore.com>
6702
6703 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6704
69c1e056
TT
67052017-09-05 Tom Tromey <tom@tromey.com>
6706
6707 * parse.c (funcall_chain): Now a std::vector.
6708 (start_arglist, end_arglist): Simplify.
6709 (free_funcalls): Remove.
6710 (parse_exp_in_context_1): Remove cleanup.
6711
fef704bf
TT
67122017-09-05 Tom Tromey <tom@tromey.com>
6713
6714 * go-exp.y (go_parse): Don't create a cleanup.
6715
5613c585
TT
67162017-09-05 Tom Tromey <tom@tromey.com>
6717
6718 * d-exp.y (PrimaryExpression): Use std::string.
6719 (d_parse): Don't create a cleanup.
6720
eae49211
TT
67212017-09-05 Tom Tromey <tom@tromey.com>
6722
6723 * utils.c (do_clear_parser_state): Remove.
6724 (make_cleanup_clear_parser_state): Remove.
6725 * p-exp.y (pascal_parse): Use scoped_restore.
6726 * m2-exp.y (m2_parse): Use scoped_restore.
6727 * f-exp.y (f_parse): Use scoped_restore.
6728 * d-exp.y (d_parse): Use scoped_restore.
6729 * c-exp.y (c_parse): Use scoped_restore.
6730 * ada-exp.y (ada_parse): Use scoped_restore.
6731 * utils.h (make_cleanup_clear_parser_state): Remove.
6732
73b9be8b
KS
67332017-09-06 Keith Seitz <keiths@redhat.com>
6734
6735 * dwarf2read.c (dw2_linkage_name_attr): New function.
6736 (dw2_linkage_name): New function.
6737 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6738 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6739 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6740
a102602b
KR
67412017-09-06 Kamil Rytarowski <n54@gmx.com>
6742
6743 * config/djgpp/djconfig.sh: Correct shell portability issue.
6744
28ad437d
KR
67452017-09-06 Kamil Rytarowski <n54@gmx.com>
6746
6747 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6748
351787dd
JB
67492017-09-06 John Baldwin <jhb@FreeBSD.org>
6750
6751 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6752 * NEWS: Mention new FreeBSD/mips native configuration.
6753 * configure.host: Add aarch64*-*-freebsd*.
6754 * configure.nat: Likewise.
6755 * aarch64-fbsd-nat.c: New file.
6756
c0f84956
JB
67572017-09-06 John Baldwin <jhb@FreeBSD.org>
6758
6759 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6760 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6761 * NEWS: Mention new FreeBSD/aarch64 target.
6762 * configure.tgt: Add aarch64*-*-freebsd*.
6763 * aarch64-fbsd-tdep.c: New file.
6764 * aarch64-fbsd-tdep.h: New file.
6765
7610297a
KR
67662017-09-06 Kamil Rytarowski <n54@gmx.com>
6767
6768 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6769
fbd1b771
JK
67702017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6771
6772 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6773 of TLS symbols.
6774
5ca79eae
PW
67752017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6776
6777 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6778 call.
6779
bf93d7ba
SM
67802017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6781
6782 * infrun.c (follow_exec): Call add_thread after
6783 target_find_description.
6784
1bb7c059
SM
67852017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6786
6787 * infrun.c (handle_inferior_event_1): When exec'ing, read
6788 stop_pc after follow_exec.
6789
fc809827
SM
67902017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6791
6792 * remote.c (process_g_packet): Update error message.
6793
d2fcdd85
YQ
67942017-09-05 Yao Qi <yao.qi@linaro.org>
6795
6796 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6797 targets.
6798
e69570ee
PA
67992017-09-05 Pedro Alves <palves@redhat.com>
6800
6801 * eval.c (eval_call, evaluate_funcall): New functions, factored
6802 out from ...
6803 (evaluate_subexp_standard): ... this.
6804
22916b07
YQ
68052017-09-05 Yao Qi <yao.qi@linaro.org>
6806
6807 * amd64-tdep.c (amd64_target_description): Create target
6808 descriptions.
6809 (_initialize_amd64_tdep): Don't call functions
6810 initialize_tdesc_amd64_*. Add self tests.
6811 * arch/amd64.c (amd64_create_target_description): Add parameter
6812 is_linux. Call set_tdesc_osabi if is_linux is true.
6813 * arch/amd64.h (amd64_create_target_description): Update the
6814 declaration.
6815 * arch/i386.c (i386_create_target_description): Add parameter
6816 is_linux. Call set_tdesc_osabi if is_linux is true.
6817 * arch/i386.h (i386_create_target_description): Update
6818 declaration.
6819 * configure.tgt: Add i386.o to gdb_target_obs.
6820 * features/Makefile (XMLTOC): Remove i386/*.xml.
6821 * features/i386/amd64-avx-avx512.c: Remove.
6822 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6823 * features/i386/amd64-avx-mpx.c: Remove.
6824 * features/i386/amd64-avx.c: Remove.
6825 * features/i386/amd64-mpx.c: Remove.
6826 * features/i386/amd64.c: Remove.
6827 * features/i386/i386-avx-avx512.c: Remove.
6828 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6829 * features/i386/i386-avx-mpx.c: Remove.
6830 * features/i386/i386-avx.c: Remove.
6831 * features/i386/i386-mmx.c: Remove.
6832 * features/i386/i386-mpx.c: Remove.
6833 * features/i386/i386.c: Remove.
6834 * i386-tdep.c: Don't include features/i386/i386*.c., include
6835 target-descriptions.h and arch/i386.h.
6836 (i386_target_description): Create target descriptions.
6837 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6838 functions. Do self tests.
6839
0854b7b1
YQ
68402017-09-05 Yao Qi <yao.qi@linaro.org>
6841
6842 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6843 * features/i386/amd64-avx-avx512-linux.c: Removed.
6844 * features/i386/amd64-avx-linux.c: Removed.
6845 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6846 * features/i386/amd64-avx-mpx-linux.c: Removed.
6847 * features/i386/amd64-linux.c: Removed.
6848 * features/i386/amd64-mpx-linux.c: Removed.
6849 * features/i386/x32-avx-avx512-linux.c: Removed.
6850 * features/i386/x32-avx-linux.c: Removed.
6851 * features/i386/x32-linux.c: Removed.
6852
b4570e4b
YQ
68532017-09-05 Yao Qi <yao.qi@linaro.org>
6854
6855 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6856 features/i386/*.c.
6857 (amd64_linux_read_description): Call
6858 amd64_create_target_description.
6859 * arch/amd64.c: New file.
6860 * arch/amd64.h: New file.
6861 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6862 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6863
6c73f67f
YQ
68642017-09-05 Yao Qi <yao.qi@linaro.org>
6865
6866 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6867 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6868 (amd64_linux_read_description): Create target descriptions.
6869 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6870 functions. Add unit tests.
6871 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6872 x32-core.xml.
6873 * features/i386/64bit-avx.c: Generated.
6874 * features/i386/64bit-avx512.c: Generated.
6875 * features/i386/64bit-core.c: Generated.
6876 * features/i386/64bit-linux.c: Generated.
6877 * features/i386/64bit-mpx.c: Generated.
6878 * features/i386/64bit-pkeys.c: Generated.
6879 * features/i386/64bit-segments.c: Generated.
6880 * features/i386/64bit-sse.c: Generated.
6881 * features/i386/x32-core.c: Generated.
6882 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6883 c files for amd64-linux and x32-linux.
6884
9d3d478b
YQ
68852017-09-05 Yao Qi <yao.qi@linaro.org>
6886
6887 * amd64-linux-tdep.c (amd64_linux_read_description): New
6888 function.
6889 (amd64_linux_core_read_description): Call
6890 amd64_linux_read_description.
6891 (amd64_linux_init_abi): Likewise.
6892 (amd64_x32_linux_init_abi): Likewise.
6893 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6894 * x86-linux-nat.c (x86_linux_read_description): Call
6895 amd64_linux_read_description.
6896
b9f1d50f
YQ
68972017-09-05 Yao Qi <yao.qi@linaro.org>
6898
6899 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6900 comments.
6901
188c9e6d
YQ
69022017-09-05 Yao Qi <yao.qi@linaro.org>
6903
6904 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6905 * features/i386/i386-avx-avx512-linux.c: Remove.
6906 * features/i386/i386-avx-linux.c: Remove.
6907 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6908 * features/i386/i386-avx-mpx-linux.c: Remove.
6909 * features/i386/i386-linux.c: Remove.
6910 * features/i386/i386-mmx-linux.c: Remove.
6911 * features/i386/i386-mpx-linux.c: Remove.
6912
5f035c07
YQ
69132017-09-05 Yao Qi <yao.qi@linaro.org>
6914
6915 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6916 (SFILES): Add arch/i386.c.
6917 (HFILES_NO_SRCDIR): Add arch/i386.h.
6918 * arch/i386.c: New file.
6919 * arch/i386.h: New file.
6920 * arch/tdesc.h (allocate_target_description): Declare.
6921 (set_tdesc_architecture): Declare.
6922 (set_tdesc_osabi): Declare.
6923 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6924 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6925 include arch/i386.h.
6926 (i386_linux_read_description): Remove code and call
6927 i386_create_target_description.
6928 (set_tdesc_architecture): New function.
6929 (set_tdesc_osabi): New function.
6930 * target-descriptions.h (allocate_target_description): Remove.
6931
0abe8a89
YQ
69322017-09-05 Yao Qi <yao.qi@linaro.org>
6933
6934 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6935 * target-descriptions.c (tdesc_create_feature): Likewise, and
6936 adjust code.
6937 * features/i386/32bit-avx.c: Re-generated.
6938 * features/i386/32bit-avx512.c: Re-generated.
6939 * features/i386/32bit-core.c: Re-generated.
6940 * features/i386/32bit-linux.c: Re-generated.
6941 * features/i386/32bit-mpx.c: Re-generated.
6942 * features/i386/32bit-pkeys.c: Re-generated.
6943 * features/i386/32bit-sse.c: Re-generated.
6944
0a188386
YQ
69452017-09-05 Yao Qi <yao.qi@linaro.org>
6946
6947 * regformats/regdef.h (struct reg): Override operator == and !=.
6948
f49ff000
YQ
69492017-09-05 Yao Qi <yao.qi@linaro.org>
6950
6951 * arch/tdesc.h: New file.
6952 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6953 * target-descriptions.c: Update comments.
6954 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6955 declarations.
6956 * features/i386/32bit-avx.c: Re-generated.
6957 * features/i386/32bit-avx512.c: Re-generated.
6958 * features/i386/32bit-core.c: Re-generated.
6959 * features/i386/32bit-linux.c: Re-generated.
6960 * features/i386/32bit-mpx.c: Re-generated.
6961 * features/i386/32bit-pkeys.c: Re-generated.
6962 * features/i386/32bit-sse.c: Re-generated.
6963
f7000548
YQ
69642017-09-05 Yao Qi <yao.qi@linaro.org>
6965
6966 * regformats/regdat.sh: Update generated code.
6967
c9a5e2a5
YQ
69682017-09-05 Yao Qi <yao.qi@linaro.org>
6969
6970 * regformats/regdat.sh: Adjust code order.
6971
d6b687ac
SM
69722017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6973
6974 * expprint.c (dump_subexp_body_standard): Use constant format
6975 string in fprintf_filtered call.
6976
a379bfd0
JB
69772017-09-04 John Baldwin <jhb@FreeBSD.org>
6978
6979 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6980 NetBSD/i386.
6981 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6982
f7efc967
JB
69832017-09-04 John Baldwin <jhb@FreeBSD.org>
6984
6985 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6986
c49fbc6c
JB
69872017-09-04 John Baldwin <jhb@FreeBSD.org>
6988
6989 * bsd-kvm.o: Define _KMEMUSER.
6990 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6991 * configure: Regenerate.
6992
26562e73
JB
69932017-09-04 John Baldwin <jhb@FreeBSD.org>
6994
6995 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6996 * i386-fbsd-nat.c: Likewise.
6997
31cf1487
JB
69982017-09-04 John Baldwin <jhb@FreeBSD.org>
6999
7000 * unittests/array-view-selftests.c: Add include of <array>.
7001
5b9f8a7c
JB
70022017-09-04 John Baldwin <jhb@FreeBSD.org>
7003
7004 * spu-tdep.c (flush_ea_cache): Add missing argument to
7005 call_function_by_hand.
7006
d69cf9b2
PA
70072017-09-04 Pedro Alves <palves@redhat.com>
7008
7009 * NEWS (Safer support for debugging with no debug info): New.
7010
3693fdb3
PA
70112017-09-04 Pedro Alves <palves@redhat.com>
7012
7013 * c-exp.y (function_method, function_method_void): Add current
7014 instance flags to TYPE_INSTANCE.
7015 * dwarf2read.c (check_modifier): New.
7016 (compute_delayed_physnames): Assert that only C++ adds delayed
7017 physnames. Mark fn_fields as const/volatile depending on
7018 physname.
7019 * eval.c (make_params): New type_instance_flags parameter. Use
7020 it as the new type's instance flags.
7021 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7022 flags element and pass it to make_params.
7023 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7024 instance flags element.
7025 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7026 * gdbtypes.h: Include "enum-flags.h".
7027 (type_instance_flags): New enum-flags type.
7028 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7029 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7030 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7031 (follow_type_instance_flags): New function.
7032 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7033 * parser-defs.h (follow_type_instance_flags): Declare.
7034 * valops.c (value_struct_elt_for_reference): const/volatile must
7035 match too.
7036
e68cb8e0
PA
70372017-09-04 Pedro Alves <palves@redhat.com>
7038
7039 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7040 function/method scopes; lookup the nested name as a function local
7041 static variable.
7042
858be34c
PA
70432017-09-04 Pedro Alves <palves@redhat.com>
7044
7045 (%type <voidval>): Add function_method.
7046 * c-exp.y (exp): New production for calls with no arguments.
7047 (function_method, function_method_void_or_typelist): New
7048 productions.
7049 (exp): New production for "method()::static_var".
7050 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7051 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7052 Handle OP_FUNC_STATIC_VAR.
7053 * parse.c (operator_length_standard):
7054 Handle OP_FUNC_STATIC_VAR.
7055
dd5901a6
PA
70562017-09-04 Pedro Alves <palves@redhat.com>
7057
7058 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7059 handling.
7060 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7061 Ditto.
7062 * parse.c (operator_length_standard, operator_check_standard):
7063 Ditto.
7064 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7065
46a4882b
PA
70662017-09-04 Pedro Alves <palves@redhat.com>
7067
7068 * ax-gdb.c: Include "typeprint.h".
7069 (gen_expr_for_cast): New function.
7070 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7071 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7072 type is unknown.
7073 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7074 nodebug_data_symbol.
7075 * eval.c: Include "typeprint.h".
7076 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7077 Error out if symbol has unknown type.
7078 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7079 evaluate_subexp_for_cast.
7080 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7081 OP_VAR_MSYM_VALUE.
7082 (evaluate_subexp_for_cast): New function.
7083 * gdbtypes.c (init_nodebug_var_type): New function.
7084 (objfile_type): Use it to initialize types of variables with no
7085 debug info.
7086 * typeprint.c (error_unknown_type): New.
7087 * typeprint.h (error_unknown_type): New declaration.
7088 * compile/compile-c-types.c (convert_type_basic): Handle
7089 TYPE_CODE_ERROR; warn and fallback to int for variables with
7090 unknown type.
7091
fe13dfec
PA
70922017-09-04 Pedro Alves <palves@redhat.com>
7093
7094 * eval.c (evaluate_var_value): New function, factored out from ...
7095 (evaluate_subexp_standard): ... here.
7096
d008ee21
PA
70972017-09-04 Pedro Alves <palves@redhat.com>
7098
7099 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7100 Remove useless assignments to 'op'.
7101
827d0c51
PA
71022017-09-04 Pedro Alves <palves@redhat.com>
7103
7104 * eval.c (eval_skip_value): New function.
7105 (evaluate_subexp_standard): Use it.
7106
2c5a2be1
PA
71072017-09-04 Pedro Alves <palves@redhat.com>
7108
7109 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7110 function name from symbol/minsym and pass it to
7111 error_call_unknown_return_type.
7112
74ea4be4
PA
71132017-09-04 Pedro Alves <palves@redhat.com>
7114
7115 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7116 * ax-gdb.c (gen_msym_var_ref): New function.
7117 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7118 * eval.c (evaluate_var_msym_value): New function.
7119 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7120 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7121 to call_function_by_hand.
7122 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7123 Handle OP_VAR_MSYM_VALUE.
7124 (union exp_element) <msymbol>: New field.
7125 * minsyms.h (struct type): Forward declare.
7126 (find_minsym_type_and_address): Declare.
7127 * parse.c (write_exp_elt_msym): New function.
7128 (write_exp_msymbol): Delete, refactored as ...
7129 (find_minsym_type_and_address): ... this new function.
7130 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7131 (operator_length_standard, operator_check_standard): Handle
7132 OP_VAR_MSYM_VALUE.
7133 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7134
7022349d
PA
71352017-09-04 Pedro Alves <palves@redhat.com>
7136
7137 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7138 TYPE_GNU_IFUNC specially here. Throw error if return type is
7139 unknown.
7140 * ada-typeprint.c (print_func_type): Handle functions with unknown
7141 return type.
7142 * c-typeprint.c (c_type_print_base): Handle functions and methods
7143 with unknown return type.
7144 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7145 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7146 * compile/compile-c-types.c: Include "objfiles.h".
7147 (convert_func): For functions with unknown return type, warn and
7148 default to int.
7149 * compile/compile-object-run.c (compile_object_run): Adjust call
7150 to call_function_by_hand_dummy.
7151 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7152 call_function_by_hand.
7153 * eval.c (evaluate_subexp_standard): Adjust calls to
7154 call_function_by_hand. Handle functions and methods with unknown
7155 return type. Pass expect_type to call_function_by_hand.
7156 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7157 return type.
7158 * gcore.c (call_target_sbrk): Adjust call to
7159 call_function_by_hand.
7160 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7161 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7162 an integer address type instead of nodebug.
7163 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7164 call_function_by_hand.
7165 * infcall.c (error_call_unknown_return_type): New function.
7166 (call_function_by_hand): New "default_return_type" parameter.
7167 Pass it down.
7168 (call_function_by_hand_dummy): New "default_return_type"
7169 parameter. Use it instead of defaulting to int. If there's no
7170 default and the return type is unknown, throw an error. If
7171 there's a default return type, and the called function has no
7172 debug info, then assume the function is prototyped.
7173 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7174 New "default_return_type" parameter.
7175 (error_call_unknown_return_type): New declaration.
7176 * linux-fork.c (call_lseek): Cast return type of lseek.
7177 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7178 call_function_by_hand.
7179 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7180 calls to call_function_by_hand.
7181 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7182 return type.
7183 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7184 (value_nsstring, print_object_command): Adjust calls to
7185 call_function_by_hand.
7186 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7187 functions with unknown return type.
7188 (pascal_type_print_func_varspec_suffix): New function.
7189 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7190 TYPE_CODE_METHOD>: Use it.
7191 * python/py-value.c (valpy_call): Adjust call to
7192 call_function_by_hand.
7193 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7194 call_function_by_hand.
7195 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7196 call_function_by_hand.
7197 * valops.c (value_allocate_space_in_inferior): Adjust call to
7198 call_function_by_hand.
7199 * typeprint.c (type_print_unknown_return_type): New function.
7200 * typeprint.h (type_print_unknown_return_type): New declaration.
7201
54990598
PA
72022017-09-04 Pedro Alves <palves@redhat.com>
7203
7204 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7205 types with more than one parameter as prototyped.
7206
9a24775b
PA
72072017-09-04 Pedro Alves <palves@redhat.com>
7208
7209 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7210 (disassemble_command): Use gdb_disassembly_flags instead of bare
7211 int.
7212 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7213 (dump_insns, do_mixed_source_and_assembly_deprecated)
7214 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7215 Use gdb_disassembly_flags instead of bare int.
7216 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7217 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7218 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7219 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7220 (enum gdb_disassembly_flag): ... values of this new enumeration.
7221 (gdb_disassembly_flags): Define.
7222 (gdb_disassembly)
7223 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7224 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7225 gdb_disassembly_flags instead of bare int.
7226 * record-btrace.c (btrace_insn_history)
7227 (record_btrace_insn_history, record_btrace_insn_history_range)
7228 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7229 instead of bare int.
7230 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7231 Use gdb_disassembly_flags instead of bare int.
7232 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7233 Define.
7234 * target-delegates.c: Regenerate.
7235 * target.c (target_insn_history, target_insn_history_from)
7236 (target_insn_history_range): Use gdb_disassembly_flags instead of
7237 bare int.
7238 * target.h: Include "disasm.h".
7239 (struct target_ops) <to_insn_history, to_insn_history_from,
7240 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7241 int.
7242 (target_insn_history, target_insn_history_from)
7243 (target_insn_history_range): Use gdb_disassembly_flags instead of
7244 bare int.
7245
80a65e9b
SM
72462017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7247
7248 * cli/cli-script.c (build_command_line): For if/while commands,
7249 check whether args is empty.
7250
6b66338c
SM
72512017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7252
7253 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7254 (enum command_control_type): Likewise.
7255 (struct command_line): Likewise.
7256 (free_command_lines): Likewise.
7257 (struct command_lines_deleter): Likewise.
7258 (command_line_up): Likewise.
7259 (read_command_lines): Likewise.
7260 (read_command_lines_1): Likewise.
7261 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7262 (enum command_control_type): Likewise.
7263 (struct command_line): Likewise.
7264 (free_command_lines): Likewise.
7265 (struct command_lines_deleter): Likewise.
7266 (command_line_up): Likewise.
7267 (read_command_lines): Likewise.
7268 (read_command_lines_1): Likewise.
7269 * breakpoint.h: Include cli/cli-script.h.
7270 * extension-priv.h: Likewise.
7271 * gdbcmd.h: Likewise.
7272
51abb421
PA
72732017-09-04 Pedro Alves <palves@redhat.com>
7274
7275 * ada-lang.c (is_known_support_routine): Move sal declaration to
7276 where it is initialized.
7277 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7278 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7279 (clear_command, update_static_tracepoint): Remove init_sal
7280 references. Move declarations closer to initializations.
7281 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7282 initializations.
7283 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7284 references. Move sal declarations closer to initializations.
7285 * frame.c (find_frame_sal): Return a symtab_and_line via function
7286 return instead of output parameter. Remove init_sal references.
7287 * frame.h (find_frame_sal): Return a symtab_and_line via function
7288 return instead of output parameter.
7289 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7290 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7291 instead of memset.
7292 (gdbscm_find_pc_line): Remove init_sal reference.
7293 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7294 references. Move declarations closer to initializations.
7295 * infcmd.c (set_step_frame): Update. Move declarations closer to
7296 initializations.
7297 (finish_backward): Remove init_sal references. Move declarations
7298 closer to initializations.
7299 * infrun.c (process_event_stop_test, handle_step_into_function)
7300 (insert_hp_step_resume_breakpoint_at_frame)
7301 (insert_step_resume_breakpoint_at_caller): Likewise.
7302 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7303 (symbol_to_sal): Likewise.
7304 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7305 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7306 to its initialization.
7307 * reverse.c (save_bookmark_command): Use new/delete. Remove
7308 init_sal references. Move declarations closer to initializations.
7309 * source.c (get_current_source_symtab_and_line): Remove brace
7310 initialization.
7311 (set_current_source_symtab_and_line): Now takes the sal by const
7312 reference. Remove brace initialization.
7313 (line_info): Remove init_sal reference.
7314 * source.h (set_current_source_symtab_and_line): Now takes a
7315 symtab_and_line via const reference.
7316 * stack.c (set_current_sal_from_frame): Adjust.
7317 (print_frame_info): Adjust.
7318 (get_last_displayed_sal): Return the sal via function return
7319 instead of via output parameter. Simplify.
7320 (frame_info): Adjust.
7321 * stack.h (get_last_displayed_sal): Return the sal via function
7322 return instead of via output parameter.
7323 * symtab.c (init_sal): Delete.
7324 (find_pc_sect_line): Remove init_sal references. Move
7325 declarations closer to initializations.
7326 (find_function_start_sal): Remove init_sal references. Move
7327 declarations closer to initializations.
7328 * symtab.h (struct symtab_and_line): In-class initialize all
7329 fields.
7330 * tracepoint.c (set_traceframe_context)
7331 (print_one_static_tracepoint_marker): Remove init_sal references.
7332 Move declarations closer to initializations.
7333 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7334 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7335 declarations closer to initializations.
7336 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7337 init_sal references. Adjust.
7338
6c5b2ebe
PA
73392017-09-04 Pedro Alves <palves@redhat.com>
7340
7341 * ax-gdb.c (agent_command_1): Use range-for.
7342 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7343 * breakpoint.c: Include "common/array-view.h".
7344 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7345 parameter from struct symtabs_and_lines to
7346 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7347 (breakpoint_sals_to_pc): Change sals parameter from struct
7348 symtabs_and_lines to std::vector reference.
7349 (check_fast_tracepoint_sals): Change sals parameter from struct
7350 symtabs_and_lines to std::array_view. Use range-for.
7351 (decode_static_tracepoint_spec): Return a std::vector instead of
7352 symtabs_and_lines. Update.
7353 (create_breakpoint): Update.
7354 (break_range_command, until_break_command, clear_command): Update.
7355 (base_breakpoint_decode_location, bkpt_decode_location)
7356 (bkpt_probe_create_sals_from_location)
7357 (bkpt_probe_decode_location, tracepoint_decode_location)
7358 (tracepoint_probe_decode_location)
7359 (strace_marker_create_sals_from_location): Return a std::vector
7360 instead of symtabs_and_lines.
7361 (strace_marker_create_breakpoints_sal): Update.
7362 (strace_marker_decode_location): Return a std::vector instead of
7363 symtabs_and_lines. Update.
7364 (update_breakpoint_locations): Change struct symtabs_and_lines
7365 parameters to gdb::array_view. Adjust.
7366 (location_to_sals): Return a std::vector instead of
7367 symtabs_and_lines. Update.
7368 (breakpoint_re_set_default): Use std::vector instead of struct
7369 symtabs_and_lines.
7370 (decode_location_default): Return a std::vector instead of
7371 symtabs_and_lines. Update.
7372 * breakpoint.h: Include "common/array-view.h".
7373 (struct breakpoint_ops) <decode_location>: Now returns a
7374 std::vector instead of returning a symtabs_and_lines via output
7375 parameter.
7376 (update_breakpoint_locations): Change sals parameters to use
7377 gdb::array_view.
7378 * cli/cli-cmds.c (edit_command, list_command): Update to use
7379 std::vector and gdb::array_view.
7380 (ambiguous_line_spec): Adjust to use gdb::array_view and
7381 range-for.
7382 (compare_symtabs): Rename to ...
7383 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7384 const reference and adjust.
7385 (filter_sals): Rewrite using std::vector and standard algorithms.
7386 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7387 (jump_command): Update to use std::vector.
7388 * linespec.c (struct linespec_state) <canonical_names>: Update
7389 comment.
7390 (add_sal_to_sals_basic): Delete.
7391 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7392 (decode_line_2, create_sals_line_offset)
7393 (convert_address_location_to_sals, convert_linespec_to_sals)
7394 (convert_explicit_location_to_sals, parse_linespec)
7395 (event_location_to_sals, decode_line_full, decode_line_1)
7396 (decode_line_with_current_source)
7397 (decode_line_with_last_displayed, decode_objc)
7398 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7399 (linespec_result::~linespec_result): Adjust to use std::vector
7400 instead of symtabs_and_lines.
7401 * linespec.h (linespec_sals::sals): Now a std::vector.
7402 (struct linespec_result): Use std::vector, bool, and in-class
7403 initialization.
7404 (decode_line_1, decode_line_with_current_source)
7405 (decode_line_with_last_displayed): Return std::vector.
7406 * macrocmd.c (info_macros_command): Use std::vector.
7407 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7408 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7409 std::vector.
7410 * probe.h (parse_probes): Return a std::vector.
7411 * python/python.c (gdbpy_decode_line): Use std::vector and
7412 gdb::array_view.
7413 * source.c (select_source_symtab, line_info): Use std::vector.
7414 * stack.c (func_command): Use std::vector.
7415 * symtab.h (struct symtabs_and_lines): Delete.
7416 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7417
7c44b49c
PA
74182017-09-04 Pedro Alves <palves@redhat.com>
7419
7420 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7421 unittests/array-view-selftests.c.
7422 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7423 * common/array-view.h: New file.
7424 * unittests/array-view-selftests.c: New file.
7425
e439fa14
PA
74262017-09-04 Pedro Alves <palves@redhat.com>
7427
7428 * cli/cli-cmds.c (edit_command): Pass message to
7429 ambiguous_line_spec.
7430 (list_command): Pass message to ambiguous_line_spec. Say
7431 "first"/"last" instead of "start" and "end" to be consistent with
7432 the manual.
7433 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7434 them to print formatted message.
7435
7525b645
PA
74362017-09-04 Pedro Alves <palves@redhat.com>
7437
7438 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7439 ftrace_update_insns by reference instead of pointer.
7440
badc0020
YQ
74412017-09-04 Yao Qi <yao.qi@linaro.org>
7442
7443 * i386-go32-tdep.c: Include x86-xstate.h.
7444 (i386_go32_init_abi): Call i386_target_description.
7445 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7446 if xcr0 is X86_XSTATE_X87_MASK.
7447 * i386-tdep.h (tdesc_i386): Remove the declaration.
7448 (tdesc_i386_mmx): Likewise.
7449
d78bdb54
YQ
74502017-09-04 Yao Qi <yao.qi@linaro.org>
7451
7452 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7453 X86_XSTATE_SSE_MASK instead of 0.
7454
ca1fa5ee
YQ
74552017-09-04 Yao Qi <yao.qi@linaro.org>
7456
7457 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7458 i386_target_description.
7459 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7460 i386_target_description.
7461 * i386-tdep.c (i386_gdbarch_init): Likewise.
7462
2434b019
YQ
74632017-09-04 Yao Qi <yao.qi@linaro.org>
7464
7465 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7466 (x86_darwin_init_abi_64): Call amd64_target_description.
7467 * amd64-dicos-tdep.c: Likewise.
7468 * amd64-fbsd-nat.c: Likewise.
7469 * amd64-fbsd-tdep.c: Likewise.
7470 * amd64-nbsd-tdep.c: Likewise.
7471 * amd64-obsd-tdep.c: Likewise.
7472 * amd64-sol2-tdep.c: Likewise.
7473 * amd64-windows-tdep.c: Likewise.
7474 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7475
0860c437
SM
74762017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7477
7478 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7479 (btrace_function) <insn>: Change type to use std::vector.
7480 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7481 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7482 ftrace_update_insns, ftrace_compute_global_level_offset,
7483 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7484 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7485 change to std::vector.
7486 (ftrace_update_insns): Adjust to change to std::vector, change
7487 type of INSN parameter.
7488 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7489 * record-btrace.c (btrace_call_history_insn_range,
7490 btrace_compute_src_line_range,
7491 record_btrace_frame_prev_register): Adjust to change to
7492 std::vector.
7493 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7494 to change to std::vector.
7495
0638b7f9
TT
74962017-09-03 Tom Tromey <tom@tromey.com>
7497
7498 * corefile.c (reopen_exec_file): Use std::string.
7499
8f84fb0e
TT
75002017-09-03 Tom Tromey <tom@tromey.com>
7501
7502 * compile/compile.c (compile_register_name_mangled): Return
7503 std::string.
7504 * compile/compile-loc2c.c (pushf_register_address): Update.
7505 (pushf_register): Update.
7506 * compile/compile-c-types.c (convert_array): Update.
7507 * compile/compile-c-symbols.c (generate_vla_size): Update.
7508 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7509 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7510 (convert_one_symbol): Update.
7511 (generate_c_for_for_one_variable): Update.
7512 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7513 std::string.
7514 (generate_register_struct): Update.
7515 * compile/compile-internal.h (c_get_range_decl_name): Return a
7516 std::string.
7517 (compile_register_name_mangled): Return std::string.
7518
18e9961f
TT
75192017-09-03 Tom Tromey <tom@tromey.com>
7520
7521 * utils.c (perror_string): Return a std::string.
7522 (throw_perror_with_name, perror_warning_with_name): Update.
7523
45343786
TT
75242017-09-03 Tom Tromey <tom@tromey.com>
7525
7526 * demangle.c (demangle_command): Use std::string,
7527 unique_xmalloc_ptr.
7528
b57af503
TT
75292017-09-03 Tom Tromey <tom@tromey.com>
7530
7531 * cli/cli-setshow.c (do_set_command): Use std::string.
7532
6eecf35f
TT
75332017-09-03 Tom Tromey <tom@tromey.com>
7534
7535 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7536
56496dd4
TT
75372017-09-03 Tom Tromey <tom@tromey.com>
7538
7539 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7540
e91a1fa7
TT
75412017-09-03 Tom Tromey <tom@tromey.com>
7542
7543 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7544 gdb::unique_xmalloc_ptr.
7545
7ffd83d7
TT
75462017-09-03 Tom Tromey <tom@tromey.com>
7547
7548 * thread.c (print_thread_info_1): Use string_printf.
7549 (thread_apply_command, thread_apply_all_command): Use
7550 std::string.
7551
1ccbe998
TT
75522017-09-03 Tom Tromey <tom@tromey.com>
7553
7554 * valprint.c (val_print_string): Update.
7555 * gdbcore.h (memory_error_message): Return std::string.
7556 * corefile.c (memory_error_message): Return std::string.
7557 (memory_error): Update.
7558 * breakpoint.c (insert_bp_location): Update.
7559
23fdd69e
SM
75602017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7561
7562 * target/waitstatus.h (target_waitstatus_to_string): Change
7563 return type to std::string.
7564 * target/waitstatus.c (target_waitstatus_to_string): Return
7565 std::string.
7566 * target.h (target_waitstatus_to_string): Remove declaration.
7567 * infrun.c (resume, clear_proceed_status_thread,
7568 print_target_wait_results, do_target_wait, save_waitstatus,
7569 stop_all_threads): Adjust.
7570 * record-btrace.c (record_btrace_wait): Adjust.
7571 * target-debug.h
7572 (target_debug_print_struct_target_waitstatus_p): Adjust.
7573
5c811d30
JK
75742017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7575
7576 PR gdb/22046
7577 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7578 detection.
7579
0a2dde4a
SDJ
75802017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7581
7582 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7583 for setting/unsetting environment variables on the remote target.
7584 (New remote packets): Add entries for QEnvironmentHexEncoded,
7585 QEnvironmentUnset and QEnvironmentReset.
7586 * common/environ.c (gdb_environ::operator=): Extend method to
7587 handle m_user_set_env_list and m_user_unset_env_list.
7588 (gdb_environ::clear): Likewise.
7589 (match_var_in_string): Change type of first parameter from 'char
7590 *' to 'const char *'.
7591 (gdb_environ::set): Extend method to handle
7592 m_user_set_env_list and m_user_unset_env_list.
7593 (gdb_environ::unset): Likewise.
7594 (gdb_environ::clear_user_set_env): New method.
7595 (gdb_environ::user_set_envp): Likewise.
7596 (gdb_environ::user_unset_envp): Likewise.
7597 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7598 m_user_unset_env_list on move constructor/assignment.
7599 (unset): Add new default parameter 'update_unset_list = true'.
7600 (clear_user_set_env): New method.
7601 (user_set_envp): Likewise.
7602 (user_unset_envp): Likewise.
7603 (m_user_set_env_list): New std::set.
7604 (m_user_unset_env_list): Likewise.
7605 * common/rsp-low.c (hex2str): New function.
7606 (bin2hex): New overload for bin2hex function.
7607 * common/rsp-low.c (hex2str): New prototype.
7608 (str2hex): New overload prototype.
7609 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7610 QEnvironmentUnset and QEnvironmentReset.
7611 (remote_protocol_features): Add QEnvironmentHexEncoded,
7612 QEnvironmentUnset and QEnvironmentReset packets.
7613 (send_environment_packet): New function.
7614 (extended_remote_environment_support): Likewise.
7615 (extended_remote_create_inferior): Call
7616 extended_remote_environment_support.
7617 (_initialize_remote): Add QEnvironmentHexEncoded,
7618 QEnvironmentUnset and QEnvironmentReset packet configs.
7619 * unittests/environ-selftests.c (gdb_selftest_env_var):
7620 New variable.
7621 (test_vector_initialization): New function.
7622 (test_init_from_host_environ): Likewise.
7623 (test_reinit_from_host_environ): Likewise.
7624 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7625 Likewise.
7626 (test_unset_set_empty_vector): Likewise.
7627 (test_vector_clear): Likewise.
7628 (test_std_move): Likewise.
7629 (test_move_constructor):
7630 (test_self_move): Likewise.
7631 (test_set_unset_reset): Likewise.
7632 (run_tests): Rewrite in terms of the functions above.
7633
654670a4
WP
76342017-08-31 Weimin Pan <weimin.pan@oracle.com>
7635
7636 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7637 (adi_available): Use a temp variable of type CORE_ADDR as argument
7638 3 when calling target_auxv_search.
7639 (adi_normalize_address): Use masks and xor operators to calculate
7640 normalized address.
7641 (adi_read_versions, adi_write_versions, adi_print_versions)
7642 (do_examine, do_assign): Use paddress.
7643
7755ddb7
JB
76442017-08-29 John Baldwin <jhb@FreeBSD.org>
7645
7646 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7647 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7648 out of loop and add supply of FIR.
7649 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7650 add collect of FIR.
7651
fd437cbc
SM
76522017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7653
3804a343 7654 PR gdb/21827
fd437cbc
SM
7655 * cli/cli-script.c (define_command): Don't convert command name
7656 to lower case.
7657
988f6b3d
JB
76582017-08-25 Joel Brobecker <brobecker@adacore.com>
7659
7660 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7661 Update all callers accordingly. Remove all code blocks handling
7662 the case where DISPP is not NULL.
7663
663c44ac
JK
76642017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7665
7666 PR symtab/22003
7667 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7668 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7669 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7670
f1902523
JK
76712017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7672
7673 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7674 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7675 (read_comp_units_from_section): New parameter abbrev_section, use
7676 read_and_check_comp_unit_head, allocate signatured_type if needed.
7677 (create_all_comp_units): Update read_comp_units_from_section caller.
7678
87215ad1
SDJ
76792017-08-23 Pedro Alves <palves@redhat.com>
7680
7681 PR remote/21852
7682 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7683 to null_ptid and switch to thread without reading the registers
7684 after adding the inferior.
7685
6e41ddec
JK
76862017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7687
7688 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7689 compile-gcc.
7690 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7691 (compile_to_object): Implement compile_gcc.
7692 (_initialize_compile): Install "set compile-gcc". Initialize
7693 compile_gcc.
7694
e68c32d5
JK
76952017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7696
7697 * compile/compile.c (compile_to_object): Conditionally call
7698 set_verbose. Conditionally call compile or compile_v0.
7699
58afddc6
WP
77002017-08-07 Weimin Pan <weimin.pan@oracle.com>
7701
7702 * sparc64-tdep.h: (adi_normalize_address): New export.
7703 * sparc-nat.h: (open_adi_tag_fd): New export.
7704 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7705 * sparc64-linux-tdep.c:
7706 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7707 (sparc64_linux_handle_segmentation_fault): New function.
7708 (sparc64_linux_init_abi): Register
7709 sparc64_linux_handle_segmentation_fault
7710 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7711 (sparc64_addr_bits_remove): New function.
7712 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7713 (MAX_PROC_NAME_SIZE): New macro.
7714 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7715 (sparc64adilist): New variable.
7716 (adi_proc_list): New variable.
7717 (find_adi_info): New function.
7718 (add_adi_info): New function.
7719 (get_adi_info_proc): New function.
7720 (get_adi_info): New function.
7721 (info_adi_command): New function.
7722 (read_maps_entry): New function.
7723 (adi_available): New function.
7724 (adi_normalize_address): New function.
7725 (adi_align_address): New function.
7726 (adi_convert_byte_count): New function.
7727 (adi_tag_fd): New function.
7728 (adi_is_addr_mapped): New function.
7729 (adi_read_versions): New function.
7730 (adi_write_versions): New function.
7731 (adi_print_versions): New function.
7732 (do_examine): New function.
7733 (do_assign): New function.
7734 (adi_examine_command): New function.
7735 (adi_assign_command): New function.
7736 (_initialize_sparc64_adi_tdep): New function.
7737
11db9430
SM
77382017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7739
7740 * breakpoint.c (breakpoints_info): Rename to ...
7741 (info_breakpoints_command): ... this.
7742 (watchpoints_info): Rename to ...
7743 (info_watchpoints_command): ... this.
7744 (tracepoints_info): Rename to ...
7745 (info_tracepoints_command): ... this.
7746 (_initialize_breakpoint): Adjust.
7747 * dcache.c (dcache_info): Rename to ...
7748 (info_display_command): ... this.
7749 (_initialize_dcache): Adjust.
7750 * frame.h (args_info): Rename to ...
7751 (info_args_command): ... this.
7752 (locals_info): Rename to ...
7753 (info_locals_command): ... this.
7754 * infcmd.c (nofp_registers_info): Rename to ...
7755 (info_registers_command): ... this.
7756 (float_info): Rename to ...
7757 (info_float_command): ... this.
7758 (program_info): Rename to ...
7759 (info_program_command): ... this.
7760 (all_registers_info): Rename to ...
7761 (info_all_registers_command): ... this.
7762 (vector_info): Rename to ...
7763 (info_vector_command): ... this.
7764 (float_info): Rename to ...
7765 (info_float_command): ... this.
7766 (_initialize_infcmd): Adjust.
7767 * inferior.h (term_info): Rename to ...
7768 (info_terminal_command): ... this.
7769 * inflow.c (term_info): Rename to ...
7770 (info_terminal_command): ... this.
7771 (_initialize_inflow): Adjust.
7772 * infrun.c (signals_info): Rename to ...
7773 (info_signals_command): ... this.
7774 (_initialize_infrun): Adjust.
7775 * objc-lang.c (classes_info): Rename to ...
7776 (info_classes_command): ... this.
7777 (selectors_info): Rename to ...
7778 (info_selectors_command): ... this.
7779 (_initialize_objc_language): Adjust.
7780 * printcmd.c (sym_info): Rename to ...
7781 (info_symbol_command): ... this.
7782 (address_info): Rename to ...
7783 (info_address_command): ... this.
7784 (display_info): Rename to ...
7785 (info_display_command): ... this.
7786 (_initialize_printcmd): Adjust.
7787 * reverse.c (bookmarks_info): Rename to ...
7788 (info_breakpoints_command): ... this.
7789 (_initialize_reverse): Adjust.
7790 * ser-go32.c (dos_info): Rename to ...
7791 (info_serial_command): ... this.
7792 (_initialize_ser_dos): Adjust.
7793 * skip.c (skip_info): Rename to ...
7794 (info_skip_command): ... this.
7795 (_initialize_step_skip): Adjust.
7796 * source.c (line_info): Rename to ...
7797 (info_line_command): ... this.
7798 (source_info): Rename to ...
7799 (info_source_command)
7800 * stack.c (frame_info): Rename to ...
7801 (info_frame_command): ... this.
7802 (locals_info): Rename to ...
7803 (info_locals_command): ... this.
7804 (args_info): Rename to ...
7805 (info_args_command): ... this.
7806 (_initialize_stack): Adjust.
7807 * symtab.c (sources_info): Rename to ...
7808 (info_sources_command): ... this.
7809 (variables_info): Rename to ...
7810 (info_variables_command): ... this.
7811 (functions_info): Rename to ...
7812 (info_functions_command): ... this.
7813 (types_info): Rename to ...
7814 (info_types_command): ... this.
7815 (_initialize_symtab): Adjust.
7816 * target.c (target_info): Rename to ...
7817 (info_target_command): ... this.
7818 (initialize_targets): Adjust.
7819 * tracepoint.c (tvariables_info): Rename to ...
7820 (info_tvariables_command): ... this.
7821 (scope_info): Rename to ...
7822 (info_scope_command): ... this.
7823 (trace_dump_actions): Adjust.
7824 (_initialize_tracepoint): Adjust.
7825
b270e6f9
TT
78262017-08-22 Tom Tromey <tom@tromey.com>
7827
7828 * breakpoint.h (install_breakpoint): Update.
7829 * breakpoint.c (add_solib_catchpoint): Update.
7830 (install_breakpoint): Change argument to a std::unique_ptr.
7831 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7832 (create_breakpoint_sal, create_breakpoint): Update.
7833 (watch_command_1, catch_exec_command_1)
7834 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7835 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7836 Return the breakpoint.
7837 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7838 (new_single_step_breakpoint): Update.
7839 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7840 std::unique_ptr.
7841 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7842 std::unique_ptr.
7843 * break-catch-sig.c (create_signal_catchpoint): Use
7844 std::unique_ptr.
7845 * ada-lang.c (create_ada_exception_catchpoint): Use
7846 std::unique_ptr.
7847
36bd8eaa
TT
78482017-08-22 Tom Tromey <tom@tromey.com>
7849
7850 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7851
56f37645
TT
78522017-08-22 Tom Tromey <tom@tromey.com>
7853
7854 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7855 (lookup_partial_symbol): Update.
7856
0b581c69
TT
78572017-08-22 Tom Tromey <tom@tromey.com>
7858
7859 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7860 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7861 (find_and_open_source, symtab_to_fullname): Update.
7862 * psymtab.c (psymtab_to_fullname): Update.
7863
14278e1f
TT
78642017-08-22 Tom Tromey <tom@tromey.com>
7865
7866 * exec.c (exec_file_attach): Update.
7867 * linux-thread-db.c (try_thread_db_load): Update.
7868 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7869 * utils.c (gdb_realpath): Change return type.
7870 (gdb_realpath_keepfile): Update.
7871 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7872 (_initialize_utils): Register the new self test.
7873 * source.c (openp): Update.
7874 (find_and_open_source): Update.
7875 * nto-tdep.c (nto_find_and_open_solib): Update.
7876 * main.c (set_gdb_data_directory): Update.
7877 (captured_main_1): Update.
7878 * dwarf2read.c (dwarf2_get_dwz_file): Update
7879 (dw2_map_symbol_filenames): Update.
7880 * auto-load.c (auto_load_safe_path_vec_update): Update.
7881 (filename_is_in_auto_load_safe_path_vec): Change type of
7882 "filename_realp".
7883 (auto_load_objfile_script): Update.
7884 (file_is_auto_load_safe): Update. Use std::string.
7885 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7886
4971c9a7
TT
78872017-08-22 Tom Tromey <tom@tromey.com>
7888
7889 * utils.c (gdb_realpath_keepfile): Return a
7890 gdb::unique_xmalloc_ptr.
7891 * exec.c (exec_file_attach): Update.
7892 * utils.h (gdb_realpath_keepfile): Return a
7893 gdb::unique_xmalloc_ptr.
7894
e3e41d58
TT
78952017-08-22 Tom Tromey <tom@tromey.com>
7896
7897 * compile/compile.c (compile_file_command): Use
7898 gdb::unique_xmalloc_ptr, std::string.
7899 * utils.c (gdb_abspath): Change return type.
7900 * source.c (openp): Update.
7901 * objfiles.c (allocate_objfile): Update.
7902 * main.c (set_gdb_data_directory): Update.
7903 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7904
0d999a6e
ZZ
79052017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7906
7907 * cli-cmds.c (list_commands): List actual code around more than
7908 one location.
7909
329d5e7e
JB
79102017-08-21 John Baldwin <jhb@FreeBSD.org>
7911
7912 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7913
bf223d3e
PA
79142017-08-21 Pedro Alves <palves@redhat.com>
7915
7916 PR gdb/19487
7917 * c-exp.y (variable production): Handle function aliases.
7918 * minsyms.c (msymbol_is_text): New function.
7919 * minsyms.h (msymbol_is_text): Declare.
7920 * symtab.c (find_function_alias_target): New function.
7921 * symtab.h (find_function_alias_target): Declare.
7922
c973d0aa
PA
79232017-08-21 Pedro Alves <palves@redhat.com>
7924
7925 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7926 typedefs.
7927 * typeprint.c (whatis_exp): If handling "whatis", and expression
7928 is OP_TYPE, strip one typedef level. Otherwise don't strip
7929 typedefs here.
7930 * valops.c (value_cast): Save "to" type before resolving
7931 stubs/typedefs. Use that type as resulting value's type.
7932
2989a365
TT
79332017-08-18 Tom Tromey <tom@tromey.com>
7934 Pedro Alves <palves@redhat.com>
7935
7936 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7937 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7938 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7939 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7940 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7941 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7942 (linux_get_siginfo_data): Add "thread" argument. Use
7943 scoped_restore.
7944 * linux-nat.c (linux_child_follow_fork)
7945 (check_stopped_by_watchpoint): Use scoped_restore.
7946 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7947 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7948 (restore_inferior_ptid, save_inferior_ptid): Remove.
7949 * btrace.c (btrace_fetch): Use scoped_restore.
7950 * bsd-uthread.c (bsd_uthread_fetch_registers)
7951 (bsd_uthread_store_registers): Use scoped_restore.
7952 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7953 scoped_restore.
7954 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7955 (aix_thread_xfer_partial): Use scoped_restore.
7956 * inferior.h (save_inferior_ptid): Remove.
7957
e60eb288
YQ
79582017-08-18 Yao Qi <yao.qi@linaro.org>
7959
7960 PR tdep/21818
7961 * arm-tdep.c (gdb_print_insn_arm): Mark
7962 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7963
6d580b63
YQ
79642017-08-18 Yao Qi <yao.qi@linaro.org>
7965
7966 * NEWS: Mention GDBserver's new option "--selftest".
7967 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7968 * selftest.c: Move it to common/selftest.c.
7969 * selftest.h: Move it to common/selftest.h.
7970 * selftest-arch.c (reset): New function.
7971 (tests_with_arch): Call reset.
7972
86dcbf50
YQ
79732017-08-18 Yao Qi <yao.qi@linaro.org>
7974
7975 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7976 instead of exception_fprintf and printf_filtered.
7977
7649770c
YQ
79782017-08-18 Yao Qi <yao.qi@linaro.org>
7979
7980 * selftest.c (register_self_test): Rename it to
7981 selftests::register_test.
7982 (run_self_tests): selftest::run_tests.
7983 * selftest.h: Update declarations.
7984 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7985 selftests::register_test_foreach_arch.
7986 * selftest-arch.h: Update declaration.
7987 * aarch64-tdep.c: Update.
7988 * arm-tdep.c: Likewise.
7989 * disasm-selftests.c: Likewise.
7990 * dwarf2loc.c: Likewise.
7991 * dwarf2-frame.c: Likewise.
7992 * findvar.c: Likewise.
7993 * gdbarch-selftests.c: Likewise.
7994 * maint.c (maintenance_selftest): Likewise.
7995 * regcache.c: Likewise.
7996 * rust-exp.y: Likewise.
7997 * selftest-arch.c: Likewise.
7998 * unittests/environ-selftests.c: Likewise.
7999 * unittests/function-view-selftests.c: Likewise.
8000 * unittests/offset-type-selftests.c: Likewise.
8001 * unittests/optional-selftests.c: Likewise.
8002 * unittests/scoped_restore-selftests.c: Likewise.
8003 * utils-selftests.c: Likewise.
8004
b0cba12e
PA
80052017-08-17 Pedro Alves <palves@redhat.com>
8006
8007 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8008 local.
8009
4c8aa72d
PA
80102017-08-17 Pedro Alves <palves@redhat.com>
8011
8012 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8013 field.
8014 (reset_die_in_process): Delete, replaced by ...
8015 (process_die_scope): ... this new class. Make it responsible for
8016 freeing cu->line_header too.
8017 (process_die): Use process_die_scope.
8018 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8019 cu->line_header_die_owner. Don't release the line header if it's
8020 owned by the CU.
8021 (setup_type_unit_groups): Make the CU/DIE own the line header.
8022 Don't release the line header here.
8023
ba713918
AL
80242017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8025
8026 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8027
44d0fb3a
RK
80282017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8029
8030 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8031 Single-Key mode
8032
a5afdb16
RK
80332017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8034
8035 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8036 mode command list.
8037
47613aeb
SH
80382017-08-15 Stafford Horne <shorne@gmail.com>
8039
8040 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8041
9c3cc999
SH
80422017-08-15 Stafford Horne <shorne@gmail.com>
8043
8044 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8045
206726fb
SDJ
80462017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8047
8048 PR gdb/21954
8049 * infcmd.c (unset_environment_command): Use the 'clear' method on
8050 the environment instead of resetting it.
8051
0335ac6d
JB
80522017-08-15 John Baldwin <jhb@FreeBSD.org>
8053
8054 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8055 platforms.
8056
d3abe1c8
TT
80572017-08-14 Tom Tromey <tom@tromey.com>
8058
8059 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8060 (print_binary_chars): Likewise.
8061 (BITS_IN_BYTES): Remove.
8062
d6382fff
TT
80632017-08-14 Tom Tromey <tom@tromey.com>
8064
8065 PR gdb/21675
8066 * valprint.c (LOW_ZERO): Change value to 034.
8067 (print_octal_chars): Add static_asserts for octal constants.
8068 * printcmd.c (print_scalar_formatted): Add 'd' case.
8069
f978cb06
TT
80702017-08-11 Tom Tromey <tom@tromey.com>
8071
8072 * symfile.c (add_symbol_file_command): Use std::vector.
8073
2f5404b3
TT
80742017-08-14 Tom Tromey <tom@tromey.com>
8075
8076 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8077 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8078 std::move.
8079 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8080
de7985c3
PA
80812017-08-11 Pedro Alves <palves@redhat.com>
8082
8083 * infrun.c (process_event_stop_test): Adjust
8084 function_name_is_marked_for_skip call.
8085 * skip.c: Include <list>.
8086 (skiplist_entry): Make it a class with private fields, and
8087 getters/setters.
8088 (skiplist_entry_chain): Delete.
8089 (skiplist_entries): New.
8090 (skiplist_entry_count): Delete.
8091 (highest_skiplist_entry_num): New.
8092 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8093 (add_skiplist_entry): Delete.
8094 (skiplist_entry::skiplist_entry): New.
8095 (skiplist_entry::add_entry): New.
8096 (skip_file_command, skip_function): Adjust.
8097 (compile_skip_regexp): Delete.
8098 (skip_command): Don't compile regexp here. Adjust to use
8099 skiplist_entry::add_entry.
8100 (skip_info): Adjust to use range-for and getters.
8101 (skip_enable_command, skip_disable_command): Adjust to use
8102 range-for and setters.
8103 (skip_delete_command): Adjust to use std::list.
8104 (add_skiplist_entry): Delete.
8105 (skip_file_p): Delete, refactored as ...
8106 (skiplist_entry::do_skip_file_p): ... this new method.
8107 (skip_gfile_p): Delete, refactored as ...
8108 (skiplist_entry::do_gskip_file_p): ... this new method.
8109 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8110 (skiplist_entry::skip_function_p): ... this new method.
8111 (function_name_is_marked_for_skip): Now returns bool, and takes
8112 the function sal by const reference. Adjust to use range-for and
8113 skiplist_entry methods.
8114 (_initialize_step_skip): Remove references to
8115 skiplist_entry_chain, skiplist_entry_count.
8116 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8117 takes the function sal by const reference.
8118
be7d3cd5
YQ
81192017-08-11 Yao Qi <yao.qi@linaro.org>
8120
8121 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8122 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8123 (dwarf2_frame_cache):
8124 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8125 RETURN_MASK_ALL and set *this_case to NULL.
8126 * frame-unwind.h: Update comments.
8127
1c90d9f0
YQ
81282017-08-11 Yao Qi <yao.qi@linaro.org>
8129
8130 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8131 (dwarf2_frame_state_copy_regs): Remove.
8132 (dwarf2_frame_state_free_regs): Remove.
8133 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8134 (dwarf2_restore_rule): Call method .alloc_regs instead of
8135 dwarf2_frame_state_alloc_regs.
8136 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8137 constructor. Call std::move.
8138 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8139 (dwarf2_frame_cache): Likewise.
8140
8141 [GDB_SELF_TEST]: Include selftest.h and
8142 selftest-arch.h.
8143 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8144 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8145 execute_cfa_program_test.
8146
8147 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8148 copy ctor, assignment operator, move assignment.
8149 <alloc_regs>: New method.
8150 <swap>: New method.
8151 (struct dwarf2_frame_state): Delete dtor.
8152 (dwarf2_frame_state_alloc_regs): Remove declaration.
8153 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8154 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8155
afe37d6b
YQ
81562017-08-11 Yao Qi <yao.qi@linaro.org>
8157
8158 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8159 (dwarf2_frame_state::dwarf2_frame_state): New.
8160 (dwarf2_frame_state::~dwarf2_frame_state): New.
8161 (dwarf2_fetch_cfa_info): Update.
8162 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8163 rather than a pointer. Update code.
8164 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8165 dtor.
8166 <data_align, code_align, retaddr_column>: Change them to const.
8167 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8168 to bool.
8169
b348037f
YQ
81702017-08-11 Yao Qi <yao.qi@linaro.org>
8171
8172 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8173 <loc.exp>: New field.
8174 * dwarf2-frame.c (execute_cfa_program): Update.
8175 (dwarf2_frame_prev_register): Update.
8176
e7c9de26
PA
81772017-08-10 Pedro Alves <palves@redhat.com>
8178
8179 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8180
e8c6b620
JB
81812017-08-09 John Baldwin <jhb@FreeBSD.org>
8182
8183 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8184 (fbsd_pending_children): Use std::list.
8185 (fbsd_remember_child): Likewise.
8186 (fbsd_is_child_pending): Likewise.
8187 (fbsd_pending_vfork_done): Use std::forward_list.
8188 (fbsd_add_vfork_done): Likewise.
8189 (fbsd_is_vfork_done_pending): Likewise.
8190 (fbsd_next_vfork_done): Likewise.
8191
e4a26669
JB
81922017-08-09 John Baldwin <jhb@FreeBSD.org>
8193
8194 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8195 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8196 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8197 for `mapfilename'.
8198 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8199 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8200
142311d3
JB
82012017-08-09 John Baldwin <jhb@FreeBSD.org>
8202
8203 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8204 "filestuff.h".
8205 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8206
42fa2e0e
TT
82072017-08-09 Tom Tromey <tom@tromey.com>
8208
8209 * skip.c (skiplist_entry): New constructor.
8210 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8211 (skiplist_entry::file_is_glob): Now bool.
8212 (skiplist_entry::file, skiplist_entry::function): Now
8213 std::string.
8214 (make_skip_entry): Return a unique_ptr. Use new.
8215 (free_skiplist_entry, free_skiplist_entry_cleanup)
8216 (make_free_skiplist_entry_cleanup): Remove.
8217 (skip_command, skip_disable_command, add_skiplist_entry)
8218 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8219 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8220 (function_name_is_marked_for_skip): Update.
8221 (skip_delete_command): Update. Use delete.
8222
cd3af38d
JW
82232017-08-09 Jiong Wang <jiong.wang@arm.com>
8224
8225 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8226 (aarch64_linux_core_read_description): New function.
8227 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8228
29592bde
PA
82292017-08-09 Pedro Alves <palves@redhat.com>
8230
8231 * cp-name-parser.y (cp_comp_to_string): Return a
8232 gdb::unique_xmalloc_ptr<char>.
8233 * cp-support.c (replace_typedefs_qualified_name)
8234 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8235 (cp_canonicalize_string_full): Use op= instead of explicit
8236 convertion.
8237 (cp_class_name_from_physname, method_name_from_physname)
8238 (cp_func_name, cp_remove_params): Adjust to use
8239 gdb::unique_xmalloc_ptr<char>.
8240 * cp-support.h (cp_comp_to_string): Return a
8241 gdb::unique_xmalloc_ptr<char>.
8242 * python/py-type.c (typy_lookup_type): Adjust to use
8243 gdb::unique_xmalloc_ptr<char>.
8244
b3340438
L
82452017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8246
8247 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8248
e88e8651
YQ
82492017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8250 Yao Qi <yao.qi@linaro.org>
8251
8252 * cp-support.c (cp_canonicalize_string_full): Use
8253 gdb::unique_xmalloc_ptr<char>.
8254 (cp_canonicalize_string): Likewise.
8255
f5a29eb0
YQ
82562017-08-09 Yao Qi <yao.qi@linaro.org>
8257
8258 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8259 * regformats/i386/amd64-avx-avx512.dat: Remove.
8260 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8261 * regformats/i386/amd64-avx-mpx.dat:Remove.
8262 * regformats/i386/amd64-avx.dat: Remove.
8263 * regformats/i386/amd64-mpx.dat: Remove.
8264 * regformats/i386/i386-avx-avx512.dat: Remove.
8265 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8266 * regformats/i386/i386-avx-mpx.dat: Remove.
8267 * regformats/i386/i386-mmx.dat: Remove.
8268 * regformats/i386/i386-mpx.dat: Remove.
8269
57757c2f
YQ
82702017-08-09 Yao Qi <yao.qi@linaro.org>
8271
8272 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8273 * amd64-tdep.c: Don't include features/i386/x32*.c.
8274 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8275 functions.
8276 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8277 and i386/x32-avx-avx512.
8278 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8279 and i386/x32.xml.
8280 * features/i386/x32-avx-avx512.c: Removed.
8281 * features/i386/x32-avx-avx512.xml: Removed.
8282 * features/i386/x32-avx.c: Removed.
8283 * features/i386/x32-avx.xml: Removed.
8284 * features/i386/x32.c: Removed.
8285 * features/i386/x32.xml: Removed.
8286 * regformats/i386/x32-avx-avx512.dat: Removed.
8287 * regformats/i386/x32-avx.dat: Removed.
8288 * regformats/i386/x32.dat: Removed.
8289
ba7b109b
MR
82902017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8291
8292 PR breakpoints/21886
8293 * mem-break.c (default_memory_insert_breakpoint): Use
8294 `->placed_address' rather than `->reqstd_address' for the
8295 breakpoint location.
8296
e347efc3
MR
82972017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8298
8299 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8300 assertions.
8301
0dba2a6c
MR
83022017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8303
8304 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8305 a union of `tdep_info', `tdesc_data' and `id'.
8306 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8307 rather than `info.tdep_info'.
8308 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8309 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8310 * i386-tdep.c (i386_gdbarch_init): Likewise.
8311 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8312 * mips-tdep.c (mips_gdbarch_init): Likewise.
8313 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8314 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8315 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8316 `info.tdep_info'.
8317 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8318 `info.tdep_info'.
8319 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8320 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8321 `info.tdep_info'.
8322 * spu-tdep.c (spu_gdbarch_init): Likewise.
8323 * gdbarch.h: Regenerate.
8324
16eb6b2d
LS
83252017-08-07 Leszek Swirski <leszeks@google.com>
8326
7b005726 8327 PR symtab/20899
16eb6b2d
LS
8328 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8329
74cbb09e
SM
83302017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8331
8332 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8333 (gdbsim_open): Rename gdb_argv args object to argv.
8334
ee0c3293
TT
83352017-08-05 Tom Tromey <tom@tromey.com>
8336
8337 * compile/compile-object-load.c (compile_object_load): Use
8338 gdb::unique_xmalloc_ptr.
8339 * cli/cli-dump.c (scan_filename): Rename from
8340 scan_filename_with_cleanup. Change return type.
8341 (scan_expression): Rename from scan_expression_with_cleanup.
8342 Change return type.
8343 (dump_memory_to_file, dump_value_to_file, restore_command):
8344 Use gdb::unique_xmalloc_ptr. Update.
8345 * cli/cli-cmds.c (find_and_open_script): Use
8346 gdb::unique_xmalloc_ptr.
8347 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8348 * symmisc.c (maintenance_print_symbols)
8349 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8350 * symfile.c (symfile_bfd_open, generic_load)
8351 (add_symbol_file_command, remove_symbol_file_command): Use
8352 gdb::unique_xmalloc_ptr.
8353 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8354 * psymtab.c (maintenance_print_psymbols): Use
8355 gdb::unique_xmalloc_ptr.
8356 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8357 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8358 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8359 (reload_shared_libraries_1): Likewise.
8360
3232fabd
TT
83612017-08-05 Tom Tromey <tom@tromey.com>
8362
8363 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8364 (rust_op_vector, rust_set_vector): New typedefs.
8365 (current_parser): New global.
8366 (work_obstack): Change to pointer type. Update all users.
8367 (rust_ast, pstate): Remove globals.
8368 (struct rust_parser): New.
8369 (%union) <params, field_inits>: Change type.
8370 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8371 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8372 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8373 (convert_params_to_types, convert_params_to_expression): Change
8374 type of "params".
8375 (ast_string): Change type of "fields".
8376 (rust_parse): Make a rust_parser. Remove cleanups.
8377 (rust_lex_tests): Make and install an auto_obstack.
8378
f02fd774
YQ
83792017-08-04 Yao Qi <yao.qi@linaro.org>
8380
8381 * configure.srv (ipa_x32_linux_regobj): New.
8382 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8383 instead of X86_TDESC_AVX512.
8384 (initialize_low_tracepoint): Call
8385 init_registers_x32_avx_avx512_linux.
8386
91975afd
YQ
83872017-08-04 Yao Qi <yao.qi@linaro.org>
8388
8389 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8390
2331fa3a
RK
83912017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8392
8393 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8394
744e4fe1
TT
83952017-08-03 Tom Tromey <tom@tromey.com>
8396
8397 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8398 Remove.
8399 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8400
1c034b67
TT
84012017-08-03 Tom Tromey <tom@tromey.com>
8402
8403 * python/py-param.c (compute_enum_values): Use gdb_argv.
8404
773a1edc
TT
84052017-08-03 Tom Tromey <tom@tromey.com>
8406
8407 * utils.h (struct gdb_argv_deleter): New.
8408 (gdb_argv): New class.
8409 * utils.c (gdb_argv::reset): New method.
8410 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8411 * tracefile.c (tsave_command): Use gdb_argv.
8412 * top.c (new_ui_command): Use gdb_argv.
8413 * symmisc.c (maintenance_print_symbols)
8414 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8415 * symfile.c (symbol_file_command, generic_load)
8416 (remove_symbol_file_command): Use gdb_argv.
8417 * stack.c (backtrace_command): Use gdb_argv.
8418 * source.c (add_path, show_substitute_path_command)
8419 (unset_substitute_path_command, set_substitute_path_command):
8420 Use gdb_argv.
8421 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8422 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8423 * remote.c (extended_remote_run, remote_put_command)
8424 (remote_get_command, remote_delete_command): Use gdb_argv.
8425 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8426 (gdbsim_open): Use gdb_argv.
8427 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8428 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8429 * procfs.c (procfs_info_proc): Use gdb_argv.
8430 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8431 * infrun.c (handle_command): Use gdb_argv.
8432 * inferior.c (add_inferior_command, clone_inferior_command):
8433 Use gdb_argv.
8434 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8435 * exec.c (exec_file_command): Use gdb_argv.
8436 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8437 * compile/compile.c (build_argc_argv): Use gdb_argv.
8438
0d50bde3
TT
84392017-08-03 Tom Tromey <tom@tromey.com>
8440
8441 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8442
7f968c89
TT
84432017-08-03 Tom Tromey <tom@tromey.com>
8444
8445 * python/python.c (compute_python_string): Return std::string.
8446 (gdbpy_eval_from_control_command): Update.
8447 (do_start_initialization): Use std::string.
8448 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8449 xstrprintf.
8450 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8451 xstrprintf.
8452
3c9ebddd
TT
84532017-08-03 Tom Tromey <tom@tromey.com>
8454
8455 * top.h (do_restore_instream_cleanup): Remove.
8456 * top.c (do_restore_instream_cleanup): Remove.
8457 (read_command_file): Use scoped_restore.
8458 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8459
b51b225e
TT
84602017-08-03 Tom Tromey <tom@tromey.com>
8461
8462 * cli/cli-script.c (execute_user_command)
8463 (execute_control_command): Use scoped_restore.
8464
ac991630
TT
84652017-08-03 Tom Tromey <tom@tromey.com>
8466
8467 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8468 (execute_user_command): Remove user_call_depth; use
8469 user_args_stack's size instead.
8470
898e0c8e
TT
84712017-08-03 Tom Tromey <tom@tromey.com>
8472
8473 * top.h (in_user_command): Remove.
8474 * top.c (in_user_command): Remove.
8475 * cli/cli-script.c (do_restore_user_call_depth)
8476 (execute_user_command): Update.
8477
26fcd5d7
TT
84782017-08-03 Tom Tromey <tom@tromey.com>
8479
8480 * valops.c (search_struct_method): Use gdb::byte_vector.
8481 * valarith.c (value_concat): Use std::vector.
8482 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8483 (simple_search_memory): Likewise.
8484 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8485 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8486 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8487 * elfread.c (elf_rel_plt_read): Use std::string.
8488 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8489 * cli/cli-dump.c (restore_section_callback): Use
8490 gdb::byte_vector.
8491
7c218e6c
TT
84922017-08-03 Tom Tromey <tom@tromey.com>
8493
8494 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8495
31b68d4a
TT
84962017-08-03 Tom Tromey <tom@tromey.com>
8497
8498 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8499 (tui_register_format): Use scoped_restore.
8500
2ec845e7
TT
85012017-08-03 Tom Tromey <tom@tromey.com>
8502
8503 * reverse.c (exec_direction_default): Remove.
8504 (exec_reverse_once): Use scoped_restore.
8505 * remote.c (restore_remote_timeout): Remove.
8506 (remote_flash_erase, remote_flash_write, remote_flash_done)
8507 (readchar, remote_serial_write): Use scoped_restore.
8508 * cli/cli-script.c (struct source_cleanup_lines_args)
8509 (source_cleanup_lines): Remove.
8510 (script_from_file): Use scoped_restore.
8511 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8512 (source_command): Use scoped_restore.
8513
b3bc8453
TT
85142017-08-03 Tom Tromey <tom@tromey.com>
8515
8516 * utils.h (make_cleanup_free_so): Remove.
8517 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8518 * solist.h (struct so_deleter): New.
8519 (so_list_up): New typedef.
8520 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8521
e3ad2841
TT
85222017-08-03 Tom Tromey <tom@tromey.com>
8523
8524 * utils.h (make_cleanup_restore_current_language): Remove.
8525 * utils.c (do_restore_current_language)
8526 (make_cleanup_restore_current_language): Remove.
8527 * parse.c (parse_exp_in_context_1)
8528 (parse_expression_with_language): Use
8529 scoped_restore_current_language.
8530 * mi/mi-main.c (mi_cmd_execute): Use
8531 scoped_restore_current_language.
8532 * language.h (scoped_restore_current_language): New class.
8533
b80cf838
TT
85342017-08-03 Tom Tromey <tom@tromey.com>
8535
8536 * compile/compile.c (cleanup_unlink_file): Remove.
8537 (compile_to_object): Use gdb::unlinker.
8538 (eval_compile_command): Likewise.
8539
fad0444a
TT
85402017-08-03 Tom Tromey <tom@tromey.com>
8541
8542 * utils.h (make_cleanup_fclose): Remove.
8543 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8544
6e7bc05c
TT
85452017-08-03 Tom Tromey <tom@tromey.com>
8546
8547 * top.c (open_terminal_stream): Return gdb_file_up.
8548 (new_ui_command): Update.
8549
4a45905b
TT
85502017-08-03 Tom Tromey <tom@tromey.com>
8551
8552 * source.c (print_source_lines_base, forward_search_command)
8553 (reverse_search_command): Use gdb_file_up.
8554
7cd06d6e
TT
85552017-08-03 Tom Tromey <tom@tromey.com>
8556
8557 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8558
ed166945
TT
85592017-08-03 Tom Tromey <tom@tromey.com>
8560
8561 * cli/cli-cmds.c (find_and_open_script): Change return type.
8562 Remove "streamp" and "full_path" parameters.
8563 (source_script_with_search): Update.
8564 * auto-load.c (source_script_file): Update.
8565 * cli/cli-cmds.h (find_and_open_script): Change type.
8566 (open_script): New struct.
8567
d419f42d
TT
85682017-08-03 Tom Tromey <tom@tromey.com>
8569
8570 * xml-support.c (xml_fetch_content_from_file): Update.
8571 * ui-file.c (stdio_file::open): Update.
8572 * tracefile-tfile.c (tfile_start): Update.
8573 * remote.c (remote_file_put, remote_file_get): Update.
8574 * nat/linux-procfs.c (linux_proc_get_int)
8575 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8576 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8577 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8578 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8579 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8580 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8581 * linux-nat.c (linux_proc_pending_signals): Update.
8582 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8583 (file_closer): Remove.
8584 * compile/compile.c (compile_to_object): Update.
8585 * common/filestuff.h (struct gdb_file_deleter): New.
8586 (gdb_file_up): New typedef.
8587 (gdb_fopen_cloexec): Change return type.
8588 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8589 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8590 (dump_binary_file, restore_binary_file): Update.
8591 * auto-load.c (auto_load_objfile_script_1): Update.
8592
4a2b031d
TT
85932017-08-03 Tom Tromey <tom@tromey.com>
8594
8595 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8596 (info_static_tracepoint_markers_command): Likewise.
8597 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8598 * skip.c (skip_info): Use ui_out_emit_table.
8599 * progspace.c (print_program_space): Use ui_out_emit_table.
8600 * osdata.c (info_osdata): Use ui_out_emit_table.
8601 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8602 ui_out_emit_table.
8603 * linux-thread-db.c (info_auto_load_libthread_db): Use
8604 ui_out_emit_table.
8605 * inferior.c (print_inferior): Use ui_out_emit_table.
8606 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8607 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8608 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8609 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8610 * ui-out.h (class ui_out_emit_table): New.
8611
a4f320fd
MR
86122017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8613
8614 * mips-tdep.c (mips_fpu_type_str): New function.
8615 (mips_dump_tdep): Call it.
8616
a2f1f308
MR
86172017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8618
8619 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8620 `->mips_fpu_type'.
8621
7e5ed83b
XR
86222017-07-31 Xavier Roirand <roirand@adacore.com>
8623
8624 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8625
4c9dc811
XR
86262017-07-27 Xavier Roirand <roirand@adacore.com>
8627
8628 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8629
27d41eac
YQ
86302017-07-26 Yao Qi <yao.qi@linaro.org>
8631
8632 * cli/cli-cmds.c (maintenancechecklist): New variable.
8633 * gdbcmd.h (maintenancechecklist): Declare it.
8634 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8635 Call i386_linux_read_description with different masks.
8636 * maint.c (maintenance_check_command): New function.
8637 (_initialize_maint_cmds): Call add_prefix_cmd.
8638 * target-descriptions.c (tdesc_reg): override operator != and ==.
8639 (tdesc_type): Likewise.
8640 (tdesc_feature): Likewise.
8641 (target_desc): Likewise.
8642 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8643 (maintenance_check_xml_descriptions): New function.
8644 (_initialize_target_descriptions) Add command "xml-descriptions".
8645 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8646
ea03d0d3
YQ
86472017-07-26 Yao Qi <yao.qi@linaro.org>
8648
8649 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8650 Include features/i386/32bit-*.c.
8651 (i386_linux_read_description): Generate target description if it
8652 doesn't exist.
8653 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8654 functions.
8655 * features/i386/32bit-linux.c: Re-generated.
8656 * features/i386/32bit-sse.c: Likewise.
8657 * target-descriptions.c (print_c_feature::visit): Print code to
8658 set register number if needed.
8659 (print_c_feature) <m_next_regnum>: New field.
8660
25aa13e5
YQ
86612017-07-26 Yao Qi <yao.qi@linaro.org>
8662
8663 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8664 (FEATURE_XMLFILES): New.
8665 (FEATURE_CFILES): New.
8666 New rules.
8667 (clean-cfiles): Remove generated c files.
8668 * features/i386/32bit-avx.c: Generated.
8669 * features/i386/32bit-avx512.c: Generated.
8670 * features/i386/32bit-core.c: Generated.
8671 * features/i386/32bit-linux.c: Generated.
8672 * features/i386/32bit-mpx.c: Generated.
8673 * features/i386/32bit-pkeys.c: Generated.
8674 * features/i386/32bit-sse.c: Generated.
8675 * target-descriptions.c: Include algorithm.
8676 (tdesc_element_visitor): Add method visit_end.
8677 (print_c_tdesc): Implement visit_end.
8678 (print_c_tdesc:: m_filename_after_features): Move it to
8679 protected.
8680 (print_c_feature): New class.
8681 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8682 name starts with "i386/32bit-".
8683
6eb1e6a8
YQ
86842017-07-26 Yao Qi <yao.qi@linaro.org>
8685
8686 * target-descriptions.c (tdesc_element_visitor): New class.
8687 (tdesc_element): New class.
8688 (tdesc_reg): Inherit from tdesc_element.
8689 (tdesc_reg::accept): New function.
8690 (tdesc_type): Inherit from tdesc_element.
8691 (tdesc_type::accept): New function.
8692 (tdesc_feature): Inherit from tdesc_element.
8693 (tdesc_feature::accept): New function.
8694 (target_desc): Inherit from tdesc_element.
8695 (target_desc::target_desc): New.
8696 (target_desc::~target_desc): New.
8697 (target_desc::accept): New.
8698 (allocate_target_description): Use new.
8699 (free_target_description): Use delete.
8700 (print_c_tdesc): New class.
8701 (maint_print_c_tdesc_cmd): Adjust.
8702
8703 * features/aarch64.c: Re-generated.
8704 * features/arc-arcompact.c: Re-generated.
8705 * features/arc-v2.c: Re-generated.
8706 * features/arm/arm-with-iwmmxt.c: Re-generated.
8707 * features/arm/arm-with-m.c: Re-generated.
8708 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8709 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8710 * features/arm/arm-with-neon.c: Re-generated.
8711 * features/arm/arm-with-vfpv2.c: Re-generated.
8712 * features/arm/arm-with-vfpv3.c: Re-generated.
8713 * features/i386/amd64-avx-avx512.c: Re-generated.
8714 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8715 * features/i386/amd64-avx.c: Re-generated.
8716 * features/i386/amd64-avx-linux.c: Re-generated.
8717 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8718 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8719 * features/i386/amd64-avx-mpx.c: Re-generated.
8720 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8721 * features/i386/amd64.c: Re-generated.
8722 * features/i386/amd64-linux.c: Re-generated.
8723 * features/i386/amd64-mpx.c: Re-generated.
8724 * features/i386/amd64-mpx-linux.c: Re-generated.
8725 * features/i386/i386-avx-avx512.c: Re-generated.
8726 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8727 * features/i386/i386-avx.c: Re-generated.
8728 * features/i386/i386-avx-linux.c: Re-generated.
8729 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8730 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8731 * features/i386/i386-avx-mpx.c: Re-generated.
8732 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8733 * features/i386/i386.c: Re-generated.
8734 * features/i386/i386-linux.c: Re-generated.
8735 * features/i386/i386-mmx.c: Re-generated.
8736 * features/i386/i386-mmx-linux.c: Re-generated.
8737 * features/i386/i386-mpx.c: Re-generated.
8738 * features/i386/i386-mpx-linux.c: Re-generated.
8739 * features/i386/x32-avx-avx512.c: Re-generated.
8740 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8741 * features/i386/x32-avx.c: Re-generated.
8742 * features/i386/x32-avx-linux.c: Re-generated.
8743 * features/i386/x32.c: Re-generated.
8744 * features/i386/x32-linux.c: Re-generated.
8745 * features/microblaze.c: Re-generated.
8746 * features/microblaze-with-stack-protect.c: Re-generated.
8747 * features/mips64-dsp-linux.c: Re-generated.
8748 * features/mips64-linux.c: Re-generated.
8749 * features/mips-dsp-linux.c: Re-generated.
8750 * features/mips-linux.c: Re-generated.
8751 * features/nds32.c: Re-generated.
8752 * features/nios2.c: Re-generated.
8753 * features/nios2-linux.c: Re-generated.
8754 * features/rs6000/powerpc-32.c: Re-generated.
8755 * features/rs6000/powerpc-32l.c: Re-generated.
8756 * features/rs6000/powerpc-403.c: Re-generated.
8757 * features/rs6000/powerpc-403gc.c : Re-generated.
8758 * features/rs6000/powerpc-405.c: Re-generated.
8759 * features/rs6000/powerpc-505.c: Re-generated.
8760 * features/rs6000/powerpc-601.c: Re-generated.
8761 * features/rs6000/powerpc-602.c: Re-generated.
8762 * features/rs6000/powerpc-603.c: Re-generated.
8763 * features/rs6000/powerpc-604.c: Re-generated.
8764 * features/rs6000/powerpc-64.c: Re-generated.
8765 * features/rs6000/powerpc-64l.c: Re-generated.
8766 * features/rs6000/powerpc-7400.c: Re-generated.
8767 * features/rs6000/powerpc-750.c: Re-generated.
8768 * features/rs6000/powerpc-860.c: Re-generated.
8769 * features/rs6000/powerpc-altivec32.c: Re-generated.
8770 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8771 * features/rs6000/powerpc-altivec64.c: Re-generated.
8772 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8773 * features/rs6000/powerpc-cell32l.c: Re-generated.
8774 * features/rs6000/powerpc-cell64l.c: Re-generated.
8775 * features/rs6000/powerpc-e500.c: Re-generated.
8776 * features/rs6000/powerpc-e500l.c: Re-generated.
8777 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8778 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8779 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8780 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8781 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8782 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8783 * features/rs6000/powerpc-vsx32.c: Re-generated.
8784 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8785 * features/rs6000/powerpc-vsx64.c: Re-generated.
8786 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8787 * features/rs6000/rs6000.c: Re-generated.
8788 * features/s390-linux32.c: Re-generated.
8789 * features/s390-linux32v1.c: Re-generated.
8790 * features/s390-linux32v2.c: Re-generated.
8791 * features/s390-linux64.c: Re-generated.
8792 * features/s390-linux64v1.c: Re-generated.
8793 * features/s390-linux64v2.c: Re-generated.
8794 * features/s390-te-linux64.c: Re-generated.
8795 * features/s390-tevx-linux64.c: Re-generated.
8796 * features/s390-vx-linux64.c: Re-generated.
8797 * features/s390x-linux64.c: Re-generated.
8798 * features/s390x-linux64v1.c: Re-generated.
8799 * features/s390x-linux64v2.c: Re-generated.
8800 * features/s390x-te-linux64.c: Re-generated.
8801 * features/s390x-tevx-linux64.c: Re-generated.
8802 * features/s390x-vx-linux64.c: Re-generated.
8803 * features/sparc/sparc32-solaris.c: Re-generated.
8804 * features/sparc/sparc64-solaris.c: Re-generated.
8805 * features/tic6x-c62x.c: Re-generated.
8806 * features/tic6x-c62x-linux.c: Re-generated.
8807 * features/tic6x-c64x.c: Re-generated.
8808 * features/tic6x-c64x-linux.c: Re-generated.
8809 * features/tic6x-c64xp.c: Re-generated.
8810 * features/tic6x-c64xp-linux.c: Re-generated.
8811
35b4818d
YQ
88122017-07-26 Yao Qi <yao.qi@linaro.org>
8813
8814 * i386-linux-tdep.c (i386_linux_read_description): New function.
8815 (i386_linux_core_read_description): Call
8816 i386_linux_read_description.
8817 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8818 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8819 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8820 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8821 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8822 * x86-linux-nat.c (x86_linux_read_description): Call
8823 i386_linux_read_description.
8824
8e2141c6
YQ
88252017-07-26 Yao Qi <yao.qi@linaro.org>
8826
8827 * NEWS: Mention it.
8828 * features/Makefile (%.c: %.xml): Pass the xml file name to
8829 command "maint print c-tdesc".
8830 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8831 name from 'arg'.
8832
b468ff4c
YQ
88332017-07-26 Yao Qi <yao.qi@linaro.org>
8834
8835 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8836 in-class initialization.
8837 (tdesc_create_feature): Call new instead of XCNEW.
8838 (free_target_description): Ue delete.
8839
b9c0e1b4
JB
88402017-07-25 John Baldwin <jhb@FreeBSD.org>
8841
8842 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8843
a04b5337
YQ
88442017-07-25 Yao Qi <yao.qi@linaro.org>
8845
8846 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8847 constant.
8848 (amd64_x32_init_abi): Likewise.
8849 * amd64-tdep.h (amd64_init_abi): Update declaration.
8850 (amd64_x32_init_abi): Likewise.
8851
02ad7fc2
YQ
88522017-07-25 Yao Qi <yao.qi@linaro.org>
8853
8854 PR tdep/21717
8855 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8856 condition for FPSCR.
8857 (arm_linux_store_inferior_registers): Likewise.
8858
b6f48cb0
TT
88592017-07-22 Tom Tromey <tom@tromey.com>
8860
8861 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8862 <syscalls_counts>: Now a std::vector.
8863 (get_catch_syscall_inferior_data): Use "new".
8864 (catch_syscall_inferior_data_cleanup): Use "delete".
8865 (insert_catch_syscall, remove_catch_syscall)
8866 (clear_syscall_counts): Update.
8867
e12c9b7a
TT
88682017-07-22 Tom Tromey <tom@tromey.com>
8869
8870 * break-catch-syscall.c (syscall_catchpoint)
8871 <syscalls_to_be_caught>: Now a std::vector<int>
8872 (~syscall_catchpoint): Remove.
8873 (insert_catch_syscall, remove_catch_syscall)
8874 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8875 (print_mention_catch_syscall, print_recreate_catch_syscall):
8876 Update.
8877 (create_syscall_event_catchpoint): Change type of "filter"
8878 parameter.
8879 (catch_syscall_split_args): Return a std::vector.
8880 (catch_syscall_command_1, catching_syscall_number_1): Update.
8881
4fa8aeac
TT
88822017-07-22 Tom Tromey <tom@tromey.com>
8883
8884 * break-catch-throw.c (struct exception_catchpoint)
8885 <exception_rx>: Now a std::string.
8886 (~exception_catchpoint): Remove.
8887 (print_one_detail_exception_catchpoint): Update.
8888 (handle_gnu_v3_exceptions): Change type of except_rx.
8889 (extract_exception_regexp): Return a std::string.
8890 (catch_exception_command_1): Update.
8891
f746a154
TT
88922017-07-22 Tom Tromey <tom@tromey.com>
8893
8894 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8895 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8896 std::vector.
8897 <catch_all>: Now a bool.
8898 (~signal_catchpoint): Remove.
8899 (signal_catchpoint_insert_location)
8900 (signal_catchpoint_remove_location)
8901 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8902 (signal_catchpoint_print_mention)
8903 (signal_catchpoint_print_recreate)
8904 (signal_catchpoint_explains_signal): Update.
8905 (create_signal_catchpoint): Change type of "filter" and
8906 "catch_all".
8907 (catch_signal_split_args): Return a std::vector. Change type of
8908 "catch_all".
8909 (catch_signal_command): Update.
8910
47e77640
PA
89112017-07-20 Pedro Alves <palves@redhat.com>
8912
8913 * ada-lang.c (ada_language_defn): Make extern.
8914 (_initialize_ada_language): Remove add_language call.
8915 * c-lang.c (c_language_defn, cplus_language_defn)
8916 (asm_language_defn, minimal_language_defn): Make extern.
8917 (_initialize_c_language): Delete.
8918 * completer.c (compare_cstrings): Delete, moved to utils.h.
8919 * d-lang.c (d_language_defn): Make extern.
8920 (_initialize_d_language): Remove add_language calls.
8921 * defs.h (enum language): Add comment.
8922 * f-lang.c (f_language_defn): Make extern.
8923 (_initialize_f_language): Remove add_language call.
8924 * go-lang.c (go_language_defn): Make extern.
8925 (_initialize_go_language): Remove add_language call.
8926 * language.c: Include <algorithm>.
8927 (languages): Redefine as const array.
8928 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8929 (set_language_command): Handle "local". Use for-range loop.
8930 (set_language): Remove loop.
8931 (language_enum): Rewrite.
8932 (language_def, language_str): Remove loops.
8933 (add_language): Delete.
8934 (add_set_language_command): New, based on add_languages.
8935 (skip_language_trampoline): Adjust.
8936 (local_language_defn): Delete.
8937 (language_gdbarch_post_init): Adjust.
8938 (_initialize_language): Remove add_language calls. Call
8939 add_set_language_command.
8940 * language.h (add_language): Delete.
8941 (auto_language_defn)
8942 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8943 (asm_language_defn, c_language_defn, cplus_language_defn)
8944 (d_language_defn, f_language_defn, go_language_defn)
8945 (m2_language_defn, objc_language_defn, opencl_language_defn)
8946 (pascal_language_defn, rust_language_defn): Declare.
8947 * m2-lang.c (m2_language_defn): Make extern.
8948 (_initialize_m2_language): Remove add_language call.
8949 * objc-lang.c (objc_language_defn): Make extern.
8950 (_initialize_objc_language): Remove add_language call.
8951 * opencl-lang.c (opencl_language_defn): Make extern.
8952 (_initialize_opencl_language): Remove add_language call.
8953 * p-lang.c (pascal_language_defn): Make extern.
8954 (_initialize_pascal_language): Delete.
8955 * rust-lang.c (rust_language_defn): Make extern.
8956 (_initialize_rust_language): Delete.
8957 * utils.h (compare_cstrings): New static inline function.
8958
edb0c9cb
PA
89592017-07-20 Pedro Alves <palves@redhat.com>
8960
8961 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8962 (get_var_value): Constify parameters.
8963 (get_int_var_value): Change prototype.
8964 (to_fixed_range_type): Adjust.
8965 * ada-lang.h (get_int_var_value): Change prototype.
8966
a778f165
PA
89672017-07-20 Pedro Alves <palves@redhat.com>
8968
8969 * dwarf2read.c (dw2_lookup_symbol): Use
8970 SYMBOL_MATCHES_SEARCH_NAME.
8971 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8972
42edd901
PA
89732017-07-20 Pedro Alves <palves@redhat.com>
8974
8975 * block.c (block_iter_name_step, block_iter_name_first)
8976 (block_iter_name_next): Delete.
8977 (block_lookup_symbol_primary): Adjust to use
8978 dict_iter_match_first/dict_iter_match_next.
8979 * block.h (block_iter_name_first, block_iter_name_next): Delete
8980 declarations.
8981 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8982 dict_iter_match_first/dict_iter_match_next.
8983
cf325299
PA
89842017-07-20 Pedro Alves <palves@redhat.com>
8985
8986 * cp-support.c (cp_find_first_component_aux): Add missing case for
8987 end of string.
8988
c5ed0576
DB
89892017-07-18 David Blaikie <dblaikie@gmail.com>
8990
8991 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8992 of dwo_cu's dwo_file.
8993
27841e76
YQ
89942017-07-18 Yao Qi <yao.qi@linaro.org>
8995
8996 * remote.c (store_registers_using_G): Remove one line comment.
8997
cfb7e58b
YQ
89982017-07-18 Yao Qi <yao.qi@linaro.org>
8999
9000 * regcache.c (regcache_cpy): Simplify it.
9001 (regcache::cpy_no_passthrough): Remove it.
9002 * regcache.h (cpy_no_passthrough): Remove it.
9003 (regcache_dup, regcache_cpy): Update comments.
9004
386535dd
PA
90052017-07-18 Pedro Alves <palves@redhat.com>
9006
9007 * remote-sim.c (sim_command_completer): Adjust to work with a
9008 completion_tracker instead of a VEC.
9009
c45ec17c
PA
90102017-07-17 Pedro Alves <palves@redhat.com>
9011
9012 * completer.c (complete_source_filenames): New function.
9013 (complete_address_and_linespec_locations): New function.
9014 (location_completer): Use complete_address_and_linespec_locations.
9015 (completion_tracker::build_completion_result): Honor the tracker's
9016 request to suppress append.
9017 * completer.h (completion_tracker::suppress_append_ws)
9018 (completion_tracker::set_suppress_append_ws): New methods.
9019 (completion_tracker::m_suppress_append_ws): New field.
9020 (complete_source_filenames): New declaration.
9021 * linespec.c (linespec_complete_what): New.
9022 (struct ls_parser) <complete_what, completion_word,
9023 completion_quote_char, completion_quote_end, completion_tracker>:
9024 New fields.
9025 (string_find_incomplete_keyword_at_end): New.
9026 (linespec_lexer_lex_string): Record quote char. If in completion
9027 mode, don't throw.
9028 (linespec_lexer_consume_token): Advance the completion word point.
9029 (linespec_lexer_peek_token): Save/restore completion info.
9030 (save_stream_and_consume_token): New.
9031 (set_completion_after_number): New.
9032 (linespec_parse_basic): Set what to complete next depending on
9033 token. Handle function and label completions specially.
9034 (parse_linespec): Disable objc shortcut in completion mode. Set
9035 what to complete next depending on token type. Skip keyword if in
9036 completion mode.
9037 (complete_linespec_component, linespec_complete): New.
9038 * linespec.h (linespec_complete): Declare.
9039
be966d42
PA
90402017-07-17 Pedro Alves <palves@redhat.com>
9041
9042 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9043 Handle 'operator<' / 'operator<<'.
9044
a2459270
PA
90452017-07-17 Pedro Alves <palves@redhat.com>
9046
9047 * completer.c (collect_explicit_location_matches): Handle
9048 MATCH_LABEL.
9049 (convert_explicit_location_to_linespec): New, factored out from
9050 ...
9051 (convert_explicit_location_to_sals): ... this.
9052 (complete_label): New.
9053 (linespec_complete_label, find_label_symbols_in_block): New.
9054 (find_label_symbols): Add completion_mode parameter and adjust to
9055 call find_label_symbols_in_block.
9056 * linespec.h (linespec_complete_label): Declare.
9057
c6756f62
PA
90582017-07-17 Pedro Alves <palves@redhat.com>
9059
9060 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9061 complete_symbol_mode parameter.
9062 * cli/cli-cmds.c (complete_command): Get the completion result out
9063 of the handle_brkchars tracker if used a custom word point.
9064 * completer.c: Include "linespec.h".
9065 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9066 (advance_to_expression_complete_word_point): New.
9067 (completion_tracker::completes_to_completion_word): New.
9068 (complete_files_symbols): Pass down
9069 complete_symbol_mode::EXPRESSION.
9070 (explicit_options, probe_options): New.
9071 (collect_explicit_location_matches): Complete on the
9072 explictit_loc->foo instead of word. Use
9073 linespec_complete_function. Handle MATCH_LINE. Handle offering
9074 keyword and options completions.
9075 (backup_text_ptr): Delete.
9076 (skip_keyword): New.
9077 (complete_explicit_location): Remove 'word' parameter. Add
9078 language, quoted_arg_start and quoted_arg_end parameters.
9079 Rewrite, parsing left to right.
9080 (location_completer): Rewrite.
9081 (location_completer_handle_brkchars): New function.
9082 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9083 (enum complete_line_internal_reason): Adjust comments.
9084 (completion_tracker::discard_completions): New.
9085 (completer_handle_brkchars_func_for_completer): Handle
9086 location_completer.
9087 (gdb_custom_word_point_brkchars)
9088 (gdb_org_rl_basic_quote_characters): New.
9089 (gdb_completion_word_break_characters_throw)
9090 (completion_find_completion_word): Handle trackers that use a
9091 custom word point.
9092 (completion_tracker::advance_custom_word_point_by): New.
9093 (completion_tracker::build_completion_result): Don't rely on
9094 readline appending the quote char.
9095 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9096 use a custom word point.
9097 (gdb_rl_attempted_completion_function): Restore
9098 rl_basic_quote_characters.
9099 * completer.h (class completion_tracker): Extend intro comment.
9100 (completion_tracker::set_quote_char)
9101 (completion_tracker::quote_char)
9102 (completion_tracker::set_use_custom_word_point)
9103 (completion_tracker::use_custom_word_point)
9104 (completion_tracker::custom_word_point)
9105 (completion_tracker::set_custom_word_point)
9106 (completion_tracker::advance_custom_word_point_by)
9107 (completion_tracker::completes_to_completion_word)
9108 (completion_tracker::discard_completions): New methods.
9109 (completion_tracker::m_quote_char)
9110 (completion_tracker::m_use_custom_word_point)
9111 (completion_tracker::m_custom_word_point): New fields.
9112 (advance_to_expression_complete_word_point): Declare.
9113 * f-lang.c (f_collect_symbol_completion_matches): Add
9114 complete_symbol_mode parameter.
9115 * language.h (struct language_defn)
9116 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9117 parameter.
9118 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9119 (linespec_complete_function): New function.
9120 (linespec_lexer_lex_keyword): Adjust.
9121 * linespec.h (linespec_keywords, linespec_complete_function): New
9122 declarations.
9123 * location.c (find_end_quote): New function.
9124 (explicit_location_lex_one): Add explicit_completion_info
9125 parameter. Save quoting info. Don't throw if being called for
9126 completion. Don't handle Ada operators here.
9127 (is_cp_operator, skip_op_false_positives, first_of)
9128 (explicit_location_lex_one_function): New function.
9129 (string_to_explicit_location): Replace 'dont_throw' parameter with
9130 an explicit_completion_info pointer parameter. Handle it. Don't
9131 use explicit_location_lex_one to lex function names. Use
9132 explicit_location_lex_one_function instead.
9133 * location.h (struct explicit_completion_info): New.
9134 (string_to_explicit_location): Replace 'dont_throw' parameter with
9135 an explicit_completion_info pointer parameter.
9136 * symtab.c (default_collect_symbol_completion_matches_break_on):
9137 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9138 (default_collect_symbol_completion_matches)
9139 (collect_symbol_completion_matches): Add complete_symbol_mode
9140 parameter.
9141 (collect_symbol_completion_matches_type): Pass down
9142 complete_symbol_mode::EXPRESSION.
9143 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9144 parameter. Handle LINESPEC mode.
9145 * symtab.h (complete_symbol_mode): New.
9146 (default_collect_symbol_completion_matches_break_on)
9147 (default_collect_symbol_completion_matches)
9148 (collect_symbol_completion_matches)
9149 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9150 parameter.
9151
1d550c82
PA
91522017-07-17 Pedro Alves <palves@redhat.com>
9153
9154 * utils.c (enum class strncmp_iw_mode): New.
9155 (strcmp_iw): Rename to ...
9156 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9157 parameters. Handle them.
9158 (strncmp_iw): New.
9159 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9160 * utils.h (strncmp_iw): Declare.
9161 (strcmp_iw): Move describing comments here.
9162
8090b426
PA
91632017-07-17 Pedro Alves <palves@redhat.com>
9164
9165 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9166 CP_OPERATOR_STR.
9167 * c-typeprint.c (is_type_conversion_operator): Use
9168 CP_OPERATOR_STR.
9169 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9170 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9171 CP_OPERATOR_LEN.
9172 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9173 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9174 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9175 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9176 CP_OPERATOR_STR.
9177 * location.c: Include "cp-support.h".
9178 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9179 CP_OPERATOR_STR.
9180 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9181 CP_OPERATOR_LEN.
9182
6a2c1b87
PA
91832017-07-17 Pedro Alves <palves@redhat.com>
9184
9185 * cli/cli-cmds.c (complete_command): Use a completion tracker
9186 along with completion_find_completion_word for handle_brkchars
9187 phase.
9188 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9189 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9190 (struct gdb_rl_completion_word_info): New.
9191 (gdb_rl_find_completion_word): New.
9192 (completion_find_completion_word): New.
9193 * completer.h (completion_find_completion_word): Declare.
9194
eb3ff9a5
PA
91952017-07-17 Pedro Alves <palves@redhat.com>
9196
9197 * ada-lang.c (symbol_completion_match): Adjust comments.
9198 (symbol_completion_add): Replace vector parameter with
9199 completion_tracker parameter. Use it.
9200 (ada_make_symbol_completion_list): Rename to...
9201 (ada_collect_symbol_completion_matches): ... this. Add
9202 completion_tracker parameter and use it.
9203 (ada_language_defn): Adjust.
9204 * break-catch-syscall.c (catch_syscall_completer): Adjust
9205 prototype and work with completion_tracker instead of VEC.
9206 * breakpoint.c (condition_completer): Adjust prototype and work
9207 with completion_tracker instead of VEC.
9208 * c-lang.c (c_language_defn, cplus_language_defn)
9209 (asm_language_defn, minimal_language_defn): Adjust to renames.
9210 * cli/cli-cmds.c (complete_command): Rework using
9211 completion_tracker. Catch exceptions when completing.
9212 * cli/cli-decode.c (integer_unlimited_completer)
9213 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9214 with completion_tracker instead of VEC.
9215 * command.h (struct completion_tracker): Forward declare.
9216 (completer_ftype, completer_handle_brkchars_ftype): Change
9217 types.
9218 (complete_on_cmdlist, complete_on_enum): Adjust.
9219 * completer.c: Include <algorithm>.
9220 (struct gdb_completer_state): New.
9221 (current_completion): New global.
9222 (readline_line_completion_function): Delete.
9223 (noop_completer, filename_completer)
9224 (filename_completer_handle_brkchars, complete_files_symbols)
9225 (linespec_location_completer): Adjust to work with a
9226 completion_tracker instead of a VEC.
9227 (string_or_empty): New.
9228 (collect_explicit_location_matches): Adjust to work with a
9229 completion_tracker instead of a VEC.
9230 (explicit_location_completer): Rename to ...
9231 (complete_explicit_location): ... this and adjust to work with a
9232 completion_tracker instead of a VEC.
9233 (location_completer): Adjust to work with a completion_tracker
9234 instead of a VEC.
9235 (add_struct_fields): Adjust to work with a completion_list instead
9236 of VEC.
9237 (expression_completer): Rename to ...
9238 (complete_expression): ... this and adjust to work with a
9239 completion_tracker instead of a VEC. Use complete_files_symbols.
9240 (expression_completer): Reimplement on top of complete_expression.
9241 (symbol_completer): Adjust to work with a completion_tracker
9242 instead of a VEC.
9243 (enum complete_line_internal_reason): Add describing comments.
9244 (complete_line_internal_normal_command): Adjust to work with a
9245 completion_tracker instead of a VEC.
9246 (complete_line_internal): Rename to ...
9247 (complete_line_internal_1): ... this and adjust to work with a
9248 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9249 handle_brkchars phase.
9250 (new_completion_tracker): Delete.
9251 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9252 complete_line_internal_1.
9253 (free_completion_tracker): Delete.
9254 (INITIAL_COMPLETION_HTAB_SIZE): New.
9255 (completion_tracker::completion_tracker)
9256 (completion_tracker::~completion_tracker): New.
9257 (maybe_add_completion): Delete.
9258 (completion_tracker::maybe_add_completion)
9259 (completion_tracker::add_completion)
9260 (completion_tracker::add_completions): New.
9261 (throw_max_completions_reached_error): Delete.
9262 (complete_line): Adjust to work with a completion_tracker instead
9263 of a VEC. Don't create a completion_tracker_t or check for max
9264 completions here.
9265 (command_completer, command_completer_handle_brkchars)
9266 (signal_completer, reg_or_group_completer_1)
9267 (reg_or_group_completer, default_completer_handle_brkchars):
9268 Adjust to work with a completion_tracker.
9269 (gdb_completion_word_break_characters_throw): New.
9270 (gdb_completion_word_break_characters): Reimplement.
9271 (line_completion_function): Delete.
9272 (completion_tracker::recompute_lowest_common_denominator)
9273 (expand_preserving_ws)
9274 (completion_tracker::build_completion_result)
9275 (completion_result::completion_result)
9276 (completion_result::completion_result)
9277 (completion_result::~completion_result)
9278 (completion_result::completion_result)
9279 (completion_result::release_match_list, compare_cstrings)
9280 (completion_result::sort_match_list)
9281 (completion_result::reset_match_list)
9282 (gdb_rl_attempted_completion_function_throw)
9283 (gdb_rl_attempted_completion_function): New.
9284 * completer.h (completion_list, struct completion_result)
9285 (class completion_tracker): New.
9286 (complete_line): Add completion_tracker parameter.
9287 (readline_line_completion_function): Delete.
9288 (gdb_rl_attempted_completion_function): New.
9289 (noop_completer, filename_completer, expression_completer)
9290 (location_completer, symbol_completer, command_completer)
9291 (signal_completer, reg_or_group_completer): Update prototypes.
9292 (completion_tracker_t, new_completion_tracker)
9293 (make_cleanup_free_completion_tracker): Delete.
9294 (enum maybe_add_completion_enum): Delete.
9295 (maybe_add_completion): Delete.
9296 (throw_max_completions_reached_error): Delete.
9297 * corefile.c (complete_set_gnutarget): Adjust to work with a
9298 completion_tracker instead of a VEC.
9299 * cp-abi.c (cp_abi_completer): Adjust to work with a
9300 completion_tracker instead of a VEC.
9301 * d-lang.c (d_language_defn): Adjust.
9302 * disasm.c (disassembler_options_completer): Adjust to work with a
9303 completion_tracker instead of a VEC.
9304 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9305 (f_collect_symbol_completion_matches): ... this. Adjust to work
9306 with a completion_tracker instead of a VEC.
9307 (f_language_defn): Adjust.
9308 * go-lang.c (go_language_defn): Adjust.
9309 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9310 Adjust to work with a completion_tracker instead of a VEC.
9311 * infrun.c (handle_completer): Likewise.
9312 * interps.c (interpreter_completer): Likewise.
9313 * interps.h (interpreter_completer): Likewise.
9314 * language.c (unknown_language_defn, auto_language_defn)
9315 (local_language_defn): Adjust.
9316 * language.h (language_defn::la_make_symbol_completion_list):
9317 Rename to ...
9318 (language_defn::la_collect_symbol_completion_matches): ... this
9319 and adjust to work with a completion_tracker instead of a VEC.
9320 * m2-lang.c (m2_language_defn): Adjust.
9321 * objc-lang.c (objc_language_defn): Adjust.
9322 * opencl-lang.c (opencl_language_defn): Adjust.
9323 * p-lang.c (pascal_language_defn): Adjust.
9324 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9325 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9326 with a completion_tracker.
9327 * rust-lang.c (rust_language_defn): Adjust.
9328 * symtab.c (free_completion_list, do_free_completion_list)
9329 (return_val, completion_tracker): Delete.
9330 (completion_list_add_name, completion_list_add_symbol)
9331 (completion_list_add_msymbol, completion_list_objc_symbol)
9332 (completion_list_add_fields, add_symtab_completions): Add
9333 completion_tracker parameter and use it.
9334 (default_make_symbol_completion_list_break_on_1): Rename to...
9335 (default_collect_symbol_completion_matches_break_on): ... this.
9336 Add completion_tracker parameter and use it instead of allocating
9337 a completion tracker here.
9338 (default_make_symbol_completion_list_break_on): Delete old
9339 implementation.
9340 (default_make_symbol_completion_list): Delete.
9341 (default_collect_symbol_completion_matches): New.
9342 (make_symbol_completion_list): Delete.
9343 (collect_symbol_completion_matches): New.
9344 (make_symbol_completion_type): Rename to ...
9345 (collect_symbol_completion_matches_type): ... this. Add
9346 completion_tracker parameter and use it instead of VEC.
9347 (make_file_symbol_completion_list_1): Rename to...
9348 (collect_file_symbol_completion_matches): ... this. Add
9349 completion_tracker parameter and use it instead of VEC.
9350 (make_file_symbol_completion_list): Delete.
9351 (add_filename_to_list): Use completion_list instead of a VEC.
9352 (add_partial_filename_data::list): Now a completion_list.
9353 (make_source_files_completion_list): Work with a completion_list
9354 instead of a VEC.
9355 * symtab.h: Include "completer.h".
9356 (default_make_symbol_completion_list_break_on)
9357 (default_make_symbol_completion_list, make_symbol_completion_list)
9358 (make_symbol_completion_type, make_file_symbol_completion_list)
9359 (make_source_files_completion_list): Delete.
9360 (default_collect_symbol_completion_matches_break_on)
9361 (default_collect_symbol_completion_matches)
9362 (collect_symbol_completion_matches)
9363 (collect_symbol_completion_matches_type)
9364 (collect_file_symbol_completion_matches)
9365 (make_source_files_completion_list): New.
9366 * top.c (init_main): Don't install a rl_completion_entry_function
9367 hook. Install a rl_attempted_completion_function hook instead.
9368 * tui/tui-layout.c (layout_completer): Adjust to work with a
9369 completion_tracker.
9370 * tui/tui-regs.c (tui_reggroup_completer):
9371 * tui/tui-win.c (window_name_completer, focus_completer)
9372 (winheight_completer): Adjust to work with a completion_tracker.
9373 * value.c: Include "completer.h".
9374 (complete_internalvar): Adjust to work with a completion_tracker.
9375 * value.h (complete_internalvar): Likewise.
9376
6e1dbf8c
PA
93772017-07-17 Pedro Alves <palves@redhat.com>
9378
9379 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9380 renames.
9381 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9382 comments to completer_ftype's declaration.
9383 <completer_handle_brkchars>: Change type to
9384 completer_handle_brkchars_ftype.
9385 * command.h (completer_ftype): Add describing comment and give
9386 names to parameters.
9387 (completer_ftype_void): Rename to ...
9388 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9389 (set_cmd_completer_handle_brkchars): Adjust.
9390 * completer.c (filename_completer_handle_brkchars): New function.
9391 (complete_line_internal_normal_command): New function, factored
9392 out from ...
9393 (complete_line_internal): ... here.
9394 (command_completer_handle_brkchars)
9395 (default_completer_handle_brkchars)
9396 (completer_handle_brkchars_func_for_completer): New functions.
9397 * completer.h (set_gdb_completion_word_break_characters): Delete
9398 declaration.
9399 (completer_handle_brkchars_func_for_completer): New declaration.
9400 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9401 completer_handle_brkchars_func_for_completer.
9402
78b13106
PA
94032017-07-17 Pedro Alves <palves@redhat.com>
9404
9405 * completer.c (symbol_completer): New function, based on
9406 make_symbol_completion_list_fn.
9407 * completer.h (symbol_completer): New declaration.
9408 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9409 * python/py-cmd.c (completers): Adjust.
9410 * symtab.c (make_symbol_completion_list_fn): Delete.
9411 * symtab.h (make_symbol_completion_list_fn): Delete.
9412 * cli/cli-decode.c (add_cmd): Adjust.
9413
bbf2f4df
PA
94142017-07-17 Pedro Alves <palves@redhat.com>
9415
9416 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9417 * dwarf2read.c: Include "filename-seen-cache.h".
9418 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9419 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9420 * filename-seen-cache.c: New file.
9421 * filename-seen-cache.h: New file.
9422 * symtab.c: Include "filename-seen-cache.h".
9423 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9424 (create_filename_seen_cache, clear_filename_seen_cache)
9425 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9426 to filename-seen-cache.h/filename-seen-cache.c.
9427 (output_source_filename, sources_info)
9428 (maybe_add_partial_symtab_filename)
9429 (make_source_files_completion_list): Adjust to use
9430 filename_seen_cache.
9431
330cdd98
PA
94322017-07-17 Pedro Alves <palves@redhat.com>
9433
9434 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9435 fields.
9436 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9437 dwarf2_debug_sections*)): New.
9438 (dwarf2_per_objfile::dwarf2_per_objfile(const
9439 dwarf2_per_objfile&)): Declare as deleted.
9440 (dwarf2_per_objfile::operator=): Declare as deleted.
9441 (dwarf2_per_objfile::dwarf2_per_objfile)
9442 (dwarf2_per_objfile::~dwarf2_per_objfile)
9443 (dwarf2_per_objfile::free_cached_comp_units): New.
9444 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9445 ctor. Call dwarf2_per_objfile's ctor manually.
9446 (dwarf2_locate_sections): Deleted/refactored as ...
9447 (dwarf2_per_objfile::locate_sections): ... this new method.
9448 (free_cached_comp_units): Defer to
9449 dwarf2_per_objfile::free_cached_comp_units.
9450 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9451
8880f2a9
TT
94522017-07-14 Tom Tromey <tom@tromey.com>
9453
9454 PR rust/21764:
9455 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9456 parameter.
9457 <UNOP_SIZEOF>: Split into separate case.
9458 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9459
65547233
TT
94602017-07-14 Tom Tromey <tom@tromey.com>
9461
9462 PR rust/21763:
9463 * symtab.c (symbol_matches_domain): Add language_rust to special
9464 case.
9465 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9466 treat LOC_TYPEDEF symbols as variables.
9467
8f14146e
PA
94682017-07-14 Pedro Alves <palves@redhat.com>
9469
9470 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9471 symtabs matching all symtabs with SRCFILE as file name instead of
9472 only considering the first hit, with lookup_symtab.
9473
2347965c
SM
94742017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9475
9476 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9477 operator_name parameters.
9478 (gen_expr): Update function call.
9479
40f4af28
SM
94802017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9481
9482 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9483 parameter.
9484 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9485 Likewise.
9486 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9487 parameter, use agent_expr::gdbarch instead, update function
9488 calls.
9489 (locexpr_tracepoint_var_ref): Likewise.
9490 (loclist_tracepoint_var_ref): Likewise.
9491 * ax-gdb.c (gen_trace_static_fields): Likewise.
9492 (gen_traced_pop): Likewise.
9493 (gen_frame_args_address): Likewise.
9494 (gen_frame_locals_address): Likewise.
9495 (gen_var_ref): Likewise.
9496 (gen_struct_ref_recursive): Likewise.
9497 (gen_static_field): Likewise.
9498 (gen_maybe_namespace_elt): Likewise.
9499 (gen_expr): Likewise.
9500 (gen_trace_for_var): Likewise.
9501 (gen_trace_for_expr): Likewise.
9502 (gen_trace_for_return_address): Likewise.
9503
053f8057
SM
95042017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9505
9506 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9507 parameter.
9508 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9509
6661ad48
SM
95102017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9511
9512 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9513 from ax, update calls.
9514 (gen_usual_arithmetic): Likewise.
9515 (gen_integral_promotions): Likewise.
9516 (gen_bitfield_ref): Likewise.
9517 (gen_primitive_field): Likewise.
9518 (gen_struct_ref_recursive): Likewise.
9519 (gen_struct_ref): Likewise.
9520 (gen_maybe_namespace_elt): Likewise.
9521 (gen_struct_elt_for_reference): Likewise.
9522 (gen_namespace_elt): Likewise.
9523 (gen_aggregate_elt_ref): Likewise.
9524 (gen_expr): Get gdbarch from ax, update calls.
9525 (gen_expr_binop_rest): Likewise.
9526
c55a47e7
PA
95272017-07-13 Pedro Alves <palves@redhat.com>
9528
9529 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9530 as default tdesc.
9531 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9532 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9533 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9534 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9535 tdep.
9536 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9537 Get final tdesc from the tdep.
9538 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9539 default tdesc.
9540 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9541 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9542 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9543 Use it as default tdesc.
9544 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9545 down to amd_init_abi. No longer handle fallback tdesc here.
9546 * amd64-tdep.h (tdesc_x32): Declare.
9547 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9548 parameter.
9549 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9550 as default tdesc.
9551
55efceab
AA
95522017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9553
9554 * s390-linux-tdep.c (s390_process_record): Add support for
9555 instructions new in arch12.
9556
0aa37b65
JB
95572017-07-11 John Baldwin <jhb@FreeBSD.org>
9558
9559 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9560 PT_GETFSBASE and PT_GETGSBASE.
9561 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9562 PT_SETGSBASE.
9563
48aeef91
JB
95642017-07-11 John Baldwin <jhb@FreeBSD.org>
9565
9566 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9567 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9568 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9569 those rules.
9570 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9571 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9572 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9573 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9574 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9575 * features/i386/amd64.xml: Add 64bit-segments.xml.
9576 * features/i386/amd64-avx-avx512.c: Regenerated.
9577 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9578 * features/i386/amd64-avx-mpx.c: Regenerated.
9579 * features/i386/amd64-avx.c: Regenerated.
9580 * features/i386/amd64-mpx.c: Regenerated.
9581 * features/i386/amd64.c: Regenerated.
9582 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9583 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9584 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9585 * regformats/i386/amd64-avx.dat: Regenerated.
9586 * regformats/i386/amd64-mpx.dat: Regenerated.
9587 * regformats/i386/amd64.dat: Regenerated.
9588
77c501bc
YQ
95892017-07-10 Yao Qi <yao.qi@linaro.org>
9590
9591 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9592 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9593
6dc8d757
AK
95942017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9595
9596 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9597 unsetenv.
9598 * gnulib/aclocal.m4: Regenerate.
9599 * gnulib/config.in: Regenerate.
9600 * gnulib/configure: Regenerate.
9601 * gnulib/import/Makefile.am: Regenerate.
9602 * gnulib/import/Makefile.in: Regenerate.
9603 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9604 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9605 * gnulib/import/m4/environ.m4: New file.
9606 * gnulib/import/m4/setenv.m4: New file.
9607 * gnulib/import/setenv.c: New file.
9608 * gnulib/import/unsetenv.c: New file.
9609
266934d1
SM
96102017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9611
9612 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9613 address when op is DW_OP_addr.
9614
03278692
TT
96152017-07-09 Tom Tromey <tom@tromey.com>
9616
9617 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9618 check and apply to outer type.
9619
4b654465
JB
96202017-07-07 John Baldwin <jhb@FreeBSD.org>
9621
9622 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9623 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9624 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9625 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9626
2af9fc44
JB
96272017-07-07 John Baldwin <jhb@FreeBSD.org>
9628
9629 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9630
382b69bb
JB
96312017-07-07 John Baldwin <jhb@FreeBSD.org>
9632
9633 * corelow.c (get_core_siginfo): Remove.
9634 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9635 instead of get_core_siginfo.
9636 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9637 * gdbarch.h: Re-generate.
9638 * gdbarch.c: Re-generate.
9639 * linux-tdep.c (linux_core_xfer_siginfo): New.
9640 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9641
6e5eab33
JB
96422017-07-07 John Baldwin <jhb@FreeBSD.org>
9643
9644 * corelow.c (thread_section_name): Move to ...
9645 * gdbcore.h (thread_section_name): ... here.
9646
929edea9
JB
96472017-07-07 John Baldwin <jhb@FreeBSD.org>
9648
9649 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9650 (struct siginfo32): New.
9651 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9652 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9653 via ptrace(PT_LWPINFO).
9654
762c974a
JB
96552017-07-07 John Baldwin <jhb@FreeBSD.org>
9656
9657 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9658 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9659 (fbsd_get_siginfo_type): New.
9660 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9661 (_initialize_fbsd_tdep): New.
9662
33c5cd75
DB
96632017-07-06 David Blaikie <dblaikie@gmail.com>
9664
9665 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9666 a singular dwo_unit*) to support multiple CUs in the same way that
9667 multiple TUs are supported.
9668 (create_cus_hash_table): Replace create_dwo_cu with a function for
9669 parsing multiple CUs from a DWO file.
9670 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9671 create_dwo_cu.
9672 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9673 htab_find, rather than comparing the signature to a singleton CU in
9674 the dwo_file.
9675
8455d262
PA
96762017-07-06 Pedro Alves <palves@redhat.com>
9677
9678 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9679
4da3eb35
PA
96802017-07-04 Pedro Alves <palves@redhat.com>
9681
9682 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9683 * gdbtypes.h (TYPE_STATIC): Delete.
9684 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9685 is_synchronized, is_native>: Delete.
9686 <dummy>: Bump.
9687 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9688 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9689 (TYPE_FN_FIELD_ABSTRACT): Delete.
9690
5bfd255c
SM
96912017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9692
9693 * buffer.h (buffer_finish): Fix spelling mistakes.
9694
25c54127
EZ
96952017-07-01 Eli Zaretskii <eliz@gnu.org>
9696
9697 * .dir-locals.el: Automatically switch to C-style comments in
9698 versions of Emacs that support the feature.
9699
dc4bde35
SDJ
97002017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9701 Pedro Alves <palves@redhat.com>
9702
9703 PR cli/21688
9704 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9705 (process_next_line): New variable 'inline_cmd'.
9706 Adjust 'if' clauses for "python", "compile" and "guile" to use
9707 'command_name_equals' and check for '!inline_cmd'.
9708
51ed89aa
SDJ
97092017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9710
9711 PR cli/21688
9712 * cli/cli-script.c (command_name_equals_not_inline): New function.
9713 (process_next_line): Adjust 'if' clauses for "python", "compile"
9714 and "guile" to use command_name_equals_not_inline.
9715
eb17d413
PA
97162017-06-29 Pedro Alves <palves@redhat.com>
9717
9718 * completer.c (expression_completer): Call
9719 linespec_location_completer instead of location_completer.
9720
195bcdd5
PA
97212017-06-29 Pedro Alves <palves@redhat.com>
9722
9723 * completer.c (expression_completer): Remove code that recomputes
9724 'text' from 'word'.
9725
adc764e7
YQ
97262017-06-29 Yao Qi <yao.qi@linaro.org>
9727
9728 * regformats/regdat.sh: Generate code with
9729 "ifndef IN_PROCESS_AGENT".
9730
6e75794e
PA
97312017-06-28 Pedro Alves <palves@redhat.com>
9732
9733 * command.h: Include "common/scoped_restore.h".
9734
bc491f2e
YQ
97352017-06-28 Yao Qi <yao.qi@linaro.org>
9736
9737 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9738 instead of obstack_grow.
9739
41664b45
DG
97402017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9741
9742 PR gdb/21337
9743 * symfile.c (reread_symbols): Call objfiles_changed just before
9744 read_symbols.
9745
6da67eb1
PA
97462017-06-27 Pedro Alves <palves@redhat.com>
9747
9748 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9749 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9750 (completion_list_add_symbol, completion_list_add_msymbol):
9751 ... these new functions.
9752 (add_symtab_completions)
9753 (default_make_symbol_completion_list_break_on_1): Adjust.
9754
23732b1e
PA
97552017-06-27 Pedro Alves <palves@redhat.com>
9756
9757 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9758 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9759 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9760 dtor.
9761 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9762 'storage_obstack' field an auto_obstack. In-class initialize all
9763 non-bitfield fields. Make minsyms_read bool.
9764 * symfile.c (read_symbols): Adjust.
9765
a4d1e79a
AH
97662017-06-27 Alan Hayward <alan.hayward@arm.com>
9767
9768 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9769 (gdbsim_store_register): Likewise.
9770
8268c778
PA
97712017-06-27 Pedro Alves <palves@redhat.com>
9772
9773 * c-exp.y (name_obstack): Now an auto_obstack.
9774 (yylex): Use auto_obstack::clear.
9775 (c_parse): Use auto_obstack::clear instead of reinitializing and
9776 freeing the obstack.
9777 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9778 * d-exp.y (name_obstack): Now an auto_obstack.
9779 (yylex): Use auto_obstack::clear.
9780 (d_parse): Use auto_obstack::clear instead of reinitializing and
9781 freeing the obstack.
9782 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9783 auto_obstack.
9784 * dwarf2read.c (create_addrmap_from_index)
9785 (dwarf2_build_psymtabs_hard)
9786 (update_enumeration_type_from_children): Likewise.
9787 * gdb_obstack.h (auto_obstack): New type.
9788 * go-exp.y (name_obstack): Now an auto_obstack.
9789 (build_packaged_name): Use auto_obstack::clear.
9790 (go_parse): Use auto_obstack::clear instead of reinitializing and
9791 freeing the obstack.
9792 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9793 auto_obstack.
9794 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9795 * rust-exp.y (work_obstack): Now an auto_obstack.
9796 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9797 reinitializing and freeing the obstack.
9798 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9799 (host_char_to_target): Use auto_obstack.
9800 * utils.h (make_cleanup_obstack_free): Delete declaration.
9801 * valprint.c (generic_emit_char, generic_printstr): Use
9802 auto_obstack.
9803
db665f42
SM
98042017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9805
9806 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9807 thread.
9808 (darwin_init_thread_list): Don't update dummy thread.
9809 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9810
873c0814
SM
98112017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9812
9813 * record-full.c (netorder16): Remove.
9814
8b5a7a6e
SM
98152017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9816
9817 * common/diagnostics.h: Define macros for GCC.
9818 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9819 * common/vec.h: Include diagnostics.h.
9820 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9821 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9822 warning.
9823
d1435379
SM
98242017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9825
9826 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9827 New macro.
9828 * ada-lex.l: Ignore deprecated register warnings.
9829
cc75e0fd
SM
98302017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9831
9832 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9833 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9834
07809eaf
SM
98352017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9836
9837 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9838 its own line.
9839
f076f034
SM
98402017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9841
9842 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9843
0dd5cbc5
AH
98442017-06-23 Alan Hayward <alan.hayward@arm.com>
9845
9846 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9847 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9848 (xtensa_register_read_masked): Likewise.
9849
d4c6ce5b
SDJ
98502017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9851
9852 * common/environ.c (gdb_environ::unset): Update comment.
9853
16892a03
AH
98542017-06-22 Alan Hayward <alan.hayward@arm.com>
9855
9856 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9857 registers.
9858
d7dcbefc
AH
98592017-06-22 Alan Hayward <alan.hayward@arm.com>
9860
9861 * record-full.c (record_full_exec_insn): Use byte_vector.
9862
b30ff123
YQ
98632017-06-22 Yao Qi <yao.qi@linaro.org>
9864
9865 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9866 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9867
4fa847d7
AH
98682017-06-22 Alan Hayward <alan.hayward@arm.com>
9869
9870 * remote.c (cached_reg): Move from here...
9871 * regcache.h (cached_reg): ...to here.
9872 * python/py-unwind.c (struct reg_info): Remove.
9873 (cached_frame_info): Use cached_reg_t.
9874 (pyuw_prev_register): Likewise.
9875 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9876 (pyuw_dealloc_cache): Free all registers.
9877
f4906a9a
PA
98782017-06-22 Pedro Alves <palves@redhat.com>
9879 Simon Marchi <simon.marchi@ericsson.com>
9880
9881 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9882 warning.
9883 * common/diagnostics.h: New file.
9884
b45a1208
PA
98852017-06-22 Pedro Alves <palves@redhat.com>
9886
9887 * common/agent.h: Add include guards.
9888
e4da2c61
SM
98892017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9890
9891 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9892 talk about addressable units instead of bytes.
9893
96160d60
SDJ
98942017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9895
9896 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9897 of '::const_iterator'.
9898
9a6c7d9c
SDJ
98992017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9900
9901 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9902 'unittests/environ-selftests.c'.
9903 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9904 * charset.c (find_charset_names): Declare object 'iconv_env'.
9905 Update code to use 'iconv_env' object. Remove call to
9906 'free_environ'.
9907 * common/environ.c: Include <utility>.
9908 (make_environ): Delete function.
9909 (free_environ): Delete function.
9910 (gdb_environ::clear): New function.
9911 (gdb_environ::operator=): New function.
9912 (gdb_environ::get): Likewise.
9913 (environ_vector): Delete function.
9914 (set_in_environ): Delete function.
9915 (gdb_environ::set): New function.
9916 (unset_in_environ): Delete function.
9917 (gdb_environ::unset): New function.
9918 (gdb_environ::envp): Likewise.
9919 * common/environ.h: Include <vector>.
9920 (struct gdb_environ): Delete; transform into...
9921 (class gdb_environ): ... this class.
9922 (free_environ): Delete prototype.
9923 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9924 environ_vector): Likewise.
9925 * infcmd.c (run_command_1): Update code to call
9926 'envp' from 'gdb_environ' class.
9927 (environment_info): Update code to call methods from 'gdb_environ'
9928 class.
9929 (unset_environment_command): Likewise.
9930 (path_info): Likewise.
9931 (path_command): Likewise.
9932 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9933 (inferior::inferior): Initialize 'environment' using the host's
9934 information.
9935 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9936 Include "environ.h".
9937 (class inferior) <environment>: Change type from 'struct
9938 gdb_environ' to 'gdb_environ'.
9939 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9940 methods from 'gdb_environ' class.
9941 * solib.c (solib_find_1): Likewise
9942 * unittests/environ-selftests.c: New file.
9943
75c554cf
YQ
99442017-06-20 Yao Qi <yao.qi@linaro.org>
9945
9946 * features/i386/i386-linux.xml: Exchange the order of including
9947 32bit-linux.xml and 32bit-sse.xml.
9948 * features/i386/i386-linux.c: Regenerated.
9949
72ddacb7
YQ
99502017-06-20 Yao Qi <yao.qi@linaro.org>
9951
9952 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9953 Delete copy ctor and assignment operator.
9954 (tdesc_type): Likewise.
9955 (tdesc_feature): Likewise.
9956 (tdesc_free_reg): Remove.
9957 (tdesc_create_reg): Use new.
9958 (tdesc_free_type): Remove.
9959 (tdesc_create_vector): Use new.
9960 (tdesc_create_union): Likewise.
9961 (tdesc_create_flags): Likewise.
9962 (tdesc_create_enum): Likewise.
9963 (tdesc_free_feature): Delete.
9964 (free_target_description): Use delete.
9965
325c9fd4
JB
99662017-06-19 John Baldwin <jhb@FreeBSD.org>
9967
9968 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9969 registers.
9970
16b7a719
PA
99712017-06-19 Pedro Alves <palves@redhat.com>
9972
9973 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9974 after gdb::unlinker.
9975
1c8e01c9
SDJ
99762017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9977
9978 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9979 gdb_environ to access an environment variable.
9980
ffce45d2
TP
99812017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9982
9983 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9984 gdb_byte*.
9985
1d4fbac9
SM
99862017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9987
9988 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9989
8465943a
SM
99902017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9991
9992 * configure: Re-generate.
9993 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9994
3e019bdc
SM
99952017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9996
9997 * configure: Re-generate.
9998 * warning.m4: Pass -Werror to compiler when checking for
9999 supported warning flags.
10000
cf0dd6f0
SM
100012017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10002
10003 * Makefile.in (COMPILE.pre): Add "-x c++".
10004
6f98355c
YQ
100052017-06-16 Alan Hayward <alan.hayward@arm.com>
10006 Pedro Alves <palves@redhat.com>
10007 Yao Qi <yao.qi@linaro.org>
10008
10009 * defs.h (RequireLongest): New.
10010 (extract_integer): Declare function template.
10011 (extract_signed_integer): Remove the declaration, but define it
10012 static inline.
10013 (extract_unsigned_integer): Likewise.
10014 (store_integer): Declare function template.
10015 (store_signed_integer): Remove the declaration, but define it
10016 static inline.
10017 (store_unsigned_integer): Likewise.
10018 * findvar.c (extract_integer): New function template.
10019 (extract_signed_integer): Remove.
10020 (extract_unsigned_integer): Remove.
10021 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10022 instantiations.
10023 (store_integer): New function template.
10024 (store_signed_integer): Remove.
10025 (store_unsigned_integer): Remove.
10026 (store_integer): Explicit instantiations.
10027 * regcache.c (regcache_raw_read_signed): Update.
10028 (regcache::raw_read): New function.
10029 (regcache::raw_read_signed): Remove.
10030 (regcache::raw_read_unsigned): Remove.
10031 (regcache_raw_read_unsigned): Update.
10032 (regcache_raw_write_unsigned): Update.
10033 (regcache::raw_write_signed): Remove.
10034 (regcache::raw_write): New function.
10035 (regcache_cooked_read_signed): Update.
10036 (regcache::raw_write_unsigned): Remove.
10037 (regcache::cooked_read_signed): Remove.
10038 (regcache_cooked_read_unsigned): Update.
10039 (regcache::cooked_read_unsigned): Remove.
10040 (regcache_cooked_write_signed): Update.
10041 (regcache_cooked_write_unsigned): Update.
10042 * regcache.h (regcache) <raw_read_signed>: Remove.
10043 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10044 <raw_read, raw_write>: New.
10045 <cooked_read_signed, cooked_write_signed>: Remove.
10046 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10047 <cooked_read, cooked_write>: New.
10048 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10049 (sh64_pseudo_register_write): Update.
10050
a87dc45a
AK
100512017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10052
10053 * arc-tdep.c (arc_disassembler_options): New variable.
10054 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10055 of default_print_insn.
10056 (arc_delayed_print_insn): Set info->section when needed,
10057 use default_print_insn to retrieve a disassembler.
10058
45159d6a
SDJ
100592017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10060
10061 PR gdb/21574
10062 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10063 to mention $SHELL and startup-with-shell.
10064
b46c4cf0
MF
100652017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10066
10067 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10068
6394c606
YQ
100692017-06-14 Yao Qi <yao.qi@linaro.org>
10070
10071 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10072 default_print_insn instead of print_insn_aarch64.
10073 * arm-tdep.c (gdb_print_insn_arm): Call
10074 default_print_insn instead of print_insn_big_arm
10075 and print_insn_little_arm.
10076 * i386-tdep.c (i386_print_insn): Call default_print_insn
10077 instead of print_insn_i386.
10078 * ia64-tdep.c (ia64_print_insn): Call
10079 default_print_insn instead of print_insn_ia64.
10080 * mips-tdep.c (gdb_print_insn_mips): Call
10081 default_print_insn instead of print_insn_big_mips
10082 and print_insn_little_mips.
10083 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10084 instead of print_insn_spu.
10085
d5722aa2
PA
100862017-06-14 Pedro Alves <palves@redhat.com>
10087
10088 * ada-lang.c: Include "common/byte-vector.h".
10089 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10090 * charset.c (wchar_iterator::iterate): Resize the vector instead
10091 of reserving it.
10092 * common/byte-vector.h: Include "common/def-vector.h".
10093 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10094 * cli/cli-dump.c: Include "common/byte-vector.h".
10095 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10096 * common/byte-vector.h: New file.
10097 * common/def-vector.h: New file.
10098 * common/default-init-alloc.h: New file.
10099 * dwarf2loc.c: Include "common/byte-vector.h".
10100 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10101 instead of reserving it.
10102 * dwarf2read.c: Include "common/byte-vector.h".
10103 (data_buf::m_vec): Now a gdb::byte_vector.
10104 * gdb_regex.c: Include "common/def-vector.h".
10105 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10106 * mi/mi-main.c: Include "common/byte-vector.h".
10107 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10108 * printcmd.c: Include "common/byte-vector.h".
10109 (print_scalar_formatted): Use gdb::byte_vector.
10110 * valprint.c: Include "common/byte-vector.h".
10111 (maybe_negate_by_bytes, print_decimal_chars): Use
10112 gdb::byte_vector.
10113
01ec7a27
SM
101142017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10115
10116 * darwin-nat.c: Include "nat/fork-inferior.h".
10117
848d9074
SM
101182017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10119
10120 * configure.nat: Factor out Darwin bits that are not
10121 architecture-specific. Add fork-inferior.o.
10122
3b912944
SM
101232017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10124
10125 * configure.nat: Factor out AIX bits that are not
10126 architecture-specific. Add fork-inferior.o.
10127
55acdf22
AA
101282017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10129
10130 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10131 (read_pieced_value, write_pieced_value): ...here. Reduce to
10132 wrappers that just call rw_pieced_value.
10133
f65e2044
AA
101342017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10135
10136 * dwarf2loc.c (write_pieced_value): When writing the data for a
10137 memory piece, use write_memory_with_notification instead of
10138 write_memory.
10139
23f945bf
AA
101402017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10141
10142 * valops.c (read_value_memory): Change embedded_offset to
10143 represent a bit offset instead of a byte offset.
10144 * value.h (read_value_memory): Adjust comment.
10145
f236533e
AA
101462017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10147
10148 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10149 dest_offset_bits and source_offset_bits.
10150 (write_pieced_value): Likewise.
10151
65d84b76
AA
101522017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10153
10154 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10155 given by DW_OP_bit_piece.
10156 (write_pieced_value): Likewise.
10157
242d31ab
AA
101582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10159
10160 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10161 some other preparations to the places where sufficient information
10162 is available.
10163 (write_pieced_value): Likewise.
10164
03c8af18
AA
101652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10166
10167 * dwarf2loc.c (bits_to_bytes): New function.
10168 (read_pieced_value): Fix offset calculations for register pieces
10169 on big-endian targets.
10170 (write_pieced_value): Likewise.
10171
840989c1
AA
101722017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10173
10174 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10175 (write_pieced_value): Likewise.
10176
359b19bb
AA
101772017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10178
10179 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10180 transfer the source value's least significant bits, instead of its
10181 lowest-addressed ones. Rename type_len to max_offset.
10182 (read_pieced_value): Mirror above changes to write_pieced_value as
10183 applicable.
10184
07c9ca3b
AA
101852017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10186
10187 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10188 truncate full bytes from dest_offset_bits before using it as an
10189 offset into the buffer.
10190
f1cc9874
AA
101912017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10192
10193 * dwarf2loc.c (write_pieced_value): Include transfer size in
10194 byte-wise check.
10195
cdaac320
AA
101962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10197
10198 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10199 calculation of this_size.
10200
af547a96
AA
102012017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10202
10203 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10204 when targeting a bit-field.
10205 (write_pieced_value): Likewise.
10206
ddd7882a
AA
102072017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10208
10209 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10210 (allocate_piece_closure): Drop addr_size parameter.
10211 (dwarf2_evaluate_loc_desc_full): Adjust call to
10212 allocate_piece_closure.
10213
e9352324
AA
102142017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10215
10216 PR gdb/21226
10217 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10218 the LSB end, independent of endianness.
10219
d5d1163e
AA
102202017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10221
10222 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10223 size capping.
10224
032bb6ea
YQ
102252017-06-13 Yao Qi <yao.qi@linaro.org>
10226
10227 * mips-linux-nat.c: Move include features/mips*-linux.c to
10228 mips-linux-tdep.c.
10229 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10230 to mips-linux-tdep.c.
10231 * mips-linux-tdep.c: Include features/mips*-linux.c
10232 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10233 functions.
10234 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10235 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10236 (tdesc_mips64_dsp_linux): Declare.
10237
f12f6bad
TT
102382017-06-12 Tom Tromey <tom@tromey.com>
10239
10240 * valprint.h (val_print_type_code_int): Remove.
10241 * valprint.c (generic_val_print_int): Always call
10242 val_print_scalar_formatted.
10243 (val_print_type_code_int): Remove.
10244 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10245 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10246 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10247 * ada-valprint.c (ada_val_print_num): Use
10248 val_print_scalar_formatted.
10249
d9109c80
TT
102502017-06-12 Tom Tromey <tom@tromey.com>
10251
10252 * printcmd.c (print_scalar_formatted): Unify the two switches.
10253 Don't convert scalars to LONGEST.
10254
4ac0cb1c
TT
102552017-06-12 Tom Tromey <tom@tromey.com>
10256
10257 PR exp/16225:
10258 * valprint.h (print_decimal_chars): Update.
10259 * valprint.c (maybe_negate_by_bytes): New function.
10260 (print_decimal_chars): Add "is_signed" argument.
10261 * printcmd.c (print_scalar_formatted): Update.
10262
30a25466
TT
102632017-06-12 Tom Tromey <tom@tromey.com>
10264
10265 PR exp/16225:
10266 * valprint.h (print_binary_chars, print_hex_chars): Update.
10267 * valprint.c (val_print_type_code_int): Update.
10268 (print_binary_chars): Add "zero_pad" argument.
10269 (emit_octal_digit): New function.
10270 (print_octal_chars): Don't zero-pad.
10271 (print_decimal_chars): Likewise.
10272 (print_hex_chars): Add "zero_pad" argument.
10273 * sh64-tdep.c (sh64_do_fp_register): Update.
10274 * regcache.c (regcache::dump): Update.
10275 * printcmd.c (print_scalar_formatted): Update.
10276 * infcmd.c (default_print_one_register_info): Update.
10277
b3464d03
PA
102782017-06-12 Pedro Alves <palves@redhat.com>
10279 Alan Hayward <alan.hayward@arm.com>
10280
10281 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10282 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10283 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10284 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10285 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10286
4b76cda9
PA
102872017-06-12 Pedro Alves <palves@redhat.com>
10288
10289 * dwarf2read.c (mapped_symtab::data): Now a vector of
10290 symtab_index_entry instead of vector of
10291 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10292 whether an element's name is NULL instead of checking whether the
10293 element itself is NULL.
10294 (find_slot): Change return type. Adjust.
10295 (hash_expand, , add_index_entry, uniquify_cu_indices)
10296 (write_hash_table): Adjust.
10297
e8f8bcb3
PA
102982017-06-12 Pedro Alves <palves@redhat.com>
10299
10300 * dwarf2read.c (recursively_count_psymbols): New function.
10301 (write_psymtabs_to_index): Call it to compute number of psyms and
10302 pass estimate size of psyms_seen to unordered_set's ctor.
10303
70a1152b
PA
103042017-06-12 Pedro Alves <palves@redhat.com>
10305
10306 * dwarf2read.c (write_hash_table): Check if key already exists
10307 before emplacing.
10308
c2f134ac
PA
103092017-06-12 Pedro Alves <palves@redhat.com>
10310
10311 * dwarf2read.c (data_buf::append_space): Rename to...
10312 (data_buf::grow): ... this, and make private. Adjust all callers.
10313 (data_buf::append_uint): New method.
10314 (add_address_entry, write_one_signatured_type)
10315 (write_psymtabs_to_index): Use it.
10316
a81e6d4d
PA
103172017-06-12 Pedro Alves <palves@redhat.com>
10318
10319 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10320 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10321 (data_buf::file_write): Call ::fwrite directly.
10322
6fd931f2
PA
103232017-06-12 Pedro Alves <palves@redhat.com>
10324
10325 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10326 std::vector::erase.
10327
bc8f2430
JK
103282017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10329
10330 Code cleanup: C++ify .gdb_index producer.
10331 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10332 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10333 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10334 (create_strtab, add_string): Remove.
10335 (file_write, data_buf): New.
10336 (struct symtab_index_entry): Use std::vector for cu_indices.
10337 (struct mapped_symtab): Use std::vector for data.
10338 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10339 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10340 Remove.
10341 (find_slot): Change return type. Update it to the new data structures.
10342 (hash_expand, add_index_entry): Update it to the new data structures.
10343 (offset_type_compare): Remove.
10344 (uniquify_cu_indices): Update it to the new data structures.
10345 (c_str_view, c_str_view_hasher, vector_hasher): New.
10346 (add_indices_to_cpool): Remove.
10347 (write_hash_table): Update it to the new data structures.
10348 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10349 (eq_psymtab_cu_index): Remove.
10350 (psym_index_map): New typedef.
10351 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10352 reference and std::unordered_map for cu_index_htab.
10353 (add_address_entry, add_address_entry_worker, write_address_map)
10354 (write_psymbols): Update it to the new data structures.
10355 (write_obstack): Remove.
10356 (struct signatured_type_index_data): Change types_list to a data_buf
10357 reference and psyms_seen to a std::unordered_set reference.
10358 (write_one_signatured_type, recursively_write_psymbols)
10359 (write_psymtabs_to_index): Update it to the new data structures.
10360
c4dcb155
SM
103612017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10362
10363 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10364 separate-debug-file commands.
10365 * symfile.h (separate_debug_file_debug): New global.
10366 * symfile.c (separate_debug_file_debug): New global.
10367 (separate_debug_file_exists, find_separate_debug_file): Add
10368 debug output.
10369 (_initialize_symfile): Add "set debug separate-debug-file"
10370 command.
10371 * build-id.c (build_id_to_debug_bfd,
10372 find_separate_debug_file_by_buildid): Add debug output.
10373
6d45d4b4
SM
103742017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10375
10376 * gdbarch.sh (displaced_step_free_closure): Remove.
10377 * gdbarch.h, gdbarch.c: Re-generate.
10378 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10379 displaced_step_free_closure.
10380 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10381 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10382 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10383 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10384 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10385 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10386 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10387 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10388 * infrun.c (displaced_step_clear): Call xfree instead of
10389 gdbarch_displaced_step_free_closure.
10390
2f91880f
SDJ
103912017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10392
10393 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10394 NULL".
10395
b8b6e72f
AH
103962017-06-08 Alan Hayward <alan.hayward@arm.com>
10397
10398 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10399 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10400 (mn10300_push_dummy_call): Likewise.
10401
5369082e
AH
104022017-06-08 Alan Hayward <alan.hayward@arm.com>
10403
10404 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10405
ff4ca5ac
AH
104062017-06-08 Alan Hayward <alan.hayward@arm.com>
10407
10408 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10409
aefd8b33
SDJ
104102017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10411
10412 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10413 able to start inferiors using a shell.
10414 (New remote packets): Announce new packet "QStartupWithShell".
10415 * remote.c: Add PACKET_QStartupWithShell.
10416 (extended_remote_create_inferior): Handle new
10417 PACKET_QStartupWithShell.
10418 (remote_protocol_features) <QStartupWithShell>: New entry for
10419 PACKET_QStartupWithShell.
10420 (_initialize_remote): Call "add_packet_config_cmd" for
10421 QStartupShell.
10422
2090129c
SDJ
104232017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10424 Pedro Alves <palves@redhat.com>
10425
10426 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10427 and "nat/fork-inferior.h".
10428 * common/common-inferior.h: New file, with contents from
10429 "gdb/inferior.h".
10430 * commom/common-utils.c: Include "common-utils.h".
10431 (stringify_argv): New function.
10432 * common/common-utils.h (stringify_argv): New prototype.
10433 * configure.nat: Add "fork-inferior.o" as a dependency for
10434 "*linux*", "fbsd*" and "nbsd*" hosts.
10435 * corefile.c (get_exec_file): Update comment.
10436 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10437 instead of "startup_inferior".
10438 (darwin_create_inferior): Call "add_thread_silent" after
10439 "fork_inferior".
10440 * fork-child.c: Cleanup unnecessary includes.
10441 (SHELL_FILE): Move to "common/common-fork-child.c".
10442 (environ): Likewise.
10443 (exec_wrapper): Initialize.
10444 (get_exec_wrapper): New function.
10445 (breakup_args): Move to "common/common-fork-child.c"; rename to
10446 "breakup_args_for_exec".
10447 (escape_bang_in_quoted_argument): Move to
10448 "common/common-fork-child.c".
10449 (saved_ui): New variable.
10450 (prefork_hook): New function.
10451 (postfork_hook): Likewise.
10452 (postfork_child_hook): Likewise.
10453 (gdb_startup_inferior): Likewise.
10454 (fork_inferior): Move to "common/common-fork-child.c". Update
10455 function to support gdbserver.
10456 (startup_inferior): Likewise.
10457 * gdbcore.h (get_exec_file): Remove declaration.
10458 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10459 instead of "startup_inferior". Call "add_thread_silent" after
10460 "fork_inferior".
10461 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10462 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10463 instead of "startup_inferior". Call "add_thread_silent" after
10464 "fork_inferior".
10465 * inferior.h: Include "common-inferior.h".
10466 (trace_start_error): Move to "common/common-utils.h".
10467 (trace_start_error_with_name): Likewise.
10468 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10469 (startup_inferior): Likewise.
10470 (gdb_startup_inferior): New prototype.
10471 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10472 * nat/fork-inferior.h: New file.
10473 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10474 instead of "startup_inferior". Call "add_thread_silent" after
10475 "fork_inferior".
10476 * target.h (target_terminal_init): Move prototype to
10477 "target/target.h".
10478 (target_terminal_inferior): Likewise.
10479 (target_terminal_ours): Likewise.
10480 * target/target.h (target_terminal_init): New prototype, moved
10481 from "target.h".
10482 (target_terminal_inferior): Likewise.
10483 (target_terminal_ours): Likewise.
10484 * utils.c (gdb_flush_out_err): New function.
10485
043a4934
SDJ
104862017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10487
10488 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10489 * common/common-gdbthread.h: New file, with parts from
10490 "gdb/gdbthread.h".
10491 * gdbthread.h: Include "common-gdbthread.h".
10492 (switch_to_thread): Moved to "common/common-gdbthread.h".
10493
15652511
SDJ
104942017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10495
10496 * Makefile.in (SFILES): Add "common/job-control.c".
10497 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10498 (COMMON_OBS): Add "job-control.o".
10499 * common/job-control.c: New file, with contents from
10500 "gdb/inflow.c".
10501 * common/job-control.h: New file, with contents from "terminal.h".
10502 * fork-child.c: Include "job-control.h".
10503 * inflow.c: Include "job-control.h".
10504 (gdb_setpgid): Move to "common/common-inflow.c".
10505 (_initialize_inflow): Move setting of "job_control" to
10506 "handle_job_control".
10507 * terminal.h (job_control): Moved to "common/common-terminal.h".
10508 (gdb_setpgid): Likewise.
10509 * top.c: Include "job_control.h".
10510 * utils.c: Likewise.
10511 (job_control): Moved to "job-control.c".
10512
2d7cc5c7
PA
105132017-06-07 Pedro Alves <palves@redhat.com>
10514
10515 * Makefile.in (SFILES): Add gdb_regex.c.
10516 (COMMON_OBS): Add gdb_regex.o.
10517 * ada-lang.c (ada_add_standard_exceptions)
10518 (ada_add_exceptions_from_frame, name_matches_regex)
10519 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10520 parameter type to compiled_regex. Adjust.
10521 (ada_exceptions_list): Use compiled_regex.
10522 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10523 std::unique_ptr<compiled_regex>.
10524 (exception_catchpoint::~exception_catchpoint): Remove regfree
10525 call.
10526 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10527 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10528 * breakpoint.c (solib_catchpoint::compiled): Now a
10529 std::unique_ptr<compiled_regex>.
10530 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10531 (check_status_catch_solib): Adjust to use compiled_regex.
10532 (add_solib_catchpoint): Adjust to use compiled_regex.
10533 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10534 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10535 compiled_regex reference. Adjust to use it.
10536 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10537 declaration. Include "gdb_regex.h".
10538 (apropos_cmd): Change regex parameter to compiled_regex reference.
10539 * gdb_regex.c: New file.
10540 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10541 declarations.
10542 (class compiled_regex): New.
10543 * linux-tdep.c: Include "common/gdb_optional.h".
10544 (struct mapping_regexes): New, factored out from
10545 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10546 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10547 gdb::optional and remove cleanups. Adjust to compiled_regex.
10548 * probe.c: Include "common/gdb_optional.h".
10549 (collect_probes): Use compiled_regex and gdb::optional and remove
10550 cleanups.
10551 * skip.c: Include "common/gdb_optional.h".
10552 (skiplist_entry::compiled_function_regexp): Now a
10553 gdb::optional<compiled_regex>.
10554 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10555 (free_skiplist_entry): Remove regfree call.
10556 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10557 compiled_regex and gdb::optional.
10558 * symtab.c: Include "common/gdb_optional.h".
10559 (search_symbols): Use compiled_regex and gdb::optional.
10560 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10561 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10562 to gdb_regex.c.
10563
50d6adef
AH
105642017-06-07 Alan Hayward <alan.hayward@arm.com>
10565
10566 * regcache.c (regcache::save): Avoid buffer use.
10567 (regcache::dump): Likewise.
10568
4a8a33c8
AH
105692017-06-07 Alan Hayward <alan.hayward@arm.com>
10570
10571 * sh-tdep.c (sh_pseudo_register_read): Remove
10572 MAX_REGISTER_SIZE.
10573 (sh_pseudo_register_write): Likewise.
10574 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10575 (sh64_pseudo_register_write): Likewise
10576
d1be909e
AH
105772017-06-07 Alan Hayward <alan.hayward@arm.com>
10578
10579 * aarch64-tdep.c (aarch64_store_return_value): Use
10580 V_REGISTER_SIZE.
10581 (aarch64_pseudo_read_value): Likewise.
10582 (aarch64_pseudo_write): Likewise.
10583
f4a65042
YQ
105842017-06-06 Yao Qi <yao.qi@linaro.org>
10585
10586 * regformats/regdef.h (set_register_cache): Remove the
10587 declaration.
10588
9f7fb0aa
AH
105892017-06-06 Alan Hayward <alan.hayward@arm.com>
10590
10591 * frame.c (frame_unwind_register_signed): Use
10592 frame_unwind_register_value.
10593
e1e01040
PA
105942017-06-06 Pedro Alves <palves@redhat.com>
10595
10596 PR breakpoints/21553
10597 * breakpoint.c (create_breakpoints_sal_default)
10598 (init_breakpoint_sal, create_breakpoint_sal): Use
10599 gdb::unique_xmalloc_ptr for string parameters.
10600 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10601 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10602 (base_breakpoint_create_breakpoints_sal)
10603 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10604 (strace_marker_create_breakpoints_sal)
10605 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10606 string parameters.
10607 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10608 gdb::unique_xmalloc_ptr for string parameters.
10609 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10610 parameters.
10611
fbe654c8
AH
106122017-06-06 Alan Hayward <alan.hayward@arm.com>
10613
10614 * alpha-tdep.c (alpha_register_to_value): Use
10615 get_frame_register_value.
10616 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10617
ae0d01d6
AH
106182017-06-06 Alan Hayward <alan.hayward@arm.com>
10619
10620 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10621 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10622 (ia64_value_to_register): Likewise.
10623 (ia64_extract_return_value): Likewise.
10624 (ia64_store_return_value): Likewise.
10625 (ia64_push_dummy_call): Likewise.
10626
49cf576c
JB
106272017-06-04 Joel Brobecker <brobecker@adacore.com>
10628
10629 GDB 8.0 released.
10630
26b6a6ab
SM
106312017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10632
10633 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10634
22827c51
SM
106352017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10636
10637 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10638 parameter.
10639 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10640
0e05cf3a
SM
106412017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10642
10643 * event-loop.c (poll_timers): Unallocate timer using delete
10644 instead of xfree.
10645
c1fc2657
SM
106462017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10647
10648 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10649 (struct breakpoint) <~breakpoint>: New.
10650 (struct watchpoint): Inherit from breakpoint.
10651 <~watchpoint>: New.
10652 <base>: Remove.
10653 (struct tracepoint): Inherit from breakpoint.
10654 <base>: Remove.
10655 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10656 (struct longjmp_breakpoint): Inherit from breakpoint.
10657 <~longjmp_breakpoint>: New.
10658 <base>: Remove.
10659 (new_breakpoint_from_type): Remove casts.
10660 (watchpoint_in_thread_scope): Remove reference to base field.
10661 (watchpoint_del_at_next_stop): Likewise.
10662 (update_watchpoint): Likewise.
10663 (watchpoint_check): Likewise.
10664 (bpstat_check_watchpoint): Likewise.
10665 (set_longjmp_breakpoint): Likewise.
10666 (struct fork_catchpoint): Inherit from breakpoint.
10667 <base>: Remove.
10668 (struct solib_catchpoint): Inherit from breakpoint.
10669 <~solib_catchpoint>: New.
10670 <base>: Remove.
10671 (dtor_catch_solib): Change to ...
10672 (solib_catchpoint::~solib_catchpoint): ... this.
10673 (breakpoint_hit_catch_solib): Remove reference to base field.
10674 (add_solib_catchpoint): Likewise.
10675 (create_fork_vfork_event_catchpoint): Likewise.
10676 (struct exec_catchpoint): Inherit from breakpoint.
10677 <~exec_catchpoint>: New.
10678 <base>: Remove.
10679 (dtor_catch_exec): Change to ...
10680 (exec_catchpoint::~exec_catchpoint): ... this.
10681 (dtor_watchpoint): Change to ...
10682 (watchpoint::~watchpoint): ... this.
10683 (watch_command_1): Remove reference to base field.
10684 (catch_exec_command_1): Likewise.
10685 (base_breakpoint_dtor): Change to ...
10686 (breakpoint::~breakpoint): ... this.
10687 (base_breakpoint_ops): Remove dtor field value.
10688 (longjmp_bkpt_dtor): Change to ...
10689 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10690 (strace_marker_create_breakpoints_sal): Remove reference to base
10691 field.
10692 (delete_breakpoint): Don't manually call breakpoint destructor.
10693 (create_tracepoint_from_upload): Remove reference to base field.
10694 (trace_pass_set_count): Likewise.
10695 (initialize_breakpoint_ops): Don't initialize
10696 momentary_breakpoint_ops, don't set dtors.
10697 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10698 <~ada_catchpoint>: New.
10699 <base>: Remove.
10700 (create_excep_cond_exprs): Remove reference to base field.
10701 (dtor_exception): Change to ...
10702 (ada_catchpoint::~ada_catchpoint): ... this.
10703 (dtor_catch_exception): Remove.
10704 (dtor_catch_exception_unhandled): Remove.
10705 (dtor_catch_assert): Remove.
10706 (create_ada_exception_catchpoint): Remove reference to base
10707 field.
10708 (initialize_ada_catchpoint_ops): Don't set dtors.
10709 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10710 breakpoint.
10711 <~signal_catchpoint>: New.
10712 <base>: Remove.
10713 (signal_catchpoint_dtor): Change to ...
10714 (signal_catchpoint::~signal_catchpoint): ... this.
10715 (create_signal_catchpoint): Remove reference to base field.
10716 (initialize_signal_catchpoint_ops): Don't set dtor.
10717 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10718 from breakpoint.
10719 <~syscall_catchpoint>: New.
10720 <base>: Remove.
10721 (dtor_catch_syscall): Change to ...
10722 (syscall_catchpoint::~syscall_catchpoint): ... this.
10723 (create_syscall_event_catchpoint): Remove reference to base
10724 field.
10725 (initialize_syscall_catchpoint_ops): Don't set dtor.
10726 * break-catch-throw.c (struct exception_catchpoint): Inherit
10727 from breakpoint.
10728 <~exception_catchpoint>: New.
10729 <base>: Remove.
10730 (dtor_exception_catchpoint): Change to ...
10731 (exception_catchpoint::~exception_catchpoint): ... this.
10732 (handle_gnu_v3_exceptions): Remove reference to base field.
10733 (initialize_throw_catchpoint_ops): Don't set dtor.
10734 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10735 field.
10736 * remote.c (remote_get_tracepoint_status): Likewise.
10737 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10738 * tracefile.c (tracefile_fetch_registers): Likewise.
10739 * tracepoint.c (actions_command): Likewise.
10740 (validate_actionline): Likewise.
10741 (tfind_1): Likewise.
10742 (get_traceframe_location): Likewise.
10743 (find_matching_tracepoint_location): Likewise.
10744 (parse_tracepoint_status): Likewise.
10745 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10746
3b0871f4
SM
107472017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10748
10749 * breakpoint.c (struct longjmp_breakpoint): New struct.
10750 (is_tracepoint_type): Change return type to bool.
10751 (is_longjmp_type): New function.
10752 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10753 (set_raw_breakpoint_without_location): Use
10754 new_breakpoint_from_type.
10755 (set_raw_breakpoint): Likewise.
10756
a5e364af
SM
107572017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10758
10759 * breakpoint.c (new_breakpoint_from_type): New function.
10760 (create_breakpoint_sal): Use new_breakpoint_from_type and
10761 unique_ptr.
10762 (create_breakpoint): Likewise.
10763
ae3b3f34
SM
107642017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10765
10766 * memattr.c (mem_info_command): Rename to ...
10767 (info_mem_command): ... this.
10768 (mem_enable_command): Rename to ...
10769 (enable_mem_command): ... this.
10770 (mem_disable_command): Rename to ...
10771 (disable_mem_command): ... this.
10772 (mem_delete_command): Rename to ...
10773 (delete_mem_command): ... this.
10774 (_initialize_mem): Adjust function names.
10775
13ace077
MM
107762017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10777
10778 * btrace.c (handle_pt_insn_events): New.
10779 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10780 STATUS. Split into this and ...
10781 (handle_pt_insn_event_flags): ... this.
10782
c56ccc05
MM
107832017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10784
10785 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10786 and struct pt_insn.resynced.
10787 * configure: Regenerated.
10788 * config.in: Regenerated.
10789
08c3f6d2
TW
107902017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10791
10792 * btrace.c (ftrace_find_call_by_number): New function.
10793 (ftrace_new_function): Store objects, not pointers.
10794 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10795 ftrace_new_gap, ftrace_update_function,
10796 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10797 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10798 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10799 btrace_ends_with_single_insn, btrace_call_get): Account for
10800 btrace_thread_info::functions now storing objects.
10801 * btrace.h (struct btrace_thread_info): Add constructor.
10802 (struct btrace_thread_info) <functions>: Make std::vector.
10803 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10804 Initialize with default values.
10805 * record-btrace.c (record_btrace_frame_sniffer): Account for
10806 btrace_thread_info::functions now storing objects.
10807
8ffd39f2
TW
108082017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10809
10810 * btrace.c: Remove typedef bfun_s.
10811 (ftrace_new_gap): Directly add gaps to the list of gaps.
10812 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10813 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10814 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10815 instead of gdb VEC.
10816
4aeb0dfc
TW
108172017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10818
10819 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10820 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10821 with btrace_thread_info::next_segment and
10822 btrace_thread_info::prev_segment.
10823 * btrace.h: Remove struct btrace_func_link.
10824 (struct btrace_function): Replace pair of function segment pointers
10825 with pair of indices.
10826 * python/py-record-btrace.c (btpy_call_prev_sibling,
10827 btpy_call_next_sibling): Replace references to
10828 btrace_thread_info::segment with btrace_thread_info::next_segment and
10829 btrace_thread_info::prev_segment.
10830 * record-btrace.c (record_btrace_frame_this_id): Use
10831 btrace_find_call_by_number.
10832
eb8f2b9c
TW
108332017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10834
10835 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10836 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10837 btrace_insn_next, btrace_insn_prev): Remove references to
10838 btrace_thread_info::flow.
10839 * btrace.h (struct btrace_function): Remove FLOW.
10840
42bfe59e
TW
108412017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10842
10843 * btrace.c (ftrace_find_call_by_number): New function.
10844 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10845 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10846 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10847 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10848 index.
10849 * btrace.h (struct btrace_function): Turn UP into an index.
10850 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10851 as an index.
10852 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10853 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10854 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10855
b54b03bd
TW
108562017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10857
10858 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10859 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10860 ftrace_update_function, ftrace_compute_global_level_offset,
10861 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10862 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10863 btrace_insn_end, btrace_is_empty): Remove references to
10864 btrace_thread_info::begin and btrace_thread_info::end.
10865 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10866 (struct btrace_thread_info) <functions>: Adjust comment.
10867 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10868 btrace_thread_info::begin.
10869
8286623c
TW
108702017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10871
10872 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10873 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10874 ftrace_update_function): Remove arguments that implicitly were always
10875 BTINFO->END.
10876 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10877 Don't pass BTINFO->END.
10878
a0f1b963
TW
108792017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10880
10881 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10882 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10883 btrace_find_insn_by_number): Replace function segment pointer with
10884 index.
10885 (btrace_insn_cmp): Simplify.
10886 * btrace.h: (struct btrace_insn_iterator) Rename index to
10887 insn_index. Replace function segment pointer with index into function
10888 segment vector.
10889 * record-btrace.c (record_btrace_call_history): Replace function
10890 segment pointer use with index.
10891 (record_btrace_frame_sniffer): Retrieve function call segment through
10892 vector.
10893 (record_btrace_set_replay): Remove defunc't safety check.
10894
f158f208
TW
108952017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10896
10897 * btrace.c (btrace_ends_with_single_insn): New function.
10898 (btrace_call_get, btrace_call_number, btrace_call_begin,
10899 btrace_call_end, btrace_call_next, btrace_call_prev,
10900 btrace_find_call_by_number): Use index into call segment vector
10901 instead of pointer.
10902 (btrace_call_cmp): Simplify.
10903 * btrace.h (struct btrace_call_iterator): Replace function call segment
10904 pointer with index into vector.
10905 * record-btrace.c (record_btrace_call_history): Use index instead of
10906 pointer.
10907
521103fd
TW
109082017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10909
10910 * btrace.c (btrace_insn_begin, btrace_insn_end,
10911 btrace_find_insn_by_number): Add btinfo to iterator.
10912 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10913
17b89b34
TW
109142017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10915
10916 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10917 and save pointers directly.
10918 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10919 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10920 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10921 changed signature of functions.
10922 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10923 (btrace_fetch): Remove code that adds btrace_function pointers to
10924 vector of btrace_functions.
10925 (btrace_clear): Simplify freeing vector of btrace_functions.
10926
2b51eddc
TW
109272017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10928
10929 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10930 Replace VEC_* with std::vector functions.
10931 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10932 (struct btrace_thread_info)<functions>: Change type to std::vector.
10933
db6be0d5
SM
109342017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10935
10936 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10937 "Removed targets and native configurations" up. Merge duplicate
10938 "New commands" sub-sections. Add "New options" sub-sections.
10939
b057297a
AH
109402017-05-26 Alan Hayward <alan.hayward@arm.com>
10941
10942 * defs.h (copy_integer_to_size): New declaration.
10943 * findvar.c (copy_integer_to_size): New function.
10944 (do_cint_test): New selftest function.
10945 (copy_integer_to_size_test): Likewise.
10946 (_initialize_findvar): Likewise.
10947 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10948 (mips_fbsd_collect_reg): Use raw_collect_integer.
10949 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10950 (mips64_fill_gregset): Use raw_collect_integer
10951 (mips64_fill_fpregset): Use raw_supply_integer.
10952 * regcache.c (regcache::raw_supply_integer): New function.
10953 (regcache::raw_collect_integer): Likewise.
10954 * regcache.h: (regcache::raw_supply_integer): New declaration.
10955 (regcache::raw_collect_integer): Likewise.
10956
b77b02a5
YQ
109572017-05-24 Yao Qi <yao.qi@linaro.org>
10958
10959 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10960 (COMMON_OBS): Add gdbarch-selftests.o.
10961 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10962 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10963 * gdbarch-selftests.c: New file.
10964 * regcache.h (regcache) <~regcache>: Mark it virtual if
10965 GDB_SELF_TEST.
10966 <raw_write>: Likewise.
10967
e521e87e
YQ
109682017-05-24 Yao Qi <yao.qi@linaro.org>
10969
10970 * regcache.c (current_regcache): Change it to
10971 regcache::current_regcache.
10972 (regcache_observer_target_changed): Update.
10973 (regcache_thread_ptid_changed): Make it a regcache static
10974 method.
10975 (regcache_thread_ptid_changed): Update.
10976 (class regcache_access): New.
10977 (current_regcache_test): Update.
10978 (_initialize_regcache): Update.
10979 * regcache.h: Include forward_list.
10980 (regcache): Declare regcache_thread_ptid_changed and declare
10981 registers_changed_ptid as friend.
10982
d8e07dda
YQ
109832017-05-24 Yao Qi <yao.qi@linaro.org>
10984
10985 * i387-tdep.c (i387_register_to_value): Use register_size
10986 instead of TYPE_LENGTH.
10987 * m68k-tdep.c (m68k_register_to_value): Likewise.
10988
8c8f9122
YQ
109892017-05-24 Yao Qi <yao.qi@linaro.org>
10990
10991 * i387-tdep.c (i387_convert_register_p): Return false if type
10992 code isn't TYPE_CODE_FLT.
10993
68fce50f
YQ
109942017-05-24 Yao Qi <yao.qi@linaro.org>
10995
10996 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10997 length is 4.
10998 (alpha_register_to_value): Remove type length check.
10999 (alpha_value_to_register): Likewise.
11000
88954b49
YQ
110012017-05-24 Yao Qi <yao.qi@linaro.org>
11002
11003 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11004 TYPE_CODE_FLT.
11005
e3ec9b69
YQ
110062017-05-24 Yao Qi <yao.qi@linaro.org>
11007
11008 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11009 TYPE_CODE_FLT or not.
11010
cdd238da
YQ
110112017-05-24 Yao Qi <yao.qi@linaro.org>
11012
11013 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11014 * avr-tdep.c (avr_gdbarch_init): Likewise.
11015 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11016 * cris-tdep.c (cris_gdbarch_init): Likewise.
11017 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11018 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11019 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11020 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11021 * mep-tdep.c (mep_gdbarch_init): Likewise.
11022 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11023 * mips-tdep.c (mips_gdbarch_init): Likewise.
11024 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11025 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11026 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11027 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11028 * v850-tdep.c (v850_gdbarch_init): Likewise.
11029
7a3929c4
YQ
110302017-05-24 Yao Qi <yao.qi@linaro.org>
11031
11032 * selftest-arch.c (tests_with_arch): Call registers_changed
11033 and reinit_frame_cache.
11034 * selftest.c (run_self_tests): Likewise.
11035
f4985dba
YQ
110362017-05-24 Yao Qi <yao.qi@linaro.org>
11037
11038 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11039 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11040
ab20fa4a
YQ
110412017-05-24 Yao Qi <yao.qi@linaro.org>
11042
11043 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11044 set_gdbarch_print_insn.
11045
f532ab94
YQ
110462017-05-24 Yao Qi <yao.qi@linaro.org>
11047
11048 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11049 set_gdbarch_print_insn.
11050
39503f82
YQ
110512017-05-24 Yao Qi <yao.qi@linaro.org>
11052
11053 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11054 set_gdbarch_print_insn.
11055 * arc-tdep.c (arc_gdbarch_init): Likewise.
11056 * arch-utils.c: include dis-asm.h.
11057 (default_print_insn): New function.
11058 * arch-utils.h (default_print_insn): Declare.
11059 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11060 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11061 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11062 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11063 * frv-tdep.c (frv_gdbarch_init): Likewise.
11064 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11065 * gdbarch.sh (print_insn): Use default_print_insn.
11066 * gdbarch.c: Regenerated.
11067 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11068 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11069 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11070 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11071 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11072 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11073 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11074 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11075 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11076 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11077 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11078 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11079 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11080 * mt-tdep.c (mt_gdbarch_init): Likewise.
11081 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11082 * nios2-tdep.c (nios2_print_insn): Remove.
11083 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11084 * rx-tdep.c (rx_gdbarch_init): Likewise.
11085 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11086 * score-tdep.c (score_print_insn): Remove.
11087 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11088 * sh-tdep.c (sh_gdbarch_init): Likewise.
11089 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11090 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11091 * tic6x-tdep.c (tic6x_print_insn): Remove.
11092 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11093 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11094 * v850-tdep.c (v850_gdbarch_init): Likewise.
11095 * vax-tdep.c (vax_gdbarch_init): Likewise.
11096 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11097 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11098
f7241d4f
JB
110992017-05-23 John Baldwin <jhb@FreeBSD.org>
11100
11101 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11102 (MIPS_FP0_REGNUM): Remove.
11103 (MIPS_FSR_REGNUM): Remove.
11104 (mips_fbsd_supply_fpregs): Use mips_regnum.
11105 (mips_fbsd_supply_gregs): Likewise.
11106 (mips_fbsd_collect_fpregs): Likewise.
11107 (mips_fbsd_collect_gregs): Likewise.
11108
d489d81d
JB
111092017-05-23 John Baldwin <jhb@FreeBSD.org>
11110
11111 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11112 (getpfpregs_supplies): New function.
11113 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11114 getfpregs_supplies.
11115 (mips_fbsd_store_inferior_registers): Likewise.
11116
e11b3cdc
PA
111172017-05-22 Pedro Alves <palves@redhat.com>
11118
11119 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11120 maintainer.
11121
0f068fb5
AH
111222017-05-22 Alan Hayward <alan.hayward@arm.com>
11123
11124 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11125 (store_register): Likewise.
11126 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11127 (get_decimal_float_return_value): Likewise.
11128 (do_ppc_sysv_return_value): Likewise.
11129 (ppc64_sysv_abi_push_integer): Likewise.
11130 (ppc64_sysv_abi_push_freg): Likewise.
11131 (ppc64_sysv_abi_return_value_base): Likewise.
11132 (ppc64_sysv_abi_return_value): Likewise.
11133 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11134 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11135 * rs6000-nat.c: Likewise.
11136 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11137 (rs6000_value_to_register): Likewise.
11138 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11139
e6cf65f2
TT
111402017-05-21 Tom Tromey <tom@tromey.com>
11141
11142 PR rust/21466:
11143 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11144 arrays as "[T]", not "[T; ]".
11145
43cc5389
TT
111462017-05-19 Tom Tromey <tom@tromey.com>
11147
11148 PR rust/21484:
11149 * rust-lang.c (exp_descriptor_rust): New function.
11150 (rust_language_defn): Use it.
11151 * p-lang.c (pascal_language_defn): Update.
11152 * opencl-lang.c (opencl_language_defn): Update.
11153 * objc-lang.c (objc_language_defn): Update.
11154 * m2-lang.c (m2_language_defn): Update.
11155 * language.h (struct language_defn)
11156 <la_watch_location_expression>: New member.
11157 * language.c (unknown_language_defn, auto_language_defn)
11158 (local_language_defn): Update.
11159 * go-lang.c (go_language_defn): Update.
11160 * f-lang.c (f_language_defn): Update.
11161 * d-lang.c (d_language_defn): Update.
11162 * c-lang.h (c_watch_location_expression): Declare.
11163 * c-lang.c (c_watch_location_expression): New function.
11164 (c_language_defn, cplus_language_defn, asm_language_defn)
11165 (minimal_language_defn): Use it.
11166 * breakpoint.c (watch_command_1): Call
11167 la_watch_location_expression.
11168 * ada-lang.c (ada_language_defn): Update.
11169
7a6e7fcc
RO
111702017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11171
6e7e1744
RO
11172 PR tui/21482
11173 * gdb_curses.h (NOMACROS): Define.
11174 (NCURSES_NOMACROS): Define.
11175
111762017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11177
11178 PR tui/21482
7a6e7fcc
RO
11179 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11180 arg to char *.
11181 * tui/tui-wingeneral.c (box_win): Likewise.
11182 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11183 (tui_show_source_line): Likewise.
11184 (tui_show_exec_info_content): Likewise.
11185
1933fd8e
VM
111862017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11187
11188 * sparc-tdep.c (sparc_structure_return_p)
11189 (sparc_arg_on_registers_p): New functions.
11190 (sparc32_store_arguments): Use them.
11191 * sparc64-tdep.c (sparc64_16_byte_align_p)
11192 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11193 Handle TYPE_CODE_ARRAY.
11194
21873064
YQ
111952017-05-17 Yao Qi <yao.qi@linaro.org>
11196
11197 * cli/cli-decode.c (add_alias_cmd): New function.
11198 * command.h (add_alias_cmd): Declare.
11199 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11200 instead call add_alias_cmd.
11201
2b351b19
PA
112022017-05-17 Pedro Alves <palves@redhat.com>
11203
11204 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11205 (nat_makefile_frag): ... this. All references updated.
11206 * configure.ac: Likewise.
11207 * configure.nat: Likewise. Enhance comments.
11208 * configure: Regenerate.
11209
5f2ad7a3
RO
112102017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11211
11212 * procfs.c (procfs_create_inferior): Change prototype to match
11213 definition.
11214
adf3dde5
EZ
112152017-05-13 Eli Zaretskii <eliz@gnu.org>
11216
11217 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11218 C++ compiler warning.
11219
6830f270
TT
112202017-05-12 Tom Tromey <tom@tromey.com>
11221
11222 PR rust/21483:
11223 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11224 recurse, just call value_struct_elt directly.
11225
68f2f2e3
TT
112262017-05-12 Tom Tromey <tom@tromey.com>
11227
11228 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11229 OP_RUST_ARRAY>: Fix.
11230
256afbc2
TT
112312017-05-12 Tom Tromey <tom@tromey.com>
11232
11233 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11234
94bb8dfe
YQ
112352017-05-09 Yao Qi <yao.qi@linaro.org>
11236
11237 * regcache.c: Include <forward_list>.
11238 (struct regcache_list): Remove.
11239 (current_regcache): Update.
11240 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11241 (regcache_thread_ptid_changed): Likewise.
11242 (registers_changed_ptid): Likewise.
11243 (current_regcache_size): Likewise.
11244
8248946c
YQ
112452017-05-09 Yao Qi <yao.qi@linaro.org>
11246
11247 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11248 (current_regcache_size): New function.
11249 (current_regcache_test): New function.
11250 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11251
313c5961
AH
112522017-05-08 Alan Hayward <alan.hayward@arm.com>
11253
11254 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11255 (print_gp_register_row): Use get_frame_register_value.
11256
27bfc1d1
AH
112572017-05-08 Alan Hayward <alan.hayward@arm.com>
11258
11259 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11260 (mips_supply_fpregset): Likewise.
11261 (mips64_supply_gregset): Likewise.
11262
146e6c5c
AH
112632017-05-08 Alan Hayward <alan.hayward@arm.com>
11264
11265 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11266 regcache->raw_supply_zeroed.
11267
e50f25ec
SDJ
112682017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11269
11270 * configure.nat: Rearrange 'case' statements to match
11271 host before cpu.
11272
21ea5acd
SDJ
112732017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11274
11275 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11276 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11277 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11278 "@nat_extra_makefile_frag@".
11279 (Makefile): Remove dependency on "@frags@".
11280 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11281 (data-directory/Makefile): Likewise.
11282 * config/aarch64/linux.mh: Deleted; moved contents to
11283 "gdb/configure.nat".
11284 * config/alpha/alpha-linux.mh: Likewise.
11285 * config/alpha/nbsd.mh: Likewise.
11286 * config/arm/linux.mh: Likewise.
11287 * config/arm/nbsdelf.mh: Likewise.
11288 * config/i386/cygwin.mh: Likewise.
11289 * config/i386/cygwin64.mh: Likewise.
11290 * config/i386/darwin.mh: Likewise.
11291 * config/i386/fbsd.mh: Likewise.
11292 * config/i386/fbsd64.mh: Likewise.
11293 * config/i386/go32.mh: Likewise.
11294 * config/i386/i386gnu.mh: Likewise.
11295 * config/i386/i386sol2.mh: Likewise.
11296 * config/i386/linux.mh: Likewise.
11297 * config/i386/linux64.mh: Likewise.
11298 * config/i386/mingw.mh: Likewise.
11299 * config/i386/mingw64.mh: Likewise.
11300 * config/i386/nbsd64.mh: Likewise.
11301 * config/i386/nbsdelf.mh: Likewise.
11302 * config/i386/nto.mh: Likewise.
11303 * config/i386/obsd.mh: Likewise.
11304 * config/i386/obsd64.mh: Likewise.
11305 * config/i386/sol2-64.mh: Likewise.
11306 * config/ia64/linux.mh: Likewise.
11307 * config/m32r/linux.mh: Likewise.
11308 * config/m68k/linux.mh: Likewise.
11309 * config/m68k/nbsdelf.mh: Likewise.
11310 * config/m68k/obsd.mh: Likewise.
11311 * config/m88k/obsd.mh: Likewise.
11312 * config/mips/fbsd.mh: Likewise.
11313 * config/mips/linux.mh: Likewise.
11314 * config/mips/nbsd.mh: Likewise.
11315 * config/mips/obsd64.mh: Likewise.
11316 * config/pa/linux.mh: Likewise.
11317 * config/pa/nbsd.mh: Likewise.
11318 * config/pa/obsd.mh: Likewise.
11319 * config/powerpc/aix.mh: Likewise.
11320 * config/powerpc/fbsd.mh: Likewise.
11321 * config/powerpc/linux.mh: Likewise.
11322 * config/powerpc/nbsd.mh: Likewise.
11323 * config/powerpc/obsd.mh: Likewise.
11324 * config/powerpc/ppc64-linux.mh: Likewise.
11325 * config/powerpc/spu-linux.mh: Likewise.
11326 * config/s390/linux.mh: Likewise.
11327 * config/sh/nbsd.mh: Likewise.
11328 * config/sparc/fbsd.mh: Likewise.
11329 * config/sparc/linux.mh: Likewise.
11330 * config/sparc/linux64.mh: Likewise.
11331 * config/sparc/nbsd64.mh: Likewise.
11332 * config/sparc/nbsdelf.mh: Likewise.
11333 * config/sparc/obsd64.mh: Likewise.
11334 * config/sparc/sol2.mh: Likewise.
11335 * config/tilegx/linux.mh: Likewise.
11336 * config/vax/nbsdelf.mh: Likewise.
11337 * config/vax/obsd.mh: Likewise.
11338 * config/xtensa/linux.mh: Likewise.
11339 * config/i386/i386gnu.mn: New file, with excerpts from
11340 "config/i386/i386gnu.mh".
11341 * configure: Regenerate.
11342 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11343 *.mh files under "gdb/config".
11344 * configure.nat: New file, with contents from the
11345 "gdb/config/*/*.mh" files.
11346
7ed1acaf
TW
113472017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11348
11349 * btrace.c (btrace_clear): Free insn vector.
11350
e13cb306
PA
113512017-05-05 Pedro Alves <palves@redhat.com>
11352
11353 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11354 * configure: Regenerate.
11355
5ed8105e
PA
113562017-05-04 Pedro Alves <palves@redhat.com>
11357
11358 * Makefile.in (SFILES): Add progspace-and-thread.c.
11359 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11360 (COMMON_OBS): Add progspace-and-thread.o.
11361 * breakpoint.c: Include "progspace-and-thread.h".
11362 (update_inserted_breakpoint_locations)
11363 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11364 Use scoped_restore_current_pspace_and_thread.
11365 (create_std_terminate_master_breakpoint): Use
11366 scoped_restore_current_program_space.
11367 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11368 (print_breakpoint_location): Use
11369 scoped_restore_current_program_space.
11370 (bp_loc_is_permanent): Use
11371 scoped_restore_current_pspace_and_thread.
11372 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11373 (download_tracepoint_locations): Use
11374 scoped_restore_current_pspace_and_thread.
11375 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11376 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11377 (enum step_over_calls_kind): Moved from inferior.h.
11378 (class scoped_restore_current_thread): New class.
11379 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11380 declaration.
11381 (scoped_restore_current_thread): New class.
11382 * infcmd.c: Include "common/gdb_optional.h".
11383 (continue_1, proceed_after_attach): Use
11384 scoped_restore_current_thread.
11385 (notice_new_inferior): Use scoped_restore_current_thread.
11386 * inferior.c: Include "progspace-and-thread.h".
11387 (restore_inferior, save_current_inferior): Delete.
11388 (add_inferior_command, clone_inferior_command): Use
11389 scoped_restore_current_pspace_and_thread.
11390 * inferior.h (scoped_restore_current_inferior): New class.
11391 * infrun.c: Include "progspace-and-thread.h" and
11392 "common/gdb_optional.h".
11393 (follow_fork_inferior): Use
11394 scoped_restore_current_pspace_and_thread.
11395 (scoped_restore_exited_inferior): New class.
11396 (handle_vfork_child_exec_or_exit): Use
11397 scoped_restore_exited_inferior,
11398 scoped_restore_current_pspace_and_thread,
11399 scoped_restore_current_thread and scoped_restore.
11400 (fetch_inferior_event): Use scoped_restore_current_thread.
11401 * linespec.c (decode_line_full, decode_line_1): Use
11402 scoped_restore_current_program_space.
11403 * mi/mi-main.c: Include "progspace-and-thread.h".
11404 (exec_continue): Use scoped_restore_current_thread.
11405 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11406 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11407 * proc-service.c (ps_pglobal_lookup): Use
11408 scoped_restore_current_program_space.
11409 * progspace-and-thread.c: New file.
11410 * progspace-and-thread.h: New file.
11411 * progspace.c (release_program_space, clone_program_space): Use
11412 scoped_restore_current_program_space.
11413 (restore_program_space, save_current_program_space)
11414 (save_current_space_and_thread): Delete.
11415 (switch_to_program_space_and_thread): Moved to
11416 progspace-and-thread.c.
11417 * progspace.h (save_current_program_space)
11418 (save_current_space_and_thread): Delete declarations.
11419 (scoped_restore_current_program_space): New class.
11420 * remote.c (remote_btrace_maybe_reopen): Use
11421 scoped_restore_current_thread.
11422 * symtab.c: Include "progspace-and-thread.h".
11423 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11424 * thread.c (print_thread_info_1): Use
11425 scoped_restore_current_thread.
11426 (struct current_thread_cleanup): Delete.
11427 (do_restore_current_thread_cleanup)
11428 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11429 (scoped_restore_current_thread::~scoped_restore_current_thread):
11430 ... this new dtor.
11431 (make_cleanup_restore_current_thread): Rename/convert to ...
11432 (scoped_restore_current_thread::scoped_restore_current_thread):
11433 ... this new ctor.
11434 (thread_apply_all_command): Use scoped_restore_current_thread.
11435 (thread_apply_command): Use scoped_restore_current_thread.
11436 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11437 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11438
f6223dbb
PA
114392017-05-04 Pedro Alves <palves@redhat.com>
11440
11441 * thread.c (make_cleanup_restore_current_thread): Move
11442 find_thread_ptid call before the is_stopped call. Assert that the
11443 thread is found. Replace is_stopped call by checking the thread's
11444 state directly. Remove unnecessary NULL-thread check.
11445
3c3ae77e
PA
114462017-05-04 Pedro Alves <palves@redhat.com>
11447
11448 * corelow.c (thread_section_name): New class.
11449 (get_core_register_section, get_core_siginfo): Use it.
11450
45eba0ab
AA
114512017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11452
11453 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11454 (get_core_register_section): Remove xfree of NULL pointer.
11455
f81fdd35
AH
114562017-05-03 Alan Hayward <alan.hayward@arm.com>
11457
11458 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11459 * regcache.c (regcache::raw_supply_zeroed): New function.
11460 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11461
35837774
SM
114622017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11463
11464 * gdbarch.sh: Remove commented out definition of
11465 TARGET_CHAR_BIT.
11466 * gdbarch.h: Re-generate.
11467
c94fee56
SDJ
114682017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11469
11470 * configure: Regenerate.
11471
d17f7b36
SM
114722017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11473
11474 * solib-target.c (solib_target_relocate_section_addresses):
11475 Remove num_section_bases, num_bases, segment_bases variables.
11476
b560ebd6
SM
114772017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11478
11479 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11480
f2f46dfc
SM
114812017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11482
11483 * solib-target.c: Include <vector>
11484 (struct lm_info_target) <~lm_info_target>: Remove.
11485 <segment_bases, section_bases>: Change type to
11486 std::vector<CORE_ADDR>.
11487 (library_list_start_segment, library_list_start_section,
11488 library_list_end_library,
11489 solib_target_relocate_section_addresses): Adjust.
11490
a0ff9e1a
SM
114912017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11492
11493 * gdbarch.sh (software_single_step): Change return type to
11494 std::vector<CORE_ADDR>.
11495 * gdbarch.c, gdbarch.h: Re-generate.
11496 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11497 Adjust.
11498 (arm_deal_with_atomic_sequence_raw): Adjust.
11499 (thumb_get_next_pcs_raw): Adjust.
11500 (arm_get_next_pcs_raw): Adjust.
11501 (arm_get_next_pcs): Adjust.
11502 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11503 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11504 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11505 (alpha_software_single_step): Adjust.
11506 * alpha-tdep.h (alpha_software_single_step): Adjust.
11507 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11508 * arm-tdep.c (arm_software_single_step): Adjust.
11509 (arm_breakpoint_kind_from_current_state): Adjust.
11510 * arm-tdep.h (arm_software_single_step): Adjust.
11511 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11512 * cris-tdep.c (cris_software_single_step): Adjust.
11513 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11514 (micromips_deal_with_atomic_sequence): Adjust.
11515 (deal_with_atomic_sequence): Adjust.
11516 (mips_software_single_step): Adjust.
11517 * mips-tdep.h (mips_software_single_step): Adjust.
11518 * moxie-tdep.c (moxie_software_single_step): Adjust.
11519 * nios2-tdep.c (nios2_software_single_step): Adjust.
11520 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11521 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11522 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11523 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11524 * sparc-tdep.c (sparc_software_single_step): Adjust.
11525 * spu-tdep.c (spu_software_single_step): Adjust.
11526 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11527
ea480a30
SM
115282017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11529
11530 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11531 * gdbarch.h: Re-generate.
11532
d050f7d7
TW
115332017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11534
11535 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11536 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11537 * python/py-instruction.c, python/py-instruction.h: New file.
11538 * python/py-record.c: Add py-instruction.h include.
11539 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11540 gdb.RecordInstruction.
11541 * python/python-internal.h: Add gdbpy_initialize_instruction
11542 declaration.
11543 * python/python.c (do_start_initialization): Add
11544 gdbpy_initialize_instruction.
11545
14f819c8
TW
115462017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11547
11548 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11549 Remove.
11550 (btrace_func_from_recpy_func): New function.
11551 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11552 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11553 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11554 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11555 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11556 Also, use new helper functions.
11557 (btpy_list_item): Use new helper functions.
11558 (recpy_bt_function_call_history): Use new type name.
11559 (btpy_call_getset): Remove.
11560 (gdbpy_initialize_btrace): Remove code to initialize
11561 gdb.BtraceFunctionCall.
11562 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11563 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11564 recpy_bt_func_prev, recpy_bt_func_next): New export.
11565 * python/py-record.c (recpy_func_type): New static object.
11566 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11567 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11568 recpy_func_next): New function.
11569 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11570 (recpy_func_getset): New static object.
11571 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11572 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11573
0ed5da75
TW
115742017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11575
11576 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11577 (btpy_object, btpy_insn_type, btpy_new): Remove.
11578 (btpy_list_object): Use gdb.RecordInstruction type instead of
11579 gdb.BtraceInstruction type.
11580 (btrace_insn_from_recpy_insn): New function.
11581 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11582 btpy_new.
11583 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11584 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11585 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11586 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11587 instead of btpy_object.
11588 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11589 btpy_insn_data, btpy_insn_decode): Rename to ...
11590 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11591 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11592 recpy_bt_insn_decode): This. Also, use new helper functions.
11593 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11594 recpy_insn_type.
11595 (btpy_insn_getset): Remove.
11596 (gdbpy_initialize_btrace): Remove code to initialize
11597 gdb.BtraceInstruction. Use recpy_element_object.
11598 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11599 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11600 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11601 * python/py-record.c (recpy_insn_type): New static object.
11602 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11603 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11604 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11605 New function.
11606 (recpy_insn_getset): New static object.
11607 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11608 * python/py-record.h (recpy_element_object): New typedef.
11609 (recpy_insn_type, recpy_insn_new): New export.
11610
913aeadd
TW
116112017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11612
11613 * py-record-btrace.c (btpy_insn_new): Removed.
11614 (btpy_insn_or_gap_new): New function.
11615 (btpy_insn_error): Removed.
11616 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11617 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11618 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11619 btpy_insn_or_gap_new instead of btpy_insn_new.
11620 (btpy_insn_getset): Remove btpy_insn_error.
11621 * py-record.c (recpy_gap_type): New static object.
11622 (recpy_gap_object): New typedef.
11623 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11624 recpy_gap_reason_string): New function.
11625 (recpy_gap_getset): New static object.
11626 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11627 * py-record.h (recpy_gap_new): New export.
11628
a3be24ad
TW
116292017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11630
11631 * python/py-record.c (recpy_ptid): Remove.
11632 (recpy_record_getset): Remove recpy_ptid.
11633
ae20e79a
TW
116342017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11635
11636 * btrace.c (btrace_fetch): Set inferior_ptid.
11637 * python/py-record-btrace.c: Add "py-record.h" include.
11638 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11639 recpy_bt_end, recpy_bt_instruction_history,
11640 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11641 in gdb.Record object instead of current ptid.
11642 * python/py-record.c: Include new "py-record.h" file.
11643 (recpy_record_object): Moved to py-record.h.
11644 * python/py-record.h: New file.
11645
8d0050ea
TW
116462017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11647
11648 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11649 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11650 indentation.
11651
3f380b50
JB
116522017-05-01 Joel Brobecker <brobecker@adacore.com>
11653
11654 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11655 the past maintainers section.
11656
07495424
YQ
116572017-04-28 Yao Qi <yao.qi@linaro.org>
11658
11659 * infcmd.c (get_return_value): Use regcache ctor, and remove
11660 cleanup.
11661
deb1fa3e
YQ
116622017-04-28 Yao Qi <yao.qi@linaro.org>
11663 Pedro Alves <palves@redhat.com>
11664
11665 * regcache.c (regcache::regcache): New tag dispatch ctor.
11666 (do_cooked_read): Moved above.
11667 (regcache_dup): Use the tag dispatch ctor..
11668 * regcache.h (regcache): Declare ctor, delete copy ctor and
11669 assignment operator, remove friend regcache_dup.
11670
b421c83c
YQ
116712017-04-28 Yao Qi <yao.qi@linaro.org>
11672
11673 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11674 call method save instead of regcache_cpy.
11675 * regcache.h (struct regcache): Make regcache_dup a friend.
11676
ef79d9a3
YQ
116772017-04-28 Yao Qi <yao.qi@linaro.org>
11678
11679 * regcache.c (struct regcache): Move to regcache.h
11680 (regcache::arch): New method.
11681 (regcache_get_ptid): Update.
11682 (get_regcache_arch): Call arch method.
11683 (get_regcache_aspace): Call method aspace.
11684 (register_buffer): Change it to method.
11685 (regcache_save): Change it to regcache::save.
11686 (regcache_restore): Likewise.
11687 (regcache_cpy_no_passthrough): Remove the declaration.
11688 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11689 (regcache_cpy_no_passthrough): Change it to method
11690 cpy_no_passthrough.
11691 (regcache_register_status): Change it to method
11692 get_register_status.
11693 (regcache_invalidate): Change it to method invalidate.
11694 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11695 (regcache_raw_update): Change it to method raw_update.
11696 (regcache_raw_read): Likewise.
11697 (regcache_raw_read_signed): Likewise.
11698 (regcache_raw_read_unsigned): Likewise.
11699 (regcache_raw_write_signed): Likewise.
11700 (regcache_raw_write_unsigned): Likewise.
11701 (regcache_cooked_read): Likewise.
11702 (regcache_cooked_read_value): Likewise.
11703 (regcache_cooked_read_signed): Likewise.
11704 (regcache_cooked_read_unsigned): Likewise.
11705 (regcache_cooked_write_signed): Likewise.
11706 (regcache_cooked_write_unsigned): Likewise.
11707 (regcache_raw_set_cached_value): Likewise.
11708 (regcache_raw_write): Likewise.
11709 (regcache_cooked_write): Likewise.
11710 (regcache_xfer_part): Likewise.
11711 (regcache_raw_read_part): Likewise.
11712 (regcache_raw_write_part): Likewise.
11713 (regcache_cooked_read_part): Likewise.
11714 (regcache_cooked_write_part): Likewise.
11715 (regcache_raw_supply): Likewise.
11716 (regcache_raw_collect): Likewise.
11717 (regcache_transfer_regset): Likewise.
11718 (regcache_supply_regset): Likewise.
11719 (regcache_collect_regset): Likewise.
11720 (regcache_debug_print_register): Likewise.
11721 (enum regcache_dump_what): Move it to regcache.h.
11722 (regcache_dump): Change it to method dump.
11723 * regcache.h (enum regcache_dump_what): New.
11724 (class regcache): New.
11725 * target.c (target_fetch_registers): Call method
11726 debug_print_register.
11727 (target_store_registers): Likewise.
11728
f8fdb78e
SM
117292017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11730
11731 * windows-nat.c (struct lm_info_windows): Initialize field.
11732 (windows_make_so): Allocate lm_info_windows with new.
11733 (windows_free_so): Free lm_info_windows with delete.
11734
9ccbfd7b
SM
117352017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11736
11737 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11738 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11739 cleanup.
11740 (darwin_free_so): Free lm_info_darwin with delete.
11741
76e75227
SM
117422017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11743
11744 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11745 <l_addr_p>: Change type to bool.
11746 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11747 (svr4_free_so): Free lm_info_svr4 with delete.
11748 (svr4_copy_library_list): Replace memcpy with call to copy
11749 constructor.
11750 (library_list_start_library, svr4_default_sos): Allocate
11751 lm_info_svr4 with new.
11752
51046d9e
SM
117532017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11754
11755 * solib-target.c (struct lm_info_target): Add destructor,
11756 initialize fields.
11757 <name>: Change type to std::string.
11758 (library_list_start_library): Allocate lm_info_target with new.
11759 (solib_target_free_library_list): Free lm_info_target with
11760 delete.
11761 (solib_target_current_sos): Adapt to std::string.
11762 (solib_target_free_so): Free lm_info_target with delete.
11763
4023ae76
SM
117642017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11765
11766 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11767 fields.
11768 (frv_current_sos): Allocate lm_info_frv with new.
11769 (frv_relocate_main_executable): Free lm_info_frv with delete,
11770 allocate with new.
11771 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11772
af43057b
SM
117732017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11774
11775 * solib-frv.c (struct lm_info_frv): Fix indentation.
11776
b0911207
SM
117772017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11778
11779 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11780 map field.
11781 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11782 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11783 and allocate with new.
11784 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11785
6c401f72
SM
117862017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11787
11788 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11789 <filename, member_name>: Change type to std::string.
11790 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11791 (library_list_start_library): Allocate lm_info_aix with new.
11792 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11793 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11794 with copy constructor.
11795
d0e449a1
SM
117962017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11797
11798 * solist.h (struct lm_info): Remove.
11799 (struct lm_info_base): New class.
11800 (struct so_list) <lm_info>: Change type to lm_info_base *.
11801 * nto-tdep.c (struct lm_info): Remove.
11802 (lm_addr): Adjust.
11803 * solib-aix.c (struct lm_info): Rename to ...
11804 (struct lm_info_aix): ... this. Extend lm_info_base.
11805 (lm_info_p): Rename to ...
11806 (lm_info_aix_p): ... this, and adjust.
11807 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11808 solib_aix_parse_libraries, library_list_start_library,
11809 solib_aix_free_library_list, solib_aix_parse_libraries,
11810 solib_aix_get_library_list,
11811 solib_aix_relocate_section_addresses, solib_aix_free_so,
11812 solib_aix_get_section_offsets,
11813 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11814 Adjust.
11815 (struct solib_aix_inferior_data) <library_list>: Adjust.
11816 * solib-darwin.c (struct lm_info): Rename to ...
11817 (struct lm_info_darwin): ... this. Extend lm_info_base.
11818 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11819 * solib-dsbt.c (struct lm_info): Rename to ...
11820 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11821 (struct dsbt_info) <main_executable_lm_info): Adjust.
11822 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11823 dsbt_relocate_section_addresses): Adjust.
11824 * solib-frv.c (struct lm_info): Rename to ...
11825 (struct lm_info_frv): ... this. Extend lm_info_base.
11826 (main_executable_lm_info): Adjust.
11827 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11828 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11829 find_canonical_descriptor_in_load_object,
11830 frv_fdpic_find_canonical_descriptor): Adjust.
11831 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11832 to lm_info_svr4.
11833 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11834 svr4_clear_so, svr4_copy_library_list,
11835 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11836 svr4_current_sos, svr4_fetch_objfile_link_map,
11837 solist_update_incremental): Adjust.
11838 * solib-svr4.h (struct lm_info_svr4): Move here from
11839 solib-svr4.c.
11840 * solib-target.c (struct lm_info): Rename to ...
11841 (struct lm_info_target): ... this. Extend lm_info_base.
11842 (lm_info_p): Rename to ...
11843 (lm_info_target_p): ... this.
11844 (solib_target_parse_libraries, library_list_start_segment,
11845 library_list_start_section, library_list_start_library,
11846 library_list_end_library, solib_target_free_library_list,
11847 solib_target_current_sos, solib_target_free_so,
11848 solib_target_relocate_section_addresses): Adjust.
11849 * windows-nat.c (struct lm_info): Rename to ...
11850 (struct lm_info_windows): ... this. Extend lm_info_base.
11851 (windows_make_so, handle_load_dll, handle_unload_dll,
11852 windows_xfer_shared_libraries): Adjust.
11853
434a4023
SM
118542017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11855
11856 * solib-darwin.c (struct darwin_so_list): Remove.
11857 (darwin_current_sos): Allocate an so_list object instead of a
11858 darwin_so_list, separately allocate an lm_info object.
11859 (darwin_free_so): Free lm_info.
11860
428544e8
JB
118612017-04-28 John Baldwin <jhb@FreeBSD.org>
11862
11863 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11864 with fprintf_filtered.
11865
4621115f
YQ
118662017-04-28 Yao Qi <yao.qi@linaro.org>
11867
11868 * regcache.c (regcache::regcache): New function.
11869 (regcache::~regcache): New function.
11870 (regcache_xmalloc_1): Remove.
11871 (regcache_xmalloc): Call new regcache.
11872 (regcache_xfree): Call delete regcache.
11873 (get_thread_arch_aspace_regcache): Call new regcache.
11874
339053c2
YQ
118752017-04-28 Yao Qi <yao.qi@linaro.org>
11876
11877 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11878 lwp instead of ptid_get_lwp.
11879
7974a605
YQ
118802017-04-28 Yao Qi <yao.qi@linaro.org>
11881
11882 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11883 lwp_info instead of getting from inferior_ptid.
11884
e15c3eb4
KS
118852017-04-27 Keith Seitz <keiths@redhat.com>
11886
11887 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11888 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11889 (CV_CONVERSION_BADNESS): Define.
11890 (rank_one_type): Remove overly restrictive rvalue reference
11891 rank checks.
11892 Add cv-qualifier checks and subranks for type equality.
11893 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11894 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11895 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11896
72bc1d24
SM
118972017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11898
11899 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11900 count when creating the object.
11901
55bcecda
UW
119022017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11903 Ulrich Weigand <uweigand@de.ibm.com>
11904
11905 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11906 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11907 is used in AIX.
11908 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11909 (process_xcoff_symbol): Likewise.
11910 (scan_xcoff_symtab): Likewise.
11911
5c99fcf8
AH
119122017-04-26 Alan Hayward <alan.hayward@arm.com>
11913
11914 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11915 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11916 (ia64_access_reg): Use get_frame_register_unsigned.
11917 (ia64_access_rse_reg): Likewise.
11918 (ia64_libunwind_frame_prev_register): Likewise.
11919
b41c5a85
JW
119202017-04-26 Jiong Wang <jiong.wang@arm.com>
11921
11922 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11923 * gdbarch.c: Regenerated.
11924 * gdbarch.h: Regenerated.
11925 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11926 visibility external.
11927 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11928 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11929 (enum cfa_how_kind): Move to ...
11930 (struct dwarf2_frame_state_reg_info): Likewise.
11931 (struct dwarf2_frame_state): Likewise.
11932 * dwarf2-frame.h: ... here.
11933 (dwarf2_frame_state_alloc_regs): New declaration.
11934 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11935 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11936
c185f580
AH
119372017-04-26 Alan Hayward <alan.hayward@arm.com>
11938
11939 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11940 regcache_raw_read_unsigned.
11941 (xtensa_pseudo_register_write): Likewise.
11942
19c45594
AH
119432017-04-26 Alan Hayward <alan.hayward@arm.com>
11944
11945 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11946 (nds32_pseudo_register_write): Likewise.
11947
4658f12e
YQ
119482017-04-25 Yao Qi <yao.qi@linaro.org>
11949
11950 * regcache.c (struct regcache) <readonly_p>: Change its type
11951 to bool.
11952 (regcache_xmalloc_1): Update parameter type and callers update.
11953
d581dda8
YQ
119542017-04-25 Yao Qi <yao.qi@linaro.org>
11955
11956 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11957 set_gdbarch_wchar_bit.
11958 * arm-tdep.c (arm_gdbarch_init): Likewise.
11959
debed3db
PA
119602017-04-25 Pedro Alves <palves@redhat.com>
11961
11962 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11963 (BothAreRelocatable, memcopy, memmove): Don't define.
11964 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11965 macros.
11966
b0b92aeb
PA
119672017-04-25 Pedro Alves <palves@redhat.com>
11968
11969 * common/common-defs.h: Include "common/poison.h".
11970 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11971 and adjust.
11972 * common/poison.h: New file.
11973 * common/traits.h: Include <type_traits>.
11974 (Not, Or, Requires): New, moved from common/function-view.h.
11975
16c4d54a
PA
119762017-04-25 Pedro Alves <palves@redhat.com>
11977
11978 * breakpoint.h (struct breakpoint): In-class initialize all
11979 fields. Make boolean fields "bool".
11980 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11981 memset call and initializations no longer necessary.
11982
b5c36682
PA
119832017-04-25 Pedro Alves <palves@redhat.com>
11984
11985 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11986 reference.
11987 (pt_btrace_insn): New function.
11988 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11989
5625a286
PA
119902017-04-25 Pedro Alves <palves@redhat.com>
11991
11992 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11993 "base" field and inherit from "bp_location" instead. Add
11994 non-default ctor.
11995 (allocate_location_exception): Use new non-default ctor.
11996 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11997 (init_bp_location): Convert to ...
11998 (bp_location::bp_location): ... this new ctor, and remove memset
11999 call.
12000 (base_breakpoint_allocate_location): Use the new non-default ctor.
12001 * breakpoint.h (bp_location): Now a class. Declare default and
12002 non-default ctors. In-class initialize all members.
12003 (init_bp_location): Remove declaration.
12004
23bcc18f
PA
120052017-04-25 Pedro Alves <palves@redhat.com>
12006
12007 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12008 assignment operator.
12009
e1ba3053
YQ
120102017-04-24 Yao Qi <yao.qi@linaro.org>
12011
12012 * doublest.c (convert_doublest_to_floatformat): Call
12013 floatformat_totalsize_bytes.
12014
10f489e5
TT
120152017-04-22 Tom Tromey <tom@tromey.com>
12016
12017 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12018 ui_out_emit_list.
12019 * stack.c (print_frame): Use ui_out_emit_list.
12020 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12021 ui_out_emit_list.
12022 * mi/mi-main.c (print_one_inferior)
12023 (mi_cmd_data_list_register_names)
12024 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12025 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12026 ui_out_emit_list.
12027 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12028 (mi_output_solib_attribs): Use ui_out_emit_list,
12029 ui_out_emit_tuple.
12030 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12031 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12032 (mi_cmd_stack_list_args, list_args_or_locals): Use
12033 ui_out_emit_list.
12034 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12035 * breakpoint.c (print_solib_event, output_thread_groups): Use
12036 ui_out_emit_list.
12037
0092b74d
TT
120382017-04-22 Tom Tromey <tom@tromey.com>
12039
12040 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12041 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12042 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12043
a14a62dd
TT
120442017-04-22 Tom Tromey <tom@tromey.com>
12045
12046 * tracepoint.c (tvariables_info_1)
12047 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12048
46b9c129
TT
120492017-04-22 Tom Tromey <tom@tromey.com>
12050
12051 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12052 annotate_arg_emitter.
12053 * breakpoint.c (print_mention_watchpoint)
12054 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12055 * annotate.h (struct annotate_arg_emitter): New.
12056
2e783024
TT
120572017-04-22 Tom Tromey <tom@tromey.com>
12058
12059 * record-btrace.c (record_btrace_insn_history)
12060 (record_btrace_insn_history_range, record_btrace_call_history)
12061 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12062 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12063 ui_out_emit_tuple.
12064 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12065 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12066 * skip.c (skip_info): Use ui_out_emit_tuple.
12067 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12068 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12069 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12070 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12071 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12072 ui_out_emit_tuple.
12073 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12074 (output_register, mi_cmd_data_read_memory)
12075 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12076 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12077 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12078 Use ui_out_emit_tuple.
12079 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12080 ui_out_emit_tuple.
12081 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12082 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12083 * linux-thread-db.c (info_auto_load_libthread_db): Use
12084 ui_out_emit_tuple.
12085 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12086 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12087 * disasm.c (do_mixed_source_and_assembly_deprecated)
12088 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12089 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12090 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12091 * breakpoint.c (print_one_breakpoint_location)
12092 (print_one_breakpoint): Use ui_out_emit_tuple.
12093 * auto-load.c (print_script, info_auto_load_cmd): Use
12094 ui_out_emit_tuple.
12095 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12096
9be21bb4
SM
120972017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12098
12099 * thread.c (print_thread_info_1): Remove dead code.
12100
0d4c07af
JK
121012017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12102
12103 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12104 GDB_SELF_TEST.
12105 * arm-tdep.c (selftests::arm_record_test): Likewise.
12106
4daf993d
YQ
121072017-04-21 Yao Qi <yao.qi@linaro.org>
12108
12109 * regcache.c (regcache_restore): Remove argument 2. Replace
12110 argument 3 with regcache. Get register status from
12111 src->register_status and get register contents from
12112 register_buffer (src, regnum).
12113 (regcache_cpy): Update.
12114
a6c21d4a
PA
121152017-04-19 Pedro Alves <palves@redhat.com>
12116
12117 * gdbthread.h (thread): Add missing closing parenthesis in
12118 comment.
12119
3a3fd0fd
PA
121202017-04-19 Pedro Alves <palves@redhat.com>
12121
12122 * common/refcounted-object.h: New file.
12123 * gdbthread.h: Include "common/refcounted-object.h".
12124 (thread_info): Inherit from refcounted_object and add comments.
12125 (thread_info::incref, thread_info::decref)
12126 (thread_info::m_refcount): Delete.
12127 (thread_info::deletable): Use the refcounted_object::refcount()
12128 method.
12129 * inferior.c (current_inferior_): Add comment.
12130 (set_current_inferior): Increment/decrement refcounts.
12131 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12132 not-deletable instead of comparing with the current inferior.
12133 (initialize_inferiors): Increment the initial inferior's refcount.
12134 * inferior.h (struct inferior): Forward declare.
12135 Include "common/refcounted-object.h".
12136 (current_inferior, set_current_inferior): Move declaration to
12137 before struct inferior's definition, and fix comment.
12138 (inferior): Inherit from refcounted_object. Add comments.
12139 * thread.c (switch_to_thread_no_regs): Reference the thread's
12140 inferior pointer directly instead of doing a ptid lookup.
12141 (switch_to_no_thread): New function.
12142 (switch_to_thread(thread_info *)): New function, factored out
12143 from ...
12144 (switch_to_thread(ptid_t)): ... this.
12145 (restore_current_thread): Delete.
12146 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12147 fields, and add 'inf' field.
12148 (do_restore_current_thread_cleanup): Check whether old->inf is
12149 alive instead of looking up an inferior by ptid. Use
12150 switch_to_thread and switch_to_no_thread.
12151 (restore_current_thread_cleanup_dtor): Use old->inf directly
12152 instead of lookup up an inferior by id. Decref the inferior.
12153 Don't restore 'removable'.
12154 (make_cleanup_restore_current_thread): Same the inferior pointer
12155 in old, instead of the inferior number. Incref the inferior.
12156 Don't save/clear 'removable'.
12157
9bcb1f16
PA
121582017-04-19 Pedro Alves <palves@redhat.com>
12159
12160 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12161 unittests/scoped_restore-selftests.c.
12162 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12163 * common/scoped_restore.h (scoped_restore_base): Make "class".
12164 (scoped_restore_base::release): New public method.
12165 (scoped_restore_base::scoped_restore_base): New protected ctor.
12166 (scoped_restore_base::m_saved_var): New protected field.
12167 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12168 scoped_restore_base base class instead of m_saved_var directly.
12169 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12170 (scoped_restore_tmpl::scoped_restore_tmpl(const
12171 scoped_restore_tmpl<T>&)): Likewise.
12172 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12173 method.
12174 (scoped_restore_tmpl::saved_var): New method.
12175 (scoped_restore_tmpl::m_saved_var): Delete.
12176 * inferior.h (inferior::detaching): Now a bool.
12177 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12178 cleanup.
12179 * unittests/scoped_restore-selftests.c: New file.
12180
26fcd539
PA
121812017-04-19 Pedro Alves <palves@redhat.com>
12182
12183 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12184 Re-sort in alphabetic order.
12185
fdd243b0
PA
121862017-04-18 Pedro Alves <palves@redhat.com>
12187
12188 * xml-support.c (obstack_xml_printf): Delete.
12189 * xml-support.h (obstack_xml_printf): Delete.
12190
4895cde2
PA
121912017-04-18 Pedro Alves <palves@redhat.com>
12192
12193 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12194 vdebug, verror, body_text, start_element, end_element, name,
12195 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12196 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12197 is_xinclude>: Make private and add m_ prefix.
12198 (gdb_xml_parser::body_text): New method, based on ...
12199 (gdb_xml_body_text): ... this. Adjust.
12200 (gdb_xml_parser::vdebug): New method, based on ...
12201 (gdb_xml_debug): ... this. Adjust.
12202 (gdb_xml_parser::verror): New method, based on ...
12203 (gdb_xml_error): ... this. Adjust.
12204 (gdb_xml_parser::start_element): New method, based on ...
12205 (gdb_xml_start_element): ... this. Adjust.
12206 (gdb_xml_start_element_wrapper): Defer to
12207 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12208 (gdb_xml_parser::end_element): New method, based on ...
12209 (gdb_xml_end_element_wrapper): ... this. Adjust.
12210 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12211 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12212 (gdb_xml_parser::use_dtd): New method, based on ...
12213 (gdb_xml_use_dtd): ... this. Adjust.
12214 (gdb_xml_parser::parse): New method, based on ...
12215 (gdb_xml_parse): ... this. Adjust.
12216 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12217 (xinclude_start_include): Adjust to call the parser's name method.
12218 (xml_xinclude_default, xml_xinclude_start_doctype)
12219 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12220 method.
12221 (xml_process_xincludes): Adjust to call parser methods.
12222 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12223 declarations.
12224
bd8a901f
PA
122252017-04-18 Pedro Alves <palves@redhat.com>
12226
12227 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12228 gdb::optional<std::string>.
12229 * xml-support.c: Include <string>.
12230 (scope_level::scope_level(scope_level &&))
12231 (scope_level::~scope_level): Delete.
12232 (scope_level::body): Now a std::string.
12233 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12234 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12235 parameter.
12236 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12237 (xinclude_parsing_data::output): Now a std::string reference.
12238 (xinclude_start_include): Adjust.
12239 (xml_xinclude_default): Adjust.
12240 (xml_process_xincludes): Add 'output' parameter, and return bool.
12241 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12242 and return bool.
12243 * xml-tdesc.c: Include <unordered_map> and <string>.
12244 (tdesc_xml_cache): Delete.
12245 (tdesc_xml_cache_s): Delete.
12246 (xml_cache): Now an std::unordered_map.
12247 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12248 (target_fetch_description_xml): Change return type to
12249 gdb::optional<std::string>, and adjust.
12250 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12251 (target_fetch_description_xml): Change return type to
12252 gdb::optional<std::string>.
12253
d35d1958
PA
122542017-04-18 Pedro Alves <palves@redhat.com>
12255
12256 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12257 unittests/optional-selftests.c.
12258 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12259 * unittests/optional-selftests.c: New file.
12260 * unittests/optional/assignment/1.cc: New file.
12261 * unittests/optional/assignment/2.cc: New file.
12262 * unittests/optional/assignment/3.cc: New file.
12263 * unittests/optional/assignment/4.cc: New file.
12264 * unittests/optional/assignment/5.cc: New file.
12265 * unittests/optional/assignment/6.cc: New file.
12266 * unittests/optional/assignment/7.cc: New file.
12267 * unittests/optional/cons/copy.cc: New file.
12268 * unittests/optional/cons/default.cc: New file.
12269 * unittests/optional/cons/move.cc: New file.
12270 * unittests/optional/cons/value.cc: New file.
12271 * unittests/optional/in_place.cc: New file.
12272 * unittests/optional/observers/1.cc: New file.
12273 * unittests/optional/observers/2.cc: New file.
12274
22796e97
PA
122752017-04-18 Pedro Alves <palves@redhat.com>
12276
12277 * common/gdb_optional.h: Include common/traits.h.
12278 (in_place_t): New type.
12279 (in_place): New constexpr variable.
12280 (optional::optional): Remove member initialization of
12281 m_instantiated.
12282 (optional::optional(in_place_t...)): New constructor.
12283 (optional::~optional): Use reset.
12284 (optional::optional(const optional&)): New.
12285 (optional::optional(const optional&&)): New.
12286 (optional::optional(T &)): New.
12287 (optional::optional(T &&)): New.
12288 (operator::operator=(const optional &)): New.
12289 (operator::operator=(optional &&)): New.
12290 (operator::operator= (const T &))
12291 (operator::operator= (T &&))
12292 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12293 (operator::reset): New.
12294 (operator::m_instantiated):: Add in-class initializer.
12295 * common/traits.h: Include <type_traits>.
12296 (struct And): New types.
12297
a7fc9b61
PA
122982017-04-18 Pedro Alves <palves@redhat.com>
12299
12300 * xml-support.c: Include <vector>.
12301 (scope_level::scope_level(const gdb_xml_element *))
12302 (scope_level::scope_level(scope_level&&)): New.
12303 (scope_level::~scope_level): New.
12304 (scope_level_s): Delete.
12305 (gdb_xml_parser::scopes): Now a std::vector.
12306 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12307 Use std::vector.
12308 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12309 scope cleanup code.
12310 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12311 of the scopes member. Use std::vector::emplace_back.
12312
010151c9
PA
123132017-04-18 Pedro Alves <palves@redhat.com>
12314
12315 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12316 a bool.
12317 (gdb_xml_end_element): Change type of first parameter.
12318 (gdb_xml_cleanup): Rename to ...
12319 (gdb_xml_parser::~gdb_xml_parser): ... this.
12320 (gdb_xml_create_parser_and_cleanup): Delete with ...
12321 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12322 to this new ctor.
12323 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12324 using gdb_xml_create_parser_and_cleanup.
12325 (xinclude_parsing_data): Add ctor/dtor.
12326 (xml_xinclude_cleanup): Delete.
12327 (xml_process_xincludes): Create a local xinclude_parsing_data
12328 instead of heap-allocating one. Create a local gdb_xml_parser
12329 instead of heap-allocating one with
12330 gdb_xml_create_parser_and_cleanup.
12331
d56060f0
JB
123322017-04-18 John Baldwin <jhb@FreeBSD.org>
12333
12334 PR threads/20743
12335 * fbsd-nat.c (resume_one_thread_cb): Remove.
12336 (resume_all_threads_cb): Remove.
12337 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12338 iterate_over_threads.
12339
305d16a9
JB
123402017-04-17 Joel Brobecker <brobecker@adacore.com>
12341
12342 * NEWS: Create a new section for the next release branch.
12343 Rename the section of the current branch, now that it has
12344 been cut.
12345
8bb57231
JB
123462017-04-17 Joel Brobecker <brobecker@adacore.com>
12347
12348 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12349 * version.in: Bump version to 8.0.50.DATE-git.
12350
096c92dd
SDJ
123512017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12352
12353 PR gdb/21385
12354 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12355 independently of the host, and fix build breakage on Cygwin.
12356
0550c955
PA
123572017-04-13 Pedro Alves <palves@redhat.com>
12358
12359 * inferior.c (free_inferior): Convert to ...
12360 (inferior::~inferior): ... this dtor.
12361 (inferior::inferior): New ctor, factored out from ...
12362 (add_inferior_silent): ... here. Allocate the inferior with a new
12363 expression.
12364 (delete_inferior): Call delete instead of free_inferior.
12365 * inferior.h (gdb_environ, continuation): Forward declare.
12366 (inferior): Now a class. Add in-class initialization to all
12367 members. Make boolean fields bool, except 'detaching'.
12368 (inferior::inferior): New explicit ctor.
12369 (inferior::~inferior): New.
12370
e3d60dfc
PA
123712017-04-13 Pedro Alves <palves@redhat.com>
12372
12373 * inferior.c (init_inferior_list): Delete.
12374 * inferior.h (init_inferior_list): Delete.
12375
5fd69d0a
PA
123762017-04-13 Pedro Alves <palves@redhat.com>
12377
12378 PR threads/13217
12379 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12380 (top level): Call it twice, with different thread sets.
12381
c6609450
PA
123822017-04-13 Pedro Alves <palves@redhat.com>
12383
12384 * thread.c: Include <algorithm>.
12385 (thread_array_cleanup): Delete.
12386 (scoped_inc_dec_ref): New class.
12387 (live_threads_count): New function.
12388 (set_thread_refcount): Delete.
12389 (tp_array_compar_ascending): Now a bool.
12390 (tp_array_compar): Convert to a std::sort comparison function.
12391 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12392 and live_threads_count.
12393
2a00d7ce
PA
123942017-04-13 Pedro Alves <palves@redhat.com>
12395
12396 * infrun.c (follow_fork_inferior): Also switch the current
12397 inferior.
12398
441d7c93
PA
123992017-04-13 Pedro Alves <palves@redhat.com>
12400
12401 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12402 before calling create_internal_breakpoint.
12403
808480f6
PA
124042017-04-13 Pedro Alves <palves@redhat.com>
12405
12406 * fork-child.c (execv_argv): New class.
12407 (breakup_args): Refactored as ...
12408 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12409 Copy arguments to storage and replace separators with NULL
12410 terminators in place.
12411 (escape_bang_in_quoted_argument): Adjust to return bool.
12412 (execv_argv::execv_argv): New ctor.
12413 (execv_argv::init_for_shell): New method, factored out from
12414 fork_inferior. Don't strdup strings into the vector.
12415 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12416 Remove free_vector_argv call.
12417
ad3d022a
YQ
124182017-04-13 Yao Qi <yao.qi@linaro.org>
12419
12420 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12421 tdep->rx_psw_type.
12422
e6ddc3bf
YQ
124232017-04-13 Yao Qi <yao.qi@linaro.org>
12424
12425 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12426 * rx-tdep.c (rx_gdbarch_init): Likewise.
12427
bfb8cf90
PA
124282017-04-13 Pedro Alves <palves@redhat.com>
12429
12430 * breakpoint.h (struct breakpoint): Reindent.
12431
f5336ca5
PA
124322017-04-13 Pedro Alves <palves@redhat.com>
12433
12434 * breakpoint.c (bp_location): Rename to ...
12435 (bp_locations): ... this. All references updated.
12436 (bp_location_count): Rename to ...
12437 (bp_locations_count): ... this. All references updated.
12438 (bp_location_placed_address_before_address_max): Rename to ...
12439 (bp_locations_placed_address_before_address_max): ... this. All
12440 references updated.
12441 (bp_location_shadow_len_after_address_max): Rename to ...
12442 (bp_locations_shadow_len_after_address_max): ... this. All
12443 references updated.
12444 (bp_location_compare_addrs): Rename to ...
12445 (bp_locations_compare_addrs): ... this. All references updated.
12446 (bp_location_compare):Rename to ...
12447 (bp_locations_compare): ... this. All references updated.
12448 (bp_location_target_extensions_update): Rename to ...
12449 (bp_locations_target_extensions_update): ... this. All references
12450 updated.
12451
be628ab8
SDJ
124522017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12453
12454 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12455 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12456 'sgtty.h'.
12457 * common/gdb_termios.h: New file, with parts of "terminal.h".
12458 * inflow.c: Include "gdb_termios.h".
12459 * ser-unix.c: Include "gdb_termios.h".
12460 * terminal.h: Move terminal-related defines to
12461 "common/gdb_termios.h".
12462
8e9e35b1
TT
124632017-04-12 Tom Tromey <tom@tromey.com>
12464
12465 * probe.c (parse_probes): Update.
12466 * location.h (delete_event_location): Don't declare.
12467 (event_location_deleter::operator()): Update.
12468 * location.c (event_location_deleter::operator()): Rename from
12469 delete_event_location.
12470 * linespec.h (linespec_result) <location>: Change type to
12471 event_location_up.
12472 * linespec.c (canonicalize_linespec, event_location_to_sals)
12473 (decode_objc): Update.
12474 (linespec_result): Don't call delete_event_location.
12475 * breakpoint.c (create_breakpoints_sal)
12476 (bkpt_probe_create_sals_from_location)
12477 (strace_marker_create_sals_from_location): Update.
12478
16e802b9
TT
124792017-04-12 Tom Tromey <tom@tromey.com>
12480
12481 * linespec.h (struct linespec_result): Add constructor and
12482 destructor.
12483 (init_linespec_result, destroy_linespec_result)
12484 (make_cleanup_destroy_linespec_result): Don't declare.
12485 * linespec.c (init_linespec_result): Remove.
12486 (linespec_result::~linespec_result): Rename from
12487 destroy_linespec_result. Update.
12488 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12489 Remove.
12490 * breakpoint.c (create_breakpoint, break_range_command)
12491 (decode_location_default): Update.
12492 * ax-gdb.c (agent_command_1): Update.
12493
d28cd78a
TT
124942017-04-12 Tom Tromey <tom@tromey.com>
12495
12496 * remote.c (remote_download_tracepoint): Update.
12497 * python/py-breakpoint.c (bppy_get_location): Update.
12498 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12499 (gdbscm_breakpoint_location): Update.
12500 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12501 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12502 Change type to event_location_up.
12503 * breakpoint.c (create_overlay_event_breakpoint)
12504 (create_longjmp_master_breakpoint)
12505 (create_std_terminate_master_breakpoint)
12506 (create_exception_master_breakpoint)
12507 (breakpoint_event_location_empty_p, print_breakpoint_location)
12508 (print_one_breakpoint_location, create_thread_event_breakpoint)
12509 (init_breakpoint_sal, create_breakpoint)
12510 (print_recreate_ranged_breakpoint, break_range_command)
12511 (init_ada_exception_breakpoint, say_where): Update.
12512 (base_breakpoint_dtor): Don't call delete_event_location.
12513 (bkpt_print_recreate, tracepoint_print_recreate)
12514 (dprintf_print_recreate, update_static_tracepoint)
12515 (breakpoint_re_set_default): Update.
12516
711799d5
TT
125172017-04-12 Tom Tromey <tom@tromey.com>
12518
12519 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12520 type of "to_do". Update.
12521 (compute_stack_depth): Use std::vector.
12522
52d214d3
TT
125232017-04-12 Tom Tromey <tom@tromey.com>
12524
12525 * printcmd.c (find_instruction_backward): Use std::vector.
12526
4c404b8b
TT
125272017-04-12 Tom Tromey <tom@tromey.com>
12528
12529 * symfile.c (objfilep): Remove typedef.
12530 (reread_symbols): Use a std::vector.
12531
156d9eab
TT
125322017-04-12 Tom Tromey <tom@tromey.com>
12533
12534 * mi/mi-main.c (exec_direction_forward): Remove.
12535 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12536 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12537 scoped_restore.
12538 * guile/guile.c (guile_repl_command, guile_command)
12539 (gdbscm_execute_gdb_command): Use scoped_restore.
12540 * go-exp.y (go_parse): Use scoped_restore.
12541 * d-exp.y (d_parse): Use scoped_restore.
12542 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12543 * c-exp.y (c_parse): Use scoped_restore.
12544
4d89769a
TT
125452017-04-12 Tom Tromey <tom@tromey.com>
12546
12547 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12548 (mi_parse): Update return type.
12549 (mi_parse_free): Remove.
12550 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12551 (mi_parse::~mi_parse): Rename from mi_parse_free.
12552 (mi_parse_cleanup): Remove.
12553 (mi_parse): Return a unique_ptr. Use new.
12554 * mi/mi-main.c (mi_execute_command): Update.
12555
4b217cc7
TT
125562017-04-12 Tom Tromey <tom@tromey.com>
12557
12558 * location.c (explicit_location_lex_one): Return a
12559 unique_xmalloc_ptr.
12560 (string_to_explicit_location): Update. Remove cleanups.
12561
59d3651b
TT
125622017-04-12 Tom Tromey <tom@tromey.com>
12563
12564 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12565 (compare_value_and_voffset): Change type. Update.
12566 (compute_vtable_size): Change type of "offset_vec".
12567 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12568 (gnuv3_get_typeid): Remove extraneous declaration.
12569
b24b0d6c
TT
125702017-04-12 Tom Tromey <tom@tromey.com>
12571
12572 * charset.h (wchar_iterator): Fix comment.
12573
80a3b8c5
TT
125742017-04-12 Tom Tromey <tom@tromey.com>
12575
12576 * charset.c (iconv_wrapper): New class.
12577 (cleanup_iconv): Remove.
12578 (convert_between_encodings): Use it.
12579
c83dd867
TT
125802017-04-12 Tom Tromey <tom@tromey.com>
12581
12582 * symfile.h (increment_reading_symtab): Update type.
12583 * symfile.c (decrement_reading_symtab): Remove.
12584 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12585 * psymtab.c (psymtab_to_symtab): Update.
12586 * dwarf2read.c (dw2_instantiate_symtab): Update.
12587
0e8621a0
TT
125882017-04-12 Tom Tromey <tom@tromey.com>
12589
12590 * jit.c (struct jit_reader): Declare separately. Add constructor
12591 and destructor. Change type of "handle".
12592 (loaded_jit_reader): Define separately.
12593 (jit_reader_load): Update. New "new".
12594 (jit_reader_unload_command): Use "delete".
12595 * gdb-dlfcn.h (struct dlclose_deleter): New.
12596 (gdb_dlhandle_up): New typedef.
12597 (gdb_dlopen, gdb_dlsym): Update types.
12598 (gdb_dlclose): Remove.
12599 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12600 (gdb_dlsym): Change type of "handle".
12601 (make_cleanup_dlclose): Remove.
12602 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12603 * compile/compile-c-support.c (load_libcc): Update.
12604
67d89901
TT
126052017-04-12 Tom Tromey <tom@tromey.com>
12606
12607 * symtab.h (find_pcs_for_symtab_line): Change return type.
12608 * symtab.c (find_pcs_for_symtab_line): Change return type.
12609 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12610 type of "vec". Update.
12611 (ltpy_get_pcs_for_line): Update.
12612 * linespec.c (decode_digits_ordinary): Update.
12613
93921405
TT
126142017-04-12 Tom Tromey <tom@tromey.com>
12615
12616 * tracepoint.c (actions_command): Update.
12617 * python/python.c (python_command, python_interactive_command):
12618 Update.
12619 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12620 * guile/guile.c (guile_command): Update.
12621 * defs.h (read_command_lines, read_command_lines_1): Return
12622 command_line_up.
12623 (command_lines_deleter): New struct.
12624 (command_line_up): New typedef.
12625 * compile/compile.c (compile_code_command)
12626 (compile_print_command): Update.
12627 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12628 command_line_up.
12629 (make_cleanup_free_command_lines): Remove.
12630 * cli/cli-script.c (get_command_line, read_command_lines_1)
12631 (copy_command_lines): Return command_line_up.
12632 (while_command, if_command, read_command_lines, define_command)
12633 (document_command): Update.
12634 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12635 Remove.
12636 * breakpoint.h (breakpoint_set_commands): Change type of
12637 "commands".
12638 * breakpoint.c (breakpoint_set_commands): Change type of
12639 "commands". Update.
12640 (do_map_commands_command, update_dprintf_command_list)
12641 (create_tracepoint_from_upload): Update.
12642
ffc2605c
TT
126432017-04-12 Tom Tromey <tom@tromey.com>
12644
12645 * tracepoint.c (scope_info): Update.
12646 * spu-tdep.c (spu_catch_start): Update.
12647 * python/python.c (gdbpy_decode_line): Update.
12648 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12649 * python/py-breakpoint.c (bppy_init): Update.
12650 * probe.c (parse_probes): Update.
12651 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12652 * location.h (event_location_deleter): New struct.
12653 (event_location_up): New typedef.
12654 (new_linespec_location, new_address_location, new_probe_location)
12655 (new_explicit_location, copy_event_location)
12656 (string_to_event_location, string_to_event_location_basic)
12657 (string_to_explicit_location): Update return type.
12658 (make_cleanup_delete_event_location): Remove.
12659 * location.c (new_linespec_location, new_address_location)
12660 (new_probe_location, new_explicit_location, copy_event_location):
12661 Return event_location_up.
12662 (delete_event_location_cleanup)
12663 (make_cleanup_delete_event_location): Remove.
12664 (string_to_explicit_location, string_to_event_location_basic)
12665 (string_to_event_location): Return event_location_up.
12666 * linespec.c (canonicalize_linespec, event_location_to_sals)
12667 (decode_line_with_current_source)
12668 (decode_line_with_last_displayed, decode_objc): Update.
12669 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12670 * completer.c (location_completer): Update.
12671 * cli/cli-cmds.c (edit_command, list_command): Update.
12672 * breakpoint.c (create_overlay_event_breakpoint)
12673 (create_longjmp_master_breakpoint)
12674 (create_std_terminate_master_breakpoint)
12675 (create_exception_master_breakpoint)
12676 (create_thread_event_breakpoint): Update.
12677 (init_breakpoint_sal): Update. Remove some dead code.
12678 (create_breakpoint_sal): Change type of "location". Update.
12679 (create_breakpoints_sal, create_breakpoint, break_command_1)
12680 (dprintf_command, break_range_command, until_break_command)
12681 (init_ada_exception_breakpoint)
12682 (strace_marker_create_sals_from_location)
12683 (update_static_tracepoint, trace_command, ftrace_command)
12684 (strace_command, create_tracepoint_from_upload): Update.
12685 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12686 * ax-gdb.c (agent_command_1): Update.
12687
8f10c932
PA
126882017-04-12 Pedro Alves <palves@redhat.com>
12689
12690 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12691 * configure.tgt: Handle i[34567]86-*-go32* and
12692 i[34567]86-*-msdosdjgpp*.
12693 * i386-tdep.c (i386_svr4_reg_to_regnum):
12694 Make extern.
12695 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12696 i386-go32-tdep.c.
12697 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12698 * i386-go32-tdep.c: New file.
12699 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12700 declarations.
12701
0a31ccfb
SM
127022017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12703
12704 * aix-thread.c (pd_status2str): Change return type to const char *.
12705
e9bb3fbb
PA
127062017-04-12 Pedro Alves <palves@redhat.com>
12707
12708 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12709 calls to set_gdbarch_gnu_triplet_regexp.
12710
53375380
PA
127112017-04-12 Pedro Alves <palves@redhat.com>
12712
12713 PR gdb/21323
12714 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12715 New enum value.
12716 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12717 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12718 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12719 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12720 * gdbarch.h, gdbarch.c: Regenerate.
12721 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12722 gdbarch_wchar_bit and gdbarch_wchar_signed.
12723 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12724 * arm-tdep.c (arm_gdbarch_init): Likewise.
12725 * avr-tdep.c (avr_gdbarch_init): Likewise.
12726 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12727 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12728 * i386-tdep.c (i386_go32_init_abi): Likewise.
12729 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12730 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12731 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12732 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12733 * sh-tdep.c (sh_gdbarch_init): Likewise.
12734 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12735 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12736 * windows-tdep.c (windows_init_abi): Likewise.
12737 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12738
53e710ac
PA
127392017-04-12 Pedro Alves <palves@redhat.com>
12740
12741 PR c++/21323
12742 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12743 cplus_primitive_type_char32_t>: New enum values.
12744 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12745 and cplus_primitive_type_char32_t.
12746 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12747 32, use the archtecture's built-in type for char16_t and char32_t,
12748 respectively. Otherwise, fallback to init_integer_type as before,
12749 but make the type unsigned, and issue a complaint.
12750 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12751
ab0538b8
AH
127522017-04-12 Alan Hayward <alan.hayward@arm.com>
12753
5e0e0422 12754 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12755 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12756
5430098f
SDJ
127572017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12758
12759 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12760 'const char *'.
12761
7c5ded6a
SDJ
127622017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12763
12764 * common/common-utils.c (free_vector_argv): New function.
12765 * common/common-utils.h: Include <vector>.
12766 (free_vector_argv): New prototype.
12767 * darwin-nat.c (darwin_create_inferior): Rewrite function
12768 prototype in order to constify "exec_file" and accept a
12769 "std::string" for "allargs".
12770 * fork-child.c: Include <vector>.
12771 (breakup_args): Rewrite function, using C++.
12772 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12773 and accept "std::string" for "allargs". Update the code to
12774 calculate "argv" based on "allargs". Update calls to "exec_fun"
12775 and "execvp".
12776 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12777 order to constify "exec_file" and accept a "std::string" for
12778 "allargs".
12779 * go32-nat.c (go32_create_inferior): Likewise.
12780 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12781 * infcmd.c (run_command_1): Constify "exec_file". Use
12782 "std::string" for inferior arguments.
12783 * inferior.h (fork_inferior): Update prototype.
12784 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12785 prototype in order to constify "exec_file" and accept a
12786 "std::string" for "allargs".
12787 * nto-procfs.c (procfs_create_inferior): Likewise.
12788 * procfs.c (procfs_create_inferior): Likewise.
12789 * remote-sim.c (gdbsim_create_inferior): Likewise.
12790 * remote.c (extended_remote_run): Update code to accept
12791 "std::string" as argument.
12792 (extended_remote_create_inferior): Rewrite function prototype in
12793 order to constify "exec_file" and accept a "std::string" for
12794 "allargs".
12795 * rs6000-nat.c (super_create_inferior): Likewise.
12796 (rs6000_create_inferior): Likewise.
12797 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12798 * windows-nat.c (windows_create_inferior): Likewise.
12799
ae0eee42
PA
128002017-04-11 Pedro Alves <palves@redhat.com>
12801
12802 * thread.c: Fix whitespace throughout.
12803
a6acac06
PR
128042017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12805
12806 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12807
64403bd1
AH
128082017-04-11 Alan Hayward <alan.hayward@arm.com>
12809
12810 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12811
a5bef50f
SDJ
128122017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12813
12814 PR gdb/21364
12815 * osdata.c (info_osdata): Check if 'type' is an empty string
12816 instead of NULL.
12817
9295a5a9
PA
128182017-04-10 Pedro Alves <palves@redhat.com>
12819
12820 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12821 (ptid_to_global_thread_id, in_thread_list)
12822 (do_captured_list_thread_ids, set_resumed, set_running)
12823 (set_executing, set_stop_requested, finish_thread_state)
12824 (validate_registers_access, can_access_registers_ptid)
12825 (print_thread_info_1, switch_to_thread)
12826 (do_restore_current_thread_cleanup)
12827 (make_cleanup_restore_current_thread, thread_command)
12828 (thread_name_command): Use operator== instead of ptid_equal.
12829
996812e3
PA
128302017-04-10 Pedro Alves <palves@redhat.com>
12831
12832 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12833 (current_thread_cleanup_chain): Delete.
12834 (restore_current_thread_cleanup_dtor)
12835 (make_cleanup_restore_current_thread): Remove references to
12836 current_thread_cleanup_chain.
12837
845b344f
AH
128382017-04-10 Alan Hayward <alan.hayward@arm.com>
12839
12840 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12841 REG_UNKNOWN.
12842
803bdfe4
YQ
128432017-04-10 Yao Qi <yao.qi@linaro.org>
12844
12845 PR gdb/19942
12846 * gdbthread.h (thread_info::deletable): New method.
12847 (thread_info::incref): New method.
12848 (thread_info::decref): New method.
12849 (thread_info::refcount): Move it to private.
12850 * infrun.c (save_stop_context): Call inc_refcount.
12851 (release_stop_context_cleanup): Likewise.
12852 * thread.c (set_thread_exited): New function.
12853 (init_thread_list): Delete "tp" only it is deletable, otherwise
12854 call set_thread_exited.
12855 (delete_thread_1): Call set_thread_exited.
12856 (current_thread_cleanup) <inferior_pid>: Remove.
12857 <thread>: New field.
12858 (restore_current_thread_ptid_changed): Removed.
12859 (do_restore_current_thread_cleanup): Adjust.
12860 (restore_current_thread_cleanup_dtor): Don't call
12861 find_thread_ptid.
12862 (set_thread_refcount): Use dec_refcount.
12863 (make_cleanup_restore_current_thread): Adjust.
12864 (thread_apply_all_command): Call inc_refcount.
12865 (_initialize_thread): Don't call
12866 observer_attach_thread_ptid_changed.
12867
8c25b497
YQ
128682017-04-10 Yao Qi <yao.qi@linaro.org>
12869
12870 * thread.c (delete_thread_1): Hoist code on marking thread as
12871 exited.
12872
8473b447
SM
128732017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12874
12875 * windows-nat.c (windows_detach): Initialize ptid with
12876 minus_one_ptid.
12877
6670ec13
SM
128782017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12879
12880 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12881
ba2f91bb
AH
128822017-04-07 Alan Hayward <alan.hayward@arm.com>
12883
12884 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12885 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12886 (bfin_pseudo_register_write): Likewise
12887
436252de
SM
128882017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12889
12890 * common/ptid.h (struct ptid): Change to...
12891 (class ptid_t): ... this.
12892 <ptid_t>: New constructors.
12893 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12894 matches>: New methods.
12895 <make_null, make_minus_one>: New static methods.
12896 <pid>: Rename to...
12897 <m_pid>: ...this.
12898 <lwp>: Rename to...
12899 <m_lwp>: ...this.
12900 <tid>: Rename to...
12901 <m_tid>: ...this.
12902 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12903 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12904 as references, move comment to class ptid_t.
12905 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12906 ptid_t static methods.
12907 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12908 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12909 Take ptid arguments as references, implement using ptid_t methods.
12910 * unittests/ptid-selftests.c: New file.
12911 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12912 unittests/ptid-selftests.c.
12913 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12914
0dedf377
TP
129152017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12916
12917 * python/python.c (python_run_simple_file): Cast mode literal to
12918 non-const char pointer as expected by PyFile_FromString.
12919
4e9868d4
SM
129202017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12921
12922 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12923 minus_one_ptid and null_ptid.
12924
9bf2a700
PA
129252017-04-05 Pedro Alves <palves@redhat.com>
12926
12927 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12928 * configure: Regenerate.
12929
a121b7c1
PA
129302017-04-05 Pedro Alves <palves@redhat.com>
12931
12932 * ada-exp.y (yyerror): Constify.
12933 * ada-lang.c (bound_name, get_selections)
12934 (ada_variant_discrim_type)
12935 (ada_variant_discrim_name, ada_value_struct_elt)
12936 (ada_lookup_struct_elt_type, is_unchecked_variant)
12937 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12938 (catch_ada_exception_command_split)
12939 (catch_ada_assert_command_split, catch_assert_command)
12940 (ada_op_name): Constify.
12941 * ada-lang.h (ada_yyerror, get_selections)
12942 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12943 * arc-tdep.c (arc_print_frame_cache): Constify.
12944 * arm-tdep.c (arm_skip_stub): Constify.
12945 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12946 (gen_aggregate_elt_ref): Constify.
12947 * bcache.c (print_bcache_statistics): Constify.
12948 * bcache.h (print_bcache_statistics): Constify.
12949 * break-catch-throw.c (catch_exception_command_1):
12950 * breakpoint.c (struct ep_type_description::description):
12951 Constify.
12952 (add_solib_catchpoint): Constify.
12953 (catch_fork_command_1): Add cast.
12954 (add_catch_command): Constify.
12955 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12956 Constify.
12957 * bsd-uthread.c (bsd_uthread_state): Constify.
12958 * buildsym.c (patch_subfile_names): Constify.
12959 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12960 Constify.
12961 * c-exp.y (yyerror): Constify.
12962 (token::oper): Constify.
12963 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12964 * c-varobj.c (cplus_describe_child): Constify.
12965 * charset.c (find_charset_names): Add cast.
12966 (find_charset_names): Constify array and add const_cast.
12967 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12968 (edit_command): Constify.
12969 * cli/cli-decode.c (lookup_cmd): Constify.
12970 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12971 Constify.
12972 (struct dump_context): Constify.
12973 (add_dump_command, restore_command): Constify.
12974 * cli/cli-script.c (get_command_line): Constify.
12975 * cli/cli-script.h (get_command_line): Constify.
12976 * cli/cli-utils.c (check_for_argument): Constify.
12977 * cli/cli-utils.h (check_for_argument): Constify.
12978 * coff-pe-read.c (struct read_pe_section_data): Constify.
12979 * command.h (lookup_cmd): Constify.
12980 * common/print-utils.c (decimal2str): Constify.
12981 * completer.c (gdb_print_filename): Constify.
12982 * corefile.c (set_gnutarget): Constify.
12983 * cp-name-parser.y (yyerror): Constify.
12984 * cp-valprint.c (cp_print_class_member): Constify.
12985 * cris-tdep.c (cris_register_name, crisv32_register_name):
12986 Constify.
12987 * d-exp.y (yyerror): Constify.
12988 (struct token::oper): Constify.
12989 * d-lang.h (d_yyerror): Constify.
12990 * dbxread.c (struct header_file_location::name): Constify.
12991 (add_old_header_file, add_new_header_file, last_function_name)
12992 (dbx_next_symbol_text, add_bincl_to_list)
12993 (find_corresponding_bincl_psymtab, set_namestring)
12994 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12995 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12996 * defs.h (command_line_input, print_address_symbolic)
12997 (deprecated_readline_begin_hook): Constify.
12998 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12999 Constify.
13000 * event-top.c (handle_line_of_input): Constify and add cast.
13001 * exceptions.c (catch_errors): Constify.
13002 * exceptions.h (catch_errors): Constify.
13003 * expprint.c (print_subexp_standard, op_string, op_name)
13004 (op_name_standard, dump_raw_expression, dump_raw_expression):
13005 * expression.h (op_name, op_string, dump_raw_expression):
13006 Constify.
13007 * f-exp.y (yyerror): Constify.
13008 (struct token::oper): Constify.
13009 (struct f77_boolean_val::name): Constify.
13010 * f-lang.c (f_word_break_characters): Constify.
13011 * f-lang.h (f_yyerror): Constify.
13012 * fork-child.c (fork_inferior): Add cast.
13013 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13014 (new_variant): Constify.
13015 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13016 * gdbarch.c: Regenerate.
13017 * gdbcore.h (set_gnutarget): Constify.
13018 * go-exp.y (yyerror): Constify.
13019 (token::oper): Constify.
13020 * go-lang.h (go_yyerror): Constify.
13021 * go32-nat.c (go32_sysinfo): Constify.
13022 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13023 * guile/scm-cmd.c (cmdscm_function): Constify.
13024 * guile/scm-param.c (pascm_param_value): Constify.
13025 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13026 (h8300sx_register_name): Constify.
13027 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13028 Constify.
13029 * ia64-tdep.c (ia64_register_names): Constify.
13030 * infcmd.c (construct_inferior_arguments): Constify.
13031 (path_command, attach_post_wait): Constify.
13032 * language.c (show_range_command, show_case_command)
13033 (unk_lang_error): Constify.
13034 * language.h (language_defn::la_error)
13035 (language_defn::la_name_of_this): Constify.
13036 * linespec.c (decode_line_2): Constify.
13037 * linux-thread-db.c (thread_db_err_str): Constify.
13038 * lm32-tdep.c (lm32_register_name): Constify.
13039 * m2-exp.y (yyerror): Constify.
13040 * m2-lang.h (m2_yyerror): Constify.
13041 * m32r-tdep.c (m32r_register_names): Constify and make static.
13042 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13043 * m88k-tdep.c (m88k_register_name): Constify.
13044 * macroexp.c (appendmem): Constify.
13045 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13046 (upgrade_type, parse_external, parse_partial_symbols)
13047 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13048 (new_symbol): Constify.
13049 * memattr.c (mem_info_command): Constify.
13050 * mep-tdep.c (register_name_from_keyword): Constify.
13051 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13052 Constify.
13053 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13054 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13055 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13056 cast.
13057 (mi_execute_async_cli_command): Constify.
13058 * mips-tdep.c (mips_register_name): Constify.
13059 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13060 (am33_register_name, am33_2_register_name)
13061 * moxie-tdep.c (moxie_register_names): Constify.
13062 * nat/linux-osdata.c (osdata_type): Constify fields.
13063 * nto-tdep.c (nto_parse_redirection): Constify.
13064 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13065 (lookup_child_selector): Constify.
13066 (objc_methcall::name): Constify.
13067 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13068 (lookup_struct_typedef): Constify.
13069 * objfiles.c (pc_in_section): Constify.
13070 * objfiles.h (pc_in_section): Constify.
13071 * p-exp.y (struct token::oper): Constify.
13072 (yyerror): Constify.
13073 * p-lang.h (pascal_yyerror): Constify.
13074 * parser-defs.h (op_name_standard): Constify.
13075 (op_print::string): Constify.
13076 (exp_descriptor::op_name): Constify.
13077 * printcmd.c (print_address_symbolic): Constify.
13078 * psymtab.c (print_partial_symbols): Constify.
13079 * python/py-breakpoint.c (stop_func): Constify.
13080 (bppy_get_expression): Constify.
13081 * python/py-cmd.c (cmdpy_completer::name): Constify.
13082 (cmdpy_function): Constify.
13083 * python/py-event.c (evpy_add_attribute)
13084 (gdbpy_initialize_event_generic): Constify.
13085 * python/py-event.h (evpy_add_attribute)
13086 (gdbpy_initialize_event_generic): Constify.
13087 * python/py-evts.c (add_new_registry): Constify.
13088 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13089 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13090 * python/py-inferior.c (get_buffer): Add cast.
13091 * python/py-param.c (parm_constant::name): Constify.
13092 * python/py-unwind.c (fprint_frame_id): Constify.
13093 * python/python.c (gdbpy_parameter_value): Constify.
13094 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13095 * remote.c (memory_packet_config::name): Constify.
13096 (show_packet_config_cmd, remote_write_bytes)
13097 (remote_buffer_add_string):
13098 * reverse.c (exec_reverse_once): Constify.
13099 * rs6000-tdep.c (variant::name, variant::description): Constify.
13100 * rust-exp.y (rustyyerror): Constify.
13101 * rust-lang.c (rust_op_name): Constify.
13102 * rust-lang.h (rustyyerror): Constify.
13103 * serial.h (serial_ops::name): Constify.
13104 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13105 (sh_sh3e_register_name, sh_sh2e_register_name)
13106 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13107 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13108 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13109 (sh_sh4al_dsp_register_name): Constify.
13110 * sh64-tdep.c (sh64_register_name): Constify.
13111 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13112 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13113 * stabsread.c (patch_block_stabs, read_type_number)
13114 (ref_map::stabs, ref_add, process_reference)
13115 (symbol_reference_defined, define_symbol, define_symbol)
13116 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13117 (read_one_struct_field, read_struct_fields, read_baseclasses)
13118 (read_tilde_fields, read_struct_type, read_array_type)
13119 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13120 (read_huge_number, read_range_type, read_args, common_block_start)
13121 (find_name_end): Constify.
13122 * stabsread.h (common_block_start, define_symbol)
13123 (process_one_symbol, symbol_reference_defined, ref_add):
13124 * symfile.c (get_section_index, add_symbol_file_command):
13125 * symfile.h (get_section_index): Constify.
13126 * target-descriptions.c (tdesc_type::name): Constify.
13127 (tdesc_free_type): Add cast.
13128 * target.c (find_default_run_target):
13129 (add_deprecated_target_alias, find_default_run_target)
13130 (target_announce_detach): Constify.
13131 (do_option): Constify.
13132 * target.h (add_deprecated_target_alias): Constify.
13133 * thread.c (print_thread_info_1): Constify.
13134 * top.c (deprecated_readline_begin_hook, command_line_input):
13135 Constify.
13136 (init_main): Add casts.
13137 * top.h (handle_line_of_input): Constify.
13138 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13139 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13140 (tfind_command): Rename to ...
13141 (tfind_command_1): ... this and constify.
13142 (tfind_command): New function.
13143 (tfind_end_command, tfind_start_command): Adjust.
13144 (encode_source_string): Constify.
13145 * tracepoint.h (encode_source_string): Constify.
13146 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13147 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13148 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13149 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13150 * tui/tui-win.c (parse_scrolling_args): Constify.
13151 * tui/tui-windata.c (tui_erase_data_content): Constify.
13152 * tui/tui-windata.h (tui_erase_data_content): Constify.
13153 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13154 * tui/tui.c (tui_enable): Add cast.
13155 * utils.c (defaulted_query): Constify.
13156 (init_page_info): Add cast.
13157 (puts_debug, subset_compare): Constify.
13158 * utils.h (subset_compare): Constify.
13159 * varobj.c (varobj_format_string): Constify.
13160 * varobj.h (varobj_format_string): Constify.
13161 * vax-tdep.c (vax_register_name): Constify.
13162 * windows-nat.c (windows_detach): Constify.
13163 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13164 * xml-support.c (gdb_xml_end_element): Constify.
13165 * xml-tdesc.c (tdesc_start_reg): Constify.
13166 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13167 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13168 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13169
995816ba
PA
131702017-04-05 Pedro Alves <palves@redhat.com>
13171
13172 * proc-api.c (struct trans): Constify.
13173 (procfs_note): Constify.
13174 * proc-events.c (struct trans, syscall_table):
13175 * proc-flags.c (struct trans): Constify.
13176 * proc-utils.h (procfs_note): Constify.
13177 * proc-why.c (struct trans): Constify.
13178 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13179 (procfs_detach): Constify.
13180 * sol-thread.c (struct string_map): Constify.
13181 (td_err_string, td_state_string): Constify.
13182
3e83a920
PA
131832017-04-05 Pedro Alves <palves@redhat.com>
13184
13185 * proc-api.c (procfs_filename): Don't initialize
13186 procfs_filename.
13187 (prepare_to_trace): Assume procfs_filename is non-NULL.
13188 (_initialize_proc_api): Give procfs_filename a default value here.
13189
63160a43
PA
131902017-04-05 Pedro Alves <palves@redhat.com>
13191
13192 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13193 'cond_string' parameter.
13194 (extract_exception_regexp): Constify 'string' parameter.
13195 (catch_exception_command_1): Constify.
13196 * breakpoint.c (init_catchpoint)
13197 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13198 parameter.
13199 (ep_parse_optional_if_clause, catch_fork_command_1)
13200 (catch_exec_command_1): Constify.
13201 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13202 parameter.
13203 (ep_parse_optional_if_clause): Constify.
13204 * cli/cli-utils.c (remove_trailing_whitespace)
13205 (check_for_argument): Constify.
13206 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13207 non-const overload.
13208 (check_for_argument): Likewise.
13209
9b2eba3d
PA
132102017-04-05 Pedro Alves <palves@redhat.com>
13211
13212 * event-top.c (command_line_handler): Add cast to execute_command
13213 call.
13214 * record-btrace.c (cmd_record_btrace_bts_start)
13215 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13216 (cmd_record_btrace_start): Add cast to execute_command call.
13217 * record-full.c (record_full_goto_insn):
13218 * record.c (record_start, record_stop): Add cast to
13219 execute_command_to_string calls.
13220 (cmd_record_start): Add cast to execute_command calls.
13221
2adadf51
PA
132222017-04-05 Pedro Alves <palves@redhat.com>
13223
13224 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13225 static inline function.
13226 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13227 array and use gdb_PyArg_ParseTupleAndKeywords.
13228 * python/py-cmd.c (cmdpy_init): Likewise.
13229 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13230 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13231 (infpy_search_memory): Likewise.
13232 * python/py-objfile.c (objfpy_add_separate_debug_file)
13233 (gdbpy_lookup_objfile): Likewise.
13234 * python/py-symbol.c (gdbpy_lookup_symbol)
13235 (gdbpy_lookup_global_symbol): Likewise.
13236 * python/py-type.c (gdbpy_lookup_type): Likewise.
13237 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13238 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13239 Likewise.
13240
0d1f4ceb
PA
132412017-04-05 Pedro Alves <palves@redhat.com>
13242
13243 * python/python-internal.h (gdb_PyGetSetDef): New type.
13244 * python/py-block.c (block_object_getset)
13245 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13246 * python/py-event.c (event_object_getset)
13247 (finish_breakpoint_object_getset): Likewise.
13248 * python/py-inferior.c (inferior_object_getset): Likewise.
13249 * python/py-infthread.c (thread_object_getset): Likewise.
13250 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13251 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13252 * python/py-objfile.c (objfile_getset): Likewise.
13253 * python/py-progspace.c (pspace_getset): Likewise.
13254 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13255 Likewise.
13256 * python/py-record.c (recpy_record_getset): Likewise.
13257 * python/py-symbol.c (symbol_object_getset): Likewise.
13258 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13259 Likewise.
13260 * python/py-type.c (type_object_getset, field_object_getset):
13261 Likewise.
13262 * python/py-value.c (value_object_getset): Likewise.
13263
4d759979
PA
132642017-04-05 Pedro Alves <palves@redhat.com>
13265
13266 * python/python-internal.h (gdb_PyObject_CallMethod)
13267 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13268 New functions.
13269 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13270 (PySys_GetObject, PySys_SetPath): New macros.
13271
fdf9e36f
PA
132722017-04-05 Pedro Alves <palves@redhat.com>
13273
13274 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13275 info_osdata_command.
13276 * osdata.c (info_osdata_command): Rename to ...
13277 (info_osdata): ... this. Constify 'type' parameter, and remove
13278 the 'from_tty' parameter. Accept NULL TYPE.
13279 (info_osdata_command): New function.
13280 * osdata.h (info_osdata_command): Remove declaration.
13281 (info_osdata): New declaration.
13282
9f33b8b7
PA
132832017-04-05 Pedro Alves <palves@redhat.com>
13284
13285 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13286 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13287 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13288 parameter.
13289 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13290 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13291 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13292 parameter.
13293 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13294 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13295 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13296 (mi_cmd_file_list_exec_source_files)
13297 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13298 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13299 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13300 parameter.
13301 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13302 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13303 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13304 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13305 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13306 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13307 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13308 'command' parameter.
13309 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13310 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13311 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13312 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13313 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13314 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13315 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13316 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13317 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13318 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13319 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13320 parameter.
13321 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13322 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13323 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13324 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13325 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13326 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13327 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13328 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13329 (mi_cmd_data_list_changed_registers)
13330 (mi_cmd_data_write_register_values)
13331 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13332 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13333 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13334 (mi_cmd_list_features, mi_cmd_list_target_features)
13335 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13336 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13337 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13338 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13339 (mi_cmd_trace_frame_collected): Constify 'command'
13340 parameter.
13341 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13342 'command' parameter.
13343
67cb5b2d
PA
133442017-04-05 Pedro Alves <palves@redhat.com>
13345
13346 * ada-lang.c (ada_completer_word_break_characters): Now a const
13347 array.
13348 (ada_get_gdb_completer_word_break_characters): Constify.
13349 * completer.c (gdb_completer_command_word_break_characters)
13350 (gdb_completer_file_name_break_characters)
13351 (gdb_completer_quote_characters): Now const arrays.
13352 (get_gdb_completer_quote_characters): Constify.
13353 (set_rl_completer_word_break_characters): New function.
13354 (set_gdb_completion_word_break_characters)
13355 (complete_line_internal): Use it.
13356 * completer.h (get_gdb_completer_quote_characters): Constify.
13357 (set_rl_completer_word_break_characters): Declare.
13358 * f-lang.c (f_word_break_characters): Constify.
13359 * language.c (default_word_break_characters): Constify.
13360 * language.h (language_defn::la_word_break_characters): Constify.
13361 (default_word_break_characters): Constify.
13362 * top.c (init_main): Use set_rl_completer_word_break_characters.
13363
7a114964
PA
133642017-04-05 Pedro Alves <palves@redhat.com>
13365
13366 * aix-thread.c (aix_thread_pid_to_str)
13367 (aix_thread_extra_thread_info): Constify.
13368 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13369 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13370 (bsd_uthread_pid_to_str): Constify.
13371 * corelow.c (core_pid_to_str): Constify.
13372 * darwin-nat.c (darwin_pid_to_str): Constify.
13373 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13374 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13375 Constify.
13376 * gnu-nat.c (gnu_pid_to_str): Constify.
13377 * go32-nat.c (go32_pid_to_str): Constify.
13378 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13379 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13380 * inferior.c (inferior_pid_to_str): Constify.
13381 * linux-nat.c (linux_nat_pid_to_str): Constify.
13382 * linux-tdep.c (linux_core_pid_to_str): Constify.
13383 * linux-thread-db.c (thread_db_pid_to_str)
13384 (thread_db_extra_thread_info): Constify.
13385 * nto-tdep.c (nto_extra_thread_info): Constify.
13386 * nto-tdep.h (nto_extra_thread_info): Constify.
13387 * obsd-nat.c (obsd_pid_to_str): Constify.
13388 * procfs.c (procfs_pid_to_str): Constify.
13389 * ravenscar-thread.c (ravenscar_extra_thread_info)
13390 (ravenscar_pid_to_str): Constify.
13391 * remote-sim.c (gdbsim_pid_to_str): Constify.
13392 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13393 Constify.
13394 * sol-thread.c (solaris_pid_to_str): Constify.
13395 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13396 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13397 * target.c (default_pid_to_str, target_pid_to_str)
13398 (normal_pid_to_str, default_pid_to_str): Constify.
13399 * target.h (target_ops::to_pid_to_str)
13400 (target_ops::to_extra_thread_info): Constify.
13401 (target_pid_to_str, normal_pid_to_str): Constify.
13402 * windows-nat.c (windows_pid_to_str): Constify.
13403 * gdbarch.sh (core_pid_to_str): Constify.
13404 * target-delegates.c: Regenerate.
13405 * gdbarch.h, gdbarch.c: Regenerate.
13406
69bbf465
PA
134072017-04-05 Pedro Alves <palves@redhat.com>
13408
13409 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13410 the memory of the temporary warning_pre_print override.
13411 * utils.c (warning_pre_print): Constify.
13412 * utils.h (warning_pre_print): Constify.
13413
be47f9e8
PA
134142017-04-05 Pedro Alves <palves@redhat.com>
13415
13416 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13417 (shell_command): New function.
13418 (make_command): Use std::string.
13419 (init_cli_cmds): Register shell_command instead of shell_escape.
13420
bde6261a
PA
134212017-04-05 Pedro Alves <palves@redhat.com>
13422
13423 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13424 * tracepoint.c (default_collect): Don't initialize.
13425
b38ef47f
PA
134262017-04-05 Pedro Alves <palves@redhat.com>
13427
13428 * macroexp.c (macro_buffer::shared): Now a bool.
13429 (init_buffer): Update.
13430 (init_shared_buffer): Constify 'addr' parameter.
13431 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13432 casts.
13433
f995bbe8
PA
134342017-04-05 Pedro Alves <palves@redhat.com>
13435
13436 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13437 * disasm.c (set_disassembler_options): Constify local.
13438 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13439
4a596fe2
SDJ
134402017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13441
13442 PR gdb/21352
13443 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13444 option.
13445
2cad08ea
YQ
134462017-04-05 Yao Qi <yao.qi@linaro.org>
13447
13448 * frame.c (frame_unwind_register_unsigned): Call
13449 frame_unwind_register_value.
13450
55a98976
YQ
134512017-04-05 Yao Qi <yao.qi@linaro.org>
13452
13453 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13454 Use gdb_test_multiple, and don't match anchor.
13455
4ac40124
PA
134562017-04-05 Pedro Alves <palves@redhat.com>
13457
13458 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13459 (Write After Approval): Remove Simon Marchi.
13460
c053b654
PA
134612017-04-05 Pedro Alves <palves@redhat.com>
13462
13463 * common/gdb_optional.h (optional::optional): Make constexpr and
13464 initialize m_dummy.
13465
4c7bf4f9
JB
134662017-04-04 John Baldwin <jhb@FreeBSD.org>
13467
13468 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13469 (amd64fbsd_jmp_buf_reg_offset): Remove.
13470 (amd64fbsd_supply_uthread): Remove function.
13471 (amd64fbsd_collect_uthread): Remove function.
13472 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13473 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13474 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13475 (fbsd-nat.c): Update comment.
13476 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13477 (i386fbsd_jmp_buf_reg_offset): Remove.
13478 (i386fbsd_supply_uthread): Remove function.
13479 (i386fbsd_collect_uthread): Remove function.
13480 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13481
1e1a8bef
JB
134822017-04-04 John Baldwin <jhb@FreeBSD.org>
13483
13484 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13485 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13486 * NEWS: Mention that support for FreeBSD/alpha was removed.
13487 * alpha-fbsd-tdep.c: Delete file.
13488 * config/alpha/fbsd.mh: Delete file.
13489 * configure.host: Delete alpha*-*-freebsd* and
13490 alpha*-*-kfreebsd*-gnu.
13491 * configure.tgt: Delete alpha*-*-freebsd* and
13492 alpha*-*-kfreebsd*-gnu.
13493
49907934
JB
134942017-04-04 John Baldwin <jhb@FreeBSD.org>
13495
13496 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13497 amd64bsd_store_inferior_registers): Use ptid from regcache.
13498
6f77053d
PA
134992017-04-04 Pedro Alves <palves@redhat.com>
13500
13501 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13502 data fields, make them private and add "m_" prefixes.
13503 (lnp_state_machine::lnp_state_machine): New ctor.
13504 (record_line, check_line_address, handle_set_discriminator)
13505 (handle_set_address, handle_advance_pc, handle_special_opcode)
13506 (handle_advance_line, handle_set_file, handle_negate_stmt)
13507 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13508 (end_sequence, advance_line): New methods.
13509 (m_gdbarch, m_record_lines_p): New fields.
13510 (lnp_reader_state): Delete.
13511 (dwarf_record_line): Rename to ...
13512 (lnp_state_machine::record_line): ... adjust.
13513 (init_lnp_state_machine): Delete.
13514 (lnp_state_machine::lnp_state_machine): New.
13515 (check_line_address): Rename to ...
13516 (lnp_state_machine::check_line_address): This.
13517 (dwarf_decode_lines_1): Remove reference to "reader_state".
13518 Adjust lnp_state_machine having a non-default ctor. Use bool.
13519 State machine internal state manipulation moved to
13520 lnp_state_machine methods.
13521
9c541725
PA
135222017-04-04 Pedro Alves <palves@redhat.com>
13523
13524 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13525 unittests/offset-type-selftests.c.
13526 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13527 * common/offset-type.h: New file.
13528 * common/preprocessor.h: New file.
13529 * common/traits.h: New file.
13530 * common/valid-expr.h: New file.
13531 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13532 sect_offset and cu_offset strong typedefs throughout.
13533 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13534 typedefs throughout.
13535 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13536 sect_offset and cu_offset strong typedefs throughout.
13537 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13538 typedefs throughout.
13539 * gdbtypes.h: Include "common/offset-type.h".
13540 (cu_offset): Now an offset type (strong typedef) instead of a
13541 struct.
13542 (sect_offset): Likewise.
13543 (union call_site_parameter_u): Rename "param_offset" field to
13544 "param_cu_off".
13545 * unittests/offset-type-selftests.c: New file.
13546
ecfb656c
PA
135472017-04-04 Pedro Alves <palves@redhat.com>
13548
13549 * common/underlying.h: New file.
13550 * dwarf2read.c: Include "common/gdb_optional.h" and
13551 "common/underlying.h".
13552 (dir_index, file_name_index): New types.
13553 (file_entry): Use them.
13554 (file_entry::include): Use to_underlying.
13555 (line_header::add_file_name): Use dir_index.
13556 (read_formatted_entries): Use gdb::optional. Read form before
13557 writting to file_entry.
13558 (dwarf_decode_line_header): Use dir_index.
13559 (lnp_state_machine::current_file): Use to_underlying.
13560 (lnp_state_machine::file): Change type to file_name_index.
13561 (dwarf_record_line): Use to_underlying.
13562 (init_lnp_state_machine): Use file_name_index.
13563 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13564
d194f1fe
PA
135652017-04-04 Pedro Alves <palves@redhat.com>
13566
13567 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13568 operator bool, has_value and get methods.
13569
fff8551c
PA
135702017-04-04 Pedro Alves <palves@redhat.com>
13571
13572 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13573 fields.
13574 (line_header): Initialize all data fields. Change type of
13575 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13576 Change type of include_dirs to std::vector<const char *>. Remove
13577 num_include_dirs, include_dirs_size. Change type of file_names to
13578 std::vector<file_entry>. Remove num_file_names, file_names_size.
13579 (line_header::line_header): New.
13580 (line_header::add_include_dir, line_header::add_file_name): New
13581 methods.
13582 (line_header::include_dir_at): Remove NULL check.
13583 (line_header::file_name_at): Add const overload.
13584 (line_header_up): New unique_ptr typedef.
13585 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13586 std::vector. Remove free_line_header call.
13587 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13588 free_line_header call.
13589 (free_cu_line_header): Delete.
13590 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13591 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13592 Adjust to use std::vector.
13593 (free_line_header): Delete.
13594 (free_line_header_voidp): Use delete.
13595 (add_include_dir): Replace with ...
13596 (line_header::add_include_dir): ... this method. Use std::vector.
13597 (add_file_name): Replace with ...
13598 (line_header::add_file_name): ... this method. Use std::vector.
13599 (add_include_dir_stub): Delete.
13600 (read_formatted_entries): Remove memset.
13601 (dwarf_decode_line_header): Return a line_header_up instead of a
13602 raw pointer. Remove cleanup handling. Pass lambdas to
13603 read_formatted_entries. Adjust to use line_header methods.
13604 (dwarf_decode_lines_1): Adjust to use line_header methods.
13605 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13606 use std::vector.
13607
d62a8ae2
SM
136082017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13609
13610 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13611 instead of struct ptid.
13612
db3a1dc7
AH
136132017-05-04 Alan Hayward <alan.hayward@arm.com>
13614
13615 * frame.c (get_frame_register_bytes): Unwind using value.
13616 (put_frame_register_bytes): Likewise.
13617
b1b45502
IB
136182017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13619
13620 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13621 aggregate-like.
13622
ec13808e
JK
136232017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13624
13625 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13626
12316564
YQ
136272017-03-29 Yao Qi <yao.qi@linaro.org>
13628
13629 * gdbthread.h (struct thread_info): Declare constructor and
13630 destructor. Add some in-class member initializers.
13631 * thread.c (free_thread): Remove.
13632 (init_thread_list): Call delete instead of free_thread.
13633 (new_thread): Call thread_info constructor.
13634 (thread_info::thread_info): New function.
13635 (thread_info::~thread_info): New function.
13636 (delete_thread_1): Call delete instead of free_thread.
13637 (make_cleanup_restore_current_thread): Move tp and frame to
13638 inner block.
13639
fe5f7374
AK
136402017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13641
13642 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13643 (arc_skip_prologue): Likewise.
13644 (arc_make_frame_cache): Likewise.
13645 (arc_pv_get_operand): New function.
13646 (arc_is_in_prologue): Likewise.
13647 (arc_analyze_prologue): Likewise.
13648 (arc_print_frame_cache): Likewise.
13649 (MAX_PROLOGUE_LENGTH): New constant.
13650
eea78757
AK
136512017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13652
13653 * configure.tgt: Add arc-insn.o.
13654 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13655 (dump_arc_instruction_command): New function.
13656 (arc_fprintf_disasm): Likewise.
13657 (arc_disassemble_info): Likewise.
13658 (arc_insn_get_operand_value): Likewise.
13659 (arc_insn_get_operand_value_signed): Likewise.
13660 (arc_insn_get_memory_base_reg): Likewise.
13661 (arc_insn_get_memory_offset): Likewise.
13662 (arc_insn_get_branch_target): Likewise.
13663 (arc_insn_dump): Likewise.
13664 (arc_insn_get_linear_next_pc): Likewise.
13665 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13666 (arc_disassemble_info): Likewise.
13667 (arc_insn_get_branch_target): Likewise.
13668 (arc_insn_get_linear_next_pc): Likewise.
13669 * NEWS: Mention new "maint print arc arc-instruction".
13670
3be78afd
AK
136712017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13672
13673 * arc-tdep (maintenance_print_arc_list): New variable.
13674 (maintenance_print_arc_command): New function.
13675
296ec4fa
AK
136762017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13677
13678 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13679 Add "limm" and "reserved".
13680 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13681 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13682 * arc-tdep.h (arc_regnum): Likewise.
13683
f74f865e
MF
136842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13685
13686 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13687 for THREADPTR register.
13688 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13689 register.
13690 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13691 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13692 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13693
0d0bf81a
MF
136942017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13695
13696 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13697 registers above gdbarch_num_regs (gdbarch) as privileged in
13698 call0 ABI.
13699
0ce4291e
MF
137002017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13701
13702 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13703 for a single specified register or for all registers in
13704 a0_base..a0_base + C0_NREGS range.
13705 (supply_gregset_reg): Call regcache_raw_supply for a single
13706 specified register or for all registers in a0_base..a0_base +
13707 C0_NREGS range.
13708
c56054f9
MF
137092017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13710
13711 * arch/xtensa.h (C0_NREGS): Add definition.
13712 * xtensa-tdep.c (C0_NREGS): Remove definition.
13713
a4398628
MF
137142017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13715
13716 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13717 Drop xtensa_default_isa initialization.
13718 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13719
8c43009f
PA
137202017-03-27 Pedro Alves <palves@redhat.com>
13721
13722 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13723 (file_entry::include_dir): New method.
13724 (line_header::include_dir_at, line_header::file_name_at): New
13725 methods.
13726 (setup_type_unit_groups, setup_type_unit_groups)
13727 (psymtab_include_file_name): Simplify using the new methods.
13728 (lnp_state_machine) <the_line_header>: New field.
13729 <file>: Add comment.
13730 (lnp_state_machine::current_file): New method.
13731 (dwarf_record_line): Simplify using the new methods.
13732 (init_lnp_state_machine): Initialize the "the_line_header" field.
13733 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13734 Simplify using the new methods.
13735
a7e80b9e
PA
137362017-03-27 Pedro Alves <palves@redhat.com>
13737
13738 * cp-name-parser.y (make_empty): Delete.
13739 (demangler_special, nested_name, ptr_operator, array_indicator)
13740 (direct_declarator, declarator_1): Use fill_comp instead of
13741 make_empty.
13742
21047726
PA
137432017-03-27 Pedro Alves <palves@redhat.com>
13744
13745 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13746 to ATTRIBUTE_PRINTF.
13747 * solib-target.c (library_list_start_list): Print "string" not
13748 "version".
13749 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13750 gdb_xml_error call.
13751
d721ba37
PA
137522017-03-27 Pedro Alves <palves@redhat.com>
13753
13754 * dwarf2read.c (struct file_and_directory): New.
13755 (dwarf2_get_dwz_file): Adjust to use std::string.
13756 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13757 (find_file_and_directory): Adjust to return a file_and_directory
13758 object.
13759 (read_file_scope): Adjust to use file_and_directory. Remove
13760 make_cleanup/do_cleanups calls.
13761 (open_and_init_dwp_file): Adjust to use std::string. Remove
13762 make_cleanup/do_cleanups calls.
13763 * python/python.c (do_start_initialization): Adjust to ldirname
13764 returning a std::string.
13765 * utils.c (ldirname): Now returns a std::string.
13766 * utils.h (ldirname): Change return type to std::string.
13767 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13768 returning a std::string.
13769 * xml-tdesc.c (file_read_description_xml): Likewise.
13770
ed771251
AH
137712017-03-24 Alan Hayward <alan.hayward@arm.com>
13772
13773 * regcache.c (regcache_debug_print_register): New function.
13774 * regcache.h (regcache_debug_print_register): New declaration.
13775 * target.c (debug_print_register): Remove.
13776 (target_fetch_registers): Call regcache_debug_print_register.
13777 (target_store_registers): Likewise.
13778
568c1b9f
PB
137792017-03-24 Pádraig Brady <pbrady@fb.com>
13780
13781 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13782 reference beyond the 'lh->include_dirs' array before accessing to
13783 it.
13784 (psymtab_include_file_name): Likewise.
13785 (dwarf_decode_lines_1): Likewise.
13786 (dwarf_decode_lines): Likewise.
13787 (file_file_name): Likewise.
13788
3e00d44f
SM
137892017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13790
13791 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13792 inferior_ptid.
13793 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13794 ps_lsetfpregs): Likewise.
13795 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13796 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13797 ps_lsetfpregs): Likewise.
13798 * target.c (target_fetch_registers, target_store_registers):
13799 Remove asserts.
13800
077ae656
AH
138012017-03-23 Alan Hayward <alan.hayward@arm.com>
13802
13803 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13804
1e2b521d
YQ
138052017-03-23 Yao Qi <yao.qi@linaro.org>
13806
13807 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13808 (_initialize_aarch64_tdep): Register it.
13809 (aarch64_record_load_store): Handle PRFM instruction.
13810 (aarch64_process_record_test): New function.
13811
33877125
YQ
138122017-03-23 Yao Qi <yao.qi@linaro.org>
13813
13814 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13815 indentation.
13816
a0eef940
YQ
138172017-03-23 Yao Qi <yao.qi@linaro.org>
13818
13819 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13820
3f2a3564
PR
138212017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13822
13823 python/python.c (do_start_initialization): Fix memory leak.
13824
b67aeab0
SM
138252017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13826
13827 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13828 using get_ptrace_pid.
13829 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13830 inferior_ptid.
13831 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13832 inferior_ptid instead of pid.
13833
ffdbe864
YQ
138342017-03-22 Yao Qi <yao.qi@linaro.org>
13835
13836 * aarch64-tdep.c: Wrap locally used classes in anonymous
13837 namespace.
13838 * arm-tdep.c: Likewise.
13839 * linespec.c: Likewise.
13840 * ui-out.c: Likewise.
13841
9d736fbf
JG
138422017-03-22 Jonah Graham <jonah@kichwacoders.com>
13843
13844 PR gdb/19637
13845 * python/lib/gdb/printer/bound_registers.py: Import sys.
13846
3de88e9a
SM
138472017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13848
13849 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13850 windows_thread_info parameter and use it instead of
13851 current_thread.
13852 (windows_fetch_inferior_registers): Don't set current_thread,
13853 pass the thread to do_windows_fetch_inferior_registers. Use
13854 ptid from regcache instead of inferior_ptid.
13855 (do_windows_store_inferior_registers): Add windows_thread_info
13856 parameter and use it instead of current_thread.
13857 (windows_store_inferior_registers): Don't set current_thread,
13858 pass the thread to do_windows_store_inferior_registers. Use
13859 ptid from regcache instead of inferior_ptid.
13860
0e7b8f61
SM
138612017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13862
13863 * ser-mingw.c (ser_windows_raw): Remove reference to
13864 struct serial::current_timeout.
13865
5badf10a
IR
138662017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13867
13868 PR tdep/20928
13869 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13870 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13871 (sparc64_fsr_type): Fix %fsr decoding.
13872
cee59b3f
TW
138732017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13874
13875 * python/py-record-btrace.c (btpy_insn_data): Change return type
13876 for Python 2.
13877
639a9038
SM
138782017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13879
13880 * spu-linux-nat.c (spu_fetch_inferior_registers,
13881 spu_store_inferior_registers): Use ptid from regcache, set and
13882 restore inferior_ptid.
13883 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13884 Likewise.
13885
bcc0c096
SM
138862017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13887
13888 * i386-linux-nat.c (fetch_register, store_register,
13889 i386_linux_fetch_inferior_registers,
13890 i386_linux_store_inferior_registers): Use ptid from regcache.
13891 * ia64-linux-nat.c (ia64_linux_fetch_register,
13892 ia64_linux_store_register): Likewise.
13893 * inf-ptrace.c (inf_ptrace_fetch_register,
13894 inf_ptrace_store_register): Likewise.
13895 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13896 m32r_linux_store_inferior_registers): Likewise.
13897 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13898 m68kbsd_store_inferior_registers): Likewise.
13899 * m68k-linux-nat.c (fetch_register, store_register,
13900 m68k_linux_fetch_inferior_registers,
13901 m68k_linux_store_inferior_registers): Likewise.
13902 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13903 m88kbsd_store_inferior_registers): Likewise.
13904 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13905 mips_fbsd_store_inferior_registers): Likewise.
13906 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13907 mips64_linux_regsets_store_registers): Likewise.
13908 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13909 mipsnbsd_store_inferior_registers): Likewise.
13910 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13911 mips64obsd_store_inferior_registers): Likewise.
13912 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13913 Likewise.
13914 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13915 ppcfbsd_store_inferior_registers): Likewise.
13916 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13917 ppc_linux_store_inferior_registers): Likewise.
13918 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13919 ppcnbsd_store_inferior_registers): Likewise.
13920 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13921 ppcobsd_store_registers): Likewise.
13922 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13923 Likewise.
13924 * ravenscar-thread.c (ravenscar_fetch_registers,
13925 ravenscar_store_registers, ravenscar_prepare_to_store):
13926 Likewise.
13927 * record-btrace.c (record_btrace_fetch_registers,
13928 record_btrace_store_registers, record_btrace_prepare_to_store):
13929 Likewise.
13930 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13931 Lookup inferior using ptid from regcache, instead of
13932 current_inferior.
13933 * remote.c (remote_fetch_registers, remote_store_registers): Use
13934 ptid from regcache.
13935 * rs6000-nat.c (fetch_register, store_register): Likewise.
13936 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13937 s390_linux_store_inferior_registers): Likewise.
13938 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13939 shnbsd_store_inferior_registers): Likewise.
13940 * sol-thread.c (sol_thread_fetch_registers,
13941 sol_thread_store_registers): Likewise.
13942 * sparc-nat.c (sparc_fetch_inferior_registers,
13943 sparc_store_inferior_registers): Likewise.
13944 * tilegx-linux-nat.c (fetch_inferior_registers,
13945 store_inferior_registers): Likewise.
13946 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13947 vaxbsd_store_inferior_registers): Likewise.
13948 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13949 store_xtregs): Likewise.
13950
c0f55cc6
AV
139512017-03-20 Artemiy Volkov <artemiyv@acm.org>
13952
13953 PR gdb/14441
13954 * NEWS: Mention support for rvalue references in GDB and python.
13955 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13956 supports both lvalue and rvalue references.
13957
15c0a2a9
AV
139582017-03-20 Artemiy Volkov <artemiyv@acm.org>
13959
13960 PR gdb/14441
13961 * gdbtypes.c (rank_one_type): Implement overloading
13962 resolution rules regarding rvalue references.
13963
aa006118
AV
139642017-03-20 Artemiy Volkov <artemiyv@acm.org>
13965
13966 PR gdb/14441
13967 * aarch64-tdep.c (aarch64_type_align)
13968 (aarch64_extract_return_value, aarch64_store_return_value): Change
13969 lvalue reference type checks to general reference type checks.
13970 * amd64-tdep.c (amd64_classify): Likewise.
13971 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13972 Likewise.
13973 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13974 (arm_store_return_value): Likewise.
13975 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13976 * c-typeprint.c (c_print_type): Likewise.
13977 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13978 (cplus_number_of_children, cplus_describe_child): Likewise.
13979 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13980 * completer.c (expression_completer): Likewise.
13981 * cp-support.c (make_symbol_overload_list_adl_namespace):
13982 Likewise.
13983 * darwin-nat-info.c (info_mach_region_command): Likewise.
13984 * dwarf2loc.c (entry_data_value_coerce_ref)
13985 (value_of_dwarf_reg_entry): Likewise.
13986 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13987 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13988 Likewise.
13989 * findvar.c (extract_typed_address, store_typed_address):
13990 Likewise.
13991 * gdbtypes.c (rank_one_type): Likewise.
13992 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13993 * infcall.c (value_arg_coerce): Likewise.
13994 * language.c (pointer_type): Likewise.
13995 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13996 Likewise.
13997 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13998 * mn10300-tdep.c (mn10300_type_align): Likewise.
13999 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14000 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14001 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14002 Likewise.
14003 * printcmd.c (print_formatted, x_command): Likewise.
14004 * python/py-type.c (typy_get_composite, typy_template_argument):
14005 Likewise.
14006 * python/py-value.c (valpy_referenced_value)
14007 (valpy_get_dynamic_type, value_has_field): Likewise.
14008 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14009 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14010 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14011 * spu-tdep.c (spu_scalar_value_p): Likewise.
14012 * symtab.c (lookup_symbol_aux): Likewise.
14013 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14014 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14015 Likewise.
14016 * valops.c (value_cast_pointers, value_cast)
14017 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14018 (value_struct_elt, value_struct_elt_bitpos)
14019 (value_find_oload_method_list, find_overload_match)
14020 (value_rtti_indirect_type): Likewise.
14021 * valprint.c (val_print_scalar_type_p, generic_val_print):
14022 Likewise.
14023 * value.c (value_actual_type, value_as_address, unpack_long)
14024 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14025 (coerce_ref): Likewise.
14026 * varobj.c (varobj_get_value_type): Likewise.
14027
3fcf899d
AV
140282017-03-20 Artemiy Volkov <artemiyv@acm.org>
14029
14030 PR gdb/14441
14031 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14032 table of constants.
14033 * python/lib/gdb/command/explore.py: Support exploring values
14034 of rvalue reference types.
14035 * python/lib/gdb/types.py: Implement get_basic_type() for
14036 rvalue reference types.
14037 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14038 constant.
14039 * python/py-value.c (valpy_getitem): Add an rvalue reference
14040 check.
14041 (valpy_reference_value): Add new parameter "refcode".
14042 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14043 New wrappers for valpy_reference_value().
14044 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14045 (gdbpy_invoke_xmethod): Likewise.
14046
4297a3f0
AV
140472017-03-20 Artemiy Volkov <artemiyv@acm.org>
14048
14049 PR gdb/14441
14050 * dwarf2read.c (process_die, read_type_die_1): Handle the
14051 DW_TAG_rvalue_reference_type DIE.
14052 (read_tag_reference_type): Add new parameter "refcode".
14053
e1cb3213
AV
140542017-03-20 Artemiy Volkov <artemiyv@acm.org>
14055
14056 PR gdb/14441
14057 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14058 (c_type_print_modifier, c_type_print_varspec_suffix)
14059 (c_type_print_base): Support printing rvalue reference types.
14060 * c-valprint.c (c_val_print, c_value_print): Support printing
14061 rvalue reference values.
14062
e4347c89
AV
140632017-03-20 Artemiy Volkov <artemiyv@acm.org>
14064
14065 PR gdb/14441
14066 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14067 typename.
14068 * cp-support.c (replace_typedefs): Handle
14069 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14070 * python/py-type.c (typy_lookup_type): Likewise.
14071
53cc15f5
AV
140722017-03-20 Artemiy Volkov <artemiyv@acm.org>
14073
14074 PR gdb/14441
14075 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14076 * parse.c (insert_type): Change assert statement.
14077 (follow_types): Handle rvalue reference types.
14078 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14079 constant.
14080
a65cfae5
AV
140812017-03-20 Artemiy Volkov <artemiyv@acm.org>
14082
14083 PR gdb/14441
14084 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14085 value_ref() interface.
14086 * c-valprint.c (c_value_print): Likewise.
14087 * infcall.c (value_arg_coerce): Likewise.
14088 * python/py-value.c (valpy_reference_value): Likewise.
14089 * valops.c (value_cast, value_reinterpret_cast)
14090 (value_dynamic_cast, typecmp): Likewise.
14091 (value_ref): Parameterize by kind of return value reference type.
14092 * value.h (value_ref): Add new parameter "refcode".
14093
3b224330
AV
140942017-03-20 Artemiy Volkov <artemiyv@acm.org>
14095
14096 PR gdb/14441
14097 * dwarf2read.c (read_tag_reference_type): Use
14098 lookup_lvalue_reference_type() instead of lookup_reference_type().
14099 * eval.c (evaluate_subexp_standard): Likewise.
14100 * f-exp.y: Likewise.
14101 * gdbtypes.c (make_reference_type, lookup_reference_type):
14102 Generalize with rvalue reference types.
14103 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14104 convenience wrappers for lookup_reference_type().
14105 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14106 reference kind parameter.
14107 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14108 wrappers for lookup_reference_type().
14109 * guile/scm-type.c (gdbscm_type_reference): Use
14110 lookup_lvalue_reference_type() instead of lookup_reference_type().
14111 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14112 * parse.c (follow_types): Likewise.
14113 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14114 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14115 Likewise.
14116 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14117 (gdbpy_invoke_xmethod): Likewise.
14118 * stabsread.c: Provide extra argument to make_reference_type()
14119 call.
14120 * valops.c (value_ref, value_rtti_indirect_type): Use
14121 lookup_lvalue_reference_type() instead of lookup_reference_type().
14122
f9aeb8d4
AV
141232017-03-20 Artemiy Volkov <artemiyv@acm.org>
14124
14125 PR gdb/14441
14126 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14127 (TYPE_IS_REFERENCE): New macro.
14128 (struct type): Add rvalue_reference_type field.
14129 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14130
51457a05
MAL
141312017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14132
14133 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14134 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14135 New function definition.
14136 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14137 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14138 New function declaration.
14139 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14140 * mi/mi-interp.h: New file.
14141 * solib.c (info_sharedlibrary_command): Replace for loop with
14142 ALL_SO_LIBS macro
14143 * solib.h (update_solib_list): New function declaration.
14144 (so_list_head): Move macro.
14145 * solist.h (ALL_SO_LIBS): New macro.
14146
e696b3ad
MAL
141472017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14148
14149 * infcmd.c (post_create_inferior): Remove unused argument in
14150 call to solib_add.
14151 * remote.c (remote_start_remote): Likewise.
14152 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14153 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14154 (enable_break): Likewise.
14155 * solib.c (update_solib_list): Remove unused target argument
14156 and its documentation.
14157 (solib_add): Remove unused target argument. Remove unused
14158 argument in call to update_solib_list.
14159 (info_sharedlibrary_command): Remove unused argument in call
14160 to update_solib_list.
14161 (sharedlibrary_command): Remove unused argument in call to
14162 solib_add.
14163 (handle_solib_event): Likewise.
14164 (reload_shared_libraries): Likewise.
14165 * solib.h (solib_add): Remove unused target argument.
14166
dcb84eda
AA
141672017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14168
14169 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14170 (s390_displaced_step_fixup): Cover relative branches with the
14171 default fixup handling. This fixes lack of support for some
14172 relative branch instructions.
14173
d9cb6cdc
SM
141742017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14175
14176 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14177 ptid from regcache.
14178
1afaf9f4
SM
141792017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14180
14181 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14182 i386_darwin_store_inferior_registers): Use ptid from regcache.
14183
aac12e24
SM
141842017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14185
14186 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14187 i386bsd_store_inferior_registers): Use ptid from regcache.
14188
bbe1eef1
SM
141892017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14190
14191 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14192 hppaobsd_store_registers): Use ptid from regcache.
14193
10799020
SM
141942017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14195
14196 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14197 hppanbsd_store_registers): Use ptid from regcache.
14198
00204cf7
SM
141992017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14200
14201 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14202 from regcache. Use get_ptrace_pid.
14203
11a33714
SM
142042017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14205
14206 * corelow.c (get_core_register_section): Use ptid from regcache,
14207 update doc.
14208
317cd492
SM
142092017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14210
14211 * bsd-uthread.c (bsd_uthread_fetch_registers,
14212 bsd_uthread_store_registers): Use ptid from regcache, set and
14213 restore inferior_ptid.
14214
9ac8a7c2
SM
142152017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14216
14217 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14218 fetch_fp_regs, store_register, store_regs, store_fp_register,
14219 store_fp_regs): Use ptid from regcache.
14220
4ac4bb6a
SM
142212017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14222
14223 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14224 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14225 store_vfp_regs): Use ptid from regcache.
14226
9bcbdca8
PA
142272017-03-17 Pedro Alves <palves@redhat.com>
14228
14229 PR remote/21188
14230 * ser-base.c (ser_base_wait_for): Add comment.
14231 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14232 version.
14233 * ser-unix.c (hardwire_raw): Remove reference to
14234 scb->current_timeout.
14235 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14236 (hardwire_ops): Install ser_base_readchar instead of
14237 hardwire_readchar.
14238 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14239 Remove fields.
14240
7503099f
JG
142412017-03-17 Jonah Graham <jonah@kichwacoders.com>
14242
14243 PR gdb/19637
14244 * python/lib/gdb/printer/bound_registers.py: Add support for
14245 Python 3.
14246
7942e96e
AA
142472017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14248
14249 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14250 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14251 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14252 byte_offset to subobj_byte_offset. Fix the handling of
14253 DWARF_VALUE_STACK on big-endian targets when coming via an
14254 implicit pointer.
14255 (dwarf2_evaluate_loc_desc): Adjust call to
14256 dwarf2_evaluate_loc_desc_full.
14257 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14258 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14259
ba14f379
YQ
142602017-03-16 Yao Qi <yao.qi@linaro.org>
14261
14262 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14263 and REVSH instructions.
14264
b121eeb9
YQ
142652017-03-16 Yao Qi <yao.qi@linaro.org>
14266
14267 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14268 (arm_record_test): Declare.
14269 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14270 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14271 align with the manual.
14272 (thumb_record_misc): Adjust the code order to align with the
14273 manual.
14274 (thumb2_record_decode_insn_handler): Fix instruction matching.
14275 (instruction_reader_thumb): New class.
14276 (arm_record_test): New function.
14277
728a7913
YQ
142782017-03-16 Yao Qi <yao.qi@linaro.org>
14279
14280 * arm-tdep.c (abstract_memory_reader): New class.
14281 (instruction_reader): New class.
14282 (extract_arm_insn): Add argument 'reader'. Callers updated.
14283 (decode_insn): Likewise.
14284
34b43320
DE
142852017-03-16 Doug Evans <dje@google.com>
14286
a7c0469f
DE
14287 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14288 member. Change type of TYPE member to SCM. All uses updated.
14289 (lsscm_make_lazy_string_smob): Add assert.
14290 (lsscm_make_lazy_string): Flag bad length values.
14291 (lsscm_elt_type): New function.
14292 (gdbscm_lazy_string_to_value): Rewrite to use
14293 lsscm_safe_lazy_string_to_value.
14294 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14295 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14296 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14297 in incoming type.
14298 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14299 * guile/scm-type.c (tyscm_scm_to_type): New function.
14300
143012017-03-15 Doug Evans <dje@google.com>
14302
34b43320
DE
14303 PR python/17728, python/18439, python/18779
14304 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14305 member. Change type of TYPE member to PyObject *. All uses updated.
14306 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14307 (gdbpy_create_lazy_string_object): Flag bad length values.
14308 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14309 Handle typedefs in incoming type.
14310 (stpy_lazy_string_elt_type): New function.
14311 (gdbpy_extract_lazy_string): Call it.
14312 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14313 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14314 typedefs in incoming type.
14315
a3a5fecc
DE
143162017-03-16 Doug Evans <dje@google.com>
14317
14318 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14319 * guile/scm-type.c (tyscm_scm_to_type): New function.
14320
28f1c605
JW
143212017-03-16 Jiong Wang <jiong.wang@arm.com>
14322
14323 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14324 "ULONGEST" for "skip".
14325
87c336f6
AA
143262017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14327
14328 PR gdb/21220
14329 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14330 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14331 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14332 over ptrace peek/poke until end of buffer or error.
14333
cf81cf60
SM
143342017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14335
14336 * parse.c (length_of_subexp): Make static.
14337 * parser-defs.h (length_of_subexp): Remove.
14338
a379284a
AA
143392017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14340
14341 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14342 as well.
14343
8a6200ba
PA
143442017-03-14 Pedro Alves <palves@redhat.com>
14345
14346 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14347 (main): Use std::unique_ptr. Remove calls to
14348 cp_demangled_name_parse_free.
14349
f79ec206
SM
143502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14351
14352 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14353 alphabsd_store_inferior_registers): Use regcache->ptid instead
14354 of inferior_ptid.
14355
edb5fb00
SM
143562017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14357
14358 * aix-thread.c (aix_thread_fetch_registers,
14359 aix_thread_store_registers): Use regcache->ptid instead of
14360 inferior_ptid.
14361
55119686
SM
143622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14363
14364 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14365 store_gregs_to_thread, fetch_fpregs_from_thread,
14366 store_fpregs_to_thread): Use regcache->ptid instead of
14367 inferior_ptid.
14368
6a06fbb7
SM
143692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14370
14371 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14372 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14373 instead of inferior_ptid.
14374
c6386875
SM
143752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14376
14377 * target.c (target_fetch_registers, target_store_registers): Add
14378 assert.
14379
ddaaf0fb
SM
143802017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14381
14382 * regcache.h (regcache_get_ptid): New function.
14383 * regcache.c (regcache_get_ptid): New function.
14384
b9da89d1 143852017-03-13 Mark Wielaard <mark@klomp.org>
14386
14387 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14388
5f4d1085
KS
143892017-03-10 Keith Seitz <keiths@redhat.com>
14390
14391 PR c++/8218
14392 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14393
c65d6b55
PA
143942017-03-08 Pedro Alves <palves@redhat.com>
14395
14396 PR gdb/18360
14397 * infrun.c (start_step_over, do_target_resume, resume)
14398 (restart_threads): Assert we're not resuming a thread that is
14399 meant to be stopped.
14400 (infrun_thread_stop_requested_callback): Delete.
14401 (infrun_thread_stop_requested): If the thread is internally
14402 stopped, queue a pending stop event and clear the thread's
14403 inline-frame state.
14404 (handle_stop_requested): New function.
14405 (handle_syscall_event, handle_inferior_event_1): Use
14406 handle_stop_requested.
14407 (handle_stop_requested): New function.
14408 (handle_signal_stop): Set the thread's stop_signal here instead of
14409 at caller.
14410 (finish_step_over): Clear step over info unconditionally.
14411 (handle_signal_stop): If the user had interrupted the event
14412 thread, consider the stop a random signal.
14413 (handle_signal_stop) <signal arrived while stepping over
14414 breakpoint>: Don't restart threads here.
14415 (stop_waiting): Don't clear step-over info here.
14416
15c22686
PA
144172017-03-08 Pedro Alves <palves@redhat.com>
14418
14419 PR 21206
14420 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14421 goes to argument 2, not 1.
14422
6e5d74e7
PA
144232017-03-08 Pedro Alves <palves@redhat.com>
14424
14425 PR cli/21218
14426 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14427 display_gdb_prompt.
14428 (command_line_input): Add comment.
14429
9753a2f6
PA
144302017-03-08 Pedro Alves <palves@redhat.com>
14431
14432 PR tui/21216
14433 * tui/tui-file.c (tui_file::write): New.
14434 * tui/tui-file.h (tui_file): Override "write".
14435 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14436 factored out from ...
14437 (tui_puts): ... here.
14438 (tui_putc): Use them.
14439 (tui_write): New function.
14440 * tui/tui-io.h (tui_write): Declare.
14441
1672e0d9
SDJ
144422017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14443
14444 * Makefile.in (SFILES): Replace "environ.c" with
14445 "common/environ.c".
14446 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14447 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14448 to...
14449 * common/environ.c: ... here.
14450 * environ.h: Moved to...
14451 * common/environ.h: ... here.
14452
f7bb4e3a
PB
144532017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14454
14455 * gdbarch.sh (pstring_ptr): New static function.
14456 (gdbarch_disassembler_options): Use it.
14457 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14458 not valid_disassembler_option->name.
14459 * gdbarch.c: Regenerate.
14460
e45ced6c
PB
144612017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14462
14463 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14464
5f6fd321
PA
144652017-03-07 Pedro Alves <palves@redhat.com>
14466
14467 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14468
6dbb839a 144692017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14470
14471 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14472 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14473 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14474 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14475
d274ecf4
SM
144762017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14477
14478 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14479
df97be55
SM
144802017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14481
14482 * remote.c (remote_add_target_side_commands): Use range-based
14483 for loop.
14484
7d45f3df
YQ
144852017-03-03 Yao Qi <yao.qi@linaro.org>
14486
14487 PR gdb/21165
14488 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14489 value is lazy.
14490 * valprint.c (common_val_print): Likewise.
14491
65b48a81
PB
144922017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14493
14494 * NEWS: Mention new set/show disassembler-options commands.
14495 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14496 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14497 (prospective_options): New static variable.
14498 (gdb_disassembler::gdb_disassembler): Initialize
14499 m_di.disassembler_options.
14500 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14501 (get_disassembler_options): New function.
14502 (set_disassembler_options): Likewise.
14503 (set_disassembler_options_sfunc): Likewise.
14504 (show_disassembler_options_sfunc): Likewise.
14505 (disassembler_options_completer): Likewise.
14506 (_initialize_disasm): Likewise.
14507 * disasm.h (get_disassembler_options): New prototype.
14508 (set_disassembler_options): Likewise.
14509 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14510 (gdbarch_verify_disassembler_options): Likewise.
14511 * gdbarch.c: Regenerate.
14512 * gdbarch.h: Likewise.
14513 * arm-tdep.c (num_disassembly_options): Delete.
14514 (set_disassembly_style): Likewise.
14515 (arm_disassembler_options): New static variable.
14516 (set_disassembly_style_sfunc): Convert short style name into long
14517 option name. Call set_disassembler_options.
14518 (show_disassembly_style_sfunc): New function.
14519 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14520 set_gdbarch_verify_disassembler_options.
14521 (_initialize_arm_tdep): Delete regnames variable and update callers.
14522 (arm_disassembler_options): Initialize.
14523 (disasm_options): New variable.
14524 (num_disassembly_options): Rename from this...
14525 (num_disassembly_styles): ...to this. Compute by scanning through
14526 disasm_options.
14527 (valid_disassembly_styles): Initialize using disasm_options.
14528 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14529 set_arm_regname_option.
14530 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14531 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14532 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14533 set_gdbarch_verify_disassembler_options.
14534 * s390-tdep.c (s390_disassembler_options): New static variable.
14535 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14536 set_gdbarch_verify_disassembler_options.
14537
d538e36d
SM
145382017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14539
14540 * remote.c (remote_add_target_side_condition): Remove "struct"
14541 keyword from range-based for loop.
14542
83621223
SM
145432017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14544
14545 * remote.c (remote_add_target_side_condition): Use range-based
14546 for loop. Update comment.
14547
2123df0e
YQ
145482017-02-27 Yao Qi <yao.qi@linaro.org>
14549
14550 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14551
8e368124
AH
145522017-02-26 Alan Hayward <alan.hayward@arm.com>
14553
14554 * regcache.c (regcache_raw_update): New function.
14555 (regcache_raw_read): Move code to regcache_raw_update.
14556 * regcache.h (regcache_raw_update): New declaration.
14557 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14558
a49dd8dd
JK
145592017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14560
14561 * dwarf2read.c (create_debug_type_hash_table): Initialize
14562 header.signature and header.type_offset_in_tu.
14563
34e4bae9
PA
145642017-02-24 Pedro Alves <palves@redhat.com>
14565
14566 * symtab.c (make_file_symbol_completion_list_1): Use
14567 add_symtab_completions.
14568
b0e4b369
AH
145692017-02-24 Alan Hayward <alan.hayward@arm.com>
14570
14571 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14572
975c21ab
AH
145732017-02-24 Alan Hayward <alan.hayward@arm.com>
14574
14575 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14576 I386_MAX_REGISTER_SIZE.
14577 (i386_pseudo_register_write): Likewise.
14578 (i386_process_record): Likewise.
14579 * i387-tdep.c (i387_supply_xsave): Likewise.
14580 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14581 (store_register): Likewise.
14582
14bc53a8
PA
145832017-02-23 Pedro Alves <palves@redhat.com>
14584
14585 * ada-lang.c: Include "common/function-view.h".
14586 (ada_iterate_over_symbols): Adjust to use function_view as
14587 callback type.
14588 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14589 (ada_make_symbol_completion_list): Use a lambda.
14590 (ada_exc_search_name_matches): Delete.
14591 (name_matches_regex): New.
14592 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14593 * compile/compile-c-support.c: Include "common/function-view.h".
14594 (print_one_macro): Change prototype to accept a ui_file pointer.
14595 (write_macro_definitions): Use a lambda.
14596 * dwarf2read.c: Include "common/function-view.h".
14597 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14598 (dw2_expand_symtabs_matching): Adjust to use function_view as
14599 callback type.
14600 * language.h: Include "common/function-view.h".
14601 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14602 function_view as callback type.
14603 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14604 * linespec.c: Include "common/function-view.h".
14605 (collect_info::add_symbol): New method.
14606 (struct symbol_and_data_callback, iterate_inline_only, struct
14607 symbol_matcher_data, iterate_name_matcher): Delete.
14608 (iterate_over_all_matching_symtabs): Adjust to use function_view
14609 as callback type and lambdas.
14610 (iterate_over_file_blocks): Adjust to use function_view as
14611 callback type.
14612 (decode_compound_collector): Now a class with private fields.
14613 (decode_compound_collector::release_symbols): New method.
14614 (collect_one_symbol): Rename to...
14615 (decode_compound_collector::operator()): ... this and adjust.
14616 (lookup_prefix_sym): decode_compound_collector construction bits
14617 move to decode_compound_collector ctor. Pass the
14618 decode_compound_collector object directly as callback. Remove
14619 cleanups and use decode_compound_collector::release_symbols
14620 instead.
14621 (symtab_collector): Now a class with private fields.
14622 (symtab_collector::release_symtabs): New method.
14623 (add_symtabs_to_list): Rename to...
14624 (symtab_collector::operator()): ... this and adjust.
14625 (collect_symtabs_from_filename): symtab_collector construction
14626 bits move to symtab_collector ctor. Pass the symtab_collector
14627 object directly as callback. Remove cleanups and use
14628 symtab_collector::release_symtabs instead.
14629 (collect_symbols): Delete.
14630 (add_matching_symbols_to_info): Use lambdas.
14631 * macrocmd.c (print_macro_callback): Delete.
14632 (info_macro_command): Use a lambda.
14633 (info_macros_command): Pass print_macro_definition as callable
14634 directly.
14635 (print_one_macro): Remove 'ignore' parameter.
14636 (macro_list_command): Adjust.
14637 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14638 (macro_for_each_data::user_data): Delete field.
14639 (foreach_macro): Adjust to call the function_view.
14640 (macro_for_each): Adjust to use function_view as callback type.
14641 (foreach_macro_in_scope): Adjust to call the function_view.
14642 (macro_for_each_in_scope): Adjust to use function_view as callback
14643 type.
14644 * macrotab.h: Include "common/function-view.h".
14645 (macro_callback_fn): Declare a prototype instead of a pointer.
14646 Remove "user_data" parameter.
14647 (macro_for_each, macro_for_each_in_scope): Adjust to use
14648 function_view as callback type.
14649 * psymtab.c (partial_map_expand_apply)
14650 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14651 Adjust to use function_view as callback type and to return bool.
14652 (psym_expand_symtabs_matching): Adjust to use function_view as
14653 callback types.
14654 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14655 to use function_view as callback type and to return bool.
14656 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14657 callback types.
14658 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14659 as callback types.
14660 * symfile.h: Include "common/function-view.h".
14661 (expand_symtabs_file_matcher_ftype)
14662 (expand_symtabs_symbol_matcher_ftype)
14663 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14664 return bool.
14665 (quick_symbol_functions::map_symtabs_matching_filename)
14666 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14667 function_view as callback type and return bool.
14668 (expand_symtabs_matching): Adjust to use function_view as callback
14669 type.
14670 (maintenance_expand_name_matcher)
14671 (maintenance_expand_file_matcher): Delete.
14672 (maintenance_expand_symtabs): Use lambdas.
14673 * symtab.c (iterate_over_some_symtabs): Adjust to use
14674 function_view as callback types and return bool.
14675 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14676 of a cleanup.
14677 (lookup_symtab_callback): Delete.
14678 (lookup_symtab): Use a lambda.
14679 (iterate_over_symbols): Adjust to use function_view as callback
14680 type.
14681 (struct search_symbols_data, search_symbols_file_matches)
14682 (search_symbols_name_matches): Delete.
14683 (search_symbols): Use a pair of lambdas.
14684 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14685 (symtab_expansion_callback): Delete.
14686 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14687 * symtab.h: Include "common/function-view.h".
14688 (iterate_over_some_symtabs): Adjust to use function_view as
14689 callback type and return bool.
14690 (iterate_over_symtabs): Adjust to use function_view as callback
14691 type.
14692 (symbol_found_callback_ftype): Remove 'data' parameter and return
14693 bool.
14694 (iterate_over_symbols): Adjust to use function_view as callback
14695 type.
14696
07e253aa
PA
146972017-02-23 Pedro Alves <palves@redhat.com>
14698
14699 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14700 (%.o) <unittests/%.c>: New pattern.
14701 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14702 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14703 * common/function-view.h: New file.
14704 * unittests/function-view-selftests.c: New file.
14705 * configure: Regenerate.
14706
8eaf5320
SM
147072017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14708
14709 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14710 inferior_ptid.
14711 * go32-nat.c (go32_thread_alive): Likewise.
14712
38768751
YQ
147132017-02-23 Yao Qi <yao.qi@linaro.org>
14714
14715 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14716 delete.
14717
0a8beaba
YQ
147182017-02-23 Yao Qi <yao.qi@linaro.org>
14719
14720 * varobj.c (varobj_clear_saved_item): Use delete instead of
14721 xfree.
14722 (update_dynamic_varobj_children): Likewise.
14723
58fdfd2c
JK
147242017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14725
14726 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14727
1b90b139
SM
147282017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14729
14730 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14731 m_enum_value to 0 in default constructor.
14732
2039d74e
EBM
147332017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14734
14735 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14736 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14737 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14738 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14739 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14740 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14741 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14742 IS_STORE_CONDITIONAL_INSN.
14743
7814882a
JK
147442017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14745
14746 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14747
0ae60b63
JK
147482017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14749
14750 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14751
0224619f
JK
147522017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14753
14754 * dwarf2read.c (skip_one_die, read_attribute_value)
14755 (dwarf2_const_value_attr, dump_die_shallow)
14756 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14757 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14758
0af92d60
JK
147592017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14760
14761 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14762 (dwarf_parse_macro_header): Accept DWARF version 5.
14763 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14764
216f72a1
JK
147652017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14766
14767 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14768 DW_AT_GNU_*.
14769 * common/common-exceptions.h (enum errors): Likewise.
14770 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14771 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14772 (dwarf_expr_context::execute_stack_op): Likewise.
14773 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14774 Likewise.
14775 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14776 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14777 (show_entry_values_debug, call_site_to_target_addr)
14778 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14779 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14780 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14781 (value_of_dwarf_block_entry, indirect_pieced_value)
14782 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14783 (disassemble_dwarf_expression): Likewise.
14784 * dwarf2read.c (process_die, inherit_abstract_dies)
14785 (read_call_site_scope): Likewise.
14786 * gdbtypes.h (struct func_type, struct call_site_parameter)
14787 (struct call_site): Likewise.
14788 * stack.c (read_frame_arg): Likewise.
14789 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14790
43988095
JK
147912017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14792
14793 * defs.h (read_unsigned_leb128): New declaration.
14794 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14795 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14796 (dwarf2_find_location_expression): Call also
14797 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14798 * dwarf2loc.h (dwarf2_version): New declaration.
14799 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14800 rnglists.
14801 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14802 .debug_rnglists.
14803 (struct dwop_section_names): Add loclists_dwo.
14804 (dwop_section_names): Add .debug_loclists.dwo.
14805 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14806 (struct dwarf2_per_cu_data): Add dwarf_version.
14807 (struct dwo_sections): Add loclists.
14808 (struct attr_abbrev): Add implicit_const.
14809 (read_indirect_line_string): New declaration.
14810 (read_unsigned_leb128): Delete declaration.
14811 (rcuh_kind): New definition.
14812 (read_and_check_comp_unit_head): Change parameter
14813 is_debug_types_section to section_kind.
14814 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14815 (read_comp_unit_head): Change parameter abfd to section, add parameter
14816 section_kind. Handle DWARF-5.
14817 (error_check_comp_unit_head): Accept also DWARF version 5.
14818 (read_and_check_comp_unit_head): Change parameter
14819 is_debug_types_section to section_kind.
14820 (read_and_check_type_unit_head): Delete function.
14821 (read_abbrev_offset): Handle DWARF-5.
14822 (create_debug_type_hash_table): Add parameter section_kind. Process
14823 only DW_UT_type. Use signature and type_offset_in_tu from struct
14824 comp_unit_head.
14825 (create_debug_types_hash_table): Update create_debug_type_hash_table
14826 caller.
14827 (create_all_type_units): Call create_debug_type_hash_table.
14828 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14829 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14830 caller.
14831 (skip_one_die): Handle DW_FORM_implicit_const.
14832 (dwarf2_rnglists_process): New function.
14833 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14834 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14835 (read_attribute_value): Handle DW_FORM_implicit_const,
14836 DW_FORM_line_strp.
14837 (read_attribute): Handle DW_FORM_implicit_const.
14838 (read_indirect_string_at_offset_from): New function from
14839 read_indirect_string_at_offset.
14840 (read_indirect_string_at_offset): Call
14841 read_indirect_string_at_offset_from.
14842 (read_indirect_line_string_at_offset): New function.
14843 (read_indirect_string): New function comment.
14844 (read_indirect_line_string): New function.
14845 (read_unsigned_leb128): Make it global.
14846 (dwarf2_string_attr): Handle DWARF-5.
14847 (add_include_dir_stub, read_formatted_entries): New functions.
14848 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14849 Handle DWARF-5.
14850 (per_cu_header_read_in): Update read_comp_unit_head caller.
14851 (dwarf2_version): New function.
14852 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14853 rnglists.
14854 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14855 fields.
14856
22d2f3ab
JK
148572017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14858
14859 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14860
5f46c5a5
JK
148612017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14862
14863 * dwarf2read.c (dwarf2_ranges_process): New function from
14864 dwarf2_ranges_read.
14865 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14866 dwarf2_ranges_process.
14867
78d4d2c5
JK
148682017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14869
14870 * dwarf2read.c (create_debug_type_hash_table): New function from
14871 create_debug_types_hash_table.
14872 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14873 (create_all_type_units, open_and_init_dwo_file): Update
14874 create_debug_types_hash_table callers.
14875
1b076f25
SDJ
148762017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14877
14878 PR gdb/16188
14879 * fork-child.c (trace_start_error): Fix thinko. va_end should
14880 refer to 'ap', not 'args'.
14881
0db8980c
SDJ
148822017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14883 Pedro Alves <palves@redhat.com>
14884
14885 PR gdb/16188
14886 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14887 calls succeeded.
14888 * fork-child.c (trace_start_error): New function.
14889 (trace_start_error_with_name): Likewise.
14890 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14891 * inf-ptrace.c (inf_ptrace_me): Likewise.
14892 * inferior.h (trace_start_error): New prototype.
14893 (trace_start_error_with_name): Likewise.
14894
99e8a4f9
SDJ
148952017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14896
14897 PR gdb/21164
14898 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14899 NULL before using it.
14900 * symmisc.c (maintenance_print_symbols): Likewise.
14901 (maintenance_print_msymbols): Likewise.
14902
4e746bb6
TW
149032017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14904
14905 * NEWS: Add record Python bindings entry.
14906
149072017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14908
14909 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14910 py-record-full.o.
14911 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14912 * python/py-record-btrace.c, python/py-record-btrace.h,
14913 python/py-record-full.c, python/py-record-full.h: New file.
14914 * python/py-record.c: Add include for py-record-btrace.h and
14915 py-record-full.h.
14916 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14917 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14918 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14919 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14920 New definition.
14921 (gdbpy_initialize_btrace): New export.
14922 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14923
149242017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14925
14926 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14927 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14928 * python/py-record.c: New file.
14929 * python/python-internal.h (gdbpy_start_recording,
14930 gdbpy_current_recording, gdpy_stop_recording,
14931 gdbpy_initialize_record): New export.
14932 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14933 (python_GdbMethods): Add gdbpy_start_recording,
14934 gdbpy_current_recording and gdbpy_stop_recording.
14935
149362017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14937
14938 * record-btrace.c (record_btrace_record_method): New function.
14939 (init_record_btrace_ops): Initialize to_record_method.
14940 * record-full.c (record_full_record_method): New function.
14941 (init_record_full_ops, init_record_full_core_ops): Add
14942 record_full_record_method.
14943 * record.h (enum record_method): New enum.
14944 * target-debug.h (target_debug_print_enum_record_method: New define.
14945 * target-delegates.c: Regenerate.
14946 * target.c (target_record_method): New function.
14947 * target.h: Include record.h.
14948 (struct target_ops) <to_record_method>: New field.
14949 (target_record_method): New export.
14950
149512017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14952
14953 * record.h (record_start, record_stop): New export.
14954 * record.c (record_start, record_stop): New function.
14955
149562017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14957
14958 * btrace.c (btrace_fetch): Copy function call segments pointer
14959 into a vector.
14960 (btrace_clear): Clear the vector.
14961 (btrace_find_insn_by_number): Use binary search to find the correct
14962 function call segment.
14963 * btrace.h (brace_fun_p): New typedef.
14964 (struct btrace_thread_info) <functions>: New field.
14965
149662017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14967
14968 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14969 * btrace.c (btrace_decode_error): ... here. New function.
14970 * btrace.h (btrace_decode_error): New export.
14971
149722017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14973
14974 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14975 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14976 btrace_find_insn_by_number): Remove special case for gaps.
14977 * btrace.h (btrace_insn_get_error): New export.
14978 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14979 * record-btrace.c (btrace_insn_history): Print number for gaps.
14980 (record_btrace_info, record_btrace_goto): Handle gaps.
14981
3f77c769
TT
149822017-02-14 Tom Tromey <tom@tromey.com>
14983
14984 PR python/13598:
14985 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14986 event.
14987 * python/py-evts.c (gdbpy_initialize_py_events): Add
14988 before_prompt registry.
14989 * python/py-events.h (events_object) <before_prompt>: New field.
14990
4c2c7ac6
MM
149912017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14992
14993 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14994
5cf30ebf
LM
149952017-02-13 Luis Machado <lgustavo@codesourcery.com>
14996
14997 * symfile (_initialize_symfile): Add usage text to the load command's
14998 help text.
14999
26a06916
SM
150002017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15001
15002 * utils.c (defaulted_query): Don't query on secondary UIs.
15003
0b145e37
TT
150042017-02-10 Tom Tromey <tom@tromey.com>
15005
15006 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15007
2d8365c4
TT
150082017-02-10 Tom Tromey <tom@tromey.com>
15009
15010 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15011 "cleanup" local.
15012 * python/py-type.c (typy_legacy_template_argument): Remove
15013 unnecessary "cleanup" local.
15014
2bb8f231
TT
150152017-02-10 Tom Tromey <tom@tromey.com>
15016
15017 * python/python.c (do_start_initialization): New function, from
15018 _initialize_python.
15019 (_initialize_python): Call do_start_initialization.
15020 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15021 goto.
15022
1bdfaf42
TT
150232017-02-10 Tom Tromey <tom@tromey.com>
15024
15025 * python/py-prettyprint.c (pretty_print_one_value): Use
15026 gdbpy_ref.
15027
88b6faea
TT
150282017-02-10 Tom Tromey <tom@tromey.com>
15029
15030 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15031 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15032 gdbpy_ref.
15033 * python/py-type.c (field_new): Use gdbpy_ref.
15034 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15035 gdbpy_ref.
15036 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15037 (py_free_pspace): Likewise.
15038 (pspace_to_pspace_object): Likewise.
15039 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15040 (py_free_objfile): Likewise.
15041 (objfile_to_objfile_object): Likewise.
15042 * python/py-inferior.c (delete_thread_object): Use
15043 gdbpy_ref.
15044 (infpy_read_memory): Likewise.
15045 (py_free_inferior): Likewise.
15046 * python/py-evtregistry.c (create_eventregistry_object): Use
15047 gdbpy_ref.
15048 * python/py-event.c (create_event_object): Use gdbpy_ref.
15049
7780f186
TT
150502017-02-10 Tom Tromey <tom@tromey.com>
15051
15052 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15053 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15054 used.
15055 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15056 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15057 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15058 python/py-framefilter.c, python/py-function.c,
15059 python/py-inferior.c, python/py-infevents.c,
15060 python/py-linetable.c, python/py-newobjfileevent.c,
15061 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15062 python/py-signalevent.c, python/py-stopevent.c,
15063 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15064 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15065 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15066 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15067
d4b0bb18
TT
150682017-02-10 Tom Tromey <tom@tromey.com>
15069
15070 * ui-out.h (ui_out_emit_type): New class.
15071 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15072 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15073 and ui_out_emit_tuple.
15074 (enumerate_locals): Likewise.
15075 (py_mi_print_variables, py_print_locals, py_print_args): Use
15076 ui_out_emit_list.
15077 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15078 ui_out_emit_list.
15079 * common/gdb_optional.h: New file.
15080
f67f945c
MG
150812017-02-10 Martin Galvan <martingalvan@sourceware.org>
15082
15083 * MAINTAINERS (Write After Approval): Update my e-mail address.
15084
18da0c51
MG
150852017-02-10 Martin Galvan <martingalvan@sourceware.org>
15086
15087 PR gdb/21122
15088 * breakpoint.c (_initialize_breakpoint): Update the help description
15089 of the 'commands' command to indicate that it takes a list argument.
15090
62c14536
SM
150912017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15092
15093 * interps.c (current_interp_set_logging): Remove "return".
15094
ff6fa247
GB
150952017-02-09 Gary Benson <gbenson@redhat.com>
15096
15097 * symtab.c (add_symtab_completions): Prevent NULL pointer
15098 dereference.
15099
a474bd8e
PA
151002017-02-08 Pedro Alves <palves@redhat.com>
15101
15102 * interps.c (interp::interp): Remove reference to quiet_p.
15103 (interp_set): Make static. Remove dead "Switching to" output
15104 code.
15105 (interp_quiet_p, interp_set_quiet): Delete.
15106 (interpreter_exec_cmd): Don't set the interpreter quiet.
15107 * interps.h (interp_quiet_p): Make static.
15108 (class interp) <quiet_p>: Remove field
15109
3d7b173c
JG
151102017-02-08 Jerome Guitton <guitton@adacore.com>
15111
604c4576
JG
15112 * cli/cli-decode.c (find_command_name_length): Make it extern.
15113 * cli/cli-decode.h (find_command_name_length): Declare.
15114 * cli/cli-script.c (command_name_equals, line_first_arg):
15115 New functions.
15116 (process_next_line): Use cli-decode to parse command names.
15117 (build_command_line): Make args a constant pointer.
15118
151192017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15120
3d7b173c
JG
15121 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15122 Remove case-insensitive search.
15123
1291063d
JM
151242017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15125
15126 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15127 at the end of the line. Avoids an ARI warning.
15128
20b477a7
LM
151292017-02-06 Luis Machado <lgustavo@codesourcery.com>
15130
15131 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15132 rdseed instructions.
15133 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15134
3f7b46f2
IR
151352017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15136
15137 PR tdep/20936
15138 Provide and use sparc32 and sparc64 target description XML files.
15139 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15140 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15141 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15142 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15143 * features/sparc/sparc32-solaris.xml: New file.
15144 * features/sparc/sparc64-solaris.xml: New file.
15145 * features/sparc/sparc32-solaris.c: Generated.
15146 * features/sparc/sparc64-solaris.c: Generated.
15147 * sparc-tdep.h: Account for differences in target descriptions.
15148 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15149 (sparc32_register_type): Use target provided registers.
15150 (validate_tdesc_registers): New function.
15151 (sparc32_gdbarch_init): Use tdesc_has_registers.
15152 Set pseudoregister functions.
15153 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15154 (sparc64_register_type): Use target provided registers.
15155 (sparc64_init_abi): Set pseudoregister functions.
15156
f0fd41c1
TT
151572017-02-03 Tom Tromey <tom@tromey.com>
15158
15159 PR rust/21097:
15160 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15161 with a single member.
15162
d6f9b0fb
PA
151632017-02-03 Pedro Alves <palves@redhat.com>
15164
15165 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15166 (cli_interp_base::~cli_interp_base): New.
15167 (cli_interp): New struct.
15168 (as_cli_interp): Cast the interp itself to cli_interp.
15169 (cli_interpreter_pre_command_loop): Rename to ...
15170 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15171 parameter.
15172 (cli_interpreter_init): Rename to ...
15173 (cli_interp::init): ... this. Remove 'self' parameter. Use
15174 boolean. Make extern.
15175 (cli_interpreter_resume): Rename to ...
15176 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15177 extern.
15178 (cli_interpreter_suspend): Rename to ...
15179 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15180 extern.
15181 (cli_interpreter_exec): Rename to ...
15182 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15183 extern.
15184 (cli_interpreter_supports_command_editing): Rename to ...
15185 (cli_interp_base::supports_command_editing): ... this. Remove
15186 'interp' parameter. Make extern.
15187 (cli_ui_out): Rename to ...
15188 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15189 Make extern.
15190 (cli_set_logging): Rename to ...
15191 (cli_interp_base::set_logging): ... this. Remove 'interp'
15192 parameter. Make extern.
15193 (cli_interp_procs): Delete.
15194 (cli_interp_factory): Adjust to use "new".
15195 * cli/cli-interp.h: Include "interps.h".
15196 (struct cli_interp_base): New struct.
15197 * interps.c (struct interp): Delete. Fields moved to interps.h.
15198 (interp_new): Delete.
15199 (interp::interp, interp::~interp): New.
15200 (interp_set): Use bool, and return void. Assume the interpreter
15201 has suspend, init and resume methods, and that the all return
15202 void.
15203 (set_top_level_interpreter): interp_set returns void.
15204 (interp_ui_out): Adapt.
15205 (current_interp_set_logging): Adapt.
15206 (interp_data): Delete.
15207 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15208 (interp_exec): Adapt.
15209 (top_level_interpreter_data): Delete.
15210 * interps.h (interp_init_ftype, interp_resume_ftype)
15211 (interp_suspend_ftype, interp_exec_ftype)
15212 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15213 (class interp): New.
15214 (interp_new): Delete.
15215 (interp_set): Now returns void. Use bool.
15216 (interp_data, top_level_interpreter_data): Delete.
15217 * mi/mi-common.h: Include interps.h.
15218 (class mi_interp): Inherit from interp. Define a ctor. Declare
15219 init, resume, suspect, exec, interp_ui_out, set_logging and
15220 pre_command_loop methods.
15221 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15222 (mi_interpreter_init): Rename to ...
15223 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15224 bool, return void and make extern. Adjust.
15225 (mi_interpreter_resume): ... Rename to ...
15226 (mi_interp::resume): ... this. Remove the 'data' parameter,
15227 return void and make extern. Adjust.
15228 (mi_interpreter_suspend): ... Rename to ...
15229 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15230 return void and make extern. Adjust.
15231 (mi_interpreter_exec): ... Rename to ...
15232 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15233 extern. Adjust.
15234 (mi_interpreter_pre_command_loop): ... Rename to ...
15235 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15236 parameter and make extern.
15237 (mi_on_normal_stop_1): Adjust.
15238 (mi_ui_out): Rename to ...
15239 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15240 parameter and make extern. Adjust.
15241 (mi_set_logging): Rename to ...
15242 (mi_interp::set_logging): ... this. Remove the 'interp'
15243 parameter and make extern. Adjust.
15244 (mi_interp_procs): Delete.
15245 (mi_interp_factory): Adjust to use 'new'.
15246 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15247 (mi_print_exception, mi_execute_command, mi_load_progress):
15248 Adjust.
15249 * tui/tui-interp.c (tui_interp): New class.
15250 (as_tui_interp): Return a tui_interp pointer.
15251 (tui_on_normal_stop, tui_on_signal_received)
15252 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15253 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15254 to use interp::interp_ui_out.
15255 (tui_init): Rename to ...
15256 (tui_interp::init): ... this. Remove the 'self' parameter, use
15257 bool, return void and make extern. Adjust.
15258 (tui_resume): Rename to ...
15259 (tui_interp::resume): ... this. Remove the 'data' parameter,
15260 return void and make extern. Adjust.
15261 (tui_suspend): Rename to ...
15262 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15263 return void and make extern. Adjust.
15264 (tui_ui_out): Rename to ...
15265 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15266 parameter, and make extern. Adjust.
15267 (tui_exec): Rename to ...
15268 (tui_interp::exec): ... this. Remove the 'data' parameter and
15269 make extern.
15270 (tui_interp_procs): Delete.
15271 (tui_interp_factory): Use "new".
15272
65c40c95
TT
152732017-02-02 Tom Tromey <tom@tromey.com>
15274
15275 * rust-exp.y (ends_raw_string, space_then_number)
15276 (rust_identifier_start_p): Return bool.
15277 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15278 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15279 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15280 (rust_chartype_p): Return bool.
15281 (val_print_struct, rust_print_struct_def, rust_print_type):
15282 Update.
15283 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15284 Return bool.
15285
b50f188d
TT
152862017-02-02 Tom Tromey <tom@tromey.com>
15287
15288 * rust-lang.c: Reindent.
15289
03c85b11
TT
152902017-02-02 Tom Tromey <tom@tromey.com>
15291
15292 * rust-lang.h (rust_crate_for_block): Update.
15293 * rust-lang.c (rust_crate_for_block): Return std::string.
15294 (rust_get_disr_info): Use std:;string, not
15295 gdb::unique_xmalloc_ptr.
15296 * rust-exp.y (crate_name): Update.
15297
9b6da501
PA
152982017-02-02 Pedro Alves <palves@redhat.com>
15299
15300 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15301 field out of gdb_disassembler_test and make it static.
15302
ec4cb20b
PA
153032017-02-02 Pedro Alves <palves@redhat.com>
15304
15305 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15306 mi1_interp and mi_interp fields.
15307
5be5dbf0
PA
153082017-02-02 Pedro Alves <palves@redhat.com>
15309
616268b6
PA
15310 * cli/cli-interp.c (struct saved_output_files, saved_output):
15311 Moved from cli/cli-logging.c.
15312 (cli_set_logging): New function.
15313 (cli_interp_procs): Install cli_set_logging.
15314 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15315 Declare.
15316 * cli/cli-logging.c (struct saved_output_files, saved_output):
15317 Moved to cli/cli-interp.c.
15318 (pop_output_files): Don't save outputs here.
15319 (make_logging_output): New function.
15320 (handle_redirections): Don't build tee nor save previous outputs
15321 here.
15322 * interps.c (current_interp_set_logging): Change prototype.
15323 Assume there's always a set_logging_proc method installed.
15324 * interps.h (interp_set_logging_ftype): Change prototype.
15325 (current_interp_set_logging): Change prototype and adjust comment.
15326 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15327 use make_logging_output.
15328 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
153292017-02-02 Pedro Alves <palves@redhat.com>
15330
5be5dbf0
PA
15331 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15332 from ...
15333 (set_logging_overwrite): ... here.
15334 (logging_no_redirect_file): Delete.
15335 (set_logging_redirect): Don't handle redirection on the fly.
15336 Instead warn that "logging off" / "logging on" is necessary.
15337 (pop_output_files): Delete references to logging_no_redirect_file.
15338 (show_logging_command): Always speak in terms of what will happen
15339 once logging is reenabled.
15340
c99cc448
PA
153412017-02-02 Pedro Alves <palves@redhat.com>
15342
15343 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15344
8b172ce7
PA
153452017-02-02 Pedro Alves <palves@redhat.com>
15346
15347 * disasm.c (gdb_pretty_print_insn): Rename to ...
15348 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15349 Remove gdbarch parameter. Adapt to clear the object's buffers
15350 instead of allocating new buffers, and to print using the object's
15351 gdb_disassembler instead of calling gdb_print_insn.
15352 (dump_insns): Use gdb_pretty_print_disassembler.
15353 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15354 (gdb_pretty_print_disassembler): New class.
15355 * record-btrace.c (btrace_insn_history): Use
15356 gdb_pretty_print_disassembler.
15357
d7e74731
PA
153582017-02-02 Pedro Alves <palves@redhat.com>
15359
15360 * ada-lang.c (type_as_string): Use string_file.
15361 * ada-valprint.c (ada_print_floating): Use string_file.
15362 * ada-varobj.c (ada_varobj_scalar_image)
15363 (ada_varobj_get_value_image): Use string_file.
15364 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15365 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15366 * breakpoint.c (update_inserted_breakpoint_locations)
15367 (insert_breakpoint_locations, reattach_breakpoints)
15368 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15369 (print_it_watchpoint): Use string_file.
15370 (save_breakpoints): Use stdio_file.
15371 * c-exp.y (oper): Use string_file.
15372 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15373 tee_file.
15374 (pop_output_files): Use delete.
15375 (handle_redirections): Use stdio_file and tee_file.
15376 * cli/cli-setshow.c (do_show_command): Use string_file.
15377 * compile/compile-c-support.c (c_compute_program): Use
15378 string_file.
15379 * compile/compile-c-symbols.c (generate_vla_size): Take a
15380 'string_file &' instead of a 'ui_file *'.
15381 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15382 of a 'ui_file *'. Use string_file.
15383 (generate_c_for_variable_locations): Take a 'string_file &'
15384 instead of a 'ui_file *'.
15385 * compile/compile-internal.h (generate_c_for_for_one_variable):
15386 Take a 'string_file &' instead of a 'ui_file *'.
15387 * compile/compile-loc2c.c (push, pushf, unary, binary)
15388 (print_label, pushf_register_address, pushf_register)
15389 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15390 'ui_file *'. Adjust.
15391 * compile/compile.c (compile_to_object): Use string_file.
15392 * compile/compile.h (compile_dwarf_expr_to_c)
15393 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15394 'ui_file *'.
15395 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15396 (replace_typedefs_qualified_name): Use string_file and
15397 obstack_copy0.
15398 * disasm.c (gdb_pretty_print_insn): Use string_file.
15399 (gdb_disassembly): Adjust reference the null_stream global.
15400 (do_ui_file_delete): Delete.
15401 (gdb_insn_length): Use null_stream.
15402 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15403 * dwarf2loc.c (dwarf2_compile_property_to_c)
15404 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15405 'string_file &' instead of a 'ui_file *'.
15406 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15407 * dwarf2read.c (do_ui_file_peek_last): Delete.
15408 (dwarf2_compute_name): Use string_file.
15409 * event-top.c (gdb_setup_readline): Use stdio_file.
15410 * gdbarch.sh (verify_gdbarch): Use string_file.
15411 * gdbtypes.c (safe_parse_type): Use null_stream.
15412 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15413 string_file.
15414 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15415 'string_file *' instead of a 'ui_file *'.
15416 (gdbscm_arch_disassemble): Use string_file.
15417 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15418 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15419 inherits from ui_file.
15420 (ioscm_file_port_delete, ioscm_file_port_rewind)
15421 (ioscm_file_port_put): Delete.
15422 (ioscm_file_port_write): Rename to ...
15423 (ioscm_file_port::write): ... this. Remove file_port_magic
15424 checks.
15425 (ioscm_file_port_new): Delete.
15426 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15427 ui_file_up.
15428 * guile/scm-type.c (tyscm_type_name): Use string_file.
15429 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15430 Use string_file.
15431 * infcmd.c (print_return_value_1): Use string_file.
15432 * infrun.c (print_target_wait_results): Use string_file.
15433 * language.c (add_language): Use string_file.
15434 * location.c (explicit_to_string_internal): Use string_file.
15435 * main.c (captured_main_1): Use null_file.
15436 * maint.c (maintenance_print_architecture): Use stdio_file.
15437 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15438 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15439 event_channel>: Change type to mi_console_file pointer.
15440 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15441 (mi_console_file_delete): Delete.
15442 (struct mi_console_file): Delete.
15443 (mi_console_file_magic): Delete.
15444 (mi_console_file_new): Delete.
15445 (mi_console_file::mi_console_file): New.
15446 (mi_console_file_delete): Delete.
15447 (mi_console_file_fputs): Delete.
15448 (mi_console_file::write): New.
15449 (mi_console_raw_packet): Delete.
15450 (mi_console_file::flush): New.
15451 (mi_console_file_flush): Delete.
15452 (mi_console_set_raw): Rename to ...
15453 (mi_console_file::set_raw): ... this.
15454 * mi/mi-console.h (class mi_console_file): New class.
15455 (mi_console_file_new, mi_console_set_raw): Delete.
15456 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15457 (mi_set_logging): Use delete and tee_file. Adjust.
15458 * mi/mi-main.c (output_register): Use string_file.
15459 (mi_cmd_data_evaluate_expression): Use string_file.
15460 (mi_cmd_data_read_memory): Use string_file.
15461 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15462 * mi/mi-out.c (mi_ui_out::main_stream): New.
15463 (mi_ui_out::rewind): Use main_stream and
15464 string_file.
15465 (mi_ui_out::put): Use main_stream and string_file.
15466 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15467 Allocate a 'string_file' instead.
15468 (mi_out_new): Don't allocate a mem_fileopen stream here.
15469 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15470 (mi_ui_out::main_stream): Declare method.
15471 * printcmd.c (eval_command): Use string_file.
15472 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15473 * python/py-arch.c (archpy_disassemble): Use string_file.
15474 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15475 * python/py-frame.c (frapy_str): Use string_file.
15476 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15477 Use string_file.
15478 * python/py-type.c (typy_str): Use string_file.
15479 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15480 * python/py-value.c (valpy_str): Use string_file.
15481 * record-btrace.c (btrace_insn_history): Use string_file.
15482 * regcache.c (regcache_print): Use stdio_file.
15483 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15484 * remote.c (escape_buffer): Use string_file.
15485 * rust-lang.c (rust_get_disr_info): Use string_file.
15486 * serial.c (serial_open_ops_1): Use stdio_file.
15487 (do_serial_close): Use delete.
15488 * stack.c (print_frame_arg): Use string_file.
15489 (print_frame_args): Remove local mem_fileopen stream, not used.
15490 (print_frame): Use string_file.
15491 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15492 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15493 Take a 'string_file *' instead of a 'ui_file *'.
15494 * top.c (new_ui): Use stdio_file and stderr_file.
15495 (free_ui): Use delete.
15496 (execute_command_to_string): Use string_file.
15497 (quit_confirm): Use string_file.
15498 * tracepoint.c (collection_list::append_exp): Use string_file.
15499 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15500 * tui/tui-file.c: Don't include "ui-file.h".
15501 (enum streamtype, struct tui_stream): Delete.
15502 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15503 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15504 (tui_file::tui_file): New method.
15505 (tui_file_fputs): Delete.
15506 (tui_file_get_strbuf): Delete.
15507 (tui_file::puts): New method.
15508 (tui_file_adjust_strbuf): Delete.
15509 (tui_file_flush): Delete.
15510 (tui_file::flush): New method.
15511 * tui/tui-file.h: Tweak intro comment.
15512 Include ui-file.h.
15513 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15514 (tui_file_adjust_strbuf): Delete declarations.
15515 (class tui_file): New class.
15516 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15517 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15518 (tui_register_format): Use string_stream.
15519 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15520 (tui_get_function_from_frame): Use string_file.
15521 * typeprint.c (type_to_string): Use string_file.
15522 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15523 (null_stream): New global.
15524 (ui_file_delete): Delete.
15525 (ui_file::ui_file): New.
15526 (null_file_isatty): Delete.
15527 (ui_file::~ui_file): New.
15528 (null_file_rewind): Delete.
15529 (ui_file::printf): New.
15530 (null_file_put): Delete.
15531 (null_file_flush): Delete.
15532 (ui_file::putstr): New.
15533 (null_file_write): Delete.
15534 (ui_file::putstrn): New.
15535 (null_file_read): Delete.
15536 (ui_file::putc): New.
15537 (null_file_fputs): Delete.
15538 (null_file_write_async_safe): Delete.
15539 (ui_file::vprintf): New.
15540 (null_file_delete): Delete.
15541 (null_file::write): New.
15542 (null_file_fseek): Delete.
15543 (null_file::puts): New.
15544 (ui_file_data): Delete.
15545 (null_file::write_async_safe): New.
15546 (gdb_flush, ui_file_isatty): Adjust.
15547 (ui_file_put, ui_file_rewind): Delete.
15548 (ui_file_write): Adjust.
15549 (ui_file_write_for_put): Delete.
15550 (ui_file_write_async_safe, ui_file_read): Adjust.
15551 (ui_file_fseek): Delete.
15552 (fputs_unfiltered): Adjust.
15553 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15554 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15555 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15556 (set_ui_file_data): Delete.
15557 (string_file::~string_file, string_file::write)
15558 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15559 (do_ui_file_as_string, ui_file_as_string): Delete.
15560 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15561 (struct mem_file): Delete.
15562 (mem_file_new): Delete.
15563 (stdio_file::stdio_file): New.
15564 (mem_file_delete): Delete.
15565 (stdio_file::stdio_file): New.
15566 (mem_fileopen): Delete.
15567 (stdio_file::~stdio_file): New.
15568 (mem_file_rewind): Delete.
15569 (stdio_file::set_stream): New.
15570 (mem_file_put): Delete.
15571 (stdio_file::open): New.
15572 (mem_file_write): Delete.
15573 (stdio_file_magic, struct stdio_file): Delete.
15574 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15575 (stdio_file::flush): New.
15576 (stdio_file_read): Rename to ...
15577 (stdio_file::read): ... this. Adjust.
15578 (stdio_file_write): Rename to ...
15579 (stdio_file::write): ... this. Adjust.
15580 (stdio_file_write_async_safe): Rename to ...
15581 (stdio_file::write_async_safe) ... this. Adjust.
15582 (stdio_file_fputs): Rename to ...
15583 (stdio_file::puts) ... this. Adjust.
15584 (stdio_file_isatty): Delete.
15585 (stdio_file_fseek): Delete.
15586 (stdio_file::isatty): New.
15587 (stderr_file_write): Rename to ...
15588 (stderr_file::write) ... this. Adjust.
15589 (stderr_file_fputs): Rename to ...
15590 (stderr_file::puts) ... this. Adjust.
15591 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15592 (stderr_file::stderr_file): New.
15593 (tee_file_magic): Delete.
15594 (struct tee_file): Delete.
15595 (tee_file::tee_file): New.
15596 (tee_file_new): Delete.
15597 (tee_file::~tee_file): New.
15598 (tee_file_delete): Delete.
15599 (tee_file_flush): Rename to ...
15600 (tee_file::flush): ... this. Adjust.
15601 (tee_file_write): Rename to ...
15602 (tee_file::write): ... this. Adjust.
15603 (tee_file::write_async_safe): New.
15604 (tee_file_fputs): Rename to ...
15605 (tee_file::puts): ... this. Adjust.
15606 (tee_file_isatty): Rename to ...
15607 (tee_file::isatty): ... this. Adjust.
15608 * ui-file.h (struct obstack, struct ui_file): Don't
15609 forward-declare.
15610 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15611 (ui_file_write_ftype)
15612 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15613 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15614 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15615 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15616 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15617 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15618 (set_ui_file_fseek): Delete.
15619 (ui_file_data, ui_file_delete, ui_file_rewind)
15620 (struct ui_file): New.
15621 (ui_file_up): New.
15622 (class null_file): New.
15623 (null_stream): Declare.
15624 (ui_file_write_for_put, ui_file_put): Delete.
15625 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15626 Delete.
15627 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15628 (gdb_fopen, tee_file_new): Delete.
15629 (struct string_file): New.
15630 (struct stdio_file): New.
15631 (stdio_file_up): New.
15632 (struct stderr_file): New.
15633 (class tee_file): New.
15634 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15635 of a 'ui_file *'. Adjust.
15636 * ui-out.h (class ui_out) <field_stream>: Likewise.
15637 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15638 (null_stream): Delete.
15639 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15640 Adjust.
15641 * utils.h (struct ui_file): Delete forward declaration..
15642 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15643 (error_stream): Take a 'string_file &' instead of a
15644 'ui_file *'.
15645 * varobj.c (varobj_value_get_print_value): Use string_file.
15646 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15647 * gdbarch.c: Regenerate.
15648
187808b0
PA
156492017-02-02 Pedro Alves <palves@redhat.com>
15650
15651 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15652 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15653 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15654 Adjust to call gdb_print_insn instead of
15655 gdb_disassembler::print_insn.
15656 (dump_insns, do_mixed_source_and_assembly_deprecated)
15657 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15658 'gdbarch' parameter. Remove gdb_disassembler parameter.
15659 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15660 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15661 declaration.
15662 (gdb_pretty_print_insn): Re-add declaration.
15663 * record-btrace.c (btrace_insn_history): Don't allocate a
15664 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15665
7a8eb317
SM
156662017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15667
15668 * disasm.h (gdb_disassembly): Remove file_string parameter.
15669 * disasm.c (gdb_disassembly): Likewise.
15670 * cli/cli-cmds.c (print_disassembly): Adapt.
15671 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15672 * stack.c (do_gdb_disassembly): Likewise.
15673
7346ef59
AA
156742017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15675
15676 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15677 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15678 targets. And if the implicit value is longer than needed, extract
15679 the first bytes instead of the "least significant" ones.
15680
cd4007e4
MM
156812017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15682
15683 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15684 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15685 (btrace_fetch): Assert can_access_registers_ptid.
15686 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15687 validate_registers_access.
15688
cf77c34e
MM
156892017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15690
15691 * gdbthread.h (can_access_registers_ptid): New.
15692 * thread.c (can_access_registers_ptid): New.
15693
be85ce7d
PA
156942017-02-01 Pedro Alves <palves@redhat.com>
15695
15696 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15697
29b0b251
PA
156982017-01-31 Pedro Alves <palves@redhat.com>
15699
15700 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15701 Fix typos.
15702
289b5b24
PA
157032017-01-31 Pedro Alves <palves@redhat.com>
15704
15705 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15706 not used.
15707
b47413b4
PA
157082017-01-31 Pedro Alves <palves@redhat.com>
15709
15710 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15711
60adb36c
PA
157122017-01-31 Pedro Alves <palves@redhat.com>
15713
15714 * common/scoped_restore.h
15715 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15716 change the value's parameter type to T2.
15717 (make_scoped_restore): Likewise.
15718
2735833d
WT
157192017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15720 Richard Henderson <rth@redhat.com>
15721
15722 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15723 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15724 GS_BASE for older kernels.
15725 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15726 GS_BASE for older kernels.
15727 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15728 and GS_BASE to the offset table.
15729 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15730 system register group.
15731 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15732 for older kernels.
15733 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15734 amd64 ABI.
15735 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15736 AMD64_GSBASE_REGNUM.
15737 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15738 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15739 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15740 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15741 i386/64bit-segments.xml in those rules.
15742 * features/i386/64bit-segments.xml: New file.
15743 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15744 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15745 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15746 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15747 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15748 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15749 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15750 * features/i386/amd64-avx-linux.c: Regenerated.
15751 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15752 * features/i386/amd64-avx-mpx.c: Regenerated.
15753 * features/i386/amd64-avx512-linux.c: Regenerated.
15754 * features/i386/amd64-linux.c: Regenerated.
15755 * features/i386/amd64-mpx-linux.c: Regenerated.
15756 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15757 * features/i386/i386-avx-mpx.c: Regenerated.
15758 * features/i386/x32-avx-linux.c: Regenerated.
15759 * features/i386/x32-avx512-linux.c: Regenerated.
15760 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15761 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15762 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15763 * regformats/i386/amd64-linux.dat: Regenerated.
15764 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15765 * regformats/i386/x32-avx-linux.dat: Regenerated.
15766 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15767 * regformats/i386/x32-linux.dat: Regenerated.
15768
8884e97e
WT
157692017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15770
15771 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15772 Set to AMD64_NUM_REGS.
15773
7005d26a
WT
157742017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15775
15776 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15777 that checks validity of a register number.
15778
4bd2e1b2
KC
157792017-01-27 Kees Cook <keescook@google.com>
15780
15781 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15782 fetch_fpregs if target has fpa registers.
15783 (arm_linux_store_inferior_registers): Call store_fpregs if target
15784 has fpa registers.
15785
7cf1de6c
AA
157862017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15787
15788 * cris-tdep.c (cris_gdbarch_init): Remove check for
15789 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15790
874a1c8c
AT
157912017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15792
15793 * corelow.c (get_core_register_section): Check for regset
15794 existence before checking for REGSET_VARIABLE_SIZE.
15795
d8b49cf0
YQ
157962017-01-26 Yao Qi <yao.qi@linaro.org>
15797 Pedro Alves <palves@redhat.com>
15798
15799 PR gdb/20939
15800 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15801 call memory_error, save memaddr instead.
15802 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15803 negative, cal memory_error.
15804 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15805
658ca58c
YQ
158062017-01-26 Yao Qi <yao.qi@linaro.org>
15807
15808 * disasm-selftests.c (memory_error_test): New function.
15809 (_initialize_disasm_selftests): Register memory_error_test.
15810
79843d45
YQ
158112017-01-26 Yao Qi <yao.qi@linaro.org>
15812
15813 * Makefile.in (SFILES): Add disasm-selftests.c and
15814 selftest-arch.c.
15815 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15816 * disasm-selftests.c: New file.
15817 * selftest-arch.c: New file.
15818 * selftest-arch.h: New file.
15819
8cafda32
YQ
158202017-01-26 Yao Qi <yao.qi@linaro.org>
15821
15822 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15823 to bfd_arch_mep. Don't return 0 if section is not
15824 found. Call print_insn_mep.
15825
e47ad6c0
YQ
158262017-01-26 Pedro Alves <palves@redhat.com>
15827 Yao Qi <yao.qi@linaro.org>
15828
15829 * arm-tdep.c: Include "disasm.h".
15830 (gdb_print_insn_arm): Update code to get gdbarch.
15831 * disasm.c (dis_asm_read_memory): Change it to
15832 gdb_disassembler::dis_asm_read_memory.
15833 (dis_asm_memory_error): Likewise.
15834 (dis_asm_print_address): Likewise.
15835 (gdb_pretty_print_insn): Change it to
15836 gdb_disassembler::pretty_print_insn.
15837 (dump_insns): Add one argument gdb_disassemlber. All
15838 callers updated.
15839 (do_mixed_source_and_assembly_deprecated): Likewise.
15840 (do_mixed_source_and_assembly): Likewise.
15841 (do_assembly_only): Likewise.
15842 (gdb_disassembler::gdb_disassembler): New.
15843 (gdb_disassembler::print_insn): New.
15844 * disasm.h (class gdb_disassembler): New.
15845 (gdb_pretty_print_insn): Remove declaration.
15846 (gdb_disassemble_info): Likewise.
15847 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15848 (gdbscm_disasm_read_memory_worker): Update.
15849 (gdbscm_disasm_read_memory): Update.
15850 (gdbscm_disasm_memory_error): Remove.
15851 (gdbscm_disasm_print_address): Remove.
15852 (gdbscm_disassembler::gdbscm_disassembler): New.
15853 (gdbscm_print_insn_from_port): Update.
15854 * mips-tdep.c: Include disasm.h.
15855 (gdb_print_insn_mips): Update code to get gdbarch.
15856 * record-btrace.c (btrace_insn_history): Update.
15857 * spu-tdep.c: Include disasm.h.
15858 (struct spu_dis_asm_data): Remove.
15859 (struct spu_dis_asm_info): New.
15860 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15861 SPU id.
15862 (gdb_print_insn_spu): Cast disassemble_info to
15863 spu_dis_asm_info.
15864
80d75874
YQ
158652017-01-26 Yao Qi <yao.qi@linaro.org>
15866
15867 * disasm.c (do_ui_file_delete): Delete.
15868 (gdb_insn_length): Move code creating stream to ...
15869 * utils.c (null_stream): ... here. New function.
15870 * utils.h (null_stream): Declare.
15871
60685cd0
SM
158722017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15873
15874 * python/py-inferior.c (find_thread_object): Return directly
15875 from the loop. Remove "found" variable.
15876
eb1cdb62
JB
158772017-01-21 Joel Brobecker <brobecker@adacore.com>
15878
15879 GDB 7.12.1 released.
15880
b1ce6568
SM
158812017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15882
15883 * python/py-function.c (fnpy_call): Reorder declarations to have
15884 the gdbpy_enter object declared first.
15885 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15886
6f8b0407
SM
158872017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15888
fec93fb1 15889 PR python/21068
6f8b0407
SM
15890 * python/python-internal.h (PyMem_RawMalloc): Define for
15891 Python < 3.4.
15892 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15893 PyMem_RawMalloc instead of PyMem_Malloc.
15894
78cbbba8
LM
158952017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15896 Luis Machado <lgustavo@codesourcery.com>
15897
15898 * NEWS (New commands): Mention flash-erase.
15899 (New MI commands): Mention target-flash-erase.
15900 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15901 command.
15902 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15903 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15904 * target.c (flash_erase_command): New function.
15905 (initialize_targets): Add new flash-erase command.
15906 * target.h (flash_erase_command): New declaration.
15907
2132fe85
JB
159082017-01-20 Joel Brobecker <brobecker@adacore.com>
15909
15910 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15911 HAVE_SYS_PROCFS_H is defined.
15912
d1dff226
AH
159132017-01-18 Alan Hayward <alan.hayward@arm.com>
15914
15915 * remote.c (struct cached_reg): Change data into a pointer.
15916 * (stop_reply_dtr): Free data pointers before deleting vector.
15917 (process_stop_reply): Likewise.
15918 (remote_parse_stop_reply): Allocate space for data
15919
9890e433
AH
159202017-01-18 Alan Hayward <alan.hayward@arm.com>
15921
15922 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15923 MAX_REGISTER_SIZE.
15924 (amd64_pseudo_register_read_value): Likewise.
15925 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15926 (store_register_using_P): Likewise.
15927 * regcache.c (regcache_xfer_part): Likewise.
15928
7a36499a
IR
159292017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15930
15931 Split real and pseudo registers.
15932 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15933 (sparc32_pseudo_regnum): New enum.
15934 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15935 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15936 (SPARC32_CP0_REGISTERS): New macro.
15937 (sparc32_pseudo_register_name): New function.
15938 (sparc32_register_name): Use sparc32_pseudo_register_name.
15939 (sparc32_pseudo_register_type): New function.
15940 (sparc32_register_type): Use sparc32_pseudo_register_type.
15941 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15942 pseudo register numbers.
15943 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15944 (SPARC64_CP0_REGISTERS): New macro.
15945 (sparc64_pseudo_register_name): New function.
15946 (sparc64_register_name): Use sparc64_pseudo_register_name.
15947 (sparc64_pseudo_register_type): New function.
15948 (sparc64_register_type): Use sparc64_pseudo_register_type.
15949 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15950 pseudo register numbers.
15951 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15952 sparc64_store_arguments): Handle pseudo register numbers.
15953
6f8976bf
YQ
159542017-01-13 Yao Qi <yao.qi@linaro.org>
15955
15956 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15957 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15958 output.
15959 (getpkt_or_notif_sane_1): Likewise.
15960
e4241ace
YQ
159612017-01-13 Yao Qi <yao.qi@linaro.org>
15962
15963 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15964 of CC. Pass "-x c++-header" instead of "-x c".
15965
3015c064
SM
159662017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15967
15968 * remote.c (remote_can_async_p): Update comment.
15969
fde1b17d
SM
159702017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15971
15972 * linux-nat.c (linux_nat_can_async_p): Update comment.
15973
ca1ca08b
SM
159742017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15975
15976 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15977
4ad2da73
SM
159782017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15979
15980 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15981
c8b23b3f
TT
159822017-01-10 Tom Tromey <tom@tromey.com>
15983
15984 * python/py-type.c (typy_legacy_template_argument): Update.
15985 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15986 ~demangle_parse_info): Declare new members.
15987 (cp_demangled_name_to_comp): Return unique_ptr.
15988 (cp_demangled_name_parse_free)
15989 (make_cleanup_cp_demangled_name_parse_free)
15990 (cp_new_demangle_parse_info): Remove.
15991 * cp-support.c (do_demangled_name_parse_free_cleanup)
15992 (make_cleanup_cp_demangled_name_parse_free): Remove.
15993 (inspect_type, cp_canonicalize_string_full)
15994 (cp_canonicalize_string): Update.
15995 (mangled_name_to_comp): Change return type.
15996 (cp_class_name_from_physname, method_name_from_physname)
15997 (cp_func_name, cp_remove_params): Update.
15998 * cp-name-parser.y (demangle_parse_info): New constructor, from
15999 cp_new_demangle_parse_info.
16000 (~demangle_parse_info): New destructor, from
16001 cp_demangled_name_parse_free.
16002 (cp_merge_demangle_parse_infos): Update.
16003 (cp_demangled_name_to_comp): Change return type.
16004
1ac32117
TT
160052017-01-10 Tom Tromey <tom@tromey.com>
16006
16007 * top.c (prevent_dont_repeat): Change return type.
16008 * python/python.c (execute_gdb_command): Use std::string.
16009 Update.
16010 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16011 * command.h (prevent_dont_repeat): Change return type.
16012 * breakpoint.c (bpstat_do_actions_1): Update.
16013
0cf08227
TT
160142017-01-10 Tom Tromey <tom@tromey.com>
16015
16016 * value.h (scoped_value_mark::~scoped_value_mark): Call
16017 free_to_mark.
16018 (scoped_value_mark::free_to_mark): New method.
16019 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16020 scoped_value_mark.
16021
eb115069
TT
160222017-01-10 Tom Tromey <tom@tromey.com>
16023
16024 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16025 (valpy_reference_value, valpy_const_value, valpy_get_address)
16026 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16027 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16028 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16029 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16030 scoped_value_mark.
16031 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16032 * value.h (scoped_value_mark): New class.
16033
906768f9
TT
160342017-01-10 Tom Tromey <tom@tromey.com>
16035
16036 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16037 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16038 * psymtab.c (discard_psymtabs_upto): Remove.
16039 (make_cleanup_discard_psymtabs): Remove.
16040 (struct psymtab_state): Remove.
16041
bef155c3
TT
160422017-01-10 Tom Tromey <tom@tromey.com>
16043
16044 * record-full.c (record_full_save_cleanups): Remove.
16045 (record_full_save): Use gdb::unlinker.
16046 * gcore.c (do_bfd_delete_cleanup): Remove.
16047 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16048 cleanups.
16049 * dwarf2read.c (unlink_if_set): Remove.
16050 (write_psymtabs_to_index): Use gdb::unlinker.
16051 * common/gdb_unlinker.h: New file.
16052
192b62ce
TT
160532017-01-10 Tom Tromey <tom@tromey.com>
16054
16055 * windows-tdep.c (windows_xfer_shared_library): Update.
16056 * windows-nat.c (windows_make_so): Update.
16057 * utils.h (make_cleanup_bfd_unref): Remove.
16058 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16059 * symfile.h (symfile_bfd_open)
16060 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16061 * symfile.c (read_symbols, symbol_file_add)
16062 (separate_debug_file_exists): Update.
16063 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16064 (generic_load, reread_symbols): Update.
16065 * symfile-mem.c (symbol_file_add_from_memory): Update.
16066 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16067 (spu_symbol_file_add_from_memory): Update.
16068 * solist.h (struct target_so_ops) <bfd_open>: Return
16069 gdb_bfd_ref_ptr.
16070 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16071 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16072 gdb_bfd_ref_ptr.
16073 (solib_map_sections, reload_shared_libraries_1): Update.
16074 * solib-svr4.c (enable_break): Update.
16075 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16076 * solib-frv.c (enable_break2): Update.
16077 * solib-dsbt.c (enable_break): Update.
16078 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16079 gdb_bfd_ref_ptr.
16080 (darwin_solib_get_all_image_info_addr_at_init): Update.
16081 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16082 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16083 * record-full.c (record_full_save): Update.
16084 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16085 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16086 * minidebug.c (find_separate_debug_file_in_section): Return
16087 gdb_bfd_ref_ptr.
16088 * machoread.c (macho_add_oso_symfile): Change abfd to
16089 gdb_bfd_ref_ptr.
16090 (macho_symfile_read_all_oso): Update.
16091 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16092 (macho_symfile_read): Update.
16093 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16094 (jit_bfd_try_read_symtab): Update.
16095 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16096 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16097 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16098 gdb_bfd_ref_ptr.
16099 (gdb_bfd_ref_policy): New struct.
16100 (gdb_bfd_ref_ptr): New typedef.
16101 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16102 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16103 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16104 gdb_bfd_ref_ptr.
16105 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16106 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16107 (gcore_command): Update.
16108 * exec.c (exec_file_attach): Update.
16109 * elfread.c (elf_symfile_read): Update.
16110 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16111 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16112 (open_and_init_dwo_file): Update.
16113 (open_dwp_file): Return gdb_bfd_ref_ptr.
16114 (open_and_init_dwp_file): Update.
16115 * corelow.c (core_open): Update.
16116 * compile/compile-object-load.c (compile_object_load): Update.
16117 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16118 * coffread.c (coff_symfile_read): Update.
16119 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16120 gdb_bfd_ref_ptr. Rename.
16121 (dump_bfd_file, restore_command): Update.
16122 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16123 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16124 (find_separate_debug_file_by_buildid): Update.
16125
50315b21
TT
161262017-01-10 Tom Tromey <tom@tromey.com>
16127
16128 * common/gdb_ref_ptr.h: New file.
16129 * python/py-ref.h (struct gdbpy_ref_policy): New.
16130 (gdbpy_ref): Now a typedef.
16131
fc4007c9
TT
161322017-01-10 Tom Tromey <tom@tromey.com>
16133
16134 * utils.h (make_cleanup_htab_delete): Don't declare.
16135 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16136 Remove.
16137 * linespec.c (decode_compound_collector): Add constructor,
16138 destructor.
16139 (lookup_prefix_sym): Remove cleanup.
16140 (symtab_collector): Add constructor, destructor.
16141 (collect_symtabs_from_filename): Remove cleanup.
16142 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16143 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16144 Use htab_up.
16145 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16146 * dwarf2read.c (dw2_expand_symtabs_matching)
16147 (dw2_map_symbol_filenames, dwarf_decode_macros)
16148 (write_psymtabs_to_index): Use htab_up.
16149 * dwarf2loc.c (func_verify_no_selftailcall)
16150 (call_site_find_chain_1, func_verify_no_selftailcall)
16151 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16152 std::vector, gdb::unique_xmalloc_ptr.
16153 (call_sitep): Remove typedef.
16154 (dwarf2_locexpr_baton_eval): Remove unused variable.
16155
8dbcee67
TT
161562017-01-10 Tom Tromey <tom@tromey.com>
16157
16158 * python/python-internal.h (make_cleanup_py_decref)
16159 (make_cleanup_py_xdecref): Don't declare.
16160 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16161 (py_xdecref, make_cleanup_py_xdecref): Remove.
16162
13df46cc
TT
161632017-01-10 Tom Tromey <tom@tromey.com>
16164
16165 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16166 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16167
06fc9bf7
TT
161682017-01-10 Tom Tromey <tom@tromey.com>
16169
16170 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16171
830a4934
TT
161722017-01-10 Tom Tromey <tom@tromey.com>
16173
16174 * python/py-utils.c (unicode_to_encoded_string)
16175 (python_string_to_target_string)
16176 (python_string_to_target_python_string)
16177 (python_string_to_host_string, gdbpy_obj_to_string)
16178 (get_addr_from_python): Use gdbpy_ref.
16179
4586d543
TT
161802017-01-10 Tom Tromey <tom@tromey.com>
16181
16182 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16183 gdbpy_ref.
16184
59876f8f
TT
161852017-01-10 Tom Tromey <tom@tromey.com>
16186
16187 * python/python.c (eval_python_command, gdbpy_decode_line)
16188 (gdbpy_run_events, gdbpy_start_type_printers)
16189 (gdbpy_apply_type_printers): Use gdbpy_ref.
16190
97d83487
TT
161912017-01-10 Tom Tromey <tom@tromey.com>
16192
16193 * python/py-param.c (get_doc_string, compute_enum_values): Use
16194 gdbpy_ref.
16195
9205649a
TT
161962017-01-10 Tom Tromey <tom@tromey.com>
16197
16198 * python/py-inferior.c (find_thread_object, build_inferior_list):
16199 Use gdbpy_ref.
16200
74c49d45
TT
162012017-01-10 Tom Tromey <tom@tromey.com>
16202
16203 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16204
16361ffb
TT
162052017-01-10 Tom Tromey <tom@tromey.com>
16206
16207 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16208 gdbpy_ref.
16209
905f2cca
TT
162102017-01-10 Tom Tromey <tom@tromey.com>
16211
16212 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16213 extra incref.
16214 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16215 Use gdbpy_ref.
16216
64081434
TT
162172017-01-10 Tom Tromey <tom@tromey.com>
16218
16219 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16220 gdbpy_ref.
16221
59e9e831
TT
162222017-01-10 Tom Tromey <tom@tromey.com>
16223
16224 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16225 decref results of PyArg_ParseTupleAndKeywords.
16226
9de10f6d
TT
162272017-01-10 Tom Tromey <tom@tromey.com>
16228
16229 * python/python.c (python_run_simple_file): Use
16230 unique_xmalloc_ptr, gdbpy_ref.
16231
2bd5759d
TT
162322017-01-10 Tom Tromey <tom@tromey.com>
16233
16234 * python/py-prettyprint.c (print_stack_unless_memory_error)
16235 (print_string_repr, print_children): Use gdbpy_ref.
16236 (dummy_python_frame): New class.
16237 (dummy_python_frame::dummy_python_frame): Rename from
16238 push_dummy_python_frame.
16239 (py_restore_tstate): Remove.
16240
3b4e0e01
TT
162412017-01-10 Tom Tromey <tom@tromey.com>
16242
16243 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16244
17a22718
TT
162452017-01-10 Tom Tromey <tom@tromey.com>
16246
16247 * python/python.c (ensure_python_env, restore_python_env):
16248 Remove.
16249 * python/python-internal.h (ensure_python_env): Don't declare.
16250 * varobj.h (varobj_ensure_python_env): Don't declare.
16251 * varobj.c (varobj_ensure_python_env): Remove.
16252
68cdc557
TT
162532017-01-10 Tom Tromey <tom@tromey.com>
16254
16255 * varobj.c (varobj_value_get_print_value): Use
16256 gdbpy_enter_varobj.
16257
1eba6383
TT
162582017-01-10 Tom Tromey <tom@tromey.com>
16259
16260 * python/py-prettyprint.c (print_string_repr, print_children):
16261 Update.
16262 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16263 of "encoding".
16264 * varobj.c (varobj_value_get_print_value): Update.
16265 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16266
bde7b3e3
TT
162672017-01-10 Tom Tromey <tom@tromey.com>
16268
16269 * varobj.c (varobj_get_display_hint)
16270 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16271 (varobj_set_visualizer, free_variable): Use
16272 gdbpy_enter_varobj.
16273
a7785f8c
TT
162742017-01-10 Tom Tromey <tom@tromey.com>
16275
16276 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16277 (do_finish_initialization): New function. Use gdbpy_ref.
16278 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16279 do_finish_initialization.
16280
2865bfce
TT
162812017-01-10 Tom Tromey <tom@tromey.com>
16282
16283 * python/py-param.c (get_set_value, get_show_value): Use
16284 gdbpy_enter, gdbpy_ref.
16285
0e9dcc75
TT
162862017-01-10 Tom Tromey <tom@tromey.com>
16287
16288 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16289
12a5cedd
TT
162902017-01-10 Tom Tromey <tom@tromey.com>
16291
16292 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16293
788f2586
TT
162942017-01-10 Tom Tromey <tom@tromey.com>
16295
16296 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16297 Use gdbpy_enter_varobj.
16298
6cd67bea
TT
162992017-01-10 Tom Tromey <tom@tromey.com>
16300
16301 * varobj.c (gdbpy_enter_varobj): New constructor.
16302 * python/python-internal.h (gdbpy_enter_varobj): New class.
16303 * python/py-varobj.c (py_varobj_get_iterator): Use
16304 gdbpy_enter_varobj.
16305
14b122bf
TT
163062017-01-10 Tom Tromey <tom@tromey.com>
16307
16308 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16309 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16310 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16311 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16312 unique_xmalloc_ptr.
16313 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16314
bf1ca3b9
TT
163152017-01-10 Tom Tromey <tom@tromey.com>
16316
16317 * python/py-xmethods.c (invoke_match_method): Use
16318 gdbpy_ref.
16319
572a5524
TT
163202017-01-10 Tom Tromey <tom@tromey.com>
16321
16322 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16323 gdbpy_enter, gdbpy_ref.
16324
396a78b6
TT
163252017-01-10 Tom Tromey <tom@tromey.com>
16326
16327 * python/python.c (python_interactive_command): Use gdbpy_enter.
16328
a88b13c7
TT
163292017-01-10 Tom Tromey <tom@tromey.com>
16330
16331 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16332 gdbpy_ref.
16333
e9f0c363
TT
163342017-01-10 Tom Tromey <tom@tromey.com>
16335
16336 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16337 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16338
6349f452
TT
163392017-01-10 Tom Tromey <tom@tromey.com>
16340
16341 * utils.h (htab_deleter): New struct.
16342 (htab_up): New typedef.
16343 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16344 gdbpy_enter, gdbpy_ref, htab_up.
16345
c0171de6
TT
163462017-01-10 Tom Tromey <tom@tromey.com>
16347
16348 * python/py-unwind.c (pending_frame_invalidate): Remove.
16349 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16350
f18e226f
TT
163512017-01-10 Tom Tromey <tom@tromey.com>
16352
16353 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16354 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16355
c57af3f1
TT
163562017-01-10 Tom Tromey <tom@tromey.com>
16357
16358 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16359
60e600ec
TT
163602017-01-10 Tom Tromey <tom@tromey.com>
16361
16362 * python/python.c (gdbpy_eval_from_control_command)
16363 (gdbpy_source_script, gdbpy_run_events)
16364 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16365 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16366 gdbpy_enter.
16367
bf7da5b0
TT
163682017-01-10 Tom Tromey <tom@tromey.com>
16369
16370 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16371
2d38bced
TT
163722017-01-10 Tom Tromey <tom@tromey.com>
16373
16374 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16375
07bc7329
TT
163762017-01-10 Tom Tromey <tom@tromey.com>
16377
16378 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16379 (python_on_inferior_call_pre, python_on_inferior_call_post)
16380 (python_on_memory_change, python_on_register_change)
16381 (python_inferior_exit, python_new_objfile, add_thread_object)
16382 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16383
6e7c365e
TT
163842017-01-10 Tom Tromey <tom@tromey.com>
16385
16386 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16387 (bpfinishpy_handle_exit): Use gdbpy_enter.
16388
6ba0cd40
TT
163892017-01-10 Tom Tromey <tom@tromey.com>
16390
16391 * python/py-cmd.c (cmdpy_destroyer)
16392 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16393 gdbpy_enter.
16394
de2dc875
TT
163952017-01-10 Tom Tromey <tom@tromey.com>
16396
16397 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16398 gdbpy_enter.
16399 (gdbpy_breakpoint_has_cond): Likewise.
16400
4ecee2c4
TT
164012017-01-10 Tom Tromey <tom@tromey.com>
16402
16403 * python/python.c (gdbpy_enter): New constructor.
16404 (~gdbpy_enter): New destructor.
16405 (restore_python_env, ensure_python_env): Rewrite.
16406 * python/python-internal.h (gdbpy_enter): New class.
16407
37fce74f
TT
164082017-01-10 Tom Tromey <tom@tromey.com>
16409
16410 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16411
53a0cca3
TT
164122017-01-10 Tom Tromey <tom@tromey.com>
16413
16414 * python/py-value.c (value_has_field, get_field_flag)
16415 (get_field_type, valpy_getitem, convert_value_from_python): Use
16416 gdbpy_ref.
16417
ff3724f5
TT
164182017-01-10 Tom Tromey <tom@tromey.com>
16419
16420 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16421 gdbpy_ref.
16422
0700aea5
TT
164232017-01-10 Tom Tromey <tom@tromey.com>
16424
16425 * python/py-prettyprint.c (search_pp_list)
16426 (find_pretty_printer_from_objfiles)
16427 (find_pretty_printer_from_progspace)
16428 (find_pretty_printer_from_gdb, find_pretty_printer)
16429 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16430 gdbpy_ref.
16431
1bb44c9f
TT
164322017-01-10 Tom Tromey <tom@tromey.com>
16433
16434 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16435
87ce03fd
TT
164362017-01-10 Tom Tromey <tom@tromey.com>
16437
16438 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16439 (ltpy_get_all_source_lines): Use gdbpy_ref.
16440
ee0a3fb8
TT
164412017-01-10 Tom Tromey <tom@tromey.com>
16442
16443 * python/py-framefilter.c (extract_sym, extract_value)
16444 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16445 gdbpy_ref.
16446
bf2a52fa
TT
164472017-01-10 Tom Tromey <tom@tromey.com>
16448
16449 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16450
f59fe7f8
TT
164512017-01-10 Tom Tromey <tom@tromey.com>
16452
16453 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16454
80bd970a
TT
164552017-01-10 Tom Tromey <tom@tromey.com>
16456
16457 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16458 gdbpy_ref.
16459
d1b3de2e
TT
164602017-01-10 Tom Tromey <tom@tromey.com>
16461
16462 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16463
3bb43384
TT
164642017-01-10 Tom Tromey <tom@tromey.com>
16465
16466 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16467 (typy_range): Use gdbpy_ref.
16468
abf5651e
TT
164692017-01-10 Tom Tromey <tom@tromey.com>
16470
16471 * python/py-threadevent.c (create_thread_event_object): Use
16472 gdbpy_ref.
16473 * python/py-stopevent.c (create_stop_event_object): Simplify.
16474 (emit_stop_event): Use gdbpy_ref.
16475 * python/py-signalevent.c (create_signal_event_object): Use
16476 gdbpy_ref.
16477 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16478 (emit_new_objfile_event, create_clear_objfiles_event_object)
16479 (emit_clear_objfiles_event): Use gdbpy_ref.
16480 * python/py-infevents.c (create_inferior_call_event_object)
16481 (create_register_changed_event_object)
16482 (create_memory_changed_event_object, emit_inferior_call_event)
16483 (emit_memory_changed_event, emit_register_changed_event): Use
16484 gdbpy_ref.
16485 * python/py-exitedevent.c (create_exited_event_object)
16486 (emit_exited_event): Use gdbpy_ref.
16487 * python/py-event.h (evpy_emit_event): Remove
16488 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16489 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16490 * python/py-continueevent.c (emit_continue_event): Use
16491 gdbpy_ref.
16492 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16493 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16494 gdbpy_ref.
16495 * python/py-bpevent.c (create_breakpoint_event_object): Use
16496 gdbpy_ref.
16497
a68ff33e
TT
164982017-01-10 Tom Tromey <tom@tromey.com>
16499
16500 * python/py-ref.h: New file.
16501
7becfd03
SM
165022017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16503
16504 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16505 void.
16506 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16507 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16508 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16509 * ui-out.c (ui_out::redirect): Likewise.
16510 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16511 * cli/cli-logging.c (set_logging_redirect): Update call site of
16512 ui_out::redirect.
16513 (handle_redirections): Likewise.
16514 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16515 * top.c (execute_command_to_string): Likewise.
16516 * utils.c (do_ui_out_redirect_pop): Likewise.
16517
df294654
SM
165182017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16519
16520 * stack.c (_initialize_stack): Update "frame" command help message.
16521
f5e6296e
IB
165222017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16523
16524 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16525
0e2d6fa6
YQ
165262017-01-06 Yao Qi <yao.qi@linaro.org>
16527
16528 * x86-linux-nat.h: Include gdb_proc_service.h.
16529
44d6d3f9
YQ
165302017-01-06 Yao Qi <yao.qi@linaro.org>
16531
16532 * ser-base.h: Include serial.h.
16533
656731fe
YQ
165342017-01-06 Yao Qi <yao.qi@linaro.org>
16535
16536 * ppc-linux-tdep.h: Include ppc-tdep.h.
16537
1ca8f924
YQ
165382017-01-06 Yao Qi <yao.qi@linaro.org>
16539
16540 * nat/amd64-linux-siginfo.h: Include signal.h.
16541
bc3008c4
YQ
165422017-01-06 Yao Qi <yao.qi@linaro.org>
16543
16544 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16545
66c80d03
YQ
165462017-01-06 Yao Qi <yao.qi@linaro.org>
16547
16548 * mi/mi-parse.h: Include mi-cmds.h.
16549
051d2dda
YQ
165502017-01-06 Yao Qi <yao.qi@linaro.org>
16551
16552 * inf-loop.c: Don't include "target.h".
16553 * inf-loop.h: Include it here.
16554
8018d34f
YQ
165552017-01-06 Yao Qi <yao.qi@linaro.org>
16556
16557 * dfp.h: Include "dboulest.h" and "expression.h".
16558
c0b8369c
YQ
165592017-01-06 Yao Qi <yao.qi@linaro.org>
16560
16561 * ax-gdb.h: Include "ax.h".
16562
ad5cba2a
YQ
165632017-01-06 Yao Qi <yao.qi@linaro.org>
16564
16565 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16566 with nat/gdb_ptrace.h.
16567
1c33cd7f
YQ
165682017-01-05 Yao Qi <yao.qi@linaro.org>
16569
16570 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16571 new line.
16572 (mips64_fbsd_sigframe_init): Likewise.
16573
c988ac1d
JB
165742017-01-04 John Baldwin <jhb@FreeBSD.org>
16575
16576 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16577 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16578
b268007c
JB
165792017-01-04 John Baldwin <jhb@FreeBSD.org>
16580
16581 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16582 * NEWS: Mention new FreeBSD/mips native configuration.
16583 * config/mips/fbsd.mh: New file.
16584 * configure.host: Add mips*-*-freebsd*.
16585 * mips-fbsd-nat.c: New file.
16586
387360da
JB
165872017-01-04 John Baldwin <jhb@FreeBSD.org>
16588
16589 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16590 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16591 * NEWS: Mention new FreeBSD/mips target.
16592 * configure.tgt: Add mips*-*-freebsd*.
16593 * mips-fbsd-tdep.c: New file.
16594 * mips-fbsd-tdep.h: New file.
16595
2aaaf250
YQ
165962017-01-04 Yao Qi <yao.qi@linaro.org>
16597
16598 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16599 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16600
61baf725
JB
166012017-01-01 Joel Brobecker <brobecker@adacore.com>
16602
6dbb839a 16603 Update copyright year range in all GDB files.
61baf725 16604
c113e7ff 166052017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16606
c113e7ff 16607 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16608
c113e7ff 16609For older changes see ChangeLog-2016.
c906108c
SS
16610\f
16611Local Variables:
16612mode: change-log
16613left-margin: 8
16614fill-column: 74
16615version-control: never
57da7796 16616coding: utf-8
c906108c 16617End: