cooked_read test for readonly regcache
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-24 Yao Qi <yao.qi@linaro.org>
2
3 * regcache.c (cooked_read_test): Add more test for readonly
4 regcache.
5
6 2017-11-24 Yao Qi <yao.qi@linaro.org>
7
8 * gdbarch-selftests.c (test_target_has_registers): Move it to
9 target.c.
10 (test_target_has_stack): Likewise.
11 (test_target_has_memory): Likewise.
12 (test_target_prepare_to_store): Likewise.
13 (test_target_store_registers): Likewise.
14 (test_target_ops): Likewise.
15 * regcache.c: Include selftest-arch.h and gdbthread.h.
16 (target_ops_no_register): New class.
17 (test_target_fetch_registers): New.
18 (test_target_store_registers): New.
19 (test_target_xfer_partial): New.
20 (readwrite_regcache): New.
21 (cooked_read_test): New.
22 (_initialize_regcache): Register the test.
23 * target.c: (test_target_has_registers): Moved from
24 gdbarch-selftests.c.
25 (test_target_has_stack): Likewise.
26 (test_target_has_memory): Likewise.
27 (test_target_prepare_to_store): Likewise.
28 (test_target_store_registers): Likewise.
29 * target.h (test_target_ops): New class.
30
31 2017-11-24 Alan Hayward <alan.hayward@arm.com>
32
33 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
34 selftest.
35
36 2017-11-24 Alan Hayward <alan.hayward@arm.com>
37
38 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
39 * arch/aarch64.c (aarch64_create_target_description): Create
40 new target description.
41 * features/Makefile: Add new files.
42 * features/aarch64.c: Remove file.
43 * features/aarch64-core.c: New autogenerated file.
44 * features/aarch64-fpu.c: New autogenerated file.
45 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
46
47 2017-11-24 Alan Hayward <alan.hayward@arm.com>
48
49 * Makefile.in: Add new files.
50 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
51 aarch64_read_description.
52 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
53 Call aarch64_read_description.
54 * aarch64-tdep.c (aarch64_read_description): New function.
55 (aarch64_gdbarch_init): Call aarch64_read_description.
56 * aarch64-tdep.h (aarch64_read_description): New function.
57 * arch/aarch64.c: New file.
58 * configure.tgt: Add new files.
59
60 2017-11-24 Yao Qi <yao.qi@linaro.org>
61
62 * mi/mi-main.c (register_changed_p): Update.
63 * value.c (value_contents_bits_eq): Change return type.
64 (value_contents_eq): Likewise.
65 * value.h: Update comments.
66
67 2017-11-24 Yao Qi <yao.qi@linaro.org>
68
69 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
70 local 'changed'. Remove error.
71 (register_changed_p): Change return type to bool.
72
73 2017-11-24 Yao Qi <yao.qi@linaro.org>
74
75 * arch/tic6x.c: New file.
76 * arch/tic6x.h: New file.
77 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
78 tic6x-core.xml and tic6x-gp.xml.
79 * features/tic6x-c6xp.c: Generated.
80 * features/tic6x-core.c: Generated.
81 * features/tic6x-gp.c: Generated.
82 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
83 "tic6x-".
84
85 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
86
87 * mi/mi-main.c (list_available_thread_groups): Change map value
88 type to std::vector.
89
90 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
91
92 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
93
94 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
95
96 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
97 back to...
98 <children_requested>: ... this.
99 (varobj_get_num_children, varobj_update): Adjust.
100
101 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
102
103 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
104 (ada_value_has_mutated): Likewise.
105 * c-varobj.c (varobj_is_anonymous_child): Likewise.
106 (c_is_path_expr_parent): Likewise.
107 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
108 (mi_cmd_var_set_frozen): Likewise.
109 (mi_cmd_var_update_iter): Likewise.
110 (mi_cmd_var_update): Likewise.
111 * varobj.c (pretty_printing): Likewise.
112 (varobj_enable_pretty_printing): Likewise.
113 (struct varobj_root) <floating, is_valid>: Likewise.
114 (struct varobj_dynamic) <children_requested>: Likewise.
115 (delete_variable): Likewise.
116 (delete_variable_1): Likewise.
117 (install_variable): Likewise.
118 (update_type_if_necessary): Likewise.
119 (install_new_value): Likewise.
120 (value_of_root): Likewise.
121 (is_root_p): Likewise.
122 (varobj_create): Likewise.
123 (varobj_delete): Likewise.
124 (varobj_has_more): Likewise.
125 (varobj_set_frozen): Likewise.
126 (varobj_get_frozen): Likewise.
127 (install_dynamic_child): Likewise.
128 (dynamic_varobj_has_child_method): Likewise.
129 (update_dynamic_varobj_children): Likewise.
130 (varobj_get_num_children): Likewise.
131 (varobj_list_children): Likewise.
132 (is_path_expr_parent): Likewise.
133 (varobj_default_is_path_expr_parent): Likewise.
134 (varobj_is_dynamic_p): Likewise.
135 (varobj_set_value): Likewise.
136 (varobj_value_has_mutated): Likewise.
137 (varobj_update): Likewise.
138 (check_scope): Likewise.
139 (value_of_root_1): Likewise.
140 (varobj_value_get_print_value): Likewise.
141 (varobj_editable_p): Likewise.
142 (varobj_value_is_changeable_p): Likewise.
143 (varobj_floating_p): Likewise.
144 (varobj_default_value_is_changeable_p): Likewise.
145 (varobj_invalidate_iter): Likewise.
146 * varobj.h (struct varobj_update_result) <type_changed,
147 children_changed, changed, value_installed>: Likewise.
148 (struct varobj) <updated, frozen, not_fetched>: Likewise.
149 (struct lang_varobj_ops) <value_is_changeable_p,
150 value_has_mutated, is_path_expr_parent>: Likewise.
151 (varobj_delete): Likewise.
152 (varobj_set_frozen): Likewise.
153 (varobj_get_frozen): Likewise.
154 (varobj_set_value): Likewise.
155 (varobj_update): Likewise.
156 (varobj_editable_p): Likewise.
157 (varobj_floating_p): Likewise.
158 (varobj_has_more): Likewise.
159 (varobj_is_dynamic_p): Likewise.
160 (varobj_default_value_is_changeable_p): Likewise.
161 (varobj_value_is_changeable_p): Likewise.
162 (varobj_is_anonymous_child): Likewise.
163 (varobj_default_is_path_expr_parent): Likewise.
164
165 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
166
167 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
168 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
169 <type_str>: Convert to 'std::string'.
170 <expr>: Convert to 'expression_up'.
171 (dtrace_probe_arg_s): Delete type and VEC.
172 (dtrace_probe_enabler_s): Likewise.
173 (struct dtrace_probe): Replace by...
174 (class dtrace_static_probe_ops): ...this and...
175 (class dtrace_probe): ...this.
176 (dtrace_probe_is_linespec): Rename to...
177 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
178 to reflect change.
179 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
180 Adjust code. Create new instance of 'dtrace_probe'.
181 (dtrace_build_arg_exprs): Rename to...
182 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
183 reflect change.
184 (dtrace_get_probes): Rename to...
185 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
186 to reflect change.
187 (dtrace_get_arg): Rename to...
188 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
189 reflect change.
190 (dtrace_probe_is_enabled): Rename to...
191 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
192 change.
193 (dtrace_get_probe_address): Rename to...
194 (dtrace_probe::get_relocated_address): ...this. Adjust code
195 to reflect change.
196 (dtrace_get_probe_argument_count): Rename to...
197 (dtrace_probe::get_argument_count): ...this. Adjust code to
198 reflect change.
199 (dtrace_can_evaluate_probe_arguments): Rename to...
200 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
201 to reflect change.
202 (dtrace_evaluate_probe_argument): Rename to...
203 (dtrace_probe::evaluate_argument): ...this. Adjust code to
204 reflect change.
205 (dtrace_compile_to_ax): Rename to...
206 (dtrace_probe::compile_to_ax): ...this. Adjust code to
207 reflect change.
208 (dtrace_probe_destroy): Delete.
209 (dtrace_type_name): Rename to...
210 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
211 reflect change.
212 (dtrace_probe::get_static_ops): New method.
213 (dtrace_gen_info_probes_table_header): Rename to...
214 (dtrace_static_probe_ops::gen_info_probes_table_header):
215 ...this. Adjust code to reflect change.
216 (dtrace_gen_info_probes_table_values): Rename to...
217 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
218 code to reflect change.
219 (dtrace_enable_probe): Rename to...
220 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
221 change.
222 (dtrace_disable_probe): Rename to...
223 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
224 change.
225 (struct probe_ops dtrace_probe_ops): Delete.
226 (info_probes_dtrace_command): Call 'info_probes_for_spops'
227 instead of 'info_probes_for_ops'.
228 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
229 of 'all_probe_ops'.
230
231 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
232 Simon Marchi <simark@simark.ca>
233
234 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
235 variable.
236 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
237 <aexpr>: Change type to 'expression_up'.
238 (stap_probe_arg_s): Delete type and VEC.
239 (struct stap_probe): Delete. Replace by...
240 (class stap_static_probe_ops): ...this and...
241 (class stap_probe): ...this. Rename variables to add 'm_'
242 prefix. Do not use 'union' for arguments anymore.
243 (stap_get_expected_argument_type): Receive probe name instead
244 of 'struct stap_probe'. Adjust code.
245 (stap_parse_probe_arguments): Rename to...
246 (stap_probe::parse_arguments): ...this. Adjust code to
247 reflect change.
248 (stap_get_probe_address): Rename to...
249 (stap_probe::get_relocated_address): ...this. Adjust code
250 to reflect change.
251 (stap_get_probe_argument_count): Rename to...
252 (stap_probe::get_argument_count): ...this. Adjust code
253 to reflect change.
254 (stap_get_arg): Rename to...
255 (stap_probe::get_arg_by_number'): ...this. Adjust code to
256 reflect change.
257 (can_evaluate_probe_arguments): Rename to...
258 (stap_probe::can_evaluate_arguments): ...this. Adjust code
259 to reflect change.
260 (stap_evaluate_probe_argument): Rename to...
261 (stap_probe::evaluate_argument): ...this. Adjust code
262 to reflect change.
263 (stap_compile_to_ax): Rename to...
264 (stap_probe::compile_to_ax): ...this. Adjust code to
265 reflect change.
266 (stap_probe_destroy): Delete.
267 (stap_modify_semaphore): Adjust comment.
268 (stap_set_semaphore): Rename to...
269 (stap_probe::set_semaphore): ...this. Adjust code to reflect
270 change.
271 (stap_clear_semaphore): Rename to...
272 (stap_probe::clear_semaphore): ...this. Adjust code to
273 reflect change.
274 (stap_probe::get_static_ops): New method.
275 (handle_stap_probe): Adjust code to create instance of
276 'stap_probe'.
277 (stap_get_probes): Rename to...
278 (stap_static_probe_ops::get_probes): ...this. Adjust code to
279 reflect change.
280 (stap_probe_is_linespec): Rename to...
281 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
282 reflect change.
283 (stap_type_name): Rename to...
284 (stap_static_probe_ops::type_name): ...this. Adjust code to
285 reflect change.
286 (stap_gen_info_probes_table_header): Rename to...
287 (stap_static_probe_ops::gen_info_probes_table_header):
288 ...this. Adjust code to reflect change.
289 (stap_gen_info_probes_table_values): Rename to...
290 (stap_probe::gen_info_probes_table_values): ...this. Adjust
291 code to reflect change.
292 (struct probe_ops stap_probe_ops): Delete.
293 (info_probes_stap_command): Use 'info_probes_for_spops'
294 instead of 'info_probes_for_ops'.
295 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
296 of 'all_probe_ops'.
297
298 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
299
300 * break-catch-throw.c (fetch_probe_arguments): Use
301 'probe.prob' instead of 'probe.probe'.
302 * breakpoint.c (create_longjmp_master_breakpoint): Call
303 'can_evaluate_arguments' and 'get_relocated_address' methods
304 from probe.
305 (create_exception_master_breakpoint): Likewise.
306 (add_location_to_breakpoint): Use 'sal->prob' instead of
307 'sal->probe'.
308 (bkpt_probe_insert_location): Call 'set_semaphore' method from
309 probe.
310 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
311 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
312 of 'probe_ops'.
313 (probe_key_free): Call 'delete' on probe.
314 (check_exception_resume): Use 'probe.prob' instead of
315 'probe.probe'.
316 * location.c (string_to_event_location_basic): Call
317 'probe_linespec_to_static_ops'.
318 * probe.c (class any_static_probe_ops): New class.
319 (any_static_probe_ops any_static_probe_ops): New variable.
320 (parse_probes_in_pspace): Receive 'static_probe_ops' as
321 argument. Adjust code to reflect change.
322 (parse_probes): Use 'static_probe_ops' instead of
323 'probe_ops'. Adjust code to reflect change.
324 (find_probes_in_objfile): Call methods to get name and
325 provider from probe.
326 (find_probe_by_pc): Use 'result.prob' instead of
327 'result.probe'. Call 'get_relocated_address' method from
328 probe.
329 (collect_probes): Adjust comment and argument list to receive
330 'static_probe_ops' instead of 'probe_ops'. Adjust code to
331 reflect change. Call necessary methods from probe.
332 (compare_probes): Call methods to get name and provider from
333 probes.
334 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
335 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
336 adjust code accordingly.
337 (print_ui_out_not_applicables): Likewise.
338 (info_probes_for_ops): Rename to...
339 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
340 as argument instead of 'probe_ops'. Adjust code. Call
341 necessary methods from probe.
342 (info_probes_command): Use 'info_probes_for_spops'.
343 (enable_probes_command): Pass correct argument to
344 'collect_probes'. Call methods from probe.
345 (disable_probes_command): Likewise.
346 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
347 (get_probe_argument_count): Move to
348 'any_static_probe_ops::get_argument_count'.
349 (can_evaluate_probe_arguments): Move to
350 'any_static_probe_ops::can_evaluate_arguments'.
351 (evaluate_probe_argument): Move to
352 'any_static_probe_ops::evaluate_argument'.
353 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
354 'probe.probe'.
355 (probe_linespec_to_ops): Rename to...
356 (probe_linespec_to_static_ops): ...this. Adjust code.
357 (probe_any_is_linespec): Rename to...
358 (any_static_probe_ops::is_linespec): ...this.
359 (probe_any_get_probes): Rename to...
360 (any_static_probe_ops::get_probes): ...this.
361 (any_static_probe_ops::type_name): New method.
362 (any_static_probe_ops::gen_info_probes_table_header): New
363 method.
364 (compute_probe_arg): Use 'pc_probe.prob' instead of
365 'pc_probe.probe'. Call methods from probe.
366 (compile_probe_arg): Likewise.
367 (std::vector<const probe_ops *> all_probe_ops): Delete.
368 (std::vector<const static_probe_ops *> all_static_probe_ops):
369 New variable.
370 (_initialize_probe): Use 'all_static_probe_ops' instead of
371 'all_probe_ops'.
372 * probe.h (struct info_probe_column) <field_name>: Delete
373 extraneous newline
374 (info_probe_column_s): Delete type and VEC.
375 (struct probe_ops): Delete. Replace with...
376 (class static_probe_ops): ...this and...
377 (clas probe): ...this.
378 (struct bound_probe) <bound_probe>: Delete extraneous
379 newline. Adjust constructor to receive 'probe' instead of
380 'struct probe'.
381 <probe>: Rename to...
382 <prob>: ...this. Delete extraneous newline.
383 <objfile>: Delete extraneous newline.
384 (register_probe_ops): Delete unused prototype.
385 (info_probes_for_ops): Rename to...
386 (info_probes_for_spops): ...this. Adjust comment.
387 (get_probe_address): Move to 'probe::get_address'.
388 (get_probe_argument_count): Move to
389 'probe::get_argument_count'.
390 (can_evaluate_probe_arguments): Move to
391 'probe::can_evaluate_arguments'.
392 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
393 * solib-svr4.c (struct svr4_info): Adjust comment.
394 (struct probe_and_action) <probe>: Rename to...
395 <prob>: ...this.
396 (register_solib_event_probe): Receive 'probe' instead of
397 'struct probe' as argument. Use 'prob' instead of 'probe'
398 when applicable.
399 (solib_event_probe_action): Call 'get_argument_count' method
400 from probe. Adjust comment.
401 (svr4_handle_solib_event): Adjust comment. Call
402 'evaluate_argument' method from probe.
403 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
404 from probe.
405 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
406 'struct probe'. Call 'can_evaluate_arguments' from probe.
407 * symfile.h: Forward declare 'class probe' instead of 'struct
408 probe'.
409 * symtab.h: Likewise.
410 (struct symtab_and_line) <probe>: Rename to...
411 <prob>: ...this.
412 * tracepoint.c (start_tracing): Use 'prob' when applicable.
413 Call probe methods.
414 (stop_tracing): Likewise.
415
416 2017-11-22 Joel Brobecker <brobecker@adacore.com>
417
418 * ravenscar-thread.c (ravenscar_inferior_created): Remove
419 trailing newline at end of string in call to warning.
420
421 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
422
423 * osdata.h: Include vector isntead of vec.h.
424 (osdata_column_s): Remove typedef.
425 (struct osdata_column): Add constructor.
426 <name, value>: Change type to std::string.
427 (DEF_VEC_O (osdata_column_s)): Remove.
428 (osdata_item_s): Remove typedef.
429 (struct osdata_item) <columns>: Change type to std::vector.
430 (DEF_VEC_O (osdata_item_s)): Remove.
431 (struct osdata): Add constructor.
432 <type>: Change type to std::string.
433 <items>: Change type to std::vector.
434 (osdata_p): Remove typedef.
435 (DEF_VEC_P (osdata_p)): Remove.
436 (osdata_parse): Return a unique_ptr.
437 (osdata_free): Remove.
438 (make_cleanup_osdata_free): Remove.
439 (get_osdata): Return a unique_ptr.
440 (get_osdata_column): Return pointer to std::string, take a
441 reference to osdata_item as parameter.
442 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
443 unique_ptr.
444 <property_name>: Change type to std::string.
445 (osdata_start_osdata): Allocate osdata with new and adjust.
446 (osdata_start_item): Adjust.
447 (osdata_start_column): Adjust.
448 (osdata_end_column): Adjust.
449 (clear_parsing_data): Remove.
450 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
451 (osdata_item_clear): Remove.
452 (get_osdata): return a unique_ptr and adjust.
453 (get_osdata_column): Return a pointer to std::string and adjust.
454 (info_osdata): Adjust.
455 * mi/mi-main.c: Include <map>.
456 (free_vector_of_osdata_items): Remove.
457 (list_available_thread_groups): Adjust, use std::map instead of
458 splay tree.
459
460 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
461
462 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
463 case in switch.
464
465 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
466
467 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
468
469 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
470
471 * varobj.h (struct varobj_update_result): Add constructor, add
472 move constructor, disable copy and assign, initialize fields.
473 <newobj>: Change type to std::vector.
474 (varobj_update): Return std::vector.
475 * varobj.c (install_dynamic_child): Change VEC parameters to
476 std::vector and adjust.
477 (update_dynamic_varobj_children): Likewise.
478 (varobj_update): Return std::vector and adjust.
479 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
480
481 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
482
483 * varobj.h (struct varobj) <parent>: Remove const.
484 <children>: Change type to std::vector.
485 (varobj_list_children): Return std::vector const reference.
486 (varobj_restrict_range): Change parameter type to std::vector
487 const reference.
488 * varobj.c (varobj_has_more): Adjust.
489 (varobj_restrict_range): Change parameter type to std::vector
490 const reference and adjust.
491 (install_dynamic_child): Adjust.
492 (update_dynamic_varobj_children): Adjust.
493 (varobj_list_children): Return std::vector const reference and
494 adjust.
495 (varobj_add_child): Adjust.
496 (update_type_if_necessary): Adjust.
497 (varobj_update): Adjust.
498 (delete_variable_1): Adjust.
499 * ada-varobj.c (ada_value_has_mutated): Adjust.
500 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
501
502 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
503
504 * varobj.h (struct varobj): Add constructor and destructor,
505 initialize fields.
506 * varobj.c (struct varobj_root): Initialize fields.
507 (struct varobj_dynamic): Initialize fields.
508 (varobj_create): Use unique_ptr instead of cleanup. Create
509 varobj with new instead of new_root_variable.
510 (delete_variable_1): Free variable with delete instead of
511 free_variable.
512 (create_child_with_value): Create variable with new instead of
513 new_variable.
514 (varobj::varobj): New.
515 (varobj::~varobj): New (body mostly coming from free_variable).
516 (new_variable): Remove.
517 (free_variable): Remove.
518 (do_free_variable_cleanup): Remove.
519 (make_cleanup_free_variable): Remove.
520
521 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
522
523 * core-regset.c: Remove file.
524 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
525
526 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
527
528 * NEWS: Document use of GNU MPFR.
529 * README: Likewise.
530
531 * Makefile.in (LIBMPFR): Add define.
532 (CLIBS): Add $(LIBMPFR).
533 * configure.ac: Add --with-mpfr configure option.
534 * configure: Regenerate.
535 * config.in: Regenerate.
536
537 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
538 (class mpfr_float_ops): New type.
539 (mpfr_float_ops::from_target): Two new overloaded functions.
540 (mpfr_float_ops::to_target): Likewise.
541 (mpfr_float_ops::to_string): New function.
542 (mpfr_float_ops::from_string): Likewise.
543 (mpfr_float_ops::to_longest): Likewise.
544 (mpfr_float_ops::from_longest): Likewise.
545 (mpfr_float_ops::from_ulongest): Likewise.
546 (mpfr_float_ops::to_host_double): Likewise.
547 (mpfr_float_ops::from_host_double): Likewise.
548 (mpfr_float_ops::convert): Likewise.
549 (mpfr_float_ops::binop): Likewise.
550 (mpfr_float_ops::compare): Likewise.
551 (get_target_float_ops): Use mpfr_float_ops if available.
552
553 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
554
555 * target-float.c: Do not include <math.h>.
556 Include <cmath> and <limits>.
557 (DOUBLEST): Do not define.
558 (class target_float_ops): New type.
559 (class host_float_ops): New templated type.
560 (class decimal_float_ops): New type.
561
562 (floatformat_to_doublest): Rename to ...
563 (host_float_ops<T>::from_target): ... this. Use template type T
564 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
565 (host_float_ops<T>::from_target): New overload using a type argument.
566 (floatformat_from_doublest): Rename to ...
567 (host_float_ops<T>::to_target): ... this. Use template type T
568 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
569 (host_float_ops<T>::to_target): New overload using a type argument.
570 (floatformat_printf_format): New function.
571 (struct printf_length_modifier): New templated type.
572 (floatformat_to_string): Rename to ...
573 (host_float_ops<T>::to_string): ... this. Use type instead of
574 floatformat argument. Use floatformat_printf_format and
575 printf_length_modifier. Remove special handling of invalid numbers,
576 infinities and NaN (moved to target_float_to_string).
577 (struct scanf_length_modifier): New templated type.
578 (floatformat_from_string): Rename to ...
579 (host_float_ops<T>::from_string): ... this. Use type instead of
580 floatformat argument. Use scanf_length_modifier.
581 (floatformat_to_longest): Rename to ...
582 (host_float_ops<T>::to_longest): ... this. Use type instead of
583 floatformat argument. Handle out-of-range values deterministically.
584 (floatformat_from_longest): Rename to ...
585 (host_float_ops<T>::from_longest): ... this. Use type instead of
586 floatformat argument.
587 (floatformat_from_ulongest): Rename to ...
588 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
589 floatformat argument.
590 (floatformat_to_host_double): Rename to ...
591 (host_float_ops<T>::to_host_double): ... this. Use type instead of
592 floatformat argument.
593 (floatformat_from_host_double): Rename to ...
594 (host_float_ops<T>::from_host_double): ... this. Use type instead of
595 floatformat argument.
596 (floatformat_convert): Rename to ...
597 (host_float_ops<T>::convert): ... this. Use type instead of
598 floatformat arguments. Remove handling of no-op conversions.
599 (floatformat_binop): Rename to ...
600 (host_float_ops<T>::binop): ... this. Use type instead of
601 floatformat arguments.
602 (floatformat_compare): Rename to ...
603 (host_float_ops<T>::compare): ... this. Use type instead of
604 floatformat arguments.
605
606 (match_endianness): Use type instead of length/byte_order arguments.
607 (set_decnumber_context): Likewise.
608 (decimal_from_number): Likewise. Update calls.
609 (decimal_to_number): Likewise.
610 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
611 (decimal_float_ops::to_host_double): New dummy function.
612 (decimal_float_ops::from_host_double): Likewise.
613 (decimal_to_string): Rename to ...
614 (decimal_float_ops::to_string): ... this. Use type instead of
615 length/byte_order arguments. Update calls.
616 (decimal_from_string): Rename to ...
617 (decimal_float_ops::from_string): ... this. Use type instead of
618 length/byte_order arguments. Update calls.
619 (decimal_from_longest): Rename to ...
620 (decimal_float_ops::from_longest): ... this. Use type instead of
621 length/byte_order arguments. Update calls.
622 (decimal_from_ulongest): Rename to ...
623 (decimal_float_ops::from_ulongest): ... this. Use type instead of
624 length/byte_order arguments. Update calls.
625 (decimal_to_longest): Rename to ...
626 (decimal_float_ops::to_longest): ... this. Use type instead of
627 length/byte_order arguments. Update calls.
628 (decimal_binop): Rename to ...
629 (decimal_float_ops::binop): ... this. Use type instead of
630 length/byte_order arguments. Update calls.
631 (decimal_compare): Rename to ...
632 (decimal_float_ops::compare): ... this. Use type instead of
633 length/byte_order arguments. Update calls.
634 (decimal_convert): Rename to ...
635 (decimal_float_ops::convert): ... this. Use type instead of
636 length/byte_order arguments. Update calls.
637
638 (target_float_same_category_p): New function.
639 (target_float_same_format_p): Likewise.
640 (target_float_format_length): Likewise.
641 (enum target_float_ops_kind): New type.
642 (get_target_float_ops_kind): New function.
643 (get_target_float_ops): Three new overloaded functions.
644
645 (target_float_is_zero): Update call.
646 (target_float_to_string): Add special handling of invalid numbers,
647 infinities and NaN (moved from floatformat_to_string). Use
648 target_float_ops callback.
649 (target_float_from_string): Use target_float_ops callback.
650 (target_float_to_longest): Likewise.
651 (target_float_from_longest): Likewise.
652 (target_float_from_ulongest): Likewise.
653 (target_float_to_host_double): Likewise.
654 (target_float_from_host_double): Likewise.
655 (target_float_convert): Add special case for no-op conversions.
656 Use target_float_ops callback.
657 (target_float_binop): Use target_float_ops callback.
658 (target_float_compare): Likewise.
659
660 2017-11-22 Yao Qi <yao.qi@linaro.org>
661
662 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
663
664 2017-11-22 Yao Qi <yao.qi@linaro.org>
665
666 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
667 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
668
669 2017-11-21 Jerome Guitton <guitton@adacore.com>
670
671 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
672 with event ptid from the lower layer before doing the
673 ravenscar-specific update.
674
675 2017-11-21 Joel Brobecker <brobecker@adacore.com>
676
677 * ravenscar-thread.c (is_ravenscar_task): Also verify that
678 the ptid's TID is nonzero.
679
680 2017-11-21 Joel Brobecker <brobecker@adacore.com>
681
682 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
683 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
684 Make non-static. Change return type to char *. Adjust code
685 accordingly. Rewrite the function's documentation.
686 (read_atcb): Adjust call to get_tcb_types_info accordingly.
687 * ravenscar-thread.c (ravenscar_inferior_created): Check that
688 we have enough debugging information in the runtime to support
689 Ada task debugging before we enable the ravenscar-thread layer.
690
691 2017-11-21 Joel Brobecker <brobecker@adacore.com>
692
693 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
694 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
695 * ravenscar-thread.c: Add into comment.
696 (base_magic_null_ptid): Delete.
697 (base_ptid): Change documentation.
698 (ravenscar_active_task): Renames ravenscar_running_thread.
699 All callers updated throughout.
700 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
701 (ravenscar_task_is_currently_active): Likewise.
702 (get_base_thread_from_ravenscar_task): Ditto.
703 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
704 (ravenscar_runtime_initialized): Likewise.
705 (get_running_thread_id): Add new parameter "cpu". Adjust
706 implementation to handle this new parameter.
707 (ravenscar_fetch_registers): Small adjustment to use
708 is_ravenscar_task and ravenscar_task_is_currently_active in
709 order to decide whether to use the target beneath or this
710 module's arch_ops.
711 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
712 (ravenscar_stopped_by_sw_breakpoint): Use
713 get_base_thread_from_ravenscar_task to get the underlying
714 thread, rather than using base_ptid.
715 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
716 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
717 Likewise.
718 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
719
720 2017-11-21 Joel Brobecker <brobecker@adacore.com>
721
722 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
723 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
724 (get_tcb_types_info): Set fieldnos.base_cpu.
725 (read_atcb): Set task_info->base_cpu.
726 (info_task): Print "Base CPU" info if set by runtime.
727
728 2017-11-21 Joel Brobecker <brobecker@adacore.com>
729
730 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
731 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
732 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
733 New functions.
734 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
735 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
736 to_stopped_data_address and to_core_of_thread fields of
737 ravenscar_ops.
738
739 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
740
741 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
742 (struct gdbarch_tdep): New member long_double_abi.
743 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
744 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
745 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
746 format depending on long_double_abi tdep member.
747 (ppc_floatformat_for_type): Handle __ibm128 type.
748
749 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
750
751 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
752
753 2017-11-21 Pedro Alves <palves@redhat.com>
754
755 * dwarf2read.c (mapped_index::find_name_components_bounds)
756 <completion mode, upper bound>: Use std::lower_bound instead of
757 std::upper_bound.
758 (test_mapped_index_find_name_component_bounds): Remove incorrect
759 "t1_fund" from expected symbols.
760
761 2017-11-21 Pedro Alves <palves@redhat.com>
762
763 * dwarf2read.c (mapped_index::name_components_casing): New field.
764 (mapped_index) <build_name_components,
765 find_name_components_bounds): Declare new methods.
766 (mapped_index::find_name_components_bounds)
767 (mapped_index::build_name_components): New methods, factored out
768 from dw2_expand_symtabs_matching_symbol.
769 (check_find_bounds_finds)
770 (test_mapped_index_find_name_component_bounds): New.
771 (run_test): Rename to ...
772 (test_dw2_expand_symtabs_matching_symbol): ... this.
773 (run_test): Reimplement.
774
775 2017-11-21 Pedro Alves <palves@redhat.com>
776
777 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
778 (symbol_end): Use cp_ident_is_alnum.
779 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
780 * dwarf2read.c (make_sort_after_prefix_name): New function.
781 (dw2_expand_symtabs_matching_symbol): Use it.
782 (test_symbols): Add more symbols.
783 (run_test): Add tests.
784
785 2017-11-17 Tom Tromey <tom@tromey.com>
786
787 * symtab.h (enum symbol_subclass_kind): New.
788 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
789 Remove.
790 <subclass>: New member.
791 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
792 * rust-lang.c (rust_get_trait_object_pointer): Update.
793 * dwarf2read.c (read_func_scope): Update.
794 (read_variable): Update.
795
796 2017-11-17 Tom Tromey <tom@tromey.com>
797
798 * dwarf2read.c (read_func_scope): Update.
799 * symtab.h (struct template_symbol): Derive from symbol.
800 <base>: Remove.
801
802 2017-11-17 Tom Tromey <tom@tromey.com>
803
804 * symtab.h (struct symbol) <is_rust_vtable>: New member.
805 (struct rust_vtable_symbol): New.
806 (find_symbol_at_address): Declare.
807 * symtab.c (find_symbol_at_address): New function.
808 * symfile.h (struct quick_symbol_functions)
809 <find_compunit_symtab_by_address>: New member.
810 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
811 function.
812 (debug_sym_quick_functions): Link to
813 debug_qf_find_compunit_symtab_by_address.
814 * rust-lang.c (rust_get_trait_object_pointer): New function.
815 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
816 rust_get_trait_object_pointer.
817 * psymtab.c (psym_relocate): Clear psymbol_map.
818 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
819 functions.
820 (psym_functions): Link to psym_find_compunit_symtab_by_address.
821 * objfiles.h (struct objfile) <psymbol_map>: New member.
822 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
823 (process_die) <DW_TAG_variable>: New case. Call read_variable.
824 (rust_containing_type, read_variable): New functions.
825
826 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
827
828 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
829
830 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
831
832 * common/filestuff.c: Include <algorithm>.
833 (open_fds): Change type to std::vector<int>.
834 (do_mark_open_fd): Adjust.
835 (unmark_fd_no_cloexec): Adjust.
836 (do_close): Adjust.
837
838 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
839
840 * breakpoint.c (output_thread_groups): Take an std::vector.
841 (print_one_breakpoint_location): Adjust.
842
843 2017-11-17 Joel Brobecker <brobecker@adacore.com>
844
845 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
846 (ada_evaluate_subexp_for_cast): New function.
847 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
848 ada_evaluate_subexp_for_cast.
849 (ada_evaluate_subexp) <nosideret>: Replace code by call to
850 eval_skip_value.
851 * eval.c (evaluate_var_value): Make non-static.
852 (evaluate_var_msym_value, eval_skip_value): Likewise.
853 * value.h (evaluate_var_value, evaluate_var_msym_value)
854 (eval_skip_value): Declare.
855
856 2017-11-16 Joel Brobecker <brobecker@adacore.com>
857
858 * ada-lang.c (ada_value_cast): Remove parameter "noside".
859 Update all callers.
860
861 2017-11-16 Pedro Alves <palves@redhat.com>
862
863 * python/py-unwind.c (pyuw_sniffer): Translate
864 PyExc_KeyboardInterrupt to a GDB Quit exception.
865
866 2017-11-16 Pedro Alves <palves@redhat.com>
867
868 * infrun.c (resume_cleanups): Delete.
869 (resume): No longer install a resume_cleanups cleanup nor call
870 QUIT.
871 (proceed): Pass the terminal to the inferior.
872 (keep_going_pass_signal): No longer install a resume_cleanups
873 cleanup.
874
875 2017-11-16 Pedro Alves <palves@redhat.com>
876
877 * inf-loop.c (inferior_event_handler): Don't swallow the exception
878 if the prompt is blocked.
879
880 2017-11-16 Pedro Alves <palves@redhat.com>
881
882 * breakpoint.c (insert_bp_location): Replace bp_err and
883 bp_err_message locals by a gdb_exception local.
884
885 2017-11-16 Pedro Alves <palves@redhat.com>
886
887 * inflow.c (scoped_ignore_sigttou): New class.
888 (child_terminal_ours_1, new_tty): Use it.
889
890 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
891
892 * target-float.c (decimal_from_number): Add byte_order argument and
893 call match_endianness. Error if unknown floating-point type.
894 (decimal_to_number): Add byte_order argument and call match_endianness.
895 (decimal_from_longest): Update call. Do not call match_endianness.
896 (decimal_from_ulongest): Likewise.
897 (decimal_binop): Likewise.
898 (decimal_is_zero): Likewise.
899 (decimal_compare): Likewise.
900 (decimal_convert): Likewise.
901
902 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
903
904 * python/python.c (gdbpy_rbreak): New function.
905 * NEWS: Document Python rbreak feature.
906
907 2017-11-16 Yao Qi <yao.qi@linaro.org>
908
909 * features/tic6x-c62x.xml: Remove.
910 * features/tic6x-c64x.xml: Remove.
911 * features/tic6x-c64xp.xml: Remove.
912
913 2017-11-15 John Baldwin <jhb@FreeBSD.org>
914
915 * symtab.h: Include <array>.
916
917 2017-11-15 John Baldwin <jhb@FreeBSD.org>
918
919 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
920 (bsd_kvm_proc_cmd): Likewise.
921
922 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
923
924 * tui/tui-win.c (window_name_completer): Replace VEC with
925 std::vector.
926
927 2017-11-15 Andrew Cagney <cagney@gnu.org>
928
929 * MAINTAINERS: Remove no-longer applicable entries.
930
931 2017-11-15 Andrew Cagney <cagney@gnu.org>
932
933 * MAINTAINERS: Move self to Past Maintainers.
934
935 2017-11-15 Yao Qi <yao.qi@linaro.org>
936
937 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
938 * features/nios2-linux.c: Remove.
939 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
940 initialize_tdesc_nios2_linux.
941
942 2017-11-15 Yao Qi <yao.qi@linaro.org>
943
944 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
945 M68HC11_LAST_HARD_REG + 1.
946
947 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
948
949 PR gdb/22388
950 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
951 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
952 Return TARGET_XFER_EOF if size of returned data is 0.
953
954 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
955
956 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
957 memory-map-selftests.c.
958 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
959 * memory-map.c (memory_map_start_memory): Fix computation of hi
960 address.
961 * unittests/memory-map-selftests.c: New file.
962
963 2017-11-09 Joel Brobecker <brobecker@adacore.com>
964
965 * ada-lang.c: Fix some typos in the general command documenting
966 how Ada expressions are being evaluated and how their result
967 is printed.
968
969 2017-11-09 Tom Tromey <tom@tromey.com>
970
971 * psymtab.c (psymbol_hash): Do not hash string contents.
972 (psymbol_compare): Add comment.
973
974 2017-11-09 Tom Tromey <tom@tromey.com>
975
976 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
977
978 2017-11-08 Joel Brobecker <brobecker@adacore.com>
979
980 * ada-exp.y (write_var_from_sym): Remove parameter
981 "orig_left_context". Update all callers.
982
983 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
984
985 * tracepoint.h (class collection_list) <stringify>: Return
986 std::vector<std::string>.
987 (encode_actions_rsp): Change parameters to
988 std::vector<std::string> *.
989 * tracepoint.c (collection_list::stringify): Return
990 std::vector<std::string> and adjust accordingly.
991 (encode_actions_rsp): Changee parameters to
992 std::vector<std::string> and adjust accordingly.
993 * remote.c (free_actions_list),
994 free_actions_list_cleanup_wrapper): Remove.
995 (remote_download_tracepoint): Adjust to std::vector.
996
997 2017-11-08 Tom Tromey <tom@tromey.com>
998
999 * dwarf2read.c (symbolp): Remove typedef.
1000 (read_func_scope): Use std::vector.
1001 (process_structure_scope): Use std::vector.
1002
1003 2017-11-08 Pedro Alves <palves@redhat.com>
1004
1005 * ada-lang.c (ada_make_symbol_completion_list): Use
1006 completion_skip_symbol.
1007 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1008 (symbol_is_function_or_method(symbol*)): New.
1009 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1010 completion_skip_symbol.
1011 (default_collect_symbol_completion_matches_break_on): Use
1012 completion_skip_symbol. Pass down mode.
1013 (collect_file_symbol_completion_matches): Pass down mode.
1014 * symtab.h (symbol_is_function_or_method): New declarations.
1015 (completion_skip_symbol): New template function.
1016
1017 2017-11-08 Pedro Alves <palves@redhat.com>
1018
1019 * linespec.c (iterate_over_all_matching_symtabs): Add
1020 search_domain parameter. Pass it down to expand_symtabs_matching.
1021 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1022 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1023 search_domain.
1024 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1025 Pass it down.
1026 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1027 symbols.
1028 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1029 it down.
1030
1031 2017-11-08 Pedro Alves <palves@redhat.com>
1032
1033 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1034 text_len locals and don't pass them down.
1035 * symtab.c (completion_list_add_name): Remove
1036 sym_text/sym_text_len parameters and adjust.
1037 (completion_list_add_symbol, completion_list_add_msymbol)
1038 (completion_list_objc_symbol, completion_list_add_fields)
1039 (add_symtab_completions): Likewise.
1040 (default_collect_symbol_completion_matches_break_on)
1041 (collect_file_symbol_completion_matches): Remove sym_text_len
1042 local and don't pass it down.
1043 * symtab.h (completion_list_add_name): Remove
1044 sym_text/sym_text_len parameters.
1045
1046 2017-11-08 Pedro Alves <palves@redhat.com>
1047
1048 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1049 unittests/lookup_name_info-selftests.c.
1050 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1051 * cp-support.c: Include "selftest.h".
1052 (cp_remove_params_1): Rename from cp_remove_params. Add
1053 'require_param' parameter, and handle it.
1054 (cp_remove_params): Reimplement.
1055 (cp_remove_params_if_any): New.
1056 (selftests::quote): New.
1057 (selftests::check_remove_params): New.
1058 (selftests::test_cp_remove_params): New.
1059 (_initialize_cp_support): Install
1060 selftests::test_cp_remove_params.
1061 * cp-support.h (cp_remove_params_if_any): Declare.
1062 * dwarf2read.c :Include "selftest.h".
1063 (dw2_expand_symtabs_matching_symbol): Use
1064 lookup_name_info::make_ignore_params.
1065 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1066 (selftests::dw2_expand_symtabs_matching::string_or_null)
1067 (selftests::dw2_expand_symtabs_matching::check_match)
1068 (selftests::dw2_expand_symtabs_matching::test_symbols)
1069 (selftests::dw2_expand_symtabs_matching::run_test): New.
1070 (_initialize_dwarf2_read): Register
1071 selftests::dw2_expand_symtabs_matching::run_test.
1072 * psymtab.c (psym_expand_symtabs_matching): Use
1073 lookup_name_info::make_ignore_params.
1074 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1075 If the lookup name wants to ignore parameters, strip them.
1076 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1077 code handling '('.
1078 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1079 (default_collect_symbol_completion_matches_break_on): Don't try to
1080 strip parameters.
1081 * symtab.h (lookup_name_info::lookup_name_info): Add
1082 'ignore_parameters' parameter.
1083 (lookup_name_info::ignore_parameters)
1084 (lookup_name_info::make_ignore_params): New methods.
1085 (lookup_name_info::m_ignore_parameters): New field.
1086 * unittests/lookup_name_info-selftests.c: New file.
1087
1088 2017-11-08 Pedro Alves <palves@redhat.com>
1089
1090 * dwarf2read.c (dw2_expand_marked_cus)
1091 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1092 (dw2_expand_symtabs_matching): Move further below.
1093 (dw2_expand_marked_cus): Reindent.
1094
1095 2017-11-08 Pedro Alves <palves@redhat.com>
1096
1097 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1098 (struct name_component): New.
1099 (mapped_index::name_components): New field.
1100 (mapped_index::symbol_name_at): New method.
1101 (dwarf2_read_index): Call mapped_index ctor.
1102 (dw2_map_matching_symbols): Add comment about name_components
1103 table.
1104 (dw2_expand_symtabs_matching): Factor part to...
1105 (dw2_expand_symtabs_matching_symbol): ... this new function.
1106 Build name components table, and lookup symbols in it before
1107 calling the name matcher.
1108 (dw2_expand_marked_cus): New, factored out from
1109 dw2_expand_symtabs_matching.
1110 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1111
1112 2017-11-08 Pedro Alves <palves@redhat.com>
1113
1114 * ada-lang.c (ada_encode): Rename to ..
1115 (ada_encode_1): ... this. Add throw_errors parameter and handle
1116 it.
1117 (ada_encode): Reimplement.
1118 (match_name): Delete, folded into full_name.
1119 (resolve_subexp): No longer pass the encoded name to
1120 ada_lookup_symbol_list.
1121 (should_use_wild_match): Delete.
1122 (name_match_type_from_name): New.
1123 (ada_lookup_simple_minsym): Use lookup_name_info and the
1124 language's symbol_name_matcher_ftype.
1125 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1126 (ada_add_block_renamings): Adjust to use lookup_name_info.
1127 (ada_lookup_name): New.
1128 (add_nonlocal_symbols, ada_add_all_symbols)
1129 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1130 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1131 (ada_name_for_lookup): Delete.
1132 (ada_lookup_encoded_symbol): Construct a verbatim name.
1133 (wild_match): Reverse sense of return type. Use bool.
1134 (full_match): Reverse sense of return type. Inline bits of old
1135 match_name here.
1136 (ada_add_block_symbols): Adjust to use lookup_name_info.
1137 (symbol_completion_match): Delete, folded into...
1138 (ada_lookup_name_info::matches): ... .this new method.
1139 (symbol_completion_add): Delete.
1140 (ada_collect_symbol_completion_matches): Add name_match_type
1141 parameter. Adjust to use lookup_name_info and
1142 completion_list_add_name.
1143 (get_var_value, ada_add_global_exceptions): Adjust to use
1144 lookup_name_info.
1145 (ada_get_symbol_name_cmp): Delete.
1146 (do_wild_match, do_full_match): New functions.
1147 (ada_lookup_name_info::ada_lookup_name_info): New method.
1148 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1149 functions.
1150 (ada_language_defn): Install ada_get_symbol_name_matcher.
1151 * ada-lex.l (processId): If name starts with '<', copy it
1152 verbatim.
1153 * block.c (block_iter_match_step, block_iter_match_first)
1154 (block_iter_match_next, block_lookup_symbol)
1155 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1156 lookup_name_info.
1157 * block.h (block_iter_match_first, block_iter_match_next)
1158 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1159 * c-lang.c (c_language_defn, cplus_language_defn)
1160 (asm_language_defn, minimal_language_defn): Adjust comments to
1161 refer to la_get_symbol_name_matcher.
1162 * completer.c (complete_files_symbols)
1163 (collect_explicit_location_matches, symbol_completer): Pass a
1164 symbol_name_match_type down.
1165 * completer.h (class completion_match, completion_match_result):
1166 New classes.
1167 (completion_tracker::reset_completion_match_result): New method.
1168 (completion_tracker::m_completion_match_result): New field.
1169 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1170 lookup_name_info.
1171 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1172 functions.
1173 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1174 * d-lang.c: Adjust comments to refer to
1175 la_get_symbol_name_matcher.
1176 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1177 Adjust to use lookup_name_info.
1178 (dict_iter_match_first, dict_iter_match_next)
1179 (iter_match_first_hashed, iter_match_next_hashed)
1180 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1181 with a lookup_name_info.
1182 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1183 Likewise.
1184 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1185 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1186 (gdb_index_symbol_name_matcher): New class.
1187 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1188 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1189 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1190 with a symbol_name_match_type.
1191 (f_language_defn): Adjust comments to refer to
1192 la_get_symbol_name_matcher.
1193 * go-lang.c (go_language_defn): Adjust comments to refer to
1194 la_get_symbol_name_matcher.
1195 * language.c (default_symbol_name_matcher)
1196 (language_get_symbol_name_matcher): New functions.
1197 (unknown_language_defn, auto_language_defn): Adjust comments to
1198 refer to la_get_symbol_name_matcher.
1199 * language.h (symbol_name_cmp_ftype): Delete.
1200 (language_defn) <la_collect_symbol_completion_matches>: Add match
1201 type parameter.
1202 <la_get_symbol_name_cmp>: Delete field.
1203 <la_get_symbol_name_matcher>: New field.
1204 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1205 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1206 Declare.
1207 * linespec.c (iterate_over_all_matching_symtabs)
1208 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1209 (find_methods): Add language parameter, and use lookup_name_info
1210 and the language's symbol_name_matcher_ftype.
1211 (linespec_complete_function): Adjust.
1212 (lookup_prefix_sym): Use lookup_name_info.
1213 (add_all_symbol_names_from_pspace): Adjust.
1214 (find_superclass_methods): Add language parameter and pass it
1215 down.
1216 (find_method): Pass symbol language down.
1217 (find_linespec_symbols): Don't demangle or Ada encode here.
1218 (search_minsyms_for_name): Add lookup_name_info parameter.
1219 (add_matching_symbols_to_info): Add name_match_type parameter.
1220 Use lookup_name_info.
1221 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1222 la_get_symbol_name_matcher.
1223 * minsyms.c: Include <algorithm>.
1224 (add_minsym_to_demangled_hash_table): Remove table parameter and
1225 add objfile parameter. Use search_name_hash, and add language to
1226 demangled languages vector.
1227 (struct found_minimal_symbols): New struct.
1228 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1229 New functions.
1230 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1231 input names here. Use lookup_name_info instead. Lookup up
1232 demangled names once for each language in the demangled names
1233 vector.
1234 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1235 demangled names once for each language in the demangled names
1236 vector.
1237 (build_minimal_symbol_hash_tables): Adjust.
1238 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1239 lookup_name_info.
1240 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1241 la_get_symbol_name_matcher.
1242 * objfiles.h: Include <vector>.
1243 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1244 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1245 la_get_symbol_name_matcher.
1246 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1247 la_get_symbol_name_matcher.
1248 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1249 (match_partial_symbol): Use symbol_name_match_type,
1250 lookup_name_info and psymbol_name_matches.
1251 (lookup_partial_symbol): Use lookup_name_info.
1252 (map_block): Use symbol_name_match_type and lookup_name_info.
1253 (psym_map_matching_symbols): Use symbol_name_match_type.
1254 (psymbol_name_matches): New.
1255 (recursively_search_psymtabs): Use lookup_name_info and
1256 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1257 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1258 'kind' parameter to 'domain'.
1259 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1260 la_get_symbol_name_matcher.
1261 * symfile-debug.c (debug_qf_map_matching_symbols)
1262 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1263 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1264 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1265 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1266 Adjust to use symbol_name_match_type.
1267 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1268 (expand_symtabs_matching): Adjust to use lookup_name_info.
1269 * symmisc.c (maintenance_expand_symtabs): Use
1270 lookup_name_info::match_any ().
1271 * symtab.c (symbol_matches_search_name): New.
1272 (eq_symbol_entry): Adjust to use lookup_name_info and the
1273 language's matcher.
1274 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1275 (lookup_name_info::match_any): New.
1276 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1277 (compare_symbol_name): Add language, lookup_name_info and
1278 completion_match_result parameters, and use them.
1279 (completion_list_add_name): Make extern. Add language and
1280 lookup_name_info parameters. Use them.
1281 (completion_list_add_symbol, completion_list_add_msymbol)
1282 (completion_list_objc_symbol): Add lookup_name_info parameters and
1283 adjust. Pass down language.
1284 (completion_list_add_fields): Add lookup_name_info parameters and
1285 adjust. Pass down language.
1286 (add_symtab_completions): Add lookup_name_info parameters and
1287 adjust.
1288 (default_collect_symbol_completion_matches_break_on): Add
1289 name_match_type parameter, and use it. Use lookup_name_info.
1290 (default_collect_symbol_completion_matches)
1291 (collect_symbol_completion_matches): Add name_match_type
1292 parameter, and pass it down.
1293 (collect_symbol_completion_matches_type): Adjust.
1294 (collect_file_symbol_completion_matches): Add name_match_type
1295 parameter, and use lookup_name_info.
1296 * symtab.h: Include <string> and "common/gdb_optional.h".
1297 (enum class symbol_name_match_type): New.
1298 (class ada_lookup_name_info): New.
1299 (struct demangle_for_lookup_info): New.
1300 (class lookup_name_info): New.
1301 (symbol_name_matcher_ftype): New.
1302 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1303 (symbol_matches_search_name): Declare.
1304 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1305 (default_collect_symbol_completion_matches)
1306 (collect_symbol_completion_matches)
1307 (collect_file_symbol_completion_matches): Add name_match_type
1308 parameter.
1309 (iterate_over_symbols): Use lookup_name_info.
1310 (completion_list_add_name): Declare.
1311 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1312 (strncmp_iw_with_mode): Now extern.
1313 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1314 (strncmp_iw_with_mode): Declare.
1315
1316 2017-11-08 Keith Seitz <keiths@redhat.com>
1317 Pedro Alves <palves@redhat.com>
1318
1319 * ada-lang.c (ada_language_defn): Install
1320 default_search_name_hash.
1321 * buildsym.c (struct buildsym_compunit): <language>: New field.
1322 (finish_block_internal): Pass language when creating dictionaries.
1323 (start_buildsym_compunit, start_symtab): New language parameters.
1324 Use them.
1325 (restart_symtab): Pass down compilation unit's language.
1326 * buildsym.h (enum language): Forward declare.
1327 (start_symtab): New 'language' parameter.
1328 * c-lang.c (c_language_defn, cplus_language_defn)
1329 (asm_language_defn, minimal_language_defn): Install
1330 default_search_name_hash.
1331 * coffread.c (coff_start_symtab): Adjust.
1332 * d-lang.c (d_language_defn): Install default_search_name_hash.
1333 * dbxread.c (struct symloc): Add 'pst_language' field.
1334 (PST_LANGUAGE): Define.
1335 (start_psymtab, read_ofile_symtab): Use it.
1336 (process_one_symbol): New 'language' parameter. Pass it down.
1337 * dictionary.c (struct dictionary) <language>: New field.
1338 (DICT_LANGUAGE): Define.
1339 (dict_create_hashed, dict_create_hashed_expandable)
1340 (dict_create_linear, dict_create_linear_expandable): New parameter
1341 'language'. Set the dictionary's language.
1342 (iter_match_first_hashed): Adjust to rename.
1343 (insert_symbol_hashed): Assert we don't see mismatching
1344 languages. Adjust to rename.
1345 (dict_hash): Rename to ...
1346 (default_search_name_hash): ... this and make extern.
1347 * dictionary.h (struct language_defn): Forward declare.
1348 (dict_create_hashed): New parameter 'language'.
1349 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1350 * f-lang.c (f_language_defn): Install default_search_name_hash.
1351 * go-lang.c (go_language_defn): Install default_search_name_hash.
1352 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1353 creation.
1354 * language.c (unknown_language_defn, auto_language_defn):
1355 * language.h (language_defn::la_search_name_hash): New field.
1356 (default_search_name_hash): Declare.
1357 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1358 * mdebugread.c (new_block): New parameter 'language'.
1359 * mdebugread.c (parse_symbol): Pass symbol language to block
1360 allocation.
1361 (psymtab_to_symtab_1): Pass down language.
1362 (new_symtab): Pass compunit's language to block allocation.
1363 * objc-lang.c (objc_language_defn): Install
1364 default_search_name_hash.
1365 * opencl-lang.c (opencl_language_defn):
1366 * p-lang.c (pascal_language_defn): Install
1367 default_search_name_hash.
1368 * rust-lang.c (rust_language_defn): Install
1369 default_search_name_hash.
1370 * stabsread.h (enum language): Forward declare.
1371 (process_one_symbol): Add 'language' parameter.
1372 * symtab.c (search_name_hash): New function.
1373 * symtab.h (search_name_hash): Declare.
1374 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1375
1376 2017-11-08 Pedro Alves <palves@redhat.com>
1377
1378 * cp-name-parser.y (main): Don't initialize extra_chars.
1379
1380 2017-11-07 Tom Tromey <tom@tromey.com>
1381
1382 * event-top.h (command_handler): Constify.
1383 * record-full.c (cmd_record_full_start): Update.
1384 * thread.c (thread_apply_all_command): Update.
1385 * printcmd.c (eval_command): Update.
1386 * mi/mi-main.c (mi_execute_cli_command): Update.
1387 (mi_execute_async_cli_command): Update.
1388 * tui/tui-stack.c (tui_update_command): Update.
1389 * cli/cli-interp.c (safe_execute_command): Constify.
1390 * record.c (record_start): Update.
1391 (record_start, record_stop, cmd_record_start): Update.
1392 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1393 (cmd_record_btrace_pt_start): Update.
1394 (cmd_record_btrace_start): Update.
1395 (cmd_record_btrace_start): Update.
1396 * reverse.c (exec_reverse_once): Update.
1397 * python/python.c (execute_gdb_command): Don't copy the command.
1398 * event-top.c (command_line_handler): Update.
1399 (command_handler): Constify.
1400 * defs.h (deprecated_call_command_hook): Constify.
1401 * cli/cli-script.h (execute_user_command): Constify.
1402 * cli/cli-script.c (execute_user_command): Constify.
1403 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1404 (enum command_control_type): Update.
1405 * main.c (catch_command_errors): Remove non-const overload.
1406 (catch_command_errors_ftype): Remove.
1407 * python/py-cmd.c (cmdpy_function): Constify.
1408 * guile/scm-cmd.c (cmdscm_function): Constify.
1409 * cli/cli-dump.c (call_dump_func): Constify.
1410 * cli/cli-decode.c (do_const_cfunc): Constify.
1411 (do_sfunc): Constify.
1412 (cmd_func): Constify.
1413 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1414 * top.h (execute_command): Constify.
1415 * top.c (execute_command): Constify.
1416 (execute_command_to_string): Constify.
1417 (deprecated_call_command_hook): Constify.
1418 * command.h (cmd_func): Constify.
1419 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1420
1421 2017-11-07 Tom Tromey <tom@tromey.com>
1422
1423 * ada-lang.c (catch_ada_exception_command): Constify.
1424 (catch_assert_command): Constify.
1425 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1426 (catch_rethrow_command): Constify.
1427 (catch_exception_command_1): Constify.
1428 * breakpoint.h (add_catch_command): Constify.
1429 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1430 (catch_syscall_split_args): Constify.
1431 * break-catch-sig.c (catch_signal_command): Constify.
1432 (catch_signal_split_args): Constify.
1433 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1434 cmd_const_sfunc_ftype.
1435 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1436 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1437 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1438 (add_setshow_string_cmd, struct cmd_list_element)
1439 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1440 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1441 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1442 Constify.
1443 (set_cmd_sfunc): Constify.
1444 (empty_sfunc): Constify.
1445 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1446 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1447 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1448 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1449 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1450 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1451 Constify.
1452 (set_cmd_sfunc): Constify.
1453 (cmd_sfunc_ftype): Remove.
1454 * compile/compile.c (set_compile_args): Constify.
1455 * infrun.c (set_disable_randomization): Constify.
1456 * infcmd.c (set_args_command, set_cwd_command): Constify.
1457 * breakpoint.c (set_condition_evaluation_mode): Constify.
1458 (add_catch_command): Constify.
1459 (catch_fork_command_1, catch_exec_command_1)
1460 (catch_load_command_1, catch_unload_command_1): Constify.
1461 (catch_load_or_unload): Constify.
1462 * guile/scm-param.c (pascm_set_func): Constify.
1463 (add_setshow_generic): Constify.
1464 * python/py-param.c (get_set_value): Constify.
1465 * top.h (set_verbose): Constify.
1466 * tui/tui-win.c (tui_set_var_cmd): Constify.
1467 * mi/mi-main.c (set_mi_async_command): Constify.
1468 * cli/cli-logging.c (set_logging_overwrite)
1469 (set_logging_redirect): Constify.
1470 * value.c (set_max_value_size): Constify.
1471 * valprint.c (set_input_radix, set_output_radix): Constify.
1472 * utils.c (set_width_command, set_height_command): Constify.
1473 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1474 * tracepoint.c (set_disconnected_tracing)
1475 (set_circular_trace_buffer, set_trace_buffer_size)
1476 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1477 * top.c (set_history_size_command, set_verbose, set_editing)
1478 (set_gdb_datadir, set_history_filename): Constify.
1479 * target.c (set_targetdebug, maint_set_target_async_command)
1480 (maint_set_target_non_stop_command, set_target_permissions)
1481 (set_write_memory_permission): Constify.
1482 (open_target): Constify.
1483 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1484 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1485 * symtab.c (set_symbol_cache_size_handler): Constify.
1486 * symfile.c (set_ext_lang_command): Constify.
1487 * symfile-debug.c (set_debug_symfile): Constify.
1488 * source.c (set_directories_command): Constify.
1489 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1490 * serial.c (set_parity): Constify.
1491 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1492 * remote.c (set_remote_exec_file, set_remotebreak)
1493 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1494 * record.c (set_record_insn_history_size)
1495 (set_record_call_history_size): Constify.
1496 * record-full.c (set_record_full_insn_max_num): Constify.
1497 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1498 * osabi.c (set_osabi): Constify.
1499 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1500 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1501 * maint.c (maintenance_set_profile_cmd): Constify.
1502 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1503 * language.c (set_language_command, set_range_command)
1504 (set_case_command): Constify.
1505 * infrun.c (set_non_stop, set_observer_mode)
1506 (set_stop_on_solib_events, set_schedlock_func)
1507 (set_exec_direction_func): Constify.
1508 * infcmd.c (set_inferior_tty_command): Constify.
1509 * disasm.c (set_disassembler_options_sfunc): Constify.
1510 * demangle.c (set_demangling_command): Constify.
1511 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1512 * cris-tdep.c (set_cris_version, set_cris_mode)
1513 (set_cris_dwarf2_cfi): Constify.
1514 * corefile.c (set_gnutarget_command): Constify.
1515 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1516 (set_target_wide_charset_sfunc): Constify.
1517 * breakpoint.c (update_dprintf_commands): Constify.
1518 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1519 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1520 (set_disassembly_style_sfunc): Constify.
1521 * arch-utils.c (set_endian, set_architecture): Constify.
1522 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1523 * agent.c (set_can_use_agent): Constify.
1524
1525 2017-11-07 Tom Tromey <tom@tromey.com>
1526
1527 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1528 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1529 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1530 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1531 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1532 (parse_int_arg, show_thread_default_detach_sc_cmd)
1533 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1534 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1535 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1536 (show_task_pause_cmd, set_task_detach_sc_cmd)
1537 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1538 (set_noninvasive_cmd, set_thread_pause_cmd)
1539 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1540 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1541 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1542 * windows-nat.c (display_selectors): Constify.
1543 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1544 non-const "cfunc".
1545 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1546 (cmd_cfunc_eq): Likewise.
1547 (struct cmd_list_element): Likewise.
1548 (do_cfunc): Remove.
1549 (cli_user_command_p): Update.
1550 * command.h (add_cmd): Remove non-const overload.
1551 (cmd_cfunc_ftype): Remove typedef.
1552 (cmd_cfunc_eq): Remove non-const overload.
1553 * value.c (show_values): Constify.
1554 * thread.c (thread_apply_all_command): Constify.
1555 * symfile.c (load_command): Constify.
1556 * source.c (directory_command): Constify.
1557 * maint.c (maintenance_internal_error)
1558 (maintenance_demangler_warning, maintenance_space_display)
1559 (maintenance_print_architecture, maintenance_translate_address)
1560 (maintenance_info_selftests, maintenance_internal_warning):
1561 Constify.
1562 * breakpoint.c (disable_trace_command, enable_trace_command):
1563 Constify.
1564 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1565 Constify.
1566 (add_auto_load_safe_path): Constify.
1567 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1568 * top.h (show_commands): Constify.
1569 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1570 * sparc64-tdep.c (adi_examine_command): Constify.
1571 (adi_assign_command): Constify.
1572
1573 2017-11-07 Tom Tromey <tom@tromey.com>
1574
1575 * frame.h (info_locals_command, info_args_command): Constify.
1576 * auto-load.h (auto_load_info_scripts): Constify.
1577 * inferior.h (registers_info): Constify.
1578 * copying.c: Rebuild.
1579 * copying.awk: Constify generated commands.
1580 * auto-load.c (auto_load_info_scripts)
1581 (info_auto_load_gdb_scripts): Constify.
1582 * cli/cli-decode.c (struct cmd_list_element): Take a
1583 cmd_const_cfunc_ftype.
1584 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1585 * tui/tui-win.c (tui_all_windows_info): Constify.
1586 * python/py-auto-load.c (info_auto_load_python_scripts):
1587 Constify.
1588 * cli/cli-cmds.c (show_command): Remove non-const overload.
1589 * tracepoint.c (info_tvariables_command, info_scope_command):
1590 Constify.
1591 (info_static_tracepoint_markers_command): Constify.
1592 * thread.c (info_threads_command): Constify.
1593 (print_thread_info_1): Constify.
1594 * target.c (info_target_command): Constify.
1595 * symtab.c (info_sources_command, info_functions_command)
1596 (info_types_command): Constify.
1597 (info_variables_command): Remove non-const overload.
1598 * symfile.c (info_ext_lang_command): Constify.
1599 * stack.c (info_frame_command, info_locals_command)
1600 (info_args_command): Constify.
1601 (backtrace_command): Remove non-const overload.
1602 * source.c (info_source_command, info_line_command): Constify.
1603 * solib.c (info_sharedlibrary_command): Constify.
1604 * skip.c (info_skip_command): Constify.
1605 * ser-go32.c (info_serial_command): Constify.
1606 * reverse.c (info_bookmarks_command): Constify.
1607 * printcmd.c (info_symbol_command, info_address_command)
1608 (info_display_command): Constify.
1609 * osdata.c (info_osdata_command): Constify.
1610 * objc-lang.c (info_selectors_command, info_classes_command):
1611 Constify.
1612 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1613 * memattr.c (info_mem_command): Constify.
1614 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1615 * linux-fork.c (info_checkpoints_command): Constify.
1616 * infrun.c (info_signals_command): Constify.
1617 * inflow.c (info_terminal_command): Constify.
1618 * inferior.c (info_inferiors_command): Constify.
1619 (print_inferior): Constify.
1620 * infcmd.c (info_program_command, info_all_registers_command)
1621 (info_registers_command, info_vector_command)
1622 (info_float_command): Constify.
1623 (registers_info): Constify.
1624 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1625 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1626 Constify.
1627 * f-valprint.c (info_common_command): Constify.
1628 * dcache.c (info_dcache_command): Constify.
1629 (dcache_info_1): Constify.
1630 * darwin-nat-info.c (info_mach_tasks_command)
1631 (info_mach_task_command, info_mach_ports_command)
1632 (info_mach_port_command, info_mach_threads_command)
1633 (info_mach_thread_command, info_mach_regions_command)
1634 (info_mach_regions_recurse_command, info_mach_region_command)
1635 (info_mach_exceptions_command): Constify.
1636 (get_task_from_args): Constify.
1637 * cp-support.c (info_vtbl_command): Constify.
1638 * breakpoint.c (info_watchpoints_command)
1639 (info_tracepoints_command): Constify.
1640 (info_breakpoints_command): Remove non-const overload.
1641 * avr-tdep.c (avr_io_reg_read_command): Constify.
1642 * auxv.c (info_auxv_command): Constify.
1643 * ada-tasks.c (info_tasks_command): Constify.
1644 (info_task): Constify.
1645 * ada-lang.c (info_exceptions_command): Constify.
1646
1647 2017-11-07 Tom Tromey <tom@tromey.com>
1648
1649 * solib.h (no_shared_libraries): Constify.
1650 * frame.h (return_command): Constify.
1651 * cli/cli-cmds.h (quit_command): Constify.
1652 * top.h (quit_command, execute_command): Constify.
1653 * target.h (flash_erase_command): Constify.
1654 * inferior.h (set_inferior_args, attach_command): Constify.
1655 * tracepoint.h (start_tracing, stop_tracing): Constify.
1656 * breakpoint.h (break_command, tbreak_command)
1657 (hbreak_command_wrapper, thbreak_command_wrapper)
1658 (rbreak_command_wrapper, watch_command_wrapper)
1659 (awatch_command_wrapper, rwatch_command_wrapper)
1660 (get_tracepoint_by_number): Constify.
1661 * symtab.c (info_variables_command, rbreak_command)
1662 (symtab_symbol_info): Constify.
1663 (info_variables_command): Add non-const overload.
1664 * top.c (dont_repeat_command): Constify.
1665 * breakpoint.c (ignore_command, commands_command)
1666 (condition_command, tbreak_command, hbreak_command)
1667 (thbreak_command, clear_command, break_command)
1668 (info_breakpoints_command, watch_command, rwatch_command)
1669 (awatch_command, trace_command, ftrace_command, strace_command)
1670 (trace_pass_command, break_range_command, dprintf_command)
1671 (agent_printf_command, get_tracepoint_by_number)
1672 (watch_maybe_just_location, trace_pass_command): Constify.
1673 (info_breakpoints_command): Add non-const overload.
1674 * tracefile.c (tsave_command): Constify.
1675 * infcmd.c (attach_command, disconnect_command, signal_command)
1676 (queue_signal_command, stepi_command, nexti_command)
1677 (finish_command, next_command, step_command, until_command)
1678 (advance_command, jump_command, continue_command, run_command)
1679 (start_command, starti_command, interrupt_command)
1680 (run_command_1, set_inferior_args, step_1): Constify.
1681 * inferior.c (add_inferior_command, remove_inferior_command)
1682 (clone_inferior_command): Constify.
1683 * linux-fork.c (checkpoint_command, restart_command): Constify.
1684 * windows-nat.c (signal_event_command): Constify.
1685 * guile/guile.c (guile_repl_command, guile_command): Constify.
1686 * printcmd.c (x_command, display_command, printf_command)
1687 (output_command, set_command, call_command, print_command)
1688 (eval_command): Constify.
1689 (non_const_set_command): Remove.
1690 (_initialize_printcmd): Update.
1691 * source.c (forward_search_command, reverse_search_command):
1692 Constify.
1693 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1694 Constify.
1695 * infrun.c (handle_command): Constify.
1696 * memattr.c (mem_command): Constify.
1697 * stack.c (return_command, up_command, up_silently_command)
1698 (down_command, down_silently_command, frame_command)
1699 (backtrace_command, func_command, backtrace_command_1): Constify.
1700 (backtrace_command): Add non-const overload.
1701 * remote-sim.c (simulator_command): Constify.
1702 * exec.c (set_section_command): Constify.
1703 * tracepoint.c (tdump_command, trace_variable_command)
1704 (tstatus_command, tstop_command, tstart_command)
1705 (end_actions_pseudocommand, while_stepping_pseudocommand)
1706 (collect_pseudocommand, teval_pseudocommand, actions_command)
1707 (start_tracing, stop_tracing): Constify.
1708 * value.c (init_if_undefined_command): Constify.
1709 * tui/tui-stack.c (tui_update_command): Constify.
1710 * tui/tui-win.c (tui_refresh_all_command)
1711 (tui_set_tab_width_command, tui_set_win_height_command)
1712 (tui_set_focus_command, tui_scroll_forward_command)
1713 (tui_scroll_backward_command, tui_scroll_left_command)
1714 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1715 (tui_set_win_height): Constify.
1716 * tui/tui-layout.c (tui_layout_command): Constify.
1717 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1718 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1719 (proc_untrace_sysexit_cmd): Constify.
1720 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1721 (threadset_test_cmd, threadlist_update_test_cmd)
1722 (threadalive_test): Constify.
1723 * objc-lang.c (print_object_command): Constify.
1724 * command.h (add_com): Constify.
1725 * cli/cli-dump.c (restore_command): Constify.
1726 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1727 (help_command, complete_command, shell_command, edit_command)
1728 (list_command, disassemble_command, make_command)
1729 (apropos_command, alias_command): Constify.
1730 * cli/cli-script.c (document_command, define_command)
1731 (while_command, if_command, validate_comname): Constify.
1732 * cli/cli-decode.c (struct cmd_list_element): Change type of
1733 "fun".
1734 * target.c (do_monitor_command, flash_erase_command): Constify.
1735 * regcache.c (reg_flush_command): Constify.
1736 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1737 (reverse_nexti, reverse_continue, reverse_finish)
1738 (save_bookmark_command, goto_bookmark_command)
1739 (exec_reverse_once): Constify.
1740 * python/python.c (python_interactive_command, python_command):
1741 Constify.
1742 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1743 Constify.
1744 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1745 * gcore.c (gcore_command): Constify.
1746
1747 2017-11-07 Tom Tromey <tom@tromey.com>
1748
1749 * printcmd.c (x_command): Call set_repeat_arguments.
1750 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1751 * top.c (repeat_arguments): New global.
1752 (set_repeat_arguments): New function.
1753 (execute_command): Handle repeat_arguments.
1754 (show_commands): Calls set_repeat_arguments.
1755 * command.h (set_repeat_arguments): Declare.
1756
1757 2017-11-07 Tom Tromey <tom@tromey.com>
1758
1759 * stack.c (backtrace_command): Use std::string.
1760 (backtrace_command_1): Make "count_exp" const.
1761
1762 2017-11-07 Tom Tromey <tom@tromey.com>
1763
1764 * source.c (directory_switch, mod_path, add_path): Constify.
1765 * defs.h (add_path, mod_path, directory_switch): Constify.
1766 * mi/mi-cmd-env.c (env_mod_path): Constify.
1767
1768 2017-11-07 Tom Tromey <tom@tromey.com>
1769
1770 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1771 (run_command_1, continue_command, step_1, jump_command)
1772 (signal_command, until_command, advance_command, finish_command)
1773 (attach_command): Update.
1774
1775 2017-11-07 Tom Tromey <tom@tromey.com>
1776
1777 * command.h (set_cmd_cfunc): Don't declare.
1778 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1779
1780 2017-11-07 Tom Tromey <tom@tromey.com>
1781
1782 * stack.c (select_frame_command): Constify.
1783 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1784 * command.h (add_com_suppress_notification): Constify.
1785
1786 2017-11-07 Tom Tromey <tom@tromey.com>
1787
1788 * breakpoint.c (stop_command): Constify.
1789 * cli/cli-decode.c (struct cmd_list_element): Constify.
1790 * command.h (add_abbrev_prefix_cmd): Constify.
1791
1792 2017-11-07 Pedro Alves <palves@redhat.com>
1793
1794 * breakpoint.c (extract_bp_kind): New enum.
1795 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1796 factored out from ...
1797 (extract_bp_number_and_location): ... here.
1798 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1799
1800 2017-11-07 Pedro Alves <palves@redhat.com>
1801
1802 * breakpoint.c (extract_bp_number_and_location): Change return
1803 type to void. Throw error instead of warning.
1804 (enable_disable_command): Adjust.
1805
1806 2017-11-07 Xavier Roirand <roirand@adacore.com>
1807 Pedro Alves <palves@redhat.com>
1808
1809 * breakpoint.c (map_breakpoint_number_range): New, factored out
1810 from ...
1811 (map_breakpoint_numbers): ... here.
1812 (find_location_by_number): Change parameters from string to
1813 breakpoint number and location.
1814 (extract_bp_number_and_location): New function.
1815 (enable_disable_bp_num_loc)
1816 (enable_disable_breakpoint_location_range)
1817 (enable_disable_command): New functions, factored out ...
1818 (enable_command, disable_command): ... these functions, and
1819 adjusted to support ranges.
1820 * NEWS: Document enable/disable breakpoint location range feature.
1821
1822 2017-11-06 Luis Machado <luis.machado@linaro.org>
1823
1824 * MAINTAINERS (Write After Approval): Update my e-mail address.
1825
1826 2017-11-06 Pedro Alves <palves@redhat.com>
1827
1828 * gnu-nat.c (gnu_terminal_init): Delete.
1829 (gnu_target): Don't install gnu_terminal_init.
1830 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1831 (child_terminal_init): ... this function.
1832
1833 2017-11-06 Pedro Alves <palves@redhat.com>
1834
1835 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1836 sgtty.h.
1837 * config.in, configure: Regenerate.
1838
1839 2017-11-06 Pedro Alves <palves@redhat.com>
1840
1841 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1842 (async_init_signals): Adjust.
1843 (handle_stop_sig): Rename to ...
1844 (handle_sigtstp): ... this.
1845 (async_stop_sig): Rename to ...
1846 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1847 SIGTSTP path.
1848 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1849 instead of STOP_SIGNAL thoughout.
1850 (handle_stop_sig): Rename to ...
1851 (handle_sigtstp): ... this.
1852 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1853
1854 2017-11-06 Pedro Alves <palves@redhat.com>
1855
1856 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1857 longer set flags twice in row.
1858
1859 2017-11-06 Pedro Alves <palves@redhat.com>
1860
1861 * Makefile.in (SER_HARDWIRE): Update comment.
1862 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1863 * common/gdb_termios.h: Delete file.
1864 * common/job-control.c: Include termios.h and unistd.h instead of
1865 gdb_termios.h.
1866 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1867 check.
1868 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1869 Remove sgtty code.
1870 * configure.ac: No longer check for termio.h and sgtty.h.
1871 * configure: Regenerate.
1872 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1873 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1874 Replace PROCESS_GROUP_TYPE references with pid_t references
1875 throughout.
1876 (gdb_getpgrp): Delete.
1877 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1878 (child_terminal_inferior): Remove comment. Remove sgtty code.
1879 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1880 gdb_getpgrp. Use serial_set_tty_state instead aof
1881 serial_noflush_set_tty_state. Remove sgtty code.
1882 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1883 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1884 (inferior_process_group): Now returns pid_t.
1885 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1886 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1887 * ser-event.c (serial_event_ops): Update.
1888 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1889 (dos_ops): Update.
1890 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1891 * ser-pipe.c (pipe_ops): Update.
1892 * ser-tcp.c (tcp_ops): Update.
1893 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1894 HAVE_TERMIOS checks.
1895 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1896 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1897 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1898 assume termios.
1899 (hardwire_noflush_set_tty_state): Delete.
1900 (hardwire_print_tty_state, hardwire_drain_output)
1901 (hardwire_flush_output, hardwire_flush_input)
1902 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1903 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1904 code, and assume termios.
1905 (hardwire_ops): Update.
1906 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1907 * serial.c (serial_noflush_set_tty_state): Delete.
1908 * serial.h (serial_noflush_set_tty_state): Delete.
1909 (serial_ops::noflush_set_tty_state): Delete.
1910
1911 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1912
1913 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1914 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1915 (COMMON_OBS): Remove doublest.o and dfp.o.
1916 Do not build target-float.c (instead of doublest.c)
1917 with -Wformat-nonliteral.
1918
1919 * doublest.c: Remove file.
1920 * doublest.h: Remove file.
1921 * dfp.c: Remove file.
1922 * dfp.h: Remove file.
1923
1924 * target-float.c: Do not include "doublest.h" and "dfp.h".
1925 (DOUBLEST): Move here from doublest.h.
1926 (enum float_kind): Likewise.
1927 (FLOATFORMAT_CHAR_BIT): Likewise.
1928 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1929 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1930 (floatformat_precision): Likewise.
1931 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1932 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1933 Likewise.
1934 (host_float_format, host_double_format, host_long_double_format):
1935 Likewise.
1936 (floatformat_to_string, floatformat_from_string): Likewise.
1937 (floatformat_to_doublest): Likewise. Also, inline the original
1938 convert_floatformat_to_doublest.
1939 (floatformat_from_doublest): Likewise. Also, inline the original
1940 convert_floatformat_from_doublest.
1941
1942 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1943 (MAX_DECIMAL_STRING): Move here from dfp.c.
1944 (match_endianness): Likewise.
1945 (set_decnumber_context, decimal_check_errors): Likewise.
1946 (decimal_from_number, decimal_to_number): Likewise.
1947 (decimal_to_string, decimal_from_string): Likewise. Make static.
1948 (decimal_from_longest, decimal_from_ulongest): Likewise.
1949 (decimal_to_longest): Likewise.
1950 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1951 (decimal_convert): Likewise.
1952
1953 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1954
1955 * doublest.c: Do not include "gdbtypes.h".
1956 (extract_typed_floating): Remove.
1957 (store_typed_floating): Remove.
1958 (convert_typed_floating): Remove.
1959 * doublest.h (struct type): Remove.
1960 (DOUBLEST_PRINT_FORMAT): Remove.
1961 (DOUBLEST_SCAN_FORMAT): Remove.
1962 (extract_typed_floating): Remove.
1963 (store_typed_floating): Remove.
1964 (convert_typed_floating): Remove.
1965
1966 * dfp.c (decimal_from_doublest): Remove.
1967 (decimal_to_doublest): Remove.
1968 * dfp.h: Do not include "doublest.h".
1969 (decimal_from_doublest): Remove.
1970 (decimal_to_doublest): Remove.
1971
1972 * value.c: Do not include "doublest.h" and "dfp.h".
1973 (value_as_double): Remove.
1974 (unpack_double): Remove.
1975 (value_from_double): Remove.
1976 (value_from_decfloat): Remove.
1977 * value.h: Do not include "doublest.h".
1978 (value_as_double): Remove.
1979 (unpack_double): Remove.
1980 (value_from_double): Remove.
1981 (value_from_decfloat): Remove.
1982
1983 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1984
1985 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1986 (i386_extract_return_value): Use target_float_convert.
1987 (i386_store_return_value): Likewise.
1988 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1989 (i387_value_to_register): Likewise.
1990 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1991 (ia64_register_to_value): Use target_float_convert.
1992 (ia64_value_to_register): Likewise.
1993 (ia64_extract_return_value): Likewise.
1994 (ia64_store_return_value): Likewise.
1995 (ia64_push_dummy_call): Likewise.
1996 * m68k-tdep.c: Include "target-float.h".
1997 (m68k_register_to_value): Use target_float_convert.
1998 (m68k_value_to_register): Likewise.
1999 (m68k_svr4_extract_return_value): Likewise.
2000 (m68k_svr4_store_return_value): Likewise.
2001 * ppc-sysv-tdep.c: Include "target-float.h".
2002 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2003 (do_ppc_sysv_return_value): Likewise.
2004 (ppc64_sysv_abi_push_freg): Likewise.
2005 (ppc64_sysv_abi_return_value_base): Likewise.
2006 * rs6000-aix-tdep.c: Include "target-float.h".
2007 (rs6000_push_dummy_call): Use target_float_convert.
2008 (rs6000_return_value): Likewise.
2009 * rs6000-lynx178-tdep.c: Include "target-float.h".
2010 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2011 (rs6000_lynx178_return_value): Likewise.
2012 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2013 (rs6000_register_to_value): Use target_float_convert.
2014 (rs6000_value_to_register): Likewise.
2015 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2016 (arm_extract_return_value): Use target_float_convert.
2017 (arm_store_return_value): Likewise.
2018 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2019 (sh_register_convert_to_virtual): Use target_float_convert.
2020 (sh_register_convert_to_raw): Likewise.
2021 * sh64-tdep.c: Include "target-float.h".
2022 (sh64_extract_return_value): Use target_float_convert.
2023 (sh64_register_convert_to_virtual): Likewise.
2024 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2025
2026 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2027
2028 * target-float.c (floatformat_to_host_double): New function.
2029 (floatformat_from_host_double): Likewise.
2030 (target_float_to_host_double): Likewise.
2031 (target_float_from_host_double): Likewise.
2032 * target-float.h (target_float_to_host_double): Add prototype.
2033 (target_float_from_host_double): Likewise.
2034
2035 * guile/scm-value.c: Include "target-float.h".
2036 (gdbscm_value_to_real): Use target_float_to_host_double.
2037 Handle integer source values via value_as_long.
2038 * guile/scm-math.c: Include "target-float.h". Do not include
2039 "doublest.h", "dfp.h", and "expression.h".
2040 (vlscm_convert_typed_number): Use target_float_from_host_double.
2041 (vlscm_convert_number): Likewise.
2042
2043 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2044 (convert_value_from_python): Use target_float_from_host_double.
2045
2046 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2047
2048 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2049 (cast_from_fixed): Likewise.
2050 (ada_scaling_type): New function.
2051 (ada_delta): Return value instead of DOUBLEST. Perform target
2052 arithmetic instead of host arithmetic.
2053 (scaling_factor): Rename to ...
2054 (ada_scaling_factor) ... this. Make non-static. Return value instead
2055 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2056 (ada_fixed_to_float): Remove.
2057 (ada_float_to_fixed): Remove.
2058 * ada-lang.h (ada_fixed_to_float): Remove.
2059 (ada_float_to_fixed): Remove.
2060 (ada_delta): Return value instead of DOUBLEST.
2061 (ada_scaling_factor): Add prototype.
2062
2063 * ada-typeprint.c: Include "target-float.h".
2064 (print_fixed_point_type): Perform target arithmetic instead of
2065 host arithmetic.
2066 * ada-valprint.c: Include "target-float.h".
2067 (ada_val_print_num): Perform target arithmetic instead of
2068 host arithmetic for fixed-point types.
2069
2070 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2071
2072 * target-float.c: Include <math.h>.
2073 (floatformat_binop): New function.
2074 (floatformat_compare): Likewise.
2075 (target_float_binop): Likewise.
2076 (target_float_compare): Likewise.
2077 * target-float.h: Include "expression.h".
2078 (target_float_binop): Add prototype.
2079 (target_float_compare): Likewise.
2080
2081 * valarith.c: Do not include "doublest.h" and "dfp.h".
2082 Include "common/byte-vector.h".
2083 (value_args_as_decimal): Remove, replace by ...
2084 (value_args_as_target_float): ... this function. Handle both
2085 binary and decimal target floating-point formats.
2086 (scalar_binop): Handle both binary and decimal FP using
2087 value_args_as_target_float and target_float_binop.
2088 (value_equal): Handle both binary and decimal FP using
2089 value_args_as_target_float and target_float_compare.
2090 (value_less): Likewise.
2091 (value_pos): Handle all scalar types as simple copy.
2092 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2093 * dfp.c (decimal_binop): Throw error instead of internal_error
2094 when called with an unsupported operation code.
2095
2096 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2097
2098 * target-float.c (target_float_to_string): New function.
2099 (target_float_from_string): New function.
2100 * target-float.h (target_float_to_string): Add prototype.
2101 (target_float_from_string): Add prototype.
2102
2103 * valprint.c: Include "target-float.h". Do not include
2104 "doublest.h" and "dfp.h".
2105 (print_floating): Use target_float_to_string.
2106 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2107 (printf_floating): Use target_float_to_string.
2108 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2109 (print_i387_value): Use target_float_to_string.
2110 * mips-tdep.c: Include "target-float.h".
2111 (mips_print_fp_register): Use target_float_to_string.
2112 * sh64-tdep.c: Include "target-float.h".
2113 (sh64_do_fp_register): Use target_float_to_string.
2114
2115 * parse.c: Include "target-float.h". Do not include
2116 "doublest.h" and "dfp.h".
2117 (parse_float): Use target_float_from_string.
2118 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2119 (define_symbol): Use target_float_from_string.
2120 * gdbarch-selftests.c: Include "target-float.h".
2121 (register_to_value_test): Use target_float_from_string.
2122
2123 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2124
2125 * Makefile.c (SFILES): Add target-float.c.
2126 (HFILES_NO_SRCDIR): Add target-float.h.
2127 (COMMON_OBS): Add target-float.o.
2128 * target-float.h: New file.
2129 * target-float.c: New file.
2130
2131 * doublest.c (floatformat_classify): Fix detection of float_zero.
2132
2133 * gdbtypes.c (is_floating_type): New function.
2134 * gdbtypes.h (is_floating_type): Add prototype.
2135
2136 * value.c: Do not include "floatformat.h".
2137 (unpack_double): Use target_float_is_valid.
2138 (is_floating_value): New function.
2139 * value.h (is_floating_value): Add prototype-
2140
2141 * valarith.c: Include "target-float.h".
2142 (value_logical_not): Use target_float_is_zero.
2143
2144 * python/py-value.c: Include "target-float.h".
2145 (valpy_nonzero): Use target_float_is_zero.
2146
2147 2017-11-04 Tom Tromey <tom@tromey.com>
2148
2149 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2150
2151 2017-11-04 Tom Tromey <tom@tromey.com>
2152
2153 * breakpoint.c (set_momentary_breakpoint): Return
2154 breakpoint_up.
2155 (until_break_command): Update.
2156 (new_until_break_fsm): Change argument types to
2157 breakpoint_up.
2158 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2159 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2160 Remove.
2161 * infcmd.c (finish_forward): Update.
2162 * breakpoint.h (set_momentary_breakpoint)
2163 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2164 (make_cleanup_delete_breakpoint): Remove.
2165 (struct breakpoint_deleter): New.
2166 (breakpoint_up): New typedef.
2167 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2168 (insert_exception_resume_breakpoint): Update.
2169 (insert_exception_resume_from_probe): Update.
2170 (insert_longjmp_resume_breakpoint): Update.
2171 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2172 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2173 * infcall.c (call_function_by_hand_dummy): Update
2174
2175 2017-11-04 Tom Tromey <tom@tromey.com>
2176
2177 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2178
2179 2017-11-04 Tom Tromey <tom@tromey.com>
2180
2181 * linux-tdep.c (linux_core_info_proc_mappings): Use
2182 gdb::def_vector.
2183 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2184 "size" argument.
2185 (linux_corefile_thread): Update.
2186 (linux_make_corefile_notes): Remove unused variable.
2187
2188 2017-11-04 Tom Tromey <tom@tromey.com>
2189
2190 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2191 gdb::byte_vector.
2192
2193 2017-11-04 Tom Tromey <tom@tromey.com>
2194
2195 * objfiles.c (do_free_objfile_cleanup): Remove.
2196 * compile/compile-object-load.c (compile_object_load): Update.
2197 * objfiles.h (make_cleanup_free_objfile): Remove.
2198
2199 2017-11-04 Tom Tromey <tom@tromey.com>
2200
2201 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2202 (adi_read_versions): Change "tags" to "gdb_byte *".
2203 (adi_print_versions): Likewise.
2204
2205 2017-11-04 Tom Tromey <tom@tromey.com>
2206
2207 * breakpoint.c
2208 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2209 from start_rbreak_breakpoints.
2210 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2211 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2212 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2213 * symtab.c (do_end_rbreak_breakpoints): Remove.
2214 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2215
2216 2017-11-04 Tom Tromey <tom@tromey.com>
2217
2218 * cp-namespace.c (reset_directive_searched): Remove.
2219 (cp_lookup_symbol_via_imports): Use scoped_restore.
2220 * cp-support.c (reset_directive_searched): Remove.
2221 (make_symbol_overload_list_using): Use scoped_restore.
2222 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2223 (reset_directive_searched): Remove.
2224
2225 2017-11-04 Tom Tromey <tom@tromey.com>
2226
2227 * symfile.c (find_separate_debug_file_by_debuglink): Use
2228 unique_xmalloc_ptr.
2229
2230 2017-11-04 Tom Tromey <tom@tromey.com>
2231
2232 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2233 type of "info".
2234 (compute_stack_depth): Likewise.
2235 (do_compile_dwarf_expr_to_c): Use std::vector.
2236
2237 2017-11-04 Tom Tromey <tom@tromey.com>
2238
2239 * compile/compile-object-load.c (link_callbacks_einfo): Use
2240 std::string.
2241
2242 2017-11-04 Tom Tromey <tom@tromey.com>
2243
2244 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2245 Use scoped_free_pendings.
2246 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2247 scoped_free_pendings.
2248 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2249 (xcoff_initial_scan): Likewise.
2250 * buildsym.c (reset_symtab_globals): Update comment.
2251 (scoped_free_pendings): Rename from really_free_pendings.
2252 (prepare_for_building): Update comment.
2253 (buildsym_init): Likewise.
2254 * buildsym.h (class scoped_free_pendings): New class.
2255 (really_free_pendings): Don't declare.
2256
2257 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2258
2259 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2260 output when converting a zero value to a special byteorder format.
2261
2262 2017-11-02 Yao Qi <yao.qi@linaro.org>
2263
2264 * frame.c (do_frame_register_read): Remove aspace.
2265 * jit.c (jit_frame_sniffer): Likwise.
2266 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2267 * regcache.c (regcache::regcache): Pass nullptr.
2268 (regcache_print): Caller updated.
2269 * regcache.h (regcache::regcache): Remove one constructor
2270 parameter aspace.
2271
2272 2017-11-02 Yao Qi <yao.qi@linaro.org>
2273
2274 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2275
2276 2017-11-02 Yao Qi <yao.qi@linaro.org>
2277
2278 * breakpoint.c (insert_single_step_breakpoints): Update.
2279 * frame.c (struct frame_info) <aspace>: Add const.
2280 (frame_save_as_regcache): Add const.
2281 (get_frame_address_space): Return const address_space *.
2282 * frame.h (get_frame_address_space): Update declaration.
2283 * infrun.c (struct step_over_info) <aspace>: Add const.
2284 (set_step_over_info): Make aspace const.
2285 (displaced_step_prepare_throw): Change variable const.
2286 (resume): Likewise.
2287 (proceed): Likewise.
2288 (adjust_pc_after_break): Likewise.
2289 (save_waitstatus): Likewise.
2290 (handle_signal_stop): Likewise.
2291 (keep_going_pass_signal): Likewise.
2292 * jit.c (jit_frame_sniffer): Add const.
2293 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2294 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2295 * record-full.c (record_full_wait_1): Likewise.
2296 * regcache.c (regcache::regcache): Change parameter to const.
2297 * regcache.h (regcache::regcache): Likewise.
2298 (regcache::aspace): Return const address_space *.
2299 (regcache) <m_aspace>: Add const.
2300
2301 2017-11-02 Yao Qi <yao.qi@linaro.org>
2302
2303 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2304 * frame.c (create_sentinel_frame): Likewise.
2305 * infrun.c (displaced_step_prepare_throw): Likewise.
2306 (resume): Likewise.
2307 (thread_still_needs_step_over_bp): Likewise.
2308 (proceed): Likewise.
2309 (do_target_wait): Likewise.
2310 (adjust_pc_after_break): Likewise.
2311 (handle_syscall_event): Likewise.
2312 (save_waitstatus): Likewise.
2313 (handle_inferior_event_1): Likewise.
2314 (handle_signal_stop): Likewise.
2315 (keep_going_pass_signal): Likewise.
2316 * linux-nat.c (status_callback): Likewise.
2317 (save_stop_reason): Likewise.
2318 (resume_stopped_resumed_lwps): Likewise.
2319 * record-full.c (record_full_exec_insn): Likewise.
2320 (record_full_wait_1): Likewise.
2321 * regcache.c (get_regcache_aspace): Remove.
2322 * regcache.h (get_regcache_aspace): Remove.
2323
2324 2017-11-02 Yao Qi <yao.qi@linaro.org>
2325
2326 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2327 (init_regcache_descr): Use gdbarch_num_regs.
2328 (regcache::regcache): Likewise.
2329 (regcache::get_register_status): Likewise.
2330 (regcache::assert_raw_regnum): Likewise.
2331 (regcache::cooked_read): Likewise.
2332 (regcache::cooked_read_value): Likewise.
2333 (regcache::cooked_write): Likewise.
2334 (regcache::dump): Likewise.
2335 (regcache::num_raw_registers): New method.
2336 * regcache.h (class regcache) <num_raw_registers>: New.
2337
2338 2017-11-02 Yao Qi <yao.qi@linaro.org>
2339
2340 * regcache.c (regcache::assert_regnum): New method.
2341 (regcache::invalidate): Call assert_regnum.
2342 (regcache::raw_update): Likewise.
2343 (regcache::raw_write): Likewise.
2344 (regcache::raw_read_part): Likewise.
2345 (regcache::raw_write_part): Likewise.
2346 (regcache::raw_supply): Likewise.
2347 (regcache::raw_supply_integer): Likewise.
2348 (regcache::raw_supply_zeroed): Likewise.
2349 (regcache::raw_collect): Likewise.
2350 (regcache::raw_collect_integer): Likewise.
2351 * regcache.h (regcache::assert_regnum): Declare.
2352
2353 2017-11-02 Yao Qi <yao.qi@linaro.org>
2354
2355 * regcache.c (regcache::dump): Remove code.
2356
2357 2017-11-02 Yao Qi <yao.qi@linaro.org>
2358
2359 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2360 Remove.
2361 <sizeof_cooked_register_status>: Remove.
2362 (init_regcache_descr): Update.
2363 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2364 (regcache::save): Likewise.
2365 (regcache::dump): Likewise.
2366
2367 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2368
2369 * ft32-tdep.c (ft32_fetch_instruction): New function.
2370 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2371
2372 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2373
2374 * cli/cli-script.c (execute_control_command): Rename to ...
2375 (execute_control_command_1): ... this.
2376 (execute_control_command): New function.
2377
2378 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2379
2380 * tracepoint.c (tfind_command): Remove const_cast.
2381
2382 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2383
2384 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2385
2386 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2387
2388 * common/common-utils.h (in_inclusive_range): New function.
2389 * arm-tdep.c (arm_record_extension_space): Use
2390 in_inclusive_range.
2391 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2392 * cris-tdep.c (cris_spec_reg_applicable): Use
2393 in_inclusive_range.
2394
2395 2017-10-30 Pedro Alves <palves@redhat.com>
2396 Simon Marchi <simon.marchi@ericsson.com>
2397
2398 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2399 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2400
2401 2017-10-30 Pedro Alves <palves@redhat.com>
2402
2403 * common/common-utils.c (string_appendf, string_vappendf): New
2404 functions.
2405 * common/common-utils.h (string_appendf, string_vappendf): New
2406 declarations.
2407 * unittests/common-utils-selftests.c (string_appendf_func)
2408 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2409 (string_vappendf_tests): New functions.
2410 (_initialize_common_utils_selftests): Register "string_appendf" and
2411 "string_vappendf tests".
2412
2413 2017-10-30 Pedro Alves <palves@redhat.com>
2414
2415 * unittests/common-utils-selftests.c (format_func): New typedef.
2416 (string_printf_tests, string_vprintf_tests): Tests factored out
2417 and merged to ...
2418 (test_format_func): ... this new function.
2419 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2420 test_format_func.
2421
2422 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2423
2424 * darwin-nat.c: Remove include of gdb.h.
2425
2426 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2427
2428 * xtensa-xtregs.c: Fix formatting issues.
2429
2430 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2431
2432 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2433
2434 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2435
2436 PR python/21213
2437 * python/py-infthread.c (thpy_get_inferior): Increment reference
2438 of inferior before returning it.
2439
2440 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2441
2442 * unittests/common-utils-selftests.c (format): Add
2443 ATTRIBUTE_PRINTF.
2444
2445 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2446
2447 * xml-syscall.c (struct syscall_desc): Add constructor.
2448 <name>: Change type to std::string.
2449 (syscall_desc_up): New typedef.
2450 (syscall_desc_p): Remove typeder.
2451 (DEF_VEC_P(syscall_desc_p)): Remove.
2452 (struct syscall_group_desc): Add constructor.
2453 <name>: Change type to std::string.
2454 <syscalls>: Change type to std::vector.
2455 (syscall_group_desc_up): New typedef.
2456 (syscall_group_desc_p): Remove typedef.
2457 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2458 (struct syscalls_info) <syscalls>: Change type to std::vector of
2459 unique_ptr.
2460 <groups>: Likewise.
2461 <my_gdb_datadir>: Change type to std::string.
2462 (syscalls_info_up): New typedef.
2463 (allocate_syscalls_info): Remove.
2464 (syscalls_info_free_syscalls_desc): Remove.
2465 (syscalls_info_free_syscall_group_desc): Remove.
2466 (free_syscalls_info): Remove.
2467 (make_cleanup_free_syscalls_info): Remove.
2468 (syscall_group_create_syscall_group_desc): Adjust.
2469 (syscall_group_add_syscall): Adjust.
2470 (syscall_create_syscall_desc): Adjust.
2471 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2472 (init_syscalls_info): Adjust.
2473 (syscall_group_get_group_by_name): Adjust.
2474 (xml_get_syscall_number): Adjust.
2475 (xml_get_syscall_name): Adjust.
2476 (xml_list_of_syscalls): Adjust.
2477 (xml_list_syscalls_by_group): Adjust.
2478 (xml_list_of_groups): Adjust.
2479
2480 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2481
2482 * probe.h: Don't include gdb_vecs.h.
2483 (DEF_VEC_P (probe_p)): Remove.
2484 (find_probes_in_objfile): Return an std::vector.
2485 * probe.c (find_probes_in_objfile): Likewise.
2486 * breakpoint.c (breakpoint_objfile_data)
2487 <longjmp_probes>: Change type to std::vector.
2488 <exception_probes>: Likewise.
2489 (free_breakpoint_probes): Don't manually free vectors.
2490 (create_longjmp_master_breakpoint): Adjust.
2491 (create_exception_master_breakpoint): Adjust.
2492 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2493 parameter type, adjust.
2494 (svr4_create_solib_event_breakpoints): Adjust.
2495
2496 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2497
2498 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2499 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2500 with new.
2501 (free_breakpoint_probes): Rename to ...
2502 (free_breakpoint_objfile_data): ... this, and call delete on
2503 bp_objfile_data..
2504
2505 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2506
2507 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2508 (loaded_script_ptr): Remove typedef.
2509 (DEF_VEC_P (loaded_script_ptr)): Remove.
2510 (struct collect_matching_scripts_data): Add constructor.
2511 <scripts_p>: Change type to (pointer to) std::vector.
2512 (collect_matching_scripts_data): Adjust.
2513 (sort_scripts_by_name): Make suitable for std::sort.
2514 (print_scripts): Don't sort vector, adjust to std::vector.
2515 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2516
2517 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2518
2519 * symfile.c (filename_language): Make struct, not typedef. Add
2520 constructor.
2521 <ext>: Change type to std::string.
2522 (DEF_VEC_O (filename_language)): Remove.
2523 (filename_language_table): Change type to std::vector.
2524 (add_filename_language): Adjust.
2525 (set_ext_lang_command): Adjust.
2526 (info_ext_lang_command): Adjust.
2527 (deduce_language_from_filename): Adjust.
2528 (class scoped_restore_filename_language_table): Remove.
2529 (test_filename_language): Use scoped_restore.
2530 (test_set_ext_lang_command): Use scoped_restore, adjust to
2531 std::vector change.
2532
2533 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2534
2535 * symfile.c: Include selftest.h.
2536 (class scoped_restore_filename_language_table): New.
2537 (test_filename_language): New test.
2538 (test_set_ext_lang_command): New test.
2539 (_initialize_symfile): Register tests.
2540
2541 2017-10-27 Keith Seitz <keiths@redhat.com>
2542
2543 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2544 in the bp_location, falling back to find_pc_sect_function when
2545 needed.
2546 (add_location_to_breakpoint): Save sal->symbol.
2547 * breakpoint.h (struct bp_location) <symbol>: New field.
2548 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2549 * symtab.h (struct symtab_and_line) <symbol>: New field.
2550
2551 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2552
2553 PR gdb/13669
2554 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2555 to rewind obstack.
2556
2557 2017-10-26 Pedro Alves <palves@redhat.com>
2558
2559 * remote.c (remote_async_terminal_ours_p): Delete.
2560 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2561 Remove references to 'remote_async_terminal_ours_p'.
2562
2563 2017-10-26 Yao Qi <yao.qi@linaro.org>
2564
2565 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2566
2567 2017-10-26 Yao Qi <yao.qi@linaro.org>
2568
2569 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2570 aspace const.
2571 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2572 Likewise.
2573 * breakpoint.c (bpstat_check_location): Remove cast.
2574 (breakpoint_hit_catch_fork): Make aspce const.
2575 (breakpoint_hit_catch_solib): Likewise.
2576 (breakpoint_hit_catch_exec): Likewise.
2577 (breakpoint_hit_ranged_breakpoint): Likewise.
2578 (breakpoint_hit_watchpoint): Likewise.
2579 (base_breakpoint_breakpoint_hit): Likewise.
2580 (bkpt_breakpoint_hit): Likewise.
2581 (dprintf_breakpoint_hit): Likewise.
2582 (tracepoint_breakpoint_hit): Likewise.
2583 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2584
2585 2017-10-26 Yao Qi <yao.qi@linaro.org>
2586
2587 * breakpoint.c (breakpoint_location_address_match): Change
2588 "struct address_space *" to "const address_space".
2589 (breakpoint_location_address_range_overlap): Likewise.
2590 (breakpoint_here_p): Likewise.
2591 (breakpoint_in_range_p): Likewise.
2592 (moribund_breakpoint_here_p): Likewise.
2593 (bp_location_inserted_here_p): Likewise.
2594 (software_breakpoint_inserted_here_p): Likewise.
2595 (hardware_breakpoint_inserted_here_p): Likewise.
2596 (hardware_watchpoint_inserted_in_range): Likewise.
2597 (bpstat_check_location): Likewise.
2598 (bpstat_stop_status): Likewise.
2599 (breakpoint_address_match): Likewise.
2600 (breakpoint_address_match_range): Likewise.
2601 (breakpoint_location_address_match): Likewise.
2602 (breakpoint_location_address_range_overlap): Likewise.
2603 (insert_single_step_breakpoint): Likewise.
2604 (breakpoint_has_location_inserted_here): Likewise.
2605 (single_step_breakpoint_inserted_here_p): Likewise.
2606 (pc_at_non_inline_function): Likewise.
2607 * breakpoint.h (bpstat_stop_status): Update declaration.
2608 (breakpoint_here_p): Likewise.
2609 (breakpoint_in_range_p): Likewise.
2610 (moribund_breakpoint_here_p): Likewise.
2611 (breakpoint_inserted_here_p): Likewise.
2612 (software_breakpoint_inserted_here_p): Likewise.
2613 (hardware_breakpoint_inserted_here_p): Likewise.
2614 (breakpoint_has_location_inserted_here): Likewise.
2615 (single_step_breakpoint_inserted_here_p): Likewise.
2616 (hardware_watchpoint_inserted_in_range): Likewise.
2617 (breakpoint_address_match): Likewise.
2618 (insert_single_step_breakpoint): Likewise.
2619 (pc_at_non_inline_function): Likewise.
2620 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2621 * record.c (record_check_stopped_by_breakpoint): Likewise.
2622 * record.h (record_check_stopped_by_breakpoint): Likewise.
2623 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2624
2625 2017-10-25 Yao Qi <yao.qi@linaro.org>
2626
2627 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2628 regcache->arch () instead get_regcache_arch.
2629 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2630 Likewise.
2631 (aarch64_fbsd_store_inferior_registers): Likewise.
2632 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2633 (store_gregs_to_thread): Likewise.
2634 (fetch_fpregs_from_thread): Likewise.
2635 (store_fpregs_to_thread): Likewise.
2636 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2637 (aarch64_store_return_value): Likewise.
2638 (aarch64_software_single_step): Likewise.
2639 * aix-thread.c (aix_thread_wait): Likewise.
2640 (supply_reg32): Likewise.
2641 (supply_sprs64): Likewise.
2642 (supply_sprs32): Likewise.
2643 (fill_gprs64): Likewise.
2644 (fill_gprs32): Likewise.
2645 (fill_sprs64): Likewise.
2646 (fill_sprs32): Likewise.
2647 (store_regs_user_thread): Likewise.
2648 (store_regs_kernel_thread): Likewise.
2649 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2650 (alphabsd_store_inferior_registers): Likewise.
2651 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2652 (alpha_store_return_value): Likewise.
2653 (alpha_deal_with_atomic_sequence): Likewise.
2654 (alpha_next_pc): Likewise.
2655 (alpha_software_single_step): Likewise.
2656 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2657 (amd64bsd_store_inferior_registers): Likewise.
2658 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2659 Likewise.
2660 (amd64_linux_store_inferior_registers): Likewise.
2661 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2662 (amd64_collect_native_gregset): Likewise.
2663 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2664 (amd64obsd_collect_uthread): Likewise.
2665 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2666 (amd64_collect_fpregset): Likewise.
2667 (amd64_supply_fxsave): Likewise.
2668 (amd64_supply_xsave): Likewise.
2669 (amd64_collect_fxsave): Likewise.
2670 (amd64_collect_xsave): Likewise.
2671 * arc-tdep.c (arc_write_pc): Likewise.
2672 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2673 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2674 (arm_fbsd_store_inferior_registers): Likewise.
2675 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2676 (store_vfp_regs): Likewise.
2677 (arm_linux_fetch_inferior_registers): Likewise.
2678 (arm_linux_store_inferior_registers): Likewise.
2679 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2680 (arm_linux_sigreturn_next_pc): Likewise.
2681 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2682 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2683 (fetch_register): Likewise.
2684 (store_register): Likewise.
2685 * arm-tdep.c (arm_is_thumb): Likewise.
2686 (displaced_in_arm_mode): Likewise.
2687 (bx_write_pc): Likewise.
2688 (arm_get_next_pcs_addr_bits_remove): Likewise.
2689 (arm_software_single_step): Likewise.
2690 (arm_extract_return_value): Likewise.
2691 (arm_store_return_value): Likewise.
2692 (arm_write_pc): Likewise.
2693 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2694 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2695 (bsd_uthread_store_registers): Likewise.
2696 * core-regset.c (fetch_core_registers): Likewise.
2697 * corelow.c (get_core_registers): Likewise.
2698 * cris-tdep.c (cris_store_return_value): Likewise.
2699 (cris_extract_return_value): Likewise.
2700 (find_step_target): Likewise.
2701 (find_step_target): Likewise.
2702 (cris_software_single_step): Likewise.
2703 * ctf.c (ctf_fetch_registers): Likewise.
2704 * darwin-nat.c (cancel_breakpoint): Likewise.
2705 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2706 * frv-tdep.c (frv_extract_return_value): Likewise.
2707 * ft32-tdep.c (ft32_store_return_value): Likewise.
2708 (ft32_extract_return_value): Likewise.
2709 * go32-nat.c (fetch_register): Likewise.
2710 (go32_fetch_registers): Likewise.
2711 (go32_store_registers): Likewise.
2712 (store_register): Likewise.
2713 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2714 (h8300_store_return_value): Likewise.
2715 * hppa-linux-nat.c (fetch_register): Likewise.
2716 (store_register): Likewise.
2717 (hppa_linux_fetch_inferior_registers): Likewise.
2718 (hppa_linux_store_inferior_registers): Likewise.
2719 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2720 (i386_darwin_store_inferior_registers): Likewise.
2721 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2722 (gnu_store_registers): Likewise.
2723 * i386-linux-nat.c (fetch_register): Likewise.
2724 (store_register): Likewise.
2725 (supply_gregset): Likewise.
2726 (fill_gregset): Likewise.
2727 (i386_linux_fetch_inferior_registers): Likewise.
2728 (i386_linux_store_inferior_registers): Likewise.
2729 (i386_linux_resume): Likewise.
2730 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2731 Likewise.
2732 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2733 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2734 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2735 (i386obsd_collect_uthread): Likewise.
2736 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2737 (i386_supply_gregset): Likewise.
2738 (i386_collect_gregset): Likewise.
2739 (i386_supply_fpregset): Likewise.
2740 (i386_collect_fpregset): Likewise.
2741 (i386_mpx_bd_base): Likewise.
2742 * i386-v4-nat.c (supply_fpregset): Likewise.
2743 (fill_fpregset): Likewise.
2744 * i387-tdep.c (i387_supply_fsave): Likewise.
2745 (i387_collect_fsave): Likewise.
2746 (i387_supply_fxsave): Likewise.
2747 (i387_collect_fxsave): Likewise.
2748 (i387_supply_xsave): Likewise.
2749 (i387_collect_xsave): Likewise.
2750 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2751 (ia64_linux_store_registers): Likewise.
2752 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2753 (ia64_extract_return_value): Likewise.
2754 (ia64_store_return_value): Likewise.
2755 (find_func_descr): Likewise.
2756 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2757 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2758 (inf_ptrace_store_registers): Likewise.
2759 * infrun.c (use_displaced_stepping): Likewise.
2760 (displaced_step_prepare_throw): Likewise.
2761 (resume): Likewise.
2762 (proceed): Likewise.
2763 (do_target_wait): Likewise.
2764 (adjust_pc_after_break): Likewise.
2765 (handle_inferior_event_1): Likewise.
2766 (handle_signal_stop): Likewise.
2767 (save_infcall_suspend_state): Likewise.
2768 (restore_infcall_suspend_state): Likewise.
2769 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2770 * jit.c (jit_frame_prev_register): Likewise.
2771 * linux-nat.c (save_stop_reason): Likewise.
2772 (linux_nat_wait_1): Likewise.
2773 (resume_stopped_resumed_lwps): Likewise.
2774 * linux-record.c (record_linux_sockaddr): Likewise.
2775 (record_linux_msghdr): Likewise.
2776 (record_linux_system_call): Likewise.
2777 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2778 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2779 (lm32_store_return_value): Likewise.
2780 * m32c-tdep.c (m32c_read_flg): Likewise.
2781 (m32c_pseudo_register_read): Likewise.
2782 (m32c_pseudo_register_write): Likewise.
2783 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2784 (m32r_linux_collect_gregset): Likewise.
2785 * m32r-tdep.c (m32r_store_return_value): Likewise.
2786 (m32r_extract_return_value): Likewise.
2787 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2788 (m68kbsd_collect_fpregset): Likewise.
2789 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2790 * m68k-linux-nat.c (fetch_register): Likewise.
2791 (old_fetch_inferior_registers): Likewise.
2792 (old_store_inferior_registers): Likewise.
2793 (store_regs): Likewise.
2794 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2795 (m68k_svr4_store_return_value): Likewise.
2796 * m88k-tdep.c (m88k_store_arguments): Likewise.
2797 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2798 (mi_cmd_data_write_register_values): Likewise.
2799 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2800 (mips_fbsd_store_inferior_registers): Likewise.
2801 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2802 (mips_fbsd_supply_gregs): Likewise.
2803 (mips_fbsd_collect_fpregs): Likewise.
2804 (mips_fbsd_collect_gregs): Likewise.
2805 (mips_fbsd_supply_fpregset): Likewise.
2806 (mips_fbsd_collect_fpregset): Likewise.
2807 (mips_fbsd_supply_gregset): Likewise.
2808 (mips_fbsd_collect_gregset): Likewise.
2809 * mips-linux-nat.c (supply_gregset): Likewise.
2810 (fill_gregset): Likewise.
2811 (supply_fpregset): Likewise.
2812 (fill_fpregset): Likewise.
2813 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2814 (mips_fill_gregset): Likewise.
2815 (mips_supply_fpregset): Likewise.
2816 (mips_fill_fpregset): Likewise.
2817 (mips64_supply_gregset): Likewise.
2818 (micromips_linux_sigframe_validate): Likewise.
2819 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2820 (mipsnbsd_fetch_inferior_registers): Likewise.
2821 (mipsnbsd_store_inferior_registers): Likewise.
2822 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2823 (mipsnbsd_supply_gregset): Likewise.
2824 (mipsnbsd_iterate_over_regset_sections): Likewise.
2825 (mipsnbsd_supply_reg): Likewise.
2826 (mipsnbsd_supply_fpreg): Likewise.
2827 * mips-tdep.c (mips_in_frame_stub): Likewise.
2828 (mips_dummy_id): Likewise.
2829 (is_octeon_bbit_op): Likewise.
2830 (micromips_bc1_pc): Likewise.
2831 (extended_mips16_next_pc): Likewise.
2832 (mips16_next_pc): Likewise.
2833 (deal_with_atomic_sequence): Likewise.
2834 * moxie-tdep.c (moxie_process_readu): Likewise.
2835 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2836 * nto-procfs.c (procfs_store_registers): Likewise.
2837 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2838 (ppcfbsd_store_inferior_registers): Likewise.
2839 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2840 (fetch_altivec_register): Likewise.
2841 (get_spe_registers): Likewise.
2842 (fetch_spe_register): Likewise.
2843 (fetch_altivec_registers): Likewise.
2844 (fetch_all_gp_regs): Likewise.
2845 (fetch_all_fp_regs): Likewise.
2846 (store_vsx_register): Likewise.
2847 (store_altivec_register): Likewise.
2848 (set_spe_registers): Likewise.
2849 (store_spe_register): Likewise.
2850 (store_altivec_registers): Likewise.
2851 (store_all_gp_regs): Likewise.
2852 (store_all_fp_regs): Likewise.
2853 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2854 (ppc_linux_collect_gregset): Likewise.
2855 (ppc_canonicalize_syscall): Likewise.
2856 (ppc_linux_record_signal): Likewise.
2857 (ppu2spu_prev_register): Likewise.
2858 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2859 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2860 (ppcobsd_store_registers): Likewise.
2861 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2862 Likewise.
2863 (ppc_ravenscar_generic_store_registers): Likewise.
2864 * procfs.c (procfs_fetch_registers): Likewise.
2865 (procfs_store_registers): Likewise.
2866 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2867 (ravenscar_store_registers): Likewise.
2868 (ravenscar_prepare_to_store): Likewise.
2869 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2870 * record-full.c (record_full_wait_1): Likewise.
2871 (record_full_registers_change): Likewise.
2872 (record_full_store_registers): Likewise.
2873 (record_full_core_fetch_registers): Likewise.
2874 (record_full_save): Likewise.
2875 (record_full_goto_insn): Likewise.
2876 * regcache.c (regcache_register_size): Likewise.
2877 (get_regcache_arch): Remove.
2878 (regcache_read_pc): Likewise.
2879 * regcache.h (get_regcache_arch): Remove.
2880 * remote-sim.c (gdbsim_fetch_register): Likewise.
2881 (gdbsim_store_register): Likewise.
2882 * remote.c (fetch_register_using_p): Likewise.
2883 (send_g_packet): Likewise.
2884 (remote_prepare_to_store): Likewise.
2885 (store_registers_using_G): Likewise.
2886 * reverse.c (save_bookmark_command): Likewise.
2887 (goto_bookmark_command): Likewise.
2888 * rs6000-aix-tdep.c (branch_dest): Likewise.
2889 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2890 (fetch_register): Likewise.
2891 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2892 (ppc_collect_reg): Likewise.
2893 (ppc_collect_gregset): Likewise.
2894 (ppc_collect_fpregset): Likewise.
2895 (ppc_collect_vsxregset): Likewise.
2896 (ppc_collect_vrregset): Likewise.
2897 (ppc_displaced_step_hw_singlestep): Likewise.
2898 (rs6000_pseudo_register_read): Likewise.
2899 (rs6000_pseudo_register_write): Likewise.
2900 * s390-linux-nat.c (supply_gregset): Likewise.
2901 (fill_gregset): Likewise.
2902 (s390_linux_fetch_inferior_registers): Likewise.
2903 * s390-linux-tdep.c (s390_write_pc): Likewise.
2904 (s390_software_single_step): Likewise.
2905 (s390_all_but_pc_registers_record): Likewise.
2906 (s390_linux_syscall_record): Likewise.
2907 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2908 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2909 (shnbsd_store_inferior_registers): Likewise.
2910 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2911 (sh_extract_return_value_fpu): Likewise.
2912 (sh_store_return_value_nofpu): Likewise.
2913 (sh_corefile_supply_regset): Likewise.
2914 (sh_corefile_collect_regset): Likewise.
2915 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2916 (sh64_store_return_value): Likewise.
2917 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2918 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2919 (sparc_store_inferior_registers): Likewise.
2920 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2921 (sparc_ravenscar_prepare_to_store): Likewise.
2922 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2923 (sparc_analyze_control_transfer): Likewise.
2924 (sparc_step_trap): Likewise.
2925 (sparc_software_single_step): Likewise.
2926 (sparc32_gdbarch_init): Likewise.
2927 (sparc_supply_rwindow): Likewise.
2928 (sparc_collect_rwindow): Likewise.
2929 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2930 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2931 (sparc64nbsd_collect_gregset): Likewise.
2932 (sparc64nbsd_supply_fpregset): Likewise.
2933 (sparc64nbsd_collect_fpregset): Likewise.
2934 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2935 (sparc64_supply_gregset): Likewise.
2936 (sparc64_collect_gregset): Likewise.
2937 (sparc64_supply_fpregset): Likewise.
2938 (sparc64_collect_fpregset): Likewise.
2939 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2940 * spu-tdep.c (spu_unwind_sp): Likewise.
2941 (spu2ppu_prev_register): Likewise.
2942 (spu_memory_remove_breakpoint): Likewise.
2943 * stack.c (return_command): Likewise.
2944 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2945 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2946 * tracefile.c (trace_save_ctf): Likewise.
2947 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2948 (do_windows_store_inferior_registers): Likewise.
2949 (windows_resume): Likewise.
2950 * xtensa-linux-nat.c (fill_gregset): Likewise.
2951 (supply_gregset_reg): Likewise.
2952 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2953 (xtensa_register_read_masked): Likewise.
2954 (xtensa_supply_gregset): Likewise.
2955 (xtensa_extract_return_value): Likewise.
2956 (xtensa_store_return_value): Likewise.
2957
2958 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2959
2960 * doublest.c (floatformat_from_string): New function.
2961 * doublest.h (floatformat_from_string): Add prototype.
2962
2963 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2964 (OP_FLOAT): ... this.
2965 * expression.h: Do not include "doublest.h".
2966 (union exp_element): Replace doubleconst and decfloatconst by
2967 new element floatconst.
2968 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2969 (ada_evaluate_subexp): Likewise.
2970 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2971 OP_DOUBLE and OP_DECFLOAT.
2972 * expprint.c (print_subexp_standard): Likewise.
2973 (dump_subexp_body_standard): Likewise.
2974 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2975
2976 * parse.c: Include "dfp.h".
2977 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2978 (write_exp_elt_floatcst): New function.
2979 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2980 and OP_DECFLOAT.
2981 (operator_check_standard): Likewise.
2982 (parse_float): Do not accept suffix. Take type as input. Return bool.
2983 Return target format buffer instead of host DOUBLEST.
2984 Use floatformat_from_string and decimal_from_string to parse
2985 either binary or decimal floating-point types.
2986 (parse_c_float): Remove.
2987 * parser-defs.h: Do not include "doublest.h".
2988 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2989 (write_exp_elt_floatcst): Add prototype.
2990 (parse_float): Update prototype.
2991 (parse_c_float): Remove.
2992
2993 * c-exp.y: Do not include "dfp.h".
2994 (typed_val_float): Use byte buffer instead of DOUBLEST.
2995 (typed_val_decfloat): Remove.
2996 (DECFLOAT): Remove.
2997 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2998 (parse_number): Update to new parse_float interface.
2999 Parse suffixes and determine type before calling parse_float.
3000 Handle decimal and binary FP types the same way.
3001
3002 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3003 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3004 (parse_number): Update to new parse_float interface.
3005 Parse suffixes and determine type before calling parse_float.
3006
3007 * f-exp.y: Replace dval by typed_val_float.
3008 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3009 (parse_number): Use parse_float instead of atof.
3010
3011 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3012 (parse_go_float): Remove.
3013 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3014 (parse_number): Call parse_float instead of parse_go_float.
3015 Parse suffixes and determine type before calling parse_float.
3016
3017 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3018 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3019 (parse_number): Update to new parse_float interface.
3020 Parse suffixes and determine type before calling parse_float.
3021
3022 * m2-exp.y: Replace dval by byte buffer val.
3023 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3024 (parse_number): Call parse_float instead of atof.
3025
3026 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3027 (lex_number): Call parse_float instead of strtod.
3028 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3029 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3030 Use write_exp_elt_floatcst.
3031 (unit_testing): Remove static variable.
3032 (rust_type): Do not check unit_testing.
3033 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3034
3035 * ada-exp.y (type_float, type_double): Remove.
3036 (typed_val_float): Use byte buffer instead of DOUBLEST.
3037 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3038 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3039
3040 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3041
3042 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3043 * arch/aarch64.h: New file.
3044
3045 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3046
3047 * dfp.h (decimal_from_string): Use const reference for argument.
3048 * dfp.c (decimal_from_string): Likewise.
3049
3050 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3051
3052 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3053 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3054 * mips-tdep.c (mips_print_fp_register): Likewise.
3055
3056 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3057
3058 * common/format.h (enum argclass): Replace decfloat_arg by
3059 dec32float_arg, dec64float_arg, and dec128float_arg.
3060 * common/format.c (parse_format_string): Update to return
3061 new decimal float argument classes.
3062
3063 * printcmd.c (printf_decfloat): Rename to ...
3064 (printf_floating): ... this. Add argclass argument, and use it
3065 instead of parsing the format string again. Add support for
3066 binary floating-point values, using floatformat_to_string.
3067 Convert value to the target format if it doesn't already match.
3068 (ui_printf): Call printf_floating instead of printf_decfloat,
3069 also for double_arg / long_double_arg. Pass argclass.
3070
3071 * dfp.c (decimal_to_string): Add format string argument.
3072 * dfp.h (decimal_to_string): Likewise.
3073
3074 * doublest.c (floatformat_to_string): Add format string argument.
3075 * doublest.h (floatformat_to_string): Likewise.
3076
3077 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3078
3079 * doublest.c (floatformat_precision): New routine.
3080 (floatformat_to_string): Likewise.
3081 * doublest.c (floatformat_to_string): Add prototype.
3082
3083 * printcmd.c (print_scalar_formatted): Only call print_floating
3084 on floating-point types.
3085 * valprint.c: Do not include "floatformat.h".
3086 (generic_val_print_decfloat): Remove.
3087 (generic_val_print): Call generic_val_print_float for both
3088 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3089 (print_floating): Use floatformat_to_string. Handle decimal float.
3090 (print_decimal_floating): Remove, merge into floatformat_to_string.
3091 * value.h (print_decimal_floating): Remove.
3092
3093 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3094
3095 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3096
3097 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3098
3099 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3100
3101 * memattr.h: Don't include vec.h.
3102 (struct mem_attrib): Initialize fields.
3103 <unknown>: New static method.
3104 (struct mem_region): Add constructors, operator<, initialize
3105 fields.
3106 * memattr.c: Include algorithm.
3107 (default_mem_attrib, unknown_mem_attrib): Remove.
3108 (user_mem_region_list): New global.
3109 (target_mem_region_list, mem_region_list): Change type to
3110 std::vector<mem_region>.
3111 (mem_use_target): Now a function.
3112 (target_mem_regions_valid): Change type to bool.
3113 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3114 (require_user_regions): Adjust.
3115 (require_target_regions): Adjust.
3116 (create_mem_region): Adjust.
3117 (lookup_mem_region): Adjust.
3118 (invalidate_target_mem_regions): Adjust.
3119 (mem_clear): Rename to...
3120 (user_mem_clear): ... this, and adjust.
3121 (mem_command): Adjust.
3122 (info_mem_command): Adjust.
3123 (mem_enable, enable_mem_command, mem_disable,
3124 disable_mem_command): Adjust.
3125 (mem_delete): Adjust.
3126 (delete_mem_command): Adjust.
3127 * memory-map.h (parse_memory_map): Return an std::vector.
3128 * memory-map.c (parse_memory_map): Likewise.
3129 (struct memory_map_parsing_data): Add constructor.
3130 <memory_map>: Point to std::vector.
3131 (memory_map_start_memory): Adjust.
3132 (memory_map_end_memory): Adjust.
3133 (memory_map_end_property): Adjust.
3134 (clear_result): Remove.
3135 * remote.c (remote_memory_map): Return an std::vector.
3136 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3137 Remove.
3138 (target_debug_print_mem_region_vector): New.
3139 * target-delegates.c: Regenerate.
3140 * target.h (mem_region_vector): New typedef.
3141 (to_memory_map): Return mem_region_vector.
3142 (target_memory_map): Return an std::vector.
3143 * target.c (target_memory_map): Return an std::vector.
3144 (flash_erase_command): Adjust.
3145
3146 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3147
3148 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3149 Change type to std::string.
3150 (memory_map_start_property): Adjust.
3151 (memory_map_end_property): Adjust.
3152
3153 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3154
3155 * infrun.h: Include common/byte-vector.h.
3156 (struct displaced_step_closure): New struct.
3157 (struct buf_displaced_step_closure): New struct.
3158 * infrun.c (displaced_step_closure::~displaced_step_closure):
3159 Provide default implementation.
3160 (displaced_step_clear): Deallocate step closure with delete.
3161 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3162 (aarch64_displaced_step_closure): ... this, extend
3163 displaced_step_closure.
3164 (aarch64_displaced_step_data) <dsc>: Change type to
3165 aarch64_displaced_step_closure.
3166 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3167 unique_ptr.
3168 (aarch64_displaced_step_fixup): Add cast for displaced step
3169 closure.
3170 * amd64-tdep.c (displaced_step_closure): Rename to ...
3171 (amd64_displaced_step_closure): ... this, extend
3172 displaced_step_closure.
3173 <insn_buf>: Change type to std::vector<gdb_byte>.
3174 <max_len>: Remove.
3175 (fixup_riprel): Change type of DSC parameter, adjust to type
3176 change of insn_buf.
3177 (fixup_displaced_copy): Change type of DSC parameter.
3178 (amd64_displaced_step_copy_insn): Instantiate
3179 amd64_displaced_step_closure.
3180 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3181 to type change of insn_buf.
3182 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3183 parameter DSC.
3184 (arm_linux_copy_svc): Likewise.
3185 (cleanup_kernel_helper_return): Likewise.
3186 (arm_catch_kernel_helper_return): Likewise.
3187 (arm_linux_displaced_step_copy_insn): Instantiate
3188 arm_displaced_step_closure.
3189 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3190 (displaced_read_reg): Change type of parameter DSC.
3191 (branch_write_pc): Likewise.
3192 (load_write_pc): Likewise.
3193 (alu_write_pc): Likewise.
3194 (displaced_write_reg): Likewise.
3195 (arm_copy_unmodified): Likewise.
3196 (thumb_copy_unmodified_32bit): Likewise.
3197 (thumb_copy_unmodified_16bit): Likewise.
3198 (cleanup_preload): Likewise.
3199 (install_preload): Likewise.
3200 (arm_copy_preload): Likewise.
3201 (thumb2_copy_preload): Likewise.
3202 (install_preload_reg): Likewise.
3203 (arm_copy_preload_reg): Likewise.
3204 (cleanup_copro_load_store): Likewise.
3205 (install_copro_load_store): Likewise.
3206 (arm_copy_copro_load_store) Likewise.
3207 (thumb2_copy_copro_load_store): Likewise.
3208 (cleanup_branch): Likewise.
3209 (install_b_bl_blx): Likewise.
3210 (arm_copy_b_bl_blx): Likewise.
3211 (thumb2_copy_b_bl_blx): Likewise.
3212 (thumb_copy_b): Likewise.
3213 (install_bx_blx_reg): Likewise.
3214 (arm_copy_bx_blx_reg): Likewise.
3215 (thumb_copy_bx_blx_reg): Likewise.
3216 (cleanup_alu_imm): Likewise.
3217 (arm_copy_alu_imm): Likewise.
3218 (thumb2_copy_alu_imm): Likewise.
3219 (cleanup_alu_reg): Likewise.
3220 (install_alu_reg): Likewise.
3221 (arm_copy_alu_reg): Likewise.
3222 (thumb_copy_alu_reg): Likewise.
3223 (cleanup_alu_shifted_reg): Likewise.
3224 (install_alu_shifted_reg): Likewise.
3225 (arm_copy_alu_shifted_reg): Likewise.
3226 (cleanup_load): Likewise.
3227 (cleanup_store): Likewise.
3228 (arm_copy_extra_ld_st): Likewise.
3229 (install_load_store): Likewise.
3230 (thumb2_copy_load_literal): Likewise.
3231 (thumb2_copy_load_reg_imm): Likewise.
3232 (arm_copy_ldr_str_ldrb_strb): Likewise.
3233 (cleanup_block_load_all): Likewise.
3234 (cleanup_block_store_pc): Likewise.
3235 (cleanup_block_load_pc): Likewise.
3236 (arm_copy_block_xfer): Likewise.
3237 (thumb2_copy_block_xfer): Likewise.
3238 (cleanup_svc): Likewise.
3239 (install_svc): Likewise.
3240 (arm_copy_svc): Likewise.
3241 (thumb_copy_svc): Likewise.
3242 (arm_copy_undef): Likewise.
3243 (thumb_32bit_copy_undef): Likewise.
3244 (arm_copy_unpred): Likewise.
3245 (arm_decode_misc_memhint_neon): Likewise.
3246 (arm_decode_unconditional): Likewise.
3247 (arm_decode_miscellaneous): Likewise.
3248 (arm_decode_dp_misc): Likewise.
3249 (arm_decode_ld_st_word_ubyte): Likewise.
3250 (arm_decode_media): Likewise.
3251 (arm_decode_b_bl_ldmstm): Likewise.
3252 (arm_decode_ext_reg_ld_st): Likewise.
3253 (thumb2_decode_dp_shift_reg): Likewise.
3254 (thumb2_decode_ext_reg_ld_st): Likewise.
3255 (arm_decode_svc_copro): Likewise.
3256 (thumb2_decode_svc_copro): Likewise.
3257 (install_pc_relative): Likewise.
3258 (thumb_copy_pc_relative_16bit): Likewise.
3259 (thumb_decode_pc_relative_16bit): Likewise.
3260 (thumb_copy_pc_relative_32bit): Likewise.
3261 (thumb_copy_16bit_ldr_literal): Likewise.
3262 (thumb_copy_cbnz_cbz): Likewise.
3263 (thumb2_copy_table_branch): Likewise.
3264 (cleanup_pop_pc_16bit_all): Likewise.
3265 (thumb_copy_pop_pc_16bit): Likewise.
3266 (thumb_process_displaced_16bit_insn): Likewise.
3267 (decode_thumb_32bit_ld_mem_hints): Likewise.
3268 (thumb_process_displaced_32bit_insn): Likewise.
3269 (thumb_process_displaced_insn): Likewise.
3270 (arm_process_displaced_insn): Likewise.
3271 (arm_displaced_init_closure): Likewise.
3272 (arm_displaced_step_fixup): Add cast for closure.
3273 * arm-tdep.h: Include infrun.h.
3274 (displaced_step_closure): Rename to ...
3275 (arm_displaced_step_closure): ... this, extend
3276 displaced_step_closure.
3277 <u::svc::copy_svc_os>: Change type of parameter DSC.
3278 <cleanup>: Likewise.
3279 (arm_process_displaced_insn): Likewise.
3280 (arm_displaced_init_closure): Likewise.
3281 (displaced_read_reg): Likewise.
3282 (displaced_write_reg): Likewise.
3283 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3284 Adjust.
3285 * i386-tdep.h: Include infrun.h.
3286 (i386_displaced_step_closure): New typedef.
3287 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3288 i386_displaced_step_closure.
3289 (i386_displaced_step_fixup): Adjust.
3290 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3291 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3292 and unique_ptr.
3293 (ppc_displaced_step_fixup): Adjust.
3294 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3295 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3296 and unique_ptr.
3297 (s390_displaced_step_fixup): Adjust.
3298
3299 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3300
3301 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3302 Remove declarations.
3303
3304 2017-10-20 Tom Tromey <tom@tromey.com>
3305
3306 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3307 std::vector.
3308 (gdb_bfd_record_inclusion): Update.
3309 (bfdp): Remove typedef.
3310
3311 2017-10-20 Tom Tromey <tom@tromey.com>
3312
3313 * gdb_bfd.c (gdb_bfd_ref): Use new.
3314 (struct gdb_bfd_data): Add constructor, destructor, and member
3315 initializers.
3316 (gdb_bfd_unref): Use delete.
3317
3318 2017-10-20 Tom Tromey <tom@tromey.com>
3319
3320 * exec.c (exec_file_attach): Use new_bfd_ref.
3321 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3322 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3323 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3324 new_bfd_ref.
3325 * gdb_bfd.h (new_bfd_ref): New function.
3326
3327 2017-10-20 Pedro Alves <palves@redhat.com>
3328
3329 * main.c (captured_command_loop): Add attribute noinline.
3330
3331 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3332
3333 * interps.c (struct interp_factory): Add constructor.
3334 (interp_factory_p): Remove typedef.
3335 (DEF_VEC_P(interp_factory_p)): Remove.
3336 (interpreter_factories): Change type to std::vector.
3337 (interp_factory_register): Adjust.
3338 (interp_lookup): Adjust.
3339 (interpreter_completer): Adjust.
3340
3341 2017-10-19 Tom Tromey <tom@tromey.com>
3342
3343 * break-catch-syscall.c (catch_syscall_completer): Use
3344 std::string, gdb::unique_xmalloc_ptr.
3345
3346 2017-10-19 Tom Tromey <tom@tromey.com>
3347
3348 * infcall.c (call_function_by_hand_dummy): Use std::string.
3349
3350 2017-10-19 Tom Tromey <tom@tromey.com>
3351
3352 * mi/mi-main.c (mi_cmd_execute): Update.
3353 * top.h (prepare_execute_command): Return scoped_value_mark.
3354 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3355 Add move constructor.
3356 * top.c (prepare_execute_command): Return scoped_value_mark.
3357 (execute_command): Update.
3358
3359 2017-10-19 Pedro Alves <palves@redhat.com>
3360
3361 * xml-support.c (xml_fetch_content_from_file): Check fread's
3362 return.
3363
3364 2017-10-19 Pedro Alves <palves@redhat.com>
3365
3366 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3367 async.
3368 (handle_error_fd): New function.
3369 (ser_base_async): Add/delete an event loop file handler for
3370 error_fd.
3371
3372 2017-10-19 Pedro Alves <palves@redhat.com>
3373
3374 * xml-support.c (xml_fetch_content_from_file): Don't read in
3375 chunks. Instead use fseek to determine the file's size, and read
3376 it in one go.
3377
3378 2017-11-18 Keith Seitz <keiths@redhat.com>
3379
3380 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3381 types.
3382 Add whitespace to front of type name.
3383
3384 2017-10-18 Keith Seitz <keiths@redhat.com>
3385
3386 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3387 DW_AT_accessibility.
3388
3389 2017-10-18 Yao Qi <yao.qi@linaro.org>
3390
3391 * features/tic6x-c62x-linux.c: Remove.
3392
3393 2017-10-17 Tom Tromey <tom@tromey.com>
3394
3395 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3396 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3397 (do_mixed_source_and_assembly): Likewise.
3398
3399 2017-10-17 Tom Tromey <tom@tromey.com>
3400
3401 * regcache.c (regcache::xfer_part): Remove assertion.
3402
3403 2017-10-17 Pedro Alves <palves@redhat.com>
3404
3405 * xml-support.c (xml_fetch_content_from_file): Call
3406 unique_ptr::release() instead unique_ptr::get() when passing
3407 through xrealloc.
3408
3409 2017-10-17 Yao Qi <yao.qi@linaro.org>
3410
3411 * regcache.c (regcache::xfer_part): Remove parameters read and
3412 write, add parameter is_raw. All callers are updated.
3413
3414 2017-10-16 Keith Seitz <keiths@redhat.com>
3415
3416 * c-typeprint.c (enum access_specifier): Moved here from
3417 c_type_print_base.
3418 (output_access_specifier): New function.
3419 (c_type_print_base): Consider typedefs when assessing
3420 whether access labels are needed.
3421 Use output_access_specifier as needed.
3422 Output access specifier for typedefs, if needed.
3423 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3424 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3425 fields.
3426 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3427 accessor macros.
3428
3429 2017-10-16 Tom Tromey <tom@tromey.com>
3430
3431 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3432 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3433 * target.c (target_fileio_read_stralloc): Update.
3434 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3435 * target.h (target_fileio_read_stralloc): Return
3436 unique_xmalloc_ptr.
3437
3438 2017-10-16 Tom Tromey <tom@tromey.com>
3439
3440 * xml-syscall.c (xml_init_syscalls_info): Update.
3441 * xml-support.c (xinclude_start_include): Update.
3442 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3443 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3444 (xml_fetch_content_from_file): Likewise.
3445 * osdata.c (get_osdata): Update.
3446 * target.h (target_read_stralloc, target_get_osdata): Return
3447 unique_xmalloc_ptr.
3448 * solib-aix.c (solib_aix_get_library_list): Update.
3449 * solib-target.c (solib_target_current_sos): Update.
3450 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3451 * xml-tdesc.c (fetch_available_features_from_target): Update.
3452 (target_fetch_description_xml): Update.
3453 (file_read_description_xml): Update.
3454 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3455 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3456 (remote_pid_to_exec_file): Update.
3457 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3458 (target_get_osdata): Likewise.
3459
3460 2017-10-16 Tom Tromey <tom@tromey.com>
3461
3462 * remote.c (remote_register_number_and_offset): Use std::vector.
3463 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3464 (putpkt_binary): Use gdb::def_vector.
3465 (compare_sections_command): Use gdb::byte_vector.
3466
3467 2017-10-16 Tom Tromey <tom@tromey.com>
3468
3469 * ppc-linux-nat.c (hwdebug_insert_point): Use
3470 gdb::unique_xmalloc_ptr, XDUP.
3471
3472 2017-10-16 Tom Tromey <tom@tromey.com>
3473
3474 * probe.c (parse_probes): Use std::string.
3475 (info_probes_for_ops, enable_probes_command)
3476 (disable_probes_command): Remove cleanups.
3477
3478 2017-10-16 Tom Tromey <tom@tromey.com>
3479
3480 * buildsym.c (block_compar): Remove.
3481 (end_symtab_get_static_block): Use std::vector.
3482
3483 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3484
3485 * memrange.h (struct mem_range): Define operator< and operator==.
3486 (mem_range_s): Remove.
3487 (DEF_VEC_O (mem_range_s)): Remove.
3488 (normalize_mem_ranges): Change parameter type to std::vector.
3489 * memrange.c (compare_mem_ranges): Remove.
3490 (normalize_mem_ranges): Change parameter type to std::vector,
3491 adjust to vector change.
3492 * exec.c (section_table_available_memory): Return vector, remove
3493 parameter.
3494 (section_table_read_available_memory): Adjust to std::vector
3495 change.
3496 * remote.c (remote_read_bytes): Adjust to std::vector
3497 change.
3498 * tracepoint.h (traceframe_available_memory): Change parameter
3499 type to std::vector.
3500 * tracepoint.c (traceframe_available_memory): Change parameter
3501 type to std::vector, adjust.
3502 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3503 std::vector change.
3504 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3505 unittests/memrange-selftests.c.
3506 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3507 * gdb/unittests/memrange-selftests.c: New file.
3508
3509 2017-10-16 Pedro Alves <palves@redhat.com>
3510
3511 * elfread.c (probe_key_free): Rename range-for variable.
3512 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3513 (find_probe_by_pc, collect_probes): Rename range-for variable.
3514
3515 2017-10-16 Yao Qi <yao.qi@linaro.org>
3516
3517 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3518 * features/tic6x-c62x.c: Remove.
3519 * features/tic6x-c64x-linux.c: Remove.
3520 * features/tic6x-c64x.c: Remove.
3521 * features/tic6x-c64xp-linux.c: Remove.
3522 * features/tic6x-c64xp.c: Remove.
3523 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3524 initialize_tdesc_tic6x_*_linux functions.
3525 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3526 initialize_tdesc_tic6x_* functions.
3527
3528 2017-10-16 Yao Qi <yao.qi@linaro.org>
3529
3530 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3531 tic6x-c62x.
3532 * regformats/tic6x-c62x.dat: Remove.
3533 * regformats/tic6x-c64x.dat: Remove.
3534 * regformats/tic6x-c64xp.dat: Remove.
3535
3536 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3537
3538 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3539 (the !HAVE_LIBEXPAT version).
3540
3541 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3542
3543 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3544 const.
3545
3546 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3547
3548 * target.h: Include tracepoint.h.
3549 (enum trace_find_type): Move to tracepoint.h.
3550 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3551 * tracepoint.h: Don't include target.h
3552 (enum trace_find_type): Move from target.h.
3553 (parse_traceframe_info): Return a unique ptr.
3554 * tracepoint.c (current_traceframe_info): Change type to unique
3555 ptr.
3556 (free_traceframe_info): Remove.
3557 (clear_traceframe_info): Don't manually free
3558 current_traceframe_info.
3559 (free_result): Remove.
3560 (parse_traceframe_info): Return a unique ptr.
3561 (get_traceframe_info): Adjust to unique ptr.
3562 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3563 * remote.c (remote_traceframe_info): Return a unique ptr.
3564 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3565 ptr.
3566 * target-debug.h (target_debug_print_traceframe_info_up): New
3567 macro.
3568 * target-delegates.c: Regenerate.
3569
3570 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3571
3572 * memrange.h (struct mem_range): Add constructors.
3573 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3574 std::vector<mem_range>.
3575 * tracepoint.c (free_traceframe_info): Don't manually free
3576 vector.
3577 (traceframe_info_start_memory): Adjust to vector change.
3578 (traceframe_available_memory): Likewise.
3579 * tracefile-tfile.c (build_traceframe_info): Likewise.
3580 * ctf.c (ctf_traceframe_info): Likewise.
3581
3582 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3583
3584 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3585 std::vector<int>.
3586 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3587 (traceframe_info_start_tvar): Adjust to vector change.
3588 (parse_traceframe_info): Allocate with new.
3589 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3590 vector change.
3591 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3592 change.
3593 tfile_traceframe_info): Allocate with new.
3594 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3595 change.
3596
3597 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3598
3599 * tracepoint.c (traceframe_info): Rename to...
3600 (current_traceframe_info): ...this.
3601 (clear_traceframe_info): Adjust.
3602 (get_traceframe_info): Adjust.
3603
3604 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3605
3606 * nat/linux-osdata.c: Include algorithm.
3607 (compare_processes): Remove.
3608 (struct pid_pgid_entry): New struct.
3609 (linux_xfer_osdata_processgroups): Use std::vector instead of
3610 XNEWVEC.
3611
3612 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3613
3614 * objfiles.h: Don't include symfile.h.
3615 (struct partial_symbol): Remove forward-declaration.
3616 (struct objfile) <global_psymbols, static_psymbols>: Change type
3617 to std::vector<partial_symbol *>.
3618 * objfiles.c (objfile::objfile): Don't memset those fields.
3619 (objfile::~objfile): Don't free those fields.
3620 * psympriv.h (struct psymbol_allocation_list): Remove
3621 forward-declaration.
3622 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3623 to std::vector.
3624 (start_psymtab_common): Change parameters to std::vector.
3625 * psymtab.c: Include algorithm.
3626 (require_partial_symbols): Call shrink_to_fit.
3627 (find_pc_sect_psymbol): Adjust to vector change.
3628 (match_partial_symbol): Likewise.
3629 (lookup_partial_symbol): Likewise.
3630 (psym_relocate): Likewise.
3631 (dump_psymtab): Likewise.
3632 (recursively_search_psymtabs): Likewise.
3633 (compare_psymbols): Remove.
3634 (sort_pst_symbols): Adjust to vector change.
3635 (start_psymtab_common): Likewise.
3636 (end_psymtab_common): Likewise.
3637 (psymbol_bcache_full): De-constify return value.
3638 (add_psymbol_to_bcache): Likewise.
3639 (extend_psymbol_list): Remove.
3640 (append_psymbol_to_list): Adjust to vector change.
3641 (add_psymbol_to_list): Likewise.
3642 (init_psymbol_list): Likewise.
3643 (maintenance_info_psymtabs): Likewise.
3644 (maintenance_check_psymtabs): Likewise.
3645 * symfile.h (struct psymbol_allocation_list): Remove.
3646 * symfile.c (reread_symbols): Adjust to vector change.
3647 * dbxread.c (start_psymtab): Change type of parameters.
3648 (dbx_symfile_read): Adjust to vector change.
3649 (read_dbx_symtab): Likewise.
3650 (start_psymtab): Change type of parameters.
3651 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3652 (create_partial_symtab): Likewise.
3653 (add_partial_symbol): Likewise.
3654 (write_one_signatured_type): Likewise.
3655 (recursively_write_psymbols): Likewise.
3656 * mdebugread.c (parse_partial_symbols): Likewise.
3657 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3658 (scan_xcoff_symtab): Adjust to vector change.
3659 (xcoff_initial_scan): Likewise.
3660
3661 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3662
3663 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3664
3665 2017-10-13 Yao Qi <yao.qi@linaro.org>
3666
3667 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3668 Remove s390x-*-expedite, add s390x-expedite.
3669
3670 2017-10-13 Yao Qi <yao.qi@linaro.org>
3671
3672 * features/s390-gs-linux64.c: Regenerated.
3673 * features/s390x-gs-linux64.c: Regenerated.
3674
3675 2017-10-13 Tom Tromey <tom@tromey.com>
3676
3677 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3678 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3679 delete.
3680 * symfile.c (symbol_file_add_with_addrs): Use new.
3681 (symbol_file_add_separate): Update comment.
3682 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3683 * jit.c (jit_object_close_impl): Use new.
3684 (jit_unregister_code): Use delete.
3685 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3686 (~objfile): Rename from free_objfile.
3687 (free_objfile_separate_debug, do_free_objfile_cleanup)
3688 (free_all_objfiles, objfile_purge_solibs): Use delete.
3689 * objfiles.h (struct objfile): Add constructor and destructor.
3690 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3691 (allocate_objfile, free_objfile): Don't declare.
3692 (struct objstats): Add initializers.
3693
3694 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3695
3696 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3697 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3698 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3699 * gdbarch.h: Regenerate.
3700 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3701 Adjust comment.
3702 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3703 (i386_displaced_step_fixup): Adjust comment.
3704 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3705
3706 2017-10-12 Tom Tromey <tom@tromey.com>
3707
3708 * prologue-value.h (pv_area::store_would_trash): Return bool.
3709 (pv_area::find_reg): Likewise.
3710 * prologue-value.c (pv_area::store_would_trash): Return bool.
3711 (pv_area::find_reg): Likewise.
3712
3713 2017-10-12 Tom Tromey <tom@tromey.com>
3714
3715 * s390-linux-tdep.c (s390_store, s390_load)
3716 (s390_check_for_saved, s390_analyze_prologue): Update.
3717 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3718 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3719 * prologue-value.h (class pv_area): Move from prologue-value.c.
3720 Change names of members. Add constructor, destructor, member
3721 functions.
3722 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3723 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3724 (pv_area_fetch, pv_area_scan): Don't declare.
3725 * prologue-value.c (struct pv_area::area_entry): Now member of
3726 pv_area.
3727 (struct pv_area): Move to prologue-value.h.
3728 (pv_area::pv_area): Rename from make_pv_area.
3729 (pv_area::~pv_area): Rename from free_pv_area.
3730 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3731 (clear_entries, find_entry, overlaps, store_would_trash, store)
3732 (fetch, find_reg, scan): Now member of pv_area.
3733 Remove "area" argument. Update.
3734 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3735 Update.
3736 * mn10300-tdep.c (push_reg, check_for_saved)
3737 (mn10300_analyze_prologue): Update.
3738 * mep-tdep.c (is_arg_spill, check_for_saved)
3739 (mep_analyze_prologue): Update.
3740 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3741 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3742 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3743 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3744 Update.
3745 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3746 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3747
3748 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3749
3750 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3751 * linux-nat.c (linux_nat_delete_thread): New variable.
3752 (lwp_free): Invoke linux_nat_delete_thread if set.
3753 (linux_nat_set_delete_thread): New function.
3754 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3755 thread delete callback.
3756 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3757 (_initialize_arm_linux_nat): Assign thread delete callback.
3758 * s390-linux-nat.c (s390_delete_thread): New function.
3759 (_initialize_s390_nat): Assign thread delete callback.
3760 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3761 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3762 function.
3763 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3764 declaration.
3765 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3766 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3767
3768 2017-10-09 Tom Tromey <tom@tromey.com>
3769
3770 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3771 std::string.
3772 * tui/tui-layout.c (enum tui_status): Use std::string.
3773
3774 2017-10-11 Tom Tromey <tom@tromey.com>
3775
3776 * gdbthread.h (thread_command): Constify.
3777 * inferior.h (detach_command): Constify.
3778 * top.h (set_history, show_history): Constify.
3779 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3780 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3781 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3782 * printcmd.c (set_command): Constify.
3783 (non_const_set_command): New function.
3784 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3785 * breakpoint.c (enable_command, disable_command, delete_command)
3786 (catch_command, tcatch_command, set_breakpoint_cmd)
3787 (show_breakpoint_cmd): Constify.
3788 * macrocmd.c (macro_command): Constify.
3789 * infcmd.c (unset_command, kill_command, detach_command)
3790 (info_proc_cmd): Constify.
3791 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3792 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3793 (info_auto_load_cmd): Constify.
3794 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3795 (unset_tdesc_cmd): Constify.
3796 * ada-lang.c (set_ada_command, show_ada_command)
3797 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3798 * guile/guile.c (set_guile_command, show_guile_command)
3799 (info_guile_command): Constify.
3800 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3801 Constify.
3802 * skip.c (skip_command): Constify.
3803 * compile/compile.c (_initialize_compile): Constify.
3804 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3805 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3806 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3807 (maint_btrace_pt_show_cmd): Constify.
3808 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3809 Constify.
3810 * python/python.c (user_show_python, user_set_python): Constify.
3811 * mips-tdep.c (set_mips_command, show_mips_command)
3812 (set_mipsfpu_command): Constify.
3813 * record-btrace.c (cmd_record_btrace_start)
3814 (cmd_set_record_btrace, cmd_show_record_btrace)
3815 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3816 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3817 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3818 Constify.
3819 * symfile.c (overlay_command): Constify.
3820 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3821 * cli/cli-logging.c (set_logging_command, show_logging_command):
3822 Constify.
3823 * cli/cli-dump.c (dump_command, append_command)
3824 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3825 (tekhex_dump_command, binary_dump_command)
3826 (binary_append_command): Constify.
3827 * cli/cli-decode.c (struct cmd_list_element): Change type of
3828 "fun".
3829 * cli/cli-cmds.c (info_command, show_command, set_debug)
3830 (show_debug): Constify.
3831 (show_command): Add non-const overload.
3832 * top.c (set_history, show_history): Constify.
3833 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3834 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3835 * target.c (target_command): Constify.
3836 * sparc64-tdep.c (info_adi_command): Constify.
3837 * record-full.c (cmd_record_full_start): Constify.
3838 (set_record_full_command): Constify. Fix typo.
3839 (show_record_full_command): Constify.
3840 * thread.c (thread_command, thread_apply_command): Constify.
3841 * memattr.c (dummy_cmd): Constify.
3842 * value.c (function_command): Constify.
3843 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3844 * probe.c (info_probes_command): Constify.
3845 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3846 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3847 (show_thread_cmd, set_thread_default_cmd)
3848 (show_thread_default_cmd): Constify.
3849 (check_empty): Constify.
3850 * tracepoint.c (tfind_command): Constify.
3851 * cp-support.c (maint_cplus_command): Constify.
3852 * windows-tdep.c (info_w32_command): Constify.
3853 * record.c (cmd_record_start, set_record_command)
3854 (show_record_command, info_record_command, cmd_record_goto):
3855 Constify.
3856 * ravenscar-thread.c (set_ravenscar_command)
3857 (show_ravenscar_command): Constify.
3858 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3859 Constify.
3860 (add_internal_problem_command): Remove casts.
3861 * arc-tdep.c (maintenance_print_arc_command): Constify.
3862 * valprint.c (set_print, show_print, set_print_raw)
3863 (show_print_raw): Constify.
3864 * maint.c (maintenance_command, maintenance_info_command)
3865 (maintenance_print_command, maintenance_set_cmd)
3866 (maintenance_show_cmd, set_per_command_cmd)
3867 (show_per_command_cmd, maintenance_check_command): Constify.
3868 * language.c (set_check, show_check): Constify.
3869 * typeprint.c (show_print_type, set_print_type): Constify.
3870 * go32-nat.c (go32_info_dos_command): Constify.
3871
3872 2017-10-11 Tom Tromey <tom@tromey.com>
3873
3874 * breakpoint.c (prepare_re_set_context): Remove.
3875 (breakpoint_re_set_one): Update. Don't use cleanups.
3876 (breakpoint_re_set): Use scoped_restore, std::string, and
3877 scoped_restore_current_language.
3878
3879 2017-10-11 Tom Tromey <tom@tromey.com>
3880
3881 * breakpoint.c (commands_command_1): Use std::string.
3882 (cleanup_executing_breakpoints): Remove.
3883 (bpstat_do_actions_1): Use scoped_restore.
3884 (bpstat_check_watchpoint): Use std::string.
3885 (decode_static_tracepoint_spec): Likewise.
3886 (break_range_command): Likewise.
3887 (watch_command_1): Likewise.
3888 (compare_breakpoints): Change argument types.
3889 (clear_command): Use std::vector.
3890 (cleanup_executing_breakpoints): Remove.
3891 (update_global_location_list): Use unique_xmalloc_ptr.
3892 (strace_command): Remove unused declaration.
3893
3894 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3895
3896 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3897 * NEWS: Mention new FreeBSD/arm native configuration.
3898 * configure.host: Add arm*-*-freebsd*.
3899 * configure.nat: Likewise.
3900 * arm-fbsd-nat.c: New file.
3901
3902 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3903
3904 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3905 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3906 * NEWS: Mention new FreeBSD/arm target.
3907 * configure.tgt: Add arm*-*-freebsd*.
3908 * arm-fbsd-tdep.c: New file.
3909 * arm-fbsd-tdep.h: New file.
3910
3911 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3912
3913 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3914 `gdbarch_elfcore_write_linux_prpsinfo'.
3915 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3916 method.
3917 (elf_internal_linux_prpsinfo): Remove declaration.
3918 * gdbarch.h: Regenerate.
3919 * gdbarch.c: Regenerate.
3920
3921 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3922
3923 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3924 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3925
3926 2017-10-11 Pedro Alves <palves@redhat.com>
3927
3928 * breakpoint.c (reattach_breakpoints): Delete.
3929 * breakpoint.h (reattach_breakpoints): Delete.
3930
3931 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3932
3933 * symfile.c (registered_sym_fns): Make struct, not typedef.
3934 (DEF_VEC_O (registered_sym_fns)): Remove.
3935 (symtab_fns): Change type to std::vector.
3936 (add_symtab_fns): Adjust.
3937 (find_sym_fns): Adjust.
3938
3939 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3940
3941 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3942 * arc-tdep.h (arc_arch_is_em): New function.
3943 (arc_arch_is_hs): Likewise.
3944
3945 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3946
3947 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3948 parentheses in the declaration.
3949 (macro_lookup_inclusion): Likewise.
3950 (macro_lookup_definition): Likewise.
3951 * p-lang.h (pascal_builtin_types): Likewise.
3952 * tui/tui-data.c (tui_win_list): Likewise.
3953 * tui/tui-data.h (tui_win_list): Likewise.
3954 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3955
3956 2017-10-11 Mark Rages <markrages@gmail.com>
3957
3958 * target-memory.c (block_boundaries): Fix for block address not
3959 aligned on block size.
3960
3961 2017-10-10 Pedro Alves <palves@redhat.com>
3962 Tom Tromey <tom@tromey.com>
3963
3964 * breakpoint.c (struct captured_breakpoint_query_args)
3965 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3966 (print_breakpoint): New.
3967 * breakpoint.h (print_breakpoint): Declare.
3968 * common/common-exceptions.h (enum return_reason): Remove
3969 references to catch_exceptions.
3970 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3971 Delete.
3972 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3973 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3974 * gdb.h: Delete.
3975 * gdbthread.h (thread_select): Declare.
3976 * mi/mi-cmd-break.c: Don't include gdb.h.
3977 (breakpoint_notify): Use print_breakpoint.
3978 * mi/mi-cmd-catch.c: Don't include gdb.h.
3979 * mi/mi-interp.c: Don't include gdb.h.
3980 (mi_print_breakpoint_for_event): New.
3981 (mi_breakpoint_created, mi_breakpoint_modified): Use
3982 mi_print_breakpoint_for_event.
3983 * mi/mi-main.c: Don't include gdb.h.
3984 (mi_cmd_thread_select): Parse the global thread ID here. Use
3985 thread_select instead of gdb_thread_select.
3986 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3987 of using gdb_list_thread_ids.
3988 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3989 FILEIO_ENOSYS here.
3990 (remote_fileio_request): Use TRY/CATCH instead of
3991 catch_exceptions.
3992 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3993 (symbol_file_add_from_memory_wrapper): Delete.
3994 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3995 * thread.c: Don't include gdb.h.
3996 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3997 (thread_alive): Use thread_select.
3998 (do_captured_thread_select): Delete, parts salvaged as ...
3999 (thread_select): ... this new function.
4000 (gdb_thread_select): Delete.
4001
4002 2017-10-10 Pedro Alves <palves@redhat.com>
4003 Tom Tromey <tom@tromey.com>
4004
4005 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4006 and reverse logic.
4007 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4008 No longer macros. Instead ...
4009 (enum wp_check_result): They're now values of this new
4010 enumeration.
4011 (watchpoint_check): Change return type to wp_check_result and
4012 parameter type to bpstat.
4013 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4014 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4015 catch_errors. Reverse logic of watchpoint_check call.
4016 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4017 pointer as parameter.
4018 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4019 * common/common-exceptions.c (throw_exception_sjlj): Update
4020 comments to avoid mentioning catch_errors.
4021 * exceptions.c (catch_errors): Delete.
4022 * exceptions.h: Update comments to avoid mentioning catch_errors.
4023 (catch_errors_ftype, catch_errors): Delete.
4024 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4025 (hook_stop_stub): Delete.
4026 (restore_selected_frame): Change return type to void, and
4027 parameter type to const frame_id &.
4028 (restore_infcall_control_state): Use TRY/CATCH instead of
4029 catch_errors.
4030 * main.c (captured_command_loop): Return void and remove
4031 parameter. Remove references to catch_errors.
4032 (captured_main): Use TRY/CATCH instead of catch_errors.
4033 * objc-lang.c (objc_submethod_helper_data)
4034 (find_objc_msgcall_submethod_helper): Delete.
4035 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4036 catch_errors.
4037 * record-full.c (record_full_message): Return void.
4038 (record_full_message_args, record_full_message_wrapper): Delete.
4039 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4040 instead of catch_errors.
4041 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4042 parameter type to int.
4043 * solib-darwin.c (open_symbol_file_object): Ditto.
4044 * solib-dsbt.c (open_symbol_file_object): Ditto.
4045 * solib-frv.c (open_symbol_file_object): Ditto.
4046 * solib-svr4.c (open_symbol_file_object): Ditto.
4047 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4048 * solib.c (update_solib_list): Use TRY/CATCH instead of
4049 catch_errors.
4050 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4051 Change type.
4052 * symmisc.c (struct print_symbol_args): Remove.
4053 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4054 (print_symbol): Change type.
4055 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4056 and remove parameters.
4057 (catch_errors): New.
4058 (get_windows_debug_event): Adjust.
4059
4060 2017-10-09 Tom Tromey <tom@tromey.com>
4061
4062 * mi/mi-main.c (free_splay_tree): Remove.
4063 (list_available_thread_groups): Use splay_tree_up.
4064 * common/gdb_splay_tree.h: New file.
4065
4066 2017-10-09 Tom Tromey <tom@tromey.com>
4067
4068 * mi/mi-main.c (do_nothing): Remove.
4069 (list_available_thread_groups): Update.
4070
4071 2017-10-09 Pedro Alves <palves@redhat.com>
4072
4073 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4074 reading registers when switching context.
4075
4076 2017-10-09 John Baldwin <jhb@FreeBSD.org>
4077
4078 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4079 (fbsd_convert_siginfo): Likewise.
4080 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4081
4082 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4083
4084 * configure.ac (try_guile_versions): Remove guile-2.2.
4085 * configure: Regenerate.
4086
4087 2017-10-09 Tom Tromey <tom@tromey.com>
4088
4089 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4090 (COMPILE.pre): Use $(CXX).
4091
4092 2017-10-09 Pedro Alves <palves@redhat.com>
4093
4094 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4095 Use bool.
4096 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4097 * cp-support.h (cp_remove_params): Now returns a
4098 gdb::unique_xmalloc_ptr.
4099 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4100 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4101 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4102 returning a gdb::unique_xmalloc_ptr.
4103 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4104 * stack.c (find_frame_funname): Adjust to cp_remove_params
4105 returning a gdb::unique_xmalloc_ptr.
4106
4107 2017-10-08 Tom Tromey <tom@tromey.com>
4108
4109 * dwarf2read.c (dwarf2_get_dwz_file): Use
4110 gdb::unique_xmalloc_ptr.
4111 (find_slot_in_mapped_hash): Likewise.
4112 (dwarf2_physname): Likewise.
4113 (create_dwo_unit_in_dwp_v1): Use std::string.
4114 (create_dwo_unit_in_dwp_v2): Likewise.
4115 (lookup_dwo_cutu): Likewise.
4116 (inherit_abstract_dies): Use std::vector.
4117 (read_array_type): Likewise.
4118 (dwarf_decode_macros): Remove unused declaration.
4119 (unsigned_int_compar): Remove.
4120 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4121 (psymtabs_addrmap_cleanup): Remove.
4122
4123 2017-10-08 Tom Tromey <tom@tromey.com>
4124
4125 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4126 * frame.h (frame_cleanup_after_sniffer): Declare.
4127 (frame_prepare_for_sniffer): Return void.
4128 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4129 type of argument.
4130 (frame_prepare_for_sniffer): Return void.
4131
4132 2017-10-08 Tom Tromey <tom@tromey.com>
4133
4134 * utils.h (make_cleanup_value_free): Remove.
4135 * utils.c (do_value_free, struct cleanup): Remove.
4136 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4137 Use gdb_value_up.
4138 * value.h (struct value_deleter): New.
4139 (gdb_value_up): New typedef.
4140
4141 2017-10-08 Tom Tromey <tom@tromey.com>
4142
4143 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4144 (make_cleanup_free_search_symbols): Remove.
4145 (search_symbols): Return std::vector.
4146 (symbol_search::compare_search_syms): Now member of
4147 symbol_search. Change arguments.
4148 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4149 (symtab_symbol_info, rbreak_command): Update.
4150 * symtab.h (struct symbol_search) <next>: Remove.
4151 Add constructors.
4152 (symbol_search::operator<): New function.
4153 (symbol_search::operator==): New function.
4154 (search_symbols): Remove std::vector.
4155 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4156 (symbol_search::compare_search_syms): Declare.
4157
4158 2017-10-06 Yao Qi <yao.qi@linaro.org>
4159
4160 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4161 arch/aarch64-insn.o.
4162 Remove one rule.
4163 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4164
4165 2017-10-06 Yao Qi <yao.qi@linaro.org>
4166
4167 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4168 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4169 arch/arm-linux.o respectively.
4170 * configure.tgt: Likewise.
4171
4172 2017-10-06 Yao Qi <yao.qi@linaro.org>
4173
4174 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4175 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4176
4177 2017-10-06 Pedro Alves <palves@redhat.com>
4178
4179 * windows-nat.c: Include <algorithm>.
4180
4181 2017-10-06 Yao Qi <yao.qi@linaro.org>
4182
4183 * configure.tgt (i386_tobjs): New variable.
4184 (amd64_tobjs): New variable.
4185 Set $cpu_obs and $os_obs.
4186
4187 2017-10-06 Yao Qi <yao.qi@linaro.org>
4188
4189 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4190 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4191 (clean): Remove object files and dependency files.
4192 (distclean): Remove the directory.
4193 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4194 * configure: Re-generated.
4195 * configure.tgt: Replace amd64.o with arch/amd64.o.
4196
4197 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4198
4199 PR build/22188
4200 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4201 and SETEND.
4202
4203 2017-10-05 Pedro Alves <palves@redhat.com>
4204
4205 * linux-nat.c (linux_child_follow_fork): When following the parent
4206 and detaching the child, consult the parent thread's architecture
4207 instead of the child's.
4208
4209 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4210
4211 * ax.h: Do not include "doublest.h".
4212 (union agent_val): Remove.
4213
4214 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4215
4216 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4217 (decimal_to_string): Return std::string object.
4218 (decimal_from_string): Accept std::string object. Return bool.
4219 (decimal_from_integral, decimal_from_doublest): Remove.
4220 (decimal_from_longest): Add prototype.
4221 (decimal_from_ulongest): Likewise.
4222 (decimal_to_longest): Likewise.
4223 (decimal_from_doublest): Likewise.
4224 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4225 (MAX_DECIMAL_STRING): Move here.
4226 (decimal_to_string): Return std::string object.
4227 (decimal_from_string): Accept std::string object. Return bool.
4228 (decimal_from_integral): Remove, replace by ...
4229 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4230 (decimal_to_longest): New function.
4231 (decimal_from_floating): Remove, replace by ...
4232 (decimal_from_doublest): ... this new function.
4233 (decimal_to_doublest): Update to new decimal_to_string interface.
4234
4235 * value.c (unpack_long): Use decimal_to_longest.
4236 * valops.c (value_cast): Use decimal_from_doublest instead of
4237 decimal_from_floating. Use decimal_from_[u]longest isntead of
4238 decimal_from_integral.
4239 * valarith.c (value_args_as_decimal): Likewise.
4240 * valprint.c (print_decimal_floating): Update to new
4241 decimal_to_string interface.
4242 * printcmd.c (printf_decfloat): Likewise.
4243 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4244
4245 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4246
4247 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4248 * gdbtypes.c: Include "floatformat.h".
4249 * value.c: Likewise.
4250 * m68k-tdep.c: Likewise.
4251
4252 * findvar.c: Do not include "floatformat.h".
4253 * amd64-darwin-tdep.c: Likewise.
4254 * arm-linux-tdep.c: Likewise.
4255 * i386-darwin-tdep.c: Likewise.
4256 * i387-tdep.c: Likewise.
4257 * m68k-linux-tdep.c: Likewise.
4258 * mep-tdep.c: Likewise.
4259 * mips-tdep.c: Likewise.
4260 * nios2-tdep.c: Likewise.
4261 * s390-linux-tdep.c: Likewise.
4262 * sparc-obsd-tdep.c: Likewise.
4263 * sparc-tdep.c: Likewise.
4264 * sparc64-tdep.c: Likewise.
4265 * spu-tdep.c: Likewise.
4266 * tic6x-tdep.c: Likewise.
4267 * tilegx-tdep.c: Likewise.
4268 * vax-tdep.c: Likewise.
4269 * xstormy16-tdep.c: Likewise.
4270 * xtensa-tdep.c: Likewise.
4271
4272 * top.c: Do not include "doublest.h".
4273 * aarch64-tdep.c: Likewise.
4274 * alpha-tdep.c: Likewise.
4275 * arm-linux-tdep.c: Likewise.
4276 * m68k-linux-tdep.c: Likewise.
4277 * tilegx-tdep.c: Likewise.
4278 * xstormy16-tdep.c: Likewise.
4279
4280 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4281
4282 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4283 (mipsn32_fbsd_sigframe): Define.
4284 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4285 for FreeBSD/mipsn32.
4286
4287 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4288
4289 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4290 AT_HWCAP.
4291
4292 2017-10-05 Tristan Gingold <tgingold@free.fr>
4293
4294 * MAINTAINERS (Misc): Update my email address.
4295
4296 2017-10-04 Pedro Alves <palves@redhat.com>
4297
4298 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4299 it instead of target_gdbarch.
4300 (get_remote_state, get_remote_packet_size): Adjust
4301 get_remote_arch_state calls, passing down target_gdbarch
4302 explicitly.
4303 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4304 'gdbarch' and use it instead of target_gdbarch.
4305 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4306 passing down target_gdbarch explicitly.
4307 (struct stop_reply) <arch>: New field.
4308 (remote_parse_stop_reply): Use the stopped thread's architecture,
4309 not the current inferior's. Save the architecture in the
4310 stop_reply.
4311 (process_stop_reply): Use the stop reply's architecture.
4312 (process_g_packet, remote_fetch_registers)
4313 (remote_prepare_to_store, store_registers_using_G)
4314 (remote_store_registers): Adjust get_remote_arch_state calls,
4315 using the regcache's architecture.
4316 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4317 passing down target_gdbarch explicitly.
4318 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4319 beneath instead of calling target_gdbarch.
4320 * target.c (default_thread_architecture): Use the specified
4321 inferior's architecture, instead of the current inferior's
4322 architecture (via target_gdbarch).
4323
4324 2017-10-04 Pedro Alves <palves@redhat.com>
4325
4326 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4327 case.
4328 (regcache_print): Handle !target_has_registers here instead.
4329
4330 2017-10-04 Pedro Alves <palves@redhat.com>
4331
4332 * frame.c (create_test_frame): Delete.
4333 * frame.h (create_test_frame): Delete.
4334 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4335 (class regcache_test): Delete.
4336 (test_target_has_registers, test_target_has_stack)
4337 (test_target_has_memory, test_target_prepare_to_store)
4338 (test_target_store_registers): New functions.
4339 (test_target_ops): New class.
4340 (register_to_value_test): Error out if there's already a
4341 process_stratum (or higher) target pushed. Create a fuller mock
4342 environment, with mock target_ops, inferior, address space, thread
4343 and inferior_ptid.
4344 * progspace.c (struct address_space): Move to ...
4345 * progspace.h (struct address_space): ... here.
4346 * regcache.h (regcache::~regcache, regcache::raw_write)
4347 [GDB_SELF_TEST]: No longer virtual.
4348
4349 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4350
4351 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4352
4353 2017-10-04 Pedro Alves <palves@redhat.com>
4354
4355 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4356 out of 'between TRY and CATCH'.
4357
4358 2017-10-04 Pedro Alves <palves@redhat.com>
4359
4360 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4361 * common/common-exceptions.h (TRY): Open an outermost scope.
4362 Expand intro comment.
4363 (CATCH): Reindent.
4364 (END_CATCH): Close the outermost scope.
4365 * completer.c (complete_line_internal): Add missing END_CATCH.
4366
4367 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4368
4369 * NEWS (Changes since GDB 8.0): Add entry about new
4370 'set-cwd-on-gdbserver' feature.
4371 (New remote packets): Add entry for QSetWorkingDir.
4372 * common/common-inferior.h (set_inferior_cwd): New prototype.
4373 * infcmd.c (set_inferior_cwd): Remove "static".
4374 (show_cwd_command): Expand text to include remote debugging.
4375 * remote.c: Add PACKET_QSetWorkingDir.
4376 (remote_protocol_features) <QSetWorkingDir>: New entry for
4377 PACKET_QSetWorkingDir.
4378 (extended_remote_set_inferior_cwd): New function.
4379 (extended_remote_create_inferior): Call
4380 "extended_remote_set_inferior_cwd".
4381 (_initialize_remote): Call "add_packet_config_cmd" for
4382 QSetWorkingDir.
4383
4384 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4385
4386 * NEWS (New commands): Mention "set/show cwd".
4387 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4388 "cd" command's help text.
4389 * common/common-inferior.h (get_inferior_cwd): New prototype.
4390 * infcmd.c (inferior_cwd_scratch): New global variable.
4391 (set_inferior_cwd): New function.
4392 (get_inferior_cwd): Likewise.
4393 (set_cwd_command): Likewise.
4394 (show_cwd_command): Likewise.
4395 (_initialize_infcmd): Add "set/show cwd" commands.
4396 * inferior.h (class inferior) <cwd>: New field.
4397 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4398 (fork_inferior): Change inferior's cwd before its execution.
4399 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4400 to CreateProcess.
4401
4402 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4403
4404 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4405 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4406 (COMMON_OBS): Add gdb_tilde_expand.o.
4407 * common/gdb_tilde_expand.c: New file.
4408 * common/gdb_tilde_expand.h: Likewise.
4409
4410 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4411
4412 * gdbarch.sh (objfile): Remove duplicate declaration.
4413 * gdbarch.h: Regenerate.
4414
4415 2017-10-03 Tom Tromey <tom@tromey.com>
4416
4417 * utils.c (internal_vproblem): Use string_vprintf.
4418
4419 2017-10-03 Tom Tromey <tom@tromey.com>
4420
4421 * printcmd.c (info_symbol_command): Use std::string.
4422
4423 2017-10-03 Tom Tromey <tom@tromey.com>
4424
4425 * top.c (gdb_safe_append_history): Use std::string.
4426
4427 2017-10-03 Tom Tromey <tom@tromey.com>
4428
4429 * event-top.c (stdin_event_handler): Update.
4430 * main.c (captured_main_1): Update.
4431 * top.h (make_delete_ui_cleanup): Remove.
4432 (struct ui): Add constructor and destructor.
4433 (new_ui, delete_ui): Remove.
4434 * top.c (make_delete_ui_cleanup): Remove.
4435 (new_ui_command): Use std::unique_ptr.
4436 (delete_ui_cleanup): Remove.
4437 (ui::ui): Rename from new_ui. Update.
4438 (free_ui): Remove.
4439 (ui::~ui): Rename from delete_ui. Update.
4440
4441 2017-10-03 Tom Tromey <tom@tromey.com>
4442
4443 * symfile.c (load_progress): Use gdb::byte_vector.
4444
4445 2017-10-03 Tom Tromey <tom@tromey.com>
4446
4447 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4448 declaration.
4449 * printcmd.c (x_command): Remove unused declaration.
4450 * symfile.c (symbol_file_command): Remove unused declaration.
4451
4452 2017-10-03 Tom Tromey <tom@tromey.com>
4453
4454 * utils.c (internal_vproblem): Use std::string.
4455 (defaulted_query): Likewise.
4456
4457 2017-10-03 Tom Tromey <tom@tromey.com>
4458
4459 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4460 * top.c (execute_command_to_string): Update.
4461 * utils.c (make_cleanup_restore_page_info): Remove.
4462 (do_restore_page_info_cleanup): Remove.
4463 (set_batch_flag_and_restore_page_info):
4464 New.
4465 (make_cleanup_restore_page_info): Remove.
4466 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4467 (~set_batch_flag_and_restore_page_info): New
4468 (make_cleanup_restore_uinteger): Remove.
4469 (make_cleanup_restore_integer): Remove.
4470 (struct restore_integer_closure): Remove.
4471 (restore_integer): Remove.
4472 * utils.h (struct set_batch_flag_and_restore_page_info): New
4473 class.
4474 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4475 (make_cleanup_restore_page_info): Remove.
4476 (make_cleanup_restore_uinteger) Remove.
4477 (make_cleanup_restore_integer) Remove.
4478
4479 2017-10-03 Tom Tromey <tom@tromey.com>
4480
4481 * record-full.h (record_full_gdb_operation_disable_set): Return
4482 scoped_restore_tmpl<int>.
4483 * infrun.c (adjust_pc_after_break): Update.
4484 (handle_signal_stop): Update.
4485 * record-full.c (record_full_gdb_operation_disable_set): Return
4486 scoped_restore_tmpl<int>.
4487 (record_full_wait_1, record_full_insert_breakpoint)
4488 (record_full_remove_breakpoint, record_full_save)
4489 (record_full_goto_insn): Update.
4490
4491 2017-10-02 Tom Tromey <tom@tromey.com>
4492
4493 PR rust/22236:
4494 * rust-lang.c (rust_val_print_str): New function.
4495 (val_print_struct): Call it.
4496 (rust_subscript): Preserve name of slice type.
4497
4498 2017-10-02 Tom Tromey <tom@tromey.com>
4499
4500 * rust-lang.c (rust_subscript): Handle slices in
4501 EVAL_AVOID_SIDE_EFFECTS case.
4502
4503 2017-10-02 Tom Tromey <tom@tromey.com>
4504
4505 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4506
4507 2017-10-02 Tom Tromey <tom@tromey.com>
4508
4509 * rust-lang.h (rust_slice_type): Add "extern".
4510
4511 2017-10-02 Tom Tromey <tom@tromey.com>
4512 Pedro Alves <palves@redhat.com>
4513
4514 * ada-lang.h (ada_exc_info::operator<): Make const.
4515 (ada_exc_info::operator==): Make const.
4516 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4517 Make const.
4518
4519 2017-09-29 Tom Tromey <tom@tromey.com>
4520
4521 * target.c (read_whatever_is_readable): Change type of "result".
4522 Update.
4523 (free_memory_read_result_vector): Remove.
4524 (read_memory_robust): Change return type. Update.
4525 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4526 bin2hex, std::string.
4527 * target.h (memory_read_result_s): Remove typedef.
4528 (free_memory_read_result_vector): Remove.
4529 (read_memory_robust): Return std::vector.
4530
4531 2017-09-29 Tom Tromey <tom@tromey.com>
4532
4533 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4534
4535 2017-09-29 Tom Tromey <tom@tromey.com>
4536
4537 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4538 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4539 operator< and operator==.
4540 (ada_exceptions_list): Return a std::vector.
4541 * ada-lang.c (ada_exc_info::operator<): Rename from
4542 compare_ada_exception_info.
4543 (ada_exc_info::operator==): New.
4544 (sort_remove_dups_ada_exceptions_list): Change type of
4545 "exceptions".
4546 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4547 (ada_add_global_exceptions): Likewise.
4548 (ada_exceptions_list_1): Return a std::vector.
4549 (ada_exceptions_list): Likewise.
4550
4551 2017-09-29 Tom Tromey <tom@tromey.com>
4552
4553 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4554 'std::set *'.
4555 (print_one_inferior): Update.
4556 (free_vector_of_ints): Remove.
4557 (list_available_thread_groups): Change "ids" to std::set.
4558 (mi_cmd_list_thread_groups): Update.
4559 (struct collect_cores_data) <core>: Now a std::set.
4560 (collect_cores): Update.
4561 (unique): Remove.
4562 (print_one_inferior): Update.
4563
4564 2017-09-29 Tom Tromey <tom@tromey.com>
4565
4566 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4567 (mi_execute_async_cli_command): Likewise.
4568 (mi_cmd_trace_frame_collected): Use field_fmt.
4569
4570 2017-09-29 Tom Tromey <tom@tromey.com>
4571
4572 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4573 gdb::byte_vector.
4574
4575 2017-09-29 Tom Tromey <tom@tromey.com>
4576
4577 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4578
4579 2017-09-29 Tom Tromey <tom@tromey.com>
4580
4581 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4582
4583 2017-09-29 Tom Tromey <tom@tromey.com>
4584
4585 * varobj.h (varobj_gen_name): Return std::string.
4586 * varobj.c (varobj_gen_name): Return std::string.
4587 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4588 (mi_cmd_var_delete): Don't copy "name".
4589
4590 2017-09-29 Tom Tromey <tom@tromey.com>
4591
4592 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4593 (mi_cmd_break_insert_1): Update.
4594
4595 2017-09-29 Tom Tromey <tom@tromey.com>
4596
4597 * target.h (make_scoped_defer_target_commit_resume): Update.
4598 * target.c (make_scoped_defer_target_commit_resume): Rename from
4599 make_cleanup_defer_target_commit_resume. Return a
4600 scoped_restore.
4601 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4602
4603 2017-09-29 Tom Tromey <tom@tromey.com>
4604
4605 * main.c (captured_main_1): Remove unused declaration.
4606 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4607
4608 2017-09-29 Tom Tromey <tom@tromey.com>
4609
4610 * symtab.c (search_symbols): Remove unused outer cleanup.
4611 (make_source_files_completion_list): Remove unused declaration.
4612
4613 2017-09-29 Tom Tromey <tom@tromey.com>
4614
4615 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4616
4617 2017-09-29 Tom Tromey <tom@tromey.com>
4618
4619 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4620 gdb::byte_vector.
4621
4622 2017-09-29 Tom Tromey <tom@tromey.com>
4623
4624 * complaints.c (vcomplaint): Use std::string.
4625
4626 2017-09-29 Tom Tromey <tom@tromey.com>
4627
4628 * tracepoint.c (trace_variable_command): Use std::string.
4629 (encode_actions_1): Remove unused declarations.
4630 (create_tsv_from_upload): Use std::string.
4631
4632 2017-09-29 Tom Tromey <tom@tromey.com>
4633
4634 * cp-support.c (gdb_demangle): Use std::string.
4635
4636 2017-09-29 Tom Tromey <tom@tromey.com>
4637
4638 * stack.c (parse_frame_specification): Use std::string
4639 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4640
4641 2017-09-29 Tom Tromey <tom@tromey.com>
4642
4643 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4644
4645 2017-09-29 Tom Tromey <tom@tromey.com>
4646
4647 * utils.c (vfprintf_maybe_filtered): Use std::string.
4648 (vfprintf_unfiltered): Likewise.
4649
4650 2017-09-29 Tom Tromey <tom@tromey.com>
4651
4652 * event-top.c (top_level_prompt): Return std::string.
4653 (display_gdb_prompt): Update.
4654
4655 2017-09-29 Tom Tromey <tom@tromey.com>
4656
4657 * unittests/common-utils-selftests.c (format): New function.
4658 (string_vprintf_tests): New function.
4659 (_initialize_common_utils_selftests): Register new tests.
4660 * common/common-utils.c (string_vprintf): New function.
4661 * common/common-utils.h (string_vprintf): Declare.
4662
4663 2017-09-29 Pedro Alves <palves@redhat.com>
4664
4665 * common/rsp-low.c (unpack_varlen_hex): Constify.
4666 * common/rsp-low.h (unpack_varlen_hex): Constify.
4667 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4668 Constify.
4669 * remote.c (remote_set_permissions, read_ptid)
4670 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4671 (remote_static_tracepoint_marker_at)
4672 (remote_static_tracepoint_markers_by_strid)
4673 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4674 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4675 (parse_tracepoint_definition, parse_tsv_definition)
4676 (parse_static_tracepoint_marker_definition): Constify.
4677 * tracepoint.h (parse_static_tracepoint_marker_definition)
4678 (parse_trace_status, parse_tracepoint_status)
4679 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4680
4681 2017-09-29 Pedro Alves <palves@redhat.com>
4682
4683 * remote.c (target_buf, target_buf_size): Delete.
4684 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4685 Use the connection's packet buffer instead.
4686 All callers adjusted.
4687 (_initialize_remote): Remove references to target_buf and
4688 target_buf_size.
4689
4690 2017-09-28 Pedro Alves <palves@redhat.com>
4691
4692 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4693 unittests/common-utils-selftests.c.
4694 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4695 (COMMON_OBS): Remove utils-selftests.o.
4696 * utils-selftests.c: Move to ...
4697 * unittests/common-utils-selftests.c: ... here and rename self
4698 test to "string_printf".
4699
4700 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4701
4702 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4703 having NULL cus or tus.
4704
4705 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4706
4707 * arm-tdep.c: (convert_from_extended): Remove.
4708 (convert_to_extended): Likewise.
4709 (arm_extract_return_value): Use convert_typed_floating.
4710 (arm_store_return_value): Likewise.
4711
4712 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4713 * sh-tdep.c: Do not include "floatformat.h".
4714 (sh_littlebyte_bigword_type): New function.
4715 (sh_register_convert_to_virtual): Use convert_typed_floating.
4716 (sh_register_convert_to_raw): Likewise.
4717 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4718 (sh64_littlebyte_bigword_type): New function.
4719 (sh64_extract_return_value): Use convert_typed_floating.
4720 (sh64_register_convert_to_virtual): Likewise.
4721 (sh64_register_convert_to_raw): Likewise.
4722
4723 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4724
4725 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4726 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4727
4728 * gdbtypes.h (union type_specific): Make field floatformat hold
4729 just a single struct floatformat, not an array.
4730 (floatformat_from_type): Move here.
4731 * gdbtypes.c (floatformat_from_type): Move here. Update to
4732 changed TYPE_FLOATFORMAT definition.
4733 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4734 (recursive_dump_type): Likewise.
4735 (init_float_type): Install correct floatformat for byte order.
4736 (arch_float_type): Likewise.
4737
4738 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4739
4740 * gdbtypes.c (init_type): Change incoming argument from
4741 length-in-bytes to length-in-bits. Assert length is a
4742 multiple of TARGET_CHAR_BITS.
4743 (arch_type, arch_flags_type): Likewise.
4744 (init_integer_type): Update call to init_type.
4745 (init_character_type): Likewise.
4746 (init_boolean_type): Likewise.
4747 (init_float_type): Likewise.
4748 (init_decfloat_type): Likewise.
4749 (init_complex_type): Likewise.
4750 (init_pointer_type): Likewise.
4751 (objfile_type): Likewise.
4752 (arch_integer_type): Update call to arch_type.
4753 (arch_character_type): Likewise.
4754 (arch_boolean_type): Likewise.
4755 (arch_float_type): Likewise.
4756 (arch_decfloat_type): Likewise.
4757 (arch_complex_type): Likewise.
4758 (arch_pointer_type): Likewise.
4759 (gdbtypes_post_init): Likewise.
4760
4761 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4762 (read_base_type): Likewise.
4763 * mdebugread.c (basic_type): Likewise.
4764 * stabsread.c (dbx_init_float_type): Likewise.
4765 (rs6000_builtin_type): Likewise.
4766 (read_range_type): Likewise. Also, fix call to init_integer_type
4767 with erroneous length argument.
4768
4769 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4770 * d-lang.c (build_d_types): Likewise.
4771 * f-lang.c (build_fortran_types): Likewise.
4772 * go-lang.c (build_go_types): Likewise.
4773 * opencl-lang.c (build_opencl_types): Likewise.
4774 * jit.c (finalize_symtab): Likewise.
4775 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4776 (build_std_type_info_type): Likewise.
4777 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4778 update call to arch_flags_type.
4779
4780 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4781 arch_type.
4782 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4783 * windows-tdep.c (windows_get_tlb_type): Likewise.
4784
4785 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4786 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4787 * m32c-tdep.c (make_types): Likewise.
4788 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4789 (rl78_psw_type): Update call to arch_flags_type.
4790 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4791 * rx-tdep.c (rx_psw_type): Likewise.
4792 (rx_fpsw_type): Likewise.
4793 * sparc-tdep.c (sparc_psr_type): Likewise.
4794 (sparc_fsr_type): Likewise.
4795 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4796 (sparc64_ccr_type): Likewise.
4797 (sparc64_fsr_type): Likewise.
4798 (sparc64_fprs_type): Likewise.
4799
4800 2017-09-27 Tom Tromey <tom@tromey.com>
4801
4802 * findcmd.c (find_command): Constify.
4803
4804 2017-09-27 Tom Tromey <tom@tromey.com>
4805
4806 * ada-tasks.c (task_command_1, task_command): Constify.
4807
4808 2017-09-27 Tom Tromey <tom@tromey.com>
4809
4810 * symtab.c (maintenance_print_symbol_cache)
4811 (maintenance_flush_symbol_cache)
4812 (maintenance_print_symbol_cache_statistics): Constify.
4813
4814 2017-09-27 Tom Tromey <tom@tromey.com>
4815
4816 * inferior.c (detach_inferior_command, kill_inferior_command)
4817 (inferior_command): Constify.
4818
4819 2017-09-27 Tom Tromey <tom@tromey.com>
4820
4821 * regcache.c (regcache_print, maintenance_print_registers)
4822 (maintenance_print_raw_registers)
4823 (maintenance_print_cooked_registers)
4824 (maintenance_print_register_groups)
4825 (maintenance_print_remote_registers): Constify.
4826
4827 2017-09-27 Tom Tromey <tom@tromey.com>
4828
4829 * printcmd.c (map_display_numbers, undisplay_command)
4830 (enable_disable_display_command, enable_display_command)
4831 (disable_display_command): Constify.
4832
4833 2017-09-27 Tom Tromey <tom@tromey.com>
4834
4835 * breakpoint.h (delete_command): Don't declare.
4836 * breakpoint.c (delete_command, enable_once_command)
4837 (enable_count_command, enable_delete_command, breakpoint_1)
4838 (maintenance_info_breakpoints, stopin_command, stopat_command)
4839 (delete_command, delete_trace_command, save_breakpoints)
4840 (save_breakpoints_command, save_tracepoints_command): Constify.
4841
4842 2017-09-27 Tom Tromey <tom@tromey.com>
4843
4844 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4845 (skip_ws, extract_identifier, macro_define_command)
4846 (macro_undef_command, macro_list_command): Constify.
4847
4848 2017-09-27 Tom Tromey <tom@tromey.com>
4849
4850 * infcmd.c (environment_info, set_environment_command)
4851 (unset_environment_command, path_info, info_proc_cmd_1)
4852 (info_proc_cmd_mappings, info_proc_cmd_stat)
4853 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4854 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4855
4856 2017-09-27 Tom Tromey <tom@tromey.com>
4857
4858 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4859 Constify.
4860
4861 2017-09-27 Tom Tromey <tom@tromey.com>
4862
4863 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4864
4865 2017-09-27 Tom Tromey <tom@tromey.com>
4866
4867 * demangle.c (demangle_command): Constify.
4868
4869 2017-09-27 Tom Tromey <tom@tromey.com>
4870
4871 * progspace.c (maintenance_info_program_spaces_command):
4872 Constify.
4873
4874 2017-09-27 Tom Tromey <tom@tromey.com>
4875
4876 * compile/compile.c (check_raw_argument, compile_file_command)
4877 (compile_code_command, compile_print_command): Constify.
4878
4879 2017-09-27 Tom Tromey <tom@tromey.com>
4880
4881 * reggroups.c (maintenance_print_reggroups): Constify.
4882
4883 2017-09-27 Tom Tromey <tom@tromey.com>
4884
4885 * dwarf2read.c (save_gdb_index_command): Constify.
4886
4887 2017-09-27 Tom Tromey <tom@tromey.com>
4888
4889 * stap-probe.c (info_probes_stap_command): Constify.
4890
4891 2017-09-27 Tom Tromey <tom@tromey.com>
4892
4893 * fork-child.c (unset_exec_wrapper_command): Constify.
4894
4895 2017-09-27 Tom Tromey <tom@tromey.com>
4896
4897 * btrace.c (get_uint, get_context_size, no_chunk)
4898 (maint_btrace_packet_history_cmd)
4899 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4900 (maint_info_btrace_cmd): Constify.
4901
4902 2017-09-27 Tom Tromey <tom@tromey.com>
4903
4904 * reverse.c (delete_bookmark_command): Constify.
4905
4906 2017-09-27 Tom Tromey <tom@tromey.com>
4907
4908 * remote.c (set_memory_packet_size)
4909 (set_memory_write_packet_size, show_memory_write_packet_size)
4910 (set_memory_read_packet_size, show_memory_read_packet_size)
4911 (compare_sections_command, packet_command, remote_put_command)
4912 (remote_get_command, remote_delete_command): Constify.
4913
4914 2017-09-27 Tom Tromey <tom@tromey.com>
4915
4916 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4917 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4918 (set_mipsfpu_auto_command): Constify.
4919
4920 2017-09-27 Tom Tromey <tom@tromey.com>
4921
4922 * cli/cli-cmds.h (cd_command): Constify.
4923 * cli/cli-cmds.c (cd_command): Constify.
4924
4925 2017-09-27 Tom Tromey <tom@tromey.com>
4926
4927 * thread.c (thread_name_command, thread_find_command): Constify.
4928
4929 2017-09-27 Tom Tromey <tom@tromey.com>
4930
4931 * probe.c (enable_probes_command, disable_probes_command):
4932 Constify.
4933
4934 2017-09-27 Tom Tromey <tom@tromey.com>
4935
4936 * symfile.c (symbol_file_command): Constify.
4937 * gdbcore.h (deprecated_file_changed_hook): Constify.
4938 * exec.c (deprecated_file_changed_hook, exec_file_command)
4939 (file_command): Constify.
4940 * defs.h (symbol_file_command): Constify.
4941
4942 2017-09-27 Tom Tromey <tom@tromey.com>
4943
4944 * remote-fileio.c (set_system_call_allowed)
4945 (show_system_call_allowed): Constify.
4946
4947 2017-09-27 Tom Tromey <tom@tromey.com>
4948
4949 * tracepoint.c (delete_trace_variable_command)
4950 (tfind_end_command, tfind_start_command, tfind_pc_command)
4951 (tfind_tracepoint_command, tfind_line_command)
4952 (tfind_range_command, tfind_outside_command): Constify.
4953
4954 2017-09-27 Tom Tromey <tom@tromey.com>
4955
4956 * ax-gdb.c (maint_agent_printf_command, agent_command)
4957 (agent_eval_command): Constify.
4958
4959 2017-09-27 Tom Tromey <tom@tromey.com>
4960
4961 * tracepoint.c (info_scope_command): Constify.
4962 * python/python.c (gdbpy_decode_line): Constify.
4963 * python/py-breakpoint.c (bppy_init): Constify.
4964 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4965 * location.h: (new_linespec_location)
4966 (string_to_event_location_basic, string_to_event_location):
4967 Constify.
4968 * location.c (new_linespec_location)
4969 (string_to_event_location_basic, string_to_event_location):
4970 Constify.
4971 * linespec.h (decode_line_with_current_source)
4972 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4973 * linespec.c (linespec_lex_to_end)
4974 (decode_line_with_current_source)
4975 (decode_line_with_last_displayed): Constify.
4976 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4977 Constify.
4978 * cli/cli-cmds.c (edit_command, list_command): Constify.
4979 * breakpoint.h (until_break_command, watch_command_wrapper)
4980 (awatch_command_wrapper, rwatch_command_wrapper)
4981 (init_ada_exception_breakpoint): Constify.
4982 * breakpoint.c (break_command_1, dprintf_command)
4983 (break_range_command, watch_command_wrapper)
4984 (rwatch_command_wrapper, awatch_command_wrapper)
4985 (until_break_command, init_ada_exception_breakpoint)
4986 (strace_marker_create_sals_from_location, trace_command)
4987 (ftrace_command, strace_command, struct tracepoint): Constify.
4988 * ax-gdb.c (agent_command_1): Constify.
4989 * ada-lang.c (ada_exception_sal): Constify.
4990
4991 2017-09-27 Tom Tromey <tom@tromey.com>
4992
4993 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4994 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4995 (get_context_size, no_chunk, get_insn_history_modifiers)
4996 (cmd_record_insn_history, get_call_history_modifiers)
4997 (cmd_record_call_history): Constify.
4998
4999 2017-09-27 Tom Tromey <tom@tromey.com>
5000
5001 * source.c (show_substitute_path_command)
5002 (unset_substitute_path_command, set_substitute_path_command):
5003 Constify.
5004
5005 2017-09-27 Tom Tromey <tom@tromey.com>
5006
5007 * typeprint.c (maintenance_print_type): Constify.
5008 * maint.c (maintenance_dump_me, maintenance_demangle)
5009 (maintenance_time_display, maintenance_info_sections)
5010 (maintenance_print_statistics, maintenance_deprecate)
5011 (maintenance_undeprecate): Constify.
5012 (maintenance_do_deprecate): Constify. Use std::string.
5013 (maintenance_selftest): Constify.
5014 * gdbtypes.h (maintenance_print_type): Constify.
5015
5016 2017-09-27 Tom Tromey <tom@tromey.com>
5017
5018 * hppa-tdep.c (unwind_command): Constify.
5019
5020 2017-09-27 Tom Tromey <tom@tromey.com>
5021
5022 * target-descriptions.c (unset_tdesc_filename_cmd)
5023 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5024 Constify.
5025
5026 2017-09-27 Tom Tromey <tom@tromey.com>
5027
5028 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5029
5030 2017-09-27 Tom Tromey <tom@tromey.com>
5031
5032 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5033
5034 2017-09-27 Tom Tromey <tom@tromey.com>
5035
5036 * tui/tui-regs.c (tui_reg_command): Constify.
5037
5038 2017-09-27 Tom Tromey <tom@tromey.com>
5039
5040 * skip.c (skip_file_command, skip_function_command)
5041 (skip_enable_command, skip_disable_command, skip_delete_command):
5042 Constify.
5043
5044 2017-09-27 Tom Tromey <tom@tromey.com>
5045
5046 * record-btrace.c (cmd_record_btrace_bts_start)
5047 (cmd_record_btrace_pt_start): Constify.
5048
5049 2017-09-27 Tom Tromey <tom@tromey.com>
5050
5051 * symmisc.c (maintenance_print_symbols)
5052 (maintenance_print_msymbols, maintenance_print_objfiles)
5053 (maintenance_info_symtabs, maintenance_check_symtabs)
5054 (maintenance_expand_symtabs, maintenance_info_line_tables):
5055 Constify.
5056
5057 2017-09-27 Tom Tromey <tom@tromey.com>
5058
5059 * top.c (new_ui_command): Constify.
5060
5061 2017-09-27 Tom Tromey <tom@tromey.com>
5062
5063 * symfile.c (add_symbol_file_command)
5064 (remove_symbol_file_command, list_overlays_command)
5065 (map_overlay_command, unmap_overlay_command)
5066 (overlay_auto_command, overlay_manual_command)
5067 (overlay_off_command, overlay_load_command): Constify.
5068
5069 2017-09-27 Tom Tromey <tom@tromey.com>
5070
5071 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5072 (info_spu_mailbox_command, info_spu_dma_command)
5073 (info_spu_proxydma_command): Constify.
5074
5075 2017-09-27 Tom Tromey <tom@tromey.com>
5076
5077 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5078
5079 2017-09-27 Tom Tromey <tom@tromey.com>
5080
5081 * cli/cli-script.c (user_defined_command): Constify.
5082
5083 2017-09-27 Tom Tromey <tom@tromey.com>
5084
5085 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5086 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5087 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5088 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5089 (dump_binary_value, append_binary_memory, append_binary_value):
5090 Constify.
5091 (struct dump_context) <func>: Constify.
5092 (add_dump_command): Update.
5093
5094 2017-09-27 Tom Tromey <tom@tromey.com>
5095
5096 * cli/cli-cmds.c (show_version, show_configuration)
5097 (source_command, show_user): Constify.
5098
5099 2017-09-27 Tom Tromey <tom@tromey.com>
5100
5101 * target.c (maintenance_print_target_stack): Constify.
5102
5103 2017-09-27 Tom Tromey <tom@tromey.com>
5104
5105 * interps.c (interpreter_exec_cmd): Constify.
5106
5107 2017-09-27 Tom Tromey <tom@tromey.com>
5108
5109 * record-full.c (cmd_record_full_restore): Constify.
5110
5111 2017-09-27 Tom Tromey <tom@tromey.com>
5112
5113 * memattr.c (enable_mem_command, disable_mem_command)
5114 (delete_mem_command): Constify.
5115
5116 2017-09-27 Tom Tromey <tom@tromey.com>
5117
5118 * value.c (show_convenience): Constify.
5119
5120 2017-09-27 Tom Tromey <tom@tromey.com>
5121
5122 * gdbcore.h (core_file_command): Update.
5123 * corefile.c (core_file_command): Constify.
5124
5125 2017-09-27 Tom Tromey <tom@tromey.com>
5126
5127 * user-regs.c (maintenance_print_user_registers): Constify.
5128
5129 2017-09-27 Tom Tromey <tom@tromey.com>
5130
5131 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5132
5133 2017-09-27 Tom Tromey <tom@tromey.com>
5134
5135 * cp-support.c (first_component_command): Constify.
5136
5137 2017-09-27 Tom Tromey <tom@tromey.com>
5138
5139 * psymtab.c (maintenance_print_psymbols)
5140 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5141 Constify.
5142
5143 2017-09-27 Tom Tromey <tom@tromey.com>
5144
5145 * windows-tdep.c (display_tib): Constify.
5146
5147 2017-09-27 Tom Tromey <tom@tromey.com>
5148
5149 * linux-fork.c (delete_checkpoint_command)
5150 (detach_checkpoint_command): Constify.
5151
5152 2017-09-27 Tom Tromey <tom@tromey.com>
5153
5154 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5155
5156 2017-09-27 Tom Tromey <tom@tromey.com>
5157
5158 * arc-tdep.c (dump_arc_instruction_command): Constify.
5159
5160 2017-09-27 Tom Tromey <tom@tromey.com>
5161
5162 * valprint.c (set_radix, show_radix): Constify.
5163
5164 2017-09-27 Tom Tromey <tom@tromey.com>
5165
5166 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5167
5168 2017-09-27 Tom Tromey <tom@tromey.com>
5169
5170 * command.h (not_just_help_class_command): Update.
5171 * cli/cli-decode.h (not_just_help_class_command): Update.
5172 * cli/cli-decode.c (not_just_help_class_command): Constify.
5173
5174 2017-09-27 Tom Tromey <tom@tromey.com>
5175
5176 * gdb_bfd.c (maintenance_info_bfds): Constify.
5177
5178 2017-09-27 Tom Tromey <tom@tromey.com>
5179
5180 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5181 overloads.
5182 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5183 (do_const_cfunc): New function.
5184 (cmd_cfunc_eq): New overload.
5185 (cli_user_command_p): Check do_const_cfunc.
5186 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5187 const_cfunc.
5188 * command.h (add_cmd): Add const overload and no-function
5189 overload.
5190 (set_cmd_cfunc): Add const overload.
5191 (cmd_const_cfunc_ftype): Declare.
5192 (cmd_cfunc_eq): Add const overload.
5193 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5194 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5195 overload.
5196
5197 2017-09-27 Tom Tromey <tom@tromey.com>
5198
5199 * macroexp.c (get_next_token_for_substitution): New function.
5200 (substitute_args): Call it. Check for __VA_OPT__.
5201
5202 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5203 Pedro Alves <palves@redhat.com>
5204
5205 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5206 producer_is_icc_lt_14.
5207 (producer_is_icc_lt_14): New function.
5208 (check_producer): Add code for checking version of ICC.
5209 (producer_is_icc): Move to producer.c.
5210 (read_structure_type): Restrict ICC workaround to ICC<14.
5211 * producer.c: Include selftest.h.
5212 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5213 New functions.
5214 * producer.h (producer_is_icc): New declaration.
5215
5216 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5217
5218 * Makefile.in (SFILES): Add producer.c.
5219 (COMMON_OBS): Add producer.o
5220 * amd64-tdep.c (producer.h): Add new include.
5221 * dwarf2read.c (producer.h): Add new include.
5222 * producer.c: New file.
5223 * producer.h: New file.
5224 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5225 producer.c.
5226 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5227 producer.h.
5228
5229 2017-09-26 Matthias Klose <doko@ubuntu.com>
5230
5231 * configure.ac: Search ncursesw before ncurses.
5232 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5233 * gdb_curses.h: Include <ncursesw/ncurses.h>
5234 * config.in, configure: Regenerate.
5235
5236 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5237
5238 PR gdb/22185
5239 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5240 obsolete.
5241 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5242 Remove i386sol2 support.
5243 * configure.nat <i386sol2>: Remove.
5244 <sol2-64>: Fold into ...
5245 <sol2>: ... this.
5246 Move common settings to default section.
5247 Add sol-thread.o.
5248 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5249 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5250 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5251 <i[34567]86-*-solaris*>: Remove.
5252 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5253
5254 * configure.ac: Remove wctype in libw check.
5255 (_MSE_INT_H): Don't define on Solaris 7-9.
5256 <solaris*>: Remove libthread_db.so.1 check.
5257 * configure: Regenerate.
5258 * config.in: Regenerate.
5259
5260 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5261 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5262 (gdb_ps_size_t): Remove.
5263 Use base types in users.
5264 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5265
5266 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5267
5268 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5269
5270 PR build/22206
5271 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5272 (adi_is_addr_mapped): Likewise.
5273 (PSR_ICC): Don't redefine.
5274 (PSR_IMPL): Likewise.
5275
5276 2017-09-25 Tom Tromey <tom@tromey.com>
5277
5278 * regcache.c (regcache::dump): Use string_printf.
5279
5280 2017-09-25 Tom Tromey <tom@tromey.com>
5281
5282 * regcache.c (class regcache_invalidator): New.
5283 (struct register_to_invalidate): Remove.
5284 (make_cleanup_regcache_invalidate): Remove.
5285 (regcache::raw_write): Use regcache_invalidator.
5286
5287 2017-09-25 Tom Tromey <tom@tromey.com>
5288
5289 * spu-tdep.c (spu2ppu_sniffer): Update.
5290 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5291 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5292 Remove.
5293 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5294 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5295 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5296 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5297 (frame_pop): Update.
5298
5299 2017-09-25 Tom Tromey <tom@tromey.com>
5300
5301 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5302 * regcache.h (regcache_xfree): Don't declare.
5303 * regcache.c (regcache_xfree): Remove.
5304 (do_regcache_xfree): Use delete.
5305 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5306 * linux-fork.c (free_fork): Use delete.
5307 (fork_save_infrun_state): Likewise.
5308 * jit.c (jit_dealloc_cache): Use delete.
5309 * infrun.c (discard_infcall_suspend_state): Use delete.
5310
5311 2017-09-25 Tom Tromey <tom@tromey.com>
5312
5313 * regcache.h (regcache_xmalloc): Don't declare.
5314 (regcache_raw_set_cached_value): Update comment.
5315 * regcache.c (regcache_xmalloc): Remove.
5316 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5317 * jit.c (jit_frame_sniffer): Use new.
5318 * frame.c (frame_save_as_regcache): Use new.
5319
5320 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5321
5322 * NEWS: Advertise support for guarded-storage registers on IBM z.
5323
5324 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5325
5326 * s390-linux-nat.c (have_regset_gs): New static variable.
5327 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5328 control block and guarded-storage broadcast control regsets.
5329 (s390_read_description): Detect whether the target has
5330 guarded-storage support, return appropriate tdesc.
5331 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5332 (features/s390x-gs-linux64.c): Likewise.
5333 (struct gdbarch_tdep) <have_gs>: New field.
5334 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5335 (s390_gsbc_regset): New variables.
5336 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5337 and s390_gsbc_regset, if applicable.
5338 (s390_core_read_description): Check whether core file was from a
5339 target with guarded-storage support; include appropriate regsets.
5340 (s390_gdbarch_init): Add registers for guarded-storage support.
5341 (_initialize_s390_tdep): Initialize new target descriptions that
5342 include registers for guarded-storage support.
5343 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5344 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5345 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5346 (S390_NUM_REGS): Adjust macro definition.
5347 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5348 (tdesc_s390x_gs_linux64): New declarations.
5349
5350 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5351
5352 * features/s390-gs-linux64.xml: New file.
5353 * features/s390-gs.xml: New file.
5354 * features/s390-gsbc.xml: New file.
5355 * features/s390x-gs-linux64.xml: New file.
5356 * features/Makefile (WHICH): Add s390-gs-linux64 and
5357 s390x-gs-linux64.
5358 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5359 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5360 * features/s390-gs-linux64.c: New generated file.
5361 * features/s390x-gs-linux64.c: New file.
5362 * regformats/s390-gs-linux64.dat: New file.
5363 * regformats/s390x-gs-linux64.dat: New file.
5364
5365 2017-09-23 Tom Tromey <tom@tromey.com>
5366
5367 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5368
5369 2017-09-22 Tom Tromey <tom@tromey.com>
5370
5371 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5372 type to scoped_restore_tmpl.
5373 <scoped_input_handler>: Initialize m_quit_handler directly.
5374
5375 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5376
5377 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5378 (cd_command): Likewise. Free "current_directory" before
5379 assigning to it.
5380 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5381 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5382 * top.c (gdb_dirbuf): Remove global declaration.
5383 * top.h (gdb_dirbuf): Likewise.
5384
5385 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5386
5387 * gnulib/aclocal.m4: Regenerate.
5388 * gnulib/config.in: Regenerate.
5389 * gnulib/configure: Regenerate.
5390 * gnulib/import/Makefile.am: Regenerate.
5391 * gnulib/import/Makefile.in: Regenerate.
5392 * gnulib/import/assure.h: New file.
5393 * gnulib/import/at-func.c: Likewise
5394 * gnulib/import/chdir-long.c: New file.
5395 * gnulib/import/chdir-long.h: New file.
5396 * gnulib/import/cloexec.c: New file.
5397 * gnulib/import/cloexec.h: New file.
5398 * gnulib/import/close.c: New file.
5399 * gnulib/import/closedir.c: New file.
5400 * gnulib/import/dirent-private.h: New file.
5401 * gnulib/import/dup-safer.c: New file.
5402 * gnulib/import/dup.c: New file.
5403 * gnulib/import/dup2.c: New file.
5404 * gnulib/import/error.c: New file.
5405 * gnulib/import/error.h: New file.
5406 * gnulib/import/exitfail.c: New file.
5407 * gnulib/import/exitfail.h: New file.
5408 * gnulib/import/fchdir.c: New file.
5409 * gnulib/import/fcntl.c: New file.
5410 * gnulib/import/fcntl.in.h: New file.
5411 * gnulib/import/fd-hook.c: New file.
5412 * gnulib/import/fd-hook.h: New file.
5413 * gnulib/import/fd-safer.c: New file.
5414 * gnulib/import/fdopendir.c: New file.
5415 * gnulib/import/filename.h: New file.
5416 * gnulib/import/filenamecat-lgpl.c: New file.
5417 * gnulib/import/filenamecat.h: New file.
5418 * gnulib/import/fstat.c: New file.
5419 * gnulib/import/fstatat.c: New file.
5420 * gnulib/import/getcwd-lgpl.c: New file.
5421 * gnulib/import/getcwd.c: New file.
5422 * gnulib/import/getdtablesize.c: New file.
5423 * gnulib/import/getlogin_r.c: New file.
5424 * gnulib/import/getprogname.c: New file.
5425 * gnulib/import/getprogname.h: New file.
5426 * gnulib/import/gettext.h: New file.
5427 * gnulib/import/glob-libc.h: New file.
5428 * gnulib/import/glob.c: New file.
5429 * gnulib/import/glob.in.h: New file.
5430 * gnulib/import/intprops.h: New file.
5431 * gnulib/import/m4/chdir-long.m4: New file.
5432 * gnulib/import/m4/close.m4: New file.
5433 * gnulib/import/m4/closedir.m4: New file.
5434 * gnulib/import/m4/d-ino.m4: New file.
5435 * gnulib/import/m4/d-type.m4: New file.
5436 * gnulib/import/m4/dup.m4: New file.
5437 * gnulib/import/m4/dup2.m4: New file.
5438 * gnulib/import/m4/error.m4: New file.
5439 * gnulib/import/m4/fchdir.m4: New file.
5440 * gnulib/import/m4/fcntl.m4: New file.
5441 * gnulib/import/m4/fcntl_h.m4: New file.
5442 * gnulib/import/m4/fdopendir.m4: New file.
5443 * gnulib/import/m4/filenamecat.m4: New file.
5444 * gnulib/import/m4/fstat.m4: New file.
5445 * gnulib/import/m4/fstatat.m4: New file.
5446 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5447 * gnulib/import/m4/getcwd-path-max.m4: New file.
5448 * gnulib/import/m4/getcwd.m4: New file.
5449 * gnulib/import/m4/getdtablesize.m4: New file.
5450 * gnulib/import/m4/getlogin_r.m4: New file.
5451 * gnulib/import/m4/getprogname.m4: New file.
5452 * gnulib/import/m4/glob.m4: New file.
5453 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5454 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5455 * gnulib/import/m4/mempcpy.m4: New file.
5456 * gnulib/import/m4/memrchr.m4: New file.
5457 * gnulib/import/m4/mode_t.m4: New file.
5458 * gnulib/import/m4/msvc-inval.m4: New file.
5459 * gnulib/import/m4/msvc-nothrow.m4: New file.
5460 * gnulib/import/m4/open.m4: New file.
5461 * gnulib/import/m4/openat.m4: New file.
5462 * gnulib/import/m4/opendir.m4: New file.
5463 * gnulib/import/m4/readdir.m4: New file.
5464 * gnulib/import/m4/realloc.m4: New file.
5465 * gnulib/import/m4/rewinddir.m4: New file.
5466 * gnulib/import/m4/save-cwd.m4: New file.
5467 * gnulib/import/m4/strdup.m4: New file.
5468 * gnulib/import/m4/strerror.m4: New file.
5469 * gnulib/import/m4/unistd-safer.m4: New file.
5470 * gnulib/import/mempcpy.c: New file.
5471 * gnulib/import/memrchr.c: New file.
5472 * gnulib/import/msvc-inval.c: New file.
5473 * gnulib/import/msvc-inval.h: New file.
5474 * gnulib/import/msvc-nothrow.c: New file.
5475 * gnulib/import/msvc-nothrow.h: New file.
5476 * gnulib/import/open.c: New file.
5477 * gnulib/import/openat-die.c: New file.
5478 * gnulib/import/openat-priv.h: New file.
5479 * gnulib/import/openat-proc.c: New file.
5480 * gnulib/import/openat.c: New file.
5481 * gnulib/import/openat.h: New file.
5482 * gnulib/import/opendir.c: New file.
5483 * gnulib/import/pipe-safer.c: New file.
5484 * gnulib/import/readdir.c: New file.
5485 * gnulib/import/realloc.c: New file.
5486 * gnulib/import/rewinddir.c: New file.
5487 * gnulib/import/save-cwd.c: New file.
5488 * gnulib/import/save-cwd.h: New file.
5489 * gnulib/import/strdup.c: New file.
5490 * gnulib/import/strerror-override.c: New file.
5491 * gnulib/import/strerror-override.h: New file.
5492 * gnulib/import/strerror.c: New file.
5493 * gnulib/import/unistd--.h: New file.
5494 * gnulib/import/unistd-safer.h: New file.
5495 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5496 "getcwd" and "glob".
5497 * ser-tcp.c: Undefine "close" before redefining it.
5498
5499 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5500
5501 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5502 get rid of res_val.
5503
5504 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5505
5506 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5507 <sol2,sparc>: Likewise.
5508 <sol2-64,i386>: Likewise.
5509
5510 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5511 -Wdeprecated-declarations on *-*-solaris*.
5512 * configure: Regenerate.
5513
5514 * procfs.c: Include "nat/inferior.h".
5515 (procfs_info_proc): Fix typo.
5516
5517 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5518
5519 * remote.c (vector): Include.
5520 (struct private_thread_info): Add field, thread_handle.
5521 (free_private_thread_info): Deallocate storage associated with
5522 thread handle.
5523 (get_private_info_thread): Initialize `thread_handle' field.
5524 (struct thread_item): Add field, thread_handle.
5525 (clear_threads_listing_context): Deallocate storage associated
5526 with thread handle.
5527 (start_thread): Add support for "handle" attribute.
5528 (thread_attributes): Add "handle".
5529 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5530 field.
5531 (remote_update_thread_list): Update thread_handle.
5532 (remote_thread_handle_to_thread_info): New function.
5533 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5534
5535 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5536
5537 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5538 function.
5539 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5540 * python/python-internal.h (thread_object_type): Declare.
5541
5542 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5543
5544 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5545 (target_thread_handle_to_thread_info): Declare.
5546 * target.c (target_thread_handle_to_thread_info): New function.
5547 * target-delegates.c: Regenerate.
5548 * gdbthread.h (find_thread_by_handle): Declare.
5549 * thread.c (find_thread_by_handle): New function.
5550 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5551 function.
5552 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5553
5554 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5555
5556 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5557
5558 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5559
5560 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5561
5562 2017-09-21 Yao Qi <yao.qi@linaro.org>
5563
5564 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5565 to gdb_target_obs.
5566
5567 2017-09-20 Tom Tromey <tom@tromey.com>
5568
5569 * breakpoint.c (struct counted_command_line): Remove.
5570 (breakpoint_commands): Update.
5571 (alloc_counted_command_line, incref_counted_command_line)
5572 (decref_counted_command_line, do_cleanup_counted_command_line)
5573 (make_cleanup_decref_counted_command_line): Remove.
5574 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5575 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5576 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5577 (save_breakpoints): Update.
5578 * breakpoint.h (counted_command_line): Now a typedef to
5579 shared_ptr.
5580 (struct breakpoint) <commands>: Now a counted_command_line.
5581 (struct bpstats) <command>: Likewise.
5582
5583 2017-09-20 Tom Tromey <tom@tromey.com>
5584
5585 * breakpoint.c (struct commands_info, do_map_commands_command):
5586 Remove.
5587 (commands_command_1): Update.
5588 (iterate_over_related_breakpoints): Take a function_view.
5589 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5590 (delete_command): Update.
5591 (map_breakpoint_numbers): Take a function_view.
5592 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5593 (disable_command): Update.
5594 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5595 (enable_command): Update.
5596 (struct disp_data, do_enable_breakpoint_disp)
5597 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5598 (do_map_enable_delete_breakpoint): Remove.
5599 (enable_once_command, enable_count_command, enable_delete_command)
5600 (delete_trace_variable_command): Update.
5601
5602 2017-09-20 Tom Tromey <tom@tromey.com>
5603
5604 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5605 (bpstat_clear): Use delete.
5606 (bpstats): New constructors.
5607 (bpstat_copy, bpstat_stop_status): Use new.
5608 (dprintf_after_condition_true): Update.
5609 * breakpoint.h (bpstats::bpstats): Add constructors.
5610 (bpstats::~bpstats): Add destructor.
5611
5612 2017-09-20 Pedro Alves <palves@redhat.com>
5613
5614 * eval.c (make_params): Delete, refactored as ...
5615 (class fake_method): ... this new type's ctor.
5616 (fake_method::~fake_method): New.
5617 (evaluate_subexp_standard): Use 'fake_method'.
5618
5619 2017-09-20 Tom Tromey <tom@tromey.com>
5620
5621 * windows-nat.c (get_windows_debug_event, windows_wait)
5622 (do_initial_windows_stuff, windows_attach): Update.
5623 * utils.c (vwarning, internal_vproblem): Update.
5624 (ui_unregister_input_event_handler_cleanup)
5625 (prepare_to_handle_input): Remove.
5626 (class scoped_input_handler): New.
5627 (defaulted_query, prompt_for_continue): Update.
5628 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5629 Update.
5630 * top.c (undo_terminal_modifications_before_exit): Update.
5631 * target/target.h (target_terminal_init, target_terminal_inferior)
5632 (target_terminal_ours): Don't declare.
5633 (class target_terminal): New.
5634 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5635 (target_terminal_ours_for_output)
5636 (make_cleanup_restore_target_terminal): Don't declare.
5637 (target_terminal_info): Remove.
5638 * target.c (enum terminal_state, terminal_state): Remove.
5639 (target_terminal::terminal_state): Define.
5640 (target_terminal::init): Rename from target_terminal_init.
5641 (target_terminal::inferior): Rename from
5642 target_terminal_inferior.
5643 (target_terminal::ours): Rename from target_terminal_ours.
5644 (target_terminal::ours_for_output): Rename from
5645 target_terminal_ours_for_output.
5646 (target_terminal::info): New method.
5647 (cleanup_restore_target_terminal)
5648 (make_cleanup_restore_target_terminal): Remove.
5649 * solib.c (handle_solib_event): Update.
5650 * remote.c (remote_serial_quit_handler): Update.
5651 (remote_terminal_inferior, remote_wait_as): Update.
5652 * record-full.c (record_full_wait_1): Update.
5653 * nto-procfs.c (procfs_create_inferior): Update.
5654 * nat/fork-inferior.c (startup_inferior): Update.
5655 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5656 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5657 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5658 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5659 (mi_breakpoint_created, mi_breakpoint_deleted)
5660 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5661 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5662 (mi_user_selected_context_changed, report_initial_inferior):
5663 Update.
5664 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5665 (linux_nat_terminal_inferior): Update.
5666 * infrun.c (follow_fork_inferior)
5667 (handle_vfork_child_exec_or_exit, do_target_resume)
5668 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5669 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5670 Update.
5671 * inflow.c (child_terminal_init, info_terminal_command): Update.
5672 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5673 (attach_command): Update.
5674 * infcall.c (call_thread_fsm_should_stop): Update.
5675 * gnu-nat.c (gnu_attach): Update.
5676 * extension.c (struct active_ext_lang_state)
5677 (restore_active_ext_lang): Update.
5678 * exceptions.c (print_flush): Update.
5679 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5680 (struct quit_handler_cleanup_data, restore_quit_handler)
5681 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5682 Remove.
5683 * cp-support.c (gdb_demangle): Update.
5684 * breakpoint.c (update_inserted_breakpoint_locations)
5685 (insert_breakpoint_locations, handle_jit_event)
5686 (disable_breakpoints_in_unloaded_shlib): Update.
5687 * annotate.c (annotate_breakpoints_invalid)
5688 (annotate_frames_invalid): Update.
5689
5690 2017-09-20 Tom Tromey <tom@tromey.com>
5691
5692 * main.c (catch_command_errors): Rename from
5693 catch_command_errors_const.
5694 (captured_main_1): Update.
5695
5696 2017-09-20 Pedro Alves <palves@redhat.com>
5697
5698 * cli/cli-cmds.c (list_command): Use print_sal_location.
5699 (print_sal_location): New function.
5700 (ambiguous_line_spec): Use print_sal_location.
5701 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5702 * symtab.c (find_function_start_sal): Likewise.
5703 * symtab.h (symtab_and_line::symbol): New field.
5704
5705 2017-09-20 Pedro Alves <palves@redhat.com>
5706
5707 * linespec.c (minsym_found): Handle non-text minsyms.
5708 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5709
5710 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5711
5712 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5713 backslash.
5714
5715 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5716
5717 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5718 vmovups instead vmovaps.
5719 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5720
5721 2017-09-19 John Baldwin <jhb@FreeBSD.org>
5722
5723 * NEWS (Changes since GDB 8.0): Add starti.
5724 * infcmd.c (enum run_break): New.
5725 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5726 case.
5727 (run_command): Use enum run_how.
5728 (start_command): Likewise.
5729 (starti_command): New function.
5730 (RUN_ARGS_HELP): New macro.
5731 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5732 commands. Add starti command.
5733
5734 2017-09-19 Yao Qi <yao.qi@linaro.org>
5735
5736 * Makefile.in (monitor.o): Remove the rule.
5737
5738 2017-09-19 Yao Qi <yao.qi@linaro.org>
5739
5740 * annotate.h (struct annotate_arg_emitter): Use
5741 DISABLE_COPY_AND_ASSIGN.
5742 * common/refcounted-object.h (refcounted_object): Likewise.
5743 * completer.h (struct completion_result): Likewise.
5744 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5745 * filename-seen-cache.h (filename_seen_cache): Likewise.
5746 * gdbcore.h (thread_section_name): Likewise.
5747 * gdb_regex.h (compiled_regex): Likewise.
5748 * gdbthread.h (scoped_restore_current_thread): Likewise.
5749 * inferior.h (scoped_restore_current_inferior): Likewise.
5750 * jit.c (jit_reader): Likewise.
5751 * linespec.h (struct linespec_result): Likewise.
5752 * mi/mi-parse.h (struct mi_parse): Likewise.
5753 * nat/fork-inferior.c (execv_argv): Likewise.
5754 * progspace.h (scoped_restore_current_program_space): Likewise.
5755 * python/python-internal.h (class gdbpy_enter): Likewise.
5756 * regcache.h (regcache): Likewise.
5757 * target-descriptions.c (struct tdesc_reg): Likewise.
5758 (struct tdesc_type): Likewise.
5759 (struct tdesc_feature): Likewise.
5760 * ui-out.h (ui_out_emit_type): Likewise.
5761
5762 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5763
5764 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5765 label abort_expression.
5766
5767 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5768
5769 * common/buffer.c (buffer_xml_printf): Adjust.
5770 * common/xml-utils.c (xml_escape_text): Change return type to
5771 std::string, update code accordingly.
5772 * common/xml-utils.h (xml_escape_text): Change return type to
5773 std::string.
5774 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5775 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5776 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5777 Adjust.
5778
5779 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5780
5781 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5782 (SUBDIR_UNITTESTS_OBS): Add new object file.
5783 * unittests/xml-utils-selftests.c: New file.
5784
5785 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5786
5787 * common/selftest.h (selftest): New struct/interface.
5788 (register_test): Add name parameter, add new overload.
5789 (run_tests): Add filter parameter.
5790 (for_each_selftest_ftype): New typedef.
5791 (for_each_selftest): New declaration.
5792 * common/selftest.c (tests): Change type to
5793 map<string, unique_ptr<selftest>>.
5794 (simple_selftest): New struct.
5795 (register_test): New function.
5796 (register_test): Add name parameter and use it.
5797 (run_tests): Add filter parameter and use it. Add prints.
5798 Adjust to vector -> map change.
5799 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5800 registering selftests.
5801 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5802 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5803 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5804 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5805 * findvar.c (_initialize_findvar): Likewise.
5806 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5807 * maint.c (maintenance_selftest): Update call to run_tests.
5808 (maintenance_info_selftests): New function.
5809 (_initialize_maint_cmds): Register "maintenance info selftests"
5810 command. Update "maintenance selftest" doc.
5811 * regcache.c (_initialize_regcache): Add names when registering
5812 selftests.
5813 * rust-exp.y (_initialize_rust_exp): Likewise.
5814 * selftest-arch.c (gdbarch_selftest): New struct.
5815 (gdbarch_tests): Remove.
5816 (register_test_foreach_arch): Add name parameter. Call
5817 register_test.
5818 (tests_with_arch): Remove, move most content to
5819 gdbarch_selftest::operator().
5820 (_initialize_selftests_foreach_arch): Remove.
5821 * selftest-arch.h (register_test_foreach_arch): Add name
5822 parameter.
5823 (run_tests_with_arch): New declaration.
5824 * utils-selftests.c (_initialize_utils_selftests): Add names
5825 when registering selftests.
5826 * utils.c (_initialize_utils): Likewise.
5827 * unittests/array-view-selftests.c
5828 (_initialize_array_view_selftests): Likewise.
5829 * unittests/environ-selftests.c (_initialize_environ_selftests):
5830 Likewise.
5831 * unittests/function-view-selftests.c
5832 (_initialize_function_view_selftests): Likewise.
5833 * unittests/offset-type-selftests.c
5834 (_initialize_offset_type_selftests): Likewise.
5835 * unittests/optional-selftests.c
5836 (_initialize_optional_selftests): Likewise.
5837 * unittests/scoped_restore-selftests.c
5838 (_initialize_scoped_restore_selftests): Likewise.
5839 * NEWS: Document "maintenance selftest" and "maint info
5840 selftests".
5841
5842 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5843
5844 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5845 scoped_restore.
5846
5847 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5848
5849 * mi/mi-main.c (mi_load_progress): Make uiout variable
5850 a unique_ptr.
5851
5852 2017-09-15 Pedro Alves <palves@redhat.com>
5853
5854 * compile/compile-c-types.c (convert_enum, convert_int)
5855 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5856
5857 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5858
5859 * dwarf2read.c (copy_string): Remove.
5860 (parse_macro_definition): Replace copy_string with savestring.
5861
5862 2017-09-15 Yao Qi <yao.qi@linaro.org>
5863
5864 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5865 gdb_target_obs.
5866 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5867 Likewise.
5868 (i[34567]86-*-linux*): Likewise.
5869
5870 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5871
5872 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5873 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5874 <stack>: Change type to std::vector.
5875 <stack_len, stack_allocated>: Remove.
5876 <grow_stack>: Remove.
5877 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5878 (dwarf_expr_context::~dwarf_expr_context): Remove.
5879 (dwarf_expr_context::grow_stack): Remove.
5880 (dwarf_expr_context::push): Adjust.
5881 (dwarf_expr_context::pop): Adjust.
5882 (dwarf_expr_context::fetch): Adjust.
5883 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5884 (dwarf_expr_context::stack_empty_p): Adjust.
5885 (dwarf_expr_context::execute_stack_op): Adjust.
5886
5887 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5888
5889 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5890 return type to bool.
5891 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5892
5893 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5894
5895 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5896 Change type to bool.
5897 (dwarf_stack_value) <in_stack_memory>: Likewise.
5898 (dwarf_expr_context) <push_address>: Change parameter type to
5899 bool.
5900 <fetch_in_stack_memory>: Change return type to bool.
5901 <push>: Change parameter type to bool.
5902 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5903 to bool.
5904 (dwarf_expr_context::push_address): Likewise.
5905 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5906 to bool.
5907 (dwarf_expr_context::execute_stack_op): Adjust.
5908 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5909
5910 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5911
5912 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5913 (struct dwarf_expr_context) <n_pieces>: Remove.
5914 <pieces>: Change type to std::vector.
5915 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5916 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5917 pieces.
5918 (dwarf_expr_context::add_piece): Adjust.
5919 * dwarf2loc.c (struct piece_closure): Initialize fields.
5920 <n_pieces>: Remove.
5921 <pieces>: Change type to std::vector.
5922 (allocate_piece_closure): Adjust, change parameter to
5923 std::vector rvalue and std::move it to piece_closure.
5924 (rw_pieced_value): Adjust.
5925 (check_pieced_synthetic_pointer): Adjust.
5926 (indirect_synthetic_pointer): Adjust.
5927 (coerce_pieced_ref): Adjust.
5928 (free_pieced_value_closure): Adjust. Use delete to free
5929 piece_closure.
5930 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5931 to allocate_piece_closure.
5932 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5933
5934 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5935
5936 * probe.h (probe_ops_cp): Remove typedef.
5937 (DEF_VEC_P (probe_ops_cp)): Remove.
5938 (all_probe_ops): Change type to std::vector.
5939 * probe.c (info_probes_for_ops): Adjust to vector change.
5940 (probe_linespec_to_ops): Likewise.
5941 (all_probe_ops): Change type to std::vector.
5942 (_initialize_probe): Adjust to vector change.
5943 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5944 * elfread.c (elf_get_probes): Likewise.
5945 * stap-probe.c (_initialize_stap_probe): Likewise.
5946
5947 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5948
5949 * probe.h (struct bound_probe): Define constructors.
5950 * probe.c (bound_probe_s): Remove typedef.
5951 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5952 (collect_probes): Change return type to std::vector, remove
5953 cleanup.
5954 (compare_probes): Return bool, change parameter type. Change
5955 semantic to "less than".
5956 (gen_ui_out_table_header_info): Change parameter to std::vector
5957 and update.
5958 (exists_probe_with_pops): Likewise.
5959 (info_probes_for_ops): Update to std::vector change.
5960 (enable_probes_command): Likewise.
5961 (disable_probes_command): Likewise.
5962
5963 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5964
5965 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5966 vec to std::vector.
5967 * probe.c (parse_probes_in_pspace): Update.
5968 (find_probes_in_objfile): Update.
5969 (find_probe_by_pc): Update.
5970 (collect_probes): Update.
5971 (probe_any_get_probes): Update.
5972 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5973 return type to reference to std::vector.
5974 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5975 std::vector and update.
5976 (dtrace_process_dof): Likewise.
5977 (dtrace_get_probes): Likewise.
5978 * elfread.c (elf_get_probes): Change return type to std::vector,
5979 store an std::vector in bfd_data.
5980 (probe_key_free): Update to std::vector.
5981 * stap-probe.c (handle_stap_probe): Change parameter to
5982 std::vector and update.
5983 (stap_get_probes): Likewise.
5984 * symfile-debug.c (debug_sym_get_probes): Change return type to
5985 std::vector and update.
5986
5987 2017-09-11 Tom Tromey <tom@tromey.com>
5988
5989 * breakpoint.c (program_breakpoint_here_p): Update.
5990 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5991 from make_show_memory_breakpoints_cleanup. Return a
5992 scoped_restore_tmpl<int>.
5993 (restore_show_memory_breakpoints): Remove.
5994 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5995 * mem-break.c (memory_validate_breakpoint): Update.
5996 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5997 (ia64_memory_remove_breakpoint): Update.
5998 (ia64_breakpoint_from_pc): Update.
5999 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6000 from make_show_memory_breakpoints_cleanup.
6001
6002 2017-09-11 Tom Tromey <tom@tromey.com>
6003
6004 * d-namespace.c (d_lookup_symbol): Use std::string.
6005 (find_symbol_in_baseclass): Likewise.
6006
6007 2017-09-11 Tom Tromey <tom@tromey.com>
6008
6009 * ctf.c (ctf_start): Use std::string.
6010
6011 2017-09-11 Tom Tromey <tom@tromey.com>
6012
6013 * ada-lang.c (is_known_support_routine): Update.
6014 (ada_unhandled_exception_name_addr_from_raise): Update.
6015 * guile/scm-frame.c (gdbscm_frame_name): Update.
6016 * python/py-frame.c (frapy_name): Update.
6017 (frapy_function): Update.
6018 * stack.h (find_frame_funname): Update.
6019 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6020 (print_frame): Update.
6021
6022 2017-09-11 Tom Tromey <tom@tromey.com>
6023
6024 * findcmd.c (put_bits): Take a gdb::byte_vector.
6025 (parse_find_args): Return gdb::byte_vector. "args" now const.
6026 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6027 cleanups.
6028 (find_command): Update.
6029
6030 2017-09-11 Tom Tromey <tom@tromey.com>
6031
6032 * cli/cli-script.c (class scoped_restore_hook_in): New.
6033 (clear_hook_in_cleanup): Remove.
6034 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6035 scoped_restore_hook_in.
6036
6037 2017-09-11 Tom Tromey <tom@tromey.com>
6038
6039 * cli/cli-script.c (restore_interp): Remove.
6040 (read_command_lines): Use scoped_restore_interp.
6041 * interps.c (scoped_restore_interp::set_temp): Rename from
6042 interp_set_temp.
6043 * interps.h (class scoped_restore_interp): New.
6044 (interp_set_temp): Remove.
6045
6046 2017-09-11 Tom Tromey <tom@tromey.com>
6047
6048 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6049 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6050 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6051 scoped_restore.
6052 (mi_cmd_break_insert_1): Update.
6053 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6054 scoped_restore.
6055
6056 2017-09-11 Tom Tromey <tom@tromey.com>
6057
6058 * demangle.c (demangle_command): Update.
6059 * breakpoint.c (disable_command): Update.
6060 (enable_command): Update.
6061 (find_location_by_number): Make "number" const. Use
6062 get_number_trailer.
6063 * cli/cli-utils.c (extract_arg): Return std::string.
6064 * probe.c (parse_probe_linespec): Update. Change types.
6065 (collect_probes): Take string arguments.
6066 (parse_probe_linespec): Likewise.
6067 (info_probes_for_ops): Update.
6068 (enable_probes_command): Update.
6069 (disable_probes_command): Update.
6070 * break-catch-sig.c (catch_signal_split_args): Update.
6071 * mi/mi-parse.c (mi_parse): Update.
6072
6073 2017-09-11 Tom Tromey <tom@tromey.com>
6074
6075 * language.h (language_enum): Make argument const.
6076 * language.c (language_enum): Make argument const.
6077
6078 2017-09-11 Tom Tromey <tom@tromey.com>
6079
6080 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6081 as function.
6082 (skip_to_space): Rename from skip_to_space_const.
6083 * common/common-utils.c (skip_to_space): New function.
6084 (skip_to_space): Rename from skip_to_space_const.
6085 * cli/cli-utils.h (get_number): Rename from get_number_const.
6086 (extract_arg): Rename from extract_arg_const.
6087 * cli/cli-utils.c (get_number): Rename from get_number_const.
6088 (extract_arg): Rename from extract_arg_const.
6089 (number_or_range_parser::get_number): Use ::get_number.
6090 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6091 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6092 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6093 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6094 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6095 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6096 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6097 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6098
6099 2017-09-11 Tom Tromey <tom@tromey.com>
6100
6101 * python/python.c (do_start_initialization): Use
6102 py-event-types.def to initialize types.
6103 Define all object type structures.
6104 * python/python-internal.h: Don't declare event initialization
6105 functions.
6106 * python/py-threadevent.c (thread_event_object_type): Don't
6107 define.
6108 * python/py-stopevent.c (stop_event_object_type): Don't define.
6109 * python/py-signalevent.c (signal_event_object_type): Don't
6110 declare or define.
6111 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6112 (clear_objfiles_event_object_type): Don't declare or define.
6113 * python/py-infevents.c (inferior_call_pre_event_object_type)
6114 (inferior_call_post_event_object_type)
6115 (register_changed_event_object_type)
6116 (memory_changed_event_object_type): Don't declare or define.
6117 * python/py-inferior.c (new_thread_event_object_type)
6118 (new_inferior_event_object_type)
6119 (inferior_deleted_event_object_type): Don't declare or define.
6120 * python/py-exitedevent.c (exited_event_object_type): Don't
6121 declare or define.
6122 * python/py-evts.c (gdbpy_initialize_py_events): Use
6123 py-all-events.def.
6124 * python/py-events.h (thread_event_object_type): Don't declare.
6125 (events_object): Use py-all-events.def.
6126 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6127 py-event-types.def.
6128 * python/py-event-types.def: New file.
6129 * python/py-continueevent.c (create_continue_event_object): Don't
6130 declare or define.
6131 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6132 declare or define.
6133 * python/py-all-events.def: New file.
6134
6135 2017-09-11 Tom Tromey <tom@tromey.com>
6136
6137 * python/py-threadevent.c (create_thread_event_object): Return
6138 gdbpy_ref.
6139 * python/py-stopevent.h (create_stop_event_object)
6140 (create_breakpoint_event_object, create_signal_event_object):
6141 Update.
6142 * python/py-stopevent.c (create_stop_event_object): Return
6143 gdbpy_ref.
6144 (emit_stop_event): Update.
6145 * python/py-signalevent.c (create_signal_event_object): Return
6146 gdbpy_ref.
6147 * python/py-infevents.c (create_inferior_call_event_object):
6148 Update.
6149 * python/py-event.h (create_event_object)
6150 (create_thread_event_object): Update.
6151 * python/py-event.c (create_event_object): Return gdbpy_ref.
6152 * python/py-continueevent.c: Return gdbpy_ref.
6153 * python/py-bpevent.c (create_breakpoint_event_object): Return
6154 gdbpy_ref.
6155
6156 2017-09-11 Tom Tromey <tom@tromey.com>
6157
6158 PR python/15622:
6159 * NEWS: Add entry.
6160 * python/python.c (do_start_initialization): Initialize new event
6161 types.
6162 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6163 (gdbpy_initialize_inferior_deleted_event)
6164 (gdbpy_initialize_new_thread_event): Declare.
6165 * python/py-threadevent.c (create_thread_event_object): Add option
6166 "thread" parameter.
6167 * python/py-inferior.c (new_thread_event_object_type)
6168 (new_inferior_event_object_type)
6169 (inferior_deleted_event_object_type): Declare.
6170 (python_new_inferior, python_inferior_deleted): New functions.
6171 (add_thread_object): Emit new_thread event.
6172 (gdbpy_initialize_inferior): Attach new functions to corresponding
6173 observers.
6174 (new_thread, new_inferior, inferior_deleted): Define new event
6175 types.
6176 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6177 registries.
6178 * python/py-events.h (events_object) <new_inferior,
6179 inferior_deleted, new_thread>: New fields.
6180 * python/py-event.h (create_thread_event_breakpoint): Add optional
6181 "thread" parameter.
6182
6183 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6184
6185 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6186 check current_ui instead.
6187 (internal_vproblem): Likewise.
6188
6189 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6190
6191 * thread.c (print_thread_info_1): Remove unnecessary calls to
6192 uiout->is_mi_like_p.
6193
6194 2017-09-09 Tom Tromey <tom@tromey.com>
6195
6196 * namespace.h (add_using_directive): Update.
6197 * namespace.c (add_using_directive): Change type of excludes to
6198 std::vector.
6199 * dwarf2read.c (read_import_statement): Use std::vector.
6200 (read_namespace): Update.
6201 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6202
6203 2017-09-09 Tom Tromey <tom@tromey.com>
6204
6205 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6206
6207 2017-09-09 Tom Tromey <tom@tromey.com>
6208
6209 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6210
6211 2017-09-09 Tom Tromey <tom@tromey.com>
6212
6213 * stack.c (func_command): Use gdb::def_vector.
6214
6215 2017-09-09 Tom Tromey <tom@tromey.com>
6216
6217 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6218 ui_out_emit_list, ui_out_emit_tuple.
6219 (mi_cmd_var_update): Likewise.
6220
6221 2017-09-09 Tom Tromey <tom@tromey.com>
6222
6223 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6224 ui_out_redirect_pop.
6225 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6226 ui_out_redirect_pop.
6227 * utils.c (do_ui_out_redirect_pop)
6228 (make_cleanup_ui_out_redirect_pop): Remove.
6229 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6230 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6231 * ui-out.h (ui_out_redirect_pop): New class.
6232
6233 2017-09-09 Tom Tromey <tom@tromey.com>
6234
6235 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6236 (list_available_thread_groups, mi_cmd_list_thread_groups)
6237 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6238 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6239 Likewise.
6240
6241 2017-09-09 Tom Tromey <tom@tromey.com>
6242
6243 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6244 ui_out_emit_tuple.
6245
6246 2017-09-09 Tom Tromey <tom@tromey.com>
6247
6248 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6249 * stack.c (print_frame): Use ui_out_emit_tuple.
6250 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6251 (info_spu_mailbox_command, info_spu_dma_command)
6252 (info_spu_proxydma_command): Likewise.
6253 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6254 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6255 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6256 ui_out_emit_tuple.
6257 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6258
6259 2017-09-09 Tom Tromey <tom@tromey.com>
6260
6261 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6262 (class ui_out_emit_table): Update comment.
6263 * ui-out.c (do_cleanup_table_end)
6264 (make_cleanup_ui_out_table_begin_end): Remove.
6265 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6266 (info_spu_dma_cmdlist): Likewise.
6267 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6268 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6269 ui_out_emit_table.
6270
6271 2017-09-09 Tom Tromey <tom@tromey.com>
6272
6273 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6274 ui_out_emit_list, gdb::optional.
6275
6276 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6277
6278 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6279 prototype.
6280 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6281 prototype.
6282 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6283 prototype.
6284 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6285 * ada-exp.y: Remove _initialize_ada_exp prototype.
6286 * ada-lang.c: Remove _initialize_ada_language prototype.
6287 * ada-tasks.c: Remove _initialize_tasks prototype.
6288 * addrmap.c: Remove _initialize_addrmap prototype.
6289 * agent.c: Remove _initialize_agent prototype.
6290 * aix-thread.c: Remove _initialize_aix_thread prototype.
6291 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6292 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6293 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6294 prototype.
6295 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6296 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6297 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6298 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6299 prototype.
6300 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6301 prototype.
6302 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6303 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6304 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6305 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6306 prototype.
6307 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6308 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6309 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6310 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6311 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6312 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6313 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6314 prototype.
6315 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6316 prototype.
6317 * annotate.c: Remove _initialize_annotate prototype.
6318 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6319 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6320 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6321 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6322 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6323 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6324 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6325 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6326 prototype.
6327 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6328 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6329 * auto-load.c: Remove _initialize_auto_load prototype.
6330 * auxv.c: Remove _initialize_auxv prototype.
6331 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6332 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6333 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6334 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6335 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6336 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6337 prototype.
6338 * break-catch-throw.c: Remove _initialize_break_catch_throw
6339 prototype.
6340 * breakpoint.c: Remove _initialize_breakpoint prototype.
6341 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6342 * btrace.c: Remove _initialize_btrace prototype.
6343 * charset.c: Remove _initialize_charset prototype.
6344 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6345 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6346 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6347 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6348 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6349 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6350 * coffread.c: Remove _initialize_coffread prototype.
6351 * compile/compile.c: Remove _initialize_compile prototype.
6352 * complaints.c: Remove _initialize_complaints prototype.
6353 * completer.c: Remove _initialize_completer prototype.
6354 * copying.awk: Remove _initialize_copying prototype.
6355 * copying.c: Regenerate.
6356 * core-regset.c: Remove _initialize_core_regset prototype.
6357 * corefile.c: Remove _initialize_core prototype.
6358 * corelow.c: Remove _initialize_corelow prototype.
6359 * cp-abi.c: Remove _initialize_cp_abi prototype.
6360 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6361 * cp-support.c: Remove _initialize_cp_support prototype.
6362 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6363 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6364 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6365 * ctf.c: Remove _initialize_ctf prototype.
6366 * d-lang.c: Remove _initialize_d_language prototype.
6367 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6368 prototype.
6369 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6370 * dbxread.c: Remove _initialize_dbxread prototype.
6371 * dcache.c: Remove _initialize_dcache prototype.
6372 * demangle.c: Remove _initialize_demangler prototype.
6373 * disasm-selftests.c: Remove _initialize_disasm_selftests
6374 prototype.
6375 * disasm.c: Remove _initialize_disasm prototype.
6376 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6377 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6378 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6379 prototype.
6380 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6381 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6382 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6383 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6384 * elfread.c: Remove _initialize_elfread prototype.
6385 * exec.c: Remove _initialize_exec prototype.
6386 * extension.c: Remove _initialize_extension prototype.
6387 * f-lang.c: Remove _initialize_f_language prototype.
6388 * f-valprint.c: Remove _initialize_f_valprint prototype.
6389 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6390 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6391 * filesystem.c: Remove _initialize_filesystem prototype.
6392 * findcmd.c: Remove _initialize_mem_search prototype.
6393 * fork-child.c: Remove _initialize_fork_child prototype.
6394 * frame-base.c: Remove _initialize_frame_base prototype.
6395 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6396 * frame.c: Remove _initialize_frame prototype.
6397 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6398 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6399 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6400 * gcore.c: Remove _initialize_gcore prototype.
6401 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6402 * gdbarch.c: Regenerate.
6403 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6404 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6405 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6406 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6407 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6408 * go-lang.c: Remove _initialize_go_language prototype.
6409 * go32-nat.c: Remove _initialize_go32_nat prototype.
6410 * guile/guile.c: Remove _initialize_guile prototype.
6411 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6412 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6413 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6414 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6415 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6416 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6417 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6418 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6419 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6420 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6421 prototype.
6422 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6423 prototype.
6424 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6425 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6426 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6427 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6428 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6429 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6430 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6431 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6432 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6433 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6434 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6435 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6436 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6437 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6438 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6439 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6440 prototype.
6441 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6442 prototype.
6443 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6444 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6445 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6446 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6447 * infcall.c: Remove _initialize_infcall prototype.
6448 * infcmd.c: Remove _initialize_infcmd prototype.
6449 * inferior.c: Remove _initialize_inferiors prototype.
6450 * inflow.c: Remove _initialize_inflow prototype.
6451 * infrun.c: Remove _initialize_infrun prototype.
6452 * interps.c: Remove _initialize_interpreter prototype.
6453 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6454 * jit.c: Remove _initialize_jit prototype.
6455 * language.c: Remove _initialize_language prototype.
6456 * linux-fork.c: Remove _initialize_linux_fork prototype.
6457 * linux-nat.c: Remove _initialize_linux_nat prototype.
6458 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6459 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6460 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6461 * m2-lang.c: Remove _initialize_m2_language prototype.
6462 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6463 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6464 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6465 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6466 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6467 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6468 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6469 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6470 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6471 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6472 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6473 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6474 * machoread.c: Remove _initialize_machoread prototype.
6475 * macrocmd.c: Remove _initialize_macrocmd prototype.
6476 * macroscope.c: Remove _initialize_macroscope prototype.
6477 * maint.c: Remove _initialize_maint_cmds prototype.
6478 * mdebugread.c: Remove _initialize_mdebugread prototype.
6479 * memattr.c: Remove _initialize_mem prototype.
6480 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6481 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6482 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6483 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6484 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6485 * microblaze-linux-tdep.c: Remove
6486 _initialize_microblaze_linux_tdep prototype.
6487 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6488 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6489 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6490 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6491 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6492 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6493 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6494 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6495 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6496 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6497 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6498 prototype.
6499 * mipsread.c: Remove _initialize_mipsread prototype.
6500 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6501 prototype.
6502 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6503 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6504 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6505 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6506 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6507 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6508 prototype.
6509 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6510 * nto-procfs.c: Remove _initialize_procfs prototype.
6511 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6512 * objc-lang.c: Remove _initialize_objc_language prototype.
6513 * objfiles.c: Remove _initialize_objfiles prototype.
6514 * observer.c: Remove observer_test_first_notification_function,
6515 observer_test_second_notification_function,
6516 observer_test_third_notification_function, and
6517 _initialize_observer prototypes.
6518 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6519 * osabi.c: Remove _initialize_gdb_osabi prototype.
6520 * osdata.c: Remove _initialize_osdata prototype.
6521 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6522 * parse.c: Remove _initialize_parse prototype.
6523 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6524 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6525 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6526 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6527 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6528 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6529 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6530 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6531 * printcmd.c: Remove _initialize_printcmd prototype.
6532 * probe.c: Remove _initialize_probe prototype.
6533 * proc-api.c: Remove _initialize_proc_api prototype.
6534 * proc-events.c: Remove _initialize_proc_events prototype.
6535 * proc-service.c: Remove _initialize_proc_service prototype.
6536 * procfs.c: Remove _initialize_procfs prototype.
6537 * psymtab.c: Remove _initialize_psymtab prototype.
6538 * python/python.c: Remove _initialize_python prototype.
6539 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6540 * record-btrace.c: Remove _initialize_record_btrace prototype.
6541 * record-full.c: Remove _initialize_record_full prototype.
6542 * record.c: Remove _initialize_record prototype.
6543 * regcache.c: Remove _initialize_regcache prototype.
6544 * reggroups.c: Remove _initialize_reggroup prototype.
6545 * remote-notif.c: Remove _initialize_notif prototype.
6546 * remote-sim.c: Remove _initialize_remote_sim prototype.
6547 * remote.c: Remove _initialize_remote prototype.
6548 * reverse.c: Remove _initialize_reverse prototype.
6549 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6550 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6551 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6552 prototype.
6553 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6554 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6555 * rust-exp.y: Remove _initialize_rust_exp prototype.
6556 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6557 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6558 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6559 * score-tdep.c: Remove _initialize_score_tdep prototype.
6560 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6561 prototype.
6562 * ser-go32.c: Remove _initialize_ser_dos prototype.
6563 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6564 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6565 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6566 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6567 * serial.c: Remove _initialize_serial prototype.
6568 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6569 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6570 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6571 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6572 * skip.c: Remove _initialize_step_skip prototype.
6573 * sol-thread.c: Remove _initialize_sol_thread prototype.
6574 * solib-aix.c: Remove _initialize_solib_aix prototype.
6575 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6576 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6577 * solib-frv.c: Remove _initialize_frv_solib prototype.
6578 * solib-spu.c: Remove _initialize_spu_solib prototype.
6579 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6580 * solib-target.c: Remove _initialize_solib_target prototype.
6581 * solib.c: Remove _initialize_solib prototype.
6582 * source.c: Remove _initialize_source prototype.
6583 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6584 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6585 prototype.
6586 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6587 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6588 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6589 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6590 prototype.
6591 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6592 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6593 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6594 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6595 prototype.
6596 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6597 prototype.
6598 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6599 prototype.
6600 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6601 prototype.
6602 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6603 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6604 prototype.
6605 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6606 prototype.
6607 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6608 prototype.
6609 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6610 prototype.
6611 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6612 prototype.
6613 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6614 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6615 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6616 * stabsread.c: Remove _initialize_stabsread prototype.
6617 * stack.c: Remove _initialize_stack prototype.
6618 * stap-probe.c: Remove _initialize_stap_probe prototype.
6619 * std-regs.c: Remove _initialize_frame_reg prototype.
6620 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6621 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6622 * symfile.c: Remove _initialize_symfile prototype.
6623 * symmisc.c: Remove _initialize_symmisc prototype.
6624 * symtab.c: Remove _initialize_symtab prototype.
6625 * target-dcache.c: Remove _initialize_target_dcache prototype.
6626 * target-descriptions.c: Remove _initialize_target_descriptions
6627 prototype.
6628 * thread.c: Remove _initialize_thread prototype.
6629 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6630 prototype.
6631 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6632 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6633 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6634 prototype.
6635 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6636 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6637 * tracefile.c: Remove _initialize_tracefile prototype.
6638 * tracepoint.c: Remove _initialize_tracepoint prototype.
6639 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6640 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6641 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6642 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6643 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6644 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6645 * tui/tui.c: Remove _initialize_tui prototype.
6646 * typeprint.c: Remove _initialize_typeprint prototype.
6647 * user-regs.c: Remove _initialize_user_regs prototype.
6648 * utils.c: Remove _initialize_utils prototype.
6649 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6650 * valarith.c: Remove _initialize_valarith prototype.
6651 * valops.c: Remove _initialize_valops prototype.
6652 * valprint.c: Remove _initialize_valprint prototype.
6653 * value.c: Remove _initialize_values prototype.
6654 * varobj.c: Remove _initialize_varobj prototype.
6655 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6656 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6657 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6658 * windows-nat.c: Remove _initialize_windows_nat,
6659 _initialize_check_for_gdb_ini, and _initialize_loadable
6660 prototypes.
6661 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6662 * xcoffread.c: Remove _initialize_xcoffread prototype.
6663 * xml-support.c: Remove _initialize_xml_support prototype.
6664 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6665 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6666 prototype.
6667 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6668 prototype.
6669 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6670
6671 2017-09-08 Keith Seitz <keiths@redhat.com>
6672
6673 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6674 field.
6675
6676 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6677
6678 * f-valprint.c (f_val_print): Remove check for one byte
6679 sized integers. Remove printing of character type.
6680
6681 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6682 Christoph Weinmann <christoph.t.weinmann@intel.com>
6683 Bernhard Heckel <bernhard.heckel@intel.com>
6684
6685 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6686 to maintain proper indentation when printing pointers/refs.
6687
6688 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6689
6690 GDB 8.0.1 released.
6691
6692 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6693
6694 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6695
6696 2017-09-05 Tom Tromey <tom@tromey.com>
6697
6698 * parse.c (funcall_chain): Now a std::vector.
6699 (start_arglist, end_arglist): Simplify.
6700 (free_funcalls): Remove.
6701 (parse_exp_in_context_1): Remove cleanup.
6702
6703 2017-09-05 Tom Tromey <tom@tromey.com>
6704
6705 * go-exp.y (go_parse): Don't create a cleanup.
6706
6707 2017-09-05 Tom Tromey <tom@tromey.com>
6708
6709 * d-exp.y (PrimaryExpression): Use std::string.
6710 (d_parse): Don't create a cleanup.
6711
6712 2017-09-05 Tom Tromey <tom@tromey.com>
6713
6714 * utils.c (do_clear_parser_state): Remove.
6715 (make_cleanup_clear_parser_state): Remove.
6716 * p-exp.y (pascal_parse): Use scoped_restore.
6717 * m2-exp.y (m2_parse): Use scoped_restore.
6718 * f-exp.y (f_parse): Use scoped_restore.
6719 * d-exp.y (d_parse): Use scoped_restore.
6720 * c-exp.y (c_parse): Use scoped_restore.
6721 * ada-exp.y (ada_parse): Use scoped_restore.
6722 * utils.h (make_cleanup_clear_parser_state): Remove.
6723
6724 2017-09-06 Keith Seitz <keiths@redhat.com>
6725
6726 * dwarf2read.c (dw2_linkage_name_attr): New function.
6727 (dw2_linkage_name): New function.
6728 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6729 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6730 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6731
6732 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6733
6734 * config/djgpp/djconfig.sh: Correct shell portability issue.
6735
6736 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6737
6738 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6739
6740 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6741
6742 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6743 * NEWS: Mention new FreeBSD/mips native configuration.
6744 * configure.host: Add aarch64*-*-freebsd*.
6745 * configure.nat: Likewise.
6746 * aarch64-fbsd-nat.c: New file.
6747
6748 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6749
6750 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6751 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6752 * NEWS: Mention new FreeBSD/aarch64 target.
6753 * configure.tgt: Add aarch64*-*-freebsd*.
6754 * aarch64-fbsd-tdep.c: New file.
6755 * aarch64-fbsd-tdep.h: New file.
6756
6757 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6758
6759 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6760
6761 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6762
6763 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6764 of TLS symbols.
6765
6766 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6767
6768 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6769 call.
6770
6771 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6772
6773 * infrun.c (follow_exec): Call add_thread after
6774 target_find_description.
6775
6776 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6777
6778 * infrun.c (handle_inferior_event_1): When exec'ing, read
6779 stop_pc after follow_exec.
6780
6781 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6782
6783 * remote.c (process_g_packet): Update error message.
6784
6785 2017-09-05 Yao Qi <yao.qi@linaro.org>
6786
6787 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6788 targets.
6789
6790 2017-09-05 Pedro Alves <palves@redhat.com>
6791
6792 * eval.c (eval_call, evaluate_funcall): New functions, factored
6793 out from ...
6794 (evaluate_subexp_standard): ... this.
6795
6796 2017-09-05 Yao Qi <yao.qi@linaro.org>
6797
6798 * amd64-tdep.c (amd64_target_description): Create target
6799 descriptions.
6800 (_initialize_amd64_tdep): Don't call functions
6801 initialize_tdesc_amd64_*. Add self tests.
6802 * arch/amd64.c (amd64_create_target_description): Add parameter
6803 is_linux. Call set_tdesc_osabi if is_linux is true.
6804 * arch/amd64.h (amd64_create_target_description): Update the
6805 declaration.
6806 * arch/i386.c (i386_create_target_description): Add parameter
6807 is_linux. Call set_tdesc_osabi if is_linux is true.
6808 * arch/i386.h (i386_create_target_description): Update
6809 declaration.
6810 * configure.tgt: Add i386.o to gdb_target_obs.
6811 * features/Makefile (XMLTOC): Remove i386/*.xml.
6812 * features/i386/amd64-avx-avx512.c: Remove.
6813 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6814 * features/i386/amd64-avx-mpx.c: Remove.
6815 * features/i386/amd64-avx.c: Remove.
6816 * features/i386/amd64-mpx.c: Remove.
6817 * features/i386/amd64.c: Remove.
6818 * features/i386/i386-avx-avx512.c: Remove.
6819 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6820 * features/i386/i386-avx-mpx.c: Remove.
6821 * features/i386/i386-avx.c: Remove.
6822 * features/i386/i386-mmx.c: Remove.
6823 * features/i386/i386-mpx.c: Remove.
6824 * features/i386/i386.c: Remove.
6825 * i386-tdep.c: Don't include features/i386/i386*.c., include
6826 target-descriptions.h and arch/i386.h.
6827 (i386_target_description): Create target descriptions.
6828 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6829 functions. Do self tests.
6830
6831 2017-09-05 Yao Qi <yao.qi@linaro.org>
6832
6833 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6834 * features/i386/amd64-avx-avx512-linux.c: Removed.
6835 * features/i386/amd64-avx-linux.c: Removed.
6836 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6837 * features/i386/amd64-avx-mpx-linux.c: Removed.
6838 * features/i386/amd64-linux.c: Removed.
6839 * features/i386/amd64-mpx-linux.c: Removed.
6840 * features/i386/x32-avx-avx512-linux.c: Removed.
6841 * features/i386/x32-avx-linux.c: Removed.
6842 * features/i386/x32-linux.c: Removed.
6843
6844 2017-09-05 Yao Qi <yao.qi@linaro.org>
6845
6846 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6847 features/i386/*.c.
6848 (amd64_linux_read_description): Call
6849 amd64_create_target_description.
6850 * arch/amd64.c: New file.
6851 * arch/amd64.h: New file.
6852 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6853 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6854
6855 2017-09-05 Yao Qi <yao.qi@linaro.org>
6856
6857 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6858 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6859 (amd64_linux_read_description): Create target descriptions.
6860 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6861 functions. Add unit tests.
6862 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6863 x32-core.xml.
6864 * features/i386/64bit-avx.c: Generated.
6865 * features/i386/64bit-avx512.c: Generated.
6866 * features/i386/64bit-core.c: Generated.
6867 * features/i386/64bit-linux.c: Generated.
6868 * features/i386/64bit-mpx.c: Generated.
6869 * features/i386/64bit-pkeys.c: Generated.
6870 * features/i386/64bit-segments.c: Generated.
6871 * features/i386/64bit-sse.c: Generated.
6872 * features/i386/x32-core.c: Generated.
6873 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6874 c files for amd64-linux and x32-linux.
6875
6876 2017-09-05 Yao Qi <yao.qi@linaro.org>
6877
6878 * amd64-linux-tdep.c (amd64_linux_read_description): New
6879 function.
6880 (amd64_linux_core_read_description): Call
6881 amd64_linux_read_description.
6882 (amd64_linux_init_abi): Likewise.
6883 (amd64_x32_linux_init_abi): Likewise.
6884 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6885 * x86-linux-nat.c (x86_linux_read_description): Call
6886 amd64_linux_read_description.
6887
6888 2017-09-05 Yao Qi <yao.qi@linaro.org>
6889
6890 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6891 comments.
6892
6893 2017-09-05 Yao Qi <yao.qi@linaro.org>
6894
6895 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6896 * features/i386/i386-avx-avx512-linux.c: Remove.
6897 * features/i386/i386-avx-linux.c: Remove.
6898 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6899 * features/i386/i386-avx-mpx-linux.c: Remove.
6900 * features/i386/i386-linux.c: Remove.
6901 * features/i386/i386-mmx-linux.c: Remove.
6902 * features/i386/i386-mpx-linux.c: Remove.
6903
6904 2017-09-05 Yao Qi <yao.qi@linaro.org>
6905
6906 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6907 (SFILES): Add arch/i386.c.
6908 (HFILES_NO_SRCDIR): Add arch/i386.h.
6909 * arch/i386.c: New file.
6910 * arch/i386.h: New file.
6911 * arch/tdesc.h (allocate_target_description): Declare.
6912 (set_tdesc_architecture): Declare.
6913 (set_tdesc_osabi): Declare.
6914 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6915 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6916 include arch/i386.h.
6917 (i386_linux_read_description): Remove code and call
6918 i386_create_target_description.
6919 (set_tdesc_architecture): New function.
6920 (set_tdesc_osabi): New function.
6921 * target-descriptions.h (allocate_target_description): Remove.
6922
6923 2017-09-05 Yao Qi <yao.qi@linaro.org>
6924
6925 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6926 * target-descriptions.c (tdesc_create_feature): Likewise, and
6927 adjust code.
6928 * features/i386/32bit-avx.c: Re-generated.
6929 * features/i386/32bit-avx512.c: Re-generated.
6930 * features/i386/32bit-core.c: Re-generated.
6931 * features/i386/32bit-linux.c: Re-generated.
6932 * features/i386/32bit-mpx.c: Re-generated.
6933 * features/i386/32bit-pkeys.c: Re-generated.
6934 * features/i386/32bit-sse.c: Re-generated.
6935
6936 2017-09-05 Yao Qi <yao.qi@linaro.org>
6937
6938 * regformats/regdef.h (struct reg): Override operator == and !=.
6939
6940 2017-09-05 Yao Qi <yao.qi@linaro.org>
6941
6942 * arch/tdesc.h: New file.
6943 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6944 * target-descriptions.c: Update comments.
6945 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6946 declarations.
6947 * features/i386/32bit-avx.c: Re-generated.
6948 * features/i386/32bit-avx512.c: Re-generated.
6949 * features/i386/32bit-core.c: Re-generated.
6950 * features/i386/32bit-linux.c: Re-generated.
6951 * features/i386/32bit-mpx.c: Re-generated.
6952 * features/i386/32bit-pkeys.c: Re-generated.
6953 * features/i386/32bit-sse.c: Re-generated.
6954
6955 2017-09-05 Yao Qi <yao.qi@linaro.org>
6956
6957 * regformats/regdat.sh: Update generated code.
6958
6959 2017-09-05 Yao Qi <yao.qi@linaro.org>
6960
6961 * regformats/regdat.sh: Adjust code order.
6962
6963 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6964
6965 * expprint.c (dump_subexp_body_standard): Use constant format
6966 string in fprintf_filtered call.
6967
6968 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6969
6970 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6971 NetBSD/i386.
6972 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6973
6974 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6975
6976 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6977
6978 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6979
6980 * bsd-kvm.o: Define _KMEMUSER.
6981 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6982 * configure: Regenerate.
6983
6984 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6985
6986 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6987 * i386-fbsd-nat.c: Likewise.
6988
6989 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6990
6991 * unittests/array-view-selftests.c: Add include of <array>.
6992
6993 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6994
6995 * spu-tdep.c (flush_ea_cache): Add missing argument to
6996 call_function_by_hand.
6997
6998 2017-09-04 Pedro Alves <palves@redhat.com>
6999
7000 * NEWS (Safer support for debugging with no debug info): New.
7001
7002 2017-09-04 Pedro Alves <palves@redhat.com>
7003
7004 * c-exp.y (function_method, function_method_void): Add current
7005 instance flags to TYPE_INSTANCE.
7006 * dwarf2read.c (check_modifier): New.
7007 (compute_delayed_physnames): Assert that only C++ adds delayed
7008 physnames. Mark fn_fields as const/volatile depending on
7009 physname.
7010 * eval.c (make_params): New type_instance_flags parameter. Use
7011 it as the new type's instance flags.
7012 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7013 flags element and pass it to make_params.
7014 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7015 instance flags element.
7016 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7017 * gdbtypes.h: Include "enum-flags.h".
7018 (type_instance_flags): New enum-flags type.
7019 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7020 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7021 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7022 (follow_type_instance_flags): New function.
7023 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7024 * parser-defs.h (follow_type_instance_flags): Declare.
7025 * valops.c (value_struct_elt_for_reference): const/volatile must
7026 match too.
7027
7028 2017-09-04 Pedro Alves <palves@redhat.com>
7029
7030 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7031 function/method scopes; lookup the nested name as a function local
7032 static variable.
7033
7034 2017-09-04 Pedro Alves <palves@redhat.com>
7035
7036 (%type <voidval>): Add function_method.
7037 * c-exp.y (exp): New production for calls with no arguments.
7038 (function_method, function_method_void_or_typelist): New
7039 productions.
7040 (exp): New production for "method()::static_var".
7041 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7042 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7043 Handle OP_FUNC_STATIC_VAR.
7044 * parse.c (operator_length_standard):
7045 Handle OP_FUNC_STATIC_VAR.
7046
7047 2017-09-04 Pedro Alves <palves@redhat.com>
7048
7049 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7050 handling.
7051 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7052 Ditto.
7053 * parse.c (operator_length_standard, operator_check_standard):
7054 Ditto.
7055 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7056
7057 2017-09-04 Pedro Alves <palves@redhat.com>
7058
7059 * ax-gdb.c: Include "typeprint.h".
7060 (gen_expr_for_cast): New function.
7061 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7062 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7063 type is unknown.
7064 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7065 nodebug_data_symbol.
7066 * eval.c: Include "typeprint.h".
7067 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7068 Error out if symbol has unknown type.
7069 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7070 evaluate_subexp_for_cast.
7071 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7072 OP_VAR_MSYM_VALUE.
7073 (evaluate_subexp_for_cast): New function.
7074 * gdbtypes.c (init_nodebug_var_type): New function.
7075 (objfile_type): Use it to initialize types of variables with no
7076 debug info.
7077 * typeprint.c (error_unknown_type): New.
7078 * typeprint.h (error_unknown_type): New declaration.
7079 * compile/compile-c-types.c (convert_type_basic): Handle
7080 TYPE_CODE_ERROR; warn and fallback to int for variables with
7081 unknown type.
7082
7083 2017-09-04 Pedro Alves <palves@redhat.com>
7084
7085 * eval.c (evaluate_var_value): New function, factored out from ...
7086 (evaluate_subexp_standard): ... here.
7087
7088 2017-09-04 Pedro Alves <palves@redhat.com>
7089
7090 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7091 Remove useless assignments to 'op'.
7092
7093 2017-09-04 Pedro Alves <palves@redhat.com>
7094
7095 * eval.c (eval_skip_value): New function.
7096 (evaluate_subexp_standard): Use it.
7097
7098 2017-09-04 Pedro Alves <palves@redhat.com>
7099
7100 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7101 function name from symbol/minsym and pass it to
7102 error_call_unknown_return_type.
7103
7104 2017-09-04 Pedro Alves <palves@redhat.com>
7105
7106 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7107 * ax-gdb.c (gen_msym_var_ref): New function.
7108 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7109 * eval.c (evaluate_var_msym_value): New function.
7110 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7111 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7112 to call_function_by_hand.
7113 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7114 Handle OP_VAR_MSYM_VALUE.
7115 (union exp_element) <msymbol>: New field.
7116 * minsyms.h (struct type): Forward declare.
7117 (find_minsym_type_and_address): Declare.
7118 * parse.c (write_exp_elt_msym): New function.
7119 (write_exp_msymbol): Delete, refactored as ...
7120 (find_minsym_type_and_address): ... this new function.
7121 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7122 (operator_length_standard, operator_check_standard): Handle
7123 OP_VAR_MSYM_VALUE.
7124 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7125
7126 2017-09-04 Pedro Alves <palves@redhat.com>
7127
7128 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7129 TYPE_GNU_IFUNC specially here. Throw error if return type is
7130 unknown.
7131 * ada-typeprint.c (print_func_type): Handle functions with unknown
7132 return type.
7133 * c-typeprint.c (c_type_print_base): Handle functions and methods
7134 with unknown return type.
7135 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7136 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7137 * compile/compile-c-types.c: Include "objfiles.h".
7138 (convert_func): For functions with unknown return type, warn and
7139 default to int.
7140 * compile/compile-object-run.c (compile_object_run): Adjust call
7141 to call_function_by_hand_dummy.
7142 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7143 call_function_by_hand.
7144 * eval.c (evaluate_subexp_standard): Adjust calls to
7145 call_function_by_hand. Handle functions and methods with unknown
7146 return type. Pass expect_type to call_function_by_hand.
7147 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7148 return type.
7149 * gcore.c (call_target_sbrk): Adjust call to
7150 call_function_by_hand.
7151 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7152 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7153 an integer address type instead of nodebug.
7154 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7155 call_function_by_hand.
7156 * infcall.c (error_call_unknown_return_type): New function.
7157 (call_function_by_hand): New "default_return_type" parameter.
7158 Pass it down.
7159 (call_function_by_hand_dummy): New "default_return_type"
7160 parameter. Use it instead of defaulting to int. If there's no
7161 default and the return type is unknown, throw an error. If
7162 there's a default return type, and the called function has no
7163 debug info, then assume the function is prototyped.
7164 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7165 New "default_return_type" parameter.
7166 (error_call_unknown_return_type): New declaration.
7167 * linux-fork.c (call_lseek): Cast return type of lseek.
7168 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7169 call_function_by_hand.
7170 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7171 calls to call_function_by_hand.
7172 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7173 return type.
7174 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7175 (value_nsstring, print_object_command): Adjust calls to
7176 call_function_by_hand.
7177 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7178 functions with unknown return type.
7179 (pascal_type_print_func_varspec_suffix): New function.
7180 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7181 TYPE_CODE_METHOD>: Use it.
7182 * python/py-value.c (valpy_call): Adjust call to
7183 call_function_by_hand.
7184 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7185 call_function_by_hand.
7186 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7187 call_function_by_hand.
7188 * valops.c (value_allocate_space_in_inferior): Adjust call to
7189 call_function_by_hand.
7190 * typeprint.c (type_print_unknown_return_type): New function.
7191 * typeprint.h (type_print_unknown_return_type): New declaration.
7192
7193 2017-09-04 Pedro Alves <palves@redhat.com>
7194
7195 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7196 types with more than one parameter as prototyped.
7197
7198 2017-09-04 Pedro Alves <palves@redhat.com>
7199
7200 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7201 (disassemble_command): Use gdb_disassembly_flags instead of bare
7202 int.
7203 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7204 (dump_insns, do_mixed_source_and_assembly_deprecated)
7205 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7206 Use gdb_disassembly_flags instead of bare int.
7207 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7208 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7209 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7210 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7211 (enum gdb_disassembly_flag): ... values of this new enumeration.
7212 (gdb_disassembly_flags): Define.
7213 (gdb_disassembly)
7214 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7215 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7216 gdb_disassembly_flags instead of bare int.
7217 * record-btrace.c (btrace_insn_history)
7218 (record_btrace_insn_history, record_btrace_insn_history_range)
7219 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7220 instead of bare int.
7221 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7222 Use gdb_disassembly_flags instead of bare int.
7223 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7224 Define.
7225 * target-delegates.c: Regenerate.
7226 * target.c (target_insn_history, target_insn_history_from)
7227 (target_insn_history_range): Use gdb_disassembly_flags instead of
7228 bare int.
7229 * target.h: Include "disasm.h".
7230 (struct target_ops) <to_insn_history, to_insn_history_from,
7231 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7232 int.
7233 (target_insn_history, target_insn_history_from)
7234 (target_insn_history_range): Use gdb_disassembly_flags instead of
7235 bare int.
7236
7237 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7238
7239 * cli/cli-script.c (build_command_line): For if/while commands,
7240 check whether args is empty.
7241
7242 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7243
7244 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7245 (enum command_control_type): Likewise.
7246 (struct command_line): Likewise.
7247 (free_command_lines): Likewise.
7248 (struct command_lines_deleter): Likewise.
7249 (command_line_up): Likewise.
7250 (read_command_lines): Likewise.
7251 (read_command_lines_1): Likewise.
7252 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7253 (enum command_control_type): Likewise.
7254 (struct command_line): Likewise.
7255 (free_command_lines): Likewise.
7256 (struct command_lines_deleter): Likewise.
7257 (command_line_up): Likewise.
7258 (read_command_lines): Likewise.
7259 (read_command_lines_1): Likewise.
7260 * breakpoint.h: Include cli/cli-script.h.
7261 * extension-priv.h: Likewise.
7262 * gdbcmd.h: Likewise.
7263
7264 2017-09-04 Pedro Alves <palves@redhat.com>
7265
7266 * ada-lang.c (is_known_support_routine): Move sal declaration to
7267 where it is initialized.
7268 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7269 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7270 (clear_command, update_static_tracepoint): Remove init_sal
7271 references. Move declarations closer to initializations.
7272 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7273 initializations.
7274 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7275 references. Move sal declarations closer to initializations.
7276 * frame.c (find_frame_sal): Return a symtab_and_line via function
7277 return instead of output parameter. Remove init_sal references.
7278 * frame.h (find_frame_sal): Return a symtab_and_line via function
7279 return instead of output parameter.
7280 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7281 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7282 instead of memset.
7283 (gdbscm_find_pc_line): Remove init_sal reference.
7284 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7285 references. Move declarations closer to initializations.
7286 * infcmd.c (set_step_frame): Update. Move declarations closer to
7287 initializations.
7288 (finish_backward): Remove init_sal references. Move declarations
7289 closer to initializations.
7290 * infrun.c (process_event_stop_test, handle_step_into_function)
7291 (insert_hp_step_resume_breakpoint_at_frame)
7292 (insert_step_resume_breakpoint_at_caller): Likewise.
7293 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7294 (symbol_to_sal): Likewise.
7295 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7296 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7297 to its initialization.
7298 * reverse.c (save_bookmark_command): Use new/delete. Remove
7299 init_sal references. Move declarations closer to initializations.
7300 * source.c (get_current_source_symtab_and_line): Remove brace
7301 initialization.
7302 (set_current_source_symtab_and_line): Now takes the sal by const
7303 reference. Remove brace initialization.
7304 (line_info): Remove init_sal reference.
7305 * source.h (set_current_source_symtab_and_line): Now takes a
7306 symtab_and_line via const reference.
7307 * stack.c (set_current_sal_from_frame): Adjust.
7308 (print_frame_info): Adjust.
7309 (get_last_displayed_sal): Return the sal via function return
7310 instead of via output parameter. Simplify.
7311 (frame_info): Adjust.
7312 * stack.h (get_last_displayed_sal): Return the sal via function
7313 return instead of via output parameter.
7314 * symtab.c (init_sal): Delete.
7315 (find_pc_sect_line): Remove init_sal references. Move
7316 declarations closer to initializations.
7317 (find_function_start_sal): Remove init_sal references. Move
7318 declarations closer to initializations.
7319 * symtab.h (struct symtab_and_line): In-class initialize all
7320 fields.
7321 * tracepoint.c (set_traceframe_context)
7322 (print_one_static_tracepoint_marker): Remove init_sal references.
7323 Move declarations closer to initializations.
7324 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7325 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7326 declarations closer to initializations.
7327 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7328 init_sal references. Adjust.
7329
7330 2017-09-04 Pedro Alves <palves@redhat.com>
7331
7332 * ax-gdb.c (agent_command_1): Use range-for.
7333 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7334 * breakpoint.c: Include "common/array-view.h".
7335 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7336 parameter from struct symtabs_and_lines to
7337 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7338 (breakpoint_sals_to_pc): Change sals parameter from struct
7339 symtabs_and_lines to std::vector reference.
7340 (check_fast_tracepoint_sals): Change sals parameter from struct
7341 symtabs_and_lines to std::array_view. Use range-for.
7342 (decode_static_tracepoint_spec): Return a std::vector instead of
7343 symtabs_and_lines. Update.
7344 (create_breakpoint): Update.
7345 (break_range_command, until_break_command, clear_command): Update.
7346 (base_breakpoint_decode_location, bkpt_decode_location)
7347 (bkpt_probe_create_sals_from_location)
7348 (bkpt_probe_decode_location, tracepoint_decode_location)
7349 (tracepoint_probe_decode_location)
7350 (strace_marker_create_sals_from_location): Return a std::vector
7351 instead of symtabs_and_lines.
7352 (strace_marker_create_breakpoints_sal): Update.
7353 (strace_marker_decode_location): Return a std::vector instead of
7354 symtabs_and_lines. Update.
7355 (update_breakpoint_locations): Change struct symtabs_and_lines
7356 parameters to gdb::array_view. Adjust.
7357 (location_to_sals): Return a std::vector instead of
7358 symtabs_and_lines. Update.
7359 (breakpoint_re_set_default): Use std::vector instead of struct
7360 symtabs_and_lines.
7361 (decode_location_default): Return a std::vector instead of
7362 symtabs_and_lines. Update.
7363 * breakpoint.h: Include "common/array-view.h".
7364 (struct breakpoint_ops) <decode_location>: Now returns a
7365 std::vector instead of returning a symtabs_and_lines via output
7366 parameter.
7367 (update_breakpoint_locations): Change sals parameters to use
7368 gdb::array_view.
7369 * cli/cli-cmds.c (edit_command, list_command): Update to use
7370 std::vector and gdb::array_view.
7371 (ambiguous_line_spec): Adjust to use gdb::array_view and
7372 range-for.
7373 (compare_symtabs): Rename to ...
7374 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7375 const reference and adjust.
7376 (filter_sals): Rewrite using std::vector and standard algorithms.
7377 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7378 (jump_command): Update to use std::vector.
7379 * linespec.c (struct linespec_state) <canonical_names>: Update
7380 comment.
7381 (add_sal_to_sals_basic): Delete.
7382 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7383 (decode_line_2, create_sals_line_offset)
7384 (convert_address_location_to_sals, convert_linespec_to_sals)
7385 (convert_explicit_location_to_sals, parse_linespec)
7386 (event_location_to_sals, decode_line_full, decode_line_1)
7387 (decode_line_with_current_source)
7388 (decode_line_with_last_displayed, decode_objc)
7389 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7390 (linespec_result::~linespec_result): Adjust to use std::vector
7391 instead of symtabs_and_lines.
7392 * linespec.h (linespec_sals::sals): Now a std::vector.
7393 (struct linespec_result): Use std::vector, bool, and in-class
7394 initialization.
7395 (decode_line_1, decode_line_with_current_source)
7396 (decode_line_with_last_displayed): Return std::vector.
7397 * macrocmd.c (info_macros_command): Use std::vector.
7398 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7399 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7400 std::vector.
7401 * probe.h (parse_probes): Return a std::vector.
7402 * python/python.c (gdbpy_decode_line): Use std::vector and
7403 gdb::array_view.
7404 * source.c (select_source_symtab, line_info): Use std::vector.
7405 * stack.c (func_command): Use std::vector.
7406 * symtab.h (struct symtabs_and_lines): Delete.
7407 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7408
7409 2017-09-04 Pedro Alves <palves@redhat.com>
7410
7411 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7412 unittests/array-view-selftests.c.
7413 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7414 * common/array-view.h: New file.
7415 * unittests/array-view-selftests.c: New file.
7416
7417 2017-09-04 Pedro Alves <palves@redhat.com>
7418
7419 * cli/cli-cmds.c (edit_command): Pass message to
7420 ambiguous_line_spec.
7421 (list_command): Pass message to ambiguous_line_spec. Say
7422 "first"/"last" instead of "start" and "end" to be consistent with
7423 the manual.
7424 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7425 them to print formatted message.
7426
7427 2017-09-04 Pedro Alves <palves@redhat.com>
7428
7429 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7430 ftrace_update_insns by reference instead of pointer.
7431
7432 2017-09-04 Yao Qi <yao.qi@linaro.org>
7433
7434 * i386-go32-tdep.c: Include x86-xstate.h.
7435 (i386_go32_init_abi): Call i386_target_description.
7436 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7437 if xcr0 is X86_XSTATE_X87_MASK.
7438 * i386-tdep.h (tdesc_i386): Remove the declaration.
7439 (tdesc_i386_mmx): Likewise.
7440
7441 2017-09-04 Yao Qi <yao.qi@linaro.org>
7442
7443 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7444 X86_XSTATE_SSE_MASK instead of 0.
7445
7446 2017-09-04 Yao Qi <yao.qi@linaro.org>
7447
7448 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7449 i386_target_description.
7450 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7451 i386_target_description.
7452 * i386-tdep.c (i386_gdbarch_init): Likewise.
7453
7454 2017-09-04 Yao Qi <yao.qi@linaro.org>
7455
7456 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7457 (x86_darwin_init_abi_64): Call amd64_target_description.
7458 * amd64-dicos-tdep.c: Likewise.
7459 * amd64-fbsd-nat.c: Likewise.
7460 * amd64-fbsd-tdep.c: Likewise.
7461 * amd64-nbsd-tdep.c: Likewise.
7462 * amd64-obsd-tdep.c: Likewise.
7463 * amd64-sol2-tdep.c: Likewise.
7464 * amd64-windows-tdep.c: Likewise.
7465 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7466
7467 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7468
7469 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7470 (btrace_function) <insn>: Change type to use std::vector.
7471 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7472 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7473 ftrace_update_insns, ftrace_compute_global_level_offset,
7474 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7475 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7476 change to std::vector.
7477 (ftrace_update_insns): Adjust to change to std::vector, change
7478 type of INSN parameter.
7479 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7480 * record-btrace.c (btrace_call_history_insn_range,
7481 btrace_compute_src_line_range,
7482 record_btrace_frame_prev_register): Adjust to change to
7483 std::vector.
7484 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7485 to change to std::vector.
7486
7487 2017-09-03 Tom Tromey <tom@tromey.com>
7488
7489 * corefile.c (reopen_exec_file): Use std::string.
7490
7491 2017-09-03 Tom Tromey <tom@tromey.com>
7492
7493 * compile/compile.c (compile_register_name_mangled): Return
7494 std::string.
7495 * compile/compile-loc2c.c (pushf_register_address): Update.
7496 (pushf_register): Update.
7497 * compile/compile-c-types.c (convert_array): Update.
7498 * compile/compile-c-symbols.c (generate_vla_size): Update.
7499 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7500 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7501 (convert_one_symbol): Update.
7502 (generate_c_for_for_one_variable): Update.
7503 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7504 std::string.
7505 (generate_register_struct): Update.
7506 * compile/compile-internal.h (c_get_range_decl_name): Return a
7507 std::string.
7508 (compile_register_name_mangled): Return std::string.
7509
7510 2017-09-03 Tom Tromey <tom@tromey.com>
7511
7512 * utils.c (perror_string): Return a std::string.
7513 (throw_perror_with_name, perror_warning_with_name): Update.
7514
7515 2017-09-03 Tom Tromey <tom@tromey.com>
7516
7517 * demangle.c (demangle_command): Use std::string,
7518 unique_xmalloc_ptr.
7519
7520 2017-09-03 Tom Tromey <tom@tromey.com>
7521
7522 * cli/cli-setshow.c (do_set_command): Use std::string.
7523
7524 2017-09-03 Tom Tromey <tom@tromey.com>
7525
7526 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7527
7528 2017-09-03 Tom Tromey <tom@tromey.com>
7529
7530 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7531
7532 2017-09-03 Tom Tromey <tom@tromey.com>
7533
7534 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7535 gdb::unique_xmalloc_ptr.
7536
7537 2017-09-03 Tom Tromey <tom@tromey.com>
7538
7539 * thread.c (print_thread_info_1): Use string_printf.
7540 (thread_apply_command, thread_apply_all_command): Use
7541 std::string.
7542
7543 2017-09-03 Tom Tromey <tom@tromey.com>
7544
7545 * valprint.c (val_print_string): Update.
7546 * gdbcore.h (memory_error_message): Return std::string.
7547 * corefile.c (memory_error_message): Return std::string.
7548 (memory_error): Update.
7549 * breakpoint.c (insert_bp_location): Update.
7550
7551 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7552
7553 * target/waitstatus.h (target_waitstatus_to_string): Change
7554 return type to std::string.
7555 * target/waitstatus.c (target_waitstatus_to_string): Return
7556 std::string.
7557 * target.h (target_waitstatus_to_string): Remove declaration.
7558 * infrun.c (resume, clear_proceed_status_thread,
7559 print_target_wait_results, do_target_wait, save_waitstatus,
7560 stop_all_threads): Adjust.
7561 * record-btrace.c (record_btrace_wait): Adjust.
7562 * target-debug.h
7563 (target_debug_print_struct_target_waitstatus_p): Adjust.
7564
7565 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7566
7567 PR gdb/22046
7568 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7569 detection.
7570
7571 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7572
7573 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7574 for setting/unsetting environment variables on the remote target.
7575 (New remote packets): Add entries for QEnvironmentHexEncoded,
7576 QEnvironmentUnset and QEnvironmentReset.
7577 * common/environ.c (gdb_environ::operator=): Extend method to
7578 handle m_user_set_env_list and m_user_unset_env_list.
7579 (gdb_environ::clear): Likewise.
7580 (match_var_in_string): Change type of first parameter from 'char
7581 *' to 'const char *'.
7582 (gdb_environ::set): Extend method to handle
7583 m_user_set_env_list and m_user_unset_env_list.
7584 (gdb_environ::unset): Likewise.
7585 (gdb_environ::clear_user_set_env): New method.
7586 (gdb_environ::user_set_envp): Likewise.
7587 (gdb_environ::user_unset_envp): Likewise.
7588 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7589 m_user_unset_env_list on move constructor/assignment.
7590 (unset): Add new default parameter 'update_unset_list = true'.
7591 (clear_user_set_env): New method.
7592 (user_set_envp): Likewise.
7593 (user_unset_envp): Likewise.
7594 (m_user_set_env_list): New std::set.
7595 (m_user_unset_env_list): Likewise.
7596 * common/rsp-low.c (hex2str): New function.
7597 (bin2hex): New overload for bin2hex function.
7598 * common/rsp-low.c (hex2str): New prototype.
7599 (str2hex): New overload prototype.
7600 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7601 QEnvironmentUnset and QEnvironmentReset.
7602 (remote_protocol_features): Add QEnvironmentHexEncoded,
7603 QEnvironmentUnset and QEnvironmentReset packets.
7604 (send_environment_packet): New function.
7605 (extended_remote_environment_support): Likewise.
7606 (extended_remote_create_inferior): Call
7607 extended_remote_environment_support.
7608 (_initialize_remote): Add QEnvironmentHexEncoded,
7609 QEnvironmentUnset and QEnvironmentReset packet configs.
7610 * unittests/environ-selftests.c (gdb_selftest_env_var):
7611 New variable.
7612 (test_vector_initialization): New function.
7613 (test_init_from_host_environ): Likewise.
7614 (test_reinit_from_host_environ): Likewise.
7615 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7616 Likewise.
7617 (test_unset_set_empty_vector): Likewise.
7618 (test_vector_clear): Likewise.
7619 (test_std_move): Likewise.
7620 (test_move_constructor):
7621 (test_self_move): Likewise.
7622 (test_set_unset_reset): Likewise.
7623 (run_tests): Rewrite in terms of the functions above.
7624
7625 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7626
7627 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7628 (adi_available): Use a temp variable of type CORE_ADDR as argument
7629 3 when calling target_auxv_search.
7630 (adi_normalize_address): Use masks and xor operators to calculate
7631 normalized address.
7632 (adi_read_versions, adi_write_versions, adi_print_versions)
7633 (do_examine, do_assign): Use paddress.
7634
7635 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7636
7637 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7638 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7639 out of loop and add supply of FIR.
7640 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7641 add collect of FIR.
7642
7643 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7644
7645 PR gdb/21827
7646 * cli/cli-script.c (define_command): Don't convert command name
7647 to lower case.
7648
7649 2017-08-25 Joel Brobecker <brobecker@adacore.com>
7650
7651 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7652 Update all callers accordingly. Remove all code blocks handling
7653 the case where DISPP is not NULL.
7654
7655 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7656
7657 PR symtab/22003
7658 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7659 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7660 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7661
7662 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7663
7664 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7665 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7666 (read_comp_units_from_section): New parameter abbrev_section, use
7667 read_and_check_comp_unit_head, allocate signatured_type if needed.
7668 (create_all_comp_units): Update read_comp_units_from_section caller.
7669
7670 2017-08-23 Pedro Alves <palves@redhat.com>
7671
7672 PR remote/21852
7673 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7674 to null_ptid and switch to thread without reading the registers
7675 after adding the inferior.
7676
7677 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7678
7679 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7680 compile-gcc.
7681 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7682 (compile_to_object): Implement compile_gcc.
7683 (_initialize_compile): Install "set compile-gcc". Initialize
7684 compile_gcc.
7685
7686 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7687
7688 * compile/compile.c (compile_to_object): Conditionally call
7689 set_verbose. Conditionally call compile or compile_v0.
7690
7691 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7692
7693 * sparc64-tdep.h: (adi_normalize_address): New export.
7694 * sparc-nat.h: (open_adi_tag_fd): New export.
7695 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7696 * sparc64-linux-tdep.c:
7697 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7698 (sparc64_linux_handle_segmentation_fault): New function.
7699 (sparc64_linux_init_abi): Register
7700 sparc64_linux_handle_segmentation_fault
7701 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7702 (sparc64_addr_bits_remove): New function.
7703 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7704 (MAX_PROC_NAME_SIZE): New macro.
7705 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7706 (sparc64adilist): New variable.
7707 (adi_proc_list): New variable.
7708 (find_adi_info): New function.
7709 (add_adi_info): New function.
7710 (get_adi_info_proc): New function.
7711 (get_adi_info): New function.
7712 (info_adi_command): New function.
7713 (read_maps_entry): New function.
7714 (adi_available): New function.
7715 (adi_normalize_address): New function.
7716 (adi_align_address): New function.
7717 (adi_convert_byte_count): New function.
7718 (adi_tag_fd): New function.
7719 (adi_is_addr_mapped): New function.
7720 (adi_read_versions): New function.
7721 (adi_write_versions): New function.
7722 (adi_print_versions): New function.
7723 (do_examine): New function.
7724 (do_assign): New function.
7725 (adi_examine_command): New function.
7726 (adi_assign_command): New function.
7727 (_initialize_sparc64_adi_tdep): New function.
7728
7729 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7730
7731 * breakpoint.c (breakpoints_info): Rename to ...
7732 (info_breakpoints_command): ... this.
7733 (watchpoints_info): Rename to ...
7734 (info_watchpoints_command): ... this.
7735 (tracepoints_info): Rename to ...
7736 (info_tracepoints_command): ... this.
7737 (_initialize_breakpoint): Adjust.
7738 * dcache.c (dcache_info): Rename to ...
7739 (info_display_command): ... this.
7740 (_initialize_dcache): Adjust.
7741 * frame.h (args_info): Rename to ...
7742 (info_args_command): ... this.
7743 (locals_info): Rename to ...
7744 (info_locals_command): ... this.
7745 * infcmd.c (nofp_registers_info): Rename to ...
7746 (info_registers_command): ... this.
7747 (float_info): Rename to ...
7748 (info_float_command): ... this.
7749 (program_info): Rename to ...
7750 (info_program_command): ... this.
7751 (all_registers_info): Rename to ...
7752 (info_all_registers_command): ... this.
7753 (vector_info): Rename to ...
7754 (info_vector_command): ... this.
7755 (float_info): Rename to ...
7756 (info_float_command): ... this.
7757 (_initialize_infcmd): Adjust.
7758 * inferior.h (term_info): Rename to ...
7759 (info_terminal_command): ... this.
7760 * inflow.c (term_info): Rename to ...
7761 (info_terminal_command): ... this.
7762 (_initialize_inflow): Adjust.
7763 * infrun.c (signals_info): Rename to ...
7764 (info_signals_command): ... this.
7765 (_initialize_infrun): Adjust.
7766 * objc-lang.c (classes_info): Rename to ...
7767 (info_classes_command): ... this.
7768 (selectors_info): Rename to ...
7769 (info_selectors_command): ... this.
7770 (_initialize_objc_language): Adjust.
7771 * printcmd.c (sym_info): Rename to ...
7772 (info_symbol_command): ... this.
7773 (address_info): Rename to ...
7774 (info_address_command): ... this.
7775 (display_info): Rename to ...
7776 (info_display_command): ... this.
7777 (_initialize_printcmd): Adjust.
7778 * reverse.c (bookmarks_info): Rename to ...
7779 (info_breakpoints_command): ... this.
7780 (_initialize_reverse): Adjust.
7781 * ser-go32.c (dos_info): Rename to ...
7782 (info_serial_command): ... this.
7783 (_initialize_ser_dos): Adjust.
7784 * skip.c (skip_info): Rename to ...
7785 (info_skip_command): ... this.
7786 (_initialize_step_skip): Adjust.
7787 * source.c (line_info): Rename to ...
7788 (info_line_command): ... this.
7789 (source_info): Rename to ...
7790 (info_source_command)
7791 * stack.c (frame_info): Rename to ...
7792 (info_frame_command): ... this.
7793 (locals_info): Rename to ...
7794 (info_locals_command): ... this.
7795 (args_info): Rename to ...
7796 (info_args_command): ... this.
7797 (_initialize_stack): Adjust.
7798 * symtab.c (sources_info): Rename to ...
7799 (info_sources_command): ... this.
7800 (variables_info): Rename to ...
7801 (info_variables_command): ... this.
7802 (functions_info): Rename to ...
7803 (info_functions_command): ... this.
7804 (types_info): Rename to ...
7805 (info_types_command): ... this.
7806 (_initialize_symtab): Adjust.
7807 * target.c (target_info): Rename to ...
7808 (info_target_command): ... this.
7809 (initialize_targets): Adjust.
7810 * tracepoint.c (tvariables_info): Rename to ...
7811 (info_tvariables_command): ... this.
7812 (scope_info): Rename to ...
7813 (info_scope_command): ... this.
7814 (trace_dump_actions): Adjust.
7815 (_initialize_tracepoint): Adjust.
7816
7817 2017-08-22 Tom Tromey <tom@tromey.com>
7818
7819 * breakpoint.h (install_breakpoint): Update.
7820 * breakpoint.c (add_solib_catchpoint): Update.
7821 (install_breakpoint): Change argument to a std::unique_ptr.
7822 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7823 (create_breakpoint_sal, create_breakpoint): Update.
7824 (watch_command_1, catch_exec_command_1)
7825 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7826 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7827 Return the breakpoint.
7828 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7829 (new_single_step_breakpoint): Update.
7830 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7831 std::unique_ptr.
7832 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7833 std::unique_ptr.
7834 * break-catch-sig.c (create_signal_catchpoint): Use
7835 std::unique_ptr.
7836 * ada-lang.c (create_ada_exception_catchpoint): Use
7837 std::unique_ptr.
7838
7839 2017-08-22 Tom Tromey <tom@tromey.com>
7840
7841 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7842
7843 2017-08-22 Tom Tromey <tom@tromey.com>
7844
7845 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7846 (lookup_partial_symbol): Update.
7847
7848 2017-08-22 Tom Tromey <tom@tromey.com>
7849
7850 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7851 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7852 (find_and_open_source, symtab_to_fullname): Update.
7853 * psymtab.c (psymtab_to_fullname): Update.
7854
7855 2017-08-22 Tom Tromey <tom@tromey.com>
7856
7857 * exec.c (exec_file_attach): Update.
7858 * linux-thread-db.c (try_thread_db_load): Update.
7859 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7860 * utils.c (gdb_realpath): Change return type.
7861 (gdb_realpath_keepfile): Update.
7862 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7863 (_initialize_utils): Register the new self test.
7864 * source.c (openp): Update.
7865 (find_and_open_source): Update.
7866 * nto-tdep.c (nto_find_and_open_solib): Update.
7867 * main.c (set_gdb_data_directory): Update.
7868 (captured_main_1): Update.
7869 * dwarf2read.c (dwarf2_get_dwz_file): Update
7870 (dw2_map_symbol_filenames): Update.
7871 * auto-load.c (auto_load_safe_path_vec_update): Update.
7872 (filename_is_in_auto_load_safe_path_vec): Change type of
7873 "filename_realp".
7874 (auto_load_objfile_script): Update.
7875 (file_is_auto_load_safe): Update. Use std::string.
7876 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7877
7878 2017-08-22 Tom Tromey <tom@tromey.com>
7879
7880 * utils.c (gdb_realpath_keepfile): Return a
7881 gdb::unique_xmalloc_ptr.
7882 * exec.c (exec_file_attach): Update.
7883 * utils.h (gdb_realpath_keepfile): Return a
7884 gdb::unique_xmalloc_ptr.
7885
7886 2017-08-22 Tom Tromey <tom@tromey.com>
7887
7888 * compile/compile.c (compile_file_command): Use
7889 gdb::unique_xmalloc_ptr, std::string.
7890 * utils.c (gdb_abspath): Change return type.
7891 * source.c (openp): Update.
7892 * objfiles.c (allocate_objfile): Update.
7893 * main.c (set_gdb_data_directory): Update.
7894 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7895
7896 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7897
7898 * cli-cmds.c (list_commands): List actual code around more than
7899 one location.
7900
7901 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7902
7903 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7904
7905 2017-08-21 Pedro Alves <palves@redhat.com>
7906
7907 PR gdb/19487
7908 * c-exp.y (variable production): Handle function aliases.
7909 * minsyms.c (msymbol_is_text): New function.
7910 * minsyms.h (msymbol_is_text): Declare.
7911 * symtab.c (find_function_alias_target): New function.
7912 * symtab.h (find_function_alias_target): Declare.
7913
7914 2017-08-21 Pedro Alves <palves@redhat.com>
7915
7916 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7917 typedefs.
7918 * typeprint.c (whatis_exp): If handling "whatis", and expression
7919 is OP_TYPE, strip one typedef level. Otherwise don't strip
7920 typedefs here.
7921 * valops.c (value_cast): Save "to" type before resolving
7922 stubs/typedefs. Use that type as resulting value's type.
7923
7924 2017-08-18 Tom Tromey <tom@tromey.com>
7925 Pedro Alves <palves@redhat.com>
7926
7927 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7928 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7929 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7930 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7931 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7932 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7933 (linux_get_siginfo_data): Add "thread" argument. Use
7934 scoped_restore.
7935 * linux-nat.c (linux_child_follow_fork)
7936 (check_stopped_by_watchpoint): Use scoped_restore.
7937 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7938 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7939 (restore_inferior_ptid, save_inferior_ptid): Remove.
7940 * btrace.c (btrace_fetch): Use scoped_restore.
7941 * bsd-uthread.c (bsd_uthread_fetch_registers)
7942 (bsd_uthread_store_registers): Use scoped_restore.
7943 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7944 scoped_restore.
7945 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7946 (aix_thread_xfer_partial): Use scoped_restore.
7947 * inferior.h (save_inferior_ptid): Remove.
7948
7949 2017-08-18 Yao Qi <yao.qi@linaro.org>
7950
7951 PR tdep/21818
7952 * arm-tdep.c (gdb_print_insn_arm): Mark
7953 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7954
7955 2017-08-18 Yao Qi <yao.qi@linaro.org>
7956
7957 * NEWS: Mention GDBserver's new option "--selftest".
7958 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7959 * selftest.c: Move it to common/selftest.c.
7960 * selftest.h: Move it to common/selftest.h.
7961 * selftest-arch.c (reset): New function.
7962 (tests_with_arch): Call reset.
7963
7964 2017-08-18 Yao Qi <yao.qi@linaro.org>
7965
7966 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7967 instead of exception_fprintf and printf_filtered.
7968
7969 2017-08-18 Yao Qi <yao.qi@linaro.org>
7970
7971 * selftest.c (register_self_test): Rename it to
7972 selftests::register_test.
7973 (run_self_tests): selftest::run_tests.
7974 * selftest.h: Update declarations.
7975 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7976 selftests::register_test_foreach_arch.
7977 * selftest-arch.h: Update declaration.
7978 * aarch64-tdep.c: Update.
7979 * arm-tdep.c: Likewise.
7980 * disasm-selftests.c: Likewise.
7981 * dwarf2loc.c: Likewise.
7982 * dwarf2-frame.c: Likewise.
7983 * findvar.c: Likewise.
7984 * gdbarch-selftests.c: Likewise.
7985 * maint.c (maintenance_selftest): Likewise.
7986 * regcache.c: Likewise.
7987 * rust-exp.y: Likewise.
7988 * selftest-arch.c: Likewise.
7989 * unittests/environ-selftests.c: Likewise.
7990 * unittests/function-view-selftests.c: Likewise.
7991 * unittests/offset-type-selftests.c: Likewise.
7992 * unittests/optional-selftests.c: Likewise.
7993 * unittests/scoped_restore-selftests.c: Likewise.
7994 * utils-selftests.c: Likewise.
7995
7996 2017-08-17 Pedro Alves <palves@redhat.com>
7997
7998 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7999 local.
8000
8001 2017-08-17 Pedro Alves <palves@redhat.com>
8002
8003 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8004 field.
8005 (reset_die_in_process): Delete, replaced by ...
8006 (process_die_scope): ... this new class. Make it responsible for
8007 freeing cu->line_header too.
8008 (process_die): Use process_die_scope.
8009 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8010 cu->line_header_die_owner. Don't release the line header if it's
8011 owned by the CU.
8012 (setup_type_unit_groups): Make the CU/DIE own the line header.
8013 Don't release the line header here.
8014
8015 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8016
8017 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8018
8019 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8020
8021 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8022 Single-Key mode
8023
8024 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8025
8026 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8027 mode command list.
8028
8029 2017-08-15 Stafford Horne <shorne@gmail.com>
8030
8031 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8032
8033 2017-08-15 Stafford Horne <shorne@gmail.com>
8034
8035 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8036
8037 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8038
8039 PR gdb/21954
8040 * infcmd.c (unset_environment_command): Use the 'clear' method on
8041 the environment instead of resetting it.
8042
8043 2017-08-15 John Baldwin <jhb@FreeBSD.org>
8044
8045 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8046 platforms.
8047
8048 2017-08-14 Tom Tromey <tom@tromey.com>
8049
8050 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8051 (print_binary_chars): Likewise.
8052 (BITS_IN_BYTES): Remove.
8053
8054 2017-08-14 Tom Tromey <tom@tromey.com>
8055
8056 PR gdb/21675
8057 * valprint.c (LOW_ZERO): Change value to 034.
8058 (print_octal_chars): Add static_asserts for octal constants.
8059 * printcmd.c (print_scalar_formatted): Add 'd' case.
8060
8061 2017-08-11 Tom Tromey <tom@tromey.com>
8062
8063 * symfile.c (add_symbol_file_command): Use std::vector.
8064
8065 2017-08-14 Tom Tromey <tom@tromey.com>
8066
8067 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8068 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8069 std::move.
8070 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8071
8072 2017-08-11 Pedro Alves <palves@redhat.com>
8073
8074 * infrun.c (process_event_stop_test): Adjust
8075 function_name_is_marked_for_skip call.
8076 * skip.c: Include <list>.
8077 (skiplist_entry): Make it a class with private fields, and
8078 getters/setters.
8079 (skiplist_entry_chain): Delete.
8080 (skiplist_entries): New.
8081 (skiplist_entry_count): Delete.
8082 (highest_skiplist_entry_num): New.
8083 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8084 (add_skiplist_entry): Delete.
8085 (skiplist_entry::skiplist_entry): New.
8086 (skiplist_entry::add_entry): New.
8087 (skip_file_command, skip_function): Adjust.
8088 (compile_skip_regexp): Delete.
8089 (skip_command): Don't compile regexp here. Adjust to use
8090 skiplist_entry::add_entry.
8091 (skip_info): Adjust to use range-for and getters.
8092 (skip_enable_command, skip_disable_command): Adjust to use
8093 range-for and setters.
8094 (skip_delete_command): Adjust to use std::list.
8095 (add_skiplist_entry): Delete.
8096 (skip_file_p): Delete, refactored as ...
8097 (skiplist_entry::do_skip_file_p): ... this new method.
8098 (skip_gfile_p): Delete, refactored as ...
8099 (skiplist_entry::do_gskip_file_p): ... this new method.
8100 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8101 (skiplist_entry::skip_function_p): ... this new method.
8102 (function_name_is_marked_for_skip): Now returns bool, and takes
8103 the function sal by const reference. Adjust to use range-for and
8104 skiplist_entry methods.
8105 (_initialize_step_skip): Remove references to
8106 skiplist_entry_chain, skiplist_entry_count.
8107 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8108 takes the function sal by const reference.
8109
8110 2017-08-11 Yao Qi <yao.qi@linaro.org>
8111
8112 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8113 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8114 (dwarf2_frame_cache):
8115 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8116 RETURN_MASK_ALL and set *this_case to NULL.
8117 * frame-unwind.h: Update comments.
8118
8119 2017-08-11 Yao Qi <yao.qi@linaro.org>
8120
8121 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8122 (dwarf2_frame_state_copy_regs): Remove.
8123 (dwarf2_frame_state_free_regs): Remove.
8124 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8125 (dwarf2_restore_rule): Call method .alloc_regs instead of
8126 dwarf2_frame_state_alloc_regs.
8127 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8128 constructor. Call std::move.
8129 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8130 (dwarf2_frame_cache): Likewise.
8131
8132 [GDB_SELF_TEST]: Include selftest.h and
8133 selftest-arch.h.
8134 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8135 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8136 execute_cfa_program_test.
8137
8138 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8139 copy ctor, assignment operator, move assignment.
8140 <alloc_regs>: New method.
8141 <swap>: New method.
8142 (struct dwarf2_frame_state): Delete dtor.
8143 (dwarf2_frame_state_alloc_regs): Remove declaration.
8144 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8145 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8146
8147 2017-08-11 Yao Qi <yao.qi@linaro.org>
8148
8149 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8150 (dwarf2_frame_state::dwarf2_frame_state): New.
8151 (dwarf2_frame_state::~dwarf2_frame_state): New.
8152 (dwarf2_fetch_cfa_info): Update.
8153 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8154 rather than a pointer. Update code.
8155 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8156 dtor.
8157 <data_align, code_align, retaddr_column>: Change them to const.
8158 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8159 to bool.
8160
8161 2017-08-11 Yao Qi <yao.qi@linaro.org>
8162
8163 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8164 <loc.exp>: New field.
8165 * dwarf2-frame.c (execute_cfa_program): Update.
8166 (dwarf2_frame_prev_register): Update.
8167
8168 2017-08-10 Pedro Alves <palves@redhat.com>
8169
8170 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8171
8172 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8173
8174 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8175 (fbsd_pending_children): Use std::list.
8176 (fbsd_remember_child): Likewise.
8177 (fbsd_is_child_pending): Likewise.
8178 (fbsd_pending_vfork_done): Use std::forward_list.
8179 (fbsd_add_vfork_done): Likewise.
8180 (fbsd_is_vfork_done_pending): Likewise.
8181 (fbsd_next_vfork_done): Likewise.
8182
8183 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8184
8185 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8186 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8187 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8188 for `mapfilename'.
8189 (fbsd_xfer_partial): Use gdb::byte_vector.
8190 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8191
8192 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8193
8194 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8195 "filestuff.h".
8196 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8197
8198 2017-08-09 Tom Tromey <tom@tromey.com>
8199
8200 * skip.c (skiplist_entry): New constructor.
8201 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8202 (skiplist_entry::file_is_glob): Now bool.
8203 (skiplist_entry::file, skiplist_entry::function): Now
8204 std::string.
8205 (make_skip_entry): Return a unique_ptr. Use new.
8206 (free_skiplist_entry, free_skiplist_entry_cleanup)
8207 (make_free_skiplist_entry_cleanup): Remove.
8208 (skip_command, skip_disable_command, add_skiplist_entry)
8209 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8210 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8211 (function_name_is_marked_for_skip): Update.
8212 (skip_delete_command): Update. Use delete.
8213
8214 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8215
8216 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8217 (aarch64_linux_core_read_description): New function.
8218 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8219
8220 2017-08-09 Pedro Alves <palves@redhat.com>
8221
8222 * cp-name-parser.y (cp_comp_to_string): Return a
8223 gdb::unique_xmalloc_ptr<char>.
8224 * cp-support.c (replace_typedefs_qualified_name)
8225 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8226 (cp_canonicalize_string_full): Use op= instead of explicit
8227 convertion.
8228 (cp_class_name_from_physname, method_name_from_physname)
8229 (cp_func_name, cp_remove_params): Adjust to use
8230 gdb::unique_xmalloc_ptr<char>.
8231 * cp-support.h (cp_comp_to_string): Return a
8232 gdb::unique_xmalloc_ptr<char>.
8233 * python/py-type.c (typy_lookup_type): Adjust to use
8234 gdb::unique_xmalloc_ptr<char>.
8235
8236 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8237
8238 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8239
8240 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8241 Yao Qi <yao.qi@linaro.org>
8242
8243 * cp-support.c (cp_canonicalize_string_full): Use
8244 gdb::unique_xmalloc_ptr<char>.
8245 (cp_canonicalize_string): Likewise.
8246
8247 2017-08-09 Yao Qi <yao.qi@linaro.org>
8248
8249 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8250 * regformats/i386/amd64-avx-avx512.dat: Remove.
8251 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8252 * regformats/i386/amd64-avx-mpx.dat:Remove.
8253 * regformats/i386/amd64-avx.dat: Remove.
8254 * regformats/i386/amd64-mpx.dat: Remove.
8255 * regformats/i386/i386-avx-avx512.dat: Remove.
8256 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8257 * regformats/i386/i386-avx-mpx.dat: Remove.
8258 * regformats/i386/i386-mmx.dat: Remove.
8259 * regformats/i386/i386-mpx.dat: Remove.
8260
8261 2017-08-09 Yao Qi <yao.qi@linaro.org>
8262
8263 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8264 * amd64-tdep.c: Don't include features/i386/x32*.c.
8265 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8266 functions.
8267 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8268 and i386/x32-avx-avx512.
8269 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8270 and i386/x32.xml.
8271 * features/i386/x32-avx-avx512.c: Removed.
8272 * features/i386/x32-avx-avx512.xml: Removed.
8273 * features/i386/x32-avx.c: Removed.
8274 * features/i386/x32-avx.xml: Removed.
8275 * features/i386/x32.c: Removed.
8276 * features/i386/x32.xml: Removed.
8277 * regformats/i386/x32-avx-avx512.dat: Removed.
8278 * regformats/i386/x32-avx.dat: Removed.
8279 * regformats/i386/x32.dat: Removed.
8280
8281 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8282
8283 PR breakpoints/21886
8284 * mem-break.c (default_memory_insert_breakpoint): Use
8285 `->placed_address' rather than `->reqstd_address' for the
8286 breakpoint location.
8287
8288 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8289
8290 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8291 assertions.
8292
8293 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8294
8295 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8296 a union of `tdep_info', `tdesc_data' and `id'.
8297 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8298 rather than `info.tdep_info'.
8299 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8300 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8301 * i386-tdep.c (i386_gdbarch_init): Likewise.
8302 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8303 * mips-tdep.c (mips_gdbarch_init): Likewise.
8304 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8305 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8306 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8307 `info.tdep_info'.
8308 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8309 `info.tdep_info'.
8310 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8311 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8312 `info.tdep_info'.
8313 * spu-tdep.c (spu_gdbarch_init): Likewise.
8314 * gdbarch.h: Regenerate.
8315
8316 2017-08-07 Leszek Swirski <leszeks@google.com>
8317
8318 PR symtab/20899
8319 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8320
8321 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8322
8323 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8324 (gdbsim_open): Rename gdb_argv args object to argv.
8325
8326 2017-08-05 Tom Tromey <tom@tromey.com>
8327
8328 * compile/compile-object-load.c (compile_object_load): Use
8329 gdb::unique_xmalloc_ptr.
8330 * cli/cli-dump.c (scan_filename): Rename from
8331 scan_filename_with_cleanup. Change return type.
8332 (scan_expression): Rename from scan_expression_with_cleanup.
8333 Change return type.
8334 (dump_memory_to_file, dump_value_to_file, restore_command):
8335 Use gdb::unique_xmalloc_ptr. Update.
8336 * cli/cli-cmds.c (find_and_open_script): Use
8337 gdb::unique_xmalloc_ptr.
8338 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8339 * symmisc.c (maintenance_print_symbols)
8340 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8341 * symfile.c (symfile_bfd_open, generic_load)
8342 (add_symbol_file_command, remove_symbol_file_command): Use
8343 gdb::unique_xmalloc_ptr.
8344 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8345 * psymtab.c (maintenance_print_psymbols): Use
8346 gdb::unique_xmalloc_ptr.
8347 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8348 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8349 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8350 (reload_shared_libraries_1): Likewise.
8351
8352 2017-08-05 Tom Tromey <tom@tromey.com>
8353
8354 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8355 (rust_op_vector, rust_set_vector): New typedefs.
8356 (current_parser): New global.
8357 (work_obstack): Change to pointer type. Update all users.
8358 (rust_ast, pstate): Remove globals.
8359 (struct rust_parser): New.
8360 (%union) <params, field_inits>: Change type.
8361 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8362 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8363 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8364 (convert_params_to_types, convert_params_to_expression): Change
8365 type of "params".
8366 (ast_string): Change type of "fields".
8367 (rust_parse): Make a rust_parser. Remove cleanups.
8368 (rust_lex_tests): Make and install an auto_obstack.
8369
8370 2017-08-04 Yao Qi <yao.qi@linaro.org>
8371
8372 * configure.srv (ipa_x32_linux_regobj): New.
8373 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8374 instead of X86_TDESC_AVX512.
8375 (initialize_low_tracepoint): Call
8376 init_registers_x32_avx_avx512_linux.
8377
8378 2017-08-04 Yao Qi <yao.qi@linaro.org>
8379
8380 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8381
8382 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8383
8384 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8385
8386 2017-08-03 Tom Tromey <tom@tromey.com>
8387
8388 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8389 Remove.
8390 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8391
8392 2017-08-03 Tom Tromey <tom@tromey.com>
8393
8394 * python/py-param.c (compute_enum_values): Use gdb_argv.
8395
8396 2017-08-03 Tom Tromey <tom@tromey.com>
8397
8398 * utils.h (struct gdb_argv_deleter): New.
8399 (gdb_argv): New class.
8400 * utils.c (gdb_argv::reset): New method.
8401 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8402 * tracefile.c (tsave_command): Use gdb_argv.
8403 * top.c (new_ui_command): Use gdb_argv.
8404 * symmisc.c (maintenance_print_symbols)
8405 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8406 * symfile.c (symbol_file_command, generic_load)
8407 (remove_symbol_file_command): Use gdb_argv.
8408 * stack.c (backtrace_command): Use gdb_argv.
8409 * source.c (add_path, show_substitute_path_command)
8410 (unset_substitute_path_command, set_substitute_path_command):
8411 Use gdb_argv.
8412 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8413 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8414 * remote.c (extended_remote_run, remote_put_command)
8415 (remote_get_command, remote_delete_command): Use gdb_argv.
8416 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8417 (gdbsim_open): Use gdb_argv.
8418 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8419 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8420 * procfs.c (procfs_info_proc): Use gdb_argv.
8421 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8422 * infrun.c (handle_command): Use gdb_argv.
8423 * inferior.c (add_inferior_command, clone_inferior_command):
8424 Use gdb_argv.
8425 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8426 * exec.c (exec_file_command): Use gdb_argv.
8427 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8428 * compile/compile.c (build_argc_argv): Use gdb_argv.
8429
8430 2017-08-03 Tom Tromey <tom@tromey.com>
8431
8432 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8433
8434 2017-08-03 Tom Tromey <tom@tromey.com>
8435
8436 * python/python.c (compute_python_string): Return std::string.
8437 (gdbpy_eval_from_control_command): Update.
8438 (do_start_initialization): Use std::string.
8439 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8440 xstrprintf.
8441 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8442 xstrprintf.
8443
8444 2017-08-03 Tom Tromey <tom@tromey.com>
8445
8446 * top.h (do_restore_instream_cleanup): Remove.
8447 * top.c (do_restore_instream_cleanup): Remove.
8448 (read_command_file): Use scoped_restore.
8449 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8450
8451 2017-08-03 Tom Tromey <tom@tromey.com>
8452
8453 * cli/cli-script.c (execute_user_command)
8454 (execute_control_command): Use scoped_restore.
8455
8456 2017-08-03 Tom Tromey <tom@tromey.com>
8457
8458 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8459 (execute_user_command): Remove user_call_depth; use
8460 user_args_stack's size instead.
8461
8462 2017-08-03 Tom Tromey <tom@tromey.com>
8463
8464 * top.h (in_user_command): Remove.
8465 * top.c (in_user_command): Remove.
8466 * cli/cli-script.c (do_restore_user_call_depth)
8467 (execute_user_command): Update.
8468
8469 2017-08-03 Tom Tromey <tom@tromey.com>
8470
8471 * valops.c (search_struct_method): Use gdb::byte_vector.
8472 * valarith.c (value_concat): Use std::vector.
8473 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8474 (simple_search_memory): Likewise.
8475 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8476 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8477 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8478 * elfread.c (elf_rel_plt_read): Use std::string.
8479 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8480 * cli/cli-dump.c (restore_section_callback): Use
8481 gdb::byte_vector.
8482
8483 2017-08-03 Tom Tromey <tom@tromey.com>
8484
8485 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8486
8487 2017-08-03 Tom Tromey <tom@tromey.com>
8488
8489 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8490 (tui_register_format): Use scoped_restore.
8491
8492 2017-08-03 Tom Tromey <tom@tromey.com>
8493
8494 * reverse.c (exec_direction_default): Remove.
8495 (exec_reverse_once): Use scoped_restore.
8496 * remote.c (restore_remote_timeout): Remove.
8497 (remote_flash_erase, remote_flash_write, remote_flash_done)
8498 (readchar, remote_serial_write): Use scoped_restore.
8499 * cli/cli-script.c (struct source_cleanup_lines_args)
8500 (source_cleanup_lines): Remove.
8501 (script_from_file): Use scoped_restore.
8502 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8503 (source_command): Use scoped_restore.
8504
8505 2017-08-03 Tom Tromey <tom@tromey.com>
8506
8507 * utils.h (make_cleanup_free_so): Remove.
8508 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8509 * solist.h (struct so_deleter): New.
8510 (so_list_up): New typedef.
8511 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8512
8513 2017-08-03 Tom Tromey <tom@tromey.com>
8514
8515 * utils.h (make_cleanup_restore_current_language): Remove.
8516 * utils.c (do_restore_current_language)
8517 (make_cleanup_restore_current_language): Remove.
8518 * parse.c (parse_exp_in_context_1)
8519 (parse_expression_with_language): Use
8520 scoped_restore_current_language.
8521 * mi/mi-main.c (mi_cmd_execute): Use
8522 scoped_restore_current_language.
8523 * language.h (scoped_restore_current_language): New class.
8524
8525 2017-08-03 Tom Tromey <tom@tromey.com>
8526
8527 * compile/compile.c (cleanup_unlink_file): Remove.
8528 (compile_to_object): Use gdb::unlinker.
8529 (eval_compile_command): Likewise.
8530
8531 2017-08-03 Tom Tromey <tom@tromey.com>
8532
8533 * utils.h (make_cleanup_fclose): Remove.
8534 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8535
8536 2017-08-03 Tom Tromey <tom@tromey.com>
8537
8538 * top.c (open_terminal_stream): Return gdb_file_up.
8539 (new_ui_command): Update.
8540
8541 2017-08-03 Tom Tromey <tom@tromey.com>
8542
8543 * source.c (print_source_lines_base, forward_search_command)
8544 (reverse_search_command): Use gdb_file_up.
8545
8546 2017-08-03 Tom Tromey <tom@tromey.com>
8547
8548 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8549
8550 2017-08-03 Tom Tromey <tom@tromey.com>
8551
8552 * cli/cli-cmds.c (find_and_open_script): Change return type.
8553 Remove "streamp" and "full_path" parameters.
8554 (source_script_with_search): Update.
8555 * auto-load.c (source_script_file): Update.
8556 * cli/cli-cmds.h (find_and_open_script): Change type.
8557 (open_script): New struct.
8558
8559 2017-08-03 Tom Tromey <tom@tromey.com>
8560
8561 * xml-support.c (xml_fetch_content_from_file): Update.
8562 * ui-file.c (stdio_file::open): Update.
8563 * tracefile-tfile.c (tfile_start): Update.
8564 * remote.c (remote_file_put, remote_file_get): Update.
8565 * nat/linux-procfs.c (linux_proc_get_int)
8566 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8567 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8568 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8569 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8570 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8571 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8572 * linux-nat.c (linux_proc_pending_signals): Update.
8573 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8574 (file_closer): Remove.
8575 * compile/compile.c (compile_to_object): Update.
8576 * common/filestuff.h (struct gdb_file_deleter): New.
8577 (gdb_file_up): New typedef.
8578 (gdb_fopen_cloexec): Change return type.
8579 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8580 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8581 (dump_binary_file, restore_binary_file): Update.
8582 * auto-load.c (auto_load_objfile_script_1): Update.
8583
8584 2017-08-03 Tom Tromey <tom@tromey.com>
8585
8586 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8587 (info_static_tracepoint_markers_command): Likewise.
8588 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8589 * skip.c (skip_info): Use ui_out_emit_table.
8590 * progspace.c (print_program_space): Use ui_out_emit_table.
8591 * osdata.c (info_osdata): Use ui_out_emit_table.
8592 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8593 ui_out_emit_table.
8594 * linux-thread-db.c (info_auto_load_libthread_db): Use
8595 ui_out_emit_table.
8596 * inferior.c (print_inferior): Use ui_out_emit_table.
8597 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8598 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8599 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8600 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8601 * ui-out.h (class ui_out_emit_table): New.
8602
8603 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8604
8605 * mips-tdep.c (mips_fpu_type_str): New function.
8606 (mips_dump_tdep): Call it.
8607
8608 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8609
8610 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8611 `->mips_fpu_type'.
8612
8613 2017-07-31 Xavier Roirand <roirand@adacore.com>
8614
8615 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8616
8617 2017-07-27 Xavier Roirand <roirand@adacore.com>
8618
8619 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8620
8621 2017-07-26 Yao Qi <yao.qi@linaro.org>
8622
8623 * cli/cli-cmds.c (maintenancechecklist): New variable.
8624 * gdbcmd.h (maintenancechecklist): Declare it.
8625 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8626 Call i386_linux_read_description with different masks.
8627 * maint.c (maintenance_check_command): New function.
8628 (_initialize_maint_cmds): Call add_prefix_cmd.
8629 * target-descriptions.c (tdesc_reg): override operator != and ==.
8630 (tdesc_type): Likewise.
8631 (tdesc_feature): Likewise.
8632 (target_desc): Likewise.
8633 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8634 (maintenance_check_xml_descriptions): New function.
8635 (_initialize_target_descriptions) Add command "xml-descriptions".
8636 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8637
8638 2017-07-26 Yao Qi <yao.qi@linaro.org>
8639
8640 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8641 Include features/i386/32bit-*.c.
8642 (i386_linux_read_description): Generate target description if it
8643 doesn't exist.
8644 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8645 functions.
8646 * features/i386/32bit-linux.c: Re-generated.
8647 * features/i386/32bit-sse.c: Likewise.
8648 * target-descriptions.c (print_c_feature::visit): Print code to
8649 set register number if needed.
8650 (print_c_feature) <m_next_regnum>: New field.
8651
8652 2017-07-26 Yao Qi <yao.qi@linaro.org>
8653
8654 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8655 (FEATURE_XMLFILES): New.
8656 (FEATURE_CFILES): New.
8657 New rules.
8658 (clean-cfiles): Remove generated c files.
8659 * features/i386/32bit-avx.c: Generated.
8660 * features/i386/32bit-avx512.c: Generated.
8661 * features/i386/32bit-core.c: Generated.
8662 * features/i386/32bit-linux.c: Generated.
8663 * features/i386/32bit-mpx.c: Generated.
8664 * features/i386/32bit-pkeys.c: Generated.
8665 * features/i386/32bit-sse.c: Generated.
8666 * target-descriptions.c: Include algorithm.
8667 (tdesc_element_visitor): Add method visit_end.
8668 (print_c_tdesc): Implement visit_end.
8669 (print_c_tdesc:: m_filename_after_features): Move it to
8670 protected.
8671 (print_c_feature): New class.
8672 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8673 name starts with "i386/32bit-".
8674
8675 2017-07-26 Yao Qi <yao.qi@linaro.org>
8676
8677 * target-descriptions.c (tdesc_element_visitor): New class.
8678 (tdesc_element): New class.
8679 (tdesc_reg): Inherit from tdesc_element.
8680 (tdesc_reg::accept): New function.
8681 (tdesc_type): Inherit from tdesc_element.
8682 (tdesc_type::accept): New function.
8683 (tdesc_feature): Inherit from tdesc_element.
8684 (tdesc_feature::accept): New function.
8685 (target_desc): Inherit from tdesc_element.
8686 (target_desc::target_desc): New.
8687 (target_desc::~target_desc): New.
8688 (target_desc::accept): New.
8689 (allocate_target_description): Use new.
8690 (free_target_description): Use delete.
8691 (print_c_tdesc): New class.
8692 (maint_print_c_tdesc_cmd): Adjust.
8693
8694 * features/aarch64.c: Re-generated.
8695 * features/arc-arcompact.c: Re-generated.
8696 * features/arc-v2.c: Re-generated.
8697 * features/arm/arm-with-iwmmxt.c: Re-generated.
8698 * features/arm/arm-with-m.c: Re-generated.
8699 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8700 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8701 * features/arm/arm-with-neon.c: Re-generated.
8702 * features/arm/arm-with-vfpv2.c: Re-generated.
8703 * features/arm/arm-with-vfpv3.c: Re-generated.
8704 * features/i386/amd64-avx-avx512.c: Re-generated.
8705 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8706 * features/i386/amd64-avx.c: Re-generated.
8707 * features/i386/amd64-avx-linux.c: Re-generated.
8708 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8709 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8710 * features/i386/amd64-avx-mpx.c: Re-generated.
8711 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8712 * features/i386/amd64.c: Re-generated.
8713 * features/i386/amd64-linux.c: Re-generated.
8714 * features/i386/amd64-mpx.c: Re-generated.
8715 * features/i386/amd64-mpx-linux.c: Re-generated.
8716 * features/i386/i386-avx-avx512.c: Re-generated.
8717 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8718 * features/i386/i386-avx.c: Re-generated.
8719 * features/i386/i386-avx-linux.c: Re-generated.
8720 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8721 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8722 * features/i386/i386-avx-mpx.c: Re-generated.
8723 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8724 * features/i386/i386.c: Re-generated.
8725 * features/i386/i386-linux.c: Re-generated.
8726 * features/i386/i386-mmx.c: Re-generated.
8727 * features/i386/i386-mmx-linux.c: Re-generated.
8728 * features/i386/i386-mpx.c: Re-generated.
8729 * features/i386/i386-mpx-linux.c: Re-generated.
8730 * features/i386/x32-avx-avx512.c: Re-generated.
8731 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8732 * features/i386/x32-avx.c: Re-generated.
8733 * features/i386/x32-avx-linux.c: Re-generated.
8734 * features/i386/x32.c: Re-generated.
8735 * features/i386/x32-linux.c: Re-generated.
8736 * features/microblaze.c: Re-generated.
8737 * features/microblaze-with-stack-protect.c: Re-generated.
8738 * features/mips64-dsp-linux.c: Re-generated.
8739 * features/mips64-linux.c: Re-generated.
8740 * features/mips-dsp-linux.c: Re-generated.
8741 * features/mips-linux.c: Re-generated.
8742 * features/nds32.c: Re-generated.
8743 * features/nios2.c: Re-generated.
8744 * features/nios2-linux.c: Re-generated.
8745 * features/rs6000/powerpc-32.c: Re-generated.
8746 * features/rs6000/powerpc-32l.c: Re-generated.
8747 * features/rs6000/powerpc-403.c: Re-generated.
8748 * features/rs6000/powerpc-403gc.c : Re-generated.
8749 * features/rs6000/powerpc-405.c: Re-generated.
8750 * features/rs6000/powerpc-505.c: Re-generated.
8751 * features/rs6000/powerpc-601.c: Re-generated.
8752 * features/rs6000/powerpc-602.c: Re-generated.
8753 * features/rs6000/powerpc-603.c: Re-generated.
8754 * features/rs6000/powerpc-604.c: Re-generated.
8755 * features/rs6000/powerpc-64.c: Re-generated.
8756 * features/rs6000/powerpc-64l.c: Re-generated.
8757 * features/rs6000/powerpc-7400.c: Re-generated.
8758 * features/rs6000/powerpc-750.c: Re-generated.
8759 * features/rs6000/powerpc-860.c: Re-generated.
8760 * features/rs6000/powerpc-altivec32.c: Re-generated.
8761 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8762 * features/rs6000/powerpc-altivec64.c: Re-generated.
8763 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8764 * features/rs6000/powerpc-cell32l.c: Re-generated.
8765 * features/rs6000/powerpc-cell64l.c: Re-generated.
8766 * features/rs6000/powerpc-e500.c: Re-generated.
8767 * features/rs6000/powerpc-e500l.c: Re-generated.
8768 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8769 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8770 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8771 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8772 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8773 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8774 * features/rs6000/powerpc-vsx32.c: Re-generated.
8775 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8776 * features/rs6000/powerpc-vsx64.c: Re-generated.
8777 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8778 * features/rs6000/rs6000.c: Re-generated.
8779 * features/s390-linux32.c: Re-generated.
8780 * features/s390-linux32v1.c: Re-generated.
8781 * features/s390-linux32v2.c: Re-generated.
8782 * features/s390-linux64.c: Re-generated.
8783 * features/s390-linux64v1.c: Re-generated.
8784 * features/s390-linux64v2.c: Re-generated.
8785 * features/s390-te-linux64.c: Re-generated.
8786 * features/s390-tevx-linux64.c: Re-generated.
8787 * features/s390-vx-linux64.c: Re-generated.
8788 * features/s390x-linux64.c: Re-generated.
8789 * features/s390x-linux64v1.c: Re-generated.
8790 * features/s390x-linux64v2.c: Re-generated.
8791 * features/s390x-te-linux64.c: Re-generated.
8792 * features/s390x-tevx-linux64.c: Re-generated.
8793 * features/s390x-vx-linux64.c: Re-generated.
8794 * features/sparc/sparc32-solaris.c: Re-generated.
8795 * features/sparc/sparc64-solaris.c: Re-generated.
8796 * features/tic6x-c62x.c: Re-generated.
8797 * features/tic6x-c62x-linux.c: Re-generated.
8798 * features/tic6x-c64x.c: Re-generated.
8799 * features/tic6x-c64x-linux.c: Re-generated.
8800 * features/tic6x-c64xp.c: Re-generated.
8801 * features/tic6x-c64xp-linux.c: Re-generated.
8802
8803 2017-07-26 Yao Qi <yao.qi@linaro.org>
8804
8805 * i386-linux-tdep.c (i386_linux_read_description): New function.
8806 (i386_linux_core_read_description): Call
8807 i386_linux_read_description.
8808 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8809 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8810 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8811 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8812 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8813 * x86-linux-nat.c (x86_linux_read_description): Call
8814 i386_linux_read_description.
8815
8816 2017-07-26 Yao Qi <yao.qi@linaro.org>
8817
8818 * NEWS: Mention it.
8819 * features/Makefile (%.c: %.xml): Pass the xml file name to
8820 command "maint print c-tdesc".
8821 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8822 name from 'arg'.
8823
8824 2017-07-26 Yao Qi <yao.qi@linaro.org>
8825
8826 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8827 in-class initialization.
8828 (tdesc_create_feature): Call new instead of XCNEW.
8829 (free_target_description): Ue delete.
8830
8831 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8832
8833 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8834
8835 2017-07-25 Yao Qi <yao.qi@linaro.org>
8836
8837 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8838 constant.
8839 (amd64_x32_init_abi): Likewise.
8840 * amd64-tdep.h (amd64_init_abi): Update declaration.
8841 (amd64_x32_init_abi): Likewise.
8842
8843 2017-07-25 Yao Qi <yao.qi@linaro.org>
8844
8845 PR tdep/21717
8846 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8847 condition for FPSCR.
8848 (arm_linux_store_inferior_registers): Likewise.
8849
8850 2017-07-22 Tom Tromey <tom@tromey.com>
8851
8852 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8853 <syscalls_counts>: Now a std::vector.
8854 (get_catch_syscall_inferior_data): Use "new".
8855 (catch_syscall_inferior_data_cleanup): Use "delete".
8856 (insert_catch_syscall, remove_catch_syscall)
8857 (clear_syscall_counts): Update.
8858
8859 2017-07-22 Tom Tromey <tom@tromey.com>
8860
8861 * break-catch-syscall.c (syscall_catchpoint)
8862 <syscalls_to_be_caught>: Now a std::vector<int>
8863 (~syscall_catchpoint): Remove.
8864 (insert_catch_syscall, remove_catch_syscall)
8865 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8866 (print_mention_catch_syscall, print_recreate_catch_syscall):
8867 Update.
8868 (create_syscall_event_catchpoint): Change type of "filter"
8869 parameter.
8870 (catch_syscall_split_args): Return a std::vector.
8871 (catch_syscall_command_1, catching_syscall_number_1): Update.
8872
8873 2017-07-22 Tom Tromey <tom@tromey.com>
8874
8875 * break-catch-throw.c (struct exception_catchpoint)
8876 <exception_rx>: Now a std::string.
8877 (~exception_catchpoint): Remove.
8878 (print_one_detail_exception_catchpoint): Update.
8879 (handle_gnu_v3_exceptions): Change type of except_rx.
8880 (extract_exception_regexp): Return a std::string.
8881 (catch_exception_command_1): Update.
8882
8883 2017-07-22 Tom Tromey <tom@tromey.com>
8884
8885 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8886 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8887 std::vector.
8888 <catch_all>: Now a bool.
8889 (~signal_catchpoint): Remove.
8890 (signal_catchpoint_insert_location)
8891 (signal_catchpoint_remove_location)
8892 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8893 (signal_catchpoint_print_mention)
8894 (signal_catchpoint_print_recreate)
8895 (signal_catchpoint_explains_signal): Update.
8896 (create_signal_catchpoint): Change type of "filter" and
8897 "catch_all".
8898 (catch_signal_split_args): Return a std::vector. Change type of
8899 "catch_all".
8900 (catch_signal_command): Update.
8901
8902 2017-07-20 Pedro Alves <palves@redhat.com>
8903
8904 * ada-lang.c (ada_language_defn): Make extern.
8905 (_initialize_ada_language): Remove add_language call.
8906 * c-lang.c (c_language_defn, cplus_language_defn)
8907 (asm_language_defn, minimal_language_defn): Make extern.
8908 (_initialize_c_language): Delete.
8909 * completer.c (compare_cstrings): Delete, moved to utils.h.
8910 * d-lang.c (d_language_defn): Make extern.
8911 (_initialize_d_language): Remove add_language calls.
8912 * defs.h (enum language): Add comment.
8913 * f-lang.c (f_language_defn): Make extern.
8914 (_initialize_f_language): Remove add_language call.
8915 * go-lang.c (go_language_defn): Make extern.
8916 (_initialize_go_language): Remove add_language call.
8917 * language.c: Include <algorithm>.
8918 (languages): Redefine as const array.
8919 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8920 (set_language_command): Handle "local". Use for-range loop.
8921 (set_language): Remove loop.
8922 (language_enum): Rewrite.
8923 (language_def, language_str): Remove loops.
8924 (add_language): Delete.
8925 (add_set_language_command): New, based on add_languages.
8926 (skip_language_trampoline): Adjust.
8927 (local_language_defn): Delete.
8928 (language_gdbarch_post_init): Adjust.
8929 (_initialize_language): Remove add_language calls. Call
8930 add_set_language_command.
8931 * language.h (add_language): Delete.
8932 (auto_language_defn)
8933 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8934 (asm_language_defn, c_language_defn, cplus_language_defn)
8935 (d_language_defn, f_language_defn, go_language_defn)
8936 (m2_language_defn, objc_language_defn, opencl_language_defn)
8937 (pascal_language_defn, rust_language_defn): Declare.
8938 * m2-lang.c (m2_language_defn): Make extern.
8939 (_initialize_m2_language): Remove add_language call.
8940 * objc-lang.c (objc_language_defn): Make extern.
8941 (_initialize_objc_language): Remove add_language call.
8942 * opencl-lang.c (opencl_language_defn): Make extern.
8943 (_initialize_opencl_language): Remove add_language call.
8944 * p-lang.c (pascal_language_defn): Make extern.
8945 (_initialize_pascal_language): Delete.
8946 * rust-lang.c (rust_language_defn): Make extern.
8947 (_initialize_rust_language): Delete.
8948 * utils.h (compare_cstrings): New static inline function.
8949
8950 2017-07-20 Pedro Alves <palves@redhat.com>
8951
8952 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8953 (get_var_value): Constify parameters.
8954 (get_int_var_value): Change prototype.
8955 (to_fixed_range_type): Adjust.
8956 * ada-lang.h (get_int_var_value): Change prototype.
8957
8958 2017-07-20 Pedro Alves <palves@redhat.com>
8959
8960 * dwarf2read.c (dw2_lookup_symbol): Use
8961 SYMBOL_MATCHES_SEARCH_NAME.
8962 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8963
8964 2017-07-20 Pedro Alves <palves@redhat.com>
8965
8966 * block.c (block_iter_name_step, block_iter_name_first)
8967 (block_iter_name_next): Delete.
8968 (block_lookup_symbol_primary): Adjust to use
8969 dict_iter_match_first/dict_iter_match_next.
8970 * block.h (block_iter_name_first, block_iter_name_next): Delete
8971 declarations.
8972 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8973 dict_iter_match_first/dict_iter_match_next.
8974
8975 2017-07-20 Pedro Alves <palves@redhat.com>
8976
8977 * cp-support.c (cp_find_first_component_aux): Add missing case for
8978 end of string.
8979
8980 2017-07-18 David Blaikie <dblaikie@gmail.com>
8981
8982 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8983 of dwo_cu's dwo_file.
8984
8985 2017-07-18 Yao Qi <yao.qi@linaro.org>
8986
8987 * remote.c (store_registers_using_G): Remove one line comment.
8988
8989 2017-07-18 Yao Qi <yao.qi@linaro.org>
8990
8991 * regcache.c (regcache_cpy): Simplify it.
8992 (regcache::cpy_no_passthrough): Remove it.
8993 * regcache.h (cpy_no_passthrough): Remove it.
8994 (regcache_dup, regcache_cpy): Update comments.
8995
8996 2017-07-18 Pedro Alves <palves@redhat.com>
8997
8998 * remote-sim.c (sim_command_completer): Adjust to work with a
8999 completion_tracker instead of a VEC.
9000
9001 2017-07-17 Pedro Alves <palves@redhat.com>
9002
9003 * completer.c (complete_source_filenames): New function.
9004 (complete_address_and_linespec_locations): New function.
9005 (location_completer): Use complete_address_and_linespec_locations.
9006 (completion_tracker::build_completion_result): Honor the tracker's
9007 request to suppress append.
9008 * completer.h (completion_tracker::suppress_append_ws)
9009 (completion_tracker::set_suppress_append_ws): New methods.
9010 (completion_tracker::m_suppress_append_ws): New field.
9011 (complete_source_filenames): New declaration.
9012 * linespec.c (linespec_complete_what): New.
9013 (struct ls_parser) <complete_what, completion_word,
9014 completion_quote_char, completion_quote_end, completion_tracker>:
9015 New fields.
9016 (string_find_incomplete_keyword_at_end): New.
9017 (linespec_lexer_lex_string): Record quote char. If in completion
9018 mode, don't throw.
9019 (linespec_lexer_consume_token): Advance the completion word point.
9020 (linespec_lexer_peek_token): Save/restore completion info.
9021 (save_stream_and_consume_token): New.
9022 (set_completion_after_number): New.
9023 (linespec_parse_basic): Set what to complete next depending on
9024 token. Handle function and label completions specially.
9025 (parse_linespec): Disable objc shortcut in completion mode. Set
9026 what to complete next depending on token type. Skip keyword if in
9027 completion mode.
9028 (complete_linespec_component, linespec_complete): New.
9029 * linespec.h (linespec_complete): Declare.
9030
9031 2017-07-17 Pedro Alves <palves@redhat.com>
9032
9033 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9034 Handle 'operator<' / 'operator<<'.
9035
9036 2017-07-17 Pedro Alves <palves@redhat.com>
9037
9038 * completer.c (collect_explicit_location_matches): Handle
9039 MATCH_LABEL.
9040 (convert_explicit_location_to_linespec): New, factored out from
9041 ...
9042 (convert_explicit_location_to_sals): ... this.
9043 (complete_label): New.
9044 (linespec_complete_label, find_label_symbols_in_block): New.
9045 (find_label_symbols): Add completion_mode parameter and adjust to
9046 call find_label_symbols_in_block.
9047 * linespec.h (linespec_complete_label): Declare.
9048
9049 2017-07-17 Pedro Alves <palves@redhat.com>
9050
9051 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9052 complete_symbol_mode parameter.
9053 * cli/cli-cmds.c (complete_command): Get the completion result out
9054 of the handle_brkchars tracker if used a custom word point.
9055 * completer.c: Include "linespec.h".
9056 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9057 (advance_to_expression_complete_word_point): New.
9058 (completion_tracker::completes_to_completion_word): New.
9059 (complete_files_symbols): Pass down
9060 complete_symbol_mode::EXPRESSION.
9061 (explicit_options, probe_options): New.
9062 (collect_explicit_location_matches): Complete on the
9063 explictit_loc->foo instead of word. Use
9064 linespec_complete_function. Handle MATCH_LINE. Handle offering
9065 keyword and options completions.
9066 (backup_text_ptr): Delete.
9067 (skip_keyword): New.
9068 (complete_explicit_location): Remove 'word' parameter. Add
9069 language, quoted_arg_start and quoted_arg_end parameters.
9070 Rewrite, parsing left to right.
9071 (location_completer): Rewrite.
9072 (location_completer_handle_brkchars): New function.
9073 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9074 (enum complete_line_internal_reason): Adjust comments.
9075 (completion_tracker::discard_completions): New.
9076 (completer_handle_brkchars_func_for_completer): Handle
9077 location_completer.
9078 (gdb_custom_word_point_brkchars)
9079 (gdb_org_rl_basic_quote_characters): New.
9080 (gdb_completion_word_break_characters_throw)
9081 (completion_find_completion_word): Handle trackers that use a
9082 custom word point.
9083 (completion_tracker::advance_custom_word_point_by): New.
9084 (completion_tracker::build_completion_result): Don't rely on
9085 readline appending the quote char.
9086 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9087 use a custom word point.
9088 (gdb_rl_attempted_completion_function): Restore
9089 rl_basic_quote_characters.
9090 * completer.h (class completion_tracker): Extend intro comment.
9091 (completion_tracker::set_quote_char)
9092 (completion_tracker::quote_char)
9093 (completion_tracker::set_use_custom_word_point)
9094 (completion_tracker::use_custom_word_point)
9095 (completion_tracker::custom_word_point)
9096 (completion_tracker::set_custom_word_point)
9097 (completion_tracker::advance_custom_word_point_by)
9098 (completion_tracker::completes_to_completion_word)
9099 (completion_tracker::discard_completions): New methods.
9100 (completion_tracker::m_quote_char)
9101 (completion_tracker::m_use_custom_word_point)
9102 (completion_tracker::m_custom_word_point): New fields.
9103 (advance_to_expression_complete_word_point): Declare.
9104 * f-lang.c (f_collect_symbol_completion_matches): Add
9105 complete_symbol_mode parameter.
9106 * language.h (struct language_defn)
9107 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9108 parameter.
9109 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9110 (linespec_complete_function): New function.
9111 (linespec_lexer_lex_keyword): Adjust.
9112 * linespec.h (linespec_keywords, linespec_complete_function): New
9113 declarations.
9114 * location.c (find_end_quote): New function.
9115 (explicit_location_lex_one): Add explicit_completion_info
9116 parameter. Save quoting info. Don't throw if being called for
9117 completion. Don't handle Ada operators here.
9118 (is_cp_operator, skip_op_false_positives, first_of)
9119 (explicit_location_lex_one_function): New function.
9120 (string_to_explicit_location): Replace 'dont_throw' parameter with
9121 an explicit_completion_info pointer parameter. Handle it. Don't
9122 use explicit_location_lex_one to lex function names. Use
9123 explicit_location_lex_one_function instead.
9124 * location.h (struct explicit_completion_info): New.
9125 (string_to_explicit_location): Replace 'dont_throw' parameter with
9126 an explicit_completion_info pointer parameter.
9127 * symtab.c (default_collect_symbol_completion_matches_break_on):
9128 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9129 (default_collect_symbol_completion_matches)
9130 (collect_symbol_completion_matches): Add complete_symbol_mode
9131 parameter.
9132 (collect_symbol_completion_matches_type): Pass down
9133 complete_symbol_mode::EXPRESSION.
9134 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9135 parameter. Handle LINESPEC mode.
9136 * symtab.h (complete_symbol_mode): New.
9137 (default_collect_symbol_completion_matches_break_on)
9138 (default_collect_symbol_completion_matches)
9139 (collect_symbol_completion_matches)
9140 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9141 parameter.
9142
9143 2017-07-17 Pedro Alves <palves@redhat.com>
9144
9145 * utils.c (enum class strncmp_iw_mode): New.
9146 (strcmp_iw): Rename to ...
9147 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9148 parameters. Handle them.
9149 (strncmp_iw): New.
9150 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9151 * utils.h (strncmp_iw): Declare.
9152 (strcmp_iw): Move describing comments here.
9153
9154 2017-07-17 Pedro Alves <palves@redhat.com>
9155
9156 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9157 CP_OPERATOR_STR.
9158 * c-typeprint.c (is_type_conversion_operator): Use
9159 CP_OPERATOR_STR.
9160 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9161 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9162 CP_OPERATOR_LEN.
9163 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9164 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9165 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9166 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9167 CP_OPERATOR_STR.
9168 * location.c: Include "cp-support.h".
9169 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9170 CP_OPERATOR_STR.
9171 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9172 CP_OPERATOR_LEN.
9173
9174 2017-07-17 Pedro Alves <palves@redhat.com>
9175
9176 * cli/cli-cmds.c (complete_command): Use a completion tracker
9177 along with completion_find_completion_word for handle_brkchars
9178 phase.
9179 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9180 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9181 (struct gdb_rl_completion_word_info): New.
9182 (gdb_rl_find_completion_word): New.
9183 (completion_find_completion_word): New.
9184 * completer.h (completion_find_completion_word): Declare.
9185
9186 2017-07-17 Pedro Alves <palves@redhat.com>
9187
9188 * ada-lang.c (symbol_completion_match): Adjust comments.
9189 (symbol_completion_add): Replace vector parameter with
9190 completion_tracker parameter. Use it.
9191 (ada_make_symbol_completion_list): Rename to...
9192 (ada_collect_symbol_completion_matches): ... this. Add
9193 completion_tracker parameter and use it.
9194 (ada_language_defn): Adjust.
9195 * break-catch-syscall.c (catch_syscall_completer): Adjust
9196 prototype and work with completion_tracker instead of VEC.
9197 * breakpoint.c (condition_completer): Adjust prototype and work
9198 with completion_tracker instead of VEC.
9199 * c-lang.c (c_language_defn, cplus_language_defn)
9200 (asm_language_defn, minimal_language_defn): Adjust to renames.
9201 * cli/cli-cmds.c (complete_command): Rework using
9202 completion_tracker. Catch exceptions when completing.
9203 * cli/cli-decode.c (integer_unlimited_completer)
9204 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9205 with completion_tracker instead of VEC.
9206 * command.h (struct completion_tracker): Forward declare.
9207 (completer_ftype, completer_handle_brkchars_ftype): Change
9208 types.
9209 (complete_on_cmdlist, complete_on_enum): Adjust.
9210 * completer.c: Include <algorithm>.
9211 (struct gdb_completer_state): New.
9212 (current_completion): New global.
9213 (readline_line_completion_function): Delete.
9214 (noop_completer, filename_completer)
9215 (filename_completer_handle_brkchars, complete_files_symbols)
9216 (linespec_location_completer): Adjust to work with a
9217 completion_tracker instead of a VEC.
9218 (string_or_empty): New.
9219 (collect_explicit_location_matches): Adjust to work with a
9220 completion_tracker instead of a VEC.
9221 (explicit_location_completer): Rename to ...
9222 (complete_explicit_location): ... this and adjust to work with a
9223 completion_tracker instead of a VEC.
9224 (location_completer): Adjust to work with a completion_tracker
9225 instead of a VEC.
9226 (add_struct_fields): Adjust to work with a completion_list instead
9227 of VEC.
9228 (expression_completer): Rename to ...
9229 (complete_expression): ... this and adjust to work with a
9230 completion_tracker instead of a VEC. Use complete_files_symbols.
9231 (expression_completer): Reimplement on top of complete_expression.
9232 (symbol_completer): Adjust to work with a completion_tracker
9233 instead of a VEC.
9234 (enum complete_line_internal_reason): Add describing comments.
9235 (complete_line_internal_normal_command): Adjust to work with a
9236 completion_tracker instead of a VEC.
9237 (complete_line_internal): Rename to ...
9238 (complete_line_internal_1): ... this and adjust to work with a
9239 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9240 handle_brkchars phase.
9241 (new_completion_tracker): Delete.
9242 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9243 complete_line_internal_1.
9244 (free_completion_tracker): Delete.
9245 (INITIAL_COMPLETION_HTAB_SIZE): New.
9246 (completion_tracker::completion_tracker)
9247 (completion_tracker::~completion_tracker): New.
9248 (maybe_add_completion): Delete.
9249 (completion_tracker::maybe_add_completion)
9250 (completion_tracker::add_completion)
9251 (completion_tracker::add_completions): New.
9252 (throw_max_completions_reached_error): Delete.
9253 (complete_line): Adjust to work with a completion_tracker instead
9254 of a VEC. Don't create a completion_tracker_t or check for max
9255 completions here.
9256 (command_completer, command_completer_handle_brkchars)
9257 (signal_completer, reg_or_group_completer_1)
9258 (reg_or_group_completer, default_completer_handle_brkchars):
9259 Adjust to work with a completion_tracker.
9260 (gdb_completion_word_break_characters_throw): New.
9261 (gdb_completion_word_break_characters): Reimplement.
9262 (line_completion_function): Delete.
9263 (completion_tracker::recompute_lowest_common_denominator)
9264 (expand_preserving_ws)
9265 (completion_tracker::build_completion_result)
9266 (completion_result::completion_result)
9267 (completion_result::completion_result)
9268 (completion_result::~completion_result)
9269 (completion_result::completion_result)
9270 (completion_result::release_match_list, compare_cstrings)
9271 (completion_result::sort_match_list)
9272 (completion_result::reset_match_list)
9273 (gdb_rl_attempted_completion_function_throw)
9274 (gdb_rl_attempted_completion_function): New.
9275 * completer.h (completion_list, struct completion_result)
9276 (class completion_tracker): New.
9277 (complete_line): Add completion_tracker parameter.
9278 (readline_line_completion_function): Delete.
9279 (gdb_rl_attempted_completion_function): New.
9280 (noop_completer, filename_completer, expression_completer)
9281 (location_completer, symbol_completer, command_completer)
9282 (signal_completer, reg_or_group_completer): Update prototypes.
9283 (completion_tracker_t, new_completion_tracker)
9284 (make_cleanup_free_completion_tracker): Delete.
9285 (enum maybe_add_completion_enum): Delete.
9286 (maybe_add_completion): Delete.
9287 (throw_max_completions_reached_error): Delete.
9288 * corefile.c (complete_set_gnutarget): Adjust to work with a
9289 completion_tracker instead of a VEC.
9290 * cp-abi.c (cp_abi_completer): Adjust to work with a
9291 completion_tracker instead of a VEC.
9292 * d-lang.c (d_language_defn): Adjust.
9293 * disasm.c (disassembler_options_completer): Adjust to work with a
9294 completion_tracker instead of a VEC.
9295 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9296 (f_collect_symbol_completion_matches): ... this. Adjust to work
9297 with a completion_tracker instead of a VEC.
9298 (f_language_defn): Adjust.
9299 * go-lang.c (go_language_defn): Adjust.
9300 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9301 Adjust to work with a completion_tracker instead of a VEC.
9302 * infrun.c (handle_completer): Likewise.
9303 * interps.c (interpreter_completer): Likewise.
9304 * interps.h (interpreter_completer): Likewise.
9305 * language.c (unknown_language_defn, auto_language_defn)
9306 (local_language_defn): Adjust.
9307 * language.h (language_defn::la_make_symbol_completion_list):
9308 Rename to ...
9309 (language_defn::la_collect_symbol_completion_matches): ... this
9310 and adjust to work with a completion_tracker instead of a VEC.
9311 * m2-lang.c (m2_language_defn): Adjust.
9312 * objc-lang.c (objc_language_defn): Adjust.
9313 * opencl-lang.c (opencl_language_defn): Adjust.
9314 * p-lang.c (pascal_language_defn): Adjust.
9315 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9316 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9317 with a completion_tracker.
9318 * rust-lang.c (rust_language_defn): Adjust.
9319 * symtab.c (free_completion_list, do_free_completion_list)
9320 (return_val, completion_tracker): Delete.
9321 (completion_list_add_name, completion_list_add_symbol)
9322 (completion_list_add_msymbol, completion_list_objc_symbol)
9323 (completion_list_add_fields, add_symtab_completions): Add
9324 completion_tracker parameter and use it.
9325 (default_make_symbol_completion_list_break_on_1): Rename to...
9326 (default_collect_symbol_completion_matches_break_on): ... this.
9327 Add completion_tracker parameter and use it instead of allocating
9328 a completion tracker here.
9329 (default_make_symbol_completion_list_break_on): Delete old
9330 implementation.
9331 (default_make_symbol_completion_list): Delete.
9332 (default_collect_symbol_completion_matches): New.
9333 (make_symbol_completion_list): Delete.
9334 (collect_symbol_completion_matches): New.
9335 (make_symbol_completion_type): Rename to ...
9336 (collect_symbol_completion_matches_type): ... this. Add
9337 completion_tracker parameter and use it instead of VEC.
9338 (make_file_symbol_completion_list_1): Rename to...
9339 (collect_file_symbol_completion_matches): ... this. Add
9340 completion_tracker parameter and use it instead of VEC.
9341 (make_file_symbol_completion_list): Delete.
9342 (add_filename_to_list): Use completion_list instead of a VEC.
9343 (add_partial_filename_data::list): Now a completion_list.
9344 (make_source_files_completion_list): Work with a completion_list
9345 instead of a VEC.
9346 * symtab.h: Include "completer.h".
9347 (default_make_symbol_completion_list_break_on)
9348 (default_make_symbol_completion_list, make_symbol_completion_list)
9349 (make_symbol_completion_type, make_file_symbol_completion_list)
9350 (make_source_files_completion_list): Delete.
9351 (default_collect_symbol_completion_matches_break_on)
9352 (default_collect_symbol_completion_matches)
9353 (collect_symbol_completion_matches)
9354 (collect_symbol_completion_matches_type)
9355 (collect_file_symbol_completion_matches)
9356 (make_source_files_completion_list): New.
9357 * top.c (init_main): Don't install a rl_completion_entry_function
9358 hook. Install a rl_attempted_completion_function hook instead.
9359 * tui/tui-layout.c (layout_completer): Adjust to work with a
9360 completion_tracker.
9361 * tui/tui-regs.c (tui_reggroup_completer):
9362 * tui/tui-win.c (window_name_completer, focus_completer)
9363 (winheight_completer): Adjust to work with a completion_tracker.
9364 * value.c: Include "completer.h".
9365 (complete_internalvar): Adjust to work with a completion_tracker.
9366 * value.h (complete_internalvar): Likewise.
9367
9368 2017-07-17 Pedro Alves <palves@redhat.com>
9369
9370 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9371 renames.
9372 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9373 comments to completer_ftype's declaration.
9374 <completer_handle_brkchars>: Change type to
9375 completer_handle_brkchars_ftype.
9376 * command.h (completer_ftype): Add describing comment and give
9377 names to parameters.
9378 (completer_ftype_void): Rename to ...
9379 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9380 (set_cmd_completer_handle_brkchars): Adjust.
9381 * completer.c (filename_completer_handle_brkchars): New function.
9382 (complete_line_internal_normal_command): New function, factored
9383 out from ...
9384 (complete_line_internal): ... here.
9385 (command_completer_handle_brkchars)
9386 (default_completer_handle_brkchars)
9387 (completer_handle_brkchars_func_for_completer): New functions.
9388 * completer.h (set_gdb_completion_word_break_characters): Delete
9389 declaration.
9390 (completer_handle_brkchars_func_for_completer): New declaration.
9391 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9392 completer_handle_brkchars_func_for_completer.
9393
9394 2017-07-17 Pedro Alves <palves@redhat.com>
9395
9396 * completer.c (symbol_completer): New function, based on
9397 make_symbol_completion_list_fn.
9398 * completer.h (symbol_completer): New declaration.
9399 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9400 * python/py-cmd.c (completers): Adjust.
9401 * symtab.c (make_symbol_completion_list_fn): Delete.
9402 * symtab.h (make_symbol_completion_list_fn): Delete.
9403 * cli/cli-decode.c (add_cmd): Adjust.
9404
9405 2017-07-17 Pedro Alves <palves@redhat.com>
9406
9407 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9408 * dwarf2read.c: Include "filename-seen-cache.h".
9409 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9410 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9411 * filename-seen-cache.c: New file.
9412 * filename-seen-cache.h: New file.
9413 * symtab.c: Include "filename-seen-cache.h".
9414 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9415 (create_filename_seen_cache, clear_filename_seen_cache)
9416 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9417 to filename-seen-cache.h/filename-seen-cache.c.
9418 (output_source_filename, sources_info)
9419 (maybe_add_partial_symtab_filename)
9420 (make_source_files_completion_list): Adjust to use
9421 filename_seen_cache.
9422
9423 2017-07-17 Pedro Alves <palves@redhat.com>
9424
9425 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9426 fields.
9427 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9428 dwarf2_debug_sections*)): New.
9429 (dwarf2_per_objfile::dwarf2_per_objfile(const
9430 dwarf2_per_objfile&)): Declare as deleted.
9431 (dwarf2_per_objfile::operator=): Declare as deleted.
9432 (dwarf2_per_objfile::dwarf2_per_objfile)
9433 (dwarf2_per_objfile::~dwarf2_per_objfile)
9434 (dwarf2_per_objfile::free_cached_comp_units): New.
9435 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9436 ctor. Call dwarf2_per_objfile's ctor manually.
9437 (dwarf2_locate_sections): Deleted/refactored as ...
9438 (dwarf2_per_objfile::locate_sections): ... this new method.
9439 (free_cached_comp_units): Defer to
9440 dwarf2_per_objfile::free_cached_comp_units.
9441 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9442
9443 2017-07-14 Tom Tromey <tom@tromey.com>
9444
9445 PR rust/21764:
9446 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9447 parameter.
9448 <UNOP_SIZEOF>: Split into separate case.
9449 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9450
9451 2017-07-14 Tom Tromey <tom@tromey.com>
9452
9453 PR rust/21763:
9454 * symtab.c (symbol_matches_domain): Add language_rust to special
9455 case.
9456 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9457 treat LOC_TYPEDEF symbols as variables.
9458
9459 2017-07-14 Pedro Alves <palves@redhat.com>
9460
9461 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9462 symtabs matching all symtabs with SRCFILE as file name instead of
9463 only considering the first hit, with lookup_symtab.
9464
9465 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9466
9467 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9468 operator_name parameters.
9469 (gen_expr): Update function call.
9470
9471 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9472
9473 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9474 parameter.
9475 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9476 Likewise.
9477 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9478 parameter, use agent_expr::gdbarch instead, update function
9479 calls.
9480 (locexpr_tracepoint_var_ref): Likewise.
9481 (loclist_tracepoint_var_ref): Likewise.
9482 * ax-gdb.c (gen_trace_static_fields): Likewise.
9483 (gen_traced_pop): Likewise.
9484 (gen_frame_args_address): Likewise.
9485 (gen_frame_locals_address): Likewise.
9486 (gen_var_ref): Likewise.
9487 (gen_struct_ref_recursive): Likewise.
9488 (gen_static_field): Likewise.
9489 (gen_maybe_namespace_elt): Likewise.
9490 (gen_expr): Likewise.
9491 (gen_trace_for_var): Likewise.
9492 (gen_trace_for_expr): Likewise.
9493 (gen_trace_for_return_address): Likewise.
9494
9495 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9496
9497 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9498 parameter.
9499 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9500
9501 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9502
9503 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9504 from ax, update calls.
9505 (gen_usual_arithmetic): Likewise.
9506 (gen_integral_promotions): Likewise.
9507 (gen_bitfield_ref): Likewise.
9508 (gen_primitive_field): Likewise.
9509 (gen_struct_ref_recursive): Likewise.
9510 (gen_struct_ref): Likewise.
9511 (gen_maybe_namespace_elt): Likewise.
9512 (gen_struct_elt_for_reference): Likewise.
9513 (gen_namespace_elt): Likewise.
9514 (gen_aggregate_elt_ref): Likewise.
9515 (gen_expr): Get gdbarch from ax, update calls.
9516 (gen_expr_binop_rest): Likewise.
9517
9518 2017-07-13 Pedro Alves <palves@redhat.com>
9519
9520 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9521 as default tdesc.
9522 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9523 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9524 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9525 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9526 tdep.
9527 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9528 Get final tdesc from the tdep.
9529 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9530 default tdesc.
9531 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9532 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9533 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9534 Use it as default tdesc.
9535 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9536 down to amd_init_abi. No longer handle fallback tdesc here.
9537 * amd64-tdep.h (tdesc_x32): Declare.
9538 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9539 parameter.
9540 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9541 as default tdesc.
9542
9543 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9544
9545 * s390-linux-tdep.c (s390_process_record): Add support for
9546 instructions new in arch12.
9547
9548 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9549
9550 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9551 PT_GETFSBASE and PT_GETGSBASE.
9552 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9553 PT_SETGSBASE.
9554
9555 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9556
9557 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9558 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9559 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9560 those rules.
9561 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9562 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9563 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9564 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9565 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9566 * features/i386/amd64.xml: Add 64bit-segments.xml.
9567 * features/i386/amd64-avx-avx512.c: Regenerated.
9568 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9569 * features/i386/amd64-avx-mpx.c: Regenerated.
9570 * features/i386/amd64-avx.c: Regenerated.
9571 * features/i386/amd64-mpx.c: Regenerated.
9572 * features/i386/amd64.c: Regenerated.
9573 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9574 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9575 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9576 * regformats/i386/amd64-avx.dat: Regenerated.
9577 * regformats/i386/amd64-mpx.dat: Regenerated.
9578 * regformats/i386/amd64.dat: Regenerated.
9579
9580 2017-07-10 Yao Qi <yao.qi@linaro.org>
9581
9582 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9583 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9584
9585 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9586
9587 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9588 unsetenv.
9589 * gnulib/aclocal.m4: Regenerate.
9590 * gnulib/config.in: Regenerate.
9591 * gnulib/configure: Regenerate.
9592 * gnulib/import/Makefile.am: Regenerate.
9593 * gnulib/import/Makefile.in: Regenerate.
9594 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9595 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9596 * gnulib/import/m4/environ.m4: New file.
9597 * gnulib/import/m4/setenv.m4: New file.
9598 * gnulib/import/setenv.c: New file.
9599 * gnulib/import/unsetenv.c: New file.
9600
9601 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9602
9603 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9604 address when op is DW_OP_addr.
9605
9606 2017-07-09 Tom Tromey <tom@tromey.com>
9607
9608 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9609 check and apply to outer type.
9610
9611 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9612
9613 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9614 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9615 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9616 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9617
9618 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9619
9620 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9621
9622 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9623
9624 * corelow.c (get_core_siginfo): Remove.
9625 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9626 instead of get_core_siginfo.
9627 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9628 * gdbarch.h: Re-generate.
9629 * gdbarch.c: Re-generate.
9630 * linux-tdep.c (linux_core_xfer_siginfo): New.
9631 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9632
9633 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9634
9635 * corelow.c (thread_section_name): Move to ...
9636 * gdbcore.h (thread_section_name): ... here.
9637
9638 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9639
9640 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9641 (struct siginfo32): New.
9642 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9643 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9644 via ptrace(PT_LWPINFO).
9645
9646 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9647
9648 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9649 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9650 (fbsd_get_siginfo_type): New.
9651 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9652 (_initialize_fbsd_tdep): New.
9653
9654 2017-07-06 David Blaikie <dblaikie@gmail.com>
9655
9656 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9657 a singular dwo_unit*) to support multiple CUs in the same way that
9658 multiple TUs are supported.
9659 (create_cus_hash_table): Replace create_dwo_cu with a function for
9660 parsing multiple CUs from a DWO file.
9661 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9662 create_dwo_cu.
9663 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9664 htab_find, rather than comparing the signature to a singleton CU in
9665 the dwo_file.
9666
9667 2017-07-06 Pedro Alves <palves@redhat.com>
9668
9669 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9670
9671 2017-07-04 Pedro Alves <palves@redhat.com>
9672
9673 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9674 * gdbtypes.h (TYPE_STATIC): Delete.
9675 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9676 is_synchronized, is_native>: Delete.
9677 <dummy>: Bump.
9678 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9679 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9680 (TYPE_FN_FIELD_ABSTRACT): Delete.
9681
9682 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9683
9684 * buffer.h (buffer_finish): Fix spelling mistakes.
9685
9686 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9687
9688 * .dir-locals.el: Automatically switch to C-style comments in
9689 versions of Emacs that support the feature.
9690
9691 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9692 Pedro Alves <palves@redhat.com>
9693
9694 PR cli/21688
9695 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9696 (process_next_line): New variable 'inline_cmd'.
9697 Adjust 'if' clauses for "python", "compile" and "guile" to use
9698 'command_name_equals' and check for '!inline_cmd'.
9699
9700 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9701
9702 PR cli/21688
9703 * cli/cli-script.c (command_name_equals_not_inline): New function.
9704 (process_next_line): Adjust 'if' clauses for "python", "compile"
9705 and "guile" to use command_name_equals_not_inline.
9706
9707 2017-06-29 Pedro Alves <palves@redhat.com>
9708
9709 * completer.c (expression_completer): Call
9710 linespec_location_completer instead of location_completer.
9711
9712 2017-06-29 Pedro Alves <palves@redhat.com>
9713
9714 * completer.c (expression_completer): Remove code that recomputes
9715 'text' from 'word'.
9716
9717 2017-06-29 Yao Qi <yao.qi@linaro.org>
9718
9719 * regformats/regdat.sh: Generate code with
9720 "ifndef IN_PROCESS_AGENT".
9721
9722 2017-06-28 Pedro Alves <palves@redhat.com>
9723
9724 * command.h: Include "common/scoped_restore.h".
9725
9726 2017-06-28 Yao Qi <yao.qi@linaro.org>
9727
9728 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9729 instead of obstack_grow.
9730
9731 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9732
9733 PR gdb/21337
9734 * symfile.c (reread_symbols): Call objfiles_changed just before
9735 read_symbols.
9736
9737 2017-06-27 Pedro Alves <palves@redhat.com>
9738
9739 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9740 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9741 (completion_list_add_symbol, completion_list_add_msymbol):
9742 ... these new functions.
9743 (add_symtab_completions)
9744 (default_make_symbol_completion_list_break_on_1): Adjust.
9745
9746 2017-06-27 Pedro Alves <palves@redhat.com>
9747
9748 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9749 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9750 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9751 dtor.
9752 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9753 'storage_obstack' field an auto_obstack. In-class initialize all
9754 non-bitfield fields. Make minsyms_read bool.
9755 * symfile.c (read_symbols): Adjust.
9756
9757 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9758
9759 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9760 (gdbsim_store_register): Likewise.
9761
9762 2017-06-27 Pedro Alves <palves@redhat.com>
9763
9764 * c-exp.y (name_obstack): Now an auto_obstack.
9765 (yylex): Use auto_obstack::clear.
9766 (c_parse): Use auto_obstack::clear instead of reinitializing and
9767 freeing the obstack.
9768 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9769 * d-exp.y (name_obstack): Now an auto_obstack.
9770 (yylex): Use auto_obstack::clear.
9771 (d_parse): Use auto_obstack::clear instead of reinitializing and
9772 freeing the obstack.
9773 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9774 auto_obstack.
9775 * dwarf2read.c (create_addrmap_from_index)
9776 (dwarf2_build_psymtabs_hard)
9777 (update_enumeration_type_from_children): Likewise.
9778 * gdb_obstack.h (auto_obstack): New type.
9779 * go-exp.y (name_obstack): Now an auto_obstack.
9780 (build_packaged_name): Use auto_obstack::clear.
9781 (go_parse): Use auto_obstack::clear instead of reinitializing and
9782 freeing the obstack.
9783 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9784 auto_obstack.
9785 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9786 * rust-exp.y (work_obstack): Now an auto_obstack.
9787 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9788 reinitializing and freeing the obstack.
9789 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9790 (host_char_to_target): Use auto_obstack.
9791 * utils.h (make_cleanup_obstack_free): Delete declaration.
9792 * valprint.c (generic_emit_char, generic_printstr): Use
9793 auto_obstack.
9794
9795 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9796
9797 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9798 thread.
9799 (darwin_init_thread_list): Don't update dummy thread.
9800 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9801
9802 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9803
9804 * record-full.c (netorder16): Remove.
9805
9806 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9807
9808 * common/diagnostics.h: Define macros for GCC.
9809 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9810 * common/vec.h: Include diagnostics.h.
9811 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9812 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9813 warning.
9814
9815 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9816
9817 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9818 New macro.
9819 * ada-lex.l: Ignore deprecated register warnings.
9820
9821 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9822
9823 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9824 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9825
9826 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9827
9828 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9829 its own line.
9830
9831 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9832
9833 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9834
9835 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9836
9837 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9838 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9839 (xtensa_register_read_masked): Likewise.
9840
9841 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9842
9843 * common/environ.c (gdb_environ::unset): Update comment.
9844
9845 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9846
9847 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9848 registers.
9849
9850 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9851
9852 * record-full.c (record_full_exec_insn): Use byte_vector.
9853
9854 2017-06-22 Yao Qi <yao.qi@linaro.org>
9855
9856 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9857 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9858
9859 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9860
9861 * remote.c (cached_reg): Move from here...
9862 * regcache.h (cached_reg): ...to here.
9863 * python/py-unwind.c (struct reg_info): Remove.
9864 (cached_frame_info): Use cached_reg_t.
9865 (pyuw_prev_register): Likewise.
9866 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9867 (pyuw_dealloc_cache): Free all registers.
9868
9869 2017-06-22 Pedro Alves <palves@redhat.com>
9870 Simon Marchi <simon.marchi@ericsson.com>
9871
9872 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9873 warning.
9874 * common/diagnostics.h: New file.
9875
9876 2017-06-22 Pedro Alves <palves@redhat.com>
9877
9878 * common/agent.h: Add include guards.
9879
9880 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9881
9882 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9883 talk about addressable units instead of bytes.
9884
9885 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9886
9887 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9888 of '::const_iterator'.
9889
9890 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9891
9892 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9893 'unittests/environ-selftests.c'.
9894 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9895 * charset.c (find_charset_names): Declare object 'iconv_env'.
9896 Update code to use 'iconv_env' object. Remove call to
9897 'free_environ'.
9898 * common/environ.c: Include <utility>.
9899 (make_environ): Delete function.
9900 (free_environ): Delete function.
9901 (gdb_environ::clear): New function.
9902 (gdb_environ::operator=): New function.
9903 (gdb_environ::get): Likewise.
9904 (environ_vector): Delete function.
9905 (set_in_environ): Delete function.
9906 (gdb_environ::set): New function.
9907 (unset_in_environ): Delete function.
9908 (gdb_environ::unset): New function.
9909 (gdb_environ::envp): Likewise.
9910 * common/environ.h: Include <vector>.
9911 (struct gdb_environ): Delete; transform into...
9912 (class gdb_environ): ... this class.
9913 (free_environ): Delete prototype.
9914 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9915 environ_vector): Likewise.
9916 * infcmd.c (run_command_1): Update code to call
9917 'envp' from 'gdb_environ' class.
9918 (environment_info): Update code to call methods from 'gdb_environ'
9919 class.
9920 (unset_environment_command): Likewise.
9921 (path_info): Likewise.
9922 (path_command): Likewise.
9923 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9924 (inferior::inferior): Initialize 'environment' using the host's
9925 information.
9926 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9927 Include "environ.h".
9928 (class inferior) <environment>: Change type from 'struct
9929 gdb_environ' to 'gdb_environ'.
9930 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9931 methods from 'gdb_environ' class.
9932 * solib.c (solib_find_1): Likewise
9933 * unittests/environ-selftests.c: New file.
9934
9935 2017-06-20 Yao Qi <yao.qi@linaro.org>
9936
9937 * features/i386/i386-linux.xml: Exchange the order of including
9938 32bit-linux.xml and 32bit-sse.xml.
9939 * features/i386/i386-linux.c: Regenerated.
9940
9941 2017-06-20 Yao Qi <yao.qi@linaro.org>
9942
9943 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9944 Delete copy ctor and assignment operator.
9945 (tdesc_type): Likewise.
9946 (tdesc_feature): Likewise.
9947 (tdesc_free_reg): Remove.
9948 (tdesc_create_reg): Use new.
9949 (tdesc_free_type): Remove.
9950 (tdesc_create_vector): Use new.
9951 (tdesc_create_union): Likewise.
9952 (tdesc_create_flags): Likewise.
9953 (tdesc_create_enum): Likewise.
9954 (tdesc_free_feature): Delete.
9955 (free_target_description): Use delete.
9956
9957 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9958
9959 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9960 registers.
9961
9962 2017-06-19 Pedro Alves <palves@redhat.com>
9963
9964 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9965 after gdb::unlinker.
9966
9967 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9968
9969 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9970 gdb_environ to access an environment variable.
9971
9972 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9973
9974 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9975 gdb_byte*.
9976
9977 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9978
9979 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9980
9981 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9982
9983 * configure: Re-generate.
9984 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9985
9986 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9987
9988 * configure: Re-generate.
9989 * warning.m4: Pass -Werror to compiler when checking for
9990 supported warning flags.
9991
9992 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9993
9994 * Makefile.in (COMPILE.pre): Add "-x c++".
9995
9996 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9997 Pedro Alves <palves@redhat.com>
9998 Yao Qi <yao.qi@linaro.org>
9999
10000 * defs.h (RequireLongest): New.
10001 (extract_integer): Declare function template.
10002 (extract_signed_integer): Remove the declaration, but define it
10003 static inline.
10004 (extract_unsigned_integer): Likewise.
10005 (store_integer): Declare function template.
10006 (store_signed_integer): Remove the declaration, but define it
10007 static inline.
10008 (store_unsigned_integer): Likewise.
10009 * findvar.c (extract_integer): New function template.
10010 (extract_signed_integer): Remove.
10011 (extract_unsigned_integer): Remove.
10012 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10013 instantiations.
10014 (store_integer): New function template.
10015 (store_signed_integer): Remove.
10016 (store_unsigned_integer): Remove.
10017 (store_integer): Explicit instantiations.
10018 * regcache.c (regcache_raw_read_signed): Update.
10019 (regcache::raw_read): New function.
10020 (regcache::raw_read_signed): Remove.
10021 (regcache::raw_read_unsigned): Remove.
10022 (regcache_raw_read_unsigned): Update.
10023 (regcache_raw_write_unsigned): Update.
10024 (regcache::raw_write_signed): Remove.
10025 (regcache::raw_write): New function.
10026 (regcache_cooked_read_signed): Update.
10027 (regcache::raw_write_unsigned): Remove.
10028 (regcache::cooked_read_signed): Remove.
10029 (regcache_cooked_read_unsigned): Update.
10030 (regcache::cooked_read_unsigned): Remove.
10031 (regcache_cooked_write_signed): Update.
10032 (regcache_cooked_write_unsigned): Update.
10033 * regcache.h (regcache) <raw_read_signed>: Remove.
10034 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10035 <raw_read, raw_write>: New.
10036 <cooked_read_signed, cooked_write_signed>: Remove.
10037 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10038 <cooked_read, cooked_write>: New.
10039 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10040 (sh64_pseudo_register_write): Update.
10041
10042 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10043
10044 * arc-tdep.c (arc_disassembler_options): New variable.
10045 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10046 of default_print_insn.
10047 (arc_delayed_print_insn): Set info->section when needed,
10048 use default_print_insn to retrieve a disassembler.
10049
10050 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10051
10052 PR gdb/21574
10053 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10054 to mention $SHELL and startup-with-shell.
10055
10056 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10057
10058 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10059
10060 2017-06-14 Yao Qi <yao.qi@linaro.org>
10061
10062 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10063 default_print_insn instead of print_insn_aarch64.
10064 * arm-tdep.c (gdb_print_insn_arm): Call
10065 default_print_insn instead of print_insn_big_arm
10066 and print_insn_little_arm.
10067 * i386-tdep.c (i386_print_insn): Call default_print_insn
10068 instead of print_insn_i386.
10069 * ia64-tdep.c (ia64_print_insn): Call
10070 default_print_insn instead of print_insn_ia64.
10071 * mips-tdep.c (gdb_print_insn_mips): Call
10072 default_print_insn instead of print_insn_big_mips
10073 and print_insn_little_mips.
10074 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10075 instead of print_insn_spu.
10076
10077 2017-06-14 Pedro Alves <palves@redhat.com>
10078
10079 * ada-lang.c: Include "common/byte-vector.h".
10080 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10081 * charset.c (wchar_iterator::iterate): Resize the vector instead
10082 of reserving it.
10083 * common/byte-vector.h: Include "common/def-vector.h".
10084 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10085 * cli/cli-dump.c: Include "common/byte-vector.h".
10086 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10087 * common/byte-vector.h: New file.
10088 * common/def-vector.h: New file.
10089 * common/default-init-alloc.h: New file.
10090 * dwarf2loc.c: Include "common/byte-vector.h".
10091 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10092 instead of reserving it.
10093 * dwarf2read.c: Include "common/byte-vector.h".
10094 (data_buf::m_vec): Now a gdb::byte_vector.
10095 * gdb_regex.c: Include "common/def-vector.h".
10096 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10097 * mi/mi-main.c: Include "common/byte-vector.h".
10098 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10099 * printcmd.c: Include "common/byte-vector.h".
10100 (print_scalar_formatted): Use gdb::byte_vector.
10101 * valprint.c: Include "common/byte-vector.h".
10102 (maybe_negate_by_bytes, print_decimal_chars): Use
10103 gdb::byte_vector.
10104
10105 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10106
10107 * darwin-nat.c: Include "nat/fork-inferior.h".
10108
10109 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10110
10111 * configure.nat: Factor out Darwin bits that are not
10112 architecture-specific. Add fork-inferior.o.
10113
10114 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10115
10116 * configure.nat: Factor out AIX bits that are not
10117 architecture-specific. Add fork-inferior.o.
10118
10119 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10120
10121 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10122 (read_pieced_value, write_pieced_value): ...here. Reduce to
10123 wrappers that just call rw_pieced_value.
10124
10125 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10126
10127 * dwarf2loc.c (write_pieced_value): When writing the data for a
10128 memory piece, use write_memory_with_notification instead of
10129 write_memory.
10130
10131 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10132
10133 * valops.c (read_value_memory): Change embedded_offset to
10134 represent a bit offset instead of a byte offset.
10135 * value.h (read_value_memory): Adjust comment.
10136
10137 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10138
10139 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10140 dest_offset_bits and source_offset_bits.
10141 (write_pieced_value): Likewise.
10142
10143 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10144
10145 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10146 given by DW_OP_bit_piece.
10147 (write_pieced_value): Likewise.
10148
10149 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10150
10151 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10152 some other preparations to the places where sufficient information
10153 is available.
10154 (write_pieced_value): Likewise.
10155
10156 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10157
10158 * dwarf2loc.c (bits_to_bytes): New function.
10159 (read_pieced_value): Fix offset calculations for register pieces
10160 on big-endian targets.
10161 (write_pieced_value): Likewise.
10162
10163 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10164
10165 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10166 (write_pieced_value): Likewise.
10167
10168 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10169
10170 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10171 transfer the source value's least significant bits, instead of its
10172 lowest-addressed ones. Rename type_len to max_offset.
10173 (read_pieced_value): Mirror above changes to write_pieced_value as
10174 applicable.
10175
10176 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10177
10178 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10179 truncate full bytes from dest_offset_bits before using it as an
10180 offset into the buffer.
10181
10182 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10183
10184 * dwarf2loc.c (write_pieced_value): Include transfer size in
10185 byte-wise check.
10186
10187 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10188
10189 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10190 calculation of this_size.
10191
10192 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10193
10194 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10195 when targeting a bit-field.
10196 (write_pieced_value): Likewise.
10197
10198 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10199
10200 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10201 (allocate_piece_closure): Drop addr_size parameter.
10202 (dwarf2_evaluate_loc_desc_full): Adjust call to
10203 allocate_piece_closure.
10204
10205 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10206
10207 PR gdb/21226
10208 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10209 the LSB end, independent of endianness.
10210
10211 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10212
10213 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10214 size capping.
10215
10216 2017-06-13 Yao Qi <yao.qi@linaro.org>
10217
10218 * mips-linux-nat.c: Move include features/mips*-linux.c to
10219 mips-linux-tdep.c.
10220 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10221 to mips-linux-tdep.c.
10222 * mips-linux-tdep.c: Include features/mips*-linux.c
10223 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10224 functions.
10225 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10226 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10227 (tdesc_mips64_dsp_linux): Declare.
10228
10229 2017-06-12 Tom Tromey <tom@tromey.com>
10230
10231 * valprint.h (val_print_type_code_int): Remove.
10232 * valprint.c (generic_val_print_int): Always call
10233 val_print_scalar_formatted.
10234 (val_print_type_code_int): Remove.
10235 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10236 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10237 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10238 * ada-valprint.c (ada_val_print_num): Use
10239 val_print_scalar_formatted.
10240
10241 2017-06-12 Tom Tromey <tom@tromey.com>
10242
10243 * printcmd.c (print_scalar_formatted): Unify the two switches.
10244 Don't convert scalars to LONGEST.
10245
10246 2017-06-12 Tom Tromey <tom@tromey.com>
10247
10248 PR exp/16225:
10249 * valprint.h (print_decimal_chars): Update.
10250 * valprint.c (maybe_negate_by_bytes): New function.
10251 (print_decimal_chars): Add "is_signed" argument.
10252 * printcmd.c (print_scalar_formatted): Update.
10253
10254 2017-06-12 Tom Tromey <tom@tromey.com>
10255
10256 PR exp/16225:
10257 * valprint.h (print_binary_chars, print_hex_chars): Update.
10258 * valprint.c (val_print_type_code_int): Update.
10259 (print_binary_chars): Add "zero_pad" argument.
10260 (emit_octal_digit): New function.
10261 (print_octal_chars): Don't zero-pad.
10262 (print_decimal_chars): Likewise.
10263 (print_hex_chars): Add "zero_pad" argument.
10264 * sh64-tdep.c (sh64_do_fp_register): Update.
10265 * regcache.c (regcache::dump): Update.
10266 * printcmd.c (print_scalar_formatted): Update.
10267 * infcmd.c (default_print_one_register_info): Update.
10268
10269 2017-06-12 Pedro Alves <palves@redhat.com>
10270 Alan Hayward <alan.hayward@arm.com>
10271
10272 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10273 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10274 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10275 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10276 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10277
10278 2017-06-12 Pedro Alves <palves@redhat.com>
10279
10280 * dwarf2read.c (mapped_symtab::data): Now a vector of
10281 symtab_index_entry instead of vector of
10282 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10283 whether an element's name is NULL instead of checking whether the
10284 element itself is NULL.
10285 (find_slot): Change return type. Adjust.
10286 (hash_expand, , add_index_entry, uniquify_cu_indices)
10287 (write_hash_table): Adjust.
10288
10289 2017-06-12 Pedro Alves <palves@redhat.com>
10290
10291 * dwarf2read.c (recursively_count_psymbols): New function.
10292 (write_psymtabs_to_index): Call it to compute number of psyms and
10293 pass estimate size of psyms_seen to unordered_set's ctor.
10294
10295 2017-06-12 Pedro Alves <palves@redhat.com>
10296
10297 * dwarf2read.c (write_hash_table): Check if key already exists
10298 before emplacing.
10299
10300 2017-06-12 Pedro Alves <palves@redhat.com>
10301
10302 * dwarf2read.c (data_buf::append_space): Rename to...
10303 (data_buf::grow): ... this, and make private. Adjust all callers.
10304 (data_buf::append_uint): New method.
10305 (add_address_entry, write_one_signatured_type)
10306 (write_psymtabs_to_index): Use it.
10307
10308 2017-06-12 Pedro Alves <palves@redhat.com>
10309
10310 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10311 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10312 (data_buf::file_write): Call ::fwrite directly.
10313
10314 2017-06-12 Pedro Alves <palves@redhat.com>
10315
10316 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10317 std::vector::erase.
10318
10319 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10320
10321 Code cleanup: C++ify .gdb_index producer.
10322 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10323 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10324 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10325 (create_strtab, add_string): Remove.
10326 (file_write, data_buf): New.
10327 (struct symtab_index_entry): Use std::vector for cu_indices.
10328 (struct mapped_symtab): Use std::vector for data.
10329 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10330 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10331 Remove.
10332 (find_slot): Change return type. Update it to the new data structures.
10333 (hash_expand, add_index_entry): Update it to the new data structures.
10334 (offset_type_compare): Remove.
10335 (uniquify_cu_indices): Update it to the new data structures.
10336 (c_str_view, c_str_view_hasher, vector_hasher): New.
10337 (add_indices_to_cpool): Remove.
10338 (write_hash_table): Update it to the new data structures.
10339 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10340 (eq_psymtab_cu_index): Remove.
10341 (psym_index_map): New typedef.
10342 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10343 reference and std::unordered_map for cu_index_htab.
10344 (add_address_entry, add_address_entry_worker, write_address_map)
10345 (write_psymbols): Update it to the new data structures.
10346 (write_obstack): Remove.
10347 (struct signatured_type_index_data): Change types_list to a data_buf
10348 reference and psyms_seen to a std::unordered_set reference.
10349 (write_one_signatured_type, recursively_write_psymbols)
10350 (write_psymtabs_to_index): Update it to the new data structures.
10351
10352 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10353
10354 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10355 separate-debug-file commands.
10356 * symfile.h (separate_debug_file_debug): New global.
10357 * symfile.c (separate_debug_file_debug): New global.
10358 (separate_debug_file_exists, find_separate_debug_file): Add
10359 debug output.
10360 (_initialize_symfile): Add "set debug separate-debug-file"
10361 command.
10362 * build-id.c (build_id_to_debug_bfd,
10363 find_separate_debug_file_by_buildid): Add debug output.
10364
10365 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10366
10367 * gdbarch.sh (displaced_step_free_closure): Remove.
10368 * gdbarch.h, gdbarch.c: Re-generate.
10369 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10370 displaced_step_free_closure.
10371 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10372 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10373 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10374 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10375 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10376 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10377 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10378 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10379 * infrun.c (displaced_step_clear): Call xfree instead of
10380 gdbarch_displaced_step_free_closure.
10381
10382 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10383
10384 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10385 NULL".
10386
10387 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10388
10389 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10390 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10391 (mn10300_push_dummy_call): Likewise.
10392
10393 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10394
10395 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10396
10397 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10398
10399 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10400
10401 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10402
10403 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10404 able to start inferiors using a shell.
10405 (New remote packets): Announce new packet "QStartupWithShell".
10406 * remote.c: Add PACKET_QStartupWithShell.
10407 (extended_remote_create_inferior): Handle new
10408 PACKET_QStartupWithShell.
10409 (remote_protocol_features) <QStartupWithShell>: New entry for
10410 PACKET_QStartupWithShell.
10411 (_initialize_remote): Call "add_packet_config_cmd" for
10412 QStartupShell.
10413
10414 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10415 Pedro Alves <palves@redhat.com>
10416
10417 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10418 and "nat/fork-inferior.h".
10419 * common/common-inferior.h: New file, with contents from
10420 "gdb/inferior.h".
10421 * commom/common-utils.c: Include "common-utils.h".
10422 (stringify_argv): New function.
10423 * common/common-utils.h (stringify_argv): New prototype.
10424 * configure.nat: Add "fork-inferior.o" as a dependency for
10425 "*linux*", "fbsd*" and "nbsd*" hosts.
10426 * corefile.c (get_exec_file): Update comment.
10427 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10428 instead of "startup_inferior".
10429 (darwin_create_inferior): Call "add_thread_silent" after
10430 "fork_inferior".
10431 * fork-child.c: Cleanup unnecessary includes.
10432 (SHELL_FILE): Move to "common/common-fork-child.c".
10433 (environ): Likewise.
10434 (exec_wrapper): Initialize.
10435 (get_exec_wrapper): New function.
10436 (breakup_args): Move to "common/common-fork-child.c"; rename to
10437 "breakup_args_for_exec".
10438 (escape_bang_in_quoted_argument): Move to
10439 "common/common-fork-child.c".
10440 (saved_ui): New variable.
10441 (prefork_hook): New function.
10442 (postfork_hook): Likewise.
10443 (postfork_child_hook): Likewise.
10444 (gdb_startup_inferior): Likewise.
10445 (fork_inferior): Move to "common/common-fork-child.c". Update
10446 function to support gdbserver.
10447 (startup_inferior): Likewise.
10448 * gdbcore.h (get_exec_file): Remove declaration.
10449 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10450 instead of "startup_inferior". Call "add_thread_silent" after
10451 "fork_inferior".
10452 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10453 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10454 instead of "startup_inferior". Call "add_thread_silent" after
10455 "fork_inferior".
10456 * inferior.h: Include "common-inferior.h".
10457 (trace_start_error): Move to "common/common-utils.h".
10458 (trace_start_error_with_name): Likewise.
10459 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10460 (startup_inferior): Likewise.
10461 (gdb_startup_inferior): New prototype.
10462 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10463 * nat/fork-inferior.h: New file.
10464 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10465 instead of "startup_inferior". Call "add_thread_silent" after
10466 "fork_inferior".
10467 * target.h (target_terminal_init): Move prototype to
10468 "target/target.h".
10469 (target_terminal_inferior): Likewise.
10470 (target_terminal_ours): Likewise.
10471 * target/target.h (target_terminal_init): New prototype, moved
10472 from "target.h".
10473 (target_terminal_inferior): Likewise.
10474 (target_terminal_ours): Likewise.
10475 * utils.c (gdb_flush_out_err): New function.
10476
10477 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10478
10479 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10480 * common/common-gdbthread.h: New file, with parts from
10481 "gdb/gdbthread.h".
10482 * gdbthread.h: Include "common-gdbthread.h".
10483 (switch_to_thread): Moved to "common/common-gdbthread.h".
10484
10485 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10486
10487 * Makefile.in (SFILES): Add "common/job-control.c".
10488 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10489 (COMMON_OBS): Add "job-control.o".
10490 * common/job-control.c: New file, with contents from
10491 "gdb/inflow.c".
10492 * common/job-control.h: New file, with contents from "terminal.h".
10493 * fork-child.c: Include "job-control.h".
10494 * inflow.c: Include "job-control.h".
10495 (gdb_setpgid): Move to "common/common-inflow.c".
10496 (_initialize_inflow): Move setting of "job_control" to
10497 "handle_job_control".
10498 * terminal.h (job_control): Moved to "common/common-terminal.h".
10499 (gdb_setpgid): Likewise.
10500 * top.c: Include "job_control.h".
10501 * utils.c: Likewise.
10502 (job_control): Moved to "job-control.c".
10503
10504 2017-06-07 Pedro Alves <palves@redhat.com>
10505
10506 * Makefile.in (SFILES): Add gdb_regex.c.
10507 (COMMON_OBS): Add gdb_regex.o.
10508 * ada-lang.c (ada_add_standard_exceptions)
10509 (ada_add_exceptions_from_frame, name_matches_regex)
10510 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10511 parameter type to compiled_regex. Adjust.
10512 (ada_exceptions_list): Use compiled_regex.
10513 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10514 std::unique_ptr<compiled_regex>.
10515 (exception_catchpoint::~exception_catchpoint): Remove regfree
10516 call.
10517 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10518 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10519 * breakpoint.c (solib_catchpoint::compiled): Now a
10520 std::unique_ptr<compiled_regex>.
10521 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10522 (check_status_catch_solib): Adjust to use compiled_regex.
10523 (add_solib_catchpoint): Adjust to use compiled_regex.
10524 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10525 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10526 compiled_regex reference. Adjust to use it.
10527 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10528 declaration. Include "gdb_regex.h".
10529 (apropos_cmd): Change regex parameter to compiled_regex reference.
10530 * gdb_regex.c: New file.
10531 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10532 declarations.
10533 (class compiled_regex): New.
10534 * linux-tdep.c: Include "common/gdb_optional.h".
10535 (struct mapping_regexes): New, factored out from
10536 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10537 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10538 gdb::optional and remove cleanups. Adjust to compiled_regex.
10539 * probe.c: Include "common/gdb_optional.h".
10540 (collect_probes): Use compiled_regex and gdb::optional and remove
10541 cleanups.
10542 * skip.c: Include "common/gdb_optional.h".
10543 (skiplist_entry::compiled_function_regexp): Now a
10544 gdb::optional<compiled_regex>.
10545 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10546 (free_skiplist_entry): Remove regfree call.
10547 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10548 compiled_regex and gdb::optional.
10549 * symtab.c: Include "common/gdb_optional.h".
10550 (search_symbols): Use compiled_regex and gdb::optional.
10551 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10552 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10553 to gdb_regex.c.
10554
10555 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10556
10557 * regcache.c (regcache::save): Avoid buffer use.
10558 (regcache::dump): Likewise.
10559
10560 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10561
10562 * sh-tdep.c (sh_pseudo_register_read): Remove
10563 MAX_REGISTER_SIZE.
10564 (sh_pseudo_register_write): Likewise.
10565 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10566 (sh64_pseudo_register_write): Likewise
10567
10568 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10569
10570 * aarch64-tdep.c (aarch64_store_return_value): Use
10571 V_REGISTER_SIZE.
10572 (aarch64_pseudo_read_value): Likewise.
10573 (aarch64_pseudo_write): Likewise.
10574
10575 2017-06-06 Yao Qi <yao.qi@linaro.org>
10576
10577 * regformats/regdef.h (set_register_cache): Remove the
10578 declaration.
10579
10580 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10581
10582 * frame.c (frame_unwind_register_signed): Use
10583 frame_unwind_register_value.
10584
10585 2017-06-06 Pedro Alves <palves@redhat.com>
10586
10587 PR breakpoints/21553
10588 * breakpoint.c (create_breakpoints_sal_default)
10589 (init_breakpoint_sal, create_breakpoint_sal): Use
10590 gdb::unique_xmalloc_ptr for string parameters.
10591 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10592 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10593 (base_breakpoint_create_breakpoints_sal)
10594 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10595 (strace_marker_create_breakpoints_sal)
10596 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10597 string parameters.
10598 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10599 gdb::unique_xmalloc_ptr for string parameters.
10600 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10601 parameters.
10602
10603 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10604
10605 * alpha-tdep.c (alpha_register_to_value): Use
10606 get_frame_register_value.
10607 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10608
10609 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10610
10611 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10612 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10613 (ia64_value_to_register): Likewise.
10614 (ia64_extract_return_value): Likewise.
10615 (ia64_store_return_value): Likewise.
10616 (ia64_push_dummy_call): Likewise.
10617
10618 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10619
10620 GDB 8.0 released.
10621
10622 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10623
10624 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10625
10626 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10627
10628 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10629 parameter.
10630 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10631
10632 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10633
10634 * event-loop.c (poll_timers): Unallocate timer using delete
10635 instead of xfree.
10636
10637 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10638
10639 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10640 (struct breakpoint) <~breakpoint>: New.
10641 (struct watchpoint): Inherit from breakpoint.
10642 <~watchpoint>: New.
10643 <base>: Remove.
10644 (struct tracepoint): Inherit from breakpoint.
10645 <base>: Remove.
10646 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10647 (struct longjmp_breakpoint): Inherit from breakpoint.
10648 <~longjmp_breakpoint>: New.
10649 <base>: Remove.
10650 (new_breakpoint_from_type): Remove casts.
10651 (watchpoint_in_thread_scope): Remove reference to base field.
10652 (watchpoint_del_at_next_stop): Likewise.
10653 (update_watchpoint): Likewise.
10654 (watchpoint_check): Likewise.
10655 (bpstat_check_watchpoint): Likewise.
10656 (set_longjmp_breakpoint): Likewise.
10657 (struct fork_catchpoint): Inherit from breakpoint.
10658 <base>: Remove.
10659 (struct solib_catchpoint): Inherit from breakpoint.
10660 <~solib_catchpoint>: New.
10661 <base>: Remove.
10662 (dtor_catch_solib): Change to ...
10663 (solib_catchpoint::~solib_catchpoint): ... this.
10664 (breakpoint_hit_catch_solib): Remove reference to base field.
10665 (add_solib_catchpoint): Likewise.
10666 (create_fork_vfork_event_catchpoint): Likewise.
10667 (struct exec_catchpoint): Inherit from breakpoint.
10668 <~exec_catchpoint>: New.
10669 <base>: Remove.
10670 (dtor_catch_exec): Change to ...
10671 (exec_catchpoint::~exec_catchpoint): ... this.
10672 (dtor_watchpoint): Change to ...
10673 (watchpoint::~watchpoint): ... this.
10674 (watch_command_1): Remove reference to base field.
10675 (catch_exec_command_1): Likewise.
10676 (base_breakpoint_dtor): Change to ...
10677 (breakpoint::~breakpoint): ... this.
10678 (base_breakpoint_ops): Remove dtor field value.
10679 (longjmp_bkpt_dtor): Change to ...
10680 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10681 (strace_marker_create_breakpoints_sal): Remove reference to base
10682 field.
10683 (delete_breakpoint): Don't manually call breakpoint destructor.
10684 (create_tracepoint_from_upload): Remove reference to base field.
10685 (trace_pass_set_count): Likewise.
10686 (initialize_breakpoint_ops): Don't initialize
10687 momentary_breakpoint_ops, don't set dtors.
10688 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10689 <~ada_catchpoint>: New.
10690 <base>: Remove.
10691 (create_excep_cond_exprs): Remove reference to base field.
10692 (dtor_exception): Change to ...
10693 (ada_catchpoint::~ada_catchpoint): ... this.
10694 (dtor_catch_exception): Remove.
10695 (dtor_catch_exception_unhandled): Remove.
10696 (dtor_catch_assert): Remove.
10697 (create_ada_exception_catchpoint): Remove reference to base
10698 field.
10699 (initialize_ada_catchpoint_ops): Don't set dtors.
10700 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10701 breakpoint.
10702 <~signal_catchpoint>: New.
10703 <base>: Remove.
10704 (signal_catchpoint_dtor): Change to ...
10705 (signal_catchpoint::~signal_catchpoint): ... this.
10706 (create_signal_catchpoint): Remove reference to base field.
10707 (initialize_signal_catchpoint_ops): Don't set dtor.
10708 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10709 from breakpoint.
10710 <~syscall_catchpoint>: New.
10711 <base>: Remove.
10712 (dtor_catch_syscall): Change to ...
10713 (syscall_catchpoint::~syscall_catchpoint): ... this.
10714 (create_syscall_event_catchpoint): Remove reference to base
10715 field.
10716 (initialize_syscall_catchpoint_ops): Don't set dtor.
10717 * break-catch-throw.c (struct exception_catchpoint): Inherit
10718 from breakpoint.
10719 <~exception_catchpoint>: New.
10720 <base>: Remove.
10721 (dtor_exception_catchpoint): Change to ...
10722 (exception_catchpoint::~exception_catchpoint): ... this.
10723 (handle_gnu_v3_exceptions): Remove reference to base field.
10724 (initialize_throw_catchpoint_ops): Don't set dtor.
10725 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10726 field.
10727 * remote.c (remote_get_tracepoint_status): Likewise.
10728 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10729 * tracefile.c (tracefile_fetch_registers): Likewise.
10730 * tracepoint.c (actions_command): Likewise.
10731 (validate_actionline): Likewise.
10732 (tfind_1): Likewise.
10733 (get_traceframe_location): Likewise.
10734 (find_matching_tracepoint_location): Likewise.
10735 (parse_tracepoint_status): Likewise.
10736 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10737
10738 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10739
10740 * breakpoint.c (struct longjmp_breakpoint): New struct.
10741 (is_tracepoint_type): Change return type to bool.
10742 (is_longjmp_type): New function.
10743 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10744 (set_raw_breakpoint_without_location): Use
10745 new_breakpoint_from_type.
10746 (set_raw_breakpoint): Likewise.
10747
10748 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10749
10750 * breakpoint.c (new_breakpoint_from_type): New function.
10751 (create_breakpoint_sal): Use new_breakpoint_from_type and
10752 unique_ptr.
10753 (create_breakpoint): Likewise.
10754
10755 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10756
10757 * memattr.c (mem_info_command): Rename to ...
10758 (info_mem_command): ... this.
10759 (mem_enable_command): Rename to ...
10760 (enable_mem_command): ... this.
10761 (mem_disable_command): Rename to ...
10762 (disable_mem_command): ... this.
10763 (mem_delete_command): Rename to ...
10764 (delete_mem_command): ... this.
10765 (_initialize_mem): Adjust function names.
10766
10767 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10768
10769 * btrace.c (handle_pt_insn_events): New.
10770 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10771 STATUS. Split into this and ...
10772 (handle_pt_insn_event_flags): ... this.
10773
10774 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10775
10776 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10777 and struct pt_insn.resynced.
10778 * configure: Regenerated.
10779 * config.in: Regenerated.
10780
10781 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10782
10783 * btrace.c (ftrace_find_call_by_number): New function.
10784 (ftrace_new_function): Store objects, not pointers.
10785 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10786 ftrace_new_gap, ftrace_update_function,
10787 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10788 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10789 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10790 btrace_ends_with_single_insn, btrace_call_get): Account for
10791 btrace_thread_info::functions now storing objects.
10792 * btrace.h (struct btrace_thread_info): Add constructor.
10793 (struct btrace_thread_info) <functions>: Make std::vector.
10794 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10795 Initialize with default values.
10796 * record-btrace.c (record_btrace_frame_sniffer): Account for
10797 btrace_thread_info::functions now storing objects.
10798
10799 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10800
10801 * btrace.c: Remove typedef bfun_s.
10802 (ftrace_new_gap): Directly add gaps to the list of gaps.
10803 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10804 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10805 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10806 instead of gdb VEC.
10807
10808 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10809
10810 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10811 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10812 with btrace_thread_info::next_segment and
10813 btrace_thread_info::prev_segment.
10814 * btrace.h: Remove struct btrace_func_link.
10815 (struct btrace_function): Replace pair of function segment pointers
10816 with pair of indices.
10817 * python/py-record-btrace.c (btpy_call_prev_sibling,
10818 btpy_call_next_sibling): Replace references to
10819 btrace_thread_info::segment with btrace_thread_info::next_segment and
10820 btrace_thread_info::prev_segment.
10821 * record-btrace.c (record_btrace_frame_this_id): Use
10822 btrace_find_call_by_number.
10823
10824 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10825
10826 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10827 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10828 btrace_insn_next, btrace_insn_prev): Remove references to
10829 btrace_thread_info::flow.
10830 * btrace.h (struct btrace_function): Remove FLOW.
10831
10832 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10833
10834 * btrace.c (ftrace_find_call_by_number): New function.
10835 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10836 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10837 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10838 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10839 index.
10840 * btrace.h (struct btrace_function): Turn UP into an index.
10841 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10842 as an index.
10843 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10844 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10845 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10846
10847 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10848
10849 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10850 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10851 ftrace_update_function, ftrace_compute_global_level_offset,
10852 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10853 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10854 btrace_insn_end, btrace_is_empty): Remove references to
10855 btrace_thread_info::begin and btrace_thread_info::end.
10856 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10857 (struct btrace_thread_info) <functions>: Adjust comment.
10858 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10859 btrace_thread_info::begin.
10860
10861 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10862
10863 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10864 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10865 ftrace_update_function): Remove arguments that implicitly were always
10866 BTINFO->END.
10867 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10868 Don't pass BTINFO->END.
10869
10870 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10871
10872 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10873 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10874 btrace_find_insn_by_number): Replace function segment pointer with
10875 index.
10876 (btrace_insn_cmp): Simplify.
10877 * btrace.h: (struct btrace_insn_iterator) Rename index to
10878 insn_index. Replace function segment pointer with index into function
10879 segment vector.
10880 * record-btrace.c (record_btrace_call_history): Replace function
10881 segment pointer use with index.
10882 (record_btrace_frame_sniffer): Retrieve function call segment through
10883 vector.
10884 (record_btrace_set_replay): Remove defunc't safety check.
10885
10886 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10887
10888 * btrace.c (btrace_ends_with_single_insn): New function.
10889 (btrace_call_get, btrace_call_number, btrace_call_begin,
10890 btrace_call_end, btrace_call_next, btrace_call_prev,
10891 btrace_find_call_by_number): Use index into call segment vector
10892 instead of pointer.
10893 (btrace_call_cmp): Simplify.
10894 * btrace.h (struct btrace_call_iterator): Replace function call segment
10895 pointer with index into vector.
10896 * record-btrace.c (record_btrace_call_history): Use index instead of
10897 pointer.
10898
10899 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10900
10901 * btrace.c (btrace_insn_begin, btrace_insn_end,
10902 btrace_find_insn_by_number): Add btinfo to iterator.
10903 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10904
10905 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10906
10907 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10908 and save pointers directly.
10909 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10910 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10911 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10912 changed signature of functions.
10913 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10914 (btrace_fetch): Remove code that adds btrace_function pointers to
10915 vector of btrace_functions.
10916 (btrace_clear): Simplify freeing vector of btrace_functions.
10917
10918 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10919
10920 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10921 Replace VEC_* with std::vector functions.
10922 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10923 (struct btrace_thread_info)<functions>: Change type to std::vector.
10924
10925 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10926
10927 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10928 "Removed targets and native configurations" up. Merge duplicate
10929 "New commands" sub-sections. Add "New options" sub-sections.
10930
10931 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10932
10933 * defs.h (copy_integer_to_size): New declaration.
10934 * findvar.c (copy_integer_to_size): New function.
10935 (do_cint_test): New selftest function.
10936 (copy_integer_to_size_test): Likewise.
10937 (_initialize_findvar): Likewise.
10938 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10939 (mips_fbsd_collect_reg): Use raw_collect_integer.
10940 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10941 (mips64_fill_gregset): Use raw_collect_integer
10942 (mips64_fill_fpregset): Use raw_supply_integer.
10943 * regcache.c (regcache::raw_supply_integer): New function.
10944 (regcache::raw_collect_integer): Likewise.
10945 * regcache.h: (regcache::raw_supply_integer): New declaration.
10946 (regcache::raw_collect_integer): Likewise.
10947
10948 2017-05-24 Yao Qi <yao.qi@linaro.org>
10949
10950 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10951 (COMMON_OBS): Add gdbarch-selftests.o.
10952 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10953 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10954 * gdbarch-selftests.c: New file.
10955 * regcache.h (regcache) <~regcache>: Mark it virtual if
10956 GDB_SELF_TEST.
10957 <raw_write>: Likewise.
10958
10959 2017-05-24 Yao Qi <yao.qi@linaro.org>
10960
10961 * regcache.c (current_regcache): Change it to
10962 regcache::current_regcache.
10963 (regcache_observer_target_changed): Update.
10964 (regcache_thread_ptid_changed): Make it a regcache static
10965 method.
10966 (regcache_thread_ptid_changed): Update.
10967 (class regcache_access): New.
10968 (current_regcache_test): Update.
10969 (_initialize_regcache): Update.
10970 * regcache.h: Include forward_list.
10971 (regcache): Declare regcache_thread_ptid_changed and declare
10972 registers_changed_ptid as friend.
10973
10974 2017-05-24 Yao Qi <yao.qi@linaro.org>
10975
10976 * i387-tdep.c (i387_register_to_value): Use register_size
10977 instead of TYPE_LENGTH.
10978 * m68k-tdep.c (m68k_register_to_value): Likewise.
10979
10980 2017-05-24 Yao Qi <yao.qi@linaro.org>
10981
10982 * i387-tdep.c (i387_convert_register_p): Return false if type
10983 code isn't TYPE_CODE_FLT.
10984
10985 2017-05-24 Yao Qi <yao.qi@linaro.org>
10986
10987 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10988 length is 4.
10989 (alpha_register_to_value): Remove type length check.
10990 (alpha_value_to_register): Likewise.
10991
10992 2017-05-24 Yao Qi <yao.qi@linaro.org>
10993
10994 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10995 TYPE_CODE_FLT.
10996
10997 2017-05-24 Yao Qi <yao.qi@linaro.org>
10998
10999 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11000 TYPE_CODE_FLT or not.
11001
11002 2017-05-24 Yao Qi <yao.qi@linaro.org>
11003
11004 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11005 * avr-tdep.c (avr_gdbarch_init): Likewise.
11006 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11007 * cris-tdep.c (cris_gdbarch_init): Likewise.
11008 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11009 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11010 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11011 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11012 * mep-tdep.c (mep_gdbarch_init): Likewise.
11013 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11014 * mips-tdep.c (mips_gdbarch_init): Likewise.
11015 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11016 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11017 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11018 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11019 * v850-tdep.c (v850_gdbarch_init): Likewise.
11020
11021 2017-05-24 Yao Qi <yao.qi@linaro.org>
11022
11023 * selftest-arch.c (tests_with_arch): Call registers_changed
11024 and reinit_frame_cache.
11025 * selftest.c (run_self_tests): Likewise.
11026
11027 2017-05-24 Yao Qi <yao.qi@linaro.org>
11028
11029 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11030 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11031
11032 2017-05-24 Yao Qi <yao.qi@linaro.org>
11033
11034 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11035 set_gdbarch_print_insn.
11036
11037 2017-05-24 Yao Qi <yao.qi@linaro.org>
11038
11039 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11040 set_gdbarch_print_insn.
11041
11042 2017-05-24 Yao Qi <yao.qi@linaro.org>
11043
11044 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11045 set_gdbarch_print_insn.
11046 * arc-tdep.c (arc_gdbarch_init): Likewise.
11047 * arch-utils.c: include dis-asm.h.
11048 (default_print_insn): New function.
11049 * arch-utils.h (default_print_insn): Declare.
11050 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11051 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11052 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11053 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11054 * frv-tdep.c (frv_gdbarch_init): Likewise.
11055 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11056 * gdbarch.sh (print_insn): Use default_print_insn.
11057 * gdbarch.c: Regenerated.
11058 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11059 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11060 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11061 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11062 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11063 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11064 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11065 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11066 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11067 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11068 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11069 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11070 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11071 * mt-tdep.c (mt_gdbarch_init): Likewise.
11072 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11073 * nios2-tdep.c (nios2_print_insn): Remove.
11074 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11075 * rx-tdep.c (rx_gdbarch_init): Likewise.
11076 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11077 * score-tdep.c (score_print_insn): Remove.
11078 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11079 * sh-tdep.c (sh_gdbarch_init): Likewise.
11080 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11081 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11082 * tic6x-tdep.c (tic6x_print_insn): Remove.
11083 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11084 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11085 * v850-tdep.c (v850_gdbarch_init): Likewise.
11086 * vax-tdep.c (vax_gdbarch_init): Likewise.
11087 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11088 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11089
11090 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11091
11092 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11093 (MIPS_FP0_REGNUM): Remove.
11094 (MIPS_FSR_REGNUM): Remove.
11095 (mips_fbsd_supply_fpregs): Use mips_regnum.
11096 (mips_fbsd_supply_gregs): Likewise.
11097 (mips_fbsd_collect_fpregs): Likewise.
11098 (mips_fbsd_collect_gregs): Likewise.
11099
11100 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11101
11102 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11103 (getpfpregs_supplies): New function.
11104 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11105 getfpregs_supplies.
11106 (mips_fbsd_store_inferior_registers): Likewise.
11107
11108 2017-05-22 Pedro Alves <palves@redhat.com>
11109
11110 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11111 maintainer.
11112
11113 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11114
11115 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11116 (store_register): Likewise.
11117 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11118 (get_decimal_float_return_value): Likewise.
11119 (do_ppc_sysv_return_value): Likewise.
11120 (ppc64_sysv_abi_push_integer): Likewise.
11121 (ppc64_sysv_abi_push_freg): Likewise.
11122 (ppc64_sysv_abi_return_value_base): Likewise.
11123 (ppc64_sysv_abi_return_value): Likewise.
11124 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11125 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11126 * rs6000-nat.c: Likewise.
11127 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11128 (rs6000_value_to_register): Likewise.
11129 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11130
11131 2017-05-21 Tom Tromey <tom@tromey.com>
11132
11133 PR rust/21466:
11134 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11135 arrays as "[T]", not "[T; ]".
11136
11137 2017-05-19 Tom Tromey <tom@tromey.com>
11138
11139 PR rust/21484:
11140 * rust-lang.c (exp_descriptor_rust): New function.
11141 (rust_language_defn): Use it.
11142 * p-lang.c (pascal_language_defn): Update.
11143 * opencl-lang.c (opencl_language_defn): Update.
11144 * objc-lang.c (objc_language_defn): Update.
11145 * m2-lang.c (m2_language_defn): Update.
11146 * language.h (struct language_defn)
11147 <la_watch_location_expression>: New member.
11148 * language.c (unknown_language_defn, auto_language_defn)
11149 (local_language_defn): Update.
11150 * go-lang.c (go_language_defn): Update.
11151 * f-lang.c (f_language_defn): Update.
11152 * d-lang.c (d_language_defn): Update.
11153 * c-lang.h (c_watch_location_expression): Declare.
11154 * c-lang.c (c_watch_location_expression): New function.
11155 (c_language_defn, cplus_language_defn, asm_language_defn)
11156 (minimal_language_defn): Use it.
11157 * breakpoint.c (watch_command_1): Call
11158 la_watch_location_expression.
11159 * ada-lang.c (ada_language_defn): Update.
11160
11161 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11162
11163 PR tui/21482
11164 * gdb_curses.h (NOMACROS): Define.
11165 (NCURSES_NOMACROS): Define.
11166
11167 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11168
11169 PR tui/21482
11170 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11171 arg to char *.
11172 * tui/tui-wingeneral.c (box_win): Likewise.
11173 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11174 (tui_show_source_line): Likewise.
11175 (tui_show_exec_info_content): Likewise.
11176
11177 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11178
11179 * sparc-tdep.c (sparc_structure_return_p)
11180 (sparc_arg_on_registers_p): New functions.
11181 (sparc32_store_arguments): Use them.
11182 * sparc64-tdep.c (sparc64_16_byte_align_p)
11183 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11184 Handle TYPE_CODE_ARRAY.
11185
11186 2017-05-17 Yao Qi <yao.qi@linaro.org>
11187
11188 * cli/cli-decode.c (add_alias_cmd): New function.
11189 * command.h (add_alias_cmd): Declare.
11190 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11191 instead call add_alias_cmd.
11192
11193 2017-05-17 Pedro Alves <palves@redhat.com>
11194
11195 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11196 (nat_makefile_frag): ... this. All references updated.
11197 * configure.ac: Likewise.
11198 * configure.nat: Likewise. Enhance comments.
11199 * configure: Regenerate.
11200
11201 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11202
11203 * procfs.c (procfs_create_inferior): Change prototype to match
11204 definition.
11205
11206 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11207
11208 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11209 C++ compiler warning.
11210
11211 2017-05-12 Tom Tromey <tom@tromey.com>
11212
11213 PR rust/21483:
11214 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11215 recurse, just call value_struct_elt directly.
11216
11217 2017-05-12 Tom Tromey <tom@tromey.com>
11218
11219 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11220 OP_RUST_ARRAY>: Fix.
11221
11222 2017-05-12 Tom Tromey <tom@tromey.com>
11223
11224 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11225
11226 2017-05-09 Yao Qi <yao.qi@linaro.org>
11227
11228 * regcache.c: Include <forward_list>.
11229 (struct regcache_list): Remove.
11230 (current_regcache): Update.
11231 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11232 (regcache_thread_ptid_changed): Likewise.
11233 (registers_changed_ptid): Likewise.
11234 (current_regcache_size): Likewise.
11235
11236 2017-05-09 Yao Qi <yao.qi@linaro.org>
11237
11238 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11239 (current_regcache_size): New function.
11240 (current_regcache_test): New function.
11241 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11242
11243 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11244
11245 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11246 (print_gp_register_row): Use get_frame_register_value.
11247
11248 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11249
11250 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11251 (mips_supply_fpregset): Likewise.
11252 (mips64_supply_gregset): Likewise.
11253
11254 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11255
11256 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11257 regcache->raw_supply_zeroed.
11258
11259 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11260
11261 * configure.nat: Rearrange 'case' statements to match
11262 host before cpu.
11263
11264 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11265
11266 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11267 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11268 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11269 "@nat_extra_makefile_frag@".
11270 (Makefile): Remove dependency on "@frags@".
11271 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11272 (data-directory/Makefile): Likewise.
11273 * config/aarch64/linux.mh: Deleted; moved contents to
11274 "gdb/configure.nat".
11275 * config/alpha/alpha-linux.mh: Likewise.
11276 * config/alpha/nbsd.mh: Likewise.
11277 * config/arm/linux.mh: Likewise.
11278 * config/arm/nbsdelf.mh: Likewise.
11279 * config/i386/cygwin.mh: Likewise.
11280 * config/i386/cygwin64.mh: Likewise.
11281 * config/i386/darwin.mh: Likewise.
11282 * config/i386/fbsd.mh: Likewise.
11283 * config/i386/fbsd64.mh: Likewise.
11284 * config/i386/go32.mh: Likewise.
11285 * config/i386/i386gnu.mh: Likewise.
11286 * config/i386/i386sol2.mh: Likewise.
11287 * config/i386/linux.mh: Likewise.
11288 * config/i386/linux64.mh: Likewise.
11289 * config/i386/mingw.mh: Likewise.
11290 * config/i386/mingw64.mh: Likewise.
11291 * config/i386/nbsd64.mh: Likewise.
11292 * config/i386/nbsdelf.mh: Likewise.
11293 * config/i386/nto.mh: Likewise.
11294 * config/i386/obsd.mh: Likewise.
11295 * config/i386/obsd64.mh: Likewise.
11296 * config/i386/sol2-64.mh: Likewise.
11297 * config/ia64/linux.mh: Likewise.
11298 * config/m32r/linux.mh: Likewise.
11299 * config/m68k/linux.mh: Likewise.
11300 * config/m68k/nbsdelf.mh: Likewise.
11301 * config/m68k/obsd.mh: Likewise.
11302 * config/m88k/obsd.mh: Likewise.
11303 * config/mips/fbsd.mh: Likewise.
11304 * config/mips/linux.mh: Likewise.
11305 * config/mips/nbsd.mh: Likewise.
11306 * config/mips/obsd64.mh: Likewise.
11307 * config/pa/linux.mh: Likewise.
11308 * config/pa/nbsd.mh: Likewise.
11309 * config/pa/obsd.mh: Likewise.
11310 * config/powerpc/aix.mh: Likewise.
11311 * config/powerpc/fbsd.mh: Likewise.
11312 * config/powerpc/linux.mh: Likewise.
11313 * config/powerpc/nbsd.mh: Likewise.
11314 * config/powerpc/obsd.mh: Likewise.
11315 * config/powerpc/ppc64-linux.mh: Likewise.
11316 * config/powerpc/spu-linux.mh: Likewise.
11317 * config/s390/linux.mh: Likewise.
11318 * config/sh/nbsd.mh: Likewise.
11319 * config/sparc/fbsd.mh: Likewise.
11320 * config/sparc/linux.mh: Likewise.
11321 * config/sparc/linux64.mh: Likewise.
11322 * config/sparc/nbsd64.mh: Likewise.
11323 * config/sparc/nbsdelf.mh: Likewise.
11324 * config/sparc/obsd64.mh: Likewise.
11325 * config/sparc/sol2.mh: Likewise.
11326 * config/tilegx/linux.mh: Likewise.
11327 * config/vax/nbsdelf.mh: Likewise.
11328 * config/vax/obsd.mh: Likewise.
11329 * config/xtensa/linux.mh: Likewise.
11330 * config/i386/i386gnu.mn: New file, with excerpts from
11331 "config/i386/i386gnu.mh".
11332 * configure: Regenerate.
11333 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11334 *.mh files under "gdb/config".
11335 * configure.nat: New file, with contents from the
11336 "gdb/config/*/*.mh" files.
11337
11338 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11339
11340 * btrace.c (btrace_clear): Free insn vector.
11341
11342 2017-05-05 Pedro Alves <palves@redhat.com>
11343
11344 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11345 * configure: Regenerate.
11346
11347 2017-05-04 Pedro Alves <palves@redhat.com>
11348
11349 * Makefile.in (SFILES): Add progspace-and-thread.c.
11350 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11351 (COMMON_OBS): Add progspace-and-thread.o.
11352 * breakpoint.c: Include "progspace-and-thread.h".
11353 (update_inserted_breakpoint_locations)
11354 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11355 Use scoped_restore_current_pspace_and_thread.
11356 (create_std_terminate_master_breakpoint): Use
11357 scoped_restore_current_program_space.
11358 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11359 (print_breakpoint_location): Use
11360 scoped_restore_current_program_space.
11361 (bp_loc_is_permanent): Use
11362 scoped_restore_current_pspace_and_thread.
11363 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11364 (download_tracepoint_locations): Use
11365 scoped_restore_current_pspace_and_thread.
11366 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11367 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11368 (enum step_over_calls_kind): Moved from inferior.h.
11369 (class scoped_restore_current_thread): New class.
11370 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11371 declaration.
11372 (scoped_restore_current_thread): New class.
11373 * infcmd.c: Include "common/gdb_optional.h".
11374 (continue_1, proceed_after_attach): Use
11375 scoped_restore_current_thread.
11376 (notice_new_inferior): Use scoped_restore_current_thread.
11377 * inferior.c: Include "progspace-and-thread.h".
11378 (restore_inferior, save_current_inferior): Delete.
11379 (add_inferior_command, clone_inferior_command): Use
11380 scoped_restore_current_pspace_and_thread.
11381 * inferior.h (scoped_restore_current_inferior): New class.
11382 * infrun.c: Include "progspace-and-thread.h" and
11383 "common/gdb_optional.h".
11384 (follow_fork_inferior): Use
11385 scoped_restore_current_pspace_and_thread.
11386 (scoped_restore_exited_inferior): New class.
11387 (handle_vfork_child_exec_or_exit): Use
11388 scoped_restore_exited_inferior,
11389 scoped_restore_current_pspace_and_thread,
11390 scoped_restore_current_thread and scoped_restore.
11391 (fetch_inferior_event): Use scoped_restore_current_thread.
11392 * linespec.c (decode_line_full, decode_line_1): Use
11393 scoped_restore_current_program_space.
11394 * mi/mi-main.c: Include "progspace-and-thread.h".
11395 (exec_continue): Use scoped_restore_current_thread.
11396 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11397 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11398 * proc-service.c (ps_pglobal_lookup): Use
11399 scoped_restore_current_program_space.
11400 * progspace-and-thread.c: New file.
11401 * progspace-and-thread.h: New file.
11402 * progspace.c (release_program_space, clone_program_space): Use
11403 scoped_restore_current_program_space.
11404 (restore_program_space, save_current_program_space)
11405 (save_current_space_and_thread): Delete.
11406 (switch_to_program_space_and_thread): Moved to
11407 progspace-and-thread.c.
11408 * progspace.h (save_current_program_space)
11409 (save_current_space_and_thread): Delete declarations.
11410 (scoped_restore_current_program_space): New class.
11411 * remote.c (remote_btrace_maybe_reopen): Use
11412 scoped_restore_current_thread.
11413 * symtab.c: Include "progspace-and-thread.h".
11414 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11415 * thread.c (print_thread_info_1): Use
11416 scoped_restore_current_thread.
11417 (struct current_thread_cleanup): Delete.
11418 (do_restore_current_thread_cleanup)
11419 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11420 (scoped_restore_current_thread::~scoped_restore_current_thread):
11421 ... this new dtor.
11422 (make_cleanup_restore_current_thread): Rename/convert to ...
11423 (scoped_restore_current_thread::scoped_restore_current_thread):
11424 ... this new ctor.
11425 (thread_apply_all_command): Use scoped_restore_current_thread.
11426 (thread_apply_command): Use scoped_restore_current_thread.
11427 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11428 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11429
11430 2017-05-04 Pedro Alves <palves@redhat.com>
11431
11432 * thread.c (make_cleanup_restore_current_thread): Move
11433 find_thread_ptid call before the is_stopped call. Assert that the
11434 thread is found. Replace is_stopped call by checking the thread's
11435 state directly. Remove unnecessary NULL-thread check.
11436
11437 2017-05-04 Pedro Alves <palves@redhat.com>
11438
11439 * corelow.c (thread_section_name): New class.
11440 (get_core_register_section, get_core_siginfo): Use it.
11441
11442 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11443
11444 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11445 (get_core_register_section): Remove xfree of NULL pointer.
11446
11447 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11448
11449 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11450 * regcache.c (regcache::raw_supply_zeroed): New function.
11451 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11452
11453 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11454
11455 * gdbarch.sh: Remove commented out definition of
11456 TARGET_CHAR_BIT.
11457 * gdbarch.h: Re-generate.
11458
11459 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11460
11461 * configure: Regenerate.
11462
11463 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11464
11465 * solib-target.c (solib_target_relocate_section_addresses):
11466 Remove num_section_bases, num_bases, segment_bases variables.
11467
11468 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11469
11470 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11471
11472 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11473
11474 * solib-target.c: Include <vector>
11475 (struct lm_info_target) <~lm_info_target>: Remove.
11476 <segment_bases, section_bases>: Change type to
11477 std::vector<CORE_ADDR>.
11478 (library_list_start_segment, library_list_start_section,
11479 library_list_end_library,
11480 solib_target_relocate_section_addresses): Adjust.
11481
11482 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11483
11484 * gdbarch.sh (software_single_step): Change return type to
11485 std::vector<CORE_ADDR>.
11486 * gdbarch.c, gdbarch.h: Re-generate.
11487 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11488 Adjust.
11489 (arm_deal_with_atomic_sequence_raw): Adjust.
11490 (thumb_get_next_pcs_raw): Adjust.
11491 (arm_get_next_pcs_raw): Adjust.
11492 (arm_get_next_pcs): Adjust.
11493 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11494 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11495 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11496 (alpha_software_single_step): Adjust.
11497 * alpha-tdep.h (alpha_software_single_step): Adjust.
11498 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11499 * arm-tdep.c (arm_software_single_step): Adjust.
11500 (arm_breakpoint_kind_from_current_state): Adjust.
11501 * arm-tdep.h (arm_software_single_step): Adjust.
11502 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11503 * cris-tdep.c (cris_software_single_step): Adjust.
11504 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11505 (micromips_deal_with_atomic_sequence): Adjust.
11506 (deal_with_atomic_sequence): Adjust.
11507 (mips_software_single_step): Adjust.
11508 * mips-tdep.h (mips_software_single_step): Adjust.
11509 * moxie-tdep.c (moxie_software_single_step): Adjust.
11510 * nios2-tdep.c (nios2_software_single_step): Adjust.
11511 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11512 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11513 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11514 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11515 * sparc-tdep.c (sparc_software_single_step): Adjust.
11516 * spu-tdep.c (spu_software_single_step): Adjust.
11517 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11518
11519 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11520
11521 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11522 * gdbarch.h: Re-generate.
11523
11524 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11525
11526 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11527 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11528 * python/py-instruction.c, python/py-instruction.h: New file.
11529 * python/py-record.c: Add py-instruction.h include.
11530 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11531 gdb.RecordInstruction.
11532 * python/python-internal.h: Add gdbpy_initialize_instruction
11533 declaration.
11534 * python/python.c (do_start_initialization): Add
11535 gdbpy_initialize_instruction.
11536
11537 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11538
11539 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11540 Remove.
11541 (btrace_func_from_recpy_func): New function.
11542 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11543 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11544 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11545 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11546 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11547 Also, use new helper functions.
11548 (btpy_list_item): Use new helper functions.
11549 (recpy_bt_function_call_history): Use new type name.
11550 (btpy_call_getset): Remove.
11551 (gdbpy_initialize_btrace): Remove code to initialize
11552 gdb.BtraceFunctionCall.
11553 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11554 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11555 recpy_bt_func_prev, recpy_bt_func_next): New export.
11556 * python/py-record.c (recpy_func_type): New static object.
11557 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11558 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11559 recpy_func_next): New function.
11560 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11561 (recpy_func_getset): New static object.
11562 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11563 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11564
11565 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11566
11567 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11568 (btpy_object, btpy_insn_type, btpy_new): Remove.
11569 (btpy_list_object): Use gdb.RecordInstruction type instead of
11570 gdb.BtraceInstruction type.
11571 (btrace_insn_from_recpy_insn): New function.
11572 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11573 btpy_new.
11574 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11575 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11576 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11577 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11578 instead of btpy_object.
11579 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11580 btpy_insn_data, btpy_insn_decode): Rename to ...
11581 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11582 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11583 recpy_bt_insn_decode): This. Also, use new helper functions.
11584 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11585 recpy_insn_type.
11586 (btpy_insn_getset): Remove.
11587 (gdbpy_initialize_btrace): Remove code to initialize
11588 gdb.BtraceInstruction. Use recpy_element_object.
11589 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11590 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11591 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11592 * python/py-record.c (recpy_insn_type): New static object.
11593 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11594 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11595 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11596 New function.
11597 (recpy_insn_getset): New static object.
11598 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11599 * python/py-record.h (recpy_element_object): New typedef.
11600 (recpy_insn_type, recpy_insn_new): New export.
11601
11602 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11603
11604 * py-record-btrace.c (btpy_insn_new): Removed.
11605 (btpy_insn_or_gap_new): New function.
11606 (btpy_insn_error): Removed.
11607 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11608 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11609 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11610 btpy_insn_or_gap_new instead of btpy_insn_new.
11611 (btpy_insn_getset): Remove btpy_insn_error.
11612 * py-record.c (recpy_gap_type): New static object.
11613 (recpy_gap_object): New typedef.
11614 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11615 recpy_gap_reason_string): New function.
11616 (recpy_gap_getset): New static object.
11617 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11618 * py-record.h (recpy_gap_new): New export.
11619
11620 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11621
11622 * python/py-record.c (recpy_ptid): Remove.
11623 (recpy_record_getset): Remove recpy_ptid.
11624
11625 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11626
11627 * btrace.c (btrace_fetch): Set inferior_ptid.
11628 * python/py-record-btrace.c: Add "py-record.h" include.
11629 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11630 recpy_bt_end, recpy_bt_instruction_history,
11631 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11632 in gdb.Record object instead of current ptid.
11633 * python/py-record.c: Include new "py-record.h" file.
11634 (recpy_record_object): Moved to py-record.h.
11635 * python/py-record.h: New file.
11636
11637 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11638
11639 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11640 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11641 indentation.
11642
11643 2017-05-01 Joel Brobecker <brobecker@adacore.com>
11644
11645 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11646 the past maintainers section.
11647
11648 2017-04-28 Yao Qi <yao.qi@linaro.org>
11649
11650 * infcmd.c (get_return_value): Use regcache ctor, and remove
11651 cleanup.
11652
11653 2017-04-28 Yao Qi <yao.qi@linaro.org>
11654 Pedro Alves <palves@redhat.com>
11655
11656 * regcache.c (regcache::regcache): New tag dispatch ctor.
11657 (do_cooked_read): Moved above.
11658 (regcache_dup): Use the tag dispatch ctor..
11659 * regcache.h (regcache): Declare ctor, delete copy ctor and
11660 assignment operator, remove friend regcache_dup.
11661
11662 2017-04-28 Yao Qi <yao.qi@linaro.org>
11663
11664 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11665 call method save instead of regcache_cpy.
11666 * regcache.h (struct regcache): Make regcache_dup a friend.
11667
11668 2017-04-28 Yao Qi <yao.qi@linaro.org>
11669
11670 * regcache.c (struct regcache): Move to regcache.h
11671 (regcache::arch): New method.
11672 (regcache_get_ptid): Update.
11673 (get_regcache_arch): Call arch method.
11674 (get_regcache_aspace): Call method aspace.
11675 (register_buffer): Change it to method.
11676 (regcache_save): Change it to regcache::save.
11677 (regcache_restore): Likewise.
11678 (regcache_cpy_no_passthrough): Remove the declaration.
11679 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11680 (regcache_cpy_no_passthrough): Change it to method
11681 cpy_no_passthrough.
11682 (regcache_register_status): Change it to method
11683 get_register_status.
11684 (regcache_invalidate): Change it to method invalidate.
11685 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11686 (regcache_raw_update): Change it to method raw_update.
11687 (regcache_raw_read): Likewise.
11688 (regcache_raw_read_signed): Likewise.
11689 (regcache_raw_read_unsigned): Likewise.
11690 (regcache_raw_write_signed): Likewise.
11691 (regcache_raw_write_unsigned): Likewise.
11692 (regcache_cooked_read): Likewise.
11693 (regcache_cooked_read_value): Likewise.
11694 (regcache_cooked_read_signed): Likewise.
11695 (regcache_cooked_read_unsigned): Likewise.
11696 (regcache_cooked_write_signed): Likewise.
11697 (regcache_cooked_write_unsigned): Likewise.
11698 (regcache_raw_set_cached_value): Likewise.
11699 (regcache_raw_write): Likewise.
11700 (regcache_cooked_write): Likewise.
11701 (regcache_xfer_part): Likewise.
11702 (regcache_raw_read_part): Likewise.
11703 (regcache_raw_write_part): Likewise.
11704 (regcache_cooked_read_part): Likewise.
11705 (regcache_cooked_write_part): Likewise.
11706 (regcache_raw_supply): Likewise.
11707 (regcache_raw_collect): Likewise.
11708 (regcache_transfer_regset): Likewise.
11709 (regcache_supply_regset): Likewise.
11710 (regcache_collect_regset): Likewise.
11711 (regcache_debug_print_register): Likewise.
11712 (enum regcache_dump_what): Move it to regcache.h.
11713 (regcache_dump): Change it to method dump.
11714 * regcache.h (enum regcache_dump_what): New.
11715 (class regcache): New.
11716 * target.c (target_fetch_registers): Call method
11717 debug_print_register.
11718 (target_store_registers): Likewise.
11719
11720 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11721
11722 * windows-nat.c (struct lm_info_windows): Initialize field.
11723 (windows_make_so): Allocate lm_info_windows with new.
11724 (windows_free_so): Free lm_info_windows with delete.
11725
11726 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11727
11728 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11729 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11730 cleanup.
11731 (darwin_free_so): Free lm_info_darwin with delete.
11732
11733 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11734
11735 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11736 <l_addr_p>: Change type to bool.
11737 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11738 (svr4_free_so): Free lm_info_svr4 with delete.
11739 (svr4_copy_library_list): Replace memcpy with call to copy
11740 constructor.
11741 (library_list_start_library, svr4_default_sos): Allocate
11742 lm_info_svr4 with new.
11743
11744 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11745
11746 * solib-target.c (struct lm_info_target): Add destructor,
11747 initialize fields.
11748 <name>: Change type to std::string.
11749 (library_list_start_library): Allocate lm_info_target with new.
11750 (solib_target_free_library_list): Free lm_info_target with
11751 delete.
11752 (solib_target_current_sos): Adapt to std::string.
11753 (solib_target_free_so): Free lm_info_target with delete.
11754
11755 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11756
11757 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11758 fields.
11759 (frv_current_sos): Allocate lm_info_frv with new.
11760 (frv_relocate_main_executable): Free lm_info_frv with delete,
11761 allocate with new.
11762 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11763
11764 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11765
11766 * solib-frv.c (struct lm_info_frv): Fix indentation.
11767
11768 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11769
11770 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11771 map field.
11772 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11773 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11774 and allocate with new.
11775 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11776
11777 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11778
11779 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11780 <filename, member_name>: Change type to std::string.
11781 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11782 (library_list_start_library): Allocate lm_info_aix with new.
11783 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11784 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11785 with copy constructor.
11786
11787 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11788
11789 * solist.h (struct lm_info): Remove.
11790 (struct lm_info_base): New class.
11791 (struct so_list) <lm_info>: Change type to lm_info_base *.
11792 * nto-tdep.c (struct lm_info): Remove.
11793 (lm_addr): Adjust.
11794 * solib-aix.c (struct lm_info): Rename to ...
11795 (struct lm_info_aix): ... this. Extend lm_info_base.
11796 (lm_info_p): Rename to ...
11797 (lm_info_aix_p): ... this, and adjust.
11798 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11799 solib_aix_parse_libraries, library_list_start_library,
11800 solib_aix_free_library_list, solib_aix_parse_libraries,
11801 solib_aix_get_library_list,
11802 solib_aix_relocate_section_addresses, solib_aix_free_so,
11803 solib_aix_get_section_offsets,
11804 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11805 Adjust.
11806 (struct solib_aix_inferior_data) <library_list>: Adjust.
11807 * solib-darwin.c (struct lm_info): Rename to ...
11808 (struct lm_info_darwin): ... this. Extend lm_info_base.
11809 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11810 * solib-dsbt.c (struct lm_info): Rename to ...
11811 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11812 (struct dsbt_info) <main_executable_lm_info): Adjust.
11813 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11814 dsbt_relocate_section_addresses): Adjust.
11815 * solib-frv.c (struct lm_info): Rename to ...
11816 (struct lm_info_frv): ... this. Extend lm_info_base.
11817 (main_executable_lm_info): Adjust.
11818 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11819 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11820 find_canonical_descriptor_in_load_object,
11821 frv_fdpic_find_canonical_descriptor): Adjust.
11822 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11823 to lm_info_svr4.
11824 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11825 svr4_clear_so, svr4_copy_library_list,
11826 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11827 svr4_current_sos, svr4_fetch_objfile_link_map,
11828 solist_update_incremental): Adjust.
11829 * solib-svr4.h (struct lm_info_svr4): Move here from
11830 solib-svr4.c.
11831 * solib-target.c (struct lm_info): Rename to ...
11832 (struct lm_info_target): ... this. Extend lm_info_base.
11833 (lm_info_p): Rename to ...
11834 (lm_info_target_p): ... this.
11835 (solib_target_parse_libraries, library_list_start_segment,
11836 library_list_start_section, library_list_start_library,
11837 library_list_end_library, solib_target_free_library_list,
11838 solib_target_current_sos, solib_target_free_so,
11839 solib_target_relocate_section_addresses): Adjust.
11840 * windows-nat.c (struct lm_info): Rename to ...
11841 (struct lm_info_windows): ... this. Extend lm_info_base.
11842 (windows_make_so, handle_load_dll, handle_unload_dll,
11843 windows_xfer_shared_libraries): Adjust.
11844
11845 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11846
11847 * solib-darwin.c (struct darwin_so_list): Remove.
11848 (darwin_current_sos): Allocate an so_list object instead of a
11849 darwin_so_list, separately allocate an lm_info object.
11850 (darwin_free_so): Free lm_info.
11851
11852 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11853
11854 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11855 with fprintf_filtered.
11856
11857 2017-04-28 Yao Qi <yao.qi@linaro.org>
11858
11859 * regcache.c (regcache::regcache): New function.
11860 (regcache::~regcache): New function.
11861 (regcache_xmalloc_1): Remove.
11862 (regcache_xmalloc): Call new regcache.
11863 (regcache_xfree): Call delete regcache.
11864 (get_thread_arch_aspace_regcache): Call new regcache.
11865
11866 2017-04-28 Yao Qi <yao.qi@linaro.org>
11867
11868 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11869 lwp instead of ptid_get_lwp.
11870
11871 2017-04-28 Yao Qi <yao.qi@linaro.org>
11872
11873 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11874 lwp_info instead of getting from inferior_ptid.
11875
11876 2017-04-27 Keith Seitz <keiths@redhat.com>
11877
11878 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11879 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11880 (CV_CONVERSION_BADNESS): Define.
11881 (rank_one_type): Remove overly restrictive rvalue reference
11882 rank checks.
11883 Add cv-qualifier checks and subranks for type equality.
11884 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11885 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11886 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11887
11888 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11889
11890 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11891 count when creating the object.
11892
11893 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11894 Ulrich Weigand <uweigand@de.ibm.com>
11895
11896 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11897 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11898 is used in AIX.
11899 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11900 (process_xcoff_symbol): Likewise.
11901 (scan_xcoff_symtab): Likewise.
11902
11903 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11904
11905 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11906 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11907 (ia64_access_reg): Use get_frame_register_unsigned.
11908 (ia64_access_rse_reg): Likewise.
11909 (ia64_libunwind_frame_prev_register): Likewise.
11910
11911 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11912
11913 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11914 * gdbarch.c: Regenerated.
11915 * gdbarch.h: Regenerated.
11916 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11917 visibility external.
11918 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11919 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11920 (enum cfa_how_kind): Move to ...
11921 (struct dwarf2_frame_state_reg_info): Likewise.
11922 (struct dwarf2_frame_state): Likewise.
11923 * dwarf2-frame.h: ... here.
11924 (dwarf2_frame_state_alloc_regs): New declaration.
11925 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11926 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11927
11928 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11929
11930 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11931 regcache_raw_read_unsigned.
11932 (xtensa_pseudo_register_write): Likewise.
11933
11934 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11935
11936 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11937 (nds32_pseudo_register_write): Likewise.
11938
11939 2017-04-25 Yao Qi <yao.qi@linaro.org>
11940
11941 * regcache.c (struct regcache) <readonly_p>: Change its type
11942 to bool.
11943 (regcache_xmalloc_1): Update parameter type and callers update.
11944
11945 2017-04-25 Yao Qi <yao.qi@linaro.org>
11946
11947 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11948 set_gdbarch_wchar_bit.
11949 * arm-tdep.c (arm_gdbarch_init): Likewise.
11950
11951 2017-04-25 Pedro Alves <palves@redhat.com>
11952
11953 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11954 (BothAreRelocatable, memcopy, memmove): Don't define.
11955 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11956 macros.
11957
11958 2017-04-25 Pedro Alves <palves@redhat.com>
11959
11960 * common/common-defs.h: Include "common/poison.h".
11961 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11962 and adjust.
11963 * common/poison.h: New file.
11964 * common/traits.h: Include <type_traits>.
11965 (Not, Or, Requires): New, moved from common/function-view.h.
11966
11967 2017-04-25 Pedro Alves <palves@redhat.com>
11968
11969 * breakpoint.h (struct breakpoint): In-class initialize all
11970 fields. Make boolean fields "bool".
11971 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11972 memset call and initializations no longer necessary.
11973
11974 2017-04-25 Pedro Alves <palves@redhat.com>
11975
11976 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11977 reference.
11978 (pt_btrace_insn): New function.
11979 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11980
11981 2017-04-25 Pedro Alves <palves@redhat.com>
11982
11983 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11984 "base" field and inherit from "bp_location" instead. Add
11985 non-default ctor.
11986 (allocate_location_exception): Use new non-default ctor.
11987 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11988 (init_bp_location): Convert to ...
11989 (bp_location::bp_location): ... this new ctor, and remove memset
11990 call.
11991 (base_breakpoint_allocate_location): Use the new non-default ctor.
11992 * breakpoint.h (bp_location): Now a class. Declare default and
11993 non-default ctors. In-class initialize all members.
11994 (init_bp_location): Remove declaration.
11995
11996 2017-04-25 Pedro Alves <palves@redhat.com>
11997
11998 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11999 assignment operator.
12000
12001 2017-04-24 Yao Qi <yao.qi@linaro.org>
12002
12003 * doublest.c (convert_doublest_to_floatformat): Call
12004 floatformat_totalsize_bytes.
12005
12006 2017-04-22 Tom Tromey <tom@tromey.com>
12007
12008 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12009 ui_out_emit_list.
12010 * stack.c (print_frame): Use ui_out_emit_list.
12011 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12012 ui_out_emit_list.
12013 * mi/mi-main.c (print_one_inferior)
12014 (mi_cmd_data_list_register_names)
12015 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12016 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12017 ui_out_emit_list.
12018 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12019 (mi_output_solib_attribs): Use ui_out_emit_list,
12020 ui_out_emit_tuple.
12021 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12022 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12023 (mi_cmd_stack_list_args, list_args_or_locals): Use
12024 ui_out_emit_list.
12025 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12026 * breakpoint.c (print_solib_event, output_thread_groups): Use
12027 ui_out_emit_list.
12028
12029 2017-04-22 Tom Tromey <tom@tromey.com>
12030
12031 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12032 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12033 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12034
12035 2017-04-22 Tom Tromey <tom@tromey.com>
12036
12037 * tracepoint.c (tvariables_info_1)
12038 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12039
12040 2017-04-22 Tom Tromey <tom@tromey.com>
12041
12042 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12043 annotate_arg_emitter.
12044 * breakpoint.c (print_mention_watchpoint)
12045 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12046 * annotate.h (struct annotate_arg_emitter): New.
12047
12048 2017-04-22 Tom Tromey <tom@tromey.com>
12049
12050 * record-btrace.c (record_btrace_insn_history)
12051 (record_btrace_insn_history_range, record_btrace_call_history)
12052 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12053 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12054 ui_out_emit_tuple.
12055 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12056 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12057 * skip.c (skip_info): Use ui_out_emit_tuple.
12058 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12059 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12060 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12061 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12062 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12063 ui_out_emit_tuple.
12064 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12065 (output_register, mi_cmd_data_read_memory)
12066 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12067 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12068 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12069 Use ui_out_emit_tuple.
12070 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12071 ui_out_emit_tuple.
12072 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12073 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12074 * linux-thread-db.c (info_auto_load_libthread_db): Use
12075 ui_out_emit_tuple.
12076 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12077 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12078 * disasm.c (do_mixed_source_and_assembly_deprecated)
12079 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12080 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12081 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12082 * breakpoint.c (print_one_breakpoint_location)
12083 (print_one_breakpoint): Use ui_out_emit_tuple.
12084 * auto-load.c (print_script, info_auto_load_cmd): Use
12085 ui_out_emit_tuple.
12086 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12087
12088 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12089
12090 * thread.c (print_thread_info_1): Remove dead code.
12091
12092 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12093
12094 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12095 GDB_SELF_TEST.
12096 * arm-tdep.c (selftests::arm_record_test): Likewise.
12097
12098 2017-04-21 Yao Qi <yao.qi@linaro.org>
12099
12100 * regcache.c (regcache_restore): Remove argument 2. Replace
12101 argument 3 with regcache. Get register status from
12102 src->register_status and get register contents from
12103 register_buffer (src, regnum).
12104 (regcache_cpy): Update.
12105
12106 2017-04-19 Pedro Alves <palves@redhat.com>
12107
12108 * gdbthread.h (thread): Add missing closing parenthesis in
12109 comment.
12110
12111 2017-04-19 Pedro Alves <palves@redhat.com>
12112
12113 * common/refcounted-object.h: New file.
12114 * gdbthread.h: Include "common/refcounted-object.h".
12115 (thread_info): Inherit from refcounted_object and add comments.
12116 (thread_info::incref, thread_info::decref)
12117 (thread_info::m_refcount): Delete.
12118 (thread_info::deletable): Use the refcounted_object::refcount()
12119 method.
12120 * inferior.c (current_inferior_): Add comment.
12121 (set_current_inferior): Increment/decrement refcounts.
12122 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12123 not-deletable instead of comparing with the current inferior.
12124 (initialize_inferiors): Increment the initial inferior's refcount.
12125 * inferior.h (struct inferior): Forward declare.
12126 Include "common/refcounted-object.h".
12127 (current_inferior, set_current_inferior): Move declaration to
12128 before struct inferior's definition, and fix comment.
12129 (inferior): Inherit from refcounted_object. Add comments.
12130 * thread.c (switch_to_thread_no_regs): Reference the thread's
12131 inferior pointer directly instead of doing a ptid lookup.
12132 (switch_to_no_thread): New function.
12133 (switch_to_thread(thread_info *)): New function, factored out
12134 from ...
12135 (switch_to_thread(ptid_t)): ... this.
12136 (restore_current_thread): Delete.
12137 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12138 fields, and add 'inf' field.
12139 (do_restore_current_thread_cleanup): Check whether old->inf is
12140 alive instead of looking up an inferior by ptid. Use
12141 switch_to_thread and switch_to_no_thread.
12142 (restore_current_thread_cleanup_dtor): Use old->inf directly
12143 instead of lookup up an inferior by id. Decref the inferior.
12144 Don't restore 'removable'.
12145 (make_cleanup_restore_current_thread): Same the inferior pointer
12146 in old, instead of the inferior number. Incref the inferior.
12147 Don't save/clear 'removable'.
12148
12149 2017-04-19 Pedro Alves <palves@redhat.com>
12150
12151 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12152 unittests/scoped_restore-selftests.c.
12153 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12154 * common/scoped_restore.h (scoped_restore_base): Make "class".
12155 (scoped_restore_base::release): New public method.
12156 (scoped_restore_base::scoped_restore_base): New protected ctor.
12157 (scoped_restore_base::m_saved_var): New protected field.
12158 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12159 scoped_restore_base base class instead of m_saved_var directly.
12160 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12161 (scoped_restore_tmpl::scoped_restore_tmpl(const
12162 scoped_restore_tmpl<T>&)): Likewise.
12163 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12164 method.
12165 (scoped_restore_tmpl::saved_var): New method.
12166 (scoped_restore_tmpl::m_saved_var): Delete.
12167 * inferior.h (inferior::detaching): Now a bool.
12168 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12169 cleanup.
12170 * unittests/scoped_restore-selftests.c: New file.
12171
12172 2017-04-19 Pedro Alves <palves@redhat.com>
12173
12174 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12175 Re-sort in alphabetic order.
12176
12177 2017-04-18 Pedro Alves <palves@redhat.com>
12178
12179 * xml-support.c (obstack_xml_printf): Delete.
12180 * xml-support.h (obstack_xml_printf): Delete.
12181
12182 2017-04-18 Pedro Alves <palves@redhat.com>
12183
12184 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12185 vdebug, verror, body_text, start_element, end_element, name,
12186 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12187 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12188 is_xinclude>: Make private and add m_ prefix.
12189 (gdb_xml_parser::body_text): New method, based on ...
12190 (gdb_xml_body_text): ... this. Adjust.
12191 (gdb_xml_parser::vdebug): New method, based on ...
12192 (gdb_xml_debug): ... this. Adjust.
12193 (gdb_xml_parser::verror): New method, based on ...
12194 (gdb_xml_error): ... this. Adjust.
12195 (gdb_xml_parser::start_element): New method, based on ...
12196 (gdb_xml_start_element): ... this. Adjust.
12197 (gdb_xml_start_element_wrapper): Defer to
12198 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12199 (gdb_xml_parser::end_element): New method, based on ...
12200 (gdb_xml_end_element_wrapper): ... this. Adjust.
12201 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12202 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12203 (gdb_xml_parser::use_dtd): New method, based on ...
12204 (gdb_xml_use_dtd): ... this. Adjust.
12205 (gdb_xml_parser::parse): New method, based on ...
12206 (gdb_xml_parse): ... this. Adjust.
12207 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12208 (xinclude_start_include): Adjust to call the parser's name method.
12209 (xml_xinclude_default, xml_xinclude_start_doctype)
12210 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12211 method.
12212 (xml_process_xincludes): Adjust to call parser methods.
12213 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12214 declarations.
12215
12216 2017-04-18 Pedro Alves <palves@redhat.com>
12217
12218 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12219 gdb::optional<std::string>.
12220 * xml-support.c: Include <string>.
12221 (scope_level::scope_level(scope_level &&))
12222 (scope_level::~scope_level): Delete.
12223 (scope_level::body): Now a std::string.
12224 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12225 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12226 parameter.
12227 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12228 (xinclude_parsing_data::output): Now a std::string reference.
12229 (xinclude_start_include): Adjust.
12230 (xml_xinclude_default): Adjust.
12231 (xml_process_xincludes): Add 'output' parameter, and return bool.
12232 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12233 and return bool.
12234 * xml-tdesc.c: Include <unordered_map> and <string>.
12235 (tdesc_xml_cache): Delete.
12236 (tdesc_xml_cache_s): Delete.
12237 (xml_cache): Now an std::unordered_map.
12238 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12239 (target_fetch_description_xml): Change return type to
12240 gdb::optional<std::string>, and adjust.
12241 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12242 (target_fetch_description_xml): Change return type to
12243 gdb::optional<std::string>.
12244
12245 2017-04-18 Pedro Alves <palves@redhat.com>
12246
12247 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12248 unittests/optional-selftests.c.
12249 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12250 * unittests/optional-selftests.c: New file.
12251 * unittests/optional/assignment/1.cc: New file.
12252 * unittests/optional/assignment/2.cc: New file.
12253 * unittests/optional/assignment/3.cc: New file.
12254 * unittests/optional/assignment/4.cc: New file.
12255 * unittests/optional/assignment/5.cc: New file.
12256 * unittests/optional/assignment/6.cc: New file.
12257 * unittests/optional/assignment/7.cc: New file.
12258 * unittests/optional/cons/copy.cc: New file.
12259 * unittests/optional/cons/default.cc: New file.
12260 * unittests/optional/cons/move.cc: New file.
12261 * unittests/optional/cons/value.cc: New file.
12262 * unittests/optional/in_place.cc: New file.
12263 * unittests/optional/observers/1.cc: New file.
12264 * unittests/optional/observers/2.cc: New file.
12265
12266 2017-04-18 Pedro Alves <palves@redhat.com>
12267
12268 * common/gdb_optional.h: Include common/traits.h.
12269 (in_place_t): New type.
12270 (in_place): New constexpr variable.
12271 (optional::optional): Remove member initialization of
12272 m_instantiated.
12273 (optional::optional(in_place_t...)): New constructor.
12274 (optional::~optional): Use reset.
12275 (optional::optional(const optional&)): New.
12276 (optional::optional(const optional&&)): New.
12277 (optional::optional(T &)): New.
12278 (optional::optional(T &&)): New.
12279 (operator::operator=(const optional &)): New.
12280 (operator::operator=(optional &&)): New.
12281 (operator::operator= (const T &))
12282 (operator::operator= (T &&))
12283 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12284 (operator::reset): New.
12285 (operator::m_instantiated):: Add in-class initializer.
12286 * common/traits.h: Include <type_traits>.
12287 (struct And): New types.
12288
12289 2017-04-18 Pedro Alves <palves@redhat.com>
12290
12291 * xml-support.c: Include <vector>.
12292 (scope_level::scope_level(const gdb_xml_element *))
12293 (scope_level::scope_level(scope_level&&)): New.
12294 (scope_level::~scope_level): New.
12295 (scope_level_s): Delete.
12296 (gdb_xml_parser::scopes): Now a std::vector.
12297 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12298 Use std::vector.
12299 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12300 scope cleanup code.
12301 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12302 of the scopes member. Use std::vector::emplace_back.
12303
12304 2017-04-18 Pedro Alves <palves@redhat.com>
12305
12306 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12307 a bool.
12308 (gdb_xml_end_element): Change type of first parameter.
12309 (gdb_xml_cleanup): Rename to ...
12310 (gdb_xml_parser::~gdb_xml_parser): ... this.
12311 (gdb_xml_create_parser_and_cleanup): Delete with ...
12312 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12313 to this new ctor.
12314 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12315 using gdb_xml_create_parser_and_cleanup.
12316 (xinclude_parsing_data): Add ctor/dtor.
12317 (xml_xinclude_cleanup): Delete.
12318 (xml_process_xincludes): Create a local xinclude_parsing_data
12319 instead of heap-allocating one. Create a local gdb_xml_parser
12320 instead of heap-allocating one with
12321 gdb_xml_create_parser_and_cleanup.
12322
12323 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12324
12325 PR threads/20743
12326 * fbsd-nat.c (resume_one_thread_cb): Remove.
12327 (resume_all_threads_cb): Remove.
12328 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12329 iterate_over_threads.
12330
12331 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12332
12333 * NEWS: Create a new section for the next release branch.
12334 Rename the section of the current branch, now that it has
12335 been cut.
12336
12337 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12338
12339 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12340 * version.in: Bump version to 8.0.50.DATE-git.
12341
12342 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12343
12344 PR gdb/21385
12345 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12346 independently of the host, and fix build breakage on Cygwin.
12347
12348 2017-04-13 Pedro Alves <palves@redhat.com>
12349
12350 * inferior.c (free_inferior): Convert to ...
12351 (inferior::~inferior): ... this dtor.
12352 (inferior::inferior): New ctor, factored out from ...
12353 (add_inferior_silent): ... here. Allocate the inferior with a new
12354 expression.
12355 (delete_inferior): Call delete instead of free_inferior.
12356 * inferior.h (gdb_environ, continuation): Forward declare.
12357 (inferior): Now a class. Add in-class initialization to all
12358 members. Make boolean fields bool, except 'detaching'.
12359 (inferior::inferior): New explicit ctor.
12360 (inferior::~inferior): New.
12361
12362 2017-04-13 Pedro Alves <palves@redhat.com>
12363
12364 * inferior.c (init_inferior_list): Delete.
12365 * inferior.h (init_inferior_list): Delete.
12366
12367 2017-04-13 Pedro Alves <palves@redhat.com>
12368
12369 PR threads/13217
12370 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12371 (top level): Call it twice, with different thread sets.
12372
12373 2017-04-13 Pedro Alves <palves@redhat.com>
12374
12375 * thread.c: Include <algorithm>.
12376 (thread_array_cleanup): Delete.
12377 (scoped_inc_dec_ref): New class.
12378 (live_threads_count): New function.
12379 (set_thread_refcount): Delete.
12380 (tp_array_compar_ascending): Now a bool.
12381 (tp_array_compar): Convert to a std::sort comparison function.
12382 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12383 and live_threads_count.
12384
12385 2017-04-13 Pedro Alves <palves@redhat.com>
12386
12387 * infrun.c (follow_fork_inferior): Also switch the current
12388 inferior.
12389
12390 2017-04-13 Pedro Alves <palves@redhat.com>
12391
12392 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12393 before calling create_internal_breakpoint.
12394
12395 2017-04-13 Pedro Alves <palves@redhat.com>
12396
12397 * fork-child.c (execv_argv): New class.
12398 (breakup_args): Refactored as ...
12399 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12400 Copy arguments to storage and replace separators with NULL
12401 terminators in place.
12402 (escape_bang_in_quoted_argument): Adjust to return bool.
12403 (execv_argv::execv_argv): New ctor.
12404 (execv_argv::init_for_shell): New method, factored out from
12405 fork_inferior. Don't strdup strings into the vector.
12406 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12407 Remove free_vector_argv call.
12408
12409 2017-04-13 Yao Qi <yao.qi@linaro.org>
12410
12411 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12412 tdep->rx_psw_type.
12413
12414 2017-04-13 Yao Qi <yao.qi@linaro.org>
12415
12416 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12417 * rx-tdep.c (rx_gdbarch_init): Likewise.
12418
12419 2017-04-13 Pedro Alves <palves@redhat.com>
12420
12421 * breakpoint.h (struct breakpoint): Reindent.
12422
12423 2017-04-13 Pedro Alves <palves@redhat.com>
12424
12425 * breakpoint.c (bp_location): Rename to ...
12426 (bp_locations): ... this. All references updated.
12427 (bp_location_count): Rename to ...
12428 (bp_locations_count): ... this. All references updated.
12429 (bp_location_placed_address_before_address_max): Rename to ...
12430 (bp_locations_placed_address_before_address_max): ... this. All
12431 references updated.
12432 (bp_location_shadow_len_after_address_max): Rename to ...
12433 (bp_locations_shadow_len_after_address_max): ... this. All
12434 references updated.
12435 (bp_location_compare_addrs): Rename to ...
12436 (bp_locations_compare_addrs): ... this. All references updated.
12437 (bp_location_compare):Rename to ...
12438 (bp_locations_compare): ... this. All references updated.
12439 (bp_location_target_extensions_update): Rename to ...
12440 (bp_locations_target_extensions_update): ... this. All references
12441 updated.
12442
12443 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12444
12445 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12446 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12447 'sgtty.h'.
12448 * common/gdb_termios.h: New file, with parts of "terminal.h".
12449 * inflow.c: Include "gdb_termios.h".
12450 * ser-unix.c: Include "gdb_termios.h".
12451 * terminal.h: Move terminal-related defines to
12452 "common/gdb_termios.h".
12453
12454 2017-04-12 Tom Tromey <tom@tromey.com>
12455
12456 * probe.c (parse_probes): Update.
12457 * location.h (delete_event_location): Don't declare.
12458 (event_location_deleter::operator()): Update.
12459 * location.c (event_location_deleter::operator()): Rename from
12460 delete_event_location.
12461 * linespec.h (linespec_result) <location>: Change type to
12462 event_location_up.
12463 * linespec.c (canonicalize_linespec, event_location_to_sals)
12464 (decode_objc): Update.
12465 (linespec_result): Don't call delete_event_location.
12466 * breakpoint.c (create_breakpoints_sal)
12467 (bkpt_probe_create_sals_from_location)
12468 (strace_marker_create_sals_from_location): Update.
12469
12470 2017-04-12 Tom Tromey <tom@tromey.com>
12471
12472 * linespec.h (struct linespec_result): Add constructor and
12473 destructor.
12474 (init_linespec_result, destroy_linespec_result)
12475 (make_cleanup_destroy_linespec_result): Don't declare.
12476 * linespec.c (init_linespec_result): Remove.
12477 (linespec_result::~linespec_result): Rename from
12478 destroy_linespec_result. Update.
12479 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12480 Remove.
12481 * breakpoint.c (create_breakpoint, break_range_command)
12482 (decode_location_default): Update.
12483 * ax-gdb.c (agent_command_1): Update.
12484
12485 2017-04-12 Tom Tromey <tom@tromey.com>
12486
12487 * remote.c (remote_download_tracepoint): Update.
12488 * python/py-breakpoint.c (bppy_get_location): Update.
12489 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12490 (gdbscm_breakpoint_location): Update.
12491 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12492 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12493 Change type to event_location_up.
12494 * breakpoint.c (create_overlay_event_breakpoint)
12495 (create_longjmp_master_breakpoint)
12496 (create_std_terminate_master_breakpoint)
12497 (create_exception_master_breakpoint)
12498 (breakpoint_event_location_empty_p, print_breakpoint_location)
12499 (print_one_breakpoint_location, create_thread_event_breakpoint)
12500 (init_breakpoint_sal, create_breakpoint)
12501 (print_recreate_ranged_breakpoint, break_range_command)
12502 (init_ada_exception_breakpoint, say_where): Update.
12503 (base_breakpoint_dtor): Don't call delete_event_location.
12504 (bkpt_print_recreate, tracepoint_print_recreate)
12505 (dprintf_print_recreate, update_static_tracepoint)
12506 (breakpoint_re_set_default): Update.
12507
12508 2017-04-12 Tom Tromey <tom@tromey.com>
12509
12510 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12511 type of "to_do". Update.
12512 (compute_stack_depth): Use std::vector.
12513
12514 2017-04-12 Tom Tromey <tom@tromey.com>
12515
12516 * printcmd.c (find_instruction_backward): Use std::vector.
12517
12518 2017-04-12 Tom Tromey <tom@tromey.com>
12519
12520 * symfile.c (objfilep): Remove typedef.
12521 (reread_symbols): Use a std::vector.
12522
12523 2017-04-12 Tom Tromey <tom@tromey.com>
12524
12525 * mi/mi-main.c (exec_direction_forward): Remove.
12526 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12527 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12528 scoped_restore.
12529 * guile/guile.c (guile_repl_command, guile_command)
12530 (gdbscm_execute_gdb_command): Use scoped_restore.
12531 * go-exp.y (go_parse): Use scoped_restore.
12532 * d-exp.y (d_parse): Use scoped_restore.
12533 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12534 * c-exp.y (c_parse): Use scoped_restore.
12535
12536 2017-04-12 Tom Tromey <tom@tromey.com>
12537
12538 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12539 (mi_parse): Update return type.
12540 (mi_parse_free): Remove.
12541 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12542 (mi_parse::~mi_parse): Rename from mi_parse_free.
12543 (mi_parse_cleanup): Remove.
12544 (mi_parse): Return a unique_ptr. Use new.
12545 * mi/mi-main.c (mi_execute_command): Update.
12546
12547 2017-04-12 Tom Tromey <tom@tromey.com>
12548
12549 * location.c (explicit_location_lex_one): Return a
12550 unique_xmalloc_ptr.
12551 (string_to_explicit_location): Update. Remove cleanups.
12552
12553 2017-04-12 Tom Tromey <tom@tromey.com>
12554
12555 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12556 (compare_value_and_voffset): Change type. Update.
12557 (compute_vtable_size): Change type of "offset_vec".
12558 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12559 (gnuv3_get_typeid): Remove extraneous declaration.
12560
12561 2017-04-12 Tom Tromey <tom@tromey.com>
12562
12563 * charset.h (wchar_iterator): Fix comment.
12564
12565 2017-04-12 Tom Tromey <tom@tromey.com>
12566
12567 * charset.c (iconv_wrapper): New class.
12568 (cleanup_iconv): Remove.
12569 (convert_between_encodings): Use it.
12570
12571 2017-04-12 Tom Tromey <tom@tromey.com>
12572
12573 * symfile.h (increment_reading_symtab): Update type.
12574 * symfile.c (decrement_reading_symtab): Remove.
12575 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12576 * psymtab.c (psymtab_to_symtab): Update.
12577 * dwarf2read.c (dw2_instantiate_symtab): Update.
12578
12579 2017-04-12 Tom Tromey <tom@tromey.com>
12580
12581 * jit.c (struct jit_reader): Declare separately. Add constructor
12582 and destructor. Change type of "handle".
12583 (loaded_jit_reader): Define separately.
12584 (jit_reader_load): Update. New "new".
12585 (jit_reader_unload_command): Use "delete".
12586 * gdb-dlfcn.h (struct dlclose_deleter): New.
12587 (gdb_dlhandle_up): New typedef.
12588 (gdb_dlopen, gdb_dlsym): Update types.
12589 (gdb_dlclose): Remove.
12590 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12591 (gdb_dlsym): Change type of "handle".
12592 (make_cleanup_dlclose): Remove.
12593 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12594 * compile/compile-c-support.c (load_libcc): Update.
12595
12596 2017-04-12 Tom Tromey <tom@tromey.com>
12597
12598 * symtab.h (find_pcs_for_symtab_line): Change return type.
12599 * symtab.c (find_pcs_for_symtab_line): Change return type.
12600 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12601 type of "vec". Update.
12602 (ltpy_get_pcs_for_line): Update.
12603 * linespec.c (decode_digits_ordinary): Update.
12604
12605 2017-04-12 Tom Tromey <tom@tromey.com>
12606
12607 * tracepoint.c (actions_command): Update.
12608 * python/python.c (python_command, python_interactive_command):
12609 Update.
12610 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12611 * guile/guile.c (guile_command): Update.
12612 * defs.h (read_command_lines, read_command_lines_1): Return
12613 command_line_up.
12614 (command_lines_deleter): New struct.
12615 (command_line_up): New typedef.
12616 * compile/compile.c (compile_code_command)
12617 (compile_print_command): Update.
12618 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12619 command_line_up.
12620 (make_cleanup_free_command_lines): Remove.
12621 * cli/cli-script.c (get_command_line, read_command_lines_1)
12622 (copy_command_lines): Return command_line_up.
12623 (while_command, if_command, read_command_lines, define_command)
12624 (document_command): Update.
12625 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12626 Remove.
12627 * breakpoint.h (breakpoint_set_commands): Change type of
12628 "commands".
12629 * breakpoint.c (breakpoint_set_commands): Change type of
12630 "commands". Update.
12631 (do_map_commands_command, update_dprintf_command_list)
12632 (create_tracepoint_from_upload): Update.
12633
12634 2017-04-12 Tom Tromey <tom@tromey.com>
12635
12636 * tracepoint.c (scope_info): Update.
12637 * spu-tdep.c (spu_catch_start): Update.
12638 * python/python.c (gdbpy_decode_line): Update.
12639 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12640 * python/py-breakpoint.c (bppy_init): Update.
12641 * probe.c (parse_probes): Update.
12642 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12643 * location.h (event_location_deleter): New struct.
12644 (event_location_up): New typedef.
12645 (new_linespec_location, new_address_location, new_probe_location)
12646 (new_explicit_location, copy_event_location)
12647 (string_to_event_location, string_to_event_location_basic)
12648 (string_to_explicit_location): Update return type.
12649 (make_cleanup_delete_event_location): Remove.
12650 * location.c (new_linespec_location, new_address_location)
12651 (new_probe_location, new_explicit_location, copy_event_location):
12652 Return event_location_up.
12653 (delete_event_location_cleanup)
12654 (make_cleanup_delete_event_location): Remove.
12655 (string_to_explicit_location, string_to_event_location_basic)
12656 (string_to_event_location): Return event_location_up.
12657 * linespec.c (canonicalize_linespec, event_location_to_sals)
12658 (decode_line_with_current_source)
12659 (decode_line_with_last_displayed, decode_objc): Update.
12660 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12661 * completer.c (location_completer): Update.
12662 * cli/cli-cmds.c (edit_command, list_command): Update.
12663 * breakpoint.c (create_overlay_event_breakpoint)
12664 (create_longjmp_master_breakpoint)
12665 (create_std_terminate_master_breakpoint)
12666 (create_exception_master_breakpoint)
12667 (create_thread_event_breakpoint): Update.
12668 (init_breakpoint_sal): Update. Remove some dead code.
12669 (create_breakpoint_sal): Change type of "location". Update.
12670 (create_breakpoints_sal, create_breakpoint, break_command_1)
12671 (dprintf_command, break_range_command, until_break_command)
12672 (init_ada_exception_breakpoint)
12673 (strace_marker_create_sals_from_location)
12674 (update_static_tracepoint, trace_command, ftrace_command)
12675 (strace_command, create_tracepoint_from_upload): Update.
12676 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12677 * ax-gdb.c (agent_command_1): Update.
12678
12679 2017-04-12 Pedro Alves <palves@redhat.com>
12680
12681 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12682 * configure.tgt: Handle i[34567]86-*-go32* and
12683 i[34567]86-*-msdosdjgpp*.
12684 * i386-tdep.c (i386_svr4_reg_to_regnum):
12685 Make extern.
12686 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12687 i386-go32-tdep.c.
12688 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12689 * i386-go32-tdep.c: New file.
12690 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12691 declarations.
12692
12693 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12694
12695 * aix-thread.c (pd_status2str): Change return type to const char *.
12696
12697 2017-04-12 Pedro Alves <palves@redhat.com>
12698
12699 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12700 calls to set_gdbarch_gnu_triplet_regexp.
12701
12702 2017-04-12 Pedro Alves <palves@redhat.com>
12703
12704 PR gdb/21323
12705 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12706 New enum value.
12707 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12708 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12709 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12710 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12711 * gdbarch.h, gdbarch.c: Regenerate.
12712 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12713 gdbarch_wchar_bit and gdbarch_wchar_signed.
12714 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12715 * arm-tdep.c (arm_gdbarch_init): Likewise.
12716 * avr-tdep.c (avr_gdbarch_init): Likewise.
12717 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12718 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12719 * i386-tdep.c (i386_go32_init_abi): Likewise.
12720 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12721 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12722 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12723 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12724 * sh-tdep.c (sh_gdbarch_init): Likewise.
12725 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12726 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12727 * windows-tdep.c (windows_init_abi): Likewise.
12728 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12729
12730 2017-04-12 Pedro Alves <palves@redhat.com>
12731
12732 PR c++/21323
12733 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12734 cplus_primitive_type_char32_t>: New enum values.
12735 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12736 and cplus_primitive_type_char32_t.
12737 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12738 32, use the archtecture's built-in type for char16_t and char32_t,
12739 respectively. Otherwise, fallback to init_integer_type as before,
12740 but make the type unsigned, and issue a complaint.
12741 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12742
12743 2017-04-12 Alan Hayward <alan.hayward@arm.com>
12744
12745 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12746 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12747
12748 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12749
12750 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12751 'const char *'.
12752
12753 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12754
12755 * common/common-utils.c (free_vector_argv): New function.
12756 * common/common-utils.h: Include <vector>.
12757 (free_vector_argv): New prototype.
12758 * darwin-nat.c (darwin_create_inferior): Rewrite function
12759 prototype in order to constify "exec_file" and accept a
12760 "std::string" for "allargs".
12761 * fork-child.c: Include <vector>.
12762 (breakup_args): Rewrite function, using C++.
12763 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12764 and accept "std::string" for "allargs". Update the code to
12765 calculate "argv" based on "allargs". Update calls to "exec_fun"
12766 and "execvp".
12767 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12768 order to constify "exec_file" and accept a "std::string" for
12769 "allargs".
12770 * go32-nat.c (go32_create_inferior): Likewise.
12771 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12772 * infcmd.c (run_command_1): Constify "exec_file". Use
12773 "std::string" for inferior arguments.
12774 * inferior.h (fork_inferior): Update prototype.
12775 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12776 prototype in order to constify "exec_file" and accept a
12777 "std::string" for "allargs".
12778 * nto-procfs.c (procfs_create_inferior): Likewise.
12779 * procfs.c (procfs_create_inferior): Likewise.
12780 * remote-sim.c (gdbsim_create_inferior): Likewise.
12781 * remote.c (extended_remote_run): Update code to accept
12782 "std::string" as argument.
12783 (extended_remote_create_inferior): Rewrite function prototype in
12784 order to constify "exec_file" and accept a "std::string" for
12785 "allargs".
12786 * rs6000-nat.c (super_create_inferior): Likewise.
12787 (rs6000_create_inferior): Likewise.
12788 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12789 * windows-nat.c (windows_create_inferior): Likewise.
12790
12791 2017-04-11 Pedro Alves <palves@redhat.com>
12792
12793 * thread.c: Fix whitespace throughout.
12794
12795 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12796
12797 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12798
12799 2017-04-11 Alan Hayward <alan.hayward@arm.com>
12800
12801 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12802
12803 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12804
12805 PR gdb/21364
12806 * osdata.c (info_osdata): Check if 'type' is an empty string
12807 instead of NULL.
12808
12809 2017-04-10 Pedro Alves <palves@redhat.com>
12810
12811 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12812 (ptid_to_global_thread_id, in_thread_list)
12813 (do_captured_list_thread_ids, set_resumed, set_running)
12814 (set_executing, set_stop_requested, finish_thread_state)
12815 (validate_registers_access, can_access_registers_ptid)
12816 (print_thread_info_1, switch_to_thread)
12817 (do_restore_current_thread_cleanup)
12818 (make_cleanup_restore_current_thread, thread_command)
12819 (thread_name_command): Use operator== instead of ptid_equal.
12820
12821 2017-04-10 Pedro Alves <palves@redhat.com>
12822
12823 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12824 (current_thread_cleanup_chain): Delete.
12825 (restore_current_thread_cleanup_dtor)
12826 (make_cleanup_restore_current_thread): Remove references to
12827 current_thread_cleanup_chain.
12828
12829 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12830
12831 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12832 REG_UNKNOWN.
12833
12834 2017-04-10 Yao Qi <yao.qi@linaro.org>
12835
12836 PR gdb/19942
12837 * gdbthread.h (thread_info::deletable): New method.
12838 (thread_info::incref): New method.
12839 (thread_info::decref): New method.
12840 (thread_info::refcount): Move it to private.
12841 * infrun.c (save_stop_context): Call inc_refcount.
12842 (release_stop_context_cleanup): Likewise.
12843 * thread.c (set_thread_exited): New function.
12844 (init_thread_list): Delete "tp" only it is deletable, otherwise
12845 call set_thread_exited.
12846 (delete_thread_1): Call set_thread_exited.
12847 (current_thread_cleanup) <inferior_pid>: Remove.
12848 <thread>: New field.
12849 (restore_current_thread_ptid_changed): Removed.
12850 (do_restore_current_thread_cleanup): Adjust.
12851 (restore_current_thread_cleanup_dtor): Don't call
12852 find_thread_ptid.
12853 (set_thread_refcount): Use dec_refcount.
12854 (make_cleanup_restore_current_thread): Adjust.
12855 (thread_apply_all_command): Call inc_refcount.
12856 (_initialize_thread): Don't call
12857 observer_attach_thread_ptid_changed.
12858
12859 2017-04-10 Yao Qi <yao.qi@linaro.org>
12860
12861 * thread.c (delete_thread_1): Hoist code on marking thread as
12862 exited.
12863
12864 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12865
12866 * windows-nat.c (windows_detach): Initialize ptid with
12867 minus_one_ptid.
12868
12869 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12870
12871 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12872
12873 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12874
12875 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12876 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12877 (bfin_pseudo_register_write): Likewise
12878
12879 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12880
12881 * common/ptid.h (struct ptid): Change to...
12882 (class ptid_t): ... this.
12883 <ptid_t>: New constructors.
12884 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12885 matches>: New methods.
12886 <make_null, make_minus_one>: New static methods.
12887 <pid>: Rename to...
12888 <m_pid>: ...this.
12889 <lwp>: Rename to...
12890 <m_lwp>: ...this.
12891 <tid>: Rename to...
12892 <m_tid>: ...this.
12893 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12894 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12895 as references, move comment to class ptid_t.
12896 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12897 ptid_t static methods.
12898 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12899 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12900 Take ptid arguments as references, implement using ptid_t methods.
12901 * unittests/ptid-selftests.c: New file.
12902 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12903 unittests/ptid-selftests.c.
12904 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12905
12906 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12907
12908 * python/python.c (python_run_simple_file): Cast mode literal to
12909 non-const char pointer as expected by PyFile_FromString.
12910
12911 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12912
12913 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12914 minus_one_ptid and null_ptid.
12915
12916 2017-04-05 Pedro Alves <palves@redhat.com>
12917
12918 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12919 * configure: Regenerate.
12920
12921 2017-04-05 Pedro Alves <palves@redhat.com>
12922
12923 * ada-exp.y (yyerror): Constify.
12924 * ada-lang.c (bound_name, get_selections)
12925 (ada_variant_discrim_type)
12926 (ada_variant_discrim_name, ada_value_struct_elt)
12927 (ada_lookup_struct_elt_type, is_unchecked_variant)
12928 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12929 (catch_ada_exception_command_split)
12930 (catch_ada_assert_command_split, catch_assert_command)
12931 (ada_op_name): Constify.
12932 * ada-lang.h (ada_yyerror, get_selections)
12933 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12934 * arc-tdep.c (arc_print_frame_cache): Constify.
12935 * arm-tdep.c (arm_skip_stub): Constify.
12936 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12937 (gen_aggregate_elt_ref): Constify.
12938 * bcache.c (print_bcache_statistics): Constify.
12939 * bcache.h (print_bcache_statistics): Constify.
12940 * break-catch-throw.c (catch_exception_command_1):
12941 * breakpoint.c (struct ep_type_description::description):
12942 Constify.
12943 (add_solib_catchpoint): Constify.
12944 (catch_fork_command_1): Add cast.
12945 (add_catch_command): Constify.
12946 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12947 Constify.
12948 * bsd-uthread.c (bsd_uthread_state): Constify.
12949 * buildsym.c (patch_subfile_names): Constify.
12950 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12951 Constify.
12952 * c-exp.y (yyerror): Constify.
12953 (token::oper): Constify.
12954 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12955 * c-varobj.c (cplus_describe_child): Constify.
12956 * charset.c (find_charset_names): Add cast.
12957 (find_charset_names): Constify array and add const_cast.
12958 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12959 (edit_command): Constify.
12960 * cli/cli-decode.c (lookup_cmd): Constify.
12961 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12962 Constify.
12963 (struct dump_context): Constify.
12964 (add_dump_command, restore_command): Constify.
12965 * cli/cli-script.c (get_command_line): Constify.
12966 * cli/cli-script.h (get_command_line): Constify.
12967 * cli/cli-utils.c (check_for_argument): Constify.
12968 * cli/cli-utils.h (check_for_argument): Constify.
12969 * coff-pe-read.c (struct read_pe_section_data): Constify.
12970 * command.h (lookup_cmd): Constify.
12971 * common/print-utils.c (decimal2str): Constify.
12972 * completer.c (gdb_print_filename): Constify.
12973 * corefile.c (set_gnutarget): Constify.
12974 * cp-name-parser.y (yyerror): Constify.
12975 * cp-valprint.c (cp_print_class_member): Constify.
12976 * cris-tdep.c (cris_register_name, crisv32_register_name):
12977 Constify.
12978 * d-exp.y (yyerror): Constify.
12979 (struct token::oper): Constify.
12980 * d-lang.h (d_yyerror): Constify.
12981 * dbxread.c (struct header_file_location::name): Constify.
12982 (add_old_header_file, add_new_header_file, last_function_name)
12983 (dbx_next_symbol_text, add_bincl_to_list)
12984 (find_corresponding_bincl_psymtab, set_namestring)
12985 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12986 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12987 * defs.h (command_line_input, print_address_symbolic)
12988 (deprecated_readline_begin_hook): Constify.
12989 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12990 Constify.
12991 * event-top.c (handle_line_of_input): Constify and add cast.
12992 * exceptions.c (catch_errors): Constify.
12993 * exceptions.h (catch_errors): Constify.
12994 * expprint.c (print_subexp_standard, op_string, op_name)
12995 (op_name_standard, dump_raw_expression, dump_raw_expression):
12996 * expression.h (op_name, op_string, dump_raw_expression):
12997 Constify.
12998 * f-exp.y (yyerror): Constify.
12999 (struct token::oper): Constify.
13000 (struct f77_boolean_val::name): Constify.
13001 * f-lang.c (f_word_break_characters): Constify.
13002 * f-lang.h (f_yyerror): Constify.
13003 * fork-child.c (fork_inferior): Add cast.
13004 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13005 (new_variant): Constify.
13006 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13007 * gdbarch.c: Regenerate.
13008 * gdbcore.h (set_gnutarget): Constify.
13009 * go-exp.y (yyerror): Constify.
13010 (token::oper): Constify.
13011 * go-lang.h (go_yyerror): Constify.
13012 * go32-nat.c (go32_sysinfo): Constify.
13013 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13014 * guile/scm-cmd.c (cmdscm_function): Constify.
13015 * guile/scm-param.c (pascm_param_value): Constify.
13016 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13017 (h8300sx_register_name): Constify.
13018 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13019 Constify.
13020 * ia64-tdep.c (ia64_register_names): Constify.
13021 * infcmd.c (construct_inferior_arguments): Constify.
13022 (path_command, attach_post_wait): Constify.
13023 * language.c (show_range_command, show_case_command)
13024 (unk_lang_error): Constify.
13025 * language.h (language_defn::la_error)
13026 (language_defn::la_name_of_this): Constify.
13027 * linespec.c (decode_line_2): Constify.
13028 * linux-thread-db.c (thread_db_err_str): Constify.
13029 * lm32-tdep.c (lm32_register_name): Constify.
13030 * m2-exp.y (yyerror): Constify.
13031 * m2-lang.h (m2_yyerror): Constify.
13032 * m32r-tdep.c (m32r_register_names): Constify and make static.
13033 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13034 * m88k-tdep.c (m88k_register_name): Constify.
13035 * macroexp.c (appendmem): Constify.
13036 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13037 (upgrade_type, parse_external, parse_partial_symbols)
13038 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13039 (new_symbol): Constify.
13040 * memattr.c (mem_info_command): Constify.
13041 * mep-tdep.c (register_name_from_keyword): Constify.
13042 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13043 Constify.
13044 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13045 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13046 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13047 cast.
13048 (mi_execute_async_cli_command): Constify.
13049 * mips-tdep.c (mips_register_name): Constify.
13050 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13051 (am33_register_name, am33_2_register_name)
13052 * moxie-tdep.c (moxie_register_names): Constify.
13053 * nat/linux-osdata.c (osdata_type): Constify fields.
13054 * nto-tdep.c (nto_parse_redirection): Constify.
13055 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13056 (lookup_child_selector): Constify.
13057 (objc_methcall::name): Constify.
13058 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13059 (lookup_struct_typedef): Constify.
13060 * objfiles.c (pc_in_section): Constify.
13061 * objfiles.h (pc_in_section): Constify.
13062 * p-exp.y (struct token::oper): Constify.
13063 (yyerror): Constify.
13064 * p-lang.h (pascal_yyerror): Constify.
13065 * parser-defs.h (op_name_standard): Constify.
13066 (op_print::string): Constify.
13067 (exp_descriptor::op_name): Constify.
13068 * printcmd.c (print_address_symbolic): Constify.
13069 * psymtab.c (print_partial_symbols): Constify.
13070 * python/py-breakpoint.c (stop_func): Constify.
13071 (bppy_get_expression): Constify.
13072 * python/py-cmd.c (cmdpy_completer::name): Constify.
13073 (cmdpy_function): Constify.
13074 * python/py-event.c (evpy_add_attribute)
13075 (gdbpy_initialize_event_generic): Constify.
13076 * python/py-event.h (evpy_add_attribute)
13077 (gdbpy_initialize_event_generic): Constify.
13078 * python/py-evts.c (add_new_registry): Constify.
13079 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13080 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13081 * python/py-inferior.c (get_buffer): Add cast.
13082 * python/py-param.c (parm_constant::name): Constify.
13083 * python/py-unwind.c (fprint_frame_id): Constify.
13084 * python/python.c (gdbpy_parameter_value): Constify.
13085 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13086 * remote.c (memory_packet_config::name): Constify.
13087 (show_packet_config_cmd, remote_write_bytes)
13088 (remote_buffer_add_string):
13089 * reverse.c (exec_reverse_once): Constify.
13090 * rs6000-tdep.c (variant::name, variant::description): Constify.
13091 * rust-exp.y (rustyyerror): Constify.
13092 * rust-lang.c (rust_op_name): Constify.
13093 * rust-lang.h (rustyyerror): Constify.
13094 * serial.h (serial_ops::name): Constify.
13095 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13096 (sh_sh3e_register_name, sh_sh2e_register_name)
13097 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13098 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13099 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13100 (sh_sh4al_dsp_register_name): Constify.
13101 * sh64-tdep.c (sh64_register_name): Constify.
13102 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13103 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13104 * stabsread.c (patch_block_stabs, read_type_number)
13105 (ref_map::stabs, ref_add, process_reference)
13106 (symbol_reference_defined, define_symbol, define_symbol)
13107 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13108 (read_one_struct_field, read_struct_fields, read_baseclasses)
13109 (read_tilde_fields, read_struct_type, read_array_type)
13110 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13111 (read_huge_number, read_range_type, read_args, common_block_start)
13112 (find_name_end): Constify.
13113 * stabsread.h (common_block_start, define_symbol)
13114 (process_one_symbol, symbol_reference_defined, ref_add):
13115 * symfile.c (get_section_index, add_symbol_file_command):
13116 * symfile.h (get_section_index): Constify.
13117 * target-descriptions.c (tdesc_type::name): Constify.
13118 (tdesc_free_type): Add cast.
13119 * target.c (find_default_run_target):
13120 (add_deprecated_target_alias, find_default_run_target)
13121 (target_announce_detach): Constify.
13122 (do_option): Constify.
13123 * target.h (add_deprecated_target_alias): Constify.
13124 * thread.c (print_thread_info_1): Constify.
13125 * top.c (deprecated_readline_begin_hook, command_line_input):
13126 Constify.
13127 (init_main): Add casts.
13128 * top.h (handle_line_of_input): Constify.
13129 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13130 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13131 (tfind_command): Rename to ...
13132 (tfind_command_1): ... this and constify.
13133 (tfind_command): New function.
13134 (tfind_end_command, tfind_start_command): Adjust.
13135 (encode_source_string): Constify.
13136 * tracepoint.h (encode_source_string): Constify.
13137 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13138 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13139 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13140 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13141 * tui/tui-win.c (parse_scrolling_args): Constify.
13142 * tui/tui-windata.c (tui_erase_data_content): Constify.
13143 * tui/tui-windata.h (tui_erase_data_content): Constify.
13144 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13145 * tui/tui.c (tui_enable): Add cast.
13146 * utils.c (defaulted_query): Constify.
13147 (init_page_info): Add cast.
13148 (puts_debug, subset_compare): Constify.
13149 * utils.h (subset_compare): Constify.
13150 * varobj.c (varobj_format_string): Constify.
13151 * varobj.h (varobj_format_string): Constify.
13152 * vax-tdep.c (vax_register_name): Constify.
13153 * windows-nat.c (windows_detach): Constify.
13154 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13155 * xml-support.c (gdb_xml_end_element): Constify.
13156 * xml-tdesc.c (tdesc_start_reg): Constify.
13157 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13158 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13159 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13160
13161 2017-04-05 Pedro Alves <palves@redhat.com>
13162
13163 * proc-api.c (struct trans): Constify.
13164 (procfs_note): Constify.
13165 * proc-events.c (struct trans, syscall_table):
13166 * proc-flags.c (struct trans): Constify.
13167 * proc-utils.h (procfs_note): Constify.
13168 * proc-why.c (struct trans): Constify.
13169 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13170 (procfs_detach): Constify.
13171 * sol-thread.c (struct string_map): Constify.
13172 (td_err_string, td_state_string): Constify.
13173
13174 2017-04-05 Pedro Alves <palves@redhat.com>
13175
13176 * proc-api.c (procfs_filename): Don't initialize
13177 procfs_filename.
13178 (prepare_to_trace): Assume procfs_filename is non-NULL.
13179 (_initialize_proc_api): Give procfs_filename a default value here.
13180
13181 2017-04-05 Pedro Alves <palves@redhat.com>
13182
13183 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13184 'cond_string' parameter.
13185 (extract_exception_regexp): Constify 'string' parameter.
13186 (catch_exception_command_1): Constify.
13187 * breakpoint.c (init_catchpoint)
13188 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13189 parameter.
13190 (ep_parse_optional_if_clause, catch_fork_command_1)
13191 (catch_exec_command_1): Constify.
13192 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13193 parameter.
13194 (ep_parse_optional_if_clause): Constify.
13195 * cli/cli-utils.c (remove_trailing_whitespace)
13196 (check_for_argument): Constify.
13197 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13198 non-const overload.
13199 (check_for_argument): Likewise.
13200
13201 2017-04-05 Pedro Alves <palves@redhat.com>
13202
13203 * event-top.c (command_line_handler): Add cast to execute_command
13204 call.
13205 * record-btrace.c (cmd_record_btrace_bts_start)
13206 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13207 (cmd_record_btrace_start): Add cast to execute_command call.
13208 * record-full.c (record_full_goto_insn):
13209 * record.c (record_start, record_stop): Add cast to
13210 execute_command_to_string calls.
13211 (cmd_record_start): Add cast to execute_command calls.
13212
13213 2017-04-05 Pedro Alves <palves@redhat.com>
13214
13215 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13216 static inline function.
13217 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13218 array and use gdb_PyArg_ParseTupleAndKeywords.
13219 * python/py-cmd.c (cmdpy_init): Likewise.
13220 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13221 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13222 (infpy_search_memory): Likewise.
13223 * python/py-objfile.c (objfpy_add_separate_debug_file)
13224 (gdbpy_lookup_objfile): Likewise.
13225 * python/py-symbol.c (gdbpy_lookup_symbol)
13226 (gdbpy_lookup_global_symbol): Likewise.
13227 * python/py-type.c (gdbpy_lookup_type): Likewise.
13228 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13229 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13230 Likewise.
13231
13232 2017-04-05 Pedro Alves <palves@redhat.com>
13233
13234 * python/python-internal.h (gdb_PyGetSetDef): New type.
13235 * python/py-block.c (block_object_getset)
13236 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13237 * python/py-event.c (event_object_getset)
13238 (finish_breakpoint_object_getset): Likewise.
13239 * python/py-inferior.c (inferior_object_getset): Likewise.
13240 * python/py-infthread.c (thread_object_getset): Likewise.
13241 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13242 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13243 * python/py-objfile.c (objfile_getset): Likewise.
13244 * python/py-progspace.c (pspace_getset): Likewise.
13245 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13246 Likewise.
13247 * python/py-record.c (recpy_record_getset): Likewise.
13248 * python/py-symbol.c (symbol_object_getset): Likewise.
13249 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13250 Likewise.
13251 * python/py-type.c (type_object_getset, field_object_getset):
13252 Likewise.
13253 * python/py-value.c (value_object_getset): Likewise.
13254
13255 2017-04-05 Pedro Alves <palves@redhat.com>
13256
13257 * python/python-internal.h (gdb_PyObject_CallMethod)
13258 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13259 New functions.
13260 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13261 (PySys_GetObject, PySys_SetPath): New macros.
13262
13263 2017-04-05 Pedro Alves <palves@redhat.com>
13264
13265 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13266 info_osdata_command.
13267 * osdata.c (info_osdata_command): Rename to ...
13268 (info_osdata): ... this. Constify 'type' parameter, and remove
13269 the 'from_tty' parameter. Accept NULL TYPE.
13270 (info_osdata_command): New function.
13271 * osdata.h (info_osdata_command): Remove declaration.
13272 (info_osdata): New declaration.
13273
13274 2017-04-05 Pedro Alves <palves@redhat.com>
13275
13276 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13277 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13278 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13279 parameter.
13280 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13281 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13282 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13283 parameter.
13284 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13285 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13286 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13287 (mi_cmd_file_list_exec_source_files)
13288 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13289 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13290 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13291 parameter.
13292 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13293 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13294 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13295 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13296 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13297 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13298 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13299 'command' parameter.
13300 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13301 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13302 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13303 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13304 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13305 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13306 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13307 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13308 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13309 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13310 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13311 parameter.
13312 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13313 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13314 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13315 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13316 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13317 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13318 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13319 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13320 (mi_cmd_data_list_changed_registers)
13321 (mi_cmd_data_write_register_values)
13322 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13323 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13324 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13325 (mi_cmd_list_features, mi_cmd_list_target_features)
13326 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13327 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13328 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13329 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13330 (mi_cmd_trace_frame_collected): Constify 'command'
13331 parameter.
13332 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13333 'command' parameter.
13334
13335 2017-04-05 Pedro Alves <palves@redhat.com>
13336
13337 * ada-lang.c (ada_completer_word_break_characters): Now a const
13338 array.
13339 (ada_get_gdb_completer_word_break_characters): Constify.
13340 * completer.c (gdb_completer_command_word_break_characters)
13341 (gdb_completer_file_name_break_characters)
13342 (gdb_completer_quote_characters): Now const arrays.
13343 (get_gdb_completer_quote_characters): Constify.
13344 (set_rl_completer_word_break_characters): New function.
13345 (set_gdb_completion_word_break_characters)
13346 (complete_line_internal): Use it.
13347 * completer.h (get_gdb_completer_quote_characters): Constify.
13348 (set_rl_completer_word_break_characters): Declare.
13349 * f-lang.c (f_word_break_characters): Constify.
13350 * language.c (default_word_break_characters): Constify.
13351 * language.h (language_defn::la_word_break_characters): Constify.
13352 (default_word_break_characters): Constify.
13353 * top.c (init_main): Use set_rl_completer_word_break_characters.
13354
13355 2017-04-05 Pedro Alves <palves@redhat.com>
13356
13357 * aix-thread.c (aix_thread_pid_to_str)
13358 (aix_thread_extra_thread_info): Constify.
13359 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13360 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13361 (bsd_uthread_pid_to_str): Constify.
13362 * corelow.c (core_pid_to_str): Constify.
13363 * darwin-nat.c (darwin_pid_to_str): Constify.
13364 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13365 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13366 Constify.
13367 * gnu-nat.c (gnu_pid_to_str): Constify.
13368 * go32-nat.c (go32_pid_to_str): Constify.
13369 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13370 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13371 * inferior.c (inferior_pid_to_str): Constify.
13372 * linux-nat.c (linux_nat_pid_to_str): Constify.
13373 * linux-tdep.c (linux_core_pid_to_str): Constify.
13374 * linux-thread-db.c (thread_db_pid_to_str)
13375 (thread_db_extra_thread_info): Constify.
13376 * nto-tdep.c (nto_extra_thread_info): Constify.
13377 * nto-tdep.h (nto_extra_thread_info): Constify.
13378 * obsd-nat.c (obsd_pid_to_str): Constify.
13379 * procfs.c (procfs_pid_to_str): Constify.
13380 * ravenscar-thread.c (ravenscar_extra_thread_info)
13381 (ravenscar_pid_to_str): Constify.
13382 * remote-sim.c (gdbsim_pid_to_str): Constify.
13383 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13384 Constify.
13385 * sol-thread.c (solaris_pid_to_str): Constify.
13386 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13387 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13388 * target.c (default_pid_to_str, target_pid_to_str)
13389 (normal_pid_to_str, default_pid_to_str): Constify.
13390 * target.h (target_ops::to_pid_to_str)
13391 (target_ops::to_extra_thread_info): Constify.
13392 (target_pid_to_str, normal_pid_to_str): Constify.
13393 * windows-nat.c (windows_pid_to_str): Constify.
13394 * gdbarch.sh (core_pid_to_str): Constify.
13395 * target-delegates.c: Regenerate.
13396 * gdbarch.h, gdbarch.c: Regenerate.
13397
13398 2017-04-05 Pedro Alves <palves@redhat.com>
13399
13400 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13401 the memory of the temporary warning_pre_print override.
13402 * utils.c (warning_pre_print): Constify.
13403 * utils.h (warning_pre_print): Constify.
13404
13405 2017-04-05 Pedro Alves <palves@redhat.com>
13406
13407 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13408 (shell_command): New function.
13409 (make_command): Use std::string.
13410 (init_cli_cmds): Register shell_command instead of shell_escape.
13411
13412 2017-04-05 Pedro Alves <palves@redhat.com>
13413
13414 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13415 * tracepoint.c (default_collect): Don't initialize.
13416
13417 2017-04-05 Pedro Alves <palves@redhat.com>
13418
13419 * macroexp.c (macro_buffer::shared): Now a bool.
13420 (init_buffer): Update.
13421 (init_shared_buffer): Constify 'addr' parameter.
13422 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13423 casts.
13424
13425 2017-04-05 Pedro Alves <palves@redhat.com>
13426
13427 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13428 * disasm.c (set_disassembler_options): Constify local.
13429 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13430
13431 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13432
13433 PR gdb/21352
13434 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13435 option.
13436
13437 2017-04-05 Yao Qi <yao.qi@linaro.org>
13438
13439 * frame.c (frame_unwind_register_unsigned): Call
13440 frame_unwind_register_value.
13441
13442 2017-04-05 Yao Qi <yao.qi@linaro.org>
13443
13444 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13445 Use gdb_test_multiple, and don't match anchor.
13446
13447 2017-04-05 Pedro Alves <palves@redhat.com>
13448
13449 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13450 (Write After Approval): Remove Simon Marchi.
13451
13452 2017-04-05 Pedro Alves <palves@redhat.com>
13453
13454 * common/gdb_optional.h (optional::optional): Make constexpr and
13455 initialize m_dummy.
13456
13457 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13458
13459 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13460 (amd64fbsd_jmp_buf_reg_offset): Remove.
13461 (amd64fbsd_supply_uthread): Remove function.
13462 (amd64fbsd_collect_uthread): Remove function.
13463 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13464 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13465 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13466 (fbsd-nat.c): Update comment.
13467 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13468 (i386fbsd_jmp_buf_reg_offset): Remove.
13469 (i386fbsd_supply_uthread): Remove function.
13470 (i386fbsd_collect_uthread): Remove function.
13471 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13472
13473 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13474
13475 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13476 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13477 * NEWS: Mention that support for FreeBSD/alpha was removed.
13478 * alpha-fbsd-tdep.c: Delete file.
13479 * config/alpha/fbsd.mh: Delete file.
13480 * configure.host: Delete alpha*-*-freebsd* and
13481 alpha*-*-kfreebsd*-gnu.
13482 * configure.tgt: Delete alpha*-*-freebsd* and
13483 alpha*-*-kfreebsd*-gnu.
13484
13485 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13486
13487 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13488 amd64bsd_store_inferior_registers): Use ptid from regcache.
13489
13490 2017-04-04 Pedro Alves <palves@redhat.com>
13491
13492 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13493 data fields, make them private and add "m_" prefixes.
13494 (lnp_state_machine::lnp_state_machine): New ctor.
13495 (record_line, check_line_address, handle_set_discriminator)
13496 (handle_set_address, handle_advance_pc, handle_special_opcode)
13497 (handle_advance_line, handle_set_file, handle_negate_stmt)
13498 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13499 (end_sequence, advance_line): New methods.
13500 (m_gdbarch, m_record_lines_p): New fields.
13501 (lnp_reader_state): Delete.
13502 (dwarf_record_line): Rename to ...
13503 (lnp_state_machine::record_line): ... adjust.
13504 (init_lnp_state_machine): Delete.
13505 (lnp_state_machine::lnp_state_machine): New.
13506 (check_line_address): Rename to ...
13507 (lnp_state_machine::check_line_address): This.
13508 (dwarf_decode_lines_1): Remove reference to "reader_state".
13509 Adjust lnp_state_machine having a non-default ctor. Use bool.
13510 State machine internal state manipulation moved to
13511 lnp_state_machine methods.
13512
13513 2017-04-04 Pedro Alves <palves@redhat.com>
13514
13515 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13516 unittests/offset-type-selftests.c.
13517 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13518 * common/offset-type.h: New file.
13519 * common/preprocessor.h: New file.
13520 * common/traits.h: New file.
13521 * common/valid-expr.h: New file.
13522 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13523 sect_offset and cu_offset strong typedefs throughout.
13524 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13525 typedefs throughout.
13526 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13527 sect_offset and cu_offset strong typedefs throughout.
13528 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13529 typedefs throughout.
13530 * gdbtypes.h: Include "common/offset-type.h".
13531 (cu_offset): Now an offset type (strong typedef) instead of a
13532 struct.
13533 (sect_offset): Likewise.
13534 (union call_site_parameter_u): Rename "param_offset" field to
13535 "param_cu_off".
13536 * unittests/offset-type-selftests.c: New file.
13537
13538 2017-04-04 Pedro Alves <palves@redhat.com>
13539
13540 * common/underlying.h: New file.
13541 * dwarf2read.c: Include "common/gdb_optional.h" and
13542 "common/underlying.h".
13543 (dir_index, file_name_index): New types.
13544 (file_entry): Use them.
13545 (file_entry::include): Use to_underlying.
13546 (line_header::add_file_name): Use dir_index.
13547 (read_formatted_entries): Use gdb::optional. Read form before
13548 writting to file_entry.
13549 (dwarf_decode_line_header): Use dir_index.
13550 (lnp_state_machine::current_file): Use to_underlying.
13551 (lnp_state_machine::file): Change type to file_name_index.
13552 (dwarf_record_line): Use to_underlying.
13553 (init_lnp_state_machine): Use file_name_index.
13554 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13555
13556 2017-04-04 Pedro Alves <palves@redhat.com>
13557
13558 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13559 operator bool, has_value and get methods.
13560
13561 2017-04-04 Pedro Alves <palves@redhat.com>
13562
13563 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13564 fields.
13565 (line_header): Initialize all data fields. Change type of
13566 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13567 Change type of include_dirs to std::vector<const char *>. Remove
13568 num_include_dirs, include_dirs_size. Change type of file_names to
13569 std::vector<file_entry>. Remove num_file_names, file_names_size.
13570 (line_header::line_header): New.
13571 (line_header::add_include_dir, line_header::add_file_name): New
13572 methods.
13573 (line_header::include_dir_at): Remove NULL check.
13574 (line_header::file_name_at): Add const overload.
13575 (line_header_up): New unique_ptr typedef.
13576 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13577 std::vector. Remove free_line_header call.
13578 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13579 free_line_header call.
13580 (free_cu_line_header): Delete.
13581 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13582 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13583 Adjust to use std::vector.
13584 (free_line_header): Delete.
13585 (free_line_header_voidp): Use delete.
13586 (add_include_dir): Replace with ...
13587 (line_header::add_include_dir): ... this method. Use std::vector.
13588 (add_file_name): Replace with ...
13589 (line_header::add_file_name): ... this method. Use std::vector.
13590 (add_include_dir_stub): Delete.
13591 (read_formatted_entries): Remove memset.
13592 (dwarf_decode_line_header): Return a line_header_up instead of a
13593 raw pointer. Remove cleanup handling. Pass lambdas to
13594 read_formatted_entries. Adjust to use line_header methods.
13595 (dwarf_decode_lines_1): Adjust to use line_header methods.
13596 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13597 use std::vector.
13598
13599 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13600
13601 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13602 instead of struct ptid.
13603
13604 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13605
13606 * frame.c (get_frame_register_bytes): Unwind using value.
13607 (put_frame_register_bytes): Likewise.
13608
13609 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13610
13611 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13612 aggregate-like.
13613
13614 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13615
13616 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13617
13618 2017-03-29 Yao Qi <yao.qi@linaro.org>
13619
13620 * gdbthread.h (struct thread_info): Declare constructor and
13621 destructor. Add some in-class member initializers.
13622 * thread.c (free_thread): Remove.
13623 (init_thread_list): Call delete instead of free_thread.
13624 (new_thread): Call thread_info constructor.
13625 (thread_info::thread_info): New function.
13626 (thread_info::~thread_info): New function.
13627 (delete_thread_1): Call delete instead of free_thread.
13628 (make_cleanup_restore_current_thread): Move tp and frame to
13629 inner block.
13630
13631 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13632
13633 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13634 (arc_skip_prologue): Likewise.
13635 (arc_make_frame_cache): Likewise.
13636 (arc_pv_get_operand): New function.
13637 (arc_is_in_prologue): Likewise.
13638 (arc_analyze_prologue): Likewise.
13639 (arc_print_frame_cache): Likewise.
13640 (MAX_PROLOGUE_LENGTH): New constant.
13641
13642 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13643
13644 * configure.tgt: Add arc-insn.o.
13645 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13646 (dump_arc_instruction_command): New function.
13647 (arc_fprintf_disasm): Likewise.
13648 (arc_disassemble_info): Likewise.
13649 (arc_insn_get_operand_value): Likewise.
13650 (arc_insn_get_operand_value_signed): Likewise.
13651 (arc_insn_get_memory_base_reg): Likewise.
13652 (arc_insn_get_memory_offset): Likewise.
13653 (arc_insn_get_branch_target): Likewise.
13654 (arc_insn_dump): Likewise.
13655 (arc_insn_get_linear_next_pc): Likewise.
13656 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13657 (arc_disassemble_info): Likewise.
13658 (arc_insn_get_branch_target): Likewise.
13659 (arc_insn_get_linear_next_pc): Likewise.
13660 * NEWS: Mention new "maint print arc arc-instruction".
13661
13662 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13663
13664 * arc-tdep (maintenance_print_arc_list): New variable.
13665 (maintenance_print_arc_command): New function.
13666
13667 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13668
13669 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13670 Add "limm" and "reserved".
13671 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13672 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13673 * arc-tdep.h (arc_regnum): Likewise.
13674
13675 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13676
13677 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13678 for THREADPTR register.
13679 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13680 register.
13681 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13682 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13683 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13684
13685 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13686
13687 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13688 registers above gdbarch_num_regs (gdbarch) as privileged in
13689 call0 ABI.
13690
13691 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13692
13693 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13694 for a single specified register or for all registers in
13695 a0_base..a0_base + C0_NREGS range.
13696 (supply_gregset_reg): Call regcache_raw_supply for a single
13697 specified register or for all registers in a0_base..a0_base +
13698 C0_NREGS range.
13699
13700 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13701
13702 * arch/xtensa.h (C0_NREGS): Add definition.
13703 * xtensa-tdep.c (C0_NREGS): Remove definition.
13704
13705 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13706
13707 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13708 Drop xtensa_default_isa initialization.
13709 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13710
13711 2017-03-27 Pedro Alves <palves@redhat.com>
13712
13713 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13714 (file_entry::include_dir): New method.
13715 (line_header::include_dir_at, line_header::file_name_at): New
13716 methods.
13717 (setup_type_unit_groups, setup_type_unit_groups)
13718 (psymtab_include_file_name): Simplify using the new methods.
13719 (lnp_state_machine) <the_line_header>: New field.
13720 <file>: Add comment.
13721 (lnp_state_machine::current_file): New method.
13722 (dwarf_record_line): Simplify using the new methods.
13723 (init_lnp_state_machine): Initialize the "the_line_header" field.
13724 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13725 Simplify using the new methods.
13726
13727 2017-03-27 Pedro Alves <palves@redhat.com>
13728
13729 * cp-name-parser.y (make_empty): Delete.
13730 (demangler_special, nested_name, ptr_operator, array_indicator)
13731 (direct_declarator, declarator_1): Use fill_comp instead of
13732 make_empty.
13733
13734 2017-03-27 Pedro Alves <palves@redhat.com>
13735
13736 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13737 to ATTRIBUTE_PRINTF.
13738 * solib-target.c (library_list_start_list): Print "string" not
13739 "version".
13740 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13741 gdb_xml_error call.
13742
13743 2017-03-27 Pedro Alves <palves@redhat.com>
13744
13745 * dwarf2read.c (struct file_and_directory): New.
13746 (dwarf2_get_dwz_file): Adjust to use std::string.
13747 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13748 (find_file_and_directory): Adjust to return a file_and_directory
13749 object.
13750 (read_file_scope): Adjust to use file_and_directory. Remove
13751 make_cleanup/do_cleanups calls.
13752 (open_and_init_dwp_file): Adjust to use std::string. Remove
13753 make_cleanup/do_cleanups calls.
13754 * python/python.c (do_start_initialization): Adjust to ldirname
13755 returning a std::string.
13756 * utils.c (ldirname): Now returns a std::string.
13757 * utils.h (ldirname): Change return type to std::string.
13758 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13759 returning a std::string.
13760 * xml-tdesc.c (file_read_description_xml): Likewise.
13761
13762 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13763
13764 * regcache.c (regcache_debug_print_register): New function.
13765 * regcache.h (regcache_debug_print_register): New declaration.
13766 * target.c (debug_print_register): Remove.
13767 (target_fetch_registers): Call regcache_debug_print_register.
13768 (target_store_registers): Likewise.
13769
13770 2017-03-24 Pádraig Brady <pbrady@fb.com>
13771
13772 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13773 reference beyond the 'lh->include_dirs' array before accessing to
13774 it.
13775 (psymtab_include_file_name): Likewise.
13776 (dwarf_decode_lines_1): Likewise.
13777 (dwarf_decode_lines): Likewise.
13778 (file_file_name): Likewise.
13779
13780 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13781
13782 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13783 inferior_ptid.
13784 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13785 ps_lsetfpregs): Likewise.
13786 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13787 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13788 ps_lsetfpregs): Likewise.
13789 * target.c (target_fetch_registers, target_store_registers):
13790 Remove asserts.
13791
13792 2017-03-23 Alan Hayward <alan.hayward@arm.com>
13793
13794 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13795
13796 2017-03-23 Yao Qi <yao.qi@linaro.org>
13797
13798 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13799 (_initialize_aarch64_tdep): Register it.
13800 (aarch64_record_load_store): Handle PRFM instruction.
13801 (aarch64_process_record_test): New function.
13802
13803 2017-03-23 Yao Qi <yao.qi@linaro.org>
13804
13805 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13806 indentation.
13807
13808 2017-03-23 Yao Qi <yao.qi@linaro.org>
13809
13810 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13811
13812 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13813
13814 python/python.c (do_start_initialization): Fix memory leak.
13815
13816 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13817
13818 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13819 using get_ptrace_pid.
13820 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13821 inferior_ptid.
13822 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13823 inferior_ptid instead of pid.
13824
13825 2017-03-22 Yao Qi <yao.qi@linaro.org>
13826
13827 * aarch64-tdep.c: Wrap locally used classes in anonymous
13828 namespace.
13829 * arm-tdep.c: Likewise.
13830 * linespec.c: Likewise.
13831 * ui-out.c: Likewise.
13832
13833 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13834
13835 PR gdb/19637
13836 * python/lib/gdb/printer/bound_registers.py: Import sys.
13837
13838 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13839
13840 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13841 windows_thread_info parameter and use it instead of
13842 current_thread.
13843 (windows_fetch_inferior_registers): Don't set current_thread,
13844 pass the thread to do_windows_fetch_inferior_registers. Use
13845 ptid from regcache instead of inferior_ptid.
13846 (do_windows_store_inferior_registers): Add windows_thread_info
13847 parameter and use it instead of current_thread.
13848 (windows_store_inferior_registers): Don't set current_thread,
13849 pass the thread to do_windows_store_inferior_registers. Use
13850 ptid from regcache instead of inferior_ptid.
13851
13852 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13853
13854 * ser-mingw.c (ser_windows_raw): Remove reference to
13855 struct serial::current_timeout.
13856
13857 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13858
13859 PR tdep/20928
13860 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13861 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13862 (sparc64_fsr_type): Fix %fsr decoding.
13863
13864 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13865
13866 * python/py-record-btrace.c (btpy_insn_data): Change return type
13867 for Python 2.
13868
13869 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13870
13871 * spu-linux-nat.c (spu_fetch_inferior_registers,
13872 spu_store_inferior_registers): Use ptid from regcache, set and
13873 restore inferior_ptid.
13874 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13875 Likewise.
13876
13877 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13878
13879 * i386-linux-nat.c (fetch_register, store_register,
13880 i386_linux_fetch_inferior_registers,
13881 i386_linux_store_inferior_registers): Use ptid from regcache.
13882 * ia64-linux-nat.c (ia64_linux_fetch_register,
13883 ia64_linux_store_register): Likewise.
13884 * inf-ptrace.c (inf_ptrace_fetch_register,
13885 inf_ptrace_store_register): Likewise.
13886 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13887 m32r_linux_store_inferior_registers): Likewise.
13888 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13889 m68kbsd_store_inferior_registers): Likewise.
13890 * m68k-linux-nat.c (fetch_register, store_register,
13891 m68k_linux_fetch_inferior_registers,
13892 m68k_linux_store_inferior_registers): Likewise.
13893 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13894 m88kbsd_store_inferior_registers): Likewise.
13895 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13896 mips_fbsd_store_inferior_registers): Likewise.
13897 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13898 mips64_linux_regsets_store_registers): Likewise.
13899 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13900 mipsnbsd_store_inferior_registers): Likewise.
13901 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13902 mips64obsd_store_inferior_registers): Likewise.
13903 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13904 Likewise.
13905 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13906 ppcfbsd_store_inferior_registers): Likewise.
13907 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13908 ppc_linux_store_inferior_registers): Likewise.
13909 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13910 ppcnbsd_store_inferior_registers): Likewise.
13911 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13912 ppcobsd_store_registers): Likewise.
13913 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13914 Likewise.
13915 * ravenscar-thread.c (ravenscar_fetch_registers,
13916 ravenscar_store_registers, ravenscar_prepare_to_store):
13917 Likewise.
13918 * record-btrace.c (record_btrace_fetch_registers,
13919 record_btrace_store_registers, record_btrace_prepare_to_store):
13920 Likewise.
13921 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13922 Lookup inferior using ptid from regcache, instead of
13923 current_inferior.
13924 * remote.c (remote_fetch_registers, remote_store_registers): Use
13925 ptid from regcache.
13926 * rs6000-nat.c (fetch_register, store_register): Likewise.
13927 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13928 s390_linux_store_inferior_registers): Likewise.
13929 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13930 shnbsd_store_inferior_registers): Likewise.
13931 * sol-thread.c (sol_thread_fetch_registers,
13932 sol_thread_store_registers): Likewise.
13933 * sparc-nat.c (sparc_fetch_inferior_registers,
13934 sparc_store_inferior_registers): Likewise.
13935 * tilegx-linux-nat.c (fetch_inferior_registers,
13936 store_inferior_registers): Likewise.
13937 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13938 vaxbsd_store_inferior_registers): Likewise.
13939 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13940 store_xtregs): Likewise.
13941
13942 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13943
13944 PR gdb/14441
13945 * NEWS: Mention support for rvalue references in GDB and python.
13946 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13947 supports both lvalue and rvalue references.
13948
13949 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13950
13951 PR gdb/14441
13952 * gdbtypes.c (rank_one_type): Implement overloading
13953 resolution rules regarding rvalue references.
13954
13955 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13956
13957 PR gdb/14441
13958 * aarch64-tdep.c (aarch64_type_align)
13959 (aarch64_extract_return_value, aarch64_store_return_value): Change
13960 lvalue reference type checks to general reference type checks.
13961 * amd64-tdep.c (amd64_classify): Likewise.
13962 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13963 Likewise.
13964 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13965 (arm_store_return_value): Likewise.
13966 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13967 * c-typeprint.c (c_print_type): Likewise.
13968 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13969 (cplus_number_of_children, cplus_describe_child): Likewise.
13970 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13971 * completer.c (expression_completer): Likewise.
13972 * cp-support.c (make_symbol_overload_list_adl_namespace):
13973 Likewise.
13974 * darwin-nat-info.c (info_mach_region_command): Likewise.
13975 * dwarf2loc.c (entry_data_value_coerce_ref)
13976 (value_of_dwarf_reg_entry): Likewise.
13977 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13978 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13979 Likewise.
13980 * findvar.c (extract_typed_address, store_typed_address):
13981 Likewise.
13982 * gdbtypes.c (rank_one_type): Likewise.
13983 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13984 * infcall.c (value_arg_coerce): Likewise.
13985 * language.c (pointer_type): Likewise.
13986 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13987 Likewise.
13988 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13989 * mn10300-tdep.c (mn10300_type_align): Likewise.
13990 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13991 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13992 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13993 Likewise.
13994 * printcmd.c (print_formatted, x_command): Likewise.
13995 * python/py-type.c (typy_get_composite, typy_template_argument):
13996 Likewise.
13997 * python/py-value.c (valpy_referenced_value)
13998 (valpy_get_dynamic_type, value_has_field): Likewise.
13999 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14000 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14001 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14002 * spu-tdep.c (spu_scalar_value_p): Likewise.
14003 * symtab.c (lookup_symbol_aux): Likewise.
14004 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14005 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14006 Likewise.
14007 * valops.c (value_cast_pointers, value_cast)
14008 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14009 (value_struct_elt, value_struct_elt_bitpos)
14010 (value_find_oload_method_list, find_overload_match)
14011 (value_rtti_indirect_type): Likewise.
14012 * valprint.c (val_print_scalar_type_p, generic_val_print):
14013 Likewise.
14014 * value.c (value_actual_type, value_as_address, unpack_long)
14015 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14016 (coerce_ref): Likewise.
14017 * varobj.c (varobj_get_value_type): Likewise.
14018
14019 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14020
14021 PR gdb/14441
14022 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14023 table of constants.
14024 * python/lib/gdb/command/explore.py: Support exploring values
14025 of rvalue reference types.
14026 * python/lib/gdb/types.py: Implement get_basic_type() for
14027 rvalue reference types.
14028 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14029 constant.
14030 * python/py-value.c (valpy_getitem): Add an rvalue reference
14031 check.
14032 (valpy_reference_value): Add new parameter "refcode".
14033 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14034 New wrappers for valpy_reference_value().
14035 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14036 (gdbpy_invoke_xmethod): Likewise.
14037
14038 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14039
14040 PR gdb/14441
14041 * dwarf2read.c (process_die, read_type_die_1): Handle the
14042 DW_TAG_rvalue_reference_type DIE.
14043 (read_tag_reference_type): Add new parameter "refcode".
14044
14045 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14046
14047 PR gdb/14441
14048 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14049 (c_type_print_modifier, c_type_print_varspec_suffix)
14050 (c_type_print_base): Support printing rvalue reference types.
14051 * c-valprint.c (c_val_print, c_value_print): Support printing
14052 rvalue reference values.
14053
14054 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14055
14056 PR gdb/14441
14057 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14058 typename.
14059 * cp-support.c (replace_typedefs): Handle
14060 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14061 * python/py-type.c (typy_lookup_type): Likewise.
14062
14063 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14064
14065 PR gdb/14441
14066 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14067 * parse.c (insert_type): Change assert statement.
14068 (follow_types): Handle rvalue reference types.
14069 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14070 constant.
14071
14072 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14073
14074 PR gdb/14441
14075 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14076 value_ref() interface.
14077 * c-valprint.c (c_value_print): Likewise.
14078 * infcall.c (value_arg_coerce): Likewise.
14079 * python/py-value.c (valpy_reference_value): Likewise.
14080 * valops.c (value_cast, value_reinterpret_cast)
14081 (value_dynamic_cast, typecmp): Likewise.
14082 (value_ref): Parameterize by kind of return value reference type.
14083 * value.h (value_ref): Add new parameter "refcode".
14084
14085 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14086
14087 PR gdb/14441
14088 * dwarf2read.c (read_tag_reference_type): Use
14089 lookup_lvalue_reference_type() instead of lookup_reference_type().
14090 * eval.c (evaluate_subexp_standard): Likewise.
14091 * f-exp.y: Likewise.
14092 * gdbtypes.c (make_reference_type, lookup_reference_type):
14093 Generalize with rvalue reference types.
14094 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14095 convenience wrappers for lookup_reference_type().
14096 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14097 reference kind parameter.
14098 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14099 wrappers for lookup_reference_type().
14100 * guile/scm-type.c (gdbscm_type_reference): Use
14101 lookup_lvalue_reference_type() instead of lookup_reference_type().
14102 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14103 * parse.c (follow_types): Likewise.
14104 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14105 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14106 Likewise.
14107 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14108 (gdbpy_invoke_xmethod): Likewise.
14109 * stabsread.c: Provide extra argument to make_reference_type()
14110 call.
14111 * valops.c (value_ref, value_rtti_indirect_type): Use
14112 lookup_lvalue_reference_type() instead of lookup_reference_type().
14113
14114 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14115
14116 PR gdb/14441
14117 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14118 (TYPE_IS_REFERENCE): New macro.
14119 (struct type): Add rvalue_reference_type field.
14120 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14121
14122 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14123
14124 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14125 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14126 New function definition.
14127 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14128 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14129 New function declaration.
14130 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14131 * mi/mi-interp.h: New file.
14132 * solib.c (info_sharedlibrary_command): Replace for loop with
14133 ALL_SO_LIBS macro
14134 * solib.h (update_solib_list): New function declaration.
14135 (so_list_head): Move macro.
14136 * solist.h (ALL_SO_LIBS): New macro.
14137
14138 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14139
14140 * infcmd.c (post_create_inferior): Remove unused argument in
14141 call to solib_add.
14142 * remote.c (remote_start_remote): Likewise.
14143 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14144 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14145 (enable_break): Likewise.
14146 * solib.c (update_solib_list): Remove unused target argument
14147 and its documentation.
14148 (solib_add): Remove unused target argument. Remove unused
14149 argument in call to update_solib_list.
14150 (info_sharedlibrary_command): Remove unused argument in call
14151 to update_solib_list.
14152 (sharedlibrary_command): Remove unused argument in call to
14153 solib_add.
14154 (handle_solib_event): Likewise.
14155 (reload_shared_libraries): Likewise.
14156 * solib.h (solib_add): Remove unused target argument.
14157
14158 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14159
14160 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14161 (s390_displaced_step_fixup): Cover relative branches with the
14162 default fixup handling. This fixes lack of support for some
14163 relative branch instructions.
14164
14165 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14166
14167 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14168 ptid from regcache.
14169
14170 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14171
14172 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14173 i386_darwin_store_inferior_registers): Use ptid from regcache.
14174
14175 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14176
14177 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14178 i386bsd_store_inferior_registers): Use ptid from regcache.
14179
14180 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14181
14182 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14183 hppaobsd_store_registers): Use ptid from regcache.
14184
14185 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14186
14187 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14188 hppanbsd_store_registers): Use ptid from regcache.
14189
14190 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14191
14192 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14193 from regcache. Use get_ptrace_pid.
14194
14195 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14196
14197 * corelow.c (get_core_register_section): Use ptid from regcache,
14198 update doc.
14199
14200 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14201
14202 * bsd-uthread.c (bsd_uthread_fetch_registers,
14203 bsd_uthread_store_registers): Use ptid from regcache, set and
14204 restore inferior_ptid.
14205
14206 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14207
14208 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14209 fetch_fp_regs, store_register, store_regs, store_fp_register,
14210 store_fp_regs): Use ptid from regcache.
14211
14212 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14213
14214 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14215 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14216 store_vfp_regs): Use ptid from regcache.
14217
14218 2017-03-17 Pedro Alves <palves@redhat.com>
14219
14220 PR remote/21188
14221 * ser-base.c (ser_base_wait_for): Add comment.
14222 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14223 version.
14224 * ser-unix.c (hardwire_raw): Remove reference to
14225 scb->current_timeout.
14226 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14227 (hardwire_ops): Install ser_base_readchar instead of
14228 hardwire_readchar.
14229 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14230 Remove fields.
14231
14232 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14233
14234 PR gdb/19637
14235 * python/lib/gdb/printer/bound_registers.py: Add support for
14236 Python 3.
14237
14238 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14239
14240 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14241 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14242 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14243 byte_offset to subobj_byte_offset. Fix the handling of
14244 DWARF_VALUE_STACK on big-endian targets when coming via an
14245 implicit pointer.
14246 (dwarf2_evaluate_loc_desc): Adjust call to
14247 dwarf2_evaluate_loc_desc_full.
14248 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14249 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14250
14251 2017-03-16 Yao Qi <yao.qi@linaro.org>
14252
14253 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14254 and REVSH instructions.
14255
14256 2017-03-16 Yao Qi <yao.qi@linaro.org>
14257
14258 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14259 (arm_record_test): Declare.
14260 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14261 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14262 align with the manual.
14263 (thumb_record_misc): Adjust the code order to align with the
14264 manual.
14265 (thumb2_record_decode_insn_handler): Fix instruction matching.
14266 (instruction_reader_thumb): New class.
14267 (arm_record_test): New function.
14268
14269 2017-03-16 Yao Qi <yao.qi@linaro.org>
14270
14271 * arm-tdep.c (abstract_memory_reader): New class.
14272 (instruction_reader): New class.
14273 (extract_arm_insn): Add argument 'reader'. Callers updated.
14274 (decode_insn): Likewise.
14275
14276 2017-03-16 Doug Evans <dje@google.com>
14277
14278 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14279 member. Change type of TYPE member to SCM. All uses updated.
14280 (lsscm_make_lazy_string_smob): Add assert.
14281 (lsscm_make_lazy_string): Flag bad length values.
14282 (lsscm_elt_type): New function.
14283 (gdbscm_lazy_string_to_value): Rewrite to use
14284 lsscm_safe_lazy_string_to_value.
14285 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14286 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14287 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14288 in incoming type.
14289 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14290 * guile/scm-type.c (tyscm_scm_to_type): New function.
14291
14292 2017-03-15 Doug Evans <dje@google.com>
14293
14294 PR python/17728, python/18439, python/18779
14295 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14296 member. Change type of TYPE member to PyObject *. All uses updated.
14297 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14298 (gdbpy_create_lazy_string_object): Flag bad length values.
14299 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14300 Handle typedefs in incoming type.
14301 (stpy_lazy_string_elt_type): New function.
14302 (gdbpy_extract_lazy_string): Call it.
14303 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14304 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14305 typedefs in incoming type.
14306
14307 2017-03-16 Doug Evans <dje@google.com>
14308
14309 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14310 * guile/scm-type.c (tyscm_scm_to_type): New function.
14311
14312 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14313
14314 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14315 "ULONGEST" for "skip".
14316
14317 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14318
14319 PR gdb/21220
14320 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14321 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14322 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14323 over ptrace peek/poke until end of buffer or error.
14324
14325 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14326
14327 * parse.c (length_of_subexp): Make static.
14328 * parser-defs.h (length_of_subexp): Remove.
14329
14330 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14331
14332 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14333 as well.
14334
14335 2017-03-14 Pedro Alves <palves@redhat.com>
14336
14337 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14338 (main): Use std::unique_ptr. Remove calls to
14339 cp_demangled_name_parse_free.
14340
14341 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14342
14343 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14344 alphabsd_store_inferior_registers): Use regcache->ptid instead
14345 of inferior_ptid.
14346
14347 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14348
14349 * aix-thread.c (aix_thread_fetch_registers,
14350 aix_thread_store_registers): Use regcache->ptid instead of
14351 inferior_ptid.
14352
14353 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14354
14355 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14356 store_gregs_to_thread, fetch_fpregs_from_thread,
14357 store_fpregs_to_thread): Use regcache->ptid instead of
14358 inferior_ptid.
14359
14360 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14361
14362 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14363 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14364 instead of inferior_ptid.
14365
14366 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14367
14368 * target.c (target_fetch_registers, target_store_registers): Add
14369 assert.
14370
14371 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14372
14373 * regcache.h (regcache_get_ptid): New function.
14374 * regcache.c (regcache_get_ptid): New function.
14375
14376 2017-03-13 Mark Wielaard <mark@klomp.org>
14377
14378 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14379
14380 2017-03-10 Keith Seitz <keiths@redhat.com>
14381
14382 PR c++/8218
14383 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14384
14385 2017-03-08 Pedro Alves <palves@redhat.com>
14386
14387 PR gdb/18360
14388 * infrun.c (start_step_over, do_target_resume, resume)
14389 (restart_threads): Assert we're not resuming a thread that is
14390 meant to be stopped.
14391 (infrun_thread_stop_requested_callback): Delete.
14392 (infrun_thread_stop_requested): If the thread is internally
14393 stopped, queue a pending stop event and clear the thread's
14394 inline-frame state.
14395 (handle_stop_requested): New function.
14396 (handle_syscall_event, handle_inferior_event_1): Use
14397 handle_stop_requested.
14398 (handle_stop_requested): New function.
14399 (handle_signal_stop): Set the thread's stop_signal here instead of
14400 at caller.
14401 (finish_step_over): Clear step over info unconditionally.
14402 (handle_signal_stop): If the user had interrupted the event
14403 thread, consider the stop a random signal.
14404 (handle_signal_stop) <signal arrived while stepping over
14405 breakpoint>: Don't restart threads here.
14406 (stop_waiting): Don't clear step-over info here.
14407
14408 2017-03-08 Pedro Alves <palves@redhat.com>
14409
14410 PR 21206
14411 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14412 goes to argument 2, not 1.
14413
14414 2017-03-08 Pedro Alves <palves@redhat.com>
14415
14416 PR cli/21218
14417 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14418 display_gdb_prompt.
14419 (command_line_input): Add comment.
14420
14421 2017-03-08 Pedro Alves <palves@redhat.com>
14422
14423 PR tui/21216
14424 * tui/tui-file.c (tui_file::write): New.
14425 * tui/tui-file.h (tui_file): Override "write".
14426 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14427 factored out from ...
14428 (tui_puts): ... here.
14429 (tui_putc): Use them.
14430 (tui_write): New function.
14431 * tui/tui-io.h (tui_write): Declare.
14432
14433 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14434
14435 * Makefile.in (SFILES): Replace "environ.c" with
14436 "common/environ.c".
14437 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14438 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14439 to...
14440 * common/environ.c: ... here.
14441 * environ.h: Moved to...
14442 * common/environ.h: ... here.
14443
14444 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14445
14446 * gdbarch.sh (pstring_ptr): New static function.
14447 (gdbarch_disassembler_options): Use it.
14448 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14449 not valid_disassembler_option->name.
14450 * gdbarch.c: Regenerate.
14451
14452 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14453
14454 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14455
14456 2017-03-07 Pedro Alves <palves@redhat.com>
14457
14458 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14459
14460 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14461
14462 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14463 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14464 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14465 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14466
14467 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14468
14469 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14470
14471 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14472
14473 * remote.c (remote_add_target_side_commands): Use range-based
14474 for loop.
14475
14476 2017-03-03 Yao Qi <yao.qi@linaro.org>
14477
14478 PR gdb/21165
14479 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14480 value is lazy.
14481 * valprint.c (common_val_print): Likewise.
14482
14483 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14484
14485 * NEWS: Mention new set/show disassembler-options commands.
14486 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14487 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14488 (prospective_options): New static variable.
14489 (gdb_disassembler::gdb_disassembler): Initialize
14490 m_di.disassembler_options.
14491 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14492 (get_disassembler_options): New function.
14493 (set_disassembler_options): Likewise.
14494 (set_disassembler_options_sfunc): Likewise.
14495 (show_disassembler_options_sfunc): Likewise.
14496 (disassembler_options_completer): Likewise.
14497 (_initialize_disasm): Likewise.
14498 * disasm.h (get_disassembler_options): New prototype.
14499 (set_disassembler_options): Likewise.
14500 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14501 (gdbarch_verify_disassembler_options): Likewise.
14502 * gdbarch.c: Regenerate.
14503 * gdbarch.h: Likewise.
14504 * arm-tdep.c (num_disassembly_options): Delete.
14505 (set_disassembly_style): Likewise.
14506 (arm_disassembler_options): New static variable.
14507 (set_disassembly_style_sfunc): Convert short style name into long
14508 option name. Call set_disassembler_options.
14509 (show_disassembly_style_sfunc): New function.
14510 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14511 set_gdbarch_verify_disassembler_options.
14512 (_initialize_arm_tdep): Delete regnames variable and update callers.
14513 (arm_disassembler_options): Initialize.
14514 (disasm_options): New variable.
14515 (num_disassembly_options): Rename from this...
14516 (num_disassembly_styles): ...to this. Compute by scanning through
14517 disasm_options.
14518 (valid_disassembly_styles): Initialize using disasm_options.
14519 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14520 set_arm_regname_option.
14521 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14522 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14523 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14524 set_gdbarch_verify_disassembler_options.
14525 * s390-tdep.c (s390_disassembler_options): New static variable.
14526 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14527 set_gdbarch_verify_disassembler_options.
14528
14529 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14530
14531 * remote.c (remote_add_target_side_condition): Remove "struct"
14532 keyword from range-based for loop.
14533
14534 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14535
14536 * remote.c (remote_add_target_side_condition): Use range-based
14537 for loop. Update comment.
14538
14539 2017-02-27 Yao Qi <yao.qi@linaro.org>
14540
14541 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14542
14543 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14544
14545 * regcache.c (regcache_raw_update): New function.
14546 (regcache_raw_read): Move code to regcache_raw_update.
14547 * regcache.h (regcache_raw_update): New declaration.
14548 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14549
14550 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14551
14552 * dwarf2read.c (create_debug_type_hash_table): Initialize
14553 header.signature and header.type_offset_in_tu.
14554
14555 2017-02-24 Pedro Alves <palves@redhat.com>
14556
14557 * symtab.c (make_file_symbol_completion_list_1): Use
14558 add_symtab_completions.
14559
14560 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14561
14562 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14563
14564 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14565
14566 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14567 I386_MAX_REGISTER_SIZE.
14568 (i386_pseudo_register_write): Likewise.
14569 (i386_process_record): Likewise.
14570 * i387-tdep.c (i387_supply_xsave): Likewise.
14571 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14572 (store_register): Likewise.
14573
14574 2017-02-23 Pedro Alves <palves@redhat.com>
14575
14576 * ada-lang.c: Include "common/function-view.h".
14577 (ada_iterate_over_symbols): Adjust to use function_view as
14578 callback type.
14579 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14580 (ada_make_symbol_completion_list): Use a lambda.
14581 (ada_exc_search_name_matches): Delete.
14582 (name_matches_regex): New.
14583 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14584 * compile/compile-c-support.c: Include "common/function-view.h".
14585 (print_one_macro): Change prototype to accept a ui_file pointer.
14586 (write_macro_definitions): Use a lambda.
14587 * dwarf2read.c: Include "common/function-view.h".
14588 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14589 (dw2_expand_symtabs_matching): Adjust to use function_view as
14590 callback type.
14591 * language.h: Include "common/function-view.h".
14592 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14593 function_view as callback type.
14594 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14595 * linespec.c: Include "common/function-view.h".
14596 (collect_info::add_symbol): New method.
14597 (struct symbol_and_data_callback, iterate_inline_only, struct
14598 symbol_matcher_data, iterate_name_matcher): Delete.
14599 (iterate_over_all_matching_symtabs): Adjust to use function_view
14600 as callback type and lambdas.
14601 (iterate_over_file_blocks): Adjust to use function_view as
14602 callback type.
14603 (decode_compound_collector): Now a class with private fields.
14604 (decode_compound_collector::release_symbols): New method.
14605 (collect_one_symbol): Rename to...
14606 (decode_compound_collector::operator()): ... this and adjust.
14607 (lookup_prefix_sym): decode_compound_collector construction bits
14608 move to decode_compound_collector ctor. Pass the
14609 decode_compound_collector object directly as callback. Remove
14610 cleanups and use decode_compound_collector::release_symbols
14611 instead.
14612 (symtab_collector): Now a class with private fields.
14613 (symtab_collector::release_symtabs): New method.
14614 (add_symtabs_to_list): Rename to...
14615 (symtab_collector::operator()): ... this and adjust.
14616 (collect_symtabs_from_filename): symtab_collector construction
14617 bits move to symtab_collector ctor. Pass the symtab_collector
14618 object directly as callback. Remove cleanups and use
14619 symtab_collector::release_symtabs instead.
14620 (collect_symbols): Delete.
14621 (add_matching_symbols_to_info): Use lambdas.
14622 * macrocmd.c (print_macro_callback): Delete.
14623 (info_macro_command): Use a lambda.
14624 (info_macros_command): Pass print_macro_definition as callable
14625 directly.
14626 (print_one_macro): Remove 'ignore' parameter.
14627 (macro_list_command): Adjust.
14628 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14629 (macro_for_each_data::user_data): Delete field.
14630 (foreach_macro): Adjust to call the function_view.
14631 (macro_for_each): Adjust to use function_view as callback type.
14632 (foreach_macro_in_scope): Adjust to call the function_view.
14633 (macro_for_each_in_scope): Adjust to use function_view as callback
14634 type.
14635 * macrotab.h: Include "common/function-view.h".
14636 (macro_callback_fn): Declare a prototype instead of a pointer.
14637 Remove "user_data" parameter.
14638 (macro_for_each, macro_for_each_in_scope): Adjust to use
14639 function_view as callback type.
14640 * psymtab.c (partial_map_expand_apply)
14641 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14642 Adjust to use function_view as callback type and to return bool.
14643 (psym_expand_symtabs_matching): Adjust to use function_view as
14644 callback types.
14645 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14646 to use function_view as callback type and to return bool.
14647 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14648 callback types.
14649 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14650 as callback types.
14651 * symfile.h: Include "common/function-view.h".
14652 (expand_symtabs_file_matcher_ftype)
14653 (expand_symtabs_symbol_matcher_ftype)
14654 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14655 return bool.
14656 (quick_symbol_functions::map_symtabs_matching_filename)
14657 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14658 function_view as callback type and return bool.
14659 (expand_symtabs_matching): Adjust to use function_view as callback
14660 type.
14661 (maintenance_expand_name_matcher)
14662 (maintenance_expand_file_matcher): Delete.
14663 (maintenance_expand_symtabs): Use lambdas.
14664 * symtab.c (iterate_over_some_symtabs): Adjust to use
14665 function_view as callback types and return bool.
14666 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14667 of a cleanup.
14668 (lookup_symtab_callback): Delete.
14669 (lookup_symtab): Use a lambda.
14670 (iterate_over_symbols): Adjust to use function_view as callback
14671 type.
14672 (struct search_symbols_data, search_symbols_file_matches)
14673 (search_symbols_name_matches): Delete.
14674 (search_symbols): Use a pair of lambdas.
14675 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14676 (symtab_expansion_callback): Delete.
14677 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14678 * symtab.h: Include "common/function-view.h".
14679 (iterate_over_some_symtabs): Adjust to use function_view as
14680 callback type and return bool.
14681 (iterate_over_symtabs): Adjust to use function_view as callback
14682 type.
14683 (symbol_found_callback_ftype): Remove 'data' parameter and return
14684 bool.
14685 (iterate_over_symbols): Adjust to use function_view as callback
14686 type.
14687
14688 2017-02-23 Pedro Alves <palves@redhat.com>
14689
14690 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14691 (%.o) <unittests/%.c>: New pattern.
14692 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14693 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14694 * common/function-view.h: New file.
14695 * unittests/function-view-selftests.c: New file.
14696 * configure: Regenerate.
14697
14698 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14699
14700 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14701 inferior_ptid.
14702 * go32-nat.c (go32_thread_alive): Likewise.
14703
14704 2017-02-23 Yao Qi <yao.qi@linaro.org>
14705
14706 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14707 delete.
14708
14709 2017-02-23 Yao Qi <yao.qi@linaro.org>
14710
14711 * varobj.c (varobj_clear_saved_item): Use delete instead of
14712 xfree.
14713 (update_dynamic_varobj_children): Likewise.
14714
14715 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14716
14717 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14718
14719 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14720
14721 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14722 m_enum_value to 0 in default constructor.
14723
14724 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14725
14726 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14727 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14728 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14729 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14730 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14731 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14732 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14733 IS_STORE_CONDITIONAL_INSN.
14734
14735 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14736
14737 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14738
14739 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14740
14741 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14742
14743 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14744
14745 * dwarf2read.c (skip_one_die, read_attribute_value)
14746 (dwarf2_const_value_attr, dump_die_shallow)
14747 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14748 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14749
14750 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14751
14752 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14753 (dwarf_parse_macro_header): Accept DWARF version 5.
14754 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14755
14756 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14757
14758 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14759 DW_AT_GNU_*.
14760 * common/common-exceptions.h (enum errors): Likewise.
14761 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14762 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14763 (dwarf_expr_context::execute_stack_op): Likewise.
14764 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14765 Likewise.
14766 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14767 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14768 (show_entry_values_debug, call_site_to_target_addr)
14769 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14770 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14771 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14772 (value_of_dwarf_block_entry, indirect_pieced_value)
14773 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14774 (disassemble_dwarf_expression): Likewise.
14775 * dwarf2read.c (process_die, inherit_abstract_dies)
14776 (read_call_site_scope): Likewise.
14777 * gdbtypes.h (struct func_type, struct call_site_parameter)
14778 (struct call_site): Likewise.
14779 * stack.c (read_frame_arg): Likewise.
14780 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14781
14782 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14783
14784 * defs.h (read_unsigned_leb128): New declaration.
14785 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14786 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14787 (dwarf2_find_location_expression): Call also
14788 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14789 * dwarf2loc.h (dwarf2_version): New declaration.
14790 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14791 rnglists.
14792 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14793 .debug_rnglists.
14794 (struct dwop_section_names): Add loclists_dwo.
14795 (dwop_section_names): Add .debug_loclists.dwo.
14796 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14797 (struct dwarf2_per_cu_data): Add dwarf_version.
14798 (struct dwo_sections): Add loclists.
14799 (struct attr_abbrev): Add implicit_const.
14800 (read_indirect_line_string): New declaration.
14801 (read_unsigned_leb128): Delete declaration.
14802 (rcuh_kind): New definition.
14803 (read_and_check_comp_unit_head): Change parameter
14804 is_debug_types_section to section_kind.
14805 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14806 (read_comp_unit_head): Change parameter abfd to section, add parameter
14807 section_kind. Handle DWARF-5.
14808 (error_check_comp_unit_head): Accept also DWARF version 5.
14809 (read_and_check_comp_unit_head): Change parameter
14810 is_debug_types_section to section_kind.
14811 (read_and_check_type_unit_head): Delete function.
14812 (read_abbrev_offset): Handle DWARF-5.
14813 (create_debug_type_hash_table): Add parameter section_kind. Process
14814 only DW_UT_type. Use signature and type_offset_in_tu from struct
14815 comp_unit_head.
14816 (create_debug_types_hash_table): Update create_debug_type_hash_table
14817 caller.
14818 (create_all_type_units): Call create_debug_type_hash_table.
14819 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14820 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14821 caller.
14822 (skip_one_die): Handle DW_FORM_implicit_const.
14823 (dwarf2_rnglists_process): New function.
14824 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14825 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14826 (read_attribute_value): Handle DW_FORM_implicit_const,
14827 DW_FORM_line_strp.
14828 (read_attribute): Handle DW_FORM_implicit_const.
14829 (read_indirect_string_at_offset_from): New function from
14830 read_indirect_string_at_offset.
14831 (read_indirect_string_at_offset): Call
14832 read_indirect_string_at_offset_from.
14833 (read_indirect_line_string_at_offset): New function.
14834 (read_indirect_string): New function comment.
14835 (read_indirect_line_string): New function.
14836 (read_unsigned_leb128): Make it global.
14837 (dwarf2_string_attr): Handle DWARF-5.
14838 (add_include_dir_stub, read_formatted_entries): New functions.
14839 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14840 Handle DWARF-5.
14841 (per_cu_header_read_in): Update read_comp_unit_head caller.
14842 (dwarf2_version): New function.
14843 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14844 rnglists.
14845 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14846 fields.
14847
14848 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14849
14850 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14851
14852 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14853
14854 * dwarf2read.c (dwarf2_ranges_process): New function from
14855 dwarf2_ranges_read.
14856 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14857 dwarf2_ranges_process.
14858
14859 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14860
14861 * dwarf2read.c (create_debug_type_hash_table): New function from
14862 create_debug_types_hash_table.
14863 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14864 (create_all_type_units, open_and_init_dwo_file): Update
14865 create_debug_types_hash_table callers.
14866
14867 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14868
14869 PR gdb/16188
14870 * fork-child.c (trace_start_error): Fix thinko. va_end should
14871 refer to 'ap', not 'args'.
14872
14873 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14874 Pedro Alves <palves@redhat.com>
14875
14876 PR gdb/16188
14877 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14878 calls succeeded.
14879 * fork-child.c (trace_start_error): New function.
14880 (trace_start_error_with_name): Likewise.
14881 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14882 * inf-ptrace.c (inf_ptrace_me): Likewise.
14883 * inferior.h (trace_start_error): New prototype.
14884 (trace_start_error_with_name): Likewise.
14885
14886 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14887
14888 PR gdb/21164
14889 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14890 NULL before using it.
14891 * symmisc.c (maintenance_print_symbols): Likewise.
14892 (maintenance_print_msymbols): Likewise.
14893
14894 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14895
14896 * NEWS: Add record Python bindings entry.
14897
14898 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14899
14900 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14901 py-record-full.o.
14902 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14903 * python/py-record-btrace.c, python/py-record-btrace.h,
14904 python/py-record-full.c, python/py-record-full.h: New file.
14905 * python/py-record.c: Add include for py-record-btrace.h and
14906 py-record-full.h.
14907 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14908 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14909 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14910 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14911 New definition.
14912 (gdbpy_initialize_btrace): New export.
14913 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14914
14915 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14916
14917 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14918 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14919 * python/py-record.c: New file.
14920 * python/python-internal.h (gdbpy_start_recording,
14921 gdbpy_current_recording, gdpy_stop_recording,
14922 gdbpy_initialize_record): New export.
14923 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14924 (python_GdbMethods): Add gdbpy_start_recording,
14925 gdbpy_current_recording and gdbpy_stop_recording.
14926
14927 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14928
14929 * record-btrace.c (record_btrace_record_method): New function.
14930 (init_record_btrace_ops): Initialize to_record_method.
14931 * record-full.c (record_full_record_method): New function.
14932 (init_record_full_ops, init_record_full_core_ops): Add
14933 record_full_record_method.
14934 * record.h (enum record_method): New enum.
14935 * target-debug.h (target_debug_print_enum_record_method: New define.
14936 * target-delegates.c: Regenerate.
14937 * target.c (target_record_method): New function.
14938 * target.h: Include record.h.
14939 (struct target_ops) <to_record_method>: New field.
14940 (target_record_method): New export.
14941
14942 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14943
14944 * record.h (record_start, record_stop): New export.
14945 * record.c (record_start, record_stop): New function.
14946
14947 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14948
14949 * btrace.c (btrace_fetch): Copy function call segments pointer
14950 into a vector.
14951 (btrace_clear): Clear the vector.
14952 (btrace_find_insn_by_number): Use binary search to find the correct
14953 function call segment.
14954 * btrace.h (brace_fun_p): New typedef.
14955 (struct btrace_thread_info) <functions>: New field.
14956
14957 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14958
14959 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14960 * btrace.c (btrace_decode_error): ... here. New function.
14961 * btrace.h (btrace_decode_error): New export.
14962
14963 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14964
14965 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14966 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14967 btrace_find_insn_by_number): Remove special case for gaps.
14968 * btrace.h (btrace_insn_get_error): New export.
14969 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14970 * record-btrace.c (btrace_insn_history): Print number for gaps.
14971 (record_btrace_info, record_btrace_goto): Handle gaps.
14972
14973 2017-02-14 Tom Tromey <tom@tromey.com>
14974
14975 PR python/13598:
14976 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14977 event.
14978 * python/py-evts.c (gdbpy_initialize_py_events): Add
14979 before_prompt registry.
14980 * python/py-events.h (events_object) <before_prompt>: New field.
14981
14982 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14983
14984 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14985
14986 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14987
14988 * symfile (_initialize_symfile): Add usage text to the load command's
14989 help text.
14990
14991 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14992
14993 * utils.c (defaulted_query): Don't query on secondary UIs.
14994
14995 2017-02-10 Tom Tromey <tom@tromey.com>
14996
14997 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14998
14999 2017-02-10 Tom Tromey <tom@tromey.com>
15000
15001 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15002 "cleanup" local.
15003 * python/py-type.c (typy_legacy_template_argument): Remove
15004 unnecessary "cleanup" local.
15005
15006 2017-02-10 Tom Tromey <tom@tromey.com>
15007
15008 * python/python.c (do_start_initialization): New function, from
15009 _initialize_python.
15010 (_initialize_python): Call do_start_initialization.
15011 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15012 goto.
15013
15014 2017-02-10 Tom Tromey <tom@tromey.com>
15015
15016 * python/py-prettyprint.c (pretty_print_one_value): Use
15017 gdbpy_ref.
15018
15019 2017-02-10 Tom Tromey <tom@tromey.com>
15020
15021 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15022 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15023 gdbpy_ref.
15024 * python/py-type.c (field_new): Use gdbpy_ref.
15025 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15026 gdbpy_ref.
15027 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15028 (py_free_pspace): Likewise.
15029 (pspace_to_pspace_object): Likewise.
15030 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15031 (py_free_objfile): Likewise.
15032 (objfile_to_objfile_object): Likewise.
15033 * python/py-inferior.c (delete_thread_object): Use
15034 gdbpy_ref.
15035 (infpy_read_memory): Likewise.
15036 (py_free_inferior): Likewise.
15037 * python/py-evtregistry.c (create_eventregistry_object): Use
15038 gdbpy_ref.
15039 * python/py-event.c (create_event_object): Use gdbpy_ref.
15040
15041 2017-02-10 Tom Tromey <tom@tromey.com>
15042
15043 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15044 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15045 used.
15046 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15047 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15048 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15049 python/py-framefilter.c, python/py-function.c,
15050 python/py-inferior.c, python/py-infevents.c,
15051 python/py-linetable.c, python/py-newobjfileevent.c,
15052 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15053 python/py-signalevent.c, python/py-stopevent.c,
15054 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15055 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15056 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15057 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15058
15059 2017-02-10 Tom Tromey <tom@tromey.com>
15060
15061 * ui-out.h (ui_out_emit_type): New class.
15062 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15063 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15064 and ui_out_emit_tuple.
15065 (enumerate_locals): Likewise.
15066 (py_mi_print_variables, py_print_locals, py_print_args): Use
15067 ui_out_emit_list.
15068 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15069 ui_out_emit_list.
15070 * common/gdb_optional.h: New file.
15071
15072 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15073
15074 * MAINTAINERS (Write After Approval): Update my e-mail address.
15075
15076 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15077
15078 PR gdb/21122
15079 * breakpoint.c (_initialize_breakpoint): Update the help description
15080 of the 'commands' command to indicate that it takes a list argument.
15081
15082 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15083
15084 * interps.c (current_interp_set_logging): Remove "return".
15085
15086 2017-02-09 Gary Benson <gbenson@redhat.com>
15087
15088 * symtab.c (add_symtab_completions): Prevent NULL pointer
15089 dereference.
15090
15091 2017-02-08 Pedro Alves <palves@redhat.com>
15092
15093 * interps.c (interp::interp): Remove reference to quiet_p.
15094 (interp_set): Make static. Remove dead "Switching to" output
15095 code.
15096 (interp_quiet_p, interp_set_quiet): Delete.
15097 (interpreter_exec_cmd): Don't set the interpreter quiet.
15098 * interps.h (interp_quiet_p): Make static.
15099 (class interp) <quiet_p>: Remove field
15100
15101 2017-02-08 Jerome Guitton <guitton@adacore.com>
15102
15103 * cli/cli-decode.c (find_command_name_length): Make it extern.
15104 * cli/cli-decode.h (find_command_name_length): Declare.
15105 * cli/cli-script.c (command_name_equals, line_first_arg):
15106 New functions.
15107 (process_next_line): Use cli-decode to parse command names.
15108 (build_command_line): Make args a constant pointer.
15109
15110 2017-02-08 Jerome Guitton <guitton@adacore.com>
15111
15112 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15113 Remove case-insensitive search.
15114
15115 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15116
15117 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15118 at the end of the line. Avoids an ARI warning.
15119
15120 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15121
15122 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15123 rdseed instructions.
15124 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15125
15126 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15127
15128 PR tdep/20936
15129 Provide and use sparc32 and sparc64 target description XML files.
15130 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15131 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15132 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15133 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15134 * features/sparc/sparc32-solaris.xml: New file.
15135 * features/sparc/sparc64-solaris.xml: New file.
15136 * features/sparc/sparc32-solaris.c: Generated.
15137 * features/sparc/sparc64-solaris.c: Generated.
15138 * sparc-tdep.h: Account for differences in target descriptions.
15139 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15140 (sparc32_register_type): Use target provided registers.
15141 (validate_tdesc_registers): New function.
15142 (sparc32_gdbarch_init): Use tdesc_has_registers.
15143 Set pseudoregister functions.
15144 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15145 (sparc64_register_type): Use target provided registers.
15146 (sparc64_init_abi): Set pseudoregister functions.
15147
15148 2017-02-03 Tom Tromey <tom@tromey.com>
15149
15150 PR rust/21097:
15151 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15152 with a single member.
15153
15154 2017-02-03 Pedro Alves <palves@redhat.com>
15155
15156 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15157 (cli_interp_base::~cli_interp_base): New.
15158 (cli_interp): New struct.
15159 (as_cli_interp): Cast the interp itself to cli_interp.
15160 (cli_interpreter_pre_command_loop): Rename to ...
15161 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15162 parameter.
15163 (cli_interpreter_init): Rename to ...
15164 (cli_interp::init): ... this. Remove 'self' parameter. Use
15165 boolean. Make extern.
15166 (cli_interpreter_resume): Rename to ...
15167 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15168 extern.
15169 (cli_interpreter_suspend): Rename to ...
15170 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15171 extern.
15172 (cli_interpreter_exec): Rename to ...
15173 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15174 extern.
15175 (cli_interpreter_supports_command_editing): Rename to ...
15176 (cli_interp_base::supports_command_editing): ... this. Remove
15177 'interp' parameter. Make extern.
15178 (cli_ui_out): Rename to ...
15179 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15180 Make extern.
15181 (cli_set_logging): Rename to ...
15182 (cli_interp_base::set_logging): ... this. Remove 'interp'
15183 parameter. Make extern.
15184 (cli_interp_procs): Delete.
15185 (cli_interp_factory): Adjust to use "new".
15186 * cli/cli-interp.h: Include "interps.h".
15187 (struct cli_interp_base): New struct.
15188 * interps.c (struct interp): Delete. Fields moved to interps.h.
15189 (interp_new): Delete.
15190 (interp::interp, interp::~interp): New.
15191 (interp_set): Use bool, and return void. Assume the interpreter
15192 has suspend, init and resume methods, and that the all return
15193 void.
15194 (set_top_level_interpreter): interp_set returns void.
15195 (interp_ui_out): Adapt.
15196 (current_interp_set_logging): Adapt.
15197 (interp_data): Delete.
15198 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15199 (interp_exec): Adapt.
15200 (top_level_interpreter_data): Delete.
15201 * interps.h (interp_init_ftype, interp_resume_ftype)
15202 (interp_suspend_ftype, interp_exec_ftype)
15203 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15204 (class interp): New.
15205 (interp_new): Delete.
15206 (interp_set): Now returns void. Use bool.
15207 (interp_data, top_level_interpreter_data): Delete.
15208 * mi/mi-common.h: Include interps.h.
15209 (class mi_interp): Inherit from interp. Define a ctor. Declare
15210 init, resume, suspect, exec, interp_ui_out, set_logging and
15211 pre_command_loop methods.
15212 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15213 (mi_interpreter_init): Rename to ...
15214 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15215 bool, return void and make extern. Adjust.
15216 (mi_interpreter_resume): ... Rename to ...
15217 (mi_interp::resume): ... this. Remove the 'data' parameter,
15218 return void and make extern. Adjust.
15219 (mi_interpreter_suspend): ... Rename to ...
15220 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15221 return void and make extern. Adjust.
15222 (mi_interpreter_exec): ... Rename to ...
15223 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15224 extern. Adjust.
15225 (mi_interpreter_pre_command_loop): ... Rename to ...
15226 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15227 parameter and make extern.
15228 (mi_on_normal_stop_1): Adjust.
15229 (mi_ui_out): Rename to ...
15230 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15231 parameter and make extern. Adjust.
15232 (mi_set_logging): Rename to ...
15233 (mi_interp::set_logging): ... this. Remove the 'interp'
15234 parameter and make extern. Adjust.
15235 (mi_interp_procs): Delete.
15236 (mi_interp_factory): Adjust to use 'new'.
15237 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15238 (mi_print_exception, mi_execute_command, mi_load_progress):
15239 Adjust.
15240 * tui/tui-interp.c (tui_interp): New class.
15241 (as_tui_interp): Return a tui_interp pointer.
15242 (tui_on_normal_stop, tui_on_signal_received)
15243 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15244 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15245 to use interp::interp_ui_out.
15246 (tui_init): Rename to ...
15247 (tui_interp::init): ... this. Remove the 'self' parameter, use
15248 bool, return void and make extern. Adjust.
15249 (tui_resume): Rename to ...
15250 (tui_interp::resume): ... this. Remove the 'data' parameter,
15251 return void and make extern. Adjust.
15252 (tui_suspend): Rename to ...
15253 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15254 return void and make extern. Adjust.
15255 (tui_ui_out): Rename to ...
15256 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15257 parameter, and make extern. Adjust.
15258 (tui_exec): Rename to ...
15259 (tui_interp::exec): ... this. Remove the 'data' parameter and
15260 make extern.
15261 (tui_interp_procs): Delete.
15262 (tui_interp_factory): Use "new".
15263
15264 2017-02-02 Tom Tromey <tom@tromey.com>
15265
15266 * rust-exp.y (ends_raw_string, space_then_number)
15267 (rust_identifier_start_p): Return bool.
15268 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15269 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15270 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15271 (rust_chartype_p): Return bool.
15272 (val_print_struct, rust_print_struct_def, rust_print_type):
15273 Update.
15274 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15275 Return bool.
15276
15277 2017-02-02 Tom Tromey <tom@tromey.com>
15278
15279 * rust-lang.c: Reindent.
15280
15281 2017-02-02 Tom Tromey <tom@tromey.com>
15282
15283 * rust-lang.h (rust_crate_for_block): Update.
15284 * rust-lang.c (rust_crate_for_block): Return std::string.
15285 (rust_get_disr_info): Use std:;string, not
15286 gdb::unique_xmalloc_ptr.
15287 * rust-exp.y (crate_name): Update.
15288
15289 2017-02-02 Pedro Alves <palves@redhat.com>
15290
15291 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15292 field out of gdb_disassembler_test and make it static.
15293
15294 2017-02-02 Pedro Alves <palves@redhat.com>
15295
15296 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15297 mi1_interp and mi_interp fields.
15298
15299 2017-02-02 Pedro Alves <palves@redhat.com>
15300
15301 * cli/cli-interp.c (struct saved_output_files, saved_output):
15302 Moved from cli/cli-logging.c.
15303 (cli_set_logging): New function.
15304 (cli_interp_procs): Install cli_set_logging.
15305 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15306 Declare.
15307 * cli/cli-logging.c (struct saved_output_files, saved_output):
15308 Moved to cli/cli-interp.c.
15309 (pop_output_files): Don't save outputs here.
15310 (make_logging_output): New function.
15311 (handle_redirections): Don't build tee nor save previous outputs
15312 here.
15313 * interps.c (current_interp_set_logging): Change prototype.
15314 Assume there's always a set_logging_proc method installed.
15315 * interps.h (interp_set_logging_ftype): Change prototype.
15316 (current_interp_set_logging): Change prototype and adjust comment.
15317 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15318 use make_logging_output.
15319 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15320 2017-02-02 Pedro Alves <palves@redhat.com>
15321
15322 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15323 from ...
15324 (set_logging_overwrite): ... here.
15325 (logging_no_redirect_file): Delete.
15326 (set_logging_redirect): Don't handle redirection on the fly.
15327 Instead warn that "logging off" / "logging on" is necessary.
15328 (pop_output_files): Delete references to logging_no_redirect_file.
15329 (show_logging_command): Always speak in terms of what will happen
15330 once logging is reenabled.
15331
15332 2017-02-02 Pedro Alves <palves@redhat.com>
15333
15334 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15335
15336 2017-02-02 Pedro Alves <palves@redhat.com>
15337
15338 * disasm.c (gdb_pretty_print_insn): Rename to ...
15339 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15340 Remove gdbarch parameter. Adapt to clear the object's buffers
15341 instead of allocating new buffers, and to print using the object's
15342 gdb_disassembler instead of calling gdb_print_insn.
15343 (dump_insns): Use gdb_pretty_print_disassembler.
15344 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15345 (gdb_pretty_print_disassembler): New class.
15346 * record-btrace.c (btrace_insn_history): Use
15347 gdb_pretty_print_disassembler.
15348
15349 2017-02-02 Pedro Alves <palves@redhat.com>
15350
15351 * ada-lang.c (type_as_string): Use string_file.
15352 * ada-valprint.c (ada_print_floating): Use string_file.
15353 * ada-varobj.c (ada_varobj_scalar_image)
15354 (ada_varobj_get_value_image): Use string_file.
15355 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15356 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15357 * breakpoint.c (update_inserted_breakpoint_locations)
15358 (insert_breakpoint_locations, reattach_breakpoints)
15359 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15360 (print_it_watchpoint): Use string_file.
15361 (save_breakpoints): Use stdio_file.
15362 * c-exp.y (oper): Use string_file.
15363 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15364 tee_file.
15365 (pop_output_files): Use delete.
15366 (handle_redirections): Use stdio_file and tee_file.
15367 * cli/cli-setshow.c (do_show_command): Use string_file.
15368 * compile/compile-c-support.c (c_compute_program): Use
15369 string_file.
15370 * compile/compile-c-symbols.c (generate_vla_size): Take a
15371 'string_file &' instead of a 'ui_file *'.
15372 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15373 of a 'ui_file *'. Use string_file.
15374 (generate_c_for_variable_locations): Take a 'string_file &'
15375 instead of a 'ui_file *'.
15376 * compile/compile-internal.h (generate_c_for_for_one_variable):
15377 Take a 'string_file &' instead of a 'ui_file *'.
15378 * compile/compile-loc2c.c (push, pushf, unary, binary)
15379 (print_label, pushf_register_address, pushf_register)
15380 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15381 'ui_file *'. Adjust.
15382 * compile/compile.c (compile_to_object): Use string_file.
15383 * compile/compile.h (compile_dwarf_expr_to_c)
15384 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15385 'ui_file *'.
15386 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15387 (replace_typedefs_qualified_name): Use string_file and
15388 obstack_copy0.
15389 * disasm.c (gdb_pretty_print_insn): Use string_file.
15390 (gdb_disassembly): Adjust reference the null_stream global.
15391 (do_ui_file_delete): Delete.
15392 (gdb_insn_length): Use null_stream.
15393 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15394 * dwarf2loc.c (dwarf2_compile_property_to_c)
15395 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15396 'string_file &' instead of a 'ui_file *'.
15397 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15398 * dwarf2read.c (do_ui_file_peek_last): Delete.
15399 (dwarf2_compute_name): Use string_file.
15400 * event-top.c (gdb_setup_readline): Use stdio_file.
15401 * gdbarch.sh (verify_gdbarch): Use string_file.
15402 * gdbtypes.c (safe_parse_type): Use null_stream.
15403 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15404 string_file.
15405 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15406 'string_file *' instead of a 'ui_file *'.
15407 (gdbscm_arch_disassemble): Use string_file.
15408 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15409 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15410 inherits from ui_file.
15411 (ioscm_file_port_delete, ioscm_file_port_rewind)
15412 (ioscm_file_port_put): Delete.
15413 (ioscm_file_port_write): Rename to ...
15414 (ioscm_file_port::write): ... this. Remove file_port_magic
15415 checks.
15416 (ioscm_file_port_new): Delete.
15417 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15418 ui_file_up.
15419 * guile/scm-type.c (tyscm_type_name): Use string_file.
15420 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15421 Use string_file.
15422 * infcmd.c (print_return_value_1): Use string_file.
15423 * infrun.c (print_target_wait_results): Use string_file.
15424 * language.c (add_language): Use string_file.
15425 * location.c (explicit_to_string_internal): Use string_file.
15426 * main.c (captured_main_1): Use null_file.
15427 * maint.c (maintenance_print_architecture): Use stdio_file.
15428 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15429 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15430 event_channel>: Change type to mi_console_file pointer.
15431 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15432 (mi_console_file_delete): Delete.
15433 (struct mi_console_file): Delete.
15434 (mi_console_file_magic): Delete.
15435 (mi_console_file_new): Delete.
15436 (mi_console_file::mi_console_file): New.
15437 (mi_console_file_delete): Delete.
15438 (mi_console_file_fputs): Delete.
15439 (mi_console_file::write): New.
15440 (mi_console_raw_packet): Delete.
15441 (mi_console_file::flush): New.
15442 (mi_console_file_flush): Delete.
15443 (mi_console_set_raw): Rename to ...
15444 (mi_console_file::set_raw): ... this.
15445 * mi/mi-console.h (class mi_console_file): New class.
15446 (mi_console_file_new, mi_console_set_raw): Delete.
15447 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15448 (mi_set_logging): Use delete and tee_file. Adjust.
15449 * mi/mi-main.c (output_register): Use string_file.
15450 (mi_cmd_data_evaluate_expression): Use string_file.
15451 (mi_cmd_data_read_memory): Use string_file.
15452 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15453 * mi/mi-out.c (mi_ui_out::main_stream): New.
15454 (mi_ui_out::rewind): Use main_stream and
15455 string_file.
15456 (mi_ui_out::put): Use main_stream and string_file.
15457 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15458 Allocate a 'string_file' instead.
15459 (mi_out_new): Don't allocate a mem_fileopen stream here.
15460 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15461 (mi_ui_out::main_stream): Declare method.
15462 * printcmd.c (eval_command): Use string_file.
15463 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15464 * python/py-arch.c (archpy_disassemble): Use string_file.
15465 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15466 * python/py-frame.c (frapy_str): Use string_file.
15467 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15468 Use string_file.
15469 * python/py-type.c (typy_str): Use string_file.
15470 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15471 * python/py-value.c (valpy_str): Use string_file.
15472 * record-btrace.c (btrace_insn_history): Use string_file.
15473 * regcache.c (regcache_print): Use stdio_file.
15474 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15475 * remote.c (escape_buffer): Use string_file.
15476 * rust-lang.c (rust_get_disr_info): Use string_file.
15477 * serial.c (serial_open_ops_1): Use stdio_file.
15478 (do_serial_close): Use delete.
15479 * stack.c (print_frame_arg): Use string_file.
15480 (print_frame_args): Remove local mem_fileopen stream, not used.
15481 (print_frame): Use string_file.
15482 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15483 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15484 Take a 'string_file *' instead of a 'ui_file *'.
15485 * top.c (new_ui): Use stdio_file and stderr_file.
15486 (free_ui): Use delete.
15487 (execute_command_to_string): Use string_file.
15488 (quit_confirm): Use string_file.
15489 * tracepoint.c (collection_list::append_exp): Use string_file.
15490 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15491 * tui/tui-file.c: Don't include "ui-file.h".
15492 (enum streamtype, struct tui_stream): Delete.
15493 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15494 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15495 (tui_file::tui_file): New method.
15496 (tui_file_fputs): Delete.
15497 (tui_file_get_strbuf): Delete.
15498 (tui_file::puts): New method.
15499 (tui_file_adjust_strbuf): Delete.
15500 (tui_file_flush): Delete.
15501 (tui_file::flush): New method.
15502 * tui/tui-file.h: Tweak intro comment.
15503 Include ui-file.h.
15504 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15505 (tui_file_adjust_strbuf): Delete declarations.
15506 (class tui_file): New class.
15507 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15508 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15509 (tui_register_format): Use string_stream.
15510 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15511 (tui_get_function_from_frame): Use string_file.
15512 * typeprint.c (type_to_string): Use string_file.
15513 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15514 (null_stream): New global.
15515 (ui_file_delete): Delete.
15516 (ui_file::ui_file): New.
15517 (null_file_isatty): Delete.
15518 (ui_file::~ui_file): New.
15519 (null_file_rewind): Delete.
15520 (ui_file::printf): New.
15521 (null_file_put): Delete.
15522 (null_file_flush): Delete.
15523 (ui_file::putstr): New.
15524 (null_file_write): Delete.
15525 (ui_file::putstrn): New.
15526 (null_file_read): Delete.
15527 (ui_file::putc): New.
15528 (null_file_fputs): Delete.
15529 (null_file_write_async_safe): Delete.
15530 (ui_file::vprintf): New.
15531 (null_file_delete): Delete.
15532 (null_file::write): New.
15533 (null_file_fseek): Delete.
15534 (null_file::puts): New.
15535 (ui_file_data): Delete.
15536 (null_file::write_async_safe): New.
15537 (gdb_flush, ui_file_isatty): Adjust.
15538 (ui_file_put, ui_file_rewind): Delete.
15539 (ui_file_write): Adjust.
15540 (ui_file_write_for_put): Delete.
15541 (ui_file_write_async_safe, ui_file_read): Adjust.
15542 (ui_file_fseek): Delete.
15543 (fputs_unfiltered): Adjust.
15544 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15545 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15546 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15547 (set_ui_file_data): Delete.
15548 (string_file::~string_file, string_file::write)
15549 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15550 (do_ui_file_as_string, ui_file_as_string): Delete.
15551 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15552 (struct mem_file): Delete.
15553 (mem_file_new): Delete.
15554 (stdio_file::stdio_file): New.
15555 (mem_file_delete): Delete.
15556 (stdio_file::stdio_file): New.
15557 (mem_fileopen): Delete.
15558 (stdio_file::~stdio_file): New.
15559 (mem_file_rewind): Delete.
15560 (stdio_file::set_stream): New.
15561 (mem_file_put): Delete.
15562 (stdio_file::open): New.
15563 (mem_file_write): Delete.
15564 (stdio_file_magic, struct stdio_file): Delete.
15565 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15566 (stdio_file::flush): New.
15567 (stdio_file_read): Rename to ...
15568 (stdio_file::read): ... this. Adjust.
15569 (stdio_file_write): Rename to ...
15570 (stdio_file::write): ... this. Adjust.
15571 (stdio_file_write_async_safe): Rename to ...
15572 (stdio_file::write_async_safe) ... this. Adjust.
15573 (stdio_file_fputs): Rename to ...
15574 (stdio_file::puts) ... this. Adjust.
15575 (stdio_file_isatty): Delete.
15576 (stdio_file_fseek): Delete.
15577 (stdio_file::isatty): New.
15578 (stderr_file_write): Rename to ...
15579 (stderr_file::write) ... this. Adjust.
15580 (stderr_file_fputs): Rename to ...
15581 (stderr_file::puts) ... this. Adjust.
15582 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15583 (stderr_file::stderr_file): New.
15584 (tee_file_magic): Delete.
15585 (struct tee_file): Delete.
15586 (tee_file::tee_file): New.
15587 (tee_file_new): Delete.
15588 (tee_file::~tee_file): New.
15589 (tee_file_delete): Delete.
15590 (tee_file_flush): Rename to ...
15591 (tee_file::flush): ... this. Adjust.
15592 (tee_file_write): Rename to ...
15593 (tee_file::write): ... this. Adjust.
15594 (tee_file::write_async_safe): New.
15595 (tee_file_fputs): Rename to ...
15596 (tee_file::puts): ... this. Adjust.
15597 (tee_file_isatty): Rename to ...
15598 (tee_file::isatty): ... this. Adjust.
15599 * ui-file.h (struct obstack, struct ui_file): Don't
15600 forward-declare.
15601 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15602 (ui_file_write_ftype)
15603 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15604 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15605 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15606 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15607 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15608 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15609 (set_ui_file_fseek): Delete.
15610 (ui_file_data, ui_file_delete, ui_file_rewind)
15611 (struct ui_file): New.
15612 (ui_file_up): New.
15613 (class null_file): New.
15614 (null_stream): Declare.
15615 (ui_file_write_for_put, ui_file_put): Delete.
15616 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15617 Delete.
15618 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15619 (gdb_fopen, tee_file_new): Delete.
15620 (struct string_file): New.
15621 (struct stdio_file): New.
15622 (stdio_file_up): New.
15623 (struct stderr_file): New.
15624 (class tee_file): New.
15625 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15626 of a 'ui_file *'. Adjust.
15627 * ui-out.h (class ui_out) <field_stream>: Likewise.
15628 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15629 (null_stream): Delete.
15630 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15631 Adjust.
15632 * utils.h (struct ui_file): Delete forward declaration..
15633 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15634 (error_stream): Take a 'string_file &' instead of a
15635 'ui_file *'.
15636 * varobj.c (varobj_value_get_print_value): Use string_file.
15637 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15638 * gdbarch.c: Regenerate.
15639
15640 2017-02-02 Pedro Alves <palves@redhat.com>
15641
15642 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15643 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15644 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15645 Adjust to call gdb_print_insn instead of
15646 gdb_disassembler::print_insn.
15647 (dump_insns, do_mixed_source_and_assembly_deprecated)
15648 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15649 'gdbarch' parameter. Remove gdb_disassembler parameter.
15650 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15651 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15652 declaration.
15653 (gdb_pretty_print_insn): Re-add declaration.
15654 * record-btrace.c (btrace_insn_history): Don't allocate a
15655 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15656
15657 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15658
15659 * disasm.h (gdb_disassembly): Remove file_string parameter.
15660 * disasm.c (gdb_disassembly): Likewise.
15661 * cli/cli-cmds.c (print_disassembly): Adapt.
15662 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15663 * stack.c (do_gdb_disassembly): Likewise.
15664
15665 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15666
15667 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15668 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15669 targets. And if the implicit value is longer than needed, extract
15670 the first bytes instead of the "least significant" ones.
15671
15672 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15673
15674 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15675 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15676 (btrace_fetch): Assert can_access_registers_ptid.
15677 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15678 validate_registers_access.
15679
15680 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15681
15682 * gdbthread.h (can_access_registers_ptid): New.
15683 * thread.c (can_access_registers_ptid): New.
15684
15685 2017-02-01 Pedro Alves <palves@redhat.com>
15686
15687 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15688
15689 2017-01-31 Pedro Alves <palves@redhat.com>
15690
15691 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15692 Fix typos.
15693
15694 2017-01-31 Pedro Alves <palves@redhat.com>
15695
15696 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15697 not used.
15698
15699 2017-01-31 Pedro Alves <palves@redhat.com>
15700
15701 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15702
15703 2017-01-31 Pedro Alves <palves@redhat.com>
15704
15705 * common/scoped_restore.h
15706 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15707 change the value's parameter type to T2.
15708 (make_scoped_restore): Likewise.
15709
15710 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15711 Richard Henderson <rth@redhat.com>
15712
15713 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15714 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15715 GS_BASE for older kernels.
15716 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15717 GS_BASE for older kernels.
15718 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15719 and GS_BASE to the offset table.
15720 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15721 system register group.
15722 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15723 for older kernels.
15724 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15725 amd64 ABI.
15726 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15727 AMD64_GSBASE_REGNUM.
15728 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15729 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15730 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15731 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15732 i386/64bit-segments.xml in those rules.
15733 * features/i386/64bit-segments.xml: New file.
15734 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15735 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15736 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15737 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15738 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15739 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15740 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15741 * features/i386/amd64-avx-linux.c: Regenerated.
15742 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15743 * features/i386/amd64-avx-mpx.c: Regenerated.
15744 * features/i386/amd64-avx512-linux.c: Regenerated.
15745 * features/i386/amd64-linux.c: Regenerated.
15746 * features/i386/amd64-mpx-linux.c: Regenerated.
15747 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15748 * features/i386/i386-avx-mpx.c: Regenerated.
15749 * features/i386/x32-avx-linux.c: Regenerated.
15750 * features/i386/x32-avx512-linux.c: Regenerated.
15751 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15752 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15753 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15754 * regformats/i386/amd64-linux.dat: Regenerated.
15755 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15756 * regformats/i386/x32-avx-linux.dat: Regenerated.
15757 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15758 * regformats/i386/x32-linux.dat: Regenerated.
15759
15760 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15761
15762 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15763 Set to AMD64_NUM_REGS.
15764
15765 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15766
15767 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15768 that checks validity of a register number.
15769
15770 2017-01-27 Kees Cook <keescook@google.com>
15771
15772 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15773 fetch_fpregs if target has fpa registers.
15774 (arm_linux_store_inferior_registers): Call store_fpregs if target
15775 has fpa registers.
15776
15777 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15778
15779 * cris-tdep.c (cris_gdbarch_init): Remove check for
15780 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15781
15782 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15783
15784 * corelow.c (get_core_register_section): Check for regset
15785 existence before checking for REGSET_VARIABLE_SIZE.
15786
15787 2017-01-26 Yao Qi <yao.qi@linaro.org>
15788 Pedro Alves <palves@redhat.com>
15789
15790 PR gdb/20939
15791 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15792 call memory_error, save memaddr instead.
15793 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15794 negative, cal memory_error.
15795 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15796
15797 2017-01-26 Yao Qi <yao.qi@linaro.org>
15798
15799 * disasm-selftests.c (memory_error_test): New function.
15800 (_initialize_disasm_selftests): Register memory_error_test.
15801
15802 2017-01-26 Yao Qi <yao.qi@linaro.org>
15803
15804 * Makefile.in (SFILES): Add disasm-selftests.c and
15805 selftest-arch.c.
15806 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15807 * disasm-selftests.c: New file.
15808 * selftest-arch.c: New file.
15809 * selftest-arch.h: New file.
15810
15811 2017-01-26 Yao Qi <yao.qi@linaro.org>
15812
15813 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15814 to bfd_arch_mep. Don't return 0 if section is not
15815 found. Call print_insn_mep.
15816
15817 2017-01-26 Pedro Alves <palves@redhat.com>
15818 Yao Qi <yao.qi@linaro.org>
15819
15820 * arm-tdep.c: Include "disasm.h".
15821 (gdb_print_insn_arm): Update code to get gdbarch.
15822 * disasm.c (dis_asm_read_memory): Change it to
15823 gdb_disassembler::dis_asm_read_memory.
15824 (dis_asm_memory_error): Likewise.
15825 (dis_asm_print_address): Likewise.
15826 (gdb_pretty_print_insn): Change it to
15827 gdb_disassembler::pretty_print_insn.
15828 (dump_insns): Add one argument gdb_disassemlber. All
15829 callers updated.
15830 (do_mixed_source_and_assembly_deprecated): Likewise.
15831 (do_mixed_source_and_assembly): Likewise.
15832 (do_assembly_only): Likewise.
15833 (gdb_disassembler::gdb_disassembler): New.
15834 (gdb_disassembler::print_insn): New.
15835 * disasm.h (class gdb_disassembler): New.
15836 (gdb_pretty_print_insn): Remove declaration.
15837 (gdb_disassemble_info): Likewise.
15838 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15839 (gdbscm_disasm_read_memory_worker): Update.
15840 (gdbscm_disasm_read_memory): Update.
15841 (gdbscm_disasm_memory_error): Remove.
15842 (gdbscm_disasm_print_address): Remove.
15843 (gdbscm_disassembler::gdbscm_disassembler): New.
15844 (gdbscm_print_insn_from_port): Update.
15845 * mips-tdep.c: Include disasm.h.
15846 (gdb_print_insn_mips): Update code to get gdbarch.
15847 * record-btrace.c (btrace_insn_history): Update.
15848 * spu-tdep.c: Include disasm.h.
15849 (struct spu_dis_asm_data): Remove.
15850 (struct spu_dis_asm_info): New.
15851 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15852 SPU id.
15853 (gdb_print_insn_spu): Cast disassemble_info to
15854 spu_dis_asm_info.
15855
15856 2017-01-26 Yao Qi <yao.qi@linaro.org>
15857
15858 * disasm.c (do_ui_file_delete): Delete.
15859 (gdb_insn_length): Move code creating stream to ...
15860 * utils.c (null_stream): ... here. New function.
15861 * utils.h (null_stream): Declare.
15862
15863 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15864
15865 * python/py-inferior.c (find_thread_object): Return directly
15866 from the loop. Remove "found" variable.
15867
15868 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15869
15870 GDB 7.12.1 released.
15871
15872 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15873
15874 * python/py-function.c (fnpy_call): Reorder declarations to have
15875 the gdbpy_enter object declared first.
15876 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15877
15878 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15879
15880 PR python/21068
15881 * python/python-internal.h (PyMem_RawMalloc): Define for
15882 Python < 3.4.
15883 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15884 PyMem_RawMalloc instead of PyMem_Malloc.
15885
15886 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15887 Luis Machado <lgustavo@codesourcery.com>
15888
15889 * NEWS (New commands): Mention flash-erase.
15890 (New MI commands): Mention target-flash-erase.
15891 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15892 command.
15893 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15894 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15895 * target.c (flash_erase_command): New function.
15896 (initialize_targets): Add new flash-erase command.
15897 * target.h (flash_erase_command): New declaration.
15898
15899 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15900
15901 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15902 HAVE_SYS_PROCFS_H is defined.
15903
15904 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15905
15906 * remote.c (struct cached_reg): Change data into a pointer.
15907 * (stop_reply_dtr): Free data pointers before deleting vector.
15908 (process_stop_reply): Likewise.
15909 (remote_parse_stop_reply): Allocate space for data
15910
15911 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15912
15913 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15914 MAX_REGISTER_SIZE.
15915 (amd64_pseudo_register_read_value): Likewise.
15916 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15917 (store_register_using_P): Likewise.
15918 * regcache.c (regcache_xfer_part): Likewise.
15919
15920 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15921
15922 Split real and pseudo registers.
15923 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15924 (sparc32_pseudo_regnum): New enum.
15925 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15926 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15927 (SPARC32_CP0_REGISTERS): New macro.
15928 (sparc32_pseudo_register_name): New function.
15929 (sparc32_register_name): Use sparc32_pseudo_register_name.
15930 (sparc32_pseudo_register_type): New function.
15931 (sparc32_register_type): Use sparc32_pseudo_register_type.
15932 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15933 pseudo register numbers.
15934 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15935 (SPARC64_CP0_REGISTERS): New macro.
15936 (sparc64_pseudo_register_name): New function.
15937 (sparc64_register_name): Use sparc64_pseudo_register_name.
15938 (sparc64_pseudo_register_type): New function.
15939 (sparc64_register_type): Use sparc64_pseudo_register_type.
15940 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15941 pseudo register numbers.
15942 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15943 sparc64_store_arguments): Handle pseudo register numbers.
15944
15945 2017-01-13 Yao Qi <yao.qi@linaro.org>
15946
15947 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15948 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15949 output.
15950 (getpkt_or_notif_sane_1): Likewise.
15951
15952 2017-01-13 Yao Qi <yao.qi@linaro.org>
15953
15954 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15955 of CC. Pass "-x c++-header" instead of "-x c".
15956
15957 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15958
15959 * remote.c (remote_can_async_p): Update comment.
15960
15961 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15962
15963 * linux-nat.c (linux_nat_can_async_p): Update comment.
15964
15965 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15966
15967 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15968
15969 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15970
15971 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15972
15973 2017-01-10 Tom Tromey <tom@tromey.com>
15974
15975 * python/py-type.c (typy_legacy_template_argument): Update.
15976 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15977 ~demangle_parse_info): Declare new members.
15978 (cp_demangled_name_to_comp): Return unique_ptr.
15979 (cp_demangled_name_parse_free)
15980 (make_cleanup_cp_demangled_name_parse_free)
15981 (cp_new_demangle_parse_info): Remove.
15982 * cp-support.c (do_demangled_name_parse_free_cleanup)
15983 (make_cleanup_cp_demangled_name_parse_free): Remove.
15984 (inspect_type, cp_canonicalize_string_full)
15985 (cp_canonicalize_string): Update.
15986 (mangled_name_to_comp): Change return type.
15987 (cp_class_name_from_physname, method_name_from_physname)
15988 (cp_func_name, cp_remove_params): Update.
15989 * cp-name-parser.y (demangle_parse_info): New constructor, from
15990 cp_new_demangle_parse_info.
15991 (~demangle_parse_info): New destructor, from
15992 cp_demangled_name_parse_free.
15993 (cp_merge_demangle_parse_infos): Update.
15994 (cp_demangled_name_to_comp): Change return type.
15995
15996 2017-01-10 Tom Tromey <tom@tromey.com>
15997
15998 * top.c (prevent_dont_repeat): Change return type.
15999 * python/python.c (execute_gdb_command): Use std::string.
16000 Update.
16001 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16002 * command.h (prevent_dont_repeat): Change return type.
16003 * breakpoint.c (bpstat_do_actions_1): Update.
16004
16005 2017-01-10 Tom Tromey <tom@tromey.com>
16006
16007 * value.h (scoped_value_mark::~scoped_value_mark): Call
16008 free_to_mark.
16009 (scoped_value_mark::free_to_mark): New method.
16010 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16011 scoped_value_mark.
16012
16013 2017-01-10 Tom Tromey <tom@tromey.com>
16014
16015 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16016 (valpy_reference_value, valpy_const_value, valpy_get_address)
16017 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16018 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16019 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16020 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16021 scoped_value_mark.
16022 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16023 * value.h (scoped_value_mark): New class.
16024
16025 2017-01-10 Tom Tromey <tom@tromey.com>
16026
16027 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16028 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16029 * psymtab.c (discard_psymtabs_upto): Remove.
16030 (make_cleanup_discard_psymtabs): Remove.
16031 (struct psymtab_state): Remove.
16032
16033 2017-01-10 Tom Tromey <tom@tromey.com>
16034
16035 * record-full.c (record_full_save_cleanups): Remove.
16036 (record_full_save): Use gdb::unlinker.
16037 * gcore.c (do_bfd_delete_cleanup): Remove.
16038 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16039 cleanups.
16040 * dwarf2read.c (unlink_if_set): Remove.
16041 (write_psymtabs_to_index): Use gdb::unlinker.
16042 * common/gdb_unlinker.h: New file.
16043
16044 2017-01-10 Tom Tromey <tom@tromey.com>
16045
16046 * windows-tdep.c (windows_xfer_shared_library): Update.
16047 * windows-nat.c (windows_make_so): Update.
16048 * utils.h (make_cleanup_bfd_unref): Remove.
16049 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16050 * symfile.h (symfile_bfd_open)
16051 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16052 * symfile.c (read_symbols, symbol_file_add)
16053 (separate_debug_file_exists): Update.
16054 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16055 (generic_load, reread_symbols): Update.
16056 * symfile-mem.c (symbol_file_add_from_memory): Update.
16057 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16058 (spu_symbol_file_add_from_memory): Update.
16059 * solist.h (struct target_so_ops) <bfd_open>: Return
16060 gdb_bfd_ref_ptr.
16061 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16062 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16063 gdb_bfd_ref_ptr.
16064 (solib_map_sections, reload_shared_libraries_1): Update.
16065 * solib-svr4.c (enable_break): Update.
16066 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16067 * solib-frv.c (enable_break2): Update.
16068 * solib-dsbt.c (enable_break): Update.
16069 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16070 gdb_bfd_ref_ptr.
16071 (darwin_solib_get_all_image_info_addr_at_init): Update.
16072 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16073 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16074 * record-full.c (record_full_save): Update.
16075 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16076 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16077 * minidebug.c (find_separate_debug_file_in_section): Return
16078 gdb_bfd_ref_ptr.
16079 * machoread.c (macho_add_oso_symfile): Change abfd to
16080 gdb_bfd_ref_ptr.
16081 (macho_symfile_read_all_oso): Update.
16082 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16083 (macho_symfile_read): Update.
16084 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16085 (jit_bfd_try_read_symtab): Update.
16086 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16087 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16088 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16089 gdb_bfd_ref_ptr.
16090 (gdb_bfd_ref_policy): New struct.
16091 (gdb_bfd_ref_ptr): New typedef.
16092 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16093 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16094 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16095 gdb_bfd_ref_ptr.
16096 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16097 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16098 (gcore_command): Update.
16099 * exec.c (exec_file_attach): Update.
16100 * elfread.c (elf_symfile_read): Update.
16101 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16102 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16103 (open_and_init_dwo_file): Update.
16104 (open_dwp_file): Return gdb_bfd_ref_ptr.
16105 (open_and_init_dwp_file): Update.
16106 * corelow.c (core_open): Update.
16107 * compile/compile-object-load.c (compile_object_load): Update.
16108 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16109 * coffread.c (coff_symfile_read): Update.
16110 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16111 gdb_bfd_ref_ptr. Rename.
16112 (dump_bfd_file, restore_command): Update.
16113 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16114 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16115 (find_separate_debug_file_by_buildid): Update.
16116
16117 2017-01-10 Tom Tromey <tom@tromey.com>
16118
16119 * common/gdb_ref_ptr.h: New file.
16120 * python/py-ref.h (struct gdbpy_ref_policy): New.
16121 (gdbpy_ref): Now a typedef.
16122
16123 2017-01-10 Tom Tromey <tom@tromey.com>
16124
16125 * utils.h (make_cleanup_htab_delete): Don't declare.
16126 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16127 Remove.
16128 * linespec.c (decode_compound_collector): Add constructor,
16129 destructor.
16130 (lookup_prefix_sym): Remove cleanup.
16131 (symtab_collector): Add constructor, destructor.
16132 (collect_symtabs_from_filename): Remove cleanup.
16133 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16134 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16135 Use htab_up.
16136 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16137 * dwarf2read.c (dw2_expand_symtabs_matching)
16138 (dw2_map_symbol_filenames, dwarf_decode_macros)
16139 (write_psymtabs_to_index): Use htab_up.
16140 * dwarf2loc.c (func_verify_no_selftailcall)
16141 (call_site_find_chain_1, func_verify_no_selftailcall)
16142 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16143 std::vector, gdb::unique_xmalloc_ptr.
16144 (call_sitep): Remove typedef.
16145 (dwarf2_locexpr_baton_eval): Remove unused variable.
16146
16147 2017-01-10 Tom Tromey <tom@tromey.com>
16148
16149 * python/python-internal.h (make_cleanup_py_decref)
16150 (make_cleanup_py_xdecref): Don't declare.
16151 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16152 (py_xdecref, make_cleanup_py_xdecref): Remove.
16153
16154 2017-01-10 Tom Tromey <tom@tromey.com>
16155
16156 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16157 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16158
16159 2017-01-10 Tom Tromey <tom@tromey.com>
16160
16161 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16162
16163 2017-01-10 Tom Tromey <tom@tromey.com>
16164
16165 * python/py-utils.c (unicode_to_encoded_string)
16166 (python_string_to_target_string)
16167 (python_string_to_target_python_string)
16168 (python_string_to_host_string, gdbpy_obj_to_string)
16169 (get_addr_from_python): Use gdbpy_ref.
16170
16171 2017-01-10 Tom Tromey <tom@tromey.com>
16172
16173 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16174 gdbpy_ref.
16175
16176 2017-01-10 Tom Tromey <tom@tromey.com>
16177
16178 * python/python.c (eval_python_command, gdbpy_decode_line)
16179 (gdbpy_run_events, gdbpy_start_type_printers)
16180 (gdbpy_apply_type_printers): Use gdbpy_ref.
16181
16182 2017-01-10 Tom Tromey <tom@tromey.com>
16183
16184 * python/py-param.c (get_doc_string, compute_enum_values): Use
16185 gdbpy_ref.
16186
16187 2017-01-10 Tom Tromey <tom@tromey.com>
16188
16189 * python/py-inferior.c (find_thread_object, build_inferior_list):
16190 Use gdbpy_ref.
16191
16192 2017-01-10 Tom Tromey <tom@tromey.com>
16193
16194 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16195
16196 2017-01-10 Tom Tromey <tom@tromey.com>
16197
16198 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16199 gdbpy_ref.
16200
16201 2017-01-10 Tom Tromey <tom@tromey.com>
16202
16203 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16204 extra incref.
16205 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16206 Use gdbpy_ref.
16207
16208 2017-01-10 Tom Tromey <tom@tromey.com>
16209
16210 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16211 gdbpy_ref.
16212
16213 2017-01-10 Tom Tromey <tom@tromey.com>
16214
16215 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16216 decref results of PyArg_ParseTupleAndKeywords.
16217
16218 2017-01-10 Tom Tromey <tom@tromey.com>
16219
16220 * python/python.c (python_run_simple_file): Use
16221 unique_xmalloc_ptr, gdbpy_ref.
16222
16223 2017-01-10 Tom Tromey <tom@tromey.com>
16224
16225 * python/py-prettyprint.c (print_stack_unless_memory_error)
16226 (print_string_repr, print_children): Use gdbpy_ref.
16227 (dummy_python_frame): New class.
16228 (dummy_python_frame::dummy_python_frame): Rename from
16229 push_dummy_python_frame.
16230 (py_restore_tstate): Remove.
16231
16232 2017-01-10 Tom Tromey <tom@tromey.com>
16233
16234 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16235
16236 2017-01-10 Tom Tromey <tom@tromey.com>
16237
16238 * python/python.c (ensure_python_env, restore_python_env):
16239 Remove.
16240 * python/python-internal.h (ensure_python_env): Don't declare.
16241 * varobj.h (varobj_ensure_python_env): Don't declare.
16242 * varobj.c (varobj_ensure_python_env): Remove.
16243
16244 2017-01-10 Tom Tromey <tom@tromey.com>
16245
16246 * varobj.c (varobj_value_get_print_value): Use
16247 gdbpy_enter_varobj.
16248
16249 2017-01-10 Tom Tromey <tom@tromey.com>
16250
16251 * python/py-prettyprint.c (print_string_repr, print_children):
16252 Update.
16253 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16254 of "encoding".
16255 * varobj.c (varobj_value_get_print_value): Update.
16256 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16257
16258 2017-01-10 Tom Tromey <tom@tromey.com>
16259
16260 * varobj.c (varobj_get_display_hint)
16261 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16262 (varobj_set_visualizer, free_variable): Use
16263 gdbpy_enter_varobj.
16264
16265 2017-01-10 Tom Tromey <tom@tromey.com>
16266
16267 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16268 (do_finish_initialization): New function. Use gdbpy_ref.
16269 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16270 do_finish_initialization.
16271
16272 2017-01-10 Tom Tromey <tom@tromey.com>
16273
16274 * python/py-param.c (get_set_value, get_show_value): Use
16275 gdbpy_enter, gdbpy_ref.
16276
16277 2017-01-10 Tom Tromey <tom@tromey.com>
16278
16279 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16280
16281 2017-01-10 Tom Tromey <tom@tromey.com>
16282
16283 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16284
16285 2017-01-10 Tom Tromey <tom@tromey.com>
16286
16287 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16288 Use gdbpy_enter_varobj.
16289
16290 2017-01-10 Tom Tromey <tom@tromey.com>
16291
16292 * varobj.c (gdbpy_enter_varobj): New constructor.
16293 * python/python-internal.h (gdbpy_enter_varobj): New class.
16294 * python/py-varobj.c (py_varobj_get_iterator): Use
16295 gdbpy_enter_varobj.
16296
16297 2017-01-10 Tom Tromey <tom@tromey.com>
16298
16299 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16300 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16301 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16302 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16303 unique_xmalloc_ptr.
16304 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16305
16306 2017-01-10 Tom Tromey <tom@tromey.com>
16307
16308 * python/py-xmethods.c (invoke_match_method): Use
16309 gdbpy_ref.
16310
16311 2017-01-10 Tom Tromey <tom@tromey.com>
16312
16313 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16314 gdbpy_enter, gdbpy_ref.
16315
16316 2017-01-10 Tom Tromey <tom@tromey.com>
16317
16318 * python/python.c (python_interactive_command): Use gdbpy_enter.
16319
16320 2017-01-10 Tom Tromey <tom@tromey.com>
16321
16322 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16323 gdbpy_ref.
16324
16325 2017-01-10 Tom Tromey <tom@tromey.com>
16326
16327 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16328 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16329
16330 2017-01-10 Tom Tromey <tom@tromey.com>
16331
16332 * utils.h (htab_deleter): New struct.
16333 (htab_up): New typedef.
16334 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16335 gdbpy_enter, gdbpy_ref, htab_up.
16336
16337 2017-01-10 Tom Tromey <tom@tromey.com>
16338
16339 * python/py-unwind.c (pending_frame_invalidate): Remove.
16340 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16341
16342 2017-01-10 Tom Tromey <tom@tromey.com>
16343
16344 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16345 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16346
16347 2017-01-10 Tom Tromey <tom@tromey.com>
16348
16349 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16350
16351 2017-01-10 Tom Tromey <tom@tromey.com>
16352
16353 * python/python.c (gdbpy_eval_from_control_command)
16354 (gdbpy_source_script, gdbpy_run_events)
16355 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16356 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16357 gdbpy_enter.
16358
16359 2017-01-10 Tom Tromey <tom@tromey.com>
16360
16361 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16362
16363 2017-01-10 Tom Tromey <tom@tromey.com>
16364
16365 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16366
16367 2017-01-10 Tom Tromey <tom@tromey.com>
16368
16369 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16370 (python_on_inferior_call_pre, python_on_inferior_call_post)
16371 (python_on_memory_change, python_on_register_change)
16372 (python_inferior_exit, python_new_objfile, add_thread_object)
16373 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16374
16375 2017-01-10 Tom Tromey <tom@tromey.com>
16376
16377 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16378 (bpfinishpy_handle_exit): Use gdbpy_enter.
16379
16380 2017-01-10 Tom Tromey <tom@tromey.com>
16381
16382 * python/py-cmd.c (cmdpy_destroyer)
16383 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16384 gdbpy_enter.
16385
16386 2017-01-10 Tom Tromey <tom@tromey.com>
16387
16388 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16389 gdbpy_enter.
16390 (gdbpy_breakpoint_has_cond): Likewise.
16391
16392 2017-01-10 Tom Tromey <tom@tromey.com>
16393
16394 * python/python.c (gdbpy_enter): New constructor.
16395 (~gdbpy_enter): New destructor.
16396 (restore_python_env, ensure_python_env): Rewrite.
16397 * python/python-internal.h (gdbpy_enter): New class.
16398
16399 2017-01-10 Tom Tromey <tom@tromey.com>
16400
16401 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16402
16403 2017-01-10 Tom Tromey <tom@tromey.com>
16404
16405 * python/py-value.c (value_has_field, get_field_flag)
16406 (get_field_type, valpy_getitem, convert_value_from_python): Use
16407 gdbpy_ref.
16408
16409 2017-01-10 Tom Tromey <tom@tromey.com>
16410
16411 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16412 gdbpy_ref.
16413
16414 2017-01-10 Tom Tromey <tom@tromey.com>
16415
16416 * python/py-prettyprint.c (search_pp_list)
16417 (find_pretty_printer_from_objfiles)
16418 (find_pretty_printer_from_progspace)
16419 (find_pretty_printer_from_gdb, find_pretty_printer)
16420 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16421 gdbpy_ref.
16422
16423 2017-01-10 Tom Tromey <tom@tromey.com>
16424
16425 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16426
16427 2017-01-10 Tom Tromey <tom@tromey.com>
16428
16429 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16430 (ltpy_get_all_source_lines): Use gdbpy_ref.
16431
16432 2017-01-10 Tom Tromey <tom@tromey.com>
16433
16434 * python/py-framefilter.c (extract_sym, extract_value)
16435 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16436 gdbpy_ref.
16437
16438 2017-01-10 Tom Tromey <tom@tromey.com>
16439
16440 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16441
16442 2017-01-10 Tom Tromey <tom@tromey.com>
16443
16444 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16445
16446 2017-01-10 Tom Tromey <tom@tromey.com>
16447
16448 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16449 gdbpy_ref.
16450
16451 2017-01-10 Tom Tromey <tom@tromey.com>
16452
16453 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16454
16455 2017-01-10 Tom Tromey <tom@tromey.com>
16456
16457 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16458 (typy_range): Use gdbpy_ref.
16459
16460 2017-01-10 Tom Tromey <tom@tromey.com>
16461
16462 * python/py-threadevent.c (create_thread_event_object): Use
16463 gdbpy_ref.
16464 * python/py-stopevent.c (create_stop_event_object): Simplify.
16465 (emit_stop_event): Use gdbpy_ref.
16466 * python/py-signalevent.c (create_signal_event_object): Use
16467 gdbpy_ref.
16468 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16469 (emit_new_objfile_event, create_clear_objfiles_event_object)
16470 (emit_clear_objfiles_event): Use gdbpy_ref.
16471 * python/py-infevents.c (create_inferior_call_event_object)
16472 (create_register_changed_event_object)
16473 (create_memory_changed_event_object, emit_inferior_call_event)
16474 (emit_memory_changed_event, emit_register_changed_event): Use
16475 gdbpy_ref.
16476 * python/py-exitedevent.c (create_exited_event_object)
16477 (emit_exited_event): Use gdbpy_ref.
16478 * python/py-event.h (evpy_emit_event): Remove
16479 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16480 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16481 * python/py-continueevent.c (emit_continue_event): Use
16482 gdbpy_ref.
16483 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16484 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16485 gdbpy_ref.
16486 * python/py-bpevent.c (create_breakpoint_event_object): Use
16487 gdbpy_ref.
16488
16489 2017-01-10 Tom Tromey <tom@tromey.com>
16490
16491 * python/py-ref.h: New file.
16492
16493 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16494
16495 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16496 void.
16497 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16498 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16499 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16500 * ui-out.c (ui_out::redirect): Likewise.
16501 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16502 * cli/cli-logging.c (set_logging_redirect): Update call site of
16503 ui_out::redirect.
16504 (handle_redirections): Likewise.
16505 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16506 * top.c (execute_command_to_string): Likewise.
16507 * utils.c (do_ui_out_redirect_pop): Likewise.
16508
16509 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16510
16511 * stack.c (_initialize_stack): Update "frame" command help message.
16512
16513 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16514
16515 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16516
16517 2017-01-06 Yao Qi <yao.qi@linaro.org>
16518
16519 * x86-linux-nat.h: Include gdb_proc_service.h.
16520
16521 2017-01-06 Yao Qi <yao.qi@linaro.org>
16522
16523 * ser-base.h: Include serial.h.
16524
16525 2017-01-06 Yao Qi <yao.qi@linaro.org>
16526
16527 * ppc-linux-tdep.h: Include ppc-tdep.h.
16528
16529 2017-01-06 Yao Qi <yao.qi@linaro.org>
16530
16531 * nat/amd64-linux-siginfo.h: Include signal.h.
16532
16533 2017-01-06 Yao Qi <yao.qi@linaro.org>
16534
16535 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16536
16537 2017-01-06 Yao Qi <yao.qi@linaro.org>
16538
16539 * mi/mi-parse.h: Include mi-cmds.h.
16540
16541 2017-01-06 Yao Qi <yao.qi@linaro.org>
16542
16543 * inf-loop.c: Don't include "target.h".
16544 * inf-loop.h: Include it here.
16545
16546 2017-01-06 Yao Qi <yao.qi@linaro.org>
16547
16548 * dfp.h: Include "dboulest.h" and "expression.h".
16549
16550 2017-01-06 Yao Qi <yao.qi@linaro.org>
16551
16552 * ax-gdb.h: Include "ax.h".
16553
16554 2017-01-06 Yao Qi <yao.qi@linaro.org>
16555
16556 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16557 with nat/gdb_ptrace.h.
16558
16559 2017-01-05 Yao Qi <yao.qi@linaro.org>
16560
16561 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16562 new line.
16563 (mips64_fbsd_sigframe_init): Likewise.
16564
16565 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16566
16567 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16568 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16569
16570 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16571
16572 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16573 * NEWS: Mention new FreeBSD/mips native configuration.
16574 * config/mips/fbsd.mh: New file.
16575 * configure.host: Add mips*-*-freebsd*.
16576 * mips-fbsd-nat.c: New file.
16577
16578 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16579
16580 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16581 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16582 * NEWS: Mention new FreeBSD/mips target.
16583 * configure.tgt: Add mips*-*-freebsd*.
16584 * mips-fbsd-tdep.c: New file.
16585 * mips-fbsd-tdep.h: New file.
16586
16587 2017-01-04 Yao Qi <yao.qi@linaro.org>
16588
16589 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16590 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16591
16592 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16593
16594 Update copyright year range in all GDB files.
16595
16596 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16597
16598 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16599
16600 For older changes see ChangeLog-2016.
16601 \f
16602 Local Variables:
16603 mode: change-log
16604 left-margin: 8
16605 fill-column: 74
16606 version-control: never
16607 coding: utf-8
16608 End:
This page took 0.355059 seconds and 5 git commands to generate.