]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
4cf7853cad75f560c6573f8637bcfe6b71c43718
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2
3 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
4 * arch/aarch64.c (aarch64_create_target_description): Create
5 new target description.
6 * features/Makefile: Add new files.
7 * features/aarch64.c: Remove file.
8 * features/aarch64-core.c: New autogenerated file.
9 * features/aarch64-fpu.c: New autogenerated file.
10 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
11
12 2017-11-24 Alan Hayward <alan.hayward@arm.com>
13
14 * Makefile.in: Add new files.
15 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
16 aarch64_read_description.
17 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
18 Call aarch64_read_description.
19 * aarch64-tdep.c (aarch64_read_description): New function.
20 (aarch64_gdbarch_init): Call aarch64_read_description.
21 * aarch64-tdep.h (aarch64_read_description): New function.
22 * arch/aarch64.c: New file.
23 * configure.tgt: Add new files.
24
25 2017-11-24 Yao Qi <yao.qi@linaro.org>
26
27 * mi/mi-main.c (register_changed_p): Update.
28 * value.c (value_contents_bits_eq): Change return type.
29 (value_contents_eq): Likewise.
30 * value.h: Update comments.
31
32 2017-11-24 Yao Qi <yao.qi@linaro.org>
33
34 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
35 local 'changed'. Remove error.
36 (register_changed_p): Change return type to bool.
37
38 2017-11-24 Yao Qi <yao.qi@linaro.org>
39
40 * arch/tic6x.c: New file.
41 * arch/tic6x.h: New file.
42 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
43 tic6x-core.xml and tic6x-gp.xml.
44 * features/tic6x-c6xp.c: Generated.
45 * features/tic6x-core.c: Generated.
46 * features/tic6x-gp.c: Generated.
47 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
48 "tic6x-".
49
50 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
51
52 * mi/mi-main.c (list_available_thread_groups): Change map value
53 type to std::vector.
54
55 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
56
57 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
58
59 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
60
61 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
62 back to...
63 <children_requested>: ... this.
64 (varobj_get_num_children, varobj_update): Adjust.
65
66 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
67
68 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
69 (ada_value_has_mutated): Likewise.
70 * c-varobj.c (varobj_is_anonymous_child): Likewise.
71 (c_is_path_expr_parent): Likewise.
72 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
73 (mi_cmd_var_set_frozen): Likewise.
74 (mi_cmd_var_update_iter): Likewise.
75 (mi_cmd_var_update): Likewise.
76 * varobj.c (pretty_printing): Likewise.
77 (varobj_enable_pretty_printing): Likewise.
78 (struct varobj_root) <floating, is_valid>: Likewise.
79 (struct varobj_dynamic) <children_requested>: Likewise.
80 (delete_variable): Likewise.
81 (delete_variable_1): Likewise.
82 (install_variable): Likewise.
83 (update_type_if_necessary): Likewise.
84 (install_new_value): Likewise.
85 (value_of_root): Likewise.
86 (is_root_p): Likewise.
87 (varobj_create): Likewise.
88 (varobj_delete): Likewise.
89 (varobj_has_more): Likewise.
90 (varobj_set_frozen): Likewise.
91 (varobj_get_frozen): Likewise.
92 (install_dynamic_child): Likewise.
93 (dynamic_varobj_has_child_method): Likewise.
94 (update_dynamic_varobj_children): Likewise.
95 (varobj_get_num_children): Likewise.
96 (varobj_list_children): Likewise.
97 (is_path_expr_parent): Likewise.
98 (varobj_default_is_path_expr_parent): Likewise.
99 (varobj_is_dynamic_p): Likewise.
100 (varobj_set_value): Likewise.
101 (varobj_value_has_mutated): Likewise.
102 (varobj_update): Likewise.
103 (check_scope): Likewise.
104 (value_of_root_1): Likewise.
105 (varobj_value_get_print_value): Likewise.
106 (varobj_editable_p): Likewise.
107 (varobj_value_is_changeable_p): Likewise.
108 (varobj_floating_p): Likewise.
109 (varobj_default_value_is_changeable_p): Likewise.
110 (varobj_invalidate_iter): Likewise.
111 * varobj.h (struct varobj_update_result) <type_changed,
112 children_changed, changed, value_installed>: Likewise.
113 (struct varobj) <updated, frozen, not_fetched>: Likewise.
114 (struct lang_varobj_ops) <value_is_changeable_p,
115 value_has_mutated, is_path_expr_parent>: Likewise.
116 (varobj_delete): Likewise.
117 (varobj_set_frozen): Likewise.
118 (varobj_get_frozen): Likewise.
119 (varobj_set_value): Likewise.
120 (varobj_update): Likewise.
121 (varobj_editable_p): Likewise.
122 (varobj_floating_p): Likewise.
123 (varobj_has_more): Likewise.
124 (varobj_is_dynamic_p): Likewise.
125 (varobj_default_value_is_changeable_p): Likewise.
126 (varobj_value_is_changeable_p): Likewise.
127 (varobj_is_anonymous_child): Likewise.
128 (varobj_default_is_path_expr_parent): Likewise.
129
130 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
131
132 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
133 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
134 <type_str>: Convert to 'std::string'.
135 <expr>: Convert to 'expression_up'.
136 (dtrace_probe_arg_s): Delete type and VEC.
137 (dtrace_probe_enabler_s): Likewise.
138 (struct dtrace_probe): Replace by...
139 (class dtrace_static_probe_ops): ...this and...
140 (class dtrace_probe): ...this.
141 (dtrace_probe_is_linespec): Rename to...
142 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
143 to reflect change.
144 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
145 Adjust code. Create new instance of 'dtrace_probe'.
146 (dtrace_build_arg_exprs): Rename to...
147 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
148 reflect change.
149 (dtrace_get_probes): Rename to...
150 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
151 to reflect change.
152 (dtrace_get_arg): Rename to...
153 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
154 reflect change.
155 (dtrace_probe_is_enabled): Rename to...
156 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
157 change.
158 (dtrace_get_probe_address): Rename to...
159 (dtrace_probe::get_relocated_address): ...this. Adjust code
160 to reflect change.
161 (dtrace_get_probe_argument_count): Rename to...
162 (dtrace_probe::get_argument_count): ...this. Adjust code to
163 reflect change.
164 (dtrace_can_evaluate_probe_arguments): Rename to...
165 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
166 to reflect change.
167 (dtrace_evaluate_probe_argument): Rename to...
168 (dtrace_probe::evaluate_argument): ...this. Adjust code to
169 reflect change.
170 (dtrace_compile_to_ax): Rename to...
171 (dtrace_probe::compile_to_ax): ...this. Adjust code to
172 reflect change.
173 (dtrace_probe_destroy): Delete.
174 (dtrace_type_name): Rename to...
175 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
176 reflect change.
177 (dtrace_probe::get_static_ops): New method.
178 (dtrace_gen_info_probes_table_header): Rename to...
179 (dtrace_static_probe_ops::gen_info_probes_table_header):
180 ...this. Adjust code to reflect change.
181 (dtrace_gen_info_probes_table_values): Rename to...
182 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
183 code to reflect change.
184 (dtrace_enable_probe): Rename to...
185 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
186 change.
187 (dtrace_disable_probe): Rename to...
188 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
189 change.
190 (struct probe_ops dtrace_probe_ops): Delete.
191 (info_probes_dtrace_command): Call 'info_probes_for_spops'
192 instead of 'info_probes_for_ops'.
193 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
194 of 'all_probe_ops'.
195
196 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
197 Simon Marchi <simark@simark.ca>
198
199 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
200 variable.
201 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
202 <aexpr>: Change type to 'expression_up'.
203 (stap_probe_arg_s): Delete type and VEC.
204 (struct stap_probe): Delete. Replace by...
205 (class stap_static_probe_ops): ...this and...
206 (class stap_probe): ...this. Rename variables to add 'm_'
207 prefix. Do not use 'union' for arguments anymore.
208 (stap_get_expected_argument_type): Receive probe name instead
209 of 'struct stap_probe'. Adjust code.
210 (stap_parse_probe_arguments): Rename to...
211 (stap_probe::parse_arguments): ...this. Adjust code to
212 reflect change.
213 (stap_get_probe_address): Rename to...
214 (stap_probe::get_relocated_address): ...this. Adjust code
215 to reflect change.
216 (stap_get_probe_argument_count): Rename to...
217 (stap_probe::get_argument_count): ...this. Adjust code
218 to reflect change.
219 (stap_get_arg): Rename to...
220 (stap_probe::get_arg_by_number'): ...this. Adjust code to
221 reflect change.
222 (can_evaluate_probe_arguments): Rename to...
223 (stap_probe::can_evaluate_arguments): ...this. Adjust code
224 to reflect change.
225 (stap_evaluate_probe_argument): Rename to...
226 (stap_probe::evaluate_argument): ...this. Adjust code
227 to reflect change.
228 (stap_compile_to_ax): Rename to...
229 (stap_probe::compile_to_ax): ...this. Adjust code to
230 reflect change.
231 (stap_probe_destroy): Delete.
232 (stap_modify_semaphore): Adjust comment.
233 (stap_set_semaphore): Rename to...
234 (stap_probe::set_semaphore): ...this. Adjust code to reflect
235 change.
236 (stap_clear_semaphore): Rename to...
237 (stap_probe::clear_semaphore): ...this. Adjust code to
238 reflect change.
239 (stap_probe::get_static_ops): New method.
240 (handle_stap_probe): Adjust code to create instance of
241 'stap_probe'.
242 (stap_get_probes): Rename to...
243 (stap_static_probe_ops::get_probes): ...this. Adjust code to
244 reflect change.
245 (stap_probe_is_linespec): Rename to...
246 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
247 reflect change.
248 (stap_type_name): Rename to...
249 (stap_static_probe_ops::type_name): ...this. Adjust code to
250 reflect change.
251 (stap_gen_info_probes_table_header): Rename to...
252 (stap_static_probe_ops::gen_info_probes_table_header):
253 ...this. Adjust code to reflect change.
254 (stap_gen_info_probes_table_values): Rename to...
255 (stap_probe::gen_info_probes_table_values): ...this. Adjust
256 code to reflect change.
257 (struct probe_ops stap_probe_ops): Delete.
258 (info_probes_stap_command): Use 'info_probes_for_spops'
259 instead of 'info_probes_for_ops'.
260 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
261 of 'all_probe_ops'.
262
263 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
264
265 * break-catch-throw.c (fetch_probe_arguments): Use
266 'probe.prob' instead of 'probe.probe'.
267 * breakpoint.c (create_longjmp_master_breakpoint): Call
268 'can_evaluate_arguments' and 'get_relocated_address' methods
269 from probe.
270 (create_exception_master_breakpoint): Likewise.
271 (add_location_to_breakpoint): Use 'sal->prob' instead of
272 'sal->probe'.
273 (bkpt_probe_insert_location): Call 'set_semaphore' method from
274 probe.
275 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
276 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
277 of 'probe_ops'.
278 (probe_key_free): Call 'delete' on probe.
279 (check_exception_resume): Use 'probe.prob' instead of
280 'probe.probe'.
281 * location.c (string_to_event_location_basic): Call
282 'probe_linespec_to_static_ops'.
283 * probe.c (class any_static_probe_ops): New class.
284 (any_static_probe_ops any_static_probe_ops): New variable.
285 (parse_probes_in_pspace): Receive 'static_probe_ops' as
286 argument. Adjust code to reflect change.
287 (parse_probes): Use 'static_probe_ops' instead of
288 'probe_ops'. Adjust code to reflect change.
289 (find_probes_in_objfile): Call methods to get name and
290 provider from probe.
291 (find_probe_by_pc): Use 'result.prob' instead of
292 'result.probe'. Call 'get_relocated_address' method from
293 probe.
294 (collect_probes): Adjust comment and argument list to receive
295 'static_probe_ops' instead of 'probe_ops'. Adjust code to
296 reflect change. Call necessary methods from probe.
297 (compare_probes): Call methods to get name and provider from
298 probes.
299 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
300 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
301 adjust code accordingly.
302 (print_ui_out_not_applicables): Likewise.
303 (info_probes_for_ops): Rename to...
304 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
305 as argument instead of 'probe_ops'. Adjust code. Call
306 necessary methods from probe.
307 (info_probes_command): Use 'info_probes_for_spops'.
308 (enable_probes_command): Pass correct argument to
309 'collect_probes'. Call methods from probe.
310 (disable_probes_command): Likewise.
311 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
312 (get_probe_argument_count): Move to
313 'any_static_probe_ops::get_argument_count'.
314 (can_evaluate_probe_arguments): Move to
315 'any_static_probe_ops::can_evaluate_arguments'.
316 (evaluate_probe_argument): Move to
317 'any_static_probe_ops::evaluate_argument'.
318 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
319 'probe.probe'.
320 (probe_linespec_to_ops): Rename to...
321 (probe_linespec_to_static_ops): ...this. Adjust code.
322 (probe_any_is_linespec): Rename to...
323 (any_static_probe_ops::is_linespec): ...this.
324 (probe_any_get_probes): Rename to...
325 (any_static_probe_ops::get_probes): ...this.
326 (any_static_probe_ops::type_name): New method.
327 (any_static_probe_ops::gen_info_probes_table_header): New
328 method.
329 (compute_probe_arg): Use 'pc_probe.prob' instead of
330 'pc_probe.probe'. Call methods from probe.
331 (compile_probe_arg): Likewise.
332 (std::vector<const probe_ops *> all_probe_ops): Delete.
333 (std::vector<const static_probe_ops *> all_static_probe_ops):
334 New variable.
335 (_initialize_probe): Use 'all_static_probe_ops' instead of
336 'all_probe_ops'.
337 * probe.h (struct info_probe_column) <field_name>: Delete
338 extraneous newline
339 (info_probe_column_s): Delete type and VEC.
340 (struct probe_ops): Delete. Replace with...
341 (class static_probe_ops): ...this and...
342 (clas probe): ...this.
343 (struct bound_probe) <bound_probe>: Delete extraneous
344 newline. Adjust constructor to receive 'probe' instead of
345 'struct probe'.
346 <probe>: Rename to...
347 <prob>: ...this. Delete extraneous newline.
348 <objfile>: Delete extraneous newline.
349 (register_probe_ops): Delete unused prototype.
350 (info_probes_for_ops): Rename to...
351 (info_probes_for_spops): ...this. Adjust comment.
352 (get_probe_address): Move to 'probe::get_address'.
353 (get_probe_argument_count): Move to
354 'probe::get_argument_count'.
355 (can_evaluate_probe_arguments): Move to
356 'probe::can_evaluate_arguments'.
357 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
358 * solib-svr4.c (struct svr4_info): Adjust comment.
359 (struct probe_and_action) <probe>: Rename to...
360 <prob>: ...this.
361 (register_solib_event_probe): Receive 'probe' instead of
362 'struct probe' as argument. Use 'prob' instead of 'probe'
363 when applicable.
364 (solib_event_probe_action): Call 'get_argument_count' method
365 from probe. Adjust comment.
366 (svr4_handle_solib_event): Adjust comment. Call
367 'evaluate_argument' method from probe.
368 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
369 from probe.
370 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
371 'struct probe'. Call 'can_evaluate_arguments' from probe.
372 * symfile.h: Forward declare 'class probe' instead of 'struct
373 probe'.
374 * symtab.h: Likewise.
375 (struct symtab_and_line) <probe>: Rename to...
376 <prob>: ...this.
377 * tracepoint.c (start_tracing): Use 'prob' when applicable.
378 Call probe methods.
379 (stop_tracing): Likewise.
380
381 2017-11-22 Joel Brobecker <brobecker@adacore.com>
382
383 * ravenscar-thread.c (ravenscar_inferior_created): Remove
384 trailing newline at end of string in call to warning.
385
386 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
387
388 * osdata.h: Include vector isntead of vec.h.
389 (osdata_column_s): Remove typedef.
390 (struct osdata_column): Add constructor.
391 <name, value>: Change type to std::string.
392 (DEF_VEC_O (osdata_column_s)): Remove.
393 (osdata_item_s): Remove typedef.
394 (struct osdata_item) <columns>: Change type to std::vector.
395 (DEF_VEC_O (osdata_item_s)): Remove.
396 (struct osdata): Add constructor.
397 <type>: Change type to std::string.
398 <items>: Change type to std::vector.
399 (osdata_p): Remove typedef.
400 (DEF_VEC_P (osdata_p)): Remove.
401 (osdata_parse): Return a unique_ptr.
402 (osdata_free): Remove.
403 (make_cleanup_osdata_free): Remove.
404 (get_osdata): Return a unique_ptr.
405 (get_osdata_column): Return pointer to std::string, take a
406 reference to osdata_item as parameter.
407 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
408 unique_ptr.
409 <property_name>: Change type to std::string.
410 (osdata_start_osdata): Allocate osdata with new and adjust.
411 (osdata_start_item): Adjust.
412 (osdata_start_column): Adjust.
413 (osdata_end_column): Adjust.
414 (clear_parsing_data): Remove.
415 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
416 (osdata_item_clear): Remove.
417 (get_osdata): return a unique_ptr and adjust.
418 (get_osdata_column): Return a pointer to std::string and adjust.
419 (info_osdata): Adjust.
420 * mi/mi-main.c: Include <map>.
421 (free_vector_of_osdata_items): Remove.
422 (list_available_thread_groups): Adjust, use std::map instead of
423 splay tree.
424
425 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
426
427 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
428 case in switch.
429
430 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
431
432 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
433
434 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
435
436 * varobj.h (struct varobj_update_result): Add constructor, add
437 move constructor, disable copy and assign, initialize fields.
438 <newobj>: Change type to std::vector.
439 (varobj_update): Return std::vector.
440 * varobj.c (install_dynamic_child): Change VEC parameters to
441 std::vector and adjust.
442 (update_dynamic_varobj_children): Likewise.
443 (varobj_update): Return std::vector and adjust.
444 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
445
446 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
447
448 * varobj.h (struct varobj) <parent>: Remove const.
449 <children>: Change type to std::vector.
450 (varobj_list_children): Return std::vector const reference.
451 (varobj_restrict_range): Change parameter type to std::vector
452 const reference.
453 * varobj.c (varobj_has_more): Adjust.
454 (varobj_restrict_range): Change parameter type to std::vector
455 const reference and adjust.
456 (install_dynamic_child): Adjust.
457 (update_dynamic_varobj_children): Adjust.
458 (varobj_list_children): Return std::vector const reference and
459 adjust.
460 (varobj_add_child): Adjust.
461 (update_type_if_necessary): Adjust.
462 (varobj_update): Adjust.
463 (delete_variable_1): Adjust.
464 * ada-varobj.c (ada_value_has_mutated): Adjust.
465 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
466
467 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
468
469 * varobj.h (struct varobj): Add constructor and destructor,
470 initialize fields.
471 * varobj.c (struct varobj_root): Initialize fields.
472 (struct varobj_dynamic): Initialize fields.
473 (varobj_create): Use unique_ptr instead of cleanup. Create
474 varobj with new instead of new_root_variable.
475 (delete_variable_1): Free variable with delete instead of
476 free_variable.
477 (create_child_with_value): Create variable with new instead of
478 new_variable.
479 (varobj::varobj): New.
480 (varobj::~varobj): New (body mostly coming from free_variable).
481 (new_variable): Remove.
482 (free_variable): Remove.
483 (do_free_variable_cleanup): Remove.
484 (make_cleanup_free_variable): Remove.
485
486 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
487
488 * core-regset.c: Remove file.
489 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
490
491 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
492
493 * NEWS: Document use of GNU MPFR.
494 * README: Likewise.
495
496 * Makefile.in (LIBMPFR): Add define.
497 (CLIBS): Add $(LIBMPFR).
498 * configure.ac: Add --with-mpfr configure option.
499 * configure: Regenerate.
500 * config.in: Regenerate.
501
502 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
503 (class mpfr_float_ops): New type.
504 (mpfr_float_ops::from_target): Two new overloaded functions.
505 (mpfr_float_ops::to_target): Likewise.
506 (mpfr_float_ops::to_string): New function.
507 (mpfr_float_ops::from_string): Likewise.
508 (mpfr_float_ops::to_longest): Likewise.
509 (mpfr_float_ops::from_longest): Likewise.
510 (mpfr_float_ops::from_ulongest): Likewise.
511 (mpfr_float_ops::to_host_double): Likewise.
512 (mpfr_float_ops::from_host_double): Likewise.
513 (mpfr_float_ops::convert): Likewise.
514 (mpfr_float_ops::binop): Likewise.
515 (mpfr_float_ops::compare): Likewise.
516 (get_target_float_ops): Use mpfr_float_ops if available.
517
518 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
519
520 * target-float.c: Do not include <math.h>.
521 Include <cmath> and <limits>.
522 (DOUBLEST): Do not define.
523 (class target_float_ops): New type.
524 (class host_float_ops): New templated type.
525 (class decimal_float_ops): New type.
526
527 (floatformat_to_doublest): Rename to ...
528 (host_float_ops<T>::from_target): ... this. Use template type T
529 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
530 (host_float_ops<T>::from_target): New overload using a type argument.
531 (floatformat_from_doublest): Rename to ...
532 (host_float_ops<T>::to_target): ... this. Use template type T
533 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
534 (host_float_ops<T>::to_target): New overload using a type argument.
535 (floatformat_printf_format): New function.
536 (struct printf_length_modifier): New templated type.
537 (floatformat_to_string): Rename to ...
538 (host_float_ops<T>::to_string): ... this. Use type instead of
539 floatformat argument. Use floatformat_printf_format and
540 printf_length_modifier. Remove special handling of invalid numbers,
541 infinities and NaN (moved to target_float_to_string).
542 (struct scanf_length_modifier): New templated type.
543 (floatformat_from_string): Rename to ...
544 (host_float_ops<T>::from_string): ... this. Use type instead of
545 floatformat argument. Use scanf_length_modifier.
546 (floatformat_to_longest): Rename to ...
547 (host_float_ops<T>::to_longest): ... this. Use type instead of
548 floatformat argument. Handle out-of-range values deterministically.
549 (floatformat_from_longest): Rename to ...
550 (host_float_ops<T>::from_longest): ... this. Use type instead of
551 floatformat argument.
552 (floatformat_from_ulongest): Rename to ...
553 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
554 floatformat argument.
555 (floatformat_to_host_double): Rename to ...
556 (host_float_ops<T>::to_host_double): ... this. Use type instead of
557 floatformat argument.
558 (floatformat_from_host_double): Rename to ...
559 (host_float_ops<T>::from_host_double): ... this. Use type instead of
560 floatformat argument.
561 (floatformat_convert): Rename to ...
562 (host_float_ops<T>::convert): ... this. Use type instead of
563 floatformat arguments. Remove handling of no-op conversions.
564 (floatformat_binop): Rename to ...
565 (host_float_ops<T>::binop): ... this. Use type instead of
566 floatformat arguments.
567 (floatformat_compare): Rename to ...
568 (host_float_ops<T>::compare): ... this. Use type instead of
569 floatformat arguments.
570
571 (match_endianness): Use type instead of length/byte_order arguments.
572 (set_decnumber_context): Likewise.
573 (decimal_from_number): Likewise. Update calls.
574 (decimal_to_number): Likewise.
575 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
576 (decimal_float_ops::to_host_double): New dummy function.
577 (decimal_float_ops::from_host_double): Likewise.
578 (decimal_to_string): Rename to ...
579 (decimal_float_ops::to_string): ... this. Use type instead of
580 length/byte_order arguments. Update calls.
581 (decimal_from_string): Rename to ...
582 (decimal_float_ops::from_string): ... this. Use type instead of
583 length/byte_order arguments. Update calls.
584 (decimal_from_longest): Rename to ...
585 (decimal_float_ops::from_longest): ... this. Use type instead of
586 length/byte_order arguments. Update calls.
587 (decimal_from_ulongest): Rename to ...
588 (decimal_float_ops::from_ulongest): ... this. Use type instead of
589 length/byte_order arguments. Update calls.
590 (decimal_to_longest): Rename to ...
591 (decimal_float_ops::to_longest): ... this. Use type instead of
592 length/byte_order arguments. Update calls.
593 (decimal_binop): Rename to ...
594 (decimal_float_ops::binop): ... this. Use type instead of
595 length/byte_order arguments. Update calls.
596 (decimal_compare): Rename to ...
597 (decimal_float_ops::compare): ... this. Use type instead of
598 length/byte_order arguments. Update calls.
599 (decimal_convert): Rename to ...
600 (decimal_float_ops::convert): ... this. Use type instead of
601 length/byte_order arguments. Update calls.
602
603 (target_float_same_category_p): New function.
604 (target_float_same_format_p): Likewise.
605 (target_float_format_length): Likewise.
606 (enum target_float_ops_kind): New type.
607 (get_target_float_ops_kind): New function.
608 (get_target_float_ops): Three new overloaded functions.
609
610 (target_float_is_zero): Update call.
611 (target_float_to_string): Add special handling of invalid numbers,
612 infinities and NaN (moved from floatformat_to_string). Use
613 target_float_ops callback.
614 (target_float_from_string): Use target_float_ops callback.
615 (target_float_to_longest): Likewise.
616 (target_float_from_longest): Likewise.
617 (target_float_from_ulongest): Likewise.
618 (target_float_to_host_double): Likewise.
619 (target_float_from_host_double): Likewise.
620 (target_float_convert): Add special case for no-op conversions.
621 Use target_float_ops callback.
622 (target_float_binop): Use target_float_ops callback.
623 (target_float_compare): Likewise.
624
625 2017-11-22 Yao Qi <yao.qi@linaro.org>
626
627 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
628
629 2017-11-22 Yao Qi <yao.qi@linaro.org>
630
631 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
632 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
633
634 2017-11-21 Jerome Guitton <guitton@adacore.com>
635
636 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
637 with event ptid from the lower layer before doing the
638 ravenscar-specific update.
639
640 2017-11-21 Joel Brobecker <brobecker@adacore.com>
641
642 * ravenscar-thread.c (is_ravenscar_task): Also verify that
643 the ptid's TID is nonzero.
644
645 2017-11-21 Joel Brobecker <brobecker@adacore.com>
646
647 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
648 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
649 Make non-static. Change return type to char *. Adjust code
650 accordingly. Rewrite the function's documentation.
651 (read_atcb): Adjust call to get_tcb_types_info accordingly.
652 * ravenscar-thread.c (ravenscar_inferior_created): Check that
653 we have enough debugging information in the runtime to support
654 Ada task debugging before we enable the ravenscar-thread layer.
655
656 2017-11-21 Joel Brobecker <brobecker@adacore.com>
657
658 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
659 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
660 * ravenscar-thread.c: Add into comment.
661 (base_magic_null_ptid): Delete.
662 (base_ptid): Change documentation.
663 (ravenscar_active_task): Renames ravenscar_running_thread.
664 All callers updated throughout.
665 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
666 (ravenscar_task_is_currently_active): Likewise.
667 (get_base_thread_from_ravenscar_task): Ditto.
668 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
669 (ravenscar_runtime_initialized): Likewise.
670 (get_running_thread_id): Add new parameter "cpu". Adjust
671 implementation to handle this new parameter.
672 (ravenscar_fetch_registers): Small adjustment to use
673 is_ravenscar_task and ravenscar_task_is_currently_active in
674 order to decide whether to use the target beneath or this
675 module's arch_ops.
676 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
677 (ravenscar_stopped_by_sw_breakpoint): Use
678 get_base_thread_from_ravenscar_task to get the underlying
679 thread, rather than using base_ptid.
680 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
681 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
682 Likewise.
683 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
684
685 2017-11-21 Joel Brobecker <brobecker@adacore.com>
686
687 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
688 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
689 (get_tcb_types_info): Set fieldnos.base_cpu.
690 (read_atcb): Set task_info->base_cpu.
691 (info_task): Print "Base CPU" info if set by runtime.
692
693 2017-11-21 Joel Brobecker <brobecker@adacore.com>
694
695 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
696 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
697 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
698 New functions.
699 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
700 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
701 to_stopped_data_address and to_core_of_thread fields of
702 ravenscar_ops.
703
704 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
705
706 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
707 (struct gdbarch_tdep): New member long_double_abi.
708 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
709 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
710 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
711 format depending on long_double_abi tdep member.
712 (ppc_floatformat_for_type): Handle __ibm128 type.
713
714 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
715
716 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
717
718 2017-11-21 Pedro Alves <palves@redhat.com>
719
720 * dwarf2read.c (mapped_index::find_name_components_bounds)
721 <completion mode, upper bound>: Use std::lower_bound instead of
722 std::upper_bound.
723 (test_mapped_index_find_name_component_bounds): Remove incorrect
724 "t1_fund" from expected symbols.
725
726 2017-11-21 Pedro Alves <palves@redhat.com>
727
728 * dwarf2read.c (mapped_index::name_components_casing): New field.
729 (mapped_index) <build_name_components,
730 find_name_components_bounds): Declare new methods.
731 (mapped_index::find_name_components_bounds)
732 (mapped_index::build_name_components): New methods, factored out
733 from dw2_expand_symtabs_matching_symbol.
734 (check_find_bounds_finds)
735 (test_mapped_index_find_name_component_bounds): New.
736 (run_test): Rename to ...
737 (test_dw2_expand_symtabs_matching_symbol): ... this.
738 (run_test): Reimplement.
739
740 2017-11-21 Pedro Alves <palves@redhat.com>
741
742 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
743 (symbol_end): Use cp_ident_is_alnum.
744 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
745 * dwarf2read.c (make_sort_after_prefix_name): New function.
746 (dw2_expand_symtabs_matching_symbol): Use it.
747 (test_symbols): Add more symbols.
748 (run_test): Add tests.
749
750 2017-11-17 Tom Tromey <tom@tromey.com>
751
752 * symtab.h (enum symbol_subclass_kind): New.
753 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
754 Remove.
755 <subclass>: New member.
756 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
757 * rust-lang.c (rust_get_trait_object_pointer): Update.
758 * dwarf2read.c (read_func_scope): Update.
759 (read_variable): Update.
760
761 2017-11-17 Tom Tromey <tom@tromey.com>
762
763 * dwarf2read.c (read_func_scope): Update.
764 * symtab.h (struct template_symbol): Derive from symbol.
765 <base>: Remove.
766
767 2017-11-17 Tom Tromey <tom@tromey.com>
768
769 * symtab.h (struct symbol) <is_rust_vtable>: New member.
770 (struct rust_vtable_symbol): New.
771 (find_symbol_at_address): Declare.
772 * symtab.c (find_symbol_at_address): New function.
773 * symfile.h (struct quick_symbol_functions)
774 <find_compunit_symtab_by_address>: New member.
775 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
776 function.
777 (debug_sym_quick_functions): Link to
778 debug_qf_find_compunit_symtab_by_address.
779 * rust-lang.c (rust_get_trait_object_pointer): New function.
780 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
781 rust_get_trait_object_pointer.
782 * psymtab.c (psym_relocate): Clear psymbol_map.
783 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
784 functions.
785 (psym_functions): Link to psym_find_compunit_symtab_by_address.
786 * objfiles.h (struct objfile) <psymbol_map>: New member.
787 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
788 (process_die) <DW_TAG_variable>: New case. Call read_variable.
789 (rust_containing_type, read_variable): New functions.
790
791 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
792
793 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
794
795 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
796
797 * common/filestuff.c: Include <algorithm>.
798 (open_fds): Change type to std::vector<int>.
799 (do_mark_open_fd): Adjust.
800 (unmark_fd_no_cloexec): Adjust.
801 (do_close): Adjust.
802
803 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
804
805 * breakpoint.c (output_thread_groups): Take an std::vector.
806 (print_one_breakpoint_location): Adjust.
807
808 2017-11-17 Joel Brobecker <brobecker@adacore.com>
809
810 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
811 (ada_evaluate_subexp_for_cast): New function.
812 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
813 ada_evaluate_subexp_for_cast.
814 (ada_evaluate_subexp) <nosideret>: Replace code by call to
815 eval_skip_value.
816 * eval.c (evaluate_var_value): Make non-static.
817 (evaluate_var_msym_value, eval_skip_value): Likewise.
818 * value.h (evaluate_var_value, evaluate_var_msym_value)
819 (eval_skip_value): Declare.
820
821 2017-11-16 Joel Brobecker <brobecker@adacore.com>
822
823 * ada-lang.c (ada_value_cast): Remove parameter "noside".
824 Update all callers.
825
826 2017-11-16 Pedro Alves <palves@redhat.com>
827
828 * python/py-unwind.c (pyuw_sniffer): Translate
829 PyExc_KeyboardInterrupt to a GDB Quit exception.
830
831 2017-11-16 Pedro Alves <palves@redhat.com>
832
833 * infrun.c (resume_cleanups): Delete.
834 (resume): No longer install a resume_cleanups cleanup nor call
835 QUIT.
836 (proceed): Pass the terminal to the inferior.
837 (keep_going_pass_signal): No longer install a resume_cleanups
838 cleanup.
839
840 2017-11-16 Pedro Alves <palves@redhat.com>
841
842 * inf-loop.c (inferior_event_handler): Don't swallow the exception
843 if the prompt is blocked.
844
845 2017-11-16 Pedro Alves <palves@redhat.com>
846
847 * breakpoint.c (insert_bp_location): Replace bp_err and
848 bp_err_message locals by a gdb_exception local.
849
850 2017-11-16 Pedro Alves <palves@redhat.com>
851
852 * inflow.c (scoped_ignore_sigttou): New class.
853 (child_terminal_ours_1, new_tty): Use it.
854
855 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
856
857 * target-float.c (decimal_from_number): Add byte_order argument and
858 call match_endianness. Error if unknown floating-point type.
859 (decimal_to_number): Add byte_order argument and call match_endianness.
860 (decimal_from_longest): Update call. Do not call match_endianness.
861 (decimal_from_ulongest): Likewise.
862 (decimal_binop): Likewise.
863 (decimal_is_zero): Likewise.
864 (decimal_compare): Likewise.
865 (decimal_convert): Likewise.
866
867 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
868
869 * python/python.c (gdbpy_rbreak): New function.
870 * NEWS: Document Python rbreak feature.
871
872 2017-11-16 Yao Qi <yao.qi@linaro.org>
873
874 * features/tic6x-c62x.xml: Remove.
875 * features/tic6x-c64x.xml: Remove.
876 * features/tic6x-c64xp.xml: Remove.
877
878 2017-11-15 John Baldwin <jhb@FreeBSD.org>
879
880 * symtab.h: Include <array>.
881
882 2017-11-15 John Baldwin <jhb@FreeBSD.org>
883
884 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
885 (bsd_kvm_proc_cmd): Likewise.
886
887 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
888
889 * tui/tui-win.c (window_name_completer): Replace VEC with
890 std::vector.
891
892 2017-11-15 Andrew Cagney <cagney@gnu.org>
893
894 * MAINTAINERS: Remove no-longer applicable entries.
895
896 2017-11-15 Andrew Cagney <cagney@gnu.org>
897
898 * MAINTAINERS: Move self to Past Maintainers.
899
900 2017-11-15 Yao Qi <yao.qi@linaro.org>
901
902 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
903 * features/nios2-linux.c: Remove.
904 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
905 initialize_tdesc_nios2_linux.
906
907 2017-11-15 Yao Qi <yao.qi@linaro.org>
908
909 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
910 M68HC11_LAST_HARD_REG + 1.
911
912 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
913
914 PR gdb/22388
915 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
916 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
917 Return TARGET_XFER_EOF if size of returned data is 0.
918
919 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
920
921 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
922 memory-map-selftests.c.
923 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
924 * memory-map.c (memory_map_start_memory): Fix computation of hi
925 address.
926 * unittests/memory-map-selftests.c: New file.
927
928 2017-11-09 Joel Brobecker <brobecker@adacore.com>
929
930 * ada-lang.c: Fix some typos in the general command documenting
931 how Ada expressions are being evaluated and how their result
932 is printed.
933
934 2017-11-09 Tom Tromey <tom@tromey.com>
935
936 * psymtab.c (psymbol_hash): Do not hash string contents.
937 (psymbol_compare): Add comment.
938
939 2017-11-09 Tom Tromey <tom@tromey.com>
940
941 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
942
943 2017-11-08 Joel Brobecker <brobecker@adacore.com>
944
945 * ada-exp.y (write_var_from_sym): Remove parameter
946 "orig_left_context". Update all callers.
947
948 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
949
950 * tracepoint.h (class collection_list) <stringify>: Return
951 std::vector<std::string>.
952 (encode_actions_rsp): Change parameters to
953 std::vector<std::string> *.
954 * tracepoint.c (collection_list::stringify): Return
955 std::vector<std::string> and adjust accordingly.
956 (encode_actions_rsp): Changee parameters to
957 std::vector<std::string> and adjust accordingly.
958 * remote.c (free_actions_list),
959 free_actions_list_cleanup_wrapper): Remove.
960 (remote_download_tracepoint): Adjust to std::vector.
961
962 2017-11-08 Tom Tromey <tom@tromey.com>
963
964 * dwarf2read.c (symbolp): Remove typedef.
965 (read_func_scope): Use std::vector.
966 (process_structure_scope): Use std::vector.
967
968 2017-11-08 Pedro Alves <palves@redhat.com>
969
970 * ada-lang.c (ada_make_symbol_completion_list): Use
971 completion_skip_symbol.
972 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
973 (symbol_is_function_or_method(symbol*)): New.
974 (add_symtab_completions): Add complete_symbol_mode parameter. Use
975 completion_skip_symbol.
976 (default_collect_symbol_completion_matches_break_on): Use
977 completion_skip_symbol. Pass down mode.
978 (collect_file_symbol_completion_matches): Pass down mode.
979 * symtab.h (symbol_is_function_or_method): New declarations.
980 (completion_skip_symbol): New template function.
981
982 2017-11-08 Pedro Alves <palves@redhat.com>
983
984 * linespec.c (iterate_over_all_matching_symtabs): Add
985 search_domain parameter. Pass it down to expand_symtabs_matching.
986 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
987 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
988 search_domain.
989 (add_all_symbol_names_from_pspace): Add search_domain parameter.
990 Pass it down.
991 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
992 symbols.
993 (add_matching_symbols_to_info): Add search_domain parameter. Pass
994 it down.
995
996 2017-11-08 Pedro Alves <palves@redhat.com>
997
998 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
999 text_len locals and don't pass them down.
1000 * symtab.c (completion_list_add_name): Remove
1001 sym_text/sym_text_len parameters and adjust.
1002 (completion_list_add_symbol, completion_list_add_msymbol)
1003 (completion_list_objc_symbol, completion_list_add_fields)
1004 (add_symtab_completions): Likewise.
1005 (default_collect_symbol_completion_matches_break_on)
1006 (collect_file_symbol_completion_matches): Remove sym_text_len
1007 local and don't pass it down.
1008 * symtab.h (completion_list_add_name): Remove
1009 sym_text/sym_text_len parameters.
1010
1011 2017-11-08 Pedro Alves <palves@redhat.com>
1012
1013 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1014 unittests/lookup_name_info-selftests.c.
1015 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1016 * cp-support.c: Include "selftest.h".
1017 (cp_remove_params_1): Rename from cp_remove_params. Add
1018 'require_param' parameter, and handle it.
1019 (cp_remove_params): Reimplement.
1020 (cp_remove_params_if_any): New.
1021 (selftests::quote): New.
1022 (selftests::check_remove_params): New.
1023 (selftests::test_cp_remove_params): New.
1024 (_initialize_cp_support): Install
1025 selftests::test_cp_remove_params.
1026 * cp-support.h (cp_remove_params_if_any): Declare.
1027 * dwarf2read.c :Include "selftest.h".
1028 (dw2_expand_symtabs_matching_symbol): Use
1029 lookup_name_info::make_ignore_params.
1030 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1031 (selftests::dw2_expand_symtabs_matching::string_or_null)
1032 (selftests::dw2_expand_symtabs_matching::check_match)
1033 (selftests::dw2_expand_symtabs_matching::test_symbols)
1034 (selftests::dw2_expand_symtabs_matching::run_test): New.
1035 (_initialize_dwarf2_read): Register
1036 selftests::dw2_expand_symtabs_matching::run_test.
1037 * psymtab.c (psym_expand_symtabs_matching): Use
1038 lookup_name_info::make_ignore_params.
1039 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1040 If the lookup name wants to ignore parameters, strip them.
1041 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1042 code handling '('.
1043 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1044 (default_collect_symbol_completion_matches_break_on): Don't try to
1045 strip parameters.
1046 * symtab.h (lookup_name_info::lookup_name_info): Add
1047 'ignore_parameters' parameter.
1048 (lookup_name_info::ignore_parameters)
1049 (lookup_name_info::make_ignore_params): New methods.
1050 (lookup_name_info::m_ignore_parameters): New field.
1051 * unittests/lookup_name_info-selftests.c: New file.
1052
1053 2017-11-08 Pedro Alves <palves@redhat.com>
1054
1055 * dwarf2read.c (dw2_expand_marked_cus)
1056 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1057 (dw2_expand_symtabs_matching): Move further below.
1058 (dw2_expand_marked_cus): Reindent.
1059
1060 2017-11-08 Pedro Alves <palves@redhat.com>
1061
1062 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1063 (struct name_component): New.
1064 (mapped_index::name_components): New field.
1065 (mapped_index::symbol_name_at): New method.
1066 (dwarf2_read_index): Call mapped_index ctor.
1067 (dw2_map_matching_symbols): Add comment about name_components
1068 table.
1069 (dw2_expand_symtabs_matching): Factor part to...
1070 (dw2_expand_symtabs_matching_symbol): ... this new function.
1071 Build name components table, and lookup symbols in it before
1072 calling the name matcher.
1073 (dw2_expand_marked_cus): New, factored out from
1074 dw2_expand_symtabs_matching.
1075 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1076
1077 2017-11-08 Pedro Alves <palves@redhat.com>
1078
1079 * ada-lang.c (ada_encode): Rename to ..
1080 (ada_encode_1): ... this. Add throw_errors parameter and handle
1081 it.
1082 (ada_encode): Reimplement.
1083 (match_name): Delete, folded into full_name.
1084 (resolve_subexp): No longer pass the encoded name to
1085 ada_lookup_symbol_list.
1086 (should_use_wild_match): Delete.
1087 (name_match_type_from_name): New.
1088 (ada_lookup_simple_minsym): Use lookup_name_info and the
1089 language's symbol_name_matcher_ftype.
1090 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1091 (ada_add_block_renamings): Adjust to use lookup_name_info.
1092 (ada_lookup_name): New.
1093 (add_nonlocal_symbols, ada_add_all_symbols)
1094 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1095 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1096 (ada_name_for_lookup): Delete.
1097 (ada_lookup_encoded_symbol): Construct a verbatim name.
1098 (wild_match): Reverse sense of return type. Use bool.
1099 (full_match): Reverse sense of return type. Inline bits of old
1100 match_name here.
1101 (ada_add_block_symbols): Adjust to use lookup_name_info.
1102 (symbol_completion_match): Delete, folded into...
1103 (ada_lookup_name_info::matches): ... .this new method.
1104 (symbol_completion_add): Delete.
1105 (ada_collect_symbol_completion_matches): Add name_match_type
1106 parameter. Adjust to use lookup_name_info and
1107 completion_list_add_name.
1108 (get_var_value, ada_add_global_exceptions): Adjust to use
1109 lookup_name_info.
1110 (ada_get_symbol_name_cmp): Delete.
1111 (do_wild_match, do_full_match): New functions.
1112 (ada_lookup_name_info::ada_lookup_name_info): New method.
1113 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1114 functions.
1115 (ada_language_defn): Install ada_get_symbol_name_matcher.
1116 * ada-lex.l (processId): If name starts with '<', copy it
1117 verbatim.
1118 * block.c (block_iter_match_step, block_iter_match_first)
1119 (block_iter_match_next, block_lookup_symbol)
1120 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1121 lookup_name_info.
1122 * block.h (block_iter_match_first, block_iter_match_next)
1123 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1124 * c-lang.c (c_language_defn, cplus_language_defn)
1125 (asm_language_defn, minimal_language_defn): Adjust comments to
1126 refer to la_get_symbol_name_matcher.
1127 * completer.c (complete_files_symbols)
1128 (collect_explicit_location_matches, symbol_completer): Pass a
1129 symbol_name_match_type down.
1130 * completer.h (class completion_match, completion_match_result):
1131 New classes.
1132 (completion_tracker::reset_completion_match_result): New method.
1133 (completion_tracker::m_completion_match_result): New field.
1134 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1135 lookup_name_info.
1136 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1137 functions.
1138 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1139 * d-lang.c: Adjust comments to refer to
1140 la_get_symbol_name_matcher.
1141 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1142 Adjust to use lookup_name_info.
1143 (dict_iter_match_first, dict_iter_match_next)
1144 (iter_match_first_hashed, iter_match_next_hashed)
1145 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1146 with a lookup_name_info.
1147 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1148 Likewise.
1149 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1150 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1151 (gdb_index_symbol_name_matcher): New class.
1152 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1153 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1154 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1155 with a symbol_name_match_type.
1156 (f_language_defn): Adjust comments to refer to
1157 la_get_symbol_name_matcher.
1158 * go-lang.c (go_language_defn): Adjust comments to refer to
1159 la_get_symbol_name_matcher.
1160 * language.c (default_symbol_name_matcher)
1161 (language_get_symbol_name_matcher): New functions.
1162 (unknown_language_defn, auto_language_defn): Adjust comments to
1163 refer to la_get_symbol_name_matcher.
1164 * language.h (symbol_name_cmp_ftype): Delete.
1165 (language_defn) <la_collect_symbol_completion_matches>: Add match
1166 type parameter.
1167 <la_get_symbol_name_cmp>: Delete field.
1168 <la_get_symbol_name_matcher>: New field.
1169 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1170 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1171 Declare.
1172 * linespec.c (iterate_over_all_matching_symtabs)
1173 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1174 (find_methods): Add language parameter, and use lookup_name_info
1175 and the language's symbol_name_matcher_ftype.
1176 (linespec_complete_function): Adjust.
1177 (lookup_prefix_sym): Use lookup_name_info.
1178 (add_all_symbol_names_from_pspace): Adjust.
1179 (find_superclass_methods): Add language parameter and pass it
1180 down.
1181 (find_method): Pass symbol language down.
1182 (find_linespec_symbols): Don't demangle or Ada encode here.
1183 (search_minsyms_for_name): Add lookup_name_info parameter.
1184 (add_matching_symbols_to_info): Add name_match_type parameter.
1185 Use lookup_name_info.
1186 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1187 la_get_symbol_name_matcher.
1188 * minsyms.c: Include <algorithm>.
1189 (add_minsym_to_demangled_hash_table): Remove table parameter and
1190 add objfile parameter. Use search_name_hash, and add language to
1191 demangled languages vector.
1192 (struct found_minimal_symbols): New struct.
1193 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1194 New functions.
1195 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1196 input names here. Use lookup_name_info instead. Lookup up
1197 demangled names once for each language in the demangled names
1198 vector.
1199 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1200 demangled names once for each language in the demangled names
1201 vector.
1202 (build_minimal_symbol_hash_tables): Adjust.
1203 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1204 lookup_name_info.
1205 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1206 la_get_symbol_name_matcher.
1207 * objfiles.h: Include <vector>.
1208 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1209 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1210 la_get_symbol_name_matcher.
1211 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1212 la_get_symbol_name_matcher.
1213 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1214 (match_partial_symbol): Use symbol_name_match_type,
1215 lookup_name_info and psymbol_name_matches.
1216 (lookup_partial_symbol): Use lookup_name_info.
1217 (map_block): Use symbol_name_match_type and lookup_name_info.
1218 (psym_map_matching_symbols): Use symbol_name_match_type.
1219 (psymbol_name_matches): New.
1220 (recursively_search_psymtabs): Use lookup_name_info and
1221 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1222 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1223 'kind' parameter to 'domain'.
1224 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1225 la_get_symbol_name_matcher.
1226 * symfile-debug.c (debug_qf_map_matching_symbols)
1227 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1228 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1229 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1230 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1231 Adjust to use symbol_name_match_type.
1232 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1233 (expand_symtabs_matching): Adjust to use lookup_name_info.
1234 * symmisc.c (maintenance_expand_symtabs): Use
1235 lookup_name_info::match_any ().
1236 * symtab.c (symbol_matches_search_name): New.
1237 (eq_symbol_entry): Adjust to use lookup_name_info and the
1238 language's matcher.
1239 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1240 (lookup_name_info::match_any): New.
1241 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1242 (compare_symbol_name): Add language, lookup_name_info and
1243 completion_match_result parameters, and use them.
1244 (completion_list_add_name): Make extern. Add language and
1245 lookup_name_info parameters. Use them.
1246 (completion_list_add_symbol, completion_list_add_msymbol)
1247 (completion_list_objc_symbol): Add lookup_name_info parameters and
1248 adjust. Pass down language.
1249 (completion_list_add_fields): Add lookup_name_info parameters and
1250 adjust. Pass down language.
1251 (add_symtab_completions): Add lookup_name_info parameters and
1252 adjust.
1253 (default_collect_symbol_completion_matches_break_on): Add
1254 name_match_type parameter, and use it. Use lookup_name_info.
1255 (default_collect_symbol_completion_matches)
1256 (collect_symbol_completion_matches): Add name_match_type
1257 parameter, and pass it down.
1258 (collect_symbol_completion_matches_type): Adjust.
1259 (collect_file_symbol_completion_matches): Add name_match_type
1260 parameter, and use lookup_name_info.
1261 * symtab.h: Include <string> and "common/gdb_optional.h".
1262 (enum class symbol_name_match_type): New.
1263 (class ada_lookup_name_info): New.
1264 (struct demangle_for_lookup_info): New.
1265 (class lookup_name_info): New.
1266 (symbol_name_matcher_ftype): New.
1267 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1268 (symbol_matches_search_name): Declare.
1269 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1270 (default_collect_symbol_completion_matches)
1271 (collect_symbol_completion_matches)
1272 (collect_file_symbol_completion_matches): Add name_match_type
1273 parameter.
1274 (iterate_over_symbols): Use lookup_name_info.
1275 (completion_list_add_name): Declare.
1276 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1277 (strncmp_iw_with_mode): Now extern.
1278 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1279 (strncmp_iw_with_mode): Declare.
1280
1281 2017-11-08 Keith Seitz <keiths@redhat.com>
1282 Pedro Alves <palves@redhat.com>
1283
1284 * ada-lang.c (ada_language_defn): Install
1285 default_search_name_hash.
1286 * buildsym.c (struct buildsym_compunit): <language>: New field.
1287 (finish_block_internal): Pass language when creating dictionaries.
1288 (start_buildsym_compunit, start_symtab): New language parameters.
1289 Use them.
1290 (restart_symtab): Pass down compilation unit's language.
1291 * buildsym.h (enum language): Forward declare.
1292 (start_symtab): New 'language' parameter.
1293 * c-lang.c (c_language_defn, cplus_language_defn)
1294 (asm_language_defn, minimal_language_defn): Install
1295 default_search_name_hash.
1296 * coffread.c (coff_start_symtab): Adjust.
1297 * d-lang.c (d_language_defn): Install default_search_name_hash.
1298 * dbxread.c (struct symloc): Add 'pst_language' field.
1299 (PST_LANGUAGE): Define.
1300 (start_psymtab, read_ofile_symtab): Use it.
1301 (process_one_symbol): New 'language' parameter. Pass it down.
1302 * dictionary.c (struct dictionary) <language>: New field.
1303 (DICT_LANGUAGE): Define.
1304 (dict_create_hashed, dict_create_hashed_expandable)
1305 (dict_create_linear, dict_create_linear_expandable): New parameter
1306 'language'. Set the dictionary's language.
1307 (iter_match_first_hashed): Adjust to rename.
1308 (insert_symbol_hashed): Assert we don't see mismatching
1309 languages. Adjust to rename.
1310 (dict_hash): Rename to ...
1311 (default_search_name_hash): ... this and make extern.
1312 * dictionary.h (struct language_defn): Forward declare.
1313 (dict_create_hashed): New parameter 'language'.
1314 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1315 * f-lang.c (f_language_defn): Install default_search_name_hash.
1316 * go-lang.c (go_language_defn): Install default_search_name_hash.
1317 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1318 creation.
1319 * language.c (unknown_language_defn, auto_language_defn):
1320 * language.h (language_defn::la_search_name_hash): New field.
1321 (default_search_name_hash): Declare.
1322 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1323 * mdebugread.c (new_block): New parameter 'language'.
1324 * mdebugread.c (parse_symbol): Pass symbol language to block
1325 allocation.
1326 (psymtab_to_symtab_1): Pass down language.
1327 (new_symtab): Pass compunit's language to block allocation.
1328 * objc-lang.c (objc_language_defn): Install
1329 default_search_name_hash.
1330 * opencl-lang.c (opencl_language_defn):
1331 * p-lang.c (pascal_language_defn): Install
1332 default_search_name_hash.
1333 * rust-lang.c (rust_language_defn): Install
1334 default_search_name_hash.
1335 * stabsread.h (enum language): Forward declare.
1336 (process_one_symbol): Add 'language' parameter.
1337 * symtab.c (search_name_hash): New function.
1338 * symtab.h (search_name_hash): Declare.
1339 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1340
1341 2017-11-08 Pedro Alves <palves@redhat.com>
1342
1343 * cp-name-parser.y (main): Don't initialize extra_chars.
1344
1345 2017-11-07 Tom Tromey <tom@tromey.com>
1346
1347 * event-top.h (command_handler): Constify.
1348 * record-full.c (cmd_record_full_start): Update.
1349 * thread.c (thread_apply_all_command): Update.
1350 * printcmd.c (eval_command): Update.
1351 * mi/mi-main.c (mi_execute_cli_command): Update.
1352 (mi_execute_async_cli_command): Update.
1353 * tui/tui-stack.c (tui_update_command): Update.
1354 * cli/cli-interp.c (safe_execute_command): Constify.
1355 * record.c (record_start): Update.
1356 (record_start, record_stop, cmd_record_start): Update.
1357 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1358 (cmd_record_btrace_pt_start): Update.
1359 (cmd_record_btrace_start): Update.
1360 (cmd_record_btrace_start): Update.
1361 * reverse.c (exec_reverse_once): Update.
1362 * python/python.c (execute_gdb_command): Don't copy the command.
1363 * event-top.c (command_line_handler): Update.
1364 (command_handler): Constify.
1365 * defs.h (deprecated_call_command_hook): Constify.
1366 * cli/cli-script.h (execute_user_command): Constify.
1367 * cli/cli-script.c (execute_user_command): Constify.
1368 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1369 (enum command_control_type): Update.
1370 * main.c (catch_command_errors): Remove non-const overload.
1371 (catch_command_errors_ftype): Remove.
1372 * python/py-cmd.c (cmdpy_function): Constify.
1373 * guile/scm-cmd.c (cmdscm_function): Constify.
1374 * cli/cli-dump.c (call_dump_func): Constify.
1375 * cli/cli-decode.c (do_const_cfunc): Constify.
1376 (do_sfunc): Constify.
1377 (cmd_func): Constify.
1378 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1379 * top.h (execute_command): Constify.
1380 * top.c (execute_command): Constify.
1381 (execute_command_to_string): Constify.
1382 (deprecated_call_command_hook): Constify.
1383 * command.h (cmd_func): Constify.
1384 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1385
1386 2017-11-07 Tom Tromey <tom@tromey.com>
1387
1388 * ada-lang.c (catch_ada_exception_command): Constify.
1389 (catch_assert_command): Constify.
1390 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1391 (catch_rethrow_command): Constify.
1392 (catch_exception_command_1): Constify.
1393 * breakpoint.h (add_catch_command): Constify.
1394 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1395 (catch_syscall_split_args): Constify.
1396 * break-catch-sig.c (catch_signal_command): Constify.
1397 (catch_signal_split_args): Constify.
1398 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1399 cmd_const_sfunc_ftype.
1400 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1401 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1402 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1403 (add_setshow_string_cmd, struct cmd_list_element)
1404 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1405 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1406 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1407 Constify.
1408 (set_cmd_sfunc): Constify.
1409 (empty_sfunc): Constify.
1410 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1411 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1412 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1413 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1414 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1415 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1416 Constify.
1417 (set_cmd_sfunc): Constify.
1418 (cmd_sfunc_ftype): Remove.
1419 * compile/compile.c (set_compile_args): Constify.
1420 * infrun.c (set_disable_randomization): Constify.
1421 * infcmd.c (set_args_command, set_cwd_command): Constify.
1422 * breakpoint.c (set_condition_evaluation_mode): Constify.
1423 (add_catch_command): Constify.
1424 (catch_fork_command_1, catch_exec_command_1)
1425 (catch_load_command_1, catch_unload_command_1): Constify.
1426 (catch_load_or_unload): Constify.
1427 * guile/scm-param.c (pascm_set_func): Constify.
1428 (add_setshow_generic): Constify.
1429 * python/py-param.c (get_set_value): Constify.
1430 * top.h (set_verbose): Constify.
1431 * tui/tui-win.c (tui_set_var_cmd): Constify.
1432 * mi/mi-main.c (set_mi_async_command): Constify.
1433 * cli/cli-logging.c (set_logging_overwrite)
1434 (set_logging_redirect): Constify.
1435 * value.c (set_max_value_size): Constify.
1436 * valprint.c (set_input_radix, set_output_radix): Constify.
1437 * utils.c (set_width_command, set_height_command): Constify.
1438 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1439 * tracepoint.c (set_disconnected_tracing)
1440 (set_circular_trace_buffer, set_trace_buffer_size)
1441 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1442 * top.c (set_history_size_command, set_verbose, set_editing)
1443 (set_gdb_datadir, set_history_filename): Constify.
1444 * target.c (set_targetdebug, maint_set_target_async_command)
1445 (maint_set_target_non_stop_command, set_target_permissions)
1446 (set_write_memory_permission): Constify.
1447 (open_target): Constify.
1448 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1449 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1450 * symtab.c (set_symbol_cache_size_handler): Constify.
1451 * symfile.c (set_ext_lang_command): Constify.
1452 * symfile-debug.c (set_debug_symfile): Constify.
1453 * source.c (set_directories_command): Constify.
1454 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1455 * serial.c (set_parity): Constify.
1456 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1457 * remote.c (set_remote_exec_file, set_remotebreak)
1458 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1459 * record.c (set_record_insn_history_size)
1460 (set_record_call_history_size): Constify.
1461 * record-full.c (set_record_full_insn_max_num): Constify.
1462 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1463 * osabi.c (set_osabi): Constify.
1464 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1465 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1466 * maint.c (maintenance_set_profile_cmd): Constify.
1467 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1468 * language.c (set_language_command, set_range_command)
1469 (set_case_command): Constify.
1470 * infrun.c (set_non_stop, set_observer_mode)
1471 (set_stop_on_solib_events, set_schedlock_func)
1472 (set_exec_direction_func): Constify.
1473 * infcmd.c (set_inferior_tty_command): Constify.
1474 * disasm.c (set_disassembler_options_sfunc): Constify.
1475 * demangle.c (set_demangling_command): Constify.
1476 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1477 * cris-tdep.c (set_cris_version, set_cris_mode)
1478 (set_cris_dwarf2_cfi): Constify.
1479 * corefile.c (set_gnutarget_command): Constify.
1480 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1481 (set_target_wide_charset_sfunc): Constify.
1482 * breakpoint.c (update_dprintf_commands): Constify.
1483 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1484 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1485 (set_disassembly_style_sfunc): Constify.
1486 * arch-utils.c (set_endian, set_architecture): Constify.
1487 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1488 * agent.c (set_can_use_agent): Constify.
1489
1490 2017-11-07 Tom Tromey <tom@tromey.com>
1491
1492 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1493 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1494 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1495 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1496 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1497 (parse_int_arg, show_thread_default_detach_sc_cmd)
1498 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1499 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1500 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1501 (show_task_pause_cmd, set_task_detach_sc_cmd)
1502 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1503 (set_noninvasive_cmd, set_thread_pause_cmd)
1504 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1505 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1506 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1507 * windows-nat.c (display_selectors): Constify.
1508 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1509 non-const "cfunc".
1510 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1511 (cmd_cfunc_eq): Likewise.
1512 (struct cmd_list_element): Likewise.
1513 (do_cfunc): Remove.
1514 (cli_user_command_p): Update.
1515 * command.h (add_cmd): Remove non-const overload.
1516 (cmd_cfunc_ftype): Remove typedef.
1517 (cmd_cfunc_eq): Remove non-const overload.
1518 * value.c (show_values): Constify.
1519 * thread.c (thread_apply_all_command): Constify.
1520 * symfile.c (load_command): Constify.
1521 * source.c (directory_command): Constify.
1522 * maint.c (maintenance_internal_error)
1523 (maintenance_demangler_warning, maintenance_space_display)
1524 (maintenance_print_architecture, maintenance_translate_address)
1525 (maintenance_info_selftests, maintenance_internal_warning):
1526 Constify.
1527 * breakpoint.c (disable_trace_command, enable_trace_command):
1528 Constify.
1529 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1530 Constify.
1531 (add_auto_load_safe_path): Constify.
1532 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1533 * top.h (show_commands): Constify.
1534 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1535 * sparc64-tdep.c (adi_examine_command): Constify.
1536 (adi_assign_command): Constify.
1537
1538 2017-11-07 Tom Tromey <tom@tromey.com>
1539
1540 * frame.h (info_locals_command, info_args_command): Constify.
1541 * auto-load.h (auto_load_info_scripts): Constify.
1542 * inferior.h (registers_info): Constify.
1543 * copying.c: Rebuild.
1544 * copying.awk: Constify generated commands.
1545 * auto-load.c (auto_load_info_scripts)
1546 (info_auto_load_gdb_scripts): Constify.
1547 * cli/cli-decode.c (struct cmd_list_element): Take a
1548 cmd_const_cfunc_ftype.
1549 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1550 * tui/tui-win.c (tui_all_windows_info): Constify.
1551 * python/py-auto-load.c (info_auto_load_python_scripts):
1552 Constify.
1553 * cli/cli-cmds.c (show_command): Remove non-const overload.
1554 * tracepoint.c (info_tvariables_command, info_scope_command):
1555 Constify.
1556 (info_static_tracepoint_markers_command): Constify.
1557 * thread.c (info_threads_command): Constify.
1558 (print_thread_info_1): Constify.
1559 * target.c (info_target_command): Constify.
1560 * symtab.c (info_sources_command, info_functions_command)
1561 (info_types_command): Constify.
1562 (info_variables_command): Remove non-const overload.
1563 * symfile.c (info_ext_lang_command): Constify.
1564 * stack.c (info_frame_command, info_locals_command)
1565 (info_args_command): Constify.
1566 (backtrace_command): Remove non-const overload.
1567 * source.c (info_source_command, info_line_command): Constify.
1568 * solib.c (info_sharedlibrary_command): Constify.
1569 * skip.c (info_skip_command): Constify.
1570 * ser-go32.c (info_serial_command): Constify.
1571 * reverse.c (info_bookmarks_command): Constify.
1572 * printcmd.c (info_symbol_command, info_address_command)
1573 (info_display_command): Constify.
1574 * osdata.c (info_osdata_command): Constify.
1575 * objc-lang.c (info_selectors_command, info_classes_command):
1576 Constify.
1577 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1578 * memattr.c (info_mem_command): Constify.
1579 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1580 * linux-fork.c (info_checkpoints_command): Constify.
1581 * infrun.c (info_signals_command): Constify.
1582 * inflow.c (info_terminal_command): Constify.
1583 * inferior.c (info_inferiors_command): Constify.
1584 (print_inferior): Constify.
1585 * infcmd.c (info_program_command, info_all_registers_command)
1586 (info_registers_command, info_vector_command)
1587 (info_float_command): Constify.
1588 (registers_info): Constify.
1589 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1590 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1591 Constify.
1592 * f-valprint.c (info_common_command): Constify.
1593 * dcache.c (info_dcache_command): Constify.
1594 (dcache_info_1): Constify.
1595 * darwin-nat-info.c (info_mach_tasks_command)
1596 (info_mach_task_command, info_mach_ports_command)
1597 (info_mach_port_command, info_mach_threads_command)
1598 (info_mach_thread_command, info_mach_regions_command)
1599 (info_mach_regions_recurse_command, info_mach_region_command)
1600 (info_mach_exceptions_command): Constify.
1601 (get_task_from_args): Constify.
1602 * cp-support.c (info_vtbl_command): Constify.
1603 * breakpoint.c (info_watchpoints_command)
1604 (info_tracepoints_command): Constify.
1605 (info_breakpoints_command): Remove non-const overload.
1606 * avr-tdep.c (avr_io_reg_read_command): Constify.
1607 * auxv.c (info_auxv_command): Constify.
1608 * ada-tasks.c (info_tasks_command): Constify.
1609 (info_task): Constify.
1610 * ada-lang.c (info_exceptions_command): Constify.
1611
1612 2017-11-07 Tom Tromey <tom@tromey.com>
1613
1614 * solib.h (no_shared_libraries): Constify.
1615 * frame.h (return_command): Constify.
1616 * cli/cli-cmds.h (quit_command): Constify.
1617 * top.h (quit_command, execute_command): Constify.
1618 * target.h (flash_erase_command): Constify.
1619 * inferior.h (set_inferior_args, attach_command): Constify.
1620 * tracepoint.h (start_tracing, stop_tracing): Constify.
1621 * breakpoint.h (break_command, tbreak_command)
1622 (hbreak_command_wrapper, thbreak_command_wrapper)
1623 (rbreak_command_wrapper, watch_command_wrapper)
1624 (awatch_command_wrapper, rwatch_command_wrapper)
1625 (get_tracepoint_by_number): Constify.
1626 * symtab.c (info_variables_command, rbreak_command)
1627 (symtab_symbol_info): Constify.
1628 (info_variables_command): Add non-const overload.
1629 * top.c (dont_repeat_command): Constify.
1630 * breakpoint.c (ignore_command, commands_command)
1631 (condition_command, tbreak_command, hbreak_command)
1632 (thbreak_command, clear_command, break_command)
1633 (info_breakpoints_command, watch_command, rwatch_command)
1634 (awatch_command, trace_command, ftrace_command, strace_command)
1635 (trace_pass_command, break_range_command, dprintf_command)
1636 (agent_printf_command, get_tracepoint_by_number)
1637 (watch_maybe_just_location, trace_pass_command): Constify.
1638 (info_breakpoints_command): Add non-const overload.
1639 * tracefile.c (tsave_command): Constify.
1640 * infcmd.c (attach_command, disconnect_command, signal_command)
1641 (queue_signal_command, stepi_command, nexti_command)
1642 (finish_command, next_command, step_command, until_command)
1643 (advance_command, jump_command, continue_command, run_command)
1644 (start_command, starti_command, interrupt_command)
1645 (run_command_1, set_inferior_args, step_1): Constify.
1646 * inferior.c (add_inferior_command, remove_inferior_command)
1647 (clone_inferior_command): Constify.
1648 * linux-fork.c (checkpoint_command, restart_command): Constify.
1649 * windows-nat.c (signal_event_command): Constify.
1650 * guile/guile.c (guile_repl_command, guile_command): Constify.
1651 * printcmd.c (x_command, display_command, printf_command)
1652 (output_command, set_command, call_command, print_command)
1653 (eval_command): Constify.
1654 (non_const_set_command): Remove.
1655 (_initialize_printcmd): Update.
1656 * source.c (forward_search_command, reverse_search_command):
1657 Constify.
1658 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1659 Constify.
1660 * infrun.c (handle_command): Constify.
1661 * memattr.c (mem_command): Constify.
1662 * stack.c (return_command, up_command, up_silently_command)
1663 (down_command, down_silently_command, frame_command)
1664 (backtrace_command, func_command, backtrace_command_1): Constify.
1665 (backtrace_command): Add non-const overload.
1666 * remote-sim.c (simulator_command): Constify.
1667 * exec.c (set_section_command): Constify.
1668 * tracepoint.c (tdump_command, trace_variable_command)
1669 (tstatus_command, tstop_command, tstart_command)
1670 (end_actions_pseudocommand, while_stepping_pseudocommand)
1671 (collect_pseudocommand, teval_pseudocommand, actions_command)
1672 (start_tracing, stop_tracing): Constify.
1673 * value.c (init_if_undefined_command): Constify.
1674 * tui/tui-stack.c (tui_update_command): Constify.
1675 * tui/tui-win.c (tui_refresh_all_command)
1676 (tui_set_tab_width_command, tui_set_win_height_command)
1677 (tui_set_focus_command, tui_scroll_forward_command)
1678 (tui_scroll_backward_command, tui_scroll_left_command)
1679 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1680 (tui_set_win_height): Constify.
1681 * tui/tui-layout.c (tui_layout_command): Constify.
1682 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1683 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1684 (proc_untrace_sysexit_cmd): Constify.
1685 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1686 (threadset_test_cmd, threadlist_update_test_cmd)
1687 (threadalive_test): Constify.
1688 * objc-lang.c (print_object_command): Constify.
1689 * command.h (add_com): Constify.
1690 * cli/cli-dump.c (restore_command): Constify.
1691 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1692 (help_command, complete_command, shell_command, edit_command)
1693 (list_command, disassemble_command, make_command)
1694 (apropos_command, alias_command): Constify.
1695 * cli/cli-script.c (document_command, define_command)
1696 (while_command, if_command, validate_comname): Constify.
1697 * cli/cli-decode.c (struct cmd_list_element): Change type of
1698 "fun".
1699 * target.c (do_monitor_command, flash_erase_command): Constify.
1700 * regcache.c (reg_flush_command): Constify.
1701 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1702 (reverse_nexti, reverse_continue, reverse_finish)
1703 (save_bookmark_command, goto_bookmark_command)
1704 (exec_reverse_once): Constify.
1705 * python/python.c (python_interactive_command, python_command):
1706 Constify.
1707 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1708 Constify.
1709 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1710 * gcore.c (gcore_command): Constify.
1711
1712 2017-11-07 Tom Tromey <tom@tromey.com>
1713
1714 * printcmd.c (x_command): Call set_repeat_arguments.
1715 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1716 * top.c (repeat_arguments): New global.
1717 (set_repeat_arguments): New function.
1718 (execute_command): Handle repeat_arguments.
1719 (show_commands): Calls set_repeat_arguments.
1720 * command.h (set_repeat_arguments): Declare.
1721
1722 2017-11-07 Tom Tromey <tom@tromey.com>
1723
1724 * stack.c (backtrace_command): Use std::string.
1725 (backtrace_command_1): Make "count_exp" const.
1726
1727 2017-11-07 Tom Tromey <tom@tromey.com>
1728
1729 * source.c (directory_switch, mod_path, add_path): Constify.
1730 * defs.h (add_path, mod_path, directory_switch): Constify.
1731 * mi/mi-cmd-env.c (env_mod_path): Constify.
1732
1733 2017-11-07 Tom Tromey <tom@tromey.com>
1734
1735 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1736 (run_command_1, continue_command, step_1, jump_command)
1737 (signal_command, until_command, advance_command, finish_command)
1738 (attach_command): Update.
1739
1740 2017-11-07 Tom Tromey <tom@tromey.com>
1741
1742 * command.h (set_cmd_cfunc): Don't declare.
1743 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1744
1745 2017-11-07 Tom Tromey <tom@tromey.com>
1746
1747 * stack.c (select_frame_command): Constify.
1748 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1749 * command.h (add_com_suppress_notification): Constify.
1750
1751 2017-11-07 Tom Tromey <tom@tromey.com>
1752
1753 * breakpoint.c (stop_command): Constify.
1754 * cli/cli-decode.c (struct cmd_list_element): Constify.
1755 * command.h (add_abbrev_prefix_cmd): Constify.
1756
1757 2017-11-07 Pedro Alves <palves@redhat.com>
1758
1759 * breakpoint.c (extract_bp_kind): New enum.
1760 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1761 factored out from ...
1762 (extract_bp_number_and_location): ... here.
1763 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1764
1765 2017-11-07 Pedro Alves <palves@redhat.com>
1766
1767 * breakpoint.c (extract_bp_number_and_location): Change return
1768 type to void. Throw error instead of warning.
1769 (enable_disable_command): Adjust.
1770
1771 2017-11-07 Xavier Roirand <roirand@adacore.com>
1772 Pedro Alves <palves@redhat.com>
1773
1774 * breakpoint.c (map_breakpoint_number_range): New, factored out
1775 from ...
1776 (map_breakpoint_numbers): ... here.
1777 (find_location_by_number): Change parameters from string to
1778 breakpoint number and location.
1779 (extract_bp_number_and_location): New function.
1780 (enable_disable_bp_num_loc)
1781 (enable_disable_breakpoint_location_range)
1782 (enable_disable_command): New functions, factored out ...
1783 (enable_command, disable_command): ... these functions, and
1784 adjusted to support ranges.
1785 * NEWS: Document enable/disable breakpoint location range feature.
1786
1787 2017-11-06 Luis Machado <luis.machado@linaro.org>
1788
1789 * MAINTAINERS (Write After Approval): Update my e-mail address.
1790
1791 2017-11-06 Pedro Alves <palves@redhat.com>
1792
1793 * gnu-nat.c (gnu_terminal_init): Delete.
1794 (gnu_target): Don't install gnu_terminal_init.
1795 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1796 (child_terminal_init): ... this function.
1797
1798 2017-11-06 Pedro Alves <palves@redhat.com>
1799
1800 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1801 sgtty.h.
1802 * config.in, configure: Regenerate.
1803
1804 2017-11-06 Pedro Alves <palves@redhat.com>
1805
1806 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1807 (async_init_signals): Adjust.
1808 (handle_stop_sig): Rename to ...
1809 (handle_sigtstp): ... this.
1810 (async_stop_sig): Rename to ...
1811 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1812 SIGTSTP path.
1813 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1814 instead of STOP_SIGNAL thoughout.
1815 (handle_stop_sig): Rename to ...
1816 (handle_sigtstp): ... this.
1817 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1818
1819 2017-11-06 Pedro Alves <palves@redhat.com>
1820
1821 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1822 longer set flags twice in row.
1823
1824 2017-11-06 Pedro Alves <palves@redhat.com>
1825
1826 * Makefile.in (SER_HARDWIRE): Update comment.
1827 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1828 * common/gdb_termios.h: Delete file.
1829 * common/job-control.c: Include termios.h and unistd.h instead of
1830 gdb_termios.h.
1831 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1832 check.
1833 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1834 Remove sgtty code.
1835 * configure.ac: No longer check for termio.h and sgtty.h.
1836 * configure: Regenerate.
1837 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1838 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1839 Replace PROCESS_GROUP_TYPE references with pid_t references
1840 throughout.
1841 (gdb_getpgrp): Delete.
1842 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1843 (child_terminal_inferior): Remove comment. Remove sgtty code.
1844 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1845 gdb_getpgrp. Use serial_set_tty_state instead aof
1846 serial_noflush_set_tty_state. Remove sgtty code.
1847 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1848 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1849 (inferior_process_group): Now returns pid_t.
1850 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1851 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1852 * ser-event.c (serial_event_ops): Update.
1853 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1854 (dos_ops): Update.
1855 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1856 * ser-pipe.c (pipe_ops): Update.
1857 * ser-tcp.c (tcp_ops): Update.
1858 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1859 HAVE_TERMIOS checks.
1860 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1861 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1862 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1863 assume termios.
1864 (hardwire_noflush_set_tty_state): Delete.
1865 (hardwire_print_tty_state, hardwire_drain_output)
1866 (hardwire_flush_output, hardwire_flush_input)
1867 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1868 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1869 code, and assume termios.
1870 (hardwire_ops): Update.
1871 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1872 * serial.c (serial_noflush_set_tty_state): Delete.
1873 * serial.h (serial_noflush_set_tty_state): Delete.
1874 (serial_ops::noflush_set_tty_state): Delete.
1875
1876 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1877
1878 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1879 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1880 (COMMON_OBS): Remove doublest.o and dfp.o.
1881 Do not build target-float.c (instead of doublest.c)
1882 with -Wformat-nonliteral.
1883
1884 * doublest.c: Remove file.
1885 * doublest.h: Remove file.
1886 * dfp.c: Remove file.
1887 * dfp.h: Remove file.
1888
1889 * target-float.c: Do not include "doublest.h" and "dfp.h".
1890 (DOUBLEST): Move here from doublest.h.
1891 (enum float_kind): Likewise.
1892 (FLOATFORMAT_CHAR_BIT): Likewise.
1893 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1894 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1895 (floatformat_precision): Likewise.
1896 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1897 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1898 Likewise.
1899 (host_float_format, host_double_format, host_long_double_format):
1900 Likewise.
1901 (floatformat_to_string, floatformat_from_string): Likewise.
1902 (floatformat_to_doublest): Likewise. Also, inline the original
1903 convert_floatformat_to_doublest.
1904 (floatformat_from_doublest): Likewise. Also, inline the original
1905 convert_floatformat_from_doublest.
1906
1907 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1908 (MAX_DECIMAL_STRING): Move here from dfp.c.
1909 (match_endianness): Likewise.
1910 (set_decnumber_context, decimal_check_errors): Likewise.
1911 (decimal_from_number, decimal_to_number): Likewise.
1912 (decimal_to_string, decimal_from_string): Likewise. Make static.
1913 (decimal_from_longest, decimal_from_ulongest): Likewise.
1914 (decimal_to_longest): Likewise.
1915 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1916 (decimal_convert): Likewise.
1917
1918 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1919
1920 * doublest.c: Do not include "gdbtypes.h".
1921 (extract_typed_floating): Remove.
1922 (store_typed_floating): Remove.
1923 (convert_typed_floating): Remove.
1924 * doublest.h (struct type): Remove.
1925 (DOUBLEST_PRINT_FORMAT): Remove.
1926 (DOUBLEST_SCAN_FORMAT): Remove.
1927 (extract_typed_floating): Remove.
1928 (store_typed_floating): Remove.
1929 (convert_typed_floating): Remove.
1930
1931 * dfp.c (decimal_from_doublest): Remove.
1932 (decimal_to_doublest): Remove.
1933 * dfp.h: Do not include "doublest.h".
1934 (decimal_from_doublest): Remove.
1935 (decimal_to_doublest): Remove.
1936
1937 * value.c: Do not include "doublest.h" and "dfp.h".
1938 (value_as_double): Remove.
1939 (unpack_double): Remove.
1940 (value_from_double): Remove.
1941 (value_from_decfloat): Remove.
1942 * value.h: Do not include "doublest.h".
1943 (value_as_double): Remove.
1944 (unpack_double): Remove.
1945 (value_from_double): Remove.
1946 (value_from_decfloat): Remove.
1947
1948 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1949
1950 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1951 (i386_extract_return_value): Use target_float_convert.
1952 (i386_store_return_value): Likewise.
1953 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1954 (i387_value_to_register): Likewise.
1955 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1956 (ia64_register_to_value): Use target_float_convert.
1957 (ia64_value_to_register): Likewise.
1958 (ia64_extract_return_value): Likewise.
1959 (ia64_store_return_value): Likewise.
1960 (ia64_push_dummy_call): Likewise.
1961 * m68k-tdep.c: Include "target-float.h".
1962 (m68k_register_to_value): Use target_float_convert.
1963 (m68k_value_to_register): Likewise.
1964 (m68k_svr4_extract_return_value): Likewise.
1965 (m68k_svr4_store_return_value): Likewise.
1966 * ppc-sysv-tdep.c: Include "target-float.h".
1967 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1968 (do_ppc_sysv_return_value): Likewise.
1969 (ppc64_sysv_abi_push_freg): Likewise.
1970 (ppc64_sysv_abi_return_value_base): Likewise.
1971 * rs6000-aix-tdep.c: Include "target-float.h".
1972 (rs6000_push_dummy_call): Use target_float_convert.
1973 (rs6000_return_value): Likewise.
1974 * rs6000-lynx178-tdep.c: Include "target-float.h".
1975 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1976 (rs6000_lynx178_return_value): Likewise.
1977 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1978 (rs6000_register_to_value): Use target_float_convert.
1979 (rs6000_value_to_register): Likewise.
1980 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1981 (arm_extract_return_value): Use target_float_convert.
1982 (arm_store_return_value): Likewise.
1983 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1984 (sh_register_convert_to_virtual): Use target_float_convert.
1985 (sh_register_convert_to_raw): Likewise.
1986 * sh64-tdep.c: Include "target-float.h".
1987 (sh64_extract_return_value): Use target_float_convert.
1988 (sh64_register_convert_to_virtual): Likewise.
1989 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1990
1991 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1992
1993 * target-float.c (floatformat_to_host_double): New function.
1994 (floatformat_from_host_double): Likewise.
1995 (target_float_to_host_double): Likewise.
1996 (target_float_from_host_double): Likewise.
1997 * target-float.h (target_float_to_host_double): Add prototype.
1998 (target_float_from_host_double): Likewise.
1999
2000 * guile/scm-value.c: Include "target-float.h".
2001 (gdbscm_value_to_real): Use target_float_to_host_double.
2002 Handle integer source values via value_as_long.
2003 * guile/scm-math.c: Include "target-float.h". Do not include
2004 "doublest.h", "dfp.h", and "expression.h".
2005 (vlscm_convert_typed_number): Use target_float_from_host_double.
2006 (vlscm_convert_number): Likewise.
2007
2008 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2009 (convert_value_from_python): Use target_float_from_host_double.
2010
2011 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2012
2013 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2014 (cast_from_fixed): Likewise.
2015 (ada_scaling_type): New function.
2016 (ada_delta): Return value instead of DOUBLEST. Perform target
2017 arithmetic instead of host arithmetic.
2018 (scaling_factor): Rename to ...
2019 (ada_scaling_factor) ... this. Make non-static. Return value instead
2020 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2021 (ada_fixed_to_float): Remove.
2022 (ada_float_to_fixed): Remove.
2023 * ada-lang.h (ada_fixed_to_float): Remove.
2024 (ada_float_to_fixed): Remove.
2025 (ada_delta): Return value instead of DOUBLEST.
2026 (ada_scaling_factor): Add prototype.
2027
2028 * ada-typeprint.c: Include "target-float.h".
2029 (print_fixed_point_type): Perform target arithmetic instead of
2030 host arithmetic.
2031 * ada-valprint.c: Include "target-float.h".
2032 (ada_val_print_num): Perform target arithmetic instead of
2033 host arithmetic for fixed-point types.
2034
2035 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2036
2037 * target-float.c: Include <math.h>.
2038 (floatformat_binop): New function.
2039 (floatformat_compare): Likewise.
2040 (target_float_binop): Likewise.
2041 (target_float_compare): Likewise.
2042 * target-float.h: Include "expression.h".
2043 (target_float_binop): Add prototype.
2044 (target_float_compare): Likewise.
2045
2046 * valarith.c: Do not include "doublest.h" and "dfp.h".
2047 Include "common/byte-vector.h".
2048 (value_args_as_decimal): Remove, replace by ...
2049 (value_args_as_target_float): ... this function. Handle both
2050 binary and decimal target floating-point formats.
2051 (scalar_binop): Handle both binary and decimal FP using
2052 value_args_as_target_float and target_float_binop.
2053 (value_equal): Handle both binary and decimal FP using
2054 value_args_as_target_float and target_float_compare.
2055 (value_less): Likewise.
2056 (value_pos): Handle all scalar types as simple copy.
2057 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2058 * dfp.c (decimal_binop): Throw error instead of internal_error
2059 when called with an unsupported operation code.
2060
2061 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2062
2063 * target-float.c (target_float_to_string): New function.
2064 (target_float_from_string): New function.
2065 * target-float.h (target_float_to_string): Add prototype.
2066 (target_float_from_string): Add prototype.
2067
2068 * valprint.c: Include "target-float.h". Do not include
2069 "doublest.h" and "dfp.h".
2070 (print_floating): Use target_float_to_string.
2071 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2072 (printf_floating): Use target_float_to_string.
2073 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2074 (print_i387_value): Use target_float_to_string.
2075 * mips-tdep.c: Include "target-float.h".
2076 (mips_print_fp_register): Use target_float_to_string.
2077 * sh64-tdep.c: Include "target-float.h".
2078 (sh64_do_fp_register): Use target_float_to_string.
2079
2080 * parse.c: Include "target-float.h". Do not include
2081 "doublest.h" and "dfp.h".
2082 (parse_float): Use target_float_from_string.
2083 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2084 (define_symbol): Use target_float_from_string.
2085 * gdbarch-selftests.c: Include "target-float.h".
2086 (register_to_value_test): Use target_float_from_string.
2087
2088 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2089
2090 * Makefile.c (SFILES): Add target-float.c.
2091 (HFILES_NO_SRCDIR): Add target-float.h.
2092 (COMMON_OBS): Add target-float.o.
2093 * target-float.h: New file.
2094 * target-float.c: New file.
2095
2096 * doublest.c (floatformat_classify): Fix detection of float_zero.
2097
2098 * gdbtypes.c (is_floating_type): New function.
2099 * gdbtypes.h (is_floating_type): Add prototype.
2100
2101 * value.c: Do not include "floatformat.h".
2102 (unpack_double): Use target_float_is_valid.
2103 (is_floating_value): New function.
2104 * value.h (is_floating_value): Add prototype-
2105
2106 * valarith.c: Include "target-float.h".
2107 (value_logical_not): Use target_float_is_zero.
2108
2109 * python/py-value.c: Include "target-float.h".
2110 (valpy_nonzero): Use target_float_is_zero.
2111
2112 2017-11-04 Tom Tromey <tom@tromey.com>
2113
2114 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2115
2116 2017-11-04 Tom Tromey <tom@tromey.com>
2117
2118 * breakpoint.c (set_momentary_breakpoint): Return
2119 breakpoint_up.
2120 (until_break_command): Update.
2121 (new_until_break_fsm): Change argument types to
2122 breakpoint_up.
2123 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2124 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2125 Remove.
2126 * infcmd.c (finish_forward): Update.
2127 * breakpoint.h (set_momentary_breakpoint)
2128 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2129 (make_cleanup_delete_breakpoint): Remove.
2130 (struct breakpoint_deleter): New.
2131 (breakpoint_up): New typedef.
2132 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2133 (insert_exception_resume_breakpoint): Update.
2134 (insert_exception_resume_from_probe): Update.
2135 (insert_longjmp_resume_breakpoint): Update.
2136 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2137 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2138 * infcall.c (call_function_by_hand_dummy): Update
2139
2140 2017-11-04 Tom Tromey <tom@tromey.com>
2141
2142 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2143
2144 2017-11-04 Tom Tromey <tom@tromey.com>
2145
2146 * linux-tdep.c (linux_core_info_proc_mappings): Use
2147 gdb::def_vector.
2148 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2149 "size" argument.
2150 (linux_corefile_thread): Update.
2151 (linux_make_corefile_notes): Remove unused variable.
2152
2153 2017-11-04 Tom Tromey <tom@tromey.com>
2154
2155 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2156 gdb::byte_vector.
2157
2158 2017-11-04 Tom Tromey <tom@tromey.com>
2159
2160 * objfiles.c (do_free_objfile_cleanup): Remove.
2161 * compile/compile-object-load.c (compile_object_load): Update.
2162 * objfiles.h (make_cleanup_free_objfile): Remove.
2163
2164 2017-11-04 Tom Tromey <tom@tromey.com>
2165
2166 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2167 (adi_read_versions): Change "tags" to "gdb_byte *".
2168 (adi_print_versions): Likewise.
2169
2170 2017-11-04 Tom Tromey <tom@tromey.com>
2171
2172 * breakpoint.c
2173 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2174 from start_rbreak_breakpoints.
2175 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2176 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2177 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2178 * symtab.c (do_end_rbreak_breakpoints): Remove.
2179 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2180
2181 2017-11-04 Tom Tromey <tom@tromey.com>
2182
2183 * cp-namespace.c (reset_directive_searched): Remove.
2184 (cp_lookup_symbol_via_imports): Use scoped_restore.
2185 * cp-support.c (reset_directive_searched): Remove.
2186 (make_symbol_overload_list_using): Use scoped_restore.
2187 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2188 (reset_directive_searched): Remove.
2189
2190 2017-11-04 Tom Tromey <tom@tromey.com>
2191
2192 * symfile.c (find_separate_debug_file_by_debuglink): Use
2193 unique_xmalloc_ptr.
2194
2195 2017-11-04 Tom Tromey <tom@tromey.com>
2196
2197 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2198 type of "info".
2199 (compute_stack_depth): Likewise.
2200 (do_compile_dwarf_expr_to_c): Use std::vector.
2201
2202 2017-11-04 Tom Tromey <tom@tromey.com>
2203
2204 * compile/compile-object-load.c (link_callbacks_einfo): Use
2205 std::string.
2206
2207 2017-11-04 Tom Tromey <tom@tromey.com>
2208
2209 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2210 Use scoped_free_pendings.
2211 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2212 scoped_free_pendings.
2213 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2214 (xcoff_initial_scan): Likewise.
2215 * buildsym.c (reset_symtab_globals): Update comment.
2216 (scoped_free_pendings): Rename from really_free_pendings.
2217 (prepare_for_building): Update comment.
2218 (buildsym_init): Likewise.
2219 * buildsym.h (class scoped_free_pendings): New class.
2220 (really_free_pendings): Don't declare.
2221
2222 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2223
2224 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2225 output when converting a zero value to a special byteorder format.
2226
2227 2017-11-02 Yao Qi <yao.qi@linaro.org>
2228
2229 * frame.c (do_frame_register_read): Remove aspace.
2230 * jit.c (jit_frame_sniffer): Likwise.
2231 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2232 * regcache.c (regcache::regcache): Pass nullptr.
2233 (regcache_print): Caller updated.
2234 * regcache.h (regcache::regcache): Remove one constructor
2235 parameter aspace.
2236
2237 2017-11-02 Yao Qi <yao.qi@linaro.org>
2238
2239 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2240
2241 2017-11-02 Yao Qi <yao.qi@linaro.org>
2242
2243 * breakpoint.c (insert_single_step_breakpoints): Update.
2244 * frame.c (struct frame_info) <aspace>: Add const.
2245 (frame_save_as_regcache): Add const.
2246 (get_frame_address_space): Return const address_space *.
2247 * frame.h (get_frame_address_space): Update declaration.
2248 * infrun.c (struct step_over_info) <aspace>: Add const.
2249 (set_step_over_info): Make aspace const.
2250 (displaced_step_prepare_throw): Change variable const.
2251 (resume): Likewise.
2252 (proceed): Likewise.
2253 (adjust_pc_after_break): Likewise.
2254 (save_waitstatus): Likewise.
2255 (handle_signal_stop): Likewise.
2256 (keep_going_pass_signal): Likewise.
2257 * jit.c (jit_frame_sniffer): Add const.
2258 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2259 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2260 * record-full.c (record_full_wait_1): Likewise.
2261 * regcache.c (regcache::regcache): Change parameter to const.
2262 * regcache.h (regcache::regcache): Likewise.
2263 (regcache::aspace): Return const address_space *.
2264 (regcache) <m_aspace>: Add const.
2265
2266 2017-11-02 Yao Qi <yao.qi@linaro.org>
2267
2268 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2269 * frame.c (create_sentinel_frame): Likewise.
2270 * infrun.c (displaced_step_prepare_throw): Likewise.
2271 (resume): Likewise.
2272 (thread_still_needs_step_over_bp): Likewise.
2273 (proceed): Likewise.
2274 (do_target_wait): Likewise.
2275 (adjust_pc_after_break): Likewise.
2276 (handle_syscall_event): Likewise.
2277 (save_waitstatus): Likewise.
2278 (handle_inferior_event_1): Likewise.
2279 (handle_signal_stop): Likewise.
2280 (keep_going_pass_signal): Likewise.
2281 * linux-nat.c (status_callback): Likewise.
2282 (save_stop_reason): Likewise.
2283 (resume_stopped_resumed_lwps): Likewise.
2284 * record-full.c (record_full_exec_insn): Likewise.
2285 (record_full_wait_1): Likewise.
2286 * regcache.c (get_regcache_aspace): Remove.
2287 * regcache.h (get_regcache_aspace): Remove.
2288
2289 2017-11-02 Yao Qi <yao.qi@linaro.org>
2290
2291 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2292 (init_regcache_descr): Use gdbarch_num_regs.
2293 (regcache::regcache): Likewise.
2294 (regcache::get_register_status): Likewise.
2295 (regcache::assert_raw_regnum): Likewise.
2296 (regcache::cooked_read): Likewise.
2297 (regcache::cooked_read_value): Likewise.
2298 (regcache::cooked_write): Likewise.
2299 (regcache::dump): Likewise.
2300 (regcache::num_raw_registers): New method.
2301 * regcache.h (class regcache) <num_raw_registers>: New.
2302
2303 2017-11-02 Yao Qi <yao.qi@linaro.org>
2304
2305 * regcache.c (regcache::assert_regnum): New method.
2306 (regcache::invalidate): Call assert_regnum.
2307 (regcache::raw_update): Likewise.
2308 (regcache::raw_write): Likewise.
2309 (regcache::raw_read_part): Likewise.
2310 (regcache::raw_write_part): Likewise.
2311 (regcache::raw_supply): Likewise.
2312 (regcache::raw_supply_integer): Likewise.
2313 (regcache::raw_supply_zeroed): Likewise.
2314 (regcache::raw_collect): Likewise.
2315 (regcache::raw_collect_integer): Likewise.
2316 * regcache.h (regcache::assert_regnum): Declare.
2317
2318 2017-11-02 Yao Qi <yao.qi@linaro.org>
2319
2320 * regcache.c (regcache::dump): Remove code.
2321
2322 2017-11-02 Yao Qi <yao.qi@linaro.org>
2323
2324 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2325 Remove.
2326 <sizeof_cooked_register_status>: Remove.
2327 (init_regcache_descr): Update.
2328 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2329 (regcache::save): Likewise.
2330 (regcache::dump): Likewise.
2331
2332 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2333
2334 * ft32-tdep.c (ft32_fetch_instruction): New function.
2335 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2336
2337 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2338
2339 * cli/cli-script.c (execute_control_command): Rename to ...
2340 (execute_control_command_1): ... this.
2341 (execute_control_command): New function.
2342
2343 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2344
2345 * tracepoint.c (tfind_command): Remove const_cast.
2346
2347 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2348
2349 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2350
2351 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2352
2353 * common/common-utils.h (in_inclusive_range): New function.
2354 * arm-tdep.c (arm_record_extension_space): Use
2355 in_inclusive_range.
2356 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2357 * cris-tdep.c (cris_spec_reg_applicable): Use
2358 in_inclusive_range.
2359
2360 2017-10-30 Pedro Alves <palves@redhat.com>
2361 Simon Marchi <simon.marchi@ericsson.com>
2362
2363 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2364 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2365
2366 2017-10-30 Pedro Alves <palves@redhat.com>
2367
2368 * common/common-utils.c (string_appendf, string_vappendf): New
2369 functions.
2370 * common/common-utils.h (string_appendf, string_vappendf): New
2371 declarations.
2372 * unittests/common-utils-selftests.c (string_appendf_func)
2373 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2374 (string_vappendf_tests): New functions.
2375 (_initialize_common_utils_selftests): Register "string_appendf" and
2376 "string_vappendf tests".
2377
2378 2017-10-30 Pedro Alves <palves@redhat.com>
2379
2380 * unittests/common-utils-selftests.c (format_func): New typedef.
2381 (string_printf_tests, string_vprintf_tests): Tests factored out
2382 and merged to ...
2383 (test_format_func): ... this new function.
2384 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2385 test_format_func.
2386
2387 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2388
2389 * darwin-nat.c: Remove include of gdb.h.
2390
2391 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2392
2393 * xtensa-xtregs.c: Fix formatting issues.
2394
2395 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2396
2397 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2398
2399 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2400
2401 PR python/21213
2402 * python/py-infthread.c (thpy_get_inferior): Increment reference
2403 of inferior before returning it.
2404
2405 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2406
2407 * unittests/common-utils-selftests.c (format): Add
2408 ATTRIBUTE_PRINTF.
2409
2410 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2411
2412 * xml-syscall.c (struct syscall_desc): Add constructor.
2413 <name>: Change type to std::string.
2414 (syscall_desc_up): New typedef.
2415 (syscall_desc_p): Remove typeder.
2416 (DEF_VEC_P(syscall_desc_p)): Remove.
2417 (struct syscall_group_desc): Add constructor.
2418 <name>: Change type to std::string.
2419 <syscalls>: Change type to std::vector.
2420 (syscall_group_desc_up): New typedef.
2421 (syscall_group_desc_p): Remove typedef.
2422 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2423 (struct syscalls_info) <syscalls>: Change type to std::vector of
2424 unique_ptr.
2425 <groups>: Likewise.
2426 <my_gdb_datadir>: Change type to std::string.
2427 (syscalls_info_up): New typedef.
2428 (allocate_syscalls_info): Remove.
2429 (syscalls_info_free_syscalls_desc): Remove.
2430 (syscalls_info_free_syscall_group_desc): Remove.
2431 (free_syscalls_info): Remove.
2432 (make_cleanup_free_syscalls_info): Remove.
2433 (syscall_group_create_syscall_group_desc): Adjust.
2434 (syscall_group_add_syscall): Adjust.
2435 (syscall_create_syscall_desc): Adjust.
2436 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2437 (init_syscalls_info): Adjust.
2438 (syscall_group_get_group_by_name): Adjust.
2439 (xml_get_syscall_number): Adjust.
2440 (xml_get_syscall_name): Adjust.
2441 (xml_list_of_syscalls): Adjust.
2442 (xml_list_syscalls_by_group): Adjust.
2443 (xml_list_of_groups): Adjust.
2444
2445 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2446
2447 * probe.h: Don't include gdb_vecs.h.
2448 (DEF_VEC_P (probe_p)): Remove.
2449 (find_probes_in_objfile): Return an std::vector.
2450 * probe.c (find_probes_in_objfile): Likewise.
2451 * breakpoint.c (breakpoint_objfile_data)
2452 <longjmp_probes>: Change type to std::vector.
2453 <exception_probes>: Likewise.
2454 (free_breakpoint_probes): Don't manually free vectors.
2455 (create_longjmp_master_breakpoint): Adjust.
2456 (create_exception_master_breakpoint): Adjust.
2457 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2458 parameter type, adjust.
2459 (svr4_create_solib_event_breakpoints): Adjust.
2460
2461 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2462
2463 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2464 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2465 with new.
2466 (free_breakpoint_probes): Rename to ...
2467 (free_breakpoint_objfile_data): ... this, and call delete on
2468 bp_objfile_data..
2469
2470 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2471
2472 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2473 (loaded_script_ptr): Remove typedef.
2474 (DEF_VEC_P (loaded_script_ptr)): Remove.
2475 (struct collect_matching_scripts_data): Add constructor.
2476 <scripts_p>: Change type to (pointer to) std::vector.
2477 (collect_matching_scripts_data): Adjust.
2478 (sort_scripts_by_name): Make suitable for std::sort.
2479 (print_scripts): Don't sort vector, adjust to std::vector.
2480 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2481
2482 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2483
2484 * symfile.c (filename_language): Make struct, not typedef. Add
2485 constructor.
2486 <ext>: Change type to std::string.
2487 (DEF_VEC_O (filename_language)): Remove.
2488 (filename_language_table): Change type to std::vector.
2489 (add_filename_language): Adjust.
2490 (set_ext_lang_command): Adjust.
2491 (info_ext_lang_command): Adjust.
2492 (deduce_language_from_filename): Adjust.
2493 (class scoped_restore_filename_language_table): Remove.
2494 (test_filename_language): Use scoped_restore.
2495 (test_set_ext_lang_command): Use scoped_restore, adjust to
2496 std::vector change.
2497
2498 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2499
2500 * symfile.c: Include selftest.h.
2501 (class scoped_restore_filename_language_table): New.
2502 (test_filename_language): New test.
2503 (test_set_ext_lang_command): New test.
2504 (_initialize_symfile): Register tests.
2505
2506 2017-10-27 Keith Seitz <keiths@redhat.com>
2507
2508 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2509 in the bp_location, falling back to find_pc_sect_function when
2510 needed.
2511 (add_location_to_breakpoint): Save sal->symbol.
2512 * breakpoint.h (struct bp_location) <symbol>: New field.
2513 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2514 * symtab.h (struct symtab_and_line) <symbol>: New field.
2515
2516 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2517
2518 PR gdb/13669
2519 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2520 to rewind obstack.
2521
2522 2017-10-26 Pedro Alves <palves@redhat.com>
2523
2524 * remote.c (remote_async_terminal_ours_p): Delete.
2525 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2526 Remove references to 'remote_async_terminal_ours_p'.
2527
2528 2017-10-26 Yao Qi <yao.qi@linaro.org>
2529
2530 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2531
2532 2017-10-26 Yao Qi <yao.qi@linaro.org>
2533
2534 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2535 aspace const.
2536 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2537 Likewise.
2538 * breakpoint.c (bpstat_check_location): Remove cast.
2539 (breakpoint_hit_catch_fork): Make aspce const.
2540 (breakpoint_hit_catch_solib): Likewise.
2541 (breakpoint_hit_catch_exec): Likewise.
2542 (breakpoint_hit_ranged_breakpoint): Likewise.
2543 (breakpoint_hit_watchpoint): Likewise.
2544 (base_breakpoint_breakpoint_hit): Likewise.
2545 (bkpt_breakpoint_hit): Likewise.
2546 (dprintf_breakpoint_hit): Likewise.
2547 (tracepoint_breakpoint_hit): Likewise.
2548 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2549
2550 2017-10-26 Yao Qi <yao.qi@linaro.org>
2551
2552 * breakpoint.c (breakpoint_location_address_match): Change
2553 "struct address_space *" to "const address_space".
2554 (breakpoint_location_address_range_overlap): Likewise.
2555 (breakpoint_here_p): Likewise.
2556 (breakpoint_in_range_p): Likewise.
2557 (moribund_breakpoint_here_p): Likewise.
2558 (bp_location_inserted_here_p): Likewise.
2559 (software_breakpoint_inserted_here_p): Likewise.
2560 (hardware_breakpoint_inserted_here_p): Likewise.
2561 (hardware_watchpoint_inserted_in_range): Likewise.
2562 (bpstat_check_location): Likewise.
2563 (bpstat_stop_status): Likewise.
2564 (breakpoint_address_match): Likewise.
2565 (breakpoint_address_match_range): Likewise.
2566 (breakpoint_location_address_match): Likewise.
2567 (breakpoint_location_address_range_overlap): Likewise.
2568 (insert_single_step_breakpoint): Likewise.
2569 (breakpoint_has_location_inserted_here): Likewise.
2570 (single_step_breakpoint_inserted_here_p): Likewise.
2571 (pc_at_non_inline_function): Likewise.
2572 * breakpoint.h (bpstat_stop_status): Update declaration.
2573 (breakpoint_here_p): Likewise.
2574 (breakpoint_in_range_p): Likewise.
2575 (moribund_breakpoint_here_p): Likewise.
2576 (breakpoint_inserted_here_p): Likewise.
2577 (software_breakpoint_inserted_here_p): Likewise.
2578 (hardware_breakpoint_inserted_here_p): Likewise.
2579 (breakpoint_has_location_inserted_here): Likewise.
2580 (single_step_breakpoint_inserted_here_p): Likewise.
2581 (hardware_watchpoint_inserted_in_range): Likewise.
2582 (breakpoint_address_match): Likewise.
2583 (insert_single_step_breakpoint): Likewise.
2584 (pc_at_non_inline_function): Likewise.
2585 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2586 * record.c (record_check_stopped_by_breakpoint): Likewise.
2587 * record.h (record_check_stopped_by_breakpoint): Likewise.
2588 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2589
2590 2017-10-25 Yao Qi <yao.qi@linaro.org>
2591
2592 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2593 regcache->arch () instead get_regcache_arch.
2594 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2595 Likewise.
2596 (aarch64_fbsd_store_inferior_registers): Likewise.
2597 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2598 (store_gregs_to_thread): Likewise.
2599 (fetch_fpregs_from_thread): Likewise.
2600 (store_fpregs_to_thread): Likewise.
2601 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2602 (aarch64_store_return_value): Likewise.
2603 (aarch64_software_single_step): Likewise.
2604 * aix-thread.c (aix_thread_wait): Likewise.
2605 (supply_reg32): Likewise.
2606 (supply_sprs64): Likewise.
2607 (supply_sprs32): Likewise.
2608 (fill_gprs64): Likewise.
2609 (fill_gprs32): Likewise.
2610 (fill_sprs64): Likewise.
2611 (fill_sprs32): Likewise.
2612 (store_regs_user_thread): Likewise.
2613 (store_regs_kernel_thread): Likewise.
2614 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2615 (alphabsd_store_inferior_registers): Likewise.
2616 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2617 (alpha_store_return_value): Likewise.
2618 (alpha_deal_with_atomic_sequence): Likewise.
2619 (alpha_next_pc): Likewise.
2620 (alpha_software_single_step): Likewise.
2621 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2622 (amd64bsd_store_inferior_registers): Likewise.
2623 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2624 Likewise.
2625 (amd64_linux_store_inferior_registers): Likewise.
2626 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2627 (amd64_collect_native_gregset): Likewise.
2628 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2629 (amd64obsd_collect_uthread): Likewise.
2630 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2631 (amd64_collect_fpregset): Likewise.
2632 (amd64_supply_fxsave): Likewise.
2633 (amd64_supply_xsave): Likewise.
2634 (amd64_collect_fxsave): Likewise.
2635 (amd64_collect_xsave): Likewise.
2636 * arc-tdep.c (arc_write_pc): Likewise.
2637 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2638 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2639 (arm_fbsd_store_inferior_registers): Likewise.
2640 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2641 (store_vfp_regs): Likewise.
2642 (arm_linux_fetch_inferior_registers): Likewise.
2643 (arm_linux_store_inferior_registers): Likewise.
2644 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2645 (arm_linux_sigreturn_next_pc): Likewise.
2646 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2647 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2648 (fetch_register): Likewise.
2649 (store_register): Likewise.
2650 * arm-tdep.c (arm_is_thumb): Likewise.
2651 (displaced_in_arm_mode): Likewise.
2652 (bx_write_pc): Likewise.
2653 (arm_get_next_pcs_addr_bits_remove): Likewise.
2654 (arm_software_single_step): Likewise.
2655 (arm_extract_return_value): Likewise.
2656 (arm_store_return_value): Likewise.
2657 (arm_write_pc): Likewise.
2658 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2659 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2660 (bsd_uthread_store_registers): Likewise.
2661 * core-regset.c (fetch_core_registers): Likewise.
2662 * corelow.c (get_core_registers): Likewise.
2663 * cris-tdep.c (cris_store_return_value): Likewise.
2664 (cris_extract_return_value): Likewise.
2665 (find_step_target): Likewise.
2666 (find_step_target): Likewise.
2667 (cris_software_single_step): Likewise.
2668 * ctf.c (ctf_fetch_registers): Likewise.
2669 * darwin-nat.c (cancel_breakpoint): Likewise.
2670 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2671 * frv-tdep.c (frv_extract_return_value): Likewise.
2672 * ft32-tdep.c (ft32_store_return_value): Likewise.
2673 (ft32_extract_return_value): Likewise.
2674 * go32-nat.c (fetch_register): Likewise.
2675 (go32_fetch_registers): Likewise.
2676 (go32_store_registers): Likewise.
2677 (store_register): Likewise.
2678 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2679 (h8300_store_return_value): Likewise.
2680 * hppa-linux-nat.c (fetch_register): Likewise.
2681 (store_register): Likewise.
2682 (hppa_linux_fetch_inferior_registers): Likewise.
2683 (hppa_linux_store_inferior_registers): Likewise.
2684 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2685 (i386_darwin_store_inferior_registers): Likewise.
2686 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2687 (gnu_store_registers): Likewise.
2688 * i386-linux-nat.c (fetch_register): Likewise.
2689 (store_register): Likewise.
2690 (supply_gregset): Likewise.
2691 (fill_gregset): Likewise.
2692 (i386_linux_fetch_inferior_registers): Likewise.
2693 (i386_linux_store_inferior_registers): Likewise.
2694 (i386_linux_resume): Likewise.
2695 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2696 Likewise.
2697 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2698 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2699 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2700 (i386obsd_collect_uthread): Likewise.
2701 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2702 (i386_supply_gregset): Likewise.
2703 (i386_collect_gregset): Likewise.
2704 (i386_supply_fpregset): Likewise.
2705 (i386_collect_fpregset): Likewise.
2706 (i386_mpx_bd_base): Likewise.
2707 * i386-v4-nat.c (supply_fpregset): Likewise.
2708 (fill_fpregset): Likewise.
2709 * i387-tdep.c (i387_supply_fsave): Likewise.
2710 (i387_collect_fsave): Likewise.
2711 (i387_supply_fxsave): Likewise.
2712 (i387_collect_fxsave): Likewise.
2713 (i387_supply_xsave): Likewise.
2714 (i387_collect_xsave): Likewise.
2715 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2716 (ia64_linux_store_registers): Likewise.
2717 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2718 (ia64_extract_return_value): Likewise.
2719 (ia64_store_return_value): Likewise.
2720 (find_func_descr): Likewise.
2721 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2722 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2723 (inf_ptrace_store_registers): Likewise.
2724 * infrun.c (use_displaced_stepping): Likewise.
2725 (displaced_step_prepare_throw): Likewise.
2726 (resume): Likewise.
2727 (proceed): Likewise.
2728 (do_target_wait): Likewise.
2729 (adjust_pc_after_break): Likewise.
2730 (handle_inferior_event_1): Likewise.
2731 (handle_signal_stop): Likewise.
2732 (save_infcall_suspend_state): Likewise.
2733 (restore_infcall_suspend_state): Likewise.
2734 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2735 * jit.c (jit_frame_prev_register): Likewise.
2736 * linux-nat.c (save_stop_reason): Likewise.
2737 (linux_nat_wait_1): Likewise.
2738 (resume_stopped_resumed_lwps): Likewise.
2739 * linux-record.c (record_linux_sockaddr): Likewise.
2740 (record_linux_msghdr): Likewise.
2741 (record_linux_system_call): Likewise.
2742 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2743 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2744 (lm32_store_return_value): Likewise.
2745 * m32c-tdep.c (m32c_read_flg): Likewise.
2746 (m32c_pseudo_register_read): Likewise.
2747 (m32c_pseudo_register_write): Likewise.
2748 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2749 (m32r_linux_collect_gregset): Likewise.
2750 * m32r-tdep.c (m32r_store_return_value): Likewise.
2751 (m32r_extract_return_value): Likewise.
2752 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2753 (m68kbsd_collect_fpregset): Likewise.
2754 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2755 * m68k-linux-nat.c (fetch_register): Likewise.
2756 (old_fetch_inferior_registers): Likewise.
2757 (old_store_inferior_registers): Likewise.
2758 (store_regs): Likewise.
2759 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2760 (m68k_svr4_store_return_value): Likewise.
2761 * m88k-tdep.c (m88k_store_arguments): Likewise.
2762 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2763 (mi_cmd_data_write_register_values): Likewise.
2764 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2765 (mips_fbsd_store_inferior_registers): Likewise.
2766 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2767 (mips_fbsd_supply_gregs): Likewise.
2768 (mips_fbsd_collect_fpregs): Likewise.
2769 (mips_fbsd_collect_gregs): Likewise.
2770 (mips_fbsd_supply_fpregset): Likewise.
2771 (mips_fbsd_collect_fpregset): Likewise.
2772 (mips_fbsd_supply_gregset): Likewise.
2773 (mips_fbsd_collect_gregset): Likewise.
2774 * mips-linux-nat.c (supply_gregset): Likewise.
2775 (fill_gregset): Likewise.
2776 (supply_fpregset): Likewise.
2777 (fill_fpregset): Likewise.
2778 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2779 (mips_fill_gregset): Likewise.
2780 (mips_supply_fpregset): Likewise.
2781 (mips_fill_fpregset): Likewise.
2782 (mips64_supply_gregset): Likewise.
2783 (micromips_linux_sigframe_validate): Likewise.
2784 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2785 (mipsnbsd_fetch_inferior_registers): Likewise.
2786 (mipsnbsd_store_inferior_registers): Likewise.
2787 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2788 (mipsnbsd_supply_gregset): Likewise.
2789 (mipsnbsd_iterate_over_regset_sections): Likewise.
2790 (mipsnbsd_supply_reg): Likewise.
2791 (mipsnbsd_supply_fpreg): Likewise.
2792 * mips-tdep.c (mips_in_frame_stub): Likewise.
2793 (mips_dummy_id): Likewise.
2794 (is_octeon_bbit_op): Likewise.
2795 (micromips_bc1_pc): Likewise.
2796 (extended_mips16_next_pc): Likewise.
2797 (mips16_next_pc): Likewise.
2798 (deal_with_atomic_sequence): Likewise.
2799 * moxie-tdep.c (moxie_process_readu): Likewise.
2800 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2801 * nto-procfs.c (procfs_store_registers): Likewise.
2802 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2803 (ppcfbsd_store_inferior_registers): Likewise.
2804 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2805 (fetch_altivec_register): Likewise.
2806 (get_spe_registers): Likewise.
2807 (fetch_spe_register): Likewise.
2808 (fetch_altivec_registers): Likewise.
2809 (fetch_all_gp_regs): Likewise.
2810 (fetch_all_fp_regs): Likewise.
2811 (store_vsx_register): Likewise.
2812 (store_altivec_register): Likewise.
2813 (set_spe_registers): Likewise.
2814 (store_spe_register): Likewise.
2815 (store_altivec_registers): Likewise.
2816 (store_all_gp_regs): Likewise.
2817 (store_all_fp_regs): Likewise.
2818 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2819 (ppc_linux_collect_gregset): Likewise.
2820 (ppc_canonicalize_syscall): Likewise.
2821 (ppc_linux_record_signal): Likewise.
2822 (ppu2spu_prev_register): Likewise.
2823 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2824 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2825 (ppcobsd_store_registers): Likewise.
2826 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2827 Likewise.
2828 (ppc_ravenscar_generic_store_registers): Likewise.
2829 * procfs.c (procfs_fetch_registers): Likewise.
2830 (procfs_store_registers): Likewise.
2831 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2832 (ravenscar_store_registers): Likewise.
2833 (ravenscar_prepare_to_store): Likewise.
2834 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2835 * record-full.c (record_full_wait_1): Likewise.
2836 (record_full_registers_change): Likewise.
2837 (record_full_store_registers): Likewise.
2838 (record_full_core_fetch_registers): Likewise.
2839 (record_full_save): Likewise.
2840 (record_full_goto_insn): Likewise.
2841 * regcache.c (regcache_register_size): Likewise.
2842 (get_regcache_arch): Remove.
2843 (regcache_read_pc): Likewise.
2844 * regcache.h (get_regcache_arch): Remove.
2845 * remote-sim.c (gdbsim_fetch_register): Likewise.
2846 (gdbsim_store_register): Likewise.
2847 * remote.c (fetch_register_using_p): Likewise.
2848 (send_g_packet): Likewise.
2849 (remote_prepare_to_store): Likewise.
2850 (store_registers_using_G): Likewise.
2851 * reverse.c (save_bookmark_command): Likewise.
2852 (goto_bookmark_command): Likewise.
2853 * rs6000-aix-tdep.c (branch_dest): Likewise.
2854 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2855 (fetch_register): Likewise.
2856 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2857 (ppc_collect_reg): Likewise.
2858 (ppc_collect_gregset): Likewise.
2859 (ppc_collect_fpregset): Likewise.
2860 (ppc_collect_vsxregset): Likewise.
2861 (ppc_collect_vrregset): Likewise.
2862 (ppc_displaced_step_hw_singlestep): Likewise.
2863 (rs6000_pseudo_register_read): Likewise.
2864 (rs6000_pseudo_register_write): Likewise.
2865 * s390-linux-nat.c (supply_gregset): Likewise.
2866 (fill_gregset): Likewise.
2867 (s390_linux_fetch_inferior_registers): Likewise.
2868 * s390-linux-tdep.c (s390_write_pc): Likewise.
2869 (s390_software_single_step): Likewise.
2870 (s390_all_but_pc_registers_record): Likewise.
2871 (s390_linux_syscall_record): Likewise.
2872 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2873 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2874 (shnbsd_store_inferior_registers): Likewise.
2875 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2876 (sh_extract_return_value_fpu): Likewise.
2877 (sh_store_return_value_nofpu): Likewise.
2878 (sh_corefile_supply_regset): Likewise.
2879 (sh_corefile_collect_regset): Likewise.
2880 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2881 (sh64_store_return_value): Likewise.
2882 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2883 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2884 (sparc_store_inferior_registers): Likewise.
2885 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2886 (sparc_ravenscar_prepare_to_store): Likewise.
2887 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2888 (sparc_analyze_control_transfer): Likewise.
2889 (sparc_step_trap): Likewise.
2890 (sparc_software_single_step): Likewise.
2891 (sparc32_gdbarch_init): Likewise.
2892 (sparc_supply_rwindow): Likewise.
2893 (sparc_collect_rwindow): Likewise.
2894 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2895 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2896 (sparc64nbsd_collect_gregset): Likewise.
2897 (sparc64nbsd_supply_fpregset): Likewise.
2898 (sparc64nbsd_collect_fpregset): Likewise.
2899 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2900 (sparc64_supply_gregset): Likewise.
2901 (sparc64_collect_gregset): Likewise.
2902 (sparc64_supply_fpregset): Likewise.
2903 (sparc64_collect_fpregset): Likewise.
2904 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2905 * spu-tdep.c (spu_unwind_sp): Likewise.
2906 (spu2ppu_prev_register): Likewise.
2907 (spu_memory_remove_breakpoint): Likewise.
2908 * stack.c (return_command): Likewise.
2909 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2910 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2911 * tracefile.c (trace_save_ctf): Likewise.
2912 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2913 (do_windows_store_inferior_registers): Likewise.
2914 (windows_resume): Likewise.
2915 * xtensa-linux-nat.c (fill_gregset): Likewise.
2916 (supply_gregset_reg): Likewise.
2917 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2918 (xtensa_register_read_masked): Likewise.
2919 (xtensa_supply_gregset): Likewise.
2920 (xtensa_extract_return_value): Likewise.
2921 (xtensa_store_return_value): Likewise.
2922
2923 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2924
2925 * doublest.c (floatformat_from_string): New function.
2926 * doublest.h (floatformat_from_string): Add prototype.
2927
2928 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2929 (OP_FLOAT): ... this.
2930 * expression.h: Do not include "doublest.h".
2931 (union exp_element): Replace doubleconst and decfloatconst by
2932 new element floatconst.
2933 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2934 (ada_evaluate_subexp): Likewise.
2935 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2936 OP_DOUBLE and OP_DECFLOAT.
2937 * expprint.c (print_subexp_standard): Likewise.
2938 (dump_subexp_body_standard): Likewise.
2939 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2940
2941 * parse.c: Include "dfp.h".
2942 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2943 (write_exp_elt_floatcst): New function.
2944 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2945 and OP_DECFLOAT.
2946 (operator_check_standard): Likewise.
2947 (parse_float): Do not accept suffix. Take type as input. Return bool.
2948 Return target format buffer instead of host DOUBLEST.
2949 Use floatformat_from_string and decimal_from_string to parse
2950 either binary or decimal floating-point types.
2951 (parse_c_float): Remove.
2952 * parser-defs.h: Do not include "doublest.h".
2953 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2954 (write_exp_elt_floatcst): Add prototype.
2955 (parse_float): Update prototype.
2956 (parse_c_float): Remove.
2957
2958 * c-exp.y: Do not include "dfp.h".
2959 (typed_val_float): Use byte buffer instead of DOUBLEST.
2960 (typed_val_decfloat): Remove.
2961 (DECFLOAT): Remove.
2962 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2963 (parse_number): Update to new parse_float interface.
2964 Parse suffixes and determine type before calling parse_float.
2965 Handle decimal and binary FP types the same way.
2966
2967 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2968 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2969 (parse_number): Update to new parse_float interface.
2970 Parse suffixes and determine type before calling parse_float.
2971
2972 * f-exp.y: Replace dval by typed_val_float.
2973 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2974 (parse_number): Use parse_float instead of atof.
2975
2976 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2977 (parse_go_float): Remove.
2978 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2979 (parse_number): Call parse_float instead of parse_go_float.
2980 Parse suffixes and determine type before calling parse_float.
2981
2982 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2983 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2984 (parse_number): Update to new parse_float interface.
2985 Parse suffixes and determine type before calling parse_float.
2986
2987 * m2-exp.y: Replace dval by byte buffer val.
2988 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2989 (parse_number): Call parse_float instead of atof.
2990
2991 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2992 (lex_number): Call parse_float instead of strtod.
2993 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2994 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2995 Use write_exp_elt_floatcst.
2996 (unit_testing): Remove static variable.
2997 (rust_type): Do not check unit_testing.
2998 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2999
3000 * ada-exp.y (type_float, type_double): Remove.
3001 (typed_val_float): Use byte buffer instead of DOUBLEST.
3002 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3003 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3004
3005 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3006
3007 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3008 * arch/aarch64.h: New file.
3009
3010 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3011
3012 * dfp.h (decimal_from_string): Use const reference for argument.
3013 * dfp.c (decimal_from_string): Likewise.
3014
3015 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3016
3017 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3018 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3019 * mips-tdep.c (mips_print_fp_register): Likewise.
3020
3021 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3022
3023 * common/format.h (enum argclass): Replace decfloat_arg by
3024 dec32float_arg, dec64float_arg, and dec128float_arg.
3025 * common/format.c (parse_format_string): Update to return
3026 new decimal float argument classes.
3027
3028 * printcmd.c (printf_decfloat): Rename to ...
3029 (printf_floating): ... this. Add argclass argument, and use it
3030 instead of parsing the format string again. Add support for
3031 binary floating-point values, using floatformat_to_string.
3032 Convert value to the target format if it doesn't already match.
3033 (ui_printf): Call printf_floating instead of printf_decfloat,
3034 also for double_arg / long_double_arg. Pass argclass.
3035
3036 * dfp.c (decimal_to_string): Add format string argument.
3037 * dfp.h (decimal_to_string): Likewise.
3038
3039 * doublest.c (floatformat_to_string): Add format string argument.
3040 * doublest.h (floatformat_to_string): Likewise.
3041
3042 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3043
3044 * doublest.c (floatformat_precision): New routine.
3045 (floatformat_to_string): Likewise.
3046 * doublest.c (floatformat_to_string): Add prototype.
3047
3048 * printcmd.c (print_scalar_formatted): Only call print_floating
3049 on floating-point types.
3050 * valprint.c: Do not include "floatformat.h".
3051 (generic_val_print_decfloat): Remove.
3052 (generic_val_print): Call generic_val_print_float for both
3053 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3054 (print_floating): Use floatformat_to_string. Handle decimal float.
3055 (print_decimal_floating): Remove, merge into floatformat_to_string.
3056 * value.h (print_decimal_floating): Remove.
3057
3058 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3059
3060 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3061
3062 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3063
3064 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3065
3066 * memattr.h: Don't include vec.h.
3067 (struct mem_attrib): Initialize fields.
3068 <unknown>: New static method.
3069 (struct mem_region): Add constructors, operator<, initialize
3070 fields.
3071 * memattr.c: Include algorithm.
3072 (default_mem_attrib, unknown_mem_attrib): Remove.
3073 (user_mem_region_list): New global.
3074 (target_mem_region_list, mem_region_list): Change type to
3075 std::vector<mem_region>.
3076 (mem_use_target): Now a function.
3077 (target_mem_regions_valid): Change type to bool.
3078 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3079 (require_user_regions): Adjust.
3080 (require_target_regions): Adjust.
3081 (create_mem_region): Adjust.
3082 (lookup_mem_region): Adjust.
3083 (invalidate_target_mem_regions): Adjust.
3084 (mem_clear): Rename to...
3085 (user_mem_clear): ... this, and adjust.
3086 (mem_command): Adjust.
3087 (info_mem_command): Adjust.
3088 (mem_enable, enable_mem_command, mem_disable,
3089 disable_mem_command): Adjust.
3090 (mem_delete): Adjust.
3091 (delete_mem_command): Adjust.
3092 * memory-map.h (parse_memory_map): Return an std::vector.
3093 * memory-map.c (parse_memory_map): Likewise.
3094 (struct memory_map_parsing_data): Add constructor.
3095 <memory_map>: Point to std::vector.
3096 (memory_map_start_memory): Adjust.
3097 (memory_map_end_memory): Adjust.
3098 (memory_map_end_property): Adjust.
3099 (clear_result): Remove.
3100 * remote.c (remote_memory_map): Return an std::vector.
3101 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3102 Remove.
3103 (target_debug_print_mem_region_vector): New.
3104 * target-delegates.c: Regenerate.
3105 * target.h (mem_region_vector): New typedef.
3106 (to_memory_map): Return mem_region_vector.
3107 (target_memory_map): Return an std::vector.
3108 * target.c (target_memory_map): Return an std::vector.
3109 (flash_erase_command): Adjust.
3110
3111 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3112
3113 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3114 Change type to std::string.
3115 (memory_map_start_property): Adjust.
3116 (memory_map_end_property): Adjust.
3117
3118 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3119
3120 * infrun.h: Include common/byte-vector.h.
3121 (struct displaced_step_closure): New struct.
3122 (struct buf_displaced_step_closure): New struct.
3123 * infrun.c (displaced_step_closure::~displaced_step_closure):
3124 Provide default implementation.
3125 (displaced_step_clear): Deallocate step closure with delete.
3126 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3127 (aarch64_displaced_step_closure): ... this, extend
3128 displaced_step_closure.
3129 (aarch64_displaced_step_data) <dsc>: Change type to
3130 aarch64_displaced_step_closure.
3131 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3132 unique_ptr.
3133 (aarch64_displaced_step_fixup): Add cast for displaced step
3134 closure.
3135 * amd64-tdep.c (displaced_step_closure): Rename to ...
3136 (amd64_displaced_step_closure): ... this, extend
3137 displaced_step_closure.
3138 <insn_buf>: Change type to std::vector<gdb_byte>.
3139 <max_len>: Remove.
3140 (fixup_riprel): Change type of DSC parameter, adjust to type
3141 change of insn_buf.
3142 (fixup_displaced_copy): Change type of DSC parameter.
3143 (amd64_displaced_step_copy_insn): Instantiate
3144 amd64_displaced_step_closure.
3145 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3146 to type change of insn_buf.
3147 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3148 parameter DSC.
3149 (arm_linux_copy_svc): Likewise.
3150 (cleanup_kernel_helper_return): Likewise.
3151 (arm_catch_kernel_helper_return): Likewise.
3152 (arm_linux_displaced_step_copy_insn): Instantiate
3153 arm_displaced_step_closure.
3154 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3155 (displaced_read_reg): Change type of parameter DSC.
3156 (branch_write_pc): Likewise.
3157 (load_write_pc): Likewise.
3158 (alu_write_pc): Likewise.
3159 (displaced_write_reg): Likewise.
3160 (arm_copy_unmodified): Likewise.
3161 (thumb_copy_unmodified_32bit): Likewise.
3162 (thumb_copy_unmodified_16bit): Likewise.
3163 (cleanup_preload): Likewise.
3164 (install_preload): Likewise.
3165 (arm_copy_preload): Likewise.
3166 (thumb2_copy_preload): Likewise.
3167 (install_preload_reg): Likewise.
3168 (arm_copy_preload_reg): Likewise.
3169 (cleanup_copro_load_store): Likewise.
3170 (install_copro_load_store): Likewise.
3171 (arm_copy_copro_load_store) Likewise.
3172 (thumb2_copy_copro_load_store): Likewise.
3173 (cleanup_branch): Likewise.
3174 (install_b_bl_blx): Likewise.
3175 (arm_copy_b_bl_blx): Likewise.
3176 (thumb2_copy_b_bl_blx): Likewise.
3177 (thumb_copy_b): Likewise.
3178 (install_bx_blx_reg): Likewise.
3179 (arm_copy_bx_blx_reg): Likewise.
3180 (thumb_copy_bx_blx_reg): Likewise.
3181 (cleanup_alu_imm): Likewise.
3182 (arm_copy_alu_imm): Likewise.
3183 (thumb2_copy_alu_imm): Likewise.
3184 (cleanup_alu_reg): Likewise.
3185 (install_alu_reg): Likewise.
3186 (arm_copy_alu_reg): Likewise.
3187 (thumb_copy_alu_reg): Likewise.
3188 (cleanup_alu_shifted_reg): Likewise.
3189 (install_alu_shifted_reg): Likewise.
3190 (arm_copy_alu_shifted_reg): Likewise.
3191 (cleanup_load): Likewise.
3192 (cleanup_store): Likewise.
3193 (arm_copy_extra_ld_st): Likewise.
3194 (install_load_store): Likewise.
3195 (thumb2_copy_load_literal): Likewise.
3196 (thumb2_copy_load_reg_imm): Likewise.
3197 (arm_copy_ldr_str_ldrb_strb): Likewise.
3198 (cleanup_block_load_all): Likewise.
3199 (cleanup_block_store_pc): Likewise.
3200 (cleanup_block_load_pc): Likewise.
3201 (arm_copy_block_xfer): Likewise.
3202 (thumb2_copy_block_xfer): Likewise.
3203 (cleanup_svc): Likewise.
3204 (install_svc): Likewise.
3205 (arm_copy_svc): Likewise.
3206 (thumb_copy_svc): Likewise.
3207 (arm_copy_undef): Likewise.
3208 (thumb_32bit_copy_undef): Likewise.
3209 (arm_copy_unpred): Likewise.
3210 (arm_decode_misc_memhint_neon): Likewise.
3211 (arm_decode_unconditional): Likewise.
3212 (arm_decode_miscellaneous): Likewise.
3213 (arm_decode_dp_misc): Likewise.
3214 (arm_decode_ld_st_word_ubyte): Likewise.
3215 (arm_decode_media): Likewise.
3216 (arm_decode_b_bl_ldmstm): Likewise.
3217 (arm_decode_ext_reg_ld_st): Likewise.
3218 (thumb2_decode_dp_shift_reg): Likewise.
3219 (thumb2_decode_ext_reg_ld_st): Likewise.
3220 (arm_decode_svc_copro): Likewise.
3221 (thumb2_decode_svc_copro): Likewise.
3222 (install_pc_relative): Likewise.
3223 (thumb_copy_pc_relative_16bit): Likewise.
3224 (thumb_decode_pc_relative_16bit): Likewise.
3225 (thumb_copy_pc_relative_32bit): Likewise.
3226 (thumb_copy_16bit_ldr_literal): Likewise.
3227 (thumb_copy_cbnz_cbz): Likewise.
3228 (thumb2_copy_table_branch): Likewise.
3229 (cleanup_pop_pc_16bit_all): Likewise.
3230 (thumb_copy_pop_pc_16bit): Likewise.
3231 (thumb_process_displaced_16bit_insn): Likewise.
3232 (decode_thumb_32bit_ld_mem_hints): Likewise.
3233 (thumb_process_displaced_32bit_insn): Likewise.
3234 (thumb_process_displaced_insn): Likewise.
3235 (arm_process_displaced_insn): Likewise.
3236 (arm_displaced_init_closure): Likewise.
3237 (arm_displaced_step_fixup): Add cast for closure.
3238 * arm-tdep.h: Include infrun.h.
3239 (displaced_step_closure): Rename to ...
3240 (arm_displaced_step_closure): ... this, extend
3241 displaced_step_closure.
3242 <u::svc::copy_svc_os>: Change type of parameter DSC.
3243 <cleanup>: Likewise.
3244 (arm_process_displaced_insn): Likewise.
3245 (arm_displaced_init_closure): Likewise.
3246 (displaced_read_reg): Likewise.
3247 (displaced_write_reg): Likewise.
3248 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3249 Adjust.
3250 * i386-tdep.h: Include infrun.h.
3251 (i386_displaced_step_closure): New typedef.
3252 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3253 i386_displaced_step_closure.
3254 (i386_displaced_step_fixup): Adjust.
3255 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3256 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3257 and unique_ptr.
3258 (ppc_displaced_step_fixup): Adjust.
3259 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3260 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3261 and unique_ptr.
3262 (s390_displaced_step_fixup): Adjust.
3263
3264 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3265
3266 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3267 Remove declarations.
3268
3269 2017-10-20 Tom Tromey <tom@tromey.com>
3270
3271 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3272 std::vector.
3273 (gdb_bfd_record_inclusion): Update.
3274 (bfdp): Remove typedef.
3275
3276 2017-10-20 Tom Tromey <tom@tromey.com>
3277
3278 * gdb_bfd.c (gdb_bfd_ref): Use new.
3279 (struct gdb_bfd_data): Add constructor, destructor, and member
3280 initializers.
3281 (gdb_bfd_unref): Use delete.
3282
3283 2017-10-20 Tom Tromey <tom@tromey.com>
3284
3285 * exec.c (exec_file_attach): Use new_bfd_ref.
3286 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3287 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3288 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3289 new_bfd_ref.
3290 * gdb_bfd.h (new_bfd_ref): New function.
3291
3292 2017-10-20 Pedro Alves <palves@redhat.com>
3293
3294 * main.c (captured_command_loop): Add attribute noinline.
3295
3296 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3297
3298 * interps.c (struct interp_factory): Add constructor.
3299 (interp_factory_p): Remove typedef.
3300 (DEF_VEC_P(interp_factory_p)): Remove.
3301 (interpreter_factories): Change type to std::vector.
3302 (interp_factory_register): Adjust.
3303 (interp_lookup): Adjust.
3304 (interpreter_completer): Adjust.
3305
3306 2017-10-19 Tom Tromey <tom@tromey.com>
3307
3308 * break-catch-syscall.c (catch_syscall_completer): Use
3309 std::string, gdb::unique_xmalloc_ptr.
3310
3311 2017-10-19 Tom Tromey <tom@tromey.com>
3312
3313 * infcall.c (call_function_by_hand_dummy): Use std::string.
3314
3315 2017-10-19 Tom Tromey <tom@tromey.com>
3316
3317 * mi/mi-main.c (mi_cmd_execute): Update.
3318 * top.h (prepare_execute_command): Return scoped_value_mark.
3319 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3320 Add move constructor.
3321 * top.c (prepare_execute_command): Return scoped_value_mark.
3322 (execute_command): Update.
3323
3324 2017-10-19 Pedro Alves <palves@redhat.com>
3325
3326 * xml-support.c (xml_fetch_content_from_file): Check fread's
3327 return.
3328
3329 2017-10-19 Pedro Alves <palves@redhat.com>
3330
3331 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3332 async.
3333 (handle_error_fd): New function.
3334 (ser_base_async): Add/delete an event loop file handler for
3335 error_fd.
3336
3337 2017-10-19 Pedro Alves <palves@redhat.com>
3338
3339 * xml-support.c (xml_fetch_content_from_file): Don't read in
3340 chunks. Instead use fseek to determine the file's size, and read
3341 it in one go.
3342
3343 2017-11-18 Keith Seitz <keiths@redhat.com>
3344
3345 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3346 types.
3347 Add whitespace to front of type name.
3348
3349 2017-10-18 Keith Seitz <keiths@redhat.com>
3350
3351 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3352 DW_AT_accessibility.
3353
3354 2017-10-18 Yao Qi <yao.qi@linaro.org>
3355
3356 * features/tic6x-c62x-linux.c: Remove.
3357
3358 2017-10-17 Tom Tromey <tom@tromey.com>
3359
3360 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3361 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3362 (do_mixed_source_and_assembly): Likewise.
3363
3364 2017-10-17 Tom Tromey <tom@tromey.com>
3365
3366 * regcache.c (regcache::xfer_part): Remove assertion.
3367
3368 2017-10-17 Pedro Alves <palves@redhat.com>
3369
3370 * xml-support.c (xml_fetch_content_from_file): Call
3371 unique_ptr::release() instead unique_ptr::get() when passing
3372 through xrealloc.
3373
3374 2017-10-17 Yao Qi <yao.qi@linaro.org>
3375
3376 * regcache.c (regcache::xfer_part): Remove parameters read and
3377 write, add parameter is_raw. All callers are updated.
3378
3379 2017-10-16 Keith Seitz <keiths@redhat.com>
3380
3381 * c-typeprint.c (enum access_specifier): Moved here from
3382 c_type_print_base.
3383 (output_access_specifier): New function.
3384 (c_type_print_base): Consider typedefs when assessing
3385 whether access labels are needed.
3386 Use output_access_specifier as needed.
3387 Output access specifier for typedefs, if needed.
3388 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3389 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3390 fields.
3391 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3392 accessor macros.
3393
3394 2017-10-16 Tom Tromey <tom@tromey.com>
3395
3396 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3397 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3398 * target.c (target_fileio_read_stralloc): Update.
3399 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3400 * target.h (target_fileio_read_stralloc): Return
3401 unique_xmalloc_ptr.
3402
3403 2017-10-16 Tom Tromey <tom@tromey.com>
3404
3405 * xml-syscall.c (xml_init_syscalls_info): Update.
3406 * xml-support.c (xinclude_start_include): Update.
3407 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3408 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3409 (xml_fetch_content_from_file): Likewise.
3410 * osdata.c (get_osdata): Update.
3411 * target.h (target_read_stralloc, target_get_osdata): Return
3412 unique_xmalloc_ptr.
3413 * solib-aix.c (solib_aix_get_library_list): Update.
3414 * solib-target.c (solib_target_current_sos): Update.
3415 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3416 * xml-tdesc.c (fetch_available_features_from_target): Update.
3417 (target_fetch_description_xml): Update.
3418 (file_read_description_xml): Update.
3419 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3420 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3421 (remote_pid_to_exec_file): Update.
3422 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3423 (target_get_osdata): Likewise.
3424
3425 2017-10-16 Tom Tromey <tom@tromey.com>
3426
3427 * remote.c (remote_register_number_and_offset): Use std::vector.
3428 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3429 (putpkt_binary): Use gdb::def_vector.
3430 (compare_sections_command): Use gdb::byte_vector.
3431
3432 2017-10-16 Tom Tromey <tom@tromey.com>
3433
3434 * ppc-linux-nat.c (hwdebug_insert_point): Use
3435 gdb::unique_xmalloc_ptr, XDUP.
3436
3437 2017-10-16 Tom Tromey <tom@tromey.com>
3438
3439 * probe.c (parse_probes): Use std::string.
3440 (info_probes_for_ops, enable_probes_command)
3441 (disable_probes_command): Remove cleanups.
3442
3443 2017-10-16 Tom Tromey <tom@tromey.com>
3444
3445 * buildsym.c (block_compar): Remove.
3446 (end_symtab_get_static_block): Use std::vector.
3447
3448 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3449
3450 * memrange.h (struct mem_range): Define operator< and operator==.
3451 (mem_range_s): Remove.
3452 (DEF_VEC_O (mem_range_s)): Remove.
3453 (normalize_mem_ranges): Change parameter type to std::vector.
3454 * memrange.c (compare_mem_ranges): Remove.
3455 (normalize_mem_ranges): Change parameter type to std::vector,
3456 adjust to vector change.
3457 * exec.c (section_table_available_memory): Return vector, remove
3458 parameter.
3459 (section_table_read_available_memory): Adjust to std::vector
3460 change.
3461 * remote.c (remote_read_bytes): Adjust to std::vector
3462 change.
3463 * tracepoint.h (traceframe_available_memory): Change parameter
3464 type to std::vector.
3465 * tracepoint.c (traceframe_available_memory): Change parameter
3466 type to std::vector, adjust.
3467 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3468 std::vector change.
3469 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3470 unittests/memrange-selftests.c.
3471 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3472 * gdb/unittests/memrange-selftests.c: New file.
3473
3474 2017-10-16 Pedro Alves <palves@redhat.com>
3475
3476 * elfread.c (probe_key_free): Rename range-for variable.
3477 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3478 (find_probe_by_pc, collect_probes): Rename range-for variable.
3479
3480 2017-10-16 Yao Qi <yao.qi@linaro.org>
3481
3482 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3483 * features/tic6x-c62x.c: Remove.
3484 * features/tic6x-c64x-linux.c: Remove.
3485 * features/tic6x-c64x.c: Remove.
3486 * features/tic6x-c64xp-linux.c: Remove.
3487 * features/tic6x-c64xp.c: Remove.
3488 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3489 initialize_tdesc_tic6x_*_linux functions.
3490 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3491 initialize_tdesc_tic6x_* functions.
3492
3493 2017-10-16 Yao Qi <yao.qi@linaro.org>
3494
3495 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3496 tic6x-c62x.
3497 * regformats/tic6x-c62x.dat: Remove.
3498 * regformats/tic6x-c64x.dat: Remove.
3499 * regformats/tic6x-c64xp.dat: Remove.
3500
3501 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3502
3503 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3504 (the !HAVE_LIBEXPAT version).
3505
3506 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3507
3508 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3509 const.
3510
3511 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3512
3513 * target.h: Include tracepoint.h.
3514 (enum trace_find_type): Move to tracepoint.h.
3515 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3516 * tracepoint.h: Don't include target.h
3517 (enum trace_find_type): Move from target.h.
3518 (parse_traceframe_info): Return a unique ptr.
3519 * tracepoint.c (current_traceframe_info): Change type to unique
3520 ptr.
3521 (free_traceframe_info): Remove.
3522 (clear_traceframe_info): Don't manually free
3523 current_traceframe_info.
3524 (free_result): Remove.
3525 (parse_traceframe_info): Return a unique ptr.
3526 (get_traceframe_info): Adjust to unique ptr.
3527 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3528 * remote.c (remote_traceframe_info): Return a unique ptr.
3529 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3530 ptr.
3531 * target-debug.h (target_debug_print_traceframe_info_up): New
3532 macro.
3533 * target-delegates.c: Regenerate.
3534
3535 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3536
3537 * memrange.h (struct mem_range): Add constructors.
3538 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3539 std::vector<mem_range>.
3540 * tracepoint.c (free_traceframe_info): Don't manually free
3541 vector.
3542 (traceframe_info_start_memory): Adjust to vector change.
3543 (traceframe_available_memory): Likewise.
3544 * tracefile-tfile.c (build_traceframe_info): Likewise.
3545 * ctf.c (ctf_traceframe_info): Likewise.
3546
3547 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3548
3549 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3550 std::vector<int>.
3551 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3552 (traceframe_info_start_tvar): Adjust to vector change.
3553 (parse_traceframe_info): Allocate with new.
3554 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3555 vector change.
3556 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3557 change.
3558 tfile_traceframe_info): Allocate with new.
3559 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3560 change.
3561
3562 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3563
3564 * tracepoint.c (traceframe_info): Rename to...
3565 (current_traceframe_info): ...this.
3566 (clear_traceframe_info): Adjust.
3567 (get_traceframe_info): Adjust.
3568
3569 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3570
3571 * nat/linux-osdata.c: Include algorithm.
3572 (compare_processes): Remove.
3573 (struct pid_pgid_entry): New struct.
3574 (linux_xfer_osdata_processgroups): Use std::vector instead of
3575 XNEWVEC.
3576
3577 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3578
3579 * objfiles.h: Don't include symfile.h.
3580 (struct partial_symbol): Remove forward-declaration.
3581 (struct objfile) <global_psymbols, static_psymbols>: Change type
3582 to std::vector<partial_symbol *>.
3583 * objfiles.c (objfile::objfile): Don't memset those fields.
3584 (objfile::~objfile): Don't free those fields.
3585 * psympriv.h (struct psymbol_allocation_list): Remove
3586 forward-declaration.
3587 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3588 to std::vector.
3589 (start_psymtab_common): Change parameters to std::vector.
3590 * psymtab.c: Include algorithm.
3591 (require_partial_symbols): Call shrink_to_fit.
3592 (find_pc_sect_psymbol): Adjust to vector change.
3593 (match_partial_symbol): Likewise.
3594 (lookup_partial_symbol): Likewise.
3595 (psym_relocate): Likewise.
3596 (dump_psymtab): Likewise.
3597 (recursively_search_psymtabs): Likewise.
3598 (compare_psymbols): Remove.
3599 (sort_pst_symbols): Adjust to vector change.
3600 (start_psymtab_common): Likewise.
3601 (end_psymtab_common): Likewise.
3602 (psymbol_bcache_full): De-constify return value.
3603 (add_psymbol_to_bcache): Likewise.
3604 (extend_psymbol_list): Remove.
3605 (append_psymbol_to_list): Adjust to vector change.
3606 (add_psymbol_to_list): Likewise.
3607 (init_psymbol_list): Likewise.
3608 (maintenance_info_psymtabs): Likewise.
3609 (maintenance_check_psymtabs): Likewise.
3610 * symfile.h (struct psymbol_allocation_list): Remove.
3611 * symfile.c (reread_symbols): Adjust to vector change.
3612 * dbxread.c (start_psymtab): Change type of parameters.
3613 (dbx_symfile_read): Adjust to vector change.
3614 (read_dbx_symtab): Likewise.
3615 (start_psymtab): Change type of parameters.
3616 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3617 (create_partial_symtab): Likewise.
3618 (add_partial_symbol): Likewise.
3619 (write_one_signatured_type): Likewise.
3620 (recursively_write_psymbols): Likewise.
3621 * mdebugread.c (parse_partial_symbols): Likewise.
3622 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3623 (scan_xcoff_symtab): Adjust to vector change.
3624 (xcoff_initial_scan): Likewise.
3625
3626 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3627
3628 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3629
3630 2017-10-13 Yao Qi <yao.qi@linaro.org>
3631
3632 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3633 Remove s390x-*-expedite, add s390x-expedite.
3634
3635 2017-10-13 Yao Qi <yao.qi@linaro.org>
3636
3637 * features/s390-gs-linux64.c: Regenerated.
3638 * features/s390x-gs-linux64.c: Regenerated.
3639
3640 2017-10-13 Tom Tromey <tom@tromey.com>
3641
3642 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3643 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3644 delete.
3645 * symfile.c (symbol_file_add_with_addrs): Use new.
3646 (symbol_file_add_separate): Update comment.
3647 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3648 * jit.c (jit_object_close_impl): Use new.
3649 (jit_unregister_code): Use delete.
3650 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3651 (~objfile): Rename from free_objfile.
3652 (free_objfile_separate_debug, do_free_objfile_cleanup)
3653 (free_all_objfiles, objfile_purge_solibs): Use delete.
3654 * objfiles.h (struct objfile): Add constructor and destructor.
3655 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3656 (allocate_objfile, free_objfile): Don't declare.
3657 (struct objstats): Add initializers.
3658
3659 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3660
3661 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3662 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3663 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3664 * gdbarch.h: Regenerate.
3665 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3666 Adjust comment.
3667 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3668 (i386_displaced_step_fixup): Adjust comment.
3669 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3670
3671 2017-10-12 Tom Tromey <tom@tromey.com>
3672
3673 * prologue-value.h (pv_area::store_would_trash): Return bool.
3674 (pv_area::find_reg): Likewise.
3675 * prologue-value.c (pv_area::store_would_trash): Return bool.
3676 (pv_area::find_reg): Likewise.
3677
3678 2017-10-12 Tom Tromey <tom@tromey.com>
3679
3680 * s390-linux-tdep.c (s390_store, s390_load)
3681 (s390_check_for_saved, s390_analyze_prologue): Update.
3682 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3683 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3684 * prologue-value.h (class pv_area): Move from prologue-value.c.
3685 Change names of members. Add constructor, destructor, member
3686 functions.
3687 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3688 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3689 (pv_area_fetch, pv_area_scan): Don't declare.
3690 * prologue-value.c (struct pv_area::area_entry): Now member of
3691 pv_area.
3692 (struct pv_area): Move to prologue-value.h.
3693 (pv_area::pv_area): Rename from make_pv_area.
3694 (pv_area::~pv_area): Rename from free_pv_area.
3695 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3696 (clear_entries, find_entry, overlaps, store_would_trash, store)
3697 (fetch, find_reg, scan): Now member of pv_area.
3698 Remove "area" argument. Update.
3699 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3700 Update.
3701 * mn10300-tdep.c (push_reg, check_for_saved)
3702 (mn10300_analyze_prologue): Update.
3703 * mep-tdep.c (is_arg_spill, check_for_saved)
3704 (mep_analyze_prologue): Update.
3705 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3706 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3707 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3708 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3709 Update.
3710 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3711 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3712
3713 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3714
3715 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3716 * linux-nat.c (linux_nat_delete_thread): New variable.
3717 (lwp_free): Invoke linux_nat_delete_thread if set.
3718 (linux_nat_set_delete_thread): New function.
3719 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3720 thread delete callback.
3721 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3722 (_initialize_arm_linux_nat): Assign thread delete callback.
3723 * s390-linux-nat.c (s390_delete_thread): New function.
3724 (_initialize_s390_nat): Assign thread delete callback.
3725 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3726 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3727 function.
3728 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3729 declaration.
3730 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3731 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3732
3733 2017-10-09 Tom Tromey <tom@tromey.com>
3734
3735 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3736 std::string.
3737 * tui/tui-layout.c (enum tui_status): Use std::string.
3738
3739 2017-10-11 Tom Tromey <tom@tromey.com>
3740
3741 * gdbthread.h (thread_command): Constify.
3742 * inferior.h (detach_command): Constify.
3743 * top.h (set_history, show_history): Constify.
3744 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3745 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3746 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3747 * printcmd.c (set_command): Constify.
3748 (non_const_set_command): New function.
3749 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3750 * breakpoint.c (enable_command, disable_command, delete_command)
3751 (catch_command, tcatch_command, set_breakpoint_cmd)
3752 (show_breakpoint_cmd): Constify.
3753 * macrocmd.c (macro_command): Constify.
3754 * infcmd.c (unset_command, kill_command, detach_command)
3755 (info_proc_cmd): Constify.
3756 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3757 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3758 (info_auto_load_cmd): Constify.
3759 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3760 (unset_tdesc_cmd): Constify.
3761 * ada-lang.c (set_ada_command, show_ada_command)
3762 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3763 * guile/guile.c (set_guile_command, show_guile_command)
3764 (info_guile_command): Constify.
3765 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3766 Constify.
3767 * skip.c (skip_command): Constify.
3768 * compile/compile.c (_initialize_compile): Constify.
3769 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3770 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3771 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3772 (maint_btrace_pt_show_cmd): Constify.
3773 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3774 Constify.
3775 * python/python.c (user_show_python, user_set_python): Constify.
3776 * mips-tdep.c (set_mips_command, show_mips_command)
3777 (set_mipsfpu_command): Constify.
3778 * record-btrace.c (cmd_record_btrace_start)
3779 (cmd_set_record_btrace, cmd_show_record_btrace)
3780 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3781 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3782 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3783 Constify.
3784 * symfile.c (overlay_command): Constify.
3785 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3786 * cli/cli-logging.c (set_logging_command, show_logging_command):
3787 Constify.
3788 * cli/cli-dump.c (dump_command, append_command)
3789 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3790 (tekhex_dump_command, binary_dump_command)
3791 (binary_append_command): Constify.
3792 * cli/cli-decode.c (struct cmd_list_element): Change type of
3793 "fun".
3794 * cli/cli-cmds.c (info_command, show_command, set_debug)
3795 (show_debug): Constify.
3796 (show_command): Add non-const overload.
3797 * top.c (set_history, show_history): Constify.
3798 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3799 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3800 * target.c (target_command): Constify.
3801 * sparc64-tdep.c (info_adi_command): Constify.
3802 * record-full.c (cmd_record_full_start): Constify.
3803 (set_record_full_command): Constify. Fix typo.
3804 (show_record_full_command): Constify.
3805 * thread.c (thread_command, thread_apply_command): Constify.
3806 * memattr.c (dummy_cmd): Constify.
3807 * value.c (function_command): Constify.
3808 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3809 * probe.c (info_probes_command): Constify.
3810 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3811 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3812 (show_thread_cmd, set_thread_default_cmd)
3813 (show_thread_default_cmd): Constify.
3814 (check_empty): Constify.
3815 * tracepoint.c (tfind_command): Constify.
3816 * cp-support.c (maint_cplus_command): Constify.
3817 * windows-tdep.c (info_w32_command): Constify.
3818 * record.c (cmd_record_start, set_record_command)
3819 (show_record_command, info_record_command, cmd_record_goto):
3820 Constify.
3821 * ravenscar-thread.c (set_ravenscar_command)
3822 (show_ravenscar_command): Constify.
3823 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3824 Constify.
3825 (add_internal_problem_command): Remove casts.
3826 * arc-tdep.c (maintenance_print_arc_command): Constify.
3827 * valprint.c (set_print, show_print, set_print_raw)
3828 (show_print_raw): Constify.
3829 * maint.c (maintenance_command, maintenance_info_command)
3830 (maintenance_print_command, maintenance_set_cmd)
3831 (maintenance_show_cmd, set_per_command_cmd)
3832 (show_per_command_cmd, maintenance_check_command): Constify.
3833 * language.c (set_check, show_check): Constify.
3834 * typeprint.c (show_print_type, set_print_type): Constify.
3835 * go32-nat.c (go32_info_dos_command): Constify.
3836
3837 2017-10-11 Tom Tromey <tom@tromey.com>
3838
3839 * breakpoint.c (prepare_re_set_context): Remove.
3840 (breakpoint_re_set_one): Update. Don't use cleanups.
3841 (breakpoint_re_set): Use scoped_restore, std::string, and
3842 scoped_restore_current_language.
3843
3844 2017-10-11 Tom Tromey <tom@tromey.com>
3845
3846 * breakpoint.c (commands_command_1): Use std::string.
3847 (cleanup_executing_breakpoints): Remove.
3848 (bpstat_do_actions_1): Use scoped_restore.
3849 (bpstat_check_watchpoint): Use std::string.
3850 (decode_static_tracepoint_spec): Likewise.
3851 (break_range_command): Likewise.
3852 (watch_command_1): Likewise.
3853 (compare_breakpoints): Change argument types.
3854 (clear_command): Use std::vector.
3855 (cleanup_executing_breakpoints): Remove.
3856 (update_global_location_list): Use unique_xmalloc_ptr.
3857 (strace_command): Remove unused declaration.
3858
3859 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3860
3861 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3862 * NEWS: Mention new FreeBSD/arm native configuration.
3863 * configure.host: Add arm*-*-freebsd*.
3864 * configure.nat: Likewise.
3865 * arm-fbsd-nat.c: New file.
3866
3867 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3868
3869 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3870 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3871 * NEWS: Mention new FreeBSD/arm target.
3872 * configure.tgt: Add arm*-*-freebsd*.
3873 * arm-fbsd-tdep.c: New file.
3874 * arm-fbsd-tdep.h: New file.
3875
3876 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3877
3878 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3879 `gdbarch_elfcore_write_linux_prpsinfo'.
3880 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3881 method.
3882 (elf_internal_linux_prpsinfo): Remove declaration.
3883 * gdbarch.h: Regenerate.
3884 * gdbarch.c: Regenerate.
3885
3886 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3887
3888 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3889 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3890
3891 2017-10-11 Pedro Alves <palves@redhat.com>
3892
3893 * breakpoint.c (reattach_breakpoints): Delete.
3894 * breakpoint.h (reattach_breakpoints): Delete.
3895
3896 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3897
3898 * symfile.c (registered_sym_fns): Make struct, not typedef.
3899 (DEF_VEC_O (registered_sym_fns)): Remove.
3900 (symtab_fns): Change type to std::vector.
3901 (add_symtab_fns): Adjust.
3902 (find_sym_fns): Adjust.
3903
3904 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3905
3906 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3907 * arc-tdep.h (arc_arch_is_em): New function.
3908 (arc_arch_is_hs): Likewise.
3909
3910 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3911
3912 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3913 parentheses in the declaration.
3914 (macro_lookup_inclusion): Likewise.
3915 (macro_lookup_definition): Likewise.
3916 * p-lang.h (pascal_builtin_types): Likewise.
3917 * tui/tui-data.c (tui_win_list): Likewise.
3918 * tui/tui-data.h (tui_win_list): Likewise.
3919 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3920
3921 2017-10-11 Mark Rages <markrages@gmail.com>
3922
3923 * target-memory.c (block_boundaries): Fix for block address not
3924 aligned on block size.
3925
3926 2017-10-10 Pedro Alves <palves@redhat.com>
3927 Tom Tromey <tom@tromey.com>
3928
3929 * breakpoint.c (struct captured_breakpoint_query_args)
3930 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3931 (print_breakpoint): New.
3932 * breakpoint.h (print_breakpoint): Declare.
3933 * common/common-exceptions.h (enum return_reason): Remove
3934 references to catch_exceptions.
3935 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3936 Delete.
3937 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3938 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3939 * gdb.h: Delete.
3940 * gdbthread.h (thread_select): Declare.
3941 * mi/mi-cmd-break.c: Don't include gdb.h.
3942 (breakpoint_notify): Use print_breakpoint.
3943 * mi/mi-cmd-catch.c: Don't include gdb.h.
3944 * mi/mi-interp.c: Don't include gdb.h.
3945 (mi_print_breakpoint_for_event): New.
3946 (mi_breakpoint_created, mi_breakpoint_modified): Use
3947 mi_print_breakpoint_for_event.
3948 * mi/mi-main.c: Don't include gdb.h.
3949 (mi_cmd_thread_select): Parse the global thread ID here. Use
3950 thread_select instead of gdb_thread_select.
3951 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3952 of using gdb_list_thread_ids.
3953 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3954 FILEIO_ENOSYS here.
3955 (remote_fileio_request): Use TRY/CATCH instead of
3956 catch_exceptions.
3957 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3958 (symbol_file_add_from_memory_wrapper): Delete.
3959 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3960 * thread.c: Don't include gdb.h.
3961 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3962 (thread_alive): Use thread_select.
3963 (do_captured_thread_select): Delete, parts salvaged as ...
3964 (thread_select): ... this new function.
3965 (gdb_thread_select): Delete.
3966
3967 2017-10-10 Pedro Alves <palves@redhat.com>
3968 Tom Tromey <tom@tromey.com>
3969
3970 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3971 and reverse logic.
3972 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3973 No longer macros. Instead ...
3974 (enum wp_check_result): They're now values of this new
3975 enumeration.
3976 (watchpoint_check): Change return type to wp_check_result and
3977 parameter type to bpstat.
3978 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3979 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3980 catch_errors. Reverse logic of watchpoint_check call.
3981 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3982 pointer as parameter.
3983 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3984 * common/common-exceptions.c (throw_exception_sjlj): Update
3985 comments to avoid mentioning catch_errors.
3986 * exceptions.c (catch_errors): Delete.
3987 * exceptions.h: Update comments to avoid mentioning catch_errors.
3988 (catch_errors_ftype, catch_errors): Delete.
3989 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3990 (hook_stop_stub): Delete.
3991 (restore_selected_frame): Change return type to void, and
3992 parameter type to const frame_id &.
3993 (restore_infcall_control_state): Use TRY/CATCH instead of
3994 catch_errors.
3995 * main.c (captured_command_loop): Return void and remove
3996 parameter. Remove references to catch_errors.
3997 (captured_main): Use TRY/CATCH instead of catch_errors.
3998 * objc-lang.c (objc_submethod_helper_data)
3999 (find_objc_msgcall_submethod_helper): Delete.
4000 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4001 catch_errors.
4002 * record-full.c (record_full_message): Return void.
4003 (record_full_message_args, record_full_message_wrapper): Delete.
4004 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4005 instead of catch_errors.
4006 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4007 parameter type to int.
4008 * solib-darwin.c (open_symbol_file_object): Ditto.
4009 * solib-dsbt.c (open_symbol_file_object): Ditto.
4010 * solib-frv.c (open_symbol_file_object): Ditto.
4011 * solib-svr4.c (open_symbol_file_object): Ditto.
4012 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4013 * solib.c (update_solib_list): Use TRY/CATCH instead of
4014 catch_errors.
4015 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4016 Change type.
4017 * symmisc.c (struct print_symbol_args): Remove.
4018 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4019 (print_symbol): Change type.
4020 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4021 and remove parameters.
4022 (catch_errors): New.
4023 (get_windows_debug_event): Adjust.
4024
4025 2017-10-09 Tom Tromey <tom@tromey.com>
4026
4027 * mi/mi-main.c (free_splay_tree): Remove.
4028 (list_available_thread_groups): Use splay_tree_up.
4029 * common/gdb_splay_tree.h: New file.
4030
4031 2017-10-09 Tom Tromey <tom@tromey.com>
4032
4033 * mi/mi-main.c (do_nothing): Remove.
4034 (list_available_thread_groups): Update.
4035
4036 2017-10-09 Pedro Alves <palves@redhat.com>
4037
4038 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4039 reading registers when switching context.
4040
4041 2017-10-09 John Baldwin <jhb@FreeBSD.org>
4042
4043 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4044 (fbsd_convert_siginfo): Likewise.
4045 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4046
4047 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4048
4049 * configure.ac (try_guile_versions): Remove guile-2.2.
4050 * configure: Regenerate.
4051
4052 2017-10-09 Tom Tromey <tom@tromey.com>
4053
4054 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4055 (COMPILE.pre): Use $(CXX).
4056
4057 2017-10-09 Pedro Alves <palves@redhat.com>
4058
4059 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4060 Use bool.
4061 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4062 * cp-support.h (cp_remove_params): Now returns a
4063 gdb::unique_xmalloc_ptr.
4064 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4065 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4066 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4067 returning a gdb::unique_xmalloc_ptr.
4068 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4069 * stack.c (find_frame_funname): Adjust to cp_remove_params
4070 returning a gdb::unique_xmalloc_ptr.
4071
4072 2017-10-08 Tom Tromey <tom@tromey.com>
4073
4074 * dwarf2read.c (dwarf2_get_dwz_file): Use
4075 gdb::unique_xmalloc_ptr.
4076 (find_slot_in_mapped_hash): Likewise.
4077 (dwarf2_physname): Likewise.
4078 (create_dwo_unit_in_dwp_v1): Use std::string.
4079 (create_dwo_unit_in_dwp_v2): Likewise.
4080 (lookup_dwo_cutu): Likewise.
4081 (inherit_abstract_dies): Use std::vector.
4082 (read_array_type): Likewise.
4083 (dwarf_decode_macros): Remove unused declaration.
4084 (unsigned_int_compar): Remove.
4085 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4086 (psymtabs_addrmap_cleanup): Remove.
4087
4088 2017-10-08 Tom Tromey <tom@tromey.com>
4089
4090 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4091 * frame.h (frame_cleanup_after_sniffer): Declare.
4092 (frame_prepare_for_sniffer): Return void.
4093 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4094 type of argument.
4095 (frame_prepare_for_sniffer): Return void.
4096
4097 2017-10-08 Tom Tromey <tom@tromey.com>
4098
4099 * utils.h (make_cleanup_value_free): Remove.
4100 * utils.c (do_value_free, struct cleanup): Remove.
4101 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4102 Use gdb_value_up.
4103 * value.h (struct value_deleter): New.
4104 (gdb_value_up): New typedef.
4105
4106 2017-10-08 Tom Tromey <tom@tromey.com>
4107
4108 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4109 (make_cleanup_free_search_symbols): Remove.
4110 (search_symbols): Return std::vector.
4111 (symbol_search::compare_search_syms): Now member of
4112 symbol_search. Change arguments.
4113 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4114 (symtab_symbol_info, rbreak_command): Update.
4115 * symtab.h (struct symbol_search) <next>: Remove.
4116 Add constructors.
4117 (symbol_search::operator<): New function.
4118 (symbol_search::operator==): New function.
4119 (search_symbols): Remove std::vector.
4120 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4121 (symbol_search::compare_search_syms): Declare.
4122
4123 2017-10-06 Yao Qi <yao.qi@linaro.org>
4124
4125 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4126 arch/aarch64-insn.o.
4127 Remove one rule.
4128 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4129
4130 2017-10-06 Yao Qi <yao.qi@linaro.org>
4131
4132 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4133 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4134 arch/arm-linux.o respectively.
4135 * configure.tgt: Likewise.
4136
4137 2017-10-06 Yao Qi <yao.qi@linaro.org>
4138
4139 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4140 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4141
4142 2017-10-06 Pedro Alves <palves@redhat.com>
4143
4144 * windows-nat.c: Include <algorithm>.
4145
4146 2017-10-06 Yao Qi <yao.qi@linaro.org>
4147
4148 * configure.tgt (i386_tobjs): New variable.
4149 (amd64_tobjs): New variable.
4150 Set $cpu_obs and $os_obs.
4151
4152 2017-10-06 Yao Qi <yao.qi@linaro.org>
4153
4154 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4155 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4156 (clean): Remove object files and dependency files.
4157 (distclean): Remove the directory.
4158 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4159 * configure: Re-generated.
4160 * configure.tgt: Replace amd64.o with arch/amd64.o.
4161
4162 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4163
4164 PR build/22188
4165 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4166 and SETEND.
4167
4168 2017-10-05 Pedro Alves <palves@redhat.com>
4169
4170 * linux-nat.c (linux_child_follow_fork): When following the parent
4171 and detaching the child, consult the parent thread's architecture
4172 instead of the child's.
4173
4174 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4175
4176 * ax.h: Do not include "doublest.h".
4177 (union agent_val): Remove.
4178
4179 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4180
4181 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4182 (decimal_to_string): Return std::string object.
4183 (decimal_from_string): Accept std::string object. Return bool.
4184 (decimal_from_integral, decimal_from_doublest): Remove.
4185 (decimal_from_longest): Add prototype.
4186 (decimal_from_ulongest): Likewise.
4187 (decimal_to_longest): Likewise.
4188 (decimal_from_doublest): Likewise.
4189 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4190 (MAX_DECIMAL_STRING): Move here.
4191 (decimal_to_string): Return std::string object.
4192 (decimal_from_string): Accept std::string object. Return bool.
4193 (decimal_from_integral): Remove, replace by ...
4194 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4195 (decimal_to_longest): New function.
4196 (decimal_from_floating): Remove, replace by ...
4197 (decimal_from_doublest): ... this new function.
4198 (decimal_to_doublest): Update to new decimal_to_string interface.
4199
4200 * value.c (unpack_long): Use decimal_to_longest.
4201 * valops.c (value_cast): Use decimal_from_doublest instead of
4202 decimal_from_floating. Use decimal_from_[u]longest isntead of
4203 decimal_from_integral.
4204 * valarith.c (value_args_as_decimal): Likewise.
4205 * valprint.c (print_decimal_floating): Update to new
4206 decimal_to_string interface.
4207 * printcmd.c (printf_decfloat): Likewise.
4208 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4209
4210 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4211
4212 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4213 * gdbtypes.c: Include "floatformat.h".
4214 * value.c: Likewise.
4215 * m68k-tdep.c: Likewise.
4216
4217 * findvar.c: Do not include "floatformat.h".
4218 * amd64-darwin-tdep.c: Likewise.
4219 * arm-linux-tdep.c: Likewise.
4220 * i386-darwin-tdep.c: Likewise.
4221 * i387-tdep.c: Likewise.
4222 * m68k-linux-tdep.c: Likewise.
4223 * mep-tdep.c: Likewise.
4224 * mips-tdep.c: Likewise.
4225 * nios2-tdep.c: Likewise.
4226 * s390-linux-tdep.c: Likewise.
4227 * sparc-obsd-tdep.c: Likewise.
4228 * sparc-tdep.c: Likewise.
4229 * sparc64-tdep.c: Likewise.
4230 * spu-tdep.c: Likewise.
4231 * tic6x-tdep.c: Likewise.
4232 * tilegx-tdep.c: Likewise.
4233 * vax-tdep.c: Likewise.
4234 * xstormy16-tdep.c: Likewise.
4235 * xtensa-tdep.c: Likewise.
4236
4237 * top.c: Do not include "doublest.h".
4238 * aarch64-tdep.c: Likewise.
4239 * alpha-tdep.c: Likewise.
4240 * arm-linux-tdep.c: Likewise.
4241 * m68k-linux-tdep.c: Likewise.
4242 * tilegx-tdep.c: Likewise.
4243 * xstormy16-tdep.c: Likewise.
4244
4245 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4246
4247 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4248 (mipsn32_fbsd_sigframe): Define.
4249 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4250 for FreeBSD/mipsn32.
4251
4252 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4253
4254 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4255 AT_HWCAP.
4256
4257 2017-10-05 Tristan Gingold <tgingold@free.fr>
4258
4259 * MAINTAINERS (Misc): Update my email address.
4260
4261 2017-10-04 Pedro Alves <palves@redhat.com>
4262
4263 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4264 it instead of target_gdbarch.
4265 (get_remote_state, get_remote_packet_size): Adjust
4266 get_remote_arch_state calls, passing down target_gdbarch
4267 explicitly.
4268 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4269 'gdbarch' and use it instead of target_gdbarch.
4270 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4271 passing down target_gdbarch explicitly.
4272 (struct stop_reply) <arch>: New field.
4273 (remote_parse_stop_reply): Use the stopped thread's architecture,
4274 not the current inferior's. Save the architecture in the
4275 stop_reply.
4276 (process_stop_reply): Use the stop reply's architecture.
4277 (process_g_packet, remote_fetch_registers)
4278 (remote_prepare_to_store, store_registers_using_G)
4279 (remote_store_registers): Adjust get_remote_arch_state calls,
4280 using the regcache's architecture.
4281 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4282 passing down target_gdbarch explicitly.
4283 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4284 beneath instead of calling target_gdbarch.
4285 * target.c (default_thread_architecture): Use the specified
4286 inferior's architecture, instead of the current inferior's
4287 architecture (via target_gdbarch).
4288
4289 2017-10-04 Pedro Alves <palves@redhat.com>
4290
4291 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4292 case.
4293 (regcache_print): Handle !target_has_registers here instead.
4294
4295 2017-10-04 Pedro Alves <palves@redhat.com>
4296
4297 * frame.c (create_test_frame): Delete.
4298 * frame.h (create_test_frame): Delete.
4299 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4300 (class regcache_test): Delete.
4301 (test_target_has_registers, test_target_has_stack)
4302 (test_target_has_memory, test_target_prepare_to_store)
4303 (test_target_store_registers): New functions.
4304 (test_target_ops): New class.
4305 (register_to_value_test): Error out if there's already a
4306 process_stratum (or higher) target pushed. Create a fuller mock
4307 environment, with mock target_ops, inferior, address space, thread
4308 and inferior_ptid.
4309 * progspace.c (struct address_space): Move to ...
4310 * progspace.h (struct address_space): ... here.
4311 * regcache.h (regcache::~regcache, regcache::raw_write)
4312 [GDB_SELF_TEST]: No longer virtual.
4313
4314 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4315
4316 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4317
4318 2017-10-04 Pedro Alves <palves@redhat.com>
4319
4320 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4321 out of 'between TRY and CATCH'.
4322
4323 2017-10-04 Pedro Alves <palves@redhat.com>
4324
4325 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4326 * common/common-exceptions.h (TRY): Open an outermost scope.
4327 Expand intro comment.
4328 (CATCH): Reindent.
4329 (END_CATCH): Close the outermost scope.
4330 * completer.c (complete_line_internal): Add missing END_CATCH.
4331
4332 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4333
4334 * NEWS (Changes since GDB 8.0): Add entry about new
4335 'set-cwd-on-gdbserver' feature.
4336 (New remote packets): Add entry for QSetWorkingDir.
4337 * common/common-inferior.h (set_inferior_cwd): New prototype.
4338 * infcmd.c (set_inferior_cwd): Remove "static".
4339 (show_cwd_command): Expand text to include remote debugging.
4340 * remote.c: Add PACKET_QSetWorkingDir.
4341 (remote_protocol_features) <QSetWorkingDir>: New entry for
4342 PACKET_QSetWorkingDir.
4343 (extended_remote_set_inferior_cwd): New function.
4344 (extended_remote_create_inferior): Call
4345 "extended_remote_set_inferior_cwd".
4346 (_initialize_remote): Call "add_packet_config_cmd" for
4347 QSetWorkingDir.
4348
4349 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4350
4351 * NEWS (New commands): Mention "set/show cwd".
4352 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4353 "cd" command's help text.
4354 * common/common-inferior.h (get_inferior_cwd): New prototype.
4355 * infcmd.c (inferior_cwd_scratch): New global variable.
4356 (set_inferior_cwd): New function.
4357 (get_inferior_cwd): Likewise.
4358 (set_cwd_command): Likewise.
4359 (show_cwd_command): Likewise.
4360 (_initialize_infcmd): Add "set/show cwd" commands.
4361 * inferior.h (class inferior) <cwd>: New field.
4362 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4363 (fork_inferior): Change inferior's cwd before its execution.
4364 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4365 to CreateProcess.
4366
4367 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4368
4369 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4370 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4371 (COMMON_OBS): Add gdb_tilde_expand.o.
4372 * common/gdb_tilde_expand.c: New file.
4373 * common/gdb_tilde_expand.h: Likewise.
4374
4375 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4376
4377 * gdbarch.sh (objfile): Remove duplicate declaration.
4378 * gdbarch.h: Regenerate.
4379
4380 2017-10-03 Tom Tromey <tom@tromey.com>
4381
4382 * utils.c (internal_vproblem): Use string_vprintf.
4383
4384 2017-10-03 Tom Tromey <tom@tromey.com>
4385
4386 * printcmd.c (info_symbol_command): Use std::string.
4387
4388 2017-10-03 Tom Tromey <tom@tromey.com>
4389
4390 * top.c (gdb_safe_append_history): Use std::string.
4391
4392 2017-10-03 Tom Tromey <tom@tromey.com>
4393
4394 * event-top.c (stdin_event_handler): Update.
4395 * main.c (captured_main_1): Update.
4396 * top.h (make_delete_ui_cleanup): Remove.
4397 (struct ui): Add constructor and destructor.
4398 (new_ui, delete_ui): Remove.
4399 * top.c (make_delete_ui_cleanup): Remove.
4400 (new_ui_command): Use std::unique_ptr.
4401 (delete_ui_cleanup): Remove.
4402 (ui::ui): Rename from new_ui. Update.
4403 (free_ui): Remove.
4404 (ui::~ui): Rename from delete_ui. Update.
4405
4406 2017-10-03 Tom Tromey <tom@tromey.com>
4407
4408 * symfile.c (load_progress): Use gdb::byte_vector.
4409
4410 2017-10-03 Tom Tromey <tom@tromey.com>
4411
4412 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4413 declaration.
4414 * printcmd.c (x_command): Remove unused declaration.
4415 * symfile.c (symbol_file_command): Remove unused declaration.
4416
4417 2017-10-03 Tom Tromey <tom@tromey.com>
4418
4419 * utils.c (internal_vproblem): Use std::string.
4420 (defaulted_query): Likewise.
4421
4422 2017-10-03 Tom Tromey <tom@tromey.com>
4423
4424 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4425 * top.c (execute_command_to_string): Update.
4426 * utils.c (make_cleanup_restore_page_info): Remove.
4427 (do_restore_page_info_cleanup): Remove.
4428 (set_batch_flag_and_restore_page_info):
4429 New.
4430 (make_cleanup_restore_page_info): Remove.
4431 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4432 (~set_batch_flag_and_restore_page_info): New
4433 (make_cleanup_restore_uinteger): Remove.
4434 (make_cleanup_restore_integer): Remove.
4435 (struct restore_integer_closure): Remove.
4436 (restore_integer): Remove.
4437 * utils.h (struct set_batch_flag_and_restore_page_info): New
4438 class.
4439 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4440 (make_cleanup_restore_page_info): Remove.
4441 (make_cleanup_restore_uinteger) Remove.
4442 (make_cleanup_restore_integer) Remove.
4443
4444 2017-10-03 Tom Tromey <tom@tromey.com>
4445
4446 * record-full.h (record_full_gdb_operation_disable_set): Return
4447 scoped_restore_tmpl<int>.
4448 * infrun.c (adjust_pc_after_break): Update.
4449 (handle_signal_stop): Update.
4450 * record-full.c (record_full_gdb_operation_disable_set): Return
4451 scoped_restore_tmpl<int>.
4452 (record_full_wait_1, record_full_insert_breakpoint)
4453 (record_full_remove_breakpoint, record_full_save)
4454 (record_full_goto_insn): Update.
4455
4456 2017-10-02 Tom Tromey <tom@tromey.com>
4457
4458 PR rust/22236:
4459 * rust-lang.c (rust_val_print_str): New function.
4460 (val_print_struct): Call it.
4461 (rust_subscript): Preserve name of slice type.
4462
4463 2017-10-02 Tom Tromey <tom@tromey.com>
4464
4465 * rust-lang.c (rust_subscript): Handle slices in
4466 EVAL_AVOID_SIDE_EFFECTS case.
4467
4468 2017-10-02 Tom Tromey <tom@tromey.com>
4469
4470 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4471
4472 2017-10-02 Tom Tromey <tom@tromey.com>
4473
4474 * rust-lang.h (rust_slice_type): Add "extern".
4475
4476 2017-10-02 Tom Tromey <tom@tromey.com>
4477 Pedro Alves <palves@redhat.com>
4478
4479 * ada-lang.h (ada_exc_info::operator<): Make const.
4480 (ada_exc_info::operator==): Make const.
4481 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4482 Make const.
4483
4484 2017-09-29 Tom Tromey <tom@tromey.com>
4485
4486 * target.c (read_whatever_is_readable): Change type of "result".
4487 Update.
4488 (free_memory_read_result_vector): Remove.
4489 (read_memory_robust): Change return type. Update.
4490 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4491 bin2hex, std::string.
4492 * target.h (memory_read_result_s): Remove typedef.
4493 (free_memory_read_result_vector): Remove.
4494 (read_memory_robust): Return std::vector.
4495
4496 2017-09-29 Tom Tromey <tom@tromey.com>
4497
4498 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4499
4500 2017-09-29 Tom Tromey <tom@tromey.com>
4501
4502 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4503 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4504 operator< and operator==.
4505 (ada_exceptions_list): Return a std::vector.
4506 * ada-lang.c (ada_exc_info::operator<): Rename from
4507 compare_ada_exception_info.
4508 (ada_exc_info::operator==): New.
4509 (sort_remove_dups_ada_exceptions_list): Change type of
4510 "exceptions".
4511 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4512 (ada_add_global_exceptions): Likewise.
4513 (ada_exceptions_list_1): Return a std::vector.
4514 (ada_exceptions_list): Likewise.
4515
4516 2017-09-29 Tom Tromey <tom@tromey.com>
4517
4518 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4519 'std::set *'.
4520 (print_one_inferior): Update.
4521 (free_vector_of_ints): Remove.
4522 (list_available_thread_groups): Change "ids" to std::set.
4523 (mi_cmd_list_thread_groups): Update.
4524 (struct collect_cores_data) <core>: Now a std::set.
4525 (collect_cores): Update.
4526 (unique): Remove.
4527 (print_one_inferior): Update.
4528
4529 2017-09-29 Tom Tromey <tom@tromey.com>
4530
4531 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4532 (mi_execute_async_cli_command): Likewise.
4533 (mi_cmd_trace_frame_collected): Use field_fmt.
4534
4535 2017-09-29 Tom Tromey <tom@tromey.com>
4536
4537 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4538 gdb::byte_vector.
4539
4540 2017-09-29 Tom Tromey <tom@tromey.com>
4541
4542 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4543
4544 2017-09-29 Tom Tromey <tom@tromey.com>
4545
4546 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4547
4548 2017-09-29 Tom Tromey <tom@tromey.com>
4549
4550 * varobj.h (varobj_gen_name): Return std::string.
4551 * varobj.c (varobj_gen_name): Return std::string.
4552 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4553 (mi_cmd_var_delete): Don't copy "name".
4554
4555 2017-09-29 Tom Tromey <tom@tromey.com>
4556
4557 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4558 (mi_cmd_break_insert_1): Update.
4559
4560 2017-09-29 Tom Tromey <tom@tromey.com>
4561
4562 * target.h (make_scoped_defer_target_commit_resume): Update.
4563 * target.c (make_scoped_defer_target_commit_resume): Rename from
4564 make_cleanup_defer_target_commit_resume. Return a
4565 scoped_restore.
4566 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4567
4568 2017-09-29 Tom Tromey <tom@tromey.com>
4569
4570 * main.c (captured_main_1): Remove unused declaration.
4571 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4572
4573 2017-09-29 Tom Tromey <tom@tromey.com>
4574
4575 * symtab.c (search_symbols): Remove unused outer cleanup.
4576 (make_source_files_completion_list): Remove unused declaration.
4577
4578 2017-09-29 Tom Tromey <tom@tromey.com>
4579
4580 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4581
4582 2017-09-29 Tom Tromey <tom@tromey.com>
4583
4584 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4585 gdb::byte_vector.
4586
4587 2017-09-29 Tom Tromey <tom@tromey.com>
4588
4589 * complaints.c (vcomplaint): Use std::string.
4590
4591 2017-09-29 Tom Tromey <tom@tromey.com>
4592
4593 * tracepoint.c (trace_variable_command): Use std::string.
4594 (encode_actions_1): Remove unused declarations.
4595 (create_tsv_from_upload): Use std::string.
4596
4597 2017-09-29 Tom Tromey <tom@tromey.com>
4598
4599 * cp-support.c (gdb_demangle): Use std::string.
4600
4601 2017-09-29 Tom Tromey <tom@tromey.com>
4602
4603 * stack.c (parse_frame_specification): Use std::string
4604 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4605
4606 2017-09-29 Tom Tromey <tom@tromey.com>
4607
4608 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4609
4610 2017-09-29 Tom Tromey <tom@tromey.com>
4611
4612 * utils.c (vfprintf_maybe_filtered): Use std::string.
4613 (vfprintf_unfiltered): Likewise.
4614
4615 2017-09-29 Tom Tromey <tom@tromey.com>
4616
4617 * event-top.c (top_level_prompt): Return std::string.
4618 (display_gdb_prompt): Update.
4619
4620 2017-09-29 Tom Tromey <tom@tromey.com>
4621
4622 * unittests/common-utils-selftests.c (format): New function.
4623 (string_vprintf_tests): New function.
4624 (_initialize_common_utils_selftests): Register new tests.
4625 * common/common-utils.c (string_vprintf): New function.
4626 * common/common-utils.h (string_vprintf): Declare.
4627
4628 2017-09-29 Pedro Alves <palves@redhat.com>
4629
4630 * common/rsp-low.c (unpack_varlen_hex): Constify.
4631 * common/rsp-low.h (unpack_varlen_hex): Constify.
4632 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4633 Constify.
4634 * remote.c (remote_set_permissions, read_ptid)
4635 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4636 (remote_static_tracepoint_marker_at)
4637 (remote_static_tracepoint_markers_by_strid)
4638 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4639 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4640 (parse_tracepoint_definition, parse_tsv_definition)
4641 (parse_static_tracepoint_marker_definition): Constify.
4642 * tracepoint.h (parse_static_tracepoint_marker_definition)
4643 (parse_trace_status, parse_tracepoint_status)
4644 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4645
4646 2017-09-29 Pedro Alves <palves@redhat.com>
4647
4648 * remote.c (target_buf, target_buf_size): Delete.
4649 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4650 Use the connection's packet buffer instead.
4651 All callers adjusted.
4652 (_initialize_remote): Remove references to target_buf and
4653 target_buf_size.
4654
4655 2017-09-28 Pedro Alves <palves@redhat.com>
4656
4657 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4658 unittests/common-utils-selftests.c.
4659 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4660 (COMMON_OBS): Remove utils-selftests.o.
4661 * utils-selftests.c: Move to ...
4662 * unittests/common-utils-selftests.c: ... here and rename self
4663 test to "string_printf".
4664
4665 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4666
4667 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4668 having NULL cus or tus.
4669
4670 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4671
4672 * arm-tdep.c: (convert_from_extended): Remove.
4673 (convert_to_extended): Likewise.
4674 (arm_extract_return_value): Use convert_typed_floating.
4675 (arm_store_return_value): Likewise.
4676
4677 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4678 * sh-tdep.c: Do not include "floatformat.h".
4679 (sh_littlebyte_bigword_type): New function.
4680 (sh_register_convert_to_virtual): Use convert_typed_floating.
4681 (sh_register_convert_to_raw): Likewise.
4682 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4683 (sh64_littlebyte_bigword_type): New function.
4684 (sh64_extract_return_value): Use convert_typed_floating.
4685 (sh64_register_convert_to_virtual): Likewise.
4686 (sh64_register_convert_to_raw): Likewise.
4687
4688 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4689
4690 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4691 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4692
4693 * gdbtypes.h (union type_specific): Make field floatformat hold
4694 just a single struct floatformat, not an array.
4695 (floatformat_from_type): Move here.
4696 * gdbtypes.c (floatformat_from_type): Move here. Update to
4697 changed TYPE_FLOATFORMAT definition.
4698 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4699 (recursive_dump_type): Likewise.
4700 (init_float_type): Install correct floatformat for byte order.
4701 (arch_float_type): Likewise.
4702
4703 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4704
4705 * gdbtypes.c (init_type): Change incoming argument from
4706 length-in-bytes to length-in-bits. Assert length is a
4707 multiple of TARGET_CHAR_BITS.
4708 (arch_type, arch_flags_type): Likewise.
4709 (init_integer_type): Update call to init_type.
4710 (init_character_type): Likewise.
4711 (init_boolean_type): Likewise.
4712 (init_float_type): Likewise.
4713 (init_decfloat_type): Likewise.
4714 (init_complex_type): Likewise.
4715 (init_pointer_type): Likewise.
4716 (objfile_type): Likewise.
4717 (arch_integer_type): Update call to arch_type.
4718 (arch_character_type): Likewise.
4719 (arch_boolean_type): Likewise.
4720 (arch_float_type): Likewise.
4721 (arch_decfloat_type): Likewise.
4722 (arch_complex_type): Likewise.
4723 (arch_pointer_type): Likewise.
4724 (gdbtypes_post_init): Likewise.
4725
4726 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4727 (read_base_type): Likewise.
4728 * mdebugread.c (basic_type): Likewise.
4729 * stabsread.c (dbx_init_float_type): Likewise.
4730 (rs6000_builtin_type): Likewise.
4731 (read_range_type): Likewise. Also, fix call to init_integer_type
4732 with erroneous length argument.
4733
4734 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4735 * d-lang.c (build_d_types): Likewise.
4736 * f-lang.c (build_fortran_types): Likewise.
4737 * go-lang.c (build_go_types): Likewise.
4738 * opencl-lang.c (build_opencl_types): Likewise.
4739 * jit.c (finalize_symtab): Likewise.
4740 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4741 (build_std_type_info_type): Likewise.
4742 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4743 update call to arch_flags_type.
4744
4745 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4746 arch_type.
4747 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4748 * windows-tdep.c (windows_get_tlb_type): Likewise.
4749
4750 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4751 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4752 * m32c-tdep.c (make_types): Likewise.
4753 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4754 (rl78_psw_type): Update call to arch_flags_type.
4755 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4756 * rx-tdep.c (rx_psw_type): Likewise.
4757 (rx_fpsw_type): Likewise.
4758 * sparc-tdep.c (sparc_psr_type): Likewise.
4759 (sparc_fsr_type): Likewise.
4760 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4761 (sparc64_ccr_type): Likewise.
4762 (sparc64_fsr_type): Likewise.
4763 (sparc64_fprs_type): Likewise.
4764
4765 2017-09-27 Tom Tromey <tom@tromey.com>
4766
4767 * findcmd.c (find_command): Constify.
4768
4769 2017-09-27 Tom Tromey <tom@tromey.com>
4770
4771 * ada-tasks.c (task_command_1, task_command): Constify.
4772
4773 2017-09-27 Tom Tromey <tom@tromey.com>
4774
4775 * symtab.c (maintenance_print_symbol_cache)
4776 (maintenance_flush_symbol_cache)
4777 (maintenance_print_symbol_cache_statistics): Constify.
4778
4779 2017-09-27 Tom Tromey <tom@tromey.com>
4780
4781 * inferior.c (detach_inferior_command, kill_inferior_command)
4782 (inferior_command): Constify.
4783
4784 2017-09-27 Tom Tromey <tom@tromey.com>
4785
4786 * regcache.c (regcache_print, maintenance_print_registers)
4787 (maintenance_print_raw_registers)
4788 (maintenance_print_cooked_registers)
4789 (maintenance_print_register_groups)
4790 (maintenance_print_remote_registers): Constify.
4791
4792 2017-09-27 Tom Tromey <tom@tromey.com>
4793
4794 * printcmd.c (map_display_numbers, undisplay_command)
4795 (enable_disable_display_command, enable_display_command)
4796 (disable_display_command): Constify.
4797
4798 2017-09-27 Tom Tromey <tom@tromey.com>
4799
4800 * breakpoint.h (delete_command): Don't declare.
4801 * breakpoint.c (delete_command, enable_once_command)
4802 (enable_count_command, enable_delete_command, breakpoint_1)
4803 (maintenance_info_breakpoints, stopin_command, stopat_command)
4804 (delete_command, delete_trace_command, save_breakpoints)
4805 (save_breakpoints_command, save_tracepoints_command): Constify.
4806
4807 2017-09-27 Tom Tromey <tom@tromey.com>
4808
4809 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4810 (skip_ws, extract_identifier, macro_define_command)
4811 (macro_undef_command, macro_list_command): Constify.
4812
4813 2017-09-27 Tom Tromey <tom@tromey.com>
4814
4815 * infcmd.c (environment_info, set_environment_command)
4816 (unset_environment_command, path_info, info_proc_cmd_1)
4817 (info_proc_cmd_mappings, info_proc_cmd_stat)
4818 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4819 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4820
4821 2017-09-27 Tom Tromey <tom@tromey.com>
4822
4823 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4824 Constify.
4825
4826 2017-09-27 Tom Tromey <tom@tromey.com>
4827
4828 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4829
4830 2017-09-27 Tom Tromey <tom@tromey.com>
4831
4832 * demangle.c (demangle_command): Constify.
4833
4834 2017-09-27 Tom Tromey <tom@tromey.com>
4835
4836 * progspace.c (maintenance_info_program_spaces_command):
4837 Constify.
4838
4839 2017-09-27 Tom Tromey <tom@tromey.com>
4840
4841 * compile/compile.c (check_raw_argument, compile_file_command)
4842 (compile_code_command, compile_print_command): Constify.
4843
4844 2017-09-27 Tom Tromey <tom@tromey.com>
4845
4846 * reggroups.c (maintenance_print_reggroups): Constify.
4847
4848 2017-09-27 Tom Tromey <tom@tromey.com>
4849
4850 * dwarf2read.c (save_gdb_index_command): Constify.
4851
4852 2017-09-27 Tom Tromey <tom@tromey.com>
4853
4854 * stap-probe.c (info_probes_stap_command): Constify.
4855
4856 2017-09-27 Tom Tromey <tom@tromey.com>
4857
4858 * fork-child.c (unset_exec_wrapper_command): Constify.
4859
4860 2017-09-27 Tom Tromey <tom@tromey.com>
4861
4862 * btrace.c (get_uint, get_context_size, no_chunk)
4863 (maint_btrace_packet_history_cmd)
4864 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4865 (maint_info_btrace_cmd): Constify.
4866
4867 2017-09-27 Tom Tromey <tom@tromey.com>
4868
4869 * reverse.c (delete_bookmark_command): Constify.
4870
4871 2017-09-27 Tom Tromey <tom@tromey.com>
4872
4873 * remote.c (set_memory_packet_size)
4874 (set_memory_write_packet_size, show_memory_write_packet_size)
4875 (set_memory_read_packet_size, show_memory_read_packet_size)
4876 (compare_sections_command, packet_command, remote_put_command)
4877 (remote_get_command, remote_delete_command): Constify.
4878
4879 2017-09-27 Tom Tromey <tom@tromey.com>
4880
4881 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4882 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4883 (set_mipsfpu_auto_command): Constify.
4884
4885 2017-09-27 Tom Tromey <tom@tromey.com>
4886
4887 * cli/cli-cmds.h (cd_command): Constify.
4888 * cli/cli-cmds.c (cd_command): Constify.
4889
4890 2017-09-27 Tom Tromey <tom@tromey.com>
4891
4892 * thread.c (thread_name_command, thread_find_command): Constify.
4893
4894 2017-09-27 Tom Tromey <tom@tromey.com>
4895
4896 * probe.c (enable_probes_command, disable_probes_command):
4897 Constify.
4898
4899 2017-09-27 Tom Tromey <tom@tromey.com>
4900
4901 * symfile.c (symbol_file_command): Constify.
4902 * gdbcore.h (deprecated_file_changed_hook): Constify.
4903 * exec.c (deprecated_file_changed_hook, exec_file_command)
4904 (file_command): Constify.
4905 * defs.h (symbol_file_command): Constify.
4906
4907 2017-09-27 Tom Tromey <tom@tromey.com>
4908
4909 * remote-fileio.c (set_system_call_allowed)
4910 (show_system_call_allowed): Constify.
4911
4912 2017-09-27 Tom Tromey <tom@tromey.com>
4913
4914 * tracepoint.c (delete_trace_variable_command)
4915 (tfind_end_command, tfind_start_command, tfind_pc_command)
4916 (tfind_tracepoint_command, tfind_line_command)
4917 (tfind_range_command, tfind_outside_command): Constify.
4918
4919 2017-09-27 Tom Tromey <tom@tromey.com>
4920
4921 * ax-gdb.c (maint_agent_printf_command, agent_command)
4922 (agent_eval_command): Constify.
4923
4924 2017-09-27 Tom Tromey <tom@tromey.com>
4925
4926 * tracepoint.c (info_scope_command): Constify.
4927 * python/python.c (gdbpy_decode_line): Constify.
4928 * python/py-breakpoint.c (bppy_init): Constify.
4929 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4930 * location.h: (new_linespec_location)
4931 (string_to_event_location_basic, string_to_event_location):
4932 Constify.
4933 * location.c (new_linespec_location)
4934 (string_to_event_location_basic, string_to_event_location):
4935 Constify.
4936 * linespec.h (decode_line_with_current_source)
4937 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4938 * linespec.c (linespec_lex_to_end)
4939 (decode_line_with_current_source)
4940 (decode_line_with_last_displayed): Constify.
4941 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4942 Constify.
4943 * cli/cli-cmds.c (edit_command, list_command): Constify.
4944 * breakpoint.h (until_break_command, watch_command_wrapper)
4945 (awatch_command_wrapper, rwatch_command_wrapper)
4946 (init_ada_exception_breakpoint): Constify.
4947 * breakpoint.c (break_command_1, dprintf_command)
4948 (break_range_command, watch_command_wrapper)
4949 (rwatch_command_wrapper, awatch_command_wrapper)
4950 (until_break_command, init_ada_exception_breakpoint)
4951 (strace_marker_create_sals_from_location, trace_command)
4952 (ftrace_command, strace_command, struct tracepoint): Constify.
4953 * ax-gdb.c (agent_command_1): Constify.
4954 * ada-lang.c (ada_exception_sal): Constify.
4955
4956 2017-09-27 Tom Tromey <tom@tromey.com>
4957
4958 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4959 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4960 (get_context_size, no_chunk, get_insn_history_modifiers)
4961 (cmd_record_insn_history, get_call_history_modifiers)
4962 (cmd_record_call_history): Constify.
4963
4964 2017-09-27 Tom Tromey <tom@tromey.com>
4965
4966 * source.c (show_substitute_path_command)
4967 (unset_substitute_path_command, set_substitute_path_command):
4968 Constify.
4969
4970 2017-09-27 Tom Tromey <tom@tromey.com>
4971
4972 * typeprint.c (maintenance_print_type): Constify.
4973 * maint.c (maintenance_dump_me, maintenance_demangle)
4974 (maintenance_time_display, maintenance_info_sections)
4975 (maintenance_print_statistics, maintenance_deprecate)
4976 (maintenance_undeprecate): Constify.
4977 (maintenance_do_deprecate): Constify. Use std::string.
4978 (maintenance_selftest): Constify.
4979 * gdbtypes.h (maintenance_print_type): Constify.
4980
4981 2017-09-27 Tom Tromey <tom@tromey.com>
4982
4983 * hppa-tdep.c (unwind_command): Constify.
4984
4985 2017-09-27 Tom Tromey <tom@tromey.com>
4986
4987 * target-descriptions.c (unset_tdesc_filename_cmd)
4988 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4989 Constify.
4990
4991 2017-09-27 Tom Tromey <tom@tromey.com>
4992
4993 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4994
4995 2017-09-27 Tom Tromey <tom@tromey.com>
4996
4997 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4998
4999 2017-09-27 Tom Tromey <tom@tromey.com>
5000
5001 * tui/tui-regs.c (tui_reg_command): Constify.
5002
5003 2017-09-27 Tom Tromey <tom@tromey.com>
5004
5005 * skip.c (skip_file_command, skip_function_command)
5006 (skip_enable_command, skip_disable_command, skip_delete_command):
5007 Constify.
5008
5009 2017-09-27 Tom Tromey <tom@tromey.com>
5010
5011 * record-btrace.c (cmd_record_btrace_bts_start)
5012 (cmd_record_btrace_pt_start): Constify.
5013
5014 2017-09-27 Tom Tromey <tom@tromey.com>
5015
5016 * symmisc.c (maintenance_print_symbols)
5017 (maintenance_print_msymbols, maintenance_print_objfiles)
5018 (maintenance_info_symtabs, maintenance_check_symtabs)
5019 (maintenance_expand_symtabs, maintenance_info_line_tables):
5020 Constify.
5021
5022 2017-09-27 Tom Tromey <tom@tromey.com>
5023
5024 * top.c (new_ui_command): Constify.
5025
5026 2017-09-27 Tom Tromey <tom@tromey.com>
5027
5028 * symfile.c (add_symbol_file_command)
5029 (remove_symbol_file_command, list_overlays_command)
5030 (map_overlay_command, unmap_overlay_command)
5031 (overlay_auto_command, overlay_manual_command)
5032 (overlay_off_command, overlay_load_command): Constify.
5033
5034 2017-09-27 Tom Tromey <tom@tromey.com>
5035
5036 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5037 (info_spu_mailbox_command, info_spu_dma_command)
5038 (info_spu_proxydma_command): Constify.
5039
5040 2017-09-27 Tom Tromey <tom@tromey.com>
5041
5042 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5043
5044 2017-09-27 Tom Tromey <tom@tromey.com>
5045
5046 * cli/cli-script.c (user_defined_command): Constify.
5047
5048 2017-09-27 Tom Tromey <tom@tromey.com>
5049
5050 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5051 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5052 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5053 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5054 (dump_binary_value, append_binary_memory, append_binary_value):
5055 Constify.
5056 (struct dump_context) <func>: Constify.
5057 (add_dump_command): Update.
5058
5059 2017-09-27 Tom Tromey <tom@tromey.com>
5060
5061 * cli/cli-cmds.c (show_version, show_configuration)
5062 (source_command, show_user): Constify.
5063
5064 2017-09-27 Tom Tromey <tom@tromey.com>
5065
5066 * target.c (maintenance_print_target_stack): Constify.
5067
5068 2017-09-27 Tom Tromey <tom@tromey.com>
5069
5070 * interps.c (interpreter_exec_cmd): Constify.
5071
5072 2017-09-27 Tom Tromey <tom@tromey.com>
5073
5074 * record-full.c (cmd_record_full_restore): Constify.
5075
5076 2017-09-27 Tom Tromey <tom@tromey.com>
5077
5078 * memattr.c (enable_mem_command, disable_mem_command)
5079 (delete_mem_command): Constify.
5080
5081 2017-09-27 Tom Tromey <tom@tromey.com>
5082
5083 * value.c (show_convenience): Constify.
5084
5085 2017-09-27 Tom Tromey <tom@tromey.com>
5086
5087 * gdbcore.h (core_file_command): Update.
5088 * corefile.c (core_file_command): Constify.
5089
5090 2017-09-27 Tom Tromey <tom@tromey.com>
5091
5092 * user-regs.c (maintenance_print_user_registers): Constify.
5093
5094 2017-09-27 Tom Tromey <tom@tromey.com>
5095
5096 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5097
5098 2017-09-27 Tom Tromey <tom@tromey.com>
5099
5100 * cp-support.c (first_component_command): Constify.
5101
5102 2017-09-27 Tom Tromey <tom@tromey.com>
5103
5104 * psymtab.c (maintenance_print_psymbols)
5105 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5106 Constify.
5107
5108 2017-09-27 Tom Tromey <tom@tromey.com>
5109
5110 * windows-tdep.c (display_tib): Constify.
5111
5112 2017-09-27 Tom Tromey <tom@tromey.com>
5113
5114 * linux-fork.c (delete_checkpoint_command)
5115 (detach_checkpoint_command): Constify.
5116
5117 2017-09-27 Tom Tromey <tom@tromey.com>
5118
5119 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5120
5121 2017-09-27 Tom Tromey <tom@tromey.com>
5122
5123 * arc-tdep.c (dump_arc_instruction_command): Constify.
5124
5125 2017-09-27 Tom Tromey <tom@tromey.com>
5126
5127 * valprint.c (set_radix, show_radix): Constify.
5128
5129 2017-09-27 Tom Tromey <tom@tromey.com>
5130
5131 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5132
5133 2017-09-27 Tom Tromey <tom@tromey.com>
5134
5135 * command.h (not_just_help_class_command): Update.
5136 * cli/cli-decode.h (not_just_help_class_command): Update.
5137 * cli/cli-decode.c (not_just_help_class_command): Constify.
5138
5139 2017-09-27 Tom Tromey <tom@tromey.com>
5140
5141 * gdb_bfd.c (maintenance_info_bfds): Constify.
5142
5143 2017-09-27 Tom Tromey <tom@tromey.com>
5144
5145 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5146 overloads.
5147 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5148 (do_const_cfunc): New function.
5149 (cmd_cfunc_eq): New overload.
5150 (cli_user_command_p): Check do_const_cfunc.
5151 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5152 const_cfunc.
5153 * command.h (add_cmd): Add const overload and no-function
5154 overload.
5155 (set_cmd_cfunc): Add const overload.
5156 (cmd_const_cfunc_ftype): Declare.
5157 (cmd_cfunc_eq): Add const overload.
5158 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5159 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5160 overload.
5161
5162 2017-09-27 Tom Tromey <tom@tromey.com>
5163
5164 * macroexp.c (get_next_token_for_substitution): New function.
5165 (substitute_args): Call it. Check for __VA_OPT__.
5166
5167 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5168 Pedro Alves <palves@redhat.com>
5169
5170 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5171 producer_is_icc_lt_14.
5172 (producer_is_icc_lt_14): New function.
5173 (check_producer): Add code for checking version of ICC.
5174 (producer_is_icc): Move to producer.c.
5175 (read_structure_type): Restrict ICC workaround to ICC<14.
5176 * producer.c: Include selftest.h.
5177 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5178 New functions.
5179 * producer.h (producer_is_icc): New declaration.
5180
5181 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5182
5183 * Makefile.in (SFILES): Add producer.c.
5184 (COMMON_OBS): Add producer.o
5185 * amd64-tdep.c (producer.h): Add new include.
5186 * dwarf2read.c (producer.h): Add new include.
5187 * producer.c: New file.
5188 * producer.h: New file.
5189 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5190 producer.c.
5191 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5192 producer.h.
5193
5194 2017-09-26 Matthias Klose <doko@ubuntu.com>
5195
5196 * configure.ac: Search ncursesw before ncurses.
5197 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5198 * gdb_curses.h: Include <ncursesw/ncurses.h>
5199 * config.in, configure: Regenerate.
5200
5201 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5202
5203 PR gdb/22185
5204 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5205 obsolete.
5206 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5207 Remove i386sol2 support.
5208 * configure.nat <i386sol2>: Remove.
5209 <sol2-64>: Fold into ...
5210 <sol2>: ... this.
5211 Move common settings to default section.
5212 Add sol-thread.o.
5213 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5214 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5215 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5216 <i[34567]86-*-solaris*>: Remove.
5217 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5218
5219 * configure.ac: Remove wctype in libw check.
5220 (_MSE_INT_H): Don't define on Solaris 7-9.
5221 <solaris*>: Remove libthread_db.so.1 check.
5222 * configure: Regenerate.
5223 * config.in: Regenerate.
5224
5225 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5226 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5227 (gdb_ps_size_t): Remove.
5228 Use base types in users.
5229 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5230
5231 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5232
5233 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5234
5235 PR build/22206
5236 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5237 (adi_is_addr_mapped): Likewise.
5238 (PSR_ICC): Don't redefine.
5239 (PSR_IMPL): Likewise.
5240
5241 2017-09-25 Tom Tromey <tom@tromey.com>
5242
5243 * regcache.c (regcache::dump): Use string_printf.
5244
5245 2017-09-25 Tom Tromey <tom@tromey.com>
5246
5247 * regcache.c (class regcache_invalidator): New.
5248 (struct register_to_invalidate): Remove.
5249 (make_cleanup_regcache_invalidate): Remove.
5250 (regcache::raw_write): Use regcache_invalidator.
5251
5252 2017-09-25 Tom Tromey <tom@tromey.com>
5253
5254 * spu-tdep.c (spu2ppu_sniffer): Update.
5255 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5256 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5257 Remove.
5258 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5259 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5260 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5261 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5262 (frame_pop): Update.
5263
5264 2017-09-25 Tom Tromey <tom@tromey.com>
5265
5266 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5267 * regcache.h (regcache_xfree): Don't declare.
5268 * regcache.c (regcache_xfree): Remove.
5269 (do_regcache_xfree): Use delete.
5270 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5271 * linux-fork.c (free_fork): Use delete.
5272 (fork_save_infrun_state): Likewise.
5273 * jit.c (jit_dealloc_cache): Use delete.
5274 * infrun.c (discard_infcall_suspend_state): Use delete.
5275
5276 2017-09-25 Tom Tromey <tom@tromey.com>
5277
5278 * regcache.h (regcache_xmalloc): Don't declare.
5279 (regcache_raw_set_cached_value): Update comment.
5280 * regcache.c (regcache_xmalloc): Remove.
5281 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5282 * jit.c (jit_frame_sniffer): Use new.
5283 * frame.c (frame_save_as_regcache): Use new.
5284
5285 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5286
5287 * NEWS: Advertise support for guarded-storage registers on IBM z.
5288
5289 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5290
5291 * s390-linux-nat.c (have_regset_gs): New static variable.
5292 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5293 control block and guarded-storage broadcast control regsets.
5294 (s390_read_description): Detect whether the target has
5295 guarded-storage support, return appropriate tdesc.
5296 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5297 (features/s390x-gs-linux64.c): Likewise.
5298 (struct gdbarch_tdep) <have_gs>: New field.
5299 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5300 (s390_gsbc_regset): New variables.
5301 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5302 and s390_gsbc_regset, if applicable.
5303 (s390_core_read_description): Check whether core file was from a
5304 target with guarded-storage support; include appropriate regsets.
5305 (s390_gdbarch_init): Add registers for guarded-storage support.
5306 (_initialize_s390_tdep): Initialize new target descriptions that
5307 include registers for guarded-storage support.
5308 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5309 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5310 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5311 (S390_NUM_REGS): Adjust macro definition.
5312 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5313 (tdesc_s390x_gs_linux64): New declarations.
5314
5315 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5316
5317 * features/s390-gs-linux64.xml: New file.
5318 * features/s390-gs.xml: New file.
5319 * features/s390-gsbc.xml: New file.
5320 * features/s390x-gs-linux64.xml: New file.
5321 * features/Makefile (WHICH): Add s390-gs-linux64 and
5322 s390x-gs-linux64.
5323 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5324 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5325 * features/s390-gs-linux64.c: New generated file.
5326 * features/s390x-gs-linux64.c: New file.
5327 * regformats/s390-gs-linux64.dat: New file.
5328 * regformats/s390x-gs-linux64.dat: New file.
5329
5330 2017-09-23 Tom Tromey <tom@tromey.com>
5331
5332 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5333
5334 2017-09-22 Tom Tromey <tom@tromey.com>
5335
5336 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5337 type to scoped_restore_tmpl.
5338 <scoped_input_handler>: Initialize m_quit_handler directly.
5339
5340 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5341
5342 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5343 (cd_command): Likewise. Free "current_directory" before
5344 assigning to it.
5345 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5346 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5347 * top.c (gdb_dirbuf): Remove global declaration.
5348 * top.h (gdb_dirbuf): Likewise.
5349
5350 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5351
5352 * gnulib/aclocal.m4: Regenerate.
5353 * gnulib/config.in: Regenerate.
5354 * gnulib/configure: Regenerate.
5355 * gnulib/import/Makefile.am: Regenerate.
5356 * gnulib/import/Makefile.in: Regenerate.
5357 * gnulib/import/assure.h: New file.
5358 * gnulib/import/at-func.c: Likewise
5359 * gnulib/import/chdir-long.c: New file.
5360 * gnulib/import/chdir-long.h: New file.
5361 * gnulib/import/cloexec.c: New file.
5362 * gnulib/import/cloexec.h: New file.
5363 * gnulib/import/close.c: New file.
5364 * gnulib/import/closedir.c: New file.
5365 * gnulib/import/dirent-private.h: New file.
5366 * gnulib/import/dup-safer.c: New file.
5367 * gnulib/import/dup.c: New file.
5368 * gnulib/import/dup2.c: New file.
5369 * gnulib/import/error.c: New file.
5370 * gnulib/import/error.h: New file.
5371 * gnulib/import/exitfail.c: New file.
5372 * gnulib/import/exitfail.h: New file.
5373 * gnulib/import/fchdir.c: New file.
5374 * gnulib/import/fcntl.c: New file.
5375 * gnulib/import/fcntl.in.h: New file.
5376 * gnulib/import/fd-hook.c: New file.
5377 * gnulib/import/fd-hook.h: New file.
5378 * gnulib/import/fd-safer.c: New file.
5379 * gnulib/import/fdopendir.c: New file.
5380 * gnulib/import/filename.h: New file.
5381 * gnulib/import/filenamecat-lgpl.c: New file.
5382 * gnulib/import/filenamecat.h: New file.
5383 * gnulib/import/fstat.c: New file.
5384 * gnulib/import/fstatat.c: New file.
5385 * gnulib/import/getcwd-lgpl.c: New file.
5386 * gnulib/import/getcwd.c: New file.
5387 * gnulib/import/getdtablesize.c: New file.
5388 * gnulib/import/getlogin_r.c: New file.
5389 * gnulib/import/getprogname.c: New file.
5390 * gnulib/import/getprogname.h: New file.
5391 * gnulib/import/gettext.h: New file.
5392 * gnulib/import/glob-libc.h: New file.
5393 * gnulib/import/glob.c: New file.
5394 * gnulib/import/glob.in.h: New file.
5395 * gnulib/import/intprops.h: New file.
5396 * gnulib/import/m4/chdir-long.m4: New file.
5397 * gnulib/import/m4/close.m4: New file.
5398 * gnulib/import/m4/closedir.m4: New file.
5399 * gnulib/import/m4/d-ino.m4: New file.
5400 * gnulib/import/m4/d-type.m4: New file.
5401 * gnulib/import/m4/dup.m4: New file.
5402 * gnulib/import/m4/dup2.m4: New file.
5403 * gnulib/import/m4/error.m4: New file.
5404 * gnulib/import/m4/fchdir.m4: New file.
5405 * gnulib/import/m4/fcntl.m4: New file.
5406 * gnulib/import/m4/fcntl_h.m4: New file.
5407 * gnulib/import/m4/fdopendir.m4: New file.
5408 * gnulib/import/m4/filenamecat.m4: New file.
5409 * gnulib/import/m4/fstat.m4: New file.
5410 * gnulib/import/m4/fstatat.m4: New file.
5411 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5412 * gnulib/import/m4/getcwd-path-max.m4: New file.
5413 * gnulib/import/m4/getcwd.m4: New file.
5414 * gnulib/import/m4/getdtablesize.m4: New file.
5415 * gnulib/import/m4/getlogin_r.m4: New file.
5416 * gnulib/import/m4/getprogname.m4: New file.
5417 * gnulib/import/m4/glob.m4: New file.
5418 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5419 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5420 * gnulib/import/m4/mempcpy.m4: New file.
5421 * gnulib/import/m4/memrchr.m4: New file.
5422 * gnulib/import/m4/mode_t.m4: New file.
5423 * gnulib/import/m4/msvc-inval.m4: New file.
5424 * gnulib/import/m4/msvc-nothrow.m4: New file.
5425 * gnulib/import/m4/open.m4: New file.
5426 * gnulib/import/m4/openat.m4: New file.
5427 * gnulib/import/m4/opendir.m4: New file.
5428 * gnulib/import/m4/readdir.m4: New file.
5429 * gnulib/import/m4/realloc.m4: New file.
5430 * gnulib/import/m4/rewinddir.m4: New file.
5431 * gnulib/import/m4/save-cwd.m4: New file.
5432 * gnulib/import/m4/strdup.m4: New file.
5433 * gnulib/import/m4/strerror.m4: New file.
5434 * gnulib/import/m4/unistd-safer.m4: New file.
5435 * gnulib/import/mempcpy.c: New file.
5436 * gnulib/import/memrchr.c: New file.
5437 * gnulib/import/msvc-inval.c: New file.
5438 * gnulib/import/msvc-inval.h: New file.
5439 * gnulib/import/msvc-nothrow.c: New file.
5440 * gnulib/import/msvc-nothrow.h: New file.
5441 * gnulib/import/open.c: New file.
5442 * gnulib/import/openat-die.c: New file.
5443 * gnulib/import/openat-priv.h: New file.
5444 * gnulib/import/openat-proc.c: New file.
5445 * gnulib/import/openat.c: New file.
5446 * gnulib/import/openat.h: New file.
5447 * gnulib/import/opendir.c: New file.
5448 * gnulib/import/pipe-safer.c: New file.
5449 * gnulib/import/readdir.c: New file.
5450 * gnulib/import/realloc.c: New file.
5451 * gnulib/import/rewinddir.c: New file.
5452 * gnulib/import/save-cwd.c: New file.
5453 * gnulib/import/save-cwd.h: New file.
5454 * gnulib/import/strdup.c: New file.
5455 * gnulib/import/strerror-override.c: New file.
5456 * gnulib/import/strerror-override.h: New file.
5457 * gnulib/import/strerror.c: New file.
5458 * gnulib/import/unistd--.h: New file.
5459 * gnulib/import/unistd-safer.h: New file.
5460 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5461 "getcwd" and "glob".
5462 * ser-tcp.c: Undefine "close" before redefining it.
5463
5464 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5465
5466 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5467 get rid of res_val.
5468
5469 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5470
5471 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5472 <sol2,sparc>: Likewise.
5473 <sol2-64,i386>: Likewise.
5474
5475 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5476 -Wdeprecated-declarations on *-*-solaris*.
5477 * configure: Regenerate.
5478
5479 * procfs.c: Include "nat/inferior.h".
5480 (procfs_info_proc): Fix typo.
5481
5482 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5483
5484 * remote.c (vector): Include.
5485 (struct private_thread_info): Add field, thread_handle.
5486 (free_private_thread_info): Deallocate storage associated with
5487 thread handle.
5488 (get_private_info_thread): Initialize `thread_handle' field.
5489 (struct thread_item): Add field, thread_handle.
5490 (clear_threads_listing_context): Deallocate storage associated
5491 with thread handle.
5492 (start_thread): Add support for "handle" attribute.
5493 (thread_attributes): Add "handle".
5494 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5495 field.
5496 (remote_update_thread_list): Update thread_handle.
5497 (remote_thread_handle_to_thread_info): New function.
5498 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5499
5500 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5501
5502 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5503 function.
5504 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5505 * python/python-internal.h (thread_object_type): Declare.
5506
5507 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5508
5509 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5510 (target_thread_handle_to_thread_info): Declare.
5511 * target.c (target_thread_handle_to_thread_info): New function.
5512 * target-delegates.c: Regenerate.
5513 * gdbthread.h (find_thread_by_handle): Declare.
5514 * thread.c (find_thread_by_handle): New function.
5515 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5516 function.
5517 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5518
5519 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5520
5521 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5522
5523 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5524
5525 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5526
5527 2017-09-21 Yao Qi <yao.qi@linaro.org>
5528
5529 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5530 to gdb_target_obs.
5531
5532 2017-09-20 Tom Tromey <tom@tromey.com>
5533
5534 * breakpoint.c (struct counted_command_line): Remove.
5535 (breakpoint_commands): Update.
5536 (alloc_counted_command_line, incref_counted_command_line)
5537 (decref_counted_command_line, do_cleanup_counted_command_line)
5538 (make_cleanup_decref_counted_command_line): Remove.
5539 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5540 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5541 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5542 (save_breakpoints): Update.
5543 * breakpoint.h (counted_command_line): Now a typedef to
5544 shared_ptr.
5545 (struct breakpoint) <commands>: Now a counted_command_line.
5546 (struct bpstats) <command>: Likewise.
5547
5548 2017-09-20 Tom Tromey <tom@tromey.com>
5549
5550 * breakpoint.c (struct commands_info, do_map_commands_command):
5551 Remove.
5552 (commands_command_1): Update.
5553 (iterate_over_related_breakpoints): Take a function_view.
5554 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5555 (delete_command): Update.
5556 (map_breakpoint_numbers): Take a function_view.
5557 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5558 (disable_command): Update.
5559 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5560 (enable_command): Update.
5561 (struct disp_data, do_enable_breakpoint_disp)
5562 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5563 (do_map_enable_delete_breakpoint): Remove.
5564 (enable_once_command, enable_count_command, enable_delete_command)
5565 (delete_trace_variable_command): Update.
5566
5567 2017-09-20 Tom Tromey <tom@tromey.com>
5568
5569 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5570 (bpstat_clear): Use delete.
5571 (bpstats): New constructors.
5572 (bpstat_copy, bpstat_stop_status): Use new.
5573 (dprintf_after_condition_true): Update.
5574 * breakpoint.h (bpstats::bpstats): Add constructors.
5575 (bpstats::~bpstats): Add destructor.
5576
5577 2017-09-20 Pedro Alves <palves@redhat.com>
5578
5579 * eval.c (make_params): Delete, refactored as ...
5580 (class fake_method): ... this new type's ctor.
5581 (fake_method::~fake_method): New.
5582 (evaluate_subexp_standard): Use 'fake_method'.
5583
5584 2017-09-20 Tom Tromey <tom@tromey.com>
5585
5586 * windows-nat.c (get_windows_debug_event, windows_wait)
5587 (do_initial_windows_stuff, windows_attach): Update.
5588 * utils.c (vwarning, internal_vproblem): Update.
5589 (ui_unregister_input_event_handler_cleanup)
5590 (prepare_to_handle_input): Remove.
5591 (class scoped_input_handler): New.
5592 (defaulted_query, prompt_for_continue): Update.
5593 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5594 Update.
5595 * top.c (undo_terminal_modifications_before_exit): Update.
5596 * target/target.h (target_terminal_init, target_terminal_inferior)
5597 (target_terminal_ours): Don't declare.
5598 (class target_terminal): New.
5599 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5600 (target_terminal_ours_for_output)
5601 (make_cleanup_restore_target_terminal): Don't declare.
5602 (target_terminal_info): Remove.
5603 * target.c (enum terminal_state, terminal_state): Remove.
5604 (target_terminal::terminal_state): Define.
5605 (target_terminal::init): Rename from target_terminal_init.
5606 (target_terminal::inferior): Rename from
5607 target_terminal_inferior.
5608 (target_terminal::ours): Rename from target_terminal_ours.
5609 (target_terminal::ours_for_output): Rename from
5610 target_terminal_ours_for_output.
5611 (target_terminal::info): New method.
5612 (cleanup_restore_target_terminal)
5613 (make_cleanup_restore_target_terminal): Remove.
5614 * solib.c (handle_solib_event): Update.
5615 * remote.c (remote_serial_quit_handler): Update.
5616 (remote_terminal_inferior, remote_wait_as): Update.
5617 * record-full.c (record_full_wait_1): Update.
5618 * nto-procfs.c (procfs_create_inferior): Update.
5619 * nat/fork-inferior.c (startup_inferior): Update.
5620 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5621 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5622 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5623 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5624 (mi_breakpoint_created, mi_breakpoint_deleted)
5625 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5626 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5627 (mi_user_selected_context_changed, report_initial_inferior):
5628 Update.
5629 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5630 (linux_nat_terminal_inferior): Update.
5631 * infrun.c (follow_fork_inferior)
5632 (handle_vfork_child_exec_or_exit, do_target_resume)
5633 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5634 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5635 Update.
5636 * inflow.c (child_terminal_init, info_terminal_command): Update.
5637 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5638 (attach_command): Update.
5639 * infcall.c (call_thread_fsm_should_stop): Update.
5640 * gnu-nat.c (gnu_attach): Update.
5641 * extension.c (struct active_ext_lang_state)
5642 (restore_active_ext_lang): Update.
5643 * exceptions.c (print_flush): Update.
5644 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5645 (struct quit_handler_cleanup_data, restore_quit_handler)
5646 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5647 Remove.
5648 * cp-support.c (gdb_demangle): Update.
5649 * breakpoint.c (update_inserted_breakpoint_locations)
5650 (insert_breakpoint_locations, handle_jit_event)
5651 (disable_breakpoints_in_unloaded_shlib): Update.
5652 * annotate.c (annotate_breakpoints_invalid)
5653 (annotate_frames_invalid): Update.
5654
5655 2017-09-20 Tom Tromey <tom@tromey.com>
5656
5657 * main.c (catch_command_errors): Rename from
5658 catch_command_errors_const.
5659 (captured_main_1): Update.
5660
5661 2017-09-20 Pedro Alves <palves@redhat.com>
5662
5663 * cli/cli-cmds.c (list_command): Use print_sal_location.
5664 (print_sal_location): New function.
5665 (ambiguous_line_spec): Use print_sal_location.
5666 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5667 * symtab.c (find_function_start_sal): Likewise.
5668 * symtab.h (symtab_and_line::symbol): New field.
5669
5670 2017-09-20 Pedro Alves <palves@redhat.com>
5671
5672 * linespec.c (minsym_found): Handle non-text minsyms.
5673 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5674
5675 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5676
5677 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5678 backslash.
5679
5680 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5681
5682 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5683 vmovups instead vmovaps.
5684 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5685
5686 2017-09-19 John Baldwin <jhb@FreeBSD.org>
5687
5688 * NEWS (Changes since GDB 8.0): Add starti.
5689 * infcmd.c (enum run_break): New.
5690 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5691 case.
5692 (run_command): Use enum run_how.
5693 (start_command): Likewise.
5694 (starti_command): New function.
5695 (RUN_ARGS_HELP): New macro.
5696 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5697 commands. Add starti command.
5698
5699 2017-09-19 Yao Qi <yao.qi@linaro.org>
5700
5701 * Makefile.in (monitor.o): Remove the rule.
5702
5703 2017-09-19 Yao Qi <yao.qi@linaro.org>
5704
5705 * annotate.h (struct annotate_arg_emitter): Use
5706 DISABLE_COPY_AND_ASSIGN.
5707 * common/refcounted-object.h (refcounted_object): Likewise.
5708 * completer.h (struct completion_result): Likewise.
5709 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5710 * filename-seen-cache.h (filename_seen_cache): Likewise.
5711 * gdbcore.h (thread_section_name): Likewise.
5712 * gdb_regex.h (compiled_regex): Likewise.
5713 * gdbthread.h (scoped_restore_current_thread): Likewise.
5714 * inferior.h (scoped_restore_current_inferior): Likewise.
5715 * jit.c (jit_reader): Likewise.
5716 * linespec.h (struct linespec_result): Likewise.
5717 * mi/mi-parse.h (struct mi_parse): Likewise.
5718 * nat/fork-inferior.c (execv_argv): Likewise.
5719 * progspace.h (scoped_restore_current_program_space): Likewise.
5720 * python/python-internal.h (class gdbpy_enter): Likewise.
5721 * regcache.h (regcache): Likewise.
5722 * target-descriptions.c (struct tdesc_reg): Likewise.
5723 (struct tdesc_type): Likewise.
5724 (struct tdesc_feature): Likewise.
5725 * ui-out.h (ui_out_emit_type): Likewise.
5726
5727 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5728
5729 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5730 label abort_expression.
5731
5732 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5733
5734 * common/buffer.c (buffer_xml_printf): Adjust.
5735 * common/xml-utils.c (xml_escape_text): Change return type to
5736 std::string, update code accordingly.
5737 * common/xml-utils.h (xml_escape_text): Change return type to
5738 std::string.
5739 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5740 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5741 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5742 Adjust.
5743
5744 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5745
5746 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5747 (SUBDIR_UNITTESTS_OBS): Add new object file.
5748 * unittests/xml-utils-selftests.c: New file.
5749
5750 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5751
5752 * common/selftest.h (selftest): New struct/interface.
5753 (register_test): Add name parameter, add new overload.
5754 (run_tests): Add filter parameter.
5755 (for_each_selftest_ftype): New typedef.
5756 (for_each_selftest): New declaration.
5757 * common/selftest.c (tests): Change type to
5758 map<string, unique_ptr<selftest>>.
5759 (simple_selftest): New struct.
5760 (register_test): New function.
5761 (register_test): Add name parameter and use it.
5762 (run_tests): Add filter parameter and use it. Add prints.
5763 Adjust to vector -> map change.
5764 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5765 registering selftests.
5766 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5767 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5768 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5769 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5770 * findvar.c (_initialize_findvar): Likewise.
5771 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5772 * maint.c (maintenance_selftest): Update call to run_tests.
5773 (maintenance_info_selftests): New function.
5774 (_initialize_maint_cmds): Register "maintenance info selftests"
5775 command. Update "maintenance selftest" doc.
5776 * regcache.c (_initialize_regcache): Add names when registering
5777 selftests.
5778 * rust-exp.y (_initialize_rust_exp): Likewise.
5779 * selftest-arch.c (gdbarch_selftest): New struct.
5780 (gdbarch_tests): Remove.
5781 (register_test_foreach_arch): Add name parameter. Call
5782 register_test.
5783 (tests_with_arch): Remove, move most content to
5784 gdbarch_selftest::operator().
5785 (_initialize_selftests_foreach_arch): Remove.
5786 * selftest-arch.h (register_test_foreach_arch): Add name
5787 parameter.
5788 (run_tests_with_arch): New declaration.
5789 * utils-selftests.c (_initialize_utils_selftests): Add names
5790 when registering selftests.
5791 * utils.c (_initialize_utils): Likewise.
5792 * unittests/array-view-selftests.c
5793 (_initialize_array_view_selftests): Likewise.
5794 * unittests/environ-selftests.c (_initialize_environ_selftests):
5795 Likewise.
5796 * unittests/function-view-selftests.c
5797 (_initialize_function_view_selftests): Likewise.
5798 * unittests/offset-type-selftests.c
5799 (_initialize_offset_type_selftests): Likewise.
5800 * unittests/optional-selftests.c
5801 (_initialize_optional_selftests): Likewise.
5802 * unittests/scoped_restore-selftests.c
5803 (_initialize_scoped_restore_selftests): Likewise.
5804 * NEWS: Document "maintenance selftest" and "maint info
5805 selftests".
5806
5807 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5808
5809 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5810 scoped_restore.
5811
5812 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5813
5814 * mi/mi-main.c (mi_load_progress): Make uiout variable
5815 a unique_ptr.
5816
5817 2017-09-15 Pedro Alves <palves@redhat.com>
5818
5819 * compile/compile-c-types.c (convert_enum, convert_int)
5820 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5821
5822 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5823
5824 * dwarf2read.c (copy_string): Remove.
5825 (parse_macro_definition): Replace copy_string with savestring.
5826
5827 2017-09-15 Yao Qi <yao.qi@linaro.org>
5828
5829 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5830 gdb_target_obs.
5831 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5832 Likewise.
5833 (i[34567]86-*-linux*): Likewise.
5834
5835 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5836
5837 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5838 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5839 <stack>: Change type to std::vector.
5840 <stack_len, stack_allocated>: Remove.
5841 <grow_stack>: Remove.
5842 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5843 (dwarf_expr_context::~dwarf_expr_context): Remove.
5844 (dwarf_expr_context::grow_stack): Remove.
5845 (dwarf_expr_context::push): Adjust.
5846 (dwarf_expr_context::pop): Adjust.
5847 (dwarf_expr_context::fetch): Adjust.
5848 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5849 (dwarf_expr_context::stack_empty_p): Adjust.
5850 (dwarf_expr_context::execute_stack_op): Adjust.
5851
5852 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5853
5854 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5855 return type to bool.
5856 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5857
5858 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5859
5860 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5861 Change type to bool.
5862 (dwarf_stack_value) <in_stack_memory>: Likewise.
5863 (dwarf_expr_context) <push_address>: Change parameter type to
5864 bool.
5865 <fetch_in_stack_memory>: Change return type to bool.
5866 <push>: Change parameter type to bool.
5867 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5868 to bool.
5869 (dwarf_expr_context::push_address): Likewise.
5870 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5871 to bool.
5872 (dwarf_expr_context::execute_stack_op): Adjust.
5873 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5874
5875 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5876
5877 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5878 (struct dwarf_expr_context) <n_pieces>: Remove.
5879 <pieces>: Change type to std::vector.
5880 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5881 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5882 pieces.
5883 (dwarf_expr_context::add_piece): Adjust.
5884 * dwarf2loc.c (struct piece_closure): Initialize fields.
5885 <n_pieces>: Remove.
5886 <pieces>: Change type to std::vector.
5887 (allocate_piece_closure): Adjust, change parameter to
5888 std::vector rvalue and std::move it to piece_closure.
5889 (rw_pieced_value): Adjust.
5890 (check_pieced_synthetic_pointer): Adjust.
5891 (indirect_synthetic_pointer): Adjust.
5892 (coerce_pieced_ref): Adjust.
5893 (free_pieced_value_closure): Adjust. Use delete to free
5894 piece_closure.
5895 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5896 to allocate_piece_closure.
5897 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5898
5899 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5900
5901 * probe.h (probe_ops_cp): Remove typedef.
5902 (DEF_VEC_P (probe_ops_cp)): Remove.
5903 (all_probe_ops): Change type to std::vector.
5904 * probe.c (info_probes_for_ops): Adjust to vector change.
5905 (probe_linespec_to_ops): Likewise.
5906 (all_probe_ops): Change type to std::vector.
5907 (_initialize_probe): Adjust to vector change.
5908 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5909 * elfread.c (elf_get_probes): Likewise.
5910 * stap-probe.c (_initialize_stap_probe): Likewise.
5911
5912 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5913
5914 * probe.h (struct bound_probe): Define constructors.
5915 * probe.c (bound_probe_s): Remove typedef.
5916 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5917 (collect_probes): Change return type to std::vector, remove
5918 cleanup.
5919 (compare_probes): Return bool, change parameter type. Change
5920 semantic to "less than".
5921 (gen_ui_out_table_header_info): Change parameter to std::vector
5922 and update.
5923 (exists_probe_with_pops): Likewise.
5924 (info_probes_for_ops): Update to std::vector change.
5925 (enable_probes_command): Likewise.
5926 (disable_probes_command): Likewise.
5927
5928 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5929
5930 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5931 vec to std::vector.
5932 * probe.c (parse_probes_in_pspace): Update.
5933 (find_probes_in_objfile): Update.
5934 (find_probe_by_pc): Update.
5935 (collect_probes): Update.
5936 (probe_any_get_probes): Update.
5937 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5938 return type to reference to std::vector.
5939 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5940 std::vector and update.
5941 (dtrace_process_dof): Likewise.
5942 (dtrace_get_probes): Likewise.
5943 * elfread.c (elf_get_probes): Change return type to std::vector,
5944 store an std::vector in bfd_data.
5945 (probe_key_free): Update to std::vector.
5946 * stap-probe.c (handle_stap_probe): Change parameter to
5947 std::vector and update.
5948 (stap_get_probes): Likewise.
5949 * symfile-debug.c (debug_sym_get_probes): Change return type to
5950 std::vector and update.
5951
5952 2017-09-11 Tom Tromey <tom@tromey.com>
5953
5954 * breakpoint.c (program_breakpoint_here_p): Update.
5955 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5956 from make_show_memory_breakpoints_cleanup. Return a
5957 scoped_restore_tmpl<int>.
5958 (restore_show_memory_breakpoints): Remove.
5959 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5960 * mem-break.c (memory_validate_breakpoint): Update.
5961 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5962 (ia64_memory_remove_breakpoint): Update.
5963 (ia64_breakpoint_from_pc): Update.
5964 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5965 from make_show_memory_breakpoints_cleanup.
5966
5967 2017-09-11 Tom Tromey <tom@tromey.com>
5968
5969 * d-namespace.c (d_lookup_symbol): Use std::string.
5970 (find_symbol_in_baseclass): Likewise.
5971
5972 2017-09-11 Tom Tromey <tom@tromey.com>
5973
5974 * ctf.c (ctf_start): Use std::string.
5975
5976 2017-09-11 Tom Tromey <tom@tromey.com>
5977
5978 * ada-lang.c (is_known_support_routine): Update.
5979 (ada_unhandled_exception_name_addr_from_raise): Update.
5980 * guile/scm-frame.c (gdbscm_frame_name): Update.
5981 * python/py-frame.c (frapy_name): Update.
5982 (frapy_function): Update.
5983 * stack.h (find_frame_funname): Update.
5984 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5985 (print_frame): Update.
5986
5987 2017-09-11 Tom Tromey <tom@tromey.com>
5988
5989 * findcmd.c (put_bits): Take a gdb::byte_vector.
5990 (parse_find_args): Return gdb::byte_vector. "args" now const.
5991 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5992 cleanups.
5993 (find_command): Update.
5994
5995 2017-09-11 Tom Tromey <tom@tromey.com>
5996
5997 * cli/cli-script.c (class scoped_restore_hook_in): New.
5998 (clear_hook_in_cleanup): Remove.
5999 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6000 scoped_restore_hook_in.
6001
6002 2017-09-11 Tom Tromey <tom@tromey.com>
6003
6004 * cli/cli-script.c (restore_interp): Remove.
6005 (read_command_lines): Use scoped_restore_interp.
6006 * interps.c (scoped_restore_interp::set_temp): Rename from
6007 interp_set_temp.
6008 * interps.h (class scoped_restore_interp): New.
6009 (interp_set_temp): Remove.
6010
6011 2017-09-11 Tom Tromey <tom@tromey.com>
6012
6013 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6014 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6015 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6016 scoped_restore.
6017 (mi_cmd_break_insert_1): Update.
6018 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6019 scoped_restore.
6020
6021 2017-09-11 Tom Tromey <tom@tromey.com>
6022
6023 * demangle.c (demangle_command): Update.
6024 * breakpoint.c (disable_command): Update.
6025 (enable_command): Update.
6026 (find_location_by_number): Make "number" const. Use
6027 get_number_trailer.
6028 * cli/cli-utils.c (extract_arg): Return std::string.
6029 * probe.c (parse_probe_linespec): Update. Change types.
6030 (collect_probes): Take string arguments.
6031 (parse_probe_linespec): Likewise.
6032 (info_probes_for_ops): Update.
6033 (enable_probes_command): Update.
6034 (disable_probes_command): Update.
6035 * break-catch-sig.c (catch_signal_split_args): Update.
6036 * mi/mi-parse.c (mi_parse): Update.
6037
6038 2017-09-11 Tom Tromey <tom@tromey.com>
6039
6040 * language.h (language_enum): Make argument const.
6041 * language.c (language_enum): Make argument const.
6042
6043 2017-09-11 Tom Tromey <tom@tromey.com>
6044
6045 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6046 as function.
6047 (skip_to_space): Rename from skip_to_space_const.
6048 * common/common-utils.c (skip_to_space): New function.
6049 (skip_to_space): Rename from skip_to_space_const.
6050 * cli/cli-utils.h (get_number): Rename from get_number_const.
6051 (extract_arg): Rename from extract_arg_const.
6052 * cli/cli-utils.c (get_number): Rename from get_number_const.
6053 (extract_arg): Rename from extract_arg_const.
6054 (number_or_range_parser::get_number): Use ::get_number.
6055 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6056 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6057 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6058 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6059 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6060 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6061 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6062 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6063
6064 2017-09-11 Tom Tromey <tom@tromey.com>
6065
6066 * python/python.c (do_start_initialization): Use
6067 py-event-types.def to initialize types.
6068 Define all object type structures.
6069 * python/python-internal.h: Don't declare event initialization
6070 functions.
6071 * python/py-threadevent.c (thread_event_object_type): Don't
6072 define.
6073 * python/py-stopevent.c (stop_event_object_type): Don't define.
6074 * python/py-signalevent.c (signal_event_object_type): Don't
6075 declare or define.
6076 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6077 (clear_objfiles_event_object_type): Don't declare or define.
6078 * python/py-infevents.c (inferior_call_pre_event_object_type)
6079 (inferior_call_post_event_object_type)
6080 (register_changed_event_object_type)
6081 (memory_changed_event_object_type): Don't declare or define.
6082 * python/py-inferior.c (new_thread_event_object_type)
6083 (new_inferior_event_object_type)
6084 (inferior_deleted_event_object_type): Don't declare or define.
6085 * python/py-exitedevent.c (exited_event_object_type): Don't
6086 declare or define.
6087 * python/py-evts.c (gdbpy_initialize_py_events): Use
6088 py-all-events.def.
6089 * python/py-events.h (thread_event_object_type): Don't declare.
6090 (events_object): Use py-all-events.def.
6091 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6092 py-event-types.def.
6093 * python/py-event-types.def: New file.
6094 * python/py-continueevent.c (create_continue_event_object): Don't
6095 declare or define.
6096 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6097 declare or define.
6098 * python/py-all-events.def: New file.
6099
6100 2017-09-11 Tom Tromey <tom@tromey.com>
6101
6102 * python/py-threadevent.c (create_thread_event_object): Return
6103 gdbpy_ref.
6104 * python/py-stopevent.h (create_stop_event_object)
6105 (create_breakpoint_event_object, create_signal_event_object):
6106 Update.
6107 * python/py-stopevent.c (create_stop_event_object): Return
6108 gdbpy_ref.
6109 (emit_stop_event): Update.
6110 * python/py-signalevent.c (create_signal_event_object): Return
6111 gdbpy_ref.
6112 * python/py-infevents.c (create_inferior_call_event_object):
6113 Update.
6114 * python/py-event.h (create_event_object)
6115 (create_thread_event_object): Update.
6116 * python/py-event.c (create_event_object): Return gdbpy_ref.
6117 * python/py-continueevent.c: Return gdbpy_ref.
6118 * python/py-bpevent.c (create_breakpoint_event_object): Return
6119 gdbpy_ref.
6120
6121 2017-09-11 Tom Tromey <tom@tromey.com>
6122
6123 PR python/15622:
6124 * NEWS: Add entry.
6125 * python/python.c (do_start_initialization): Initialize new event
6126 types.
6127 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6128 (gdbpy_initialize_inferior_deleted_event)
6129 (gdbpy_initialize_new_thread_event): Declare.
6130 * python/py-threadevent.c (create_thread_event_object): Add option
6131 "thread" parameter.
6132 * python/py-inferior.c (new_thread_event_object_type)
6133 (new_inferior_event_object_type)
6134 (inferior_deleted_event_object_type): Declare.
6135 (python_new_inferior, python_inferior_deleted): New functions.
6136 (add_thread_object): Emit new_thread event.
6137 (gdbpy_initialize_inferior): Attach new functions to corresponding
6138 observers.
6139 (new_thread, new_inferior, inferior_deleted): Define new event
6140 types.
6141 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6142 registries.
6143 * python/py-events.h (events_object) <new_inferior,
6144 inferior_deleted, new_thread>: New fields.
6145 * python/py-event.h (create_thread_event_breakpoint): Add optional
6146 "thread" parameter.
6147
6148 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6149
6150 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6151 check current_ui instead.
6152 (internal_vproblem): Likewise.
6153
6154 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6155
6156 * thread.c (print_thread_info_1): Remove unnecessary calls to
6157 uiout->is_mi_like_p.
6158
6159 2017-09-09 Tom Tromey <tom@tromey.com>
6160
6161 * namespace.h (add_using_directive): Update.
6162 * namespace.c (add_using_directive): Change type of excludes to
6163 std::vector.
6164 * dwarf2read.c (read_import_statement): Use std::vector.
6165 (read_namespace): Update.
6166 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6167
6168 2017-09-09 Tom Tromey <tom@tromey.com>
6169
6170 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6171
6172 2017-09-09 Tom Tromey <tom@tromey.com>
6173
6174 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6175
6176 2017-09-09 Tom Tromey <tom@tromey.com>
6177
6178 * stack.c (func_command): Use gdb::def_vector.
6179
6180 2017-09-09 Tom Tromey <tom@tromey.com>
6181
6182 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6183 ui_out_emit_list, ui_out_emit_tuple.
6184 (mi_cmd_var_update): Likewise.
6185
6186 2017-09-09 Tom Tromey <tom@tromey.com>
6187
6188 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6189 ui_out_redirect_pop.
6190 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6191 ui_out_redirect_pop.
6192 * utils.c (do_ui_out_redirect_pop)
6193 (make_cleanup_ui_out_redirect_pop): Remove.
6194 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6195 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6196 * ui-out.h (ui_out_redirect_pop): New class.
6197
6198 2017-09-09 Tom Tromey <tom@tromey.com>
6199
6200 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6201 (list_available_thread_groups, mi_cmd_list_thread_groups)
6202 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6203 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6204 Likewise.
6205
6206 2017-09-09 Tom Tromey <tom@tromey.com>
6207
6208 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6209 ui_out_emit_tuple.
6210
6211 2017-09-09 Tom Tromey <tom@tromey.com>
6212
6213 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6214 * stack.c (print_frame): Use ui_out_emit_tuple.
6215 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6216 (info_spu_mailbox_command, info_spu_dma_command)
6217 (info_spu_proxydma_command): Likewise.
6218 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6219 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6220 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6221 ui_out_emit_tuple.
6222 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6223
6224 2017-09-09 Tom Tromey <tom@tromey.com>
6225
6226 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6227 (class ui_out_emit_table): Update comment.
6228 * ui-out.c (do_cleanup_table_end)
6229 (make_cleanup_ui_out_table_begin_end): Remove.
6230 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6231 (info_spu_dma_cmdlist): Likewise.
6232 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6233 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6234 ui_out_emit_table.
6235
6236 2017-09-09 Tom Tromey <tom@tromey.com>
6237
6238 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6239 ui_out_emit_list, gdb::optional.
6240
6241 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6242
6243 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6244 prototype.
6245 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6246 prototype.
6247 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6248 prototype.
6249 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6250 * ada-exp.y: Remove _initialize_ada_exp prototype.
6251 * ada-lang.c: Remove _initialize_ada_language prototype.
6252 * ada-tasks.c: Remove _initialize_tasks prototype.
6253 * addrmap.c: Remove _initialize_addrmap prototype.
6254 * agent.c: Remove _initialize_agent prototype.
6255 * aix-thread.c: Remove _initialize_aix_thread prototype.
6256 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6257 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6258 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6259 prototype.
6260 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6261 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6262 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6263 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6264 prototype.
6265 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6266 prototype.
6267 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6268 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6269 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6270 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6271 prototype.
6272 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6273 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6274 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6275 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6276 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6277 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6278 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6279 prototype.
6280 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6281 prototype.
6282 * annotate.c: Remove _initialize_annotate prototype.
6283 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6284 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6285 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6286 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6287 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6288 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6289 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6290 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6291 prototype.
6292 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6293 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6294 * auto-load.c: Remove _initialize_auto_load prototype.
6295 * auxv.c: Remove _initialize_auxv prototype.
6296 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6297 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6298 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6299 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6300 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6301 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6302 prototype.
6303 * break-catch-throw.c: Remove _initialize_break_catch_throw
6304 prototype.
6305 * breakpoint.c: Remove _initialize_breakpoint prototype.
6306 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6307 * btrace.c: Remove _initialize_btrace prototype.
6308 * charset.c: Remove _initialize_charset prototype.
6309 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6310 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6311 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6312 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6313 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6314 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6315 * coffread.c: Remove _initialize_coffread prototype.
6316 * compile/compile.c: Remove _initialize_compile prototype.
6317 * complaints.c: Remove _initialize_complaints prototype.
6318 * completer.c: Remove _initialize_completer prototype.
6319 * copying.awk: Remove _initialize_copying prototype.
6320 * copying.c: Regenerate.
6321 * core-regset.c: Remove _initialize_core_regset prototype.
6322 * corefile.c: Remove _initialize_core prototype.
6323 * corelow.c: Remove _initialize_corelow prototype.
6324 * cp-abi.c: Remove _initialize_cp_abi prototype.
6325 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6326 * cp-support.c: Remove _initialize_cp_support prototype.
6327 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6328 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6329 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6330 * ctf.c: Remove _initialize_ctf prototype.
6331 * d-lang.c: Remove _initialize_d_language prototype.
6332 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6333 prototype.
6334 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6335 * dbxread.c: Remove _initialize_dbxread prototype.
6336 * dcache.c: Remove _initialize_dcache prototype.
6337 * demangle.c: Remove _initialize_demangler prototype.
6338 * disasm-selftests.c: Remove _initialize_disasm_selftests
6339 prototype.
6340 * disasm.c: Remove _initialize_disasm prototype.
6341 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6342 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6343 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6344 prototype.
6345 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6346 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6347 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6348 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6349 * elfread.c: Remove _initialize_elfread prototype.
6350 * exec.c: Remove _initialize_exec prototype.
6351 * extension.c: Remove _initialize_extension prototype.
6352 * f-lang.c: Remove _initialize_f_language prototype.
6353 * f-valprint.c: Remove _initialize_f_valprint prototype.
6354 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6355 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6356 * filesystem.c: Remove _initialize_filesystem prototype.
6357 * findcmd.c: Remove _initialize_mem_search prototype.
6358 * fork-child.c: Remove _initialize_fork_child prototype.
6359 * frame-base.c: Remove _initialize_frame_base prototype.
6360 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6361 * frame.c: Remove _initialize_frame prototype.
6362 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6363 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6364 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6365 * gcore.c: Remove _initialize_gcore prototype.
6366 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6367 * gdbarch.c: Regenerate.
6368 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6369 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6370 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6371 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6372 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6373 * go-lang.c: Remove _initialize_go_language prototype.
6374 * go32-nat.c: Remove _initialize_go32_nat prototype.
6375 * guile/guile.c: Remove _initialize_guile prototype.
6376 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6377 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6378 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6379 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6380 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6381 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6382 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6383 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6384 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6385 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6386 prototype.
6387 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6388 prototype.
6389 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6390 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6391 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6392 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6393 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6394 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6395 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6396 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6397 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6398 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6399 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6400 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6401 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6402 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6403 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6404 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6405 prototype.
6406 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6407 prototype.
6408 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6409 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6410 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6411 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6412 * infcall.c: Remove _initialize_infcall prototype.
6413 * infcmd.c: Remove _initialize_infcmd prototype.
6414 * inferior.c: Remove _initialize_inferiors prototype.
6415 * inflow.c: Remove _initialize_inflow prototype.
6416 * infrun.c: Remove _initialize_infrun prototype.
6417 * interps.c: Remove _initialize_interpreter prototype.
6418 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6419 * jit.c: Remove _initialize_jit prototype.
6420 * language.c: Remove _initialize_language prototype.
6421 * linux-fork.c: Remove _initialize_linux_fork prototype.
6422 * linux-nat.c: Remove _initialize_linux_nat prototype.
6423 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6424 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6425 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6426 * m2-lang.c: Remove _initialize_m2_language prototype.
6427 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6428 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6429 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6430 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6431 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6432 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6433 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6434 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6435 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6436 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6437 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6438 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6439 * machoread.c: Remove _initialize_machoread prototype.
6440 * macrocmd.c: Remove _initialize_macrocmd prototype.
6441 * macroscope.c: Remove _initialize_macroscope prototype.
6442 * maint.c: Remove _initialize_maint_cmds prototype.
6443 * mdebugread.c: Remove _initialize_mdebugread prototype.
6444 * memattr.c: Remove _initialize_mem prototype.
6445 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6446 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6447 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6448 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6449 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6450 * microblaze-linux-tdep.c: Remove
6451 _initialize_microblaze_linux_tdep prototype.
6452 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6453 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6454 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6455 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6456 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6457 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6458 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6459 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6460 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6461 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6462 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6463 prototype.
6464 * mipsread.c: Remove _initialize_mipsread prototype.
6465 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6466 prototype.
6467 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6468 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6469 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6470 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6471 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6472 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6473 prototype.
6474 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6475 * nto-procfs.c: Remove _initialize_procfs prototype.
6476 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6477 * objc-lang.c: Remove _initialize_objc_language prototype.
6478 * objfiles.c: Remove _initialize_objfiles prototype.
6479 * observer.c: Remove observer_test_first_notification_function,
6480 observer_test_second_notification_function,
6481 observer_test_third_notification_function, and
6482 _initialize_observer prototypes.
6483 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6484 * osabi.c: Remove _initialize_gdb_osabi prototype.
6485 * osdata.c: Remove _initialize_osdata prototype.
6486 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6487 * parse.c: Remove _initialize_parse prototype.
6488 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6489 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6490 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6491 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6492 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6493 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6494 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6495 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6496 * printcmd.c: Remove _initialize_printcmd prototype.
6497 * probe.c: Remove _initialize_probe prototype.
6498 * proc-api.c: Remove _initialize_proc_api prototype.
6499 * proc-events.c: Remove _initialize_proc_events prototype.
6500 * proc-service.c: Remove _initialize_proc_service prototype.
6501 * procfs.c: Remove _initialize_procfs prototype.
6502 * psymtab.c: Remove _initialize_psymtab prototype.
6503 * python/python.c: Remove _initialize_python prototype.
6504 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6505 * record-btrace.c: Remove _initialize_record_btrace prototype.
6506 * record-full.c: Remove _initialize_record_full prototype.
6507 * record.c: Remove _initialize_record prototype.
6508 * regcache.c: Remove _initialize_regcache prototype.
6509 * reggroups.c: Remove _initialize_reggroup prototype.
6510 * remote-notif.c: Remove _initialize_notif prototype.
6511 * remote-sim.c: Remove _initialize_remote_sim prototype.
6512 * remote.c: Remove _initialize_remote prototype.
6513 * reverse.c: Remove _initialize_reverse prototype.
6514 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6515 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6516 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6517 prototype.
6518 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6519 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6520 * rust-exp.y: Remove _initialize_rust_exp prototype.
6521 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6522 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6523 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6524 * score-tdep.c: Remove _initialize_score_tdep prototype.
6525 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6526 prototype.
6527 * ser-go32.c: Remove _initialize_ser_dos prototype.
6528 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6529 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6530 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6531 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6532 * serial.c: Remove _initialize_serial prototype.
6533 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6534 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6535 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6536 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6537 * skip.c: Remove _initialize_step_skip prototype.
6538 * sol-thread.c: Remove _initialize_sol_thread prototype.
6539 * solib-aix.c: Remove _initialize_solib_aix prototype.
6540 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6541 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6542 * solib-frv.c: Remove _initialize_frv_solib prototype.
6543 * solib-spu.c: Remove _initialize_spu_solib prototype.
6544 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6545 * solib-target.c: Remove _initialize_solib_target prototype.
6546 * solib.c: Remove _initialize_solib prototype.
6547 * source.c: Remove _initialize_source prototype.
6548 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6549 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6550 prototype.
6551 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6552 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6553 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6554 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6555 prototype.
6556 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6557 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6558 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6559 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6560 prototype.
6561 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6562 prototype.
6563 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6564 prototype.
6565 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6566 prototype.
6567 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6568 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6569 prototype.
6570 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6571 prototype.
6572 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6573 prototype.
6574 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6575 prototype.
6576 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6577 prototype.
6578 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6579 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6580 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6581 * stabsread.c: Remove _initialize_stabsread prototype.
6582 * stack.c: Remove _initialize_stack prototype.
6583 * stap-probe.c: Remove _initialize_stap_probe prototype.
6584 * std-regs.c: Remove _initialize_frame_reg prototype.
6585 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6586 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6587 * symfile.c: Remove _initialize_symfile prototype.
6588 * symmisc.c: Remove _initialize_symmisc prototype.
6589 * symtab.c: Remove _initialize_symtab prototype.
6590 * target-dcache.c: Remove _initialize_target_dcache prototype.
6591 * target-descriptions.c: Remove _initialize_target_descriptions
6592 prototype.
6593 * thread.c: Remove _initialize_thread prototype.
6594 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6595 prototype.
6596 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6597 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6598 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6599 prototype.
6600 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6601 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6602 * tracefile.c: Remove _initialize_tracefile prototype.
6603 * tracepoint.c: Remove _initialize_tracepoint prototype.
6604 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6605 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6606 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6607 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6608 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6609 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6610 * tui/tui.c: Remove _initialize_tui prototype.
6611 * typeprint.c: Remove _initialize_typeprint prototype.
6612 * user-regs.c: Remove _initialize_user_regs prototype.
6613 * utils.c: Remove _initialize_utils prototype.
6614 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6615 * valarith.c: Remove _initialize_valarith prototype.
6616 * valops.c: Remove _initialize_valops prototype.
6617 * valprint.c: Remove _initialize_valprint prototype.
6618 * value.c: Remove _initialize_values prototype.
6619 * varobj.c: Remove _initialize_varobj prototype.
6620 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6621 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6622 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6623 * windows-nat.c: Remove _initialize_windows_nat,
6624 _initialize_check_for_gdb_ini, and _initialize_loadable
6625 prototypes.
6626 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6627 * xcoffread.c: Remove _initialize_xcoffread prototype.
6628 * xml-support.c: Remove _initialize_xml_support prototype.
6629 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6630 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6631 prototype.
6632 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6633 prototype.
6634 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6635
6636 2017-09-08 Keith Seitz <keiths@redhat.com>
6637
6638 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6639 field.
6640
6641 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6642
6643 * f-valprint.c (f_val_print): Remove check for one byte
6644 sized integers. Remove printing of character type.
6645
6646 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6647 Christoph Weinmann <christoph.t.weinmann@intel.com>
6648 Bernhard Heckel <bernhard.heckel@intel.com>
6649
6650 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6651 to maintain proper indentation when printing pointers/refs.
6652
6653 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6654
6655 GDB 8.0.1 released.
6656
6657 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6658
6659 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6660
6661 2017-09-05 Tom Tromey <tom@tromey.com>
6662
6663 * parse.c (funcall_chain): Now a std::vector.
6664 (start_arglist, end_arglist): Simplify.
6665 (free_funcalls): Remove.
6666 (parse_exp_in_context_1): Remove cleanup.
6667
6668 2017-09-05 Tom Tromey <tom@tromey.com>
6669
6670 * go-exp.y (go_parse): Don't create a cleanup.
6671
6672 2017-09-05 Tom Tromey <tom@tromey.com>
6673
6674 * d-exp.y (PrimaryExpression): Use std::string.
6675 (d_parse): Don't create a cleanup.
6676
6677 2017-09-05 Tom Tromey <tom@tromey.com>
6678
6679 * utils.c (do_clear_parser_state): Remove.
6680 (make_cleanup_clear_parser_state): Remove.
6681 * p-exp.y (pascal_parse): Use scoped_restore.
6682 * m2-exp.y (m2_parse): Use scoped_restore.
6683 * f-exp.y (f_parse): Use scoped_restore.
6684 * d-exp.y (d_parse): Use scoped_restore.
6685 * c-exp.y (c_parse): Use scoped_restore.
6686 * ada-exp.y (ada_parse): Use scoped_restore.
6687 * utils.h (make_cleanup_clear_parser_state): Remove.
6688
6689 2017-09-06 Keith Seitz <keiths@redhat.com>
6690
6691 * dwarf2read.c (dw2_linkage_name_attr): New function.
6692 (dw2_linkage_name): New function.
6693 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6694 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6695 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6696
6697 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6698
6699 * config/djgpp/djconfig.sh: Correct shell portability issue.
6700
6701 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6702
6703 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6704
6705 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6706
6707 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6708 * NEWS: Mention new FreeBSD/mips native configuration.
6709 * configure.host: Add aarch64*-*-freebsd*.
6710 * configure.nat: Likewise.
6711 * aarch64-fbsd-nat.c: New file.
6712
6713 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6714
6715 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6716 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6717 * NEWS: Mention new FreeBSD/aarch64 target.
6718 * configure.tgt: Add aarch64*-*-freebsd*.
6719 * aarch64-fbsd-tdep.c: New file.
6720 * aarch64-fbsd-tdep.h: New file.
6721
6722 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6723
6724 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6725
6726 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6727
6728 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6729 of TLS symbols.
6730
6731 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6732
6733 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6734 call.
6735
6736 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6737
6738 * infrun.c (follow_exec): Call add_thread after
6739 target_find_description.
6740
6741 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6742
6743 * infrun.c (handle_inferior_event_1): When exec'ing, read
6744 stop_pc after follow_exec.
6745
6746 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6747
6748 * remote.c (process_g_packet): Update error message.
6749
6750 2017-09-05 Yao Qi <yao.qi@linaro.org>
6751
6752 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6753 targets.
6754
6755 2017-09-05 Pedro Alves <palves@redhat.com>
6756
6757 * eval.c (eval_call, evaluate_funcall): New functions, factored
6758 out from ...
6759 (evaluate_subexp_standard): ... this.
6760
6761 2017-09-05 Yao Qi <yao.qi@linaro.org>
6762
6763 * amd64-tdep.c (amd64_target_description): Create target
6764 descriptions.
6765 (_initialize_amd64_tdep): Don't call functions
6766 initialize_tdesc_amd64_*. Add self tests.
6767 * arch/amd64.c (amd64_create_target_description): Add parameter
6768 is_linux. Call set_tdesc_osabi if is_linux is true.
6769 * arch/amd64.h (amd64_create_target_description): Update the
6770 declaration.
6771 * arch/i386.c (i386_create_target_description): Add parameter
6772 is_linux. Call set_tdesc_osabi if is_linux is true.
6773 * arch/i386.h (i386_create_target_description): Update
6774 declaration.
6775 * configure.tgt: Add i386.o to gdb_target_obs.
6776 * features/Makefile (XMLTOC): Remove i386/*.xml.
6777 * features/i386/amd64-avx-avx512.c: Remove.
6778 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6779 * features/i386/amd64-avx-mpx.c: Remove.
6780 * features/i386/amd64-avx.c: Remove.
6781 * features/i386/amd64-mpx.c: Remove.
6782 * features/i386/amd64.c: Remove.
6783 * features/i386/i386-avx-avx512.c: Remove.
6784 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6785 * features/i386/i386-avx-mpx.c: Remove.
6786 * features/i386/i386-avx.c: Remove.
6787 * features/i386/i386-mmx.c: Remove.
6788 * features/i386/i386-mpx.c: Remove.
6789 * features/i386/i386.c: Remove.
6790 * i386-tdep.c: Don't include features/i386/i386*.c., include
6791 target-descriptions.h and arch/i386.h.
6792 (i386_target_description): Create target descriptions.
6793 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6794 functions. Do self tests.
6795
6796 2017-09-05 Yao Qi <yao.qi@linaro.org>
6797
6798 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6799 * features/i386/amd64-avx-avx512-linux.c: Removed.
6800 * features/i386/amd64-avx-linux.c: Removed.
6801 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6802 * features/i386/amd64-avx-mpx-linux.c: Removed.
6803 * features/i386/amd64-linux.c: Removed.
6804 * features/i386/amd64-mpx-linux.c: Removed.
6805 * features/i386/x32-avx-avx512-linux.c: Removed.
6806 * features/i386/x32-avx-linux.c: Removed.
6807 * features/i386/x32-linux.c: Removed.
6808
6809 2017-09-05 Yao Qi <yao.qi@linaro.org>
6810
6811 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6812 features/i386/*.c.
6813 (amd64_linux_read_description): Call
6814 amd64_create_target_description.
6815 * arch/amd64.c: New file.
6816 * arch/amd64.h: New file.
6817 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6818 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6819
6820 2017-09-05 Yao Qi <yao.qi@linaro.org>
6821
6822 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6823 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6824 (amd64_linux_read_description): Create target descriptions.
6825 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6826 functions. Add unit tests.
6827 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6828 x32-core.xml.
6829 * features/i386/64bit-avx.c: Generated.
6830 * features/i386/64bit-avx512.c: Generated.
6831 * features/i386/64bit-core.c: Generated.
6832 * features/i386/64bit-linux.c: Generated.
6833 * features/i386/64bit-mpx.c: Generated.
6834 * features/i386/64bit-pkeys.c: Generated.
6835 * features/i386/64bit-segments.c: Generated.
6836 * features/i386/64bit-sse.c: Generated.
6837 * features/i386/x32-core.c: Generated.
6838 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6839 c files for amd64-linux and x32-linux.
6840
6841 2017-09-05 Yao Qi <yao.qi@linaro.org>
6842
6843 * amd64-linux-tdep.c (amd64_linux_read_description): New
6844 function.
6845 (amd64_linux_core_read_description): Call
6846 amd64_linux_read_description.
6847 (amd64_linux_init_abi): Likewise.
6848 (amd64_x32_linux_init_abi): Likewise.
6849 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6850 * x86-linux-nat.c (x86_linux_read_description): Call
6851 amd64_linux_read_description.
6852
6853 2017-09-05 Yao Qi <yao.qi@linaro.org>
6854
6855 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6856 comments.
6857
6858 2017-09-05 Yao Qi <yao.qi@linaro.org>
6859
6860 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6861 * features/i386/i386-avx-avx512-linux.c: Remove.
6862 * features/i386/i386-avx-linux.c: Remove.
6863 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6864 * features/i386/i386-avx-mpx-linux.c: Remove.
6865 * features/i386/i386-linux.c: Remove.
6866 * features/i386/i386-mmx-linux.c: Remove.
6867 * features/i386/i386-mpx-linux.c: Remove.
6868
6869 2017-09-05 Yao Qi <yao.qi@linaro.org>
6870
6871 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6872 (SFILES): Add arch/i386.c.
6873 (HFILES_NO_SRCDIR): Add arch/i386.h.
6874 * arch/i386.c: New file.
6875 * arch/i386.h: New file.
6876 * arch/tdesc.h (allocate_target_description): Declare.
6877 (set_tdesc_architecture): Declare.
6878 (set_tdesc_osabi): Declare.
6879 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6880 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6881 include arch/i386.h.
6882 (i386_linux_read_description): Remove code and call
6883 i386_create_target_description.
6884 (set_tdesc_architecture): New function.
6885 (set_tdesc_osabi): New function.
6886 * target-descriptions.h (allocate_target_description): Remove.
6887
6888 2017-09-05 Yao Qi <yao.qi@linaro.org>
6889
6890 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6891 * target-descriptions.c (tdesc_create_feature): Likewise, and
6892 adjust code.
6893 * features/i386/32bit-avx.c: Re-generated.
6894 * features/i386/32bit-avx512.c: Re-generated.
6895 * features/i386/32bit-core.c: Re-generated.
6896 * features/i386/32bit-linux.c: Re-generated.
6897 * features/i386/32bit-mpx.c: Re-generated.
6898 * features/i386/32bit-pkeys.c: Re-generated.
6899 * features/i386/32bit-sse.c: Re-generated.
6900
6901 2017-09-05 Yao Qi <yao.qi@linaro.org>
6902
6903 * regformats/regdef.h (struct reg): Override operator == and !=.
6904
6905 2017-09-05 Yao Qi <yao.qi@linaro.org>
6906
6907 * arch/tdesc.h: New file.
6908 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6909 * target-descriptions.c: Update comments.
6910 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6911 declarations.
6912 * features/i386/32bit-avx.c: Re-generated.
6913 * features/i386/32bit-avx512.c: Re-generated.
6914 * features/i386/32bit-core.c: Re-generated.
6915 * features/i386/32bit-linux.c: Re-generated.
6916 * features/i386/32bit-mpx.c: Re-generated.
6917 * features/i386/32bit-pkeys.c: Re-generated.
6918 * features/i386/32bit-sse.c: Re-generated.
6919
6920 2017-09-05 Yao Qi <yao.qi@linaro.org>
6921
6922 * regformats/regdat.sh: Update generated code.
6923
6924 2017-09-05 Yao Qi <yao.qi@linaro.org>
6925
6926 * regformats/regdat.sh: Adjust code order.
6927
6928 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6929
6930 * expprint.c (dump_subexp_body_standard): Use constant format
6931 string in fprintf_filtered call.
6932
6933 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6934
6935 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6936 NetBSD/i386.
6937 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6938
6939 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6940
6941 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6942
6943 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6944
6945 * bsd-kvm.o: Define _KMEMUSER.
6946 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6947 * configure: Regenerate.
6948
6949 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6950
6951 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6952 * i386-fbsd-nat.c: Likewise.
6953
6954 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6955
6956 * unittests/array-view-selftests.c: Add include of <array>.
6957
6958 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6959
6960 * spu-tdep.c (flush_ea_cache): Add missing argument to
6961 call_function_by_hand.
6962
6963 2017-09-04 Pedro Alves <palves@redhat.com>
6964
6965 * NEWS (Safer support for debugging with no debug info): New.
6966
6967 2017-09-04 Pedro Alves <palves@redhat.com>
6968
6969 * c-exp.y (function_method, function_method_void): Add current
6970 instance flags to TYPE_INSTANCE.
6971 * dwarf2read.c (check_modifier): New.
6972 (compute_delayed_physnames): Assert that only C++ adds delayed
6973 physnames. Mark fn_fields as const/volatile depending on
6974 physname.
6975 * eval.c (make_params): New type_instance_flags parameter. Use
6976 it as the new type's instance flags.
6977 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6978 flags element and pass it to make_params.
6979 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6980 instance flags element.
6981 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6982 * gdbtypes.h: Include "enum-flags.h".
6983 (type_instance_flags): New enum-flags type.
6984 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6985 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6986 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6987 (follow_type_instance_flags): New function.
6988 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6989 * parser-defs.h (follow_type_instance_flags): Declare.
6990 * valops.c (value_struct_elt_for_reference): const/volatile must
6991 match too.
6992
6993 2017-09-04 Pedro Alves <palves@redhat.com>
6994
6995 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6996 function/method scopes; lookup the nested name as a function local
6997 static variable.
6998
6999 2017-09-04 Pedro Alves <palves@redhat.com>
7000
7001 (%type <voidval>): Add function_method.
7002 * c-exp.y (exp): New production for calls with no arguments.
7003 (function_method, function_method_void_or_typelist): New
7004 productions.
7005 (exp): New production for "method()::static_var".
7006 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7007 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7008 Handle OP_FUNC_STATIC_VAR.
7009 * parse.c (operator_length_standard):
7010 Handle OP_FUNC_STATIC_VAR.
7011
7012 2017-09-04 Pedro Alves <palves@redhat.com>
7013
7014 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7015 handling.
7016 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7017 Ditto.
7018 * parse.c (operator_length_standard, operator_check_standard):
7019 Ditto.
7020 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7021
7022 2017-09-04 Pedro Alves <palves@redhat.com>
7023
7024 * ax-gdb.c: Include "typeprint.h".
7025 (gen_expr_for_cast): New function.
7026 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7027 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7028 type is unknown.
7029 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7030 nodebug_data_symbol.
7031 * eval.c: Include "typeprint.h".
7032 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7033 Error out if symbol has unknown type.
7034 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7035 evaluate_subexp_for_cast.
7036 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7037 OP_VAR_MSYM_VALUE.
7038 (evaluate_subexp_for_cast): New function.
7039 * gdbtypes.c (init_nodebug_var_type): New function.
7040 (objfile_type): Use it to initialize types of variables with no
7041 debug info.
7042 * typeprint.c (error_unknown_type): New.
7043 * typeprint.h (error_unknown_type): New declaration.
7044 * compile/compile-c-types.c (convert_type_basic): Handle
7045 TYPE_CODE_ERROR; warn and fallback to int for variables with
7046 unknown type.
7047
7048 2017-09-04 Pedro Alves <palves@redhat.com>
7049
7050 * eval.c (evaluate_var_value): New function, factored out from ...
7051 (evaluate_subexp_standard): ... here.
7052
7053 2017-09-04 Pedro Alves <palves@redhat.com>
7054
7055 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7056 Remove useless assignments to 'op'.
7057
7058 2017-09-04 Pedro Alves <palves@redhat.com>
7059
7060 * eval.c (eval_skip_value): New function.
7061 (evaluate_subexp_standard): Use it.
7062
7063 2017-09-04 Pedro Alves <palves@redhat.com>
7064
7065 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7066 function name from symbol/minsym and pass it to
7067 error_call_unknown_return_type.
7068
7069 2017-09-04 Pedro Alves <palves@redhat.com>
7070
7071 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7072 * ax-gdb.c (gen_msym_var_ref): New function.
7073 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7074 * eval.c (evaluate_var_msym_value): New function.
7075 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7076 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7077 to call_function_by_hand.
7078 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7079 Handle OP_VAR_MSYM_VALUE.
7080 (union exp_element) <msymbol>: New field.
7081 * minsyms.h (struct type): Forward declare.
7082 (find_minsym_type_and_address): Declare.
7083 * parse.c (write_exp_elt_msym): New function.
7084 (write_exp_msymbol): Delete, refactored as ...
7085 (find_minsym_type_and_address): ... this new function.
7086 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7087 (operator_length_standard, operator_check_standard): Handle
7088 OP_VAR_MSYM_VALUE.
7089 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7090
7091 2017-09-04 Pedro Alves <palves@redhat.com>
7092
7093 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7094 TYPE_GNU_IFUNC specially here. Throw error if return type is
7095 unknown.
7096 * ada-typeprint.c (print_func_type): Handle functions with unknown
7097 return type.
7098 * c-typeprint.c (c_type_print_base): Handle functions and methods
7099 with unknown return type.
7100 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7101 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7102 * compile/compile-c-types.c: Include "objfiles.h".
7103 (convert_func): For functions with unknown return type, warn and
7104 default to int.
7105 * compile/compile-object-run.c (compile_object_run): Adjust call
7106 to call_function_by_hand_dummy.
7107 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7108 call_function_by_hand.
7109 * eval.c (evaluate_subexp_standard): Adjust calls to
7110 call_function_by_hand. Handle functions and methods with unknown
7111 return type. Pass expect_type to call_function_by_hand.
7112 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7113 return type.
7114 * gcore.c (call_target_sbrk): Adjust call to
7115 call_function_by_hand.
7116 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7117 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7118 an integer address type instead of nodebug.
7119 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7120 call_function_by_hand.
7121 * infcall.c (error_call_unknown_return_type): New function.
7122 (call_function_by_hand): New "default_return_type" parameter.
7123 Pass it down.
7124 (call_function_by_hand_dummy): New "default_return_type"
7125 parameter. Use it instead of defaulting to int. If there's no
7126 default and the return type is unknown, throw an error. If
7127 there's a default return type, and the called function has no
7128 debug info, then assume the function is prototyped.
7129 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7130 New "default_return_type" parameter.
7131 (error_call_unknown_return_type): New declaration.
7132 * linux-fork.c (call_lseek): Cast return type of lseek.
7133 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7134 call_function_by_hand.
7135 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7136 calls to call_function_by_hand.
7137 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7138 return type.
7139 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7140 (value_nsstring, print_object_command): Adjust calls to
7141 call_function_by_hand.
7142 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7143 functions with unknown return type.
7144 (pascal_type_print_func_varspec_suffix): New function.
7145 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7146 TYPE_CODE_METHOD>: Use it.
7147 * python/py-value.c (valpy_call): Adjust call to
7148 call_function_by_hand.
7149 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7150 call_function_by_hand.
7151 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7152 call_function_by_hand.
7153 * valops.c (value_allocate_space_in_inferior): Adjust call to
7154 call_function_by_hand.
7155 * typeprint.c (type_print_unknown_return_type): New function.
7156 * typeprint.h (type_print_unknown_return_type): New declaration.
7157
7158 2017-09-04 Pedro Alves <palves@redhat.com>
7159
7160 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7161 types with more than one parameter as prototyped.
7162
7163 2017-09-04 Pedro Alves <palves@redhat.com>
7164
7165 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7166 (disassemble_command): Use gdb_disassembly_flags instead of bare
7167 int.
7168 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7169 (dump_insns, do_mixed_source_and_assembly_deprecated)
7170 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7171 Use gdb_disassembly_flags instead of bare int.
7172 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7173 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7174 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7175 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7176 (enum gdb_disassembly_flag): ... values of this new enumeration.
7177 (gdb_disassembly_flags): Define.
7178 (gdb_disassembly)
7179 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7180 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7181 gdb_disassembly_flags instead of bare int.
7182 * record-btrace.c (btrace_insn_history)
7183 (record_btrace_insn_history, record_btrace_insn_history_range)
7184 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7185 instead of bare int.
7186 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7187 Use gdb_disassembly_flags instead of bare int.
7188 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7189 Define.
7190 * target-delegates.c: Regenerate.
7191 * target.c (target_insn_history, target_insn_history_from)
7192 (target_insn_history_range): Use gdb_disassembly_flags instead of
7193 bare int.
7194 * target.h: Include "disasm.h".
7195 (struct target_ops) <to_insn_history, to_insn_history_from,
7196 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7197 int.
7198 (target_insn_history, target_insn_history_from)
7199 (target_insn_history_range): Use gdb_disassembly_flags instead of
7200 bare int.
7201
7202 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7203
7204 * cli/cli-script.c (build_command_line): For if/while commands,
7205 check whether args is empty.
7206
7207 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7208
7209 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7210 (enum command_control_type): Likewise.
7211 (struct command_line): Likewise.
7212 (free_command_lines): Likewise.
7213 (struct command_lines_deleter): Likewise.
7214 (command_line_up): Likewise.
7215 (read_command_lines): Likewise.
7216 (read_command_lines_1): Likewise.
7217 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7218 (enum command_control_type): Likewise.
7219 (struct command_line): Likewise.
7220 (free_command_lines): Likewise.
7221 (struct command_lines_deleter): Likewise.
7222 (command_line_up): Likewise.
7223 (read_command_lines): Likewise.
7224 (read_command_lines_1): Likewise.
7225 * breakpoint.h: Include cli/cli-script.h.
7226 * extension-priv.h: Likewise.
7227 * gdbcmd.h: Likewise.
7228
7229 2017-09-04 Pedro Alves <palves@redhat.com>
7230
7231 * ada-lang.c (is_known_support_routine): Move sal declaration to
7232 where it is initialized.
7233 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7234 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7235 (clear_command, update_static_tracepoint): Remove init_sal
7236 references. Move declarations closer to initializations.
7237 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7238 initializations.
7239 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7240 references. Move sal declarations closer to initializations.
7241 * frame.c (find_frame_sal): Return a symtab_and_line via function
7242 return instead of output parameter. Remove init_sal references.
7243 * frame.h (find_frame_sal): Return a symtab_and_line via function
7244 return instead of output parameter.
7245 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7246 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7247 instead of memset.
7248 (gdbscm_find_pc_line): Remove init_sal reference.
7249 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7250 references. Move declarations closer to initializations.
7251 * infcmd.c (set_step_frame): Update. Move declarations closer to
7252 initializations.
7253 (finish_backward): Remove init_sal references. Move declarations
7254 closer to initializations.
7255 * infrun.c (process_event_stop_test, handle_step_into_function)
7256 (insert_hp_step_resume_breakpoint_at_frame)
7257 (insert_step_resume_breakpoint_at_caller): Likewise.
7258 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7259 (symbol_to_sal): Likewise.
7260 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7261 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7262 to its initialization.
7263 * reverse.c (save_bookmark_command): Use new/delete. Remove
7264 init_sal references. Move declarations closer to initializations.
7265 * source.c (get_current_source_symtab_and_line): Remove brace
7266 initialization.
7267 (set_current_source_symtab_and_line): Now takes the sal by const
7268 reference. Remove brace initialization.
7269 (line_info): Remove init_sal reference.
7270 * source.h (set_current_source_symtab_and_line): Now takes a
7271 symtab_and_line via const reference.
7272 * stack.c (set_current_sal_from_frame): Adjust.
7273 (print_frame_info): Adjust.
7274 (get_last_displayed_sal): Return the sal via function return
7275 instead of via output parameter. Simplify.
7276 (frame_info): Adjust.
7277 * stack.h (get_last_displayed_sal): Return the sal via function
7278 return instead of via output parameter.
7279 * symtab.c (init_sal): Delete.
7280 (find_pc_sect_line): Remove init_sal references. Move
7281 declarations closer to initializations.
7282 (find_function_start_sal): Remove init_sal references. Move
7283 declarations closer to initializations.
7284 * symtab.h (struct symtab_and_line): In-class initialize all
7285 fields.
7286 * tracepoint.c (set_traceframe_context)
7287 (print_one_static_tracepoint_marker): Remove init_sal references.
7288 Move declarations closer to initializations.
7289 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7290 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7291 declarations closer to initializations.
7292 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7293 init_sal references. Adjust.
7294
7295 2017-09-04 Pedro Alves <palves@redhat.com>
7296
7297 * ax-gdb.c (agent_command_1): Use range-for.
7298 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7299 * breakpoint.c: Include "common/array-view.h".
7300 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7301 parameter from struct symtabs_and_lines to
7302 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7303 (breakpoint_sals_to_pc): Change sals parameter from struct
7304 symtabs_and_lines to std::vector reference.
7305 (check_fast_tracepoint_sals): Change sals parameter from struct
7306 symtabs_and_lines to std::array_view. Use range-for.
7307 (decode_static_tracepoint_spec): Return a std::vector instead of
7308 symtabs_and_lines. Update.
7309 (create_breakpoint): Update.
7310 (break_range_command, until_break_command, clear_command): Update.
7311 (base_breakpoint_decode_location, bkpt_decode_location)
7312 (bkpt_probe_create_sals_from_location)
7313 (bkpt_probe_decode_location, tracepoint_decode_location)
7314 (tracepoint_probe_decode_location)
7315 (strace_marker_create_sals_from_location): Return a std::vector
7316 instead of symtabs_and_lines.
7317 (strace_marker_create_breakpoints_sal): Update.
7318 (strace_marker_decode_location): Return a std::vector instead of
7319 symtabs_and_lines. Update.
7320 (update_breakpoint_locations): Change struct symtabs_and_lines
7321 parameters to gdb::array_view. Adjust.
7322 (location_to_sals): Return a std::vector instead of
7323 symtabs_and_lines. Update.
7324 (breakpoint_re_set_default): Use std::vector instead of struct
7325 symtabs_and_lines.
7326 (decode_location_default): Return a std::vector instead of
7327 symtabs_and_lines. Update.
7328 * breakpoint.h: Include "common/array-view.h".
7329 (struct breakpoint_ops) <decode_location>: Now returns a
7330 std::vector instead of returning a symtabs_and_lines via output
7331 parameter.
7332 (update_breakpoint_locations): Change sals parameters to use
7333 gdb::array_view.
7334 * cli/cli-cmds.c (edit_command, list_command): Update to use
7335 std::vector and gdb::array_view.
7336 (ambiguous_line_spec): Adjust to use gdb::array_view and
7337 range-for.
7338 (compare_symtabs): Rename to ...
7339 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7340 const reference and adjust.
7341 (filter_sals): Rewrite using std::vector and standard algorithms.
7342 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7343 (jump_command): Update to use std::vector.
7344 * linespec.c (struct linespec_state) <canonical_names>: Update
7345 comment.
7346 (add_sal_to_sals_basic): Delete.
7347 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7348 (decode_line_2, create_sals_line_offset)
7349 (convert_address_location_to_sals, convert_linespec_to_sals)
7350 (convert_explicit_location_to_sals, parse_linespec)
7351 (event_location_to_sals, decode_line_full, decode_line_1)
7352 (decode_line_with_current_source)
7353 (decode_line_with_last_displayed, decode_objc)
7354 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7355 (linespec_result::~linespec_result): Adjust to use std::vector
7356 instead of symtabs_and_lines.
7357 * linespec.h (linespec_sals::sals): Now a std::vector.
7358 (struct linespec_result): Use std::vector, bool, and in-class
7359 initialization.
7360 (decode_line_1, decode_line_with_current_source)
7361 (decode_line_with_last_displayed): Return std::vector.
7362 * macrocmd.c (info_macros_command): Use std::vector.
7363 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7364 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7365 std::vector.
7366 * probe.h (parse_probes): Return a std::vector.
7367 * python/python.c (gdbpy_decode_line): Use std::vector and
7368 gdb::array_view.
7369 * source.c (select_source_symtab, line_info): Use std::vector.
7370 * stack.c (func_command): Use std::vector.
7371 * symtab.h (struct symtabs_and_lines): Delete.
7372 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7373
7374 2017-09-04 Pedro Alves <palves@redhat.com>
7375
7376 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7377 unittests/array-view-selftests.c.
7378 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7379 * common/array-view.h: New file.
7380 * unittests/array-view-selftests.c: New file.
7381
7382 2017-09-04 Pedro Alves <palves@redhat.com>
7383
7384 * cli/cli-cmds.c (edit_command): Pass message to
7385 ambiguous_line_spec.
7386 (list_command): Pass message to ambiguous_line_spec. Say
7387 "first"/"last" instead of "start" and "end" to be consistent with
7388 the manual.
7389 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7390 them to print formatted message.
7391
7392 2017-09-04 Pedro Alves <palves@redhat.com>
7393
7394 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7395 ftrace_update_insns by reference instead of pointer.
7396
7397 2017-09-04 Yao Qi <yao.qi@linaro.org>
7398
7399 * i386-go32-tdep.c: Include x86-xstate.h.
7400 (i386_go32_init_abi): Call i386_target_description.
7401 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7402 if xcr0 is X86_XSTATE_X87_MASK.
7403 * i386-tdep.h (tdesc_i386): Remove the declaration.
7404 (tdesc_i386_mmx): Likewise.
7405
7406 2017-09-04 Yao Qi <yao.qi@linaro.org>
7407
7408 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7409 X86_XSTATE_SSE_MASK instead of 0.
7410
7411 2017-09-04 Yao Qi <yao.qi@linaro.org>
7412
7413 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7414 i386_target_description.
7415 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7416 i386_target_description.
7417 * i386-tdep.c (i386_gdbarch_init): Likewise.
7418
7419 2017-09-04 Yao Qi <yao.qi@linaro.org>
7420
7421 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7422 (x86_darwin_init_abi_64): Call amd64_target_description.
7423 * amd64-dicos-tdep.c: Likewise.
7424 * amd64-fbsd-nat.c: Likewise.
7425 * amd64-fbsd-tdep.c: Likewise.
7426 * amd64-nbsd-tdep.c: Likewise.
7427 * amd64-obsd-tdep.c: Likewise.
7428 * amd64-sol2-tdep.c: Likewise.
7429 * amd64-windows-tdep.c: Likewise.
7430 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7431
7432 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7433
7434 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7435 (btrace_function) <insn>: Change type to use std::vector.
7436 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7437 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7438 ftrace_update_insns, ftrace_compute_global_level_offset,
7439 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7440 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7441 change to std::vector.
7442 (ftrace_update_insns): Adjust to change to std::vector, change
7443 type of INSN parameter.
7444 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7445 * record-btrace.c (btrace_call_history_insn_range,
7446 btrace_compute_src_line_range,
7447 record_btrace_frame_prev_register): Adjust to change to
7448 std::vector.
7449 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7450 to change to std::vector.
7451
7452 2017-09-03 Tom Tromey <tom@tromey.com>
7453
7454 * corefile.c (reopen_exec_file): Use std::string.
7455
7456 2017-09-03 Tom Tromey <tom@tromey.com>
7457
7458 * compile/compile.c (compile_register_name_mangled): Return
7459 std::string.
7460 * compile/compile-loc2c.c (pushf_register_address): Update.
7461 (pushf_register): Update.
7462 * compile/compile-c-types.c (convert_array): Update.
7463 * compile/compile-c-symbols.c (generate_vla_size): Update.
7464 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7465 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7466 (convert_one_symbol): Update.
7467 (generate_c_for_for_one_variable): Update.
7468 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7469 std::string.
7470 (generate_register_struct): Update.
7471 * compile/compile-internal.h (c_get_range_decl_name): Return a
7472 std::string.
7473 (compile_register_name_mangled): Return std::string.
7474
7475 2017-09-03 Tom Tromey <tom@tromey.com>
7476
7477 * utils.c (perror_string): Return a std::string.
7478 (throw_perror_with_name, perror_warning_with_name): Update.
7479
7480 2017-09-03 Tom Tromey <tom@tromey.com>
7481
7482 * demangle.c (demangle_command): Use std::string,
7483 unique_xmalloc_ptr.
7484
7485 2017-09-03 Tom Tromey <tom@tromey.com>
7486
7487 * cli/cli-setshow.c (do_set_command): Use std::string.
7488
7489 2017-09-03 Tom Tromey <tom@tromey.com>
7490
7491 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7492
7493 2017-09-03 Tom Tromey <tom@tromey.com>
7494
7495 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7496
7497 2017-09-03 Tom Tromey <tom@tromey.com>
7498
7499 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7500 gdb::unique_xmalloc_ptr.
7501
7502 2017-09-03 Tom Tromey <tom@tromey.com>
7503
7504 * thread.c (print_thread_info_1): Use string_printf.
7505 (thread_apply_command, thread_apply_all_command): Use
7506 std::string.
7507
7508 2017-09-03 Tom Tromey <tom@tromey.com>
7509
7510 * valprint.c (val_print_string): Update.
7511 * gdbcore.h (memory_error_message): Return std::string.
7512 * corefile.c (memory_error_message): Return std::string.
7513 (memory_error): Update.
7514 * breakpoint.c (insert_bp_location): Update.
7515
7516 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7517
7518 * target/waitstatus.h (target_waitstatus_to_string): Change
7519 return type to std::string.
7520 * target/waitstatus.c (target_waitstatus_to_string): Return
7521 std::string.
7522 * target.h (target_waitstatus_to_string): Remove declaration.
7523 * infrun.c (resume, clear_proceed_status_thread,
7524 print_target_wait_results, do_target_wait, save_waitstatus,
7525 stop_all_threads): Adjust.
7526 * record-btrace.c (record_btrace_wait): Adjust.
7527 * target-debug.h
7528 (target_debug_print_struct_target_waitstatus_p): Adjust.
7529
7530 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7531
7532 PR gdb/22046
7533 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7534 detection.
7535
7536 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7537
7538 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7539 for setting/unsetting environment variables on the remote target.
7540 (New remote packets): Add entries for QEnvironmentHexEncoded,
7541 QEnvironmentUnset and QEnvironmentReset.
7542 * common/environ.c (gdb_environ::operator=): Extend method to
7543 handle m_user_set_env_list and m_user_unset_env_list.
7544 (gdb_environ::clear): Likewise.
7545 (match_var_in_string): Change type of first parameter from 'char
7546 *' to 'const char *'.
7547 (gdb_environ::set): Extend method to handle
7548 m_user_set_env_list and m_user_unset_env_list.
7549 (gdb_environ::unset): Likewise.
7550 (gdb_environ::clear_user_set_env): New method.
7551 (gdb_environ::user_set_envp): Likewise.
7552 (gdb_environ::user_unset_envp): Likewise.
7553 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7554 m_user_unset_env_list on move constructor/assignment.
7555 (unset): Add new default parameter 'update_unset_list = true'.
7556 (clear_user_set_env): New method.
7557 (user_set_envp): Likewise.
7558 (user_unset_envp): Likewise.
7559 (m_user_set_env_list): New std::set.
7560 (m_user_unset_env_list): Likewise.
7561 * common/rsp-low.c (hex2str): New function.
7562 (bin2hex): New overload for bin2hex function.
7563 * common/rsp-low.c (hex2str): New prototype.
7564 (str2hex): New overload prototype.
7565 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7566 QEnvironmentUnset and QEnvironmentReset.
7567 (remote_protocol_features): Add QEnvironmentHexEncoded,
7568 QEnvironmentUnset and QEnvironmentReset packets.
7569 (send_environment_packet): New function.
7570 (extended_remote_environment_support): Likewise.
7571 (extended_remote_create_inferior): Call
7572 extended_remote_environment_support.
7573 (_initialize_remote): Add QEnvironmentHexEncoded,
7574 QEnvironmentUnset and QEnvironmentReset packet configs.
7575 * unittests/environ-selftests.c (gdb_selftest_env_var):
7576 New variable.
7577 (test_vector_initialization): New function.
7578 (test_init_from_host_environ): Likewise.
7579 (test_reinit_from_host_environ): Likewise.
7580 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7581 Likewise.
7582 (test_unset_set_empty_vector): Likewise.
7583 (test_vector_clear): Likewise.
7584 (test_std_move): Likewise.
7585 (test_move_constructor):
7586 (test_self_move): Likewise.
7587 (test_set_unset_reset): Likewise.
7588 (run_tests): Rewrite in terms of the functions above.
7589
7590 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7591
7592 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7593 (adi_available): Use a temp variable of type CORE_ADDR as argument
7594 3 when calling target_auxv_search.
7595 (adi_normalize_address): Use masks and xor operators to calculate
7596 normalized address.
7597 (adi_read_versions, adi_write_versions, adi_print_versions)
7598 (do_examine, do_assign): Use paddress.
7599
7600 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7601
7602 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7603 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7604 out of loop and add supply of FIR.
7605 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7606 add collect of FIR.
7607
7608 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7609
7610 PR gdb/21827
7611 * cli/cli-script.c (define_command): Don't convert command name
7612 to lower case.
7613
7614 2017-08-25 Joel Brobecker <brobecker@adacore.com>
7615
7616 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7617 Update all callers accordingly. Remove all code blocks handling
7618 the case where DISPP is not NULL.
7619
7620 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7621
7622 PR symtab/22003
7623 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7624 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7625 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7626
7627 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7628
7629 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7630 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7631 (read_comp_units_from_section): New parameter abbrev_section, use
7632 read_and_check_comp_unit_head, allocate signatured_type if needed.
7633 (create_all_comp_units): Update read_comp_units_from_section caller.
7634
7635 2017-08-23 Pedro Alves <palves@redhat.com>
7636
7637 PR remote/21852
7638 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7639 to null_ptid and switch to thread without reading the registers
7640 after adding the inferior.
7641
7642 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7643
7644 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7645 compile-gcc.
7646 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7647 (compile_to_object): Implement compile_gcc.
7648 (_initialize_compile): Install "set compile-gcc". Initialize
7649 compile_gcc.
7650
7651 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7652
7653 * compile/compile.c (compile_to_object): Conditionally call
7654 set_verbose. Conditionally call compile or compile_v0.
7655
7656 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7657
7658 * sparc64-tdep.h: (adi_normalize_address): New export.
7659 * sparc-nat.h: (open_adi_tag_fd): New export.
7660 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7661 * sparc64-linux-tdep.c:
7662 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7663 (sparc64_linux_handle_segmentation_fault): New function.
7664 (sparc64_linux_init_abi): Register
7665 sparc64_linux_handle_segmentation_fault
7666 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7667 (sparc64_addr_bits_remove): New function.
7668 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7669 (MAX_PROC_NAME_SIZE): New macro.
7670 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7671 (sparc64adilist): New variable.
7672 (adi_proc_list): New variable.
7673 (find_adi_info): New function.
7674 (add_adi_info): New function.
7675 (get_adi_info_proc): New function.
7676 (get_adi_info): New function.
7677 (info_adi_command): New function.
7678 (read_maps_entry): New function.
7679 (adi_available): New function.
7680 (adi_normalize_address): New function.
7681 (adi_align_address): New function.
7682 (adi_convert_byte_count): New function.
7683 (adi_tag_fd): New function.
7684 (adi_is_addr_mapped): New function.
7685 (adi_read_versions): New function.
7686 (adi_write_versions): New function.
7687 (adi_print_versions): New function.
7688 (do_examine): New function.
7689 (do_assign): New function.
7690 (adi_examine_command): New function.
7691 (adi_assign_command): New function.
7692 (_initialize_sparc64_adi_tdep): New function.
7693
7694 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7695
7696 * breakpoint.c (breakpoints_info): Rename to ...
7697 (info_breakpoints_command): ... this.
7698 (watchpoints_info): Rename to ...
7699 (info_watchpoints_command): ... this.
7700 (tracepoints_info): Rename to ...
7701 (info_tracepoints_command): ... this.
7702 (_initialize_breakpoint): Adjust.
7703 * dcache.c (dcache_info): Rename to ...
7704 (info_display_command): ... this.
7705 (_initialize_dcache): Adjust.
7706 * frame.h (args_info): Rename to ...
7707 (info_args_command): ... this.
7708 (locals_info): Rename to ...
7709 (info_locals_command): ... this.
7710 * infcmd.c (nofp_registers_info): Rename to ...
7711 (info_registers_command): ... this.
7712 (float_info): Rename to ...
7713 (info_float_command): ... this.
7714 (program_info): Rename to ...
7715 (info_program_command): ... this.
7716 (all_registers_info): Rename to ...
7717 (info_all_registers_command): ... this.
7718 (vector_info): Rename to ...
7719 (info_vector_command): ... this.
7720 (float_info): Rename to ...
7721 (info_float_command): ... this.
7722 (_initialize_infcmd): Adjust.
7723 * inferior.h (term_info): Rename to ...
7724 (info_terminal_command): ... this.
7725 * inflow.c (term_info): Rename to ...
7726 (info_terminal_command): ... this.
7727 (_initialize_inflow): Adjust.
7728 * infrun.c (signals_info): Rename to ...
7729 (info_signals_command): ... this.
7730 (_initialize_infrun): Adjust.
7731 * objc-lang.c (classes_info): Rename to ...
7732 (info_classes_command): ... this.
7733 (selectors_info): Rename to ...
7734 (info_selectors_command): ... this.
7735 (_initialize_objc_language): Adjust.
7736 * printcmd.c (sym_info): Rename to ...
7737 (info_symbol_command): ... this.
7738 (address_info): Rename to ...
7739 (info_address_command): ... this.
7740 (display_info): Rename to ...
7741 (info_display_command): ... this.
7742 (_initialize_printcmd): Adjust.
7743 * reverse.c (bookmarks_info): Rename to ...
7744 (info_breakpoints_command): ... this.
7745 (_initialize_reverse): Adjust.
7746 * ser-go32.c (dos_info): Rename to ...
7747 (info_serial_command): ... this.
7748 (_initialize_ser_dos): Adjust.
7749 * skip.c (skip_info): Rename to ...
7750 (info_skip_command): ... this.
7751 (_initialize_step_skip): Adjust.
7752 * source.c (line_info): Rename to ...
7753 (info_line_command): ... this.
7754 (source_info): Rename to ...
7755 (info_source_command)
7756 * stack.c (frame_info): Rename to ...
7757 (info_frame_command): ... this.
7758 (locals_info): Rename to ...
7759 (info_locals_command): ... this.
7760 (args_info): Rename to ...
7761 (info_args_command): ... this.
7762 (_initialize_stack): Adjust.
7763 * symtab.c (sources_info): Rename to ...
7764 (info_sources_command): ... this.
7765 (variables_info): Rename to ...
7766 (info_variables_command): ... this.
7767 (functions_info): Rename to ...
7768 (info_functions_command): ... this.
7769 (types_info): Rename to ...
7770 (info_types_command): ... this.
7771 (_initialize_symtab): Adjust.
7772 * target.c (target_info): Rename to ...
7773 (info_target_command): ... this.
7774 (initialize_targets): Adjust.
7775 * tracepoint.c (tvariables_info): Rename to ...
7776 (info_tvariables_command): ... this.
7777 (scope_info): Rename to ...
7778 (info_scope_command): ... this.
7779 (trace_dump_actions): Adjust.
7780 (_initialize_tracepoint): Adjust.
7781
7782 2017-08-22 Tom Tromey <tom@tromey.com>
7783
7784 * breakpoint.h (install_breakpoint): Update.
7785 * breakpoint.c (add_solib_catchpoint): Update.
7786 (install_breakpoint): Change argument to a std::unique_ptr.
7787 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7788 (create_breakpoint_sal, create_breakpoint): Update.
7789 (watch_command_1, catch_exec_command_1)
7790 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7791 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7792 Return the breakpoint.
7793 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7794 (new_single_step_breakpoint): Update.
7795 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7796 std::unique_ptr.
7797 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7798 std::unique_ptr.
7799 * break-catch-sig.c (create_signal_catchpoint): Use
7800 std::unique_ptr.
7801 * ada-lang.c (create_ada_exception_catchpoint): Use
7802 std::unique_ptr.
7803
7804 2017-08-22 Tom Tromey <tom@tromey.com>
7805
7806 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7807
7808 2017-08-22 Tom Tromey <tom@tromey.com>
7809
7810 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7811 (lookup_partial_symbol): Update.
7812
7813 2017-08-22 Tom Tromey <tom@tromey.com>
7814
7815 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7816 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7817 (find_and_open_source, symtab_to_fullname): Update.
7818 * psymtab.c (psymtab_to_fullname): Update.
7819
7820 2017-08-22 Tom Tromey <tom@tromey.com>
7821
7822 * exec.c (exec_file_attach): Update.
7823 * linux-thread-db.c (try_thread_db_load): Update.
7824 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7825 * utils.c (gdb_realpath): Change return type.
7826 (gdb_realpath_keepfile): Update.
7827 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7828 (_initialize_utils): Register the new self test.
7829 * source.c (openp): Update.
7830 (find_and_open_source): Update.
7831 * nto-tdep.c (nto_find_and_open_solib): Update.
7832 * main.c (set_gdb_data_directory): Update.
7833 (captured_main_1): Update.
7834 * dwarf2read.c (dwarf2_get_dwz_file): Update
7835 (dw2_map_symbol_filenames): Update.
7836 * auto-load.c (auto_load_safe_path_vec_update): Update.
7837 (filename_is_in_auto_load_safe_path_vec): Change type of
7838 "filename_realp".
7839 (auto_load_objfile_script): Update.
7840 (file_is_auto_load_safe): Update. Use std::string.
7841 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7842
7843 2017-08-22 Tom Tromey <tom@tromey.com>
7844
7845 * utils.c (gdb_realpath_keepfile): Return a
7846 gdb::unique_xmalloc_ptr.
7847 * exec.c (exec_file_attach): Update.
7848 * utils.h (gdb_realpath_keepfile): Return a
7849 gdb::unique_xmalloc_ptr.
7850
7851 2017-08-22 Tom Tromey <tom@tromey.com>
7852
7853 * compile/compile.c (compile_file_command): Use
7854 gdb::unique_xmalloc_ptr, std::string.
7855 * utils.c (gdb_abspath): Change return type.
7856 * source.c (openp): Update.
7857 * objfiles.c (allocate_objfile): Update.
7858 * main.c (set_gdb_data_directory): Update.
7859 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7860
7861 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7862
7863 * cli-cmds.c (list_commands): List actual code around more than
7864 one location.
7865
7866 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7867
7868 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7869
7870 2017-08-21 Pedro Alves <palves@redhat.com>
7871
7872 PR gdb/19487
7873 * c-exp.y (variable production): Handle function aliases.
7874 * minsyms.c (msymbol_is_text): New function.
7875 * minsyms.h (msymbol_is_text): Declare.
7876 * symtab.c (find_function_alias_target): New function.
7877 * symtab.h (find_function_alias_target): Declare.
7878
7879 2017-08-21 Pedro Alves <palves@redhat.com>
7880
7881 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7882 typedefs.
7883 * typeprint.c (whatis_exp): If handling "whatis", and expression
7884 is OP_TYPE, strip one typedef level. Otherwise don't strip
7885 typedefs here.
7886 * valops.c (value_cast): Save "to" type before resolving
7887 stubs/typedefs. Use that type as resulting value's type.
7888
7889 2017-08-18 Tom Tromey <tom@tromey.com>
7890 Pedro Alves <palves@redhat.com>
7891
7892 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7893 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7894 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7895 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7896 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7897 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7898 (linux_get_siginfo_data): Add "thread" argument. Use
7899 scoped_restore.
7900 * linux-nat.c (linux_child_follow_fork)
7901 (check_stopped_by_watchpoint): Use scoped_restore.
7902 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7903 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7904 (restore_inferior_ptid, save_inferior_ptid): Remove.
7905 * btrace.c (btrace_fetch): Use scoped_restore.
7906 * bsd-uthread.c (bsd_uthread_fetch_registers)
7907 (bsd_uthread_store_registers): Use scoped_restore.
7908 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7909 scoped_restore.
7910 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7911 (aix_thread_xfer_partial): Use scoped_restore.
7912 * inferior.h (save_inferior_ptid): Remove.
7913
7914 2017-08-18 Yao Qi <yao.qi@linaro.org>
7915
7916 PR tdep/21818
7917 * arm-tdep.c (gdb_print_insn_arm): Mark
7918 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7919
7920 2017-08-18 Yao Qi <yao.qi@linaro.org>
7921
7922 * NEWS: Mention GDBserver's new option "--selftest".
7923 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7924 * selftest.c: Move it to common/selftest.c.
7925 * selftest.h: Move it to common/selftest.h.
7926 * selftest-arch.c (reset): New function.
7927 (tests_with_arch): Call reset.
7928
7929 2017-08-18 Yao Qi <yao.qi@linaro.org>
7930
7931 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7932 instead of exception_fprintf and printf_filtered.
7933
7934 2017-08-18 Yao Qi <yao.qi@linaro.org>
7935
7936 * selftest.c (register_self_test): Rename it to
7937 selftests::register_test.
7938 (run_self_tests): selftest::run_tests.
7939 * selftest.h: Update declarations.
7940 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7941 selftests::register_test_foreach_arch.
7942 * selftest-arch.h: Update declaration.
7943 * aarch64-tdep.c: Update.
7944 * arm-tdep.c: Likewise.
7945 * disasm-selftests.c: Likewise.
7946 * dwarf2loc.c: Likewise.
7947 * dwarf2-frame.c: Likewise.
7948 * findvar.c: Likewise.
7949 * gdbarch-selftests.c: Likewise.
7950 * maint.c (maintenance_selftest): Likewise.
7951 * regcache.c: Likewise.
7952 * rust-exp.y: Likewise.
7953 * selftest-arch.c: Likewise.
7954 * unittests/environ-selftests.c: Likewise.
7955 * unittests/function-view-selftests.c: Likewise.
7956 * unittests/offset-type-selftests.c: Likewise.
7957 * unittests/optional-selftests.c: Likewise.
7958 * unittests/scoped_restore-selftests.c: Likewise.
7959 * utils-selftests.c: Likewise.
7960
7961 2017-08-17 Pedro Alves <palves@redhat.com>
7962
7963 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7964 local.
7965
7966 2017-08-17 Pedro Alves <palves@redhat.com>
7967
7968 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7969 field.
7970 (reset_die_in_process): Delete, replaced by ...
7971 (process_die_scope): ... this new class. Make it responsible for
7972 freeing cu->line_header too.
7973 (process_die): Use process_die_scope.
7974 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7975 cu->line_header_die_owner. Don't release the line header if it's
7976 owned by the CU.
7977 (setup_type_unit_groups): Make the CU/DIE own the line header.
7978 Don't release the line header here.
7979
7980 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7981
7982 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7983
7984 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7985
7986 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7987 Single-Key mode
7988
7989 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7990
7991 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7992 mode command list.
7993
7994 2017-08-15 Stafford Horne <shorne@gmail.com>
7995
7996 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7997
7998 2017-08-15 Stafford Horne <shorne@gmail.com>
7999
8000 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8001
8002 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8003
8004 PR gdb/21954
8005 * infcmd.c (unset_environment_command): Use the 'clear' method on
8006 the environment instead of resetting it.
8007
8008 2017-08-15 John Baldwin <jhb@FreeBSD.org>
8009
8010 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8011 platforms.
8012
8013 2017-08-14 Tom Tromey <tom@tromey.com>
8014
8015 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8016 (print_binary_chars): Likewise.
8017 (BITS_IN_BYTES): Remove.
8018
8019 2017-08-14 Tom Tromey <tom@tromey.com>
8020
8021 PR gdb/21675
8022 * valprint.c (LOW_ZERO): Change value to 034.
8023 (print_octal_chars): Add static_asserts for octal constants.
8024 * printcmd.c (print_scalar_formatted): Add 'd' case.
8025
8026 2017-08-11 Tom Tromey <tom@tromey.com>
8027
8028 * symfile.c (add_symbol_file_command): Use std::vector.
8029
8030 2017-08-14 Tom Tromey <tom@tromey.com>
8031
8032 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8033 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8034 std::move.
8035 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8036
8037 2017-08-11 Pedro Alves <palves@redhat.com>
8038
8039 * infrun.c (process_event_stop_test): Adjust
8040 function_name_is_marked_for_skip call.
8041 * skip.c: Include <list>.
8042 (skiplist_entry): Make it a class with private fields, and
8043 getters/setters.
8044 (skiplist_entry_chain): Delete.
8045 (skiplist_entries): New.
8046 (skiplist_entry_count): Delete.
8047 (highest_skiplist_entry_num): New.
8048 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8049 (add_skiplist_entry): Delete.
8050 (skiplist_entry::skiplist_entry): New.
8051 (skiplist_entry::add_entry): New.
8052 (skip_file_command, skip_function): Adjust.
8053 (compile_skip_regexp): Delete.
8054 (skip_command): Don't compile regexp here. Adjust to use
8055 skiplist_entry::add_entry.
8056 (skip_info): Adjust to use range-for and getters.
8057 (skip_enable_command, skip_disable_command): Adjust to use
8058 range-for and setters.
8059 (skip_delete_command): Adjust to use std::list.
8060 (add_skiplist_entry): Delete.
8061 (skip_file_p): Delete, refactored as ...
8062 (skiplist_entry::do_skip_file_p): ... this new method.
8063 (skip_gfile_p): Delete, refactored as ...
8064 (skiplist_entry::do_gskip_file_p): ... this new method.
8065 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8066 (skiplist_entry::skip_function_p): ... this new method.
8067 (function_name_is_marked_for_skip): Now returns bool, and takes
8068 the function sal by const reference. Adjust to use range-for and
8069 skiplist_entry methods.
8070 (_initialize_step_skip): Remove references to
8071 skiplist_entry_chain, skiplist_entry_count.
8072 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8073 takes the function sal by const reference.
8074
8075 2017-08-11 Yao Qi <yao.qi@linaro.org>
8076
8077 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8078 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8079 (dwarf2_frame_cache):
8080 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8081 RETURN_MASK_ALL and set *this_case to NULL.
8082 * frame-unwind.h: Update comments.
8083
8084 2017-08-11 Yao Qi <yao.qi@linaro.org>
8085
8086 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8087 (dwarf2_frame_state_copy_regs): Remove.
8088 (dwarf2_frame_state_free_regs): Remove.
8089 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8090 (dwarf2_restore_rule): Call method .alloc_regs instead of
8091 dwarf2_frame_state_alloc_regs.
8092 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8093 constructor. Call std::move.
8094 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8095 (dwarf2_frame_cache): Likewise.
8096
8097 [GDB_SELF_TEST]: Include selftest.h and
8098 selftest-arch.h.
8099 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8100 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8101 execute_cfa_program_test.
8102
8103 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8104 copy ctor, assignment operator, move assignment.
8105 <alloc_regs>: New method.
8106 <swap>: New method.
8107 (struct dwarf2_frame_state): Delete dtor.
8108 (dwarf2_frame_state_alloc_regs): Remove declaration.
8109 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8110 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8111
8112 2017-08-11 Yao Qi <yao.qi@linaro.org>
8113
8114 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8115 (dwarf2_frame_state::dwarf2_frame_state): New.
8116 (dwarf2_frame_state::~dwarf2_frame_state): New.
8117 (dwarf2_fetch_cfa_info): Update.
8118 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8119 rather than a pointer. Update code.
8120 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8121 dtor.
8122 <data_align, code_align, retaddr_column>: Change them to const.
8123 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8124 to bool.
8125
8126 2017-08-11 Yao Qi <yao.qi@linaro.org>
8127
8128 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8129 <loc.exp>: New field.
8130 * dwarf2-frame.c (execute_cfa_program): Update.
8131 (dwarf2_frame_prev_register): Update.
8132
8133 2017-08-10 Pedro Alves <palves@redhat.com>
8134
8135 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8136
8137 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8138
8139 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8140 (fbsd_pending_children): Use std::list.
8141 (fbsd_remember_child): Likewise.
8142 (fbsd_is_child_pending): Likewise.
8143 (fbsd_pending_vfork_done): Use std::forward_list.
8144 (fbsd_add_vfork_done): Likewise.
8145 (fbsd_is_vfork_done_pending): Likewise.
8146 (fbsd_next_vfork_done): Likewise.
8147
8148 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8149
8150 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8151 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8152 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8153 for `mapfilename'.
8154 (fbsd_xfer_partial): Use gdb::byte_vector.
8155 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8156
8157 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8158
8159 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8160 "filestuff.h".
8161 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8162
8163 2017-08-09 Tom Tromey <tom@tromey.com>
8164
8165 * skip.c (skiplist_entry): New constructor.
8166 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8167 (skiplist_entry::file_is_glob): Now bool.
8168 (skiplist_entry::file, skiplist_entry::function): Now
8169 std::string.
8170 (make_skip_entry): Return a unique_ptr. Use new.
8171 (free_skiplist_entry, free_skiplist_entry_cleanup)
8172 (make_free_skiplist_entry_cleanup): Remove.
8173 (skip_command, skip_disable_command, add_skiplist_entry)
8174 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8175 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8176 (function_name_is_marked_for_skip): Update.
8177 (skip_delete_command): Update. Use delete.
8178
8179 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8180
8181 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8182 (aarch64_linux_core_read_description): New function.
8183 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8184
8185 2017-08-09 Pedro Alves <palves@redhat.com>
8186
8187 * cp-name-parser.y (cp_comp_to_string): Return a
8188 gdb::unique_xmalloc_ptr<char>.
8189 * cp-support.c (replace_typedefs_qualified_name)
8190 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8191 (cp_canonicalize_string_full): Use op= instead of explicit
8192 convertion.
8193 (cp_class_name_from_physname, method_name_from_physname)
8194 (cp_func_name, cp_remove_params): Adjust to use
8195 gdb::unique_xmalloc_ptr<char>.
8196 * cp-support.h (cp_comp_to_string): Return a
8197 gdb::unique_xmalloc_ptr<char>.
8198 * python/py-type.c (typy_lookup_type): Adjust to use
8199 gdb::unique_xmalloc_ptr<char>.
8200
8201 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8202
8203 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8204
8205 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8206 Yao Qi <yao.qi@linaro.org>
8207
8208 * cp-support.c (cp_canonicalize_string_full): Use
8209 gdb::unique_xmalloc_ptr<char>.
8210 (cp_canonicalize_string): Likewise.
8211
8212 2017-08-09 Yao Qi <yao.qi@linaro.org>
8213
8214 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8215 * regformats/i386/amd64-avx-avx512.dat: Remove.
8216 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8217 * regformats/i386/amd64-avx-mpx.dat:Remove.
8218 * regformats/i386/amd64-avx.dat: Remove.
8219 * regformats/i386/amd64-mpx.dat: Remove.
8220 * regformats/i386/i386-avx-avx512.dat: Remove.
8221 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8222 * regformats/i386/i386-avx-mpx.dat: Remove.
8223 * regformats/i386/i386-mmx.dat: Remove.
8224 * regformats/i386/i386-mpx.dat: Remove.
8225
8226 2017-08-09 Yao Qi <yao.qi@linaro.org>
8227
8228 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8229 * amd64-tdep.c: Don't include features/i386/x32*.c.
8230 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8231 functions.
8232 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8233 and i386/x32-avx-avx512.
8234 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8235 and i386/x32.xml.
8236 * features/i386/x32-avx-avx512.c: Removed.
8237 * features/i386/x32-avx-avx512.xml: Removed.
8238 * features/i386/x32-avx.c: Removed.
8239 * features/i386/x32-avx.xml: Removed.
8240 * features/i386/x32.c: Removed.
8241 * features/i386/x32.xml: Removed.
8242 * regformats/i386/x32-avx-avx512.dat: Removed.
8243 * regformats/i386/x32-avx.dat: Removed.
8244 * regformats/i386/x32.dat: Removed.
8245
8246 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8247
8248 PR breakpoints/21886
8249 * mem-break.c (default_memory_insert_breakpoint): Use
8250 `->placed_address' rather than `->reqstd_address' for the
8251 breakpoint location.
8252
8253 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8254
8255 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8256 assertions.
8257
8258 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8259
8260 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8261 a union of `tdep_info', `tdesc_data' and `id'.
8262 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8263 rather than `info.tdep_info'.
8264 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8265 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8266 * i386-tdep.c (i386_gdbarch_init): Likewise.
8267 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8268 * mips-tdep.c (mips_gdbarch_init): Likewise.
8269 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8270 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8271 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8272 `info.tdep_info'.
8273 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8274 `info.tdep_info'.
8275 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8276 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8277 `info.tdep_info'.
8278 * spu-tdep.c (spu_gdbarch_init): Likewise.
8279 * gdbarch.h: Regenerate.
8280
8281 2017-08-07 Leszek Swirski <leszeks@google.com>
8282
8283 PR symtab/20899
8284 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8285
8286 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8287
8288 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8289 (gdbsim_open): Rename gdb_argv args object to argv.
8290
8291 2017-08-05 Tom Tromey <tom@tromey.com>
8292
8293 * compile/compile-object-load.c (compile_object_load): Use
8294 gdb::unique_xmalloc_ptr.
8295 * cli/cli-dump.c (scan_filename): Rename from
8296 scan_filename_with_cleanup. Change return type.
8297 (scan_expression): Rename from scan_expression_with_cleanup.
8298 Change return type.
8299 (dump_memory_to_file, dump_value_to_file, restore_command):
8300 Use gdb::unique_xmalloc_ptr. Update.
8301 * cli/cli-cmds.c (find_and_open_script): Use
8302 gdb::unique_xmalloc_ptr.
8303 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8304 * symmisc.c (maintenance_print_symbols)
8305 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8306 * symfile.c (symfile_bfd_open, generic_load)
8307 (add_symbol_file_command, remove_symbol_file_command): Use
8308 gdb::unique_xmalloc_ptr.
8309 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8310 * psymtab.c (maintenance_print_psymbols): Use
8311 gdb::unique_xmalloc_ptr.
8312 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8313 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8314 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8315 (reload_shared_libraries_1): Likewise.
8316
8317 2017-08-05 Tom Tromey <tom@tromey.com>
8318
8319 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8320 (rust_op_vector, rust_set_vector): New typedefs.
8321 (current_parser): New global.
8322 (work_obstack): Change to pointer type. Update all users.
8323 (rust_ast, pstate): Remove globals.
8324 (struct rust_parser): New.
8325 (%union) <params, field_inits>: Change type.
8326 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8327 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8328 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8329 (convert_params_to_types, convert_params_to_expression): Change
8330 type of "params".
8331 (ast_string): Change type of "fields".
8332 (rust_parse): Make a rust_parser. Remove cleanups.
8333 (rust_lex_tests): Make and install an auto_obstack.
8334
8335 2017-08-04 Yao Qi <yao.qi@linaro.org>
8336
8337 * configure.srv (ipa_x32_linux_regobj): New.
8338 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8339 instead of X86_TDESC_AVX512.
8340 (initialize_low_tracepoint): Call
8341 init_registers_x32_avx_avx512_linux.
8342
8343 2017-08-04 Yao Qi <yao.qi@linaro.org>
8344
8345 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8346
8347 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8348
8349 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8350
8351 2017-08-03 Tom Tromey <tom@tromey.com>
8352
8353 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8354 Remove.
8355 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8356
8357 2017-08-03 Tom Tromey <tom@tromey.com>
8358
8359 * python/py-param.c (compute_enum_values): Use gdb_argv.
8360
8361 2017-08-03 Tom Tromey <tom@tromey.com>
8362
8363 * utils.h (struct gdb_argv_deleter): New.
8364 (gdb_argv): New class.
8365 * utils.c (gdb_argv::reset): New method.
8366 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8367 * tracefile.c (tsave_command): Use gdb_argv.
8368 * top.c (new_ui_command): Use gdb_argv.
8369 * symmisc.c (maintenance_print_symbols)
8370 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8371 * symfile.c (symbol_file_command, generic_load)
8372 (remove_symbol_file_command): Use gdb_argv.
8373 * stack.c (backtrace_command): Use gdb_argv.
8374 * source.c (add_path, show_substitute_path_command)
8375 (unset_substitute_path_command, set_substitute_path_command):
8376 Use gdb_argv.
8377 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8378 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8379 * remote.c (extended_remote_run, remote_put_command)
8380 (remote_get_command, remote_delete_command): Use gdb_argv.
8381 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8382 (gdbsim_open): Use gdb_argv.
8383 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8384 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8385 * procfs.c (procfs_info_proc): Use gdb_argv.
8386 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8387 * infrun.c (handle_command): Use gdb_argv.
8388 * inferior.c (add_inferior_command, clone_inferior_command):
8389 Use gdb_argv.
8390 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8391 * exec.c (exec_file_command): Use gdb_argv.
8392 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8393 * compile/compile.c (build_argc_argv): Use gdb_argv.
8394
8395 2017-08-03 Tom Tromey <tom@tromey.com>
8396
8397 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8398
8399 2017-08-03 Tom Tromey <tom@tromey.com>
8400
8401 * python/python.c (compute_python_string): Return std::string.
8402 (gdbpy_eval_from_control_command): Update.
8403 (do_start_initialization): Use std::string.
8404 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8405 xstrprintf.
8406 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8407 xstrprintf.
8408
8409 2017-08-03 Tom Tromey <tom@tromey.com>
8410
8411 * top.h (do_restore_instream_cleanup): Remove.
8412 * top.c (do_restore_instream_cleanup): Remove.
8413 (read_command_file): Use scoped_restore.
8414 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8415
8416 2017-08-03 Tom Tromey <tom@tromey.com>
8417
8418 * cli/cli-script.c (execute_user_command)
8419 (execute_control_command): Use scoped_restore.
8420
8421 2017-08-03 Tom Tromey <tom@tromey.com>
8422
8423 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8424 (execute_user_command): Remove user_call_depth; use
8425 user_args_stack's size instead.
8426
8427 2017-08-03 Tom Tromey <tom@tromey.com>
8428
8429 * top.h (in_user_command): Remove.
8430 * top.c (in_user_command): Remove.
8431 * cli/cli-script.c (do_restore_user_call_depth)
8432 (execute_user_command): Update.
8433
8434 2017-08-03 Tom Tromey <tom@tromey.com>
8435
8436 * valops.c (search_struct_method): Use gdb::byte_vector.
8437 * valarith.c (value_concat): Use std::vector.
8438 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8439 (simple_search_memory): Likewise.
8440 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8441 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8442 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8443 * elfread.c (elf_rel_plt_read): Use std::string.
8444 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8445 * cli/cli-dump.c (restore_section_callback): Use
8446 gdb::byte_vector.
8447
8448 2017-08-03 Tom Tromey <tom@tromey.com>
8449
8450 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8451
8452 2017-08-03 Tom Tromey <tom@tromey.com>
8453
8454 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8455 (tui_register_format): Use scoped_restore.
8456
8457 2017-08-03 Tom Tromey <tom@tromey.com>
8458
8459 * reverse.c (exec_direction_default): Remove.
8460 (exec_reverse_once): Use scoped_restore.
8461 * remote.c (restore_remote_timeout): Remove.
8462 (remote_flash_erase, remote_flash_write, remote_flash_done)
8463 (readchar, remote_serial_write): Use scoped_restore.
8464 * cli/cli-script.c (struct source_cleanup_lines_args)
8465 (source_cleanup_lines): Remove.
8466 (script_from_file): Use scoped_restore.
8467 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8468 (source_command): Use scoped_restore.
8469
8470 2017-08-03 Tom Tromey <tom@tromey.com>
8471
8472 * utils.h (make_cleanup_free_so): Remove.
8473 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8474 * solist.h (struct so_deleter): New.
8475 (so_list_up): New typedef.
8476 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8477
8478 2017-08-03 Tom Tromey <tom@tromey.com>
8479
8480 * utils.h (make_cleanup_restore_current_language): Remove.
8481 * utils.c (do_restore_current_language)
8482 (make_cleanup_restore_current_language): Remove.
8483 * parse.c (parse_exp_in_context_1)
8484 (parse_expression_with_language): Use
8485 scoped_restore_current_language.
8486 * mi/mi-main.c (mi_cmd_execute): Use
8487 scoped_restore_current_language.
8488 * language.h (scoped_restore_current_language): New class.
8489
8490 2017-08-03 Tom Tromey <tom@tromey.com>
8491
8492 * compile/compile.c (cleanup_unlink_file): Remove.
8493 (compile_to_object): Use gdb::unlinker.
8494 (eval_compile_command): Likewise.
8495
8496 2017-08-03 Tom Tromey <tom@tromey.com>
8497
8498 * utils.h (make_cleanup_fclose): Remove.
8499 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8500
8501 2017-08-03 Tom Tromey <tom@tromey.com>
8502
8503 * top.c (open_terminal_stream): Return gdb_file_up.
8504 (new_ui_command): Update.
8505
8506 2017-08-03 Tom Tromey <tom@tromey.com>
8507
8508 * source.c (print_source_lines_base, forward_search_command)
8509 (reverse_search_command): Use gdb_file_up.
8510
8511 2017-08-03 Tom Tromey <tom@tromey.com>
8512
8513 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8514
8515 2017-08-03 Tom Tromey <tom@tromey.com>
8516
8517 * cli/cli-cmds.c (find_and_open_script): Change return type.
8518 Remove "streamp" and "full_path" parameters.
8519 (source_script_with_search): Update.
8520 * auto-load.c (source_script_file): Update.
8521 * cli/cli-cmds.h (find_and_open_script): Change type.
8522 (open_script): New struct.
8523
8524 2017-08-03 Tom Tromey <tom@tromey.com>
8525
8526 * xml-support.c (xml_fetch_content_from_file): Update.
8527 * ui-file.c (stdio_file::open): Update.
8528 * tracefile-tfile.c (tfile_start): Update.
8529 * remote.c (remote_file_put, remote_file_get): Update.
8530 * nat/linux-procfs.c (linux_proc_get_int)
8531 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8532 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8533 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8534 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8535 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8536 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8537 * linux-nat.c (linux_proc_pending_signals): Update.
8538 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8539 (file_closer): Remove.
8540 * compile/compile.c (compile_to_object): Update.
8541 * common/filestuff.h (struct gdb_file_deleter): New.
8542 (gdb_file_up): New typedef.
8543 (gdb_fopen_cloexec): Change return type.
8544 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8545 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8546 (dump_binary_file, restore_binary_file): Update.
8547 * auto-load.c (auto_load_objfile_script_1): Update.
8548
8549 2017-08-03 Tom Tromey <tom@tromey.com>
8550
8551 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8552 (info_static_tracepoint_markers_command): Likewise.
8553 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8554 * skip.c (skip_info): Use ui_out_emit_table.
8555 * progspace.c (print_program_space): Use ui_out_emit_table.
8556 * osdata.c (info_osdata): Use ui_out_emit_table.
8557 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8558 ui_out_emit_table.
8559 * linux-thread-db.c (info_auto_load_libthread_db): Use
8560 ui_out_emit_table.
8561 * inferior.c (print_inferior): Use ui_out_emit_table.
8562 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8563 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8564 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8565 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8566 * ui-out.h (class ui_out_emit_table): New.
8567
8568 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8569
8570 * mips-tdep.c (mips_fpu_type_str): New function.
8571 (mips_dump_tdep): Call it.
8572
8573 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8574
8575 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8576 `->mips_fpu_type'.
8577
8578 2017-07-31 Xavier Roirand <roirand@adacore.com>
8579
8580 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8581
8582 2017-07-27 Xavier Roirand <roirand@adacore.com>
8583
8584 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8585
8586 2017-07-26 Yao Qi <yao.qi@linaro.org>
8587
8588 * cli/cli-cmds.c (maintenancechecklist): New variable.
8589 * gdbcmd.h (maintenancechecklist): Declare it.
8590 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8591 Call i386_linux_read_description with different masks.
8592 * maint.c (maintenance_check_command): New function.
8593 (_initialize_maint_cmds): Call add_prefix_cmd.
8594 * target-descriptions.c (tdesc_reg): override operator != and ==.
8595 (tdesc_type): Likewise.
8596 (tdesc_feature): Likewise.
8597 (target_desc): Likewise.
8598 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8599 (maintenance_check_xml_descriptions): New function.
8600 (_initialize_target_descriptions) Add command "xml-descriptions".
8601 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8602
8603 2017-07-26 Yao Qi <yao.qi@linaro.org>
8604
8605 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8606 Include features/i386/32bit-*.c.
8607 (i386_linux_read_description): Generate target description if it
8608 doesn't exist.
8609 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8610 functions.
8611 * features/i386/32bit-linux.c: Re-generated.
8612 * features/i386/32bit-sse.c: Likewise.
8613 * target-descriptions.c (print_c_feature::visit): Print code to
8614 set register number if needed.
8615 (print_c_feature) <m_next_regnum>: New field.
8616
8617 2017-07-26 Yao Qi <yao.qi@linaro.org>
8618
8619 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8620 (FEATURE_XMLFILES): New.
8621 (FEATURE_CFILES): New.
8622 New rules.
8623 (clean-cfiles): Remove generated c files.
8624 * features/i386/32bit-avx.c: Generated.
8625 * features/i386/32bit-avx512.c: Generated.
8626 * features/i386/32bit-core.c: Generated.
8627 * features/i386/32bit-linux.c: Generated.
8628 * features/i386/32bit-mpx.c: Generated.
8629 * features/i386/32bit-pkeys.c: Generated.
8630 * features/i386/32bit-sse.c: Generated.
8631 * target-descriptions.c: Include algorithm.
8632 (tdesc_element_visitor): Add method visit_end.
8633 (print_c_tdesc): Implement visit_end.
8634 (print_c_tdesc:: m_filename_after_features): Move it to
8635 protected.
8636 (print_c_feature): New class.
8637 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8638 name starts with "i386/32bit-".
8639
8640 2017-07-26 Yao Qi <yao.qi@linaro.org>
8641
8642 * target-descriptions.c (tdesc_element_visitor): New class.
8643 (tdesc_element): New class.
8644 (tdesc_reg): Inherit from tdesc_element.
8645 (tdesc_reg::accept): New function.
8646 (tdesc_type): Inherit from tdesc_element.
8647 (tdesc_type::accept): New function.
8648 (tdesc_feature): Inherit from tdesc_element.
8649 (tdesc_feature::accept): New function.
8650 (target_desc): Inherit from tdesc_element.
8651 (target_desc::target_desc): New.
8652 (target_desc::~target_desc): New.
8653 (target_desc::accept): New.
8654 (allocate_target_description): Use new.
8655 (free_target_description): Use delete.
8656 (print_c_tdesc): New class.
8657 (maint_print_c_tdesc_cmd): Adjust.
8658
8659 * features/aarch64.c: Re-generated.
8660 * features/arc-arcompact.c: Re-generated.
8661 * features/arc-v2.c: Re-generated.
8662 * features/arm/arm-with-iwmmxt.c: Re-generated.
8663 * features/arm/arm-with-m.c: Re-generated.
8664 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8665 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8666 * features/arm/arm-with-neon.c: Re-generated.
8667 * features/arm/arm-with-vfpv2.c: Re-generated.
8668 * features/arm/arm-with-vfpv3.c: Re-generated.
8669 * features/i386/amd64-avx-avx512.c: Re-generated.
8670 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8671 * features/i386/amd64-avx.c: Re-generated.
8672 * features/i386/amd64-avx-linux.c: Re-generated.
8673 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8674 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8675 * features/i386/amd64-avx-mpx.c: Re-generated.
8676 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8677 * features/i386/amd64.c: Re-generated.
8678 * features/i386/amd64-linux.c: Re-generated.
8679 * features/i386/amd64-mpx.c: Re-generated.
8680 * features/i386/amd64-mpx-linux.c: Re-generated.
8681 * features/i386/i386-avx-avx512.c: Re-generated.
8682 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8683 * features/i386/i386-avx.c: Re-generated.
8684 * features/i386/i386-avx-linux.c: Re-generated.
8685 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8686 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8687 * features/i386/i386-avx-mpx.c: Re-generated.
8688 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8689 * features/i386/i386.c: Re-generated.
8690 * features/i386/i386-linux.c: Re-generated.
8691 * features/i386/i386-mmx.c: Re-generated.
8692 * features/i386/i386-mmx-linux.c: Re-generated.
8693 * features/i386/i386-mpx.c: Re-generated.
8694 * features/i386/i386-mpx-linux.c: Re-generated.
8695 * features/i386/x32-avx-avx512.c: Re-generated.
8696 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8697 * features/i386/x32-avx.c: Re-generated.
8698 * features/i386/x32-avx-linux.c: Re-generated.
8699 * features/i386/x32.c: Re-generated.
8700 * features/i386/x32-linux.c: Re-generated.
8701 * features/microblaze.c: Re-generated.
8702 * features/microblaze-with-stack-protect.c: Re-generated.
8703 * features/mips64-dsp-linux.c: Re-generated.
8704 * features/mips64-linux.c: Re-generated.
8705 * features/mips-dsp-linux.c: Re-generated.
8706 * features/mips-linux.c: Re-generated.
8707 * features/nds32.c: Re-generated.
8708 * features/nios2.c: Re-generated.
8709 * features/nios2-linux.c: Re-generated.
8710 * features/rs6000/powerpc-32.c: Re-generated.
8711 * features/rs6000/powerpc-32l.c: Re-generated.
8712 * features/rs6000/powerpc-403.c: Re-generated.
8713 * features/rs6000/powerpc-403gc.c : Re-generated.
8714 * features/rs6000/powerpc-405.c: Re-generated.
8715 * features/rs6000/powerpc-505.c: Re-generated.
8716 * features/rs6000/powerpc-601.c: Re-generated.
8717 * features/rs6000/powerpc-602.c: Re-generated.
8718 * features/rs6000/powerpc-603.c: Re-generated.
8719 * features/rs6000/powerpc-604.c: Re-generated.
8720 * features/rs6000/powerpc-64.c: Re-generated.
8721 * features/rs6000/powerpc-64l.c: Re-generated.
8722 * features/rs6000/powerpc-7400.c: Re-generated.
8723 * features/rs6000/powerpc-750.c: Re-generated.
8724 * features/rs6000/powerpc-860.c: Re-generated.
8725 * features/rs6000/powerpc-altivec32.c: Re-generated.
8726 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8727 * features/rs6000/powerpc-altivec64.c: Re-generated.
8728 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8729 * features/rs6000/powerpc-cell32l.c: Re-generated.
8730 * features/rs6000/powerpc-cell64l.c: Re-generated.
8731 * features/rs6000/powerpc-e500.c: Re-generated.
8732 * features/rs6000/powerpc-e500l.c: Re-generated.
8733 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8734 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8735 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8736 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8737 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8738 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8739 * features/rs6000/powerpc-vsx32.c: Re-generated.
8740 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8741 * features/rs6000/powerpc-vsx64.c: Re-generated.
8742 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8743 * features/rs6000/rs6000.c: Re-generated.
8744 * features/s390-linux32.c: Re-generated.
8745 * features/s390-linux32v1.c: Re-generated.
8746 * features/s390-linux32v2.c: Re-generated.
8747 * features/s390-linux64.c: Re-generated.
8748 * features/s390-linux64v1.c: Re-generated.
8749 * features/s390-linux64v2.c: Re-generated.
8750 * features/s390-te-linux64.c: Re-generated.
8751 * features/s390-tevx-linux64.c: Re-generated.
8752 * features/s390-vx-linux64.c: Re-generated.
8753 * features/s390x-linux64.c: Re-generated.
8754 * features/s390x-linux64v1.c: Re-generated.
8755 * features/s390x-linux64v2.c: Re-generated.
8756 * features/s390x-te-linux64.c: Re-generated.
8757 * features/s390x-tevx-linux64.c: Re-generated.
8758 * features/s390x-vx-linux64.c: Re-generated.
8759 * features/sparc/sparc32-solaris.c: Re-generated.
8760 * features/sparc/sparc64-solaris.c: Re-generated.
8761 * features/tic6x-c62x.c: Re-generated.
8762 * features/tic6x-c62x-linux.c: Re-generated.
8763 * features/tic6x-c64x.c: Re-generated.
8764 * features/tic6x-c64x-linux.c: Re-generated.
8765 * features/tic6x-c64xp.c: Re-generated.
8766 * features/tic6x-c64xp-linux.c: Re-generated.
8767
8768 2017-07-26 Yao Qi <yao.qi@linaro.org>
8769
8770 * i386-linux-tdep.c (i386_linux_read_description): New function.
8771 (i386_linux_core_read_description): Call
8772 i386_linux_read_description.
8773 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8774 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8775 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8776 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8777 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8778 * x86-linux-nat.c (x86_linux_read_description): Call
8779 i386_linux_read_description.
8780
8781 2017-07-26 Yao Qi <yao.qi@linaro.org>
8782
8783 * NEWS: Mention it.
8784 * features/Makefile (%.c: %.xml): Pass the xml file name to
8785 command "maint print c-tdesc".
8786 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8787 name from 'arg'.
8788
8789 2017-07-26 Yao Qi <yao.qi@linaro.org>
8790
8791 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8792 in-class initialization.
8793 (tdesc_create_feature): Call new instead of XCNEW.
8794 (free_target_description): Ue delete.
8795
8796 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8797
8798 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8799
8800 2017-07-25 Yao Qi <yao.qi@linaro.org>
8801
8802 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8803 constant.
8804 (amd64_x32_init_abi): Likewise.
8805 * amd64-tdep.h (amd64_init_abi): Update declaration.
8806 (amd64_x32_init_abi): Likewise.
8807
8808 2017-07-25 Yao Qi <yao.qi@linaro.org>
8809
8810 PR tdep/21717
8811 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8812 condition for FPSCR.
8813 (arm_linux_store_inferior_registers): Likewise.
8814
8815 2017-07-22 Tom Tromey <tom@tromey.com>
8816
8817 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8818 <syscalls_counts>: Now a std::vector.
8819 (get_catch_syscall_inferior_data): Use "new".
8820 (catch_syscall_inferior_data_cleanup): Use "delete".
8821 (insert_catch_syscall, remove_catch_syscall)
8822 (clear_syscall_counts): Update.
8823
8824 2017-07-22 Tom Tromey <tom@tromey.com>
8825
8826 * break-catch-syscall.c (syscall_catchpoint)
8827 <syscalls_to_be_caught>: Now a std::vector<int>
8828 (~syscall_catchpoint): Remove.
8829 (insert_catch_syscall, remove_catch_syscall)
8830 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8831 (print_mention_catch_syscall, print_recreate_catch_syscall):
8832 Update.
8833 (create_syscall_event_catchpoint): Change type of "filter"
8834 parameter.
8835 (catch_syscall_split_args): Return a std::vector.
8836 (catch_syscall_command_1, catching_syscall_number_1): Update.
8837
8838 2017-07-22 Tom Tromey <tom@tromey.com>
8839
8840 * break-catch-throw.c (struct exception_catchpoint)
8841 <exception_rx>: Now a std::string.
8842 (~exception_catchpoint): Remove.
8843 (print_one_detail_exception_catchpoint): Update.
8844 (handle_gnu_v3_exceptions): Change type of except_rx.
8845 (extract_exception_regexp): Return a std::string.
8846 (catch_exception_command_1): Update.
8847
8848 2017-07-22 Tom Tromey <tom@tromey.com>
8849
8850 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8851 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8852 std::vector.
8853 <catch_all>: Now a bool.
8854 (~signal_catchpoint): Remove.
8855 (signal_catchpoint_insert_location)
8856 (signal_catchpoint_remove_location)
8857 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8858 (signal_catchpoint_print_mention)
8859 (signal_catchpoint_print_recreate)
8860 (signal_catchpoint_explains_signal): Update.
8861 (create_signal_catchpoint): Change type of "filter" and
8862 "catch_all".
8863 (catch_signal_split_args): Return a std::vector. Change type of
8864 "catch_all".
8865 (catch_signal_command): Update.
8866
8867 2017-07-20 Pedro Alves <palves@redhat.com>
8868
8869 * ada-lang.c (ada_language_defn): Make extern.
8870 (_initialize_ada_language): Remove add_language call.
8871 * c-lang.c (c_language_defn, cplus_language_defn)
8872 (asm_language_defn, minimal_language_defn): Make extern.
8873 (_initialize_c_language): Delete.
8874 * completer.c (compare_cstrings): Delete, moved to utils.h.
8875 * d-lang.c (d_language_defn): Make extern.
8876 (_initialize_d_language): Remove add_language calls.
8877 * defs.h (enum language): Add comment.
8878 * f-lang.c (f_language_defn): Make extern.
8879 (_initialize_f_language): Remove add_language call.
8880 * go-lang.c (go_language_defn): Make extern.
8881 (_initialize_go_language): Remove add_language call.
8882 * language.c: Include <algorithm>.
8883 (languages): Redefine as const array.
8884 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8885 (set_language_command): Handle "local". Use for-range loop.
8886 (set_language): Remove loop.
8887 (language_enum): Rewrite.
8888 (language_def, language_str): Remove loops.
8889 (add_language): Delete.
8890 (add_set_language_command): New, based on add_languages.
8891 (skip_language_trampoline): Adjust.
8892 (local_language_defn): Delete.
8893 (language_gdbarch_post_init): Adjust.
8894 (_initialize_language): Remove add_language calls. Call
8895 add_set_language_command.
8896 * language.h (add_language): Delete.
8897 (auto_language_defn)
8898 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8899 (asm_language_defn, c_language_defn, cplus_language_defn)
8900 (d_language_defn, f_language_defn, go_language_defn)
8901 (m2_language_defn, objc_language_defn, opencl_language_defn)
8902 (pascal_language_defn, rust_language_defn): Declare.
8903 * m2-lang.c (m2_language_defn): Make extern.
8904 (_initialize_m2_language): Remove add_language call.
8905 * objc-lang.c (objc_language_defn): Make extern.
8906 (_initialize_objc_language): Remove add_language call.
8907 * opencl-lang.c (opencl_language_defn): Make extern.
8908 (_initialize_opencl_language): Remove add_language call.
8909 * p-lang.c (pascal_language_defn): Make extern.
8910 (_initialize_pascal_language): Delete.
8911 * rust-lang.c (rust_language_defn): Make extern.
8912 (_initialize_rust_language): Delete.
8913 * utils.h (compare_cstrings): New static inline function.
8914
8915 2017-07-20 Pedro Alves <palves@redhat.com>
8916
8917 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8918 (get_var_value): Constify parameters.
8919 (get_int_var_value): Change prototype.
8920 (to_fixed_range_type): Adjust.
8921 * ada-lang.h (get_int_var_value): Change prototype.
8922
8923 2017-07-20 Pedro Alves <palves@redhat.com>
8924
8925 * dwarf2read.c (dw2_lookup_symbol): Use
8926 SYMBOL_MATCHES_SEARCH_NAME.
8927 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8928
8929 2017-07-20 Pedro Alves <palves@redhat.com>
8930
8931 * block.c (block_iter_name_step, block_iter_name_first)
8932 (block_iter_name_next): Delete.
8933 (block_lookup_symbol_primary): Adjust to use
8934 dict_iter_match_first/dict_iter_match_next.
8935 * block.h (block_iter_name_first, block_iter_name_next): Delete
8936 declarations.
8937 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8938 dict_iter_match_first/dict_iter_match_next.
8939
8940 2017-07-20 Pedro Alves <palves@redhat.com>
8941
8942 * cp-support.c (cp_find_first_component_aux): Add missing case for
8943 end of string.
8944
8945 2017-07-18 David Blaikie <dblaikie@gmail.com>
8946
8947 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8948 of dwo_cu's dwo_file.
8949
8950 2017-07-18 Yao Qi <yao.qi@linaro.org>
8951
8952 * remote.c (store_registers_using_G): Remove one line comment.
8953
8954 2017-07-18 Yao Qi <yao.qi@linaro.org>
8955
8956 * regcache.c (regcache_cpy): Simplify it.
8957 (regcache::cpy_no_passthrough): Remove it.
8958 * regcache.h (cpy_no_passthrough): Remove it.
8959 (regcache_dup, regcache_cpy): Update comments.
8960
8961 2017-07-18 Pedro Alves <palves@redhat.com>
8962
8963 * remote-sim.c (sim_command_completer): Adjust to work with a
8964 completion_tracker instead of a VEC.
8965
8966 2017-07-17 Pedro Alves <palves@redhat.com>
8967
8968 * completer.c (complete_source_filenames): New function.
8969 (complete_address_and_linespec_locations): New function.
8970 (location_completer): Use complete_address_and_linespec_locations.
8971 (completion_tracker::build_completion_result): Honor the tracker's
8972 request to suppress append.
8973 * completer.h (completion_tracker::suppress_append_ws)
8974 (completion_tracker::set_suppress_append_ws): New methods.
8975 (completion_tracker::m_suppress_append_ws): New field.
8976 (complete_source_filenames): New declaration.
8977 * linespec.c (linespec_complete_what): New.
8978 (struct ls_parser) <complete_what, completion_word,
8979 completion_quote_char, completion_quote_end, completion_tracker>:
8980 New fields.
8981 (string_find_incomplete_keyword_at_end): New.
8982 (linespec_lexer_lex_string): Record quote char. If in completion
8983 mode, don't throw.
8984 (linespec_lexer_consume_token): Advance the completion word point.
8985 (linespec_lexer_peek_token): Save/restore completion info.
8986 (save_stream_and_consume_token): New.
8987 (set_completion_after_number): New.
8988 (linespec_parse_basic): Set what to complete next depending on
8989 token. Handle function and label completions specially.
8990 (parse_linespec): Disable objc shortcut in completion mode. Set
8991 what to complete next depending on token type. Skip keyword if in
8992 completion mode.
8993 (complete_linespec_component, linespec_complete): New.
8994 * linespec.h (linespec_complete): Declare.
8995
8996 2017-07-17 Pedro Alves <palves@redhat.com>
8997
8998 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8999 Handle 'operator<' / 'operator<<'.
9000
9001 2017-07-17 Pedro Alves <palves@redhat.com>
9002
9003 * completer.c (collect_explicit_location_matches): Handle
9004 MATCH_LABEL.
9005 (convert_explicit_location_to_linespec): New, factored out from
9006 ...
9007 (convert_explicit_location_to_sals): ... this.
9008 (complete_label): New.
9009 (linespec_complete_label, find_label_symbols_in_block): New.
9010 (find_label_symbols): Add completion_mode parameter and adjust to
9011 call find_label_symbols_in_block.
9012 * linespec.h (linespec_complete_label): Declare.
9013
9014 2017-07-17 Pedro Alves <palves@redhat.com>
9015
9016 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9017 complete_symbol_mode parameter.
9018 * cli/cli-cmds.c (complete_command): Get the completion result out
9019 of the handle_brkchars tracker if used a custom word point.
9020 * completer.c: Include "linespec.h".
9021 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9022 (advance_to_expression_complete_word_point): New.
9023 (completion_tracker::completes_to_completion_word): New.
9024 (complete_files_symbols): Pass down
9025 complete_symbol_mode::EXPRESSION.
9026 (explicit_options, probe_options): New.
9027 (collect_explicit_location_matches): Complete on the
9028 explictit_loc->foo instead of word. Use
9029 linespec_complete_function. Handle MATCH_LINE. Handle offering
9030 keyword and options completions.
9031 (backup_text_ptr): Delete.
9032 (skip_keyword): New.
9033 (complete_explicit_location): Remove 'word' parameter. Add
9034 language, quoted_arg_start and quoted_arg_end parameters.
9035 Rewrite, parsing left to right.
9036 (location_completer): Rewrite.
9037 (location_completer_handle_brkchars): New function.
9038 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9039 (enum complete_line_internal_reason): Adjust comments.
9040 (completion_tracker::discard_completions): New.
9041 (completer_handle_brkchars_func_for_completer): Handle
9042 location_completer.
9043 (gdb_custom_word_point_brkchars)
9044 (gdb_org_rl_basic_quote_characters): New.
9045 (gdb_completion_word_break_characters_throw)
9046 (completion_find_completion_word): Handle trackers that use a
9047 custom word point.
9048 (completion_tracker::advance_custom_word_point_by): New.
9049 (completion_tracker::build_completion_result): Don't rely on
9050 readline appending the quote char.
9051 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9052 use a custom word point.
9053 (gdb_rl_attempted_completion_function): Restore
9054 rl_basic_quote_characters.
9055 * completer.h (class completion_tracker): Extend intro comment.
9056 (completion_tracker::set_quote_char)
9057 (completion_tracker::quote_char)
9058 (completion_tracker::set_use_custom_word_point)
9059 (completion_tracker::use_custom_word_point)
9060 (completion_tracker::custom_word_point)
9061 (completion_tracker::set_custom_word_point)
9062 (completion_tracker::advance_custom_word_point_by)
9063 (completion_tracker::completes_to_completion_word)
9064 (completion_tracker::discard_completions): New methods.
9065 (completion_tracker::m_quote_char)
9066 (completion_tracker::m_use_custom_word_point)
9067 (completion_tracker::m_custom_word_point): New fields.
9068 (advance_to_expression_complete_word_point): Declare.
9069 * f-lang.c (f_collect_symbol_completion_matches): Add
9070 complete_symbol_mode parameter.
9071 * language.h (struct language_defn)
9072 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9073 parameter.
9074 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9075 (linespec_complete_function): New function.
9076 (linespec_lexer_lex_keyword): Adjust.
9077 * linespec.h (linespec_keywords, linespec_complete_function): New
9078 declarations.
9079 * location.c (find_end_quote): New function.
9080 (explicit_location_lex_one): Add explicit_completion_info
9081 parameter. Save quoting info. Don't throw if being called for
9082 completion. Don't handle Ada operators here.
9083 (is_cp_operator, skip_op_false_positives, first_of)
9084 (explicit_location_lex_one_function): New function.
9085 (string_to_explicit_location): Replace 'dont_throw' parameter with
9086 an explicit_completion_info pointer parameter. Handle it. Don't
9087 use explicit_location_lex_one to lex function names. Use
9088 explicit_location_lex_one_function instead.
9089 * location.h (struct explicit_completion_info): New.
9090 (string_to_explicit_location): Replace 'dont_throw' parameter with
9091 an explicit_completion_info pointer parameter.
9092 * symtab.c (default_collect_symbol_completion_matches_break_on):
9093 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9094 (default_collect_symbol_completion_matches)
9095 (collect_symbol_completion_matches): Add complete_symbol_mode
9096 parameter.
9097 (collect_symbol_completion_matches_type): Pass down
9098 complete_symbol_mode::EXPRESSION.
9099 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9100 parameter. Handle LINESPEC mode.
9101 * symtab.h (complete_symbol_mode): New.
9102 (default_collect_symbol_completion_matches_break_on)
9103 (default_collect_symbol_completion_matches)
9104 (collect_symbol_completion_matches)
9105 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9106 parameter.
9107
9108 2017-07-17 Pedro Alves <palves@redhat.com>
9109
9110 * utils.c (enum class strncmp_iw_mode): New.
9111 (strcmp_iw): Rename to ...
9112 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9113 parameters. Handle them.
9114 (strncmp_iw): New.
9115 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9116 * utils.h (strncmp_iw): Declare.
9117 (strcmp_iw): Move describing comments here.
9118
9119 2017-07-17 Pedro Alves <palves@redhat.com>
9120
9121 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9122 CP_OPERATOR_STR.
9123 * c-typeprint.c (is_type_conversion_operator): Use
9124 CP_OPERATOR_STR.
9125 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9126 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9127 CP_OPERATOR_LEN.
9128 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9129 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9130 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9131 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9132 CP_OPERATOR_STR.
9133 * location.c: Include "cp-support.h".
9134 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9135 CP_OPERATOR_STR.
9136 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9137 CP_OPERATOR_LEN.
9138
9139 2017-07-17 Pedro Alves <palves@redhat.com>
9140
9141 * cli/cli-cmds.c (complete_command): Use a completion tracker
9142 along with completion_find_completion_word for handle_brkchars
9143 phase.
9144 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9145 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9146 (struct gdb_rl_completion_word_info): New.
9147 (gdb_rl_find_completion_word): New.
9148 (completion_find_completion_word): New.
9149 * completer.h (completion_find_completion_word): Declare.
9150
9151 2017-07-17 Pedro Alves <palves@redhat.com>
9152
9153 * ada-lang.c (symbol_completion_match): Adjust comments.
9154 (symbol_completion_add): Replace vector parameter with
9155 completion_tracker parameter. Use it.
9156 (ada_make_symbol_completion_list): Rename to...
9157 (ada_collect_symbol_completion_matches): ... this. Add
9158 completion_tracker parameter and use it.
9159 (ada_language_defn): Adjust.
9160 * break-catch-syscall.c (catch_syscall_completer): Adjust
9161 prototype and work with completion_tracker instead of VEC.
9162 * breakpoint.c (condition_completer): Adjust prototype and work
9163 with completion_tracker instead of VEC.
9164 * c-lang.c (c_language_defn, cplus_language_defn)
9165 (asm_language_defn, minimal_language_defn): Adjust to renames.
9166 * cli/cli-cmds.c (complete_command): Rework using
9167 completion_tracker. Catch exceptions when completing.
9168 * cli/cli-decode.c (integer_unlimited_completer)
9169 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9170 with completion_tracker instead of VEC.
9171 * command.h (struct completion_tracker): Forward declare.
9172 (completer_ftype, completer_handle_brkchars_ftype): Change
9173 types.
9174 (complete_on_cmdlist, complete_on_enum): Adjust.
9175 * completer.c: Include <algorithm>.
9176 (struct gdb_completer_state): New.
9177 (current_completion): New global.
9178 (readline_line_completion_function): Delete.
9179 (noop_completer, filename_completer)
9180 (filename_completer_handle_brkchars, complete_files_symbols)
9181 (linespec_location_completer): Adjust to work with a
9182 completion_tracker instead of a VEC.
9183 (string_or_empty): New.
9184 (collect_explicit_location_matches): Adjust to work with a
9185 completion_tracker instead of a VEC.
9186 (explicit_location_completer): Rename to ...
9187 (complete_explicit_location): ... this and adjust to work with a
9188 completion_tracker instead of a VEC.
9189 (location_completer): Adjust to work with a completion_tracker
9190 instead of a VEC.
9191 (add_struct_fields): Adjust to work with a completion_list instead
9192 of VEC.
9193 (expression_completer): Rename to ...
9194 (complete_expression): ... this and adjust to work with a
9195 completion_tracker instead of a VEC. Use complete_files_symbols.
9196 (expression_completer): Reimplement on top of complete_expression.
9197 (symbol_completer): Adjust to work with a completion_tracker
9198 instead of a VEC.
9199 (enum complete_line_internal_reason): Add describing comments.
9200 (complete_line_internal_normal_command): Adjust to work with a
9201 completion_tracker instead of a VEC.
9202 (complete_line_internal): Rename to ...
9203 (complete_line_internal_1): ... this and adjust to work with a
9204 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9205 handle_brkchars phase.
9206 (new_completion_tracker): Delete.
9207 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9208 complete_line_internal_1.
9209 (free_completion_tracker): Delete.
9210 (INITIAL_COMPLETION_HTAB_SIZE): New.
9211 (completion_tracker::completion_tracker)
9212 (completion_tracker::~completion_tracker): New.
9213 (maybe_add_completion): Delete.
9214 (completion_tracker::maybe_add_completion)
9215 (completion_tracker::add_completion)
9216 (completion_tracker::add_completions): New.
9217 (throw_max_completions_reached_error): Delete.
9218 (complete_line): Adjust to work with a completion_tracker instead
9219 of a VEC. Don't create a completion_tracker_t or check for max
9220 completions here.
9221 (command_completer, command_completer_handle_brkchars)
9222 (signal_completer, reg_or_group_completer_1)
9223 (reg_or_group_completer, default_completer_handle_brkchars):
9224 Adjust to work with a completion_tracker.
9225 (gdb_completion_word_break_characters_throw): New.
9226 (gdb_completion_word_break_characters): Reimplement.
9227 (line_completion_function): Delete.
9228 (completion_tracker::recompute_lowest_common_denominator)
9229 (expand_preserving_ws)
9230 (completion_tracker::build_completion_result)
9231 (completion_result::completion_result)
9232 (completion_result::completion_result)
9233 (completion_result::~completion_result)
9234 (completion_result::completion_result)
9235 (completion_result::release_match_list, compare_cstrings)
9236 (completion_result::sort_match_list)
9237 (completion_result::reset_match_list)
9238 (gdb_rl_attempted_completion_function_throw)
9239 (gdb_rl_attempted_completion_function): New.
9240 * completer.h (completion_list, struct completion_result)
9241 (class completion_tracker): New.
9242 (complete_line): Add completion_tracker parameter.
9243 (readline_line_completion_function): Delete.
9244 (gdb_rl_attempted_completion_function): New.
9245 (noop_completer, filename_completer, expression_completer)
9246 (location_completer, symbol_completer, command_completer)
9247 (signal_completer, reg_or_group_completer): Update prototypes.
9248 (completion_tracker_t, new_completion_tracker)
9249 (make_cleanup_free_completion_tracker): Delete.
9250 (enum maybe_add_completion_enum): Delete.
9251 (maybe_add_completion): Delete.
9252 (throw_max_completions_reached_error): Delete.
9253 * corefile.c (complete_set_gnutarget): Adjust to work with a
9254 completion_tracker instead of a VEC.
9255 * cp-abi.c (cp_abi_completer): Adjust to work with a
9256 completion_tracker instead of a VEC.
9257 * d-lang.c (d_language_defn): Adjust.
9258 * disasm.c (disassembler_options_completer): Adjust to work with a
9259 completion_tracker instead of a VEC.
9260 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9261 (f_collect_symbol_completion_matches): ... this. Adjust to work
9262 with a completion_tracker instead of a VEC.
9263 (f_language_defn): Adjust.
9264 * go-lang.c (go_language_defn): Adjust.
9265 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9266 Adjust to work with a completion_tracker instead of a VEC.
9267 * infrun.c (handle_completer): Likewise.
9268 * interps.c (interpreter_completer): Likewise.
9269 * interps.h (interpreter_completer): Likewise.
9270 * language.c (unknown_language_defn, auto_language_defn)
9271 (local_language_defn): Adjust.
9272 * language.h (language_defn::la_make_symbol_completion_list):
9273 Rename to ...
9274 (language_defn::la_collect_symbol_completion_matches): ... this
9275 and adjust to work with a completion_tracker instead of a VEC.
9276 * m2-lang.c (m2_language_defn): Adjust.
9277 * objc-lang.c (objc_language_defn): Adjust.
9278 * opencl-lang.c (opencl_language_defn): Adjust.
9279 * p-lang.c (pascal_language_defn): Adjust.
9280 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9281 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9282 with a completion_tracker.
9283 * rust-lang.c (rust_language_defn): Adjust.
9284 * symtab.c (free_completion_list, do_free_completion_list)
9285 (return_val, completion_tracker): Delete.
9286 (completion_list_add_name, completion_list_add_symbol)
9287 (completion_list_add_msymbol, completion_list_objc_symbol)
9288 (completion_list_add_fields, add_symtab_completions): Add
9289 completion_tracker parameter and use it.
9290 (default_make_symbol_completion_list_break_on_1): Rename to...
9291 (default_collect_symbol_completion_matches_break_on): ... this.
9292 Add completion_tracker parameter and use it instead of allocating
9293 a completion tracker here.
9294 (default_make_symbol_completion_list_break_on): Delete old
9295 implementation.
9296 (default_make_symbol_completion_list): Delete.
9297 (default_collect_symbol_completion_matches): New.
9298 (make_symbol_completion_list): Delete.
9299 (collect_symbol_completion_matches): New.
9300 (make_symbol_completion_type): Rename to ...
9301 (collect_symbol_completion_matches_type): ... this. Add
9302 completion_tracker parameter and use it instead of VEC.
9303 (make_file_symbol_completion_list_1): Rename to...
9304 (collect_file_symbol_completion_matches): ... this. Add
9305 completion_tracker parameter and use it instead of VEC.
9306 (make_file_symbol_completion_list): Delete.
9307 (add_filename_to_list): Use completion_list instead of a VEC.
9308 (add_partial_filename_data::list): Now a completion_list.
9309 (make_source_files_completion_list): Work with a completion_list
9310 instead of a VEC.
9311 * symtab.h: Include "completer.h".
9312 (default_make_symbol_completion_list_break_on)
9313 (default_make_symbol_completion_list, make_symbol_completion_list)
9314 (make_symbol_completion_type, make_file_symbol_completion_list)
9315 (make_source_files_completion_list): Delete.
9316 (default_collect_symbol_completion_matches_break_on)
9317 (default_collect_symbol_completion_matches)
9318 (collect_symbol_completion_matches)
9319 (collect_symbol_completion_matches_type)
9320 (collect_file_symbol_completion_matches)
9321 (make_source_files_completion_list): New.
9322 * top.c (init_main): Don't install a rl_completion_entry_function
9323 hook. Install a rl_attempted_completion_function hook instead.
9324 * tui/tui-layout.c (layout_completer): Adjust to work with a
9325 completion_tracker.
9326 * tui/tui-regs.c (tui_reggroup_completer):
9327 * tui/tui-win.c (window_name_completer, focus_completer)
9328 (winheight_completer): Adjust to work with a completion_tracker.
9329 * value.c: Include "completer.h".
9330 (complete_internalvar): Adjust to work with a completion_tracker.
9331 * value.h (complete_internalvar): Likewise.
9332
9333 2017-07-17 Pedro Alves <palves@redhat.com>
9334
9335 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9336 renames.
9337 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9338 comments to completer_ftype's declaration.
9339 <completer_handle_brkchars>: Change type to
9340 completer_handle_brkchars_ftype.
9341 * command.h (completer_ftype): Add describing comment and give
9342 names to parameters.
9343 (completer_ftype_void): Rename to ...
9344 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9345 (set_cmd_completer_handle_brkchars): Adjust.
9346 * completer.c (filename_completer_handle_brkchars): New function.
9347 (complete_line_internal_normal_command): New function, factored
9348 out from ...
9349 (complete_line_internal): ... here.
9350 (command_completer_handle_brkchars)
9351 (default_completer_handle_brkchars)
9352 (completer_handle_brkchars_func_for_completer): New functions.
9353 * completer.h (set_gdb_completion_word_break_characters): Delete
9354 declaration.
9355 (completer_handle_brkchars_func_for_completer): New declaration.
9356 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9357 completer_handle_brkchars_func_for_completer.
9358
9359 2017-07-17 Pedro Alves <palves@redhat.com>
9360
9361 * completer.c (symbol_completer): New function, based on
9362 make_symbol_completion_list_fn.
9363 * completer.h (symbol_completer): New declaration.
9364 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9365 * python/py-cmd.c (completers): Adjust.
9366 * symtab.c (make_symbol_completion_list_fn): Delete.
9367 * symtab.h (make_symbol_completion_list_fn): Delete.
9368 * cli/cli-decode.c (add_cmd): Adjust.
9369
9370 2017-07-17 Pedro Alves <palves@redhat.com>
9371
9372 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9373 * dwarf2read.c: Include "filename-seen-cache.h".
9374 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9375 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9376 * filename-seen-cache.c: New file.
9377 * filename-seen-cache.h: New file.
9378 * symtab.c: Include "filename-seen-cache.h".
9379 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9380 (create_filename_seen_cache, clear_filename_seen_cache)
9381 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9382 to filename-seen-cache.h/filename-seen-cache.c.
9383 (output_source_filename, sources_info)
9384 (maybe_add_partial_symtab_filename)
9385 (make_source_files_completion_list): Adjust to use
9386 filename_seen_cache.
9387
9388 2017-07-17 Pedro Alves <palves@redhat.com>
9389
9390 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9391 fields.
9392 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9393 dwarf2_debug_sections*)): New.
9394 (dwarf2_per_objfile::dwarf2_per_objfile(const
9395 dwarf2_per_objfile&)): Declare as deleted.
9396 (dwarf2_per_objfile::operator=): Declare as deleted.
9397 (dwarf2_per_objfile::dwarf2_per_objfile)
9398 (dwarf2_per_objfile::~dwarf2_per_objfile)
9399 (dwarf2_per_objfile::free_cached_comp_units): New.
9400 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9401 ctor. Call dwarf2_per_objfile's ctor manually.
9402 (dwarf2_locate_sections): Deleted/refactored as ...
9403 (dwarf2_per_objfile::locate_sections): ... this new method.
9404 (free_cached_comp_units): Defer to
9405 dwarf2_per_objfile::free_cached_comp_units.
9406 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9407
9408 2017-07-14 Tom Tromey <tom@tromey.com>
9409
9410 PR rust/21764:
9411 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9412 parameter.
9413 <UNOP_SIZEOF>: Split into separate case.
9414 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9415
9416 2017-07-14 Tom Tromey <tom@tromey.com>
9417
9418 PR rust/21763:
9419 * symtab.c (symbol_matches_domain): Add language_rust to special
9420 case.
9421 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9422 treat LOC_TYPEDEF symbols as variables.
9423
9424 2017-07-14 Pedro Alves <palves@redhat.com>
9425
9426 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9427 symtabs matching all symtabs with SRCFILE as file name instead of
9428 only considering the first hit, with lookup_symtab.
9429
9430 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9431
9432 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9433 operator_name parameters.
9434 (gen_expr): Update function call.
9435
9436 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9437
9438 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9439 parameter.
9440 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9441 Likewise.
9442 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9443 parameter, use agent_expr::gdbarch instead, update function
9444 calls.
9445 (locexpr_tracepoint_var_ref): Likewise.
9446 (loclist_tracepoint_var_ref): Likewise.
9447 * ax-gdb.c (gen_trace_static_fields): Likewise.
9448 (gen_traced_pop): Likewise.
9449 (gen_frame_args_address): Likewise.
9450 (gen_frame_locals_address): Likewise.
9451 (gen_var_ref): Likewise.
9452 (gen_struct_ref_recursive): Likewise.
9453 (gen_static_field): Likewise.
9454 (gen_maybe_namespace_elt): Likewise.
9455 (gen_expr): Likewise.
9456 (gen_trace_for_var): Likewise.
9457 (gen_trace_for_expr): Likewise.
9458 (gen_trace_for_return_address): Likewise.
9459
9460 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9461
9462 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9463 parameter.
9464 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9465
9466 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9467
9468 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9469 from ax, update calls.
9470 (gen_usual_arithmetic): Likewise.
9471 (gen_integral_promotions): Likewise.
9472 (gen_bitfield_ref): Likewise.
9473 (gen_primitive_field): Likewise.
9474 (gen_struct_ref_recursive): Likewise.
9475 (gen_struct_ref): Likewise.
9476 (gen_maybe_namespace_elt): Likewise.
9477 (gen_struct_elt_for_reference): Likewise.
9478 (gen_namespace_elt): Likewise.
9479 (gen_aggregate_elt_ref): Likewise.
9480 (gen_expr): Get gdbarch from ax, update calls.
9481 (gen_expr_binop_rest): Likewise.
9482
9483 2017-07-13 Pedro Alves <palves@redhat.com>
9484
9485 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9486 as default tdesc.
9487 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9488 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9489 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9490 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9491 tdep.
9492 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9493 Get final tdesc from the tdep.
9494 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9495 default tdesc.
9496 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9497 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9498 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9499 Use it as default tdesc.
9500 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9501 down to amd_init_abi. No longer handle fallback tdesc here.
9502 * amd64-tdep.h (tdesc_x32): Declare.
9503 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9504 parameter.
9505 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9506 as default tdesc.
9507
9508 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9509
9510 * s390-linux-tdep.c (s390_process_record): Add support for
9511 instructions new in arch12.
9512
9513 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9514
9515 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9516 PT_GETFSBASE and PT_GETGSBASE.
9517 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9518 PT_SETGSBASE.
9519
9520 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9521
9522 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9523 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9524 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9525 those rules.
9526 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9527 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9528 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9529 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9530 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9531 * features/i386/amd64.xml: Add 64bit-segments.xml.
9532 * features/i386/amd64-avx-avx512.c: Regenerated.
9533 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9534 * features/i386/amd64-avx-mpx.c: Regenerated.
9535 * features/i386/amd64-avx.c: Regenerated.
9536 * features/i386/amd64-mpx.c: Regenerated.
9537 * features/i386/amd64.c: Regenerated.
9538 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9539 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9540 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9541 * regformats/i386/amd64-avx.dat: Regenerated.
9542 * regformats/i386/amd64-mpx.dat: Regenerated.
9543 * regformats/i386/amd64.dat: Regenerated.
9544
9545 2017-07-10 Yao Qi <yao.qi@linaro.org>
9546
9547 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9548 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9549
9550 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9551
9552 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9553 unsetenv.
9554 * gnulib/aclocal.m4: Regenerate.
9555 * gnulib/config.in: Regenerate.
9556 * gnulib/configure: Regenerate.
9557 * gnulib/import/Makefile.am: Regenerate.
9558 * gnulib/import/Makefile.in: Regenerate.
9559 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9560 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9561 * gnulib/import/m4/environ.m4: New file.
9562 * gnulib/import/m4/setenv.m4: New file.
9563 * gnulib/import/setenv.c: New file.
9564 * gnulib/import/unsetenv.c: New file.
9565
9566 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9567
9568 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9569 address when op is DW_OP_addr.
9570
9571 2017-07-09 Tom Tromey <tom@tromey.com>
9572
9573 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9574 check and apply to outer type.
9575
9576 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9577
9578 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9579 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9580 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9581 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9582
9583 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9584
9585 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9586
9587 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9588
9589 * corelow.c (get_core_siginfo): Remove.
9590 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9591 instead of get_core_siginfo.
9592 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9593 * gdbarch.h: Re-generate.
9594 * gdbarch.c: Re-generate.
9595 * linux-tdep.c (linux_core_xfer_siginfo): New.
9596 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9597
9598 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9599
9600 * corelow.c (thread_section_name): Move to ...
9601 * gdbcore.h (thread_section_name): ... here.
9602
9603 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9604
9605 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9606 (struct siginfo32): New.
9607 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9608 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9609 via ptrace(PT_LWPINFO).
9610
9611 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9612
9613 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9614 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9615 (fbsd_get_siginfo_type): New.
9616 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9617 (_initialize_fbsd_tdep): New.
9618
9619 2017-07-06 David Blaikie <dblaikie@gmail.com>
9620
9621 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9622 a singular dwo_unit*) to support multiple CUs in the same way that
9623 multiple TUs are supported.
9624 (create_cus_hash_table): Replace create_dwo_cu with a function for
9625 parsing multiple CUs from a DWO file.
9626 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9627 create_dwo_cu.
9628 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9629 htab_find, rather than comparing the signature to a singleton CU in
9630 the dwo_file.
9631
9632 2017-07-06 Pedro Alves <palves@redhat.com>
9633
9634 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9635
9636 2017-07-04 Pedro Alves <palves@redhat.com>
9637
9638 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9639 * gdbtypes.h (TYPE_STATIC): Delete.
9640 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9641 is_synchronized, is_native>: Delete.
9642 <dummy>: Bump.
9643 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9644 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9645 (TYPE_FN_FIELD_ABSTRACT): Delete.
9646
9647 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9648
9649 * buffer.h (buffer_finish): Fix spelling mistakes.
9650
9651 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9652
9653 * .dir-locals.el: Automatically switch to C-style comments in
9654 versions of Emacs that support the feature.
9655
9656 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9657 Pedro Alves <palves@redhat.com>
9658
9659 PR cli/21688
9660 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9661 (process_next_line): New variable 'inline_cmd'.
9662 Adjust 'if' clauses for "python", "compile" and "guile" to use
9663 'command_name_equals' and check for '!inline_cmd'.
9664
9665 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9666
9667 PR cli/21688
9668 * cli/cli-script.c (command_name_equals_not_inline): New function.
9669 (process_next_line): Adjust 'if' clauses for "python", "compile"
9670 and "guile" to use command_name_equals_not_inline.
9671
9672 2017-06-29 Pedro Alves <palves@redhat.com>
9673
9674 * completer.c (expression_completer): Call
9675 linespec_location_completer instead of location_completer.
9676
9677 2017-06-29 Pedro Alves <palves@redhat.com>
9678
9679 * completer.c (expression_completer): Remove code that recomputes
9680 'text' from 'word'.
9681
9682 2017-06-29 Yao Qi <yao.qi@linaro.org>
9683
9684 * regformats/regdat.sh: Generate code with
9685 "ifndef IN_PROCESS_AGENT".
9686
9687 2017-06-28 Pedro Alves <palves@redhat.com>
9688
9689 * command.h: Include "common/scoped_restore.h".
9690
9691 2017-06-28 Yao Qi <yao.qi@linaro.org>
9692
9693 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9694 instead of obstack_grow.
9695
9696 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9697
9698 PR gdb/21337
9699 * symfile.c (reread_symbols): Call objfiles_changed just before
9700 read_symbols.
9701
9702 2017-06-27 Pedro Alves <palves@redhat.com>
9703
9704 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9705 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9706 (completion_list_add_symbol, completion_list_add_msymbol):
9707 ... these new functions.
9708 (add_symtab_completions)
9709 (default_make_symbol_completion_list_break_on_1): Adjust.
9710
9711 2017-06-27 Pedro Alves <palves@redhat.com>
9712
9713 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9714 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9715 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9716 dtor.
9717 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9718 'storage_obstack' field an auto_obstack. In-class initialize all
9719 non-bitfield fields. Make minsyms_read bool.
9720 * symfile.c (read_symbols): Adjust.
9721
9722 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9723
9724 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9725 (gdbsim_store_register): Likewise.
9726
9727 2017-06-27 Pedro Alves <palves@redhat.com>
9728
9729 * c-exp.y (name_obstack): Now an auto_obstack.
9730 (yylex): Use auto_obstack::clear.
9731 (c_parse): Use auto_obstack::clear instead of reinitializing and
9732 freeing the obstack.
9733 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9734 * d-exp.y (name_obstack): Now an auto_obstack.
9735 (yylex): Use auto_obstack::clear.
9736 (d_parse): Use auto_obstack::clear instead of reinitializing and
9737 freeing the obstack.
9738 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9739 auto_obstack.
9740 * dwarf2read.c (create_addrmap_from_index)
9741 (dwarf2_build_psymtabs_hard)
9742 (update_enumeration_type_from_children): Likewise.
9743 * gdb_obstack.h (auto_obstack): New type.
9744 * go-exp.y (name_obstack): Now an auto_obstack.
9745 (build_packaged_name): Use auto_obstack::clear.
9746 (go_parse): Use auto_obstack::clear instead of reinitializing and
9747 freeing the obstack.
9748 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9749 auto_obstack.
9750 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9751 * rust-exp.y (work_obstack): Now an auto_obstack.
9752 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9753 reinitializing and freeing the obstack.
9754 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9755 (host_char_to_target): Use auto_obstack.
9756 * utils.h (make_cleanup_obstack_free): Delete declaration.
9757 * valprint.c (generic_emit_char, generic_printstr): Use
9758 auto_obstack.
9759
9760 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9761
9762 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9763 thread.
9764 (darwin_init_thread_list): Don't update dummy thread.
9765 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9766
9767 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9768
9769 * record-full.c (netorder16): Remove.
9770
9771 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9772
9773 * common/diagnostics.h: Define macros for GCC.
9774 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9775 * common/vec.h: Include diagnostics.h.
9776 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9777 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9778 warning.
9779
9780 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9781
9782 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9783 New macro.
9784 * ada-lex.l: Ignore deprecated register warnings.
9785
9786 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9787
9788 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9789 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9790
9791 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9792
9793 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9794 its own line.
9795
9796 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9797
9798 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9799
9800 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9801
9802 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9803 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9804 (xtensa_register_read_masked): Likewise.
9805
9806 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9807
9808 * common/environ.c (gdb_environ::unset): Update comment.
9809
9810 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9811
9812 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9813 registers.
9814
9815 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9816
9817 * record-full.c (record_full_exec_insn): Use byte_vector.
9818
9819 2017-06-22 Yao Qi <yao.qi@linaro.org>
9820
9821 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9822 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9823
9824 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9825
9826 * remote.c (cached_reg): Move from here...
9827 * regcache.h (cached_reg): ...to here.
9828 * python/py-unwind.c (struct reg_info): Remove.
9829 (cached_frame_info): Use cached_reg_t.
9830 (pyuw_prev_register): Likewise.
9831 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9832 (pyuw_dealloc_cache): Free all registers.
9833
9834 2017-06-22 Pedro Alves <palves@redhat.com>
9835 Simon Marchi <simon.marchi@ericsson.com>
9836
9837 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9838 warning.
9839 * common/diagnostics.h: New file.
9840
9841 2017-06-22 Pedro Alves <palves@redhat.com>
9842
9843 * common/agent.h: Add include guards.
9844
9845 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9846
9847 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9848 talk about addressable units instead of bytes.
9849
9850 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9851
9852 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9853 of '::const_iterator'.
9854
9855 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9856
9857 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9858 'unittests/environ-selftests.c'.
9859 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9860 * charset.c (find_charset_names): Declare object 'iconv_env'.
9861 Update code to use 'iconv_env' object. Remove call to
9862 'free_environ'.
9863 * common/environ.c: Include <utility>.
9864 (make_environ): Delete function.
9865 (free_environ): Delete function.
9866 (gdb_environ::clear): New function.
9867 (gdb_environ::operator=): New function.
9868 (gdb_environ::get): Likewise.
9869 (environ_vector): Delete function.
9870 (set_in_environ): Delete function.
9871 (gdb_environ::set): New function.
9872 (unset_in_environ): Delete function.
9873 (gdb_environ::unset): New function.
9874 (gdb_environ::envp): Likewise.
9875 * common/environ.h: Include <vector>.
9876 (struct gdb_environ): Delete; transform into...
9877 (class gdb_environ): ... this class.
9878 (free_environ): Delete prototype.
9879 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9880 environ_vector): Likewise.
9881 * infcmd.c (run_command_1): Update code to call
9882 'envp' from 'gdb_environ' class.
9883 (environment_info): Update code to call methods from 'gdb_environ'
9884 class.
9885 (unset_environment_command): Likewise.
9886 (path_info): Likewise.
9887 (path_command): Likewise.
9888 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9889 (inferior::inferior): Initialize 'environment' using the host's
9890 information.
9891 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9892 Include "environ.h".
9893 (class inferior) <environment>: Change type from 'struct
9894 gdb_environ' to 'gdb_environ'.
9895 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9896 methods from 'gdb_environ' class.
9897 * solib.c (solib_find_1): Likewise
9898 * unittests/environ-selftests.c: New file.
9899
9900 2017-06-20 Yao Qi <yao.qi@linaro.org>
9901
9902 * features/i386/i386-linux.xml: Exchange the order of including
9903 32bit-linux.xml and 32bit-sse.xml.
9904 * features/i386/i386-linux.c: Regenerated.
9905
9906 2017-06-20 Yao Qi <yao.qi@linaro.org>
9907
9908 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9909 Delete copy ctor and assignment operator.
9910 (tdesc_type): Likewise.
9911 (tdesc_feature): Likewise.
9912 (tdesc_free_reg): Remove.
9913 (tdesc_create_reg): Use new.
9914 (tdesc_free_type): Remove.
9915 (tdesc_create_vector): Use new.
9916 (tdesc_create_union): Likewise.
9917 (tdesc_create_flags): Likewise.
9918 (tdesc_create_enum): Likewise.
9919 (tdesc_free_feature): Delete.
9920 (free_target_description): Use delete.
9921
9922 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9923
9924 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9925 registers.
9926
9927 2017-06-19 Pedro Alves <palves@redhat.com>
9928
9929 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9930 after gdb::unlinker.
9931
9932 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9933
9934 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9935 gdb_environ to access an environment variable.
9936
9937 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9938
9939 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9940 gdb_byte*.
9941
9942 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9943
9944 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9945
9946 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9947
9948 * configure: Re-generate.
9949 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9950
9951 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9952
9953 * configure: Re-generate.
9954 * warning.m4: Pass -Werror to compiler when checking for
9955 supported warning flags.
9956
9957 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9958
9959 * Makefile.in (COMPILE.pre): Add "-x c++".
9960
9961 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9962 Pedro Alves <palves@redhat.com>
9963 Yao Qi <yao.qi@linaro.org>
9964
9965 * defs.h (RequireLongest): New.
9966 (extract_integer): Declare function template.
9967 (extract_signed_integer): Remove the declaration, but define it
9968 static inline.
9969 (extract_unsigned_integer): Likewise.
9970 (store_integer): Declare function template.
9971 (store_signed_integer): Remove the declaration, but define it
9972 static inline.
9973 (store_unsigned_integer): Likewise.
9974 * findvar.c (extract_integer): New function template.
9975 (extract_signed_integer): Remove.
9976 (extract_unsigned_integer): Remove.
9977 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9978 instantiations.
9979 (store_integer): New function template.
9980 (store_signed_integer): Remove.
9981 (store_unsigned_integer): Remove.
9982 (store_integer): Explicit instantiations.
9983 * regcache.c (regcache_raw_read_signed): Update.
9984 (regcache::raw_read): New function.
9985 (regcache::raw_read_signed): Remove.
9986 (regcache::raw_read_unsigned): Remove.
9987 (regcache_raw_read_unsigned): Update.
9988 (regcache_raw_write_unsigned): Update.
9989 (regcache::raw_write_signed): Remove.
9990 (regcache::raw_write): New function.
9991 (regcache_cooked_read_signed): Update.
9992 (regcache::raw_write_unsigned): Remove.
9993 (regcache::cooked_read_signed): Remove.
9994 (regcache_cooked_read_unsigned): Update.
9995 (regcache::cooked_read_unsigned): Remove.
9996 (regcache_cooked_write_signed): Update.
9997 (regcache_cooked_write_unsigned): Update.
9998 * regcache.h (regcache) <raw_read_signed>: Remove.
9999 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10000 <raw_read, raw_write>: New.
10001 <cooked_read_signed, cooked_write_signed>: Remove.
10002 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10003 <cooked_read, cooked_write>: New.
10004 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10005 (sh64_pseudo_register_write): Update.
10006
10007 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10008
10009 * arc-tdep.c (arc_disassembler_options): New variable.
10010 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10011 of default_print_insn.
10012 (arc_delayed_print_insn): Set info->section when needed,
10013 use default_print_insn to retrieve a disassembler.
10014
10015 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10016
10017 PR gdb/21574
10018 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10019 to mention $SHELL and startup-with-shell.
10020
10021 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10022
10023 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10024
10025 2017-06-14 Yao Qi <yao.qi@linaro.org>
10026
10027 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10028 default_print_insn instead of print_insn_aarch64.
10029 * arm-tdep.c (gdb_print_insn_arm): Call
10030 default_print_insn instead of print_insn_big_arm
10031 and print_insn_little_arm.
10032 * i386-tdep.c (i386_print_insn): Call default_print_insn
10033 instead of print_insn_i386.
10034 * ia64-tdep.c (ia64_print_insn): Call
10035 default_print_insn instead of print_insn_ia64.
10036 * mips-tdep.c (gdb_print_insn_mips): Call
10037 default_print_insn instead of print_insn_big_mips
10038 and print_insn_little_mips.
10039 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10040 instead of print_insn_spu.
10041
10042 2017-06-14 Pedro Alves <palves@redhat.com>
10043
10044 * ada-lang.c: Include "common/byte-vector.h".
10045 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10046 * charset.c (wchar_iterator::iterate): Resize the vector instead
10047 of reserving it.
10048 * common/byte-vector.h: Include "common/def-vector.h".
10049 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10050 * cli/cli-dump.c: Include "common/byte-vector.h".
10051 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10052 * common/byte-vector.h: New file.
10053 * common/def-vector.h: New file.
10054 * common/default-init-alloc.h: New file.
10055 * dwarf2loc.c: Include "common/byte-vector.h".
10056 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10057 instead of reserving it.
10058 * dwarf2read.c: Include "common/byte-vector.h".
10059 (data_buf::m_vec): Now a gdb::byte_vector.
10060 * gdb_regex.c: Include "common/def-vector.h".
10061 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10062 * mi/mi-main.c: Include "common/byte-vector.h".
10063 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10064 * printcmd.c: Include "common/byte-vector.h".
10065 (print_scalar_formatted): Use gdb::byte_vector.
10066 * valprint.c: Include "common/byte-vector.h".
10067 (maybe_negate_by_bytes, print_decimal_chars): Use
10068 gdb::byte_vector.
10069
10070 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10071
10072 * darwin-nat.c: Include "nat/fork-inferior.h".
10073
10074 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10075
10076 * configure.nat: Factor out Darwin bits that are not
10077 architecture-specific. Add fork-inferior.o.
10078
10079 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10080
10081 * configure.nat: Factor out AIX bits that are not
10082 architecture-specific. Add fork-inferior.o.
10083
10084 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10085
10086 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10087 (read_pieced_value, write_pieced_value): ...here. Reduce to
10088 wrappers that just call rw_pieced_value.
10089
10090 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10091
10092 * dwarf2loc.c (write_pieced_value): When writing the data for a
10093 memory piece, use write_memory_with_notification instead of
10094 write_memory.
10095
10096 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10097
10098 * valops.c (read_value_memory): Change embedded_offset to
10099 represent a bit offset instead of a byte offset.
10100 * value.h (read_value_memory): Adjust comment.
10101
10102 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10103
10104 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10105 dest_offset_bits and source_offset_bits.
10106 (write_pieced_value): Likewise.
10107
10108 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10109
10110 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10111 given by DW_OP_bit_piece.
10112 (write_pieced_value): Likewise.
10113
10114 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10115
10116 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10117 some other preparations to the places where sufficient information
10118 is available.
10119 (write_pieced_value): Likewise.
10120
10121 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10122
10123 * dwarf2loc.c (bits_to_bytes): New function.
10124 (read_pieced_value): Fix offset calculations for register pieces
10125 on big-endian targets.
10126 (write_pieced_value): Likewise.
10127
10128 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10129
10130 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10131 (write_pieced_value): Likewise.
10132
10133 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10134
10135 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10136 transfer the source value's least significant bits, instead of its
10137 lowest-addressed ones. Rename type_len to max_offset.
10138 (read_pieced_value): Mirror above changes to write_pieced_value as
10139 applicable.
10140
10141 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10142
10143 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10144 truncate full bytes from dest_offset_bits before using it as an
10145 offset into the buffer.
10146
10147 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10148
10149 * dwarf2loc.c (write_pieced_value): Include transfer size in
10150 byte-wise check.
10151
10152 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10153
10154 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10155 calculation of this_size.
10156
10157 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10158
10159 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10160 when targeting a bit-field.
10161 (write_pieced_value): Likewise.
10162
10163 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10164
10165 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10166 (allocate_piece_closure): Drop addr_size parameter.
10167 (dwarf2_evaluate_loc_desc_full): Adjust call to
10168 allocate_piece_closure.
10169
10170 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10171
10172 PR gdb/21226
10173 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10174 the LSB end, independent of endianness.
10175
10176 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10177
10178 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10179 size capping.
10180
10181 2017-06-13 Yao Qi <yao.qi@linaro.org>
10182
10183 * mips-linux-nat.c: Move include features/mips*-linux.c to
10184 mips-linux-tdep.c.
10185 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10186 to mips-linux-tdep.c.
10187 * mips-linux-tdep.c: Include features/mips*-linux.c
10188 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10189 functions.
10190 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10191 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10192 (tdesc_mips64_dsp_linux): Declare.
10193
10194 2017-06-12 Tom Tromey <tom@tromey.com>
10195
10196 * valprint.h (val_print_type_code_int): Remove.
10197 * valprint.c (generic_val_print_int): Always call
10198 val_print_scalar_formatted.
10199 (val_print_type_code_int): Remove.
10200 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10201 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10202 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10203 * ada-valprint.c (ada_val_print_num): Use
10204 val_print_scalar_formatted.
10205
10206 2017-06-12 Tom Tromey <tom@tromey.com>
10207
10208 * printcmd.c (print_scalar_formatted): Unify the two switches.
10209 Don't convert scalars to LONGEST.
10210
10211 2017-06-12 Tom Tromey <tom@tromey.com>
10212
10213 PR exp/16225:
10214 * valprint.h (print_decimal_chars): Update.
10215 * valprint.c (maybe_negate_by_bytes): New function.
10216 (print_decimal_chars): Add "is_signed" argument.
10217 * printcmd.c (print_scalar_formatted): Update.
10218
10219 2017-06-12 Tom Tromey <tom@tromey.com>
10220
10221 PR exp/16225:
10222 * valprint.h (print_binary_chars, print_hex_chars): Update.
10223 * valprint.c (val_print_type_code_int): Update.
10224 (print_binary_chars): Add "zero_pad" argument.
10225 (emit_octal_digit): New function.
10226 (print_octal_chars): Don't zero-pad.
10227 (print_decimal_chars): Likewise.
10228 (print_hex_chars): Add "zero_pad" argument.
10229 * sh64-tdep.c (sh64_do_fp_register): Update.
10230 * regcache.c (regcache::dump): Update.
10231 * printcmd.c (print_scalar_formatted): Update.
10232 * infcmd.c (default_print_one_register_info): Update.
10233
10234 2017-06-12 Pedro Alves <palves@redhat.com>
10235 Alan Hayward <alan.hayward@arm.com>
10236
10237 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10238 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10239 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10240 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10241 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10242
10243 2017-06-12 Pedro Alves <palves@redhat.com>
10244
10245 * dwarf2read.c (mapped_symtab::data): Now a vector of
10246 symtab_index_entry instead of vector of
10247 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10248 whether an element's name is NULL instead of checking whether the
10249 element itself is NULL.
10250 (find_slot): Change return type. Adjust.
10251 (hash_expand, , add_index_entry, uniquify_cu_indices)
10252 (write_hash_table): Adjust.
10253
10254 2017-06-12 Pedro Alves <palves@redhat.com>
10255
10256 * dwarf2read.c (recursively_count_psymbols): New function.
10257 (write_psymtabs_to_index): Call it to compute number of psyms and
10258 pass estimate size of psyms_seen to unordered_set's ctor.
10259
10260 2017-06-12 Pedro Alves <palves@redhat.com>
10261
10262 * dwarf2read.c (write_hash_table): Check if key already exists
10263 before emplacing.
10264
10265 2017-06-12 Pedro Alves <palves@redhat.com>
10266
10267 * dwarf2read.c (data_buf::append_space): Rename to...
10268 (data_buf::grow): ... this, and make private. Adjust all callers.
10269 (data_buf::append_uint): New method.
10270 (add_address_entry, write_one_signatured_type)
10271 (write_psymtabs_to_index): Use it.
10272
10273 2017-06-12 Pedro Alves <palves@redhat.com>
10274
10275 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10276 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10277 (data_buf::file_write): Call ::fwrite directly.
10278
10279 2017-06-12 Pedro Alves <palves@redhat.com>
10280
10281 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10282 std::vector::erase.
10283
10284 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10285
10286 Code cleanup: C++ify .gdb_index producer.
10287 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10288 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10289 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10290 (create_strtab, add_string): Remove.
10291 (file_write, data_buf): New.
10292 (struct symtab_index_entry): Use std::vector for cu_indices.
10293 (struct mapped_symtab): Use std::vector for data.
10294 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10295 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10296 Remove.
10297 (find_slot): Change return type. Update it to the new data structures.
10298 (hash_expand, add_index_entry): Update it to the new data structures.
10299 (offset_type_compare): Remove.
10300 (uniquify_cu_indices): Update it to the new data structures.
10301 (c_str_view, c_str_view_hasher, vector_hasher): New.
10302 (add_indices_to_cpool): Remove.
10303 (write_hash_table): Update it to the new data structures.
10304 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10305 (eq_psymtab_cu_index): Remove.
10306 (psym_index_map): New typedef.
10307 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10308 reference and std::unordered_map for cu_index_htab.
10309 (add_address_entry, add_address_entry_worker, write_address_map)
10310 (write_psymbols): Update it to the new data structures.
10311 (write_obstack): Remove.
10312 (struct signatured_type_index_data): Change types_list to a data_buf
10313 reference and psyms_seen to a std::unordered_set reference.
10314 (write_one_signatured_type, recursively_write_psymbols)
10315 (write_psymtabs_to_index): Update it to the new data structures.
10316
10317 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10318
10319 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10320 separate-debug-file commands.
10321 * symfile.h (separate_debug_file_debug): New global.
10322 * symfile.c (separate_debug_file_debug): New global.
10323 (separate_debug_file_exists, find_separate_debug_file): Add
10324 debug output.
10325 (_initialize_symfile): Add "set debug separate-debug-file"
10326 command.
10327 * build-id.c (build_id_to_debug_bfd,
10328 find_separate_debug_file_by_buildid): Add debug output.
10329
10330 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10331
10332 * gdbarch.sh (displaced_step_free_closure): Remove.
10333 * gdbarch.h, gdbarch.c: Re-generate.
10334 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10335 displaced_step_free_closure.
10336 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10337 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10338 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10339 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10340 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10341 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10342 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10343 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10344 * infrun.c (displaced_step_clear): Call xfree instead of
10345 gdbarch_displaced_step_free_closure.
10346
10347 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10348
10349 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10350 NULL".
10351
10352 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10353
10354 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10355 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10356 (mn10300_push_dummy_call): Likewise.
10357
10358 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10359
10360 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10361
10362 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10363
10364 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10365
10366 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10367
10368 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10369 able to start inferiors using a shell.
10370 (New remote packets): Announce new packet "QStartupWithShell".
10371 * remote.c: Add PACKET_QStartupWithShell.
10372 (extended_remote_create_inferior): Handle new
10373 PACKET_QStartupWithShell.
10374 (remote_protocol_features) <QStartupWithShell>: New entry for
10375 PACKET_QStartupWithShell.
10376 (_initialize_remote): Call "add_packet_config_cmd" for
10377 QStartupShell.
10378
10379 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10380 Pedro Alves <palves@redhat.com>
10381
10382 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10383 and "nat/fork-inferior.h".
10384 * common/common-inferior.h: New file, with contents from
10385 "gdb/inferior.h".
10386 * commom/common-utils.c: Include "common-utils.h".
10387 (stringify_argv): New function.
10388 * common/common-utils.h (stringify_argv): New prototype.
10389 * configure.nat: Add "fork-inferior.o" as a dependency for
10390 "*linux*", "fbsd*" and "nbsd*" hosts.
10391 * corefile.c (get_exec_file): Update comment.
10392 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10393 instead of "startup_inferior".
10394 (darwin_create_inferior): Call "add_thread_silent" after
10395 "fork_inferior".
10396 * fork-child.c: Cleanup unnecessary includes.
10397 (SHELL_FILE): Move to "common/common-fork-child.c".
10398 (environ): Likewise.
10399 (exec_wrapper): Initialize.
10400 (get_exec_wrapper): New function.
10401 (breakup_args): Move to "common/common-fork-child.c"; rename to
10402 "breakup_args_for_exec".
10403 (escape_bang_in_quoted_argument): Move to
10404 "common/common-fork-child.c".
10405 (saved_ui): New variable.
10406 (prefork_hook): New function.
10407 (postfork_hook): Likewise.
10408 (postfork_child_hook): Likewise.
10409 (gdb_startup_inferior): Likewise.
10410 (fork_inferior): Move to "common/common-fork-child.c". Update
10411 function to support gdbserver.
10412 (startup_inferior): Likewise.
10413 * gdbcore.h (get_exec_file): Remove declaration.
10414 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10415 instead of "startup_inferior". Call "add_thread_silent" after
10416 "fork_inferior".
10417 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10418 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10419 instead of "startup_inferior". Call "add_thread_silent" after
10420 "fork_inferior".
10421 * inferior.h: Include "common-inferior.h".
10422 (trace_start_error): Move to "common/common-utils.h".
10423 (trace_start_error_with_name): Likewise.
10424 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10425 (startup_inferior): Likewise.
10426 (gdb_startup_inferior): New prototype.
10427 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10428 * nat/fork-inferior.h: New file.
10429 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10430 instead of "startup_inferior". Call "add_thread_silent" after
10431 "fork_inferior".
10432 * target.h (target_terminal_init): Move prototype to
10433 "target/target.h".
10434 (target_terminal_inferior): Likewise.
10435 (target_terminal_ours): Likewise.
10436 * target/target.h (target_terminal_init): New prototype, moved
10437 from "target.h".
10438 (target_terminal_inferior): Likewise.
10439 (target_terminal_ours): Likewise.
10440 * utils.c (gdb_flush_out_err): New function.
10441
10442 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10443
10444 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10445 * common/common-gdbthread.h: New file, with parts from
10446 "gdb/gdbthread.h".
10447 * gdbthread.h: Include "common-gdbthread.h".
10448 (switch_to_thread): Moved to "common/common-gdbthread.h".
10449
10450 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10451
10452 * Makefile.in (SFILES): Add "common/job-control.c".
10453 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10454 (COMMON_OBS): Add "job-control.o".
10455 * common/job-control.c: New file, with contents from
10456 "gdb/inflow.c".
10457 * common/job-control.h: New file, with contents from "terminal.h".
10458 * fork-child.c: Include "job-control.h".
10459 * inflow.c: Include "job-control.h".
10460 (gdb_setpgid): Move to "common/common-inflow.c".
10461 (_initialize_inflow): Move setting of "job_control" to
10462 "handle_job_control".
10463 * terminal.h (job_control): Moved to "common/common-terminal.h".
10464 (gdb_setpgid): Likewise.
10465 * top.c: Include "job_control.h".
10466 * utils.c: Likewise.
10467 (job_control): Moved to "job-control.c".
10468
10469 2017-06-07 Pedro Alves <palves@redhat.com>
10470
10471 * Makefile.in (SFILES): Add gdb_regex.c.
10472 (COMMON_OBS): Add gdb_regex.o.
10473 * ada-lang.c (ada_add_standard_exceptions)
10474 (ada_add_exceptions_from_frame, name_matches_regex)
10475 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10476 parameter type to compiled_regex. Adjust.
10477 (ada_exceptions_list): Use compiled_regex.
10478 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10479 std::unique_ptr<compiled_regex>.
10480 (exception_catchpoint::~exception_catchpoint): Remove regfree
10481 call.
10482 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10483 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10484 * breakpoint.c (solib_catchpoint::compiled): Now a
10485 std::unique_ptr<compiled_regex>.
10486 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10487 (check_status_catch_solib): Adjust to use compiled_regex.
10488 (add_solib_catchpoint): Adjust to use compiled_regex.
10489 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10490 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10491 compiled_regex reference. Adjust to use it.
10492 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10493 declaration. Include "gdb_regex.h".
10494 (apropos_cmd): Change regex parameter to compiled_regex reference.
10495 * gdb_regex.c: New file.
10496 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10497 declarations.
10498 (class compiled_regex): New.
10499 * linux-tdep.c: Include "common/gdb_optional.h".
10500 (struct mapping_regexes): New, factored out from
10501 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10502 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10503 gdb::optional and remove cleanups. Adjust to compiled_regex.
10504 * probe.c: Include "common/gdb_optional.h".
10505 (collect_probes): Use compiled_regex and gdb::optional and remove
10506 cleanups.
10507 * skip.c: Include "common/gdb_optional.h".
10508 (skiplist_entry::compiled_function_regexp): Now a
10509 gdb::optional<compiled_regex>.
10510 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10511 (free_skiplist_entry): Remove regfree call.
10512 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10513 compiled_regex and gdb::optional.
10514 * symtab.c: Include "common/gdb_optional.h".
10515 (search_symbols): Use compiled_regex and gdb::optional.
10516 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10517 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10518 to gdb_regex.c.
10519
10520 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10521
10522 * regcache.c (regcache::save): Avoid buffer use.
10523 (regcache::dump): Likewise.
10524
10525 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10526
10527 * sh-tdep.c (sh_pseudo_register_read): Remove
10528 MAX_REGISTER_SIZE.
10529 (sh_pseudo_register_write): Likewise.
10530 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10531 (sh64_pseudo_register_write): Likewise
10532
10533 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10534
10535 * aarch64-tdep.c (aarch64_store_return_value): Use
10536 V_REGISTER_SIZE.
10537 (aarch64_pseudo_read_value): Likewise.
10538 (aarch64_pseudo_write): Likewise.
10539
10540 2017-06-06 Yao Qi <yao.qi@linaro.org>
10541
10542 * regformats/regdef.h (set_register_cache): Remove the
10543 declaration.
10544
10545 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10546
10547 * frame.c (frame_unwind_register_signed): Use
10548 frame_unwind_register_value.
10549
10550 2017-06-06 Pedro Alves <palves@redhat.com>
10551
10552 PR breakpoints/21553
10553 * breakpoint.c (create_breakpoints_sal_default)
10554 (init_breakpoint_sal, create_breakpoint_sal): Use
10555 gdb::unique_xmalloc_ptr for string parameters.
10556 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10557 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10558 (base_breakpoint_create_breakpoints_sal)
10559 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10560 (strace_marker_create_breakpoints_sal)
10561 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10562 string parameters.
10563 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10564 gdb::unique_xmalloc_ptr for string parameters.
10565 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10566 parameters.
10567
10568 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10569
10570 * alpha-tdep.c (alpha_register_to_value): Use
10571 get_frame_register_value.
10572 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10573
10574 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10575
10576 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10577 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10578 (ia64_value_to_register): Likewise.
10579 (ia64_extract_return_value): Likewise.
10580 (ia64_store_return_value): Likewise.
10581 (ia64_push_dummy_call): Likewise.
10582
10583 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10584
10585 GDB 8.0 released.
10586
10587 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10588
10589 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10590
10591 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10592
10593 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10594 parameter.
10595 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10596
10597 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10598
10599 * event-loop.c (poll_timers): Unallocate timer using delete
10600 instead of xfree.
10601
10602 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10603
10604 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10605 (struct breakpoint) <~breakpoint>: New.
10606 (struct watchpoint): Inherit from breakpoint.
10607 <~watchpoint>: New.
10608 <base>: Remove.
10609 (struct tracepoint): Inherit from breakpoint.
10610 <base>: Remove.
10611 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10612 (struct longjmp_breakpoint): Inherit from breakpoint.
10613 <~longjmp_breakpoint>: New.
10614 <base>: Remove.
10615 (new_breakpoint_from_type): Remove casts.
10616 (watchpoint_in_thread_scope): Remove reference to base field.
10617 (watchpoint_del_at_next_stop): Likewise.
10618 (update_watchpoint): Likewise.
10619 (watchpoint_check): Likewise.
10620 (bpstat_check_watchpoint): Likewise.
10621 (set_longjmp_breakpoint): Likewise.
10622 (struct fork_catchpoint): Inherit from breakpoint.
10623 <base>: Remove.
10624 (struct solib_catchpoint): Inherit from breakpoint.
10625 <~solib_catchpoint>: New.
10626 <base>: Remove.
10627 (dtor_catch_solib): Change to ...
10628 (solib_catchpoint::~solib_catchpoint): ... this.
10629 (breakpoint_hit_catch_solib): Remove reference to base field.
10630 (add_solib_catchpoint): Likewise.
10631 (create_fork_vfork_event_catchpoint): Likewise.
10632 (struct exec_catchpoint): Inherit from breakpoint.
10633 <~exec_catchpoint>: New.
10634 <base>: Remove.
10635 (dtor_catch_exec): Change to ...
10636 (exec_catchpoint::~exec_catchpoint): ... this.
10637 (dtor_watchpoint): Change to ...
10638 (watchpoint::~watchpoint): ... this.
10639 (watch_command_1): Remove reference to base field.
10640 (catch_exec_command_1): Likewise.
10641 (base_breakpoint_dtor): Change to ...
10642 (breakpoint::~breakpoint): ... this.
10643 (base_breakpoint_ops): Remove dtor field value.
10644 (longjmp_bkpt_dtor): Change to ...
10645 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10646 (strace_marker_create_breakpoints_sal): Remove reference to base
10647 field.
10648 (delete_breakpoint): Don't manually call breakpoint destructor.
10649 (create_tracepoint_from_upload): Remove reference to base field.
10650 (trace_pass_set_count): Likewise.
10651 (initialize_breakpoint_ops): Don't initialize
10652 momentary_breakpoint_ops, don't set dtors.
10653 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10654 <~ada_catchpoint>: New.
10655 <base>: Remove.
10656 (create_excep_cond_exprs): Remove reference to base field.
10657 (dtor_exception): Change to ...
10658 (ada_catchpoint::~ada_catchpoint): ... this.
10659 (dtor_catch_exception): Remove.
10660 (dtor_catch_exception_unhandled): Remove.
10661 (dtor_catch_assert): Remove.
10662 (create_ada_exception_catchpoint): Remove reference to base
10663 field.
10664 (initialize_ada_catchpoint_ops): Don't set dtors.
10665 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10666 breakpoint.
10667 <~signal_catchpoint>: New.
10668 <base>: Remove.
10669 (signal_catchpoint_dtor): Change to ...
10670 (signal_catchpoint::~signal_catchpoint): ... this.
10671 (create_signal_catchpoint): Remove reference to base field.
10672 (initialize_signal_catchpoint_ops): Don't set dtor.
10673 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10674 from breakpoint.
10675 <~syscall_catchpoint>: New.
10676 <base>: Remove.
10677 (dtor_catch_syscall): Change to ...
10678 (syscall_catchpoint::~syscall_catchpoint): ... this.
10679 (create_syscall_event_catchpoint): Remove reference to base
10680 field.
10681 (initialize_syscall_catchpoint_ops): Don't set dtor.
10682 * break-catch-throw.c (struct exception_catchpoint): Inherit
10683 from breakpoint.
10684 <~exception_catchpoint>: New.
10685 <base>: Remove.
10686 (dtor_exception_catchpoint): Change to ...
10687 (exception_catchpoint::~exception_catchpoint): ... this.
10688 (handle_gnu_v3_exceptions): Remove reference to base field.
10689 (initialize_throw_catchpoint_ops): Don't set dtor.
10690 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10691 field.
10692 * remote.c (remote_get_tracepoint_status): Likewise.
10693 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10694 * tracefile.c (tracefile_fetch_registers): Likewise.
10695 * tracepoint.c (actions_command): Likewise.
10696 (validate_actionline): Likewise.
10697 (tfind_1): Likewise.
10698 (get_traceframe_location): Likewise.
10699 (find_matching_tracepoint_location): Likewise.
10700 (parse_tracepoint_status): Likewise.
10701 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10702
10703 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10704
10705 * breakpoint.c (struct longjmp_breakpoint): New struct.
10706 (is_tracepoint_type): Change return type to bool.
10707 (is_longjmp_type): New function.
10708 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10709 (set_raw_breakpoint_without_location): Use
10710 new_breakpoint_from_type.
10711 (set_raw_breakpoint): Likewise.
10712
10713 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10714
10715 * breakpoint.c (new_breakpoint_from_type): New function.
10716 (create_breakpoint_sal): Use new_breakpoint_from_type and
10717 unique_ptr.
10718 (create_breakpoint): Likewise.
10719
10720 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10721
10722 * memattr.c (mem_info_command): Rename to ...
10723 (info_mem_command): ... this.
10724 (mem_enable_command): Rename to ...
10725 (enable_mem_command): ... this.
10726 (mem_disable_command): Rename to ...
10727 (disable_mem_command): ... this.
10728 (mem_delete_command): Rename to ...
10729 (delete_mem_command): ... this.
10730 (_initialize_mem): Adjust function names.
10731
10732 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10733
10734 * btrace.c (handle_pt_insn_events): New.
10735 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10736 STATUS. Split into this and ...
10737 (handle_pt_insn_event_flags): ... this.
10738
10739 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10740
10741 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10742 and struct pt_insn.resynced.
10743 * configure: Regenerated.
10744 * config.in: Regenerated.
10745
10746 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10747
10748 * btrace.c (ftrace_find_call_by_number): New function.
10749 (ftrace_new_function): Store objects, not pointers.
10750 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10751 ftrace_new_gap, ftrace_update_function,
10752 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10753 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10754 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10755 btrace_ends_with_single_insn, btrace_call_get): Account for
10756 btrace_thread_info::functions now storing objects.
10757 * btrace.h (struct btrace_thread_info): Add constructor.
10758 (struct btrace_thread_info) <functions>: Make std::vector.
10759 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10760 Initialize with default values.
10761 * record-btrace.c (record_btrace_frame_sniffer): Account for
10762 btrace_thread_info::functions now storing objects.
10763
10764 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10765
10766 * btrace.c: Remove typedef bfun_s.
10767 (ftrace_new_gap): Directly add gaps to the list of gaps.
10768 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10769 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10770 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10771 instead of gdb VEC.
10772
10773 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10774
10775 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10776 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10777 with btrace_thread_info::next_segment and
10778 btrace_thread_info::prev_segment.
10779 * btrace.h: Remove struct btrace_func_link.
10780 (struct btrace_function): Replace pair of function segment pointers
10781 with pair of indices.
10782 * python/py-record-btrace.c (btpy_call_prev_sibling,
10783 btpy_call_next_sibling): Replace references to
10784 btrace_thread_info::segment with btrace_thread_info::next_segment and
10785 btrace_thread_info::prev_segment.
10786 * record-btrace.c (record_btrace_frame_this_id): Use
10787 btrace_find_call_by_number.
10788
10789 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10790
10791 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10792 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10793 btrace_insn_next, btrace_insn_prev): Remove references to
10794 btrace_thread_info::flow.
10795 * btrace.h (struct btrace_function): Remove FLOW.
10796
10797 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10798
10799 * btrace.c (ftrace_find_call_by_number): New function.
10800 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10801 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10802 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10803 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10804 index.
10805 * btrace.h (struct btrace_function): Turn UP into an index.
10806 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10807 as an index.
10808 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10809 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10810 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10811
10812 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10813
10814 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10815 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10816 ftrace_update_function, ftrace_compute_global_level_offset,
10817 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10818 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10819 btrace_insn_end, btrace_is_empty): Remove references to
10820 btrace_thread_info::begin and btrace_thread_info::end.
10821 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10822 (struct btrace_thread_info) <functions>: Adjust comment.
10823 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10824 btrace_thread_info::begin.
10825
10826 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10827
10828 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10829 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10830 ftrace_update_function): Remove arguments that implicitly were always
10831 BTINFO->END.
10832 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10833 Don't pass BTINFO->END.
10834
10835 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10836
10837 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10838 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10839 btrace_find_insn_by_number): Replace function segment pointer with
10840 index.
10841 (btrace_insn_cmp): Simplify.
10842 * btrace.h: (struct btrace_insn_iterator) Rename index to
10843 insn_index. Replace function segment pointer with index into function
10844 segment vector.
10845 * record-btrace.c (record_btrace_call_history): Replace function
10846 segment pointer use with index.
10847 (record_btrace_frame_sniffer): Retrieve function call segment through
10848 vector.
10849 (record_btrace_set_replay): Remove defunc't safety check.
10850
10851 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10852
10853 * btrace.c (btrace_ends_with_single_insn): New function.
10854 (btrace_call_get, btrace_call_number, btrace_call_begin,
10855 btrace_call_end, btrace_call_next, btrace_call_prev,
10856 btrace_find_call_by_number): Use index into call segment vector
10857 instead of pointer.
10858 (btrace_call_cmp): Simplify.
10859 * btrace.h (struct btrace_call_iterator): Replace function call segment
10860 pointer with index into vector.
10861 * record-btrace.c (record_btrace_call_history): Use index instead of
10862 pointer.
10863
10864 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10865
10866 * btrace.c (btrace_insn_begin, btrace_insn_end,
10867 btrace_find_insn_by_number): Add btinfo to iterator.
10868 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10869
10870 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10871
10872 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10873 and save pointers directly.
10874 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10875 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10876 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10877 changed signature of functions.
10878 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10879 (btrace_fetch): Remove code that adds btrace_function pointers to
10880 vector of btrace_functions.
10881 (btrace_clear): Simplify freeing vector of btrace_functions.
10882
10883 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10884
10885 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10886 Replace VEC_* with std::vector functions.
10887 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10888 (struct btrace_thread_info)<functions>: Change type to std::vector.
10889
10890 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10891
10892 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10893 "Removed targets and native configurations" up. Merge duplicate
10894 "New commands" sub-sections. Add "New options" sub-sections.
10895
10896 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10897
10898 * defs.h (copy_integer_to_size): New declaration.
10899 * findvar.c (copy_integer_to_size): New function.
10900 (do_cint_test): New selftest function.
10901 (copy_integer_to_size_test): Likewise.
10902 (_initialize_findvar): Likewise.
10903 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10904 (mips_fbsd_collect_reg): Use raw_collect_integer.
10905 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10906 (mips64_fill_gregset): Use raw_collect_integer
10907 (mips64_fill_fpregset): Use raw_supply_integer.
10908 * regcache.c (regcache::raw_supply_integer): New function.
10909 (regcache::raw_collect_integer): Likewise.
10910 * regcache.h: (regcache::raw_supply_integer): New declaration.
10911 (regcache::raw_collect_integer): Likewise.
10912
10913 2017-05-24 Yao Qi <yao.qi@linaro.org>
10914
10915 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10916 (COMMON_OBS): Add gdbarch-selftests.o.
10917 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10918 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10919 * gdbarch-selftests.c: New file.
10920 * regcache.h (regcache) <~regcache>: Mark it virtual if
10921 GDB_SELF_TEST.
10922 <raw_write>: Likewise.
10923
10924 2017-05-24 Yao Qi <yao.qi@linaro.org>
10925
10926 * regcache.c (current_regcache): Change it to
10927 regcache::current_regcache.
10928 (regcache_observer_target_changed): Update.
10929 (regcache_thread_ptid_changed): Make it a regcache static
10930 method.
10931 (regcache_thread_ptid_changed): Update.
10932 (class regcache_access): New.
10933 (current_regcache_test): Update.
10934 (_initialize_regcache): Update.
10935 * regcache.h: Include forward_list.
10936 (regcache): Declare regcache_thread_ptid_changed and declare
10937 registers_changed_ptid as friend.
10938
10939 2017-05-24 Yao Qi <yao.qi@linaro.org>
10940
10941 * i387-tdep.c (i387_register_to_value): Use register_size
10942 instead of TYPE_LENGTH.
10943 * m68k-tdep.c (m68k_register_to_value): Likewise.
10944
10945 2017-05-24 Yao Qi <yao.qi@linaro.org>
10946
10947 * i387-tdep.c (i387_convert_register_p): Return false if type
10948 code isn't TYPE_CODE_FLT.
10949
10950 2017-05-24 Yao Qi <yao.qi@linaro.org>
10951
10952 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10953 length is 4.
10954 (alpha_register_to_value): Remove type length check.
10955 (alpha_value_to_register): Likewise.
10956
10957 2017-05-24 Yao Qi <yao.qi@linaro.org>
10958
10959 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10960 TYPE_CODE_FLT.
10961
10962 2017-05-24 Yao Qi <yao.qi@linaro.org>
10963
10964 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10965 TYPE_CODE_FLT or not.
10966
10967 2017-05-24 Yao Qi <yao.qi@linaro.org>
10968
10969 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10970 * avr-tdep.c (avr_gdbarch_init): Likewise.
10971 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10972 * cris-tdep.c (cris_gdbarch_init): Likewise.
10973 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10974 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10975 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10976 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10977 * mep-tdep.c (mep_gdbarch_init): Likewise.
10978 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10979 * mips-tdep.c (mips_gdbarch_init): Likewise.
10980 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10981 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10982 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10983 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10984 * v850-tdep.c (v850_gdbarch_init): Likewise.
10985
10986 2017-05-24 Yao Qi <yao.qi@linaro.org>
10987
10988 * selftest-arch.c (tests_with_arch): Call registers_changed
10989 and reinit_frame_cache.
10990 * selftest.c (run_self_tests): Likewise.
10991
10992 2017-05-24 Yao Qi <yao.qi@linaro.org>
10993
10994 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10995 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10996
10997 2017-05-24 Yao Qi <yao.qi@linaro.org>
10998
10999 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11000 set_gdbarch_print_insn.
11001
11002 2017-05-24 Yao Qi <yao.qi@linaro.org>
11003
11004 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11005 set_gdbarch_print_insn.
11006
11007 2017-05-24 Yao Qi <yao.qi@linaro.org>
11008
11009 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11010 set_gdbarch_print_insn.
11011 * arc-tdep.c (arc_gdbarch_init): Likewise.
11012 * arch-utils.c: include dis-asm.h.
11013 (default_print_insn): New function.
11014 * arch-utils.h (default_print_insn): Declare.
11015 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11016 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11017 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11018 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11019 * frv-tdep.c (frv_gdbarch_init): Likewise.
11020 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11021 * gdbarch.sh (print_insn): Use default_print_insn.
11022 * gdbarch.c: Regenerated.
11023 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11024 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11025 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11026 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11027 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11028 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11029 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11030 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11031 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11032 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11033 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11034 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11035 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11036 * mt-tdep.c (mt_gdbarch_init): Likewise.
11037 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11038 * nios2-tdep.c (nios2_print_insn): Remove.
11039 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11040 * rx-tdep.c (rx_gdbarch_init): Likewise.
11041 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11042 * score-tdep.c (score_print_insn): Remove.
11043 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11044 * sh-tdep.c (sh_gdbarch_init): Likewise.
11045 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11046 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11047 * tic6x-tdep.c (tic6x_print_insn): Remove.
11048 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11049 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11050 * v850-tdep.c (v850_gdbarch_init): Likewise.
11051 * vax-tdep.c (vax_gdbarch_init): Likewise.
11052 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11053 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11054
11055 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11056
11057 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11058 (MIPS_FP0_REGNUM): Remove.
11059 (MIPS_FSR_REGNUM): Remove.
11060 (mips_fbsd_supply_fpregs): Use mips_regnum.
11061 (mips_fbsd_supply_gregs): Likewise.
11062 (mips_fbsd_collect_fpregs): Likewise.
11063 (mips_fbsd_collect_gregs): Likewise.
11064
11065 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11066
11067 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11068 (getpfpregs_supplies): New function.
11069 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11070 getfpregs_supplies.
11071 (mips_fbsd_store_inferior_registers): Likewise.
11072
11073 2017-05-22 Pedro Alves <palves@redhat.com>
11074
11075 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11076 maintainer.
11077
11078 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11079
11080 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11081 (store_register): Likewise.
11082 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11083 (get_decimal_float_return_value): Likewise.
11084 (do_ppc_sysv_return_value): Likewise.
11085 (ppc64_sysv_abi_push_integer): Likewise.
11086 (ppc64_sysv_abi_push_freg): Likewise.
11087 (ppc64_sysv_abi_return_value_base): Likewise.
11088 (ppc64_sysv_abi_return_value): Likewise.
11089 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11090 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11091 * rs6000-nat.c: Likewise.
11092 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11093 (rs6000_value_to_register): Likewise.
11094 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11095
11096 2017-05-21 Tom Tromey <tom@tromey.com>
11097
11098 PR rust/21466:
11099 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11100 arrays as "[T]", not "[T; ]".
11101
11102 2017-05-19 Tom Tromey <tom@tromey.com>
11103
11104 PR rust/21484:
11105 * rust-lang.c (exp_descriptor_rust): New function.
11106 (rust_language_defn): Use it.
11107 * p-lang.c (pascal_language_defn): Update.
11108 * opencl-lang.c (opencl_language_defn): Update.
11109 * objc-lang.c (objc_language_defn): Update.
11110 * m2-lang.c (m2_language_defn): Update.
11111 * language.h (struct language_defn)
11112 <la_watch_location_expression>: New member.
11113 * language.c (unknown_language_defn, auto_language_defn)
11114 (local_language_defn): Update.
11115 * go-lang.c (go_language_defn): Update.
11116 * f-lang.c (f_language_defn): Update.
11117 * d-lang.c (d_language_defn): Update.
11118 * c-lang.h (c_watch_location_expression): Declare.
11119 * c-lang.c (c_watch_location_expression): New function.
11120 (c_language_defn, cplus_language_defn, asm_language_defn)
11121 (minimal_language_defn): Use it.
11122 * breakpoint.c (watch_command_1): Call
11123 la_watch_location_expression.
11124 * ada-lang.c (ada_language_defn): Update.
11125
11126 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11127
11128 PR tui/21482
11129 * gdb_curses.h (NOMACROS): Define.
11130 (NCURSES_NOMACROS): Define.
11131
11132 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11133
11134 PR tui/21482
11135 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11136 arg to char *.
11137 * tui/tui-wingeneral.c (box_win): Likewise.
11138 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11139 (tui_show_source_line): Likewise.
11140 (tui_show_exec_info_content): Likewise.
11141
11142 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11143
11144 * sparc-tdep.c (sparc_structure_return_p)
11145 (sparc_arg_on_registers_p): New functions.
11146 (sparc32_store_arguments): Use them.
11147 * sparc64-tdep.c (sparc64_16_byte_align_p)
11148 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11149 Handle TYPE_CODE_ARRAY.
11150
11151 2017-05-17 Yao Qi <yao.qi@linaro.org>
11152
11153 * cli/cli-decode.c (add_alias_cmd): New function.
11154 * command.h (add_alias_cmd): Declare.
11155 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11156 instead call add_alias_cmd.
11157
11158 2017-05-17 Pedro Alves <palves@redhat.com>
11159
11160 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11161 (nat_makefile_frag): ... this. All references updated.
11162 * configure.ac: Likewise.
11163 * configure.nat: Likewise. Enhance comments.
11164 * configure: Regenerate.
11165
11166 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11167
11168 * procfs.c (procfs_create_inferior): Change prototype to match
11169 definition.
11170
11171 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11172
11173 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11174 C++ compiler warning.
11175
11176 2017-05-12 Tom Tromey <tom@tromey.com>
11177
11178 PR rust/21483:
11179 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11180 recurse, just call value_struct_elt directly.
11181
11182 2017-05-12 Tom Tromey <tom@tromey.com>
11183
11184 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11185 OP_RUST_ARRAY>: Fix.
11186
11187 2017-05-12 Tom Tromey <tom@tromey.com>
11188
11189 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11190
11191 2017-05-09 Yao Qi <yao.qi@linaro.org>
11192
11193 * regcache.c: Include <forward_list>.
11194 (struct regcache_list): Remove.
11195 (current_regcache): Update.
11196 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11197 (regcache_thread_ptid_changed): Likewise.
11198 (registers_changed_ptid): Likewise.
11199 (current_regcache_size): Likewise.
11200
11201 2017-05-09 Yao Qi <yao.qi@linaro.org>
11202
11203 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11204 (current_regcache_size): New function.
11205 (current_regcache_test): New function.
11206 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11207
11208 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11209
11210 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11211 (print_gp_register_row): Use get_frame_register_value.
11212
11213 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11214
11215 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11216 (mips_supply_fpregset): Likewise.
11217 (mips64_supply_gregset): Likewise.
11218
11219 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11220
11221 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11222 regcache->raw_supply_zeroed.
11223
11224 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11225
11226 * configure.nat: Rearrange 'case' statements to match
11227 host before cpu.
11228
11229 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11230
11231 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11232 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11233 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11234 "@nat_extra_makefile_frag@".
11235 (Makefile): Remove dependency on "@frags@".
11236 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11237 (data-directory/Makefile): Likewise.
11238 * config/aarch64/linux.mh: Deleted; moved contents to
11239 "gdb/configure.nat".
11240 * config/alpha/alpha-linux.mh: Likewise.
11241 * config/alpha/nbsd.mh: Likewise.
11242 * config/arm/linux.mh: Likewise.
11243 * config/arm/nbsdelf.mh: Likewise.
11244 * config/i386/cygwin.mh: Likewise.
11245 * config/i386/cygwin64.mh: Likewise.
11246 * config/i386/darwin.mh: Likewise.
11247 * config/i386/fbsd.mh: Likewise.
11248 * config/i386/fbsd64.mh: Likewise.
11249 * config/i386/go32.mh: Likewise.
11250 * config/i386/i386gnu.mh: Likewise.
11251 * config/i386/i386sol2.mh: Likewise.
11252 * config/i386/linux.mh: Likewise.
11253 * config/i386/linux64.mh: Likewise.
11254 * config/i386/mingw.mh: Likewise.
11255 * config/i386/mingw64.mh: Likewise.
11256 * config/i386/nbsd64.mh: Likewise.
11257 * config/i386/nbsdelf.mh: Likewise.
11258 * config/i386/nto.mh: Likewise.
11259 * config/i386/obsd.mh: Likewise.
11260 * config/i386/obsd64.mh: Likewise.
11261 * config/i386/sol2-64.mh: Likewise.
11262 * config/ia64/linux.mh: Likewise.
11263 * config/m32r/linux.mh: Likewise.
11264 * config/m68k/linux.mh: Likewise.
11265 * config/m68k/nbsdelf.mh: Likewise.
11266 * config/m68k/obsd.mh: Likewise.
11267 * config/m88k/obsd.mh: Likewise.
11268 * config/mips/fbsd.mh: Likewise.
11269 * config/mips/linux.mh: Likewise.
11270 * config/mips/nbsd.mh: Likewise.
11271 * config/mips/obsd64.mh: Likewise.
11272 * config/pa/linux.mh: Likewise.
11273 * config/pa/nbsd.mh: Likewise.
11274 * config/pa/obsd.mh: Likewise.
11275 * config/powerpc/aix.mh: Likewise.
11276 * config/powerpc/fbsd.mh: Likewise.
11277 * config/powerpc/linux.mh: Likewise.
11278 * config/powerpc/nbsd.mh: Likewise.
11279 * config/powerpc/obsd.mh: Likewise.
11280 * config/powerpc/ppc64-linux.mh: Likewise.
11281 * config/powerpc/spu-linux.mh: Likewise.
11282 * config/s390/linux.mh: Likewise.
11283 * config/sh/nbsd.mh: Likewise.
11284 * config/sparc/fbsd.mh: Likewise.
11285 * config/sparc/linux.mh: Likewise.
11286 * config/sparc/linux64.mh: Likewise.
11287 * config/sparc/nbsd64.mh: Likewise.
11288 * config/sparc/nbsdelf.mh: Likewise.
11289 * config/sparc/obsd64.mh: Likewise.
11290 * config/sparc/sol2.mh: Likewise.
11291 * config/tilegx/linux.mh: Likewise.
11292 * config/vax/nbsdelf.mh: Likewise.
11293 * config/vax/obsd.mh: Likewise.
11294 * config/xtensa/linux.mh: Likewise.
11295 * config/i386/i386gnu.mn: New file, with excerpts from
11296 "config/i386/i386gnu.mh".
11297 * configure: Regenerate.
11298 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11299 *.mh files under "gdb/config".
11300 * configure.nat: New file, with contents from the
11301 "gdb/config/*/*.mh" files.
11302
11303 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11304
11305 * btrace.c (btrace_clear): Free insn vector.
11306
11307 2017-05-05 Pedro Alves <palves@redhat.com>
11308
11309 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11310 * configure: Regenerate.
11311
11312 2017-05-04 Pedro Alves <palves@redhat.com>
11313
11314 * Makefile.in (SFILES): Add progspace-and-thread.c.
11315 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11316 (COMMON_OBS): Add progspace-and-thread.o.
11317 * breakpoint.c: Include "progspace-and-thread.h".
11318 (update_inserted_breakpoint_locations)
11319 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11320 Use scoped_restore_current_pspace_and_thread.
11321 (create_std_terminate_master_breakpoint): Use
11322 scoped_restore_current_program_space.
11323 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11324 (print_breakpoint_location): Use
11325 scoped_restore_current_program_space.
11326 (bp_loc_is_permanent): Use
11327 scoped_restore_current_pspace_and_thread.
11328 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11329 (download_tracepoint_locations): Use
11330 scoped_restore_current_pspace_and_thread.
11331 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11332 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11333 (enum step_over_calls_kind): Moved from inferior.h.
11334 (class scoped_restore_current_thread): New class.
11335 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11336 declaration.
11337 (scoped_restore_current_thread): New class.
11338 * infcmd.c: Include "common/gdb_optional.h".
11339 (continue_1, proceed_after_attach): Use
11340 scoped_restore_current_thread.
11341 (notice_new_inferior): Use scoped_restore_current_thread.
11342 * inferior.c: Include "progspace-and-thread.h".
11343 (restore_inferior, save_current_inferior): Delete.
11344 (add_inferior_command, clone_inferior_command): Use
11345 scoped_restore_current_pspace_and_thread.
11346 * inferior.h (scoped_restore_current_inferior): New class.
11347 * infrun.c: Include "progspace-and-thread.h" and
11348 "common/gdb_optional.h".
11349 (follow_fork_inferior): Use
11350 scoped_restore_current_pspace_and_thread.
11351 (scoped_restore_exited_inferior): New class.
11352 (handle_vfork_child_exec_or_exit): Use
11353 scoped_restore_exited_inferior,
11354 scoped_restore_current_pspace_and_thread,
11355 scoped_restore_current_thread and scoped_restore.
11356 (fetch_inferior_event): Use scoped_restore_current_thread.
11357 * linespec.c (decode_line_full, decode_line_1): Use
11358 scoped_restore_current_program_space.
11359 * mi/mi-main.c: Include "progspace-and-thread.h".
11360 (exec_continue): Use scoped_restore_current_thread.
11361 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11362 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11363 * proc-service.c (ps_pglobal_lookup): Use
11364 scoped_restore_current_program_space.
11365 * progspace-and-thread.c: New file.
11366 * progspace-and-thread.h: New file.
11367 * progspace.c (release_program_space, clone_program_space): Use
11368 scoped_restore_current_program_space.
11369 (restore_program_space, save_current_program_space)
11370 (save_current_space_and_thread): Delete.
11371 (switch_to_program_space_and_thread): Moved to
11372 progspace-and-thread.c.
11373 * progspace.h (save_current_program_space)
11374 (save_current_space_and_thread): Delete declarations.
11375 (scoped_restore_current_program_space): New class.
11376 * remote.c (remote_btrace_maybe_reopen): Use
11377 scoped_restore_current_thread.
11378 * symtab.c: Include "progspace-and-thread.h".
11379 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11380 * thread.c (print_thread_info_1): Use
11381 scoped_restore_current_thread.
11382 (struct current_thread_cleanup): Delete.
11383 (do_restore_current_thread_cleanup)
11384 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11385 (scoped_restore_current_thread::~scoped_restore_current_thread):
11386 ... this new dtor.
11387 (make_cleanup_restore_current_thread): Rename/convert to ...
11388 (scoped_restore_current_thread::scoped_restore_current_thread):
11389 ... this new ctor.
11390 (thread_apply_all_command): Use scoped_restore_current_thread.
11391 (thread_apply_command): Use scoped_restore_current_thread.
11392 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11393 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11394
11395 2017-05-04 Pedro Alves <palves@redhat.com>
11396
11397 * thread.c (make_cleanup_restore_current_thread): Move
11398 find_thread_ptid call before the is_stopped call. Assert that the
11399 thread is found. Replace is_stopped call by checking the thread's
11400 state directly. Remove unnecessary NULL-thread check.
11401
11402 2017-05-04 Pedro Alves <palves@redhat.com>
11403
11404 * corelow.c (thread_section_name): New class.
11405 (get_core_register_section, get_core_siginfo): Use it.
11406
11407 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11408
11409 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11410 (get_core_register_section): Remove xfree of NULL pointer.
11411
11412 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11413
11414 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11415 * regcache.c (regcache::raw_supply_zeroed): New function.
11416 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11417
11418 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11419
11420 * gdbarch.sh: Remove commented out definition of
11421 TARGET_CHAR_BIT.
11422 * gdbarch.h: Re-generate.
11423
11424 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11425
11426 * configure: Regenerate.
11427
11428 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11429
11430 * solib-target.c (solib_target_relocate_section_addresses):
11431 Remove num_section_bases, num_bases, segment_bases variables.
11432
11433 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11434
11435 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11436
11437 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11438
11439 * solib-target.c: Include <vector>
11440 (struct lm_info_target) <~lm_info_target>: Remove.
11441 <segment_bases, section_bases>: Change type to
11442 std::vector<CORE_ADDR>.
11443 (library_list_start_segment, library_list_start_section,
11444 library_list_end_library,
11445 solib_target_relocate_section_addresses): Adjust.
11446
11447 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11448
11449 * gdbarch.sh (software_single_step): Change return type to
11450 std::vector<CORE_ADDR>.
11451 * gdbarch.c, gdbarch.h: Re-generate.
11452 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11453 Adjust.
11454 (arm_deal_with_atomic_sequence_raw): Adjust.
11455 (thumb_get_next_pcs_raw): Adjust.
11456 (arm_get_next_pcs_raw): Adjust.
11457 (arm_get_next_pcs): Adjust.
11458 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11459 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11460 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11461 (alpha_software_single_step): Adjust.
11462 * alpha-tdep.h (alpha_software_single_step): Adjust.
11463 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11464 * arm-tdep.c (arm_software_single_step): Adjust.
11465 (arm_breakpoint_kind_from_current_state): Adjust.
11466 * arm-tdep.h (arm_software_single_step): Adjust.
11467 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11468 * cris-tdep.c (cris_software_single_step): Adjust.
11469 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11470 (micromips_deal_with_atomic_sequence): Adjust.
11471 (deal_with_atomic_sequence): Adjust.
11472 (mips_software_single_step): Adjust.
11473 * mips-tdep.h (mips_software_single_step): Adjust.
11474 * moxie-tdep.c (moxie_software_single_step): Adjust.
11475 * nios2-tdep.c (nios2_software_single_step): Adjust.
11476 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11477 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11478 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11479 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11480 * sparc-tdep.c (sparc_software_single_step): Adjust.
11481 * spu-tdep.c (spu_software_single_step): Adjust.
11482 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11483
11484 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11485
11486 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11487 * gdbarch.h: Re-generate.
11488
11489 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11490
11491 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11492 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11493 * python/py-instruction.c, python/py-instruction.h: New file.
11494 * python/py-record.c: Add py-instruction.h include.
11495 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11496 gdb.RecordInstruction.
11497 * python/python-internal.h: Add gdbpy_initialize_instruction
11498 declaration.
11499 * python/python.c (do_start_initialization): Add
11500 gdbpy_initialize_instruction.
11501
11502 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11503
11504 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11505 Remove.
11506 (btrace_func_from_recpy_func): New function.
11507 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11508 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11509 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11510 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11511 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11512 Also, use new helper functions.
11513 (btpy_list_item): Use new helper functions.
11514 (recpy_bt_function_call_history): Use new type name.
11515 (btpy_call_getset): Remove.
11516 (gdbpy_initialize_btrace): Remove code to initialize
11517 gdb.BtraceFunctionCall.
11518 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11519 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11520 recpy_bt_func_prev, recpy_bt_func_next): New export.
11521 * python/py-record.c (recpy_func_type): New static object.
11522 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11523 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11524 recpy_func_next): New function.
11525 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11526 (recpy_func_getset): New static object.
11527 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11528 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11529
11530 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11531
11532 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11533 (btpy_object, btpy_insn_type, btpy_new): Remove.
11534 (btpy_list_object): Use gdb.RecordInstruction type instead of
11535 gdb.BtraceInstruction type.
11536 (btrace_insn_from_recpy_insn): New function.
11537 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11538 btpy_new.
11539 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11540 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11541 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11542 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11543 instead of btpy_object.
11544 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11545 btpy_insn_data, btpy_insn_decode): Rename to ...
11546 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11547 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11548 recpy_bt_insn_decode): This. Also, use new helper functions.
11549 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11550 recpy_insn_type.
11551 (btpy_insn_getset): Remove.
11552 (gdbpy_initialize_btrace): Remove code to initialize
11553 gdb.BtraceInstruction. Use recpy_element_object.
11554 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11555 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11556 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11557 * python/py-record.c (recpy_insn_type): New static object.
11558 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11559 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11560 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11561 New function.
11562 (recpy_insn_getset): New static object.
11563 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11564 * python/py-record.h (recpy_element_object): New typedef.
11565 (recpy_insn_type, recpy_insn_new): New export.
11566
11567 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11568
11569 * py-record-btrace.c (btpy_insn_new): Removed.
11570 (btpy_insn_or_gap_new): New function.
11571 (btpy_insn_error): Removed.
11572 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11573 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11574 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11575 btpy_insn_or_gap_new instead of btpy_insn_new.
11576 (btpy_insn_getset): Remove btpy_insn_error.
11577 * py-record.c (recpy_gap_type): New static object.
11578 (recpy_gap_object): New typedef.
11579 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11580 recpy_gap_reason_string): New function.
11581 (recpy_gap_getset): New static object.
11582 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11583 * py-record.h (recpy_gap_new): New export.
11584
11585 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11586
11587 * python/py-record.c (recpy_ptid): Remove.
11588 (recpy_record_getset): Remove recpy_ptid.
11589
11590 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11591
11592 * btrace.c (btrace_fetch): Set inferior_ptid.
11593 * python/py-record-btrace.c: Add "py-record.h" include.
11594 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11595 recpy_bt_end, recpy_bt_instruction_history,
11596 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11597 in gdb.Record object instead of current ptid.
11598 * python/py-record.c: Include new "py-record.h" file.
11599 (recpy_record_object): Moved to py-record.h.
11600 * python/py-record.h: New file.
11601
11602 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11603
11604 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11605 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11606 indentation.
11607
11608 2017-05-01 Joel Brobecker <brobecker@adacore.com>
11609
11610 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11611 the past maintainers section.
11612
11613 2017-04-28 Yao Qi <yao.qi@linaro.org>
11614
11615 * infcmd.c (get_return_value): Use regcache ctor, and remove
11616 cleanup.
11617
11618 2017-04-28 Yao Qi <yao.qi@linaro.org>
11619 Pedro Alves <palves@redhat.com>
11620
11621 * regcache.c (regcache::regcache): New tag dispatch ctor.
11622 (do_cooked_read): Moved above.
11623 (regcache_dup): Use the tag dispatch ctor..
11624 * regcache.h (regcache): Declare ctor, delete copy ctor and
11625 assignment operator, remove friend regcache_dup.
11626
11627 2017-04-28 Yao Qi <yao.qi@linaro.org>
11628
11629 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11630 call method save instead of regcache_cpy.
11631 * regcache.h (struct regcache): Make regcache_dup a friend.
11632
11633 2017-04-28 Yao Qi <yao.qi@linaro.org>
11634
11635 * regcache.c (struct regcache): Move to regcache.h
11636 (regcache::arch): New method.
11637 (regcache_get_ptid): Update.
11638 (get_regcache_arch): Call arch method.
11639 (get_regcache_aspace): Call method aspace.
11640 (register_buffer): Change it to method.
11641 (regcache_save): Change it to regcache::save.
11642 (regcache_restore): Likewise.
11643 (regcache_cpy_no_passthrough): Remove the declaration.
11644 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11645 (regcache_cpy_no_passthrough): Change it to method
11646 cpy_no_passthrough.
11647 (regcache_register_status): Change it to method
11648 get_register_status.
11649 (regcache_invalidate): Change it to method invalidate.
11650 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11651 (regcache_raw_update): Change it to method raw_update.
11652 (regcache_raw_read): Likewise.
11653 (regcache_raw_read_signed): Likewise.
11654 (regcache_raw_read_unsigned): Likewise.
11655 (regcache_raw_write_signed): Likewise.
11656 (regcache_raw_write_unsigned): Likewise.
11657 (regcache_cooked_read): Likewise.
11658 (regcache_cooked_read_value): Likewise.
11659 (regcache_cooked_read_signed): Likewise.
11660 (regcache_cooked_read_unsigned): Likewise.
11661 (regcache_cooked_write_signed): Likewise.
11662 (regcache_cooked_write_unsigned): Likewise.
11663 (regcache_raw_set_cached_value): Likewise.
11664 (regcache_raw_write): Likewise.
11665 (regcache_cooked_write): Likewise.
11666 (regcache_xfer_part): Likewise.
11667 (regcache_raw_read_part): Likewise.
11668 (regcache_raw_write_part): Likewise.
11669 (regcache_cooked_read_part): Likewise.
11670 (regcache_cooked_write_part): Likewise.
11671 (regcache_raw_supply): Likewise.
11672 (regcache_raw_collect): Likewise.
11673 (regcache_transfer_regset): Likewise.
11674 (regcache_supply_regset): Likewise.
11675 (regcache_collect_regset): Likewise.
11676 (regcache_debug_print_register): Likewise.
11677 (enum regcache_dump_what): Move it to regcache.h.
11678 (regcache_dump): Change it to method dump.
11679 * regcache.h (enum regcache_dump_what): New.
11680 (class regcache): New.
11681 * target.c (target_fetch_registers): Call method
11682 debug_print_register.
11683 (target_store_registers): Likewise.
11684
11685 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11686
11687 * windows-nat.c (struct lm_info_windows): Initialize field.
11688 (windows_make_so): Allocate lm_info_windows with new.
11689 (windows_free_so): Free lm_info_windows with delete.
11690
11691 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11692
11693 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11694 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11695 cleanup.
11696 (darwin_free_so): Free lm_info_darwin with delete.
11697
11698 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11699
11700 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11701 <l_addr_p>: Change type to bool.
11702 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11703 (svr4_free_so): Free lm_info_svr4 with delete.
11704 (svr4_copy_library_list): Replace memcpy with call to copy
11705 constructor.
11706 (library_list_start_library, svr4_default_sos): Allocate
11707 lm_info_svr4 with new.
11708
11709 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11710
11711 * solib-target.c (struct lm_info_target): Add destructor,
11712 initialize fields.
11713 <name>: Change type to std::string.
11714 (library_list_start_library): Allocate lm_info_target with new.
11715 (solib_target_free_library_list): Free lm_info_target with
11716 delete.
11717 (solib_target_current_sos): Adapt to std::string.
11718 (solib_target_free_so): Free lm_info_target with delete.
11719
11720 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11721
11722 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11723 fields.
11724 (frv_current_sos): Allocate lm_info_frv with new.
11725 (frv_relocate_main_executable): Free lm_info_frv with delete,
11726 allocate with new.
11727 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11728
11729 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11730
11731 * solib-frv.c (struct lm_info_frv): Fix indentation.
11732
11733 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11734
11735 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11736 map field.
11737 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11738 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11739 and allocate with new.
11740 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11741
11742 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11743
11744 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11745 <filename, member_name>: Change type to std::string.
11746 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11747 (library_list_start_library): Allocate lm_info_aix with new.
11748 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11749 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11750 with copy constructor.
11751
11752 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11753
11754 * solist.h (struct lm_info): Remove.
11755 (struct lm_info_base): New class.
11756 (struct so_list) <lm_info>: Change type to lm_info_base *.
11757 * nto-tdep.c (struct lm_info): Remove.
11758 (lm_addr): Adjust.
11759 * solib-aix.c (struct lm_info): Rename to ...
11760 (struct lm_info_aix): ... this. Extend lm_info_base.
11761 (lm_info_p): Rename to ...
11762 (lm_info_aix_p): ... this, and adjust.
11763 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11764 solib_aix_parse_libraries, library_list_start_library,
11765 solib_aix_free_library_list, solib_aix_parse_libraries,
11766 solib_aix_get_library_list,
11767 solib_aix_relocate_section_addresses, solib_aix_free_so,
11768 solib_aix_get_section_offsets,
11769 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11770 Adjust.
11771 (struct solib_aix_inferior_data) <library_list>: Adjust.
11772 * solib-darwin.c (struct lm_info): Rename to ...
11773 (struct lm_info_darwin): ... this. Extend lm_info_base.
11774 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11775 * solib-dsbt.c (struct lm_info): Rename to ...
11776 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11777 (struct dsbt_info) <main_executable_lm_info): Adjust.
11778 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11779 dsbt_relocate_section_addresses): Adjust.
11780 * solib-frv.c (struct lm_info): Rename to ...
11781 (struct lm_info_frv): ... this. Extend lm_info_base.
11782 (main_executable_lm_info): Adjust.
11783 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11784 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11785 find_canonical_descriptor_in_load_object,
11786 frv_fdpic_find_canonical_descriptor): Adjust.
11787 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11788 to lm_info_svr4.
11789 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11790 svr4_clear_so, svr4_copy_library_list,
11791 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11792 svr4_current_sos, svr4_fetch_objfile_link_map,
11793 solist_update_incremental): Adjust.
11794 * solib-svr4.h (struct lm_info_svr4): Move here from
11795 solib-svr4.c.
11796 * solib-target.c (struct lm_info): Rename to ...
11797 (struct lm_info_target): ... this. Extend lm_info_base.
11798 (lm_info_p): Rename to ...
11799 (lm_info_target_p): ... this.
11800 (solib_target_parse_libraries, library_list_start_segment,
11801 library_list_start_section, library_list_start_library,
11802 library_list_end_library, solib_target_free_library_list,
11803 solib_target_current_sos, solib_target_free_so,
11804 solib_target_relocate_section_addresses): Adjust.
11805 * windows-nat.c (struct lm_info): Rename to ...
11806 (struct lm_info_windows): ... this. Extend lm_info_base.
11807 (windows_make_so, handle_load_dll, handle_unload_dll,
11808 windows_xfer_shared_libraries): Adjust.
11809
11810 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11811
11812 * solib-darwin.c (struct darwin_so_list): Remove.
11813 (darwin_current_sos): Allocate an so_list object instead of a
11814 darwin_so_list, separately allocate an lm_info object.
11815 (darwin_free_so): Free lm_info.
11816
11817 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11818
11819 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11820 with fprintf_filtered.
11821
11822 2017-04-28 Yao Qi <yao.qi@linaro.org>
11823
11824 * regcache.c (regcache::regcache): New function.
11825 (regcache::~regcache): New function.
11826 (regcache_xmalloc_1): Remove.
11827 (regcache_xmalloc): Call new regcache.
11828 (regcache_xfree): Call delete regcache.
11829 (get_thread_arch_aspace_regcache): Call new regcache.
11830
11831 2017-04-28 Yao Qi <yao.qi@linaro.org>
11832
11833 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11834 lwp instead of ptid_get_lwp.
11835
11836 2017-04-28 Yao Qi <yao.qi@linaro.org>
11837
11838 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11839 lwp_info instead of getting from inferior_ptid.
11840
11841 2017-04-27 Keith Seitz <keiths@redhat.com>
11842
11843 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11844 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11845 (CV_CONVERSION_BADNESS): Define.
11846 (rank_one_type): Remove overly restrictive rvalue reference
11847 rank checks.
11848 Add cv-qualifier checks and subranks for type equality.
11849 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11850 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11851 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11852
11853 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11854
11855 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11856 count when creating the object.
11857
11858 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11859 Ulrich Weigand <uweigand@de.ibm.com>
11860
11861 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11862 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11863 is used in AIX.
11864 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11865 (process_xcoff_symbol): Likewise.
11866 (scan_xcoff_symtab): Likewise.
11867
11868 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11869
11870 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11871 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11872 (ia64_access_reg): Use get_frame_register_unsigned.
11873 (ia64_access_rse_reg): Likewise.
11874 (ia64_libunwind_frame_prev_register): Likewise.
11875
11876 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11877
11878 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11879 * gdbarch.c: Regenerated.
11880 * gdbarch.h: Regenerated.
11881 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11882 visibility external.
11883 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11884 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11885 (enum cfa_how_kind): Move to ...
11886 (struct dwarf2_frame_state_reg_info): Likewise.
11887 (struct dwarf2_frame_state): Likewise.
11888 * dwarf2-frame.h: ... here.
11889 (dwarf2_frame_state_alloc_regs): New declaration.
11890 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11891 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11892
11893 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11894
11895 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11896 regcache_raw_read_unsigned.
11897 (xtensa_pseudo_register_write): Likewise.
11898
11899 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11900
11901 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11902 (nds32_pseudo_register_write): Likewise.
11903
11904 2017-04-25 Yao Qi <yao.qi@linaro.org>
11905
11906 * regcache.c (struct regcache) <readonly_p>: Change its type
11907 to bool.
11908 (regcache_xmalloc_1): Update parameter type and callers update.
11909
11910 2017-04-25 Yao Qi <yao.qi@linaro.org>
11911
11912 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11913 set_gdbarch_wchar_bit.
11914 * arm-tdep.c (arm_gdbarch_init): Likewise.
11915
11916 2017-04-25 Pedro Alves <palves@redhat.com>
11917
11918 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11919 (BothAreRelocatable, memcopy, memmove): Don't define.
11920 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11921 macros.
11922
11923 2017-04-25 Pedro Alves <palves@redhat.com>
11924
11925 * common/common-defs.h: Include "common/poison.h".
11926 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11927 and adjust.
11928 * common/poison.h: New file.
11929 * common/traits.h: Include <type_traits>.
11930 (Not, Or, Requires): New, moved from common/function-view.h.
11931
11932 2017-04-25 Pedro Alves <palves@redhat.com>
11933
11934 * breakpoint.h (struct breakpoint): In-class initialize all
11935 fields. Make boolean fields "bool".
11936 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11937 memset call and initializations no longer necessary.
11938
11939 2017-04-25 Pedro Alves <palves@redhat.com>
11940
11941 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11942 reference.
11943 (pt_btrace_insn): New function.
11944 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11945
11946 2017-04-25 Pedro Alves <palves@redhat.com>
11947
11948 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11949 "base" field and inherit from "bp_location" instead. Add
11950 non-default ctor.
11951 (allocate_location_exception): Use new non-default ctor.
11952 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11953 (init_bp_location): Convert to ...
11954 (bp_location::bp_location): ... this new ctor, and remove memset
11955 call.
11956 (base_breakpoint_allocate_location): Use the new non-default ctor.
11957 * breakpoint.h (bp_location): Now a class. Declare default and
11958 non-default ctors. In-class initialize all members.
11959 (init_bp_location): Remove declaration.
11960
11961 2017-04-25 Pedro Alves <palves@redhat.com>
11962
11963 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11964 assignment operator.
11965
11966 2017-04-24 Yao Qi <yao.qi@linaro.org>
11967
11968 * doublest.c (convert_doublest_to_floatformat): Call
11969 floatformat_totalsize_bytes.
11970
11971 2017-04-22 Tom Tromey <tom@tromey.com>
11972
11973 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11974 ui_out_emit_list.
11975 * stack.c (print_frame): Use ui_out_emit_list.
11976 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11977 ui_out_emit_list.
11978 * mi/mi-main.c (print_one_inferior)
11979 (mi_cmd_data_list_register_names)
11980 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11981 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11982 ui_out_emit_list.
11983 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11984 (mi_output_solib_attribs): Use ui_out_emit_list,
11985 ui_out_emit_tuple.
11986 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11987 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11988 (mi_cmd_stack_list_args, list_args_or_locals): Use
11989 ui_out_emit_list.
11990 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11991 * breakpoint.c (print_solib_event, output_thread_groups): Use
11992 ui_out_emit_list.
11993
11994 2017-04-22 Tom Tromey <tom@tromey.com>
11995
11996 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11997 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11998 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11999
12000 2017-04-22 Tom Tromey <tom@tromey.com>
12001
12002 * tracepoint.c (tvariables_info_1)
12003 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12004
12005 2017-04-22 Tom Tromey <tom@tromey.com>
12006
12007 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12008 annotate_arg_emitter.
12009 * breakpoint.c (print_mention_watchpoint)
12010 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12011 * annotate.h (struct annotate_arg_emitter): New.
12012
12013 2017-04-22 Tom Tromey <tom@tromey.com>
12014
12015 * record-btrace.c (record_btrace_insn_history)
12016 (record_btrace_insn_history_range, record_btrace_call_history)
12017 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12018 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12019 ui_out_emit_tuple.
12020 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12021 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12022 * skip.c (skip_info): Use ui_out_emit_tuple.
12023 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12024 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12025 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12026 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12027 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12028 ui_out_emit_tuple.
12029 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12030 (output_register, mi_cmd_data_read_memory)
12031 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12032 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12033 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12034 Use ui_out_emit_tuple.
12035 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12036 ui_out_emit_tuple.
12037 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12038 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12039 * linux-thread-db.c (info_auto_load_libthread_db): Use
12040 ui_out_emit_tuple.
12041 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12042 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12043 * disasm.c (do_mixed_source_and_assembly_deprecated)
12044 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12045 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12046 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12047 * breakpoint.c (print_one_breakpoint_location)
12048 (print_one_breakpoint): Use ui_out_emit_tuple.
12049 * auto-load.c (print_script, info_auto_load_cmd): Use
12050 ui_out_emit_tuple.
12051 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12052
12053 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12054
12055 * thread.c (print_thread_info_1): Remove dead code.
12056
12057 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12058
12059 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12060 GDB_SELF_TEST.
12061 * arm-tdep.c (selftests::arm_record_test): Likewise.
12062
12063 2017-04-21 Yao Qi <yao.qi@linaro.org>
12064
12065 * regcache.c (regcache_restore): Remove argument 2. Replace
12066 argument 3 with regcache. Get register status from
12067 src->register_status and get register contents from
12068 register_buffer (src, regnum).
12069 (regcache_cpy): Update.
12070
12071 2017-04-19 Pedro Alves <palves@redhat.com>
12072
12073 * gdbthread.h (thread): Add missing closing parenthesis in
12074 comment.
12075
12076 2017-04-19 Pedro Alves <palves@redhat.com>
12077
12078 * common/refcounted-object.h: New file.
12079 * gdbthread.h: Include "common/refcounted-object.h".
12080 (thread_info): Inherit from refcounted_object and add comments.
12081 (thread_info::incref, thread_info::decref)
12082 (thread_info::m_refcount): Delete.
12083 (thread_info::deletable): Use the refcounted_object::refcount()
12084 method.
12085 * inferior.c (current_inferior_): Add comment.
12086 (set_current_inferior): Increment/decrement refcounts.
12087 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12088 not-deletable instead of comparing with the current inferior.
12089 (initialize_inferiors): Increment the initial inferior's refcount.
12090 * inferior.h (struct inferior): Forward declare.
12091 Include "common/refcounted-object.h".
12092 (current_inferior, set_current_inferior): Move declaration to
12093 before struct inferior's definition, and fix comment.
12094 (inferior): Inherit from refcounted_object. Add comments.
12095 * thread.c (switch_to_thread_no_regs): Reference the thread's
12096 inferior pointer directly instead of doing a ptid lookup.
12097 (switch_to_no_thread): New function.
12098 (switch_to_thread(thread_info *)): New function, factored out
12099 from ...
12100 (switch_to_thread(ptid_t)): ... this.
12101 (restore_current_thread): Delete.
12102 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12103 fields, and add 'inf' field.
12104 (do_restore_current_thread_cleanup): Check whether old->inf is
12105 alive instead of looking up an inferior by ptid. Use
12106 switch_to_thread and switch_to_no_thread.
12107 (restore_current_thread_cleanup_dtor): Use old->inf directly
12108 instead of lookup up an inferior by id. Decref the inferior.
12109 Don't restore 'removable'.
12110 (make_cleanup_restore_current_thread): Same the inferior pointer
12111 in old, instead of the inferior number. Incref the inferior.
12112 Don't save/clear 'removable'.
12113
12114 2017-04-19 Pedro Alves <palves@redhat.com>
12115
12116 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12117 unittests/scoped_restore-selftests.c.
12118 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12119 * common/scoped_restore.h (scoped_restore_base): Make "class".
12120 (scoped_restore_base::release): New public method.
12121 (scoped_restore_base::scoped_restore_base): New protected ctor.
12122 (scoped_restore_base::m_saved_var): New protected field.
12123 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12124 scoped_restore_base base class instead of m_saved_var directly.
12125 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12126 (scoped_restore_tmpl::scoped_restore_tmpl(const
12127 scoped_restore_tmpl<T>&)): Likewise.
12128 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12129 method.
12130 (scoped_restore_tmpl::saved_var): New method.
12131 (scoped_restore_tmpl::m_saved_var): Delete.
12132 * inferior.h (inferior::detaching): Now a bool.
12133 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12134 cleanup.
12135 * unittests/scoped_restore-selftests.c: New file.
12136
12137 2017-04-19 Pedro Alves <palves@redhat.com>
12138
12139 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12140 Re-sort in alphabetic order.
12141
12142 2017-04-18 Pedro Alves <palves@redhat.com>
12143
12144 * xml-support.c (obstack_xml_printf): Delete.
12145 * xml-support.h (obstack_xml_printf): Delete.
12146
12147 2017-04-18 Pedro Alves <palves@redhat.com>
12148
12149 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12150 vdebug, verror, body_text, start_element, end_element, name,
12151 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12152 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12153 is_xinclude>: Make private and add m_ prefix.
12154 (gdb_xml_parser::body_text): New method, based on ...
12155 (gdb_xml_body_text): ... this. Adjust.
12156 (gdb_xml_parser::vdebug): New method, based on ...
12157 (gdb_xml_debug): ... this. Adjust.
12158 (gdb_xml_parser::verror): New method, based on ...
12159 (gdb_xml_error): ... this. Adjust.
12160 (gdb_xml_parser::start_element): New method, based on ...
12161 (gdb_xml_start_element): ... this. Adjust.
12162 (gdb_xml_start_element_wrapper): Defer to
12163 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12164 (gdb_xml_parser::end_element): New method, based on ...
12165 (gdb_xml_end_element_wrapper): ... this. Adjust.
12166 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12167 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12168 (gdb_xml_parser::use_dtd): New method, based on ...
12169 (gdb_xml_use_dtd): ... this. Adjust.
12170 (gdb_xml_parser::parse): New method, based on ...
12171 (gdb_xml_parse): ... this. Adjust.
12172 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12173 (xinclude_start_include): Adjust to call the parser's name method.
12174 (xml_xinclude_default, xml_xinclude_start_doctype)
12175 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12176 method.
12177 (xml_process_xincludes): Adjust to call parser methods.
12178 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12179 declarations.
12180
12181 2017-04-18 Pedro Alves <palves@redhat.com>
12182
12183 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12184 gdb::optional<std::string>.
12185 * xml-support.c: Include <string>.
12186 (scope_level::scope_level(scope_level &&))
12187 (scope_level::~scope_level): Delete.
12188 (scope_level::body): Now a std::string.
12189 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12190 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12191 parameter.
12192 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12193 (xinclude_parsing_data::output): Now a std::string reference.
12194 (xinclude_start_include): Adjust.
12195 (xml_xinclude_default): Adjust.
12196 (xml_process_xincludes): Add 'output' parameter, and return bool.
12197 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12198 and return bool.
12199 * xml-tdesc.c: Include <unordered_map> and <string>.
12200 (tdesc_xml_cache): Delete.
12201 (tdesc_xml_cache_s): Delete.
12202 (xml_cache): Now an std::unordered_map.
12203 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12204 (target_fetch_description_xml): Change return type to
12205 gdb::optional<std::string>, and adjust.
12206 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12207 (target_fetch_description_xml): Change return type to
12208 gdb::optional<std::string>.
12209
12210 2017-04-18 Pedro Alves <palves@redhat.com>
12211
12212 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12213 unittests/optional-selftests.c.
12214 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12215 * unittests/optional-selftests.c: New file.
12216 * unittests/optional/assignment/1.cc: New file.
12217 * unittests/optional/assignment/2.cc: New file.
12218 * unittests/optional/assignment/3.cc: New file.
12219 * unittests/optional/assignment/4.cc: New file.
12220 * unittests/optional/assignment/5.cc: New file.
12221 * unittests/optional/assignment/6.cc: New file.
12222 * unittests/optional/assignment/7.cc: New file.
12223 * unittests/optional/cons/copy.cc: New file.
12224 * unittests/optional/cons/default.cc: New file.
12225 * unittests/optional/cons/move.cc: New file.
12226 * unittests/optional/cons/value.cc: New file.
12227 * unittests/optional/in_place.cc: New file.
12228 * unittests/optional/observers/1.cc: New file.
12229 * unittests/optional/observers/2.cc: New file.
12230
12231 2017-04-18 Pedro Alves <palves@redhat.com>
12232
12233 * common/gdb_optional.h: Include common/traits.h.
12234 (in_place_t): New type.
12235 (in_place): New constexpr variable.
12236 (optional::optional): Remove member initialization of
12237 m_instantiated.
12238 (optional::optional(in_place_t...)): New constructor.
12239 (optional::~optional): Use reset.
12240 (optional::optional(const optional&)): New.
12241 (optional::optional(const optional&&)): New.
12242 (optional::optional(T &)): New.
12243 (optional::optional(T &&)): New.
12244 (operator::operator=(const optional &)): New.
12245 (operator::operator=(optional &&)): New.
12246 (operator::operator= (const T &))
12247 (operator::operator= (T &&))
12248 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12249 (operator::reset): New.
12250 (operator::m_instantiated):: Add in-class initializer.
12251 * common/traits.h: Include <type_traits>.
12252 (struct And): New types.
12253
12254 2017-04-18 Pedro Alves <palves@redhat.com>
12255
12256 * xml-support.c: Include <vector>.
12257 (scope_level::scope_level(const gdb_xml_element *))
12258 (scope_level::scope_level(scope_level&&)): New.
12259 (scope_level::~scope_level): New.
12260 (scope_level_s): Delete.
12261 (gdb_xml_parser::scopes): Now a std::vector.
12262 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12263 Use std::vector.
12264 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12265 scope cleanup code.
12266 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12267 of the scopes member. Use std::vector::emplace_back.
12268
12269 2017-04-18 Pedro Alves <palves@redhat.com>
12270
12271 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12272 a bool.
12273 (gdb_xml_end_element): Change type of first parameter.
12274 (gdb_xml_cleanup): Rename to ...
12275 (gdb_xml_parser::~gdb_xml_parser): ... this.
12276 (gdb_xml_create_parser_and_cleanup): Delete with ...
12277 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12278 to this new ctor.
12279 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12280 using gdb_xml_create_parser_and_cleanup.
12281 (xinclude_parsing_data): Add ctor/dtor.
12282 (xml_xinclude_cleanup): Delete.
12283 (xml_process_xincludes): Create a local xinclude_parsing_data
12284 instead of heap-allocating one. Create a local gdb_xml_parser
12285 instead of heap-allocating one with
12286 gdb_xml_create_parser_and_cleanup.
12287
12288 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12289
12290 PR threads/20743
12291 * fbsd-nat.c (resume_one_thread_cb): Remove.
12292 (resume_all_threads_cb): Remove.
12293 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12294 iterate_over_threads.
12295
12296 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12297
12298 * NEWS: Create a new section for the next release branch.
12299 Rename the section of the current branch, now that it has
12300 been cut.
12301
12302 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12303
12304 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12305 * version.in: Bump version to 8.0.50.DATE-git.
12306
12307 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12308
12309 PR gdb/21385
12310 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12311 independently of the host, and fix build breakage on Cygwin.
12312
12313 2017-04-13 Pedro Alves <palves@redhat.com>
12314
12315 * inferior.c (free_inferior): Convert to ...
12316 (inferior::~inferior): ... this dtor.
12317 (inferior::inferior): New ctor, factored out from ...
12318 (add_inferior_silent): ... here. Allocate the inferior with a new
12319 expression.
12320 (delete_inferior): Call delete instead of free_inferior.
12321 * inferior.h (gdb_environ, continuation): Forward declare.
12322 (inferior): Now a class. Add in-class initialization to all
12323 members. Make boolean fields bool, except 'detaching'.
12324 (inferior::inferior): New explicit ctor.
12325 (inferior::~inferior): New.
12326
12327 2017-04-13 Pedro Alves <palves@redhat.com>
12328
12329 * inferior.c (init_inferior_list): Delete.
12330 * inferior.h (init_inferior_list): Delete.
12331
12332 2017-04-13 Pedro Alves <palves@redhat.com>
12333
12334 PR threads/13217
12335 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12336 (top level): Call it twice, with different thread sets.
12337
12338 2017-04-13 Pedro Alves <palves@redhat.com>
12339
12340 * thread.c: Include <algorithm>.
12341 (thread_array_cleanup): Delete.
12342 (scoped_inc_dec_ref): New class.
12343 (live_threads_count): New function.
12344 (set_thread_refcount): Delete.
12345 (tp_array_compar_ascending): Now a bool.
12346 (tp_array_compar): Convert to a std::sort comparison function.
12347 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12348 and live_threads_count.
12349
12350 2017-04-13 Pedro Alves <palves@redhat.com>
12351
12352 * infrun.c (follow_fork_inferior): Also switch the current
12353 inferior.
12354
12355 2017-04-13 Pedro Alves <palves@redhat.com>
12356
12357 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12358 before calling create_internal_breakpoint.
12359
12360 2017-04-13 Pedro Alves <palves@redhat.com>
12361
12362 * fork-child.c (execv_argv): New class.
12363 (breakup_args): Refactored as ...
12364 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12365 Copy arguments to storage and replace separators with NULL
12366 terminators in place.
12367 (escape_bang_in_quoted_argument): Adjust to return bool.
12368 (execv_argv::execv_argv): New ctor.
12369 (execv_argv::init_for_shell): New method, factored out from
12370 fork_inferior. Don't strdup strings into the vector.
12371 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12372 Remove free_vector_argv call.
12373
12374 2017-04-13 Yao Qi <yao.qi@linaro.org>
12375
12376 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12377 tdep->rx_psw_type.
12378
12379 2017-04-13 Yao Qi <yao.qi@linaro.org>
12380
12381 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12382 * rx-tdep.c (rx_gdbarch_init): Likewise.
12383
12384 2017-04-13 Pedro Alves <palves@redhat.com>
12385
12386 * breakpoint.h (struct breakpoint): Reindent.
12387
12388 2017-04-13 Pedro Alves <palves@redhat.com>
12389
12390 * breakpoint.c (bp_location): Rename to ...
12391 (bp_locations): ... this. All references updated.
12392 (bp_location_count): Rename to ...
12393 (bp_locations_count): ... this. All references updated.
12394 (bp_location_placed_address_before_address_max): Rename to ...
12395 (bp_locations_placed_address_before_address_max): ... this. All
12396 references updated.
12397 (bp_location_shadow_len_after_address_max): Rename to ...
12398 (bp_locations_shadow_len_after_address_max): ... this. All
12399 references updated.
12400 (bp_location_compare_addrs): Rename to ...
12401 (bp_locations_compare_addrs): ... this. All references updated.
12402 (bp_location_compare):Rename to ...
12403 (bp_locations_compare): ... this. All references updated.
12404 (bp_location_target_extensions_update): Rename to ...
12405 (bp_locations_target_extensions_update): ... this. All references
12406 updated.
12407
12408 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12409
12410 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12411 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12412 'sgtty.h'.
12413 * common/gdb_termios.h: New file, with parts of "terminal.h".
12414 * inflow.c: Include "gdb_termios.h".
12415 * ser-unix.c: Include "gdb_termios.h".
12416 * terminal.h: Move terminal-related defines to
12417 "common/gdb_termios.h".
12418
12419 2017-04-12 Tom Tromey <tom@tromey.com>
12420
12421 * probe.c (parse_probes): Update.
12422 * location.h (delete_event_location): Don't declare.
12423 (event_location_deleter::operator()): Update.
12424 * location.c (event_location_deleter::operator()): Rename from
12425 delete_event_location.
12426 * linespec.h (linespec_result) <location>: Change type to
12427 event_location_up.
12428 * linespec.c (canonicalize_linespec, event_location_to_sals)
12429 (decode_objc): Update.
12430 (linespec_result): Don't call delete_event_location.
12431 * breakpoint.c (create_breakpoints_sal)
12432 (bkpt_probe_create_sals_from_location)
12433 (strace_marker_create_sals_from_location): Update.
12434
12435 2017-04-12 Tom Tromey <tom@tromey.com>
12436
12437 * linespec.h (struct linespec_result): Add constructor and
12438 destructor.
12439 (init_linespec_result, destroy_linespec_result)
12440 (make_cleanup_destroy_linespec_result): Don't declare.
12441 * linespec.c (init_linespec_result): Remove.
12442 (linespec_result::~linespec_result): Rename from
12443 destroy_linespec_result. Update.
12444 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12445 Remove.
12446 * breakpoint.c (create_breakpoint, break_range_command)
12447 (decode_location_default): Update.
12448 * ax-gdb.c (agent_command_1): Update.
12449
12450 2017-04-12 Tom Tromey <tom@tromey.com>
12451
12452 * remote.c (remote_download_tracepoint): Update.
12453 * python/py-breakpoint.c (bppy_get_location): Update.
12454 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12455 (gdbscm_breakpoint_location): Update.
12456 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12457 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12458 Change type to event_location_up.
12459 * breakpoint.c (create_overlay_event_breakpoint)
12460 (create_longjmp_master_breakpoint)
12461 (create_std_terminate_master_breakpoint)
12462 (create_exception_master_breakpoint)
12463 (breakpoint_event_location_empty_p, print_breakpoint_location)
12464 (print_one_breakpoint_location, create_thread_event_breakpoint)
12465 (init_breakpoint_sal, create_breakpoint)
12466 (print_recreate_ranged_breakpoint, break_range_command)
12467 (init_ada_exception_breakpoint, say_where): Update.
12468 (base_breakpoint_dtor): Don't call delete_event_location.
12469 (bkpt_print_recreate, tracepoint_print_recreate)
12470 (dprintf_print_recreate, update_static_tracepoint)
12471 (breakpoint_re_set_default): Update.
12472
12473 2017-04-12 Tom Tromey <tom@tromey.com>
12474
12475 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12476 type of "to_do". Update.
12477 (compute_stack_depth): Use std::vector.
12478
12479 2017-04-12 Tom Tromey <tom@tromey.com>
12480
12481 * printcmd.c (find_instruction_backward): Use std::vector.
12482
12483 2017-04-12 Tom Tromey <tom@tromey.com>
12484
12485 * symfile.c (objfilep): Remove typedef.
12486 (reread_symbols): Use a std::vector.
12487
12488 2017-04-12 Tom Tromey <tom@tromey.com>
12489
12490 * mi/mi-main.c (exec_direction_forward): Remove.
12491 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12492 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12493 scoped_restore.
12494 * guile/guile.c (guile_repl_command, guile_command)
12495 (gdbscm_execute_gdb_command): Use scoped_restore.
12496 * go-exp.y (go_parse): Use scoped_restore.
12497 * d-exp.y (d_parse): Use scoped_restore.
12498 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12499 * c-exp.y (c_parse): Use scoped_restore.
12500
12501 2017-04-12 Tom Tromey <tom@tromey.com>
12502
12503 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12504 (mi_parse): Update return type.
12505 (mi_parse_free): Remove.
12506 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12507 (mi_parse::~mi_parse): Rename from mi_parse_free.
12508 (mi_parse_cleanup): Remove.
12509 (mi_parse): Return a unique_ptr. Use new.
12510 * mi/mi-main.c (mi_execute_command): Update.
12511
12512 2017-04-12 Tom Tromey <tom@tromey.com>
12513
12514 * location.c (explicit_location_lex_one): Return a
12515 unique_xmalloc_ptr.
12516 (string_to_explicit_location): Update. Remove cleanups.
12517
12518 2017-04-12 Tom Tromey <tom@tromey.com>
12519
12520 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12521 (compare_value_and_voffset): Change type. Update.
12522 (compute_vtable_size): Change type of "offset_vec".
12523 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12524 (gnuv3_get_typeid): Remove extraneous declaration.
12525
12526 2017-04-12 Tom Tromey <tom@tromey.com>
12527
12528 * charset.h (wchar_iterator): Fix comment.
12529
12530 2017-04-12 Tom Tromey <tom@tromey.com>
12531
12532 * charset.c (iconv_wrapper): New class.
12533 (cleanup_iconv): Remove.
12534 (convert_between_encodings): Use it.
12535
12536 2017-04-12 Tom Tromey <tom@tromey.com>
12537
12538 * symfile.h (increment_reading_symtab): Update type.
12539 * symfile.c (decrement_reading_symtab): Remove.
12540 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12541 * psymtab.c (psymtab_to_symtab): Update.
12542 * dwarf2read.c (dw2_instantiate_symtab): Update.
12543
12544 2017-04-12 Tom Tromey <tom@tromey.com>
12545
12546 * jit.c (struct jit_reader): Declare separately. Add constructor
12547 and destructor. Change type of "handle".
12548 (loaded_jit_reader): Define separately.
12549 (jit_reader_load): Update. New "new".
12550 (jit_reader_unload_command): Use "delete".
12551 * gdb-dlfcn.h (struct dlclose_deleter): New.
12552 (gdb_dlhandle_up): New typedef.
12553 (gdb_dlopen, gdb_dlsym): Update types.
12554 (gdb_dlclose): Remove.
12555 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12556 (gdb_dlsym): Change type of "handle".
12557 (make_cleanup_dlclose): Remove.
12558 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12559 * compile/compile-c-support.c (load_libcc): Update.
12560
12561 2017-04-12 Tom Tromey <tom@tromey.com>
12562
12563 * symtab.h (find_pcs_for_symtab_line): Change return type.
12564 * symtab.c (find_pcs_for_symtab_line): Change return type.
12565 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12566 type of "vec". Update.
12567 (ltpy_get_pcs_for_line): Update.
12568 * linespec.c (decode_digits_ordinary): Update.
12569
12570 2017-04-12 Tom Tromey <tom@tromey.com>
12571
12572 * tracepoint.c (actions_command): Update.
12573 * python/python.c (python_command, python_interactive_command):
12574 Update.
12575 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12576 * guile/guile.c (guile_command): Update.
12577 * defs.h (read_command_lines, read_command_lines_1): Return
12578 command_line_up.
12579 (command_lines_deleter): New struct.
12580 (command_line_up): New typedef.
12581 * compile/compile.c (compile_code_command)
12582 (compile_print_command): Update.
12583 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12584 command_line_up.
12585 (make_cleanup_free_command_lines): Remove.
12586 * cli/cli-script.c (get_command_line, read_command_lines_1)
12587 (copy_command_lines): Return command_line_up.
12588 (while_command, if_command, read_command_lines, define_command)
12589 (document_command): Update.
12590 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12591 Remove.
12592 * breakpoint.h (breakpoint_set_commands): Change type of
12593 "commands".
12594 * breakpoint.c (breakpoint_set_commands): Change type of
12595 "commands". Update.
12596 (do_map_commands_command, update_dprintf_command_list)
12597 (create_tracepoint_from_upload): Update.
12598
12599 2017-04-12 Tom Tromey <tom@tromey.com>
12600
12601 * tracepoint.c (scope_info): Update.
12602 * spu-tdep.c (spu_catch_start): Update.
12603 * python/python.c (gdbpy_decode_line): Update.
12604 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12605 * python/py-breakpoint.c (bppy_init): Update.
12606 * probe.c (parse_probes): Update.
12607 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12608 * location.h (event_location_deleter): New struct.
12609 (event_location_up): New typedef.
12610 (new_linespec_location, new_address_location, new_probe_location)
12611 (new_explicit_location, copy_event_location)
12612 (string_to_event_location, string_to_event_location_basic)
12613 (string_to_explicit_location): Update return type.
12614 (make_cleanup_delete_event_location): Remove.
12615 * location.c (new_linespec_location, new_address_location)
12616 (new_probe_location, new_explicit_location, copy_event_location):
12617 Return event_location_up.
12618 (delete_event_location_cleanup)
12619 (make_cleanup_delete_event_location): Remove.
12620 (string_to_explicit_location, string_to_event_location_basic)
12621 (string_to_event_location): Return event_location_up.
12622 * linespec.c (canonicalize_linespec, event_location_to_sals)
12623 (decode_line_with_current_source)
12624 (decode_line_with_last_displayed, decode_objc): Update.
12625 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12626 * completer.c (location_completer): Update.
12627 * cli/cli-cmds.c (edit_command, list_command): Update.
12628 * breakpoint.c (create_overlay_event_breakpoint)
12629 (create_longjmp_master_breakpoint)
12630 (create_std_terminate_master_breakpoint)
12631 (create_exception_master_breakpoint)
12632 (create_thread_event_breakpoint): Update.
12633 (init_breakpoint_sal): Update. Remove some dead code.
12634 (create_breakpoint_sal): Change type of "location". Update.
12635 (create_breakpoints_sal, create_breakpoint, break_command_1)
12636 (dprintf_command, break_range_command, until_break_command)
12637 (init_ada_exception_breakpoint)
12638 (strace_marker_create_sals_from_location)
12639 (update_static_tracepoint, trace_command, ftrace_command)
12640 (strace_command, create_tracepoint_from_upload): Update.
12641 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12642 * ax-gdb.c (agent_command_1): Update.
12643
12644 2017-04-12 Pedro Alves <palves@redhat.com>
12645
12646 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12647 * configure.tgt: Handle i[34567]86-*-go32* and
12648 i[34567]86-*-msdosdjgpp*.
12649 * i386-tdep.c (i386_svr4_reg_to_regnum):
12650 Make extern.
12651 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12652 i386-go32-tdep.c.
12653 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12654 * i386-go32-tdep.c: New file.
12655 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12656 declarations.
12657
12658 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12659
12660 * aix-thread.c (pd_status2str): Change return type to const char *.
12661
12662 2017-04-12 Pedro Alves <palves@redhat.com>
12663
12664 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12665 calls to set_gdbarch_gnu_triplet_regexp.
12666
12667 2017-04-12 Pedro Alves <palves@redhat.com>
12668
12669 PR gdb/21323
12670 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12671 New enum value.
12672 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12673 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12674 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12675 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12676 * gdbarch.h, gdbarch.c: Regenerate.
12677 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12678 gdbarch_wchar_bit and gdbarch_wchar_signed.
12679 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12680 * arm-tdep.c (arm_gdbarch_init): Likewise.
12681 * avr-tdep.c (avr_gdbarch_init): Likewise.
12682 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12683 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12684 * i386-tdep.c (i386_go32_init_abi): Likewise.
12685 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12686 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12687 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12688 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12689 * sh-tdep.c (sh_gdbarch_init): Likewise.
12690 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12691 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12692 * windows-tdep.c (windows_init_abi): Likewise.
12693 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12694
12695 2017-04-12 Pedro Alves <palves@redhat.com>
12696
12697 PR c++/21323
12698 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12699 cplus_primitive_type_char32_t>: New enum values.
12700 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12701 and cplus_primitive_type_char32_t.
12702 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12703 32, use the archtecture's built-in type for char16_t and char32_t,
12704 respectively. Otherwise, fallback to init_integer_type as before,
12705 but make the type unsigned, and issue a complaint.
12706 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12707
12708 2017-04-12 Alan Hayward <alan.hayward@arm.com>
12709
12710 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12711 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12712
12713 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12714
12715 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12716 'const char *'.
12717
12718 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12719
12720 * common/common-utils.c (free_vector_argv): New function.
12721 * common/common-utils.h: Include <vector>.
12722 (free_vector_argv): New prototype.
12723 * darwin-nat.c (darwin_create_inferior): Rewrite function
12724 prototype in order to constify "exec_file" and accept a
12725 "std::string" for "allargs".
12726 * fork-child.c: Include <vector>.
12727 (breakup_args): Rewrite function, using C++.
12728 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12729 and accept "std::string" for "allargs". Update the code to
12730 calculate "argv" based on "allargs". Update calls to "exec_fun"
12731 and "execvp".
12732 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12733 order to constify "exec_file" and accept a "std::string" for
12734 "allargs".
12735 * go32-nat.c (go32_create_inferior): Likewise.
12736 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12737 * infcmd.c (run_command_1): Constify "exec_file". Use
12738 "std::string" for inferior arguments.
12739 * inferior.h (fork_inferior): Update prototype.
12740 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12741 prototype in order to constify "exec_file" and accept a
12742 "std::string" for "allargs".
12743 * nto-procfs.c (procfs_create_inferior): Likewise.
12744 * procfs.c (procfs_create_inferior): Likewise.
12745 * remote-sim.c (gdbsim_create_inferior): Likewise.
12746 * remote.c (extended_remote_run): Update code to accept
12747 "std::string" as argument.
12748 (extended_remote_create_inferior): Rewrite function prototype in
12749 order to constify "exec_file" and accept a "std::string" for
12750 "allargs".
12751 * rs6000-nat.c (super_create_inferior): Likewise.
12752 (rs6000_create_inferior): Likewise.
12753 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12754 * windows-nat.c (windows_create_inferior): Likewise.
12755
12756 2017-04-11 Pedro Alves <palves@redhat.com>
12757
12758 * thread.c: Fix whitespace throughout.
12759
12760 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12761
12762 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12763
12764 2017-04-11 Alan Hayward <alan.hayward@arm.com>
12765
12766 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12767
12768 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12769
12770 PR gdb/21364
12771 * osdata.c (info_osdata): Check if 'type' is an empty string
12772 instead of NULL.
12773
12774 2017-04-10 Pedro Alves <palves@redhat.com>
12775
12776 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12777 (ptid_to_global_thread_id, in_thread_list)
12778 (do_captured_list_thread_ids, set_resumed, set_running)
12779 (set_executing, set_stop_requested, finish_thread_state)
12780 (validate_registers_access, can_access_registers_ptid)
12781 (print_thread_info_1, switch_to_thread)
12782 (do_restore_current_thread_cleanup)
12783 (make_cleanup_restore_current_thread, thread_command)
12784 (thread_name_command): Use operator== instead of ptid_equal.
12785
12786 2017-04-10 Pedro Alves <palves@redhat.com>
12787
12788 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12789 (current_thread_cleanup_chain): Delete.
12790 (restore_current_thread_cleanup_dtor)
12791 (make_cleanup_restore_current_thread): Remove references to
12792 current_thread_cleanup_chain.
12793
12794 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12795
12796 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12797 REG_UNKNOWN.
12798
12799 2017-04-10 Yao Qi <yao.qi@linaro.org>
12800
12801 PR gdb/19942
12802 * gdbthread.h (thread_info::deletable): New method.
12803 (thread_info::incref): New method.
12804 (thread_info::decref): New method.
12805 (thread_info::refcount): Move it to private.
12806 * infrun.c (save_stop_context): Call inc_refcount.
12807 (release_stop_context_cleanup): Likewise.
12808 * thread.c (set_thread_exited): New function.
12809 (init_thread_list): Delete "tp" only it is deletable, otherwise
12810 call set_thread_exited.
12811 (delete_thread_1): Call set_thread_exited.
12812 (current_thread_cleanup) <inferior_pid>: Remove.
12813 <thread>: New field.
12814 (restore_current_thread_ptid_changed): Removed.
12815 (do_restore_current_thread_cleanup): Adjust.
12816 (restore_current_thread_cleanup_dtor): Don't call
12817 find_thread_ptid.
12818 (set_thread_refcount): Use dec_refcount.
12819 (make_cleanup_restore_current_thread): Adjust.
12820 (thread_apply_all_command): Call inc_refcount.
12821 (_initialize_thread): Don't call
12822 observer_attach_thread_ptid_changed.
12823
12824 2017-04-10 Yao Qi <yao.qi@linaro.org>
12825
12826 * thread.c (delete_thread_1): Hoist code on marking thread as
12827 exited.
12828
12829 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12830
12831 * windows-nat.c (windows_detach): Initialize ptid with
12832 minus_one_ptid.
12833
12834 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12835
12836 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12837
12838 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12839
12840 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12841 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12842 (bfin_pseudo_register_write): Likewise
12843
12844 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12845
12846 * common/ptid.h (struct ptid): Change to...
12847 (class ptid_t): ... this.
12848 <ptid_t>: New constructors.
12849 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12850 matches>: New methods.
12851 <make_null, make_minus_one>: New static methods.
12852 <pid>: Rename to...
12853 <m_pid>: ...this.
12854 <lwp>: Rename to...
12855 <m_lwp>: ...this.
12856 <tid>: Rename to...
12857 <m_tid>: ...this.
12858 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12859 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12860 as references, move comment to class ptid_t.
12861 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12862 ptid_t static methods.
12863 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12864 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12865 Take ptid arguments as references, implement using ptid_t methods.
12866 * unittests/ptid-selftests.c: New file.
12867 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12868 unittests/ptid-selftests.c.
12869 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12870
12871 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12872
12873 * python/python.c (python_run_simple_file): Cast mode literal to
12874 non-const char pointer as expected by PyFile_FromString.
12875
12876 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12877
12878 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12879 minus_one_ptid and null_ptid.
12880
12881 2017-04-05 Pedro Alves <palves@redhat.com>
12882
12883 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12884 * configure: Regenerate.
12885
12886 2017-04-05 Pedro Alves <palves@redhat.com>
12887
12888 * ada-exp.y (yyerror): Constify.
12889 * ada-lang.c (bound_name, get_selections)
12890 (ada_variant_discrim_type)
12891 (ada_variant_discrim_name, ada_value_struct_elt)
12892 (ada_lookup_struct_elt_type, is_unchecked_variant)
12893 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12894 (catch_ada_exception_command_split)
12895 (catch_ada_assert_command_split, catch_assert_command)
12896 (ada_op_name): Constify.
12897 * ada-lang.h (ada_yyerror, get_selections)
12898 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12899 * arc-tdep.c (arc_print_frame_cache): Constify.
12900 * arm-tdep.c (arm_skip_stub): Constify.
12901 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12902 (gen_aggregate_elt_ref): Constify.
12903 * bcache.c (print_bcache_statistics): Constify.
12904 * bcache.h (print_bcache_statistics): Constify.
12905 * break-catch-throw.c (catch_exception_command_1):
12906 * breakpoint.c (struct ep_type_description::description):
12907 Constify.
12908 (add_solib_catchpoint): Constify.
12909 (catch_fork_command_1): Add cast.
12910 (add_catch_command): Constify.
12911 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12912 Constify.
12913 * bsd-uthread.c (bsd_uthread_state): Constify.
12914 * buildsym.c (patch_subfile_names): Constify.
12915 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12916 Constify.
12917 * c-exp.y (yyerror): Constify.
12918 (token::oper): Constify.
12919 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12920 * c-varobj.c (cplus_describe_child): Constify.
12921 * charset.c (find_charset_names): Add cast.
12922 (find_charset_names): Constify array and add const_cast.
12923 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12924 (edit_command): Constify.
12925 * cli/cli-decode.c (lookup_cmd): Constify.
12926 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12927 Constify.
12928 (struct dump_context): Constify.
12929 (add_dump_command, restore_command): Constify.
12930 * cli/cli-script.c (get_command_line): Constify.
12931 * cli/cli-script.h (get_command_line): Constify.
12932 * cli/cli-utils.c (check_for_argument): Constify.
12933 * cli/cli-utils.h (check_for_argument): Constify.
12934 * coff-pe-read.c (struct read_pe_section_data): Constify.
12935 * command.h (lookup_cmd): Constify.
12936 * common/print-utils.c (decimal2str): Constify.
12937 * completer.c (gdb_print_filename): Constify.
12938 * corefile.c (set_gnutarget): Constify.
12939 * cp-name-parser.y (yyerror): Constify.
12940 * cp-valprint.c (cp_print_class_member): Constify.
12941 * cris-tdep.c (cris_register_name, crisv32_register_name):
12942 Constify.
12943 * d-exp.y (yyerror): Constify.
12944 (struct token::oper): Constify.
12945 * d-lang.h (d_yyerror): Constify.
12946 * dbxread.c (struct header_file_location::name): Constify.
12947 (add_old_header_file, add_new_header_file, last_function_name)
12948 (dbx_next_symbol_text, add_bincl_to_list)
12949 (find_corresponding_bincl_psymtab, set_namestring)
12950 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12951 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12952 * defs.h (command_line_input, print_address_symbolic)
12953 (deprecated_readline_begin_hook): Constify.
12954 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12955 Constify.
12956 * event-top.c (handle_line_of_input): Constify and add cast.
12957 * exceptions.c (catch_errors): Constify.
12958 * exceptions.h (catch_errors): Constify.
12959 * expprint.c (print_subexp_standard, op_string, op_name)
12960 (op_name_standard, dump_raw_expression, dump_raw_expression):
12961 * expression.h (op_name, op_string, dump_raw_expression):
12962 Constify.
12963 * f-exp.y (yyerror): Constify.
12964 (struct token::oper): Constify.
12965 (struct f77_boolean_val::name): Constify.
12966 * f-lang.c (f_word_break_characters): Constify.
12967 * f-lang.h (f_yyerror): Constify.
12968 * fork-child.c (fork_inferior): Add cast.
12969 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12970 (new_variant): Constify.
12971 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12972 * gdbarch.c: Regenerate.
12973 * gdbcore.h (set_gnutarget): Constify.
12974 * go-exp.y (yyerror): Constify.
12975 (token::oper): Constify.
12976 * go-lang.h (go_yyerror): Constify.
12977 * go32-nat.c (go32_sysinfo): Constify.
12978 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12979 * guile/scm-cmd.c (cmdscm_function): Constify.
12980 * guile/scm-param.c (pascm_param_value): Constify.
12981 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12982 (h8300sx_register_name): Constify.
12983 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12984 Constify.
12985 * ia64-tdep.c (ia64_register_names): Constify.
12986 * infcmd.c (construct_inferior_arguments): Constify.
12987 (path_command, attach_post_wait): Constify.
12988 * language.c (show_range_command, show_case_command)
12989 (unk_lang_error): Constify.
12990 * language.h (language_defn::la_error)
12991 (language_defn::la_name_of_this): Constify.
12992 * linespec.c (decode_line_2): Constify.
12993 * linux-thread-db.c (thread_db_err_str): Constify.
12994 * lm32-tdep.c (lm32_register_name): Constify.
12995 * m2-exp.y (yyerror): Constify.
12996 * m2-lang.h (m2_yyerror): Constify.
12997 * m32r-tdep.c (m32r_register_names): Constify and make static.
12998 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12999 * m88k-tdep.c (m88k_register_name): Constify.
13000 * macroexp.c (appendmem): Constify.
13001 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13002 (upgrade_type, parse_external, parse_partial_symbols)
13003 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13004 (new_symbol): Constify.
13005 * memattr.c (mem_info_command): Constify.
13006 * mep-tdep.c (register_name_from_keyword): Constify.
13007 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13008 Constify.
13009 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13010 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13011 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13012 cast.
13013 (mi_execute_async_cli_command): Constify.
13014 * mips-tdep.c (mips_register_name): Constify.
13015 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13016 (am33_register_name, am33_2_register_name)
13017 * moxie-tdep.c (moxie_register_names): Constify.
13018 * nat/linux-osdata.c (osdata_type): Constify fields.
13019 * nto-tdep.c (nto_parse_redirection): Constify.
13020 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13021 (lookup_child_selector): Constify.
13022 (objc_methcall::name): Constify.
13023 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13024 (lookup_struct_typedef): Constify.
13025 * objfiles.c (pc_in_section): Constify.
13026 * objfiles.h (pc_in_section): Constify.
13027 * p-exp.y (struct token::oper): Constify.
13028 (yyerror): Constify.
13029 * p-lang.h (pascal_yyerror): Constify.
13030 * parser-defs.h (op_name_standard): Constify.
13031 (op_print::string): Constify.
13032 (exp_descriptor::op_name): Constify.
13033 * printcmd.c (print_address_symbolic): Constify.
13034 * psymtab.c (print_partial_symbols): Constify.
13035 * python/py-breakpoint.c (stop_func): Constify.
13036 (bppy_get_expression): Constify.
13037 * python/py-cmd.c (cmdpy_completer::name): Constify.
13038 (cmdpy_function): Constify.
13039 * python/py-event.c (evpy_add_attribute)
13040 (gdbpy_initialize_event_generic): Constify.
13041 * python/py-event.h (evpy_add_attribute)
13042 (gdbpy_initialize_event_generic): Constify.
13043 * python/py-evts.c (add_new_registry): Constify.
13044 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13045 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13046 * python/py-inferior.c (get_buffer): Add cast.
13047 * python/py-param.c (parm_constant::name): Constify.
13048 * python/py-unwind.c (fprint_frame_id): Constify.
13049 * python/python.c (gdbpy_parameter_value): Constify.
13050 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13051 * remote.c (memory_packet_config::name): Constify.
13052 (show_packet_config_cmd, remote_write_bytes)
13053 (remote_buffer_add_string):
13054 * reverse.c (exec_reverse_once): Constify.
13055 * rs6000-tdep.c (variant::name, variant::description): Constify.
13056 * rust-exp.y (rustyyerror): Constify.
13057 * rust-lang.c (rust_op_name): Constify.
13058 * rust-lang.h (rustyyerror): Constify.
13059 * serial.h (serial_ops::name): Constify.
13060 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13061 (sh_sh3e_register_name, sh_sh2e_register_name)
13062 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13063 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13064 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13065 (sh_sh4al_dsp_register_name): Constify.
13066 * sh64-tdep.c (sh64_register_name): Constify.
13067 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13068 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13069 * stabsread.c (patch_block_stabs, read_type_number)
13070 (ref_map::stabs, ref_add, process_reference)
13071 (symbol_reference_defined, define_symbol, define_symbol)
13072 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13073 (read_one_struct_field, read_struct_fields, read_baseclasses)
13074 (read_tilde_fields, read_struct_type, read_array_type)
13075 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13076 (read_huge_number, read_range_type, read_args, common_block_start)
13077 (find_name_end): Constify.
13078 * stabsread.h (common_block_start, define_symbol)
13079 (process_one_symbol, symbol_reference_defined, ref_add):
13080 * symfile.c (get_section_index, add_symbol_file_command):
13081 * symfile.h (get_section_index): Constify.
13082 * target-descriptions.c (tdesc_type::name): Constify.
13083 (tdesc_free_type): Add cast.
13084 * target.c (find_default_run_target):
13085 (add_deprecated_target_alias, find_default_run_target)
13086 (target_announce_detach): Constify.
13087 (do_option): Constify.
13088 * target.h (add_deprecated_target_alias): Constify.
13089 * thread.c (print_thread_info_1): Constify.
13090 * top.c (deprecated_readline_begin_hook, command_line_input):
13091 Constify.
13092 (init_main): Add casts.
13093 * top.h (handle_line_of_input): Constify.
13094 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13095 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13096 (tfind_command): Rename to ...
13097 (tfind_command_1): ... this and constify.
13098 (tfind_command): New function.
13099 (tfind_end_command, tfind_start_command): Adjust.
13100 (encode_source_string): Constify.
13101 * tracepoint.h (encode_source_string): Constify.
13102 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13103 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13104 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13105 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13106 * tui/tui-win.c (parse_scrolling_args): Constify.
13107 * tui/tui-windata.c (tui_erase_data_content): Constify.
13108 * tui/tui-windata.h (tui_erase_data_content): Constify.
13109 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13110 * tui/tui.c (tui_enable): Add cast.
13111 * utils.c (defaulted_query): Constify.
13112 (init_page_info): Add cast.
13113 (puts_debug, subset_compare): Constify.
13114 * utils.h (subset_compare): Constify.
13115 * varobj.c (varobj_format_string): Constify.
13116 * varobj.h (varobj_format_string): Constify.
13117 * vax-tdep.c (vax_register_name): Constify.
13118 * windows-nat.c (windows_detach): Constify.
13119 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13120 * xml-support.c (gdb_xml_end_element): Constify.
13121 * xml-tdesc.c (tdesc_start_reg): Constify.
13122 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13123 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13124 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13125
13126 2017-04-05 Pedro Alves <palves@redhat.com>
13127
13128 * proc-api.c (struct trans): Constify.
13129 (procfs_note): Constify.
13130 * proc-events.c (struct trans, syscall_table):
13131 * proc-flags.c (struct trans): Constify.
13132 * proc-utils.h (procfs_note): Constify.
13133 * proc-why.c (struct trans): Constify.
13134 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13135 (procfs_detach): Constify.
13136 * sol-thread.c (struct string_map): Constify.
13137 (td_err_string, td_state_string): Constify.
13138
13139 2017-04-05 Pedro Alves <palves@redhat.com>
13140
13141 * proc-api.c (procfs_filename): Don't initialize
13142 procfs_filename.
13143 (prepare_to_trace): Assume procfs_filename is non-NULL.
13144 (_initialize_proc_api): Give procfs_filename a default value here.
13145
13146 2017-04-05 Pedro Alves <palves@redhat.com>
13147
13148 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13149 'cond_string' parameter.
13150 (extract_exception_regexp): Constify 'string' parameter.
13151 (catch_exception_command_1): Constify.
13152 * breakpoint.c (init_catchpoint)
13153 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13154 parameter.
13155 (ep_parse_optional_if_clause, catch_fork_command_1)
13156 (catch_exec_command_1): Constify.
13157 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13158 parameter.
13159 (ep_parse_optional_if_clause): Constify.
13160 * cli/cli-utils.c (remove_trailing_whitespace)
13161 (check_for_argument): Constify.
13162 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13163 non-const overload.
13164 (check_for_argument): Likewise.
13165
13166 2017-04-05 Pedro Alves <palves@redhat.com>
13167
13168 * event-top.c (command_line_handler): Add cast to execute_command
13169 call.
13170 * record-btrace.c (cmd_record_btrace_bts_start)
13171 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13172 (cmd_record_btrace_start): Add cast to execute_command call.
13173 * record-full.c (record_full_goto_insn):
13174 * record.c (record_start, record_stop): Add cast to
13175 execute_command_to_string calls.
13176 (cmd_record_start): Add cast to execute_command calls.
13177
13178 2017-04-05 Pedro Alves <palves@redhat.com>
13179
13180 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13181 static inline function.
13182 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13183 array and use gdb_PyArg_ParseTupleAndKeywords.
13184 * python/py-cmd.c (cmdpy_init): Likewise.
13185 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13186 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13187 (infpy_search_memory): Likewise.
13188 * python/py-objfile.c (objfpy_add_separate_debug_file)
13189 (gdbpy_lookup_objfile): Likewise.
13190 * python/py-symbol.c (gdbpy_lookup_symbol)
13191 (gdbpy_lookup_global_symbol): Likewise.
13192 * python/py-type.c (gdbpy_lookup_type): Likewise.
13193 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13194 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13195 Likewise.
13196
13197 2017-04-05 Pedro Alves <palves@redhat.com>
13198
13199 * python/python-internal.h (gdb_PyGetSetDef): New type.
13200 * python/py-block.c (block_object_getset)
13201 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13202 * python/py-event.c (event_object_getset)
13203 (finish_breakpoint_object_getset): Likewise.
13204 * python/py-inferior.c (inferior_object_getset): Likewise.
13205 * python/py-infthread.c (thread_object_getset): Likewise.
13206 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13207 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13208 * python/py-objfile.c (objfile_getset): Likewise.
13209 * python/py-progspace.c (pspace_getset): Likewise.
13210 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13211 Likewise.
13212 * python/py-record.c (recpy_record_getset): Likewise.
13213 * python/py-symbol.c (symbol_object_getset): Likewise.
13214 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13215 Likewise.
13216 * python/py-type.c (type_object_getset, field_object_getset):
13217 Likewise.
13218 * python/py-value.c (value_object_getset): Likewise.
13219
13220 2017-04-05 Pedro Alves <palves@redhat.com>
13221
13222 * python/python-internal.h (gdb_PyObject_CallMethod)
13223 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13224 New functions.
13225 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13226 (PySys_GetObject, PySys_SetPath): New macros.
13227
13228 2017-04-05 Pedro Alves <palves@redhat.com>
13229
13230 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13231 info_osdata_command.
13232 * osdata.c (info_osdata_command): Rename to ...
13233 (info_osdata): ... this. Constify 'type' parameter, and remove
13234 the 'from_tty' parameter. Accept NULL TYPE.
13235 (info_osdata_command): New function.
13236 * osdata.h (info_osdata_command): Remove declaration.
13237 (info_osdata): New declaration.
13238
13239 2017-04-05 Pedro Alves <palves@redhat.com>
13240
13241 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13242 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13243 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13244 parameter.
13245 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13246 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13247 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13248 parameter.
13249 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13250 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13251 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13252 (mi_cmd_file_list_exec_source_files)
13253 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13254 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13255 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13256 parameter.
13257 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13258 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13259 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13260 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13261 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13262 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13263 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13264 'command' parameter.
13265 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13266 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13267 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13268 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13269 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13270 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13271 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13272 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13273 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13274 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13275 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13276 parameter.
13277 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13278 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13279 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13280 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13281 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13282 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13283 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13284 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13285 (mi_cmd_data_list_changed_registers)
13286 (mi_cmd_data_write_register_values)
13287 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13288 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13289 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13290 (mi_cmd_list_features, mi_cmd_list_target_features)
13291 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13292 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13293 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13294 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13295 (mi_cmd_trace_frame_collected): Constify 'command'
13296 parameter.
13297 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13298 'command' parameter.
13299
13300 2017-04-05 Pedro Alves <palves@redhat.com>
13301
13302 * ada-lang.c (ada_completer_word_break_characters): Now a const
13303 array.
13304 (ada_get_gdb_completer_word_break_characters): Constify.
13305 * completer.c (gdb_completer_command_word_break_characters)
13306 (gdb_completer_file_name_break_characters)
13307 (gdb_completer_quote_characters): Now const arrays.
13308 (get_gdb_completer_quote_characters): Constify.
13309 (set_rl_completer_word_break_characters): New function.
13310 (set_gdb_completion_word_break_characters)
13311 (complete_line_internal): Use it.
13312 * completer.h (get_gdb_completer_quote_characters): Constify.
13313 (set_rl_completer_word_break_characters): Declare.
13314 * f-lang.c (f_word_break_characters): Constify.
13315 * language.c (default_word_break_characters): Constify.
13316 * language.h (language_defn::la_word_break_characters): Constify.
13317 (default_word_break_characters): Constify.
13318 * top.c (init_main): Use set_rl_completer_word_break_characters.
13319
13320 2017-04-05 Pedro Alves <palves@redhat.com>
13321
13322 * aix-thread.c (aix_thread_pid_to_str)
13323 (aix_thread_extra_thread_info): Constify.
13324 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13325 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13326 (bsd_uthread_pid_to_str): Constify.
13327 * corelow.c (core_pid_to_str): Constify.
13328 * darwin-nat.c (darwin_pid_to_str): Constify.
13329 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13330 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13331 Constify.
13332 * gnu-nat.c (gnu_pid_to_str): Constify.
13333 * go32-nat.c (go32_pid_to_str): Constify.
13334 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13335 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13336 * inferior.c (inferior_pid_to_str): Constify.
13337 * linux-nat.c (linux_nat_pid_to_str): Constify.
13338 * linux-tdep.c (linux_core_pid_to_str): Constify.
13339 * linux-thread-db.c (thread_db_pid_to_str)
13340 (thread_db_extra_thread_info): Constify.
13341 * nto-tdep.c (nto_extra_thread_info): Constify.
13342 * nto-tdep.h (nto_extra_thread_info): Constify.
13343 * obsd-nat.c (obsd_pid_to_str): Constify.
13344 * procfs.c (procfs_pid_to_str): Constify.
13345 * ravenscar-thread.c (ravenscar_extra_thread_info)
13346 (ravenscar_pid_to_str): Constify.
13347 * remote-sim.c (gdbsim_pid_to_str): Constify.
13348 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13349 Constify.
13350 * sol-thread.c (solaris_pid_to_str): Constify.
13351 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13352 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13353 * target.c (default_pid_to_str, target_pid_to_str)
13354 (normal_pid_to_str, default_pid_to_str): Constify.
13355 * target.h (target_ops::to_pid_to_str)
13356 (target_ops::to_extra_thread_info): Constify.
13357 (target_pid_to_str, normal_pid_to_str): Constify.
13358 * windows-nat.c (windows_pid_to_str): Constify.
13359 * gdbarch.sh (core_pid_to_str): Constify.
13360 * target-delegates.c: Regenerate.
13361 * gdbarch.h, gdbarch.c: Regenerate.
13362
13363 2017-04-05 Pedro Alves <palves@redhat.com>
13364
13365 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13366 the memory of the temporary warning_pre_print override.
13367 * utils.c (warning_pre_print): Constify.
13368 * utils.h (warning_pre_print): Constify.
13369
13370 2017-04-05 Pedro Alves <palves@redhat.com>
13371
13372 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13373 (shell_command): New function.
13374 (make_command): Use std::string.
13375 (init_cli_cmds): Register shell_command instead of shell_escape.
13376
13377 2017-04-05 Pedro Alves <palves@redhat.com>
13378
13379 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13380 * tracepoint.c (default_collect): Don't initialize.
13381
13382 2017-04-05 Pedro Alves <palves@redhat.com>
13383
13384 * macroexp.c (macro_buffer::shared): Now a bool.
13385 (init_buffer): Update.
13386 (init_shared_buffer): Constify 'addr' parameter.
13387 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13388 casts.
13389
13390 2017-04-05 Pedro Alves <palves@redhat.com>
13391
13392 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13393 * disasm.c (set_disassembler_options): Constify local.
13394 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13395
13396 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13397
13398 PR gdb/21352
13399 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13400 option.
13401
13402 2017-04-05 Yao Qi <yao.qi@linaro.org>
13403
13404 * frame.c (frame_unwind_register_unsigned): Call
13405 frame_unwind_register_value.
13406
13407 2017-04-05 Yao Qi <yao.qi@linaro.org>
13408
13409 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13410 Use gdb_test_multiple, and don't match anchor.
13411
13412 2017-04-05 Pedro Alves <palves@redhat.com>
13413
13414 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13415 (Write After Approval): Remove Simon Marchi.
13416
13417 2017-04-05 Pedro Alves <palves@redhat.com>
13418
13419 * common/gdb_optional.h (optional::optional): Make constexpr and
13420 initialize m_dummy.
13421
13422 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13423
13424 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13425 (amd64fbsd_jmp_buf_reg_offset): Remove.
13426 (amd64fbsd_supply_uthread): Remove function.
13427 (amd64fbsd_collect_uthread): Remove function.
13428 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13429 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13430 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13431 (fbsd-nat.c): Update comment.
13432 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13433 (i386fbsd_jmp_buf_reg_offset): Remove.
13434 (i386fbsd_supply_uthread): Remove function.
13435 (i386fbsd_collect_uthread): Remove function.
13436 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13437
13438 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13439
13440 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13441 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13442 * NEWS: Mention that support for FreeBSD/alpha was removed.
13443 * alpha-fbsd-tdep.c: Delete file.
13444 * config/alpha/fbsd.mh: Delete file.
13445 * configure.host: Delete alpha*-*-freebsd* and
13446 alpha*-*-kfreebsd*-gnu.
13447 * configure.tgt: Delete alpha*-*-freebsd* and
13448 alpha*-*-kfreebsd*-gnu.
13449
13450 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13451
13452 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13453 amd64bsd_store_inferior_registers): Use ptid from regcache.
13454
13455 2017-04-04 Pedro Alves <palves@redhat.com>
13456
13457 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13458 data fields, make them private and add "m_" prefixes.
13459 (lnp_state_machine::lnp_state_machine): New ctor.
13460 (record_line, check_line_address, handle_set_discriminator)
13461 (handle_set_address, handle_advance_pc, handle_special_opcode)
13462 (handle_advance_line, handle_set_file, handle_negate_stmt)
13463 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13464 (end_sequence, advance_line): New methods.
13465 (m_gdbarch, m_record_lines_p): New fields.
13466 (lnp_reader_state): Delete.
13467 (dwarf_record_line): Rename to ...
13468 (lnp_state_machine::record_line): ... adjust.
13469 (init_lnp_state_machine): Delete.
13470 (lnp_state_machine::lnp_state_machine): New.
13471 (check_line_address): Rename to ...
13472 (lnp_state_machine::check_line_address): This.
13473 (dwarf_decode_lines_1): Remove reference to "reader_state".
13474 Adjust lnp_state_machine having a non-default ctor. Use bool.
13475 State machine internal state manipulation moved to
13476 lnp_state_machine methods.
13477
13478 2017-04-04 Pedro Alves <palves@redhat.com>
13479
13480 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13481 unittests/offset-type-selftests.c.
13482 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13483 * common/offset-type.h: New file.
13484 * common/preprocessor.h: New file.
13485 * common/traits.h: New file.
13486 * common/valid-expr.h: New file.
13487 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13488 sect_offset and cu_offset strong typedefs throughout.
13489 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13490 typedefs throughout.
13491 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13492 sect_offset and cu_offset strong typedefs throughout.
13493 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13494 typedefs throughout.
13495 * gdbtypes.h: Include "common/offset-type.h".
13496 (cu_offset): Now an offset type (strong typedef) instead of a
13497 struct.
13498 (sect_offset): Likewise.
13499 (union call_site_parameter_u): Rename "param_offset" field to
13500 "param_cu_off".
13501 * unittests/offset-type-selftests.c: New file.
13502
13503 2017-04-04 Pedro Alves <palves@redhat.com>
13504
13505 * common/underlying.h: New file.
13506 * dwarf2read.c: Include "common/gdb_optional.h" and
13507 "common/underlying.h".
13508 (dir_index, file_name_index): New types.
13509 (file_entry): Use them.
13510 (file_entry::include): Use to_underlying.
13511 (line_header::add_file_name): Use dir_index.
13512 (read_formatted_entries): Use gdb::optional. Read form before
13513 writting to file_entry.
13514 (dwarf_decode_line_header): Use dir_index.
13515 (lnp_state_machine::current_file): Use to_underlying.
13516 (lnp_state_machine::file): Change type to file_name_index.
13517 (dwarf_record_line): Use to_underlying.
13518 (init_lnp_state_machine): Use file_name_index.
13519 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13520
13521 2017-04-04 Pedro Alves <palves@redhat.com>
13522
13523 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13524 operator bool, has_value and get methods.
13525
13526 2017-04-04 Pedro Alves <palves@redhat.com>
13527
13528 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13529 fields.
13530 (line_header): Initialize all data fields. Change type of
13531 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13532 Change type of include_dirs to std::vector<const char *>. Remove
13533 num_include_dirs, include_dirs_size. Change type of file_names to
13534 std::vector<file_entry>. Remove num_file_names, file_names_size.
13535 (line_header::line_header): New.
13536 (line_header::add_include_dir, line_header::add_file_name): New
13537 methods.
13538 (line_header::include_dir_at): Remove NULL check.
13539 (line_header::file_name_at): Add const overload.
13540 (line_header_up): New unique_ptr typedef.
13541 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13542 std::vector. Remove free_line_header call.
13543 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13544 free_line_header call.
13545 (free_cu_line_header): Delete.
13546 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13547 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13548 Adjust to use std::vector.
13549 (free_line_header): Delete.
13550 (free_line_header_voidp): Use delete.
13551 (add_include_dir): Replace with ...
13552 (line_header::add_include_dir): ... this method. Use std::vector.
13553 (add_file_name): Replace with ...
13554 (line_header::add_file_name): ... this method. Use std::vector.
13555 (add_include_dir_stub): Delete.
13556 (read_formatted_entries): Remove memset.
13557 (dwarf_decode_line_header): Return a line_header_up instead of a
13558 raw pointer. Remove cleanup handling. Pass lambdas to
13559 read_formatted_entries. Adjust to use line_header methods.
13560 (dwarf_decode_lines_1): Adjust to use line_header methods.
13561 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13562 use std::vector.
13563
13564 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13565
13566 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13567 instead of struct ptid.
13568
13569 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13570
13571 * frame.c (get_frame_register_bytes): Unwind using value.
13572 (put_frame_register_bytes): Likewise.
13573
13574 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13575
13576 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13577 aggregate-like.
13578
13579 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13580
13581 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13582
13583 2017-03-29 Yao Qi <yao.qi@linaro.org>
13584
13585 * gdbthread.h (struct thread_info): Declare constructor and
13586 destructor. Add some in-class member initializers.
13587 * thread.c (free_thread): Remove.
13588 (init_thread_list): Call delete instead of free_thread.
13589 (new_thread): Call thread_info constructor.
13590 (thread_info::thread_info): New function.
13591 (thread_info::~thread_info): New function.
13592 (delete_thread_1): Call delete instead of free_thread.
13593 (make_cleanup_restore_current_thread): Move tp and frame to
13594 inner block.
13595
13596 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13597
13598 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13599 (arc_skip_prologue): Likewise.
13600 (arc_make_frame_cache): Likewise.
13601 (arc_pv_get_operand): New function.
13602 (arc_is_in_prologue): Likewise.
13603 (arc_analyze_prologue): Likewise.
13604 (arc_print_frame_cache): Likewise.
13605 (MAX_PROLOGUE_LENGTH): New constant.
13606
13607 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13608
13609 * configure.tgt: Add arc-insn.o.
13610 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13611 (dump_arc_instruction_command): New function.
13612 (arc_fprintf_disasm): Likewise.
13613 (arc_disassemble_info): Likewise.
13614 (arc_insn_get_operand_value): Likewise.
13615 (arc_insn_get_operand_value_signed): Likewise.
13616 (arc_insn_get_memory_base_reg): Likewise.
13617 (arc_insn_get_memory_offset): Likewise.
13618 (arc_insn_get_branch_target): Likewise.
13619 (arc_insn_dump): Likewise.
13620 (arc_insn_get_linear_next_pc): Likewise.
13621 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13622 (arc_disassemble_info): Likewise.
13623 (arc_insn_get_branch_target): Likewise.
13624 (arc_insn_get_linear_next_pc): Likewise.
13625 * NEWS: Mention new "maint print arc arc-instruction".
13626
13627 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13628
13629 * arc-tdep (maintenance_print_arc_list): New variable.
13630 (maintenance_print_arc_command): New function.
13631
13632 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13633
13634 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13635 Add "limm" and "reserved".
13636 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13637 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13638 * arc-tdep.h (arc_regnum): Likewise.
13639
13640 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13641
13642 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13643 for THREADPTR register.
13644 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13645 register.
13646 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13647 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13648 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13649
13650 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13651
13652 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13653 registers above gdbarch_num_regs (gdbarch) as privileged in
13654 call0 ABI.
13655
13656 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13657
13658 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13659 for a single specified register or for all registers in
13660 a0_base..a0_base + C0_NREGS range.
13661 (supply_gregset_reg): Call regcache_raw_supply for a single
13662 specified register or for all registers in a0_base..a0_base +
13663 C0_NREGS range.
13664
13665 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13666
13667 * arch/xtensa.h (C0_NREGS): Add definition.
13668 * xtensa-tdep.c (C0_NREGS): Remove definition.
13669
13670 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13671
13672 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13673 Drop xtensa_default_isa initialization.
13674 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13675
13676 2017-03-27 Pedro Alves <palves@redhat.com>
13677
13678 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13679 (file_entry::include_dir): New method.
13680 (line_header::include_dir_at, line_header::file_name_at): New
13681 methods.
13682 (setup_type_unit_groups, setup_type_unit_groups)
13683 (psymtab_include_file_name): Simplify using the new methods.
13684 (lnp_state_machine) <the_line_header>: New field.
13685 <file>: Add comment.
13686 (lnp_state_machine::current_file): New method.
13687 (dwarf_record_line): Simplify using the new methods.
13688 (init_lnp_state_machine): Initialize the "the_line_header" field.
13689 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13690 Simplify using the new methods.
13691
13692 2017-03-27 Pedro Alves <palves@redhat.com>
13693
13694 * cp-name-parser.y (make_empty): Delete.
13695 (demangler_special, nested_name, ptr_operator, array_indicator)
13696 (direct_declarator, declarator_1): Use fill_comp instead of
13697 make_empty.
13698
13699 2017-03-27 Pedro Alves <palves@redhat.com>
13700
13701 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13702 to ATTRIBUTE_PRINTF.
13703 * solib-target.c (library_list_start_list): Print "string" not
13704 "version".
13705 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13706 gdb_xml_error call.
13707
13708 2017-03-27 Pedro Alves <palves@redhat.com>
13709
13710 * dwarf2read.c (struct file_and_directory): New.
13711 (dwarf2_get_dwz_file): Adjust to use std::string.
13712 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13713 (find_file_and_directory): Adjust to return a file_and_directory
13714 object.
13715 (read_file_scope): Adjust to use file_and_directory. Remove
13716 make_cleanup/do_cleanups calls.
13717 (open_and_init_dwp_file): Adjust to use std::string. Remove
13718 make_cleanup/do_cleanups calls.
13719 * python/python.c (do_start_initialization): Adjust to ldirname
13720 returning a std::string.
13721 * utils.c (ldirname): Now returns a std::string.
13722 * utils.h (ldirname): Change return type to std::string.
13723 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13724 returning a std::string.
13725 * xml-tdesc.c (file_read_description_xml): Likewise.
13726
13727 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13728
13729 * regcache.c (regcache_debug_print_register): New function.
13730 * regcache.h (regcache_debug_print_register): New declaration.
13731 * target.c (debug_print_register): Remove.
13732 (target_fetch_registers): Call regcache_debug_print_register.
13733 (target_store_registers): Likewise.
13734
13735 2017-03-24 Pádraig Brady <pbrady@fb.com>
13736
13737 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13738 reference beyond the 'lh->include_dirs' array before accessing to
13739 it.
13740 (psymtab_include_file_name): Likewise.
13741 (dwarf_decode_lines_1): Likewise.
13742 (dwarf_decode_lines): Likewise.
13743 (file_file_name): Likewise.
13744
13745 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13746
13747 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13748 inferior_ptid.
13749 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13750 ps_lsetfpregs): Likewise.
13751 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13752 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13753 ps_lsetfpregs): Likewise.
13754 * target.c (target_fetch_registers, target_store_registers):
13755 Remove asserts.
13756
13757 2017-03-23 Alan Hayward <alan.hayward@arm.com>
13758
13759 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13760
13761 2017-03-23 Yao Qi <yao.qi@linaro.org>
13762
13763 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13764 (_initialize_aarch64_tdep): Register it.
13765 (aarch64_record_load_store): Handle PRFM instruction.
13766 (aarch64_process_record_test): New function.
13767
13768 2017-03-23 Yao Qi <yao.qi@linaro.org>
13769
13770 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13771 indentation.
13772
13773 2017-03-23 Yao Qi <yao.qi@linaro.org>
13774
13775 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13776
13777 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13778
13779 python/python.c (do_start_initialization): Fix memory leak.
13780
13781 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13782
13783 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13784 using get_ptrace_pid.
13785 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13786 inferior_ptid.
13787 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13788 inferior_ptid instead of pid.
13789
13790 2017-03-22 Yao Qi <yao.qi@linaro.org>
13791
13792 * aarch64-tdep.c: Wrap locally used classes in anonymous
13793 namespace.
13794 * arm-tdep.c: Likewise.
13795 * linespec.c: Likewise.
13796 * ui-out.c: Likewise.
13797
13798 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13799
13800 PR gdb/19637
13801 * python/lib/gdb/printer/bound_registers.py: Import sys.
13802
13803 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13804
13805 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13806 windows_thread_info parameter and use it instead of
13807 current_thread.
13808 (windows_fetch_inferior_registers): Don't set current_thread,
13809 pass the thread to do_windows_fetch_inferior_registers. Use
13810 ptid from regcache instead of inferior_ptid.
13811 (do_windows_store_inferior_registers): Add windows_thread_info
13812 parameter and use it instead of current_thread.
13813 (windows_store_inferior_registers): Don't set current_thread,
13814 pass the thread to do_windows_store_inferior_registers. Use
13815 ptid from regcache instead of inferior_ptid.
13816
13817 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13818
13819 * ser-mingw.c (ser_windows_raw): Remove reference to
13820 struct serial::current_timeout.
13821
13822 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13823
13824 PR tdep/20928
13825 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13826 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13827 (sparc64_fsr_type): Fix %fsr decoding.
13828
13829 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13830
13831 * python/py-record-btrace.c (btpy_insn_data): Change return type
13832 for Python 2.
13833
13834 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13835
13836 * spu-linux-nat.c (spu_fetch_inferior_registers,
13837 spu_store_inferior_registers): Use ptid from regcache, set and
13838 restore inferior_ptid.
13839 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13840 Likewise.
13841
13842 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13843
13844 * i386-linux-nat.c (fetch_register, store_register,
13845 i386_linux_fetch_inferior_registers,
13846 i386_linux_store_inferior_registers): Use ptid from regcache.
13847 * ia64-linux-nat.c (ia64_linux_fetch_register,
13848 ia64_linux_store_register): Likewise.
13849 * inf-ptrace.c (inf_ptrace_fetch_register,
13850 inf_ptrace_store_register): Likewise.
13851 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13852 m32r_linux_store_inferior_registers): Likewise.
13853 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13854 m68kbsd_store_inferior_registers): Likewise.
13855 * m68k-linux-nat.c (fetch_register, store_register,
13856 m68k_linux_fetch_inferior_registers,
13857 m68k_linux_store_inferior_registers): Likewise.
13858 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13859 m88kbsd_store_inferior_registers): Likewise.
13860 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13861 mips_fbsd_store_inferior_registers): Likewise.
13862 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13863 mips64_linux_regsets_store_registers): Likewise.
13864 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13865 mipsnbsd_store_inferior_registers): Likewise.
13866 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13867 mips64obsd_store_inferior_registers): Likewise.
13868 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13869 Likewise.
13870 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13871 ppcfbsd_store_inferior_registers): Likewise.
13872 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13873 ppc_linux_store_inferior_registers): Likewise.
13874 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13875 ppcnbsd_store_inferior_registers): Likewise.
13876 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13877 ppcobsd_store_registers): Likewise.
13878 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13879 Likewise.
13880 * ravenscar-thread.c (ravenscar_fetch_registers,
13881 ravenscar_store_registers, ravenscar_prepare_to_store):
13882 Likewise.
13883 * record-btrace.c (record_btrace_fetch_registers,
13884 record_btrace_store_registers, record_btrace_prepare_to_store):
13885 Likewise.
13886 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13887 Lookup inferior using ptid from regcache, instead of
13888 current_inferior.
13889 * remote.c (remote_fetch_registers, remote_store_registers): Use
13890 ptid from regcache.
13891 * rs6000-nat.c (fetch_register, store_register): Likewise.
13892 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13893 s390_linux_store_inferior_registers): Likewise.
13894 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13895 shnbsd_store_inferior_registers): Likewise.
13896 * sol-thread.c (sol_thread_fetch_registers,
13897 sol_thread_store_registers): Likewise.
13898 * sparc-nat.c (sparc_fetch_inferior_registers,
13899 sparc_store_inferior_registers): Likewise.
13900 * tilegx-linux-nat.c (fetch_inferior_registers,
13901 store_inferior_registers): Likewise.
13902 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13903 vaxbsd_store_inferior_registers): Likewise.
13904 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13905 store_xtregs): Likewise.
13906
13907 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13908
13909 PR gdb/14441
13910 * NEWS: Mention support for rvalue references in GDB and python.
13911 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13912 supports both lvalue and rvalue references.
13913
13914 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13915
13916 PR gdb/14441
13917 * gdbtypes.c (rank_one_type): Implement overloading
13918 resolution rules regarding rvalue references.
13919
13920 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13921
13922 PR gdb/14441
13923 * aarch64-tdep.c (aarch64_type_align)
13924 (aarch64_extract_return_value, aarch64_store_return_value): Change
13925 lvalue reference type checks to general reference type checks.
13926 * amd64-tdep.c (amd64_classify): Likewise.
13927 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13928 Likewise.
13929 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13930 (arm_store_return_value): Likewise.
13931 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13932 * c-typeprint.c (c_print_type): Likewise.
13933 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13934 (cplus_number_of_children, cplus_describe_child): Likewise.
13935 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13936 * completer.c (expression_completer): Likewise.
13937 * cp-support.c (make_symbol_overload_list_adl_namespace):
13938 Likewise.
13939 * darwin-nat-info.c (info_mach_region_command): Likewise.
13940 * dwarf2loc.c (entry_data_value_coerce_ref)
13941 (value_of_dwarf_reg_entry): Likewise.
13942 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13943 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13944 Likewise.
13945 * findvar.c (extract_typed_address, store_typed_address):
13946 Likewise.
13947 * gdbtypes.c (rank_one_type): Likewise.
13948 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13949 * infcall.c (value_arg_coerce): Likewise.
13950 * language.c (pointer_type): Likewise.
13951 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13952 Likewise.
13953 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13954 * mn10300-tdep.c (mn10300_type_align): Likewise.
13955 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13956 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13957 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13958 Likewise.
13959 * printcmd.c (print_formatted, x_command): Likewise.
13960 * python/py-type.c (typy_get_composite, typy_template_argument):
13961 Likewise.
13962 * python/py-value.c (valpy_referenced_value)
13963 (valpy_get_dynamic_type, value_has_field): Likewise.
13964 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13965 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13966 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13967 * spu-tdep.c (spu_scalar_value_p): Likewise.
13968 * symtab.c (lookup_symbol_aux): Likewise.
13969 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13970 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13971 Likewise.
13972 * valops.c (value_cast_pointers, value_cast)
13973 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13974 (value_struct_elt, value_struct_elt_bitpos)
13975 (value_find_oload_method_list, find_overload_match)
13976 (value_rtti_indirect_type): Likewise.
13977 * valprint.c (val_print_scalar_type_p, generic_val_print):
13978 Likewise.
13979 * value.c (value_actual_type, value_as_address, unpack_long)
13980 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13981 (coerce_ref): Likewise.
13982 * varobj.c (varobj_get_value_type): Likewise.
13983
13984 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13985
13986 PR gdb/14441
13987 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13988 table of constants.
13989 * python/lib/gdb/command/explore.py: Support exploring values
13990 of rvalue reference types.
13991 * python/lib/gdb/types.py: Implement get_basic_type() for
13992 rvalue reference types.
13993 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13994 constant.
13995 * python/py-value.c (valpy_getitem): Add an rvalue reference
13996 check.
13997 (valpy_reference_value): Add new parameter "refcode".
13998 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13999 New wrappers for valpy_reference_value().
14000 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14001 (gdbpy_invoke_xmethod): Likewise.
14002
14003 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14004
14005 PR gdb/14441
14006 * dwarf2read.c (process_die, read_type_die_1): Handle the
14007 DW_TAG_rvalue_reference_type DIE.
14008 (read_tag_reference_type): Add new parameter "refcode".
14009
14010 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14011
14012 PR gdb/14441
14013 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14014 (c_type_print_modifier, c_type_print_varspec_suffix)
14015 (c_type_print_base): Support printing rvalue reference types.
14016 * c-valprint.c (c_val_print, c_value_print): Support printing
14017 rvalue reference values.
14018
14019 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14020
14021 PR gdb/14441
14022 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14023 typename.
14024 * cp-support.c (replace_typedefs): Handle
14025 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14026 * python/py-type.c (typy_lookup_type): Likewise.
14027
14028 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14029
14030 PR gdb/14441
14031 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14032 * parse.c (insert_type): Change assert statement.
14033 (follow_types): Handle rvalue reference types.
14034 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14035 constant.
14036
14037 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14038
14039 PR gdb/14441
14040 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14041 value_ref() interface.
14042 * c-valprint.c (c_value_print): Likewise.
14043 * infcall.c (value_arg_coerce): Likewise.
14044 * python/py-value.c (valpy_reference_value): Likewise.
14045 * valops.c (value_cast, value_reinterpret_cast)
14046 (value_dynamic_cast, typecmp): Likewise.
14047 (value_ref): Parameterize by kind of return value reference type.
14048 * value.h (value_ref): Add new parameter "refcode".
14049
14050 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14051
14052 PR gdb/14441
14053 * dwarf2read.c (read_tag_reference_type): Use
14054 lookup_lvalue_reference_type() instead of lookup_reference_type().
14055 * eval.c (evaluate_subexp_standard): Likewise.
14056 * f-exp.y: Likewise.
14057 * gdbtypes.c (make_reference_type, lookup_reference_type):
14058 Generalize with rvalue reference types.
14059 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14060 convenience wrappers for lookup_reference_type().
14061 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14062 reference kind parameter.
14063 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14064 wrappers for lookup_reference_type().
14065 * guile/scm-type.c (gdbscm_type_reference): Use
14066 lookup_lvalue_reference_type() instead of lookup_reference_type().
14067 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14068 * parse.c (follow_types): Likewise.
14069 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14070 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14071 Likewise.
14072 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14073 (gdbpy_invoke_xmethod): Likewise.
14074 * stabsread.c: Provide extra argument to make_reference_type()
14075 call.
14076 * valops.c (value_ref, value_rtti_indirect_type): Use
14077 lookup_lvalue_reference_type() instead of lookup_reference_type().
14078
14079 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14080
14081 PR gdb/14441
14082 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14083 (TYPE_IS_REFERENCE): New macro.
14084 (struct type): Add rvalue_reference_type field.
14085 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14086
14087 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14088
14089 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14090 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14091 New function definition.
14092 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14093 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14094 New function declaration.
14095 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14096 * mi/mi-interp.h: New file.
14097 * solib.c (info_sharedlibrary_command): Replace for loop with
14098 ALL_SO_LIBS macro
14099 * solib.h (update_solib_list): New function declaration.
14100 (so_list_head): Move macro.
14101 * solist.h (ALL_SO_LIBS): New macro.
14102
14103 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14104
14105 * infcmd.c (post_create_inferior): Remove unused argument in
14106 call to solib_add.
14107 * remote.c (remote_start_remote): Likewise.
14108 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14109 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14110 (enable_break): Likewise.
14111 * solib.c (update_solib_list): Remove unused target argument
14112 and its documentation.
14113 (solib_add): Remove unused target argument. Remove unused
14114 argument in call to update_solib_list.
14115 (info_sharedlibrary_command): Remove unused argument in call
14116 to update_solib_list.
14117 (sharedlibrary_command): Remove unused argument in call to
14118 solib_add.
14119 (handle_solib_event): Likewise.
14120 (reload_shared_libraries): Likewise.
14121 * solib.h (solib_add): Remove unused target argument.
14122
14123 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14124
14125 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14126 (s390_displaced_step_fixup): Cover relative branches with the
14127 default fixup handling. This fixes lack of support for some
14128 relative branch instructions.
14129
14130 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14131
14132 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14133 ptid from regcache.
14134
14135 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14136
14137 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14138 i386_darwin_store_inferior_registers): Use ptid from regcache.
14139
14140 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14141
14142 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14143 i386bsd_store_inferior_registers): Use ptid from regcache.
14144
14145 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14146
14147 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14148 hppaobsd_store_registers): Use ptid from regcache.
14149
14150 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14151
14152 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14153 hppanbsd_store_registers): Use ptid from regcache.
14154
14155 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14156
14157 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14158 from regcache. Use get_ptrace_pid.
14159
14160 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14161
14162 * corelow.c (get_core_register_section): Use ptid from regcache,
14163 update doc.
14164
14165 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14166
14167 * bsd-uthread.c (bsd_uthread_fetch_registers,
14168 bsd_uthread_store_registers): Use ptid from regcache, set and
14169 restore inferior_ptid.
14170
14171 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14172
14173 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14174 fetch_fp_regs, store_register, store_regs, store_fp_register,
14175 store_fp_regs): Use ptid from regcache.
14176
14177 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14178
14179 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14180 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14181 store_vfp_regs): Use ptid from regcache.
14182
14183 2017-03-17 Pedro Alves <palves@redhat.com>
14184
14185 PR remote/21188
14186 * ser-base.c (ser_base_wait_for): Add comment.
14187 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14188 version.
14189 * ser-unix.c (hardwire_raw): Remove reference to
14190 scb->current_timeout.
14191 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14192 (hardwire_ops): Install ser_base_readchar instead of
14193 hardwire_readchar.
14194 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14195 Remove fields.
14196
14197 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14198
14199 PR gdb/19637
14200 * python/lib/gdb/printer/bound_registers.py: Add support for
14201 Python 3.
14202
14203 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14204
14205 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14206 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14207 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14208 byte_offset to subobj_byte_offset. Fix the handling of
14209 DWARF_VALUE_STACK on big-endian targets when coming via an
14210 implicit pointer.
14211 (dwarf2_evaluate_loc_desc): Adjust call to
14212 dwarf2_evaluate_loc_desc_full.
14213 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14214 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14215
14216 2017-03-16 Yao Qi <yao.qi@linaro.org>
14217
14218 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14219 and REVSH instructions.
14220
14221 2017-03-16 Yao Qi <yao.qi@linaro.org>
14222
14223 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14224 (arm_record_test): Declare.
14225 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14226 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14227 align with the manual.
14228 (thumb_record_misc): Adjust the code order to align with the
14229 manual.
14230 (thumb2_record_decode_insn_handler): Fix instruction matching.
14231 (instruction_reader_thumb): New class.
14232 (arm_record_test): New function.
14233
14234 2017-03-16 Yao Qi <yao.qi@linaro.org>
14235
14236 * arm-tdep.c (abstract_memory_reader): New class.
14237 (instruction_reader): New class.
14238 (extract_arm_insn): Add argument 'reader'. Callers updated.
14239 (decode_insn): Likewise.
14240
14241 2017-03-16 Doug Evans <dje@google.com>
14242
14243 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14244 member. Change type of TYPE member to SCM. All uses updated.
14245 (lsscm_make_lazy_string_smob): Add assert.
14246 (lsscm_make_lazy_string): Flag bad length values.
14247 (lsscm_elt_type): New function.
14248 (gdbscm_lazy_string_to_value): Rewrite to use
14249 lsscm_safe_lazy_string_to_value.
14250 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14251 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14252 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14253 in incoming type.
14254 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14255 * guile/scm-type.c (tyscm_scm_to_type): New function.
14256
14257 2017-03-15 Doug Evans <dje@google.com>
14258
14259 PR python/17728, python/18439, python/18779
14260 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14261 member. Change type of TYPE member to PyObject *. All uses updated.
14262 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14263 (gdbpy_create_lazy_string_object): Flag bad length values.
14264 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14265 Handle typedefs in incoming type.
14266 (stpy_lazy_string_elt_type): New function.
14267 (gdbpy_extract_lazy_string): Call it.
14268 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14269 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14270 typedefs in incoming type.
14271
14272 2017-03-16 Doug Evans <dje@google.com>
14273
14274 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14275 * guile/scm-type.c (tyscm_scm_to_type): New function.
14276
14277 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14278
14279 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14280 "ULONGEST" for "skip".
14281
14282 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14283
14284 PR gdb/21220
14285 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14286 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14287 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14288 over ptrace peek/poke until end of buffer or error.
14289
14290 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14291
14292 * parse.c (length_of_subexp): Make static.
14293 * parser-defs.h (length_of_subexp): Remove.
14294
14295 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14296
14297 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14298 as well.
14299
14300 2017-03-14 Pedro Alves <palves@redhat.com>
14301
14302 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14303 (main): Use std::unique_ptr. Remove calls to
14304 cp_demangled_name_parse_free.
14305
14306 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14307
14308 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14309 alphabsd_store_inferior_registers): Use regcache->ptid instead
14310 of inferior_ptid.
14311
14312 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14313
14314 * aix-thread.c (aix_thread_fetch_registers,
14315 aix_thread_store_registers): Use regcache->ptid instead of
14316 inferior_ptid.
14317
14318 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14319
14320 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14321 store_gregs_to_thread, fetch_fpregs_from_thread,
14322 store_fpregs_to_thread): Use regcache->ptid instead of
14323 inferior_ptid.
14324
14325 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14326
14327 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14328 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14329 instead of inferior_ptid.
14330
14331 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14332
14333 * target.c (target_fetch_registers, target_store_registers): Add
14334 assert.
14335
14336 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14337
14338 * regcache.h (regcache_get_ptid): New function.
14339 * regcache.c (regcache_get_ptid): New function.
14340
14341 2017-03-13 Mark Wielaard <mark@klomp.org>
14342
14343 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14344
14345 2017-03-10 Keith Seitz <keiths@redhat.com>
14346
14347 PR c++/8218
14348 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14349
14350 2017-03-08 Pedro Alves <palves@redhat.com>
14351
14352 PR gdb/18360
14353 * infrun.c (start_step_over, do_target_resume, resume)
14354 (restart_threads): Assert we're not resuming a thread that is
14355 meant to be stopped.
14356 (infrun_thread_stop_requested_callback): Delete.
14357 (infrun_thread_stop_requested): If the thread is internally
14358 stopped, queue a pending stop event and clear the thread's
14359 inline-frame state.
14360 (handle_stop_requested): New function.
14361 (handle_syscall_event, handle_inferior_event_1): Use
14362 handle_stop_requested.
14363 (handle_stop_requested): New function.
14364 (handle_signal_stop): Set the thread's stop_signal here instead of
14365 at caller.
14366 (finish_step_over): Clear step over info unconditionally.
14367 (handle_signal_stop): If the user had interrupted the event
14368 thread, consider the stop a random signal.
14369 (handle_signal_stop) <signal arrived while stepping over
14370 breakpoint>: Don't restart threads here.
14371 (stop_waiting): Don't clear step-over info here.
14372
14373 2017-03-08 Pedro Alves <palves@redhat.com>
14374
14375 PR 21206
14376 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14377 goes to argument 2, not 1.
14378
14379 2017-03-08 Pedro Alves <palves@redhat.com>
14380
14381 PR cli/21218
14382 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14383 display_gdb_prompt.
14384 (command_line_input): Add comment.
14385
14386 2017-03-08 Pedro Alves <palves@redhat.com>
14387
14388 PR tui/21216
14389 * tui/tui-file.c (tui_file::write): New.
14390 * tui/tui-file.h (tui_file): Override "write".
14391 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14392 factored out from ...
14393 (tui_puts): ... here.
14394 (tui_putc): Use them.
14395 (tui_write): New function.
14396 * tui/tui-io.h (tui_write): Declare.
14397
14398 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14399
14400 * Makefile.in (SFILES): Replace "environ.c" with
14401 "common/environ.c".
14402 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14403 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14404 to...
14405 * common/environ.c: ... here.
14406 * environ.h: Moved to...
14407 * common/environ.h: ... here.
14408
14409 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14410
14411 * gdbarch.sh (pstring_ptr): New static function.
14412 (gdbarch_disassembler_options): Use it.
14413 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14414 not valid_disassembler_option->name.
14415 * gdbarch.c: Regenerate.
14416
14417 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14418
14419 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14420
14421 2017-03-07 Pedro Alves <palves@redhat.com>
14422
14423 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14424
14425 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14426
14427 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14428 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14429 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14430 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14431
14432 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14433
14434 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14435
14436 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14437
14438 * remote.c (remote_add_target_side_commands): Use range-based
14439 for loop.
14440
14441 2017-03-03 Yao Qi <yao.qi@linaro.org>
14442
14443 PR gdb/21165
14444 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14445 value is lazy.
14446 * valprint.c (common_val_print): Likewise.
14447
14448 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14449
14450 * NEWS: Mention new set/show disassembler-options commands.
14451 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14452 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14453 (prospective_options): New static variable.
14454 (gdb_disassembler::gdb_disassembler): Initialize
14455 m_di.disassembler_options.
14456 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14457 (get_disassembler_options): New function.
14458 (set_disassembler_options): Likewise.
14459 (set_disassembler_options_sfunc): Likewise.
14460 (show_disassembler_options_sfunc): Likewise.
14461 (disassembler_options_completer): Likewise.
14462 (_initialize_disasm): Likewise.
14463 * disasm.h (get_disassembler_options): New prototype.
14464 (set_disassembler_options): Likewise.
14465 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14466 (gdbarch_verify_disassembler_options): Likewise.
14467 * gdbarch.c: Regenerate.
14468 * gdbarch.h: Likewise.
14469 * arm-tdep.c (num_disassembly_options): Delete.
14470 (set_disassembly_style): Likewise.
14471 (arm_disassembler_options): New static variable.
14472 (set_disassembly_style_sfunc): Convert short style name into long
14473 option name. Call set_disassembler_options.
14474 (show_disassembly_style_sfunc): New function.
14475 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14476 set_gdbarch_verify_disassembler_options.
14477 (_initialize_arm_tdep): Delete regnames variable and update callers.
14478 (arm_disassembler_options): Initialize.
14479 (disasm_options): New variable.
14480 (num_disassembly_options): Rename from this...
14481 (num_disassembly_styles): ...to this. Compute by scanning through
14482 disasm_options.
14483 (valid_disassembly_styles): Initialize using disasm_options.
14484 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14485 set_arm_regname_option.
14486 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14487 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14488 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14489 set_gdbarch_verify_disassembler_options.
14490 * s390-tdep.c (s390_disassembler_options): New static variable.
14491 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14492 set_gdbarch_verify_disassembler_options.
14493
14494 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14495
14496 * remote.c (remote_add_target_side_condition): Remove "struct"
14497 keyword from range-based for loop.
14498
14499 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14500
14501 * remote.c (remote_add_target_side_condition): Use range-based
14502 for loop. Update comment.
14503
14504 2017-02-27 Yao Qi <yao.qi@linaro.org>
14505
14506 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14507
14508 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14509
14510 * regcache.c (regcache_raw_update): New function.
14511 (regcache_raw_read): Move code to regcache_raw_update.
14512 * regcache.h (regcache_raw_update): New declaration.
14513 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14514
14515 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14516
14517 * dwarf2read.c (create_debug_type_hash_table): Initialize
14518 header.signature and header.type_offset_in_tu.
14519
14520 2017-02-24 Pedro Alves <palves@redhat.com>
14521
14522 * symtab.c (make_file_symbol_completion_list_1): Use
14523 add_symtab_completions.
14524
14525 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14526
14527 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14528
14529 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14530
14531 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14532 I386_MAX_REGISTER_SIZE.
14533 (i386_pseudo_register_write): Likewise.
14534 (i386_process_record): Likewise.
14535 * i387-tdep.c (i387_supply_xsave): Likewise.
14536 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14537 (store_register): Likewise.
14538
14539 2017-02-23 Pedro Alves <palves@redhat.com>
14540
14541 * ada-lang.c: Include "common/function-view.h".
14542 (ada_iterate_over_symbols): Adjust to use function_view as
14543 callback type.
14544 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14545 (ada_make_symbol_completion_list): Use a lambda.
14546 (ada_exc_search_name_matches): Delete.
14547 (name_matches_regex): New.
14548 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14549 * compile/compile-c-support.c: Include "common/function-view.h".
14550 (print_one_macro): Change prototype to accept a ui_file pointer.
14551 (write_macro_definitions): Use a lambda.
14552 * dwarf2read.c: Include "common/function-view.h".
14553 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14554 (dw2_expand_symtabs_matching): Adjust to use function_view as
14555 callback type.
14556 * language.h: Include "common/function-view.h".
14557 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14558 function_view as callback type.
14559 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14560 * linespec.c: Include "common/function-view.h".
14561 (collect_info::add_symbol): New method.
14562 (struct symbol_and_data_callback, iterate_inline_only, struct
14563 symbol_matcher_data, iterate_name_matcher): Delete.
14564 (iterate_over_all_matching_symtabs): Adjust to use function_view
14565 as callback type and lambdas.
14566 (iterate_over_file_blocks): Adjust to use function_view as
14567 callback type.
14568 (decode_compound_collector): Now a class with private fields.
14569 (decode_compound_collector::release_symbols): New method.
14570 (collect_one_symbol): Rename to...
14571 (decode_compound_collector::operator()): ... this and adjust.
14572 (lookup_prefix_sym): decode_compound_collector construction bits
14573 move to decode_compound_collector ctor. Pass the
14574 decode_compound_collector object directly as callback. Remove
14575 cleanups and use decode_compound_collector::release_symbols
14576 instead.
14577 (symtab_collector): Now a class with private fields.
14578 (symtab_collector::release_symtabs): New method.
14579 (add_symtabs_to_list): Rename to...
14580 (symtab_collector::operator()): ... this and adjust.
14581 (collect_symtabs_from_filename): symtab_collector construction
14582 bits move to symtab_collector ctor. Pass the symtab_collector
14583 object directly as callback. Remove cleanups and use
14584 symtab_collector::release_symtabs instead.
14585 (collect_symbols): Delete.
14586 (add_matching_symbols_to_info): Use lambdas.
14587 * macrocmd.c (print_macro_callback): Delete.
14588 (info_macro_command): Use a lambda.
14589 (info_macros_command): Pass print_macro_definition as callable
14590 directly.
14591 (print_one_macro): Remove 'ignore' parameter.
14592 (macro_list_command): Adjust.
14593 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14594 (macro_for_each_data::user_data): Delete field.
14595 (foreach_macro): Adjust to call the function_view.
14596 (macro_for_each): Adjust to use function_view as callback type.
14597 (foreach_macro_in_scope): Adjust to call the function_view.
14598 (macro_for_each_in_scope): Adjust to use function_view as callback
14599 type.
14600 * macrotab.h: Include "common/function-view.h".
14601 (macro_callback_fn): Declare a prototype instead of a pointer.
14602 Remove "user_data" parameter.
14603 (macro_for_each, macro_for_each_in_scope): Adjust to use
14604 function_view as callback type.
14605 * psymtab.c (partial_map_expand_apply)
14606 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14607 Adjust to use function_view as callback type and to return bool.
14608 (psym_expand_symtabs_matching): Adjust to use function_view as
14609 callback types.
14610 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14611 to use function_view as callback type and to return bool.
14612 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14613 callback types.
14614 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14615 as callback types.
14616 * symfile.h: Include "common/function-view.h".
14617 (expand_symtabs_file_matcher_ftype)
14618 (expand_symtabs_symbol_matcher_ftype)
14619 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14620 return bool.
14621 (quick_symbol_functions::map_symtabs_matching_filename)
14622 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14623 function_view as callback type and return bool.
14624 (expand_symtabs_matching): Adjust to use function_view as callback
14625 type.
14626 (maintenance_expand_name_matcher)
14627 (maintenance_expand_file_matcher): Delete.
14628 (maintenance_expand_symtabs): Use lambdas.
14629 * symtab.c (iterate_over_some_symtabs): Adjust to use
14630 function_view as callback types and return bool.
14631 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14632 of a cleanup.
14633 (lookup_symtab_callback): Delete.
14634 (lookup_symtab): Use a lambda.
14635 (iterate_over_symbols): Adjust to use function_view as callback
14636 type.
14637 (struct search_symbols_data, search_symbols_file_matches)
14638 (search_symbols_name_matches): Delete.
14639 (search_symbols): Use a pair of lambdas.
14640 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14641 (symtab_expansion_callback): Delete.
14642 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14643 * symtab.h: Include "common/function-view.h".
14644 (iterate_over_some_symtabs): Adjust to use function_view as
14645 callback type and return bool.
14646 (iterate_over_symtabs): Adjust to use function_view as callback
14647 type.
14648 (symbol_found_callback_ftype): Remove 'data' parameter and return
14649 bool.
14650 (iterate_over_symbols): Adjust to use function_view as callback
14651 type.
14652
14653 2017-02-23 Pedro Alves <palves@redhat.com>
14654
14655 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14656 (%.o) <unittests/%.c>: New pattern.
14657 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14658 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14659 * common/function-view.h: New file.
14660 * unittests/function-view-selftests.c: New file.
14661 * configure: Regenerate.
14662
14663 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14664
14665 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14666 inferior_ptid.
14667 * go32-nat.c (go32_thread_alive): Likewise.
14668
14669 2017-02-23 Yao Qi <yao.qi@linaro.org>
14670
14671 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14672 delete.
14673
14674 2017-02-23 Yao Qi <yao.qi@linaro.org>
14675
14676 * varobj.c (varobj_clear_saved_item): Use delete instead of
14677 xfree.
14678 (update_dynamic_varobj_children): Likewise.
14679
14680 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14681
14682 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14683
14684 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14685
14686 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14687 m_enum_value to 0 in default constructor.
14688
14689 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14690
14691 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14692 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14693 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14694 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14695 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14696 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14697 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14698 IS_STORE_CONDITIONAL_INSN.
14699
14700 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14701
14702 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14703
14704 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14705
14706 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14707
14708 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14709
14710 * dwarf2read.c (skip_one_die, read_attribute_value)
14711 (dwarf2_const_value_attr, dump_die_shallow)
14712 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14713 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14714
14715 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14716
14717 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14718 (dwarf_parse_macro_header): Accept DWARF version 5.
14719 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14720
14721 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14722
14723 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14724 DW_AT_GNU_*.
14725 * common/common-exceptions.h (enum errors): Likewise.
14726 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14727 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14728 (dwarf_expr_context::execute_stack_op): Likewise.
14729 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14730 Likewise.
14731 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14732 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14733 (show_entry_values_debug, call_site_to_target_addr)
14734 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14735 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14736 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14737 (value_of_dwarf_block_entry, indirect_pieced_value)
14738 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14739 (disassemble_dwarf_expression): Likewise.
14740 * dwarf2read.c (process_die, inherit_abstract_dies)
14741 (read_call_site_scope): Likewise.
14742 * gdbtypes.h (struct func_type, struct call_site_parameter)
14743 (struct call_site): Likewise.
14744 * stack.c (read_frame_arg): Likewise.
14745 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14746
14747 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14748
14749 * defs.h (read_unsigned_leb128): New declaration.
14750 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14751 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14752 (dwarf2_find_location_expression): Call also
14753 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14754 * dwarf2loc.h (dwarf2_version): New declaration.
14755 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14756 rnglists.
14757 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14758 .debug_rnglists.
14759 (struct dwop_section_names): Add loclists_dwo.
14760 (dwop_section_names): Add .debug_loclists.dwo.
14761 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14762 (struct dwarf2_per_cu_data): Add dwarf_version.
14763 (struct dwo_sections): Add loclists.
14764 (struct attr_abbrev): Add implicit_const.
14765 (read_indirect_line_string): New declaration.
14766 (read_unsigned_leb128): Delete declaration.
14767 (rcuh_kind): New definition.
14768 (read_and_check_comp_unit_head): Change parameter
14769 is_debug_types_section to section_kind.
14770 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14771 (read_comp_unit_head): Change parameter abfd to section, add parameter
14772 section_kind. Handle DWARF-5.
14773 (error_check_comp_unit_head): Accept also DWARF version 5.
14774 (read_and_check_comp_unit_head): Change parameter
14775 is_debug_types_section to section_kind.
14776 (read_and_check_type_unit_head): Delete function.
14777 (read_abbrev_offset): Handle DWARF-5.
14778 (create_debug_type_hash_table): Add parameter section_kind. Process
14779 only DW_UT_type. Use signature and type_offset_in_tu from struct
14780 comp_unit_head.
14781 (create_debug_types_hash_table): Update create_debug_type_hash_table
14782 caller.
14783 (create_all_type_units): Call create_debug_type_hash_table.
14784 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14785 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14786 caller.
14787 (skip_one_die): Handle DW_FORM_implicit_const.
14788 (dwarf2_rnglists_process): New function.
14789 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14790 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14791 (read_attribute_value): Handle DW_FORM_implicit_const,
14792 DW_FORM_line_strp.
14793 (read_attribute): Handle DW_FORM_implicit_const.
14794 (read_indirect_string_at_offset_from): New function from
14795 read_indirect_string_at_offset.
14796 (read_indirect_string_at_offset): Call
14797 read_indirect_string_at_offset_from.
14798 (read_indirect_line_string_at_offset): New function.
14799 (read_indirect_string): New function comment.
14800 (read_indirect_line_string): New function.
14801 (read_unsigned_leb128): Make it global.
14802 (dwarf2_string_attr): Handle DWARF-5.
14803 (add_include_dir_stub, read_formatted_entries): New functions.
14804 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14805 Handle DWARF-5.
14806 (per_cu_header_read_in): Update read_comp_unit_head caller.
14807 (dwarf2_version): New function.
14808 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14809 rnglists.
14810 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14811 fields.
14812
14813 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14814
14815 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14816
14817 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14818
14819 * dwarf2read.c (dwarf2_ranges_process): New function from
14820 dwarf2_ranges_read.
14821 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14822 dwarf2_ranges_process.
14823
14824 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14825
14826 * dwarf2read.c (create_debug_type_hash_table): New function from
14827 create_debug_types_hash_table.
14828 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14829 (create_all_type_units, open_and_init_dwo_file): Update
14830 create_debug_types_hash_table callers.
14831
14832 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14833
14834 PR gdb/16188
14835 * fork-child.c (trace_start_error): Fix thinko. va_end should
14836 refer to 'ap', not 'args'.
14837
14838 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14839 Pedro Alves <palves@redhat.com>
14840
14841 PR gdb/16188
14842 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14843 calls succeeded.
14844 * fork-child.c (trace_start_error): New function.
14845 (trace_start_error_with_name): Likewise.
14846 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14847 * inf-ptrace.c (inf_ptrace_me): Likewise.
14848 * inferior.h (trace_start_error): New prototype.
14849 (trace_start_error_with_name): Likewise.
14850
14851 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14852
14853 PR gdb/21164
14854 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14855 NULL before using it.
14856 * symmisc.c (maintenance_print_symbols): Likewise.
14857 (maintenance_print_msymbols): Likewise.
14858
14859 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14860
14861 * NEWS: Add record Python bindings entry.
14862
14863 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14864
14865 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14866 py-record-full.o.
14867 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14868 * python/py-record-btrace.c, python/py-record-btrace.h,
14869 python/py-record-full.c, python/py-record-full.h: New file.
14870 * python/py-record.c: Add include for py-record-btrace.h and
14871 py-record-full.h.
14872 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14873 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14874 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14875 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14876 New definition.
14877 (gdbpy_initialize_btrace): New export.
14878 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14879
14880 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14881
14882 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14883 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14884 * python/py-record.c: New file.
14885 * python/python-internal.h (gdbpy_start_recording,
14886 gdbpy_current_recording, gdpy_stop_recording,
14887 gdbpy_initialize_record): New export.
14888 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14889 (python_GdbMethods): Add gdbpy_start_recording,
14890 gdbpy_current_recording and gdbpy_stop_recording.
14891
14892 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14893
14894 * record-btrace.c (record_btrace_record_method): New function.
14895 (init_record_btrace_ops): Initialize to_record_method.
14896 * record-full.c (record_full_record_method): New function.
14897 (init_record_full_ops, init_record_full_core_ops): Add
14898 record_full_record_method.
14899 * record.h (enum record_method): New enum.
14900 * target-debug.h (target_debug_print_enum_record_method: New define.
14901 * target-delegates.c: Regenerate.
14902 * target.c (target_record_method): New function.
14903 * target.h: Include record.h.
14904 (struct target_ops) <to_record_method>: New field.
14905 (target_record_method): New export.
14906
14907 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14908
14909 * record.h (record_start, record_stop): New export.
14910 * record.c (record_start, record_stop): New function.
14911
14912 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14913
14914 * btrace.c (btrace_fetch): Copy function call segments pointer
14915 into a vector.
14916 (btrace_clear): Clear the vector.
14917 (btrace_find_insn_by_number): Use binary search to find the correct
14918 function call segment.
14919 * btrace.h (brace_fun_p): New typedef.
14920 (struct btrace_thread_info) <functions>: New field.
14921
14922 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14923
14924 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14925 * btrace.c (btrace_decode_error): ... here. New function.
14926 * btrace.h (btrace_decode_error): New export.
14927
14928 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14929
14930 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14931 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14932 btrace_find_insn_by_number): Remove special case for gaps.
14933 * btrace.h (btrace_insn_get_error): New export.
14934 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14935 * record-btrace.c (btrace_insn_history): Print number for gaps.
14936 (record_btrace_info, record_btrace_goto): Handle gaps.
14937
14938 2017-02-14 Tom Tromey <tom@tromey.com>
14939
14940 PR python/13598:
14941 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14942 event.
14943 * python/py-evts.c (gdbpy_initialize_py_events): Add
14944 before_prompt registry.
14945 * python/py-events.h (events_object) <before_prompt>: New field.
14946
14947 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14948
14949 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14950
14951 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14952
14953 * symfile (_initialize_symfile): Add usage text to the load command's
14954 help text.
14955
14956 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14957
14958 * utils.c (defaulted_query): Don't query on secondary UIs.
14959
14960 2017-02-10 Tom Tromey <tom@tromey.com>
14961
14962 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14963
14964 2017-02-10 Tom Tromey <tom@tromey.com>
14965
14966 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14967 "cleanup" local.
14968 * python/py-type.c (typy_legacy_template_argument): Remove
14969 unnecessary "cleanup" local.
14970
14971 2017-02-10 Tom Tromey <tom@tromey.com>
14972
14973 * python/python.c (do_start_initialization): New function, from
14974 _initialize_python.
14975 (_initialize_python): Call do_start_initialization.
14976 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14977 goto.
14978
14979 2017-02-10 Tom Tromey <tom@tromey.com>
14980
14981 * python/py-prettyprint.c (pretty_print_one_value): Use
14982 gdbpy_ref.
14983
14984 2017-02-10 Tom Tromey <tom@tromey.com>
14985
14986 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14987 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14988 gdbpy_ref.
14989 * python/py-type.c (field_new): Use gdbpy_ref.
14990 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14991 gdbpy_ref.
14992 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14993 (py_free_pspace): Likewise.
14994 (pspace_to_pspace_object): Likewise.
14995 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14996 (py_free_objfile): Likewise.
14997 (objfile_to_objfile_object): Likewise.
14998 * python/py-inferior.c (delete_thread_object): Use
14999 gdbpy_ref.
15000 (infpy_read_memory): Likewise.
15001 (py_free_inferior): Likewise.
15002 * python/py-evtregistry.c (create_eventregistry_object): Use
15003 gdbpy_ref.
15004 * python/py-event.c (create_event_object): Use gdbpy_ref.
15005
15006 2017-02-10 Tom Tromey <tom@tromey.com>
15007
15008 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15009 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15010 used.
15011 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15012 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15013 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15014 python/py-framefilter.c, python/py-function.c,
15015 python/py-inferior.c, python/py-infevents.c,
15016 python/py-linetable.c, python/py-newobjfileevent.c,
15017 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15018 python/py-signalevent.c, python/py-stopevent.c,
15019 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15020 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15021 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15022 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15023
15024 2017-02-10 Tom Tromey <tom@tromey.com>
15025
15026 * ui-out.h (ui_out_emit_type): New class.
15027 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15028 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15029 and ui_out_emit_tuple.
15030 (enumerate_locals): Likewise.
15031 (py_mi_print_variables, py_print_locals, py_print_args): Use
15032 ui_out_emit_list.
15033 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15034 ui_out_emit_list.
15035 * common/gdb_optional.h: New file.
15036
15037 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15038
15039 * MAINTAINERS (Write After Approval): Update my e-mail address.
15040
15041 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15042
15043 PR gdb/21122
15044 * breakpoint.c (_initialize_breakpoint): Update the help description
15045 of the 'commands' command to indicate that it takes a list argument.
15046
15047 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15048
15049 * interps.c (current_interp_set_logging): Remove "return".
15050
15051 2017-02-09 Gary Benson <gbenson@redhat.com>
15052
15053 * symtab.c (add_symtab_completions): Prevent NULL pointer
15054 dereference.
15055
15056 2017-02-08 Pedro Alves <palves@redhat.com>
15057
15058 * interps.c (interp::interp): Remove reference to quiet_p.
15059 (interp_set): Make static. Remove dead "Switching to" output
15060 code.
15061 (interp_quiet_p, interp_set_quiet): Delete.
15062 (interpreter_exec_cmd): Don't set the interpreter quiet.
15063 * interps.h (interp_quiet_p): Make static.
15064 (class interp) <quiet_p>: Remove field
15065
15066 2017-02-08 Jerome Guitton <guitton@adacore.com>
15067
15068 * cli/cli-decode.c (find_command_name_length): Make it extern.
15069 * cli/cli-decode.h (find_command_name_length): Declare.
15070 * cli/cli-script.c (command_name_equals, line_first_arg):
15071 New functions.
15072 (process_next_line): Use cli-decode to parse command names.
15073 (build_command_line): Make args a constant pointer.
15074
15075 2017-02-08 Jerome Guitton <guitton@adacore.com>
15076
15077 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15078 Remove case-insensitive search.
15079
15080 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15081
15082 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15083 at the end of the line. Avoids an ARI warning.
15084
15085 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15086
15087 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15088 rdseed instructions.
15089 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15090
15091 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15092
15093 PR tdep/20936
15094 Provide and use sparc32 and sparc64 target description XML files.
15095 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15096 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15097 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15098 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15099 * features/sparc/sparc32-solaris.xml: New file.
15100 * features/sparc/sparc64-solaris.xml: New file.
15101 * features/sparc/sparc32-solaris.c: Generated.
15102 * features/sparc/sparc64-solaris.c: Generated.
15103 * sparc-tdep.h: Account for differences in target descriptions.
15104 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15105 (sparc32_register_type): Use target provided registers.
15106 (validate_tdesc_registers): New function.
15107 (sparc32_gdbarch_init): Use tdesc_has_registers.
15108 Set pseudoregister functions.
15109 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15110 (sparc64_register_type): Use target provided registers.
15111 (sparc64_init_abi): Set pseudoregister functions.
15112
15113 2017-02-03 Tom Tromey <tom@tromey.com>
15114
15115 PR rust/21097:
15116 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15117 with a single member.
15118
15119 2017-02-03 Pedro Alves <palves@redhat.com>
15120
15121 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15122 (cli_interp_base::~cli_interp_base): New.
15123 (cli_interp): New struct.
15124 (as_cli_interp): Cast the interp itself to cli_interp.
15125 (cli_interpreter_pre_command_loop): Rename to ...
15126 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15127 parameter.
15128 (cli_interpreter_init): Rename to ...
15129 (cli_interp::init): ... this. Remove 'self' parameter. Use
15130 boolean. Make extern.
15131 (cli_interpreter_resume): Rename to ...
15132 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15133 extern.
15134 (cli_interpreter_suspend): Rename to ...
15135 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15136 extern.
15137 (cli_interpreter_exec): Rename to ...
15138 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15139 extern.
15140 (cli_interpreter_supports_command_editing): Rename to ...
15141 (cli_interp_base::supports_command_editing): ... this. Remove
15142 'interp' parameter. Make extern.
15143 (cli_ui_out): Rename to ...
15144 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15145 Make extern.
15146 (cli_set_logging): Rename to ...
15147 (cli_interp_base::set_logging): ... this. Remove 'interp'
15148 parameter. Make extern.
15149 (cli_interp_procs): Delete.
15150 (cli_interp_factory): Adjust to use "new".
15151 * cli/cli-interp.h: Include "interps.h".
15152 (struct cli_interp_base): New struct.
15153 * interps.c (struct interp): Delete. Fields moved to interps.h.
15154 (interp_new): Delete.
15155 (interp::interp, interp::~interp): New.
15156 (interp_set): Use bool, and return void. Assume the interpreter
15157 has suspend, init and resume methods, and that the all return
15158 void.
15159 (set_top_level_interpreter): interp_set returns void.
15160 (interp_ui_out): Adapt.
15161 (current_interp_set_logging): Adapt.
15162 (interp_data): Delete.
15163 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15164 (interp_exec): Adapt.
15165 (top_level_interpreter_data): Delete.
15166 * interps.h (interp_init_ftype, interp_resume_ftype)
15167 (interp_suspend_ftype, interp_exec_ftype)
15168 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15169 (class interp): New.
15170 (interp_new): Delete.
15171 (interp_set): Now returns void. Use bool.
15172 (interp_data, top_level_interpreter_data): Delete.
15173 * mi/mi-common.h: Include interps.h.
15174 (class mi_interp): Inherit from interp. Define a ctor. Declare
15175 init, resume, suspect, exec, interp_ui_out, set_logging and
15176 pre_command_loop methods.
15177 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15178 (mi_interpreter_init): Rename to ...
15179 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15180 bool, return void and make extern. Adjust.
15181 (mi_interpreter_resume): ... Rename to ...
15182 (mi_interp::resume): ... this. Remove the 'data' parameter,
15183 return void and make extern. Adjust.
15184 (mi_interpreter_suspend): ... Rename to ...
15185 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15186 return void and make extern. Adjust.
15187 (mi_interpreter_exec): ... Rename to ...
15188 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15189 extern. Adjust.
15190 (mi_interpreter_pre_command_loop): ... Rename to ...
15191 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15192 parameter and make extern.
15193 (mi_on_normal_stop_1): Adjust.
15194 (mi_ui_out): Rename to ...
15195 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15196 parameter and make extern. Adjust.
15197 (mi_set_logging): Rename to ...
15198 (mi_interp::set_logging): ... this. Remove the 'interp'
15199 parameter and make extern. Adjust.
15200 (mi_interp_procs): Delete.
15201 (mi_interp_factory): Adjust to use 'new'.
15202 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15203 (mi_print_exception, mi_execute_command, mi_load_progress):
15204 Adjust.
15205 * tui/tui-interp.c (tui_interp): New class.
15206 (as_tui_interp): Return a tui_interp pointer.
15207 (tui_on_normal_stop, tui_on_signal_received)
15208 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15209 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15210 to use interp::interp_ui_out.
15211 (tui_init): Rename to ...
15212 (tui_interp::init): ... this. Remove the 'self' parameter, use
15213 bool, return void and make extern. Adjust.
15214 (tui_resume): Rename to ...
15215 (tui_interp::resume): ... this. Remove the 'data' parameter,
15216 return void and make extern. Adjust.
15217 (tui_suspend): Rename to ...
15218 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15219 return void and make extern. Adjust.
15220 (tui_ui_out): Rename to ...
15221 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15222 parameter, and make extern. Adjust.
15223 (tui_exec): Rename to ...
15224 (tui_interp::exec): ... this. Remove the 'data' parameter and
15225 make extern.
15226 (tui_interp_procs): Delete.
15227 (tui_interp_factory): Use "new".
15228
15229 2017-02-02 Tom Tromey <tom@tromey.com>
15230
15231 * rust-exp.y (ends_raw_string, space_then_number)
15232 (rust_identifier_start_p): Return bool.
15233 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15234 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15235 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15236 (rust_chartype_p): Return bool.
15237 (val_print_struct, rust_print_struct_def, rust_print_type):
15238 Update.
15239 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15240 Return bool.
15241
15242 2017-02-02 Tom Tromey <tom@tromey.com>
15243
15244 * rust-lang.c: Reindent.
15245
15246 2017-02-02 Tom Tromey <tom@tromey.com>
15247
15248 * rust-lang.h (rust_crate_for_block): Update.
15249 * rust-lang.c (rust_crate_for_block): Return std::string.
15250 (rust_get_disr_info): Use std:;string, not
15251 gdb::unique_xmalloc_ptr.
15252 * rust-exp.y (crate_name): Update.
15253
15254 2017-02-02 Pedro Alves <palves@redhat.com>
15255
15256 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15257 field out of gdb_disassembler_test and make it static.
15258
15259 2017-02-02 Pedro Alves <palves@redhat.com>
15260
15261 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15262 mi1_interp and mi_interp fields.
15263
15264 2017-02-02 Pedro Alves <palves@redhat.com>
15265
15266 * cli/cli-interp.c (struct saved_output_files, saved_output):
15267 Moved from cli/cli-logging.c.
15268 (cli_set_logging): New function.
15269 (cli_interp_procs): Install cli_set_logging.
15270 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15271 Declare.
15272 * cli/cli-logging.c (struct saved_output_files, saved_output):
15273 Moved to cli/cli-interp.c.
15274 (pop_output_files): Don't save outputs here.
15275 (make_logging_output): New function.
15276 (handle_redirections): Don't build tee nor save previous outputs
15277 here.
15278 * interps.c (current_interp_set_logging): Change prototype.
15279 Assume there's always a set_logging_proc method installed.
15280 * interps.h (interp_set_logging_ftype): Change prototype.
15281 (current_interp_set_logging): Change prototype and adjust comment.
15282 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15283 use make_logging_output.
15284 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15285 2017-02-02 Pedro Alves <palves@redhat.com>
15286
15287 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15288 from ...
15289 (set_logging_overwrite): ... here.
15290 (logging_no_redirect_file): Delete.
15291 (set_logging_redirect): Don't handle redirection on the fly.
15292 Instead warn that "logging off" / "logging on" is necessary.
15293 (pop_output_files): Delete references to logging_no_redirect_file.
15294 (show_logging_command): Always speak in terms of what will happen
15295 once logging is reenabled.
15296
15297 2017-02-02 Pedro Alves <palves@redhat.com>
15298
15299 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15300
15301 2017-02-02 Pedro Alves <palves@redhat.com>
15302
15303 * disasm.c (gdb_pretty_print_insn): Rename to ...
15304 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15305 Remove gdbarch parameter. Adapt to clear the object's buffers
15306 instead of allocating new buffers, and to print using the object's
15307 gdb_disassembler instead of calling gdb_print_insn.
15308 (dump_insns): Use gdb_pretty_print_disassembler.
15309 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15310 (gdb_pretty_print_disassembler): New class.
15311 * record-btrace.c (btrace_insn_history): Use
15312 gdb_pretty_print_disassembler.
15313
15314 2017-02-02 Pedro Alves <palves@redhat.com>
15315
15316 * ada-lang.c (type_as_string): Use string_file.
15317 * ada-valprint.c (ada_print_floating): Use string_file.
15318 * ada-varobj.c (ada_varobj_scalar_image)
15319 (ada_varobj_get_value_image): Use string_file.
15320 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15321 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15322 * breakpoint.c (update_inserted_breakpoint_locations)
15323 (insert_breakpoint_locations, reattach_breakpoints)
15324 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15325 (print_it_watchpoint): Use string_file.
15326 (save_breakpoints): Use stdio_file.
15327 * c-exp.y (oper): Use string_file.
15328 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15329 tee_file.
15330 (pop_output_files): Use delete.
15331 (handle_redirections): Use stdio_file and tee_file.
15332 * cli/cli-setshow.c (do_show_command): Use string_file.
15333 * compile/compile-c-support.c (c_compute_program): Use
15334 string_file.
15335 * compile/compile-c-symbols.c (generate_vla_size): Take a
15336 'string_file &' instead of a 'ui_file *'.
15337 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15338 of a 'ui_file *'. Use string_file.
15339 (generate_c_for_variable_locations): Take a 'string_file &'
15340 instead of a 'ui_file *'.
15341 * compile/compile-internal.h (generate_c_for_for_one_variable):
15342 Take a 'string_file &' instead of a 'ui_file *'.
15343 * compile/compile-loc2c.c (push, pushf, unary, binary)
15344 (print_label, pushf_register_address, pushf_register)
15345 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15346 'ui_file *'. Adjust.
15347 * compile/compile.c (compile_to_object): Use string_file.
15348 * compile/compile.h (compile_dwarf_expr_to_c)
15349 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15350 'ui_file *'.
15351 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15352 (replace_typedefs_qualified_name): Use string_file and
15353 obstack_copy0.
15354 * disasm.c (gdb_pretty_print_insn): Use string_file.
15355 (gdb_disassembly): Adjust reference the null_stream global.
15356 (do_ui_file_delete): Delete.
15357 (gdb_insn_length): Use null_stream.
15358 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15359 * dwarf2loc.c (dwarf2_compile_property_to_c)
15360 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15361 'string_file &' instead of a 'ui_file *'.
15362 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15363 * dwarf2read.c (do_ui_file_peek_last): Delete.
15364 (dwarf2_compute_name): Use string_file.
15365 * event-top.c (gdb_setup_readline): Use stdio_file.
15366 * gdbarch.sh (verify_gdbarch): Use string_file.
15367 * gdbtypes.c (safe_parse_type): Use null_stream.
15368 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15369 string_file.
15370 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15371 'string_file *' instead of a 'ui_file *'.
15372 (gdbscm_arch_disassemble): Use string_file.
15373 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15374 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15375 inherits from ui_file.
15376 (ioscm_file_port_delete, ioscm_file_port_rewind)
15377 (ioscm_file_port_put): Delete.
15378 (ioscm_file_port_write): Rename to ...
15379 (ioscm_file_port::write): ... this. Remove file_port_magic
15380 checks.
15381 (ioscm_file_port_new): Delete.
15382 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15383 ui_file_up.
15384 * guile/scm-type.c (tyscm_type_name): Use string_file.
15385 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15386 Use string_file.
15387 * infcmd.c (print_return_value_1): Use string_file.
15388 * infrun.c (print_target_wait_results): Use string_file.
15389 * language.c (add_language): Use string_file.
15390 * location.c (explicit_to_string_internal): Use string_file.
15391 * main.c (captured_main_1): Use null_file.
15392 * maint.c (maintenance_print_architecture): Use stdio_file.
15393 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15394 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15395 event_channel>: Change type to mi_console_file pointer.
15396 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15397 (mi_console_file_delete): Delete.
15398 (struct mi_console_file): Delete.
15399 (mi_console_file_magic): Delete.
15400 (mi_console_file_new): Delete.
15401 (mi_console_file::mi_console_file): New.
15402 (mi_console_file_delete): Delete.
15403 (mi_console_file_fputs): Delete.
15404 (mi_console_file::write): New.
15405 (mi_console_raw_packet): Delete.
15406 (mi_console_file::flush): New.
15407 (mi_console_file_flush): Delete.
15408 (mi_console_set_raw): Rename to ...
15409 (mi_console_file::set_raw): ... this.
15410 * mi/mi-console.h (class mi_console_file): New class.
15411 (mi_console_file_new, mi_console_set_raw): Delete.
15412 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15413 (mi_set_logging): Use delete and tee_file. Adjust.
15414 * mi/mi-main.c (output_register): Use string_file.
15415 (mi_cmd_data_evaluate_expression): Use string_file.
15416 (mi_cmd_data_read_memory): Use string_file.
15417 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15418 * mi/mi-out.c (mi_ui_out::main_stream): New.
15419 (mi_ui_out::rewind): Use main_stream and
15420 string_file.
15421 (mi_ui_out::put): Use main_stream and string_file.
15422 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15423 Allocate a 'string_file' instead.
15424 (mi_out_new): Don't allocate a mem_fileopen stream here.
15425 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15426 (mi_ui_out::main_stream): Declare method.
15427 * printcmd.c (eval_command): Use string_file.
15428 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15429 * python/py-arch.c (archpy_disassemble): Use string_file.
15430 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15431 * python/py-frame.c (frapy_str): Use string_file.
15432 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15433 Use string_file.
15434 * python/py-type.c (typy_str): Use string_file.
15435 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15436 * python/py-value.c (valpy_str): Use string_file.
15437 * record-btrace.c (btrace_insn_history): Use string_file.
15438 * regcache.c (regcache_print): Use stdio_file.
15439 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15440 * remote.c (escape_buffer): Use string_file.
15441 * rust-lang.c (rust_get_disr_info): Use string_file.
15442 * serial.c (serial_open_ops_1): Use stdio_file.
15443 (do_serial_close): Use delete.
15444 * stack.c (print_frame_arg): Use string_file.
15445 (print_frame_args): Remove local mem_fileopen stream, not used.
15446 (print_frame): Use string_file.
15447 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15448 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15449 Take a 'string_file *' instead of a 'ui_file *'.
15450 * top.c (new_ui): Use stdio_file and stderr_file.
15451 (free_ui): Use delete.
15452 (execute_command_to_string): Use string_file.
15453 (quit_confirm): Use string_file.
15454 * tracepoint.c (collection_list::append_exp): Use string_file.
15455 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15456 * tui/tui-file.c: Don't include "ui-file.h".
15457 (enum streamtype, struct tui_stream): Delete.
15458 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15459 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15460 (tui_file::tui_file): New method.
15461 (tui_file_fputs): Delete.
15462 (tui_file_get_strbuf): Delete.
15463 (tui_file::puts): New method.
15464 (tui_file_adjust_strbuf): Delete.
15465 (tui_file_flush): Delete.
15466 (tui_file::flush): New method.
15467 * tui/tui-file.h: Tweak intro comment.
15468 Include ui-file.h.
15469 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15470 (tui_file_adjust_strbuf): Delete declarations.
15471 (class tui_file): New class.
15472 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15473 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15474 (tui_register_format): Use string_stream.
15475 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15476 (tui_get_function_from_frame): Use string_file.
15477 * typeprint.c (type_to_string): Use string_file.
15478 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15479 (null_stream): New global.
15480 (ui_file_delete): Delete.
15481 (ui_file::ui_file): New.
15482 (null_file_isatty): Delete.
15483 (ui_file::~ui_file): New.
15484 (null_file_rewind): Delete.
15485 (ui_file::printf): New.
15486 (null_file_put): Delete.
15487 (null_file_flush): Delete.
15488 (ui_file::putstr): New.
15489 (null_file_write): Delete.
15490 (ui_file::putstrn): New.
15491 (null_file_read): Delete.
15492 (ui_file::putc): New.
15493 (null_file_fputs): Delete.
15494 (null_file_write_async_safe): Delete.
15495 (ui_file::vprintf): New.
15496 (null_file_delete): Delete.
15497 (null_file::write): New.
15498 (null_file_fseek): Delete.
15499 (null_file::puts): New.
15500 (ui_file_data): Delete.
15501 (null_file::write_async_safe): New.
15502 (gdb_flush, ui_file_isatty): Adjust.
15503 (ui_file_put, ui_file_rewind): Delete.
15504 (ui_file_write): Adjust.
15505 (ui_file_write_for_put): Delete.
15506 (ui_file_write_async_safe, ui_file_read): Adjust.
15507 (ui_file_fseek): Delete.
15508 (fputs_unfiltered): Adjust.
15509 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15510 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15511 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15512 (set_ui_file_data): Delete.
15513 (string_file::~string_file, string_file::write)
15514 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15515 (do_ui_file_as_string, ui_file_as_string): Delete.
15516 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15517 (struct mem_file): Delete.
15518 (mem_file_new): Delete.
15519 (stdio_file::stdio_file): New.
15520 (mem_file_delete): Delete.
15521 (stdio_file::stdio_file): New.
15522 (mem_fileopen): Delete.
15523 (stdio_file::~stdio_file): New.
15524 (mem_file_rewind): Delete.
15525 (stdio_file::set_stream): New.
15526 (mem_file_put): Delete.
15527 (stdio_file::open): New.
15528 (mem_file_write): Delete.
15529 (stdio_file_magic, struct stdio_file): Delete.
15530 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15531 (stdio_file::flush): New.
15532 (stdio_file_read): Rename to ...
15533 (stdio_file::read): ... this. Adjust.
15534 (stdio_file_write): Rename to ...
15535 (stdio_file::write): ... this. Adjust.
15536 (stdio_file_write_async_safe): Rename to ...
15537 (stdio_file::write_async_safe) ... this. Adjust.
15538 (stdio_file_fputs): Rename to ...
15539 (stdio_file::puts) ... this. Adjust.
15540 (stdio_file_isatty): Delete.
15541 (stdio_file_fseek): Delete.
15542 (stdio_file::isatty): New.
15543 (stderr_file_write): Rename to ...
15544 (stderr_file::write) ... this. Adjust.
15545 (stderr_file_fputs): Rename to ...
15546 (stderr_file::puts) ... this. Adjust.
15547 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15548 (stderr_file::stderr_file): New.
15549 (tee_file_magic): Delete.
15550 (struct tee_file): Delete.
15551 (tee_file::tee_file): New.
15552 (tee_file_new): Delete.
15553 (tee_file::~tee_file): New.
15554 (tee_file_delete): Delete.
15555 (tee_file_flush): Rename to ...
15556 (tee_file::flush): ... this. Adjust.
15557 (tee_file_write): Rename to ...
15558 (tee_file::write): ... this. Adjust.
15559 (tee_file::write_async_safe): New.
15560 (tee_file_fputs): Rename to ...
15561 (tee_file::puts): ... this. Adjust.
15562 (tee_file_isatty): Rename to ...
15563 (tee_file::isatty): ... this. Adjust.
15564 * ui-file.h (struct obstack, struct ui_file): Don't
15565 forward-declare.
15566 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15567 (ui_file_write_ftype)
15568 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15569 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15570 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15571 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15572 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15573 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15574 (set_ui_file_fseek): Delete.
15575 (ui_file_data, ui_file_delete, ui_file_rewind)
15576 (struct ui_file): New.
15577 (ui_file_up): New.
15578 (class null_file): New.
15579 (null_stream): Declare.
15580 (ui_file_write_for_put, ui_file_put): Delete.
15581 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15582 Delete.
15583 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15584 (gdb_fopen, tee_file_new): Delete.
15585 (struct string_file): New.
15586 (struct stdio_file): New.
15587 (stdio_file_up): New.
15588 (struct stderr_file): New.
15589 (class tee_file): New.
15590 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15591 of a 'ui_file *'. Adjust.
15592 * ui-out.h (class ui_out) <field_stream>: Likewise.
15593 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15594 (null_stream): Delete.
15595 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15596 Adjust.
15597 * utils.h (struct ui_file): Delete forward declaration..
15598 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15599 (error_stream): Take a 'string_file &' instead of a
15600 'ui_file *'.
15601 * varobj.c (varobj_value_get_print_value): Use string_file.
15602 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15603 * gdbarch.c: Regenerate.
15604
15605 2017-02-02 Pedro Alves <palves@redhat.com>
15606
15607 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15608 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15609 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15610 Adjust to call gdb_print_insn instead of
15611 gdb_disassembler::print_insn.
15612 (dump_insns, do_mixed_source_and_assembly_deprecated)
15613 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15614 'gdbarch' parameter. Remove gdb_disassembler parameter.
15615 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15616 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15617 declaration.
15618 (gdb_pretty_print_insn): Re-add declaration.
15619 * record-btrace.c (btrace_insn_history): Don't allocate a
15620 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15621
15622 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15623
15624 * disasm.h (gdb_disassembly): Remove file_string parameter.
15625 * disasm.c (gdb_disassembly): Likewise.
15626 * cli/cli-cmds.c (print_disassembly): Adapt.
15627 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15628 * stack.c (do_gdb_disassembly): Likewise.
15629
15630 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15631
15632 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15633 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15634 targets. And if the implicit value is longer than needed, extract
15635 the first bytes instead of the "least significant" ones.
15636
15637 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15638
15639 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15640 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15641 (btrace_fetch): Assert can_access_registers_ptid.
15642 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15643 validate_registers_access.
15644
15645 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15646
15647 * gdbthread.h (can_access_registers_ptid): New.
15648 * thread.c (can_access_registers_ptid): New.
15649
15650 2017-02-01 Pedro Alves <palves@redhat.com>
15651
15652 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15653
15654 2017-01-31 Pedro Alves <palves@redhat.com>
15655
15656 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15657 Fix typos.
15658
15659 2017-01-31 Pedro Alves <palves@redhat.com>
15660
15661 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15662 not used.
15663
15664 2017-01-31 Pedro Alves <palves@redhat.com>
15665
15666 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15667
15668 2017-01-31 Pedro Alves <palves@redhat.com>
15669
15670 * common/scoped_restore.h
15671 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15672 change the value's parameter type to T2.
15673 (make_scoped_restore): Likewise.
15674
15675 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15676 Richard Henderson <rth@redhat.com>
15677
15678 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15679 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15680 GS_BASE for older kernels.
15681 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15682 GS_BASE for older kernels.
15683 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15684 and GS_BASE to the offset table.
15685 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15686 system register group.
15687 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15688 for older kernels.
15689 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15690 amd64 ABI.
15691 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15692 AMD64_GSBASE_REGNUM.
15693 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15694 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15695 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15696 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15697 i386/64bit-segments.xml in those rules.
15698 * features/i386/64bit-segments.xml: New file.
15699 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15700 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15701 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15702 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15703 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15704 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15705 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15706 * features/i386/amd64-avx-linux.c: Regenerated.
15707 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15708 * features/i386/amd64-avx-mpx.c: Regenerated.
15709 * features/i386/amd64-avx512-linux.c: Regenerated.
15710 * features/i386/amd64-linux.c: Regenerated.
15711 * features/i386/amd64-mpx-linux.c: Regenerated.
15712 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15713 * features/i386/i386-avx-mpx.c: Regenerated.
15714 * features/i386/x32-avx-linux.c: Regenerated.
15715 * features/i386/x32-avx512-linux.c: Regenerated.
15716 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15717 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15718 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15719 * regformats/i386/amd64-linux.dat: Regenerated.
15720 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15721 * regformats/i386/x32-avx-linux.dat: Regenerated.
15722 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15723 * regformats/i386/x32-linux.dat: Regenerated.
15724
15725 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15726
15727 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15728 Set to AMD64_NUM_REGS.
15729
15730 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15731
15732 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15733 that checks validity of a register number.
15734
15735 2017-01-27 Kees Cook <keescook@google.com>
15736
15737 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15738 fetch_fpregs if target has fpa registers.
15739 (arm_linux_store_inferior_registers): Call store_fpregs if target
15740 has fpa registers.
15741
15742 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15743
15744 * cris-tdep.c (cris_gdbarch_init): Remove check for
15745 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15746
15747 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15748
15749 * corelow.c (get_core_register_section): Check for regset
15750 existence before checking for REGSET_VARIABLE_SIZE.
15751
15752 2017-01-26 Yao Qi <yao.qi@linaro.org>
15753 Pedro Alves <palves@redhat.com>
15754
15755 PR gdb/20939
15756 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15757 call memory_error, save memaddr instead.
15758 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15759 negative, cal memory_error.
15760 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15761
15762 2017-01-26 Yao Qi <yao.qi@linaro.org>
15763
15764 * disasm-selftests.c (memory_error_test): New function.
15765 (_initialize_disasm_selftests): Register memory_error_test.
15766
15767 2017-01-26 Yao Qi <yao.qi@linaro.org>
15768
15769 * Makefile.in (SFILES): Add disasm-selftests.c and
15770 selftest-arch.c.
15771 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15772 * disasm-selftests.c: New file.
15773 * selftest-arch.c: New file.
15774 * selftest-arch.h: New file.
15775
15776 2017-01-26 Yao Qi <yao.qi@linaro.org>
15777
15778 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15779 to bfd_arch_mep. Don't return 0 if section is not
15780 found. Call print_insn_mep.
15781
15782 2017-01-26 Pedro Alves <palves@redhat.com>
15783 Yao Qi <yao.qi@linaro.org>
15784
15785 * arm-tdep.c: Include "disasm.h".
15786 (gdb_print_insn_arm): Update code to get gdbarch.
15787 * disasm.c (dis_asm_read_memory): Change it to
15788 gdb_disassembler::dis_asm_read_memory.
15789 (dis_asm_memory_error): Likewise.
15790 (dis_asm_print_address): Likewise.
15791 (gdb_pretty_print_insn): Change it to
15792 gdb_disassembler::pretty_print_insn.
15793 (dump_insns): Add one argument gdb_disassemlber. All
15794 callers updated.
15795 (do_mixed_source_and_assembly_deprecated): Likewise.
15796 (do_mixed_source_and_assembly): Likewise.
15797 (do_assembly_only): Likewise.
15798 (gdb_disassembler::gdb_disassembler): New.
15799 (gdb_disassembler::print_insn): New.
15800 * disasm.h (class gdb_disassembler): New.
15801 (gdb_pretty_print_insn): Remove declaration.
15802 (gdb_disassemble_info): Likewise.
15803 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15804 (gdbscm_disasm_read_memory_worker): Update.
15805 (gdbscm_disasm_read_memory): Update.
15806 (gdbscm_disasm_memory_error): Remove.
15807 (gdbscm_disasm_print_address): Remove.
15808 (gdbscm_disassembler::gdbscm_disassembler): New.
15809 (gdbscm_print_insn_from_port): Update.
15810 * mips-tdep.c: Include disasm.h.
15811 (gdb_print_insn_mips): Update code to get gdbarch.
15812 * record-btrace.c (btrace_insn_history): Update.
15813 * spu-tdep.c: Include disasm.h.
15814 (struct spu_dis_asm_data): Remove.
15815 (struct spu_dis_asm_info): New.
15816 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15817 SPU id.
15818 (gdb_print_insn_spu): Cast disassemble_info to
15819 spu_dis_asm_info.
15820
15821 2017-01-26 Yao Qi <yao.qi@linaro.org>
15822
15823 * disasm.c (do_ui_file_delete): Delete.
15824 (gdb_insn_length): Move code creating stream to ...
15825 * utils.c (null_stream): ... here. New function.
15826 * utils.h (null_stream): Declare.
15827
15828 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15829
15830 * python/py-inferior.c (find_thread_object): Return directly
15831 from the loop. Remove "found" variable.
15832
15833 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15834
15835 GDB 7.12.1 released.
15836
15837 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15838
15839 * python/py-function.c (fnpy_call): Reorder declarations to have
15840 the gdbpy_enter object declared first.
15841 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15842
15843 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15844
15845 PR python/21068
15846 * python/python-internal.h (PyMem_RawMalloc): Define for
15847 Python < 3.4.
15848 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15849 PyMem_RawMalloc instead of PyMem_Malloc.
15850
15851 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15852 Luis Machado <lgustavo@codesourcery.com>
15853
15854 * NEWS (New commands): Mention flash-erase.
15855 (New MI commands): Mention target-flash-erase.
15856 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15857 command.
15858 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15859 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15860 * target.c (flash_erase_command): New function.
15861 (initialize_targets): Add new flash-erase command.
15862 * target.h (flash_erase_command): New declaration.
15863
15864 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15865
15866 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15867 HAVE_SYS_PROCFS_H is defined.
15868
15869 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15870
15871 * remote.c (struct cached_reg): Change data into a pointer.
15872 * (stop_reply_dtr): Free data pointers before deleting vector.
15873 (process_stop_reply): Likewise.
15874 (remote_parse_stop_reply): Allocate space for data
15875
15876 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15877
15878 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15879 MAX_REGISTER_SIZE.
15880 (amd64_pseudo_register_read_value): Likewise.
15881 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15882 (store_register_using_P): Likewise.
15883 * regcache.c (regcache_xfer_part): Likewise.
15884
15885 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15886
15887 Split real and pseudo registers.
15888 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15889 (sparc32_pseudo_regnum): New enum.
15890 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15891 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15892 (SPARC32_CP0_REGISTERS): New macro.
15893 (sparc32_pseudo_register_name): New function.
15894 (sparc32_register_name): Use sparc32_pseudo_register_name.
15895 (sparc32_pseudo_register_type): New function.
15896 (sparc32_register_type): Use sparc32_pseudo_register_type.
15897 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15898 pseudo register numbers.
15899 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15900 (SPARC64_CP0_REGISTERS): New macro.
15901 (sparc64_pseudo_register_name): New function.
15902 (sparc64_register_name): Use sparc64_pseudo_register_name.
15903 (sparc64_pseudo_register_type): New function.
15904 (sparc64_register_type): Use sparc64_pseudo_register_type.
15905 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15906 pseudo register numbers.
15907 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15908 sparc64_store_arguments): Handle pseudo register numbers.
15909
15910 2017-01-13 Yao Qi <yao.qi@linaro.org>
15911
15912 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15913 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15914 output.
15915 (getpkt_or_notif_sane_1): Likewise.
15916
15917 2017-01-13 Yao Qi <yao.qi@linaro.org>
15918
15919 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15920 of CC. Pass "-x c++-header" instead of "-x c".
15921
15922 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15923
15924 * remote.c (remote_can_async_p): Update comment.
15925
15926 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15927
15928 * linux-nat.c (linux_nat_can_async_p): Update comment.
15929
15930 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15931
15932 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15933
15934 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15935
15936 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15937
15938 2017-01-10 Tom Tromey <tom@tromey.com>
15939
15940 * python/py-type.c (typy_legacy_template_argument): Update.
15941 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15942 ~demangle_parse_info): Declare new members.
15943 (cp_demangled_name_to_comp): Return unique_ptr.
15944 (cp_demangled_name_parse_free)
15945 (make_cleanup_cp_demangled_name_parse_free)
15946 (cp_new_demangle_parse_info): Remove.
15947 * cp-support.c (do_demangled_name_parse_free_cleanup)
15948 (make_cleanup_cp_demangled_name_parse_free): Remove.
15949 (inspect_type, cp_canonicalize_string_full)
15950 (cp_canonicalize_string): Update.
15951 (mangled_name_to_comp): Change return type.
15952 (cp_class_name_from_physname, method_name_from_physname)
15953 (cp_func_name, cp_remove_params): Update.
15954 * cp-name-parser.y (demangle_parse_info): New constructor, from
15955 cp_new_demangle_parse_info.
15956 (~demangle_parse_info): New destructor, from
15957 cp_demangled_name_parse_free.
15958 (cp_merge_demangle_parse_infos): Update.
15959 (cp_demangled_name_to_comp): Change return type.
15960
15961 2017-01-10 Tom Tromey <tom@tromey.com>
15962
15963 * top.c (prevent_dont_repeat): Change return type.
15964 * python/python.c (execute_gdb_command): Use std::string.
15965 Update.
15966 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15967 * command.h (prevent_dont_repeat): Change return type.
15968 * breakpoint.c (bpstat_do_actions_1): Update.
15969
15970 2017-01-10 Tom Tromey <tom@tromey.com>
15971
15972 * value.h (scoped_value_mark::~scoped_value_mark): Call
15973 free_to_mark.
15974 (scoped_value_mark::free_to_mark): New method.
15975 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15976 scoped_value_mark.
15977
15978 2017-01-10 Tom Tromey <tom@tromey.com>
15979
15980 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15981 (valpy_reference_value, valpy_const_value, valpy_get_address)
15982 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15983 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15984 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15985 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15986 scoped_value_mark.
15987 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15988 * value.h (scoped_value_mark): New class.
15989
15990 2017-01-10 Tom Tromey <tom@tromey.com>
15991
15992 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15993 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15994 * psymtab.c (discard_psymtabs_upto): Remove.
15995 (make_cleanup_discard_psymtabs): Remove.
15996 (struct psymtab_state): Remove.
15997
15998 2017-01-10 Tom Tromey <tom@tromey.com>
15999
16000 * record-full.c (record_full_save_cleanups): Remove.
16001 (record_full_save): Use gdb::unlinker.
16002 * gcore.c (do_bfd_delete_cleanup): Remove.
16003 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16004 cleanups.
16005 * dwarf2read.c (unlink_if_set): Remove.
16006 (write_psymtabs_to_index): Use gdb::unlinker.
16007 * common/gdb_unlinker.h: New file.
16008
16009 2017-01-10 Tom Tromey <tom@tromey.com>
16010
16011 * windows-tdep.c (windows_xfer_shared_library): Update.
16012 * windows-nat.c (windows_make_so): Update.
16013 * utils.h (make_cleanup_bfd_unref): Remove.
16014 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16015 * symfile.h (symfile_bfd_open)
16016 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16017 * symfile.c (read_symbols, symbol_file_add)
16018 (separate_debug_file_exists): Update.
16019 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16020 (generic_load, reread_symbols): Update.
16021 * symfile-mem.c (symbol_file_add_from_memory): Update.
16022 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16023 (spu_symbol_file_add_from_memory): Update.
16024 * solist.h (struct target_so_ops) <bfd_open>: Return
16025 gdb_bfd_ref_ptr.
16026 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16027 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16028 gdb_bfd_ref_ptr.
16029 (solib_map_sections, reload_shared_libraries_1): Update.
16030 * solib-svr4.c (enable_break): Update.
16031 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16032 * solib-frv.c (enable_break2): Update.
16033 * solib-dsbt.c (enable_break): Update.
16034 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16035 gdb_bfd_ref_ptr.
16036 (darwin_solib_get_all_image_info_addr_at_init): Update.
16037 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16038 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16039 * record-full.c (record_full_save): Update.
16040 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16041 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16042 * minidebug.c (find_separate_debug_file_in_section): Return
16043 gdb_bfd_ref_ptr.
16044 * machoread.c (macho_add_oso_symfile): Change abfd to
16045 gdb_bfd_ref_ptr.
16046 (macho_symfile_read_all_oso): Update.
16047 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16048 (macho_symfile_read): Update.
16049 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16050 (jit_bfd_try_read_symtab): Update.
16051 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16052 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16053 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16054 gdb_bfd_ref_ptr.
16055 (gdb_bfd_ref_policy): New struct.
16056 (gdb_bfd_ref_ptr): New typedef.
16057 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16058 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16059 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16060 gdb_bfd_ref_ptr.
16061 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16062 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16063 (gcore_command): Update.
16064 * exec.c (exec_file_attach): Update.
16065 * elfread.c (elf_symfile_read): Update.
16066 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16067 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16068 (open_and_init_dwo_file): Update.
16069 (open_dwp_file): Return gdb_bfd_ref_ptr.
16070 (open_and_init_dwp_file): Update.
16071 * corelow.c (core_open): Update.
16072 * compile/compile-object-load.c (compile_object_load): Update.
16073 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16074 * coffread.c (coff_symfile_read): Update.
16075 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16076 gdb_bfd_ref_ptr. Rename.
16077 (dump_bfd_file, restore_command): Update.
16078 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16079 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16080 (find_separate_debug_file_by_buildid): Update.
16081
16082 2017-01-10 Tom Tromey <tom@tromey.com>
16083
16084 * common/gdb_ref_ptr.h: New file.
16085 * python/py-ref.h (struct gdbpy_ref_policy): New.
16086 (gdbpy_ref): Now a typedef.
16087
16088 2017-01-10 Tom Tromey <tom@tromey.com>
16089
16090 * utils.h (make_cleanup_htab_delete): Don't declare.
16091 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16092 Remove.
16093 * linespec.c (decode_compound_collector): Add constructor,
16094 destructor.
16095 (lookup_prefix_sym): Remove cleanup.
16096 (symtab_collector): Add constructor, destructor.
16097 (collect_symtabs_from_filename): Remove cleanup.
16098 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16099 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16100 Use htab_up.
16101 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16102 * dwarf2read.c (dw2_expand_symtabs_matching)
16103 (dw2_map_symbol_filenames, dwarf_decode_macros)
16104 (write_psymtabs_to_index): Use htab_up.
16105 * dwarf2loc.c (func_verify_no_selftailcall)
16106 (call_site_find_chain_1, func_verify_no_selftailcall)
16107 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16108 std::vector, gdb::unique_xmalloc_ptr.
16109 (call_sitep): Remove typedef.
16110 (dwarf2_locexpr_baton_eval): Remove unused variable.
16111
16112 2017-01-10 Tom Tromey <tom@tromey.com>
16113
16114 * python/python-internal.h (make_cleanup_py_decref)
16115 (make_cleanup_py_xdecref): Don't declare.
16116 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16117 (py_xdecref, make_cleanup_py_xdecref): Remove.
16118
16119 2017-01-10 Tom Tromey <tom@tromey.com>
16120
16121 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16122 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16123
16124 2017-01-10 Tom Tromey <tom@tromey.com>
16125
16126 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16127
16128 2017-01-10 Tom Tromey <tom@tromey.com>
16129
16130 * python/py-utils.c (unicode_to_encoded_string)
16131 (python_string_to_target_string)
16132 (python_string_to_target_python_string)
16133 (python_string_to_host_string, gdbpy_obj_to_string)
16134 (get_addr_from_python): Use gdbpy_ref.
16135
16136 2017-01-10 Tom Tromey <tom@tromey.com>
16137
16138 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16139 gdbpy_ref.
16140
16141 2017-01-10 Tom Tromey <tom@tromey.com>
16142
16143 * python/python.c (eval_python_command, gdbpy_decode_line)
16144 (gdbpy_run_events, gdbpy_start_type_printers)
16145 (gdbpy_apply_type_printers): Use gdbpy_ref.
16146
16147 2017-01-10 Tom Tromey <tom@tromey.com>
16148
16149 * python/py-param.c (get_doc_string, compute_enum_values): Use
16150 gdbpy_ref.
16151
16152 2017-01-10 Tom Tromey <tom@tromey.com>
16153
16154 * python/py-inferior.c (find_thread_object, build_inferior_list):
16155 Use gdbpy_ref.
16156
16157 2017-01-10 Tom Tromey <tom@tromey.com>
16158
16159 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16160
16161 2017-01-10 Tom Tromey <tom@tromey.com>
16162
16163 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16164 gdbpy_ref.
16165
16166 2017-01-10 Tom Tromey <tom@tromey.com>
16167
16168 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16169 extra incref.
16170 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16171 Use gdbpy_ref.
16172
16173 2017-01-10 Tom Tromey <tom@tromey.com>
16174
16175 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16176 gdbpy_ref.
16177
16178 2017-01-10 Tom Tromey <tom@tromey.com>
16179
16180 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16181 decref results of PyArg_ParseTupleAndKeywords.
16182
16183 2017-01-10 Tom Tromey <tom@tromey.com>
16184
16185 * python/python.c (python_run_simple_file): Use
16186 unique_xmalloc_ptr, gdbpy_ref.
16187
16188 2017-01-10 Tom Tromey <tom@tromey.com>
16189
16190 * python/py-prettyprint.c (print_stack_unless_memory_error)
16191 (print_string_repr, print_children): Use gdbpy_ref.
16192 (dummy_python_frame): New class.
16193 (dummy_python_frame::dummy_python_frame): Rename from
16194 push_dummy_python_frame.
16195 (py_restore_tstate): Remove.
16196
16197 2017-01-10 Tom Tromey <tom@tromey.com>
16198
16199 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16200
16201 2017-01-10 Tom Tromey <tom@tromey.com>
16202
16203 * python/python.c (ensure_python_env, restore_python_env):
16204 Remove.
16205 * python/python-internal.h (ensure_python_env): Don't declare.
16206 * varobj.h (varobj_ensure_python_env): Don't declare.
16207 * varobj.c (varobj_ensure_python_env): Remove.
16208
16209 2017-01-10 Tom Tromey <tom@tromey.com>
16210
16211 * varobj.c (varobj_value_get_print_value): Use
16212 gdbpy_enter_varobj.
16213
16214 2017-01-10 Tom Tromey <tom@tromey.com>
16215
16216 * python/py-prettyprint.c (print_string_repr, print_children):
16217 Update.
16218 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16219 of "encoding".
16220 * varobj.c (varobj_value_get_print_value): Update.
16221 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16222
16223 2017-01-10 Tom Tromey <tom@tromey.com>
16224
16225 * varobj.c (varobj_get_display_hint)
16226 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16227 (varobj_set_visualizer, free_variable): Use
16228 gdbpy_enter_varobj.
16229
16230 2017-01-10 Tom Tromey <tom@tromey.com>
16231
16232 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16233 (do_finish_initialization): New function. Use gdbpy_ref.
16234 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16235 do_finish_initialization.
16236
16237 2017-01-10 Tom Tromey <tom@tromey.com>
16238
16239 * python/py-param.c (get_set_value, get_show_value): Use
16240 gdbpy_enter, gdbpy_ref.
16241
16242 2017-01-10 Tom Tromey <tom@tromey.com>
16243
16244 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16245
16246 2017-01-10 Tom Tromey <tom@tromey.com>
16247
16248 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16249
16250 2017-01-10 Tom Tromey <tom@tromey.com>
16251
16252 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16253 Use gdbpy_enter_varobj.
16254
16255 2017-01-10 Tom Tromey <tom@tromey.com>
16256
16257 * varobj.c (gdbpy_enter_varobj): New constructor.
16258 * python/python-internal.h (gdbpy_enter_varobj): New class.
16259 * python/py-varobj.c (py_varobj_get_iterator): Use
16260 gdbpy_enter_varobj.
16261
16262 2017-01-10 Tom Tromey <tom@tromey.com>
16263
16264 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16265 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16266 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16267 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16268 unique_xmalloc_ptr.
16269 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16270
16271 2017-01-10 Tom Tromey <tom@tromey.com>
16272
16273 * python/py-xmethods.c (invoke_match_method): Use
16274 gdbpy_ref.
16275
16276 2017-01-10 Tom Tromey <tom@tromey.com>
16277
16278 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16279 gdbpy_enter, gdbpy_ref.
16280
16281 2017-01-10 Tom Tromey <tom@tromey.com>
16282
16283 * python/python.c (python_interactive_command): Use gdbpy_enter.
16284
16285 2017-01-10 Tom Tromey <tom@tromey.com>
16286
16287 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16288 gdbpy_ref.
16289
16290 2017-01-10 Tom Tromey <tom@tromey.com>
16291
16292 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16293 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16294
16295 2017-01-10 Tom Tromey <tom@tromey.com>
16296
16297 * utils.h (htab_deleter): New struct.
16298 (htab_up): New typedef.
16299 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16300 gdbpy_enter, gdbpy_ref, htab_up.
16301
16302 2017-01-10 Tom Tromey <tom@tromey.com>
16303
16304 * python/py-unwind.c (pending_frame_invalidate): Remove.
16305 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16306
16307 2017-01-10 Tom Tromey <tom@tromey.com>
16308
16309 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16310 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16311
16312 2017-01-10 Tom Tromey <tom@tromey.com>
16313
16314 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16315
16316 2017-01-10 Tom Tromey <tom@tromey.com>
16317
16318 * python/python.c (gdbpy_eval_from_control_command)
16319 (gdbpy_source_script, gdbpy_run_events)
16320 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16321 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16322 gdbpy_enter.
16323
16324 2017-01-10 Tom Tromey <tom@tromey.com>
16325
16326 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16327
16328 2017-01-10 Tom Tromey <tom@tromey.com>
16329
16330 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16331
16332 2017-01-10 Tom Tromey <tom@tromey.com>
16333
16334 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16335 (python_on_inferior_call_pre, python_on_inferior_call_post)
16336 (python_on_memory_change, python_on_register_change)
16337 (python_inferior_exit, python_new_objfile, add_thread_object)
16338 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16339
16340 2017-01-10 Tom Tromey <tom@tromey.com>
16341
16342 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16343 (bpfinishpy_handle_exit): Use gdbpy_enter.
16344
16345 2017-01-10 Tom Tromey <tom@tromey.com>
16346
16347 * python/py-cmd.c (cmdpy_destroyer)
16348 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16349 gdbpy_enter.
16350
16351 2017-01-10 Tom Tromey <tom@tromey.com>
16352
16353 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16354 gdbpy_enter.
16355 (gdbpy_breakpoint_has_cond): Likewise.
16356
16357 2017-01-10 Tom Tromey <tom@tromey.com>
16358
16359 * python/python.c (gdbpy_enter): New constructor.
16360 (~gdbpy_enter): New destructor.
16361 (restore_python_env, ensure_python_env): Rewrite.
16362 * python/python-internal.h (gdbpy_enter): New class.
16363
16364 2017-01-10 Tom Tromey <tom@tromey.com>
16365
16366 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16367
16368 2017-01-10 Tom Tromey <tom@tromey.com>
16369
16370 * python/py-value.c (value_has_field, get_field_flag)
16371 (get_field_type, valpy_getitem, convert_value_from_python): Use
16372 gdbpy_ref.
16373
16374 2017-01-10 Tom Tromey <tom@tromey.com>
16375
16376 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16377 gdbpy_ref.
16378
16379 2017-01-10 Tom Tromey <tom@tromey.com>
16380
16381 * python/py-prettyprint.c (search_pp_list)
16382 (find_pretty_printer_from_objfiles)
16383 (find_pretty_printer_from_progspace)
16384 (find_pretty_printer_from_gdb, find_pretty_printer)
16385 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16386 gdbpy_ref.
16387
16388 2017-01-10 Tom Tromey <tom@tromey.com>
16389
16390 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16391
16392 2017-01-10 Tom Tromey <tom@tromey.com>
16393
16394 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16395 (ltpy_get_all_source_lines): Use gdbpy_ref.
16396
16397 2017-01-10 Tom Tromey <tom@tromey.com>
16398
16399 * python/py-framefilter.c (extract_sym, extract_value)
16400 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16401 gdbpy_ref.
16402
16403 2017-01-10 Tom Tromey <tom@tromey.com>
16404
16405 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16406
16407 2017-01-10 Tom Tromey <tom@tromey.com>
16408
16409 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16410
16411 2017-01-10 Tom Tromey <tom@tromey.com>
16412
16413 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16414 gdbpy_ref.
16415
16416 2017-01-10 Tom Tromey <tom@tromey.com>
16417
16418 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16419
16420 2017-01-10 Tom Tromey <tom@tromey.com>
16421
16422 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16423 (typy_range): Use gdbpy_ref.
16424
16425 2017-01-10 Tom Tromey <tom@tromey.com>
16426
16427 * python/py-threadevent.c (create_thread_event_object): Use
16428 gdbpy_ref.
16429 * python/py-stopevent.c (create_stop_event_object): Simplify.
16430 (emit_stop_event): Use gdbpy_ref.
16431 * python/py-signalevent.c (create_signal_event_object): Use
16432 gdbpy_ref.
16433 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16434 (emit_new_objfile_event, create_clear_objfiles_event_object)
16435 (emit_clear_objfiles_event): Use gdbpy_ref.
16436 * python/py-infevents.c (create_inferior_call_event_object)
16437 (create_register_changed_event_object)
16438 (create_memory_changed_event_object, emit_inferior_call_event)
16439 (emit_memory_changed_event, emit_register_changed_event): Use
16440 gdbpy_ref.
16441 * python/py-exitedevent.c (create_exited_event_object)
16442 (emit_exited_event): Use gdbpy_ref.
16443 * python/py-event.h (evpy_emit_event): Remove
16444 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16445 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16446 * python/py-continueevent.c (emit_continue_event): Use
16447 gdbpy_ref.
16448 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16449 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16450 gdbpy_ref.
16451 * python/py-bpevent.c (create_breakpoint_event_object): Use
16452 gdbpy_ref.
16453
16454 2017-01-10 Tom Tromey <tom@tromey.com>
16455
16456 * python/py-ref.h: New file.
16457
16458 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16459
16460 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16461 void.
16462 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16463 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16464 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16465 * ui-out.c (ui_out::redirect): Likewise.
16466 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16467 * cli/cli-logging.c (set_logging_redirect): Update call site of
16468 ui_out::redirect.
16469 (handle_redirections): Likewise.
16470 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16471 * top.c (execute_command_to_string): Likewise.
16472 * utils.c (do_ui_out_redirect_pop): Likewise.
16473
16474 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16475
16476 * stack.c (_initialize_stack): Update "frame" command help message.
16477
16478 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16479
16480 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16481
16482 2017-01-06 Yao Qi <yao.qi@linaro.org>
16483
16484 * x86-linux-nat.h: Include gdb_proc_service.h.
16485
16486 2017-01-06 Yao Qi <yao.qi@linaro.org>
16487
16488 * ser-base.h: Include serial.h.
16489
16490 2017-01-06 Yao Qi <yao.qi@linaro.org>
16491
16492 * ppc-linux-tdep.h: Include ppc-tdep.h.
16493
16494 2017-01-06 Yao Qi <yao.qi@linaro.org>
16495
16496 * nat/amd64-linux-siginfo.h: Include signal.h.
16497
16498 2017-01-06 Yao Qi <yao.qi@linaro.org>
16499
16500 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16501
16502 2017-01-06 Yao Qi <yao.qi@linaro.org>
16503
16504 * mi/mi-parse.h: Include mi-cmds.h.
16505
16506 2017-01-06 Yao Qi <yao.qi@linaro.org>
16507
16508 * inf-loop.c: Don't include "target.h".
16509 * inf-loop.h: Include it here.
16510
16511 2017-01-06 Yao Qi <yao.qi@linaro.org>
16512
16513 * dfp.h: Include "dboulest.h" and "expression.h".
16514
16515 2017-01-06 Yao Qi <yao.qi@linaro.org>
16516
16517 * ax-gdb.h: Include "ax.h".
16518
16519 2017-01-06 Yao Qi <yao.qi@linaro.org>
16520
16521 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16522 with nat/gdb_ptrace.h.
16523
16524 2017-01-05 Yao Qi <yao.qi@linaro.org>
16525
16526 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16527 new line.
16528 (mips64_fbsd_sigframe_init): Likewise.
16529
16530 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16531
16532 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16533 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16534
16535 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16536
16537 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16538 * NEWS: Mention new FreeBSD/mips native configuration.
16539 * config/mips/fbsd.mh: New file.
16540 * configure.host: Add mips*-*-freebsd*.
16541 * mips-fbsd-nat.c: New file.
16542
16543 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16544
16545 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16546 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16547 * NEWS: Mention new FreeBSD/mips target.
16548 * configure.tgt: Add mips*-*-freebsd*.
16549 * mips-fbsd-tdep.c: New file.
16550 * mips-fbsd-tdep.h: New file.
16551
16552 2017-01-04 Yao Qi <yao.qi@linaro.org>
16553
16554 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16555 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16556
16557 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16558
16559 Update copyright year range in all GDB files.
16560
16561 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16562
16563 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16564
16565 For older changes see ChangeLog-2016.
16566 \f
16567 Local Variables:
16568 mode: change-log
16569 left-margin: 8
16570 fill-column: 74
16571 version-control: never
16572 coding: utf-8
16573 End: