gdbserver: add aarch64_create_target_description
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
da434ccb
AH
1
22017-11-24 Alan Hayward <alan.hayward@arm.com>
3
4 * Makefile.in: Add new files.
5 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
6 aarch64_read_description.
7 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8 Call aarch64_read_description.
9 * aarch64-tdep.c (aarch64_read_description): New function.
10 (aarch64_gdbarch_init): Call aarch64_read_description.
11 * aarch64-tdep.h (aarch64_read_description): New function.
12 * arch/aarch64.c: New file.
13 * configure.tgt: Add new files.
14
98ead37e
YQ
152017-11-24 Yao Qi <yao.qi@linaro.org>
16
17 * mi/mi-main.c (register_changed_p): Update.
18 * value.c (value_contents_bits_eq): Change return type.
19 (value_contents_eq): Likewise.
20 * value.h: Update comments.
21
62ad7ce7
YQ
222017-11-24 Yao Qi <yao.qi@linaro.org>
23
24 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
25 local 'changed'. Remove error.
26 (register_changed_p): Change return type to bool.
27
506fe5f4
YQ
282017-11-24 Yao Qi <yao.qi@linaro.org>
29
30 * arch/tic6x.c: New file.
31 * arch/tic6x.h: New file.
32 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
33 tic6x-core.xml and tic6x-gp.xml.
34 * features/tic6x-c6xp.c: Generated.
35 * features/tic6x-core.c: Generated.
36 * features/tic6x-gp.c: Generated.
37 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
38 "tic6x-".
39
00ea2e2a
SM
402017-11-23 Simon Marchi <simon.marchi@ericsson.com>
41
42 * mi/mi-main.c (list_available_thread_groups): Change map value
43 type to std::vector.
44
f45e2a77
SM
452017-11-23 Simon Marchi <simon.marchi@ericsson.com>
46
47 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
48
bd046f64
SM
492017-11-23 Simon Marchi <simon.marchi@ericsson.com>
50
51 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
52 back to...
53 <children_requested>: ... this.
54 (varobj_get_num_children, varobj_update): Adjust.
55
4c37490d
SM
562017-11-23 Simon Marchi <simon.marchi@ericsson.com>
57
58 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
59 (ada_value_has_mutated): Likewise.
60 * c-varobj.c (varobj_is_anonymous_child): Likewise.
61 (c_is_path_expr_parent): Likewise.
62 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
63 (mi_cmd_var_set_frozen): Likewise.
64 (mi_cmd_var_update_iter): Likewise.
65 (mi_cmd_var_update): Likewise.
66 * varobj.c (pretty_printing): Likewise.
67 (varobj_enable_pretty_printing): Likewise.
68 (struct varobj_root) <floating, is_valid>: Likewise.
69 (struct varobj_dynamic) <children_requested>: Likewise.
70 (delete_variable): Likewise.
71 (delete_variable_1): Likewise.
72 (install_variable): Likewise.
73 (update_type_if_necessary): Likewise.
74 (install_new_value): Likewise.
75 (value_of_root): Likewise.
76 (is_root_p): Likewise.
77 (varobj_create): Likewise.
78 (varobj_delete): Likewise.
79 (varobj_has_more): Likewise.
80 (varobj_set_frozen): Likewise.
81 (varobj_get_frozen): Likewise.
82 (install_dynamic_child): Likewise.
83 (dynamic_varobj_has_child_method): Likewise.
84 (update_dynamic_varobj_children): Likewise.
85 (varobj_get_num_children): Likewise.
86 (varobj_list_children): Likewise.
87 (is_path_expr_parent): Likewise.
88 (varobj_default_is_path_expr_parent): Likewise.
89 (varobj_is_dynamic_p): Likewise.
90 (varobj_set_value): Likewise.
91 (varobj_value_has_mutated): Likewise.
92 (varobj_update): Likewise.
93 (check_scope): Likewise.
94 (value_of_root_1): Likewise.
95 (varobj_value_get_print_value): Likewise.
96 (varobj_editable_p): Likewise.
97 (varobj_value_is_changeable_p): Likewise.
98 (varobj_floating_p): Likewise.
99 (varobj_default_value_is_changeable_p): Likewise.
100 (varobj_invalidate_iter): Likewise.
101 * varobj.h (struct varobj_update_result) <type_changed,
102 children_changed, changed, value_installed>: Likewise.
103 (struct varobj) <updated, frozen, not_fetched>: Likewise.
104 (struct lang_varobj_ops) <value_is_changeable_p,
105 value_has_mutated, is_path_expr_parent>: Likewise.
106 (varobj_delete): Likewise.
107 (varobj_set_frozen): Likewise.
108 (varobj_get_frozen): Likewise.
109 (varobj_set_value): Likewise.
110 (varobj_update): Likewise.
111 (varobj_editable_p): Likewise.
112 (varobj_floating_p): Likewise.
113 (varobj_has_more): Likewise.
114 (varobj_is_dynamic_p): Likewise.
115 (varobj_default_value_is_changeable_p): Likewise.
116 (varobj_value_is_changeable_p): Likewise.
117 (varobj_is_anonymous_child): Likewise.
118 (varobj_default_is_path_expr_parent): Likewise.
119
9c23b42f
SDJ
1202017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
121
122 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
123 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
124 <type_str>: Convert to 'std::string'.
125 <expr>: Convert to 'expression_up'.
126 (dtrace_probe_arg_s): Delete type and VEC.
127 (dtrace_probe_enabler_s): Likewise.
128 (struct dtrace_probe): Replace by...
129 (class dtrace_static_probe_ops): ...this and...
130 (class dtrace_probe): ...this.
131 (dtrace_probe_is_linespec): Rename to...
132 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
133 to reflect change.
134 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
135 Adjust code. Create new instance of 'dtrace_probe'.
136 (dtrace_build_arg_exprs): Rename to...
137 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
138 reflect change.
139 (dtrace_get_probes): Rename to...
140 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
141 to reflect change.
142 (dtrace_get_arg): Rename to...
143 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
144 reflect change.
145 (dtrace_probe_is_enabled): Rename to...
146 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
147 change.
148 (dtrace_get_probe_address): Rename to...
149 (dtrace_probe::get_relocated_address): ...this. Adjust code
150 to reflect change.
151 (dtrace_get_probe_argument_count): Rename to...
152 (dtrace_probe::get_argument_count): ...this. Adjust code to
153 reflect change.
154 (dtrace_can_evaluate_probe_arguments): Rename to...
155 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
156 to reflect change.
157 (dtrace_evaluate_probe_argument): Rename to...
158 (dtrace_probe::evaluate_argument): ...this. Adjust code to
159 reflect change.
160 (dtrace_compile_to_ax): Rename to...
161 (dtrace_probe::compile_to_ax): ...this. Adjust code to
162 reflect change.
163 (dtrace_probe_destroy): Delete.
164 (dtrace_type_name): Rename to...
165 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
166 reflect change.
167 (dtrace_probe::get_static_ops): New method.
168 (dtrace_gen_info_probes_table_header): Rename to...
169 (dtrace_static_probe_ops::gen_info_probes_table_header):
170 ...this. Adjust code to reflect change.
171 (dtrace_gen_info_probes_table_values): Rename to...
172 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
173 code to reflect change.
174 (dtrace_enable_probe): Rename to...
175 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
176 change.
177 (dtrace_disable_probe): Rename to...
178 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
179 change.
180 (struct probe_ops dtrace_probe_ops): Delete.
181 (info_probes_dtrace_command): Call 'info_probes_for_spops'
182 instead of 'info_probes_for_ops'.
183 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
184 of 'all_probe_ops'.
185
0e9ae10f
SDJ
1862017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
187 Simon Marchi <simark@simark.ca>
188
189 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
190 variable.
191 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
192 <aexpr>: Change type to 'expression_up'.
193 (stap_probe_arg_s): Delete type and VEC.
194 (struct stap_probe): Delete. Replace by...
195 (class stap_static_probe_ops): ...this and...
196 (class stap_probe): ...this. Rename variables to add 'm_'
197 prefix. Do not use 'union' for arguments anymore.
198 (stap_get_expected_argument_type): Receive probe name instead
199 of 'struct stap_probe'. Adjust code.
200 (stap_parse_probe_arguments): Rename to...
201 (stap_probe::parse_arguments): ...this. Adjust code to
202 reflect change.
203 (stap_get_probe_address): Rename to...
204 (stap_probe::get_relocated_address): ...this. Adjust code
205 to reflect change.
206 (stap_get_probe_argument_count): Rename to...
207 (stap_probe::get_argument_count): ...this. Adjust code
208 to reflect change.
209 (stap_get_arg): Rename to...
210 (stap_probe::get_arg_by_number'): ...this. Adjust code to
211 reflect change.
212 (can_evaluate_probe_arguments): Rename to...
213 (stap_probe::can_evaluate_arguments): ...this. Adjust code
214 to reflect change.
215 (stap_evaluate_probe_argument): Rename to...
216 (stap_probe::evaluate_argument): ...this. Adjust code
217 to reflect change.
218 (stap_compile_to_ax): Rename to...
219 (stap_probe::compile_to_ax): ...this. Adjust code to
220 reflect change.
221 (stap_probe_destroy): Delete.
222 (stap_modify_semaphore): Adjust comment.
223 (stap_set_semaphore): Rename to...
224 (stap_probe::set_semaphore): ...this. Adjust code to reflect
225 change.
226 (stap_clear_semaphore): Rename to...
227 (stap_probe::clear_semaphore): ...this. Adjust code to
228 reflect change.
229 (stap_probe::get_static_ops): New method.
230 (handle_stap_probe): Adjust code to create instance of
231 'stap_probe'.
232 (stap_get_probes): Rename to...
233 (stap_static_probe_ops::get_probes): ...this. Adjust code to
234 reflect change.
235 (stap_probe_is_linespec): Rename to...
236 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
237 reflect change.
238 (stap_type_name): Rename to...
239 (stap_static_probe_ops::type_name): ...this. Adjust code to
240 reflect change.
241 (stap_gen_info_probes_table_header): Rename to...
242 (stap_static_probe_ops::gen_info_probes_table_header):
243 ...this. Adjust code to reflect change.
244 (stap_gen_info_probes_table_values): Rename to...
245 (stap_probe::gen_info_probes_table_values): ...this. Adjust
246 code to reflect change.
247 (struct probe_ops stap_probe_ops): Delete.
248 (info_probes_stap_command): Use 'info_probes_for_spops'
249 instead of 'info_probes_for_ops'.
250 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
251 of 'all_probe_ops'.
252
935676c9
SDJ
2532017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
254
255 * break-catch-throw.c (fetch_probe_arguments): Use
256 'probe.prob' instead of 'probe.probe'.
257 * breakpoint.c (create_longjmp_master_breakpoint): Call
258 'can_evaluate_arguments' and 'get_relocated_address' methods
259 from probe.
260 (create_exception_master_breakpoint): Likewise.
261 (add_location_to_breakpoint): Use 'sal->prob' instead of
262 'sal->probe'.
263 (bkpt_probe_insert_location): Call 'set_semaphore' method from
264 probe.
265 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
266 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
267 of 'probe_ops'.
268 (probe_key_free): Call 'delete' on probe.
269 (check_exception_resume): Use 'probe.prob' instead of
270 'probe.probe'.
271 * location.c (string_to_event_location_basic): Call
272 'probe_linespec_to_static_ops'.
273 * probe.c (class any_static_probe_ops): New class.
274 (any_static_probe_ops any_static_probe_ops): New variable.
275 (parse_probes_in_pspace): Receive 'static_probe_ops' as
276 argument. Adjust code to reflect change.
277 (parse_probes): Use 'static_probe_ops' instead of
278 'probe_ops'. Adjust code to reflect change.
279 (find_probes_in_objfile): Call methods to get name and
280 provider from probe.
281 (find_probe_by_pc): Use 'result.prob' instead of
282 'result.probe'. Call 'get_relocated_address' method from
283 probe.
284 (collect_probes): Adjust comment and argument list to receive
285 'static_probe_ops' instead of 'probe_ops'. Adjust code to
286 reflect change. Call necessary methods from probe.
287 (compare_probes): Call methods to get name and provider from
288 probes.
289 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
290 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
291 adjust code accordingly.
292 (print_ui_out_not_applicables): Likewise.
293 (info_probes_for_ops): Rename to...
294 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
295 as argument instead of 'probe_ops'. Adjust code. Call
296 necessary methods from probe.
297 (info_probes_command): Use 'info_probes_for_spops'.
298 (enable_probes_command): Pass correct argument to
299 'collect_probes'. Call methods from probe.
300 (disable_probes_command): Likewise.
301 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
302 (get_probe_argument_count): Move to
303 'any_static_probe_ops::get_argument_count'.
304 (can_evaluate_probe_arguments): Move to
305 'any_static_probe_ops::can_evaluate_arguments'.
306 (evaluate_probe_argument): Move to
307 'any_static_probe_ops::evaluate_argument'.
308 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
309 'probe.probe'.
310 (probe_linespec_to_ops): Rename to...
311 (probe_linespec_to_static_ops): ...this. Adjust code.
312 (probe_any_is_linespec): Rename to...
313 (any_static_probe_ops::is_linespec): ...this.
314 (probe_any_get_probes): Rename to...
315 (any_static_probe_ops::get_probes): ...this.
316 (any_static_probe_ops::type_name): New method.
317 (any_static_probe_ops::gen_info_probes_table_header): New
318 method.
319 (compute_probe_arg): Use 'pc_probe.prob' instead of
320 'pc_probe.probe'. Call methods from probe.
321 (compile_probe_arg): Likewise.
322 (std::vector<const probe_ops *> all_probe_ops): Delete.
323 (std::vector<const static_probe_ops *> all_static_probe_ops):
324 New variable.
325 (_initialize_probe): Use 'all_static_probe_ops' instead of
326 'all_probe_ops'.
327 * probe.h (struct info_probe_column) <field_name>: Delete
328 extraneous newline
329 (info_probe_column_s): Delete type and VEC.
330 (struct probe_ops): Delete. Replace with...
331 (class static_probe_ops): ...this and...
332 (clas probe): ...this.
333 (struct bound_probe) <bound_probe>: Delete extraneous
334 newline. Adjust constructor to receive 'probe' instead of
335 'struct probe'.
336 <probe>: Rename to...
337 <prob>: ...this. Delete extraneous newline.
338 <objfile>: Delete extraneous newline.
339 (register_probe_ops): Delete unused prototype.
340 (info_probes_for_ops): Rename to...
341 (info_probes_for_spops): ...this. Adjust comment.
342 (get_probe_address): Move to 'probe::get_address'.
343 (get_probe_argument_count): Move to
344 'probe::get_argument_count'.
345 (can_evaluate_probe_arguments): Move to
346 'probe::can_evaluate_arguments'.
347 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
348 * solib-svr4.c (struct svr4_info): Adjust comment.
349 (struct probe_and_action) <probe>: Rename to...
350 <prob>: ...this.
351 (register_solib_event_probe): Receive 'probe' instead of
352 'struct probe' as argument. Use 'prob' instead of 'probe'
353 when applicable.
354 (solib_event_probe_action): Call 'get_argument_count' method
355 from probe. Adjust comment.
356 (svr4_handle_solib_event): Adjust comment. Call
357 'evaluate_argument' method from probe.
358 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
359 from probe.
360 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
361 'struct probe'. Call 'can_evaluate_arguments' from probe.
362 * symfile.h: Forward declare 'class probe' instead of 'struct
363 probe'.
364 * symtab.h: Likewise.
365 (struct symtab_and_line) <probe>: Rename to...
366 <prob>: ...this.
367 * tracepoint.c (start_tracing): Use 'prob' when applicable.
368 Call probe methods.
369 (stop_tracing): Likewise.
370
8f6cb6c3
JB
3712017-11-22 Joel Brobecker <brobecker@adacore.com>
372
373 * ravenscar-thread.c (ravenscar_inferior_created): Remove
374 trailing newline at end of string in call to warning.
375
479f8de1
SM
3762017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
377
378 * osdata.h: Include vector isntead of vec.h.
379 (osdata_column_s): Remove typedef.
380 (struct osdata_column): Add constructor.
381 <name, value>: Change type to std::string.
382 (DEF_VEC_O (osdata_column_s)): Remove.
383 (osdata_item_s): Remove typedef.
384 (struct osdata_item) <columns>: Change type to std::vector.
385 (DEF_VEC_O (osdata_item_s)): Remove.
386 (struct osdata): Add constructor.
387 <type>: Change type to std::string.
388 <items>: Change type to std::vector.
389 (osdata_p): Remove typedef.
390 (DEF_VEC_P (osdata_p)): Remove.
391 (osdata_parse): Return a unique_ptr.
392 (osdata_free): Remove.
393 (make_cleanup_osdata_free): Remove.
394 (get_osdata): Return a unique_ptr.
395 (get_osdata_column): Return pointer to std::string, take a
396 reference to osdata_item as parameter.
397 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
398 unique_ptr.
399 <property_name>: Change type to std::string.
400 (osdata_start_osdata): Allocate osdata with new and adjust.
401 (osdata_start_item): Adjust.
402 (osdata_start_column): Adjust.
403 (osdata_end_column): Adjust.
404 (clear_parsing_data): Remove.
405 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
406 (osdata_item_clear): Remove.
407 (get_osdata): return a unique_ptr and adjust.
408 (get_osdata_column): Return a pointer to std::string and adjust.
409 (info_osdata): Adjust.
410 * mi/mi-main.c: Include <map>.
411 (free_vector_of_osdata_items): Remove.
412 (list_available_thread_groups): Adjust, use std::map instead of
413 splay tree.
414
41bd68f5
SM
4152017-11-22 Simon Marchi <simon.marchi@ericsson.com>
416
417 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
418 case in switch.
419
7e2fd2f4
SM
4202017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
421
422 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
423
0604393c
SM
4242017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
425
426 * varobj.h (struct varobj_update_result): Add constructor, add
427 move constructor, disable copy and assign, initialize fields.
428 <newobj>: Change type to std::vector.
429 (varobj_update): Return std::vector.
430 * varobj.c (install_dynamic_child): Change VEC parameters to
431 std::vector and adjust.
432 (update_dynamic_varobj_children): Likewise.
433 (varobj_update): Return std::vector and adjust.
434 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
435
ddf0ea08
SM
4362017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
437
438 * varobj.h (struct varobj) <parent>: Remove const.
439 <children>: Change type to std::vector.
440 (varobj_list_children): Return std::vector const reference.
441 (varobj_restrict_range): Change parameter type to std::vector
442 const reference.
443 * varobj.c (varobj_has_more): Adjust.
444 (varobj_restrict_range): Change parameter type to std::vector
445 const reference and adjust.
446 (install_dynamic_child): Adjust.
447 (update_dynamic_varobj_children): Adjust.
448 (varobj_list_children): Return std::vector const reference and
449 adjust.
450 (varobj_add_child): Adjust.
451 (update_type_if_necessary): Adjust.
452 (varobj_update): Adjust.
453 (delete_variable_1): Adjust.
454 * ada-varobj.c (ada_value_has_mutated): Adjust.
455 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
456
9e5b9d2b
SM
4572017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
458
459 * varobj.h (struct varobj): Add constructor and destructor,
460 initialize fields.
461 * varobj.c (struct varobj_root): Initialize fields.
462 (struct varobj_dynamic): Initialize fields.
463 (varobj_create): Use unique_ptr instead of cleanup. Create
464 varobj with new instead of new_root_variable.
465 (delete_variable_1): Free variable with delete instead of
466 free_variable.
467 (create_child_with_value): Create variable with new instead of
468 new_variable.
469 (varobj::varobj): New.
470 (varobj::~varobj): New (body mostly coming from free_variable).
471 (new_variable): Remove.
472 (free_variable): Remove.
473 (do_free_variable_cleanup): Remove.
474 (make_cleanup_free_variable): Remove.
475
fc35dab1
UW
4762017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
477
478 * core-regset.c: Remove file.
479 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
480
2400729e
UW
4812017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
482
483 * NEWS: Document use of GNU MPFR.
484 * README: Likewise.
485
486 * Makefile.in (LIBMPFR): Add define.
487 (CLIBS): Add $(LIBMPFR).
488 * configure.ac: Add --with-mpfr configure option.
489 * configure: Regenerate.
490 * config.in: Regenerate.
491
492 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
493 (class mpfr_float_ops): New type.
494 (mpfr_float_ops::from_target): Two new overloaded functions.
495 (mpfr_float_ops::to_target): Likewise.
496 (mpfr_float_ops::to_string): New function.
497 (mpfr_float_ops::from_string): Likewise.
498 (mpfr_float_ops::to_longest): Likewise.
499 (mpfr_float_ops::from_longest): Likewise.
500 (mpfr_float_ops::from_ulongest): Likewise.
501 (mpfr_float_ops::to_host_double): Likewise.
502 (mpfr_float_ops::from_host_double): Likewise.
503 (mpfr_float_ops::convert): Likewise.
504 (mpfr_float_ops::binop): Likewise.
505 (mpfr_float_ops::compare): Likewise.
506 (get_target_float_ops): Use mpfr_float_ops if available.
507
7a26362d
UW
5082017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
509
510 * target-float.c: Do not include <math.h>.
511 Include <cmath> and <limits>.
512 (DOUBLEST): Do not define.
513 (class target_float_ops): New type.
514 (class host_float_ops): New templated type.
515 (class decimal_float_ops): New type.
516
517 (floatformat_to_doublest): Rename to ...
518 (host_float_ops<T>::from_target): ... this. Use template type T
519 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
520 (host_float_ops<T>::from_target): New overload using a type argument.
521 (floatformat_from_doublest): Rename to ...
522 (host_float_ops<T>::to_target): ... this. Use template type T
523 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
524 (host_float_ops<T>::to_target): New overload using a type argument.
525 (floatformat_printf_format): New function.
526 (struct printf_length_modifier): New templated type.
527 (floatformat_to_string): Rename to ...
528 (host_float_ops<T>::to_string): ... this. Use type instead of
529 floatformat argument. Use floatformat_printf_format and
530 printf_length_modifier. Remove special handling of invalid numbers,
531 infinities and NaN (moved to target_float_to_string).
532 (struct scanf_length_modifier): New templated type.
533 (floatformat_from_string): Rename to ...
534 (host_float_ops<T>::from_string): ... this. Use type instead of
535 floatformat argument. Use scanf_length_modifier.
536 (floatformat_to_longest): Rename to ...
537 (host_float_ops<T>::to_longest): ... this. Use type instead of
538 floatformat argument. Handle out-of-range values deterministically.
539 (floatformat_from_longest): Rename to ...
540 (host_float_ops<T>::from_longest): ... this. Use type instead of
541 floatformat argument.
542 (floatformat_from_ulongest): Rename to ...
543 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
544 floatformat argument.
545 (floatformat_to_host_double): Rename to ...
546 (host_float_ops<T>::to_host_double): ... this. Use type instead of
547 floatformat argument.
548 (floatformat_from_host_double): Rename to ...
549 (host_float_ops<T>::from_host_double): ... this. Use type instead of
550 floatformat argument.
551 (floatformat_convert): Rename to ...
552 (host_float_ops<T>::convert): ... this. Use type instead of
553 floatformat arguments. Remove handling of no-op conversions.
554 (floatformat_binop): Rename to ...
555 (host_float_ops<T>::binop): ... this. Use type instead of
556 floatformat arguments.
557 (floatformat_compare): Rename to ...
558 (host_float_ops<T>::compare): ... this. Use type instead of
559 floatformat arguments.
560
561 (match_endianness): Use type instead of length/byte_order arguments.
562 (set_decnumber_context): Likewise.
563 (decimal_from_number): Likewise. Update calls.
564 (decimal_to_number): Likewise.
565 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
566 (decimal_float_ops::to_host_double): New dummy function.
567 (decimal_float_ops::from_host_double): Likewise.
568 (decimal_to_string): Rename to ...
569 (decimal_float_ops::to_string): ... this. Use type instead of
570 length/byte_order arguments. Update calls.
571 (decimal_from_string): Rename to ...
572 (decimal_float_ops::from_string): ... this. Use type instead of
573 length/byte_order arguments. Update calls.
574 (decimal_from_longest): Rename to ...
575 (decimal_float_ops::from_longest): ... this. Use type instead of
576 length/byte_order arguments. Update calls.
577 (decimal_from_ulongest): Rename to ...
578 (decimal_float_ops::from_ulongest): ... this. Use type instead of
579 length/byte_order arguments. Update calls.
580 (decimal_to_longest): Rename to ...
581 (decimal_float_ops::to_longest): ... this. Use type instead of
582 length/byte_order arguments. Update calls.
583 (decimal_binop): Rename to ...
584 (decimal_float_ops::binop): ... this. Use type instead of
585 length/byte_order arguments. Update calls.
586 (decimal_compare): Rename to ...
587 (decimal_float_ops::compare): ... this. Use type instead of
588 length/byte_order arguments. Update calls.
589 (decimal_convert): Rename to ...
590 (decimal_float_ops::convert): ... this. Use type instead of
591 length/byte_order arguments. Update calls.
592
593 (target_float_same_category_p): New function.
594 (target_float_same_format_p): Likewise.
595 (target_float_format_length): Likewise.
596 (enum target_float_ops_kind): New type.
597 (get_target_float_ops_kind): New function.
598 (get_target_float_ops): Three new overloaded functions.
599
600 (target_float_is_zero): Update call.
601 (target_float_to_string): Add special handling of invalid numbers,
602 infinities and NaN (moved from floatformat_to_string). Use
603 target_float_ops callback.
604 (target_float_from_string): Use target_float_ops callback.
605 (target_float_to_longest): Likewise.
606 (target_float_from_longest): Likewise.
607 (target_float_from_ulongest): Likewise.
608 (target_float_to_host_double): Likewise.
609 (target_float_from_host_double): Likewise.
610 (target_float_convert): Add special case for no-op conversions.
611 Use target_float_ops callback.
612 (target_float_binop): Use target_float_ops callback.
613 (target_float_compare): Likewise.
614
a9f26f60
YQ
6152017-11-22 Yao Qi <yao.qi@linaro.org>
616
617 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
618
29f9a567
YQ
6192017-11-22 Yao Qi <yao.qi@linaro.org>
620
621 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
622 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
623
3b1b69bf
JG
6242017-11-21 Jerome Guitton <guitton@adacore.com>
625
626 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
627 with event ptid from the lower layer before doing the
628 ravenscar-specific update.
629
54aa6c67
JB
6302017-11-21 Joel Brobecker <brobecker@adacore.com>
631
632 * ravenscar-thread.c (is_ravenscar_task): Also verify that
633 the ptid's TID is nonzero.
634
cf3fbed4
JB
6352017-11-21 Joel Brobecker <brobecker@adacore.com>
636
637 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
638 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
639 Make non-static. Change return type to char *. Adjust code
640 accordingly. Rewrite the function's documentation.
641 (read_atcb): Adjust call to get_tcb_types_info accordingly.
642 * ravenscar-thread.c (ravenscar_inferior_created): Check that
643 we have enough debugging information in the runtime to support
644 Ada task debugging before we enable the ravenscar-thread layer.
645
9edcc12f
JB
6462017-11-21 Joel Brobecker <brobecker@adacore.com>
647
648 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
649 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
650 * ravenscar-thread.c: Add into comment.
651 (base_magic_null_ptid): Delete.
652 (base_ptid): Change documentation.
653 (ravenscar_active_task): Renames ravenscar_running_thread.
654 All callers updated throughout.
655 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
656 (ravenscar_task_is_currently_active): Likewise.
657 (get_base_thread_from_ravenscar_task): Ditto.
658 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
659 (ravenscar_runtime_initialized): Likewise.
660 (get_running_thread_id): Add new parameter "cpu". Adjust
661 implementation to handle this new parameter.
662 (ravenscar_fetch_registers): Small adjustment to use
663 is_ravenscar_task and ravenscar_task_is_currently_active in
664 order to decide whether to use the target beneath or this
665 module's arch_ops.
666 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
667 (ravenscar_stopped_by_sw_breakpoint): Use
668 get_base_thread_from_ravenscar_task to get the underlying
669 thread, rather than using base_ptid.
670 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
671 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
672 Likewise.
673 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
674
65d40437
JB
6752017-11-21 Joel Brobecker <brobecker@adacore.com>
676
677 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
678 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
679 (get_tcb_types_info): Set fieldnos.base_cpu.
680 (read_atcb): Set task_info->base_cpu.
681 (info_task): Print "Base CPU" info if set by runtime.
682
e02544b2
JB
6832017-11-21 Joel Brobecker <brobecker@adacore.com>
684
685 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
686 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
687 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
688 New functions.
689 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
690 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
691 to_stopped_data_address and to_core_of_thread fields of
692 ravenscar_ops.
693
ed0f4273
UW
6942017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
695
696 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
697 (struct gdbarch_tdep): New member long_double_abi.
698 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
699 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
700 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
701 format depending on long_double_abi tdep member.
702 (ppc_floatformat_for_type): Handle __ibm128 type.
703
0fc76421
SM
7042017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
705
706 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
707
e6b2f5ef
PA
7082017-11-21 Pedro Alves <palves@redhat.com>
709
710 * dwarf2read.c (mapped_index::find_name_components_bounds)
711 <completion mode, upper bound>: Use std::lower_bound instead of
712 std::upper_bound.
713 (test_mapped_index_find_name_component_bounds): Remove incorrect
714 "t1_fund" from expected symbols.
715
5c58de74
PA
7162017-11-21 Pedro Alves <palves@redhat.com>
717
718 * dwarf2read.c (mapped_index::name_components_casing): New field.
719 (mapped_index) <build_name_components,
720 find_name_components_bounds): Declare new methods.
721 (mapped_index::find_name_components_bounds)
722 (mapped_index::build_name_components): New methods, factored out
723 from dw2_expand_symtabs_matching_symbol.
724 (check_find_bounds_finds)
725 (test_mapped_index_find_name_component_bounds): New.
726 (run_test): Rename to ...
727 (test_dw2_expand_symtabs_matching_symbol): ... this.
728 (run_test): Reimplement.
729
e1ef7d7a
PA
7302017-11-21 Pedro Alves <palves@redhat.com>
731
732 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
733 (symbol_end): Use cp_ident_is_alnum.
734 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
735 * dwarf2read.c (make_sort_after_prefix_name): New function.
736 (dw2_expand_symtabs_matching_symbol): Use it.
737 (test_symbols): Add more symbols.
738 (run_test): Add tests.
739
cf724bc9
TT
7402017-11-17 Tom Tromey <tom@tromey.com>
741
742 * symtab.h (enum symbol_subclass_kind): New.
743 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
744 Remove.
745 <subclass>: New member.
746 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
747 * rust-lang.c (rust_get_trait_object_pointer): Update.
748 * dwarf2read.c (read_func_scope): Update.
749 (read_variable): Update.
750
68e745e3
TT
7512017-11-17 Tom Tromey <tom@tromey.com>
752
753 * dwarf2read.c (read_func_scope): Update.
754 * symtab.h (struct template_symbol): Derive from symbol.
755 <base>: Remove.
756
71a3c369
TT
7572017-11-17 Tom Tromey <tom@tromey.com>
758
759 * symtab.h (struct symbol) <is_rust_vtable>: New member.
760 (struct rust_vtable_symbol): New.
761 (find_symbol_at_address): Declare.
762 * symtab.c (find_symbol_at_address): New function.
763 * symfile.h (struct quick_symbol_functions)
764 <find_compunit_symtab_by_address>: New member.
765 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
766 function.
767 (debug_sym_quick_functions): Link to
768 debug_qf_find_compunit_symtab_by_address.
769 * rust-lang.c (rust_get_trait_object_pointer): New function.
770 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
771 rust_get_trait_object_pointer.
772 * psymtab.c (psym_relocate): Clear psymbol_map.
773 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
774 functions.
775 (psym_functions): Link to psym_find_compunit_symtab_by_address.
776 * objfiles.h (struct objfile) <psymbol_map>: New member.
777 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
778 (process_die) <DW_TAG_variable>: New case. Call read_variable.
779 (rust_containing_type, read_variable): New functions.
780
7468702d
SM
7812017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
782
783 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
784
37269bc9
SM
7852017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
786
787 * common/filestuff.c: Include <algorithm>.
788 (open_fds): Change type to std::vector<int>.
789 (do_mark_open_fd): Adjust.
790 (unmark_fd_no_cloexec): Adjust.
791 (do_close): Adjust.
792
5c632425
SM
7932017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
794
795 * breakpoint.c (output_thread_groups): Take an std::vector.
796 (print_one_breakpoint_location): Adjust.
797
ced9779b
JB
7982017-11-17 Joel Brobecker <brobecker@adacore.com>
799
800 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
801 (ada_evaluate_subexp_for_cast): New function.
802 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
803 ada_evaluate_subexp_for_cast.
804 (ada_evaluate_subexp) <nosideret>: Replace code by call to
805 eval_skip_value.
806 * eval.c (evaluate_var_value): Make non-static.
807 (evaluate_var_msym_value, eval_skip_value): Likewise.
808 * value.h (evaluate_var_value, evaluate_var_msym_value)
809 (eval_skip_value): Declare.
810
b7e22850
JB
8112017-11-16 Joel Brobecker <brobecker@adacore.com>
812
813 * ada-lang.c (ada_value_cast): Remove parameter "noside".
814 Update all callers.
815
9ccabccd
PA
8162017-11-16 Pedro Alves <palves@redhat.com>
817
818 * python/py-unwind.c (pyuw_sniffer): Translate
819 PyExc_KeyboardInterrupt to a GDB Quit exception.
820
d930703d
PA
8212017-11-16 Pedro Alves <palves@redhat.com>
822
823 * infrun.c (resume_cleanups): Delete.
824 (resume): No longer install a resume_cleanups cleanup nor call
825 QUIT.
826 (proceed): Pass the terminal to the inferior.
827 (keep_going_pass_signal): No longer install a resume_cleanups
828 cleanup.
829
38dc2859
PA
8302017-11-16 Pedro Alves <palves@redhat.com>
831
832 * inf-loop.c (inferior_event_handler): Don't swallow the exception
833 if the prompt is blocked.
834
688fca4f
PA
8352017-11-16 Pedro Alves <palves@redhat.com>
836
837 * breakpoint.c (insert_bp_location): Replace bp_err and
838 bp_err_message locals by a gdb_exception local.
839
e2c33ac7
PA
8402017-11-16 Pedro Alves <palves@redhat.com>
841
842 * inflow.c (scoped_ignore_sigttou): New class.
843 (child_terminal_ours_1, new_tty): Use it.
844
d7236961
UW
8452017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
846
847 * target-float.c (decimal_from_number): Add byte_order argument and
848 call match_endianness. Error if unknown floating-point type.
849 (decimal_to_number): Add byte_order argument and call match_endianness.
850 (decimal_from_longest): Update call. Do not call match_endianness.
851 (decimal_from_ulongest): Likewise.
852 (decimal_binop): Likewise.
853 (decimal_is_zero): Likewise.
854 (decimal_compare): Likewise.
855 (decimal_convert): Likewise.
856
d8ae99a7
PM
8572017-11-16 Phil Muldoon <pmuldoon@redhat.com>
858
859 * python/python.c (gdbpy_rbreak): New function.
860 * NEWS: Document Python rbreak feature.
861
c632b645
YQ
8622017-11-16 Yao Qi <yao.qi@linaro.org>
863
864 * features/tic6x-c62x.xml: Remove.
865 * features/tic6x-c64x.xml: Remove.
866 * features/tic6x-c64xp.xml: Remove.
867
a014b87a
JB
8682017-11-15 John Baldwin <jhb@FreeBSD.org>
869
870 * symtab.h: Include <array>.
871
94765011
JB
8722017-11-15 John Baldwin <jhb@FreeBSD.org>
873
874 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
875 (bsd_kvm_proc_cmd): Likewise.
876
625ad440
SM
8772017-11-15 Simon Marchi <simon.marchi@ericsson.com>
878
879 * tui/tui-win.c (window_name_completer): Replace VEC with
880 std::vector.
881
c0c11fa9
AC
8822017-11-15 Andrew Cagney <cagney@gnu.org>
883
884 * MAINTAINERS: Remove no-longer applicable entries.
885
34a7ebaf
AC
8862017-11-15 Andrew Cagney <cagney@gnu.org>
887
888 * MAINTAINERS: Move self to Past Maintainers.
889
5334ef39
YQ
8902017-11-15 Yao Qi <yao.qi@linaro.org>
891
892 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
893 * features/nios2-linux.c: Remove.
894 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
895 initialize_tdesc_nios2_linux.
896
a714b0d6
YQ
8972017-11-15 Yao Qi <yao.qi@linaro.org>
898
899 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
900 M68HC11_LAST_HARD_REG + 1.
901
92ffd475
PC
9022017-11-14 Paul Carroll <pcarroll@codesourcery.com>
903
904 PR gdb/22388
905 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
906 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
907 Return TARGET_XFER_EOF if size of returned data is 0.
908
07431908
SM
9092017-11-14 Simon Marchi <simon.marchi@ericsson.com>
910
911 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
912 memory-map-selftests.c.
913 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
914 * memory-map.c (memory_map_start_memory): Fix computation of hi
915 address.
916 * unittests/memory-map-selftests.c: New file.
917
31432a67
JB
9182017-11-09 Joel Brobecker <brobecker@adacore.com>
919
920 * ada-lang.c: Fix some typos in the general command documenting
921 how Ada expressions are being evaluated and how their result
922 is printed.
923
e793c052
TT
9242017-11-09 Tom Tromey <tom@tromey.com>
925
926 * psymtab.c (psymbol_hash): Do not hash string contents.
927 (psymbol_compare): Add comment.
928
7e8835c5
TT
9292017-11-09 Tom Tromey <tom@tromey.com>
930
931 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
932
286acbb5
JB
9332017-11-08 Joel Brobecker <brobecker@adacore.com>
934
935 * ada-exp.y (write_var_from_sym): Remove parameter
936 "orig_left_context". Update all callers.
937
b44ec619
SM
9382017-11-08 Simon Marchi <simon.marchi@ericsson.com>
939
940 * tracepoint.h (class collection_list) <stringify>: Return
941 std::vector<std::string>.
942 (encode_actions_rsp): Change parameters to
943 std::vector<std::string> *.
944 * tracepoint.c (collection_list::stringify): Return
945 std::vector<std::string> and adjust accordingly.
946 (encode_actions_rsp): Changee parameters to
947 std::vector<std::string> and adjust accordingly.
948 * remote.c (free_actions_list),
949 free_actions_list_cleanup_wrapper): Remove.
950 (remote_download_tracepoint): Adjust to std::vector.
951
2f4732b0
TT
9522017-11-08 Tom Tromey <tom@tromey.com>
953
954 * dwarf2read.c (symbolp): Remove typedef.
955 (read_func_scope): Use std::vector.
956 (process_structure_scope): Use std::vector.
957
f9d67a22
PA
9582017-11-08 Pedro Alves <palves@redhat.com>
959
960 * ada-lang.c (ada_make_symbol_completion_list): Use
961 completion_skip_symbol.
962 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
963 (symbol_is_function_or_method(symbol*)): New.
964 (add_symtab_completions): Add complete_symbol_mode parameter. Use
965 completion_skip_symbol.
966 (default_collect_symbol_completion_matches_break_on): Use
967 completion_skip_symbol. Pass down mode.
968 (collect_file_symbol_completion_matches): Pass down mode.
969 * symtab.h (symbol_is_function_or_method): New declarations.
970 (completion_skip_symbol): New template function.
971
56d87ef7
PA
9722017-11-08 Pedro Alves <palves@redhat.com>
973
974 * linespec.c (iterate_over_all_matching_symtabs): Add
975 search_domain parameter. Pass it down to expand_symtabs_matching.
976 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
977 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
978 search_domain.
979 (add_all_symbol_names_from_pspace): Add search_domain parameter.
980 Pass it down.
981 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
982 symbols.
983 (add_matching_symbols_to_info): Add search_domain parameter. Pass
984 it down.
985
1b026119
PA
9862017-11-08 Pedro Alves <palves@redhat.com>
987
988 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
989 text_len locals and don't pass them down.
990 * symtab.c (completion_list_add_name): Remove
991 sym_text/sym_text_len parameters and adjust.
992 (completion_list_add_symbol, completion_list_add_msymbol)
993 (completion_list_objc_symbol, completion_list_add_fields)
994 (add_symtab_completions): Likewise.
995 (default_collect_symbol_completion_matches_break_on)
996 (collect_file_symbol_completion_matches): Remove sym_text_len
997 local and don't pass it down.
998 * symtab.h (completion_list_add_name): Remove
999 sym_text/sym_text_len parameters.
1000
c62446b1
PA
10012017-11-08 Pedro Alves <palves@redhat.com>
1002
1003 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1004 unittests/lookup_name_info-selftests.c.
1005 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1006 * cp-support.c: Include "selftest.h".
1007 (cp_remove_params_1): Rename from cp_remove_params. Add
1008 'require_param' parameter, and handle it.
1009 (cp_remove_params): Reimplement.
1010 (cp_remove_params_if_any): New.
1011 (selftests::quote): New.
1012 (selftests::check_remove_params): New.
1013 (selftests::test_cp_remove_params): New.
1014 (_initialize_cp_support): Install
1015 selftests::test_cp_remove_params.
1016 * cp-support.h (cp_remove_params_if_any): Declare.
1017 * dwarf2read.c :Include "selftest.h".
1018 (dw2_expand_symtabs_matching_symbol): Use
1019 lookup_name_info::make_ignore_params.
1020 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1021 (selftests::dw2_expand_symtabs_matching::string_or_null)
1022 (selftests::dw2_expand_symtabs_matching::check_match)
1023 (selftests::dw2_expand_symtabs_matching::test_symbols)
1024 (selftests::dw2_expand_symtabs_matching::run_test): New.
1025 (_initialize_dwarf2_read): Register
1026 selftests::dw2_expand_symtabs_matching::run_test.
1027 * psymtab.c (psym_expand_symtabs_matching): Use
1028 lookup_name_info::make_ignore_params.
1029 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1030 If the lookup name wants to ignore parameters, strip them.
1031 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1032 code handling '('.
1033 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1034 (default_collect_symbol_completion_matches_break_on): Don't try to
1035 strip parameters.
1036 * symtab.h (lookup_name_info::lookup_name_info): Add
1037 'ignore_parameters' parameter.
1038 (lookup_name_info::ignore_parameters)
1039 (lookup_name_info::make_ignore_params): New methods.
1040 (lookup_name_info::m_ignore_parameters): New field.
1041 * unittests/lookup_name_info-selftests.c: New file.
1042
61920122
PA
10432017-11-08 Pedro Alves <palves@redhat.com>
1044
1045 * dwarf2read.c (dw2_expand_marked_cus)
1046 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1047 (dw2_expand_symtabs_matching): Move further below.
1048 (dw2_expand_marked_cus): Reindent.
1049
3f563c84
PA
10502017-11-08 Pedro Alves <palves@redhat.com>
1051
1052 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1053 (struct name_component): New.
1054 (mapped_index::name_components): New field.
1055 (mapped_index::symbol_name_at): New method.
1056 (dwarf2_read_index): Call mapped_index ctor.
1057 (dw2_map_matching_symbols): Add comment about name_components
1058 table.
1059 (dw2_expand_symtabs_matching): Factor part to...
1060 (dw2_expand_symtabs_matching_symbol): ... this new function.
1061 Build name components table, and lookup symbols in it before
1062 calling the name matcher.
1063 (dw2_expand_marked_cus): New, factored out from
1064 dw2_expand_symtabs_matching.
1065 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1066
b5ec771e
PA
10672017-11-08 Pedro Alves <palves@redhat.com>
1068
1069 * ada-lang.c (ada_encode): Rename to ..
1070 (ada_encode_1): ... this. Add throw_errors parameter and handle
1071 it.
1072 (ada_encode): Reimplement.
1073 (match_name): Delete, folded into full_name.
1074 (resolve_subexp): No longer pass the encoded name to
1075 ada_lookup_symbol_list.
1076 (should_use_wild_match): Delete.
1077 (name_match_type_from_name): New.
1078 (ada_lookup_simple_minsym): Use lookup_name_info and the
1079 language's symbol_name_matcher_ftype.
1080 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1081 (ada_add_block_renamings): Adjust to use lookup_name_info.
1082 (ada_lookup_name): New.
1083 (add_nonlocal_symbols, ada_add_all_symbols)
1084 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1085 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1086 (ada_name_for_lookup): Delete.
1087 (ada_lookup_encoded_symbol): Construct a verbatim name.
1088 (wild_match): Reverse sense of return type. Use bool.
1089 (full_match): Reverse sense of return type. Inline bits of old
1090 match_name here.
1091 (ada_add_block_symbols): Adjust to use lookup_name_info.
1092 (symbol_completion_match): Delete, folded into...
1093 (ada_lookup_name_info::matches): ... .this new method.
1094 (symbol_completion_add): Delete.
1095 (ada_collect_symbol_completion_matches): Add name_match_type
1096 parameter. Adjust to use lookup_name_info and
1097 completion_list_add_name.
1098 (get_var_value, ada_add_global_exceptions): Adjust to use
1099 lookup_name_info.
1100 (ada_get_symbol_name_cmp): Delete.
1101 (do_wild_match, do_full_match): New functions.
1102 (ada_lookup_name_info::ada_lookup_name_info): New method.
1103 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1104 functions.
1105 (ada_language_defn): Install ada_get_symbol_name_matcher.
1106 * ada-lex.l (processId): If name starts with '<', copy it
1107 verbatim.
1108 * block.c (block_iter_match_step, block_iter_match_first)
1109 (block_iter_match_next, block_lookup_symbol)
1110 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1111 lookup_name_info.
1112 * block.h (block_iter_match_first, block_iter_match_next)
1113 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1114 * c-lang.c (c_language_defn, cplus_language_defn)
1115 (asm_language_defn, minimal_language_defn): Adjust comments to
1116 refer to la_get_symbol_name_matcher.
1117 * completer.c (complete_files_symbols)
1118 (collect_explicit_location_matches, symbol_completer): Pass a
1119 symbol_name_match_type down.
1120 * completer.h (class completion_match, completion_match_result):
1121 New classes.
1122 (completion_tracker::reset_completion_match_result): New method.
1123 (completion_tracker::m_completion_match_result): New field.
1124 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1125 lookup_name_info.
1126 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1127 functions.
1128 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1129 * d-lang.c: Adjust comments to refer to
1130 la_get_symbol_name_matcher.
1131 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1132 Adjust to use lookup_name_info.
1133 (dict_iter_match_first, dict_iter_match_next)
1134 (iter_match_first_hashed, iter_match_next_hashed)
1135 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1136 with a lookup_name_info.
1137 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1138 Likewise.
1139 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1140 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1141 (gdb_index_symbol_name_matcher): New class.
1142 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1143 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1144 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1145 with a symbol_name_match_type.
1146 (f_language_defn): Adjust comments to refer to
1147 la_get_symbol_name_matcher.
1148 * go-lang.c (go_language_defn): Adjust comments to refer to
1149 la_get_symbol_name_matcher.
1150 * language.c (default_symbol_name_matcher)
1151 (language_get_symbol_name_matcher): New functions.
1152 (unknown_language_defn, auto_language_defn): Adjust comments to
1153 refer to la_get_symbol_name_matcher.
1154 * language.h (symbol_name_cmp_ftype): Delete.
1155 (language_defn) <la_collect_symbol_completion_matches>: Add match
1156 type parameter.
1157 <la_get_symbol_name_cmp>: Delete field.
1158 <la_get_symbol_name_matcher>: New field.
1159 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1160 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1161 Declare.
1162 * linespec.c (iterate_over_all_matching_symtabs)
1163 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1164 (find_methods): Add language parameter, and use lookup_name_info
1165 and the language's symbol_name_matcher_ftype.
1166 (linespec_complete_function): Adjust.
1167 (lookup_prefix_sym): Use lookup_name_info.
1168 (add_all_symbol_names_from_pspace): Adjust.
1169 (find_superclass_methods): Add language parameter and pass it
1170 down.
1171 (find_method): Pass symbol language down.
1172 (find_linespec_symbols): Don't demangle or Ada encode here.
1173 (search_minsyms_for_name): Add lookup_name_info parameter.
1174 (add_matching_symbols_to_info): Add name_match_type parameter.
1175 Use lookup_name_info.
1176 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1177 la_get_symbol_name_matcher.
1178 * minsyms.c: Include <algorithm>.
1179 (add_minsym_to_demangled_hash_table): Remove table parameter and
1180 add objfile parameter. Use search_name_hash, and add language to
1181 demangled languages vector.
1182 (struct found_minimal_symbols): New struct.
1183 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1184 New functions.
1185 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1186 input names here. Use lookup_name_info instead. Lookup up
1187 demangled names once for each language in the demangled names
1188 vector.
1189 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1190 demangled names once for each language in the demangled names
1191 vector.
1192 (build_minimal_symbol_hash_tables): Adjust.
1193 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1194 lookup_name_info.
1195 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1196 la_get_symbol_name_matcher.
1197 * objfiles.h: Include <vector>.
1198 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1199 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1200 la_get_symbol_name_matcher.
1201 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1202 la_get_symbol_name_matcher.
1203 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1204 (match_partial_symbol): Use symbol_name_match_type,
1205 lookup_name_info and psymbol_name_matches.
1206 (lookup_partial_symbol): Use lookup_name_info.
1207 (map_block): Use symbol_name_match_type and lookup_name_info.
1208 (psym_map_matching_symbols): Use symbol_name_match_type.
1209 (psymbol_name_matches): New.
1210 (recursively_search_psymtabs): Use lookup_name_info and
1211 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1212 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1213 'kind' parameter to 'domain'.
1214 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1215 la_get_symbol_name_matcher.
1216 * symfile-debug.c (debug_qf_map_matching_symbols)
1217 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1218 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1219 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1220 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1221 Adjust to use symbol_name_match_type.
1222 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1223 (expand_symtabs_matching): Adjust to use lookup_name_info.
1224 * symmisc.c (maintenance_expand_symtabs): Use
1225 lookup_name_info::match_any ().
1226 * symtab.c (symbol_matches_search_name): New.
1227 (eq_symbol_entry): Adjust to use lookup_name_info and the
1228 language's matcher.
1229 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1230 (lookup_name_info::match_any): New.
1231 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1232 (compare_symbol_name): Add language, lookup_name_info and
1233 completion_match_result parameters, and use them.
1234 (completion_list_add_name): Make extern. Add language and
1235 lookup_name_info parameters. Use them.
1236 (completion_list_add_symbol, completion_list_add_msymbol)
1237 (completion_list_objc_symbol): Add lookup_name_info parameters and
1238 adjust. Pass down language.
1239 (completion_list_add_fields): Add lookup_name_info parameters and
1240 adjust. Pass down language.
1241 (add_symtab_completions): Add lookup_name_info parameters and
1242 adjust.
1243 (default_collect_symbol_completion_matches_break_on): Add
1244 name_match_type parameter, and use it. Use lookup_name_info.
1245 (default_collect_symbol_completion_matches)
1246 (collect_symbol_completion_matches): Add name_match_type
1247 parameter, and pass it down.
1248 (collect_symbol_completion_matches_type): Adjust.
1249 (collect_file_symbol_completion_matches): Add name_match_type
1250 parameter, and use lookup_name_info.
1251 * symtab.h: Include <string> and "common/gdb_optional.h".
1252 (enum class symbol_name_match_type): New.
1253 (class ada_lookup_name_info): New.
1254 (struct demangle_for_lookup_info): New.
1255 (class lookup_name_info): New.
1256 (symbol_name_matcher_ftype): New.
1257 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1258 (symbol_matches_search_name): Declare.
1259 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1260 (default_collect_symbol_completion_matches)
1261 (collect_symbol_completion_matches)
1262 (collect_file_symbol_completion_matches): Add name_match_type
1263 parameter.
1264 (iterate_over_symbols): Use lookup_name_info.
1265 (completion_list_add_name): Declare.
1266 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1267 (strncmp_iw_with_mode): Now extern.
1268 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1269 (strncmp_iw_with_mode): Declare.
1270
5ffa0793
PA
12712017-11-08 Keith Seitz <keiths@redhat.com>
1272 Pedro Alves <palves@redhat.com>
1273
1274 * ada-lang.c (ada_language_defn): Install
1275 default_search_name_hash.
1276 * buildsym.c (struct buildsym_compunit): <language>: New field.
1277 (finish_block_internal): Pass language when creating dictionaries.
1278 (start_buildsym_compunit, start_symtab): New language parameters.
1279 Use them.
1280 (restart_symtab): Pass down compilation unit's language.
1281 * buildsym.h (enum language): Forward declare.
1282 (start_symtab): New 'language' parameter.
1283 * c-lang.c (c_language_defn, cplus_language_defn)
1284 (asm_language_defn, minimal_language_defn): Install
1285 default_search_name_hash.
1286 * coffread.c (coff_start_symtab): Adjust.
1287 * d-lang.c (d_language_defn): Install default_search_name_hash.
1288 * dbxread.c (struct symloc): Add 'pst_language' field.
1289 (PST_LANGUAGE): Define.
1290 (start_psymtab, read_ofile_symtab): Use it.
1291 (process_one_symbol): New 'language' parameter. Pass it down.
1292 * dictionary.c (struct dictionary) <language>: New field.
1293 (DICT_LANGUAGE): Define.
1294 (dict_create_hashed, dict_create_hashed_expandable)
1295 (dict_create_linear, dict_create_linear_expandable): New parameter
1296 'language'. Set the dictionary's language.
1297 (iter_match_first_hashed): Adjust to rename.
1298 (insert_symbol_hashed): Assert we don't see mismatching
1299 languages. Adjust to rename.
1300 (dict_hash): Rename to ...
1301 (default_search_name_hash): ... this and make extern.
1302 * dictionary.h (struct language_defn): Forward declare.
1303 (dict_create_hashed): New parameter 'language'.
1304 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1305 * f-lang.c (f_language_defn): Install default_search_name_hash.
1306 * go-lang.c (go_language_defn): Install default_search_name_hash.
1307 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1308 creation.
1309 * language.c (unknown_language_defn, auto_language_defn):
1310 * language.h (language_defn::la_search_name_hash): New field.
1311 (default_search_name_hash): Declare.
1312 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1313 * mdebugread.c (new_block): New parameter 'language'.
1314 * mdebugread.c (parse_symbol): Pass symbol language to block
1315 allocation.
1316 (psymtab_to_symtab_1): Pass down language.
1317 (new_symtab): Pass compunit's language to block allocation.
1318 * objc-lang.c (objc_language_defn): Install
1319 default_search_name_hash.
1320 * opencl-lang.c (opencl_language_defn):
1321 * p-lang.c (pascal_language_defn): Install
1322 default_search_name_hash.
1323 * rust-lang.c (rust_language_defn): Install
1324 default_search_name_hash.
1325 * stabsread.h (enum language): Forward declare.
1326 (process_one_symbol): Add 'language' parameter.
1327 * symtab.c (search_name_hash): New function.
1328 * symtab.h (search_name_hash): Declare.
1329 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1330
2a1dde5d
PA
13312017-11-08 Pedro Alves <palves@redhat.com>
1332
1333 * cp-name-parser.y (main): Don't initialize extra_chars.
1334
95a6b0a1
TT
13352017-11-07 Tom Tromey <tom@tromey.com>
1336
1337 * event-top.h (command_handler): Constify.
1338 * record-full.c (cmd_record_full_start): Update.
1339 * thread.c (thread_apply_all_command): Update.
1340 * printcmd.c (eval_command): Update.
1341 * mi/mi-main.c (mi_execute_cli_command): Update.
1342 (mi_execute_async_cli_command): Update.
1343 * tui/tui-stack.c (tui_update_command): Update.
1344 * cli/cli-interp.c (safe_execute_command): Constify.
1345 * record.c (record_start): Update.
1346 (record_start, record_stop, cmd_record_start): Update.
1347 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1348 (cmd_record_btrace_pt_start): Update.
1349 (cmd_record_btrace_start): Update.
1350 (cmd_record_btrace_start): Update.
1351 * reverse.c (exec_reverse_once): Update.
1352 * python/python.c (execute_gdb_command): Don't copy the command.
1353 * event-top.c (command_line_handler): Update.
1354 (command_handler): Constify.
1355 * defs.h (deprecated_call_command_hook): Constify.
1356 * cli/cli-script.h (execute_user_command): Constify.
1357 * cli/cli-script.c (execute_user_command): Constify.
1358 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1359 (enum command_control_type): Update.
1360 * main.c (catch_command_errors): Remove non-const overload.
1361 (catch_command_errors_ftype): Remove.
1362 * python/py-cmd.c (cmdpy_function): Constify.
1363 * guile/scm-cmd.c (cmdscm_function): Constify.
1364 * cli/cli-dump.c (call_dump_func): Constify.
1365 * cli/cli-decode.c (do_const_cfunc): Constify.
1366 (do_sfunc): Constify.
1367 (cmd_func): Constify.
1368 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1369 * top.h (execute_command): Constify.
1370 * top.c (execute_command): Constify.
1371 (execute_command_to_string): Constify.
1372 (deprecated_call_command_hook): Constify.
1373 * command.h (cmd_func): Constify.
1374 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1375
eb4c3f4a
TT
13762017-11-07 Tom Tromey <tom@tromey.com>
1377
1378 * ada-lang.c (catch_ada_exception_command): Constify.
1379 (catch_assert_command): Constify.
1380 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1381 (catch_rethrow_command): Constify.
1382 (catch_exception_command_1): Constify.
1383 * breakpoint.h (add_catch_command): Constify.
1384 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1385 (catch_syscall_split_args): Constify.
1386 * break-catch-sig.c (catch_signal_command): Constify.
1387 (catch_signal_split_args): Constify.
1388 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1389 cmd_const_sfunc_ftype.
1390 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1391 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1392 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1393 (add_setshow_string_cmd, struct cmd_list_element)
1394 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1395 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1396 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1397 Constify.
1398 (set_cmd_sfunc): Constify.
1399 (empty_sfunc): Constify.
1400 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1401 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1402 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1403 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1404 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1405 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1406 Constify.
1407 (set_cmd_sfunc): Constify.
1408 (cmd_sfunc_ftype): Remove.
1409 * compile/compile.c (set_compile_args): Constify.
1410 * infrun.c (set_disable_randomization): Constify.
1411 * infcmd.c (set_args_command, set_cwd_command): Constify.
1412 * breakpoint.c (set_condition_evaluation_mode): Constify.
1413 (add_catch_command): Constify.
1414 (catch_fork_command_1, catch_exec_command_1)
1415 (catch_load_command_1, catch_unload_command_1): Constify.
1416 (catch_load_or_unload): Constify.
1417 * guile/scm-param.c (pascm_set_func): Constify.
1418 (add_setshow_generic): Constify.
1419 * python/py-param.c (get_set_value): Constify.
1420 * top.h (set_verbose): Constify.
1421 * tui/tui-win.c (tui_set_var_cmd): Constify.
1422 * mi/mi-main.c (set_mi_async_command): Constify.
1423 * cli/cli-logging.c (set_logging_overwrite)
1424 (set_logging_redirect): Constify.
1425 * value.c (set_max_value_size): Constify.
1426 * valprint.c (set_input_radix, set_output_radix): Constify.
1427 * utils.c (set_width_command, set_height_command): Constify.
1428 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1429 * tracepoint.c (set_disconnected_tracing)
1430 (set_circular_trace_buffer, set_trace_buffer_size)
1431 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1432 * top.c (set_history_size_command, set_verbose, set_editing)
1433 (set_gdb_datadir, set_history_filename): Constify.
1434 * target.c (set_targetdebug, maint_set_target_async_command)
1435 (maint_set_target_non_stop_command, set_target_permissions)
1436 (set_write_memory_permission): Constify.
1437 (open_target): Constify.
1438 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1439 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1440 * symtab.c (set_symbol_cache_size_handler): Constify.
1441 * symfile.c (set_ext_lang_command): Constify.
1442 * symfile-debug.c (set_debug_symfile): Constify.
1443 * source.c (set_directories_command): Constify.
1444 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1445 * serial.c (set_parity): Constify.
1446 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1447 * remote.c (set_remote_exec_file, set_remotebreak)
1448 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1449 * record.c (set_record_insn_history_size)
1450 (set_record_call_history_size): Constify.
1451 * record-full.c (set_record_full_insn_max_num): Constify.
1452 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1453 * osabi.c (set_osabi): Constify.
1454 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1455 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1456 * maint.c (maintenance_set_profile_cmd): Constify.
1457 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1458 * language.c (set_language_command, set_range_command)
1459 (set_case_command): Constify.
1460 * infrun.c (set_non_stop, set_observer_mode)
1461 (set_stop_on_solib_events, set_schedlock_func)
1462 (set_exec_direction_func): Constify.
1463 * infcmd.c (set_inferior_tty_command): Constify.
1464 * disasm.c (set_disassembler_options_sfunc): Constify.
1465 * demangle.c (set_demangling_command): Constify.
1466 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1467 * cris-tdep.c (set_cris_version, set_cris_mode)
1468 (set_cris_dwarf2_cfi): Constify.
1469 * corefile.c (set_gnutarget_command): Constify.
1470 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1471 (set_target_wide_charset_sfunc): Constify.
1472 * breakpoint.c (update_dprintf_commands): Constify.
1473 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1474 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1475 (set_disassembly_style_sfunc): Constify.
1476 * arch-utils.c (set_endian, set_architecture): Constify.
1477 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1478 * agent.c (set_can_use_agent): Constify.
1479
5fed81ff
TT
14802017-11-07 Tom Tromey <tom@tromey.com>
1481
1482 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1483 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1484 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1485 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1486 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1487 (parse_int_arg, show_thread_default_detach_sc_cmd)
1488 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1489 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1490 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1491 (show_task_pause_cmd, set_task_detach_sc_cmd)
1492 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1493 (set_noninvasive_cmd, set_thread_pause_cmd)
1494 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1495 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1496 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1497 * windows-nat.c (display_selectors): Constify.
1498 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1499 non-const "cfunc".
1500 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1501 (cmd_cfunc_eq): Likewise.
1502 (struct cmd_list_element): Likewise.
1503 (do_cfunc): Remove.
1504 (cli_user_command_p): Update.
1505 * command.h (add_cmd): Remove non-const overload.
1506 (cmd_cfunc_ftype): Remove typedef.
1507 (cmd_cfunc_eq): Remove non-const overload.
1508 * value.c (show_values): Constify.
1509 * thread.c (thread_apply_all_command): Constify.
1510 * symfile.c (load_command): Constify.
1511 * source.c (directory_command): Constify.
1512 * maint.c (maintenance_internal_error)
1513 (maintenance_demangler_warning, maintenance_space_display)
1514 (maintenance_print_architecture, maintenance_translate_address)
1515 (maintenance_info_selftests, maintenance_internal_warning):
1516 Constify.
1517 * breakpoint.c (disable_trace_command, enable_trace_command):
1518 Constify.
1519 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1520 Constify.
1521 (add_auto_load_safe_path): Constify.
1522 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1523 * top.h (show_commands): Constify.
1524 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1525 * sparc64-tdep.c (adi_examine_command): Constify.
1526 (adi_assign_command): Constify.
1527
1d12d88f
TT
15282017-11-07 Tom Tromey <tom@tromey.com>
1529
1530 * frame.h (info_locals_command, info_args_command): Constify.
1531 * auto-load.h (auto_load_info_scripts): Constify.
1532 * inferior.h (registers_info): Constify.
1533 * copying.c: Rebuild.
1534 * copying.awk: Constify generated commands.
1535 * auto-load.c (auto_load_info_scripts)
1536 (info_auto_load_gdb_scripts): Constify.
1537 * cli/cli-decode.c (struct cmd_list_element): Take a
1538 cmd_const_cfunc_ftype.
1539 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1540 * tui/tui-win.c (tui_all_windows_info): Constify.
1541 * python/py-auto-load.c (info_auto_load_python_scripts):
1542 Constify.
1543 * cli/cli-cmds.c (show_command): Remove non-const overload.
1544 * tracepoint.c (info_tvariables_command, info_scope_command):
1545 Constify.
1546 (info_static_tracepoint_markers_command): Constify.
1547 * thread.c (info_threads_command): Constify.
1548 (print_thread_info_1): Constify.
1549 * target.c (info_target_command): Constify.
1550 * symtab.c (info_sources_command, info_functions_command)
1551 (info_types_command): Constify.
1552 (info_variables_command): Remove non-const overload.
1553 * symfile.c (info_ext_lang_command): Constify.
1554 * stack.c (info_frame_command, info_locals_command)
1555 (info_args_command): Constify.
1556 (backtrace_command): Remove non-const overload.
1557 * source.c (info_source_command, info_line_command): Constify.
1558 * solib.c (info_sharedlibrary_command): Constify.
1559 * skip.c (info_skip_command): Constify.
1560 * ser-go32.c (info_serial_command): Constify.
1561 * reverse.c (info_bookmarks_command): Constify.
1562 * printcmd.c (info_symbol_command, info_address_command)
1563 (info_display_command): Constify.
1564 * osdata.c (info_osdata_command): Constify.
1565 * objc-lang.c (info_selectors_command, info_classes_command):
1566 Constify.
1567 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1568 * memattr.c (info_mem_command): Constify.
1569 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1570 * linux-fork.c (info_checkpoints_command): Constify.
1571 * infrun.c (info_signals_command): Constify.
1572 * inflow.c (info_terminal_command): Constify.
1573 * inferior.c (info_inferiors_command): Constify.
1574 (print_inferior): Constify.
1575 * infcmd.c (info_program_command, info_all_registers_command)
1576 (info_registers_command, info_vector_command)
1577 (info_float_command): Constify.
1578 (registers_info): Constify.
1579 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1580 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1581 Constify.
1582 * f-valprint.c (info_common_command): Constify.
1583 * dcache.c (info_dcache_command): Constify.
1584 (dcache_info_1): Constify.
1585 * darwin-nat-info.c (info_mach_tasks_command)
1586 (info_mach_task_command, info_mach_ports_command)
1587 (info_mach_port_command, info_mach_threads_command)
1588 (info_mach_thread_command, info_mach_regions_command)
1589 (info_mach_regions_recurse_command, info_mach_region_command)
1590 (info_mach_exceptions_command): Constify.
1591 (get_task_from_args): Constify.
1592 * cp-support.c (info_vtbl_command): Constify.
1593 * breakpoint.c (info_watchpoints_command)
1594 (info_tracepoints_command): Constify.
1595 (info_breakpoints_command): Remove non-const overload.
1596 * avr-tdep.c (avr_io_reg_read_command): Constify.
1597 * auxv.c (info_auxv_command): Constify.
1598 * ada-tasks.c (info_tasks_command): Constify.
1599 (info_task): Constify.
1600 * ada-lang.c (info_exceptions_command): Constify.
1601
0b39b52e
TT
16022017-11-07 Tom Tromey <tom@tromey.com>
1603
1604 * solib.h (no_shared_libraries): Constify.
1605 * frame.h (return_command): Constify.
1606 * cli/cli-cmds.h (quit_command): Constify.
1607 * top.h (quit_command, execute_command): Constify.
1608 * target.h (flash_erase_command): Constify.
1609 * inferior.h (set_inferior_args, attach_command): Constify.
1610 * tracepoint.h (start_tracing, stop_tracing): Constify.
1611 * breakpoint.h (break_command, tbreak_command)
1612 (hbreak_command_wrapper, thbreak_command_wrapper)
1613 (rbreak_command_wrapper, watch_command_wrapper)
1614 (awatch_command_wrapper, rwatch_command_wrapper)
1615 (get_tracepoint_by_number): Constify.
1616 * symtab.c (info_variables_command, rbreak_command)
1617 (symtab_symbol_info): Constify.
1618 (info_variables_command): Add non-const overload.
1619 * top.c (dont_repeat_command): Constify.
1620 * breakpoint.c (ignore_command, commands_command)
1621 (condition_command, tbreak_command, hbreak_command)
1622 (thbreak_command, clear_command, break_command)
1623 (info_breakpoints_command, watch_command, rwatch_command)
1624 (awatch_command, trace_command, ftrace_command, strace_command)
1625 (trace_pass_command, break_range_command, dprintf_command)
1626 (agent_printf_command, get_tracepoint_by_number)
1627 (watch_maybe_just_location, trace_pass_command): Constify.
1628 (info_breakpoints_command): Add non-const overload.
1629 * tracefile.c (tsave_command): Constify.
1630 * infcmd.c (attach_command, disconnect_command, signal_command)
1631 (queue_signal_command, stepi_command, nexti_command)
1632 (finish_command, next_command, step_command, until_command)
1633 (advance_command, jump_command, continue_command, run_command)
1634 (start_command, starti_command, interrupt_command)
1635 (run_command_1, set_inferior_args, step_1): Constify.
1636 * inferior.c (add_inferior_command, remove_inferior_command)
1637 (clone_inferior_command): Constify.
1638 * linux-fork.c (checkpoint_command, restart_command): Constify.
1639 * windows-nat.c (signal_event_command): Constify.
1640 * guile/guile.c (guile_repl_command, guile_command): Constify.
1641 * printcmd.c (x_command, display_command, printf_command)
1642 (output_command, set_command, call_command, print_command)
1643 (eval_command): Constify.
1644 (non_const_set_command): Remove.
1645 (_initialize_printcmd): Update.
1646 * source.c (forward_search_command, reverse_search_command):
1647 Constify.
1648 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1649 Constify.
1650 * infrun.c (handle_command): Constify.
1651 * memattr.c (mem_command): Constify.
1652 * stack.c (return_command, up_command, up_silently_command)
1653 (down_command, down_silently_command, frame_command)
1654 (backtrace_command, func_command, backtrace_command_1): Constify.
1655 (backtrace_command): Add non-const overload.
1656 * remote-sim.c (simulator_command): Constify.
1657 * exec.c (set_section_command): Constify.
1658 * tracepoint.c (tdump_command, trace_variable_command)
1659 (tstatus_command, tstop_command, tstart_command)
1660 (end_actions_pseudocommand, while_stepping_pseudocommand)
1661 (collect_pseudocommand, teval_pseudocommand, actions_command)
1662 (start_tracing, stop_tracing): Constify.
1663 * value.c (init_if_undefined_command): Constify.
1664 * tui/tui-stack.c (tui_update_command): Constify.
1665 * tui/tui-win.c (tui_refresh_all_command)
1666 (tui_set_tab_width_command, tui_set_win_height_command)
1667 (tui_set_focus_command, tui_scroll_forward_command)
1668 (tui_scroll_backward_command, tui_scroll_left_command)
1669 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1670 (tui_set_win_height): Constify.
1671 * tui/tui-layout.c (tui_layout_command): Constify.
1672 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1673 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1674 (proc_untrace_sysexit_cmd): Constify.
1675 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1676 (threadset_test_cmd, threadlist_update_test_cmd)
1677 (threadalive_test): Constify.
1678 * objc-lang.c (print_object_command): Constify.
1679 * command.h (add_com): Constify.
1680 * cli/cli-dump.c (restore_command): Constify.
1681 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1682 (help_command, complete_command, shell_command, edit_command)
1683 (list_command, disassemble_command, make_command)
1684 (apropos_command, alias_command): Constify.
1685 * cli/cli-script.c (document_command, define_command)
1686 (while_command, if_command, validate_comname): Constify.
1687 * cli/cli-decode.c (struct cmd_list_element): Change type of
1688 "fun".
1689 * target.c (do_monitor_command, flash_erase_command): Constify.
1690 * regcache.c (reg_flush_command): Constify.
1691 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1692 (reverse_nexti, reverse_continue, reverse_finish)
1693 (save_bookmark_command, goto_bookmark_command)
1694 (exec_reverse_once): Constify.
1695 * python/python.c (python_interactive_command, python_command):
1696 Constify.
1697 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1698 Constify.
1699 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1700 * gcore.c (gcore_command): Constify.
1701
85c4be7c
TT
17022017-11-07 Tom Tromey <tom@tromey.com>
1703
1704 * printcmd.c (x_command): Call set_repeat_arguments.
1705 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1706 * top.c (repeat_arguments): New global.
1707 (set_repeat_arguments): New function.
1708 (execute_command): Handle repeat_arguments.
1709 (show_commands): Calls set_repeat_arguments.
1710 * command.h (set_repeat_arguments): Declare.
1711
022643b4
TT
17122017-11-07 Tom Tromey <tom@tromey.com>
1713
1714 * stack.c (backtrace_command): Use std::string.
1715 (backtrace_command_1): Make "count_exp" const.
1716
5614fb77
TT
17172017-11-07 Tom Tromey <tom@tromey.com>
1718
1719 * source.c (directory_switch, mod_path, add_path): Constify.
1720 * defs.h (add_path, mod_path, directory_switch): Constify.
1721 * mi/mi-cmd-env.c (env_mod_path): Constify.
1722
6be9a197
TT
17232017-11-07 Tom Tromey <tom@tromey.com>
1724
1725 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1726 (run_command_1, continue_command, step_1, jump_command)
1727 (signal_command, until_command, advance_command, finish_command)
1728 (attach_command): Update.
1729
c2252c0d
TT
17302017-11-07 Tom Tromey <tom@tromey.com>
1731
1732 * command.h (set_cmd_cfunc): Don't declare.
1733 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1734
1ee870c5
TT
17352017-11-07 Tom Tromey <tom@tromey.com>
1736
1737 * stack.c (select_frame_command): Constify.
1738 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1739 * command.h (add_com_suppress_notification): Constify.
1740
ee7ddd71
TT
17412017-11-07 Tom Tromey <tom@tromey.com>
1742
1743 * breakpoint.c (stop_command): Constify.
1744 * cli/cli-decode.c (struct cmd_list_element): Constify.
1745 * command.h (add_abbrev_prefix_cmd): Constify.
1746
95e95a6d
PA
17472017-11-07 Pedro Alves <palves@redhat.com>
1748
1749 * breakpoint.c (extract_bp_kind): New enum.
1750 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1751 factored out from ...
1752 (extract_bp_number_and_location): ... here.
1753 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1754
cc638e86
PA
17552017-11-07 Pedro Alves <palves@redhat.com>
1756
1757 * breakpoint.c (extract_bp_number_and_location): Change return
1758 type to void. Throw error instead of warning.
1759 (enable_disable_command): Adjust.
1760
d0fe4701
XR
17612017-11-07 Xavier Roirand <roirand@adacore.com>
1762 Pedro Alves <palves@redhat.com>
1763
1764 * breakpoint.c (map_breakpoint_number_range): New, factored out
1765 from ...
1766 (map_breakpoint_numbers): ... here.
1767 (find_location_by_number): Change parameters from string to
1768 breakpoint number and location.
1769 (extract_bp_number_and_location): New function.
1770 (enable_disable_bp_num_loc)
1771 (enable_disable_breakpoint_location_range)
1772 (enable_disable_command): New functions, factored out ...
1773 (enable_command, disable_command): ... these functions, and
1774 adjusted to support ranges.
1775 * NEWS: Document enable/disable breakpoint location range feature.
1776
635dc5b2
LM
17772017-11-06 Luis Machado <luis.machado@linaro.org>
1778
1779 * MAINTAINERS (Write After Approval): Update my e-mail address.
1780
556e5da5
PA
17812017-11-06 Pedro Alves <palves@redhat.com>
1782
1783 * gnu-nat.c (gnu_terminal_init): Delete.
1784 (gnu_target): Don't install gnu_terminal_init.
1785 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1786 (child_terminal_init): ... this function.
1787
d1928160
PA
17882017-11-06 Pedro Alves <palves@redhat.com>
1789
1790 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1791 sgtty.h.
1792 * config.in, configure: Regenerate.
1793
6aa899ce
PA
17942017-11-06 Pedro Alves <palves@redhat.com>
1795
1796 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1797 (async_init_signals): Adjust.
1798 (handle_stop_sig): Rename to ...
1799 (handle_sigtstp): ... this.
1800 (async_stop_sig): Rename to ...
1801 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1802 SIGTSTP path.
1803 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1804 instead of STOP_SIGNAL thoughout.
1805 (handle_stop_sig): Rename to ...
1806 (handle_sigtstp): ... this.
1807 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1808
a94799ac
PA
18092017-11-06 Pedro Alves <palves@redhat.com>
1810
1811 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1812 longer set flags twice in row.
1813
726e1356
PA
18142017-11-06 Pedro Alves <palves@redhat.com>
1815
1816 * Makefile.in (SER_HARDWIRE): Update comment.
1817 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1818 * common/gdb_termios.h: Delete file.
1819 * common/job-control.c: Include termios.h and unistd.h instead of
1820 gdb_termios.h.
1821 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1822 check.
1823 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1824 Remove sgtty code.
1825 * configure.ac: No longer check for termio.h and sgtty.h.
1826 * configure: Regenerate.
1827 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1828 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1829 Replace PROCESS_GROUP_TYPE references with pid_t references
1830 throughout.
1831 (gdb_getpgrp): Delete.
1832 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1833 (child_terminal_inferior): Remove comment. Remove sgtty code.
1834 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1835 gdb_getpgrp. Use serial_set_tty_state instead aof
1836 serial_noflush_set_tty_state. Remove sgtty code.
1837 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1838 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1839 (inferior_process_group): Now returns pid_t.
1840 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1841 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1842 * ser-event.c (serial_event_ops): Update.
1843 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1844 (dos_ops): Update.
1845 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1846 * ser-pipe.c (pipe_ops): Update.
1847 * ser-tcp.c (tcp_ops): Update.
1848 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1849 HAVE_TERMIOS checks.
1850 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1851 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1852 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1853 assume termios.
1854 (hardwire_noflush_set_tty_state): Delete.
1855 (hardwire_print_tty_state, hardwire_drain_output)
1856 (hardwire_flush_output, hardwire_flush_input)
1857 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1858 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1859 code, and assume termios.
1860 (hardwire_ops): Update.
1861 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1862 * serial.c (serial_noflush_set_tty_state): Delete.
1863 * serial.h (serial_noflush_set_tty_state): Delete.
1864 (serial_ops::noflush_set_tty_state): Delete.
1865
1cfb73db
UW
18662017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1867
1868 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1869 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1870 (COMMON_OBS): Remove doublest.o and dfp.o.
1871 Do not build target-float.c (instead of doublest.c)
1872 with -Wformat-nonliteral.
1873
1874 * doublest.c: Remove file.
1875 * doublest.h: Remove file.
1876 * dfp.c: Remove file.
1877 * dfp.h: Remove file.
1878
1879 * target-float.c: Do not include "doublest.h" and "dfp.h".
1880 (DOUBLEST): Move here from doublest.h.
1881 (enum float_kind): Likewise.
1882 (FLOATFORMAT_CHAR_BIT): Likewise.
1883 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1884 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1885 (floatformat_precision): Likewise.
1886 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1887 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1888 Likewise.
1889 (host_float_format, host_double_format, host_long_double_format):
1890 Likewise.
1891 (floatformat_to_string, floatformat_from_string): Likewise.
1892 (floatformat_to_doublest): Likewise. Also, inline the original
1893 convert_floatformat_to_doublest.
1894 (floatformat_from_doublest): Likewise. Also, inline the original
1895 convert_floatformat_from_doublest.
1896
1897 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1898 (MAX_DECIMAL_STRING): Move here from dfp.c.
1899 (match_endianness): Likewise.
1900 (set_decnumber_context, decimal_check_errors): Likewise.
1901 (decimal_from_number, decimal_to_number): Likewise.
1902 (decimal_to_string, decimal_from_string): Likewise. Make static.
1903 (decimal_from_longest, decimal_from_ulongest): Likewise.
1904 (decimal_to_longest): Likewise.
1905 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1906 (decimal_convert): Likewise.
1907
b07e9c46
UW
19082017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1909
1910 * doublest.c: Do not include "gdbtypes.h".
1911 (extract_typed_floating): Remove.
1912 (store_typed_floating): Remove.
1913 (convert_typed_floating): Remove.
1914 * doublest.h (struct type): Remove.
1915 (DOUBLEST_PRINT_FORMAT): Remove.
1916 (DOUBLEST_SCAN_FORMAT): Remove.
1917 (extract_typed_floating): Remove.
1918 (store_typed_floating): Remove.
1919 (convert_typed_floating): Remove.
1920
1921 * dfp.c (decimal_from_doublest): Remove.
1922 (decimal_to_doublest): Remove.
1923 * dfp.h: Do not include "doublest.h".
1924 (decimal_from_doublest): Remove.
1925 (decimal_to_doublest): Remove.
1926
1927 * value.c: Do not include "doublest.h" and "dfp.h".
1928 (value_as_double): Remove.
1929 (unpack_double): Remove.
1930 (value_from_double): Remove.
1931 (value_from_decfloat): Remove.
1932 * value.h: Do not include "doublest.h".
1933 (value_as_double): Remove.
1934 (unpack_double): Remove.
1935 (value_from_double): Remove.
1936 (value_from_decfloat): Remove.
1937
3b2ca824
UW
19382017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1939
1940 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1941 (i386_extract_return_value): Use target_float_convert.
1942 (i386_store_return_value): Likewise.
1943 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1944 (i387_value_to_register): Likewise.
1945 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1946 (ia64_register_to_value): Use target_float_convert.
1947 (ia64_value_to_register): Likewise.
1948 (ia64_extract_return_value): Likewise.
1949 (ia64_store_return_value): Likewise.
1950 (ia64_push_dummy_call): Likewise.
1951 * m68k-tdep.c: Include "target-float.h".
1952 (m68k_register_to_value): Use target_float_convert.
1953 (m68k_value_to_register): Likewise.
1954 (m68k_svr4_extract_return_value): Likewise.
1955 (m68k_svr4_store_return_value): Likewise.
1956 * ppc-sysv-tdep.c: Include "target-float.h".
1957 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1958 (do_ppc_sysv_return_value): Likewise.
1959 (ppc64_sysv_abi_push_freg): Likewise.
1960 (ppc64_sysv_abi_return_value_base): Likewise.
1961 * rs6000-aix-tdep.c: Include "target-float.h".
1962 (rs6000_push_dummy_call): Use target_float_convert.
1963 (rs6000_return_value): Likewise.
1964 * rs6000-lynx178-tdep.c: Include "target-float.h".
1965 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1966 (rs6000_lynx178_return_value): Likewise.
1967 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1968 (rs6000_register_to_value): Use target_float_convert.
1969 (rs6000_value_to_register): Likewise.
1970 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1971 (arm_extract_return_value): Use target_float_convert.
1972 (arm_store_return_value): Likewise.
1973 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1974 (sh_register_convert_to_virtual): Use target_float_convert.
1975 (sh_register_convert_to_raw): Likewise.
1976 * sh64-tdep.c: Include "target-float.h".
1977 (sh64_extract_return_value): Use target_float_convert.
1978 (sh64_register_convert_to_virtual): Likewise.
1979 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1980
14ad9311
UW
19812017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1982
1983 * target-float.c (floatformat_to_host_double): New function.
1984 (floatformat_from_host_double): Likewise.
1985 (target_float_to_host_double): Likewise.
1986 (target_float_from_host_double): Likewise.
1987 * target-float.h (target_float_to_host_double): Add prototype.
1988 (target_float_from_host_double): Likewise.
1989
1990 * guile/scm-value.c: Include "target-float.h".
1991 (gdbscm_value_to_real): Use target_float_to_host_double.
1992 Handle integer source values via value_as_long.
1993 * guile/scm-math.c: Include "target-float.h". Do not include
1994 "doublest.h", "dfp.h", and "expression.h".
1995 (vlscm_convert_typed_number): Use target_float_from_host_double.
1996 (vlscm_convert_number): Likewise.
1997
1998 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1999 (convert_value_from_python): Use target_float_from_host_double.
2000
50eff16b
UW
20012017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2002
2003 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2004 (cast_from_fixed): Likewise.
2005 (ada_scaling_type): New function.
2006 (ada_delta): Return value instead of DOUBLEST. Perform target
2007 arithmetic instead of host arithmetic.
2008 (scaling_factor): Rename to ...
2009 (ada_scaling_factor) ... this. Make non-static. Return value instead
2010 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2011 (ada_fixed_to_float): Remove.
2012 (ada_float_to_fixed): Remove.
2013 * ada-lang.h (ada_fixed_to_float): Remove.
2014 (ada_float_to_fixed): Remove.
2015 (ada_delta): Return value instead of DOUBLEST.
2016 (ada_scaling_factor): Add prototype.
2017
2018 * ada-typeprint.c: Include "target-float.h".
2019 (print_fixed_point_type): Perform target arithmetic instead of
2020 host arithmetic.
2021 * ada-valprint.c: Include "target-float.h".
2022 (ada_val_print_num): Perform target arithmetic instead of
2023 host arithmetic for fixed-point types.
2024
66c02b9e
UW
20252017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2026
2027 * target-float.c: Include <math.h>.
2028 (floatformat_binop): New function.
2029 (floatformat_compare): Likewise.
2030 (target_float_binop): Likewise.
2031 (target_float_compare): Likewise.
2032 * target-float.h: Include "expression.h".
2033 (target_float_binop): Add prototype.
2034 (target_float_compare): Likewise.
2035
2036 * valarith.c: Do not include "doublest.h" and "dfp.h".
2037 Include "common/byte-vector.h".
2038 (value_args_as_decimal): Remove, replace by ...
2039 (value_args_as_target_float): ... this function. Handle both
2040 binary and decimal target floating-point formats.
2041 (scalar_binop): Handle both binary and decimal FP using
2042 value_args_as_target_float and target_float_binop.
2043 (value_equal): Handle both binary and decimal FP using
2044 value_args_as_target_float and target_float_compare.
2045 (value_less): Likewise.
2046 (value_pos): Handle all scalar types as simple copy.
2047 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2048 * dfp.c (decimal_binop): Throw error instead of internal_error
2049 when called with an unsupported operation code.
2050
f69fdf9b
UW
20512017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2052
2053 * target-float.c (target_float_to_string): New function.
2054 (target_float_from_string): New function.
2055 * target-float.h (target_float_to_string): Add prototype.
2056 (target_float_from_string): Add prototype.
2057
2058 * valprint.c: Include "target-float.h". Do not include
2059 "doublest.h" and "dfp.h".
2060 (print_floating): Use target_float_to_string.
2061 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2062 (printf_floating): Use target_float_to_string.
2063 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2064 (print_i387_value): Use target_float_to_string.
2065 * mips-tdep.c: Include "target-float.h".
2066 (mips_print_fp_register): Use target_float_to_string.
2067 * sh64-tdep.c: Include "target-float.h".
2068 (sh64_do_fp_register): Use target_float_to_string.
2069
2070 * parse.c: Include "target-float.h". Do not include
2071 "doublest.h" and "dfp.h".
2072 (parse_float): Use target_float_from_string.
2073 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2074 (define_symbol): Use target_float_from_string.
2075 * gdbarch-selftests.c: Include "target-float.h".
2076 (register_to_value_test): Use target_float_from_string.
2077
70100014
UW
20782017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2079
2080 * Makefile.c (SFILES): Add target-float.c.
2081 (HFILES_NO_SRCDIR): Add target-float.h.
2082 (COMMON_OBS): Add target-float.o.
2083 * target-float.h: New file.
2084 * target-float.c: New file.
2085
2086 * doublest.c (floatformat_classify): Fix detection of float_zero.
2087
2088 * gdbtypes.c (is_floating_type): New function.
2089 * gdbtypes.h (is_floating_type): Add prototype.
2090
2091 * value.c: Do not include "floatformat.h".
2092 (unpack_double): Use target_float_is_valid.
2093 (is_floating_value): New function.
2094 * value.h (is_floating_value): Add prototype-
2095
2096 * valarith.c: Include "target-float.h".
2097 (value_logical_not): Use target_float_is_zero.
2098
2099 * python/py-value.c: Include "target-float.h".
2100 (valpy_nonzero): Use target_float_is_zero.
2101
ab4b1c46
TT
21022017-11-04 Tom Tromey <tom@tromey.com>
2103
2104 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2105
454dafbd
TT
21062017-11-04 Tom Tromey <tom@tromey.com>
2107
2108 * breakpoint.c (set_momentary_breakpoint): Return
2109 breakpoint_up.
2110 (until_break_command): Update.
2111 (new_until_break_fsm): Change argument types to
2112 breakpoint_up.
2113 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2114 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2115 Remove.
2116 * infcmd.c (finish_forward): Update.
2117 * breakpoint.h (set_momentary_breakpoint)
2118 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2119 (make_cleanup_delete_breakpoint): Remove.
2120 (struct breakpoint_deleter): New.
2121 (breakpoint_up): New typedef.
2122 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2123 (insert_exception_resume_breakpoint): Update.
2124 (insert_exception_resume_from_probe): Update.
2125 (insert_longjmp_resume_breakpoint): Update.
2126 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2127 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2128 * infcall.c (call_function_by_hand_dummy): Update
2129
331b71e5
TT
21302017-11-04 Tom Tromey <tom@tromey.com>
2131
2132 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2133
9f584b37
TT
21342017-11-04 Tom Tromey <tom@tromey.com>
2135
2136 * linux-tdep.c (linux_core_info_proc_mappings): Use
2137 gdb::def_vector.
2138 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2139 "size" argument.
2140 (linux_corefile_thread): Update.
2141 (linux_make_corefile_notes): Remove unused variable.
2142
779bc38e
TT
21432017-11-04 Tom Tromey <tom@tromey.com>
2144
2145 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2146 gdb::byte_vector.
2147
ed2b3126
TT
21482017-11-04 Tom Tromey <tom@tromey.com>
2149
2150 * objfiles.c (do_free_objfile_cleanup): Remove.
2151 * compile/compile-object-load.c (compile_object_load): Update.
2152 * objfiles.h (make_cleanup_free_objfile): Remove.
2153
7f6743fd
TT
21542017-11-04 Tom Tromey <tom@tromey.com>
2155
2156 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2157 (adi_read_versions): Change "tags" to "gdb_byte *".
2158 (adi_print_versions): Likewise.
2159
c80049d3
TT
21602017-11-04 Tom Tromey <tom@tromey.com>
2161
2162 * breakpoint.c
2163 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2164 from start_rbreak_breakpoints.
2165 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2166 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2167 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2168 * symtab.c (do_end_rbreak_breakpoints): Remove.
2169 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2170
167b0be1
TT
21712017-11-04 Tom Tromey <tom@tromey.com>
2172
2173 * cp-namespace.c (reset_directive_searched): Remove.
2174 (cp_lookup_symbol_via_imports): Use scoped_restore.
2175 * cp-support.c (reset_directive_searched): Remove.
2176 (make_symbol_overload_list_using): Use scoped_restore.
2177 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2178 (reset_directive_searched): Remove.
2179
5eae7aea
TT
21802017-11-04 Tom Tromey <tom@tromey.com>
2181
2182 * symfile.c (find_separate_debug_file_by_debuglink): Use
2183 unique_xmalloc_ptr.
2184
c6bcad5f
TT
21852017-11-04 Tom Tromey <tom@tromey.com>
2186
2187 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2188 type of "info".
2189 (compute_stack_depth): Likewise.
2190 (do_compile_dwarf_expr_to_c): Use std::vector.
2191
20dcd8ca
TT
21922017-11-04 Tom Tromey <tom@tromey.com>
2193
2194 * compile/compile-object-load.c (link_callbacks_einfo): Use
2195 std::string.
2196
33c7c59d
TT
21972017-11-04 Tom Tromey <tom@tromey.com>
2198
2199 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2200 Use scoped_free_pendings.
2201 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2202 scoped_free_pendings.
2203 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2204 (xcoff_initial_scan): Likewise.
2205 * buildsym.c (reset_symtab_globals): Update comment.
2206 (scoped_free_pendings): Rename from really_free_pendings.
2207 (prepare_for_building): Update comment.
2208 (buildsym_init): Likewise.
2209 * buildsym.h (class scoped_free_pendings): New class.
2210 (really_free_pendings): Don't declare.
2211
67fa57cf
UW
22122017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2213
2214 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2215 output when converting a zero value to a special byteorder format.
2216
f26ae15b
YQ
22172017-11-02 Yao Qi <yao.qi@linaro.org>
2218
2219 * frame.c (do_frame_register_read): Remove aspace.
2220 * jit.c (jit_frame_sniffer): Likwise.
2221 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2222 * regcache.c (regcache::regcache): Pass nullptr.
2223 (regcache_print): Caller updated.
2224 * regcache.h (regcache::regcache): Remove one constructor
2225 parameter aspace.
2226
6c6e9412
YQ
22272017-11-02 Yao Qi <yao.qi@linaro.org>
2228
2229 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2230
8b86c959
YQ
22312017-11-02 Yao Qi <yao.qi@linaro.org>
2232
2233 * breakpoint.c (insert_single_step_breakpoints): Update.
2234 * frame.c (struct frame_info) <aspace>: Add const.
2235 (frame_save_as_regcache): Add const.
2236 (get_frame_address_space): Return const address_space *.
2237 * frame.h (get_frame_address_space): Update declaration.
2238 * infrun.c (struct step_over_info) <aspace>: Add const.
2239 (set_step_over_info): Make aspace const.
2240 (displaced_step_prepare_throw): Change variable const.
2241 (resume): Likewise.
2242 (proceed): Likewise.
2243 (adjust_pc_after_break): Likewise.
2244 (save_waitstatus): Likewise.
2245 (handle_signal_stop): Likewise.
2246 (keep_going_pass_signal): Likewise.
2247 * jit.c (jit_frame_sniffer): Add const.
2248 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2249 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2250 * record-full.c (record_full_wait_1): Likewise.
2251 * regcache.c (regcache::regcache): Change parameter to const.
2252 * regcache.h (regcache::regcache): Likewise.
2253 (regcache::aspace): Return const address_space *.
2254 (regcache) <m_aspace>: Add const.
2255
a01bda52
YQ
22562017-11-02 Yao Qi <yao.qi@linaro.org>
2257
2258 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2259 * frame.c (create_sentinel_frame): Likewise.
2260 * infrun.c (displaced_step_prepare_throw): Likewise.
2261 (resume): Likewise.
2262 (thread_still_needs_step_over_bp): Likewise.
2263 (proceed): Likewise.
2264 (do_target_wait): Likewise.
2265 (adjust_pc_after_break): Likewise.
2266 (handle_syscall_event): Likewise.
2267 (save_waitstatus): Likewise.
2268 (handle_inferior_event_1): Likewise.
2269 (handle_signal_stop): Likewise.
2270 (keep_going_pass_signal): Likewise.
2271 * linux-nat.c (status_callback): Likewise.
2272 (save_stop_reason): Likewise.
2273 (resume_stopped_resumed_lwps): Likewise.
2274 * record-full.c (record_full_exec_insn): Likewise.
2275 (record_full_wait_1): Likewise.
2276 * regcache.c (get_regcache_aspace): Remove.
2277 * regcache.h (get_regcache_aspace): Remove.
2278
d999647b
YQ
22792017-11-02 Yao Qi <yao.qi@linaro.org>
2280
2281 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2282 (init_regcache_descr): Use gdbarch_num_regs.
2283 (regcache::regcache): Likewise.
2284 (regcache::get_register_status): Likewise.
2285 (regcache::assert_raw_regnum): Likewise.
2286 (regcache::cooked_read): Likewise.
2287 (regcache::cooked_read_value): Likewise.
2288 (regcache::cooked_write): Likewise.
2289 (regcache::dump): Likewise.
2290 (regcache::num_raw_registers): New method.
2291 * regcache.h (class regcache) <num_raw_registers>: New.
2292
4e888c28
YQ
22932017-11-02 Yao Qi <yao.qi@linaro.org>
2294
2295 * regcache.c (regcache::assert_regnum): New method.
2296 (regcache::invalidate): Call assert_regnum.
2297 (regcache::raw_update): Likewise.
2298 (regcache::raw_write): Likewise.
2299 (regcache::raw_read_part): Likewise.
2300 (regcache::raw_write_part): Likewise.
2301 (regcache::raw_supply): Likewise.
2302 (regcache::raw_supply_integer): Likewise.
2303 (regcache::raw_supply_zeroed): Likewise.
2304 (regcache::raw_collect): Likewise.
2305 (regcache::raw_collect_integer): Likewise.
2306 * regcache.h (regcache::assert_regnum): Declare.
2307
2e1b49b3
YQ
23082017-11-02 Yao Qi <yao.qi@linaro.org>
2309
2310 * regcache.c (regcache::dump): Remove code.
2311
6c5218df
YQ
23122017-11-02 Yao Qi <yao.qi@linaro.org>
2313
2314 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2315 Remove.
2316 <sizeof_cooked_register_status>: Remove.
2317 (init_regcache_descr): Update.
2318 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2319 (regcache::save): Likewise.
2320 (regcache::dump): Likewise.
2321
dcc31d28
JB
23222017-11-01 James Bowman <james.bowman@ftdichip.com>
2323
2324 * ft32-tdep.c (ft32_fetch_instruction): New function.
2325 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2326
3a87ae65
SM
23272017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2328
2329 * cli/cli-script.c (execute_control_command): Rename to ...
2330 (execute_control_command_1): ... this.
2331 (execute_control_command): New function.
2332
09b847f3
SM
23332017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2334
2335 * tracepoint.c (tfind_command): Remove const_cast.
2336
f871c485
MG
23372017-10-30 Mike Gulick <mgulick@mathworks.com>
2338
2339 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2340
b020ff80
SM
23412017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2342
2343 * common/common-utils.h (in_inclusive_range): New function.
2344 * arm-tdep.c (arm_record_extension_space): Use
2345 in_inclusive_range.
2346 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2347 * cris-tdep.c (cris_spec_reg_applicable): Use
2348 in_inclusive_range.
2349
1b81856f
PA
23502017-10-30 Pedro Alves <palves@redhat.com>
2351 Simon Marchi <simon.marchi@ericsson.com>
2352
2353 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2354 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2355
31b833b3
PA
23562017-10-30 Pedro Alves <palves@redhat.com>
2357
2358 * common/common-utils.c (string_appendf, string_vappendf): New
2359 functions.
2360 * common/common-utils.h (string_appendf, string_vappendf): New
2361 declarations.
2362 * unittests/common-utils-selftests.c (string_appendf_func)
2363 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2364 (string_vappendf_tests): New functions.
2365 (_initialize_common_utils_selftests): Register "string_appendf" and
2366 "string_vappendf tests".
2367
4a250334
PA
23682017-10-30 Pedro Alves <palves@redhat.com>
2369
2370 * unittests/common-utils-selftests.c (format_func): New typedef.
2371 (string_printf_tests, string_vprintf_tests): Tests factored out
2372 and merged to ...
2373 (test_format_func): ... this new function.
2374 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2375 test_format_func.
2376
16c5c17e
SM
23772017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2378
2379 * darwin-nat.c: Remove include of gdb.h.
2380
7ca51576
SM
23812017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2382
2383 * xtensa-xtregs.c: Fix formatting issues.
2384
c1342859
SM
23852017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2386
2387 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2388
484d8d36
MD
23892017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2390
2391 PR python/21213
2392 * python/py-infthread.c (thpy_get_inferior): Increment reference
2393 of inferior before returning it.
2394
b5540b5f
SM
23952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2396
2397 * unittests/common-utils-selftests.c (format): Add
2398 ATTRIBUTE_PRINTF.
2399
5a9dcda1
SM
24002017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2401
2402 * xml-syscall.c (struct syscall_desc): Add constructor.
2403 <name>: Change type to std::string.
2404 (syscall_desc_up): New typedef.
2405 (syscall_desc_p): Remove typeder.
2406 (DEF_VEC_P(syscall_desc_p)): Remove.
2407 (struct syscall_group_desc): Add constructor.
2408 <name>: Change type to std::string.
2409 <syscalls>: Change type to std::vector.
2410 (syscall_group_desc_up): New typedef.
2411 (syscall_group_desc_p): Remove typedef.
2412 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2413 (struct syscalls_info) <syscalls>: Change type to std::vector of
2414 unique_ptr.
2415 <groups>: Likewise.
2416 <my_gdb_datadir>: Change type to std::string.
2417 (syscalls_info_up): New typedef.
2418 (allocate_syscalls_info): Remove.
2419 (syscalls_info_free_syscalls_desc): Remove.
2420 (syscalls_info_free_syscall_group_desc): Remove.
2421 (free_syscalls_info): Remove.
2422 (make_cleanup_free_syscalls_info): Remove.
2423 (syscall_group_create_syscall_group_desc): Adjust.
2424 (syscall_group_add_syscall): Adjust.
2425 (syscall_create_syscall_desc): Adjust.
2426 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2427 (init_syscalls_info): Adjust.
2428 (syscall_group_get_group_by_name): Adjust.
2429 (xml_get_syscall_number): Adjust.
2430 (xml_get_syscall_name): Adjust.
2431 (xml_list_of_syscalls): Adjust.
2432 (xml_list_syscalls_by_group): Adjust.
2433 (xml_list_of_groups): Adjust.
2434
45461e0d
SM
24352017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2436
2437 * probe.h: Don't include gdb_vecs.h.
2438 (DEF_VEC_P (probe_p)): Remove.
2439 (find_probes_in_objfile): Return an std::vector.
2440 * probe.c (find_probes_in_objfile): Likewise.
2441 * breakpoint.c (breakpoint_objfile_data)
2442 <longjmp_probes>: Change type to std::vector.
2443 <exception_probes>: Likewise.
2444 (free_breakpoint_probes): Don't manually free vectors.
2445 (create_longjmp_master_breakpoint): Adjust.
2446 (create_exception_master_breakpoint): Adjust.
2447 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2448 parameter type, adjust.
2449 (svr4_create_solib_event_breakpoints): Adjust.
2450
43dce439
SM
24512017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2452
2453 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2454 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2455 with new.
2456 (free_breakpoint_probes): Rename to ...
2457 (free_breakpoint_objfile_data): ... this, and call delete on
2458 bp_objfile_data..
2459
6a1b9516
SM
24602017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2461
2462 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2463 (loaded_script_ptr): Remove typedef.
2464 (DEF_VEC_P (loaded_script_ptr)): Remove.
2465 (struct collect_matching_scripts_data): Add constructor.
2466 <scripts_p>: Change type to (pointer to) std::vector.
2467 (collect_matching_scripts_data): Adjust.
2468 (sort_scripts_by_name): Make suitable for std::sort.
2469 (print_scripts): Don't sort vector, adjust to std::vector.
2470 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2471
593e3209
SM
24722017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2473
2474 * symfile.c (filename_language): Make struct, not typedef. Add
2475 constructor.
2476 <ext>: Change type to std::string.
2477 (DEF_VEC_O (filename_language)): Remove.
2478 (filename_language_table): Change type to std::vector.
2479 (add_filename_language): Adjust.
2480 (set_ext_lang_command): Adjust.
2481 (info_ext_lang_command): Adjust.
2482 (deduce_language_from_filename): Adjust.
2483 (class scoped_restore_filename_language_table): Remove.
2484 (test_filename_language): Use scoped_restore.
2485 (test_set_ext_lang_command): Use scoped_restore, adjust to
2486 std::vector change.
2487
32fa66eb
SM
24882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2489
2490 * symfile.c: Include selftest.h.
2491 (class scoped_restore_filename_language_table): New.
2492 (test_filename_language): New test.
2493 (test_set_ext_lang_command): New test.
2494 (_initialize_symfile): Register tests.
2495
4a27f119
KS
24962017-10-27 Keith Seitz <keiths@redhat.com>
2497
2498 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2499 in the bp_location, falling back to find_pc_sect_function when
2500 needed.
2501 (add_location_to_breakpoint): Save sal->symbol.
2502 * breakpoint.h (struct bp_location) <symbol>: New field.
2503 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2504 * symtab.h (struct symtab_and_line) <symbol>: New field.
2505
a43f3893
PF
25062017-10-26 Patrick Frants <osscontribute@gmail.com>
2507
7453e6b2 2508 PR gdb/13669
a43f3893
PF
2509 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2510 to rewind obstack.
2511
23cc4e1b
PA
25122017-10-26 Pedro Alves <palves@redhat.com>
2513
2514 * remote.c (remote_async_terminal_ours_p): Delete.
2515 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2516 Remove references to 'remote_async_terminal_ours_p'.
2517
6abc18bb
YQ
25182017-10-26 Yao Qi <yao.qi@linaro.org>
2519
2520 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2521
bd522513
YQ
25222017-10-26 Yao Qi <yao.qi@linaro.org>
2523
2524 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2525 aspace const.
2526 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2527 Likewise.
2528 * breakpoint.c (bpstat_check_location): Remove cast.
2529 (breakpoint_hit_catch_fork): Make aspce const.
2530 (breakpoint_hit_catch_solib): Likewise.
2531 (breakpoint_hit_catch_exec): Likewise.
2532 (breakpoint_hit_ranged_breakpoint): Likewise.
2533 (breakpoint_hit_watchpoint): Likewise.
2534 (base_breakpoint_breakpoint_hit): Likewise.
2535 (bkpt_breakpoint_hit): Likewise.
2536 (dprintf_breakpoint_hit): Likewise.
2537 (tracepoint_breakpoint_hit): Likewise.
2538 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2539
accd0bcd
YQ
25402017-10-26 Yao Qi <yao.qi@linaro.org>
2541
2542 * breakpoint.c (breakpoint_location_address_match): Change
2543 "struct address_space *" to "const address_space".
2544 (breakpoint_location_address_range_overlap): Likewise.
2545 (breakpoint_here_p): Likewise.
2546 (breakpoint_in_range_p): Likewise.
2547 (moribund_breakpoint_here_p): Likewise.
2548 (bp_location_inserted_here_p): Likewise.
2549 (software_breakpoint_inserted_here_p): Likewise.
2550 (hardware_breakpoint_inserted_here_p): Likewise.
2551 (hardware_watchpoint_inserted_in_range): Likewise.
2552 (bpstat_check_location): Likewise.
2553 (bpstat_stop_status): Likewise.
2554 (breakpoint_address_match): Likewise.
2555 (breakpoint_address_match_range): Likewise.
2556 (breakpoint_location_address_match): Likewise.
2557 (breakpoint_location_address_range_overlap): Likewise.
2558 (insert_single_step_breakpoint): Likewise.
2559 (breakpoint_has_location_inserted_here): Likewise.
2560 (single_step_breakpoint_inserted_here_p): Likewise.
2561 (pc_at_non_inline_function): Likewise.
2562 * breakpoint.h (bpstat_stop_status): Update declaration.
2563 (breakpoint_here_p): Likewise.
2564 (breakpoint_in_range_p): Likewise.
2565 (moribund_breakpoint_here_p): Likewise.
2566 (breakpoint_inserted_here_p): Likewise.
2567 (software_breakpoint_inserted_here_p): Likewise.
2568 (hardware_breakpoint_inserted_here_p): Likewise.
2569 (breakpoint_has_location_inserted_here): Likewise.
2570 (single_step_breakpoint_inserted_here_p): Likewise.
2571 (hardware_watchpoint_inserted_in_range): Likewise.
2572 (breakpoint_address_match): Likewise.
2573 (insert_single_step_breakpoint): Likewise.
2574 (pc_at_non_inline_function): Likewise.
2575 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2576 * record.c (record_check_stopped_by_breakpoint): Likewise.
2577 * record.h (record_check_stopped_by_breakpoint): Likewise.
2578 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2579
ac7936df
YQ
25802017-10-25 Yao Qi <yao.qi@linaro.org>
2581
2582 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2583 regcache->arch () instead get_regcache_arch.
2584 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2585 Likewise.
2586 (aarch64_fbsd_store_inferior_registers): Likewise.
2587 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2588 (store_gregs_to_thread): Likewise.
2589 (fetch_fpregs_from_thread): Likewise.
2590 (store_fpregs_to_thread): Likewise.
2591 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2592 (aarch64_store_return_value): Likewise.
2593 (aarch64_software_single_step): Likewise.
2594 * aix-thread.c (aix_thread_wait): Likewise.
2595 (supply_reg32): Likewise.
2596 (supply_sprs64): Likewise.
2597 (supply_sprs32): Likewise.
2598 (fill_gprs64): Likewise.
2599 (fill_gprs32): Likewise.
2600 (fill_sprs64): Likewise.
2601 (fill_sprs32): Likewise.
2602 (store_regs_user_thread): Likewise.
2603 (store_regs_kernel_thread): Likewise.
2604 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2605 (alphabsd_store_inferior_registers): Likewise.
2606 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2607 (alpha_store_return_value): Likewise.
2608 (alpha_deal_with_atomic_sequence): Likewise.
2609 (alpha_next_pc): Likewise.
2610 (alpha_software_single_step): Likewise.
2611 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2612 (amd64bsd_store_inferior_registers): Likewise.
2613 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2614 Likewise.
2615 (amd64_linux_store_inferior_registers): Likewise.
2616 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2617 (amd64_collect_native_gregset): Likewise.
2618 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2619 (amd64obsd_collect_uthread): Likewise.
2620 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2621 (amd64_collect_fpregset): Likewise.
2622 (amd64_supply_fxsave): Likewise.
2623 (amd64_supply_xsave): Likewise.
2624 (amd64_collect_fxsave): Likewise.
2625 (amd64_collect_xsave): Likewise.
2626 * arc-tdep.c (arc_write_pc): Likewise.
2627 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2628 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2629 (arm_fbsd_store_inferior_registers): Likewise.
2630 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2631 (store_vfp_regs): Likewise.
2632 (arm_linux_fetch_inferior_registers): Likewise.
2633 (arm_linux_store_inferior_registers): Likewise.
2634 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2635 (arm_linux_sigreturn_next_pc): Likewise.
2636 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2637 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2638 (fetch_register): Likewise.
2639 (store_register): Likewise.
2640 * arm-tdep.c (arm_is_thumb): Likewise.
2641 (displaced_in_arm_mode): Likewise.
2642 (bx_write_pc): Likewise.
2643 (arm_get_next_pcs_addr_bits_remove): Likewise.
2644 (arm_software_single_step): Likewise.
2645 (arm_extract_return_value): Likewise.
2646 (arm_store_return_value): Likewise.
2647 (arm_write_pc): Likewise.
2648 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2649 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2650 (bsd_uthread_store_registers): Likewise.
2651 * core-regset.c (fetch_core_registers): Likewise.
2652 * corelow.c (get_core_registers): Likewise.
2653 * cris-tdep.c (cris_store_return_value): Likewise.
2654 (cris_extract_return_value): Likewise.
2655 (find_step_target): Likewise.
2656 (find_step_target): Likewise.
2657 (cris_software_single_step): Likewise.
2658 * ctf.c (ctf_fetch_registers): Likewise.
2659 * darwin-nat.c (cancel_breakpoint): Likewise.
2660 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2661 * frv-tdep.c (frv_extract_return_value): Likewise.
2662 * ft32-tdep.c (ft32_store_return_value): Likewise.
2663 (ft32_extract_return_value): Likewise.
2664 * go32-nat.c (fetch_register): Likewise.
2665 (go32_fetch_registers): Likewise.
2666 (go32_store_registers): Likewise.
2667 (store_register): Likewise.
2668 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2669 (h8300_store_return_value): Likewise.
2670 * hppa-linux-nat.c (fetch_register): Likewise.
2671 (store_register): Likewise.
2672 (hppa_linux_fetch_inferior_registers): Likewise.
2673 (hppa_linux_store_inferior_registers): Likewise.
2674 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2675 (i386_darwin_store_inferior_registers): Likewise.
2676 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2677 (gnu_store_registers): Likewise.
2678 * i386-linux-nat.c (fetch_register): Likewise.
2679 (store_register): Likewise.
2680 (supply_gregset): Likewise.
2681 (fill_gregset): Likewise.
2682 (i386_linux_fetch_inferior_registers): Likewise.
2683 (i386_linux_store_inferior_registers): Likewise.
2684 (i386_linux_resume): Likewise.
2685 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2686 Likewise.
2687 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2688 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2689 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2690 (i386obsd_collect_uthread): Likewise.
2691 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2692 (i386_supply_gregset): Likewise.
2693 (i386_collect_gregset): Likewise.
2694 (i386_supply_fpregset): Likewise.
2695 (i386_collect_fpregset): Likewise.
2696 (i386_mpx_bd_base): Likewise.
2697 * i386-v4-nat.c (supply_fpregset): Likewise.
2698 (fill_fpregset): Likewise.
2699 * i387-tdep.c (i387_supply_fsave): Likewise.
2700 (i387_collect_fsave): Likewise.
2701 (i387_supply_fxsave): Likewise.
2702 (i387_collect_fxsave): Likewise.
2703 (i387_supply_xsave): Likewise.
2704 (i387_collect_xsave): Likewise.
2705 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2706 (ia64_linux_store_registers): Likewise.
2707 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2708 (ia64_extract_return_value): Likewise.
2709 (ia64_store_return_value): Likewise.
2710 (find_func_descr): Likewise.
2711 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2712 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2713 (inf_ptrace_store_registers): Likewise.
2714 * infrun.c (use_displaced_stepping): Likewise.
2715 (displaced_step_prepare_throw): Likewise.
2716 (resume): Likewise.
2717 (proceed): Likewise.
2718 (do_target_wait): Likewise.
2719 (adjust_pc_after_break): Likewise.
2720 (handle_inferior_event_1): Likewise.
2721 (handle_signal_stop): Likewise.
2722 (save_infcall_suspend_state): Likewise.
2723 (restore_infcall_suspend_state): Likewise.
2724 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2725 * jit.c (jit_frame_prev_register): Likewise.
2726 * linux-nat.c (save_stop_reason): Likewise.
2727 (linux_nat_wait_1): Likewise.
2728 (resume_stopped_resumed_lwps): Likewise.
2729 * linux-record.c (record_linux_sockaddr): Likewise.
2730 (record_linux_msghdr): Likewise.
2731 (record_linux_system_call): Likewise.
2732 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2733 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2734 (lm32_store_return_value): Likewise.
2735 * m32c-tdep.c (m32c_read_flg): Likewise.
2736 (m32c_pseudo_register_read): Likewise.
2737 (m32c_pseudo_register_write): Likewise.
2738 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2739 (m32r_linux_collect_gregset): Likewise.
2740 * m32r-tdep.c (m32r_store_return_value): Likewise.
2741 (m32r_extract_return_value): Likewise.
2742 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2743 (m68kbsd_collect_fpregset): Likewise.
2744 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2745 * m68k-linux-nat.c (fetch_register): Likewise.
2746 (old_fetch_inferior_registers): Likewise.
2747 (old_store_inferior_registers): Likewise.
2748 (store_regs): Likewise.
2749 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2750 (m68k_svr4_store_return_value): Likewise.
2751 * m88k-tdep.c (m88k_store_arguments): Likewise.
2752 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2753 (mi_cmd_data_write_register_values): Likewise.
2754 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2755 (mips_fbsd_store_inferior_registers): Likewise.
2756 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2757 (mips_fbsd_supply_gregs): Likewise.
2758 (mips_fbsd_collect_fpregs): Likewise.
2759 (mips_fbsd_collect_gregs): Likewise.
2760 (mips_fbsd_supply_fpregset): Likewise.
2761 (mips_fbsd_collect_fpregset): Likewise.
2762 (mips_fbsd_supply_gregset): Likewise.
2763 (mips_fbsd_collect_gregset): Likewise.
2764 * mips-linux-nat.c (supply_gregset): Likewise.
2765 (fill_gregset): Likewise.
2766 (supply_fpregset): Likewise.
2767 (fill_fpregset): Likewise.
2768 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2769 (mips_fill_gregset): Likewise.
2770 (mips_supply_fpregset): Likewise.
2771 (mips_fill_fpregset): Likewise.
2772 (mips64_supply_gregset): Likewise.
2773 (micromips_linux_sigframe_validate): Likewise.
2774 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2775 (mipsnbsd_fetch_inferior_registers): Likewise.
2776 (mipsnbsd_store_inferior_registers): Likewise.
2777 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2778 (mipsnbsd_supply_gregset): Likewise.
2779 (mipsnbsd_iterate_over_regset_sections): Likewise.
2780 (mipsnbsd_supply_reg): Likewise.
2781 (mipsnbsd_supply_fpreg): Likewise.
2782 * mips-tdep.c (mips_in_frame_stub): Likewise.
2783 (mips_dummy_id): Likewise.
2784 (is_octeon_bbit_op): Likewise.
2785 (micromips_bc1_pc): Likewise.
2786 (extended_mips16_next_pc): Likewise.
2787 (mips16_next_pc): Likewise.
2788 (deal_with_atomic_sequence): Likewise.
2789 * moxie-tdep.c (moxie_process_readu): Likewise.
2790 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2791 * nto-procfs.c (procfs_store_registers): Likewise.
2792 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2793 (ppcfbsd_store_inferior_registers): Likewise.
2794 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2795 (fetch_altivec_register): Likewise.
2796 (get_spe_registers): Likewise.
2797 (fetch_spe_register): Likewise.
2798 (fetch_altivec_registers): Likewise.
2799 (fetch_all_gp_regs): Likewise.
2800 (fetch_all_fp_regs): Likewise.
2801 (store_vsx_register): Likewise.
2802 (store_altivec_register): Likewise.
2803 (set_spe_registers): Likewise.
2804 (store_spe_register): Likewise.
2805 (store_altivec_registers): Likewise.
2806 (store_all_gp_regs): Likewise.
2807 (store_all_fp_regs): Likewise.
2808 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2809 (ppc_linux_collect_gregset): Likewise.
2810 (ppc_canonicalize_syscall): Likewise.
2811 (ppc_linux_record_signal): Likewise.
2812 (ppu2spu_prev_register): Likewise.
2813 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2814 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2815 (ppcobsd_store_registers): Likewise.
2816 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2817 Likewise.
2818 (ppc_ravenscar_generic_store_registers): Likewise.
2819 * procfs.c (procfs_fetch_registers): Likewise.
2820 (procfs_store_registers): Likewise.
2821 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2822 (ravenscar_store_registers): Likewise.
2823 (ravenscar_prepare_to_store): Likewise.
2824 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2825 * record-full.c (record_full_wait_1): Likewise.
2826 (record_full_registers_change): Likewise.
2827 (record_full_store_registers): Likewise.
2828 (record_full_core_fetch_registers): Likewise.
2829 (record_full_save): Likewise.
2830 (record_full_goto_insn): Likewise.
2831 * regcache.c (regcache_register_size): Likewise.
2832 (get_regcache_arch): Remove.
2833 (regcache_read_pc): Likewise.
2834 * regcache.h (get_regcache_arch): Remove.
2835 * remote-sim.c (gdbsim_fetch_register): Likewise.
2836 (gdbsim_store_register): Likewise.
2837 * remote.c (fetch_register_using_p): Likewise.
2838 (send_g_packet): Likewise.
2839 (remote_prepare_to_store): Likewise.
2840 (store_registers_using_G): Likewise.
2841 * reverse.c (save_bookmark_command): Likewise.
2842 (goto_bookmark_command): Likewise.
2843 * rs6000-aix-tdep.c (branch_dest): Likewise.
2844 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2845 (fetch_register): Likewise.
2846 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2847 (ppc_collect_reg): Likewise.
2848 (ppc_collect_gregset): Likewise.
2849 (ppc_collect_fpregset): Likewise.
2850 (ppc_collect_vsxregset): Likewise.
2851 (ppc_collect_vrregset): Likewise.
2852 (ppc_displaced_step_hw_singlestep): Likewise.
2853 (rs6000_pseudo_register_read): Likewise.
2854 (rs6000_pseudo_register_write): Likewise.
2855 * s390-linux-nat.c (supply_gregset): Likewise.
2856 (fill_gregset): Likewise.
2857 (s390_linux_fetch_inferior_registers): Likewise.
2858 * s390-linux-tdep.c (s390_write_pc): Likewise.
2859 (s390_software_single_step): Likewise.
2860 (s390_all_but_pc_registers_record): Likewise.
2861 (s390_linux_syscall_record): Likewise.
2862 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2863 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2864 (shnbsd_store_inferior_registers): Likewise.
2865 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2866 (sh_extract_return_value_fpu): Likewise.
2867 (sh_store_return_value_nofpu): Likewise.
2868 (sh_corefile_supply_regset): Likewise.
2869 (sh_corefile_collect_regset): Likewise.
2870 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2871 (sh64_store_return_value): Likewise.
2872 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2873 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2874 (sparc_store_inferior_registers): Likewise.
2875 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2876 (sparc_ravenscar_prepare_to_store): Likewise.
2877 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2878 (sparc_analyze_control_transfer): Likewise.
2879 (sparc_step_trap): Likewise.
2880 (sparc_software_single_step): Likewise.
2881 (sparc32_gdbarch_init): Likewise.
2882 (sparc_supply_rwindow): Likewise.
2883 (sparc_collect_rwindow): Likewise.
2884 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2885 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2886 (sparc64nbsd_collect_gregset): Likewise.
2887 (sparc64nbsd_supply_fpregset): Likewise.
2888 (sparc64nbsd_collect_fpregset): Likewise.
2889 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2890 (sparc64_supply_gregset): Likewise.
2891 (sparc64_collect_gregset): Likewise.
2892 (sparc64_supply_fpregset): Likewise.
2893 (sparc64_collect_fpregset): Likewise.
2894 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2895 * spu-tdep.c (spu_unwind_sp): Likewise.
2896 (spu2ppu_prev_register): Likewise.
2897 (spu_memory_remove_breakpoint): Likewise.
2898 * stack.c (return_command): Likewise.
2899 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2900 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2901 * tracefile.c (trace_save_ctf): Likewise.
2902 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2903 (do_windows_store_inferior_registers): Likewise.
2904 (windows_resume): Likewise.
2905 * xtensa-linux-nat.c (fill_gregset): Likewise.
2906 (supply_gregset_reg): Likewise.
2907 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2908 (xtensa_register_read_masked): Likewise.
2909 (xtensa_supply_gregset): Likewise.
2910 (xtensa_extract_return_value): Likewise.
2911 (xtensa_store_return_value): Likewise.
2912
edd079d9
UW
29132017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2914
2915 * doublest.c (floatformat_from_string): New function.
2916 * doublest.h (floatformat_from_string): Add prototype.
2917
2918 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2919 (OP_FLOAT): ... this.
2920 * expression.h: Do not include "doublest.h".
2921 (union exp_element): Replace doubleconst and decfloatconst by
2922 new element floatconst.
2923 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2924 (ada_evaluate_subexp): Likewise.
2925 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2926 OP_DOUBLE and OP_DECFLOAT.
2927 * expprint.c (print_subexp_standard): Likewise.
2928 (dump_subexp_body_standard): Likewise.
2929 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2930
2931 * parse.c: Include "dfp.h".
2932 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2933 (write_exp_elt_floatcst): New function.
2934 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2935 and OP_DECFLOAT.
2936 (operator_check_standard): Likewise.
2937 (parse_float): Do not accept suffix. Take type as input. Return bool.
2938 Return target format buffer instead of host DOUBLEST.
2939 Use floatformat_from_string and decimal_from_string to parse
2940 either binary or decimal floating-point types.
2941 (parse_c_float): Remove.
2942 * parser-defs.h: Do not include "doublest.h".
2943 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2944 (write_exp_elt_floatcst): Add prototype.
2945 (parse_float): Update prototype.
2946 (parse_c_float): Remove.
2947
2948 * c-exp.y: Do not include "dfp.h".
2949 (typed_val_float): Use byte buffer instead of DOUBLEST.
2950 (typed_val_decfloat): Remove.
2951 (DECFLOAT): Remove.
2952 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2953 (parse_number): Update to new parse_float interface.
2954 Parse suffixes and determine type before calling parse_float.
2955 Handle decimal and binary FP types the same way.
2956
2957 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2958 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2959 (parse_number): Update to new parse_float interface.
2960 Parse suffixes and determine type before calling parse_float.
2961
2962 * f-exp.y: Replace dval by typed_val_float.
2963 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2964 (parse_number): Use parse_float instead of atof.
2965
2966 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2967 (parse_go_float): Remove.
2968 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2969 (parse_number): Call parse_float instead of parse_go_float.
2970 Parse suffixes and determine type before calling parse_float.
2971
2972 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2973 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2974 (parse_number): Update to new parse_float interface.
2975 Parse suffixes and determine type before calling parse_float.
2976
2977 * m2-exp.y: Replace dval by byte buffer val.
2978 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2979 (parse_number): Call parse_float instead of atof.
2980
2981 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2982 (lex_number): Call parse_float instead of strtod.
2983 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2984 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2985 Use write_exp_elt_floatcst.
2986 (unit_testing): Remove static variable.
2987 (rust_type): Do not check unit_testing.
2988 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2989
2990 * ada-exp.y (type_float, type_double): Remove.
2991 (typed_val_float): Use byte buffer instead of DOUBLEST.
2992 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2993 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2994
cc628f3d
AH
29952017-10-25 Alan Hayward <alan.hayward@arm.com>
2996
2997 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2998 * arch/aarch64.h: New file.
2999
09a7c6aa
UW
30002017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3001
3002 * dfp.h (decimal_from_string): Use const reference for argument.
3003 * dfp.c (decimal_from_string): Likewise.
3004
8ba0dd51
UW
30052017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3006
3007 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3008 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3009 * mips-tdep.c (mips_print_fp_register): Likewise.
3010
16e812b2
UW
30112017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3012
3013 * common/format.h (enum argclass): Replace decfloat_arg by
3014 dec32float_arg, dec64float_arg, and dec128float_arg.
3015 * common/format.c (parse_format_string): Update to return
3016 new decimal float argument classes.
3017
3018 * printcmd.c (printf_decfloat): Rename to ...
3019 (printf_floating): ... this. Add argclass argument, and use it
3020 instead of parsing the format string again. Add support for
3021 binary floating-point values, using floatformat_to_string.
3022 Convert value to the target format if it doesn't already match.
3023 (ui_printf): Call printf_floating instead of printf_decfloat,
3024 also for double_arg / long_double_arg. Pass argclass.
3025
3026 * dfp.c (decimal_to_string): Add format string argument.
3027 * dfp.h (decimal_to_string): Likewise.
3028
3029 * doublest.c (floatformat_to_string): Add format string argument.
3030 * doublest.h (floatformat_to_string): Likewise.
3031
fdf0cbc2
UW
30322017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3033
3034 * doublest.c (floatformat_precision): New routine.
3035 (floatformat_to_string): Likewise.
3036 * doublest.c (floatformat_to_string): Add prototype.
3037
3038 * printcmd.c (print_scalar_formatted): Only call print_floating
3039 on floating-point types.
3040 * valprint.c: Do not include "floatformat.h".
3041 (generic_val_print_decfloat): Remove.
3042 (generic_val_print): Call generic_val_print_float for both
3043 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3044 (print_floating): Use floatformat_to_string. Handle decimal float.
3045 (print_decimal_floating): Remove, merge into floatformat_to_string.
3046 * value.h (print_decimal_floating): Remove.
3047
3048 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3049
5033013f
UW
30502017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3051
3052 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3053
a664f67e
SM
30542017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3055
3056 * memattr.h: Don't include vec.h.
3057 (struct mem_attrib): Initialize fields.
3058 <unknown>: New static method.
3059 (struct mem_region): Add constructors, operator<, initialize
3060 fields.
3061 * memattr.c: Include algorithm.
3062 (default_mem_attrib, unknown_mem_attrib): Remove.
3063 (user_mem_region_list): New global.
3064 (target_mem_region_list, mem_region_list): Change type to
3065 std::vector<mem_region>.
3066 (mem_use_target): Now a function.
3067 (target_mem_regions_valid): Change type to bool.
3068 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3069 (require_user_regions): Adjust.
3070 (require_target_regions): Adjust.
3071 (create_mem_region): Adjust.
3072 (lookup_mem_region): Adjust.
3073 (invalidate_target_mem_regions): Adjust.
3074 (mem_clear): Rename to...
3075 (user_mem_clear): ... this, and adjust.
3076 (mem_command): Adjust.
3077 (info_mem_command): Adjust.
3078 (mem_enable, enable_mem_command, mem_disable,
3079 disable_mem_command): Adjust.
3080 (mem_delete): Adjust.
3081 (delete_mem_command): Adjust.
3082 * memory-map.h (parse_memory_map): Return an std::vector.
3083 * memory-map.c (parse_memory_map): Likewise.
3084 (struct memory_map_parsing_data): Add constructor.
3085 <memory_map>: Point to std::vector.
3086 (memory_map_start_memory): Adjust.
3087 (memory_map_end_memory): Adjust.
3088 (memory_map_end_property): Adjust.
3089 (clear_result): Remove.
3090 * remote.c (remote_memory_map): Return an std::vector.
3091 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3092 Remove.
3093 (target_debug_print_mem_region_vector): New.
3094 * target-delegates.c: Regenerate.
3095 * target.h (mem_region_vector): New typedef.
3096 (to_memory_map): Return mem_region_vector.
3097 (target_memory_map): Return an std::vector.
3098 * target.c (target_memory_map): Return an std::vector.
3099 (flash_erase_command): Adjust.
3100
6e17c565
SM
31012017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3102
3103 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3104 Change type to std::string.
3105 (memory_map_start_property): Adjust.
3106 (memory_map_end_property): Adjust.
3107
cfba9872
SM
31082017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3109
3110 * infrun.h: Include common/byte-vector.h.
3111 (struct displaced_step_closure): New struct.
3112 (struct buf_displaced_step_closure): New struct.
3113 * infrun.c (displaced_step_closure::~displaced_step_closure):
3114 Provide default implementation.
3115 (displaced_step_clear): Deallocate step closure with delete.
3116 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3117 (aarch64_displaced_step_closure): ... this, extend
3118 displaced_step_closure.
3119 (aarch64_displaced_step_data) <dsc>: Change type to
3120 aarch64_displaced_step_closure.
3121 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3122 unique_ptr.
3123 (aarch64_displaced_step_fixup): Add cast for displaced step
3124 closure.
3125 * amd64-tdep.c (displaced_step_closure): Rename to ...
3126 (amd64_displaced_step_closure): ... this, extend
3127 displaced_step_closure.
3128 <insn_buf>: Change type to std::vector<gdb_byte>.
3129 <max_len>: Remove.
3130 (fixup_riprel): Change type of DSC parameter, adjust to type
3131 change of insn_buf.
3132 (fixup_displaced_copy): Change type of DSC parameter.
3133 (amd64_displaced_step_copy_insn): Instantiate
3134 amd64_displaced_step_closure.
3135 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3136 to type change of insn_buf.
3137 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3138 parameter DSC.
3139 (arm_linux_copy_svc): Likewise.
3140 (cleanup_kernel_helper_return): Likewise.
3141 (arm_catch_kernel_helper_return): Likewise.
3142 (arm_linux_displaced_step_copy_insn): Instantiate
3143 arm_displaced_step_closure.
3144 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3145 (displaced_read_reg): Change type of parameter DSC.
3146 (branch_write_pc): Likewise.
3147 (load_write_pc): Likewise.
3148 (alu_write_pc): Likewise.
3149 (displaced_write_reg): Likewise.
3150 (arm_copy_unmodified): Likewise.
3151 (thumb_copy_unmodified_32bit): Likewise.
3152 (thumb_copy_unmodified_16bit): Likewise.
3153 (cleanup_preload): Likewise.
3154 (install_preload): Likewise.
3155 (arm_copy_preload): Likewise.
3156 (thumb2_copy_preload): Likewise.
3157 (install_preload_reg): Likewise.
3158 (arm_copy_preload_reg): Likewise.
3159 (cleanup_copro_load_store): Likewise.
3160 (install_copro_load_store): Likewise.
3161 (arm_copy_copro_load_store) Likewise.
3162 (thumb2_copy_copro_load_store): Likewise.
3163 (cleanup_branch): Likewise.
3164 (install_b_bl_blx): Likewise.
3165 (arm_copy_b_bl_blx): Likewise.
3166 (thumb2_copy_b_bl_blx): Likewise.
3167 (thumb_copy_b): Likewise.
3168 (install_bx_blx_reg): Likewise.
3169 (arm_copy_bx_blx_reg): Likewise.
3170 (thumb_copy_bx_blx_reg): Likewise.
3171 (cleanup_alu_imm): Likewise.
3172 (arm_copy_alu_imm): Likewise.
3173 (thumb2_copy_alu_imm): Likewise.
3174 (cleanup_alu_reg): Likewise.
3175 (install_alu_reg): Likewise.
3176 (arm_copy_alu_reg): Likewise.
3177 (thumb_copy_alu_reg): Likewise.
3178 (cleanup_alu_shifted_reg): Likewise.
3179 (install_alu_shifted_reg): Likewise.
3180 (arm_copy_alu_shifted_reg): Likewise.
3181 (cleanup_load): Likewise.
3182 (cleanup_store): Likewise.
3183 (arm_copy_extra_ld_st): Likewise.
3184 (install_load_store): Likewise.
3185 (thumb2_copy_load_literal): Likewise.
3186 (thumb2_copy_load_reg_imm): Likewise.
3187 (arm_copy_ldr_str_ldrb_strb): Likewise.
3188 (cleanup_block_load_all): Likewise.
3189 (cleanup_block_store_pc): Likewise.
3190 (cleanup_block_load_pc): Likewise.
3191 (arm_copy_block_xfer): Likewise.
3192 (thumb2_copy_block_xfer): Likewise.
3193 (cleanup_svc): Likewise.
3194 (install_svc): Likewise.
3195 (arm_copy_svc): Likewise.
3196 (thumb_copy_svc): Likewise.
3197 (arm_copy_undef): Likewise.
3198 (thumb_32bit_copy_undef): Likewise.
3199 (arm_copy_unpred): Likewise.
3200 (arm_decode_misc_memhint_neon): Likewise.
3201 (arm_decode_unconditional): Likewise.
3202 (arm_decode_miscellaneous): Likewise.
3203 (arm_decode_dp_misc): Likewise.
3204 (arm_decode_ld_st_word_ubyte): Likewise.
3205 (arm_decode_media): Likewise.
3206 (arm_decode_b_bl_ldmstm): Likewise.
3207 (arm_decode_ext_reg_ld_st): Likewise.
3208 (thumb2_decode_dp_shift_reg): Likewise.
3209 (thumb2_decode_ext_reg_ld_st): Likewise.
3210 (arm_decode_svc_copro): Likewise.
3211 (thumb2_decode_svc_copro): Likewise.
3212 (install_pc_relative): Likewise.
3213 (thumb_copy_pc_relative_16bit): Likewise.
3214 (thumb_decode_pc_relative_16bit): Likewise.
3215 (thumb_copy_pc_relative_32bit): Likewise.
3216 (thumb_copy_16bit_ldr_literal): Likewise.
3217 (thumb_copy_cbnz_cbz): Likewise.
3218 (thumb2_copy_table_branch): Likewise.
3219 (cleanup_pop_pc_16bit_all): Likewise.
3220 (thumb_copy_pop_pc_16bit): Likewise.
3221 (thumb_process_displaced_16bit_insn): Likewise.
3222 (decode_thumb_32bit_ld_mem_hints): Likewise.
3223 (thumb_process_displaced_32bit_insn): Likewise.
3224 (thumb_process_displaced_insn): Likewise.
3225 (arm_process_displaced_insn): Likewise.
3226 (arm_displaced_init_closure): Likewise.
3227 (arm_displaced_step_fixup): Add cast for closure.
3228 * arm-tdep.h: Include infrun.h.
3229 (displaced_step_closure): Rename to ...
3230 (arm_displaced_step_closure): ... this, extend
3231 displaced_step_closure.
3232 <u::svc::copy_svc_os>: Change type of parameter DSC.
3233 <cleanup>: Likewise.
3234 (arm_process_displaced_insn): Likewise.
3235 (arm_displaced_init_closure): Likewise.
3236 (displaced_read_reg): Likewise.
3237 (displaced_write_reg): Likewise.
3238 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3239 Adjust.
3240 * i386-tdep.h: Include infrun.h.
3241 (i386_displaced_step_closure): New typedef.
3242 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3243 i386_displaced_step_closure.
3244 (i386_displaced_step_fixup): Adjust.
3245 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3246 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3247 and unique_ptr.
3248 (ppc_displaced_step_fixup): Adjust.
3249 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3250 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3251 and unique_ptr.
3252 (s390_displaced_step_fixup): Adjust.
3253
b392b304
SM
32542017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3255
3256 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3257 Remove declarations.
3258
d5833c62
TT
32592017-10-20 Tom Tromey <tom@tromey.com>
3260
3261 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3262 std::vector.
3263 (gdb_bfd_record_inclusion): Update.
3264 (bfdp): Remove typedef.
3265
06d5bbc8
TT
32662017-10-20 Tom Tromey <tom@tromey.com>
3267
3268 * gdb_bfd.c (gdb_bfd_ref): Use new.
3269 (struct gdb_bfd_data): Add constructor, destructor, and member
3270 initializers.
3271 (gdb_bfd_unref): Use delete.
3272
2712ce2e
TT
32732017-10-20 Tom Tromey <tom@tromey.com>
3274
3275 * exec.c (exec_file_attach): Use new_bfd_ref.
3276 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3277 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3278 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3279 new_bfd_ref.
3280 * gdb_bfd.h (new_bfd_ref): New function.
3281
fcc8fb2f
PA
32822017-10-20 Pedro Alves <palves@redhat.com>
3283
3284 * main.c (captured_command_loop): Add attribute noinline.
3285
4c2287b0
SM
32862017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3287
3288 * interps.c (struct interp_factory): Add constructor.
3289 (interp_factory_p): Remove typedef.
3290 (DEF_VEC_P(interp_factory_p)): Remove.
3291 (interpreter_factories): Change type to std::vector.
3292 (interp_factory_register): Adjust.
3293 (interp_lookup): Adjust.
3294 (interpreter_completer): Adjust.
3295
3d415c26
TT
32962017-10-19 Tom Tromey <tom@tromey.com>
3297
3298 * break-catch-syscall.c (catch_syscall_completer): Use
3299 std::string, gdb::unique_xmalloc_ptr.
3300
395423c4
TT
33012017-10-19 Tom Tromey <tom@tromey.com>
3302
3303 * infcall.c (call_function_by_hand_dummy): Use std::string.
3304
54f70bc1
TT
33052017-10-19 Tom Tromey <tom@tromey.com>
3306
3307 * mi/mi-main.c (mi_cmd_execute): Update.
3308 * top.h (prepare_execute_command): Return scoped_value_mark.
3309 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3310 Add move constructor.
3311 * top.c (prepare_execute_command): Return scoped_value_mark.
3312 (execute_command): Update.
3313
63929e84
PA
33142017-10-19 Pedro Alves <palves@redhat.com>
3315
3316 * xml-support.c (xml_fetch_content_from_file): Check fread's
3317 return.
3318
a75868f5
PA
33192017-10-19 Pedro Alves <palves@redhat.com>
3320
3321 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3322 async.
3323 (handle_error_fd): New function.
3324 (ser_base_async): Add/delete an event loop file handler for
3325 error_fd.
3326
2edf834e
PA
33272017-10-19 Pedro Alves <palves@redhat.com>
3328
3329 * xml-support.c (xml_fetch_content_from_file): Don't read in
3330 chunks. Instead use fseek to determine the file's size, and read
3331 it in one go.
3332
c8ba13ad
KS
33332017-11-18 Keith Seitz <keiths@redhat.com>
3334
3335 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3336 types.
3337 Add whitespace to front of type name.
3338
37534686
KS
33392017-10-18 Keith Seitz <keiths@redhat.com>
3340
3341 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3342 DW_AT_accessibility.
3343
28c7c158
YQ
33442017-10-18 Yao Qi <yao.qi@linaro.org>
3345
3346 * features/tic6x-c62x-linux.c: Remove.
3347
30f0b101
TT
33482017-10-17 Tom Tromey <tom@tromey.com>
3349
3350 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3351 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3352 (do_mixed_source_and_assembly): Likewise.
3353
57e12da9
TT
33542017-10-17 Tom Tromey <tom@tromey.com>
3355
3356 * regcache.c (regcache::xfer_part): Remove assertion.
3357
7b700999
PA
33582017-10-17 Pedro Alves <palves@redhat.com>
3359
3360 * xml-support.c (xml_fetch_content_from_file): Call
3361 unique_ptr::release() instead unique_ptr::get() when passing
3362 through xrealloc.
3363
d3037ba6
YQ
33642017-10-17 Yao Qi <yao.qi@linaro.org>
3365
3366 * regcache.c (regcache::xfer_part): Remove parameters read and
3367 write, add parameter is_raw. All callers are updated.
3368
83d5a34d
KS
33692017-10-16 Keith Seitz <keiths@redhat.com>
3370
3371 * c-typeprint.c (enum access_specifier): Moved here from
3372 c_type_print_base.
3373 (output_access_specifier): New function.
3374 (c_type_print_base): Consider typedefs when assessing
3375 whether access labels are needed.
3376 Use output_access_specifier as needed.
3377 Output access specifier for typedefs, if needed.
3378 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3379 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3380 fields.
3381 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3382 accessor macros.
3383
87028b87
TT
33842017-10-16 Tom Tromey <tom@tromey.com>
3385
3386 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3387 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3388 * target.c (target_fileio_read_stralloc): Update.
3389 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3390 * target.h (target_fileio_read_stralloc): Return
3391 unique_xmalloc_ptr.
3392
b7b030ad
TT
33932017-10-16 Tom Tromey <tom@tromey.com>
3394
3395 * xml-syscall.c (xml_init_syscalls_info): Update.
3396 * xml-support.c (xinclude_start_include): Update.
3397 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3398 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3399 (xml_fetch_content_from_file): Likewise.
3400 * osdata.c (get_osdata): Update.
3401 * target.h (target_read_stralloc, target_get_osdata): Return
3402 unique_xmalloc_ptr.
3403 * solib-aix.c (solib_aix_get_library_list): Update.
3404 * solib-target.c (solib_target_current_sos): Update.
3405 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3406 * xml-tdesc.c (fetch_available_features_from_target): Update.
3407 (target_fetch_description_xml): Update.
3408 (file_read_description_xml): Update.
3409 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3410 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3411 (remote_pid_to_exec_file): Update.
3412 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3413 (target_get_osdata): Likewise.
3414
b80406ac
TT
34152017-10-16 Tom Tromey <tom@tromey.com>
3416
3417 * remote.c (remote_register_number_and_offset): Use std::vector.
3418 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3419 (putpkt_binary): Use gdb::def_vector.
3420 (compare_sections_command): Use gdb::byte_vector.
3421
a90ecff8
TT
34222017-10-16 Tom Tromey <tom@tromey.com>
3423
3424 * ppc-linux-nat.c (hwdebug_insert_point): Use
3425 gdb::unique_xmalloc_ptr, XDUP.
3426
2dc0e219
TT
34272017-10-16 Tom Tromey <tom@tromey.com>
3428
3429 * probe.c (parse_probes): Use std::string.
3430 (info_probes_for_ops, enable_probes_command)
3431 (disable_probes_command): Remove cleanups.
3432
b05628f0
TT
34332017-10-16 Tom Tromey <tom@tromey.com>
3434
3435 * buildsym.c (block_compar): Remove.
3436 (end_symtab_get_static_block): Use std::vector.
3437
a79b1bc6
SM
34382017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3439
3440 * memrange.h (struct mem_range): Define operator< and operator==.
3441 (mem_range_s): Remove.
3442 (DEF_VEC_O (mem_range_s)): Remove.
3443 (normalize_mem_ranges): Change parameter type to std::vector.
3444 * memrange.c (compare_mem_ranges): Remove.
3445 (normalize_mem_ranges): Change parameter type to std::vector,
3446 adjust to vector change.
3447 * exec.c (section_table_available_memory): Return vector, remove
3448 parameter.
3449 (section_table_read_available_memory): Adjust to std::vector
3450 change.
3451 * remote.c (remote_read_bytes): Adjust to std::vector
3452 change.
3453 * tracepoint.h (traceframe_available_memory): Change parameter
3454 type to std::vector.
3455 * tracepoint.c (traceframe_available_memory): Change parameter
3456 type to std::vector, adjust.
3457 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3458 std::vector change.
3459 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3460 unittests/memrange-selftests.c.
3461 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3462 * gdb/unittests/memrange-selftests.c: New file.
3463
63f0e930
PA
34642017-10-16 Pedro Alves <palves@redhat.com>
3465
3466 * elfread.c (probe_key_free): Rename range-for variable.
3467 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3468 (find_probe_by_pc, collect_probes): Rename range-for variable.
3469
c40c7bfc
YQ
34702017-10-16 Yao Qi <yao.qi@linaro.org>
3471
3472 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3473 * features/tic6x-c62x.c: Remove.
3474 * features/tic6x-c64x-linux.c: Remove.
3475 * features/tic6x-c64x.c: Remove.
3476 * features/tic6x-c64xp-linux.c: Remove.
3477 * features/tic6x-c64xp.c: Remove.
3478 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3479 initialize_tdesc_tic6x_*_linux functions.
3480 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3481 initialize_tdesc_tic6x_* functions.
3482
df27ae6a
YQ
34832017-10-16 Yao Qi <yao.qi@linaro.org>
3484
3485 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3486 tic6x-c62x.
3487 * regformats/tic6x-c62x.dat: Remove.
3488 * regformats/tic6x-c64x.dat: Remove.
3489 * regformats/tic6x-c64xp.dat: Remove.
3490
86766165
SM
34912017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3492
3493 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3494 (the !HAVE_LIBEXPAT version).
3495
824dfcc3
SM
34962017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3497
3498 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3499 const.
3500
2098b393
SM
35012017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3502
3503 * target.h: Include tracepoint.h.
3504 (enum trace_find_type): Move to tracepoint.h.
3505 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3506 * tracepoint.h: Don't include target.h
3507 (enum trace_find_type): Move from target.h.
3508 (parse_traceframe_info): Return a unique ptr.
3509 * tracepoint.c (current_traceframe_info): Change type to unique
3510 ptr.
3511 (free_traceframe_info): Remove.
3512 (clear_traceframe_info): Don't manually free
3513 current_traceframe_info.
3514 (free_result): Remove.
3515 (parse_traceframe_info): Return a unique ptr.
3516 (get_traceframe_info): Adjust to unique ptr.
3517 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3518 * remote.c (remote_traceframe_info): Return a unique ptr.
3519 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3520 ptr.
3521 * target-debug.h (target_debug_print_traceframe_info_up): New
3522 macro.
3523 * target-delegates.c: Regenerate.
3524
4cdd21a8
SM
35252017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3526
3527 * memrange.h (struct mem_range): Add constructors.
3528 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3529 std::vector<mem_range>.
3530 * tracepoint.c (free_traceframe_info): Don't manually free
3531 vector.
3532 (traceframe_info_start_memory): Adjust to vector change.
3533 (traceframe_available_memory): Likewise.
3534 * tracefile-tfile.c (build_traceframe_info): Likewise.
3535 * ctf.c (ctf_traceframe_info): Likewise.
3536
d0d292a2
SM
35372017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3538
3539 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3540 std::vector<int>.
3541 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3542 (traceframe_info_start_tvar): Adjust to vector change.
3543 (parse_traceframe_info): Allocate with new.
3544 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3545 vector change.
3546 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3547 change.
3548 tfile_traceframe_info): Allocate with new.
3549 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3550 change.
3551
8d3c73ef
SM
35522017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3553
3554 * tracepoint.c (traceframe_info): Rename to...
3555 (current_traceframe_info): ...this.
3556 (clear_traceframe_info): Adjust.
3557 (get_traceframe_info): Adjust.
3558
b129dcac
SM
35592017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3560
3561 * nat/linux-osdata.c: Include algorithm.
3562 (compare_processes): Remove.
3563 (struct pid_pgid_entry): New struct.
3564 (linux_xfer_osdata_processgroups): Use std::vector instead of
3565 XNEWVEC.
3566
af5bf4ad
SM
35672017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3568
3569 * objfiles.h: Don't include symfile.h.
3570 (struct partial_symbol): Remove forward-declaration.
3571 (struct objfile) <global_psymbols, static_psymbols>: Change type
3572 to std::vector<partial_symbol *>.
3573 * objfiles.c (objfile::objfile): Don't memset those fields.
3574 (objfile::~objfile): Don't free those fields.
3575 * psympriv.h (struct psymbol_allocation_list): Remove
3576 forward-declaration.
3577 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3578 to std::vector.
3579 (start_psymtab_common): Change parameters to std::vector.
3580 * psymtab.c: Include algorithm.
3581 (require_partial_symbols): Call shrink_to_fit.
3582 (find_pc_sect_psymbol): Adjust to vector change.
3583 (match_partial_symbol): Likewise.
3584 (lookup_partial_symbol): Likewise.
3585 (psym_relocate): Likewise.
3586 (dump_psymtab): Likewise.
3587 (recursively_search_psymtabs): Likewise.
3588 (compare_psymbols): Remove.
3589 (sort_pst_symbols): Adjust to vector change.
3590 (start_psymtab_common): Likewise.
3591 (end_psymtab_common): Likewise.
3592 (psymbol_bcache_full): De-constify return value.
3593 (add_psymbol_to_bcache): Likewise.
3594 (extend_psymbol_list): Remove.
3595 (append_psymbol_to_list): Adjust to vector change.
3596 (add_psymbol_to_list): Likewise.
3597 (init_psymbol_list): Likewise.
3598 (maintenance_info_psymtabs): Likewise.
3599 (maintenance_check_psymtabs): Likewise.
3600 * symfile.h (struct psymbol_allocation_list): Remove.
3601 * symfile.c (reread_symbols): Adjust to vector change.
3602 * dbxread.c (start_psymtab): Change type of parameters.
3603 (dbx_symfile_read): Adjust to vector change.
3604 (read_dbx_symtab): Likewise.
3605 (start_psymtab): Change type of parameters.
3606 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3607 (create_partial_symtab): Likewise.
3608 (add_partial_symbol): Likewise.
3609 (write_one_signatured_type): Likewise.
3610 (recursively_write_psymbols): Likewise.
3611 * mdebugread.c (parse_partial_symbols): Likewise.
3612 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3613 (scan_xcoff_symtab): Adjust to vector change.
3614 (xcoff_initial_scan): Likewise.
3615
3ec5942f
SM
36162017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3617
3618 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3619
2399fe6a
YQ
36202017-10-13 Yao Qi <yao.qi@linaro.org>
3621
3622 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3623 Remove s390x-*-expedite, add s390x-expedite.
3624
4bf3f4a8
YQ
36252017-10-13 Yao Qi <yao.qi@linaro.org>
3626
3627 * features/s390-gs-linux64.c: Regenerated.
3628 * features/s390x-gs-linux64.c: Regenerated.
3629
9e86da07
TT
36302017-10-13 Tom Tromey <tom@tromey.com>
3631
3632 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3633 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3634 delete.
3635 * symfile.c (symbol_file_add_with_addrs): Use new.
3636 (symbol_file_add_separate): Update comment.
3637 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3638 * jit.c (jit_object_close_impl): Use new.
3639 (jit_unregister_code): Use delete.
3640 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3641 (~objfile): Rename from free_objfile.
3642 (free_objfile_separate_debug, do_free_objfile_cleanup)
3643 (free_all_objfiles, objfile_purge_solibs): Use delete.
3644 * objfiles.h (struct objfile): Add constructor and destructor.
3645 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3646 (allocate_objfile, free_objfile): Don't declare.
3647 (struct objstats): Add initializers.
3648
c2508e90
SM
36492017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3650
3651 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3652 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3653 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3654 * gdbarch.h: Regenerate.
3655 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3656 Adjust comment.
3657 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3658 (i386_displaced_step_fixup): Adjust comment.
3659 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3660
a900ff72
TT
36612017-10-12 Tom Tromey <tom@tromey.com>
3662
3663 * prologue-value.h (pv_area::store_would_trash): Return bool.
3664 (pv_area::find_reg): Likewise.
3665 * prologue-value.c (pv_area::store_would_trash): Return bool.
3666 (pv_area::find_reg): Likewise.
3667
f7b7ed97
TT
36682017-10-12 Tom Tromey <tom@tromey.com>
3669
3670 * s390-linux-tdep.c (s390_store, s390_load)
3671 (s390_check_for_saved, s390_analyze_prologue): Update.
3672 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3673 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3674 * prologue-value.h (class pv_area): Move from prologue-value.c.
3675 Change names of members. Add constructor, destructor, member
3676 functions.
3677 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3678 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3679 (pv_area_fetch, pv_area_scan): Don't declare.
3680 * prologue-value.c (struct pv_area::area_entry): Now member of
3681 pv_area.
3682 (struct pv_area): Move to prologue-value.h.
3683 (pv_area::pv_area): Rename from make_pv_area.
3684 (pv_area::~pv_area): Rename from free_pv_area.
3685 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3686 (clear_entries, find_entry, overlaps, store_would_trash, store)
3687 (fetch, find_reg, scan): Now member of pv_area.
3688 Remove "area" argument. Update.
3689 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3690 Update.
3691 * mn10300-tdep.c (push_reg, check_for_saved)
3692 (mn10300_analyze_prologue): Update.
3693 * mep-tdep.c (is_arg_spill, check_for_saved)
3694 (mep_analyze_prologue): Update.
3695 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3696 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3697 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3698 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3699 Update.
3700 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3701 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3702
466eecee
SM
37032017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3704
3705 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3706 * linux-nat.c (linux_nat_delete_thread): New variable.
3707 (lwp_free): Invoke linux_nat_delete_thread if set.
3708 (linux_nat_set_delete_thread): New function.
3709 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3710 thread delete callback.
3711 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3712 (_initialize_arm_linux_nat): Assign thread delete callback.
3713 * s390-linux-nat.c (s390_delete_thread): New function.
3714 (_initialize_s390_nat): Assign thread delete callback.
3715 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3716 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3717 function.
3718 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3719 declaration.
3720 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3721 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3722
f71c8822
TT
37232017-10-09 Tom Tromey <tom@tromey.com>
3724
3725 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3726 std::string.
3727 * tui/tui-layout.c (enum tui_status): Use std::string.
3728
981a3fb3
TT
37292017-10-11 Tom Tromey <tom@tromey.com>
3730
3731 * gdbthread.h (thread_command): Constify.
3732 * inferior.h (detach_command): Constify.
3733 * top.h (set_history, show_history): Constify.
3734 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3735 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3736 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3737 * printcmd.c (set_command): Constify.
3738 (non_const_set_command): New function.
3739 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3740 * breakpoint.c (enable_command, disable_command, delete_command)
3741 (catch_command, tcatch_command, set_breakpoint_cmd)
3742 (show_breakpoint_cmd): Constify.
3743 * macrocmd.c (macro_command): Constify.
3744 * infcmd.c (unset_command, kill_command, detach_command)
3745 (info_proc_cmd): Constify.
3746 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3747 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3748 (info_auto_load_cmd): Constify.
3749 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3750 (unset_tdesc_cmd): Constify.
3751 * ada-lang.c (set_ada_command, show_ada_command)
3752 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3753 * guile/guile.c (set_guile_command, show_guile_command)
3754 (info_guile_command): Constify.
3755 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3756 Constify.
3757 * skip.c (skip_command): Constify.
3758 * compile/compile.c (_initialize_compile): Constify.
3759 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3760 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3761 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3762 (maint_btrace_pt_show_cmd): Constify.
3763 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3764 Constify.
3765 * python/python.c (user_show_python, user_set_python): Constify.
3766 * mips-tdep.c (set_mips_command, show_mips_command)
3767 (set_mipsfpu_command): Constify.
3768 * record-btrace.c (cmd_record_btrace_start)
3769 (cmd_set_record_btrace, cmd_show_record_btrace)
3770 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3771 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3772 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3773 Constify.
3774 * symfile.c (overlay_command): Constify.
3775 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3776 * cli/cli-logging.c (set_logging_command, show_logging_command):
3777 Constify.
3778 * cli/cli-dump.c (dump_command, append_command)
3779 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3780 (tekhex_dump_command, binary_dump_command)
3781 (binary_append_command): Constify.
3782 * cli/cli-decode.c (struct cmd_list_element): Change type of
3783 "fun".
3784 * cli/cli-cmds.c (info_command, show_command, set_debug)
3785 (show_debug): Constify.
3786 (show_command): Add non-const overload.
3787 * top.c (set_history, show_history): Constify.
3788 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3789 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3790 * target.c (target_command): Constify.
3791 * sparc64-tdep.c (info_adi_command): Constify.
3792 * record-full.c (cmd_record_full_start): Constify.
3793 (set_record_full_command): Constify. Fix typo.
3794 (show_record_full_command): Constify.
3795 * thread.c (thread_command, thread_apply_command): Constify.
3796 * memattr.c (dummy_cmd): Constify.
3797 * value.c (function_command): Constify.
3798 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3799 * probe.c (info_probes_command): Constify.
3800 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3801 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3802 (show_thread_cmd, set_thread_default_cmd)
3803 (show_thread_default_cmd): Constify.
3804 (check_empty): Constify.
3805 * tracepoint.c (tfind_command): Constify.
3806 * cp-support.c (maint_cplus_command): Constify.
3807 * windows-tdep.c (info_w32_command): Constify.
3808 * record.c (cmd_record_start, set_record_command)
3809 (show_record_command, info_record_command, cmd_record_goto):
3810 Constify.
3811 * ravenscar-thread.c (set_ravenscar_command)
3812 (show_ravenscar_command): Constify.
3813 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3814 Constify.
3815 (add_internal_problem_command): Remove casts.
3816 * arc-tdep.c (maintenance_print_arc_command): Constify.
3817 * valprint.c (set_print, show_print, set_print_raw)
3818 (show_print_raw): Constify.
3819 * maint.c (maintenance_command, maintenance_info_command)
3820 (maintenance_print_command, maintenance_set_cmd)
3821 (maintenance_show_cmd, set_per_command_cmd)
3822 (show_per_command_cmd, maintenance_check_command): Constify.
3823 * language.c (set_check, show_check): Constify.
3824 * typeprint.c (show_print_type, set_print_type): Constify.
3825 * go32-nat.c (go32_info_dos_command): Constify.
3826
fdf44873
TT
38272017-10-11 Tom Tromey <tom@tromey.com>
3828
3829 * breakpoint.c (prepare_re_set_context): Remove.
3830 (breakpoint_re_set_one): Update. Don't use cleanups.
3831 (breakpoint_re_set): Use scoped_restore, std::string, and
3832 scoped_restore_current_language.
3833
81b1e71c
TT
38342017-10-11 Tom Tromey <tom@tromey.com>
3835
3836 * breakpoint.c (commands_command_1): Use std::string.
3837 (cleanup_executing_breakpoints): Remove.
3838 (bpstat_do_actions_1): Use scoped_restore.
3839 (bpstat_check_watchpoint): Use std::string.
3840 (decode_static_tracepoint_spec): Likewise.
3841 (break_range_command): Likewise.
3842 (watch_command_1): Likewise.
3843 (compare_breakpoints): Change argument types.
3844 (clear_command): Use std::vector.
3845 (cleanup_executing_breakpoints): Remove.
3846 (update_global_location_list): Use unique_xmalloc_ptr.
3847 (strace_command): Remove unused declaration.
3848
4f9d9906
JB
38492017-10-11 John Baldwin <jhb@FreeBSD.org>
3850
3851 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3852 * NEWS: Mention new FreeBSD/arm native configuration.
3853 * configure.host: Add arm*-*-freebsd*.
3854 * configure.nat: Likewise.
3855 * arm-fbsd-nat.c: New file.
3856
7176dfd2
JB
38572017-10-11 John Baldwin <jhb@FreeBSD.org>
3858
3859 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3860 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3861 * NEWS: Mention new FreeBSD/arm target.
3862 * configure.tgt: Add arm*-*-freebsd*.
3863 * arm-fbsd-tdep.c: New file.
3864 * arm-fbsd-tdep.h: New file.
3865
fe220226
MR
38662017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3867
3868 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3869 `gdbarch_elfcore_write_linux_prpsinfo'.
3870 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3871 method.
3872 (elf_internal_linux_prpsinfo): Remove declaration.
3873 * gdbarch.h: Regenerate.
3874 * gdbarch.c: Regenerate.
3875
a2f63b2e
MR
38762017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3877
3878 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3879 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3880
458ca1d0
PA
38812017-10-11 Pedro Alves <palves@redhat.com>
3882
3883 * breakpoint.c (reattach_breakpoints): Delete.
3884 * breakpoint.h (reattach_breakpoints): Delete.
3885
905014d7
SM
38862017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3887
3888 * symfile.c (registered_sym_fns): Make struct, not typedef.
3889 (DEF_VEC_O (registered_sym_fns)): Remove.
3890 (symtab_fns): Change type to std::vector.
3891 (add_symtab_fns): Adjust.
3892 (find_sym_fns): Adjust.
3893
56d704da
AK
38942017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3895
3896 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3897 * arc-tdep.h (arc_arch_is_em): New function.
3898 (arc_arch_is_hs): Likewise.
3899
7fa29be9
EB
39002017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3901
3902 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3903 parentheses in the declaration.
3904 (macro_lookup_inclusion): Likewise.
3905 (macro_lookup_definition): Likewise.
3906 * p-lang.h (pascal_builtin_types): Likewise.
3907 * tui/tui-data.c (tui_win_list): Likewise.
3908 * tui/tui-data.h (tui_win_list): Likewise.
3909 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3910
d9b477e3
KB
39112017-10-11 Mark Rages <markrages@gmail.com>
3912
3913 * target-memory.c (block_boundaries): Fix for block address not
3914 aligned on block size.
3915
65630365
PA
39162017-10-10 Pedro Alves <palves@redhat.com>
3917 Tom Tromey <tom@tromey.com>
3918
3919 * breakpoint.c (struct captured_breakpoint_query_args)
3920 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3921 (print_breakpoint): New.
3922 * breakpoint.h (print_breakpoint): Declare.
3923 * common/common-exceptions.h (enum return_reason): Remove
3924 references to catch_exceptions.
3925 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3926 Delete.
3927 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3928 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3929 * gdb.h: Delete.
3930 * gdbthread.h (thread_select): Declare.
3931 * mi/mi-cmd-break.c: Don't include gdb.h.
3932 (breakpoint_notify): Use print_breakpoint.
3933 * mi/mi-cmd-catch.c: Don't include gdb.h.
3934 * mi/mi-interp.c: Don't include gdb.h.
3935 (mi_print_breakpoint_for_event): New.
3936 (mi_breakpoint_created, mi_breakpoint_modified): Use
3937 mi_print_breakpoint_for_event.
3938 * mi/mi-main.c: Don't include gdb.h.
3939 (mi_cmd_thread_select): Parse the global thread ID here. Use
3940 thread_select instead of gdb_thread_select.
3941 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3942 of using gdb_list_thread_ids.
3943 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3944 FILEIO_ENOSYS here.
3945 (remote_fileio_request): Use TRY/CATCH instead of
3946 catch_exceptions.
3947 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3948 (symbol_file_add_from_memory_wrapper): Delete.
3949 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3950 * thread.c: Don't include gdb.h.
3951 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3952 (thread_alive): Use thread_select.
3953 (do_captured_thread_select): Delete, parts salvaged as ...
3954 (thread_select): ... this new function.
3955 (gdb_thread_select): Delete.
3956
bf469271
PA
39572017-10-10 Pedro Alves <palves@redhat.com>
3958 Tom Tromey <tom@tromey.com>
3959
3960 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3961 and reverse logic.
3962 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3963 No longer macros. Instead ...
3964 (enum wp_check_result): They're now values of this new
3965 enumeration.
3966 (watchpoint_check): Change return type to wp_check_result and
3967 parameter type to bpstat.
3968 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3969 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3970 catch_errors. Reverse logic of watchpoint_check call.
3971 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3972 pointer as parameter.
3973 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3974 * common/common-exceptions.c (throw_exception_sjlj): Update
3975 comments to avoid mentioning catch_errors.
3976 * exceptions.c (catch_errors): Delete.
3977 * exceptions.h: Update comments to avoid mentioning catch_errors.
3978 (catch_errors_ftype, catch_errors): Delete.
3979 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3980 (hook_stop_stub): Delete.
3981 (restore_selected_frame): Change return type to void, and
3982 parameter type to const frame_id &.
3983 (restore_infcall_control_state): Use TRY/CATCH instead of
3984 catch_errors.
3985 * main.c (captured_command_loop): Return void and remove
3986 parameter. Remove references to catch_errors.
3987 (captured_main): Use TRY/CATCH instead of catch_errors.
3988 * objc-lang.c (objc_submethod_helper_data)
3989 (find_objc_msgcall_submethod_helper): Delete.
3990 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3991 catch_errors.
3992 * record-full.c (record_full_message): Return void.
3993 (record_full_message_args, record_full_message_wrapper): Delete.
3994 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3995 instead of catch_errors.
3996 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3997 parameter type to int.
3998 * solib-darwin.c (open_symbol_file_object): Ditto.
3999 * solib-dsbt.c (open_symbol_file_object): Ditto.
4000 * solib-frv.c (open_symbol_file_object): Ditto.
4001 * solib-svr4.c (open_symbol_file_object): Ditto.
4002 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4003 * solib.c (update_solib_list): Use TRY/CATCH instead of
4004 catch_errors.
4005 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4006 Change type.
4007 * symmisc.c (struct print_symbol_args): Remove.
4008 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4009 (print_symbol): Change type.
4010 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4011 and remove parameters.
4012 (catch_errors): New.
4013 (get_windows_debug_event): Adjust.
4014
1a56bfa5
TT
40152017-10-09 Tom Tromey <tom@tromey.com>
4016
4017 * mi/mi-main.c (free_splay_tree): Remove.
4018 (list_available_thread_groups): Use splay_tree_up.
4019 * common/gdb_splay_tree.h: New file.
4020
0c478e2d
TT
40212017-10-09 Tom Tromey <tom@tromey.com>
4022
4023 * mi/mi-main.c (do_nothing): Remove.
4024 (list_available_thread_groups): Update.
4025
cbd2b4e3
PA
40262017-10-09 Pedro Alves <palves@redhat.com>
4027
4028 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4029 reading registers when switching context.
4030
a181c0bf
JB
40312017-10-09 John Baldwin <jhb@FreeBSD.org>
4032
4033 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4034 (fbsd_convert_siginfo): Likewise.
4035 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4036
6e66f753
SM
40372017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4038
4039 * configure.ac (try_guile_versions): Remove guile-2.2.
4040 * configure: Regenerate.
4041
890e9790
TT
40422017-10-09 Tom Tromey <tom@tromey.com>
4043
4044 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4045 (COMPILE.pre): Use $(CXX).
4046
109483d9
PA
40472017-10-09 Pedro Alves <palves@redhat.com>
4048
4049 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4050 Use bool.
4051 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4052 * cp-support.h (cp_remove_params): Now returns a
4053 gdb::unique_xmalloc_ptr.
4054 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4055 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4056 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4057 returning a gdb::unique_xmalloc_ptr.
4058 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4059 * stack.c (find_frame_funname): Adjust to cp_remove_params
4060 returning a gdb::unique_xmalloc_ptr.
4061
791afaa2
TT
40622017-10-08 Tom Tromey <tom@tromey.com>
4063
4064 * dwarf2read.c (dwarf2_get_dwz_file): Use
4065 gdb::unique_xmalloc_ptr.
4066 (find_slot_in_mapped_hash): Likewise.
4067 (dwarf2_physname): Likewise.
4068 (create_dwo_unit_in_dwp_v1): Use std::string.
4069 (create_dwo_unit_in_dwp_v2): Likewise.
4070 (lookup_dwo_cutu): Likewise.
4071 (inherit_abstract_dies): Use std::vector.
4072 (read_array_type): Likewise.
4073 (dwarf_decode_macros): Remove unused declaration.
4074 (unsigned_int_compar): Remove.
4075 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4076 (psymtabs_addrmap_cleanup): Remove.
4077
30a9c02f
TT
40782017-10-08 Tom Tromey <tom@tromey.com>
4079
4080 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4081 * frame.h (frame_cleanup_after_sniffer): Declare.
4082 (frame_prepare_for_sniffer): Return void.
4083 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4084 type of argument.
4085 (frame_prepare_for_sniffer): Return void.
4086
757325a3
TT
40872017-10-08 Tom Tromey <tom@tromey.com>
4088
4089 * utils.h (make_cleanup_value_free): Remove.
4090 * utils.c (do_value_free, struct cleanup): Remove.
4091 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4092 Use gdb_value_up.
4093 * value.h (struct value_deleter): New.
4094 (gdb_value_up): New typedef.
4095
b9c04fb2
TT
40962017-10-08 Tom Tromey <tom@tromey.com>
4097
4098 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4099 (make_cleanup_free_search_symbols): Remove.
4100 (search_symbols): Return std::vector.
4101 (symbol_search::compare_search_syms): Now member of
4102 symbol_search. Change arguments.
4103 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4104 (symtab_symbol_info, rbreak_command): Update.
4105 * symtab.h (struct symbol_search) <next>: Remove.
4106 Add constructors.
4107 (symbol_search::operator<): New function.
4108 (symbol_search::operator==): New function.
4109 (search_symbols): Remove std::vector.
4110 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4111 (symbol_search::compare_search_syms): Declare.
4112
0d28b0a5
YQ
41132017-10-06 Yao Qi <yao.qi@linaro.org>
4114
4115 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4116 arch/aarch64-insn.o.
4117 Remove one rule.
4118 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4119
71917808
YQ
41202017-10-06 Yao Qi <yao.qi@linaro.org>
4121
4122 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4123 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4124 arch/arm-linux.o respectively.
4125 * configure.tgt: Likewise.
4126
2081b2b2
YQ
41272017-10-06 Yao Qi <yao.qi@linaro.org>
4128
4129 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4130 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4131
a1b85d28
PA
41322017-10-06 Pedro Alves <palves@redhat.com>
4133
4134 * windows-nat.c: Include <algorithm>.
4135
d97987e2
YQ
41362017-10-06 Yao Qi <yao.qi@linaro.org>
4137
4138 * configure.tgt (i386_tobjs): New variable.
4139 (amd64_tobjs): New variable.
4140 Set $cpu_obs and $os_obs.
4141
f38307f5
YQ
41422017-10-06 Yao Qi <yao.qi@linaro.org>
4143
4144 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4145 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4146 (clean): Remove object files and dependency files.
4147 (distclean): Remove the directory.
4148 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4149 * configure: Re-generated.
4150 * configure.tgt: Replace amd64.o with arch/amd64.o.
4151
2f924de6
JM
41522017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4153
4154 PR build/22188
4155 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4156 and SETEND.
4157
2fd9d7ca
PA
41582017-10-05 Pedro Alves <palves@redhat.com>
4159
4160 * linux-nat.c (linux_child_follow_fork): When following the parent
4161 and detaching the child, consult the parent thread's architecture
4162 instead of the child's.
4163
d13b8493
UW
41642017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4165
4166 * ax.h: Do not include "doublest.h".
4167 (union agent_val): Remove.
4168
3b4b2f16
UW
41692017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4170
4171 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4172 (decimal_to_string): Return std::string object.
4173 (decimal_from_string): Accept std::string object. Return bool.
4174 (decimal_from_integral, decimal_from_doublest): Remove.
4175 (decimal_from_longest): Add prototype.
4176 (decimal_from_ulongest): Likewise.
4177 (decimal_to_longest): Likewise.
4178 (decimal_from_doublest): Likewise.
4179 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4180 (MAX_DECIMAL_STRING): Move here.
4181 (decimal_to_string): Return std::string object.
4182 (decimal_from_string): Accept std::string object. Return bool.
4183 (decimal_from_integral): Remove, replace by ...
4184 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4185 (decimal_to_longest): New function.
4186 (decimal_from_floating): Remove, replace by ...
4187 (decimal_from_doublest): ... this new function.
4188 (decimal_to_doublest): Update to new decimal_to_string interface.
4189
4190 * value.c (unpack_long): Use decimal_to_longest.
4191 * valops.c (value_cast): Use decimal_from_doublest instead of
4192 decimal_from_floating. Use decimal_from_[u]longest isntead of
4193 decimal_from_integral.
4194 * valarith.c (value_args_as_decimal): Likewise.
4195 * valprint.c (print_decimal_floating): Update to new
4196 decimal_to_string interface.
4197 * printcmd.c (printf_decfloat): Likewise.
4198 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4199
1841ee5d
UW
42002017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4201
4202 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4203 * gdbtypes.c: Include "floatformat.h".
4204 * value.c: Likewise.
4205 * m68k-tdep.c: Likewise.
4206
4207 * findvar.c: Do not include "floatformat.h".
4208 * amd64-darwin-tdep.c: Likewise.
4209 * arm-linux-tdep.c: Likewise.
4210 * i386-darwin-tdep.c: Likewise.
4211 * i387-tdep.c: Likewise.
4212 * m68k-linux-tdep.c: Likewise.
4213 * mep-tdep.c: Likewise.
4214 * mips-tdep.c: Likewise.
4215 * nios2-tdep.c: Likewise.
4216 * s390-linux-tdep.c: Likewise.
4217 * sparc-obsd-tdep.c: Likewise.
4218 * sparc-tdep.c: Likewise.
4219 * sparc64-tdep.c: Likewise.
4220 * spu-tdep.c: Likewise.
4221 * tic6x-tdep.c: Likewise.
4222 * tilegx-tdep.c: Likewise.
4223 * vax-tdep.c: Likewise.
4224 * xstormy16-tdep.c: Likewise.
4225 * xtensa-tdep.c: Likewise.
4226
4227 * top.c: Do not include "doublest.h".
4228 * aarch64-tdep.c: Likewise.
4229 * alpha-tdep.c: Likewise.
4230 * arm-linux-tdep.c: Likewise.
4231 * m68k-linux-tdep.c: Likewise.
4232 * tilegx-tdep.c: Likewise.
4233 * xstormy16-tdep.c: Likewise.
4234
a80a6471
JB
42352017-10-05 John Baldwin <jhb@FreeBSD.org>
4236
4237 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4238 (mipsn32_fbsd_sigframe): Define.
4239 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4240 for FreeBSD/mipsn32.
4241
12c4bd7f
JB
42422017-10-05 John Baldwin <jhb@FreeBSD.org>
4243
4244 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4245 AT_HWCAP.
4246
c91933e9
TG
42472017-10-05 Tristan Gingold <tgingold@free.fr>
4248
4249 * MAINTAINERS (Misc): Update my email address.
4250
5cd63fda
PA
42512017-10-04 Pedro Alves <palves@redhat.com>
4252
4253 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4254 it instead of target_gdbarch.
4255 (get_remote_state, get_remote_packet_size): Adjust
4256 get_remote_arch_state calls, passing down target_gdbarch
4257 explicitly.
4258 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4259 'gdbarch' and use it instead of target_gdbarch.
4260 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4261 passing down target_gdbarch explicitly.
4262 (struct stop_reply) <arch>: New field.
4263 (remote_parse_stop_reply): Use the stopped thread's architecture,
4264 not the current inferior's. Save the architecture in the
4265 stop_reply.
4266 (process_stop_reply): Use the stop reply's architecture.
4267 (process_g_packet, remote_fetch_registers)
4268 (remote_prepare_to_store, store_registers_using_G)
4269 (remote_store_registers): Adjust get_remote_arch_state calls,
4270 using the regcache's architecture.
4271 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4272 passing down target_gdbarch explicitly.
4273 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4274 beneath instead of calling target_gdbarch.
4275 * target.c (default_thread_architecture): Use the specified
4276 inferior's architecture, instead of the current inferior's
4277 architecture (via target_gdbarch).
4278
ed4227b7
PA
42792017-10-04 Pedro Alves <palves@redhat.com>
4280
4281 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4282 case.
4283 (regcache_print): Handle !target_has_registers here instead.
4284
55b11ddf
PA
42852017-10-04 Pedro Alves <palves@redhat.com>
4286
4287 * frame.c (create_test_frame): Delete.
4288 * frame.h (create_test_frame): Delete.
4289 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4290 (class regcache_test): Delete.
4291 (test_target_has_registers, test_target_has_stack)
4292 (test_target_has_memory, test_target_prepare_to_store)
4293 (test_target_store_registers): New functions.
4294 (test_target_ops): New class.
4295 (register_to_value_test): Error out if there's already a
4296 process_stratum (or higher) target pushed. Create a fuller mock
4297 environment, with mock target_ops, inferior, address space, thread
4298 and inferior_ptid.
4299 * progspace.c (struct address_space): Move to ...
4300 * progspace.h (struct address_space): ... here.
4301 * regcache.h (regcache::~regcache, regcache::raw_write)
4302 [GDB_SELF_TEST]: No longer virtual.
4303
4c71c105
SM
43042017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4305
4306 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4307
73dcd72d
PA
43082017-10-04 Pedro Alves <palves@redhat.com>
4309
4310 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4311 out of 'between TRY and CATCH'.
4312
44704526
PA
43132017-10-04 Pedro Alves <palves@redhat.com>
4314
4315 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4316 * common/common-exceptions.h (TRY): Open an outermost scope.
4317 Expand intro comment.
4318 (CATCH): Reindent.
4319 (END_CATCH): Close the outermost scope.
4320 * completer.c (complete_line_internal): Add missing END_CATCH.
4321
bc3b087d
SDJ
43222017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4323
4324 * NEWS (Changes since GDB 8.0): Add entry about new
4325 'set-cwd-on-gdbserver' feature.
4326 (New remote packets): Add entry for QSetWorkingDir.
4327 * common/common-inferior.h (set_inferior_cwd): New prototype.
4328 * infcmd.c (set_inferior_cwd): Remove "static".
4329 (show_cwd_command): Expand text to include remote debugging.
4330 * remote.c: Add PACKET_QSetWorkingDir.
4331 (remote_protocol_features) <QSetWorkingDir>: New entry for
4332 PACKET_QSetWorkingDir.
4333 (extended_remote_set_inferior_cwd): New function.
4334 (extended_remote_create_inferior): Call
4335 "extended_remote_set_inferior_cwd".
4336 (_initialize_remote): Call "add_packet_config_cmd" for
4337 QSetWorkingDir.
4338
d092c5a2
SDJ
43392017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4340
4341 * NEWS (New commands): Mention "set/show cwd".
4342 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4343 "cd" command's help text.
4344 * common/common-inferior.h (get_inferior_cwd): New prototype.
4345 * infcmd.c (inferior_cwd_scratch): New global variable.
4346 (set_inferior_cwd): New function.
4347 (get_inferior_cwd): Likewise.
4348 (set_cwd_command): Likewise.
4349 (show_cwd_command): Likewise.
4350 (_initialize_infcmd): Add "set/show cwd" commands.
4351 * inferior.h (class inferior) <cwd>: New field.
4352 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4353 (fork_inferior): Change inferior's cwd before its execution.
4354 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4355 to CreateProcess.
4356
7da0a886
SDJ
43572017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4358
4359 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4360 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4361 (COMMON_OBS): Add gdb_tilde_expand.o.
4362 * common/gdb_tilde_expand.c: New file.
4363 * common/gdb_tilde_expand.h: Likewise.
4364
db8dd160
MR
43652017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4366
4367 * gdbarch.sh (objfile): Remove duplicate declaration.
4368 * gdbarch.h: Regenerate.
4369
f8bfbf22
TT
43702017-10-03 Tom Tromey <tom@tromey.com>
4371
4372 * utils.c (internal_vproblem): Use string_vprintf.
4373
5178ed48
TT
43742017-10-03 Tom Tromey <tom@tromey.com>
4375
4376 * printcmd.c (info_symbol_command): Use std::string.
4377
8cff8730
TT
43782017-10-03 Tom Tromey <tom@tromey.com>
4379
4380 * top.c (gdb_safe_append_history): Use std::string.
4381
895b8f30
TT
43822017-10-03 Tom Tromey <tom@tromey.com>
4383
4384 * event-top.c (stdin_event_handler): Update.
4385 * main.c (captured_main_1): Update.
4386 * top.h (make_delete_ui_cleanup): Remove.
4387 (struct ui): Add constructor and destructor.
4388 (new_ui, delete_ui): Remove.
4389 * top.c (make_delete_ui_cleanup): Remove.
4390 (new_ui_command): Use std::unique_ptr.
4391 (delete_ui_cleanup): Remove.
4392 (ui::ui): Rename from new_ui. Update.
4393 (free_ui): Remove.
4394 (ui::~ui): Rename from delete_ui. Update.
4395
0efef640
TT
43962017-10-03 Tom Tromey <tom@tromey.com>
4397
4398 * symfile.c (load_progress): Use gdb::byte_vector.
4399
245ad7d3
TT
44002017-10-03 Tom Tromey <tom@tromey.com>
4401
4402 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4403 declaration.
4404 * printcmd.c (x_command): Remove unused declaration.
4405 * symfile.c (symbol_file_command): Remove unused declaration.
4406
e05550d7
TT
44072017-10-03 Tom Tromey <tom@tromey.com>
4408
4409 * utils.c (internal_vproblem): Use std::string.
4410 (defaulted_query): Likewise.
4411
b95de2b7
TT
44122017-10-03 Tom Tromey <tom@tromey.com>
4413
4414 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4415 * top.c (execute_command_to_string): Update.
4416 * utils.c (make_cleanup_restore_page_info): Remove.
4417 (do_restore_page_info_cleanup): Remove.
4418 (set_batch_flag_and_restore_page_info):
4419 New.
4420 (make_cleanup_restore_page_info): Remove.
4421 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4422 (~set_batch_flag_and_restore_page_info): New
4423 (make_cleanup_restore_uinteger): Remove.
4424 (make_cleanup_restore_integer): Remove.
4425 (struct restore_integer_closure): Remove.
4426 (restore_integer): Remove.
4427 * utils.h (struct set_batch_flag_and_restore_page_info): New
4428 class.
4429 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4430 (make_cleanup_restore_page_info): Remove.
4431 (make_cleanup_restore_uinteger) Remove.
4432 (make_cleanup_restore_integer) Remove.
4433
07036511
TT
44342017-10-03 Tom Tromey <tom@tromey.com>
4435
4436 * record-full.h (record_full_gdb_operation_disable_set): Return
4437 scoped_restore_tmpl<int>.
4438 * infrun.c (adjust_pc_after_break): Update.
4439 (handle_signal_stop): Update.
4440 * record-full.c (record_full_gdb_operation_disable_set): Return
4441 scoped_restore_tmpl<int>.
4442 (record_full_wait_1, record_full_insert_breakpoint)
4443 (record_full_remove_breakpoint, record_full_save)
4444 (record_full_goto_insn): Update.
4445
45320ffa
TT
44462017-10-02 Tom Tromey <tom@tromey.com>
4447
4448 PR rust/22236:
4449 * rust-lang.c (rust_val_print_str): New function.
4450 (val_print_struct): Call it.
4451 (rust_subscript): Preserve name of slice type.
4452
b3e3859b
TT
44532017-10-02 Tom Tromey <tom@tromey.com>
4454
4455 * rust-lang.c (rust_subscript): Handle slices in
4456 EVAL_AVOID_SIDE_EFFECTS case.
4457
01af5e0d
TT
44582017-10-02 Tom Tromey <tom@tromey.com>
4459
4460 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4461
888e3ddb
TT
44622017-10-02 Tom Tromey <tom@tromey.com>
4463
4464 * rust-lang.h (rust_slice_type): Add "extern".
4465
cc536b21
PA
44662017-10-02 Tom Tromey <tom@tromey.com>
4467 Pedro Alves <palves@redhat.com>
4468
4469 * ada-lang.h (ada_exc_info::operator<): Make const.
4470 (ada_exc_info::operator==): Make const.
4471 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4472 Make const.
4473
386c8614
TT
44742017-09-29 Tom Tromey <tom@tromey.com>
4475
4476 * target.c (read_whatever_is_readable): Change type of "result".
4477 Update.
4478 (free_memory_read_result_vector): Remove.
4479 (read_memory_robust): Change return type. Update.
4480 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4481 bin2hex, std::string.
4482 * target.h (memory_read_result_s): Remove typedef.
4483 (free_memory_read_result_vector): Remove.
4484 (read_memory_robust): Return std::vector.
4485
789c4b5e
TT
44862017-09-29 Tom Tromey <tom@tromey.com>
4487
4488 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4489
ab816a27
TT
44902017-09-29 Tom Tromey <tom@tromey.com>
4491
4492 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4493 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4494 operator< and operator==.
4495 (ada_exceptions_list): Return a std::vector.
4496 * ada-lang.c (ada_exc_info::operator<): Rename from
4497 compare_ada_exception_info.
4498 (ada_exc_info::operator==): New.
4499 (sort_remove_dups_ada_exceptions_list): Change type of
4500 "exceptions".
4501 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4502 (ada_add_global_exceptions): Likewise.
4503 (ada_exceptions_list_1): Return a std::vector.
4504 (ada_exceptions_list): Likewise.
4505
52f9abe4
TT
45062017-09-29 Tom Tromey <tom@tromey.com>
4507
4508 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4509 'std::set *'.
4510 (print_one_inferior): Update.
4511 (free_vector_of_ints): Remove.
4512 (list_available_thread_groups): Change "ids" to std::set.
4513 (mi_cmd_list_thread_groups): Update.
4514 (struct collect_cores_data) <core>: Now a std::set.
4515 (collect_cores): Update.
4516 (unique): Remove.
4517 (print_one_inferior): Update.
4518
dcd5ddcc
TT
45192017-09-29 Tom Tromey <tom@tromey.com>
4520
4521 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4522 (mi_execute_async_cli_command): Likewise.
4523 (mi_cmd_trace_frame_collected): Use field_fmt.
4524
45d288cc
TT
45252017-09-29 Tom Tromey <tom@tromey.com>
4526
4527 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4528 gdb::byte_vector.
4529
6afe2f4a
TT
45302017-09-29 Tom Tromey <tom@tromey.com>
4531
4532 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4533
9813429a
TT
45342017-09-29 Tom Tromey <tom@tromey.com>
4535
4536 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4537
2d6960b4
TT
45382017-09-29 Tom Tromey <tom@tromey.com>
4539
4540 * varobj.h (varobj_gen_name): Return std::string.
4541 * varobj.c (varobj_gen_name): Return std::string.
4542 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4543 (mi_cmd_var_delete): Don't copy "name".
4544
784c453a
TT
45452017-09-29 Tom Tromey <tom@tromey.com>
4546
4547 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4548 (mi_cmd_break_insert_1): Update.
4549
a9bc57b9
TT
45502017-09-29 Tom Tromey <tom@tromey.com>
4551
4552 * target.h (make_scoped_defer_target_commit_resume): Update.
4553 * target.c (make_scoped_defer_target_commit_resume): Rename from
4554 make_cleanup_defer_target_commit_resume. Return a
4555 scoped_restore.
4556 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4557
9754d8c4
TT
45582017-09-29 Tom Tromey <tom@tromey.com>
4559
4560 * main.c (captured_main_1): Remove unused declaration.
4561 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4562
99ef965c
TT
45632017-09-29 Tom Tromey <tom@tromey.com>
4564
4565 * symtab.c (search_symbols): Remove unused outer cleanup.
4566 (make_source_files_completion_list): Remove unused declaration.
4567
42518ba7
TT
45682017-09-29 Tom Tromey <tom@tromey.com>
4569
4570 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4571
726b2169
TT
45722017-09-29 Tom Tromey <tom@tromey.com>
4573
4574 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4575 gdb::byte_vector.
4576
55b06432
TT
45772017-09-29 Tom Tromey <tom@tromey.com>
4578
4579 * complaints.c (vcomplaint): Use std::string.
4580
8abcee91
TT
45812017-09-29 Tom Tromey <tom@tromey.com>
4582
4583 * tracepoint.c (trace_variable_command): Use std::string.
4584 (encode_actions_1): Remove unused declarations.
4585 (create_tsv_from_upload): Use std::string.
4586
6ad94bc7
TT
45872017-09-29 Tom Tromey <tom@tromey.com>
4588
4589 * cp-support.c (gdb_demangle): Use std::string.
4590
2003f3d8
TT
45912017-09-29 Tom Tromey <tom@tromey.com>
4592
4593 * stack.c (parse_frame_specification): Use std::string
4594 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4595
8f8accb5
TT
45962017-09-29 Tom Tromey <tom@tromey.com>
4597
4598 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4599
200aa7b1
TT
46002017-09-29 Tom Tromey <tom@tromey.com>
4601
4602 * utils.c (vfprintf_maybe_filtered): Use std::string.
4603 (vfprintf_unfiltered): Likewise.
4604
606aae8a
TT
46052017-09-29 Tom Tromey <tom@tromey.com>
4606
4607 * event-top.c (top_level_prompt): Return std::string.
4608 (display_gdb_prompt): Update.
4609
bd413795
TT
46102017-09-29 Tom Tromey <tom@tromey.com>
4611
4612 * unittests/common-utils-selftests.c (format): New function.
4613 (string_vprintf_tests): New function.
4614 (_initialize_common_utils_selftests): Register new tests.
4615 * common/common-utils.c (string_vprintf): New function.
4616 * common/common-utils.h (string_vprintf): Declare.
4617
256642e8
PA
46182017-09-29 Pedro Alves <palves@redhat.com>
4619
4620 * common/rsp-low.c (unpack_varlen_hex): Constify.
4621 * common/rsp-low.h (unpack_varlen_hex): Constify.
4622 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4623 Constify.
4624 * remote.c (remote_set_permissions, read_ptid)
4625 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4626 (remote_static_tracepoint_marker_at)
4627 (remote_static_tracepoint_markers_by_strid)
4628 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4629 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4630 (parse_tracepoint_definition, parse_tsv_definition)
4631 (parse_static_tracepoint_marker_definition): Constify.
4632 * tracepoint.h (parse_static_tracepoint_marker_definition)
4633 (parse_trace_status, parse_tracepoint_status)
4634 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4635
b6bb3468
PA
46362017-09-29 Pedro Alves <palves@redhat.com>
4637
4638 * remote.c (target_buf, target_buf_size): Delete.
4639 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4640 Use the connection's packet buffer instead.
4641 All callers adjusted.
4642 (_initialize_remote): Remove references to target_buf and
4643 target_buf_size.
4644
b2f8eb7a
PA
46452017-09-28 Pedro Alves <palves@redhat.com>
4646
4647 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4648 unittests/common-utils-selftests.c.
4649 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4650 (COMMON_OBS): Remove utils-selftests.o.
4651 * utils-selftests.c: Move to ...
4652 * unittests/common-utils-selftests.c: ... here and rename self
4653 test to "string_printf".
4654
08302ed2
DE
46552017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4656
4657 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4658 having NULL cus or tus.
4659
96a5a1d3
UW
46602017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4661
4662 * arm-tdep.c: (convert_from_extended): Remove.
4663 (convert_to_extended): Likewise.
4664 (arm_extract_return_value): Use convert_typed_floating.
4665 (arm_store_return_value): Likewise.
4666
4667 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4668 * sh-tdep.c: Do not include "floatformat.h".
4669 (sh_littlebyte_bigword_type): New function.
4670 (sh_register_convert_to_virtual): Use convert_typed_floating.
4671 (sh_register_convert_to_raw): Likewise.
4672 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4673 (sh64_littlebyte_bigword_type): New function.
4674 (sh64_extract_return_value): Use convert_typed_floating.
4675 (sh64_register_convert_to_virtual): Likewise.
4676 (sh64_register_convert_to_raw): Likewise.
4677
0db7851f
UW
46782017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4679
4680 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4681 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4682
4683 * gdbtypes.h (union type_specific): Make field floatformat hold
4684 just a single struct floatformat, not an array.
4685 (floatformat_from_type): Move here.
4686 * gdbtypes.c (floatformat_from_type): Move here. Update to
4687 changed TYPE_FLOATFORMAT definition.
4688 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4689 (recursive_dump_type): Likewise.
4690 (init_float_type): Install correct floatformat for byte order.
4691 (arch_float_type): Likewise.
4692
77b7c781
UW
46932017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4694
4695 * gdbtypes.c (init_type): Change incoming argument from
4696 length-in-bytes to length-in-bits. Assert length is a
4697 multiple of TARGET_CHAR_BITS.
4698 (arch_type, arch_flags_type): Likewise.
4699 (init_integer_type): Update call to init_type.
4700 (init_character_type): Likewise.
4701 (init_boolean_type): Likewise.
4702 (init_float_type): Likewise.
4703 (init_decfloat_type): Likewise.
4704 (init_complex_type): Likewise.
4705 (init_pointer_type): Likewise.
4706 (objfile_type): Likewise.
4707 (arch_integer_type): Update call to arch_type.
4708 (arch_character_type): Likewise.
4709 (arch_boolean_type): Likewise.
4710 (arch_float_type): Likewise.
4711 (arch_decfloat_type): Likewise.
4712 (arch_complex_type): Likewise.
4713 (arch_pointer_type): Likewise.
4714 (gdbtypes_post_init): Likewise.
4715
4716 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4717 (read_base_type): Likewise.
4718 * mdebugread.c (basic_type): Likewise.
4719 * stabsread.c (dbx_init_float_type): Likewise.
4720 (rs6000_builtin_type): Likewise.
4721 (read_range_type): Likewise. Also, fix call to init_integer_type
4722 with erroneous length argument.
4723
4724 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4725 * d-lang.c (build_d_types): Likewise.
4726 * f-lang.c (build_fortran_types): Likewise.
4727 * go-lang.c (build_go_types): Likewise.
4728 * opencl-lang.c (build_opencl_types): Likewise.
4729 * jit.c (finalize_symtab): Likewise.
4730 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4731 (build_std_type_info_type): Likewise.
4732 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4733 update call to arch_flags_type.
4734
4735 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4736 arch_type.
4737 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4738 * windows-tdep.c (windows_get_tlb_type): Likewise.
4739
4740 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4741 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4742 * m32c-tdep.c (make_types): Likewise.
4743 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4744 (rl78_psw_type): Update call to arch_flags_type.
4745 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4746 * rx-tdep.c (rx_psw_type): Likewise.
4747 (rx_fpsw_type): Likewise.
4748 * sparc-tdep.c (sparc_psr_type): Likewise.
4749 (sparc_fsr_type): Likewise.
4750 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4751 (sparc64_ccr_type): Likewise.
4752 (sparc64_fsr_type): Likewise.
4753 (sparc64_fprs_type): Likewise.
4754
f21b4d5c
TT
47552017-09-27 Tom Tromey <tom@tromey.com>
4756
4757 * findcmd.c (find_command): Constify.
4758
643c2ffa
TT
47592017-09-27 Tom Tromey <tom@tromey.com>
4760
4761 * ada-tasks.c (task_command_1, task_command): Constify.
4762
510e5e56
TT
47632017-09-27 Tom Tromey <tom@tromey.com>
4764
4765 * symtab.c (maintenance_print_symbol_cache)
4766 (maintenance_flush_symbol_cache)
4767 (maintenance_print_symbol_cache_statistics): Constify.
4768
e503b191
TT
47692017-09-27 Tom Tromey <tom@tromey.com>
4770
4771 * inferior.c (detach_inferior_command, kill_inferior_command)
4772 (inferior_command): Constify.
4773
4e001312
TT
47742017-09-27 Tom Tromey <tom@tromey.com>
4775
4776 * regcache.c (regcache_print, maintenance_print_registers)
4777 (maintenance_print_raw_registers)
4778 (maintenance_print_cooked_registers)
4779 (maintenance_print_register_groups)
4780 (maintenance_print_remote_registers): Constify.
4781
77763700
TT
47822017-09-27 Tom Tromey <tom@tromey.com>
4783
4784 * printcmd.c (map_display_numbers, undisplay_command)
4785 (enable_disable_display_command, enable_display_command)
4786 (disable_display_command): Constify.
4787
4495129a
TT
47882017-09-27 Tom Tromey <tom@tromey.com>
4789
4790 * breakpoint.h (delete_command): Don't declare.
4791 * breakpoint.c (delete_command, enable_once_command)
4792 (enable_count_command, enable_delete_command, breakpoint_1)
4793 (maintenance_info_breakpoints, stopin_command, stopat_command)
4794 (delete_command, delete_trace_command, save_breakpoints)
4795 (save_breakpoints_command, save_tracepoints_command): Constify.
4796
3088cf40
TT
47972017-09-27 Tom Tromey <tom@tromey.com>
4798
4799 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4800 (skip_ws, extract_identifier, macro_define_command)
4801 (macro_undef_command, macro_list_command): Constify.
4802
69f476a3
TT
48032017-09-27 Tom Tromey <tom@tromey.com>
4804
4805 * infcmd.c (environment_info, set_environment_command)
4806 (unset_environment_command, path_info, info_proc_cmd_1)
4807 (info_proc_cmd_mappings, info_proc_cmd_stat)
4808 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4809 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4810
c4a3e68e
TT
48112017-09-27 Tom Tromey <tom@tromey.com>
4812
4813 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4814 Constify.
4815
c9d31bd6
TT
48162017-09-27 Tom Tromey <tom@tromey.com>
4817
4818 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4819
1f3f85eb
TT
48202017-09-27 Tom Tromey <tom@tromey.com>
4821
4822 * demangle.c (demangle_command): Constify.
4823
9c504b5d
TT
48242017-09-27 Tom Tromey <tom@tromey.com>
4825
4826 * progspace.c (maintenance_info_program_spaces_command):
4827 Constify.
4828
6663cf91
TT
48292017-09-27 Tom Tromey <tom@tromey.com>
4830
4831 * compile/compile.c (check_raw_argument, compile_file_command)
4832 (compile_code_command, compile_print_command): Constify.
4833
34e5fa26
TT
48342017-09-27 Tom Tromey <tom@tromey.com>
4835
4836 * reggroups.c (maintenance_print_reggroups): Constify.
4837
8384c356
TT
48382017-09-27 Tom Tromey <tom@tromey.com>
4839
4840 * dwarf2read.c (save_gdb_index_command): Constify.
4841
884beb0c
TT
48422017-09-27 Tom Tromey <tom@tromey.com>
4843
4844 * stap-probe.c (info_probes_stap_command): Constify.
4845
e0b2930c
TT
48462017-09-27 Tom Tromey <tom@tromey.com>
4847
4848 * fork-child.c (unset_exec_wrapper_command): Constify.
4849
f938677d
TT
48502017-09-27 Tom Tromey <tom@tromey.com>
4851
4852 * btrace.c (get_uint, get_context_size, no_chunk)
4853 (maint_btrace_packet_history_cmd)
4854 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4855 (maint_info_btrace_cmd): Constify.
4856
8949cb87
TT
48572017-09-27 Tom Tromey <tom@tromey.com>
4858
4859 * reverse.c (delete_bookmark_command): Constify.
4860
ac88e2de
TT
48612017-09-27 Tom Tromey <tom@tromey.com>
4862
4863 * remote.c (set_memory_packet_size)
4864 (set_memory_write_packet_size, show_memory_write_packet_size)
4865 (set_memory_read_packet_size, show_memory_read_packet_size)
4866 (compare_sections_command, packet_command, remote_put_command)
4867 (remote_get_command, remote_delete_command): Constify.
4868
bd4c9dfe
TT
48692017-09-27 Tom Tromey <tom@tromey.com>
4870
4871 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4872 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4873 (set_mipsfpu_auto_command): Constify.
4874
5e93d4c6
TT
48752017-09-27 Tom Tromey <tom@tromey.com>
4876
4877 * cli/cli-cmds.h (cd_command): Constify.
4878 * cli/cli-cmds.c (cd_command): Constify.
4879
fc41a75b
TT
48802017-09-27 Tom Tromey <tom@tromey.com>
4881
4882 * thread.c (thread_name_command, thread_find_command): Constify.
4883
67810076
TT
48842017-09-27 Tom Tromey <tom@tromey.com>
4885
4886 * probe.c (enable_probes_command, disable_probes_command):
4887 Constify.
4888
1d8b34a7
TT
48892017-09-27 Tom Tromey <tom@tromey.com>
4890
4891 * symfile.c (symbol_file_command): Constify.
4892 * gdbcore.h (deprecated_file_changed_hook): Constify.
4893 * exec.c (deprecated_file_changed_hook, exec_file_command)
4894 (file_command): Constify.
4895 * defs.h (symbol_file_command): Constify.
4896
442019e1
TT
48972017-09-27 Tom Tromey <tom@tromey.com>
4898
4899 * remote-fileio.c (set_system_call_allowed)
4900 (show_system_call_allowed): Constify.
4901
2983f7cb
TT
49022017-09-27 Tom Tromey <tom@tromey.com>
4903
4904 * tracepoint.c (delete_trace_variable_command)
4905 (tfind_end_command, tfind_start_command, tfind_pc_command)
4906 (tfind_tracepoint_command, tfind_line_command)
4907 (tfind_range_command, tfind_outside_command): Constify.
4908
4fd41b24
TT
49092017-09-27 Tom Tromey <tom@tromey.com>
4910
4911 * ax-gdb.c (maint_agent_printf_command, agent_command)
4912 (agent_eval_command): Constify.
4913
f2fc3015
TT
49142017-09-27 Tom Tromey <tom@tromey.com>
4915
4916 * tracepoint.c (info_scope_command): Constify.
4917 * python/python.c (gdbpy_decode_line): Constify.
4918 * python/py-breakpoint.c (bppy_init): Constify.
4919 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4920 * location.h: (new_linespec_location)
4921 (string_to_event_location_basic, string_to_event_location):
4922 Constify.
4923 * location.c (new_linespec_location)
4924 (string_to_event_location_basic, string_to_event_location):
4925 Constify.
4926 * linespec.h (decode_line_with_current_source)
4927 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4928 * linespec.c (linespec_lex_to_end)
4929 (decode_line_with_current_source)
4930 (decode_line_with_last_displayed): Constify.
4931 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4932 Constify.
4933 * cli/cli-cmds.c (edit_command, list_command): Constify.
4934 * breakpoint.h (until_break_command, watch_command_wrapper)
4935 (awatch_command_wrapper, rwatch_command_wrapper)
4936 (init_ada_exception_breakpoint): Constify.
4937 * breakpoint.c (break_command_1, dprintf_command)
4938 (break_range_command, watch_command_wrapper)
4939 (rwatch_command_wrapper, awatch_command_wrapper)
4940 (until_break_command, init_ada_exception_breakpoint)
4941 (strace_marker_create_sals_from_location, trace_command)
4942 (ftrace_command, strace_command, struct tracepoint): Constify.
4943 * ax-gdb.c (agent_command_1): Constify.
4944 * ada-lang.c (ada_exception_sal): Constify.
4945
8c2f95f4
TT
49462017-09-27 Tom Tromey <tom@tromey.com>
4947
4948 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4949 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4950 (get_context_size, no_chunk, get_insn_history_modifiers)
4951 (cmd_record_insn_history, get_call_history_modifiers)
4952 (cmd_record_call_history): Constify.
4953
a0d65762
TT
49542017-09-27 Tom Tromey <tom@tromey.com>
4955
4956 * source.c (show_substitute_path_command)
4957 (unset_substitute_path_command, set_substitute_path_command):
4958 Constify.
4959
58971144
TT
49602017-09-27 Tom Tromey <tom@tromey.com>
4961
4962 * typeprint.c (maintenance_print_type): Constify.
4963 * maint.c (maintenance_dump_me, maintenance_demangle)
4964 (maintenance_time_display, maintenance_info_sections)
4965 (maintenance_print_statistics, maintenance_deprecate)
4966 (maintenance_undeprecate): Constify.
4967 (maintenance_do_deprecate): Constify. Use std::string.
4968 (maintenance_selftest): Constify.
4969 * gdbtypes.h (maintenance_print_type): Constify.
4970
c482f52c
TT
49712017-09-27 Tom Tromey <tom@tromey.com>
4972
4973 * hppa-tdep.c (unwind_command): Constify.
4974
e100df1a
TT
49752017-09-27 Tom Tromey <tom@tromey.com>
4976
4977 * target-descriptions.c (unset_tdesc_filename_cmd)
4978 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4979 Constify.
4980
31d56ade
TT
49812017-09-27 Tom Tromey <tom@tromey.com>
4982
4983 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4984
b961da0b
TT
49852017-09-27 Tom Tromey <tom@tromey.com>
4986
4987 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4988
e2d8ae16
TT
49892017-09-27 Tom Tromey <tom@tromey.com>
4990
4991 * tui/tui-regs.c (tui_reg_command): Constify.
4992
863779b0
TT
49932017-09-27 Tom Tromey <tom@tromey.com>
4994
4995 * skip.c (skip_file_command, skip_function_command)
4996 (skip_enable_command, skip_disable_command, skip_delete_command):
4997 Constify.
4998
cdb34d4a
TT
49992017-09-27 Tom Tromey <tom@tromey.com>
5000
5001 * record-btrace.c (cmd_record_btrace_bts_start)
5002 (cmd_record_btrace_pt_start): Constify.
5003
e99c83e7
TT
50042017-09-27 Tom Tromey <tom@tromey.com>
5005
5006 * symmisc.c (maintenance_print_symbols)
5007 (maintenance_print_msymbols, maintenance_print_objfiles)
5008 (maintenance_info_symtabs, maintenance_check_symtabs)
5009 (maintenance_expand_symtabs, maintenance_info_line_tables):
5010 Constify.
5011
32faf971
TT
50122017-09-27 Tom Tromey <tom@tromey.com>
5013
5014 * top.c (new_ui_command): Constify.
5015
2cf311eb
TT
50162017-09-27 Tom Tromey <tom@tromey.com>
5017
5018 * symfile.c (add_symbol_file_command)
5019 (remove_symbol_file_command, list_overlays_command)
5020 (map_overlay_command, unmap_overlay_command)
5021 (overlay_auto_command, overlay_manual_command)
5022 (overlay_off_command, overlay_load_command): Constify.
5023
e6738699
TT
50242017-09-27 Tom Tromey <tom@tromey.com>
5025
5026 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5027 (info_spu_mailbox_command, info_spu_dma_command)
5028 (info_spu_proxydma_command): Constify.
5029
aa360cd5
TT
50302017-09-27 Tom Tromey <tom@tromey.com>
5031
5032 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5033
898241a5
TT
50342017-09-27 Tom Tromey <tom@tromey.com>
5035
5036 * cli/cli-script.c (user_defined_command): Constify.
5037
2d0ac106
TT
50382017-09-27 Tom Tromey <tom@tromey.com>
5039
5040 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5041 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5042 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5043 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5044 (dump_binary_value, append_binary_memory, append_binary_value):
5045 Constify.
5046 (struct dump_context) <func>: Constify.
5047 (add_dump_command): Update.
5048
dede02ce
TT
50492017-09-27 Tom Tromey <tom@tromey.com>
5050
5051 * cli/cli-cmds.c (show_version, show_configuration)
5052 (source_command, show_user): Constify.
5053
d3cb6b99
TT
50542017-09-27 Tom Tromey <tom@tromey.com>
5055
5056 * target.c (maintenance_print_target_stack): Constify.
5057
1970a12f
TT
50582017-09-27 Tom Tromey <tom@tromey.com>
5059
5060 * interps.c (interpreter_exec_cmd): Constify.
5061
41243651
TT
50622017-09-27 Tom Tromey <tom@tromey.com>
5063
5064 * record-full.c (cmd_record_full_restore): Constify.
5065
4465d9db
TT
50662017-09-27 Tom Tromey <tom@tromey.com>
5067
5068 * memattr.c (enable_mem_command, disable_mem_command)
5069 (delete_mem_command): Constify.
5070
ad25e423
TT
50712017-09-27 Tom Tromey <tom@tromey.com>
5072
5073 * value.c (show_convenience): Constify.
5074
d64097b1
TT
50752017-09-27 Tom Tromey <tom@tromey.com>
5076
5077 * gdbcore.h (core_file_command): Update.
5078 * corefile.c (core_file_command): Constify.
5079
4d4589ef
TT
50802017-09-27 Tom Tromey <tom@tromey.com>
5081
5082 * user-regs.c (maintenance_print_user_registers): Constify.
5083
32a7bf17
TT
50842017-09-27 Tom Tromey <tom@tromey.com>
5085
5086 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5087
4a475551
TT
50882017-09-27 Tom Tromey <tom@tromey.com>
5089
5090 * cp-support.c (first_component_command): Constify.
5091
990b9f9f
TT
50922017-09-27 Tom Tromey <tom@tromey.com>
5093
5094 * psymtab.c (maintenance_print_psymbols)
5095 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5096 Constify.
5097
c281872e
TT
50982017-09-27 Tom Tromey <tom@tromey.com>
5099
5100 * windows-tdep.c (display_tib): Constify.
5101
5b64bf74
TT
51022017-09-27 Tom Tromey <tom@tromey.com>
5103
5104 * linux-fork.c (delete_checkpoint_command)
5105 (detach_checkpoint_command): Constify.
5106
4ada038f
TT
51072017-09-27 Tom Tromey <tom@tromey.com>
5108
5109 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5110
57f5a81b
TT
51112017-09-27 Tom Tromey <tom@tromey.com>
5112
5113 * arc-tdep.c (dump_arc_instruction_command): Constify.
5114
b0a8e6c4
TT
51152017-09-27 Tom Tromey <tom@tromey.com>
5116
5117 * valprint.c (set_radix, show_radix): Constify.
5118
8d97dc1c
TT
51192017-09-27 Tom Tromey <tom@tromey.com>
5120
5121 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5122
eb7c454d
TT
51232017-09-27 Tom Tromey <tom@tromey.com>
5124
5125 * command.h (not_just_help_class_command): Update.
5126 * cli/cli-decode.h (not_just_help_class_command): Update.
5127 * cli/cli-decode.c (not_just_help_class_command): Constify.
5128
e4e33335
TT
51292017-09-27 Tom Tromey <tom@tromey.com>
5130
5131 * gdb_bfd.c (maintenance_info_bfds): Constify.
5132
0450cc4c
TT
51332017-09-27 Tom Tromey <tom@tromey.com>
5134
5135 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5136 overloads.
5137 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5138 (do_const_cfunc): New function.
5139 (cmd_cfunc_eq): New overload.
5140 (cli_user_command_p): Check do_const_cfunc.
5141 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5142 const_cfunc.
5143 * command.h (add_cmd): Add const overload and no-function
5144 overload.
5145 (set_cmd_cfunc): Add const overload.
5146 (cmd_const_cfunc_ftype): Declare.
5147 (cmd_cfunc_eq): Add const overload.
5148 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5149 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5150 overload.
5151
a9bbfbd8
TT
51522017-09-27 Tom Tromey <tom@tromey.com>
5153
5154 * macroexp.c (get_next_token_for_substitution): New function.
5155 (substitute_args): Call it. Check for __VA_OPT__.
5156
5230b05a
WT
51572017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5158 Pedro Alves <palves@redhat.com>
5159
5160 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5161 producer_is_icc_lt_14.
5162 (producer_is_icc_lt_14): New function.
5163 (check_producer): Add code for checking version of ICC.
5164 (producer_is_icc): Move to producer.c.
5165 (read_structure_type): Restrict ICC workaround to ICC<14.
5166 * producer.c: Include selftest.h.
5167 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5168 New functions.
5169 * producer.h (producer_is_icc): New declaration.
5170
b32b108a
WT
51712017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5172
5173 * Makefile.in (SFILES): Add producer.c.
5174 (COMMON_OBS): Add producer.o
5175 * amd64-tdep.c (producer.h): Add new include.
5176 * dwarf2read.c (producer.h): Add new include.
5177 * producer.c: New file.
5178 * producer.h: New file.
5179 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5180 producer.c.
5181 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5182 producer.h.
5183
5007d765
MK
51842017-09-26 Matthias Klose <doko@ubuntu.com>
5185
5186 * configure.ac: Search ncursesw before ncurses.
5187 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5188 * gdb_curses.h: Include <ncursesw/ncurses.h>
5189 * config.in, configure: Regenerate.
5190
281c4447
RO
51912017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5192
5193 PR gdb/22185
5194 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5195 obsolete.
5196 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5197 Remove i386sol2 support.
5198 * configure.nat <i386sol2>: Remove.
5199 <sol2-64>: Fold into ...
5200 <sol2>: ... this.
5201 Move common settings to default section.
5202 Add sol-thread.o.
5203 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5204 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5205 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5206 <i[34567]86-*-solaris*>: Remove.
5207 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5208
5209 * configure.ac: Remove wctype in libw check.
5210 (_MSE_INT_H): Don't define on Solaris 7-9.
5211 <solaris*>: Remove libthread_db.so.1 check.
5212 * configure: Regenerate.
5213 * config.in: Regenerate.
5214
5215 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5216 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5217 (gdb_ps_size_t): Remove.
5218 Use base types in users.
5219 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5220
5221 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5222
39b06c20
RO
52232017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5224
5225 PR build/22206
5226 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5227 (adi_is_addr_mapped): Likewise.
5228 (PSR_ICC): Don't redefine.
5229 (PSR_IMPL): Likewise.
5230
6c3e20f1
TT
52312017-09-25 Tom Tromey <tom@tromey.com>
5232
5233 * regcache.c (regcache::dump): Use string_printf.
5234
b292235f
TT
52352017-09-25 Tom Tromey <tom@tromey.com>
5236
5237 * regcache.c (class regcache_invalidator): New.
5238 (struct register_to_invalidate): Remove.
5239 (make_cleanup_regcache_invalidate): Remove.
5240 (regcache::raw_write): Use regcache_invalidator.
5241
9ac86b52
TT
52422017-09-25 Tom Tromey <tom@tromey.com>
5243
5244 * spu-tdep.c (spu2ppu_sniffer): Update.
5245 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5246 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5247 Remove.
5248 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5249 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5250 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5251 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5252 (frame_pop): Update.
5253
c0e383c6
TT
52542017-09-25 Tom Tromey <tom@tromey.com>
5255
5256 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5257 * regcache.h (regcache_xfree): Don't declare.
5258 * regcache.c (regcache_xfree): Remove.
5259 (do_regcache_xfree): Use delete.
5260 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5261 * linux-fork.c (free_fork): Use delete.
5262 (fork_save_infrun_state): Likewise.
5263 * jit.c (jit_dealloc_cache): Use delete.
5264 * infrun.c (discard_infcall_suspend_state): Use delete.
5265
791199cc
TT
52662017-09-25 Tom Tromey <tom@tromey.com>
5267
5268 * regcache.h (regcache_xmalloc): Don't declare.
5269 (regcache_raw_set_cached_value): Update comment.
5270 * regcache.c (regcache_xmalloc): Remove.
5271 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5272 * jit.c (jit_frame_sniffer): Use new.
5273 * frame.c (frame_save_as_regcache): Use new.
5274
289e23aa
AA
52752017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5276
5277 * NEWS: Advertise support for guarded-storage registers on IBM z.
5278
1b63490c
AA
52792017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5280
5281 * s390-linux-nat.c (have_regset_gs): New static variable.
5282 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5283 control block and guarded-storage broadcast control regsets.
5284 (s390_read_description): Detect whether the target has
5285 guarded-storage support, return appropriate tdesc.
5286 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5287 (features/s390x-gs-linux64.c): Likewise.
5288 (struct gdbarch_tdep) <have_gs>: New field.
5289 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5290 (s390_gsbc_regset): New variables.
5291 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5292 and s390_gsbc_regset, if applicable.
5293 (s390_core_read_description): Check whether core file was from a
5294 target with guarded-storage support; include appropriate regsets.
5295 (s390_gdbarch_init): Add registers for guarded-storage support.
5296 (_initialize_s390_tdep): Initialize new target descriptions that
5297 include registers for guarded-storage support.
5298 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5299 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5300 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5301 (S390_NUM_REGS): Adjust macro definition.
5302 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5303 (tdesc_s390x_gs_linux64): New declarations.
5304
96235dc1
AA
53052017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5306
5307 * features/s390-gs-linux64.xml: New file.
5308 * features/s390-gs.xml: New file.
5309 * features/s390-gsbc.xml: New file.
5310 * features/s390x-gs-linux64.xml: New file.
5311 * features/Makefile (WHICH): Add s390-gs-linux64 and
5312 s390x-gs-linux64.
5313 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5314 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5315 * features/s390-gs-linux64.c: New generated file.
5316 * features/s390x-gs-linux64.c: New file.
5317 * regformats/s390-gs-linux64.dat: New file.
5318 * regformats/s390x-gs-linux64.dat: New file.
5319
b4a7c699
TT
53202017-09-23 Tom Tromey <tom@tromey.com>
5321
5322 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5323
c2f97536
TT
53242017-09-22 Tom Tromey <tom@tromey.com>
5325
5326 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5327 type to scoped_restore_tmpl.
5328 <scoped_input_handler>: Initialize m_quit_handler directly.
5329
43573013
SDJ
53302017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5331
5332 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5333 (cd_command): Likewise. Free "current_directory" before
5334 assigning to it.
5335 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5336 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5337 * top.c (gdb_dirbuf): Remove global declaration.
5338 * top.h (gdb_dirbuf): Likewise.
5339
6ec2e0f5
SDJ
53402017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5341
5342 * gnulib/aclocal.m4: Regenerate.
5343 * gnulib/config.in: Regenerate.
5344 * gnulib/configure: Regenerate.
5345 * gnulib/import/Makefile.am: Regenerate.
5346 * gnulib/import/Makefile.in: Regenerate.
5347 * gnulib/import/assure.h: New file.
5348 * gnulib/import/at-func.c: Likewise
5349 * gnulib/import/chdir-long.c: New file.
5350 * gnulib/import/chdir-long.h: New file.
5351 * gnulib/import/cloexec.c: New file.
5352 * gnulib/import/cloexec.h: New file.
5353 * gnulib/import/close.c: New file.
5354 * gnulib/import/closedir.c: New file.
5355 * gnulib/import/dirent-private.h: New file.
5356 * gnulib/import/dup-safer.c: New file.
5357 * gnulib/import/dup.c: New file.
5358 * gnulib/import/dup2.c: New file.
5359 * gnulib/import/error.c: New file.
5360 * gnulib/import/error.h: New file.
5361 * gnulib/import/exitfail.c: New file.
5362 * gnulib/import/exitfail.h: New file.
5363 * gnulib/import/fchdir.c: New file.
5364 * gnulib/import/fcntl.c: New file.
5365 * gnulib/import/fcntl.in.h: New file.
5366 * gnulib/import/fd-hook.c: New file.
5367 * gnulib/import/fd-hook.h: New file.
5368 * gnulib/import/fd-safer.c: New file.
5369 * gnulib/import/fdopendir.c: New file.
5370 * gnulib/import/filename.h: New file.
5371 * gnulib/import/filenamecat-lgpl.c: New file.
5372 * gnulib/import/filenamecat.h: New file.
5373 * gnulib/import/fstat.c: New file.
5374 * gnulib/import/fstatat.c: New file.
5375 * gnulib/import/getcwd-lgpl.c: New file.
5376 * gnulib/import/getcwd.c: New file.
5377 * gnulib/import/getdtablesize.c: New file.
5378 * gnulib/import/getlogin_r.c: New file.
5379 * gnulib/import/getprogname.c: New file.
5380 * gnulib/import/getprogname.h: New file.
5381 * gnulib/import/gettext.h: New file.
5382 * gnulib/import/glob-libc.h: New file.
5383 * gnulib/import/glob.c: New file.
5384 * gnulib/import/glob.in.h: New file.
5385 * gnulib/import/intprops.h: New file.
5386 * gnulib/import/m4/chdir-long.m4: New file.
5387 * gnulib/import/m4/close.m4: New file.
5388 * gnulib/import/m4/closedir.m4: New file.
5389 * gnulib/import/m4/d-ino.m4: New file.
5390 * gnulib/import/m4/d-type.m4: New file.
5391 * gnulib/import/m4/dup.m4: New file.
5392 * gnulib/import/m4/dup2.m4: New file.
5393 * gnulib/import/m4/error.m4: New file.
5394 * gnulib/import/m4/fchdir.m4: New file.
5395 * gnulib/import/m4/fcntl.m4: New file.
5396 * gnulib/import/m4/fcntl_h.m4: New file.
5397 * gnulib/import/m4/fdopendir.m4: New file.
5398 * gnulib/import/m4/filenamecat.m4: New file.
5399 * gnulib/import/m4/fstat.m4: New file.
5400 * gnulib/import/m4/fstatat.m4: New file.
5401 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5402 * gnulib/import/m4/getcwd-path-max.m4: New file.
5403 * gnulib/import/m4/getcwd.m4: New file.
5404 * gnulib/import/m4/getdtablesize.m4: New file.
5405 * gnulib/import/m4/getlogin_r.m4: New file.
5406 * gnulib/import/m4/getprogname.m4: New file.
5407 * gnulib/import/m4/glob.m4: New file.
5408 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5409 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5410 * gnulib/import/m4/mempcpy.m4: New file.
5411 * gnulib/import/m4/memrchr.m4: New file.
5412 * gnulib/import/m4/mode_t.m4: New file.
5413 * gnulib/import/m4/msvc-inval.m4: New file.
5414 * gnulib/import/m4/msvc-nothrow.m4: New file.
5415 * gnulib/import/m4/open.m4: New file.
5416 * gnulib/import/m4/openat.m4: New file.
5417 * gnulib/import/m4/opendir.m4: New file.
5418 * gnulib/import/m4/readdir.m4: New file.
5419 * gnulib/import/m4/realloc.m4: New file.
5420 * gnulib/import/m4/rewinddir.m4: New file.
5421 * gnulib/import/m4/save-cwd.m4: New file.
5422 * gnulib/import/m4/strdup.m4: New file.
5423 * gnulib/import/m4/strerror.m4: New file.
5424 * gnulib/import/m4/unistd-safer.m4: New file.
5425 * gnulib/import/mempcpy.c: New file.
5426 * gnulib/import/memrchr.c: New file.
5427 * gnulib/import/msvc-inval.c: New file.
5428 * gnulib/import/msvc-inval.h: New file.
5429 * gnulib/import/msvc-nothrow.c: New file.
5430 * gnulib/import/msvc-nothrow.h: New file.
5431 * gnulib/import/open.c: New file.
5432 * gnulib/import/openat-die.c: New file.
5433 * gnulib/import/openat-priv.h: New file.
5434 * gnulib/import/openat-proc.c: New file.
5435 * gnulib/import/openat.c: New file.
5436 * gnulib/import/openat.h: New file.
5437 * gnulib/import/opendir.c: New file.
5438 * gnulib/import/pipe-safer.c: New file.
5439 * gnulib/import/readdir.c: New file.
5440 * gnulib/import/realloc.c: New file.
5441 * gnulib/import/rewinddir.c: New file.
5442 * gnulib/import/save-cwd.c: New file.
5443 * gnulib/import/save-cwd.h: New file.
5444 * gnulib/import/strdup.c: New file.
5445 * gnulib/import/strerror-override.c: New file.
5446 * gnulib/import/strerror-override.h: New file.
5447 * gnulib/import/strerror.c: New file.
5448 * gnulib/import/unistd--.h: New file.
5449 * gnulib/import/unistd-safer.h: New file.
5450 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5451 "getcwd" and "glob".
5452 * ser-tcp.c: Undefine "close" before redefining it.
5453
432ae719
SM
54542017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5455
5456 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5457 get rid of res_val.
5458
4fa7574e
RO
54592017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5460
5461 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5462 <sol2,sparc>: Likewise.
5463 <sol2-64,i386>: Likewise.
5464
5465 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5466 -Wdeprecated-declarations on *-*-solaris*.
5467 * configure: Regenerate.
5468
5469 * procfs.c: Include "nat/inferior.h".
5470 (procfs_info_proc): Fix typo.
5471
f6327dcb
KB
54722017-09-21 Kevin Buettner <kevinb@redhat.com>
5473
5474 * remote.c (vector): Include.
5475 (struct private_thread_info): Add field, thread_handle.
5476 (free_private_thread_info): Deallocate storage associated with
5477 thread handle.
5478 (get_private_info_thread): Initialize `thread_handle' field.
5479 (struct thread_item): Add field, thread_handle.
5480 (clear_threads_listing_context): Deallocate storage associated
5481 with thread handle.
5482 (start_thread): Add support for "handle" attribute.
5483 (thread_attributes): Add "handle".
5484 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5485 field.
5486 (remote_update_thread_list): Update thread_handle.
5487 (remote_thread_handle_to_thread_info): New function.
5488 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5489
fbbe5337
KB
54902017-09-21 Kevin Buettner <kevinb@redhat.com>
5491
5492 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5493 function.
5494 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5495 * python/python-internal.h (thread_object_type): Declare.
5496
e04ee09e
KB
54972017-09-21 Kevin Buettner <kevinb@redhat.com>
5498
5499 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5500 (target_thread_handle_to_thread_info): Declare.
5501 * target.c (target_thread_handle_to_thread_info): New function.
5502 * target-delegates.c: Regenerate.
5503 * gdbthread.h (find_thread_by_handle): Declare.
5504 * thread.c (find_thread_by_handle): New function.
5505 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5506 function.
5507 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5508
1e5b66ed
SM
55092017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5510
5511 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5512
ebe48ba0
SM
55132017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5514
5515 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5516
0a0bf5dc
YQ
55172017-09-21 Yao Qi <yao.qi@linaro.org>
5518
5519 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5520 to gdb_target_obs.
5521
d1b0a7bf
TT
55222017-09-20 Tom Tromey <tom@tromey.com>
5523
5524 * breakpoint.c (struct counted_command_line): Remove.
5525 (breakpoint_commands): Update.
5526 (alloc_counted_command_line, incref_counted_command_line)
5527 (decref_counted_command_line, do_cleanup_counted_command_line)
5528 (make_cleanup_decref_counted_command_line): Remove.
5529 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5530 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5531 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5532 (save_breakpoints): Update.
5533 * breakpoint.h (counted_command_line): Now a typedef to
5534 shared_ptr.
5535 (struct breakpoint) <commands>: Now a counted_command_line.
5536 (struct bpstats) <command>: Likewise.
5537
48649e1b
TT
55382017-09-20 Tom Tromey <tom@tromey.com>
5539
5540 * breakpoint.c (struct commands_info, do_map_commands_command):
5541 Remove.
5542 (commands_command_1): Update.
5543 (iterate_over_related_breakpoints): Take a function_view.
5544 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5545 (delete_command): Update.
5546 (map_breakpoint_numbers): Take a function_view.
5547 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5548 (disable_command): Update.
5549 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5550 (enable_command): Update.
5551 (struct disp_data, do_enable_breakpoint_disp)
5552 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5553 (do_map_enable_delete_breakpoint): Remove.
5554 (enable_once_command, enable_count_command, enable_delete_command)
5555 (delete_trace_variable_command): Update.
5556
04afa70c
TT
55572017-09-20 Tom Tromey <tom@tromey.com>
5558
5559 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5560 (bpstat_clear): Use delete.
5561 (bpstats): New constructors.
5562 (bpstat_copy, bpstat_stop_status): Use new.
5563 (dprintf_after_condition_true): Update.
5564 * breakpoint.h (bpstats::bpstats): Add constructors.
5565 (bpstats::~bpstats): Add destructor.
5566
c83833f4
PA
55672017-09-20 Pedro Alves <palves@redhat.com>
5568
5569 * eval.c (make_params): Delete, refactored as ...
5570 (class fake_method): ... this new type's ctor.
5571 (fake_method::~fake_method): New.
5572 (evaluate_subexp_standard): Use 'fake_method'.
5573
223ffa71
TT
55742017-09-20 Tom Tromey <tom@tromey.com>
5575
5576 * windows-nat.c (get_windows_debug_event, windows_wait)
5577 (do_initial_windows_stuff, windows_attach): Update.
5578 * utils.c (vwarning, internal_vproblem): Update.
5579 (ui_unregister_input_event_handler_cleanup)
5580 (prepare_to_handle_input): Remove.
5581 (class scoped_input_handler): New.
5582 (defaulted_query, prompt_for_continue): Update.
5583 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5584 Update.
5585 * top.c (undo_terminal_modifications_before_exit): Update.
5586 * target/target.h (target_terminal_init, target_terminal_inferior)
5587 (target_terminal_ours): Don't declare.
5588 (class target_terminal): New.
5589 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5590 (target_terminal_ours_for_output)
5591 (make_cleanup_restore_target_terminal): Don't declare.
5592 (target_terminal_info): Remove.
5593 * target.c (enum terminal_state, terminal_state): Remove.
5594 (target_terminal::terminal_state): Define.
5595 (target_terminal::init): Rename from target_terminal_init.
5596 (target_terminal::inferior): Rename from
5597 target_terminal_inferior.
5598 (target_terminal::ours): Rename from target_terminal_ours.
5599 (target_terminal::ours_for_output): Rename from
5600 target_terminal_ours_for_output.
5601 (target_terminal::info): New method.
5602 (cleanup_restore_target_terminal)
5603 (make_cleanup_restore_target_terminal): Remove.
5604 * solib.c (handle_solib_event): Update.
5605 * remote.c (remote_serial_quit_handler): Update.
5606 (remote_terminal_inferior, remote_wait_as): Update.
5607 * record-full.c (record_full_wait_1): Update.
5608 * nto-procfs.c (procfs_create_inferior): Update.
5609 * nat/fork-inferior.c (startup_inferior): Update.
5610 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5611 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5612 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5613 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5614 (mi_breakpoint_created, mi_breakpoint_deleted)
5615 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5616 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5617 (mi_user_selected_context_changed, report_initial_inferior):
5618 Update.
5619 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5620 (linux_nat_terminal_inferior): Update.
5621 * infrun.c (follow_fork_inferior)
5622 (handle_vfork_child_exec_or_exit, do_target_resume)
5623 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5624 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5625 Update.
5626 * inflow.c (child_terminal_init, info_terminal_command): Update.
5627 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5628 (attach_command): Update.
5629 * infcall.c (call_thread_fsm_should_stop): Update.
5630 * gnu-nat.c (gnu_attach): Update.
5631 * extension.c (struct active_ext_lang_state)
5632 (restore_active_ext_lang): Update.
5633 * exceptions.c (print_flush): Update.
5634 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5635 (struct quit_handler_cleanup_data, restore_quit_handler)
5636 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5637 Remove.
5638 * cp-support.c (gdb_demangle): Update.
5639 * breakpoint.c (update_inserted_breakpoint_locations)
5640 (insert_breakpoint_locations, handle_jit_event)
5641 (disable_breakpoints_in_unloaded_shlib): Update.
5642 * annotate.c (annotate_breakpoints_invalid)
5643 (annotate_frames_invalid): Update.
5644
013af3fc
TT
56452017-09-20 Tom Tromey <tom@tromey.com>
5646
5647 * main.c (catch_command_errors): Rename from
5648 catch_command_errors_const.
5649 (captured_main_1): Update.
5650
06871ae8
PA
56512017-09-20 Pedro Alves <palves@redhat.com>
5652
5653 * cli/cli-cmds.c (list_command): Use print_sal_location.
5654 (print_sal_location): New function.
5655 (ambiguous_line_spec): Use print_sal_location.
5656 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5657 * symtab.c (find_function_start_sal): Likewise.
5658 * symtab.h (symtab_and_line::symbol): New field.
5659
e5f25bc5
PA
56602017-09-20 Pedro Alves <palves@redhat.com>
5661
5662 * linespec.c (minsym_found): Handle non-text minsyms.
5663 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5664
1b7fa39e
WT
56652017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5666
5667 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5668 backslash.
5669
37dd0825
WT
56702017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5671
5672 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5673 vmovups instead vmovaps.
5674 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5675
4e5a4f58
JB
56762017-09-19 John Baldwin <jhb@FreeBSD.org>
5677
5678 * NEWS (Changes since GDB 8.0): Add starti.
5679 * infcmd.c (enum run_break): New.
5680 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5681 case.
5682 (run_command): Use enum run_how.
5683 (start_command): Likewise.
5684 (starti_command): New function.
5685 (RUN_ARGS_HELP): New macro.
5686 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5687 commands. Add starti command.
5688
aa70c9f1
YQ
56892017-09-19 Yao Qi <yao.qi@linaro.org>
5690
5691 * Makefile.in (monitor.o): Remove the rule.
5692
d6541620
YQ
56932017-09-19 Yao Qi <yao.qi@linaro.org>
5694
5695 * annotate.h (struct annotate_arg_emitter): Use
5696 DISABLE_COPY_AND_ASSIGN.
5697 * common/refcounted-object.h (refcounted_object): Likewise.
5698 * completer.h (struct completion_result): Likewise.
5699 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5700 * filename-seen-cache.h (filename_seen_cache): Likewise.
5701 * gdbcore.h (thread_section_name): Likewise.
5702 * gdb_regex.h (compiled_regex): Likewise.
5703 * gdbthread.h (scoped_restore_current_thread): Likewise.
5704 * inferior.h (scoped_restore_current_inferior): Likewise.
5705 * jit.c (jit_reader): Likewise.
5706 * linespec.h (struct linespec_result): Likewise.
5707 * mi/mi-parse.h (struct mi_parse): Likewise.
5708 * nat/fork-inferior.c (execv_argv): Likewise.
5709 * progspace.h (scoped_restore_current_program_space): Likewise.
5710 * python/python-internal.h (class gdbpy_enter): Likewise.
5711 * regcache.h (regcache): Likewise.
5712 * target-descriptions.c (struct tdesc_reg): Likewise.
5713 (struct tdesc_type): Likewise.
5714 (struct tdesc_feature): Likewise.
5715 * ui-out.h (ui_out_emit_type): Likewise.
5716
0615127c
SM
57172017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5718
5719 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5720 label abort_expression.
5721
5e187554
SM
57222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5723
5724 * common/buffer.c (buffer_xml_printf): Adjust.
5725 * common/xml-utils.c (xml_escape_text): Change return type to
5726 std::string, update code accordingly.
5727 * common/xml-utils.h (xml_escape_text): Change return type to
5728 std::string.
5729 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5730 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5731 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5732 Adjust.
5733
c3d7b541
SM
57342017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5735
5736 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5737 (SUBDIR_UNITTESTS_OBS): Add new object file.
5738 * unittests/xml-utils-selftests.c: New file.
5739
1526853e
SM
57402017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5741
5742 * common/selftest.h (selftest): New struct/interface.
5743 (register_test): Add name parameter, add new overload.
5744 (run_tests): Add filter parameter.
5745 (for_each_selftest_ftype): New typedef.
5746 (for_each_selftest): New declaration.
5747 * common/selftest.c (tests): Change type to
5748 map<string, unique_ptr<selftest>>.
5749 (simple_selftest): New struct.
5750 (register_test): New function.
5751 (register_test): Add name parameter and use it.
5752 (run_tests): Add filter parameter and use it. Add prints.
5753 Adjust to vector -> map change.
5754 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5755 registering selftests.
5756 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5757 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5758 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5759 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5760 * findvar.c (_initialize_findvar): Likewise.
5761 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5762 * maint.c (maintenance_selftest): Update call to run_tests.
5763 (maintenance_info_selftests): New function.
5764 (_initialize_maint_cmds): Register "maintenance info selftests"
5765 command. Update "maintenance selftest" doc.
5766 * regcache.c (_initialize_regcache): Add names when registering
5767 selftests.
5768 * rust-exp.y (_initialize_rust_exp): Likewise.
5769 * selftest-arch.c (gdbarch_selftest): New struct.
5770 (gdbarch_tests): Remove.
5771 (register_test_foreach_arch): Add name parameter. Call
5772 register_test.
5773 (tests_with_arch): Remove, move most content to
5774 gdbarch_selftest::operator().
5775 (_initialize_selftests_foreach_arch): Remove.
5776 * selftest-arch.h (register_test_foreach_arch): Add name
5777 parameter.
5778 (run_tests_with_arch): New declaration.
5779 * utils-selftests.c (_initialize_utils_selftests): Add names
5780 when registering selftests.
5781 * utils.c (_initialize_utils): Likewise.
5782 * unittests/array-view-selftests.c
5783 (_initialize_array_view_selftests): Likewise.
5784 * unittests/environ-selftests.c (_initialize_environ_selftests):
5785 Likewise.
5786 * unittests/function-view-selftests.c
5787 (_initialize_function_view_selftests): Likewise.
5788 * unittests/offset-type-selftests.c
5789 (_initialize_offset_type_selftests): Likewise.
5790 * unittests/optional-selftests.c
5791 (_initialize_optional_selftests): Likewise.
5792 * unittests/scoped_restore-selftests.c
5793 (_initialize_scoped_restore_selftests): Likewise.
5794 * NEWS: Document "maintenance selftest" and "maint info
5795 selftests".
5796
5846367a
SM
57972017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5798
5799 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5800 scoped_restore.
5801
bd77e8ff
SM
58022017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5803
5804 * mi/mi-main.c (mi_load_progress): Make uiout variable
5805 a unique_ptr.
5806
26a67918
PA
58072017-09-15 Pedro Alves <palves@redhat.com>
5808
5809 * compile/compile-c-types.c (convert_enum, convert_int)
5810 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5811
3f8a7804
SM
58122017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5813
5814 * dwarf2read.c (copy_string): Remove.
5815 (parse_macro_definition): Replace copy_string with savestring.
5816
8d200706
YQ
58172017-09-15 Yao Qi <yao.qi@linaro.org>
5818
5819 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5820 gdb_target_obs.
5821 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5822 Likewise.
5823 (i[34567]86-*-linux*): Likewise.
5824
d185219d
SM
58252017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5826
5827 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5828 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5829 <stack>: Change type to std::vector.
5830 <stack_len, stack_allocated>: Remove.
5831 <grow_stack>: Remove.
5832 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5833 (dwarf_expr_context::~dwarf_expr_context): Remove.
5834 (dwarf_expr_context::grow_stack): Remove.
5835 (dwarf_expr_context::push): Adjust.
5836 (dwarf_expr_context::pop): Adjust.
5837 (dwarf_expr_context::fetch): Adjust.
5838 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5839 (dwarf_expr_context::stack_empty_p): Adjust.
5840 (dwarf_expr_context::execute_stack_op): Adjust.
5841
eccd80d6
SM
58422017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5843
5844 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5845 return type to bool.
5846 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5847
69009882
SM
58482017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5849
5850 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5851 Change type to bool.
5852 (dwarf_stack_value) <in_stack_memory>: Likewise.
5853 (dwarf_expr_context) <push_address>: Change parameter type to
5854 bool.
5855 <fetch_in_stack_memory>: Change return type to bool.
5856 <push>: Change parameter type to bool.
5857 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5858 to bool.
5859 (dwarf_expr_context::push_address): Likewise.
5860 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5861 to bool.
5862 (dwarf_expr_context::execute_stack_op): Adjust.
5863 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5864
1e467161
SM
58652017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5866
5867 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5868 (struct dwarf_expr_context) <n_pieces>: Remove.
5869 <pieces>: Change type to std::vector.
5870 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5871 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5872 pieces.
5873 (dwarf_expr_context::add_piece): Adjust.
5874 * dwarf2loc.c (struct piece_closure): Initialize fields.
5875 <n_pieces>: Remove.
5876 <pieces>: Change type to std::vector.
5877 (allocate_piece_closure): Adjust, change parameter to
5878 std::vector rvalue and std::move it to piece_closure.
5879 (rw_pieced_value): Adjust.
5880 (check_pieced_synthetic_pointer): Adjust.
5881 (indirect_synthetic_pointer): Adjust.
5882 (coerce_pieced_ref): Adjust.
5883 (free_pieced_value_closure): Adjust. Use delete to free
5884 piece_closure.
5885 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5886 to allocate_piece_closure.
5887 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5888
0782db84
SM
58892017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5890
5891 * probe.h (probe_ops_cp): Remove typedef.
5892 (DEF_VEC_P (probe_ops_cp)): Remove.
5893 (all_probe_ops): Change type to std::vector.
5894 * probe.c (info_probes_for_ops): Adjust to vector change.
5895 (probe_linespec_to_ops): Likewise.
5896 (all_probe_ops): Change type to std::vector.
5897 (_initialize_probe): Adjust to vector change.
5898 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5899 * elfread.c (elf_get_probes): Likewise.
5900 * stap-probe.c (_initialize_stap_probe): Likewise.
5901
1eac6bea
SM
59022017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5903
5904 * probe.h (struct bound_probe): Define constructors.
5905 * probe.c (bound_probe_s): Remove typedef.
5906 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5907 (collect_probes): Change return type to std::vector, remove
5908 cleanup.
5909 (compare_probes): Return bool, change parameter type. Change
5910 semantic to "less than".
5911 (gen_ui_out_table_header_info): Change parameter to std::vector
5912 and update.
5913 (exists_probe_with_pops): Likewise.
5914 (info_probes_for_ops): Update to std::vector change.
5915 (enable_probes_command): Likewise.
5916 (disable_probes_command): Likewise.
5917
aaa63a31
SM
59182017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5919
5920 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5921 vec to std::vector.
5922 * probe.c (parse_probes_in_pspace): Update.
5923 (find_probes_in_objfile): Update.
5924 (find_probe_by_pc): Update.
5925 (collect_probes): Update.
5926 (probe_any_get_probes): Update.
5927 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5928 return type to reference to std::vector.
5929 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5930 std::vector and update.
5931 (dtrace_process_dof): Likewise.
5932 (dtrace_get_probes): Likewise.
5933 * elfread.c (elf_get_probes): Change return type to std::vector,
5934 store an std::vector in bfd_data.
5935 (probe_key_free): Update to std::vector.
5936 * stap-probe.c (handle_stap_probe): Change parameter to
5937 std::vector and update.
5938 (stap_get_probes): Likewise.
5939 * symfile-debug.c (debug_sym_get_probes): Change return type to
5940 std::vector and update.
5941
cb85b21b
TT
59422017-09-11 Tom Tromey <tom@tromey.com>
5943
5944 * breakpoint.c (program_breakpoint_here_p): Update.
5945 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5946 from make_show_memory_breakpoints_cleanup. Return a
5947 scoped_restore_tmpl<int>.
5948 (restore_show_memory_breakpoints): Remove.
5949 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5950 * mem-break.c (memory_validate_breakpoint): Update.
5951 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5952 (ia64_memory_remove_breakpoint): Update.
5953 (ia64_breakpoint_from_pc): Update.
5954 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5955 from make_show_memory_breakpoints_cleanup.
5956
8fbc99ef
TT
59572017-09-11 Tom Tromey <tom@tromey.com>
5958
5959 * d-namespace.c (d_lookup_symbol): Use std::string.
5960 (find_symbol_in_baseclass): Likewise.
5961
50feb4bd
TT
59622017-09-11 Tom Tromey <tom@tromey.com>
5963
5964 * ctf.c (ctf_start): Use std::string.
5965
c6dc63a1
TT
59662017-09-11 Tom Tromey <tom@tromey.com>
5967
5968 * ada-lang.c (is_known_support_routine): Update.
5969 (ada_unhandled_exception_name_addr_from_raise): Update.
5970 * guile/scm-frame.c (gdbscm_frame_name): Update.
5971 * python/py-frame.c (frapy_name): Update.
5972 (frapy_function): Update.
5973 * stack.h (find_frame_funname): Update.
5974 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5975 (print_frame): Update.
5976
d6b9b80f
TT
59772017-09-11 Tom Tromey <tom@tromey.com>
5978
5979 * findcmd.c (put_bits): Take a gdb::byte_vector.
5980 (parse_find_args): Return gdb::byte_vector. "args" now const.
5981 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5982 cleanups.
5983 (find_command): Update.
5984
a9921622
TT
59852017-09-11 Tom Tromey <tom@tromey.com>
5986
5987 * cli/cli-script.c (class scoped_restore_hook_in): New.
5988 (clear_hook_in_cleanup): Remove.
5989 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5990 scoped_restore_hook_in.
5991
be0d7abb
TT
59922017-09-11 Tom Tromey <tom@tromey.com>
5993
5994 * cli/cli-script.c (restore_interp): Remove.
5995 (read_command_lines): Use scoped_restore_interp.
5996 * interps.c (scoped_restore_interp::set_temp): Rename from
5997 interp_set_temp.
5998 * interps.h (class scoped_restore_interp): New.
5999 (interp_set_temp): Remove.
6000
00f675ff
TT
60012017-09-11 Tom Tromey <tom@tromey.com>
6002
6003 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6004 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6005 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6006 scoped_restore.
6007 (mi_cmd_break_insert_1): Update.
6008 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6009 scoped_restore.
6010
cb791d59
TT
60112017-09-11 Tom Tromey <tom@tromey.com>
6012
6013 * demangle.c (demangle_command): Update.
6014 * breakpoint.c (disable_command): Update.
6015 (enable_command): Update.
6016 (find_location_by_number): Make "number" const. Use
6017 get_number_trailer.
6018 * cli/cli-utils.c (extract_arg): Return std::string.
6019 * probe.c (parse_probe_linespec): Update. Change types.
6020 (collect_probes): Take string arguments.
6021 (parse_probe_linespec): Likewise.
6022 (info_probes_for_ops): Update.
6023 (enable_probes_command): Update.
6024 (disable_probes_command): Update.
6025 * break-catch-sig.c (catch_signal_split_args): Update.
6026 * mi/mi-parse.c (mi_parse): Update.
6027
2039bd9f
TT
60282017-09-11 Tom Tromey <tom@tromey.com>
6029
6030 * language.h (language_enum): Make argument const.
6031 * language.c (language_enum): Make argument const.
6032
f1735a53
TT
60332017-09-11 Tom Tromey <tom@tromey.com>
6034
6035 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6036 as function.
6037 (skip_to_space): Rename from skip_to_space_const.
6038 * common/common-utils.c (skip_to_space): New function.
6039 (skip_to_space): Rename from skip_to_space_const.
6040 * cli/cli-utils.h (get_number): Rename from get_number_const.
6041 (extract_arg): Rename from extract_arg_const.
6042 * cli/cli-utils.c (get_number): Rename from get_number_const.
6043 (extract_arg): Rename from extract_arg_const.
6044 (number_or_range_parser::get_number): Use ::get_number.
6045 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6046 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6047 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6048 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6049 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6050 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6051 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6052 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6053
7d221d74
TT
60542017-09-11 Tom Tromey <tom@tromey.com>
6055
6056 * python/python.c (do_start_initialization): Use
6057 py-event-types.def to initialize types.
6058 Define all object type structures.
6059 * python/python-internal.h: Don't declare event initialization
6060 functions.
6061 * python/py-threadevent.c (thread_event_object_type): Don't
6062 define.
6063 * python/py-stopevent.c (stop_event_object_type): Don't define.
6064 * python/py-signalevent.c (signal_event_object_type): Don't
6065 declare or define.
6066 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6067 (clear_objfiles_event_object_type): Don't declare or define.
6068 * python/py-infevents.c (inferior_call_pre_event_object_type)
6069 (inferior_call_post_event_object_type)
6070 (register_changed_event_object_type)
6071 (memory_changed_event_object_type): Don't declare or define.
6072 * python/py-inferior.c (new_thread_event_object_type)
6073 (new_inferior_event_object_type)
6074 (inferior_deleted_event_object_type): Don't declare or define.
6075 * python/py-exitedevent.c (exited_event_object_type): Don't
6076 declare or define.
6077 * python/py-evts.c (gdbpy_initialize_py_events): Use
6078 py-all-events.def.
6079 * python/py-events.h (thread_event_object_type): Don't declare.
6080 (events_object): Use py-all-events.def.
6081 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6082 py-event-types.def.
6083 * python/py-event-types.def: New file.
6084 * python/py-continueevent.c (create_continue_event_object): Don't
6085 declare or define.
6086 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6087 declare or define.
6088 * python/py-all-events.def: New file.
6089
35c61a1d
TT
60902017-09-11 Tom Tromey <tom@tromey.com>
6091
6092 * python/py-threadevent.c (create_thread_event_object): Return
6093 gdbpy_ref.
6094 * python/py-stopevent.h (create_stop_event_object)
6095 (create_breakpoint_event_object, create_signal_event_object):
6096 Update.
6097 * python/py-stopevent.c (create_stop_event_object): Return
6098 gdbpy_ref.
6099 (emit_stop_event): Update.
6100 * python/py-signalevent.c (create_signal_event_object): Return
6101 gdbpy_ref.
6102 * python/py-infevents.c (create_inferior_call_event_object):
6103 Update.
6104 * python/py-event.h (create_event_object)
6105 (create_thread_event_object): Update.
6106 * python/py-event.c (create_event_object): Return gdbpy_ref.
6107 * python/py-continueevent.c: Return gdbpy_ref.
6108 * python/py-bpevent.c (create_breakpoint_event_object): Return
6109 gdbpy_ref.
6110
7c96f8c1
TT
61112017-09-11 Tom Tromey <tom@tromey.com>
6112
6113 PR python/15622:
6114 * NEWS: Add entry.
6115 * python/python.c (do_start_initialization): Initialize new event
6116 types.
6117 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6118 (gdbpy_initialize_inferior_deleted_event)
6119 (gdbpy_initialize_new_thread_event): Declare.
6120 * python/py-threadevent.c (create_thread_event_object): Add option
6121 "thread" parameter.
6122 * python/py-inferior.c (new_thread_event_object_type)
6123 (new_inferior_event_object_type)
6124 (inferior_deleted_event_object_type): Declare.
6125 (python_new_inferior, python_inferior_deleted): New functions.
6126 (add_thread_object): Emit new_thread event.
6127 (gdbpy_initialize_inferior): Attach new functions to corresponding
6128 observers.
6129 (new_thread, new_inferior, inferior_deleted): Define new event
6130 types.
6131 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6132 registries.
6133 * python/py-events.h (events_object) <new_inferior,
6134 inferior_deleted, new_thread>: New fields.
6135 * python/py-event.h (create_thread_event_breakpoint): Add optional
6136 "thread" parameter.
6137
72542b8e
AB
61382017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6139
6140 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6141 check current_ui instead.
6142 (internal_vproblem): Likewise.
6143
0d64823e
SM
61442017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6145
6146 * thread.c (print_thread_info_1): Remove unnecessary calls to
6147 uiout->is_mi_like_p.
6148
eb1e02fd
TT
61492017-09-09 Tom Tromey <tom@tromey.com>
6150
6151 * namespace.h (add_using_directive): Update.
6152 * namespace.c (add_using_directive): Change type of excludes to
6153 std::vector.
6154 * dwarf2read.c (read_import_statement): Use std::vector.
6155 (read_namespace): Update.
6156 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6157
0fc21fd8
TT
61582017-09-09 Tom Tromey <tom@tromey.com>
6159
6160 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6161
49663d05
TT
61622017-09-09 Tom Tromey <tom@tromey.com>
6163
6164 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6165
0b868b60
TT
61662017-09-09 Tom Tromey <tom@tromey.com>
6167
6168 * stack.c (func_command): Use gdb::def_vector.
6169
c0470d48
TT
61702017-09-09 Tom Tromey <tom@tromey.com>
6171
6172 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6173 ui_out_emit_list, ui_out_emit_tuple.
6174 (mi_cmd_var_update): Likewise.
6175
ca5909c7
TT
61762017-09-09 Tom Tromey <tom@tromey.com>
6177
6178 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6179 ui_out_redirect_pop.
6180 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6181 ui_out_redirect_pop.
6182 * utils.c (do_ui_out_redirect_pop)
6183 (make_cleanup_ui_out_redirect_pop): Remove.
6184 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6185 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6186 * ui-out.h (ui_out_redirect_pop): New class.
6187
e6a2252a
TT
61882017-09-09 Tom Tromey <tom@tromey.com>
6189
6190 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6191 (list_available_thread_groups, mi_cmd_list_thread_groups)
6192 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6193 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6194 Likewise.
6195
393702cd
TT
61962017-09-09 Tom Tromey <tom@tromey.com>
6197
6198 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6199 ui_out_emit_tuple.
6200
76f9c9cf
TT
62012017-09-09 Tom Tromey <tom@tromey.com>
6202
6203 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6204 * stack.c (print_frame): Use ui_out_emit_tuple.
6205 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6206 (info_spu_mailbox_command, info_spu_dma_command)
6207 (info_spu_proxydma_command): Likewise.
6208 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6209 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6210 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6211 ui_out_emit_tuple.
6212 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6213
dc9fe180
TT
62142017-09-09 Tom Tromey <tom@tromey.com>
6215
6216 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6217 (class ui_out_emit_table): Update comment.
6218 * ui-out.c (do_cleanup_table_end)
6219 (make_cleanup_ui_out_table_begin_end): Remove.
6220 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6221 (info_spu_dma_cmdlist): Likewise.
6222 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6223 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6224 ui_out_emit_table.
6225
f8cc3da6
TT
62262017-09-09 Tom Tromey <tom@tromey.com>
6227
6228 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6229 ui_out_emit_list, gdb::optional.
6230
481695ed
JB
62312017-09-09 John Baldwin <jhb@FreeBSD.org>
6232
6233 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6234 prototype.
6235 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6236 prototype.
6237 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6238 prototype.
6239 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6240 * ada-exp.y: Remove _initialize_ada_exp prototype.
6241 * ada-lang.c: Remove _initialize_ada_language prototype.
6242 * ada-tasks.c: Remove _initialize_tasks prototype.
6243 * addrmap.c: Remove _initialize_addrmap prototype.
6244 * agent.c: Remove _initialize_agent prototype.
6245 * aix-thread.c: Remove _initialize_aix_thread prototype.
6246 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6247 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6248 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6249 prototype.
6250 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6251 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6252 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6253 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6254 prototype.
6255 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6256 prototype.
6257 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6258 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6259 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6260 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6261 prototype.
6262 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6263 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6264 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6265 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6266 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6267 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6268 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6269 prototype.
6270 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6271 prototype.
6272 * annotate.c: Remove _initialize_annotate prototype.
6273 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6274 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6275 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6276 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6277 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6278 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6279 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6280 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6281 prototype.
6282 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6283 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6284 * auto-load.c: Remove _initialize_auto_load prototype.
6285 * auxv.c: Remove _initialize_auxv prototype.
6286 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6287 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6288 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6289 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6290 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6291 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6292 prototype.
6293 * break-catch-throw.c: Remove _initialize_break_catch_throw
6294 prototype.
6295 * breakpoint.c: Remove _initialize_breakpoint prototype.
6296 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6297 * btrace.c: Remove _initialize_btrace prototype.
6298 * charset.c: Remove _initialize_charset prototype.
6299 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6300 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6301 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6302 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6303 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6304 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6305 * coffread.c: Remove _initialize_coffread prototype.
6306 * compile/compile.c: Remove _initialize_compile prototype.
6307 * complaints.c: Remove _initialize_complaints prototype.
6308 * completer.c: Remove _initialize_completer prototype.
6309 * copying.awk: Remove _initialize_copying prototype.
6310 * copying.c: Regenerate.
6311 * core-regset.c: Remove _initialize_core_regset prototype.
6312 * corefile.c: Remove _initialize_core prototype.
6313 * corelow.c: Remove _initialize_corelow prototype.
6314 * cp-abi.c: Remove _initialize_cp_abi prototype.
6315 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6316 * cp-support.c: Remove _initialize_cp_support prototype.
6317 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6318 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6319 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6320 * ctf.c: Remove _initialize_ctf prototype.
6321 * d-lang.c: Remove _initialize_d_language prototype.
6322 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6323 prototype.
6324 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6325 * dbxread.c: Remove _initialize_dbxread prototype.
6326 * dcache.c: Remove _initialize_dcache prototype.
6327 * demangle.c: Remove _initialize_demangler prototype.
6328 * disasm-selftests.c: Remove _initialize_disasm_selftests
6329 prototype.
6330 * disasm.c: Remove _initialize_disasm prototype.
6331 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6332 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6333 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6334 prototype.
6335 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6336 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6337 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6338 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6339 * elfread.c: Remove _initialize_elfread prototype.
6340 * exec.c: Remove _initialize_exec prototype.
6341 * extension.c: Remove _initialize_extension prototype.
6342 * f-lang.c: Remove _initialize_f_language prototype.
6343 * f-valprint.c: Remove _initialize_f_valprint prototype.
6344 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6345 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6346 * filesystem.c: Remove _initialize_filesystem prototype.
6347 * findcmd.c: Remove _initialize_mem_search prototype.
6348 * fork-child.c: Remove _initialize_fork_child prototype.
6349 * frame-base.c: Remove _initialize_frame_base prototype.
6350 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6351 * frame.c: Remove _initialize_frame prototype.
6352 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6353 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6354 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6355 * gcore.c: Remove _initialize_gcore prototype.
6356 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6357 * gdbarch.c: Regenerate.
6358 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6359 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6360 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6361 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6362 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6363 * go-lang.c: Remove _initialize_go_language prototype.
6364 * go32-nat.c: Remove _initialize_go32_nat prototype.
6365 * guile/guile.c: Remove _initialize_guile prototype.
6366 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6367 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6368 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6369 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6370 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6371 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6372 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6373 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6374 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6375 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6376 prototype.
6377 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6378 prototype.
6379 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6380 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6381 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6382 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6383 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6384 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6385 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6386 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6387 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6388 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6389 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6390 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6391 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6392 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6393 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6394 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6395 prototype.
6396 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6397 prototype.
6398 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6399 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6400 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6401 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6402 * infcall.c: Remove _initialize_infcall prototype.
6403 * infcmd.c: Remove _initialize_infcmd prototype.
6404 * inferior.c: Remove _initialize_inferiors prototype.
6405 * inflow.c: Remove _initialize_inflow prototype.
6406 * infrun.c: Remove _initialize_infrun prototype.
6407 * interps.c: Remove _initialize_interpreter prototype.
6408 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6409 * jit.c: Remove _initialize_jit prototype.
6410 * language.c: Remove _initialize_language prototype.
6411 * linux-fork.c: Remove _initialize_linux_fork prototype.
6412 * linux-nat.c: Remove _initialize_linux_nat prototype.
6413 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6414 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6415 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6416 * m2-lang.c: Remove _initialize_m2_language prototype.
6417 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6418 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6419 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6420 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6421 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6422 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6423 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6424 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6425 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6426 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6427 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6428 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6429 * machoread.c: Remove _initialize_machoread prototype.
6430 * macrocmd.c: Remove _initialize_macrocmd prototype.
6431 * macroscope.c: Remove _initialize_macroscope prototype.
6432 * maint.c: Remove _initialize_maint_cmds prototype.
6433 * mdebugread.c: Remove _initialize_mdebugread prototype.
6434 * memattr.c: Remove _initialize_mem prototype.
6435 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6436 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6437 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6438 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6439 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6440 * microblaze-linux-tdep.c: Remove
6441 _initialize_microblaze_linux_tdep prototype.
6442 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6443 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6444 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6445 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6446 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6447 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6448 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6449 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6450 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6451 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6452 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6453 prototype.
6454 * mipsread.c: Remove _initialize_mipsread prototype.
6455 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6456 prototype.
6457 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6458 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6459 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6460 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6461 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6462 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6463 prototype.
6464 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6465 * nto-procfs.c: Remove _initialize_procfs prototype.
6466 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6467 * objc-lang.c: Remove _initialize_objc_language prototype.
6468 * objfiles.c: Remove _initialize_objfiles prototype.
6469 * observer.c: Remove observer_test_first_notification_function,
6470 observer_test_second_notification_function,
6471 observer_test_third_notification_function, and
6472 _initialize_observer prototypes.
6473 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6474 * osabi.c: Remove _initialize_gdb_osabi prototype.
6475 * osdata.c: Remove _initialize_osdata prototype.
6476 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6477 * parse.c: Remove _initialize_parse prototype.
6478 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6479 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6480 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6481 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6482 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6483 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6484 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6485 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6486 * printcmd.c: Remove _initialize_printcmd prototype.
6487 * probe.c: Remove _initialize_probe prototype.
6488 * proc-api.c: Remove _initialize_proc_api prototype.
6489 * proc-events.c: Remove _initialize_proc_events prototype.
6490 * proc-service.c: Remove _initialize_proc_service prototype.
6491 * procfs.c: Remove _initialize_procfs prototype.
6492 * psymtab.c: Remove _initialize_psymtab prototype.
6493 * python/python.c: Remove _initialize_python prototype.
6494 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6495 * record-btrace.c: Remove _initialize_record_btrace prototype.
6496 * record-full.c: Remove _initialize_record_full prototype.
6497 * record.c: Remove _initialize_record prototype.
6498 * regcache.c: Remove _initialize_regcache prototype.
6499 * reggroups.c: Remove _initialize_reggroup prototype.
6500 * remote-notif.c: Remove _initialize_notif prototype.
6501 * remote-sim.c: Remove _initialize_remote_sim prototype.
6502 * remote.c: Remove _initialize_remote prototype.
6503 * reverse.c: Remove _initialize_reverse prototype.
6504 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6505 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6506 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6507 prototype.
6508 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6509 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6510 * rust-exp.y: Remove _initialize_rust_exp prototype.
6511 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6512 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6513 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6514 * score-tdep.c: Remove _initialize_score_tdep prototype.
6515 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6516 prototype.
6517 * ser-go32.c: Remove _initialize_ser_dos prototype.
6518 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6519 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6520 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6521 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6522 * serial.c: Remove _initialize_serial prototype.
6523 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6524 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6525 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6526 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6527 * skip.c: Remove _initialize_step_skip prototype.
6528 * sol-thread.c: Remove _initialize_sol_thread prototype.
6529 * solib-aix.c: Remove _initialize_solib_aix prototype.
6530 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6531 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6532 * solib-frv.c: Remove _initialize_frv_solib prototype.
6533 * solib-spu.c: Remove _initialize_spu_solib prototype.
6534 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6535 * solib-target.c: Remove _initialize_solib_target prototype.
6536 * solib.c: Remove _initialize_solib prototype.
6537 * source.c: Remove _initialize_source prototype.
6538 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6539 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6540 prototype.
6541 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6542 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6543 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6544 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6545 prototype.
6546 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6547 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6548 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6549 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6550 prototype.
6551 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6552 prototype.
6553 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6554 prototype.
6555 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6556 prototype.
6557 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6558 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6559 prototype.
6560 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6561 prototype.
6562 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6563 prototype.
6564 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6565 prototype.
6566 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6567 prototype.
6568 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6569 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6570 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6571 * stabsread.c: Remove _initialize_stabsread prototype.
6572 * stack.c: Remove _initialize_stack prototype.
6573 * stap-probe.c: Remove _initialize_stap_probe prototype.
6574 * std-regs.c: Remove _initialize_frame_reg prototype.
6575 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6576 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6577 * symfile.c: Remove _initialize_symfile prototype.
6578 * symmisc.c: Remove _initialize_symmisc prototype.
6579 * symtab.c: Remove _initialize_symtab prototype.
6580 * target-dcache.c: Remove _initialize_target_dcache prototype.
6581 * target-descriptions.c: Remove _initialize_target_descriptions
6582 prototype.
6583 * thread.c: Remove _initialize_thread prototype.
6584 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6585 prototype.
6586 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6587 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6588 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6589 prototype.
6590 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6591 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6592 * tracefile.c: Remove _initialize_tracefile prototype.
6593 * tracepoint.c: Remove _initialize_tracepoint prototype.
6594 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6595 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6596 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6597 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6598 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6599 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6600 * tui/tui.c: Remove _initialize_tui prototype.
6601 * typeprint.c: Remove _initialize_typeprint prototype.
6602 * user-regs.c: Remove _initialize_user_regs prototype.
6603 * utils.c: Remove _initialize_utils prototype.
6604 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6605 * valarith.c: Remove _initialize_valarith prototype.
6606 * valops.c: Remove _initialize_valops prototype.
6607 * valprint.c: Remove _initialize_valprint prototype.
6608 * value.c: Remove _initialize_values prototype.
6609 * varobj.c: Remove _initialize_varobj prototype.
6610 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6611 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6612 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6613 * windows-nat.c: Remove _initialize_windows_nat,
6614 _initialize_check_for_gdb_ini, and _initialize_loadable
6615 prototypes.
6616 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6617 * xcoffread.c: Remove _initialize_xcoffread prototype.
6618 * xml-support.c: Remove _initialize_xml_support prototype.
6619 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6620 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6621 prototype.
6622 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6623 prototype.
6624 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6625
a611b5cb
KS
66262017-09-08 Keith Seitz <keiths@redhat.com>
6627
6628 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6629 field.
6630
469412dd
CW
66312017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6632
6633 * f-valprint.c (f_val_print): Remove check for one byte
6634 sized integers. Remove printing of character type.
6635
a5ad232b
FP
66362017-09-08 Frank Penczek <frank.penczek@intel.com>
6637 Christoph Weinmann <christoph.t.weinmann@intel.com>
6638 Bernhard Heckel <bernhard.heckel@intel.com>
6639
6640 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6641 to maintain proper indentation when printing pointers/refs.
6642
e5014227
JB
66432017-09-07 Joel Brobecker <brobecker@adacore.com>
6644
6645 GDB 8.0.1 released.
6646
63c99141
JB
66472017-09-07 Joel Brobecker <brobecker@adacore.com>
6648
6649 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6650
69c1e056
TT
66512017-09-05 Tom Tromey <tom@tromey.com>
6652
6653 * parse.c (funcall_chain): Now a std::vector.
6654 (start_arglist, end_arglist): Simplify.
6655 (free_funcalls): Remove.
6656 (parse_exp_in_context_1): Remove cleanup.
6657
fef704bf
TT
66582017-09-05 Tom Tromey <tom@tromey.com>
6659
6660 * go-exp.y (go_parse): Don't create a cleanup.
6661
5613c585
TT
66622017-09-05 Tom Tromey <tom@tromey.com>
6663
6664 * d-exp.y (PrimaryExpression): Use std::string.
6665 (d_parse): Don't create a cleanup.
6666
eae49211
TT
66672017-09-05 Tom Tromey <tom@tromey.com>
6668
6669 * utils.c (do_clear_parser_state): Remove.
6670 (make_cleanup_clear_parser_state): Remove.
6671 * p-exp.y (pascal_parse): Use scoped_restore.
6672 * m2-exp.y (m2_parse): Use scoped_restore.
6673 * f-exp.y (f_parse): Use scoped_restore.
6674 * d-exp.y (d_parse): Use scoped_restore.
6675 * c-exp.y (c_parse): Use scoped_restore.
6676 * ada-exp.y (ada_parse): Use scoped_restore.
6677 * utils.h (make_cleanup_clear_parser_state): Remove.
6678
73b9be8b
KS
66792017-09-06 Keith Seitz <keiths@redhat.com>
6680
6681 * dwarf2read.c (dw2_linkage_name_attr): New function.
6682 (dw2_linkage_name): New function.
6683 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6684 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6685 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6686
a102602b
KR
66872017-09-06 Kamil Rytarowski <n54@gmx.com>
6688
6689 * config/djgpp/djconfig.sh: Correct shell portability issue.
6690
28ad437d
KR
66912017-09-06 Kamil Rytarowski <n54@gmx.com>
6692
6693 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6694
351787dd
JB
66952017-09-06 John Baldwin <jhb@FreeBSD.org>
6696
6697 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6698 * NEWS: Mention new FreeBSD/mips native configuration.
6699 * configure.host: Add aarch64*-*-freebsd*.
6700 * configure.nat: Likewise.
6701 * aarch64-fbsd-nat.c: New file.
6702
c0f84956
JB
67032017-09-06 John Baldwin <jhb@FreeBSD.org>
6704
6705 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6706 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6707 * NEWS: Mention new FreeBSD/aarch64 target.
6708 * configure.tgt: Add aarch64*-*-freebsd*.
6709 * aarch64-fbsd-tdep.c: New file.
6710 * aarch64-fbsd-tdep.h: New file.
6711
7610297a
KR
67122017-09-06 Kamil Rytarowski <n54@gmx.com>
6713
6714 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6715
fbd1b771
JK
67162017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6717
6718 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6719 of TLS symbols.
6720
5ca79eae
PW
67212017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6722
6723 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6724 call.
6725
bf93d7ba
SM
67262017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6727
6728 * infrun.c (follow_exec): Call add_thread after
6729 target_find_description.
6730
1bb7c059
SM
67312017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6732
6733 * infrun.c (handle_inferior_event_1): When exec'ing, read
6734 stop_pc after follow_exec.
6735
fc809827
SM
67362017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6737
6738 * remote.c (process_g_packet): Update error message.
6739
d2fcdd85
YQ
67402017-09-05 Yao Qi <yao.qi@linaro.org>
6741
6742 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6743 targets.
6744
e69570ee
PA
67452017-09-05 Pedro Alves <palves@redhat.com>
6746
6747 * eval.c (eval_call, evaluate_funcall): New functions, factored
6748 out from ...
6749 (evaluate_subexp_standard): ... this.
6750
22916b07
YQ
67512017-09-05 Yao Qi <yao.qi@linaro.org>
6752
6753 * amd64-tdep.c (amd64_target_description): Create target
6754 descriptions.
6755 (_initialize_amd64_tdep): Don't call functions
6756 initialize_tdesc_amd64_*. Add self tests.
6757 * arch/amd64.c (amd64_create_target_description): Add parameter
6758 is_linux. Call set_tdesc_osabi if is_linux is true.
6759 * arch/amd64.h (amd64_create_target_description): Update the
6760 declaration.
6761 * arch/i386.c (i386_create_target_description): Add parameter
6762 is_linux. Call set_tdesc_osabi if is_linux is true.
6763 * arch/i386.h (i386_create_target_description): Update
6764 declaration.
6765 * configure.tgt: Add i386.o to gdb_target_obs.
6766 * features/Makefile (XMLTOC): Remove i386/*.xml.
6767 * features/i386/amd64-avx-avx512.c: Remove.
6768 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6769 * features/i386/amd64-avx-mpx.c: Remove.
6770 * features/i386/amd64-avx.c: Remove.
6771 * features/i386/amd64-mpx.c: Remove.
6772 * features/i386/amd64.c: Remove.
6773 * features/i386/i386-avx-avx512.c: Remove.
6774 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6775 * features/i386/i386-avx-mpx.c: Remove.
6776 * features/i386/i386-avx.c: Remove.
6777 * features/i386/i386-mmx.c: Remove.
6778 * features/i386/i386-mpx.c: Remove.
6779 * features/i386/i386.c: Remove.
6780 * i386-tdep.c: Don't include features/i386/i386*.c., include
6781 target-descriptions.h and arch/i386.h.
6782 (i386_target_description): Create target descriptions.
6783 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6784 functions. Do self tests.
6785
0854b7b1
YQ
67862017-09-05 Yao Qi <yao.qi@linaro.org>
6787
6788 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6789 * features/i386/amd64-avx-avx512-linux.c: Removed.
6790 * features/i386/amd64-avx-linux.c: Removed.
6791 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6792 * features/i386/amd64-avx-mpx-linux.c: Removed.
6793 * features/i386/amd64-linux.c: Removed.
6794 * features/i386/amd64-mpx-linux.c: Removed.
6795 * features/i386/x32-avx-avx512-linux.c: Removed.
6796 * features/i386/x32-avx-linux.c: Removed.
6797 * features/i386/x32-linux.c: Removed.
6798
b4570e4b
YQ
67992017-09-05 Yao Qi <yao.qi@linaro.org>
6800
6801 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6802 features/i386/*.c.
6803 (amd64_linux_read_description): Call
6804 amd64_create_target_description.
6805 * arch/amd64.c: New file.
6806 * arch/amd64.h: New file.
6807 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6808 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6809
6c73f67f
YQ
68102017-09-05 Yao Qi <yao.qi@linaro.org>
6811
6812 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6813 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6814 (amd64_linux_read_description): Create target descriptions.
6815 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6816 functions. Add unit tests.
6817 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6818 x32-core.xml.
6819 * features/i386/64bit-avx.c: Generated.
6820 * features/i386/64bit-avx512.c: Generated.
6821 * features/i386/64bit-core.c: Generated.
6822 * features/i386/64bit-linux.c: Generated.
6823 * features/i386/64bit-mpx.c: Generated.
6824 * features/i386/64bit-pkeys.c: Generated.
6825 * features/i386/64bit-segments.c: Generated.
6826 * features/i386/64bit-sse.c: Generated.
6827 * features/i386/x32-core.c: Generated.
6828 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6829 c files for amd64-linux and x32-linux.
6830
9d3d478b
YQ
68312017-09-05 Yao Qi <yao.qi@linaro.org>
6832
6833 * amd64-linux-tdep.c (amd64_linux_read_description): New
6834 function.
6835 (amd64_linux_core_read_description): Call
6836 amd64_linux_read_description.
6837 (amd64_linux_init_abi): Likewise.
6838 (amd64_x32_linux_init_abi): Likewise.
6839 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6840 * x86-linux-nat.c (x86_linux_read_description): Call
6841 amd64_linux_read_description.
6842
b9f1d50f
YQ
68432017-09-05 Yao Qi <yao.qi@linaro.org>
6844
6845 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6846 comments.
6847
188c9e6d
YQ
68482017-09-05 Yao Qi <yao.qi@linaro.org>
6849
6850 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6851 * features/i386/i386-avx-avx512-linux.c: Remove.
6852 * features/i386/i386-avx-linux.c: Remove.
6853 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6854 * features/i386/i386-avx-mpx-linux.c: Remove.
6855 * features/i386/i386-linux.c: Remove.
6856 * features/i386/i386-mmx-linux.c: Remove.
6857 * features/i386/i386-mpx-linux.c: Remove.
6858
5f035c07
YQ
68592017-09-05 Yao Qi <yao.qi@linaro.org>
6860
6861 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6862 (SFILES): Add arch/i386.c.
6863 (HFILES_NO_SRCDIR): Add arch/i386.h.
6864 * arch/i386.c: New file.
6865 * arch/i386.h: New file.
6866 * arch/tdesc.h (allocate_target_description): Declare.
6867 (set_tdesc_architecture): Declare.
6868 (set_tdesc_osabi): Declare.
6869 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6870 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6871 include arch/i386.h.
6872 (i386_linux_read_description): Remove code and call
6873 i386_create_target_description.
6874 (set_tdesc_architecture): New function.
6875 (set_tdesc_osabi): New function.
6876 * target-descriptions.h (allocate_target_description): Remove.
6877
0abe8a89
YQ
68782017-09-05 Yao Qi <yao.qi@linaro.org>
6879
6880 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6881 * target-descriptions.c (tdesc_create_feature): Likewise, and
6882 adjust code.
6883 * features/i386/32bit-avx.c: Re-generated.
6884 * features/i386/32bit-avx512.c: Re-generated.
6885 * features/i386/32bit-core.c: Re-generated.
6886 * features/i386/32bit-linux.c: Re-generated.
6887 * features/i386/32bit-mpx.c: Re-generated.
6888 * features/i386/32bit-pkeys.c: Re-generated.
6889 * features/i386/32bit-sse.c: Re-generated.
6890
0a188386
YQ
68912017-09-05 Yao Qi <yao.qi@linaro.org>
6892
6893 * regformats/regdef.h (struct reg): Override operator == and !=.
6894
f49ff000
YQ
68952017-09-05 Yao Qi <yao.qi@linaro.org>
6896
6897 * arch/tdesc.h: New file.
6898 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6899 * target-descriptions.c: Update comments.
6900 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6901 declarations.
6902 * features/i386/32bit-avx.c: Re-generated.
6903 * features/i386/32bit-avx512.c: Re-generated.
6904 * features/i386/32bit-core.c: Re-generated.
6905 * features/i386/32bit-linux.c: Re-generated.
6906 * features/i386/32bit-mpx.c: Re-generated.
6907 * features/i386/32bit-pkeys.c: Re-generated.
6908 * features/i386/32bit-sse.c: Re-generated.
6909
f7000548
YQ
69102017-09-05 Yao Qi <yao.qi@linaro.org>
6911
6912 * regformats/regdat.sh: Update generated code.
6913
c9a5e2a5
YQ
69142017-09-05 Yao Qi <yao.qi@linaro.org>
6915
6916 * regformats/regdat.sh: Adjust code order.
6917
d6b687ac
SM
69182017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6919
6920 * expprint.c (dump_subexp_body_standard): Use constant format
6921 string in fprintf_filtered call.
6922
a379bfd0
JB
69232017-09-04 John Baldwin <jhb@FreeBSD.org>
6924
6925 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6926 NetBSD/i386.
6927 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6928
f7efc967
JB
69292017-09-04 John Baldwin <jhb@FreeBSD.org>
6930
6931 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6932
c49fbc6c
JB
69332017-09-04 John Baldwin <jhb@FreeBSD.org>
6934
6935 * bsd-kvm.o: Define _KMEMUSER.
6936 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6937 * configure: Regenerate.
6938
26562e73
JB
69392017-09-04 John Baldwin <jhb@FreeBSD.org>
6940
6941 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6942 * i386-fbsd-nat.c: Likewise.
6943
31cf1487
JB
69442017-09-04 John Baldwin <jhb@FreeBSD.org>
6945
6946 * unittests/array-view-selftests.c: Add include of <array>.
6947
5b9f8a7c
JB
69482017-09-04 John Baldwin <jhb@FreeBSD.org>
6949
6950 * spu-tdep.c (flush_ea_cache): Add missing argument to
6951 call_function_by_hand.
6952
d69cf9b2
PA
69532017-09-04 Pedro Alves <palves@redhat.com>
6954
6955 * NEWS (Safer support for debugging with no debug info): New.
6956
3693fdb3
PA
69572017-09-04 Pedro Alves <palves@redhat.com>
6958
6959 * c-exp.y (function_method, function_method_void): Add current
6960 instance flags to TYPE_INSTANCE.
6961 * dwarf2read.c (check_modifier): New.
6962 (compute_delayed_physnames): Assert that only C++ adds delayed
6963 physnames. Mark fn_fields as const/volatile depending on
6964 physname.
6965 * eval.c (make_params): New type_instance_flags parameter. Use
6966 it as the new type's instance flags.
6967 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6968 flags element and pass it to make_params.
6969 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6970 instance flags element.
6971 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6972 * gdbtypes.h: Include "enum-flags.h".
6973 (type_instance_flags): New enum-flags type.
6974 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6975 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6976 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6977 (follow_type_instance_flags): New function.
6978 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6979 * parser-defs.h (follow_type_instance_flags): Declare.
6980 * valops.c (value_struct_elt_for_reference): const/volatile must
6981 match too.
6982
e68cb8e0
PA
69832017-09-04 Pedro Alves <palves@redhat.com>
6984
6985 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6986 function/method scopes; lookup the nested name as a function local
6987 static variable.
6988
858be34c
PA
69892017-09-04 Pedro Alves <palves@redhat.com>
6990
6991 (%type <voidval>): Add function_method.
6992 * c-exp.y (exp): New production for calls with no arguments.
6993 (function_method, function_method_void_or_typelist): New
6994 productions.
6995 (exp): New production for "method()::static_var".
6996 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6997 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6998 Handle OP_FUNC_STATIC_VAR.
6999 * parse.c (operator_length_standard):
7000 Handle OP_FUNC_STATIC_VAR.
7001
dd5901a6
PA
70022017-09-04 Pedro Alves <palves@redhat.com>
7003
7004 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7005 handling.
7006 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7007 Ditto.
7008 * parse.c (operator_length_standard, operator_check_standard):
7009 Ditto.
7010 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7011
46a4882b
PA
70122017-09-04 Pedro Alves <palves@redhat.com>
7013
7014 * ax-gdb.c: Include "typeprint.h".
7015 (gen_expr_for_cast): New function.
7016 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7017 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7018 type is unknown.
7019 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7020 nodebug_data_symbol.
7021 * eval.c: Include "typeprint.h".
7022 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7023 Error out if symbol has unknown type.
7024 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7025 evaluate_subexp_for_cast.
7026 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7027 OP_VAR_MSYM_VALUE.
7028 (evaluate_subexp_for_cast): New function.
7029 * gdbtypes.c (init_nodebug_var_type): New function.
7030 (objfile_type): Use it to initialize types of variables with no
7031 debug info.
7032 * typeprint.c (error_unknown_type): New.
7033 * typeprint.h (error_unknown_type): New declaration.
7034 * compile/compile-c-types.c (convert_type_basic): Handle
7035 TYPE_CODE_ERROR; warn and fallback to int for variables with
7036 unknown type.
7037
fe13dfec
PA
70382017-09-04 Pedro Alves <palves@redhat.com>
7039
7040 * eval.c (evaluate_var_value): New function, factored out from ...
7041 (evaluate_subexp_standard): ... here.
7042
d008ee21
PA
70432017-09-04 Pedro Alves <palves@redhat.com>
7044
7045 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7046 Remove useless assignments to 'op'.
7047
827d0c51
PA
70482017-09-04 Pedro Alves <palves@redhat.com>
7049
7050 * eval.c (eval_skip_value): New function.
7051 (evaluate_subexp_standard): Use it.
7052
2c5a2be1
PA
70532017-09-04 Pedro Alves <palves@redhat.com>
7054
7055 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7056 function name from symbol/minsym and pass it to
7057 error_call_unknown_return_type.
7058
74ea4be4
PA
70592017-09-04 Pedro Alves <palves@redhat.com>
7060
7061 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7062 * ax-gdb.c (gen_msym_var_ref): New function.
7063 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7064 * eval.c (evaluate_var_msym_value): New function.
7065 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7066 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7067 to call_function_by_hand.
7068 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7069 Handle OP_VAR_MSYM_VALUE.
7070 (union exp_element) <msymbol>: New field.
7071 * minsyms.h (struct type): Forward declare.
7072 (find_minsym_type_and_address): Declare.
7073 * parse.c (write_exp_elt_msym): New function.
7074 (write_exp_msymbol): Delete, refactored as ...
7075 (find_minsym_type_and_address): ... this new function.
7076 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7077 (operator_length_standard, operator_check_standard): Handle
7078 OP_VAR_MSYM_VALUE.
7079 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7080
7022349d
PA
70812017-09-04 Pedro Alves <palves@redhat.com>
7082
7083 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7084 TYPE_GNU_IFUNC specially here. Throw error if return type is
7085 unknown.
7086 * ada-typeprint.c (print_func_type): Handle functions with unknown
7087 return type.
7088 * c-typeprint.c (c_type_print_base): Handle functions and methods
7089 with unknown return type.
7090 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7091 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7092 * compile/compile-c-types.c: Include "objfiles.h".
7093 (convert_func): For functions with unknown return type, warn and
7094 default to int.
7095 * compile/compile-object-run.c (compile_object_run): Adjust call
7096 to call_function_by_hand_dummy.
7097 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7098 call_function_by_hand.
7099 * eval.c (evaluate_subexp_standard): Adjust calls to
7100 call_function_by_hand. Handle functions and methods with unknown
7101 return type. Pass expect_type to call_function_by_hand.
7102 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7103 return type.
7104 * gcore.c (call_target_sbrk): Adjust call to
7105 call_function_by_hand.
7106 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7107 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7108 an integer address type instead of nodebug.
7109 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7110 call_function_by_hand.
7111 * infcall.c (error_call_unknown_return_type): New function.
7112 (call_function_by_hand): New "default_return_type" parameter.
7113 Pass it down.
7114 (call_function_by_hand_dummy): New "default_return_type"
7115 parameter. Use it instead of defaulting to int. If there's no
7116 default and the return type is unknown, throw an error. If
7117 there's a default return type, and the called function has no
7118 debug info, then assume the function is prototyped.
7119 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7120 New "default_return_type" parameter.
7121 (error_call_unknown_return_type): New declaration.
7122 * linux-fork.c (call_lseek): Cast return type of lseek.
7123 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7124 call_function_by_hand.
7125 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7126 calls to call_function_by_hand.
7127 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7128 return type.
7129 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7130 (value_nsstring, print_object_command): Adjust calls to
7131 call_function_by_hand.
7132 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7133 functions with unknown return type.
7134 (pascal_type_print_func_varspec_suffix): New function.
7135 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7136 TYPE_CODE_METHOD>: Use it.
7137 * python/py-value.c (valpy_call): Adjust call to
7138 call_function_by_hand.
7139 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7140 call_function_by_hand.
7141 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7142 call_function_by_hand.
7143 * valops.c (value_allocate_space_in_inferior): Adjust call to
7144 call_function_by_hand.
7145 * typeprint.c (type_print_unknown_return_type): New function.
7146 * typeprint.h (type_print_unknown_return_type): New declaration.
7147
54990598
PA
71482017-09-04 Pedro Alves <palves@redhat.com>
7149
7150 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7151 types with more than one parameter as prototyped.
7152
9a24775b
PA
71532017-09-04 Pedro Alves <palves@redhat.com>
7154
7155 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7156 (disassemble_command): Use gdb_disassembly_flags instead of bare
7157 int.
7158 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7159 (dump_insns, do_mixed_source_and_assembly_deprecated)
7160 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7161 Use gdb_disassembly_flags instead of bare int.
7162 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7163 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7164 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7165 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7166 (enum gdb_disassembly_flag): ... values of this new enumeration.
7167 (gdb_disassembly_flags): Define.
7168 (gdb_disassembly)
7169 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7170 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7171 gdb_disassembly_flags instead of bare int.
7172 * record-btrace.c (btrace_insn_history)
7173 (record_btrace_insn_history, record_btrace_insn_history_range)
7174 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7175 instead of bare int.
7176 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7177 Use gdb_disassembly_flags instead of bare int.
7178 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7179 Define.
7180 * target-delegates.c: Regenerate.
7181 * target.c (target_insn_history, target_insn_history_from)
7182 (target_insn_history_range): Use gdb_disassembly_flags instead of
7183 bare int.
7184 * target.h: Include "disasm.h".
7185 (struct target_ops) <to_insn_history, to_insn_history_from,
7186 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7187 int.
7188 (target_insn_history, target_insn_history_from)
7189 (target_insn_history_range): Use gdb_disassembly_flags instead of
7190 bare int.
7191
80a65e9b
SM
71922017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7193
7194 * cli/cli-script.c (build_command_line): For if/while commands,
7195 check whether args is empty.
7196
6b66338c
SM
71972017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7198
7199 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7200 (enum command_control_type): Likewise.
7201 (struct command_line): Likewise.
7202 (free_command_lines): Likewise.
7203 (struct command_lines_deleter): Likewise.
7204 (command_line_up): Likewise.
7205 (read_command_lines): Likewise.
7206 (read_command_lines_1): Likewise.
7207 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7208 (enum command_control_type): Likewise.
7209 (struct command_line): Likewise.
7210 (free_command_lines): Likewise.
7211 (struct command_lines_deleter): Likewise.
7212 (command_line_up): Likewise.
7213 (read_command_lines): Likewise.
7214 (read_command_lines_1): Likewise.
7215 * breakpoint.h: Include cli/cli-script.h.
7216 * extension-priv.h: Likewise.
7217 * gdbcmd.h: Likewise.
7218
51abb421
PA
72192017-09-04 Pedro Alves <palves@redhat.com>
7220
7221 * ada-lang.c (is_known_support_routine): Move sal declaration to
7222 where it is initialized.
7223 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7224 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7225 (clear_command, update_static_tracepoint): Remove init_sal
7226 references. Move declarations closer to initializations.
7227 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7228 initializations.
7229 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7230 references. Move sal declarations closer to initializations.
7231 * frame.c (find_frame_sal): Return a symtab_and_line via function
7232 return instead of output parameter. Remove init_sal references.
7233 * frame.h (find_frame_sal): Return a symtab_and_line via function
7234 return instead of output parameter.
7235 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7236 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7237 instead of memset.
7238 (gdbscm_find_pc_line): Remove init_sal reference.
7239 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7240 references. Move declarations closer to initializations.
7241 * infcmd.c (set_step_frame): Update. Move declarations closer to
7242 initializations.
7243 (finish_backward): Remove init_sal references. Move declarations
7244 closer to initializations.
7245 * infrun.c (process_event_stop_test, handle_step_into_function)
7246 (insert_hp_step_resume_breakpoint_at_frame)
7247 (insert_step_resume_breakpoint_at_caller): Likewise.
7248 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7249 (symbol_to_sal): Likewise.
7250 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7251 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7252 to its initialization.
7253 * reverse.c (save_bookmark_command): Use new/delete. Remove
7254 init_sal references. Move declarations closer to initializations.
7255 * source.c (get_current_source_symtab_and_line): Remove brace
7256 initialization.
7257 (set_current_source_symtab_and_line): Now takes the sal by const
7258 reference. Remove brace initialization.
7259 (line_info): Remove init_sal reference.
7260 * source.h (set_current_source_symtab_and_line): Now takes a
7261 symtab_and_line via const reference.
7262 * stack.c (set_current_sal_from_frame): Adjust.
7263 (print_frame_info): Adjust.
7264 (get_last_displayed_sal): Return the sal via function return
7265 instead of via output parameter. Simplify.
7266 (frame_info): Adjust.
7267 * stack.h (get_last_displayed_sal): Return the sal via function
7268 return instead of via output parameter.
7269 * symtab.c (init_sal): Delete.
7270 (find_pc_sect_line): Remove init_sal references. Move
7271 declarations closer to initializations.
7272 (find_function_start_sal): Remove init_sal references. Move
7273 declarations closer to initializations.
7274 * symtab.h (struct symtab_and_line): In-class initialize all
7275 fields.
7276 * tracepoint.c (set_traceframe_context)
7277 (print_one_static_tracepoint_marker): Remove init_sal references.
7278 Move declarations closer to initializations.
7279 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7280 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7281 declarations closer to initializations.
7282 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7283 init_sal references. Adjust.
7284
6c5b2ebe
PA
72852017-09-04 Pedro Alves <palves@redhat.com>
7286
7287 * ax-gdb.c (agent_command_1): Use range-for.
7288 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7289 * breakpoint.c: Include "common/array-view.h".
7290 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7291 parameter from struct symtabs_and_lines to
7292 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7293 (breakpoint_sals_to_pc): Change sals parameter from struct
7294 symtabs_and_lines to std::vector reference.
7295 (check_fast_tracepoint_sals): Change sals parameter from struct
7296 symtabs_and_lines to std::array_view. Use range-for.
7297 (decode_static_tracepoint_spec): Return a std::vector instead of
7298 symtabs_and_lines. Update.
7299 (create_breakpoint): Update.
7300 (break_range_command, until_break_command, clear_command): Update.
7301 (base_breakpoint_decode_location, bkpt_decode_location)
7302 (bkpt_probe_create_sals_from_location)
7303 (bkpt_probe_decode_location, tracepoint_decode_location)
7304 (tracepoint_probe_decode_location)
7305 (strace_marker_create_sals_from_location): Return a std::vector
7306 instead of symtabs_and_lines.
7307 (strace_marker_create_breakpoints_sal): Update.
7308 (strace_marker_decode_location): Return a std::vector instead of
7309 symtabs_and_lines. Update.
7310 (update_breakpoint_locations): Change struct symtabs_and_lines
7311 parameters to gdb::array_view. Adjust.
7312 (location_to_sals): Return a std::vector instead of
7313 symtabs_and_lines. Update.
7314 (breakpoint_re_set_default): Use std::vector instead of struct
7315 symtabs_and_lines.
7316 (decode_location_default): Return a std::vector instead of
7317 symtabs_and_lines. Update.
7318 * breakpoint.h: Include "common/array-view.h".
7319 (struct breakpoint_ops) <decode_location>: Now returns a
7320 std::vector instead of returning a symtabs_and_lines via output
7321 parameter.
7322 (update_breakpoint_locations): Change sals parameters to use
7323 gdb::array_view.
7324 * cli/cli-cmds.c (edit_command, list_command): Update to use
7325 std::vector and gdb::array_view.
7326 (ambiguous_line_spec): Adjust to use gdb::array_view and
7327 range-for.
7328 (compare_symtabs): Rename to ...
7329 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7330 const reference and adjust.
7331 (filter_sals): Rewrite using std::vector and standard algorithms.
7332 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7333 (jump_command): Update to use std::vector.
7334 * linespec.c (struct linespec_state) <canonical_names>: Update
7335 comment.
7336 (add_sal_to_sals_basic): Delete.
7337 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7338 (decode_line_2, create_sals_line_offset)
7339 (convert_address_location_to_sals, convert_linespec_to_sals)
7340 (convert_explicit_location_to_sals, parse_linespec)
7341 (event_location_to_sals, decode_line_full, decode_line_1)
7342 (decode_line_with_current_source)
7343 (decode_line_with_last_displayed, decode_objc)
7344 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7345 (linespec_result::~linespec_result): Adjust to use std::vector
7346 instead of symtabs_and_lines.
7347 * linespec.h (linespec_sals::sals): Now a std::vector.
7348 (struct linespec_result): Use std::vector, bool, and in-class
7349 initialization.
7350 (decode_line_1, decode_line_with_current_source)
7351 (decode_line_with_last_displayed): Return std::vector.
7352 * macrocmd.c (info_macros_command): Use std::vector.
7353 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7354 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7355 std::vector.
7356 * probe.h (parse_probes): Return a std::vector.
7357 * python/python.c (gdbpy_decode_line): Use std::vector and
7358 gdb::array_view.
7359 * source.c (select_source_symtab, line_info): Use std::vector.
7360 * stack.c (func_command): Use std::vector.
7361 * symtab.h (struct symtabs_and_lines): Delete.
7362 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7363
7c44b49c
PA
73642017-09-04 Pedro Alves <palves@redhat.com>
7365
7366 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7367 unittests/array-view-selftests.c.
7368 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7369 * common/array-view.h: New file.
7370 * unittests/array-view-selftests.c: New file.
7371
e439fa14
PA
73722017-09-04 Pedro Alves <palves@redhat.com>
7373
7374 * cli/cli-cmds.c (edit_command): Pass message to
7375 ambiguous_line_spec.
7376 (list_command): Pass message to ambiguous_line_spec. Say
7377 "first"/"last" instead of "start" and "end" to be consistent with
7378 the manual.
7379 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7380 them to print formatted message.
7381
7525b645
PA
73822017-09-04 Pedro Alves <palves@redhat.com>
7383
7384 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7385 ftrace_update_insns by reference instead of pointer.
7386
badc0020
YQ
73872017-09-04 Yao Qi <yao.qi@linaro.org>
7388
7389 * i386-go32-tdep.c: Include x86-xstate.h.
7390 (i386_go32_init_abi): Call i386_target_description.
7391 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7392 if xcr0 is X86_XSTATE_X87_MASK.
7393 * i386-tdep.h (tdesc_i386): Remove the declaration.
7394 (tdesc_i386_mmx): Likewise.
7395
d78bdb54
YQ
73962017-09-04 Yao Qi <yao.qi@linaro.org>
7397
7398 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7399 X86_XSTATE_SSE_MASK instead of 0.
7400
ca1fa5ee
YQ
74012017-09-04 Yao Qi <yao.qi@linaro.org>
7402
7403 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7404 i386_target_description.
7405 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7406 i386_target_description.
7407 * i386-tdep.c (i386_gdbarch_init): Likewise.
7408
2434b019
YQ
74092017-09-04 Yao Qi <yao.qi@linaro.org>
7410
7411 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7412 (x86_darwin_init_abi_64): Call amd64_target_description.
7413 * amd64-dicos-tdep.c: Likewise.
7414 * amd64-fbsd-nat.c: Likewise.
7415 * amd64-fbsd-tdep.c: Likewise.
7416 * amd64-nbsd-tdep.c: Likewise.
7417 * amd64-obsd-tdep.c: Likewise.
7418 * amd64-sol2-tdep.c: Likewise.
7419 * amd64-windows-tdep.c: Likewise.
7420 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7421
0860c437
SM
74222017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7423
7424 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7425 (btrace_function) <insn>: Change type to use std::vector.
7426 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7427 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7428 ftrace_update_insns, ftrace_compute_global_level_offset,
7429 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7430 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7431 change to std::vector.
7432 (ftrace_update_insns): Adjust to change to std::vector, change
7433 type of INSN parameter.
7434 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7435 * record-btrace.c (btrace_call_history_insn_range,
7436 btrace_compute_src_line_range,
7437 record_btrace_frame_prev_register): Adjust to change to
7438 std::vector.
7439 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7440 to change to std::vector.
7441
0638b7f9
TT
74422017-09-03 Tom Tromey <tom@tromey.com>
7443
7444 * corefile.c (reopen_exec_file): Use std::string.
7445
8f84fb0e
TT
74462017-09-03 Tom Tromey <tom@tromey.com>
7447
7448 * compile/compile.c (compile_register_name_mangled): Return
7449 std::string.
7450 * compile/compile-loc2c.c (pushf_register_address): Update.
7451 (pushf_register): Update.
7452 * compile/compile-c-types.c (convert_array): Update.
7453 * compile/compile-c-symbols.c (generate_vla_size): Update.
7454 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7455 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7456 (convert_one_symbol): Update.
7457 (generate_c_for_for_one_variable): Update.
7458 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7459 std::string.
7460 (generate_register_struct): Update.
7461 * compile/compile-internal.h (c_get_range_decl_name): Return a
7462 std::string.
7463 (compile_register_name_mangled): Return std::string.
7464
18e9961f
TT
74652017-09-03 Tom Tromey <tom@tromey.com>
7466
7467 * utils.c (perror_string): Return a std::string.
7468 (throw_perror_with_name, perror_warning_with_name): Update.
7469
45343786
TT
74702017-09-03 Tom Tromey <tom@tromey.com>
7471
7472 * demangle.c (demangle_command): Use std::string,
7473 unique_xmalloc_ptr.
7474
b57af503
TT
74752017-09-03 Tom Tromey <tom@tromey.com>
7476
7477 * cli/cli-setshow.c (do_set_command): Use std::string.
7478
6eecf35f
TT
74792017-09-03 Tom Tromey <tom@tromey.com>
7480
7481 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7482
56496dd4
TT
74832017-09-03 Tom Tromey <tom@tromey.com>
7484
7485 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7486
e91a1fa7
TT
74872017-09-03 Tom Tromey <tom@tromey.com>
7488
7489 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7490 gdb::unique_xmalloc_ptr.
7491
7ffd83d7
TT
74922017-09-03 Tom Tromey <tom@tromey.com>
7493
7494 * thread.c (print_thread_info_1): Use string_printf.
7495 (thread_apply_command, thread_apply_all_command): Use
7496 std::string.
7497
1ccbe998
TT
74982017-09-03 Tom Tromey <tom@tromey.com>
7499
7500 * valprint.c (val_print_string): Update.
7501 * gdbcore.h (memory_error_message): Return std::string.
7502 * corefile.c (memory_error_message): Return std::string.
7503 (memory_error): Update.
7504 * breakpoint.c (insert_bp_location): Update.
7505
23fdd69e
SM
75062017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7507
7508 * target/waitstatus.h (target_waitstatus_to_string): Change
7509 return type to std::string.
7510 * target/waitstatus.c (target_waitstatus_to_string): Return
7511 std::string.
7512 * target.h (target_waitstatus_to_string): Remove declaration.
7513 * infrun.c (resume, clear_proceed_status_thread,
7514 print_target_wait_results, do_target_wait, save_waitstatus,
7515 stop_all_threads): Adjust.
7516 * record-btrace.c (record_btrace_wait): Adjust.
7517 * target-debug.h
7518 (target_debug_print_struct_target_waitstatus_p): Adjust.
7519
5c811d30
JK
75202017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7521
7522 PR gdb/22046
7523 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7524 detection.
7525
0a2dde4a
SDJ
75262017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7527
7528 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7529 for setting/unsetting environment variables on the remote target.
7530 (New remote packets): Add entries for QEnvironmentHexEncoded,
7531 QEnvironmentUnset and QEnvironmentReset.
7532 * common/environ.c (gdb_environ::operator=): Extend method to
7533 handle m_user_set_env_list and m_user_unset_env_list.
7534 (gdb_environ::clear): Likewise.
7535 (match_var_in_string): Change type of first parameter from 'char
7536 *' to 'const char *'.
7537 (gdb_environ::set): Extend method to handle
7538 m_user_set_env_list and m_user_unset_env_list.
7539 (gdb_environ::unset): Likewise.
7540 (gdb_environ::clear_user_set_env): New method.
7541 (gdb_environ::user_set_envp): Likewise.
7542 (gdb_environ::user_unset_envp): Likewise.
7543 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7544 m_user_unset_env_list on move constructor/assignment.
7545 (unset): Add new default parameter 'update_unset_list = true'.
7546 (clear_user_set_env): New method.
7547 (user_set_envp): Likewise.
7548 (user_unset_envp): Likewise.
7549 (m_user_set_env_list): New std::set.
7550 (m_user_unset_env_list): Likewise.
7551 * common/rsp-low.c (hex2str): New function.
7552 (bin2hex): New overload for bin2hex function.
7553 * common/rsp-low.c (hex2str): New prototype.
7554 (str2hex): New overload prototype.
7555 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7556 QEnvironmentUnset and QEnvironmentReset.
7557 (remote_protocol_features): Add QEnvironmentHexEncoded,
7558 QEnvironmentUnset and QEnvironmentReset packets.
7559 (send_environment_packet): New function.
7560 (extended_remote_environment_support): Likewise.
7561 (extended_remote_create_inferior): Call
7562 extended_remote_environment_support.
7563 (_initialize_remote): Add QEnvironmentHexEncoded,
7564 QEnvironmentUnset and QEnvironmentReset packet configs.
7565 * unittests/environ-selftests.c (gdb_selftest_env_var):
7566 New variable.
7567 (test_vector_initialization): New function.
7568 (test_init_from_host_environ): Likewise.
7569 (test_reinit_from_host_environ): Likewise.
7570 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7571 Likewise.
7572 (test_unset_set_empty_vector): Likewise.
7573 (test_vector_clear): Likewise.
7574 (test_std_move): Likewise.
7575 (test_move_constructor):
7576 (test_self_move): Likewise.
7577 (test_set_unset_reset): Likewise.
7578 (run_tests): Rewrite in terms of the functions above.
7579
654670a4
WP
75802017-08-31 Weimin Pan <weimin.pan@oracle.com>
7581
7582 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7583 (adi_available): Use a temp variable of type CORE_ADDR as argument
7584 3 when calling target_auxv_search.
7585 (adi_normalize_address): Use masks and xor operators to calculate
7586 normalized address.
7587 (adi_read_versions, adi_write_versions, adi_print_versions)
7588 (do_examine, do_assign): Use paddress.
7589
7755ddb7
JB
75902017-08-29 John Baldwin <jhb@FreeBSD.org>
7591
7592 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7593 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7594 out of loop and add supply of FIR.
7595 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7596 add collect of FIR.
7597
fd437cbc
SM
75982017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7599
3804a343 7600 PR gdb/21827
fd437cbc
SM
7601 * cli/cli-script.c (define_command): Don't convert command name
7602 to lower case.
7603
988f6b3d
JB
76042017-08-25 Joel Brobecker <brobecker@adacore.com>
7605
7606 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7607 Update all callers accordingly. Remove all code blocks handling
7608 the case where DISPP is not NULL.
7609
663c44ac
JK
76102017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7611
7612 PR symtab/22003
7613 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7614 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7615 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7616
f1902523
JK
76172017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7618
7619 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7620 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7621 (read_comp_units_from_section): New parameter abbrev_section, use
7622 read_and_check_comp_unit_head, allocate signatured_type if needed.
7623 (create_all_comp_units): Update read_comp_units_from_section caller.
7624
87215ad1
SDJ
76252017-08-23 Pedro Alves <palves@redhat.com>
7626
7627 PR remote/21852
7628 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7629 to null_ptid and switch to thread without reading the registers
7630 after adding the inferior.
7631
6e41ddec
JK
76322017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7633
7634 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7635 compile-gcc.
7636 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7637 (compile_to_object): Implement compile_gcc.
7638 (_initialize_compile): Install "set compile-gcc". Initialize
7639 compile_gcc.
7640
e68c32d5
JK
76412017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7642
7643 * compile/compile.c (compile_to_object): Conditionally call
7644 set_verbose. Conditionally call compile or compile_v0.
7645
58afddc6
WP
76462017-08-07 Weimin Pan <weimin.pan@oracle.com>
7647
7648 * sparc64-tdep.h: (adi_normalize_address): New export.
7649 * sparc-nat.h: (open_adi_tag_fd): New export.
7650 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7651 * sparc64-linux-tdep.c:
7652 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7653 (sparc64_linux_handle_segmentation_fault): New function.
7654 (sparc64_linux_init_abi): Register
7655 sparc64_linux_handle_segmentation_fault
7656 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7657 (sparc64_addr_bits_remove): New function.
7658 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7659 (MAX_PROC_NAME_SIZE): New macro.
7660 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7661 (sparc64adilist): New variable.
7662 (adi_proc_list): New variable.
7663 (find_adi_info): New function.
7664 (add_adi_info): New function.
7665 (get_adi_info_proc): New function.
7666 (get_adi_info): New function.
7667 (info_adi_command): New function.
7668 (read_maps_entry): New function.
7669 (adi_available): New function.
7670 (adi_normalize_address): New function.
7671 (adi_align_address): New function.
7672 (adi_convert_byte_count): New function.
7673 (adi_tag_fd): New function.
7674 (adi_is_addr_mapped): New function.
7675 (adi_read_versions): New function.
7676 (adi_write_versions): New function.
7677 (adi_print_versions): New function.
7678 (do_examine): New function.
7679 (do_assign): New function.
7680 (adi_examine_command): New function.
7681 (adi_assign_command): New function.
7682 (_initialize_sparc64_adi_tdep): New function.
7683
11db9430
SM
76842017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7685
7686 * breakpoint.c (breakpoints_info): Rename to ...
7687 (info_breakpoints_command): ... this.
7688 (watchpoints_info): Rename to ...
7689 (info_watchpoints_command): ... this.
7690 (tracepoints_info): Rename to ...
7691 (info_tracepoints_command): ... this.
7692 (_initialize_breakpoint): Adjust.
7693 * dcache.c (dcache_info): Rename to ...
7694 (info_display_command): ... this.
7695 (_initialize_dcache): Adjust.
7696 * frame.h (args_info): Rename to ...
7697 (info_args_command): ... this.
7698 (locals_info): Rename to ...
7699 (info_locals_command): ... this.
7700 * infcmd.c (nofp_registers_info): Rename to ...
7701 (info_registers_command): ... this.
7702 (float_info): Rename to ...
7703 (info_float_command): ... this.
7704 (program_info): Rename to ...
7705 (info_program_command): ... this.
7706 (all_registers_info): Rename to ...
7707 (info_all_registers_command): ... this.
7708 (vector_info): Rename to ...
7709 (info_vector_command): ... this.
7710 (float_info): Rename to ...
7711 (info_float_command): ... this.
7712 (_initialize_infcmd): Adjust.
7713 * inferior.h (term_info): Rename to ...
7714 (info_terminal_command): ... this.
7715 * inflow.c (term_info): Rename to ...
7716 (info_terminal_command): ... this.
7717 (_initialize_inflow): Adjust.
7718 * infrun.c (signals_info): Rename to ...
7719 (info_signals_command): ... this.
7720 (_initialize_infrun): Adjust.
7721 * objc-lang.c (classes_info): Rename to ...
7722 (info_classes_command): ... this.
7723 (selectors_info): Rename to ...
7724 (info_selectors_command): ... this.
7725 (_initialize_objc_language): Adjust.
7726 * printcmd.c (sym_info): Rename to ...
7727 (info_symbol_command): ... this.
7728 (address_info): Rename to ...
7729 (info_address_command): ... this.
7730 (display_info): Rename to ...
7731 (info_display_command): ... this.
7732 (_initialize_printcmd): Adjust.
7733 * reverse.c (bookmarks_info): Rename to ...
7734 (info_breakpoints_command): ... this.
7735 (_initialize_reverse): Adjust.
7736 * ser-go32.c (dos_info): Rename to ...
7737 (info_serial_command): ... this.
7738 (_initialize_ser_dos): Adjust.
7739 * skip.c (skip_info): Rename to ...
7740 (info_skip_command): ... this.
7741 (_initialize_step_skip): Adjust.
7742 * source.c (line_info): Rename to ...
7743 (info_line_command): ... this.
7744 (source_info): Rename to ...
7745 (info_source_command)
7746 * stack.c (frame_info): Rename to ...
7747 (info_frame_command): ... this.
7748 (locals_info): Rename to ...
7749 (info_locals_command): ... this.
7750 (args_info): Rename to ...
7751 (info_args_command): ... this.
7752 (_initialize_stack): Adjust.
7753 * symtab.c (sources_info): Rename to ...
7754 (info_sources_command): ... this.
7755 (variables_info): Rename to ...
7756 (info_variables_command): ... this.
7757 (functions_info): Rename to ...
7758 (info_functions_command): ... this.
7759 (types_info): Rename to ...
7760 (info_types_command): ... this.
7761 (_initialize_symtab): Adjust.
7762 * target.c (target_info): Rename to ...
7763 (info_target_command): ... this.
7764 (initialize_targets): Adjust.
7765 * tracepoint.c (tvariables_info): Rename to ...
7766 (info_tvariables_command): ... this.
7767 (scope_info): Rename to ...
7768 (info_scope_command): ... this.
7769 (trace_dump_actions): Adjust.
7770 (_initialize_tracepoint): Adjust.
7771
b270e6f9
TT
77722017-08-22 Tom Tromey <tom@tromey.com>
7773
7774 * breakpoint.h (install_breakpoint): Update.
7775 * breakpoint.c (add_solib_catchpoint): Update.
7776 (install_breakpoint): Change argument to a std::unique_ptr.
7777 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7778 (create_breakpoint_sal, create_breakpoint): Update.
7779 (watch_command_1, catch_exec_command_1)
7780 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7781 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7782 Return the breakpoint.
7783 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7784 (new_single_step_breakpoint): Update.
7785 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7786 std::unique_ptr.
7787 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7788 std::unique_ptr.
7789 * break-catch-sig.c (create_signal_catchpoint): Use
7790 std::unique_ptr.
7791 * ada-lang.c (create_ada_exception_catchpoint): Use
7792 std::unique_ptr.
7793
36bd8eaa
TT
77942017-08-22 Tom Tromey <tom@tromey.com>
7795
7796 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7797
56f37645
TT
77982017-08-22 Tom Tromey <tom@tromey.com>
7799
7800 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7801 (lookup_partial_symbol): Update.
7802
0b581c69
TT
78032017-08-22 Tom Tromey <tom@tromey.com>
7804
7805 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7806 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7807 (find_and_open_source, symtab_to_fullname): Update.
7808 * psymtab.c (psymtab_to_fullname): Update.
7809
14278e1f
TT
78102017-08-22 Tom Tromey <tom@tromey.com>
7811
7812 * exec.c (exec_file_attach): Update.
7813 * linux-thread-db.c (try_thread_db_load): Update.
7814 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7815 * utils.c (gdb_realpath): Change return type.
7816 (gdb_realpath_keepfile): Update.
7817 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7818 (_initialize_utils): Register the new self test.
7819 * source.c (openp): Update.
7820 (find_and_open_source): Update.
7821 * nto-tdep.c (nto_find_and_open_solib): Update.
7822 * main.c (set_gdb_data_directory): Update.
7823 (captured_main_1): Update.
7824 * dwarf2read.c (dwarf2_get_dwz_file): Update
7825 (dw2_map_symbol_filenames): Update.
7826 * auto-load.c (auto_load_safe_path_vec_update): Update.
7827 (filename_is_in_auto_load_safe_path_vec): Change type of
7828 "filename_realp".
7829 (auto_load_objfile_script): Update.
7830 (file_is_auto_load_safe): Update. Use std::string.
7831 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7832
4971c9a7
TT
78332017-08-22 Tom Tromey <tom@tromey.com>
7834
7835 * utils.c (gdb_realpath_keepfile): Return a
7836 gdb::unique_xmalloc_ptr.
7837 * exec.c (exec_file_attach): Update.
7838 * utils.h (gdb_realpath_keepfile): Return a
7839 gdb::unique_xmalloc_ptr.
7840
e3e41d58
TT
78412017-08-22 Tom Tromey <tom@tromey.com>
7842
7843 * compile/compile.c (compile_file_command): Use
7844 gdb::unique_xmalloc_ptr, std::string.
7845 * utils.c (gdb_abspath): Change return type.
7846 * source.c (openp): Update.
7847 * objfiles.c (allocate_objfile): Update.
7848 * main.c (set_gdb_data_directory): Update.
7849 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7850
0d999a6e
ZZ
78512017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7852
7853 * cli-cmds.c (list_commands): List actual code around more than
7854 one location.
7855
329d5e7e
JB
78562017-08-21 John Baldwin <jhb@FreeBSD.org>
7857
7858 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7859
bf223d3e
PA
78602017-08-21 Pedro Alves <palves@redhat.com>
7861
7862 PR gdb/19487
7863 * c-exp.y (variable production): Handle function aliases.
7864 * minsyms.c (msymbol_is_text): New function.
7865 * minsyms.h (msymbol_is_text): Declare.
7866 * symtab.c (find_function_alias_target): New function.
7867 * symtab.h (find_function_alias_target): Declare.
7868
c973d0aa
PA
78692017-08-21 Pedro Alves <palves@redhat.com>
7870
7871 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7872 typedefs.
7873 * typeprint.c (whatis_exp): If handling "whatis", and expression
7874 is OP_TYPE, strip one typedef level. Otherwise don't strip
7875 typedefs here.
7876 * valops.c (value_cast): Save "to" type before resolving
7877 stubs/typedefs. Use that type as resulting value's type.
7878
2989a365
TT
78792017-08-18 Tom Tromey <tom@tromey.com>
7880 Pedro Alves <palves@redhat.com>
7881
7882 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7883 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7884 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7885 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7886 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7887 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7888 (linux_get_siginfo_data): Add "thread" argument. Use
7889 scoped_restore.
7890 * linux-nat.c (linux_child_follow_fork)
7891 (check_stopped_by_watchpoint): Use scoped_restore.
7892 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7893 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7894 (restore_inferior_ptid, save_inferior_ptid): Remove.
7895 * btrace.c (btrace_fetch): Use scoped_restore.
7896 * bsd-uthread.c (bsd_uthread_fetch_registers)
7897 (bsd_uthread_store_registers): Use scoped_restore.
7898 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7899 scoped_restore.
7900 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7901 (aix_thread_xfer_partial): Use scoped_restore.
7902 * inferior.h (save_inferior_ptid): Remove.
7903
e60eb288
YQ
79042017-08-18 Yao Qi <yao.qi@linaro.org>
7905
7906 PR tdep/21818
7907 * arm-tdep.c (gdb_print_insn_arm): Mark
7908 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7909
6d580b63
YQ
79102017-08-18 Yao Qi <yao.qi@linaro.org>
7911
7912 * NEWS: Mention GDBserver's new option "--selftest".
7913 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7914 * selftest.c: Move it to common/selftest.c.
7915 * selftest.h: Move it to common/selftest.h.
7916 * selftest-arch.c (reset): New function.
7917 (tests_with_arch): Call reset.
7918
86dcbf50
YQ
79192017-08-18 Yao Qi <yao.qi@linaro.org>
7920
7921 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7922 instead of exception_fprintf and printf_filtered.
7923
7649770c
YQ
79242017-08-18 Yao Qi <yao.qi@linaro.org>
7925
7926 * selftest.c (register_self_test): Rename it to
7927 selftests::register_test.
7928 (run_self_tests): selftest::run_tests.
7929 * selftest.h: Update declarations.
7930 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7931 selftests::register_test_foreach_arch.
7932 * selftest-arch.h: Update declaration.
7933 * aarch64-tdep.c: Update.
7934 * arm-tdep.c: Likewise.
7935 * disasm-selftests.c: Likewise.
7936 * dwarf2loc.c: Likewise.
7937 * dwarf2-frame.c: Likewise.
7938 * findvar.c: Likewise.
7939 * gdbarch-selftests.c: Likewise.
7940 * maint.c (maintenance_selftest): Likewise.
7941 * regcache.c: Likewise.
7942 * rust-exp.y: Likewise.
7943 * selftest-arch.c: Likewise.
7944 * unittests/environ-selftests.c: Likewise.
7945 * unittests/function-view-selftests.c: Likewise.
7946 * unittests/offset-type-selftests.c: Likewise.
7947 * unittests/optional-selftests.c: Likewise.
7948 * unittests/scoped_restore-selftests.c: Likewise.
7949 * utils-selftests.c: Likewise.
7950
b0cba12e
PA
79512017-08-17 Pedro Alves <palves@redhat.com>
7952
7953 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7954 local.
7955
4c8aa72d
PA
79562017-08-17 Pedro Alves <palves@redhat.com>
7957
7958 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7959 field.
7960 (reset_die_in_process): Delete, replaced by ...
7961 (process_die_scope): ... this new class. Make it responsible for
7962 freeing cu->line_header too.
7963 (process_die): Use process_die_scope.
7964 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7965 cu->line_header_die_owner. Don't release the line header if it's
7966 owned by the CU.
7967 (setup_type_unit_groups): Make the CU/DIE own the line header.
7968 Don't release the line header here.
7969
ba713918
AL
79702017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7971
7972 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7973
44d0fb3a
RK
79742017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7975
7976 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7977 Single-Key mode
7978
a5afdb16
RK
79792017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7980
7981 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7982 mode command list.
7983
47613aeb
SH
79842017-08-15 Stafford Horne <shorne@gmail.com>
7985
7986 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7987
9c3cc999
SH
79882017-08-15 Stafford Horne <shorne@gmail.com>
7989
7990 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7991
206726fb
SDJ
79922017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7993
7994 PR gdb/21954
7995 * infcmd.c (unset_environment_command): Use the 'clear' method on
7996 the environment instead of resetting it.
7997
0335ac6d
JB
79982017-08-15 John Baldwin <jhb@FreeBSD.org>
7999
8000 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8001 platforms.
8002
d3abe1c8
TT
80032017-08-14 Tom Tromey <tom@tromey.com>
8004
8005 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8006 (print_binary_chars): Likewise.
8007 (BITS_IN_BYTES): Remove.
8008
d6382fff
TT
80092017-08-14 Tom Tromey <tom@tromey.com>
8010
8011 PR gdb/21675
8012 * valprint.c (LOW_ZERO): Change value to 034.
8013 (print_octal_chars): Add static_asserts for octal constants.
8014 * printcmd.c (print_scalar_formatted): Add 'd' case.
8015
f978cb06
TT
80162017-08-11 Tom Tromey <tom@tromey.com>
8017
8018 * symfile.c (add_symbol_file_command): Use std::vector.
8019
2f5404b3
TT
80202017-08-14 Tom Tromey <tom@tromey.com>
8021
8022 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8023 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8024 std::move.
8025 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8026
de7985c3
PA
80272017-08-11 Pedro Alves <palves@redhat.com>
8028
8029 * infrun.c (process_event_stop_test): Adjust
8030 function_name_is_marked_for_skip call.
8031 * skip.c: Include <list>.
8032 (skiplist_entry): Make it a class with private fields, and
8033 getters/setters.
8034 (skiplist_entry_chain): Delete.
8035 (skiplist_entries): New.
8036 (skiplist_entry_count): Delete.
8037 (highest_skiplist_entry_num): New.
8038 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8039 (add_skiplist_entry): Delete.
8040 (skiplist_entry::skiplist_entry): New.
8041 (skiplist_entry::add_entry): New.
8042 (skip_file_command, skip_function): Adjust.
8043 (compile_skip_regexp): Delete.
8044 (skip_command): Don't compile regexp here. Adjust to use
8045 skiplist_entry::add_entry.
8046 (skip_info): Adjust to use range-for and getters.
8047 (skip_enable_command, skip_disable_command): Adjust to use
8048 range-for and setters.
8049 (skip_delete_command): Adjust to use std::list.
8050 (add_skiplist_entry): Delete.
8051 (skip_file_p): Delete, refactored as ...
8052 (skiplist_entry::do_skip_file_p): ... this new method.
8053 (skip_gfile_p): Delete, refactored as ...
8054 (skiplist_entry::do_gskip_file_p): ... this new method.
8055 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8056 (skiplist_entry::skip_function_p): ... this new method.
8057 (function_name_is_marked_for_skip): Now returns bool, and takes
8058 the function sal by const reference. Adjust to use range-for and
8059 skiplist_entry methods.
8060 (_initialize_step_skip): Remove references to
8061 skiplist_entry_chain, skiplist_entry_count.
8062 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8063 takes the function sal by const reference.
8064
be7d3cd5
YQ
80652017-08-11 Yao Qi <yao.qi@linaro.org>
8066
8067 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8068 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8069 (dwarf2_frame_cache):
8070 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8071 RETURN_MASK_ALL and set *this_case to NULL.
8072 * frame-unwind.h: Update comments.
8073
1c90d9f0
YQ
80742017-08-11 Yao Qi <yao.qi@linaro.org>
8075
8076 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8077 (dwarf2_frame_state_copy_regs): Remove.
8078 (dwarf2_frame_state_free_regs): Remove.
8079 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8080 (dwarf2_restore_rule): Call method .alloc_regs instead of
8081 dwarf2_frame_state_alloc_regs.
8082 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8083 constructor. Call std::move.
8084 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8085 (dwarf2_frame_cache): Likewise.
8086
8087 [GDB_SELF_TEST]: Include selftest.h and
8088 selftest-arch.h.
8089 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8090 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8091 execute_cfa_program_test.
8092
8093 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8094 copy ctor, assignment operator, move assignment.
8095 <alloc_regs>: New method.
8096 <swap>: New method.
8097 (struct dwarf2_frame_state): Delete dtor.
8098 (dwarf2_frame_state_alloc_regs): Remove declaration.
8099 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8100 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8101
afe37d6b
YQ
81022017-08-11 Yao Qi <yao.qi@linaro.org>
8103
8104 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8105 (dwarf2_frame_state::dwarf2_frame_state): New.
8106 (dwarf2_frame_state::~dwarf2_frame_state): New.
8107 (dwarf2_fetch_cfa_info): Update.
8108 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8109 rather than a pointer. Update code.
8110 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8111 dtor.
8112 <data_align, code_align, retaddr_column>: Change them to const.
8113 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8114 to bool.
8115
b348037f
YQ
81162017-08-11 Yao Qi <yao.qi@linaro.org>
8117
8118 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8119 <loc.exp>: New field.
8120 * dwarf2-frame.c (execute_cfa_program): Update.
8121 (dwarf2_frame_prev_register): Update.
8122
e7c9de26
PA
81232017-08-10 Pedro Alves <palves@redhat.com>
8124
8125 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8126
e8c6b620
JB
81272017-08-09 John Baldwin <jhb@FreeBSD.org>
8128
8129 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8130 (fbsd_pending_children): Use std::list.
8131 (fbsd_remember_child): Likewise.
8132 (fbsd_is_child_pending): Likewise.
8133 (fbsd_pending_vfork_done): Use std::forward_list.
8134 (fbsd_add_vfork_done): Likewise.
8135 (fbsd_is_vfork_done_pending): Likewise.
8136 (fbsd_next_vfork_done): Likewise.
8137
e4a26669
JB
81382017-08-09 John Baldwin <jhb@FreeBSD.org>
8139
8140 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8141 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8142 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8143 for `mapfilename'.
8144 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8145 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8146
142311d3
JB
81472017-08-09 John Baldwin <jhb@FreeBSD.org>
8148
8149 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8150 "filestuff.h".
8151 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8152
42fa2e0e
TT
81532017-08-09 Tom Tromey <tom@tromey.com>
8154
8155 * skip.c (skiplist_entry): New constructor.
8156 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8157 (skiplist_entry::file_is_glob): Now bool.
8158 (skiplist_entry::file, skiplist_entry::function): Now
8159 std::string.
8160 (make_skip_entry): Return a unique_ptr. Use new.
8161 (free_skiplist_entry, free_skiplist_entry_cleanup)
8162 (make_free_skiplist_entry_cleanup): Remove.
8163 (skip_command, skip_disable_command, add_skiplist_entry)
8164 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8165 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8166 (function_name_is_marked_for_skip): Update.
8167 (skip_delete_command): Update. Use delete.
8168
cd3af38d
JW
81692017-08-09 Jiong Wang <jiong.wang@arm.com>
8170
8171 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8172 (aarch64_linux_core_read_description): New function.
8173 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8174
29592bde
PA
81752017-08-09 Pedro Alves <palves@redhat.com>
8176
8177 * cp-name-parser.y (cp_comp_to_string): Return a
8178 gdb::unique_xmalloc_ptr<char>.
8179 * cp-support.c (replace_typedefs_qualified_name)
8180 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8181 (cp_canonicalize_string_full): Use op= instead of explicit
8182 convertion.
8183 (cp_class_name_from_physname, method_name_from_physname)
8184 (cp_func_name, cp_remove_params): Adjust to use
8185 gdb::unique_xmalloc_ptr<char>.
8186 * cp-support.h (cp_comp_to_string): Return a
8187 gdb::unique_xmalloc_ptr<char>.
8188 * python/py-type.c (typy_lookup_type): Adjust to use
8189 gdb::unique_xmalloc_ptr<char>.
8190
b3340438
L
81912017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8192
8193 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8194
e88e8651
YQ
81952017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8196 Yao Qi <yao.qi@linaro.org>
8197
8198 * cp-support.c (cp_canonicalize_string_full): Use
8199 gdb::unique_xmalloc_ptr<char>.
8200 (cp_canonicalize_string): Likewise.
8201
f5a29eb0
YQ
82022017-08-09 Yao Qi <yao.qi@linaro.org>
8203
8204 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8205 * regformats/i386/amd64-avx-avx512.dat: Remove.
8206 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8207 * regformats/i386/amd64-avx-mpx.dat:Remove.
8208 * regformats/i386/amd64-avx.dat: Remove.
8209 * regformats/i386/amd64-mpx.dat: Remove.
8210 * regformats/i386/i386-avx-avx512.dat: Remove.
8211 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8212 * regformats/i386/i386-avx-mpx.dat: Remove.
8213 * regformats/i386/i386-mmx.dat: Remove.
8214 * regformats/i386/i386-mpx.dat: Remove.
8215
57757c2f
YQ
82162017-08-09 Yao Qi <yao.qi@linaro.org>
8217
8218 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8219 * amd64-tdep.c: Don't include features/i386/x32*.c.
8220 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8221 functions.
8222 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8223 and i386/x32-avx-avx512.
8224 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8225 and i386/x32.xml.
8226 * features/i386/x32-avx-avx512.c: Removed.
8227 * features/i386/x32-avx-avx512.xml: Removed.
8228 * features/i386/x32-avx.c: Removed.
8229 * features/i386/x32-avx.xml: Removed.
8230 * features/i386/x32.c: Removed.
8231 * features/i386/x32.xml: Removed.
8232 * regformats/i386/x32-avx-avx512.dat: Removed.
8233 * regformats/i386/x32-avx.dat: Removed.
8234 * regformats/i386/x32.dat: Removed.
8235
ba7b109b
MR
82362017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8237
8238 PR breakpoints/21886
8239 * mem-break.c (default_memory_insert_breakpoint): Use
8240 `->placed_address' rather than `->reqstd_address' for the
8241 breakpoint location.
8242
e347efc3
MR
82432017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8244
8245 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8246 assertions.
8247
0dba2a6c
MR
82482017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8249
8250 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8251 a union of `tdep_info', `tdesc_data' and `id'.
8252 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8253 rather than `info.tdep_info'.
8254 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8255 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8256 * i386-tdep.c (i386_gdbarch_init): Likewise.
8257 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8258 * mips-tdep.c (mips_gdbarch_init): Likewise.
8259 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8260 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8261 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8262 `info.tdep_info'.
8263 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8264 `info.tdep_info'.
8265 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8266 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8267 `info.tdep_info'.
8268 * spu-tdep.c (spu_gdbarch_init): Likewise.
8269 * gdbarch.h: Regenerate.
8270
16eb6b2d
LS
82712017-08-07 Leszek Swirski <leszeks@google.com>
8272
7b005726 8273 PR symtab/20899
16eb6b2d
LS
8274 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8275
74cbb09e
SM
82762017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8277
8278 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8279 (gdbsim_open): Rename gdb_argv args object to argv.
8280
ee0c3293
TT
82812017-08-05 Tom Tromey <tom@tromey.com>
8282
8283 * compile/compile-object-load.c (compile_object_load): Use
8284 gdb::unique_xmalloc_ptr.
8285 * cli/cli-dump.c (scan_filename): Rename from
8286 scan_filename_with_cleanup. Change return type.
8287 (scan_expression): Rename from scan_expression_with_cleanup.
8288 Change return type.
8289 (dump_memory_to_file, dump_value_to_file, restore_command):
8290 Use gdb::unique_xmalloc_ptr. Update.
8291 * cli/cli-cmds.c (find_and_open_script): Use
8292 gdb::unique_xmalloc_ptr.
8293 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8294 * symmisc.c (maintenance_print_symbols)
8295 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8296 * symfile.c (symfile_bfd_open, generic_load)
8297 (add_symbol_file_command, remove_symbol_file_command): Use
8298 gdb::unique_xmalloc_ptr.
8299 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8300 * psymtab.c (maintenance_print_psymbols): Use
8301 gdb::unique_xmalloc_ptr.
8302 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8303 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8304 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8305 (reload_shared_libraries_1): Likewise.
8306
3232fabd
TT
83072017-08-05 Tom Tromey <tom@tromey.com>
8308
8309 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8310 (rust_op_vector, rust_set_vector): New typedefs.
8311 (current_parser): New global.
8312 (work_obstack): Change to pointer type. Update all users.
8313 (rust_ast, pstate): Remove globals.
8314 (struct rust_parser): New.
8315 (%union) <params, field_inits>: Change type.
8316 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8317 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8318 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8319 (convert_params_to_types, convert_params_to_expression): Change
8320 type of "params".
8321 (ast_string): Change type of "fields".
8322 (rust_parse): Make a rust_parser. Remove cleanups.
8323 (rust_lex_tests): Make and install an auto_obstack.
8324
f02fd774
YQ
83252017-08-04 Yao Qi <yao.qi@linaro.org>
8326
8327 * configure.srv (ipa_x32_linux_regobj): New.
8328 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8329 instead of X86_TDESC_AVX512.
8330 (initialize_low_tracepoint): Call
8331 init_registers_x32_avx_avx512_linux.
8332
91975afd
YQ
83332017-08-04 Yao Qi <yao.qi@linaro.org>
8334
8335 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8336
2331fa3a
RK
83372017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8338
8339 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8340
744e4fe1
TT
83412017-08-03 Tom Tromey <tom@tromey.com>
8342
8343 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8344 Remove.
8345 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8346
1c034b67
TT
83472017-08-03 Tom Tromey <tom@tromey.com>
8348
8349 * python/py-param.c (compute_enum_values): Use gdb_argv.
8350
773a1edc
TT
83512017-08-03 Tom Tromey <tom@tromey.com>
8352
8353 * utils.h (struct gdb_argv_deleter): New.
8354 (gdb_argv): New class.
8355 * utils.c (gdb_argv::reset): New method.
8356 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8357 * tracefile.c (tsave_command): Use gdb_argv.
8358 * top.c (new_ui_command): Use gdb_argv.
8359 * symmisc.c (maintenance_print_symbols)
8360 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8361 * symfile.c (symbol_file_command, generic_load)
8362 (remove_symbol_file_command): Use gdb_argv.
8363 * stack.c (backtrace_command): Use gdb_argv.
8364 * source.c (add_path, show_substitute_path_command)
8365 (unset_substitute_path_command, set_substitute_path_command):
8366 Use gdb_argv.
8367 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8368 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8369 * remote.c (extended_remote_run, remote_put_command)
8370 (remote_get_command, remote_delete_command): Use gdb_argv.
8371 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8372 (gdbsim_open): Use gdb_argv.
8373 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8374 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8375 * procfs.c (procfs_info_proc): Use gdb_argv.
8376 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8377 * infrun.c (handle_command): Use gdb_argv.
8378 * inferior.c (add_inferior_command, clone_inferior_command):
8379 Use gdb_argv.
8380 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8381 * exec.c (exec_file_command): Use gdb_argv.
8382 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8383 * compile/compile.c (build_argc_argv): Use gdb_argv.
8384
0d50bde3
TT
83852017-08-03 Tom Tromey <tom@tromey.com>
8386
8387 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8388
7f968c89
TT
83892017-08-03 Tom Tromey <tom@tromey.com>
8390
8391 * python/python.c (compute_python_string): Return std::string.
8392 (gdbpy_eval_from_control_command): Update.
8393 (do_start_initialization): Use std::string.
8394 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8395 xstrprintf.
8396 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8397 xstrprintf.
8398
3c9ebddd
TT
83992017-08-03 Tom Tromey <tom@tromey.com>
8400
8401 * top.h (do_restore_instream_cleanup): Remove.
8402 * top.c (do_restore_instream_cleanup): Remove.
8403 (read_command_file): Use scoped_restore.
8404 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8405
b51b225e
TT
84062017-08-03 Tom Tromey <tom@tromey.com>
8407
8408 * cli/cli-script.c (execute_user_command)
8409 (execute_control_command): Use scoped_restore.
8410
ac991630
TT
84112017-08-03 Tom Tromey <tom@tromey.com>
8412
8413 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8414 (execute_user_command): Remove user_call_depth; use
8415 user_args_stack's size instead.
8416
898e0c8e
TT
84172017-08-03 Tom Tromey <tom@tromey.com>
8418
8419 * top.h (in_user_command): Remove.
8420 * top.c (in_user_command): Remove.
8421 * cli/cli-script.c (do_restore_user_call_depth)
8422 (execute_user_command): Update.
8423
26fcd5d7
TT
84242017-08-03 Tom Tromey <tom@tromey.com>
8425
8426 * valops.c (search_struct_method): Use gdb::byte_vector.
8427 * valarith.c (value_concat): Use std::vector.
8428 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8429 (simple_search_memory): Likewise.
8430 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8431 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8432 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8433 * elfread.c (elf_rel_plt_read): Use std::string.
8434 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8435 * cli/cli-dump.c (restore_section_callback): Use
8436 gdb::byte_vector.
8437
7c218e6c
TT
84382017-08-03 Tom Tromey <tom@tromey.com>
8439
8440 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8441
31b68d4a
TT
84422017-08-03 Tom Tromey <tom@tromey.com>
8443
8444 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8445 (tui_register_format): Use scoped_restore.
8446
2ec845e7
TT
84472017-08-03 Tom Tromey <tom@tromey.com>
8448
8449 * reverse.c (exec_direction_default): Remove.
8450 (exec_reverse_once): Use scoped_restore.
8451 * remote.c (restore_remote_timeout): Remove.
8452 (remote_flash_erase, remote_flash_write, remote_flash_done)
8453 (readchar, remote_serial_write): Use scoped_restore.
8454 * cli/cli-script.c (struct source_cleanup_lines_args)
8455 (source_cleanup_lines): Remove.
8456 (script_from_file): Use scoped_restore.
8457 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8458 (source_command): Use scoped_restore.
8459
b3bc8453
TT
84602017-08-03 Tom Tromey <tom@tromey.com>
8461
8462 * utils.h (make_cleanup_free_so): Remove.
8463 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8464 * solist.h (struct so_deleter): New.
8465 (so_list_up): New typedef.
8466 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8467
e3ad2841
TT
84682017-08-03 Tom Tromey <tom@tromey.com>
8469
8470 * utils.h (make_cleanup_restore_current_language): Remove.
8471 * utils.c (do_restore_current_language)
8472 (make_cleanup_restore_current_language): Remove.
8473 * parse.c (parse_exp_in_context_1)
8474 (parse_expression_with_language): Use
8475 scoped_restore_current_language.
8476 * mi/mi-main.c (mi_cmd_execute): Use
8477 scoped_restore_current_language.
8478 * language.h (scoped_restore_current_language): New class.
8479
b80cf838
TT
84802017-08-03 Tom Tromey <tom@tromey.com>
8481
8482 * compile/compile.c (cleanup_unlink_file): Remove.
8483 (compile_to_object): Use gdb::unlinker.
8484 (eval_compile_command): Likewise.
8485
fad0444a
TT
84862017-08-03 Tom Tromey <tom@tromey.com>
8487
8488 * utils.h (make_cleanup_fclose): Remove.
8489 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8490
6e7bc05c
TT
84912017-08-03 Tom Tromey <tom@tromey.com>
8492
8493 * top.c (open_terminal_stream): Return gdb_file_up.
8494 (new_ui_command): Update.
8495
4a45905b
TT
84962017-08-03 Tom Tromey <tom@tromey.com>
8497
8498 * source.c (print_source_lines_base, forward_search_command)
8499 (reverse_search_command): Use gdb_file_up.
8500
7cd06d6e
TT
85012017-08-03 Tom Tromey <tom@tromey.com>
8502
8503 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8504
ed166945
TT
85052017-08-03 Tom Tromey <tom@tromey.com>
8506
8507 * cli/cli-cmds.c (find_and_open_script): Change return type.
8508 Remove "streamp" and "full_path" parameters.
8509 (source_script_with_search): Update.
8510 * auto-load.c (source_script_file): Update.
8511 * cli/cli-cmds.h (find_and_open_script): Change type.
8512 (open_script): New struct.
8513
d419f42d
TT
85142017-08-03 Tom Tromey <tom@tromey.com>
8515
8516 * xml-support.c (xml_fetch_content_from_file): Update.
8517 * ui-file.c (stdio_file::open): Update.
8518 * tracefile-tfile.c (tfile_start): Update.
8519 * remote.c (remote_file_put, remote_file_get): Update.
8520 * nat/linux-procfs.c (linux_proc_get_int)
8521 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8522 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8523 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8524 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8525 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8526 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8527 * linux-nat.c (linux_proc_pending_signals): Update.
8528 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8529 (file_closer): Remove.
8530 * compile/compile.c (compile_to_object): Update.
8531 * common/filestuff.h (struct gdb_file_deleter): New.
8532 (gdb_file_up): New typedef.
8533 (gdb_fopen_cloexec): Change return type.
8534 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8535 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8536 (dump_binary_file, restore_binary_file): Update.
8537 * auto-load.c (auto_load_objfile_script_1): Update.
8538
4a2b031d
TT
85392017-08-03 Tom Tromey <tom@tromey.com>
8540
8541 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8542 (info_static_tracepoint_markers_command): Likewise.
8543 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8544 * skip.c (skip_info): Use ui_out_emit_table.
8545 * progspace.c (print_program_space): Use ui_out_emit_table.
8546 * osdata.c (info_osdata): Use ui_out_emit_table.
8547 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8548 ui_out_emit_table.
8549 * linux-thread-db.c (info_auto_load_libthread_db): Use
8550 ui_out_emit_table.
8551 * inferior.c (print_inferior): Use ui_out_emit_table.
8552 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8553 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8554 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8555 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8556 * ui-out.h (class ui_out_emit_table): New.
8557
a4f320fd
MR
85582017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8559
8560 * mips-tdep.c (mips_fpu_type_str): New function.
8561 (mips_dump_tdep): Call it.
8562
a2f1f308
MR
85632017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8564
8565 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8566 `->mips_fpu_type'.
8567
7e5ed83b
XR
85682017-07-31 Xavier Roirand <roirand@adacore.com>
8569
8570 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8571
4c9dc811
XR
85722017-07-27 Xavier Roirand <roirand@adacore.com>
8573
8574 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8575
27d41eac
YQ
85762017-07-26 Yao Qi <yao.qi@linaro.org>
8577
8578 * cli/cli-cmds.c (maintenancechecklist): New variable.
8579 * gdbcmd.h (maintenancechecklist): Declare it.
8580 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8581 Call i386_linux_read_description with different masks.
8582 * maint.c (maintenance_check_command): New function.
8583 (_initialize_maint_cmds): Call add_prefix_cmd.
8584 * target-descriptions.c (tdesc_reg): override operator != and ==.
8585 (tdesc_type): Likewise.
8586 (tdesc_feature): Likewise.
8587 (target_desc): Likewise.
8588 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8589 (maintenance_check_xml_descriptions): New function.
8590 (_initialize_target_descriptions) Add command "xml-descriptions".
8591 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8592
ea03d0d3
YQ
85932017-07-26 Yao Qi <yao.qi@linaro.org>
8594
8595 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8596 Include features/i386/32bit-*.c.
8597 (i386_linux_read_description): Generate target description if it
8598 doesn't exist.
8599 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8600 functions.
8601 * features/i386/32bit-linux.c: Re-generated.
8602 * features/i386/32bit-sse.c: Likewise.
8603 * target-descriptions.c (print_c_feature::visit): Print code to
8604 set register number if needed.
8605 (print_c_feature) <m_next_regnum>: New field.
8606
25aa13e5
YQ
86072017-07-26 Yao Qi <yao.qi@linaro.org>
8608
8609 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8610 (FEATURE_XMLFILES): New.
8611 (FEATURE_CFILES): New.
8612 New rules.
8613 (clean-cfiles): Remove generated c files.
8614 * features/i386/32bit-avx.c: Generated.
8615 * features/i386/32bit-avx512.c: Generated.
8616 * features/i386/32bit-core.c: Generated.
8617 * features/i386/32bit-linux.c: Generated.
8618 * features/i386/32bit-mpx.c: Generated.
8619 * features/i386/32bit-pkeys.c: Generated.
8620 * features/i386/32bit-sse.c: Generated.
8621 * target-descriptions.c: Include algorithm.
8622 (tdesc_element_visitor): Add method visit_end.
8623 (print_c_tdesc): Implement visit_end.
8624 (print_c_tdesc:: m_filename_after_features): Move it to
8625 protected.
8626 (print_c_feature): New class.
8627 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8628 name starts with "i386/32bit-".
8629
6eb1e6a8
YQ
86302017-07-26 Yao Qi <yao.qi@linaro.org>
8631
8632 * target-descriptions.c (tdesc_element_visitor): New class.
8633 (tdesc_element): New class.
8634 (tdesc_reg): Inherit from tdesc_element.
8635 (tdesc_reg::accept): New function.
8636 (tdesc_type): Inherit from tdesc_element.
8637 (tdesc_type::accept): New function.
8638 (tdesc_feature): Inherit from tdesc_element.
8639 (tdesc_feature::accept): New function.
8640 (target_desc): Inherit from tdesc_element.
8641 (target_desc::target_desc): New.
8642 (target_desc::~target_desc): New.
8643 (target_desc::accept): New.
8644 (allocate_target_description): Use new.
8645 (free_target_description): Use delete.
8646 (print_c_tdesc): New class.
8647 (maint_print_c_tdesc_cmd): Adjust.
8648
8649 * features/aarch64.c: Re-generated.
8650 * features/arc-arcompact.c: Re-generated.
8651 * features/arc-v2.c: Re-generated.
8652 * features/arm/arm-with-iwmmxt.c: Re-generated.
8653 * features/arm/arm-with-m.c: Re-generated.
8654 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8655 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8656 * features/arm/arm-with-neon.c: Re-generated.
8657 * features/arm/arm-with-vfpv2.c: Re-generated.
8658 * features/arm/arm-with-vfpv3.c: Re-generated.
8659 * features/i386/amd64-avx-avx512.c: Re-generated.
8660 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8661 * features/i386/amd64-avx.c: Re-generated.
8662 * features/i386/amd64-avx-linux.c: Re-generated.
8663 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8664 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8665 * features/i386/amd64-avx-mpx.c: Re-generated.
8666 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8667 * features/i386/amd64.c: Re-generated.
8668 * features/i386/amd64-linux.c: Re-generated.
8669 * features/i386/amd64-mpx.c: Re-generated.
8670 * features/i386/amd64-mpx-linux.c: Re-generated.
8671 * features/i386/i386-avx-avx512.c: Re-generated.
8672 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8673 * features/i386/i386-avx.c: Re-generated.
8674 * features/i386/i386-avx-linux.c: Re-generated.
8675 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8676 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8677 * features/i386/i386-avx-mpx.c: Re-generated.
8678 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8679 * features/i386/i386.c: Re-generated.
8680 * features/i386/i386-linux.c: Re-generated.
8681 * features/i386/i386-mmx.c: Re-generated.
8682 * features/i386/i386-mmx-linux.c: Re-generated.
8683 * features/i386/i386-mpx.c: Re-generated.
8684 * features/i386/i386-mpx-linux.c: Re-generated.
8685 * features/i386/x32-avx-avx512.c: Re-generated.
8686 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8687 * features/i386/x32-avx.c: Re-generated.
8688 * features/i386/x32-avx-linux.c: Re-generated.
8689 * features/i386/x32.c: Re-generated.
8690 * features/i386/x32-linux.c: Re-generated.
8691 * features/microblaze.c: Re-generated.
8692 * features/microblaze-with-stack-protect.c: Re-generated.
8693 * features/mips64-dsp-linux.c: Re-generated.
8694 * features/mips64-linux.c: Re-generated.
8695 * features/mips-dsp-linux.c: Re-generated.
8696 * features/mips-linux.c: Re-generated.
8697 * features/nds32.c: Re-generated.
8698 * features/nios2.c: Re-generated.
8699 * features/nios2-linux.c: Re-generated.
8700 * features/rs6000/powerpc-32.c: Re-generated.
8701 * features/rs6000/powerpc-32l.c: Re-generated.
8702 * features/rs6000/powerpc-403.c: Re-generated.
8703 * features/rs6000/powerpc-403gc.c : Re-generated.
8704 * features/rs6000/powerpc-405.c: Re-generated.
8705 * features/rs6000/powerpc-505.c: Re-generated.
8706 * features/rs6000/powerpc-601.c: Re-generated.
8707 * features/rs6000/powerpc-602.c: Re-generated.
8708 * features/rs6000/powerpc-603.c: Re-generated.
8709 * features/rs6000/powerpc-604.c: Re-generated.
8710 * features/rs6000/powerpc-64.c: Re-generated.
8711 * features/rs6000/powerpc-64l.c: Re-generated.
8712 * features/rs6000/powerpc-7400.c: Re-generated.
8713 * features/rs6000/powerpc-750.c: Re-generated.
8714 * features/rs6000/powerpc-860.c: Re-generated.
8715 * features/rs6000/powerpc-altivec32.c: Re-generated.
8716 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8717 * features/rs6000/powerpc-altivec64.c: Re-generated.
8718 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8719 * features/rs6000/powerpc-cell32l.c: Re-generated.
8720 * features/rs6000/powerpc-cell64l.c: Re-generated.
8721 * features/rs6000/powerpc-e500.c: Re-generated.
8722 * features/rs6000/powerpc-e500l.c: Re-generated.
8723 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8724 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8725 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8726 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8727 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8728 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8729 * features/rs6000/powerpc-vsx32.c: Re-generated.
8730 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8731 * features/rs6000/powerpc-vsx64.c: Re-generated.
8732 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8733 * features/rs6000/rs6000.c: Re-generated.
8734 * features/s390-linux32.c: Re-generated.
8735 * features/s390-linux32v1.c: Re-generated.
8736 * features/s390-linux32v2.c: Re-generated.
8737 * features/s390-linux64.c: Re-generated.
8738 * features/s390-linux64v1.c: Re-generated.
8739 * features/s390-linux64v2.c: Re-generated.
8740 * features/s390-te-linux64.c: Re-generated.
8741 * features/s390-tevx-linux64.c: Re-generated.
8742 * features/s390-vx-linux64.c: Re-generated.
8743 * features/s390x-linux64.c: Re-generated.
8744 * features/s390x-linux64v1.c: Re-generated.
8745 * features/s390x-linux64v2.c: Re-generated.
8746 * features/s390x-te-linux64.c: Re-generated.
8747 * features/s390x-tevx-linux64.c: Re-generated.
8748 * features/s390x-vx-linux64.c: Re-generated.
8749 * features/sparc/sparc32-solaris.c: Re-generated.
8750 * features/sparc/sparc64-solaris.c: Re-generated.
8751 * features/tic6x-c62x.c: Re-generated.
8752 * features/tic6x-c62x-linux.c: Re-generated.
8753 * features/tic6x-c64x.c: Re-generated.
8754 * features/tic6x-c64x-linux.c: Re-generated.
8755 * features/tic6x-c64xp.c: Re-generated.
8756 * features/tic6x-c64xp-linux.c: Re-generated.
8757
35b4818d
YQ
87582017-07-26 Yao Qi <yao.qi@linaro.org>
8759
8760 * i386-linux-tdep.c (i386_linux_read_description): New function.
8761 (i386_linux_core_read_description): Call
8762 i386_linux_read_description.
8763 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8764 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8765 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8766 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8767 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8768 * x86-linux-nat.c (x86_linux_read_description): Call
8769 i386_linux_read_description.
8770
8e2141c6
YQ
87712017-07-26 Yao Qi <yao.qi@linaro.org>
8772
8773 * NEWS: Mention it.
8774 * features/Makefile (%.c: %.xml): Pass the xml file name to
8775 command "maint print c-tdesc".
8776 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8777 name from 'arg'.
8778
b468ff4c
YQ
87792017-07-26 Yao Qi <yao.qi@linaro.org>
8780
8781 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8782 in-class initialization.
8783 (tdesc_create_feature): Call new instead of XCNEW.
8784 (free_target_description): Ue delete.
8785
b9c0e1b4
JB
87862017-07-25 John Baldwin <jhb@FreeBSD.org>
8787
8788 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8789
a04b5337
YQ
87902017-07-25 Yao Qi <yao.qi@linaro.org>
8791
8792 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8793 constant.
8794 (amd64_x32_init_abi): Likewise.
8795 * amd64-tdep.h (amd64_init_abi): Update declaration.
8796 (amd64_x32_init_abi): Likewise.
8797
02ad7fc2
YQ
87982017-07-25 Yao Qi <yao.qi@linaro.org>
8799
8800 PR tdep/21717
8801 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8802 condition for FPSCR.
8803 (arm_linux_store_inferior_registers): Likewise.
8804
b6f48cb0
TT
88052017-07-22 Tom Tromey <tom@tromey.com>
8806
8807 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8808 <syscalls_counts>: Now a std::vector.
8809 (get_catch_syscall_inferior_data): Use "new".
8810 (catch_syscall_inferior_data_cleanup): Use "delete".
8811 (insert_catch_syscall, remove_catch_syscall)
8812 (clear_syscall_counts): Update.
8813
e12c9b7a
TT
88142017-07-22 Tom Tromey <tom@tromey.com>
8815
8816 * break-catch-syscall.c (syscall_catchpoint)
8817 <syscalls_to_be_caught>: Now a std::vector<int>
8818 (~syscall_catchpoint): Remove.
8819 (insert_catch_syscall, remove_catch_syscall)
8820 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8821 (print_mention_catch_syscall, print_recreate_catch_syscall):
8822 Update.
8823 (create_syscall_event_catchpoint): Change type of "filter"
8824 parameter.
8825 (catch_syscall_split_args): Return a std::vector.
8826 (catch_syscall_command_1, catching_syscall_number_1): Update.
8827
4fa8aeac
TT
88282017-07-22 Tom Tromey <tom@tromey.com>
8829
8830 * break-catch-throw.c (struct exception_catchpoint)
8831 <exception_rx>: Now a std::string.
8832 (~exception_catchpoint): Remove.
8833 (print_one_detail_exception_catchpoint): Update.
8834 (handle_gnu_v3_exceptions): Change type of except_rx.
8835 (extract_exception_regexp): Return a std::string.
8836 (catch_exception_command_1): Update.
8837
f746a154
TT
88382017-07-22 Tom Tromey <tom@tromey.com>
8839
8840 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8841 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8842 std::vector.
8843 <catch_all>: Now a bool.
8844 (~signal_catchpoint): Remove.
8845 (signal_catchpoint_insert_location)
8846 (signal_catchpoint_remove_location)
8847 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8848 (signal_catchpoint_print_mention)
8849 (signal_catchpoint_print_recreate)
8850 (signal_catchpoint_explains_signal): Update.
8851 (create_signal_catchpoint): Change type of "filter" and
8852 "catch_all".
8853 (catch_signal_split_args): Return a std::vector. Change type of
8854 "catch_all".
8855 (catch_signal_command): Update.
8856
47e77640
PA
88572017-07-20 Pedro Alves <palves@redhat.com>
8858
8859 * ada-lang.c (ada_language_defn): Make extern.
8860 (_initialize_ada_language): Remove add_language call.
8861 * c-lang.c (c_language_defn, cplus_language_defn)
8862 (asm_language_defn, minimal_language_defn): Make extern.
8863 (_initialize_c_language): Delete.
8864 * completer.c (compare_cstrings): Delete, moved to utils.h.
8865 * d-lang.c (d_language_defn): Make extern.
8866 (_initialize_d_language): Remove add_language calls.
8867 * defs.h (enum language): Add comment.
8868 * f-lang.c (f_language_defn): Make extern.
8869 (_initialize_f_language): Remove add_language call.
8870 * go-lang.c (go_language_defn): Make extern.
8871 (_initialize_go_language): Remove add_language call.
8872 * language.c: Include <algorithm>.
8873 (languages): Redefine as const array.
8874 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8875 (set_language_command): Handle "local". Use for-range loop.
8876 (set_language): Remove loop.
8877 (language_enum): Rewrite.
8878 (language_def, language_str): Remove loops.
8879 (add_language): Delete.
8880 (add_set_language_command): New, based on add_languages.
8881 (skip_language_trampoline): Adjust.
8882 (local_language_defn): Delete.
8883 (language_gdbarch_post_init): Adjust.
8884 (_initialize_language): Remove add_language calls. Call
8885 add_set_language_command.
8886 * language.h (add_language): Delete.
8887 (auto_language_defn)
8888 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8889 (asm_language_defn, c_language_defn, cplus_language_defn)
8890 (d_language_defn, f_language_defn, go_language_defn)
8891 (m2_language_defn, objc_language_defn, opencl_language_defn)
8892 (pascal_language_defn, rust_language_defn): Declare.
8893 * m2-lang.c (m2_language_defn): Make extern.
8894 (_initialize_m2_language): Remove add_language call.
8895 * objc-lang.c (objc_language_defn): Make extern.
8896 (_initialize_objc_language): Remove add_language call.
8897 * opencl-lang.c (opencl_language_defn): Make extern.
8898 (_initialize_opencl_language): Remove add_language call.
8899 * p-lang.c (pascal_language_defn): Make extern.
8900 (_initialize_pascal_language): Delete.
8901 * rust-lang.c (rust_language_defn): Make extern.
8902 (_initialize_rust_language): Delete.
8903 * utils.h (compare_cstrings): New static inline function.
8904
edb0c9cb
PA
89052017-07-20 Pedro Alves <palves@redhat.com>
8906
8907 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8908 (get_var_value): Constify parameters.
8909 (get_int_var_value): Change prototype.
8910 (to_fixed_range_type): Adjust.
8911 * ada-lang.h (get_int_var_value): Change prototype.
8912
a778f165
PA
89132017-07-20 Pedro Alves <palves@redhat.com>
8914
8915 * dwarf2read.c (dw2_lookup_symbol): Use
8916 SYMBOL_MATCHES_SEARCH_NAME.
8917 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8918
42edd901
PA
89192017-07-20 Pedro Alves <palves@redhat.com>
8920
8921 * block.c (block_iter_name_step, block_iter_name_first)
8922 (block_iter_name_next): Delete.
8923 (block_lookup_symbol_primary): Adjust to use
8924 dict_iter_match_first/dict_iter_match_next.
8925 * block.h (block_iter_name_first, block_iter_name_next): Delete
8926 declarations.
8927 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8928 dict_iter_match_first/dict_iter_match_next.
8929
cf325299
PA
89302017-07-20 Pedro Alves <palves@redhat.com>
8931
8932 * cp-support.c (cp_find_first_component_aux): Add missing case for
8933 end of string.
8934
c5ed0576
DB
89352017-07-18 David Blaikie <dblaikie@gmail.com>
8936
8937 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8938 of dwo_cu's dwo_file.
8939
27841e76
YQ
89402017-07-18 Yao Qi <yao.qi@linaro.org>
8941
8942 * remote.c (store_registers_using_G): Remove one line comment.
8943
cfb7e58b
YQ
89442017-07-18 Yao Qi <yao.qi@linaro.org>
8945
8946 * regcache.c (regcache_cpy): Simplify it.
8947 (regcache::cpy_no_passthrough): Remove it.
8948 * regcache.h (cpy_no_passthrough): Remove it.
8949 (regcache_dup, regcache_cpy): Update comments.
8950
386535dd
PA
89512017-07-18 Pedro Alves <palves@redhat.com>
8952
8953 * remote-sim.c (sim_command_completer): Adjust to work with a
8954 completion_tracker instead of a VEC.
8955
c45ec17c
PA
89562017-07-17 Pedro Alves <palves@redhat.com>
8957
8958 * completer.c (complete_source_filenames): New function.
8959 (complete_address_and_linespec_locations): New function.
8960 (location_completer): Use complete_address_and_linespec_locations.
8961 (completion_tracker::build_completion_result): Honor the tracker's
8962 request to suppress append.
8963 * completer.h (completion_tracker::suppress_append_ws)
8964 (completion_tracker::set_suppress_append_ws): New methods.
8965 (completion_tracker::m_suppress_append_ws): New field.
8966 (complete_source_filenames): New declaration.
8967 * linespec.c (linespec_complete_what): New.
8968 (struct ls_parser) <complete_what, completion_word,
8969 completion_quote_char, completion_quote_end, completion_tracker>:
8970 New fields.
8971 (string_find_incomplete_keyword_at_end): New.
8972 (linespec_lexer_lex_string): Record quote char. If in completion
8973 mode, don't throw.
8974 (linespec_lexer_consume_token): Advance the completion word point.
8975 (linespec_lexer_peek_token): Save/restore completion info.
8976 (save_stream_and_consume_token): New.
8977 (set_completion_after_number): New.
8978 (linespec_parse_basic): Set what to complete next depending on
8979 token. Handle function and label completions specially.
8980 (parse_linespec): Disable objc shortcut in completion mode. Set
8981 what to complete next depending on token type. Skip keyword if in
8982 completion mode.
8983 (complete_linespec_component, linespec_complete): New.
8984 * linespec.h (linespec_complete): Declare.
8985
be966d42
PA
89862017-07-17 Pedro Alves <palves@redhat.com>
8987
8988 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8989 Handle 'operator<' / 'operator<<'.
8990
a2459270
PA
89912017-07-17 Pedro Alves <palves@redhat.com>
8992
8993 * completer.c (collect_explicit_location_matches): Handle
8994 MATCH_LABEL.
8995 (convert_explicit_location_to_linespec): New, factored out from
8996 ...
8997 (convert_explicit_location_to_sals): ... this.
8998 (complete_label): New.
8999 (linespec_complete_label, find_label_symbols_in_block): New.
9000 (find_label_symbols): Add completion_mode parameter and adjust to
9001 call find_label_symbols_in_block.
9002 * linespec.h (linespec_complete_label): Declare.
9003
c6756f62
PA
90042017-07-17 Pedro Alves <palves@redhat.com>
9005
9006 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9007 complete_symbol_mode parameter.
9008 * cli/cli-cmds.c (complete_command): Get the completion result out
9009 of the handle_brkchars tracker if used a custom word point.
9010 * completer.c: Include "linespec.h".
9011 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9012 (advance_to_expression_complete_word_point): New.
9013 (completion_tracker::completes_to_completion_word): New.
9014 (complete_files_symbols): Pass down
9015 complete_symbol_mode::EXPRESSION.
9016 (explicit_options, probe_options): New.
9017 (collect_explicit_location_matches): Complete on the
9018 explictit_loc->foo instead of word. Use
9019 linespec_complete_function. Handle MATCH_LINE. Handle offering
9020 keyword and options completions.
9021 (backup_text_ptr): Delete.
9022 (skip_keyword): New.
9023 (complete_explicit_location): Remove 'word' parameter. Add
9024 language, quoted_arg_start and quoted_arg_end parameters.
9025 Rewrite, parsing left to right.
9026 (location_completer): Rewrite.
9027 (location_completer_handle_brkchars): New function.
9028 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9029 (enum complete_line_internal_reason): Adjust comments.
9030 (completion_tracker::discard_completions): New.
9031 (completer_handle_brkchars_func_for_completer): Handle
9032 location_completer.
9033 (gdb_custom_word_point_brkchars)
9034 (gdb_org_rl_basic_quote_characters): New.
9035 (gdb_completion_word_break_characters_throw)
9036 (completion_find_completion_word): Handle trackers that use a
9037 custom word point.
9038 (completion_tracker::advance_custom_word_point_by): New.
9039 (completion_tracker::build_completion_result): Don't rely on
9040 readline appending the quote char.
9041 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9042 use a custom word point.
9043 (gdb_rl_attempted_completion_function): Restore
9044 rl_basic_quote_characters.
9045 * completer.h (class completion_tracker): Extend intro comment.
9046 (completion_tracker::set_quote_char)
9047 (completion_tracker::quote_char)
9048 (completion_tracker::set_use_custom_word_point)
9049 (completion_tracker::use_custom_word_point)
9050 (completion_tracker::custom_word_point)
9051 (completion_tracker::set_custom_word_point)
9052 (completion_tracker::advance_custom_word_point_by)
9053 (completion_tracker::completes_to_completion_word)
9054 (completion_tracker::discard_completions): New methods.
9055 (completion_tracker::m_quote_char)
9056 (completion_tracker::m_use_custom_word_point)
9057 (completion_tracker::m_custom_word_point): New fields.
9058 (advance_to_expression_complete_word_point): Declare.
9059 * f-lang.c (f_collect_symbol_completion_matches): Add
9060 complete_symbol_mode parameter.
9061 * language.h (struct language_defn)
9062 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9063 parameter.
9064 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9065 (linespec_complete_function): New function.
9066 (linespec_lexer_lex_keyword): Adjust.
9067 * linespec.h (linespec_keywords, linespec_complete_function): New
9068 declarations.
9069 * location.c (find_end_quote): New function.
9070 (explicit_location_lex_one): Add explicit_completion_info
9071 parameter. Save quoting info. Don't throw if being called for
9072 completion. Don't handle Ada operators here.
9073 (is_cp_operator, skip_op_false_positives, first_of)
9074 (explicit_location_lex_one_function): New function.
9075 (string_to_explicit_location): Replace 'dont_throw' parameter with
9076 an explicit_completion_info pointer parameter. Handle it. Don't
9077 use explicit_location_lex_one to lex function names. Use
9078 explicit_location_lex_one_function instead.
9079 * location.h (struct explicit_completion_info): New.
9080 (string_to_explicit_location): Replace 'dont_throw' parameter with
9081 an explicit_completion_info pointer parameter.
9082 * symtab.c (default_collect_symbol_completion_matches_break_on):
9083 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9084 (default_collect_symbol_completion_matches)
9085 (collect_symbol_completion_matches): Add complete_symbol_mode
9086 parameter.
9087 (collect_symbol_completion_matches_type): Pass down
9088 complete_symbol_mode::EXPRESSION.
9089 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9090 parameter. Handle LINESPEC mode.
9091 * symtab.h (complete_symbol_mode): New.
9092 (default_collect_symbol_completion_matches_break_on)
9093 (default_collect_symbol_completion_matches)
9094 (collect_symbol_completion_matches)
9095 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9096 parameter.
9097
1d550c82
PA
90982017-07-17 Pedro Alves <palves@redhat.com>
9099
9100 * utils.c (enum class strncmp_iw_mode): New.
9101 (strcmp_iw): Rename to ...
9102 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9103 parameters. Handle them.
9104 (strncmp_iw): New.
9105 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9106 * utils.h (strncmp_iw): Declare.
9107 (strcmp_iw): Move describing comments here.
9108
8090b426
PA
91092017-07-17 Pedro Alves <palves@redhat.com>
9110
9111 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9112 CP_OPERATOR_STR.
9113 * c-typeprint.c (is_type_conversion_operator): Use
9114 CP_OPERATOR_STR.
9115 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9116 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9117 CP_OPERATOR_LEN.
9118 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9119 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9120 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9121 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9122 CP_OPERATOR_STR.
9123 * location.c: Include "cp-support.h".
9124 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9125 CP_OPERATOR_STR.
9126 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9127 CP_OPERATOR_LEN.
9128
6a2c1b87
PA
91292017-07-17 Pedro Alves <palves@redhat.com>
9130
9131 * cli/cli-cmds.c (complete_command): Use a completion tracker
9132 along with completion_find_completion_word for handle_brkchars
9133 phase.
9134 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9135 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9136 (struct gdb_rl_completion_word_info): New.
9137 (gdb_rl_find_completion_word): New.
9138 (completion_find_completion_word): New.
9139 * completer.h (completion_find_completion_word): Declare.
9140
eb3ff9a5
PA
91412017-07-17 Pedro Alves <palves@redhat.com>
9142
9143 * ada-lang.c (symbol_completion_match): Adjust comments.
9144 (symbol_completion_add): Replace vector parameter with
9145 completion_tracker parameter. Use it.
9146 (ada_make_symbol_completion_list): Rename to...
9147 (ada_collect_symbol_completion_matches): ... this. Add
9148 completion_tracker parameter and use it.
9149 (ada_language_defn): Adjust.
9150 * break-catch-syscall.c (catch_syscall_completer): Adjust
9151 prototype and work with completion_tracker instead of VEC.
9152 * breakpoint.c (condition_completer): Adjust prototype and work
9153 with completion_tracker instead of VEC.
9154 * c-lang.c (c_language_defn, cplus_language_defn)
9155 (asm_language_defn, minimal_language_defn): Adjust to renames.
9156 * cli/cli-cmds.c (complete_command): Rework using
9157 completion_tracker. Catch exceptions when completing.
9158 * cli/cli-decode.c (integer_unlimited_completer)
9159 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9160 with completion_tracker instead of VEC.
9161 * command.h (struct completion_tracker): Forward declare.
9162 (completer_ftype, completer_handle_brkchars_ftype): Change
9163 types.
9164 (complete_on_cmdlist, complete_on_enum): Adjust.
9165 * completer.c: Include <algorithm>.
9166 (struct gdb_completer_state): New.
9167 (current_completion): New global.
9168 (readline_line_completion_function): Delete.
9169 (noop_completer, filename_completer)
9170 (filename_completer_handle_brkchars, complete_files_symbols)
9171 (linespec_location_completer): Adjust to work with a
9172 completion_tracker instead of a VEC.
9173 (string_or_empty): New.
9174 (collect_explicit_location_matches): Adjust to work with a
9175 completion_tracker instead of a VEC.
9176 (explicit_location_completer): Rename to ...
9177 (complete_explicit_location): ... this and adjust to work with a
9178 completion_tracker instead of a VEC.
9179 (location_completer): Adjust to work with a completion_tracker
9180 instead of a VEC.
9181 (add_struct_fields): Adjust to work with a completion_list instead
9182 of VEC.
9183 (expression_completer): Rename to ...
9184 (complete_expression): ... this and adjust to work with a
9185 completion_tracker instead of a VEC. Use complete_files_symbols.
9186 (expression_completer): Reimplement on top of complete_expression.
9187 (symbol_completer): Adjust to work with a completion_tracker
9188 instead of a VEC.
9189 (enum complete_line_internal_reason): Add describing comments.
9190 (complete_line_internal_normal_command): Adjust to work with a
9191 completion_tracker instead of a VEC.
9192 (complete_line_internal): Rename to ...
9193 (complete_line_internal_1): ... this and adjust to work with a
9194 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9195 handle_brkchars phase.
9196 (new_completion_tracker): Delete.
9197 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9198 complete_line_internal_1.
9199 (free_completion_tracker): Delete.
9200 (INITIAL_COMPLETION_HTAB_SIZE): New.
9201 (completion_tracker::completion_tracker)
9202 (completion_tracker::~completion_tracker): New.
9203 (maybe_add_completion): Delete.
9204 (completion_tracker::maybe_add_completion)
9205 (completion_tracker::add_completion)
9206 (completion_tracker::add_completions): New.
9207 (throw_max_completions_reached_error): Delete.
9208 (complete_line): Adjust to work with a completion_tracker instead
9209 of a VEC. Don't create a completion_tracker_t or check for max
9210 completions here.
9211 (command_completer, command_completer_handle_brkchars)
9212 (signal_completer, reg_or_group_completer_1)
9213 (reg_or_group_completer, default_completer_handle_brkchars):
9214 Adjust to work with a completion_tracker.
9215 (gdb_completion_word_break_characters_throw): New.
9216 (gdb_completion_word_break_characters): Reimplement.
9217 (line_completion_function): Delete.
9218 (completion_tracker::recompute_lowest_common_denominator)
9219 (expand_preserving_ws)
9220 (completion_tracker::build_completion_result)
9221 (completion_result::completion_result)
9222 (completion_result::completion_result)
9223 (completion_result::~completion_result)
9224 (completion_result::completion_result)
9225 (completion_result::release_match_list, compare_cstrings)
9226 (completion_result::sort_match_list)
9227 (completion_result::reset_match_list)
9228 (gdb_rl_attempted_completion_function_throw)
9229 (gdb_rl_attempted_completion_function): New.
9230 * completer.h (completion_list, struct completion_result)
9231 (class completion_tracker): New.
9232 (complete_line): Add completion_tracker parameter.
9233 (readline_line_completion_function): Delete.
9234 (gdb_rl_attempted_completion_function): New.
9235 (noop_completer, filename_completer, expression_completer)
9236 (location_completer, symbol_completer, command_completer)
9237 (signal_completer, reg_or_group_completer): Update prototypes.
9238 (completion_tracker_t, new_completion_tracker)
9239 (make_cleanup_free_completion_tracker): Delete.
9240 (enum maybe_add_completion_enum): Delete.
9241 (maybe_add_completion): Delete.
9242 (throw_max_completions_reached_error): Delete.
9243 * corefile.c (complete_set_gnutarget): Adjust to work with a
9244 completion_tracker instead of a VEC.
9245 * cp-abi.c (cp_abi_completer): Adjust to work with a
9246 completion_tracker instead of a VEC.
9247 * d-lang.c (d_language_defn): Adjust.
9248 * disasm.c (disassembler_options_completer): Adjust to work with a
9249 completion_tracker instead of a VEC.
9250 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9251 (f_collect_symbol_completion_matches): ... this. Adjust to work
9252 with a completion_tracker instead of a VEC.
9253 (f_language_defn): Adjust.
9254 * go-lang.c (go_language_defn): Adjust.
9255 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9256 Adjust to work with a completion_tracker instead of a VEC.
9257 * infrun.c (handle_completer): Likewise.
9258 * interps.c (interpreter_completer): Likewise.
9259 * interps.h (interpreter_completer): Likewise.
9260 * language.c (unknown_language_defn, auto_language_defn)
9261 (local_language_defn): Adjust.
9262 * language.h (language_defn::la_make_symbol_completion_list):
9263 Rename to ...
9264 (language_defn::la_collect_symbol_completion_matches): ... this
9265 and adjust to work with a completion_tracker instead of a VEC.
9266 * m2-lang.c (m2_language_defn): Adjust.
9267 * objc-lang.c (objc_language_defn): Adjust.
9268 * opencl-lang.c (opencl_language_defn): Adjust.
9269 * p-lang.c (pascal_language_defn): Adjust.
9270 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9271 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9272 with a completion_tracker.
9273 * rust-lang.c (rust_language_defn): Adjust.
9274 * symtab.c (free_completion_list, do_free_completion_list)
9275 (return_val, completion_tracker): Delete.
9276 (completion_list_add_name, completion_list_add_symbol)
9277 (completion_list_add_msymbol, completion_list_objc_symbol)
9278 (completion_list_add_fields, add_symtab_completions): Add
9279 completion_tracker parameter and use it.
9280 (default_make_symbol_completion_list_break_on_1): Rename to...
9281 (default_collect_symbol_completion_matches_break_on): ... this.
9282 Add completion_tracker parameter and use it instead of allocating
9283 a completion tracker here.
9284 (default_make_symbol_completion_list_break_on): Delete old
9285 implementation.
9286 (default_make_symbol_completion_list): Delete.
9287 (default_collect_symbol_completion_matches): New.
9288 (make_symbol_completion_list): Delete.
9289 (collect_symbol_completion_matches): New.
9290 (make_symbol_completion_type): Rename to ...
9291 (collect_symbol_completion_matches_type): ... this. Add
9292 completion_tracker parameter and use it instead of VEC.
9293 (make_file_symbol_completion_list_1): Rename to...
9294 (collect_file_symbol_completion_matches): ... this. Add
9295 completion_tracker parameter and use it instead of VEC.
9296 (make_file_symbol_completion_list): Delete.
9297 (add_filename_to_list): Use completion_list instead of a VEC.
9298 (add_partial_filename_data::list): Now a completion_list.
9299 (make_source_files_completion_list): Work with a completion_list
9300 instead of a VEC.
9301 * symtab.h: Include "completer.h".
9302 (default_make_symbol_completion_list_break_on)
9303 (default_make_symbol_completion_list, make_symbol_completion_list)
9304 (make_symbol_completion_type, make_file_symbol_completion_list)
9305 (make_source_files_completion_list): Delete.
9306 (default_collect_symbol_completion_matches_break_on)
9307 (default_collect_symbol_completion_matches)
9308 (collect_symbol_completion_matches)
9309 (collect_symbol_completion_matches_type)
9310 (collect_file_symbol_completion_matches)
9311 (make_source_files_completion_list): New.
9312 * top.c (init_main): Don't install a rl_completion_entry_function
9313 hook. Install a rl_attempted_completion_function hook instead.
9314 * tui/tui-layout.c (layout_completer): Adjust to work with a
9315 completion_tracker.
9316 * tui/tui-regs.c (tui_reggroup_completer):
9317 * tui/tui-win.c (window_name_completer, focus_completer)
9318 (winheight_completer): Adjust to work with a completion_tracker.
9319 * value.c: Include "completer.h".
9320 (complete_internalvar): Adjust to work with a completion_tracker.
9321 * value.h (complete_internalvar): Likewise.
9322
6e1dbf8c
PA
93232017-07-17 Pedro Alves <palves@redhat.com>
9324
9325 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9326 renames.
9327 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9328 comments to completer_ftype's declaration.
9329 <completer_handle_brkchars>: Change type to
9330 completer_handle_brkchars_ftype.
9331 * command.h (completer_ftype): Add describing comment and give
9332 names to parameters.
9333 (completer_ftype_void): Rename to ...
9334 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9335 (set_cmd_completer_handle_brkchars): Adjust.
9336 * completer.c (filename_completer_handle_brkchars): New function.
9337 (complete_line_internal_normal_command): New function, factored
9338 out from ...
9339 (complete_line_internal): ... here.
9340 (command_completer_handle_brkchars)
9341 (default_completer_handle_brkchars)
9342 (completer_handle_brkchars_func_for_completer): New functions.
9343 * completer.h (set_gdb_completion_word_break_characters): Delete
9344 declaration.
9345 (completer_handle_brkchars_func_for_completer): New declaration.
9346 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9347 completer_handle_brkchars_func_for_completer.
9348
78b13106
PA
93492017-07-17 Pedro Alves <palves@redhat.com>
9350
9351 * completer.c (symbol_completer): New function, based on
9352 make_symbol_completion_list_fn.
9353 * completer.h (symbol_completer): New declaration.
9354 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9355 * python/py-cmd.c (completers): Adjust.
9356 * symtab.c (make_symbol_completion_list_fn): Delete.
9357 * symtab.h (make_symbol_completion_list_fn): Delete.
9358 * cli/cli-decode.c (add_cmd): Adjust.
9359
bbf2f4df
PA
93602017-07-17 Pedro Alves <palves@redhat.com>
9361
9362 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9363 * dwarf2read.c: Include "filename-seen-cache.h".
9364 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9365 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9366 * filename-seen-cache.c: New file.
9367 * filename-seen-cache.h: New file.
9368 * symtab.c: Include "filename-seen-cache.h".
9369 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9370 (create_filename_seen_cache, clear_filename_seen_cache)
9371 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9372 to filename-seen-cache.h/filename-seen-cache.c.
9373 (output_source_filename, sources_info)
9374 (maybe_add_partial_symtab_filename)
9375 (make_source_files_completion_list): Adjust to use
9376 filename_seen_cache.
9377
330cdd98
PA
93782017-07-17 Pedro Alves <palves@redhat.com>
9379
9380 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9381 fields.
9382 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9383 dwarf2_debug_sections*)): New.
9384 (dwarf2_per_objfile::dwarf2_per_objfile(const
9385 dwarf2_per_objfile&)): Declare as deleted.
9386 (dwarf2_per_objfile::operator=): Declare as deleted.
9387 (dwarf2_per_objfile::dwarf2_per_objfile)
9388 (dwarf2_per_objfile::~dwarf2_per_objfile)
9389 (dwarf2_per_objfile::free_cached_comp_units): New.
9390 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9391 ctor. Call dwarf2_per_objfile's ctor manually.
9392 (dwarf2_locate_sections): Deleted/refactored as ...
9393 (dwarf2_per_objfile::locate_sections): ... this new method.
9394 (free_cached_comp_units): Defer to
9395 dwarf2_per_objfile::free_cached_comp_units.
9396 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9397
8880f2a9
TT
93982017-07-14 Tom Tromey <tom@tromey.com>
9399
9400 PR rust/21764:
9401 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9402 parameter.
9403 <UNOP_SIZEOF>: Split into separate case.
9404 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9405
65547233
TT
94062017-07-14 Tom Tromey <tom@tromey.com>
9407
9408 PR rust/21763:
9409 * symtab.c (symbol_matches_domain): Add language_rust to special
9410 case.
9411 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9412 treat LOC_TYPEDEF symbols as variables.
9413
8f14146e
PA
94142017-07-14 Pedro Alves <palves@redhat.com>
9415
9416 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9417 symtabs matching all symtabs with SRCFILE as file name instead of
9418 only considering the first hit, with lookup_symtab.
9419
2347965c
SM
94202017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9421
9422 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9423 operator_name parameters.
9424 (gen_expr): Update function call.
9425
40f4af28
SM
94262017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9427
9428 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9429 parameter.
9430 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9431 Likewise.
9432 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9433 parameter, use agent_expr::gdbarch instead, update function
9434 calls.
9435 (locexpr_tracepoint_var_ref): Likewise.
9436 (loclist_tracepoint_var_ref): Likewise.
9437 * ax-gdb.c (gen_trace_static_fields): Likewise.
9438 (gen_traced_pop): Likewise.
9439 (gen_frame_args_address): Likewise.
9440 (gen_frame_locals_address): Likewise.
9441 (gen_var_ref): Likewise.
9442 (gen_struct_ref_recursive): Likewise.
9443 (gen_static_field): Likewise.
9444 (gen_maybe_namespace_elt): Likewise.
9445 (gen_expr): Likewise.
9446 (gen_trace_for_var): Likewise.
9447 (gen_trace_for_expr): Likewise.
9448 (gen_trace_for_return_address): Likewise.
9449
053f8057
SM
94502017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9451
9452 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9453 parameter.
9454 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9455
6661ad48
SM
94562017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9457
9458 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9459 from ax, update calls.
9460 (gen_usual_arithmetic): Likewise.
9461 (gen_integral_promotions): Likewise.
9462 (gen_bitfield_ref): Likewise.
9463 (gen_primitive_field): Likewise.
9464 (gen_struct_ref_recursive): Likewise.
9465 (gen_struct_ref): Likewise.
9466 (gen_maybe_namespace_elt): Likewise.
9467 (gen_struct_elt_for_reference): Likewise.
9468 (gen_namespace_elt): Likewise.
9469 (gen_aggregate_elt_ref): Likewise.
9470 (gen_expr): Get gdbarch from ax, update calls.
9471 (gen_expr_binop_rest): Likewise.
9472
c55a47e7
PA
94732017-07-13 Pedro Alves <palves@redhat.com>
9474
9475 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9476 as default tdesc.
9477 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9478 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9479 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9480 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9481 tdep.
9482 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9483 Get final tdesc from the tdep.
9484 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9485 default tdesc.
9486 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9487 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9488 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9489 Use it as default tdesc.
9490 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9491 down to amd_init_abi. No longer handle fallback tdesc here.
9492 * amd64-tdep.h (tdesc_x32): Declare.
9493 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9494 parameter.
9495 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9496 as default tdesc.
9497
55efceab
AA
94982017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9499
9500 * s390-linux-tdep.c (s390_process_record): Add support for
9501 instructions new in arch12.
9502
0aa37b65
JB
95032017-07-11 John Baldwin <jhb@FreeBSD.org>
9504
9505 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9506 PT_GETFSBASE and PT_GETGSBASE.
9507 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9508 PT_SETGSBASE.
9509
48aeef91
JB
95102017-07-11 John Baldwin <jhb@FreeBSD.org>
9511
9512 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9513 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9514 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9515 those rules.
9516 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9517 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9518 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9519 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9520 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9521 * features/i386/amd64.xml: Add 64bit-segments.xml.
9522 * features/i386/amd64-avx-avx512.c: Regenerated.
9523 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9524 * features/i386/amd64-avx-mpx.c: Regenerated.
9525 * features/i386/amd64-avx.c: Regenerated.
9526 * features/i386/amd64-mpx.c: Regenerated.
9527 * features/i386/amd64.c: Regenerated.
9528 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9529 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9530 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9531 * regformats/i386/amd64-avx.dat: Regenerated.
9532 * regformats/i386/amd64-mpx.dat: Regenerated.
9533 * regformats/i386/amd64.dat: Regenerated.
9534
77c501bc
YQ
95352017-07-10 Yao Qi <yao.qi@linaro.org>
9536
9537 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9538 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9539
6dc8d757
AK
95402017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9541
9542 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9543 unsetenv.
9544 * gnulib/aclocal.m4: Regenerate.
9545 * gnulib/config.in: Regenerate.
9546 * gnulib/configure: Regenerate.
9547 * gnulib/import/Makefile.am: Regenerate.
9548 * gnulib/import/Makefile.in: Regenerate.
9549 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9550 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9551 * gnulib/import/m4/environ.m4: New file.
9552 * gnulib/import/m4/setenv.m4: New file.
9553 * gnulib/import/setenv.c: New file.
9554 * gnulib/import/unsetenv.c: New file.
9555
266934d1
SM
95562017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9557
9558 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9559 address when op is DW_OP_addr.
9560
03278692
TT
95612017-07-09 Tom Tromey <tom@tromey.com>
9562
9563 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9564 check and apply to outer type.
9565
4b654465
JB
95662017-07-07 John Baldwin <jhb@FreeBSD.org>
9567
9568 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9569 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9570 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9571 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9572
2af9fc44
JB
95732017-07-07 John Baldwin <jhb@FreeBSD.org>
9574
9575 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9576
382b69bb
JB
95772017-07-07 John Baldwin <jhb@FreeBSD.org>
9578
9579 * corelow.c (get_core_siginfo): Remove.
9580 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9581 instead of get_core_siginfo.
9582 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9583 * gdbarch.h: Re-generate.
9584 * gdbarch.c: Re-generate.
9585 * linux-tdep.c (linux_core_xfer_siginfo): New.
9586 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9587
6e5eab33
JB
95882017-07-07 John Baldwin <jhb@FreeBSD.org>
9589
9590 * corelow.c (thread_section_name): Move to ...
9591 * gdbcore.h (thread_section_name): ... here.
9592
929edea9
JB
95932017-07-07 John Baldwin <jhb@FreeBSD.org>
9594
9595 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9596 (struct siginfo32): New.
9597 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9598 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9599 via ptrace(PT_LWPINFO).
9600
762c974a
JB
96012017-07-07 John Baldwin <jhb@FreeBSD.org>
9602
9603 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9604 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9605 (fbsd_get_siginfo_type): New.
9606 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9607 (_initialize_fbsd_tdep): New.
9608
33c5cd75
DB
96092017-07-06 David Blaikie <dblaikie@gmail.com>
9610
9611 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9612 a singular dwo_unit*) to support multiple CUs in the same way that
9613 multiple TUs are supported.
9614 (create_cus_hash_table): Replace create_dwo_cu with a function for
9615 parsing multiple CUs from a DWO file.
9616 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9617 create_dwo_cu.
9618 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9619 htab_find, rather than comparing the signature to a singleton CU in
9620 the dwo_file.
9621
8455d262
PA
96222017-07-06 Pedro Alves <palves@redhat.com>
9623
9624 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9625
4da3eb35
PA
96262017-07-04 Pedro Alves <palves@redhat.com>
9627
9628 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9629 * gdbtypes.h (TYPE_STATIC): Delete.
9630 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9631 is_synchronized, is_native>: Delete.
9632 <dummy>: Bump.
9633 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9634 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9635 (TYPE_FN_FIELD_ABSTRACT): Delete.
9636
5bfd255c
SM
96372017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9638
9639 * buffer.h (buffer_finish): Fix spelling mistakes.
9640
25c54127
EZ
96412017-07-01 Eli Zaretskii <eliz@gnu.org>
9642
9643 * .dir-locals.el: Automatically switch to C-style comments in
9644 versions of Emacs that support the feature.
9645
dc4bde35
SDJ
96462017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9647 Pedro Alves <palves@redhat.com>
9648
9649 PR cli/21688
9650 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9651 (process_next_line): New variable 'inline_cmd'.
9652 Adjust 'if' clauses for "python", "compile" and "guile" to use
9653 'command_name_equals' and check for '!inline_cmd'.
9654
51ed89aa
SDJ
96552017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9656
9657 PR cli/21688
9658 * cli/cli-script.c (command_name_equals_not_inline): New function.
9659 (process_next_line): Adjust 'if' clauses for "python", "compile"
9660 and "guile" to use command_name_equals_not_inline.
9661
eb17d413
PA
96622017-06-29 Pedro Alves <palves@redhat.com>
9663
9664 * completer.c (expression_completer): Call
9665 linespec_location_completer instead of location_completer.
9666
195bcdd5
PA
96672017-06-29 Pedro Alves <palves@redhat.com>
9668
9669 * completer.c (expression_completer): Remove code that recomputes
9670 'text' from 'word'.
9671
adc764e7
YQ
96722017-06-29 Yao Qi <yao.qi@linaro.org>
9673
9674 * regformats/regdat.sh: Generate code with
9675 "ifndef IN_PROCESS_AGENT".
9676
6e75794e
PA
96772017-06-28 Pedro Alves <palves@redhat.com>
9678
9679 * command.h: Include "common/scoped_restore.h".
9680
bc491f2e
YQ
96812017-06-28 Yao Qi <yao.qi@linaro.org>
9682
9683 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9684 instead of obstack_grow.
9685
41664b45
DG
96862017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9687
9688 PR gdb/21337
9689 * symfile.c (reread_symbols): Call objfiles_changed just before
9690 read_symbols.
9691
6da67eb1
PA
96922017-06-27 Pedro Alves <palves@redhat.com>
9693
9694 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9695 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9696 (completion_list_add_symbol, completion_list_add_msymbol):
9697 ... these new functions.
9698 (add_symtab_completions)
9699 (default_make_symbol_completion_list_break_on_1): Adjust.
9700
23732b1e
PA
97012017-06-27 Pedro Alves <palves@redhat.com>
9702
9703 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9704 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9705 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9706 dtor.
9707 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9708 'storage_obstack' field an auto_obstack. In-class initialize all
9709 non-bitfield fields. Make minsyms_read bool.
9710 * symfile.c (read_symbols): Adjust.
9711
a4d1e79a
AH
97122017-06-27 Alan Hayward <alan.hayward@arm.com>
9713
9714 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9715 (gdbsim_store_register): Likewise.
9716
8268c778
PA
97172017-06-27 Pedro Alves <palves@redhat.com>
9718
9719 * c-exp.y (name_obstack): Now an auto_obstack.
9720 (yylex): Use auto_obstack::clear.
9721 (c_parse): Use auto_obstack::clear instead of reinitializing and
9722 freeing the obstack.
9723 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9724 * d-exp.y (name_obstack): Now an auto_obstack.
9725 (yylex): Use auto_obstack::clear.
9726 (d_parse): Use auto_obstack::clear instead of reinitializing and
9727 freeing the obstack.
9728 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9729 auto_obstack.
9730 * dwarf2read.c (create_addrmap_from_index)
9731 (dwarf2_build_psymtabs_hard)
9732 (update_enumeration_type_from_children): Likewise.
9733 * gdb_obstack.h (auto_obstack): New type.
9734 * go-exp.y (name_obstack): Now an auto_obstack.
9735 (build_packaged_name): Use auto_obstack::clear.
9736 (go_parse): Use auto_obstack::clear instead of reinitializing and
9737 freeing the obstack.
9738 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9739 auto_obstack.
9740 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9741 * rust-exp.y (work_obstack): Now an auto_obstack.
9742 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9743 reinitializing and freeing the obstack.
9744 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9745 (host_char_to_target): Use auto_obstack.
9746 * utils.h (make_cleanup_obstack_free): Delete declaration.
9747 * valprint.c (generic_emit_char, generic_printstr): Use
9748 auto_obstack.
9749
db665f42
SM
97502017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9751
9752 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9753 thread.
9754 (darwin_init_thread_list): Don't update dummy thread.
9755 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9756
873c0814
SM
97572017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9758
9759 * record-full.c (netorder16): Remove.
9760
8b5a7a6e
SM
97612017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9762
9763 * common/diagnostics.h: Define macros for GCC.
9764 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9765 * common/vec.h: Include diagnostics.h.
9766 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9767 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9768 warning.
9769
d1435379
SM
97702017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9771
9772 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9773 New macro.
9774 * ada-lex.l: Ignore deprecated register warnings.
9775
cc75e0fd
SM
97762017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9777
9778 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9779 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9780
07809eaf
SM
97812017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9782
9783 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9784 its own line.
9785
f076f034
SM
97862017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9787
9788 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9789
0dd5cbc5
AH
97902017-06-23 Alan Hayward <alan.hayward@arm.com>
9791
9792 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9793 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9794 (xtensa_register_read_masked): Likewise.
9795
d4c6ce5b
SDJ
97962017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9797
9798 * common/environ.c (gdb_environ::unset): Update comment.
9799
16892a03
AH
98002017-06-22 Alan Hayward <alan.hayward@arm.com>
9801
9802 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9803 registers.
9804
d7dcbefc
AH
98052017-06-22 Alan Hayward <alan.hayward@arm.com>
9806
9807 * record-full.c (record_full_exec_insn): Use byte_vector.
9808
b30ff123
YQ
98092017-06-22 Yao Qi <yao.qi@linaro.org>
9810
9811 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9812 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9813
4fa847d7
AH
98142017-06-22 Alan Hayward <alan.hayward@arm.com>
9815
9816 * remote.c (cached_reg): Move from here...
9817 * regcache.h (cached_reg): ...to here.
9818 * python/py-unwind.c (struct reg_info): Remove.
9819 (cached_frame_info): Use cached_reg_t.
9820 (pyuw_prev_register): Likewise.
9821 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9822 (pyuw_dealloc_cache): Free all registers.
9823
f4906a9a
PA
98242017-06-22 Pedro Alves <palves@redhat.com>
9825 Simon Marchi <simon.marchi@ericsson.com>
9826
9827 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9828 warning.
9829 * common/diagnostics.h: New file.
9830
b45a1208
PA
98312017-06-22 Pedro Alves <palves@redhat.com>
9832
9833 * common/agent.h: Add include guards.
9834
e4da2c61
SM
98352017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9836
9837 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9838 talk about addressable units instead of bytes.
9839
96160d60
SDJ
98402017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9841
9842 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9843 of '::const_iterator'.
9844
9a6c7d9c
SDJ
98452017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9846
9847 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9848 'unittests/environ-selftests.c'.
9849 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9850 * charset.c (find_charset_names): Declare object 'iconv_env'.
9851 Update code to use 'iconv_env' object. Remove call to
9852 'free_environ'.
9853 * common/environ.c: Include <utility>.
9854 (make_environ): Delete function.
9855 (free_environ): Delete function.
9856 (gdb_environ::clear): New function.
9857 (gdb_environ::operator=): New function.
9858 (gdb_environ::get): Likewise.
9859 (environ_vector): Delete function.
9860 (set_in_environ): Delete function.
9861 (gdb_environ::set): New function.
9862 (unset_in_environ): Delete function.
9863 (gdb_environ::unset): New function.
9864 (gdb_environ::envp): Likewise.
9865 * common/environ.h: Include <vector>.
9866 (struct gdb_environ): Delete; transform into...
9867 (class gdb_environ): ... this class.
9868 (free_environ): Delete prototype.
9869 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9870 environ_vector): Likewise.
9871 * infcmd.c (run_command_1): Update code to call
9872 'envp' from 'gdb_environ' class.
9873 (environment_info): Update code to call methods from 'gdb_environ'
9874 class.
9875 (unset_environment_command): Likewise.
9876 (path_info): Likewise.
9877 (path_command): Likewise.
9878 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9879 (inferior::inferior): Initialize 'environment' using the host's
9880 information.
9881 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9882 Include "environ.h".
9883 (class inferior) <environment>: Change type from 'struct
9884 gdb_environ' to 'gdb_environ'.
9885 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9886 methods from 'gdb_environ' class.
9887 * solib.c (solib_find_1): Likewise
9888 * unittests/environ-selftests.c: New file.
9889
75c554cf
YQ
98902017-06-20 Yao Qi <yao.qi@linaro.org>
9891
9892 * features/i386/i386-linux.xml: Exchange the order of including
9893 32bit-linux.xml and 32bit-sse.xml.
9894 * features/i386/i386-linux.c: Regenerated.
9895
72ddacb7
YQ
98962017-06-20 Yao Qi <yao.qi@linaro.org>
9897
9898 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9899 Delete copy ctor and assignment operator.
9900 (tdesc_type): Likewise.
9901 (tdesc_feature): Likewise.
9902 (tdesc_free_reg): Remove.
9903 (tdesc_create_reg): Use new.
9904 (tdesc_free_type): Remove.
9905 (tdesc_create_vector): Use new.
9906 (tdesc_create_union): Likewise.
9907 (tdesc_create_flags): Likewise.
9908 (tdesc_create_enum): Likewise.
9909 (tdesc_free_feature): Delete.
9910 (free_target_description): Use delete.
9911
325c9fd4
JB
99122017-06-19 John Baldwin <jhb@FreeBSD.org>
9913
9914 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9915 registers.
9916
16b7a719
PA
99172017-06-19 Pedro Alves <palves@redhat.com>
9918
9919 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9920 after gdb::unlinker.
9921
1c8e01c9
SDJ
99222017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9923
9924 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9925 gdb_environ to access an environment variable.
9926
ffce45d2
TP
99272017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9928
9929 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9930 gdb_byte*.
9931
1d4fbac9
SM
99322017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9933
9934 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9935
8465943a
SM
99362017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9937
9938 * configure: Re-generate.
9939 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9940
3e019bdc
SM
99412017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9942
9943 * configure: Re-generate.
9944 * warning.m4: Pass -Werror to compiler when checking for
9945 supported warning flags.
9946
cf0dd6f0
SM
99472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9948
9949 * Makefile.in (COMPILE.pre): Add "-x c++".
9950
6f98355c
YQ
99512017-06-16 Alan Hayward <alan.hayward@arm.com>
9952 Pedro Alves <palves@redhat.com>
9953 Yao Qi <yao.qi@linaro.org>
9954
9955 * defs.h (RequireLongest): New.
9956 (extract_integer): Declare function template.
9957 (extract_signed_integer): Remove the declaration, but define it
9958 static inline.
9959 (extract_unsigned_integer): Likewise.
9960 (store_integer): Declare function template.
9961 (store_signed_integer): Remove the declaration, but define it
9962 static inline.
9963 (store_unsigned_integer): Likewise.
9964 * findvar.c (extract_integer): New function template.
9965 (extract_signed_integer): Remove.
9966 (extract_unsigned_integer): Remove.
9967 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9968 instantiations.
9969 (store_integer): New function template.
9970 (store_signed_integer): Remove.
9971 (store_unsigned_integer): Remove.
9972 (store_integer): Explicit instantiations.
9973 * regcache.c (regcache_raw_read_signed): Update.
9974 (regcache::raw_read): New function.
9975 (regcache::raw_read_signed): Remove.
9976 (regcache::raw_read_unsigned): Remove.
9977 (regcache_raw_read_unsigned): Update.
9978 (regcache_raw_write_unsigned): Update.
9979 (regcache::raw_write_signed): Remove.
9980 (regcache::raw_write): New function.
9981 (regcache_cooked_read_signed): Update.
9982 (regcache::raw_write_unsigned): Remove.
9983 (regcache::cooked_read_signed): Remove.
9984 (regcache_cooked_read_unsigned): Update.
9985 (regcache::cooked_read_unsigned): Remove.
9986 (regcache_cooked_write_signed): Update.
9987 (regcache_cooked_write_unsigned): Update.
9988 * regcache.h (regcache) <raw_read_signed>: Remove.
9989 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9990 <raw_read, raw_write>: New.
9991 <cooked_read_signed, cooked_write_signed>: Remove.
9992 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9993 <cooked_read, cooked_write>: New.
9994 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9995 (sh64_pseudo_register_write): Update.
9996
a87dc45a
AK
99972017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9998
9999 * arc-tdep.c (arc_disassembler_options): New variable.
10000 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10001 of default_print_insn.
10002 (arc_delayed_print_insn): Set info->section when needed,
10003 use default_print_insn to retrieve a disassembler.
10004
45159d6a
SDJ
100052017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10006
10007 PR gdb/21574
10008 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10009 to mention $SHELL and startup-with-shell.
10010
b46c4cf0
MF
100112017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10012
10013 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10014
6394c606
YQ
100152017-06-14 Yao Qi <yao.qi@linaro.org>
10016
10017 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10018 default_print_insn instead of print_insn_aarch64.
10019 * arm-tdep.c (gdb_print_insn_arm): Call
10020 default_print_insn instead of print_insn_big_arm
10021 and print_insn_little_arm.
10022 * i386-tdep.c (i386_print_insn): Call default_print_insn
10023 instead of print_insn_i386.
10024 * ia64-tdep.c (ia64_print_insn): Call
10025 default_print_insn instead of print_insn_ia64.
10026 * mips-tdep.c (gdb_print_insn_mips): Call
10027 default_print_insn instead of print_insn_big_mips
10028 and print_insn_little_mips.
10029 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10030 instead of print_insn_spu.
10031
d5722aa2
PA
100322017-06-14 Pedro Alves <palves@redhat.com>
10033
10034 * ada-lang.c: Include "common/byte-vector.h".
10035 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10036 * charset.c (wchar_iterator::iterate): Resize the vector instead
10037 of reserving it.
10038 * common/byte-vector.h: Include "common/def-vector.h".
10039 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10040 * cli/cli-dump.c: Include "common/byte-vector.h".
10041 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10042 * common/byte-vector.h: New file.
10043 * common/def-vector.h: New file.
10044 * common/default-init-alloc.h: New file.
10045 * dwarf2loc.c: Include "common/byte-vector.h".
10046 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10047 instead of reserving it.
10048 * dwarf2read.c: Include "common/byte-vector.h".
10049 (data_buf::m_vec): Now a gdb::byte_vector.
10050 * gdb_regex.c: Include "common/def-vector.h".
10051 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10052 * mi/mi-main.c: Include "common/byte-vector.h".
10053 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10054 * printcmd.c: Include "common/byte-vector.h".
10055 (print_scalar_formatted): Use gdb::byte_vector.
10056 * valprint.c: Include "common/byte-vector.h".
10057 (maybe_negate_by_bytes, print_decimal_chars): Use
10058 gdb::byte_vector.
10059
01ec7a27
SM
100602017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10061
10062 * darwin-nat.c: Include "nat/fork-inferior.h".
10063
848d9074
SM
100642017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10065
10066 * configure.nat: Factor out Darwin bits that are not
10067 architecture-specific. Add fork-inferior.o.
10068
3b912944
SM
100692017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10070
10071 * configure.nat: Factor out AIX bits that are not
10072 architecture-specific. Add fork-inferior.o.
10073
55acdf22
AA
100742017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10075
10076 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10077 (read_pieced_value, write_pieced_value): ...here. Reduce to
10078 wrappers that just call rw_pieced_value.
10079
f65e2044
AA
100802017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10081
10082 * dwarf2loc.c (write_pieced_value): When writing the data for a
10083 memory piece, use write_memory_with_notification instead of
10084 write_memory.
10085
23f945bf
AA
100862017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10087
10088 * valops.c (read_value_memory): Change embedded_offset to
10089 represent a bit offset instead of a byte offset.
10090 * value.h (read_value_memory): Adjust comment.
10091
f236533e
AA
100922017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10093
10094 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10095 dest_offset_bits and source_offset_bits.
10096 (write_pieced_value): Likewise.
10097
65d84b76
AA
100982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10099
10100 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10101 given by DW_OP_bit_piece.
10102 (write_pieced_value): Likewise.
10103
242d31ab
AA
101042017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10105
10106 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10107 some other preparations to the places where sufficient information
10108 is available.
10109 (write_pieced_value): Likewise.
10110
03c8af18
AA
101112017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10112
10113 * dwarf2loc.c (bits_to_bytes): New function.
10114 (read_pieced_value): Fix offset calculations for register pieces
10115 on big-endian targets.
10116 (write_pieced_value): Likewise.
10117
840989c1
AA
101182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10119
10120 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10121 (write_pieced_value): Likewise.
10122
359b19bb
AA
101232017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10124
10125 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10126 transfer the source value's least significant bits, instead of its
10127 lowest-addressed ones. Rename type_len to max_offset.
10128 (read_pieced_value): Mirror above changes to write_pieced_value as
10129 applicable.
10130
07c9ca3b
AA
101312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10132
10133 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10134 truncate full bytes from dest_offset_bits before using it as an
10135 offset into the buffer.
10136
f1cc9874
AA
101372017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10138
10139 * dwarf2loc.c (write_pieced_value): Include transfer size in
10140 byte-wise check.
10141
cdaac320
AA
101422017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10143
10144 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10145 calculation of this_size.
10146
af547a96
AA
101472017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10148
10149 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10150 when targeting a bit-field.
10151 (write_pieced_value): Likewise.
10152
ddd7882a
AA
101532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10154
10155 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10156 (allocate_piece_closure): Drop addr_size parameter.
10157 (dwarf2_evaluate_loc_desc_full): Adjust call to
10158 allocate_piece_closure.
10159
e9352324
AA
101602017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10161
10162 PR gdb/21226
10163 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10164 the LSB end, independent of endianness.
10165
d5d1163e
AA
101662017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10167
10168 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10169 size capping.
10170
032bb6ea
YQ
101712017-06-13 Yao Qi <yao.qi@linaro.org>
10172
10173 * mips-linux-nat.c: Move include features/mips*-linux.c to
10174 mips-linux-tdep.c.
10175 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10176 to mips-linux-tdep.c.
10177 * mips-linux-tdep.c: Include features/mips*-linux.c
10178 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10179 functions.
10180 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10181 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10182 (tdesc_mips64_dsp_linux): Declare.
10183
f12f6bad
TT
101842017-06-12 Tom Tromey <tom@tromey.com>
10185
10186 * valprint.h (val_print_type_code_int): Remove.
10187 * valprint.c (generic_val_print_int): Always call
10188 val_print_scalar_formatted.
10189 (val_print_type_code_int): Remove.
10190 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10191 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10192 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10193 * ada-valprint.c (ada_val_print_num): Use
10194 val_print_scalar_formatted.
10195
d9109c80
TT
101962017-06-12 Tom Tromey <tom@tromey.com>
10197
10198 * printcmd.c (print_scalar_formatted): Unify the two switches.
10199 Don't convert scalars to LONGEST.
10200
4ac0cb1c
TT
102012017-06-12 Tom Tromey <tom@tromey.com>
10202
10203 PR exp/16225:
10204 * valprint.h (print_decimal_chars): Update.
10205 * valprint.c (maybe_negate_by_bytes): New function.
10206 (print_decimal_chars): Add "is_signed" argument.
10207 * printcmd.c (print_scalar_formatted): Update.
10208
30a25466
TT
102092017-06-12 Tom Tromey <tom@tromey.com>
10210
10211 PR exp/16225:
10212 * valprint.h (print_binary_chars, print_hex_chars): Update.
10213 * valprint.c (val_print_type_code_int): Update.
10214 (print_binary_chars): Add "zero_pad" argument.
10215 (emit_octal_digit): New function.
10216 (print_octal_chars): Don't zero-pad.
10217 (print_decimal_chars): Likewise.
10218 (print_hex_chars): Add "zero_pad" argument.
10219 * sh64-tdep.c (sh64_do_fp_register): Update.
10220 * regcache.c (regcache::dump): Update.
10221 * printcmd.c (print_scalar_formatted): Update.
10222 * infcmd.c (default_print_one_register_info): Update.
10223
b3464d03
PA
102242017-06-12 Pedro Alves <palves@redhat.com>
10225 Alan Hayward <alan.hayward@arm.com>
10226
10227 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10228 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10229 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10230 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10231 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10232
4b76cda9
PA
102332017-06-12 Pedro Alves <palves@redhat.com>
10234
10235 * dwarf2read.c (mapped_symtab::data): Now a vector of
10236 symtab_index_entry instead of vector of
10237 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10238 whether an element's name is NULL instead of checking whether the
10239 element itself is NULL.
10240 (find_slot): Change return type. Adjust.
10241 (hash_expand, , add_index_entry, uniquify_cu_indices)
10242 (write_hash_table): Adjust.
10243
e8f8bcb3
PA
102442017-06-12 Pedro Alves <palves@redhat.com>
10245
10246 * dwarf2read.c (recursively_count_psymbols): New function.
10247 (write_psymtabs_to_index): Call it to compute number of psyms and
10248 pass estimate size of psyms_seen to unordered_set's ctor.
10249
70a1152b
PA
102502017-06-12 Pedro Alves <palves@redhat.com>
10251
10252 * dwarf2read.c (write_hash_table): Check if key already exists
10253 before emplacing.
10254
c2f134ac
PA
102552017-06-12 Pedro Alves <palves@redhat.com>
10256
10257 * dwarf2read.c (data_buf::append_space): Rename to...
10258 (data_buf::grow): ... this, and make private. Adjust all callers.
10259 (data_buf::append_uint): New method.
10260 (add_address_entry, write_one_signatured_type)
10261 (write_psymtabs_to_index): Use it.
10262
a81e6d4d
PA
102632017-06-12 Pedro Alves <palves@redhat.com>
10264
10265 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10266 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10267 (data_buf::file_write): Call ::fwrite directly.
10268
6fd931f2
PA
102692017-06-12 Pedro Alves <palves@redhat.com>
10270
10271 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10272 std::vector::erase.
10273
bc8f2430
JK
102742017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10275
10276 Code cleanup: C++ify .gdb_index producer.
10277 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10278 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10279 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10280 (create_strtab, add_string): Remove.
10281 (file_write, data_buf): New.
10282 (struct symtab_index_entry): Use std::vector for cu_indices.
10283 (struct mapped_symtab): Use std::vector for data.
10284 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10285 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10286 Remove.
10287 (find_slot): Change return type. Update it to the new data structures.
10288 (hash_expand, add_index_entry): Update it to the new data structures.
10289 (offset_type_compare): Remove.
10290 (uniquify_cu_indices): Update it to the new data structures.
10291 (c_str_view, c_str_view_hasher, vector_hasher): New.
10292 (add_indices_to_cpool): Remove.
10293 (write_hash_table): Update it to the new data structures.
10294 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10295 (eq_psymtab_cu_index): Remove.
10296 (psym_index_map): New typedef.
10297 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10298 reference and std::unordered_map for cu_index_htab.
10299 (add_address_entry, add_address_entry_worker, write_address_map)
10300 (write_psymbols): Update it to the new data structures.
10301 (write_obstack): Remove.
10302 (struct signatured_type_index_data): Change types_list to a data_buf
10303 reference and psyms_seen to a std::unordered_set reference.
10304 (write_one_signatured_type, recursively_write_psymbols)
10305 (write_psymtabs_to_index): Update it to the new data structures.
10306
c4dcb155
SM
103072017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10308
10309 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10310 separate-debug-file commands.
10311 * symfile.h (separate_debug_file_debug): New global.
10312 * symfile.c (separate_debug_file_debug): New global.
10313 (separate_debug_file_exists, find_separate_debug_file): Add
10314 debug output.
10315 (_initialize_symfile): Add "set debug separate-debug-file"
10316 command.
10317 * build-id.c (build_id_to_debug_bfd,
10318 find_separate_debug_file_by_buildid): Add debug output.
10319
6d45d4b4
SM
103202017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10321
10322 * gdbarch.sh (displaced_step_free_closure): Remove.
10323 * gdbarch.h, gdbarch.c: Re-generate.
10324 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10325 displaced_step_free_closure.
10326 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10327 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10328 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10329 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10330 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10331 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10332 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10333 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10334 * infrun.c (displaced_step_clear): Call xfree instead of
10335 gdbarch_displaced_step_free_closure.
10336
2f91880f
SDJ
103372017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10338
10339 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10340 NULL".
10341
b8b6e72f
AH
103422017-06-08 Alan Hayward <alan.hayward@arm.com>
10343
10344 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10345 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10346 (mn10300_push_dummy_call): Likewise.
10347
5369082e
AH
103482017-06-08 Alan Hayward <alan.hayward@arm.com>
10349
10350 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10351
ff4ca5ac
AH
103522017-06-08 Alan Hayward <alan.hayward@arm.com>
10353
10354 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10355
aefd8b33
SDJ
103562017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10357
10358 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10359 able to start inferiors using a shell.
10360 (New remote packets): Announce new packet "QStartupWithShell".
10361 * remote.c: Add PACKET_QStartupWithShell.
10362 (extended_remote_create_inferior): Handle new
10363 PACKET_QStartupWithShell.
10364 (remote_protocol_features) <QStartupWithShell>: New entry for
10365 PACKET_QStartupWithShell.
10366 (_initialize_remote): Call "add_packet_config_cmd" for
10367 QStartupShell.
10368
2090129c
SDJ
103692017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10370 Pedro Alves <palves@redhat.com>
10371
10372 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10373 and "nat/fork-inferior.h".
10374 * common/common-inferior.h: New file, with contents from
10375 "gdb/inferior.h".
10376 * commom/common-utils.c: Include "common-utils.h".
10377 (stringify_argv): New function.
10378 * common/common-utils.h (stringify_argv): New prototype.
10379 * configure.nat: Add "fork-inferior.o" as a dependency for
10380 "*linux*", "fbsd*" and "nbsd*" hosts.
10381 * corefile.c (get_exec_file): Update comment.
10382 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10383 instead of "startup_inferior".
10384 (darwin_create_inferior): Call "add_thread_silent" after
10385 "fork_inferior".
10386 * fork-child.c: Cleanup unnecessary includes.
10387 (SHELL_FILE): Move to "common/common-fork-child.c".
10388 (environ): Likewise.
10389 (exec_wrapper): Initialize.
10390 (get_exec_wrapper): New function.
10391 (breakup_args): Move to "common/common-fork-child.c"; rename to
10392 "breakup_args_for_exec".
10393 (escape_bang_in_quoted_argument): Move to
10394 "common/common-fork-child.c".
10395 (saved_ui): New variable.
10396 (prefork_hook): New function.
10397 (postfork_hook): Likewise.
10398 (postfork_child_hook): Likewise.
10399 (gdb_startup_inferior): Likewise.
10400 (fork_inferior): Move to "common/common-fork-child.c". Update
10401 function to support gdbserver.
10402 (startup_inferior): Likewise.
10403 * gdbcore.h (get_exec_file): Remove declaration.
10404 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10405 instead of "startup_inferior". Call "add_thread_silent" after
10406 "fork_inferior".
10407 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10408 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10409 instead of "startup_inferior". Call "add_thread_silent" after
10410 "fork_inferior".
10411 * inferior.h: Include "common-inferior.h".
10412 (trace_start_error): Move to "common/common-utils.h".
10413 (trace_start_error_with_name): Likewise.
10414 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10415 (startup_inferior): Likewise.
10416 (gdb_startup_inferior): New prototype.
10417 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10418 * nat/fork-inferior.h: New file.
10419 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10420 instead of "startup_inferior". Call "add_thread_silent" after
10421 "fork_inferior".
10422 * target.h (target_terminal_init): Move prototype to
10423 "target/target.h".
10424 (target_terminal_inferior): Likewise.
10425 (target_terminal_ours): Likewise.
10426 * target/target.h (target_terminal_init): New prototype, moved
10427 from "target.h".
10428 (target_terminal_inferior): Likewise.
10429 (target_terminal_ours): Likewise.
10430 * utils.c (gdb_flush_out_err): New function.
10431
043a4934
SDJ
104322017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10433
10434 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10435 * common/common-gdbthread.h: New file, with parts from
10436 "gdb/gdbthread.h".
10437 * gdbthread.h: Include "common-gdbthread.h".
10438 (switch_to_thread): Moved to "common/common-gdbthread.h".
10439
15652511
SDJ
104402017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10441
10442 * Makefile.in (SFILES): Add "common/job-control.c".
10443 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10444 (COMMON_OBS): Add "job-control.o".
10445 * common/job-control.c: New file, with contents from
10446 "gdb/inflow.c".
10447 * common/job-control.h: New file, with contents from "terminal.h".
10448 * fork-child.c: Include "job-control.h".
10449 * inflow.c: Include "job-control.h".
10450 (gdb_setpgid): Move to "common/common-inflow.c".
10451 (_initialize_inflow): Move setting of "job_control" to
10452 "handle_job_control".
10453 * terminal.h (job_control): Moved to "common/common-terminal.h".
10454 (gdb_setpgid): Likewise.
10455 * top.c: Include "job_control.h".
10456 * utils.c: Likewise.
10457 (job_control): Moved to "job-control.c".
10458
2d7cc5c7
PA
104592017-06-07 Pedro Alves <palves@redhat.com>
10460
10461 * Makefile.in (SFILES): Add gdb_regex.c.
10462 (COMMON_OBS): Add gdb_regex.o.
10463 * ada-lang.c (ada_add_standard_exceptions)
10464 (ada_add_exceptions_from_frame, name_matches_regex)
10465 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10466 parameter type to compiled_regex. Adjust.
10467 (ada_exceptions_list): Use compiled_regex.
10468 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10469 std::unique_ptr<compiled_regex>.
10470 (exception_catchpoint::~exception_catchpoint): Remove regfree
10471 call.
10472 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10473 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10474 * breakpoint.c (solib_catchpoint::compiled): Now a
10475 std::unique_ptr<compiled_regex>.
10476 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10477 (check_status_catch_solib): Adjust to use compiled_regex.
10478 (add_solib_catchpoint): Adjust to use compiled_regex.
10479 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10480 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10481 compiled_regex reference. Adjust to use it.
10482 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10483 declaration. Include "gdb_regex.h".
10484 (apropos_cmd): Change regex parameter to compiled_regex reference.
10485 * gdb_regex.c: New file.
10486 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10487 declarations.
10488 (class compiled_regex): New.
10489 * linux-tdep.c: Include "common/gdb_optional.h".
10490 (struct mapping_regexes): New, factored out from
10491 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10492 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10493 gdb::optional and remove cleanups. Adjust to compiled_regex.
10494 * probe.c: Include "common/gdb_optional.h".
10495 (collect_probes): Use compiled_regex and gdb::optional and remove
10496 cleanups.
10497 * skip.c: Include "common/gdb_optional.h".
10498 (skiplist_entry::compiled_function_regexp): Now a
10499 gdb::optional<compiled_regex>.
10500 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10501 (free_skiplist_entry): Remove regfree call.
10502 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10503 compiled_regex and gdb::optional.
10504 * symtab.c: Include "common/gdb_optional.h".
10505 (search_symbols): Use compiled_regex and gdb::optional.
10506 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10507 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10508 to gdb_regex.c.
10509
50d6adef
AH
105102017-06-07 Alan Hayward <alan.hayward@arm.com>
10511
10512 * regcache.c (regcache::save): Avoid buffer use.
10513 (regcache::dump): Likewise.
10514
4a8a33c8
AH
105152017-06-07 Alan Hayward <alan.hayward@arm.com>
10516
10517 * sh-tdep.c (sh_pseudo_register_read): Remove
10518 MAX_REGISTER_SIZE.
10519 (sh_pseudo_register_write): Likewise.
10520 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10521 (sh64_pseudo_register_write): Likewise
10522
d1be909e
AH
105232017-06-07 Alan Hayward <alan.hayward@arm.com>
10524
10525 * aarch64-tdep.c (aarch64_store_return_value): Use
10526 V_REGISTER_SIZE.
10527 (aarch64_pseudo_read_value): Likewise.
10528 (aarch64_pseudo_write): Likewise.
10529
f4a65042
YQ
105302017-06-06 Yao Qi <yao.qi@linaro.org>
10531
10532 * regformats/regdef.h (set_register_cache): Remove the
10533 declaration.
10534
9f7fb0aa
AH
105352017-06-06 Alan Hayward <alan.hayward@arm.com>
10536
10537 * frame.c (frame_unwind_register_signed): Use
10538 frame_unwind_register_value.
10539
e1e01040
PA
105402017-06-06 Pedro Alves <palves@redhat.com>
10541
10542 PR breakpoints/21553
10543 * breakpoint.c (create_breakpoints_sal_default)
10544 (init_breakpoint_sal, create_breakpoint_sal): Use
10545 gdb::unique_xmalloc_ptr for string parameters.
10546 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10547 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10548 (base_breakpoint_create_breakpoints_sal)
10549 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10550 (strace_marker_create_breakpoints_sal)
10551 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10552 string parameters.
10553 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10554 gdb::unique_xmalloc_ptr for string parameters.
10555 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10556 parameters.
10557
fbe654c8
AH
105582017-06-06 Alan Hayward <alan.hayward@arm.com>
10559
10560 * alpha-tdep.c (alpha_register_to_value): Use
10561 get_frame_register_value.
10562 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10563
ae0d01d6
AH
105642017-06-06 Alan Hayward <alan.hayward@arm.com>
10565
10566 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10567 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10568 (ia64_value_to_register): Likewise.
10569 (ia64_extract_return_value): Likewise.
10570 (ia64_store_return_value): Likewise.
10571 (ia64_push_dummy_call): Likewise.
10572
49cf576c
JB
105732017-06-04 Joel Brobecker <brobecker@adacore.com>
10574
10575 GDB 8.0 released.
10576
26b6a6ab
SM
105772017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10578
10579 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10580
22827c51
SM
105812017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10582
10583 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10584 parameter.
10585 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10586
0e05cf3a
SM
105872017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10588
10589 * event-loop.c (poll_timers): Unallocate timer using delete
10590 instead of xfree.
10591
c1fc2657
SM
105922017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10593
10594 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10595 (struct breakpoint) <~breakpoint>: New.
10596 (struct watchpoint): Inherit from breakpoint.
10597 <~watchpoint>: New.
10598 <base>: Remove.
10599 (struct tracepoint): Inherit from breakpoint.
10600 <base>: Remove.
10601 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10602 (struct longjmp_breakpoint): Inherit from breakpoint.
10603 <~longjmp_breakpoint>: New.
10604 <base>: Remove.
10605 (new_breakpoint_from_type): Remove casts.
10606 (watchpoint_in_thread_scope): Remove reference to base field.
10607 (watchpoint_del_at_next_stop): Likewise.
10608 (update_watchpoint): Likewise.
10609 (watchpoint_check): Likewise.
10610 (bpstat_check_watchpoint): Likewise.
10611 (set_longjmp_breakpoint): Likewise.
10612 (struct fork_catchpoint): Inherit from breakpoint.
10613 <base>: Remove.
10614 (struct solib_catchpoint): Inherit from breakpoint.
10615 <~solib_catchpoint>: New.
10616 <base>: Remove.
10617 (dtor_catch_solib): Change to ...
10618 (solib_catchpoint::~solib_catchpoint): ... this.
10619 (breakpoint_hit_catch_solib): Remove reference to base field.
10620 (add_solib_catchpoint): Likewise.
10621 (create_fork_vfork_event_catchpoint): Likewise.
10622 (struct exec_catchpoint): Inherit from breakpoint.
10623 <~exec_catchpoint>: New.
10624 <base>: Remove.
10625 (dtor_catch_exec): Change to ...
10626 (exec_catchpoint::~exec_catchpoint): ... this.
10627 (dtor_watchpoint): Change to ...
10628 (watchpoint::~watchpoint): ... this.
10629 (watch_command_1): Remove reference to base field.
10630 (catch_exec_command_1): Likewise.
10631 (base_breakpoint_dtor): Change to ...
10632 (breakpoint::~breakpoint): ... this.
10633 (base_breakpoint_ops): Remove dtor field value.
10634 (longjmp_bkpt_dtor): Change to ...
10635 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10636 (strace_marker_create_breakpoints_sal): Remove reference to base
10637 field.
10638 (delete_breakpoint): Don't manually call breakpoint destructor.
10639 (create_tracepoint_from_upload): Remove reference to base field.
10640 (trace_pass_set_count): Likewise.
10641 (initialize_breakpoint_ops): Don't initialize
10642 momentary_breakpoint_ops, don't set dtors.
10643 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10644 <~ada_catchpoint>: New.
10645 <base>: Remove.
10646 (create_excep_cond_exprs): Remove reference to base field.
10647 (dtor_exception): Change to ...
10648 (ada_catchpoint::~ada_catchpoint): ... this.
10649 (dtor_catch_exception): Remove.
10650 (dtor_catch_exception_unhandled): Remove.
10651 (dtor_catch_assert): Remove.
10652 (create_ada_exception_catchpoint): Remove reference to base
10653 field.
10654 (initialize_ada_catchpoint_ops): Don't set dtors.
10655 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10656 breakpoint.
10657 <~signal_catchpoint>: New.
10658 <base>: Remove.
10659 (signal_catchpoint_dtor): Change to ...
10660 (signal_catchpoint::~signal_catchpoint): ... this.
10661 (create_signal_catchpoint): Remove reference to base field.
10662 (initialize_signal_catchpoint_ops): Don't set dtor.
10663 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10664 from breakpoint.
10665 <~syscall_catchpoint>: New.
10666 <base>: Remove.
10667 (dtor_catch_syscall): Change to ...
10668 (syscall_catchpoint::~syscall_catchpoint): ... this.
10669 (create_syscall_event_catchpoint): Remove reference to base
10670 field.
10671 (initialize_syscall_catchpoint_ops): Don't set dtor.
10672 * break-catch-throw.c (struct exception_catchpoint): Inherit
10673 from breakpoint.
10674 <~exception_catchpoint>: New.
10675 <base>: Remove.
10676 (dtor_exception_catchpoint): Change to ...
10677 (exception_catchpoint::~exception_catchpoint): ... this.
10678 (handle_gnu_v3_exceptions): Remove reference to base field.
10679 (initialize_throw_catchpoint_ops): Don't set dtor.
10680 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10681 field.
10682 * remote.c (remote_get_tracepoint_status): Likewise.
10683 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10684 * tracefile.c (tracefile_fetch_registers): Likewise.
10685 * tracepoint.c (actions_command): Likewise.
10686 (validate_actionline): Likewise.
10687 (tfind_1): Likewise.
10688 (get_traceframe_location): Likewise.
10689 (find_matching_tracepoint_location): Likewise.
10690 (parse_tracepoint_status): Likewise.
10691 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10692
3b0871f4
SM
106932017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10694
10695 * breakpoint.c (struct longjmp_breakpoint): New struct.
10696 (is_tracepoint_type): Change return type to bool.
10697 (is_longjmp_type): New function.
10698 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10699 (set_raw_breakpoint_without_location): Use
10700 new_breakpoint_from_type.
10701 (set_raw_breakpoint): Likewise.
10702
a5e364af
SM
107032017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10704
10705 * breakpoint.c (new_breakpoint_from_type): New function.
10706 (create_breakpoint_sal): Use new_breakpoint_from_type and
10707 unique_ptr.
10708 (create_breakpoint): Likewise.
10709
ae3b3f34
SM
107102017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10711
10712 * memattr.c (mem_info_command): Rename to ...
10713 (info_mem_command): ... this.
10714 (mem_enable_command): Rename to ...
10715 (enable_mem_command): ... this.
10716 (mem_disable_command): Rename to ...
10717 (disable_mem_command): ... this.
10718 (mem_delete_command): Rename to ...
10719 (delete_mem_command): ... this.
10720 (_initialize_mem): Adjust function names.
10721
13ace077
MM
107222017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10723
10724 * btrace.c (handle_pt_insn_events): New.
10725 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10726 STATUS. Split into this and ...
10727 (handle_pt_insn_event_flags): ... this.
10728
c56ccc05
MM
107292017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10730
10731 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10732 and struct pt_insn.resynced.
10733 * configure: Regenerated.
10734 * config.in: Regenerated.
10735
08c3f6d2
TW
107362017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10737
10738 * btrace.c (ftrace_find_call_by_number): New function.
10739 (ftrace_new_function): Store objects, not pointers.
10740 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10741 ftrace_new_gap, ftrace_update_function,
10742 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10743 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10744 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10745 btrace_ends_with_single_insn, btrace_call_get): Account for
10746 btrace_thread_info::functions now storing objects.
10747 * btrace.h (struct btrace_thread_info): Add constructor.
10748 (struct btrace_thread_info) <functions>: Make std::vector.
10749 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10750 Initialize with default values.
10751 * record-btrace.c (record_btrace_frame_sniffer): Account for
10752 btrace_thread_info::functions now storing objects.
10753
8ffd39f2
TW
107542017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10755
10756 * btrace.c: Remove typedef bfun_s.
10757 (ftrace_new_gap): Directly add gaps to the list of gaps.
10758 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10759 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10760 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10761 instead of gdb VEC.
10762
4aeb0dfc
TW
107632017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10764
10765 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10766 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10767 with btrace_thread_info::next_segment and
10768 btrace_thread_info::prev_segment.
10769 * btrace.h: Remove struct btrace_func_link.
10770 (struct btrace_function): Replace pair of function segment pointers
10771 with pair of indices.
10772 * python/py-record-btrace.c (btpy_call_prev_sibling,
10773 btpy_call_next_sibling): Replace references to
10774 btrace_thread_info::segment with btrace_thread_info::next_segment and
10775 btrace_thread_info::prev_segment.
10776 * record-btrace.c (record_btrace_frame_this_id): Use
10777 btrace_find_call_by_number.
10778
eb8f2b9c
TW
107792017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10780
10781 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10782 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10783 btrace_insn_next, btrace_insn_prev): Remove references to
10784 btrace_thread_info::flow.
10785 * btrace.h (struct btrace_function): Remove FLOW.
10786
42bfe59e
TW
107872017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10788
10789 * btrace.c (ftrace_find_call_by_number): New function.
10790 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10791 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10792 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10793 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10794 index.
10795 * btrace.h (struct btrace_function): Turn UP into an index.
10796 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10797 as an index.
10798 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10799 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10800 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10801
b54b03bd
TW
108022017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10803
10804 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10805 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10806 ftrace_update_function, ftrace_compute_global_level_offset,
10807 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10808 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10809 btrace_insn_end, btrace_is_empty): Remove references to
10810 btrace_thread_info::begin and btrace_thread_info::end.
10811 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10812 (struct btrace_thread_info) <functions>: Adjust comment.
10813 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10814 btrace_thread_info::begin.
10815
8286623c
TW
108162017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10817
10818 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10819 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10820 ftrace_update_function): Remove arguments that implicitly were always
10821 BTINFO->END.
10822 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10823 Don't pass BTINFO->END.
10824
a0f1b963
TW
108252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10826
10827 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10828 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10829 btrace_find_insn_by_number): Replace function segment pointer with
10830 index.
10831 (btrace_insn_cmp): Simplify.
10832 * btrace.h: (struct btrace_insn_iterator) Rename index to
10833 insn_index. Replace function segment pointer with index into function
10834 segment vector.
10835 * record-btrace.c (record_btrace_call_history): Replace function
10836 segment pointer use with index.
10837 (record_btrace_frame_sniffer): Retrieve function call segment through
10838 vector.
10839 (record_btrace_set_replay): Remove defunc't safety check.
10840
f158f208
TW
108412017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10842
10843 * btrace.c (btrace_ends_with_single_insn): New function.
10844 (btrace_call_get, btrace_call_number, btrace_call_begin,
10845 btrace_call_end, btrace_call_next, btrace_call_prev,
10846 btrace_find_call_by_number): Use index into call segment vector
10847 instead of pointer.
10848 (btrace_call_cmp): Simplify.
10849 * btrace.h (struct btrace_call_iterator): Replace function call segment
10850 pointer with index into vector.
10851 * record-btrace.c (record_btrace_call_history): Use index instead of
10852 pointer.
10853
521103fd
TW
108542017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10855
10856 * btrace.c (btrace_insn_begin, btrace_insn_end,
10857 btrace_find_insn_by_number): Add btinfo to iterator.
10858 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10859
17b89b34
TW
108602017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10861
10862 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10863 and save pointers directly.
10864 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10865 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10866 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10867 changed signature of functions.
10868 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10869 (btrace_fetch): Remove code that adds btrace_function pointers to
10870 vector of btrace_functions.
10871 (btrace_clear): Simplify freeing vector of btrace_functions.
10872
2b51eddc
TW
108732017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10874
10875 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10876 Replace VEC_* with std::vector functions.
10877 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10878 (struct btrace_thread_info)<functions>: Change type to std::vector.
10879
db6be0d5
SM
108802017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10881
10882 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10883 "Removed targets and native configurations" up. Merge duplicate
10884 "New commands" sub-sections. Add "New options" sub-sections.
10885
b057297a
AH
108862017-05-26 Alan Hayward <alan.hayward@arm.com>
10887
10888 * defs.h (copy_integer_to_size): New declaration.
10889 * findvar.c (copy_integer_to_size): New function.
10890 (do_cint_test): New selftest function.
10891 (copy_integer_to_size_test): Likewise.
10892 (_initialize_findvar): Likewise.
10893 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10894 (mips_fbsd_collect_reg): Use raw_collect_integer.
10895 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10896 (mips64_fill_gregset): Use raw_collect_integer
10897 (mips64_fill_fpregset): Use raw_supply_integer.
10898 * regcache.c (regcache::raw_supply_integer): New function.
10899 (regcache::raw_collect_integer): Likewise.
10900 * regcache.h: (regcache::raw_supply_integer): New declaration.
10901 (regcache::raw_collect_integer): Likewise.
10902
b77b02a5
YQ
109032017-05-24 Yao Qi <yao.qi@linaro.org>
10904
10905 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10906 (COMMON_OBS): Add gdbarch-selftests.o.
10907 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10908 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10909 * gdbarch-selftests.c: New file.
10910 * regcache.h (regcache) <~regcache>: Mark it virtual if
10911 GDB_SELF_TEST.
10912 <raw_write>: Likewise.
10913
e521e87e
YQ
109142017-05-24 Yao Qi <yao.qi@linaro.org>
10915
10916 * regcache.c (current_regcache): Change it to
10917 regcache::current_regcache.
10918 (regcache_observer_target_changed): Update.
10919 (regcache_thread_ptid_changed): Make it a regcache static
10920 method.
10921 (regcache_thread_ptid_changed): Update.
10922 (class regcache_access): New.
10923 (current_regcache_test): Update.
10924 (_initialize_regcache): Update.
10925 * regcache.h: Include forward_list.
10926 (regcache): Declare regcache_thread_ptid_changed and declare
10927 registers_changed_ptid as friend.
10928
d8e07dda
YQ
109292017-05-24 Yao Qi <yao.qi@linaro.org>
10930
10931 * i387-tdep.c (i387_register_to_value): Use register_size
10932 instead of TYPE_LENGTH.
10933 * m68k-tdep.c (m68k_register_to_value): Likewise.
10934
8c8f9122
YQ
109352017-05-24 Yao Qi <yao.qi@linaro.org>
10936
10937 * i387-tdep.c (i387_convert_register_p): Return false if type
10938 code isn't TYPE_CODE_FLT.
10939
68fce50f
YQ
109402017-05-24 Yao Qi <yao.qi@linaro.org>
10941
10942 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10943 length is 4.
10944 (alpha_register_to_value): Remove type length check.
10945 (alpha_value_to_register): Likewise.
10946
88954b49
YQ
109472017-05-24 Yao Qi <yao.qi@linaro.org>
10948
10949 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10950 TYPE_CODE_FLT.
10951
e3ec9b69
YQ
109522017-05-24 Yao Qi <yao.qi@linaro.org>
10953
10954 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10955 TYPE_CODE_FLT or not.
10956
cdd238da
YQ
109572017-05-24 Yao Qi <yao.qi@linaro.org>
10958
10959 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10960 * avr-tdep.c (avr_gdbarch_init): Likewise.
10961 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10962 * cris-tdep.c (cris_gdbarch_init): Likewise.
10963 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10964 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10965 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10966 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10967 * mep-tdep.c (mep_gdbarch_init): Likewise.
10968 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10969 * mips-tdep.c (mips_gdbarch_init): Likewise.
10970 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10971 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10972 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10973 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10974 * v850-tdep.c (v850_gdbarch_init): Likewise.
10975
7a3929c4
YQ
109762017-05-24 Yao Qi <yao.qi@linaro.org>
10977
10978 * selftest-arch.c (tests_with_arch): Call registers_changed
10979 and reinit_frame_cache.
10980 * selftest.c (run_self_tests): Likewise.
10981
f4985dba
YQ
109822017-05-24 Yao Qi <yao.qi@linaro.org>
10983
10984 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10985 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10986
ab20fa4a
YQ
109872017-05-24 Yao Qi <yao.qi@linaro.org>
10988
10989 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10990 set_gdbarch_print_insn.
10991
f532ab94
YQ
109922017-05-24 Yao Qi <yao.qi@linaro.org>
10993
10994 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10995 set_gdbarch_print_insn.
10996
39503f82
YQ
109972017-05-24 Yao Qi <yao.qi@linaro.org>
10998
10999 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11000 set_gdbarch_print_insn.
11001 * arc-tdep.c (arc_gdbarch_init): Likewise.
11002 * arch-utils.c: include dis-asm.h.
11003 (default_print_insn): New function.
11004 * arch-utils.h (default_print_insn): Declare.
11005 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11006 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11007 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11008 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11009 * frv-tdep.c (frv_gdbarch_init): Likewise.
11010 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11011 * gdbarch.sh (print_insn): Use default_print_insn.
11012 * gdbarch.c: Regenerated.
11013 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11014 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11015 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11016 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11017 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11018 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11019 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11020 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11021 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11022 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11023 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11024 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11025 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11026 * mt-tdep.c (mt_gdbarch_init): Likewise.
11027 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11028 * nios2-tdep.c (nios2_print_insn): Remove.
11029 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11030 * rx-tdep.c (rx_gdbarch_init): Likewise.
11031 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11032 * score-tdep.c (score_print_insn): Remove.
11033 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11034 * sh-tdep.c (sh_gdbarch_init): Likewise.
11035 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11036 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11037 * tic6x-tdep.c (tic6x_print_insn): Remove.
11038 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11039 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11040 * v850-tdep.c (v850_gdbarch_init): Likewise.
11041 * vax-tdep.c (vax_gdbarch_init): Likewise.
11042 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11043 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11044
f7241d4f
JB
110452017-05-23 John Baldwin <jhb@FreeBSD.org>
11046
11047 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11048 (MIPS_FP0_REGNUM): Remove.
11049 (MIPS_FSR_REGNUM): Remove.
11050 (mips_fbsd_supply_fpregs): Use mips_regnum.
11051 (mips_fbsd_supply_gregs): Likewise.
11052 (mips_fbsd_collect_fpregs): Likewise.
11053 (mips_fbsd_collect_gregs): Likewise.
11054
d489d81d
JB
110552017-05-23 John Baldwin <jhb@FreeBSD.org>
11056
11057 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11058 (getpfpregs_supplies): New function.
11059 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11060 getfpregs_supplies.
11061 (mips_fbsd_store_inferior_registers): Likewise.
11062
e11b3cdc
PA
110632017-05-22 Pedro Alves <palves@redhat.com>
11064
11065 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11066 maintainer.
11067
0f068fb5
AH
110682017-05-22 Alan Hayward <alan.hayward@arm.com>
11069
11070 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11071 (store_register): Likewise.
11072 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11073 (get_decimal_float_return_value): Likewise.
11074 (do_ppc_sysv_return_value): Likewise.
11075 (ppc64_sysv_abi_push_integer): Likewise.
11076 (ppc64_sysv_abi_push_freg): Likewise.
11077 (ppc64_sysv_abi_return_value_base): Likewise.
11078 (ppc64_sysv_abi_return_value): Likewise.
11079 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11080 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11081 * rs6000-nat.c: Likewise.
11082 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11083 (rs6000_value_to_register): Likewise.
11084 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11085
e6cf65f2
TT
110862017-05-21 Tom Tromey <tom@tromey.com>
11087
11088 PR rust/21466:
11089 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11090 arrays as "[T]", not "[T; ]".
11091
43cc5389
TT
110922017-05-19 Tom Tromey <tom@tromey.com>
11093
11094 PR rust/21484:
11095 * rust-lang.c (exp_descriptor_rust): New function.
11096 (rust_language_defn): Use it.
11097 * p-lang.c (pascal_language_defn): Update.
11098 * opencl-lang.c (opencl_language_defn): Update.
11099 * objc-lang.c (objc_language_defn): Update.
11100 * m2-lang.c (m2_language_defn): Update.
11101 * language.h (struct language_defn)
11102 <la_watch_location_expression>: New member.
11103 * language.c (unknown_language_defn, auto_language_defn)
11104 (local_language_defn): Update.
11105 * go-lang.c (go_language_defn): Update.
11106 * f-lang.c (f_language_defn): Update.
11107 * d-lang.c (d_language_defn): Update.
11108 * c-lang.h (c_watch_location_expression): Declare.
11109 * c-lang.c (c_watch_location_expression): New function.
11110 (c_language_defn, cplus_language_defn, asm_language_defn)
11111 (minimal_language_defn): Use it.
11112 * breakpoint.c (watch_command_1): Call
11113 la_watch_location_expression.
11114 * ada-lang.c (ada_language_defn): Update.
11115
7a6e7fcc
RO
111162017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11117
6e7e1744
RO
11118 PR tui/21482
11119 * gdb_curses.h (NOMACROS): Define.
11120 (NCURSES_NOMACROS): Define.
11121
111222017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11123
11124 PR tui/21482
7a6e7fcc
RO
11125 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11126 arg to char *.
11127 * tui/tui-wingeneral.c (box_win): Likewise.
11128 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11129 (tui_show_source_line): Likewise.
11130 (tui_show_exec_info_content): Likewise.
11131
1933fd8e
VM
111322017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11133
11134 * sparc-tdep.c (sparc_structure_return_p)
11135 (sparc_arg_on_registers_p): New functions.
11136 (sparc32_store_arguments): Use them.
11137 * sparc64-tdep.c (sparc64_16_byte_align_p)
11138 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11139 Handle TYPE_CODE_ARRAY.
11140
21873064
YQ
111412017-05-17 Yao Qi <yao.qi@linaro.org>
11142
11143 * cli/cli-decode.c (add_alias_cmd): New function.
11144 * command.h (add_alias_cmd): Declare.
11145 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11146 instead call add_alias_cmd.
11147
2b351b19
PA
111482017-05-17 Pedro Alves <palves@redhat.com>
11149
11150 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11151 (nat_makefile_frag): ... this. All references updated.
11152 * configure.ac: Likewise.
11153 * configure.nat: Likewise. Enhance comments.
11154 * configure: Regenerate.
11155
5f2ad7a3
RO
111562017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11157
11158 * procfs.c (procfs_create_inferior): Change prototype to match
11159 definition.
11160
adf3dde5
EZ
111612017-05-13 Eli Zaretskii <eliz@gnu.org>
11162
11163 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11164 C++ compiler warning.
11165
6830f270
TT
111662017-05-12 Tom Tromey <tom@tromey.com>
11167
11168 PR rust/21483:
11169 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11170 recurse, just call value_struct_elt directly.
11171
68f2f2e3
TT
111722017-05-12 Tom Tromey <tom@tromey.com>
11173
11174 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11175 OP_RUST_ARRAY>: Fix.
11176
256afbc2
TT
111772017-05-12 Tom Tromey <tom@tromey.com>
11178
11179 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11180
94bb8dfe
YQ
111812017-05-09 Yao Qi <yao.qi@linaro.org>
11182
11183 * regcache.c: Include <forward_list>.
11184 (struct regcache_list): Remove.
11185 (current_regcache): Update.
11186 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11187 (regcache_thread_ptid_changed): Likewise.
11188 (registers_changed_ptid): Likewise.
11189 (current_regcache_size): Likewise.
11190
8248946c
YQ
111912017-05-09 Yao Qi <yao.qi@linaro.org>
11192
11193 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11194 (current_regcache_size): New function.
11195 (current_regcache_test): New function.
11196 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11197
313c5961
AH
111982017-05-08 Alan Hayward <alan.hayward@arm.com>
11199
11200 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11201 (print_gp_register_row): Use get_frame_register_value.
11202
27bfc1d1
AH
112032017-05-08 Alan Hayward <alan.hayward@arm.com>
11204
11205 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11206 (mips_supply_fpregset): Likewise.
11207 (mips64_supply_gregset): Likewise.
11208
146e6c5c
AH
112092017-05-08 Alan Hayward <alan.hayward@arm.com>
11210
11211 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11212 regcache->raw_supply_zeroed.
11213
e50f25ec
SDJ
112142017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11215
11216 * configure.nat: Rearrange 'case' statements to match
11217 host before cpu.
11218
21ea5acd
SDJ
112192017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11220
11221 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11222 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11223 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11224 "@nat_extra_makefile_frag@".
11225 (Makefile): Remove dependency on "@frags@".
11226 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11227 (data-directory/Makefile): Likewise.
11228 * config/aarch64/linux.mh: Deleted; moved contents to
11229 "gdb/configure.nat".
11230 * config/alpha/alpha-linux.mh: Likewise.
11231 * config/alpha/nbsd.mh: Likewise.
11232 * config/arm/linux.mh: Likewise.
11233 * config/arm/nbsdelf.mh: Likewise.
11234 * config/i386/cygwin.mh: Likewise.
11235 * config/i386/cygwin64.mh: Likewise.
11236 * config/i386/darwin.mh: Likewise.
11237 * config/i386/fbsd.mh: Likewise.
11238 * config/i386/fbsd64.mh: Likewise.
11239 * config/i386/go32.mh: Likewise.
11240 * config/i386/i386gnu.mh: Likewise.
11241 * config/i386/i386sol2.mh: Likewise.
11242 * config/i386/linux.mh: Likewise.
11243 * config/i386/linux64.mh: Likewise.
11244 * config/i386/mingw.mh: Likewise.
11245 * config/i386/mingw64.mh: Likewise.
11246 * config/i386/nbsd64.mh: Likewise.
11247 * config/i386/nbsdelf.mh: Likewise.
11248 * config/i386/nto.mh: Likewise.
11249 * config/i386/obsd.mh: Likewise.
11250 * config/i386/obsd64.mh: Likewise.
11251 * config/i386/sol2-64.mh: Likewise.
11252 * config/ia64/linux.mh: Likewise.
11253 * config/m32r/linux.mh: Likewise.
11254 * config/m68k/linux.mh: Likewise.
11255 * config/m68k/nbsdelf.mh: Likewise.
11256 * config/m68k/obsd.mh: Likewise.
11257 * config/m88k/obsd.mh: Likewise.
11258 * config/mips/fbsd.mh: Likewise.
11259 * config/mips/linux.mh: Likewise.
11260 * config/mips/nbsd.mh: Likewise.
11261 * config/mips/obsd64.mh: Likewise.
11262 * config/pa/linux.mh: Likewise.
11263 * config/pa/nbsd.mh: Likewise.
11264 * config/pa/obsd.mh: Likewise.
11265 * config/powerpc/aix.mh: Likewise.
11266 * config/powerpc/fbsd.mh: Likewise.
11267 * config/powerpc/linux.mh: Likewise.
11268 * config/powerpc/nbsd.mh: Likewise.
11269 * config/powerpc/obsd.mh: Likewise.
11270 * config/powerpc/ppc64-linux.mh: Likewise.
11271 * config/powerpc/spu-linux.mh: Likewise.
11272 * config/s390/linux.mh: Likewise.
11273 * config/sh/nbsd.mh: Likewise.
11274 * config/sparc/fbsd.mh: Likewise.
11275 * config/sparc/linux.mh: Likewise.
11276 * config/sparc/linux64.mh: Likewise.
11277 * config/sparc/nbsd64.mh: Likewise.
11278 * config/sparc/nbsdelf.mh: Likewise.
11279 * config/sparc/obsd64.mh: Likewise.
11280 * config/sparc/sol2.mh: Likewise.
11281 * config/tilegx/linux.mh: Likewise.
11282 * config/vax/nbsdelf.mh: Likewise.
11283 * config/vax/obsd.mh: Likewise.
11284 * config/xtensa/linux.mh: Likewise.
11285 * config/i386/i386gnu.mn: New file, with excerpts from
11286 "config/i386/i386gnu.mh".
11287 * configure: Regenerate.
11288 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11289 *.mh files under "gdb/config".
11290 * configure.nat: New file, with contents from the
11291 "gdb/config/*/*.mh" files.
11292
7ed1acaf
TW
112932017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11294
11295 * btrace.c (btrace_clear): Free insn vector.
11296
e13cb306
PA
112972017-05-05 Pedro Alves <palves@redhat.com>
11298
11299 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11300 * configure: Regenerate.
11301
5ed8105e
PA
113022017-05-04 Pedro Alves <palves@redhat.com>
11303
11304 * Makefile.in (SFILES): Add progspace-and-thread.c.
11305 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11306 (COMMON_OBS): Add progspace-and-thread.o.
11307 * breakpoint.c: Include "progspace-and-thread.h".
11308 (update_inserted_breakpoint_locations)
11309 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11310 Use scoped_restore_current_pspace_and_thread.
11311 (create_std_terminate_master_breakpoint): Use
11312 scoped_restore_current_program_space.
11313 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11314 (print_breakpoint_location): Use
11315 scoped_restore_current_program_space.
11316 (bp_loc_is_permanent): Use
11317 scoped_restore_current_pspace_and_thread.
11318 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11319 (download_tracepoint_locations): Use
11320 scoped_restore_current_pspace_and_thread.
11321 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11322 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11323 (enum step_over_calls_kind): Moved from inferior.h.
11324 (class scoped_restore_current_thread): New class.
11325 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11326 declaration.
11327 (scoped_restore_current_thread): New class.
11328 * infcmd.c: Include "common/gdb_optional.h".
11329 (continue_1, proceed_after_attach): Use
11330 scoped_restore_current_thread.
11331 (notice_new_inferior): Use scoped_restore_current_thread.
11332 * inferior.c: Include "progspace-and-thread.h".
11333 (restore_inferior, save_current_inferior): Delete.
11334 (add_inferior_command, clone_inferior_command): Use
11335 scoped_restore_current_pspace_and_thread.
11336 * inferior.h (scoped_restore_current_inferior): New class.
11337 * infrun.c: Include "progspace-and-thread.h" and
11338 "common/gdb_optional.h".
11339 (follow_fork_inferior): Use
11340 scoped_restore_current_pspace_and_thread.
11341 (scoped_restore_exited_inferior): New class.
11342 (handle_vfork_child_exec_or_exit): Use
11343 scoped_restore_exited_inferior,
11344 scoped_restore_current_pspace_and_thread,
11345 scoped_restore_current_thread and scoped_restore.
11346 (fetch_inferior_event): Use scoped_restore_current_thread.
11347 * linespec.c (decode_line_full, decode_line_1): Use
11348 scoped_restore_current_program_space.
11349 * mi/mi-main.c: Include "progspace-and-thread.h".
11350 (exec_continue): Use scoped_restore_current_thread.
11351 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11352 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11353 * proc-service.c (ps_pglobal_lookup): Use
11354 scoped_restore_current_program_space.
11355 * progspace-and-thread.c: New file.
11356 * progspace-and-thread.h: New file.
11357 * progspace.c (release_program_space, clone_program_space): Use
11358 scoped_restore_current_program_space.
11359 (restore_program_space, save_current_program_space)
11360 (save_current_space_and_thread): Delete.
11361 (switch_to_program_space_and_thread): Moved to
11362 progspace-and-thread.c.
11363 * progspace.h (save_current_program_space)
11364 (save_current_space_and_thread): Delete declarations.
11365 (scoped_restore_current_program_space): New class.
11366 * remote.c (remote_btrace_maybe_reopen): Use
11367 scoped_restore_current_thread.
11368 * symtab.c: Include "progspace-and-thread.h".
11369 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11370 * thread.c (print_thread_info_1): Use
11371 scoped_restore_current_thread.
11372 (struct current_thread_cleanup): Delete.
11373 (do_restore_current_thread_cleanup)
11374 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11375 (scoped_restore_current_thread::~scoped_restore_current_thread):
11376 ... this new dtor.
11377 (make_cleanup_restore_current_thread): Rename/convert to ...
11378 (scoped_restore_current_thread::scoped_restore_current_thread):
11379 ... this new ctor.
11380 (thread_apply_all_command): Use scoped_restore_current_thread.
11381 (thread_apply_command): Use scoped_restore_current_thread.
11382 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11383 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11384
f6223dbb
PA
113852017-05-04 Pedro Alves <palves@redhat.com>
11386
11387 * thread.c (make_cleanup_restore_current_thread): Move
11388 find_thread_ptid call before the is_stopped call. Assert that the
11389 thread is found. Replace is_stopped call by checking the thread's
11390 state directly. Remove unnecessary NULL-thread check.
11391
3c3ae77e
PA
113922017-05-04 Pedro Alves <palves@redhat.com>
11393
11394 * corelow.c (thread_section_name): New class.
11395 (get_core_register_section, get_core_siginfo): Use it.
11396
45eba0ab
AA
113972017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11398
11399 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11400 (get_core_register_section): Remove xfree of NULL pointer.
11401
f81fdd35
AH
114022017-05-03 Alan Hayward <alan.hayward@arm.com>
11403
11404 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11405 * regcache.c (regcache::raw_supply_zeroed): New function.
11406 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11407
35837774
SM
114082017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11409
11410 * gdbarch.sh: Remove commented out definition of
11411 TARGET_CHAR_BIT.
11412 * gdbarch.h: Re-generate.
11413
c94fee56
SDJ
114142017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11415
11416 * configure: Regenerate.
11417
d17f7b36
SM
114182017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11419
11420 * solib-target.c (solib_target_relocate_section_addresses):
11421 Remove num_section_bases, num_bases, segment_bases variables.
11422
b560ebd6
SM
114232017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11424
11425 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11426
f2f46dfc
SM
114272017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11428
11429 * solib-target.c: Include <vector>
11430 (struct lm_info_target) <~lm_info_target>: Remove.
11431 <segment_bases, section_bases>: Change type to
11432 std::vector<CORE_ADDR>.
11433 (library_list_start_segment, library_list_start_section,
11434 library_list_end_library,
11435 solib_target_relocate_section_addresses): Adjust.
11436
a0ff9e1a
SM
114372017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11438
11439 * gdbarch.sh (software_single_step): Change return type to
11440 std::vector<CORE_ADDR>.
11441 * gdbarch.c, gdbarch.h: Re-generate.
11442 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11443 Adjust.
11444 (arm_deal_with_atomic_sequence_raw): Adjust.
11445 (thumb_get_next_pcs_raw): Adjust.
11446 (arm_get_next_pcs_raw): Adjust.
11447 (arm_get_next_pcs): Adjust.
11448 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11449 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11450 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11451 (alpha_software_single_step): Adjust.
11452 * alpha-tdep.h (alpha_software_single_step): Adjust.
11453 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11454 * arm-tdep.c (arm_software_single_step): Adjust.
11455 (arm_breakpoint_kind_from_current_state): Adjust.
11456 * arm-tdep.h (arm_software_single_step): Adjust.
11457 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11458 * cris-tdep.c (cris_software_single_step): Adjust.
11459 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11460 (micromips_deal_with_atomic_sequence): Adjust.
11461 (deal_with_atomic_sequence): Adjust.
11462 (mips_software_single_step): Adjust.
11463 * mips-tdep.h (mips_software_single_step): Adjust.
11464 * moxie-tdep.c (moxie_software_single_step): Adjust.
11465 * nios2-tdep.c (nios2_software_single_step): Adjust.
11466 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11467 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11468 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11469 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11470 * sparc-tdep.c (sparc_software_single_step): Adjust.
11471 * spu-tdep.c (spu_software_single_step): Adjust.
11472 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11473
ea480a30
SM
114742017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11475
11476 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11477 * gdbarch.h: Re-generate.
11478
d050f7d7
TW
114792017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11480
11481 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11482 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11483 * python/py-instruction.c, python/py-instruction.h: New file.
11484 * python/py-record.c: Add py-instruction.h include.
11485 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11486 gdb.RecordInstruction.
11487 * python/python-internal.h: Add gdbpy_initialize_instruction
11488 declaration.
11489 * python/python.c (do_start_initialization): Add
11490 gdbpy_initialize_instruction.
11491
14f819c8
TW
114922017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11493
11494 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11495 Remove.
11496 (btrace_func_from_recpy_func): New function.
11497 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11498 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11499 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11500 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11501 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11502 Also, use new helper functions.
11503 (btpy_list_item): Use new helper functions.
11504 (recpy_bt_function_call_history): Use new type name.
11505 (btpy_call_getset): Remove.
11506 (gdbpy_initialize_btrace): Remove code to initialize
11507 gdb.BtraceFunctionCall.
11508 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11509 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11510 recpy_bt_func_prev, recpy_bt_func_next): New export.
11511 * python/py-record.c (recpy_func_type): New static object.
11512 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11513 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11514 recpy_func_next): New function.
11515 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11516 (recpy_func_getset): New static object.
11517 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11518 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11519
0ed5da75
TW
115202017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11521
11522 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11523 (btpy_object, btpy_insn_type, btpy_new): Remove.
11524 (btpy_list_object): Use gdb.RecordInstruction type instead of
11525 gdb.BtraceInstruction type.
11526 (btrace_insn_from_recpy_insn): New function.
11527 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11528 btpy_new.
11529 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11530 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11531 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11532 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11533 instead of btpy_object.
11534 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11535 btpy_insn_data, btpy_insn_decode): Rename to ...
11536 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11537 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11538 recpy_bt_insn_decode): This. Also, use new helper functions.
11539 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11540 recpy_insn_type.
11541 (btpy_insn_getset): Remove.
11542 (gdbpy_initialize_btrace): Remove code to initialize
11543 gdb.BtraceInstruction. Use recpy_element_object.
11544 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11545 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11546 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11547 * python/py-record.c (recpy_insn_type): New static object.
11548 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11549 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11550 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11551 New function.
11552 (recpy_insn_getset): New static object.
11553 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11554 * python/py-record.h (recpy_element_object): New typedef.
11555 (recpy_insn_type, recpy_insn_new): New export.
11556
913aeadd
TW
115572017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11558
11559 * py-record-btrace.c (btpy_insn_new): Removed.
11560 (btpy_insn_or_gap_new): New function.
11561 (btpy_insn_error): Removed.
11562 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11563 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11564 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11565 btpy_insn_or_gap_new instead of btpy_insn_new.
11566 (btpy_insn_getset): Remove btpy_insn_error.
11567 * py-record.c (recpy_gap_type): New static object.
11568 (recpy_gap_object): New typedef.
11569 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11570 recpy_gap_reason_string): New function.
11571 (recpy_gap_getset): New static object.
11572 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11573 * py-record.h (recpy_gap_new): New export.
11574
a3be24ad
TW
115752017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11576
11577 * python/py-record.c (recpy_ptid): Remove.
11578 (recpy_record_getset): Remove recpy_ptid.
11579
ae20e79a
TW
115802017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11581
11582 * btrace.c (btrace_fetch): Set inferior_ptid.
11583 * python/py-record-btrace.c: Add "py-record.h" include.
11584 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11585 recpy_bt_end, recpy_bt_instruction_history,
11586 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11587 in gdb.Record object instead of current ptid.
11588 * python/py-record.c: Include new "py-record.h" file.
11589 (recpy_record_object): Moved to py-record.h.
11590 * python/py-record.h: New file.
11591
8d0050ea
TW
115922017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11593
11594 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11595 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11596 indentation.
11597
3f380b50
JB
115982017-05-01 Joel Brobecker <brobecker@adacore.com>
11599
11600 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11601 the past maintainers section.
11602
07495424
YQ
116032017-04-28 Yao Qi <yao.qi@linaro.org>
11604
11605 * infcmd.c (get_return_value): Use regcache ctor, and remove
11606 cleanup.
11607
deb1fa3e
YQ
116082017-04-28 Yao Qi <yao.qi@linaro.org>
11609 Pedro Alves <palves@redhat.com>
11610
11611 * regcache.c (regcache::regcache): New tag dispatch ctor.
11612 (do_cooked_read): Moved above.
11613 (regcache_dup): Use the tag dispatch ctor..
11614 * regcache.h (regcache): Declare ctor, delete copy ctor and
11615 assignment operator, remove friend regcache_dup.
11616
b421c83c
YQ
116172017-04-28 Yao Qi <yao.qi@linaro.org>
11618
11619 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11620 call method save instead of regcache_cpy.
11621 * regcache.h (struct regcache): Make regcache_dup a friend.
11622
ef79d9a3
YQ
116232017-04-28 Yao Qi <yao.qi@linaro.org>
11624
11625 * regcache.c (struct regcache): Move to regcache.h
11626 (regcache::arch): New method.
11627 (regcache_get_ptid): Update.
11628 (get_regcache_arch): Call arch method.
11629 (get_regcache_aspace): Call method aspace.
11630 (register_buffer): Change it to method.
11631 (regcache_save): Change it to regcache::save.
11632 (regcache_restore): Likewise.
11633 (regcache_cpy_no_passthrough): Remove the declaration.
11634 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11635 (regcache_cpy_no_passthrough): Change it to method
11636 cpy_no_passthrough.
11637 (regcache_register_status): Change it to method
11638 get_register_status.
11639 (regcache_invalidate): Change it to method invalidate.
11640 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11641 (regcache_raw_update): Change it to method raw_update.
11642 (regcache_raw_read): Likewise.
11643 (regcache_raw_read_signed): Likewise.
11644 (regcache_raw_read_unsigned): Likewise.
11645 (regcache_raw_write_signed): Likewise.
11646 (regcache_raw_write_unsigned): Likewise.
11647 (regcache_cooked_read): Likewise.
11648 (regcache_cooked_read_value): Likewise.
11649 (regcache_cooked_read_signed): Likewise.
11650 (regcache_cooked_read_unsigned): Likewise.
11651 (regcache_cooked_write_signed): Likewise.
11652 (regcache_cooked_write_unsigned): Likewise.
11653 (regcache_raw_set_cached_value): Likewise.
11654 (regcache_raw_write): Likewise.
11655 (regcache_cooked_write): Likewise.
11656 (regcache_xfer_part): Likewise.
11657 (regcache_raw_read_part): Likewise.
11658 (regcache_raw_write_part): Likewise.
11659 (regcache_cooked_read_part): Likewise.
11660 (regcache_cooked_write_part): Likewise.
11661 (regcache_raw_supply): Likewise.
11662 (regcache_raw_collect): Likewise.
11663 (regcache_transfer_regset): Likewise.
11664 (regcache_supply_regset): Likewise.
11665 (regcache_collect_regset): Likewise.
11666 (regcache_debug_print_register): Likewise.
11667 (enum regcache_dump_what): Move it to regcache.h.
11668 (regcache_dump): Change it to method dump.
11669 * regcache.h (enum regcache_dump_what): New.
11670 (class regcache): New.
11671 * target.c (target_fetch_registers): Call method
11672 debug_print_register.
11673 (target_store_registers): Likewise.
11674
f8fdb78e
SM
116752017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11676
11677 * windows-nat.c (struct lm_info_windows): Initialize field.
11678 (windows_make_so): Allocate lm_info_windows with new.
11679 (windows_free_so): Free lm_info_windows with delete.
11680
9ccbfd7b
SM
116812017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11682
11683 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11684 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11685 cleanup.
11686 (darwin_free_so): Free lm_info_darwin with delete.
11687
76e75227
SM
116882017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11689
11690 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11691 <l_addr_p>: Change type to bool.
11692 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11693 (svr4_free_so): Free lm_info_svr4 with delete.
11694 (svr4_copy_library_list): Replace memcpy with call to copy
11695 constructor.
11696 (library_list_start_library, svr4_default_sos): Allocate
11697 lm_info_svr4 with new.
11698
51046d9e
SM
116992017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11700
11701 * solib-target.c (struct lm_info_target): Add destructor,
11702 initialize fields.
11703 <name>: Change type to std::string.
11704 (library_list_start_library): Allocate lm_info_target with new.
11705 (solib_target_free_library_list): Free lm_info_target with
11706 delete.
11707 (solib_target_current_sos): Adapt to std::string.
11708 (solib_target_free_so): Free lm_info_target with delete.
11709
4023ae76
SM
117102017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11711
11712 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11713 fields.
11714 (frv_current_sos): Allocate lm_info_frv with new.
11715 (frv_relocate_main_executable): Free lm_info_frv with delete,
11716 allocate with new.
11717 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11718
af43057b
SM
117192017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11720
11721 * solib-frv.c (struct lm_info_frv): Fix indentation.
11722
b0911207
SM
117232017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11724
11725 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11726 map field.
11727 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11728 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11729 and allocate with new.
11730 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11731
6c401f72
SM
117322017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11733
11734 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11735 <filename, member_name>: Change type to std::string.
11736 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11737 (library_list_start_library): Allocate lm_info_aix with new.
11738 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11739 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11740 with copy constructor.
11741
d0e449a1
SM
117422017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11743
11744 * solist.h (struct lm_info): Remove.
11745 (struct lm_info_base): New class.
11746 (struct so_list) <lm_info>: Change type to lm_info_base *.
11747 * nto-tdep.c (struct lm_info): Remove.
11748 (lm_addr): Adjust.
11749 * solib-aix.c (struct lm_info): Rename to ...
11750 (struct lm_info_aix): ... this. Extend lm_info_base.
11751 (lm_info_p): Rename to ...
11752 (lm_info_aix_p): ... this, and adjust.
11753 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11754 solib_aix_parse_libraries, library_list_start_library,
11755 solib_aix_free_library_list, solib_aix_parse_libraries,
11756 solib_aix_get_library_list,
11757 solib_aix_relocate_section_addresses, solib_aix_free_so,
11758 solib_aix_get_section_offsets,
11759 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11760 Adjust.
11761 (struct solib_aix_inferior_data) <library_list>: Adjust.
11762 * solib-darwin.c (struct lm_info): Rename to ...
11763 (struct lm_info_darwin): ... this. Extend lm_info_base.
11764 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11765 * solib-dsbt.c (struct lm_info): Rename to ...
11766 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11767 (struct dsbt_info) <main_executable_lm_info): Adjust.
11768 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11769 dsbt_relocate_section_addresses): Adjust.
11770 * solib-frv.c (struct lm_info): Rename to ...
11771 (struct lm_info_frv): ... this. Extend lm_info_base.
11772 (main_executable_lm_info): Adjust.
11773 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11774 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11775 find_canonical_descriptor_in_load_object,
11776 frv_fdpic_find_canonical_descriptor): Adjust.
11777 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11778 to lm_info_svr4.
11779 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11780 svr4_clear_so, svr4_copy_library_list,
11781 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11782 svr4_current_sos, svr4_fetch_objfile_link_map,
11783 solist_update_incremental): Adjust.
11784 * solib-svr4.h (struct lm_info_svr4): Move here from
11785 solib-svr4.c.
11786 * solib-target.c (struct lm_info): Rename to ...
11787 (struct lm_info_target): ... this. Extend lm_info_base.
11788 (lm_info_p): Rename to ...
11789 (lm_info_target_p): ... this.
11790 (solib_target_parse_libraries, library_list_start_segment,
11791 library_list_start_section, library_list_start_library,
11792 library_list_end_library, solib_target_free_library_list,
11793 solib_target_current_sos, solib_target_free_so,
11794 solib_target_relocate_section_addresses): Adjust.
11795 * windows-nat.c (struct lm_info): Rename to ...
11796 (struct lm_info_windows): ... this. Extend lm_info_base.
11797 (windows_make_so, handle_load_dll, handle_unload_dll,
11798 windows_xfer_shared_libraries): Adjust.
11799
434a4023
SM
118002017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11801
11802 * solib-darwin.c (struct darwin_so_list): Remove.
11803 (darwin_current_sos): Allocate an so_list object instead of a
11804 darwin_so_list, separately allocate an lm_info object.
11805 (darwin_free_so): Free lm_info.
11806
428544e8
JB
118072017-04-28 John Baldwin <jhb@FreeBSD.org>
11808
11809 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11810 with fprintf_filtered.
11811
4621115f
YQ
118122017-04-28 Yao Qi <yao.qi@linaro.org>
11813
11814 * regcache.c (regcache::regcache): New function.
11815 (regcache::~regcache): New function.
11816 (regcache_xmalloc_1): Remove.
11817 (regcache_xmalloc): Call new regcache.
11818 (regcache_xfree): Call delete regcache.
11819 (get_thread_arch_aspace_regcache): Call new regcache.
11820
339053c2
YQ
118212017-04-28 Yao Qi <yao.qi@linaro.org>
11822
11823 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11824 lwp instead of ptid_get_lwp.
11825
7974a605
YQ
118262017-04-28 Yao Qi <yao.qi@linaro.org>
11827
11828 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11829 lwp_info instead of getting from inferior_ptid.
11830
e15c3eb4
KS
118312017-04-27 Keith Seitz <keiths@redhat.com>
11832
11833 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11834 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11835 (CV_CONVERSION_BADNESS): Define.
11836 (rank_one_type): Remove overly restrictive rvalue reference
11837 rank checks.
11838 Add cv-qualifier checks and subranks for type equality.
11839 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11840 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11841 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11842
72bc1d24
SM
118432017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11844
11845 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11846 count when creating the object.
11847
55bcecda
UW
118482017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11849 Ulrich Weigand <uweigand@de.ibm.com>
11850
11851 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11852 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11853 is used in AIX.
11854 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11855 (process_xcoff_symbol): Likewise.
11856 (scan_xcoff_symtab): Likewise.
11857
5c99fcf8
AH
118582017-04-26 Alan Hayward <alan.hayward@arm.com>
11859
11860 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11861 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11862 (ia64_access_reg): Use get_frame_register_unsigned.
11863 (ia64_access_rse_reg): Likewise.
11864 (ia64_libunwind_frame_prev_register): Likewise.
11865
b41c5a85
JW
118662017-04-26 Jiong Wang <jiong.wang@arm.com>
11867
11868 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11869 * gdbarch.c: Regenerated.
11870 * gdbarch.h: Regenerated.
11871 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11872 visibility external.
11873 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11874 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11875 (enum cfa_how_kind): Move to ...
11876 (struct dwarf2_frame_state_reg_info): Likewise.
11877 (struct dwarf2_frame_state): Likewise.
11878 * dwarf2-frame.h: ... here.
11879 (dwarf2_frame_state_alloc_regs): New declaration.
11880 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11881 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11882
c185f580
AH
118832017-04-26 Alan Hayward <alan.hayward@arm.com>
11884
11885 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11886 regcache_raw_read_unsigned.
11887 (xtensa_pseudo_register_write): Likewise.
11888
19c45594
AH
118892017-04-26 Alan Hayward <alan.hayward@arm.com>
11890
11891 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11892 (nds32_pseudo_register_write): Likewise.
11893
4658f12e
YQ
118942017-04-25 Yao Qi <yao.qi@linaro.org>
11895
11896 * regcache.c (struct regcache) <readonly_p>: Change its type
11897 to bool.
11898 (regcache_xmalloc_1): Update parameter type and callers update.
11899
d581dda8
YQ
119002017-04-25 Yao Qi <yao.qi@linaro.org>
11901
11902 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11903 set_gdbarch_wchar_bit.
11904 * arm-tdep.c (arm_gdbarch_init): Likewise.
11905
debed3db
PA
119062017-04-25 Pedro Alves <palves@redhat.com>
11907
11908 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11909 (BothAreRelocatable, memcopy, memmove): Don't define.
11910 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11911 macros.
11912
b0b92aeb
PA
119132017-04-25 Pedro Alves <palves@redhat.com>
11914
11915 * common/common-defs.h: Include "common/poison.h".
11916 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11917 and adjust.
11918 * common/poison.h: New file.
11919 * common/traits.h: Include <type_traits>.
11920 (Not, Or, Requires): New, moved from common/function-view.h.
11921
16c4d54a
PA
119222017-04-25 Pedro Alves <palves@redhat.com>
11923
11924 * breakpoint.h (struct breakpoint): In-class initialize all
11925 fields. Make boolean fields "bool".
11926 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11927 memset call and initializations no longer necessary.
11928
b5c36682
PA
119292017-04-25 Pedro Alves <palves@redhat.com>
11930
11931 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11932 reference.
11933 (pt_btrace_insn): New function.
11934 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11935
5625a286
PA
119362017-04-25 Pedro Alves <palves@redhat.com>
11937
11938 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11939 "base" field and inherit from "bp_location" instead. Add
11940 non-default ctor.
11941 (allocate_location_exception): Use new non-default ctor.
11942 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11943 (init_bp_location): Convert to ...
11944 (bp_location::bp_location): ... this new ctor, and remove memset
11945 call.
11946 (base_breakpoint_allocate_location): Use the new non-default ctor.
11947 * breakpoint.h (bp_location): Now a class. Declare default and
11948 non-default ctors. In-class initialize all members.
11949 (init_bp_location): Remove declaration.
11950
23bcc18f
PA
119512017-04-25 Pedro Alves <palves@redhat.com>
11952
11953 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11954 assignment operator.
11955
e1ba3053
YQ
119562017-04-24 Yao Qi <yao.qi@linaro.org>
11957
11958 * doublest.c (convert_doublest_to_floatformat): Call
11959 floatformat_totalsize_bytes.
11960
10f489e5
TT
119612017-04-22 Tom Tromey <tom@tromey.com>
11962
11963 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11964 ui_out_emit_list.
11965 * stack.c (print_frame): Use ui_out_emit_list.
11966 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11967 ui_out_emit_list.
11968 * mi/mi-main.c (print_one_inferior)
11969 (mi_cmd_data_list_register_names)
11970 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11971 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11972 ui_out_emit_list.
11973 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11974 (mi_output_solib_attribs): Use ui_out_emit_list,
11975 ui_out_emit_tuple.
11976 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11977 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11978 (mi_cmd_stack_list_args, list_args_or_locals): Use
11979 ui_out_emit_list.
11980 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11981 * breakpoint.c (print_solib_event, output_thread_groups): Use
11982 ui_out_emit_list.
11983
0092b74d
TT
119842017-04-22 Tom Tromey <tom@tromey.com>
11985
11986 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11987 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11988 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11989
a14a62dd
TT
119902017-04-22 Tom Tromey <tom@tromey.com>
11991
11992 * tracepoint.c (tvariables_info_1)
11993 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11994
46b9c129
TT
119952017-04-22 Tom Tromey <tom@tromey.com>
11996
11997 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11998 annotate_arg_emitter.
11999 * breakpoint.c (print_mention_watchpoint)
12000 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12001 * annotate.h (struct annotate_arg_emitter): New.
12002
2e783024
TT
120032017-04-22 Tom Tromey <tom@tromey.com>
12004
12005 * record-btrace.c (record_btrace_insn_history)
12006 (record_btrace_insn_history_range, record_btrace_call_history)
12007 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12008 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12009 ui_out_emit_tuple.
12010 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12011 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12012 * skip.c (skip_info): Use ui_out_emit_tuple.
12013 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12014 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12015 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12016 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12017 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12018 ui_out_emit_tuple.
12019 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12020 (output_register, mi_cmd_data_read_memory)
12021 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12022 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12023 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12024 Use ui_out_emit_tuple.
12025 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12026 ui_out_emit_tuple.
12027 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12028 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12029 * linux-thread-db.c (info_auto_load_libthread_db): Use
12030 ui_out_emit_tuple.
12031 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12032 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12033 * disasm.c (do_mixed_source_and_assembly_deprecated)
12034 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12035 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12036 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12037 * breakpoint.c (print_one_breakpoint_location)
12038 (print_one_breakpoint): Use ui_out_emit_tuple.
12039 * auto-load.c (print_script, info_auto_load_cmd): Use
12040 ui_out_emit_tuple.
12041 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12042
9be21bb4
SM
120432017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12044
12045 * thread.c (print_thread_info_1): Remove dead code.
12046
0d4c07af
JK
120472017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12048
12049 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12050 GDB_SELF_TEST.
12051 * arm-tdep.c (selftests::arm_record_test): Likewise.
12052
4daf993d
YQ
120532017-04-21 Yao Qi <yao.qi@linaro.org>
12054
12055 * regcache.c (regcache_restore): Remove argument 2. Replace
12056 argument 3 with regcache. Get register status from
12057 src->register_status and get register contents from
12058 register_buffer (src, regnum).
12059 (regcache_cpy): Update.
12060
a6c21d4a
PA
120612017-04-19 Pedro Alves <palves@redhat.com>
12062
12063 * gdbthread.h (thread): Add missing closing parenthesis in
12064 comment.
12065
3a3fd0fd
PA
120662017-04-19 Pedro Alves <palves@redhat.com>
12067
12068 * common/refcounted-object.h: New file.
12069 * gdbthread.h: Include "common/refcounted-object.h".
12070 (thread_info): Inherit from refcounted_object and add comments.
12071 (thread_info::incref, thread_info::decref)
12072 (thread_info::m_refcount): Delete.
12073 (thread_info::deletable): Use the refcounted_object::refcount()
12074 method.
12075 * inferior.c (current_inferior_): Add comment.
12076 (set_current_inferior): Increment/decrement refcounts.
12077 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12078 not-deletable instead of comparing with the current inferior.
12079 (initialize_inferiors): Increment the initial inferior's refcount.
12080 * inferior.h (struct inferior): Forward declare.
12081 Include "common/refcounted-object.h".
12082 (current_inferior, set_current_inferior): Move declaration to
12083 before struct inferior's definition, and fix comment.
12084 (inferior): Inherit from refcounted_object. Add comments.
12085 * thread.c (switch_to_thread_no_regs): Reference the thread's
12086 inferior pointer directly instead of doing a ptid lookup.
12087 (switch_to_no_thread): New function.
12088 (switch_to_thread(thread_info *)): New function, factored out
12089 from ...
12090 (switch_to_thread(ptid_t)): ... this.
12091 (restore_current_thread): Delete.
12092 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12093 fields, and add 'inf' field.
12094 (do_restore_current_thread_cleanup): Check whether old->inf is
12095 alive instead of looking up an inferior by ptid. Use
12096 switch_to_thread and switch_to_no_thread.
12097 (restore_current_thread_cleanup_dtor): Use old->inf directly
12098 instead of lookup up an inferior by id. Decref the inferior.
12099 Don't restore 'removable'.
12100 (make_cleanup_restore_current_thread): Same the inferior pointer
12101 in old, instead of the inferior number. Incref the inferior.
12102 Don't save/clear 'removable'.
12103
9bcb1f16
PA
121042017-04-19 Pedro Alves <palves@redhat.com>
12105
12106 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12107 unittests/scoped_restore-selftests.c.
12108 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12109 * common/scoped_restore.h (scoped_restore_base): Make "class".
12110 (scoped_restore_base::release): New public method.
12111 (scoped_restore_base::scoped_restore_base): New protected ctor.
12112 (scoped_restore_base::m_saved_var): New protected field.
12113 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12114 scoped_restore_base base class instead of m_saved_var directly.
12115 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12116 (scoped_restore_tmpl::scoped_restore_tmpl(const
12117 scoped_restore_tmpl<T>&)): Likewise.
12118 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12119 method.
12120 (scoped_restore_tmpl::saved_var): New method.
12121 (scoped_restore_tmpl::m_saved_var): Delete.
12122 * inferior.h (inferior::detaching): Now a bool.
12123 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12124 cleanup.
12125 * unittests/scoped_restore-selftests.c: New file.
12126
26fcd539
PA
121272017-04-19 Pedro Alves <palves@redhat.com>
12128
12129 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12130 Re-sort in alphabetic order.
12131
fdd243b0
PA
121322017-04-18 Pedro Alves <palves@redhat.com>
12133
12134 * xml-support.c (obstack_xml_printf): Delete.
12135 * xml-support.h (obstack_xml_printf): Delete.
12136
4895cde2
PA
121372017-04-18 Pedro Alves <palves@redhat.com>
12138
12139 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12140 vdebug, verror, body_text, start_element, end_element, name,
12141 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12142 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12143 is_xinclude>: Make private and add m_ prefix.
12144 (gdb_xml_parser::body_text): New method, based on ...
12145 (gdb_xml_body_text): ... this. Adjust.
12146 (gdb_xml_parser::vdebug): New method, based on ...
12147 (gdb_xml_debug): ... this. Adjust.
12148 (gdb_xml_parser::verror): New method, based on ...
12149 (gdb_xml_error): ... this. Adjust.
12150 (gdb_xml_parser::start_element): New method, based on ...
12151 (gdb_xml_start_element): ... this. Adjust.
12152 (gdb_xml_start_element_wrapper): Defer to
12153 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12154 (gdb_xml_parser::end_element): New method, based on ...
12155 (gdb_xml_end_element_wrapper): ... this. Adjust.
12156 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12157 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12158 (gdb_xml_parser::use_dtd): New method, based on ...
12159 (gdb_xml_use_dtd): ... this. Adjust.
12160 (gdb_xml_parser::parse): New method, based on ...
12161 (gdb_xml_parse): ... this. Adjust.
12162 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12163 (xinclude_start_include): Adjust to call the parser's name method.
12164 (xml_xinclude_default, xml_xinclude_start_doctype)
12165 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12166 method.
12167 (xml_process_xincludes): Adjust to call parser methods.
12168 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12169 declarations.
12170
bd8a901f
PA
121712017-04-18 Pedro Alves <palves@redhat.com>
12172
12173 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12174 gdb::optional<std::string>.
12175 * xml-support.c: Include <string>.
12176 (scope_level::scope_level(scope_level &&))
12177 (scope_level::~scope_level): Delete.
12178 (scope_level::body): Now a std::string.
12179 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12180 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12181 parameter.
12182 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12183 (xinclude_parsing_data::output): Now a std::string reference.
12184 (xinclude_start_include): Adjust.
12185 (xml_xinclude_default): Adjust.
12186 (xml_process_xincludes): Add 'output' parameter, and return bool.
12187 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12188 and return bool.
12189 * xml-tdesc.c: Include <unordered_map> and <string>.
12190 (tdesc_xml_cache): Delete.
12191 (tdesc_xml_cache_s): Delete.
12192 (xml_cache): Now an std::unordered_map.
12193 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12194 (target_fetch_description_xml): Change return type to
12195 gdb::optional<std::string>, and adjust.
12196 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12197 (target_fetch_description_xml): Change return type to
12198 gdb::optional<std::string>.
12199
d35d1958
PA
122002017-04-18 Pedro Alves <palves@redhat.com>
12201
12202 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12203 unittests/optional-selftests.c.
12204 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12205 * unittests/optional-selftests.c: New file.
12206 * unittests/optional/assignment/1.cc: New file.
12207 * unittests/optional/assignment/2.cc: New file.
12208 * unittests/optional/assignment/3.cc: New file.
12209 * unittests/optional/assignment/4.cc: New file.
12210 * unittests/optional/assignment/5.cc: New file.
12211 * unittests/optional/assignment/6.cc: New file.
12212 * unittests/optional/assignment/7.cc: New file.
12213 * unittests/optional/cons/copy.cc: New file.
12214 * unittests/optional/cons/default.cc: New file.
12215 * unittests/optional/cons/move.cc: New file.
12216 * unittests/optional/cons/value.cc: New file.
12217 * unittests/optional/in_place.cc: New file.
12218 * unittests/optional/observers/1.cc: New file.
12219 * unittests/optional/observers/2.cc: New file.
12220
22796e97
PA
122212017-04-18 Pedro Alves <palves@redhat.com>
12222
12223 * common/gdb_optional.h: Include common/traits.h.
12224 (in_place_t): New type.
12225 (in_place): New constexpr variable.
12226 (optional::optional): Remove member initialization of
12227 m_instantiated.
12228 (optional::optional(in_place_t...)): New constructor.
12229 (optional::~optional): Use reset.
12230 (optional::optional(const optional&)): New.
12231 (optional::optional(const optional&&)): New.
12232 (optional::optional(T &)): New.
12233 (optional::optional(T &&)): New.
12234 (operator::operator=(const optional &)): New.
12235 (operator::operator=(optional &&)): New.
12236 (operator::operator= (const T &))
12237 (operator::operator= (T &&))
12238 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12239 (operator::reset): New.
12240 (operator::m_instantiated):: Add in-class initializer.
12241 * common/traits.h: Include <type_traits>.
12242 (struct And): New types.
12243
a7fc9b61
PA
122442017-04-18 Pedro Alves <palves@redhat.com>
12245
12246 * xml-support.c: Include <vector>.
12247 (scope_level::scope_level(const gdb_xml_element *))
12248 (scope_level::scope_level(scope_level&&)): New.
12249 (scope_level::~scope_level): New.
12250 (scope_level_s): Delete.
12251 (gdb_xml_parser::scopes): Now a std::vector.
12252 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12253 Use std::vector.
12254 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12255 scope cleanup code.
12256 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12257 of the scopes member. Use std::vector::emplace_back.
12258
010151c9
PA
122592017-04-18 Pedro Alves <palves@redhat.com>
12260
12261 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12262 a bool.
12263 (gdb_xml_end_element): Change type of first parameter.
12264 (gdb_xml_cleanup): Rename to ...
12265 (gdb_xml_parser::~gdb_xml_parser): ... this.
12266 (gdb_xml_create_parser_and_cleanup): Delete with ...
12267 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12268 to this new ctor.
12269 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12270 using gdb_xml_create_parser_and_cleanup.
12271 (xinclude_parsing_data): Add ctor/dtor.
12272 (xml_xinclude_cleanup): Delete.
12273 (xml_process_xincludes): Create a local xinclude_parsing_data
12274 instead of heap-allocating one. Create a local gdb_xml_parser
12275 instead of heap-allocating one with
12276 gdb_xml_create_parser_and_cleanup.
12277
d56060f0
JB
122782017-04-18 John Baldwin <jhb@FreeBSD.org>
12279
12280 PR threads/20743
12281 * fbsd-nat.c (resume_one_thread_cb): Remove.
12282 (resume_all_threads_cb): Remove.
12283 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12284 iterate_over_threads.
12285
305d16a9
JB
122862017-04-17 Joel Brobecker <brobecker@adacore.com>
12287
12288 * NEWS: Create a new section for the next release branch.
12289 Rename the section of the current branch, now that it has
12290 been cut.
12291
8bb57231
JB
122922017-04-17 Joel Brobecker <brobecker@adacore.com>
12293
12294 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12295 * version.in: Bump version to 8.0.50.DATE-git.
12296
096c92dd
SDJ
122972017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12298
12299 PR gdb/21385
12300 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12301 independently of the host, and fix build breakage on Cygwin.
12302
0550c955
PA
123032017-04-13 Pedro Alves <palves@redhat.com>
12304
12305 * inferior.c (free_inferior): Convert to ...
12306 (inferior::~inferior): ... this dtor.
12307 (inferior::inferior): New ctor, factored out from ...
12308 (add_inferior_silent): ... here. Allocate the inferior with a new
12309 expression.
12310 (delete_inferior): Call delete instead of free_inferior.
12311 * inferior.h (gdb_environ, continuation): Forward declare.
12312 (inferior): Now a class. Add in-class initialization to all
12313 members. Make boolean fields bool, except 'detaching'.
12314 (inferior::inferior): New explicit ctor.
12315 (inferior::~inferior): New.
12316
e3d60dfc
PA
123172017-04-13 Pedro Alves <palves@redhat.com>
12318
12319 * inferior.c (init_inferior_list): Delete.
12320 * inferior.h (init_inferior_list): Delete.
12321
5fd69d0a
PA
123222017-04-13 Pedro Alves <palves@redhat.com>
12323
12324 PR threads/13217
12325 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12326 (top level): Call it twice, with different thread sets.
12327
c6609450
PA
123282017-04-13 Pedro Alves <palves@redhat.com>
12329
12330 * thread.c: Include <algorithm>.
12331 (thread_array_cleanup): Delete.
12332 (scoped_inc_dec_ref): New class.
12333 (live_threads_count): New function.
12334 (set_thread_refcount): Delete.
12335 (tp_array_compar_ascending): Now a bool.
12336 (tp_array_compar): Convert to a std::sort comparison function.
12337 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12338 and live_threads_count.
12339
2a00d7ce
PA
123402017-04-13 Pedro Alves <palves@redhat.com>
12341
12342 * infrun.c (follow_fork_inferior): Also switch the current
12343 inferior.
12344
441d7c93
PA
123452017-04-13 Pedro Alves <palves@redhat.com>
12346
12347 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12348 before calling create_internal_breakpoint.
12349
808480f6
PA
123502017-04-13 Pedro Alves <palves@redhat.com>
12351
12352 * fork-child.c (execv_argv): New class.
12353 (breakup_args): Refactored as ...
12354 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12355 Copy arguments to storage and replace separators with NULL
12356 terminators in place.
12357 (escape_bang_in_quoted_argument): Adjust to return bool.
12358 (execv_argv::execv_argv): New ctor.
12359 (execv_argv::init_for_shell): New method, factored out from
12360 fork_inferior. Don't strdup strings into the vector.
12361 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12362 Remove free_vector_argv call.
12363
ad3d022a
YQ
123642017-04-13 Yao Qi <yao.qi@linaro.org>
12365
12366 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12367 tdep->rx_psw_type.
12368
e6ddc3bf
YQ
123692017-04-13 Yao Qi <yao.qi@linaro.org>
12370
12371 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12372 * rx-tdep.c (rx_gdbarch_init): Likewise.
12373
bfb8cf90
PA
123742017-04-13 Pedro Alves <palves@redhat.com>
12375
12376 * breakpoint.h (struct breakpoint): Reindent.
12377
f5336ca5
PA
123782017-04-13 Pedro Alves <palves@redhat.com>
12379
12380 * breakpoint.c (bp_location): Rename to ...
12381 (bp_locations): ... this. All references updated.
12382 (bp_location_count): Rename to ...
12383 (bp_locations_count): ... this. All references updated.
12384 (bp_location_placed_address_before_address_max): Rename to ...
12385 (bp_locations_placed_address_before_address_max): ... this. All
12386 references updated.
12387 (bp_location_shadow_len_after_address_max): Rename to ...
12388 (bp_locations_shadow_len_after_address_max): ... this. All
12389 references updated.
12390 (bp_location_compare_addrs): Rename to ...
12391 (bp_locations_compare_addrs): ... this. All references updated.
12392 (bp_location_compare):Rename to ...
12393 (bp_locations_compare): ... this. All references updated.
12394 (bp_location_target_extensions_update): Rename to ...
12395 (bp_locations_target_extensions_update): ... this. All references
12396 updated.
12397
be628ab8
SDJ
123982017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12399
12400 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12401 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12402 'sgtty.h'.
12403 * common/gdb_termios.h: New file, with parts of "terminal.h".
12404 * inflow.c: Include "gdb_termios.h".
12405 * ser-unix.c: Include "gdb_termios.h".
12406 * terminal.h: Move terminal-related defines to
12407 "common/gdb_termios.h".
12408
8e9e35b1
TT
124092017-04-12 Tom Tromey <tom@tromey.com>
12410
12411 * probe.c (parse_probes): Update.
12412 * location.h (delete_event_location): Don't declare.
12413 (event_location_deleter::operator()): Update.
12414 * location.c (event_location_deleter::operator()): Rename from
12415 delete_event_location.
12416 * linespec.h (linespec_result) <location>: Change type to
12417 event_location_up.
12418 * linespec.c (canonicalize_linespec, event_location_to_sals)
12419 (decode_objc): Update.
12420 (linespec_result): Don't call delete_event_location.
12421 * breakpoint.c (create_breakpoints_sal)
12422 (bkpt_probe_create_sals_from_location)
12423 (strace_marker_create_sals_from_location): Update.
12424
16e802b9
TT
124252017-04-12 Tom Tromey <tom@tromey.com>
12426
12427 * linespec.h (struct linespec_result): Add constructor and
12428 destructor.
12429 (init_linespec_result, destroy_linespec_result)
12430 (make_cleanup_destroy_linespec_result): Don't declare.
12431 * linespec.c (init_linespec_result): Remove.
12432 (linespec_result::~linespec_result): Rename from
12433 destroy_linespec_result. Update.
12434 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12435 Remove.
12436 * breakpoint.c (create_breakpoint, break_range_command)
12437 (decode_location_default): Update.
12438 * ax-gdb.c (agent_command_1): Update.
12439
d28cd78a
TT
124402017-04-12 Tom Tromey <tom@tromey.com>
12441
12442 * remote.c (remote_download_tracepoint): Update.
12443 * python/py-breakpoint.c (bppy_get_location): Update.
12444 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12445 (gdbscm_breakpoint_location): Update.
12446 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12447 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12448 Change type to event_location_up.
12449 * breakpoint.c (create_overlay_event_breakpoint)
12450 (create_longjmp_master_breakpoint)
12451 (create_std_terminate_master_breakpoint)
12452 (create_exception_master_breakpoint)
12453 (breakpoint_event_location_empty_p, print_breakpoint_location)
12454 (print_one_breakpoint_location, create_thread_event_breakpoint)
12455 (init_breakpoint_sal, create_breakpoint)
12456 (print_recreate_ranged_breakpoint, break_range_command)
12457 (init_ada_exception_breakpoint, say_where): Update.
12458 (base_breakpoint_dtor): Don't call delete_event_location.
12459 (bkpt_print_recreate, tracepoint_print_recreate)
12460 (dprintf_print_recreate, update_static_tracepoint)
12461 (breakpoint_re_set_default): Update.
12462
711799d5
TT
124632017-04-12 Tom Tromey <tom@tromey.com>
12464
12465 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12466 type of "to_do". Update.
12467 (compute_stack_depth): Use std::vector.
12468
52d214d3
TT
124692017-04-12 Tom Tromey <tom@tromey.com>
12470
12471 * printcmd.c (find_instruction_backward): Use std::vector.
12472
4c404b8b
TT
124732017-04-12 Tom Tromey <tom@tromey.com>
12474
12475 * symfile.c (objfilep): Remove typedef.
12476 (reread_symbols): Use a std::vector.
12477
156d9eab
TT
124782017-04-12 Tom Tromey <tom@tromey.com>
12479
12480 * mi/mi-main.c (exec_direction_forward): Remove.
12481 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12482 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12483 scoped_restore.
12484 * guile/guile.c (guile_repl_command, guile_command)
12485 (gdbscm_execute_gdb_command): Use scoped_restore.
12486 * go-exp.y (go_parse): Use scoped_restore.
12487 * d-exp.y (d_parse): Use scoped_restore.
12488 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12489 * c-exp.y (c_parse): Use scoped_restore.
12490
4d89769a
TT
124912017-04-12 Tom Tromey <tom@tromey.com>
12492
12493 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12494 (mi_parse): Update return type.
12495 (mi_parse_free): Remove.
12496 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12497 (mi_parse::~mi_parse): Rename from mi_parse_free.
12498 (mi_parse_cleanup): Remove.
12499 (mi_parse): Return a unique_ptr. Use new.
12500 * mi/mi-main.c (mi_execute_command): Update.
12501
4b217cc7
TT
125022017-04-12 Tom Tromey <tom@tromey.com>
12503
12504 * location.c (explicit_location_lex_one): Return a
12505 unique_xmalloc_ptr.
12506 (string_to_explicit_location): Update. Remove cleanups.
12507
59d3651b
TT
125082017-04-12 Tom Tromey <tom@tromey.com>
12509
12510 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12511 (compare_value_and_voffset): Change type. Update.
12512 (compute_vtable_size): Change type of "offset_vec".
12513 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12514 (gnuv3_get_typeid): Remove extraneous declaration.
12515
b24b0d6c
TT
125162017-04-12 Tom Tromey <tom@tromey.com>
12517
12518 * charset.h (wchar_iterator): Fix comment.
12519
80a3b8c5
TT
125202017-04-12 Tom Tromey <tom@tromey.com>
12521
12522 * charset.c (iconv_wrapper): New class.
12523 (cleanup_iconv): Remove.
12524 (convert_between_encodings): Use it.
12525
c83dd867
TT
125262017-04-12 Tom Tromey <tom@tromey.com>
12527
12528 * symfile.h (increment_reading_symtab): Update type.
12529 * symfile.c (decrement_reading_symtab): Remove.
12530 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12531 * psymtab.c (psymtab_to_symtab): Update.
12532 * dwarf2read.c (dw2_instantiate_symtab): Update.
12533
0e8621a0
TT
125342017-04-12 Tom Tromey <tom@tromey.com>
12535
12536 * jit.c (struct jit_reader): Declare separately. Add constructor
12537 and destructor. Change type of "handle".
12538 (loaded_jit_reader): Define separately.
12539 (jit_reader_load): Update. New "new".
12540 (jit_reader_unload_command): Use "delete".
12541 * gdb-dlfcn.h (struct dlclose_deleter): New.
12542 (gdb_dlhandle_up): New typedef.
12543 (gdb_dlopen, gdb_dlsym): Update types.
12544 (gdb_dlclose): Remove.
12545 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12546 (gdb_dlsym): Change type of "handle".
12547 (make_cleanup_dlclose): Remove.
12548 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12549 * compile/compile-c-support.c (load_libcc): Update.
12550
67d89901
TT
125512017-04-12 Tom Tromey <tom@tromey.com>
12552
12553 * symtab.h (find_pcs_for_symtab_line): Change return type.
12554 * symtab.c (find_pcs_for_symtab_line): Change return type.
12555 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12556 type of "vec". Update.
12557 (ltpy_get_pcs_for_line): Update.
12558 * linespec.c (decode_digits_ordinary): Update.
12559
93921405
TT
125602017-04-12 Tom Tromey <tom@tromey.com>
12561
12562 * tracepoint.c (actions_command): Update.
12563 * python/python.c (python_command, python_interactive_command):
12564 Update.
12565 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12566 * guile/guile.c (guile_command): Update.
12567 * defs.h (read_command_lines, read_command_lines_1): Return
12568 command_line_up.
12569 (command_lines_deleter): New struct.
12570 (command_line_up): New typedef.
12571 * compile/compile.c (compile_code_command)
12572 (compile_print_command): Update.
12573 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12574 command_line_up.
12575 (make_cleanup_free_command_lines): Remove.
12576 * cli/cli-script.c (get_command_line, read_command_lines_1)
12577 (copy_command_lines): Return command_line_up.
12578 (while_command, if_command, read_command_lines, define_command)
12579 (document_command): Update.
12580 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12581 Remove.
12582 * breakpoint.h (breakpoint_set_commands): Change type of
12583 "commands".
12584 * breakpoint.c (breakpoint_set_commands): Change type of
12585 "commands". Update.
12586 (do_map_commands_command, update_dprintf_command_list)
12587 (create_tracepoint_from_upload): Update.
12588
ffc2605c
TT
125892017-04-12 Tom Tromey <tom@tromey.com>
12590
12591 * tracepoint.c (scope_info): Update.
12592 * spu-tdep.c (spu_catch_start): Update.
12593 * python/python.c (gdbpy_decode_line): Update.
12594 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12595 * python/py-breakpoint.c (bppy_init): Update.
12596 * probe.c (parse_probes): Update.
12597 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12598 * location.h (event_location_deleter): New struct.
12599 (event_location_up): New typedef.
12600 (new_linespec_location, new_address_location, new_probe_location)
12601 (new_explicit_location, copy_event_location)
12602 (string_to_event_location, string_to_event_location_basic)
12603 (string_to_explicit_location): Update return type.
12604 (make_cleanup_delete_event_location): Remove.
12605 * location.c (new_linespec_location, new_address_location)
12606 (new_probe_location, new_explicit_location, copy_event_location):
12607 Return event_location_up.
12608 (delete_event_location_cleanup)
12609 (make_cleanup_delete_event_location): Remove.
12610 (string_to_explicit_location, string_to_event_location_basic)
12611 (string_to_event_location): Return event_location_up.
12612 * linespec.c (canonicalize_linespec, event_location_to_sals)
12613 (decode_line_with_current_source)
12614 (decode_line_with_last_displayed, decode_objc): Update.
12615 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12616 * completer.c (location_completer): Update.
12617 * cli/cli-cmds.c (edit_command, list_command): Update.
12618 * breakpoint.c (create_overlay_event_breakpoint)
12619 (create_longjmp_master_breakpoint)
12620 (create_std_terminate_master_breakpoint)
12621 (create_exception_master_breakpoint)
12622 (create_thread_event_breakpoint): Update.
12623 (init_breakpoint_sal): Update. Remove some dead code.
12624 (create_breakpoint_sal): Change type of "location". Update.
12625 (create_breakpoints_sal, create_breakpoint, break_command_1)
12626 (dprintf_command, break_range_command, until_break_command)
12627 (init_ada_exception_breakpoint)
12628 (strace_marker_create_sals_from_location)
12629 (update_static_tracepoint, trace_command, ftrace_command)
12630 (strace_command, create_tracepoint_from_upload): Update.
12631 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12632 * ax-gdb.c (agent_command_1): Update.
12633
8f10c932
PA
126342017-04-12 Pedro Alves <palves@redhat.com>
12635
12636 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12637 * configure.tgt: Handle i[34567]86-*-go32* and
12638 i[34567]86-*-msdosdjgpp*.
12639 * i386-tdep.c (i386_svr4_reg_to_regnum):
12640 Make extern.
12641 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12642 i386-go32-tdep.c.
12643 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12644 * i386-go32-tdep.c: New file.
12645 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12646 declarations.
12647
0a31ccfb
SM
126482017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12649
12650 * aix-thread.c (pd_status2str): Change return type to const char *.
12651
e9bb3fbb
PA
126522017-04-12 Pedro Alves <palves@redhat.com>
12653
12654 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12655 calls to set_gdbarch_gnu_triplet_regexp.
12656
53375380
PA
126572017-04-12 Pedro Alves <palves@redhat.com>
12658
12659 PR gdb/21323
12660 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12661 New enum value.
12662 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12663 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12664 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12665 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12666 * gdbarch.h, gdbarch.c: Regenerate.
12667 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12668 gdbarch_wchar_bit and gdbarch_wchar_signed.
12669 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12670 * arm-tdep.c (arm_gdbarch_init): Likewise.
12671 * avr-tdep.c (avr_gdbarch_init): Likewise.
12672 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12673 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12674 * i386-tdep.c (i386_go32_init_abi): Likewise.
12675 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12676 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12677 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12678 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12679 * sh-tdep.c (sh_gdbarch_init): Likewise.
12680 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12681 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12682 * windows-tdep.c (windows_init_abi): Likewise.
12683 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12684
53e710ac
PA
126852017-04-12 Pedro Alves <palves@redhat.com>
12686
12687 PR c++/21323
12688 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12689 cplus_primitive_type_char32_t>: New enum values.
12690 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12691 and cplus_primitive_type_char32_t.
12692 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12693 32, use the archtecture's built-in type for char16_t and char32_t,
12694 respectively. Otherwise, fallback to init_integer_type as before,
12695 but make the type unsigned, and issue a complaint.
12696 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12697
ab0538b8
AH
126982017-04-12 Alan Hayward <alan.hayward@arm.com>
12699
5e0e0422 12700 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12701 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12702
5430098f
SDJ
127032017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12704
12705 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12706 'const char *'.
12707
7c5ded6a
SDJ
127082017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12709
12710 * common/common-utils.c (free_vector_argv): New function.
12711 * common/common-utils.h: Include <vector>.
12712 (free_vector_argv): New prototype.
12713 * darwin-nat.c (darwin_create_inferior): Rewrite function
12714 prototype in order to constify "exec_file" and accept a
12715 "std::string" for "allargs".
12716 * fork-child.c: Include <vector>.
12717 (breakup_args): Rewrite function, using C++.
12718 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12719 and accept "std::string" for "allargs". Update the code to
12720 calculate "argv" based on "allargs". Update calls to "exec_fun"
12721 and "execvp".
12722 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12723 order to constify "exec_file" and accept a "std::string" for
12724 "allargs".
12725 * go32-nat.c (go32_create_inferior): Likewise.
12726 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12727 * infcmd.c (run_command_1): Constify "exec_file". Use
12728 "std::string" for inferior arguments.
12729 * inferior.h (fork_inferior): Update prototype.
12730 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12731 prototype in order to constify "exec_file" and accept a
12732 "std::string" for "allargs".
12733 * nto-procfs.c (procfs_create_inferior): Likewise.
12734 * procfs.c (procfs_create_inferior): Likewise.
12735 * remote-sim.c (gdbsim_create_inferior): Likewise.
12736 * remote.c (extended_remote_run): Update code to accept
12737 "std::string" as argument.
12738 (extended_remote_create_inferior): Rewrite function prototype in
12739 order to constify "exec_file" and accept a "std::string" for
12740 "allargs".
12741 * rs6000-nat.c (super_create_inferior): Likewise.
12742 (rs6000_create_inferior): Likewise.
12743 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12744 * windows-nat.c (windows_create_inferior): Likewise.
12745
ae0eee42
PA
127462017-04-11 Pedro Alves <palves@redhat.com>
12747
12748 * thread.c: Fix whitespace throughout.
12749
a6acac06
PR
127502017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12751
12752 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12753
64403bd1
AH
127542017-04-11 Alan Hayward <alan.hayward@arm.com>
12755
12756 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12757
a5bef50f
SDJ
127582017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12759
12760 PR gdb/21364
12761 * osdata.c (info_osdata): Check if 'type' is an empty string
12762 instead of NULL.
12763
9295a5a9
PA
127642017-04-10 Pedro Alves <palves@redhat.com>
12765
12766 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12767 (ptid_to_global_thread_id, in_thread_list)
12768 (do_captured_list_thread_ids, set_resumed, set_running)
12769 (set_executing, set_stop_requested, finish_thread_state)
12770 (validate_registers_access, can_access_registers_ptid)
12771 (print_thread_info_1, switch_to_thread)
12772 (do_restore_current_thread_cleanup)
12773 (make_cleanup_restore_current_thread, thread_command)
12774 (thread_name_command): Use operator== instead of ptid_equal.
12775
996812e3
PA
127762017-04-10 Pedro Alves <palves@redhat.com>
12777
12778 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12779 (current_thread_cleanup_chain): Delete.
12780 (restore_current_thread_cleanup_dtor)
12781 (make_cleanup_restore_current_thread): Remove references to
12782 current_thread_cleanup_chain.
12783
845b344f
AH
127842017-04-10 Alan Hayward <alan.hayward@arm.com>
12785
12786 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12787 REG_UNKNOWN.
12788
803bdfe4
YQ
127892017-04-10 Yao Qi <yao.qi@linaro.org>
12790
12791 PR gdb/19942
12792 * gdbthread.h (thread_info::deletable): New method.
12793 (thread_info::incref): New method.
12794 (thread_info::decref): New method.
12795 (thread_info::refcount): Move it to private.
12796 * infrun.c (save_stop_context): Call inc_refcount.
12797 (release_stop_context_cleanup): Likewise.
12798 * thread.c (set_thread_exited): New function.
12799 (init_thread_list): Delete "tp" only it is deletable, otherwise
12800 call set_thread_exited.
12801 (delete_thread_1): Call set_thread_exited.
12802 (current_thread_cleanup) <inferior_pid>: Remove.
12803 <thread>: New field.
12804 (restore_current_thread_ptid_changed): Removed.
12805 (do_restore_current_thread_cleanup): Adjust.
12806 (restore_current_thread_cleanup_dtor): Don't call
12807 find_thread_ptid.
12808 (set_thread_refcount): Use dec_refcount.
12809 (make_cleanup_restore_current_thread): Adjust.
12810 (thread_apply_all_command): Call inc_refcount.
12811 (_initialize_thread): Don't call
12812 observer_attach_thread_ptid_changed.
12813
8c25b497
YQ
128142017-04-10 Yao Qi <yao.qi@linaro.org>
12815
12816 * thread.c (delete_thread_1): Hoist code on marking thread as
12817 exited.
12818
8473b447
SM
128192017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12820
12821 * windows-nat.c (windows_detach): Initialize ptid with
12822 minus_one_ptid.
12823
6670ec13
SM
128242017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12825
12826 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12827
ba2f91bb
AH
128282017-04-07 Alan Hayward <alan.hayward@arm.com>
12829
12830 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12831 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12832 (bfin_pseudo_register_write): Likewise
12833
436252de
SM
128342017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12835
12836 * common/ptid.h (struct ptid): Change to...
12837 (class ptid_t): ... this.
12838 <ptid_t>: New constructors.
12839 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12840 matches>: New methods.
12841 <make_null, make_minus_one>: New static methods.
12842 <pid>: Rename to...
12843 <m_pid>: ...this.
12844 <lwp>: Rename to...
12845 <m_lwp>: ...this.
12846 <tid>: Rename to...
12847 <m_tid>: ...this.
12848 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12849 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12850 as references, move comment to class ptid_t.
12851 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12852 ptid_t static methods.
12853 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12854 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12855 Take ptid arguments as references, implement using ptid_t methods.
12856 * unittests/ptid-selftests.c: New file.
12857 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12858 unittests/ptid-selftests.c.
12859 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12860
0dedf377
TP
128612017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12862
12863 * python/python.c (python_run_simple_file): Cast mode literal to
12864 non-const char pointer as expected by PyFile_FromString.
12865
4e9868d4
SM
128662017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12867
12868 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12869 minus_one_ptid and null_ptid.
12870
9bf2a700
PA
128712017-04-05 Pedro Alves <palves@redhat.com>
12872
12873 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12874 * configure: Regenerate.
12875
a121b7c1
PA
128762017-04-05 Pedro Alves <palves@redhat.com>
12877
12878 * ada-exp.y (yyerror): Constify.
12879 * ada-lang.c (bound_name, get_selections)
12880 (ada_variant_discrim_type)
12881 (ada_variant_discrim_name, ada_value_struct_elt)
12882 (ada_lookup_struct_elt_type, is_unchecked_variant)
12883 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12884 (catch_ada_exception_command_split)
12885 (catch_ada_assert_command_split, catch_assert_command)
12886 (ada_op_name): Constify.
12887 * ada-lang.h (ada_yyerror, get_selections)
12888 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12889 * arc-tdep.c (arc_print_frame_cache): Constify.
12890 * arm-tdep.c (arm_skip_stub): Constify.
12891 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12892 (gen_aggregate_elt_ref): Constify.
12893 * bcache.c (print_bcache_statistics): Constify.
12894 * bcache.h (print_bcache_statistics): Constify.
12895 * break-catch-throw.c (catch_exception_command_1):
12896 * breakpoint.c (struct ep_type_description::description):
12897 Constify.
12898 (add_solib_catchpoint): Constify.
12899 (catch_fork_command_1): Add cast.
12900 (add_catch_command): Constify.
12901 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12902 Constify.
12903 * bsd-uthread.c (bsd_uthread_state): Constify.
12904 * buildsym.c (patch_subfile_names): Constify.
12905 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12906 Constify.
12907 * c-exp.y (yyerror): Constify.
12908 (token::oper): Constify.
12909 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12910 * c-varobj.c (cplus_describe_child): Constify.
12911 * charset.c (find_charset_names): Add cast.
12912 (find_charset_names): Constify array and add const_cast.
12913 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12914 (edit_command): Constify.
12915 * cli/cli-decode.c (lookup_cmd): Constify.
12916 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12917 Constify.
12918 (struct dump_context): Constify.
12919 (add_dump_command, restore_command): Constify.
12920 * cli/cli-script.c (get_command_line): Constify.
12921 * cli/cli-script.h (get_command_line): Constify.
12922 * cli/cli-utils.c (check_for_argument): Constify.
12923 * cli/cli-utils.h (check_for_argument): Constify.
12924 * coff-pe-read.c (struct read_pe_section_data): Constify.
12925 * command.h (lookup_cmd): Constify.
12926 * common/print-utils.c (decimal2str): Constify.
12927 * completer.c (gdb_print_filename): Constify.
12928 * corefile.c (set_gnutarget): Constify.
12929 * cp-name-parser.y (yyerror): Constify.
12930 * cp-valprint.c (cp_print_class_member): Constify.
12931 * cris-tdep.c (cris_register_name, crisv32_register_name):
12932 Constify.
12933 * d-exp.y (yyerror): Constify.
12934 (struct token::oper): Constify.
12935 * d-lang.h (d_yyerror): Constify.
12936 * dbxread.c (struct header_file_location::name): Constify.
12937 (add_old_header_file, add_new_header_file, last_function_name)
12938 (dbx_next_symbol_text, add_bincl_to_list)
12939 (find_corresponding_bincl_psymtab, set_namestring)
12940 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12941 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12942 * defs.h (command_line_input, print_address_symbolic)
12943 (deprecated_readline_begin_hook): Constify.
12944 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12945 Constify.
12946 * event-top.c (handle_line_of_input): Constify and add cast.
12947 * exceptions.c (catch_errors): Constify.
12948 * exceptions.h (catch_errors): Constify.
12949 * expprint.c (print_subexp_standard, op_string, op_name)
12950 (op_name_standard, dump_raw_expression, dump_raw_expression):
12951 * expression.h (op_name, op_string, dump_raw_expression):
12952 Constify.
12953 * f-exp.y (yyerror): Constify.
12954 (struct token::oper): Constify.
12955 (struct f77_boolean_val::name): Constify.
12956 * f-lang.c (f_word_break_characters): Constify.
12957 * f-lang.h (f_yyerror): Constify.
12958 * fork-child.c (fork_inferior): Add cast.
12959 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12960 (new_variant): Constify.
12961 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12962 * gdbarch.c: Regenerate.
12963 * gdbcore.h (set_gnutarget): Constify.
12964 * go-exp.y (yyerror): Constify.
12965 (token::oper): Constify.
12966 * go-lang.h (go_yyerror): Constify.
12967 * go32-nat.c (go32_sysinfo): Constify.
12968 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12969 * guile/scm-cmd.c (cmdscm_function): Constify.
12970 * guile/scm-param.c (pascm_param_value): Constify.
12971 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12972 (h8300sx_register_name): Constify.
12973 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12974 Constify.
12975 * ia64-tdep.c (ia64_register_names): Constify.
12976 * infcmd.c (construct_inferior_arguments): Constify.
12977 (path_command, attach_post_wait): Constify.
12978 * language.c (show_range_command, show_case_command)
12979 (unk_lang_error): Constify.
12980 * language.h (language_defn::la_error)
12981 (language_defn::la_name_of_this): Constify.
12982 * linespec.c (decode_line_2): Constify.
12983 * linux-thread-db.c (thread_db_err_str): Constify.
12984 * lm32-tdep.c (lm32_register_name): Constify.
12985 * m2-exp.y (yyerror): Constify.
12986 * m2-lang.h (m2_yyerror): Constify.
12987 * m32r-tdep.c (m32r_register_names): Constify and make static.
12988 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12989 * m88k-tdep.c (m88k_register_name): Constify.
12990 * macroexp.c (appendmem): Constify.
12991 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12992 (upgrade_type, parse_external, parse_partial_symbols)
12993 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12994 (new_symbol): Constify.
12995 * memattr.c (mem_info_command): Constify.
12996 * mep-tdep.c (register_name_from_keyword): Constify.
12997 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12998 Constify.
12999 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13000 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13001 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13002 cast.
13003 (mi_execute_async_cli_command): Constify.
13004 * mips-tdep.c (mips_register_name): Constify.
13005 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13006 (am33_register_name, am33_2_register_name)
13007 * moxie-tdep.c (moxie_register_names): Constify.
13008 * nat/linux-osdata.c (osdata_type): Constify fields.
13009 * nto-tdep.c (nto_parse_redirection): Constify.
13010 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13011 (lookup_child_selector): Constify.
13012 (objc_methcall::name): Constify.
13013 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13014 (lookup_struct_typedef): Constify.
13015 * objfiles.c (pc_in_section): Constify.
13016 * objfiles.h (pc_in_section): Constify.
13017 * p-exp.y (struct token::oper): Constify.
13018 (yyerror): Constify.
13019 * p-lang.h (pascal_yyerror): Constify.
13020 * parser-defs.h (op_name_standard): Constify.
13021 (op_print::string): Constify.
13022 (exp_descriptor::op_name): Constify.
13023 * printcmd.c (print_address_symbolic): Constify.
13024 * psymtab.c (print_partial_symbols): Constify.
13025 * python/py-breakpoint.c (stop_func): Constify.
13026 (bppy_get_expression): Constify.
13027 * python/py-cmd.c (cmdpy_completer::name): Constify.
13028 (cmdpy_function): Constify.
13029 * python/py-event.c (evpy_add_attribute)
13030 (gdbpy_initialize_event_generic): Constify.
13031 * python/py-event.h (evpy_add_attribute)
13032 (gdbpy_initialize_event_generic): Constify.
13033 * python/py-evts.c (add_new_registry): Constify.
13034 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13035 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13036 * python/py-inferior.c (get_buffer): Add cast.
13037 * python/py-param.c (parm_constant::name): Constify.
13038 * python/py-unwind.c (fprint_frame_id): Constify.
13039 * python/python.c (gdbpy_parameter_value): Constify.
13040 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13041 * remote.c (memory_packet_config::name): Constify.
13042 (show_packet_config_cmd, remote_write_bytes)
13043 (remote_buffer_add_string):
13044 * reverse.c (exec_reverse_once): Constify.
13045 * rs6000-tdep.c (variant::name, variant::description): Constify.
13046 * rust-exp.y (rustyyerror): Constify.
13047 * rust-lang.c (rust_op_name): Constify.
13048 * rust-lang.h (rustyyerror): Constify.
13049 * serial.h (serial_ops::name): Constify.
13050 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13051 (sh_sh3e_register_name, sh_sh2e_register_name)
13052 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13053 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13054 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13055 (sh_sh4al_dsp_register_name): Constify.
13056 * sh64-tdep.c (sh64_register_name): Constify.
13057 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13058 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13059 * stabsread.c (patch_block_stabs, read_type_number)
13060 (ref_map::stabs, ref_add, process_reference)
13061 (symbol_reference_defined, define_symbol, define_symbol)
13062 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13063 (read_one_struct_field, read_struct_fields, read_baseclasses)
13064 (read_tilde_fields, read_struct_type, read_array_type)
13065 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13066 (read_huge_number, read_range_type, read_args, common_block_start)
13067 (find_name_end): Constify.
13068 * stabsread.h (common_block_start, define_symbol)
13069 (process_one_symbol, symbol_reference_defined, ref_add):
13070 * symfile.c (get_section_index, add_symbol_file_command):
13071 * symfile.h (get_section_index): Constify.
13072 * target-descriptions.c (tdesc_type::name): Constify.
13073 (tdesc_free_type): Add cast.
13074 * target.c (find_default_run_target):
13075 (add_deprecated_target_alias, find_default_run_target)
13076 (target_announce_detach): Constify.
13077 (do_option): Constify.
13078 * target.h (add_deprecated_target_alias): Constify.
13079 * thread.c (print_thread_info_1): Constify.
13080 * top.c (deprecated_readline_begin_hook, command_line_input):
13081 Constify.
13082 (init_main): Add casts.
13083 * top.h (handle_line_of_input): Constify.
13084 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13085 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13086 (tfind_command): Rename to ...
13087 (tfind_command_1): ... this and constify.
13088 (tfind_command): New function.
13089 (tfind_end_command, tfind_start_command): Adjust.
13090 (encode_source_string): Constify.
13091 * tracepoint.h (encode_source_string): Constify.
13092 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13093 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13094 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13095 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13096 * tui/tui-win.c (parse_scrolling_args): Constify.
13097 * tui/tui-windata.c (tui_erase_data_content): Constify.
13098 * tui/tui-windata.h (tui_erase_data_content): Constify.
13099 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13100 * tui/tui.c (tui_enable): Add cast.
13101 * utils.c (defaulted_query): Constify.
13102 (init_page_info): Add cast.
13103 (puts_debug, subset_compare): Constify.
13104 * utils.h (subset_compare): Constify.
13105 * varobj.c (varobj_format_string): Constify.
13106 * varobj.h (varobj_format_string): Constify.
13107 * vax-tdep.c (vax_register_name): Constify.
13108 * windows-nat.c (windows_detach): Constify.
13109 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13110 * xml-support.c (gdb_xml_end_element): Constify.
13111 * xml-tdesc.c (tdesc_start_reg): Constify.
13112 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13113 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13114 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13115
995816ba
PA
131162017-04-05 Pedro Alves <palves@redhat.com>
13117
13118 * proc-api.c (struct trans): Constify.
13119 (procfs_note): Constify.
13120 * proc-events.c (struct trans, syscall_table):
13121 * proc-flags.c (struct trans): Constify.
13122 * proc-utils.h (procfs_note): Constify.
13123 * proc-why.c (struct trans): Constify.
13124 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13125 (procfs_detach): Constify.
13126 * sol-thread.c (struct string_map): Constify.
13127 (td_err_string, td_state_string): Constify.
13128
3e83a920
PA
131292017-04-05 Pedro Alves <palves@redhat.com>
13130
13131 * proc-api.c (procfs_filename): Don't initialize
13132 procfs_filename.
13133 (prepare_to_trace): Assume procfs_filename is non-NULL.
13134 (_initialize_proc_api): Give procfs_filename a default value here.
13135
63160a43
PA
131362017-04-05 Pedro Alves <palves@redhat.com>
13137
13138 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13139 'cond_string' parameter.
13140 (extract_exception_regexp): Constify 'string' parameter.
13141 (catch_exception_command_1): Constify.
13142 * breakpoint.c (init_catchpoint)
13143 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13144 parameter.
13145 (ep_parse_optional_if_clause, catch_fork_command_1)
13146 (catch_exec_command_1): Constify.
13147 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13148 parameter.
13149 (ep_parse_optional_if_clause): Constify.
13150 * cli/cli-utils.c (remove_trailing_whitespace)
13151 (check_for_argument): Constify.
13152 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13153 non-const overload.
13154 (check_for_argument): Likewise.
13155
9b2eba3d
PA
131562017-04-05 Pedro Alves <palves@redhat.com>
13157
13158 * event-top.c (command_line_handler): Add cast to execute_command
13159 call.
13160 * record-btrace.c (cmd_record_btrace_bts_start)
13161 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13162 (cmd_record_btrace_start): Add cast to execute_command call.
13163 * record-full.c (record_full_goto_insn):
13164 * record.c (record_start, record_stop): Add cast to
13165 execute_command_to_string calls.
13166 (cmd_record_start): Add cast to execute_command calls.
13167
2adadf51
PA
131682017-04-05 Pedro Alves <palves@redhat.com>
13169
13170 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13171 static inline function.
13172 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13173 array and use gdb_PyArg_ParseTupleAndKeywords.
13174 * python/py-cmd.c (cmdpy_init): Likewise.
13175 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13176 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13177 (infpy_search_memory): Likewise.
13178 * python/py-objfile.c (objfpy_add_separate_debug_file)
13179 (gdbpy_lookup_objfile): Likewise.
13180 * python/py-symbol.c (gdbpy_lookup_symbol)
13181 (gdbpy_lookup_global_symbol): Likewise.
13182 * python/py-type.c (gdbpy_lookup_type): Likewise.
13183 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13184 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13185 Likewise.
13186
0d1f4ceb
PA
131872017-04-05 Pedro Alves <palves@redhat.com>
13188
13189 * python/python-internal.h (gdb_PyGetSetDef): New type.
13190 * python/py-block.c (block_object_getset)
13191 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13192 * python/py-event.c (event_object_getset)
13193 (finish_breakpoint_object_getset): Likewise.
13194 * python/py-inferior.c (inferior_object_getset): Likewise.
13195 * python/py-infthread.c (thread_object_getset): Likewise.
13196 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13197 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13198 * python/py-objfile.c (objfile_getset): Likewise.
13199 * python/py-progspace.c (pspace_getset): Likewise.
13200 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13201 Likewise.
13202 * python/py-record.c (recpy_record_getset): Likewise.
13203 * python/py-symbol.c (symbol_object_getset): Likewise.
13204 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13205 Likewise.
13206 * python/py-type.c (type_object_getset, field_object_getset):
13207 Likewise.
13208 * python/py-value.c (value_object_getset): Likewise.
13209
4d759979
PA
132102017-04-05 Pedro Alves <palves@redhat.com>
13211
13212 * python/python-internal.h (gdb_PyObject_CallMethod)
13213 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13214 New functions.
13215 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13216 (PySys_GetObject, PySys_SetPath): New macros.
13217
fdf9e36f
PA
132182017-04-05 Pedro Alves <palves@redhat.com>
13219
13220 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13221 info_osdata_command.
13222 * osdata.c (info_osdata_command): Rename to ...
13223 (info_osdata): ... this. Constify 'type' parameter, and remove
13224 the 'from_tty' parameter. Accept NULL TYPE.
13225 (info_osdata_command): New function.
13226 * osdata.h (info_osdata_command): Remove declaration.
13227 (info_osdata): New declaration.
13228
9f33b8b7
PA
132292017-04-05 Pedro Alves <palves@redhat.com>
13230
13231 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13232 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13233 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13234 parameter.
13235 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13236 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13237 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13238 parameter.
13239 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13240 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13241 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13242 (mi_cmd_file_list_exec_source_files)
13243 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13244 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13245 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13246 parameter.
13247 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13248 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13249 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13250 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13251 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13252 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13253 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13254 'command' parameter.
13255 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13256 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13257 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13258 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13259 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13260 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13261 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13262 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13263 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13264 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13265 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13266 parameter.
13267 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13268 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13269 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13270 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13271 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13272 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13273 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13274 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13275 (mi_cmd_data_list_changed_registers)
13276 (mi_cmd_data_write_register_values)
13277 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13278 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13279 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13280 (mi_cmd_list_features, mi_cmd_list_target_features)
13281 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13282 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13283 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13284 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13285 (mi_cmd_trace_frame_collected): Constify 'command'
13286 parameter.
13287 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13288 'command' parameter.
13289
67cb5b2d
PA
132902017-04-05 Pedro Alves <palves@redhat.com>
13291
13292 * ada-lang.c (ada_completer_word_break_characters): Now a const
13293 array.
13294 (ada_get_gdb_completer_word_break_characters): Constify.
13295 * completer.c (gdb_completer_command_word_break_characters)
13296 (gdb_completer_file_name_break_characters)
13297 (gdb_completer_quote_characters): Now const arrays.
13298 (get_gdb_completer_quote_characters): Constify.
13299 (set_rl_completer_word_break_characters): New function.
13300 (set_gdb_completion_word_break_characters)
13301 (complete_line_internal): Use it.
13302 * completer.h (get_gdb_completer_quote_characters): Constify.
13303 (set_rl_completer_word_break_characters): Declare.
13304 * f-lang.c (f_word_break_characters): Constify.
13305 * language.c (default_word_break_characters): Constify.
13306 * language.h (language_defn::la_word_break_characters): Constify.
13307 (default_word_break_characters): Constify.
13308 * top.c (init_main): Use set_rl_completer_word_break_characters.
13309
7a114964
PA
133102017-04-05 Pedro Alves <palves@redhat.com>
13311
13312 * aix-thread.c (aix_thread_pid_to_str)
13313 (aix_thread_extra_thread_info): Constify.
13314 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13315 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13316 (bsd_uthread_pid_to_str): Constify.
13317 * corelow.c (core_pid_to_str): Constify.
13318 * darwin-nat.c (darwin_pid_to_str): Constify.
13319 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13320 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13321 Constify.
13322 * gnu-nat.c (gnu_pid_to_str): Constify.
13323 * go32-nat.c (go32_pid_to_str): Constify.
13324 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13325 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13326 * inferior.c (inferior_pid_to_str): Constify.
13327 * linux-nat.c (linux_nat_pid_to_str): Constify.
13328 * linux-tdep.c (linux_core_pid_to_str): Constify.
13329 * linux-thread-db.c (thread_db_pid_to_str)
13330 (thread_db_extra_thread_info): Constify.
13331 * nto-tdep.c (nto_extra_thread_info): Constify.
13332 * nto-tdep.h (nto_extra_thread_info): Constify.
13333 * obsd-nat.c (obsd_pid_to_str): Constify.
13334 * procfs.c (procfs_pid_to_str): Constify.
13335 * ravenscar-thread.c (ravenscar_extra_thread_info)
13336 (ravenscar_pid_to_str): Constify.
13337 * remote-sim.c (gdbsim_pid_to_str): Constify.
13338 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13339 Constify.
13340 * sol-thread.c (solaris_pid_to_str): Constify.
13341 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13342 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13343 * target.c (default_pid_to_str, target_pid_to_str)
13344 (normal_pid_to_str, default_pid_to_str): Constify.
13345 * target.h (target_ops::to_pid_to_str)
13346 (target_ops::to_extra_thread_info): Constify.
13347 (target_pid_to_str, normal_pid_to_str): Constify.
13348 * windows-nat.c (windows_pid_to_str): Constify.
13349 * gdbarch.sh (core_pid_to_str): Constify.
13350 * target-delegates.c: Regenerate.
13351 * gdbarch.h, gdbarch.c: Regenerate.
13352
69bbf465
PA
133532017-04-05 Pedro Alves <palves@redhat.com>
13354
13355 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13356 the memory of the temporary warning_pre_print override.
13357 * utils.c (warning_pre_print): Constify.
13358 * utils.h (warning_pre_print): Constify.
13359
be47f9e8
PA
133602017-04-05 Pedro Alves <palves@redhat.com>
13361
13362 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13363 (shell_command): New function.
13364 (make_command): Use std::string.
13365 (init_cli_cmds): Register shell_command instead of shell_escape.
13366
bde6261a
PA
133672017-04-05 Pedro Alves <palves@redhat.com>
13368
13369 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13370 * tracepoint.c (default_collect): Don't initialize.
13371
b38ef47f
PA
133722017-04-05 Pedro Alves <palves@redhat.com>
13373
13374 * macroexp.c (macro_buffer::shared): Now a bool.
13375 (init_buffer): Update.
13376 (init_shared_buffer): Constify 'addr' parameter.
13377 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13378 casts.
13379
f995bbe8
PA
133802017-04-05 Pedro Alves <palves@redhat.com>
13381
13382 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13383 * disasm.c (set_disassembler_options): Constify local.
13384 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13385
4a596fe2
SDJ
133862017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13387
13388 PR gdb/21352
13389 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13390 option.
13391
2cad08ea
YQ
133922017-04-05 Yao Qi <yao.qi@linaro.org>
13393
13394 * frame.c (frame_unwind_register_unsigned): Call
13395 frame_unwind_register_value.
13396
55a98976
YQ
133972017-04-05 Yao Qi <yao.qi@linaro.org>
13398
13399 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13400 Use gdb_test_multiple, and don't match anchor.
13401
4ac40124
PA
134022017-04-05 Pedro Alves <palves@redhat.com>
13403
13404 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13405 (Write After Approval): Remove Simon Marchi.
13406
c053b654
PA
134072017-04-05 Pedro Alves <palves@redhat.com>
13408
13409 * common/gdb_optional.h (optional::optional): Make constexpr and
13410 initialize m_dummy.
13411
4c7bf4f9
JB
134122017-04-04 John Baldwin <jhb@FreeBSD.org>
13413
13414 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13415 (amd64fbsd_jmp_buf_reg_offset): Remove.
13416 (amd64fbsd_supply_uthread): Remove function.
13417 (amd64fbsd_collect_uthread): Remove function.
13418 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13419 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13420 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13421 (fbsd-nat.c): Update comment.
13422 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13423 (i386fbsd_jmp_buf_reg_offset): Remove.
13424 (i386fbsd_supply_uthread): Remove function.
13425 (i386fbsd_collect_uthread): Remove function.
13426 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13427
1e1a8bef
JB
134282017-04-04 John Baldwin <jhb@FreeBSD.org>
13429
13430 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13431 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13432 * NEWS: Mention that support for FreeBSD/alpha was removed.
13433 * alpha-fbsd-tdep.c: Delete file.
13434 * config/alpha/fbsd.mh: Delete file.
13435 * configure.host: Delete alpha*-*-freebsd* and
13436 alpha*-*-kfreebsd*-gnu.
13437 * configure.tgt: Delete alpha*-*-freebsd* and
13438 alpha*-*-kfreebsd*-gnu.
13439
49907934
JB
134402017-04-04 John Baldwin <jhb@FreeBSD.org>
13441
13442 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13443 amd64bsd_store_inferior_registers): Use ptid from regcache.
13444
6f77053d
PA
134452017-04-04 Pedro Alves <palves@redhat.com>
13446
13447 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13448 data fields, make them private and add "m_" prefixes.
13449 (lnp_state_machine::lnp_state_machine): New ctor.
13450 (record_line, check_line_address, handle_set_discriminator)
13451 (handle_set_address, handle_advance_pc, handle_special_opcode)
13452 (handle_advance_line, handle_set_file, handle_negate_stmt)
13453 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13454 (end_sequence, advance_line): New methods.
13455 (m_gdbarch, m_record_lines_p): New fields.
13456 (lnp_reader_state): Delete.
13457 (dwarf_record_line): Rename to ...
13458 (lnp_state_machine::record_line): ... adjust.
13459 (init_lnp_state_machine): Delete.
13460 (lnp_state_machine::lnp_state_machine): New.
13461 (check_line_address): Rename to ...
13462 (lnp_state_machine::check_line_address): This.
13463 (dwarf_decode_lines_1): Remove reference to "reader_state".
13464 Adjust lnp_state_machine having a non-default ctor. Use bool.
13465 State machine internal state manipulation moved to
13466 lnp_state_machine methods.
13467
9c541725
PA
134682017-04-04 Pedro Alves <palves@redhat.com>
13469
13470 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13471 unittests/offset-type-selftests.c.
13472 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13473 * common/offset-type.h: New file.
13474 * common/preprocessor.h: New file.
13475 * common/traits.h: New file.
13476 * common/valid-expr.h: New file.
13477 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13478 sect_offset and cu_offset strong typedefs throughout.
13479 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13480 typedefs throughout.
13481 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13482 sect_offset and cu_offset strong typedefs throughout.
13483 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13484 typedefs throughout.
13485 * gdbtypes.h: Include "common/offset-type.h".
13486 (cu_offset): Now an offset type (strong typedef) instead of a
13487 struct.
13488 (sect_offset): Likewise.
13489 (union call_site_parameter_u): Rename "param_offset" field to
13490 "param_cu_off".
13491 * unittests/offset-type-selftests.c: New file.
13492
ecfb656c
PA
134932017-04-04 Pedro Alves <palves@redhat.com>
13494
13495 * common/underlying.h: New file.
13496 * dwarf2read.c: Include "common/gdb_optional.h" and
13497 "common/underlying.h".
13498 (dir_index, file_name_index): New types.
13499 (file_entry): Use them.
13500 (file_entry::include): Use to_underlying.
13501 (line_header::add_file_name): Use dir_index.
13502 (read_formatted_entries): Use gdb::optional. Read form before
13503 writting to file_entry.
13504 (dwarf_decode_line_header): Use dir_index.
13505 (lnp_state_machine::current_file): Use to_underlying.
13506 (lnp_state_machine::file): Change type to file_name_index.
13507 (dwarf_record_line): Use to_underlying.
13508 (init_lnp_state_machine): Use file_name_index.
13509 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13510
d194f1fe
PA
135112017-04-04 Pedro Alves <palves@redhat.com>
13512
13513 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13514 operator bool, has_value and get methods.
13515
fff8551c
PA
135162017-04-04 Pedro Alves <palves@redhat.com>
13517
13518 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13519 fields.
13520 (line_header): Initialize all data fields. Change type of
13521 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13522 Change type of include_dirs to std::vector<const char *>. Remove
13523 num_include_dirs, include_dirs_size. Change type of file_names to
13524 std::vector<file_entry>. Remove num_file_names, file_names_size.
13525 (line_header::line_header): New.
13526 (line_header::add_include_dir, line_header::add_file_name): New
13527 methods.
13528 (line_header::include_dir_at): Remove NULL check.
13529 (line_header::file_name_at): Add const overload.
13530 (line_header_up): New unique_ptr typedef.
13531 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13532 std::vector. Remove free_line_header call.
13533 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13534 free_line_header call.
13535 (free_cu_line_header): Delete.
13536 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13537 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13538 Adjust to use std::vector.
13539 (free_line_header): Delete.
13540 (free_line_header_voidp): Use delete.
13541 (add_include_dir): Replace with ...
13542 (line_header::add_include_dir): ... this method. Use std::vector.
13543 (add_file_name): Replace with ...
13544 (line_header::add_file_name): ... this method. Use std::vector.
13545 (add_include_dir_stub): Delete.
13546 (read_formatted_entries): Remove memset.
13547 (dwarf_decode_line_header): Return a line_header_up instead of a
13548 raw pointer. Remove cleanup handling. Pass lambdas to
13549 read_formatted_entries. Adjust to use line_header methods.
13550 (dwarf_decode_lines_1): Adjust to use line_header methods.
13551 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13552 use std::vector.
13553
d62a8ae2
SM
135542017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13555
13556 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13557 instead of struct ptid.
13558
db3a1dc7
AH
135592017-05-04 Alan Hayward <alan.hayward@arm.com>
13560
13561 * frame.c (get_frame_register_bytes): Unwind using value.
13562 (put_frame_register_bytes): Likewise.
13563
b1b45502
IB
135642017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13565
13566 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13567 aggregate-like.
13568
ec13808e
JK
135692017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13570
13571 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13572
12316564
YQ
135732017-03-29 Yao Qi <yao.qi@linaro.org>
13574
13575 * gdbthread.h (struct thread_info): Declare constructor and
13576 destructor. Add some in-class member initializers.
13577 * thread.c (free_thread): Remove.
13578 (init_thread_list): Call delete instead of free_thread.
13579 (new_thread): Call thread_info constructor.
13580 (thread_info::thread_info): New function.
13581 (thread_info::~thread_info): New function.
13582 (delete_thread_1): Call delete instead of free_thread.
13583 (make_cleanup_restore_current_thread): Move tp and frame to
13584 inner block.
13585
fe5f7374
AK
135862017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13587
13588 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13589 (arc_skip_prologue): Likewise.
13590 (arc_make_frame_cache): Likewise.
13591 (arc_pv_get_operand): New function.
13592 (arc_is_in_prologue): Likewise.
13593 (arc_analyze_prologue): Likewise.
13594 (arc_print_frame_cache): Likewise.
13595 (MAX_PROLOGUE_LENGTH): New constant.
13596
eea78757
AK
135972017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13598
13599 * configure.tgt: Add arc-insn.o.
13600 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13601 (dump_arc_instruction_command): New function.
13602 (arc_fprintf_disasm): Likewise.
13603 (arc_disassemble_info): Likewise.
13604 (arc_insn_get_operand_value): Likewise.
13605 (arc_insn_get_operand_value_signed): Likewise.
13606 (arc_insn_get_memory_base_reg): Likewise.
13607 (arc_insn_get_memory_offset): Likewise.
13608 (arc_insn_get_branch_target): Likewise.
13609 (arc_insn_dump): Likewise.
13610 (arc_insn_get_linear_next_pc): Likewise.
13611 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13612 (arc_disassemble_info): Likewise.
13613 (arc_insn_get_branch_target): Likewise.
13614 (arc_insn_get_linear_next_pc): Likewise.
13615 * NEWS: Mention new "maint print arc arc-instruction".
13616
3be78afd
AK
136172017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13618
13619 * arc-tdep (maintenance_print_arc_list): New variable.
13620 (maintenance_print_arc_command): New function.
13621
296ec4fa
AK
136222017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13623
13624 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13625 Add "limm" and "reserved".
13626 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13627 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13628 * arc-tdep.h (arc_regnum): Likewise.
13629
f74f865e
MF
136302017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13631
13632 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13633 for THREADPTR register.
13634 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13635 register.
13636 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13637 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13638 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13639
0d0bf81a
MF
136402017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13641
13642 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13643 registers above gdbarch_num_regs (gdbarch) as privileged in
13644 call0 ABI.
13645
0ce4291e
MF
136462017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13647
13648 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13649 for a single specified register or for all registers in
13650 a0_base..a0_base + C0_NREGS range.
13651 (supply_gregset_reg): Call regcache_raw_supply for a single
13652 specified register or for all registers in a0_base..a0_base +
13653 C0_NREGS range.
13654
c56054f9
MF
136552017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13656
13657 * arch/xtensa.h (C0_NREGS): Add definition.
13658 * xtensa-tdep.c (C0_NREGS): Remove definition.
13659
a4398628
MF
136602017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13661
13662 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13663 Drop xtensa_default_isa initialization.
13664 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13665
8c43009f
PA
136662017-03-27 Pedro Alves <palves@redhat.com>
13667
13668 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13669 (file_entry::include_dir): New method.
13670 (line_header::include_dir_at, line_header::file_name_at): New
13671 methods.
13672 (setup_type_unit_groups, setup_type_unit_groups)
13673 (psymtab_include_file_name): Simplify using the new methods.
13674 (lnp_state_machine) <the_line_header>: New field.
13675 <file>: Add comment.
13676 (lnp_state_machine::current_file): New method.
13677 (dwarf_record_line): Simplify using the new methods.
13678 (init_lnp_state_machine): Initialize the "the_line_header" field.
13679 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13680 Simplify using the new methods.
13681
a7e80b9e
PA
136822017-03-27 Pedro Alves <palves@redhat.com>
13683
13684 * cp-name-parser.y (make_empty): Delete.
13685 (demangler_special, nested_name, ptr_operator, array_indicator)
13686 (direct_declarator, declarator_1): Use fill_comp instead of
13687 make_empty.
13688
21047726
PA
136892017-03-27 Pedro Alves <palves@redhat.com>
13690
13691 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13692 to ATTRIBUTE_PRINTF.
13693 * solib-target.c (library_list_start_list): Print "string" not
13694 "version".
13695 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13696 gdb_xml_error call.
13697
d721ba37
PA
136982017-03-27 Pedro Alves <palves@redhat.com>
13699
13700 * dwarf2read.c (struct file_and_directory): New.
13701 (dwarf2_get_dwz_file): Adjust to use std::string.
13702 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13703 (find_file_and_directory): Adjust to return a file_and_directory
13704 object.
13705 (read_file_scope): Adjust to use file_and_directory. Remove
13706 make_cleanup/do_cleanups calls.
13707 (open_and_init_dwp_file): Adjust to use std::string. Remove
13708 make_cleanup/do_cleanups calls.
13709 * python/python.c (do_start_initialization): Adjust to ldirname
13710 returning a std::string.
13711 * utils.c (ldirname): Now returns a std::string.
13712 * utils.h (ldirname): Change return type to std::string.
13713 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13714 returning a std::string.
13715 * xml-tdesc.c (file_read_description_xml): Likewise.
13716
ed771251
AH
137172017-03-24 Alan Hayward <alan.hayward@arm.com>
13718
13719 * regcache.c (regcache_debug_print_register): New function.
13720 * regcache.h (regcache_debug_print_register): New declaration.
13721 * target.c (debug_print_register): Remove.
13722 (target_fetch_registers): Call regcache_debug_print_register.
13723 (target_store_registers): Likewise.
13724
568c1b9f
PB
137252017-03-24 Pádraig Brady <pbrady@fb.com>
13726
13727 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13728 reference beyond the 'lh->include_dirs' array before accessing to
13729 it.
13730 (psymtab_include_file_name): Likewise.
13731 (dwarf_decode_lines_1): Likewise.
13732 (dwarf_decode_lines): Likewise.
13733 (file_file_name): Likewise.
13734
3e00d44f
SM
137352017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13736
13737 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13738 inferior_ptid.
13739 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13740 ps_lsetfpregs): Likewise.
13741 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13742 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13743 ps_lsetfpregs): Likewise.
13744 * target.c (target_fetch_registers, target_store_registers):
13745 Remove asserts.
13746
077ae656
AH
137472017-03-23 Alan Hayward <alan.hayward@arm.com>
13748
13749 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13750
1e2b521d
YQ
137512017-03-23 Yao Qi <yao.qi@linaro.org>
13752
13753 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13754 (_initialize_aarch64_tdep): Register it.
13755 (aarch64_record_load_store): Handle PRFM instruction.
13756 (aarch64_process_record_test): New function.
13757
33877125
YQ
137582017-03-23 Yao Qi <yao.qi@linaro.org>
13759
13760 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13761 indentation.
13762
a0eef940
YQ
137632017-03-23 Yao Qi <yao.qi@linaro.org>
13764
13765 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13766
3f2a3564
PR
137672017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13768
13769 python/python.c (do_start_initialization): Fix memory leak.
13770
b67aeab0
SM
137712017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13772
13773 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13774 using get_ptrace_pid.
13775 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13776 inferior_ptid.
13777 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13778 inferior_ptid instead of pid.
13779
ffdbe864
YQ
137802017-03-22 Yao Qi <yao.qi@linaro.org>
13781
13782 * aarch64-tdep.c: Wrap locally used classes in anonymous
13783 namespace.
13784 * arm-tdep.c: Likewise.
13785 * linespec.c: Likewise.
13786 * ui-out.c: Likewise.
13787
9d736fbf
JG
137882017-03-22 Jonah Graham <jonah@kichwacoders.com>
13789
13790 PR gdb/19637
13791 * python/lib/gdb/printer/bound_registers.py: Import sys.
13792
3de88e9a
SM
137932017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13794
13795 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13796 windows_thread_info parameter and use it instead of
13797 current_thread.
13798 (windows_fetch_inferior_registers): Don't set current_thread,
13799 pass the thread to do_windows_fetch_inferior_registers. Use
13800 ptid from regcache instead of inferior_ptid.
13801 (do_windows_store_inferior_registers): Add windows_thread_info
13802 parameter and use it instead of current_thread.
13803 (windows_store_inferior_registers): Don't set current_thread,
13804 pass the thread to do_windows_store_inferior_registers. Use
13805 ptid from regcache instead of inferior_ptid.
13806
0e7b8f61
SM
138072017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13808
13809 * ser-mingw.c (ser_windows_raw): Remove reference to
13810 struct serial::current_timeout.
13811
5badf10a
IR
138122017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13813
13814 PR tdep/20928
13815 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13816 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13817 (sparc64_fsr_type): Fix %fsr decoding.
13818
cee59b3f
TW
138192017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13820
13821 * python/py-record-btrace.c (btpy_insn_data): Change return type
13822 for Python 2.
13823
639a9038
SM
138242017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13825
13826 * spu-linux-nat.c (spu_fetch_inferior_registers,
13827 spu_store_inferior_registers): Use ptid from regcache, set and
13828 restore inferior_ptid.
13829 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13830 Likewise.
13831
bcc0c096
SM
138322017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13833
13834 * i386-linux-nat.c (fetch_register, store_register,
13835 i386_linux_fetch_inferior_registers,
13836 i386_linux_store_inferior_registers): Use ptid from regcache.
13837 * ia64-linux-nat.c (ia64_linux_fetch_register,
13838 ia64_linux_store_register): Likewise.
13839 * inf-ptrace.c (inf_ptrace_fetch_register,
13840 inf_ptrace_store_register): Likewise.
13841 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13842 m32r_linux_store_inferior_registers): Likewise.
13843 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13844 m68kbsd_store_inferior_registers): Likewise.
13845 * m68k-linux-nat.c (fetch_register, store_register,
13846 m68k_linux_fetch_inferior_registers,
13847 m68k_linux_store_inferior_registers): Likewise.
13848 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13849 m88kbsd_store_inferior_registers): Likewise.
13850 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13851 mips_fbsd_store_inferior_registers): Likewise.
13852 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13853 mips64_linux_regsets_store_registers): Likewise.
13854 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13855 mipsnbsd_store_inferior_registers): Likewise.
13856 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13857 mips64obsd_store_inferior_registers): Likewise.
13858 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13859 Likewise.
13860 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13861 ppcfbsd_store_inferior_registers): Likewise.
13862 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13863 ppc_linux_store_inferior_registers): Likewise.
13864 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13865 ppcnbsd_store_inferior_registers): Likewise.
13866 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13867 ppcobsd_store_registers): Likewise.
13868 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13869 Likewise.
13870 * ravenscar-thread.c (ravenscar_fetch_registers,
13871 ravenscar_store_registers, ravenscar_prepare_to_store):
13872 Likewise.
13873 * record-btrace.c (record_btrace_fetch_registers,
13874 record_btrace_store_registers, record_btrace_prepare_to_store):
13875 Likewise.
13876 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13877 Lookup inferior using ptid from regcache, instead of
13878 current_inferior.
13879 * remote.c (remote_fetch_registers, remote_store_registers): Use
13880 ptid from regcache.
13881 * rs6000-nat.c (fetch_register, store_register): Likewise.
13882 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13883 s390_linux_store_inferior_registers): Likewise.
13884 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13885 shnbsd_store_inferior_registers): Likewise.
13886 * sol-thread.c (sol_thread_fetch_registers,
13887 sol_thread_store_registers): Likewise.
13888 * sparc-nat.c (sparc_fetch_inferior_registers,
13889 sparc_store_inferior_registers): Likewise.
13890 * tilegx-linux-nat.c (fetch_inferior_registers,
13891 store_inferior_registers): Likewise.
13892 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13893 vaxbsd_store_inferior_registers): Likewise.
13894 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13895 store_xtregs): Likewise.
13896
c0f55cc6
AV
138972017-03-20 Artemiy Volkov <artemiyv@acm.org>
13898
13899 PR gdb/14441
13900 * NEWS: Mention support for rvalue references in GDB and python.
13901 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13902 supports both lvalue and rvalue references.
13903
15c0a2a9
AV
139042017-03-20 Artemiy Volkov <artemiyv@acm.org>
13905
13906 PR gdb/14441
13907 * gdbtypes.c (rank_one_type): Implement overloading
13908 resolution rules regarding rvalue references.
13909
aa006118
AV
139102017-03-20 Artemiy Volkov <artemiyv@acm.org>
13911
13912 PR gdb/14441
13913 * aarch64-tdep.c (aarch64_type_align)
13914 (aarch64_extract_return_value, aarch64_store_return_value): Change
13915 lvalue reference type checks to general reference type checks.
13916 * amd64-tdep.c (amd64_classify): Likewise.
13917 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13918 Likewise.
13919 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13920 (arm_store_return_value): Likewise.
13921 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13922 * c-typeprint.c (c_print_type): Likewise.
13923 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13924 (cplus_number_of_children, cplus_describe_child): Likewise.
13925 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13926 * completer.c (expression_completer): Likewise.
13927 * cp-support.c (make_symbol_overload_list_adl_namespace):
13928 Likewise.
13929 * darwin-nat-info.c (info_mach_region_command): Likewise.
13930 * dwarf2loc.c (entry_data_value_coerce_ref)
13931 (value_of_dwarf_reg_entry): Likewise.
13932 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13933 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13934 Likewise.
13935 * findvar.c (extract_typed_address, store_typed_address):
13936 Likewise.
13937 * gdbtypes.c (rank_one_type): Likewise.
13938 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13939 * infcall.c (value_arg_coerce): Likewise.
13940 * language.c (pointer_type): Likewise.
13941 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13942 Likewise.
13943 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13944 * mn10300-tdep.c (mn10300_type_align): Likewise.
13945 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13946 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13947 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13948 Likewise.
13949 * printcmd.c (print_formatted, x_command): Likewise.
13950 * python/py-type.c (typy_get_composite, typy_template_argument):
13951 Likewise.
13952 * python/py-value.c (valpy_referenced_value)
13953 (valpy_get_dynamic_type, value_has_field): Likewise.
13954 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13955 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13956 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13957 * spu-tdep.c (spu_scalar_value_p): Likewise.
13958 * symtab.c (lookup_symbol_aux): Likewise.
13959 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13960 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13961 Likewise.
13962 * valops.c (value_cast_pointers, value_cast)
13963 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13964 (value_struct_elt, value_struct_elt_bitpos)
13965 (value_find_oload_method_list, find_overload_match)
13966 (value_rtti_indirect_type): Likewise.
13967 * valprint.c (val_print_scalar_type_p, generic_val_print):
13968 Likewise.
13969 * value.c (value_actual_type, value_as_address, unpack_long)
13970 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13971 (coerce_ref): Likewise.
13972 * varobj.c (varobj_get_value_type): Likewise.
13973
3fcf899d
AV
139742017-03-20 Artemiy Volkov <artemiyv@acm.org>
13975
13976 PR gdb/14441
13977 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13978 table of constants.
13979 * python/lib/gdb/command/explore.py: Support exploring values
13980 of rvalue reference types.
13981 * python/lib/gdb/types.py: Implement get_basic_type() for
13982 rvalue reference types.
13983 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13984 constant.
13985 * python/py-value.c (valpy_getitem): Add an rvalue reference
13986 check.
13987 (valpy_reference_value): Add new parameter "refcode".
13988 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13989 New wrappers for valpy_reference_value().
13990 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13991 (gdbpy_invoke_xmethod): Likewise.
13992
4297a3f0
AV
139932017-03-20 Artemiy Volkov <artemiyv@acm.org>
13994
13995 PR gdb/14441
13996 * dwarf2read.c (process_die, read_type_die_1): Handle the
13997 DW_TAG_rvalue_reference_type DIE.
13998 (read_tag_reference_type): Add new parameter "refcode".
13999
e1cb3213
AV
140002017-03-20 Artemiy Volkov <artemiyv@acm.org>
14001
14002 PR gdb/14441
14003 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14004 (c_type_print_modifier, c_type_print_varspec_suffix)
14005 (c_type_print_base): Support printing rvalue reference types.
14006 * c-valprint.c (c_val_print, c_value_print): Support printing
14007 rvalue reference values.
14008
e4347c89
AV
140092017-03-20 Artemiy Volkov <artemiyv@acm.org>
14010
14011 PR gdb/14441
14012 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14013 typename.
14014 * cp-support.c (replace_typedefs): Handle
14015 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14016 * python/py-type.c (typy_lookup_type): Likewise.
14017
53cc15f5
AV
140182017-03-20 Artemiy Volkov <artemiyv@acm.org>
14019
14020 PR gdb/14441
14021 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14022 * parse.c (insert_type): Change assert statement.
14023 (follow_types): Handle rvalue reference types.
14024 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14025 constant.
14026
a65cfae5
AV
140272017-03-20 Artemiy Volkov <artemiyv@acm.org>
14028
14029 PR gdb/14441
14030 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14031 value_ref() interface.
14032 * c-valprint.c (c_value_print): Likewise.
14033 * infcall.c (value_arg_coerce): Likewise.
14034 * python/py-value.c (valpy_reference_value): Likewise.
14035 * valops.c (value_cast, value_reinterpret_cast)
14036 (value_dynamic_cast, typecmp): Likewise.
14037 (value_ref): Parameterize by kind of return value reference type.
14038 * value.h (value_ref): Add new parameter "refcode".
14039
3b224330
AV
140402017-03-20 Artemiy Volkov <artemiyv@acm.org>
14041
14042 PR gdb/14441
14043 * dwarf2read.c (read_tag_reference_type): Use
14044 lookup_lvalue_reference_type() instead of lookup_reference_type().
14045 * eval.c (evaluate_subexp_standard): Likewise.
14046 * f-exp.y: Likewise.
14047 * gdbtypes.c (make_reference_type, lookup_reference_type):
14048 Generalize with rvalue reference types.
14049 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14050 convenience wrappers for lookup_reference_type().
14051 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14052 reference kind parameter.
14053 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14054 wrappers for lookup_reference_type().
14055 * guile/scm-type.c (gdbscm_type_reference): Use
14056 lookup_lvalue_reference_type() instead of lookup_reference_type().
14057 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14058 * parse.c (follow_types): Likewise.
14059 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14060 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14061 Likewise.
14062 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14063 (gdbpy_invoke_xmethod): Likewise.
14064 * stabsread.c: Provide extra argument to make_reference_type()
14065 call.
14066 * valops.c (value_ref, value_rtti_indirect_type): Use
14067 lookup_lvalue_reference_type() instead of lookup_reference_type().
14068
f9aeb8d4
AV
140692017-03-20 Artemiy Volkov <artemiyv@acm.org>
14070
14071 PR gdb/14441
14072 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14073 (TYPE_IS_REFERENCE): New macro.
14074 (struct type): Add rvalue_reference_type field.
14075 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14076
51457a05
MAL
140772017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14078
14079 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14080 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14081 New function definition.
14082 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14083 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14084 New function declaration.
14085 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14086 * mi/mi-interp.h: New file.
14087 * solib.c (info_sharedlibrary_command): Replace for loop with
14088 ALL_SO_LIBS macro
14089 * solib.h (update_solib_list): New function declaration.
14090 (so_list_head): Move macro.
14091 * solist.h (ALL_SO_LIBS): New macro.
14092
e696b3ad
MAL
140932017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14094
14095 * infcmd.c (post_create_inferior): Remove unused argument in
14096 call to solib_add.
14097 * remote.c (remote_start_remote): Likewise.
14098 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14099 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14100 (enable_break): Likewise.
14101 * solib.c (update_solib_list): Remove unused target argument
14102 and its documentation.
14103 (solib_add): Remove unused target argument. Remove unused
14104 argument in call to update_solib_list.
14105 (info_sharedlibrary_command): Remove unused argument in call
14106 to update_solib_list.
14107 (sharedlibrary_command): Remove unused argument in call to
14108 solib_add.
14109 (handle_solib_event): Likewise.
14110 (reload_shared_libraries): Likewise.
14111 * solib.h (solib_add): Remove unused target argument.
14112
dcb84eda
AA
141132017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14114
14115 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14116 (s390_displaced_step_fixup): Cover relative branches with the
14117 default fixup handling. This fixes lack of support for some
14118 relative branch instructions.
14119
d9cb6cdc
SM
141202017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14121
14122 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14123 ptid from regcache.
14124
1afaf9f4
SM
141252017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14126
14127 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14128 i386_darwin_store_inferior_registers): Use ptid from regcache.
14129
aac12e24
SM
141302017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14131
14132 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14133 i386bsd_store_inferior_registers): Use ptid from regcache.
14134
bbe1eef1
SM
141352017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14136
14137 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14138 hppaobsd_store_registers): Use ptid from regcache.
14139
10799020
SM
141402017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14141
14142 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14143 hppanbsd_store_registers): Use ptid from regcache.
14144
00204cf7
SM
141452017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14146
14147 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14148 from regcache. Use get_ptrace_pid.
14149
11a33714
SM
141502017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14151
14152 * corelow.c (get_core_register_section): Use ptid from regcache,
14153 update doc.
14154
317cd492
SM
141552017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14156
14157 * bsd-uthread.c (bsd_uthread_fetch_registers,
14158 bsd_uthread_store_registers): Use ptid from regcache, set and
14159 restore inferior_ptid.
14160
9ac8a7c2
SM
141612017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14162
14163 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14164 fetch_fp_regs, store_register, store_regs, store_fp_register,
14165 store_fp_regs): Use ptid from regcache.
14166
4ac4bb6a
SM
141672017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14168
14169 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14170 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14171 store_vfp_regs): Use ptid from regcache.
14172
9bcbdca8
PA
141732017-03-17 Pedro Alves <palves@redhat.com>
14174
14175 PR remote/21188
14176 * ser-base.c (ser_base_wait_for): Add comment.
14177 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14178 version.
14179 * ser-unix.c (hardwire_raw): Remove reference to
14180 scb->current_timeout.
14181 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14182 (hardwire_ops): Install ser_base_readchar instead of
14183 hardwire_readchar.
14184 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14185 Remove fields.
14186
7503099f
JG
141872017-03-17 Jonah Graham <jonah@kichwacoders.com>
14188
14189 PR gdb/19637
14190 * python/lib/gdb/printer/bound_registers.py: Add support for
14191 Python 3.
14192
7942e96e
AA
141932017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14194
14195 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14196 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14197 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14198 byte_offset to subobj_byte_offset. Fix the handling of
14199 DWARF_VALUE_STACK on big-endian targets when coming via an
14200 implicit pointer.
14201 (dwarf2_evaluate_loc_desc): Adjust call to
14202 dwarf2_evaluate_loc_desc_full.
14203 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14204 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14205
ba14f379
YQ
142062017-03-16 Yao Qi <yao.qi@linaro.org>
14207
14208 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14209 and REVSH instructions.
14210
b121eeb9
YQ
142112017-03-16 Yao Qi <yao.qi@linaro.org>
14212
14213 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14214 (arm_record_test): Declare.
14215 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14216 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14217 align with the manual.
14218 (thumb_record_misc): Adjust the code order to align with the
14219 manual.
14220 (thumb2_record_decode_insn_handler): Fix instruction matching.
14221 (instruction_reader_thumb): New class.
14222 (arm_record_test): New function.
14223
728a7913
YQ
142242017-03-16 Yao Qi <yao.qi@linaro.org>
14225
14226 * arm-tdep.c (abstract_memory_reader): New class.
14227 (instruction_reader): New class.
14228 (extract_arm_insn): Add argument 'reader'. Callers updated.
14229 (decode_insn): Likewise.
14230
34b43320
DE
142312017-03-16 Doug Evans <dje@google.com>
14232
a7c0469f
DE
14233 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14234 member. Change type of TYPE member to SCM. All uses updated.
14235 (lsscm_make_lazy_string_smob): Add assert.
14236 (lsscm_make_lazy_string): Flag bad length values.
14237 (lsscm_elt_type): New function.
14238 (gdbscm_lazy_string_to_value): Rewrite to use
14239 lsscm_safe_lazy_string_to_value.
14240 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14241 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14242 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14243 in incoming type.
14244 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14245 * guile/scm-type.c (tyscm_scm_to_type): New function.
14246
142472017-03-15 Doug Evans <dje@google.com>
14248
34b43320
DE
14249 PR python/17728, python/18439, python/18779
14250 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14251 member. Change type of TYPE member to PyObject *. All uses updated.
14252 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14253 (gdbpy_create_lazy_string_object): Flag bad length values.
14254 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14255 Handle typedefs in incoming type.
14256 (stpy_lazy_string_elt_type): New function.
14257 (gdbpy_extract_lazy_string): Call it.
14258 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14259 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14260 typedefs in incoming type.
14261
a3a5fecc
DE
142622017-03-16 Doug Evans <dje@google.com>
14263
14264 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14265 * guile/scm-type.c (tyscm_scm_to_type): New function.
14266
28f1c605
JW
142672017-03-16 Jiong Wang <jiong.wang@arm.com>
14268
14269 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14270 "ULONGEST" for "skip".
14271
87c336f6
AA
142722017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14273
14274 PR gdb/21220
14275 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14276 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14277 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14278 over ptrace peek/poke until end of buffer or error.
14279
cf81cf60
SM
142802017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14281
14282 * parse.c (length_of_subexp): Make static.
14283 * parser-defs.h (length_of_subexp): Remove.
14284
a379284a
AA
142852017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14286
14287 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14288 as well.
14289
8a6200ba
PA
142902017-03-14 Pedro Alves <palves@redhat.com>
14291
14292 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14293 (main): Use std::unique_ptr. Remove calls to
14294 cp_demangled_name_parse_free.
14295
f79ec206
SM
142962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14297
14298 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14299 alphabsd_store_inferior_registers): Use regcache->ptid instead
14300 of inferior_ptid.
14301
edb5fb00
SM
143022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14303
14304 * aix-thread.c (aix_thread_fetch_registers,
14305 aix_thread_store_registers): Use regcache->ptid instead of
14306 inferior_ptid.
14307
55119686
SM
143082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14309
14310 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14311 store_gregs_to_thread, fetch_fpregs_from_thread,
14312 store_fpregs_to_thread): Use regcache->ptid instead of
14313 inferior_ptid.
14314
6a06fbb7
SM
143152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14316
14317 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14318 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14319 instead of inferior_ptid.
14320
c6386875
SM
143212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14322
14323 * target.c (target_fetch_registers, target_store_registers): Add
14324 assert.
14325
ddaaf0fb
SM
143262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14327
14328 * regcache.h (regcache_get_ptid): New function.
14329 * regcache.c (regcache_get_ptid): New function.
14330
b9da89d1 143312017-03-13 Mark Wielaard <mark@klomp.org>
14332
14333 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14334
5f4d1085
KS
143352017-03-10 Keith Seitz <keiths@redhat.com>
14336
14337 PR c++/8218
14338 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14339
c65d6b55
PA
143402017-03-08 Pedro Alves <palves@redhat.com>
14341
14342 PR gdb/18360
14343 * infrun.c (start_step_over, do_target_resume, resume)
14344 (restart_threads): Assert we're not resuming a thread that is
14345 meant to be stopped.
14346 (infrun_thread_stop_requested_callback): Delete.
14347 (infrun_thread_stop_requested): If the thread is internally
14348 stopped, queue a pending stop event and clear the thread's
14349 inline-frame state.
14350 (handle_stop_requested): New function.
14351 (handle_syscall_event, handle_inferior_event_1): Use
14352 handle_stop_requested.
14353 (handle_stop_requested): New function.
14354 (handle_signal_stop): Set the thread's stop_signal here instead of
14355 at caller.
14356 (finish_step_over): Clear step over info unconditionally.
14357 (handle_signal_stop): If the user had interrupted the event
14358 thread, consider the stop a random signal.
14359 (handle_signal_stop) <signal arrived while stepping over
14360 breakpoint>: Don't restart threads here.
14361 (stop_waiting): Don't clear step-over info here.
14362
15c22686
PA
143632017-03-08 Pedro Alves <palves@redhat.com>
14364
14365 PR 21206
14366 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14367 goes to argument 2, not 1.
14368
6e5d74e7
PA
143692017-03-08 Pedro Alves <palves@redhat.com>
14370
14371 PR cli/21218
14372 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14373 display_gdb_prompt.
14374 (command_line_input): Add comment.
14375
9753a2f6
PA
143762017-03-08 Pedro Alves <palves@redhat.com>
14377
14378 PR tui/21216
14379 * tui/tui-file.c (tui_file::write): New.
14380 * tui/tui-file.h (tui_file): Override "write".
14381 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14382 factored out from ...
14383 (tui_puts): ... here.
14384 (tui_putc): Use them.
14385 (tui_write): New function.
14386 * tui/tui-io.h (tui_write): Declare.
14387
1672e0d9
SDJ
143882017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14389
14390 * Makefile.in (SFILES): Replace "environ.c" with
14391 "common/environ.c".
14392 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14393 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14394 to...
14395 * common/environ.c: ... here.
14396 * environ.h: Moved to...
14397 * common/environ.h: ... here.
14398
f7bb4e3a
PB
143992017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14400
14401 * gdbarch.sh (pstring_ptr): New static function.
14402 (gdbarch_disassembler_options): Use it.
14403 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14404 not valid_disassembler_option->name.
14405 * gdbarch.c: Regenerate.
14406
e45ced6c
PB
144072017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14408
14409 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14410
5f6fd321
PA
144112017-03-07 Pedro Alves <palves@redhat.com>
14412
14413 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14414
6dbb839a 144152017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14416
14417 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14418 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14419 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14420 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14421
d274ecf4
SM
144222017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14423
14424 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14425
df97be55
SM
144262017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14427
14428 * remote.c (remote_add_target_side_commands): Use range-based
14429 for loop.
14430
7d45f3df
YQ
144312017-03-03 Yao Qi <yao.qi@linaro.org>
14432
14433 PR gdb/21165
14434 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14435 value is lazy.
14436 * valprint.c (common_val_print): Likewise.
14437
65b48a81
PB
144382017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14439
14440 * NEWS: Mention new set/show disassembler-options commands.
14441 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14442 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14443 (prospective_options): New static variable.
14444 (gdb_disassembler::gdb_disassembler): Initialize
14445 m_di.disassembler_options.
14446 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14447 (get_disassembler_options): New function.
14448 (set_disassembler_options): Likewise.
14449 (set_disassembler_options_sfunc): Likewise.
14450 (show_disassembler_options_sfunc): Likewise.
14451 (disassembler_options_completer): Likewise.
14452 (_initialize_disasm): Likewise.
14453 * disasm.h (get_disassembler_options): New prototype.
14454 (set_disassembler_options): Likewise.
14455 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14456 (gdbarch_verify_disassembler_options): Likewise.
14457 * gdbarch.c: Regenerate.
14458 * gdbarch.h: Likewise.
14459 * arm-tdep.c (num_disassembly_options): Delete.
14460 (set_disassembly_style): Likewise.
14461 (arm_disassembler_options): New static variable.
14462 (set_disassembly_style_sfunc): Convert short style name into long
14463 option name. Call set_disassembler_options.
14464 (show_disassembly_style_sfunc): New function.
14465 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14466 set_gdbarch_verify_disassembler_options.
14467 (_initialize_arm_tdep): Delete regnames variable and update callers.
14468 (arm_disassembler_options): Initialize.
14469 (disasm_options): New variable.
14470 (num_disassembly_options): Rename from this...
14471 (num_disassembly_styles): ...to this. Compute by scanning through
14472 disasm_options.
14473 (valid_disassembly_styles): Initialize using disasm_options.
14474 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14475 set_arm_regname_option.
14476 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14477 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14478 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14479 set_gdbarch_verify_disassembler_options.
14480 * s390-tdep.c (s390_disassembler_options): New static variable.
14481 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14482 set_gdbarch_verify_disassembler_options.
14483
d538e36d
SM
144842017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14485
14486 * remote.c (remote_add_target_side_condition): Remove "struct"
14487 keyword from range-based for loop.
14488
83621223
SM
144892017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14490
14491 * remote.c (remote_add_target_side_condition): Use range-based
14492 for loop. Update comment.
14493
2123df0e
YQ
144942017-02-27 Yao Qi <yao.qi@linaro.org>
14495
14496 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14497
8e368124
AH
144982017-02-26 Alan Hayward <alan.hayward@arm.com>
14499
14500 * regcache.c (regcache_raw_update): New function.
14501 (regcache_raw_read): Move code to regcache_raw_update.
14502 * regcache.h (regcache_raw_update): New declaration.
14503 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14504
a49dd8dd
JK
145052017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14506
14507 * dwarf2read.c (create_debug_type_hash_table): Initialize
14508 header.signature and header.type_offset_in_tu.
14509
34e4bae9
PA
145102017-02-24 Pedro Alves <palves@redhat.com>
14511
14512 * symtab.c (make_file_symbol_completion_list_1): Use
14513 add_symtab_completions.
14514
b0e4b369
AH
145152017-02-24 Alan Hayward <alan.hayward@arm.com>
14516
14517 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14518
975c21ab
AH
145192017-02-24 Alan Hayward <alan.hayward@arm.com>
14520
14521 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14522 I386_MAX_REGISTER_SIZE.
14523 (i386_pseudo_register_write): Likewise.
14524 (i386_process_record): Likewise.
14525 * i387-tdep.c (i387_supply_xsave): Likewise.
14526 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14527 (store_register): Likewise.
14528
14bc53a8
PA
145292017-02-23 Pedro Alves <palves@redhat.com>
14530
14531 * ada-lang.c: Include "common/function-view.h".
14532 (ada_iterate_over_symbols): Adjust to use function_view as
14533 callback type.
14534 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14535 (ada_make_symbol_completion_list): Use a lambda.
14536 (ada_exc_search_name_matches): Delete.
14537 (name_matches_regex): New.
14538 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14539 * compile/compile-c-support.c: Include "common/function-view.h".
14540 (print_one_macro): Change prototype to accept a ui_file pointer.
14541 (write_macro_definitions): Use a lambda.
14542 * dwarf2read.c: Include "common/function-view.h".
14543 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14544 (dw2_expand_symtabs_matching): Adjust to use function_view as
14545 callback type.
14546 * language.h: Include "common/function-view.h".
14547 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14548 function_view as callback type.
14549 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14550 * linespec.c: Include "common/function-view.h".
14551 (collect_info::add_symbol): New method.
14552 (struct symbol_and_data_callback, iterate_inline_only, struct
14553 symbol_matcher_data, iterate_name_matcher): Delete.
14554 (iterate_over_all_matching_symtabs): Adjust to use function_view
14555 as callback type and lambdas.
14556 (iterate_over_file_blocks): Adjust to use function_view as
14557 callback type.
14558 (decode_compound_collector): Now a class with private fields.
14559 (decode_compound_collector::release_symbols): New method.
14560 (collect_one_symbol): Rename to...
14561 (decode_compound_collector::operator()): ... this and adjust.
14562 (lookup_prefix_sym): decode_compound_collector construction bits
14563 move to decode_compound_collector ctor. Pass the
14564 decode_compound_collector object directly as callback. Remove
14565 cleanups and use decode_compound_collector::release_symbols
14566 instead.
14567 (symtab_collector): Now a class with private fields.
14568 (symtab_collector::release_symtabs): New method.
14569 (add_symtabs_to_list): Rename to...
14570 (symtab_collector::operator()): ... this and adjust.
14571 (collect_symtabs_from_filename): symtab_collector construction
14572 bits move to symtab_collector ctor. Pass the symtab_collector
14573 object directly as callback. Remove cleanups and use
14574 symtab_collector::release_symtabs instead.
14575 (collect_symbols): Delete.
14576 (add_matching_symbols_to_info): Use lambdas.
14577 * macrocmd.c (print_macro_callback): Delete.
14578 (info_macro_command): Use a lambda.
14579 (info_macros_command): Pass print_macro_definition as callable
14580 directly.
14581 (print_one_macro): Remove 'ignore' parameter.
14582 (macro_list_command): Adjust.
14583 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14584 (macro_for_each_data::user_data): Delete field.
14585 (foreach_macro): Adjust to call the function_view.
14586 (macro_for_each): Adjust to use function_view as callback type.
14587 (foreach_macro_in_scope): Adjust to call the function_view.
14588 (macro_for_each_in_scope): Adjust to use function_view as callback
14589 type.
14590 * macrotab.h: Include "common/function-view.h".
14591 (macro_callback_fn): Declare a prototype instead of a pointer.
14592 Remove "user_data" parameter.
14593 (macro_for_each, macro_for_each_in_scope): Adjust to use
14594 function_view as callback type.
14595 * psymtab.c (partial_map_expand_apply)
14596 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14597 Adjust to use function_view as callback type and to return bool.
14598 (psym_expand_symtabs_matching): Adjust to use function_view as
14599 callback types.
14600 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14601 to use function_view as callback type and to return bool.
14602 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14603 callback types.
14604 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14605 as callback types.
14606 * symfile.h: Include "common/function-view.h".
14607 (expand_symtabs_file_matcher_ftype)
14608 (expand_symtabs_symbol_matcher_ftype)
14609 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14610 return bool.
14611 (quick_symbol_functions::map_symtabs_matching_filename)
14612 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14613 function_view as callback type and return bool.
14614 (expand_symtabs_matching): Adjust to use function_view as callback
14615 type.
14616 (maintenance_expand_name_matcher)
14617 (maintenance_expand_file_matcher): Delete.
14618 (maintenance_expand_symtabs): Use lambdas.
14619 * symtab.c (iterate_over_some_symtabs): Adjust to use
14620 function_view as callback types and return bool.
14621 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14622 of a cleanup.
14623 (lookup_symtab_callback): Delete.
14624 (lookup_symtab): Use a lambda.
14625 (iterate_over_symbols): Adjust to use function_view as callback
14626 type.
14627 (struct search_symbols_data, search_symbols_file_matches)
14628 (search_symbols_name_matches): Delete.
14629 (search_symbols): Use a pair of lambdas.
14630 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14631 (symtab_expansion_callback): Delete.
14632 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14633 * symtab.h: Include "common/function-view.h".
14634 (iterate_over_some_symtabs): Adjust to use function_view as
14635 callback type and return bool.
14636 (iterate_over_symtabs): Adjust to use function_view as callback
14637 type.
14638 (symbol_found_callback_ftype): Remove 'data' parameter and return
14639 bool.
14640 (iterate_over_symbols): Adjust to use function_view as callback
14641 type.
14642
07e253aa
PA
146432017-02-23 Pedro Alves <palves@redhat.com>
14644
14645 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14646 (%.o) <unittests/%.c>: New pattern.
14647 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14648 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14649 * common/function-view.h: New file.
14650 * unittests/function-view-selftests.c: New file.
14651 * configure: Regenerate.
14652
8eaf5320
SM
146532017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14654
14655 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14656 inferior_ptid.
14657 * go32-nat.c (go32_thread_alive): Likewise.
14658
38768751
YQ
146592017-02-23 Yao Qi <yao.qi@linaro.org>
14660
14661 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14662 delete.
14663
0a8beaba
YQ
146642017-02-23 Yao Qi <yao.qi@linaro.org>
14665
14666 * varobj.c (varobj_clear_saved_item): Use delete instead of
14667 xfree.
14668 (update_dynamic_varobj_children): Likewise.
14669
58fdfd2c
JK
146702017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14671
14672 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14673
1b90b139
SM
146742017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14675
14676 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14677 m_enum_value to 0 in default constructor.
14678
2039d74e
EBM
146792017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14680
14681 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14682 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14683 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14684 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14685 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14686 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14687 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14688 IS_STORE_CONDITIONAL_INSN.
14689
7814882a
JK
146902017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14691
14692 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14693
0ae60b63
JK
146942017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14695
14696 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14697
0224619f
JK
146982017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14699
14700 * dwarf2read.c (skip_one_die, read_attribute_value)
14701 (dwarf2_const_value_attr, dump_die_shallow)
14702 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14703 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14704
0af92d60
JK
147052017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14706
14707 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14708 (dwarf_parse_macro_header): Accept DWARF version 5.
14709 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14710
216f72a1
JK
147112017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14712
14713 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14714 DW_AT_GNU_*.
14715 * common/common-exceptions.h (enum errors): Likewise.
14716 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14717 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14718 (dwarf_expr_context::execute_stack_op): Likewise.
14719 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14720 Likewise.
14721 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14722 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14723 (show_entry_values_debug, call_site_to_target_addr)
14724 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14725 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14726 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14727 (value_of_dwarf_block_entry, indirect_pieced_value)
14728 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14729 (disassemble_dwarf_expression): Likewise.
14730 * dwarf2read.c (process_die, inherit_abstract_dies)
14731 (read_call_site_scope): Likewise.
14732 * gdbtypes.h (struct func_type, struct call_site_parameter)
14733 (struct call_site): Likewise.
14734 * stack.c (read_frame_arg): Likewise.
14735 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14736
43988095
JK
147372017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14738
14739 * defs.h (read_unsigned_leb128): New declaration.
14740 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14741 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14742 (dwarf2_find_location_expression): Call also
14743 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14744 * dwarf2loc.h (dwarf2_version): New declaration.
14745 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14746 rnglists.
14747 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14748 .debug_rnglists.
14749 (struct dwop_section_names): Add loclists_dwo.
14750 (dwop_section_names): Add .debug_loclists.dwo.
14751 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14752 (struct dwarf2_per_cu_data): Add dwarf_version.
14753 (struct dwo_sections): Add loclists.
14754 (struct attr_abbrev): Add implicit_const.
14755 (read_indirect_line_string): New declaration.
14756 (read_unsigned_leb128): Delete declaration.
14757 (rcuh_kind): New definition.
14758 (read_and_check_comp_unit_head): Change parameter
14759 is_debug_types_section to section_kind.
14760 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14761 (read_comp_unit_head): Change parameter abfd to section, add parameter
14762 section_kind. Handle DWARF-5.
14763 (error_check_comp_unit_head): Accept also DWARF version 5.
14764 (read_and_check_comp_unit_head): Change parameter
14765 is_debug_types_section to section_kind.
14766 (read_and_check_type_unit_head): Delete function.
14767 (read_abbrev_offset): Handle DWARF-5.
14768 (create_debug_type_hash_table): Add parameter section_kind. Process
14769 only DW_UT_type. Use signature and type_offset_in_tu from struct
14770 comp_unit_head.
14771 (create_debug_types_hash_table): Update create_debug_type_hash_table
14772 caller.
14773 (create_all_type_units): Call create_debug_type_hash_table.
14774 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14775 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14776 caller.
14777 (skip_one_die): Handle DW_FORM_implicit_const.
14778 (dwarf2_rnglists_process): New function.
14779 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14780 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14781 (read_attribute_value): Handle DW_FORM_implicit_const,
14782 DW_FORM_line_strp.
14783 (read_attribute): Handle DW_FORM_implicit_const.
14784 (read_indirect_string_at_offset_from): New function from
14785 read_indirect_string_at_offset.
14786 (read_indirect_string_at_offset): Call
14787 read_indirect_string_at_offset_from.
14788 (read_indirect_line_string_at_offset): New function.
14789 (read_indirect_string): New function comment.
14790 (read_indirect_line_string): New function.
14791 (read_unsigned_leb128): Make it global.
14792 (dwarf2_string_attr): Handle DWARF-5.
14793 (add_include_dir_stub, read_formatted_entries): New functions.
14794 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14795 Handle DWARF-5.
14796 (per_cu_header_read_in): Update read_comp_unit_head caller.
14797 (dwarf2_version): New function.
14798 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14799 rnglists.
14800 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14801 fields.
14802
22d2f3ab
JK
148032017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14804
14805 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14806
5f46c5a5
JK
148072017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14808
14809 * dwarf2read.c (dwarf2_ranges_process): New function from
14810 dwarf2_ranges_read.
14811 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14812 dwarf2_ranges_process.
14813
78d4d2c5
JK
148142017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14815
14816 * dwarf2read.c (create_debug_type_hash_table): New function from
14817 create_debug_types_hash_table.
14818 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14819 (create_all_type_units, open_and_init_dwo_file): Update
14820 create_debug_types_hash_table callers.
14821
1b076f25
SDJ
148222017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14823
14824 PR gdb/16188
14825 * fork-child.c (trace_start_error): Fix thinko. va_end should
14826 refer to 'ap', not 'args'.
14827
0db8980c
SDJ
148282017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14829 Pedro Alves <palves@redhat.com>
14830
14831 PR gdb/16188
14832 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14833 calls succeeded.
14834 * fork-child.c (trace_start_error): New function.
14835 (trace_start_error_with_name): Likewise.
14836 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14837 * inf-ptrace.c (inf_ptrace_me): Likewise.
14838 * inferior.h (trace_start_error): New prototype.
14839 (trace_start_error_with_name): Likewise.
14840
99e8a4f9
SDJ
148412017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14842
14843 PR gdb/21164
14844 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14845 NULL before using it.
14846 * symmisc.c (maintenance_print_symbols): Likewise.
14847 (maintenance_print_msymbols): Likewise.
14848
4e746bb6
TW
148492017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14850
14851 * NEWS: Add record Python bindings entry.
14852
148532017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14854
14855 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14856 py-record-full.o.
14857 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14858 * python/py-record-btrace.c, python/py-record-btrace.h,
14859 python/py-record-full.c, python/py-record-full.h: New file.
14860 * python/py-record.c: Add include for py-record-btrace.h and
14861 py-record-full.h.
14862 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14863 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14864 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14865 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14866 New definition.
14867 (gdbpy_initialize_btrace): New export.
14868 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14869
148702017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14871
14872 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14873 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14874 * python/py-record.c: New file.
14875 * python/python-internal.h (gdbpy_start_recording,
14876 gdbpy_current_recording, gdpy_stop_recording,
14877 gdbpy_initialize_record): New export.
14878 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14879 (python_GdbMethods): Add gdbpy_start_recording,
14880 gdbpy_current_recording and gdbpy_stop_recording.
14881
148822017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14883
14884 * record-btrace.c (record_btrace_record_method): New function.
14885 (init_record_btrace_ops): Initialize to_record_method.
14886 * record-full.c (record_full_record_method): New function.
14887 (init_record_full_ops, init_record_full_core_ops): Add
14888 record_full_record_method.
14889 * record.h (enum record_method): New enum.
14890 * target-debug.h (target_debug_print_enum_record_method: New define.
14891 * target-delegates.c: Regenerate.
14892 * target.c (target_record_method): New function.
14893 * target.h: Include record.h.
14894 (struct target_ops) <to_record_method>: New field.
14895 (target_record_method): New export.
14896
148972017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14898
14899 * record.h (record_start, record_stop): New export.
14900 * record.c (record_start, record_stop): New function.
14901
149022017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14903
14904 * btrace.c (btrace_fetch): Copy function call segments pointer
14905 into a vector.
14906 (btrace_clear): Clear the vector.
14907 (btrace_find_insn_by_number): Use binary search to find the correct
14908 function call segment.
14909 * btrace.h (brace_fun_p): New typedef.
14910 (struct btrace_thread_info) <functions>: New field.
14911
149122017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14913
14914 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14915 * btrace.c (btrace_decode_error): ... here. New function.
14916 * btrace.h (btrace_decode_error): New export.
14917
149182017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14919
14920 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14921 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14922 btrace_find_insn_by_number): Remove special case for gaps.
14923 * btrace.h (btrace_insn_get_error): New export.
14924 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14925 * record-btrace.c (btrace_insn_history): Print number for gaps.
14926 (record_btrace_info, record_btrace_goto): Handle gaps.
14927
3f77c769
TT
149282017-02-14 Tom Tromey <tom@tromey.com>
14929
14930 PR python/13598:
14931 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14932 event.
14933 * python/py-evts.c (gdbpy_initialize_py_events): Add
14934 before_prompt registry.
14935 * python/py-events.h (events_object) <before_prompt>: New field.
14936
4c2c7ac6
MM
149372017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14938
14939 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14940
5cf30ebf
LM
149412017-02-13 Luis Machado <lgustavo@codesourcery.com>
14942
14943 * symfile (_initialize_symfile): Add usage text to the load command's
14944 help text.
14945
26a06916
SM
149462017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14947
14948 * utils.c (defaulted_query): Don't query on secondary UIs.
14949
0b145e37
TT
149502017-02-10 Tom Tromey <tom@tromey.com>
14951
14952 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14953
2d8365c4
TT
149542017-02-10 Tom Tromey <tom@tromey.com>
14955
14956 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14957 "cleanup" local.
14958 * python/py-type.c (typy_legacy_template_argument): Remove
14959 unnecessary "cleanup" local.
14960
2bb8f231
TT
149612017-02-10 Tom Tromey <tom@tromey.com>
14962
14963 * python/python.c (do_start_initialization): New function, from
14964 _initialize_python.
14965 (_initialize_python): Call do_start_initialization.
14966 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14967 goto.
14968
1bdfaf42
TT
149692017-02-10 Tom Tromey <tom@tromey.com>
14970
14971 * python/py-prettyprint.c (pretty_print_one_value): Use
14972 gdbpy_ref.
14973
88b6faea
TT
149742017-02-10 Tom Tromey <tom@tromey.com>
14975
14976 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14977 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14978 gdbpy_ref.
14979 * python/py-type.c (field_new): Use gdbpy_ref.
14980 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14981 gdbpy_ref.
14982 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14983 (py_free_pspace): Likewise.
14984 (pspace_to_pspace_object): Likewise.
14985 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14986 (py_free_objfile): Likewise.
14987 (objfile_to_objfile_object): Likewise.
14988 * python/py-inferior.c (delete_thread_object): Use
14989 gdbpy_ref.
14990 (infpy_read_memory): Likewise.
14991 (py_free_inferior): Likewise.
14992 * python/py-evtregistry.c (create_eventregistry_object): Use
14993 gdbpy_ref.
14994 * python/py-event.c (create_event_object): Use gdbpy_ref.
14995
7780f186
TT
149962017-02-10 Tom Tromey <tom@tromey.com>
14997
14998 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14999 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15000 used.
15001 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15002 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15003 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15004 python/py-framefilter.c, python/py-function.c,
15005 python/py-inferior.c, python/py-infevents.c,
15006 python/py-linetable.c, python/py-newobjfileevent.c,
15007 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15008 python/py-signalevent.c, python/py-stopevent.c,
15009 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15010 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15011 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15012 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15013
d4b0bb18
TT
150142017-02-10 Tom Tromey <tom@tromey.com>
15015
15016 * ui-out.h (ui_out_emit_type): New class.
15017 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15018 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15019 and ui_out_emit_tuple.
15020 (enumerate_locals): Likewise.
15021 (py_mi_print_variables, py_print_locals, py_print_args): Use
15022 ui_out_emit_list.
15023 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15024 ui_out_emit_list.
15025 * common/gdb_optional.h: New file.
15026
f67f945c
MG
150272017-02-10 Martin Galvan <martingalvan@sourceware.org>
15028
15029 * MAINTAINERS (Write After Approval): Update my e-mail address.
15030
18da0c51
MG
150312017-02-10 Martin Galvan <martingalvan@sourceware.org>
15032
15033 PR gdb/21122
15034 * breakpoint.c (_initialize_breakpoint): Update the help description
15035 of the 'commands' command to indicate that it takes a list argument.
15036
62c14536
SM
150372017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15038
15039 * interps.c (current_interp_set_logging): Remove "return".
15040
ff6fa247
GB
150412017-02-09 Gary Benson <gbenson@redhat.com>
15042
15043 * symtab.c (add_symtab_completions): Prevent NULL pointer
15044 dereference.
15045
a474bd8e
PA
150462017-02-08 Pedro Alves <palves@redhat.com>
15047
15048 * interps.c (interp::interp): Remove reference to quiet_p.
15049 (interp_set): Make static. Remove dead "Switching to" output
15050 code.
15051 (interp_quiet_p, interp_set_quiet): Delete.
15052 (interpreter_exec_cmd): Don't set the interpreter quiet.
15053 * interps.h (interp_quiet_p): Make static.
15054 (class interp) <quiet_p>: Remove field
15055
3d7b173c
JG
150562017-02-08 Jerome Guitton <guitton@adacore.com>
15057
604c4576
JG
15058 * cli/cli-decode.c (find_command_name_length): Make it extern.
15059 * cli/cli-decode.h (find_command_name_length): Declare.
15060 * cli/cli-script.c (command_name_equals, line_first_arg):
15061 New functions.
15062 (process_next_line): Use cli-decode to parse command names.
15063 (build_command_line): Make args a constant pointer.
15064
150652017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15066
3d7b173c
JG
15067 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15068 Remove case-insensitive search.
15069
1291063d
JM
150702017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15071
15072 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15073 at the end of the line. Avoids an ARI warning.
15074
20b477a7
LM
150752017-02-06 Luis Machado <lgustavo@codesourcery.com>
15076
15077 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15078 rdseed instructions.
15079 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15080
3f7b46f2
IR
150812017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15082
15083 PR tdep/20936
15084 Provide and use sparc32 and sparc64 target description XML files.
15085 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15086 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15087 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15088 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15089 * features/sparc/sparc32-solaris.xml: New file.
15090 * features/sparc/sparc64-solaris.xml: New file.
15091 * features/sparc/sparc32-solaris.c: Generated.
15092 * features/sparc/sparc64-solaris.c: Generated.
15093 * sparc-tdep.h: Account for differences in target descriptions.
15094 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15095 (sparc32_register_type): Use target provided registers.
15096 (validate_tdesc_registers): New function.
15097 (sparc32_gdbarch_init): Use tdesc_has_registers.
15098 Set pseudoregister functions.
15099 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15100 (sparc64_register_type): Use target provided registers.
15101 (sparc64_init_abi): Set pseudoregister functions.
15102
f0fd41c1
TT
151032017-02-03 Tom Tromey <tom@tromey.com>
15104
15105 PR rust/21097:
15106 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15107 with a single member.
15108
d6f9b0fb
PA
151092017-02-03 Pedro Alves <palves@redhat.com>
15110
15111 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15112 (cli_interp_base::~cli_interp_base): New.
15113 (cli_interp): New struct.
15114 (as_cli_interp): Cast the interp itself to cli_interp.
15115 (cli_interpreter_pre_command_loop): Rename to ...
15116 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15117 parameter.
15118 (cli_interpreter_init): Rename to ...
15119 (cli_interp::init): ... this. Remove 'self' parameter. Use
15120 boolean. Make extern.
15121 (cli_interpreter_resume): Rename to ...
15122 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15123 extern.
15124 (cli_interpreter_suspend): Rename to ...
15125 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15126 extern.
15127 (cli_interpreter_exec): Rename to ...
15128 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15129 extern.
15130 (cli_interpreter_supports_command_editing): Rename to ...
15131 (cli_interp_base::supports_command_editing): ... this. Remove
15132 'interp' parameter. Make extern.
15133 (cli_ui_out): Rename to ...
15134 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15135 Make extern.
15136 (cli_set_logging): Rename to ...
15137 (cli_interp_base::set_logging): ... this. Remove 'interp'
15138 parameter. Make extern.
15139 (cli_interp_procs): Delete.
15140 (cli_interp_factory): Adjust to use "new".
15141 * cli/cli-interp.h: Include "interps.h".
15142 (struct cli_interp_base): New struct.
15143 * interps.c (struct interp): Delete. Fields moved to interps.h.
15144 (interp_new): Delete.
15145 (interp::interp, interp::~interp): New.
15146 (interp_set): Use bool, and return void. Assume the interpreter
15147 has suspend, init and resume methods, and that the all return
15148 void.
15149 (set_top_level_interpreter): interp_set returns void.
15150 (interp_ui_out): Adapt.
15151 (current_interp_set_logging): Adapt.
15152 (interp_data): Delete.
15153 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15154 (interp_exec): Adapt.
15155 (top_level_interpreter_data): Delete.
15156 * interps.h (interp_init_ftype, interp_resume_ftype)
15157 (interp_suspend_ftype, interp_exec_ftype)
15158 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15159 (class interp): New.
15160 (interp_new): Delete.
15161 (interp_set): Now returns void. Use bool.
15162 (interp_data, top_level_interpreter_data): Delete.
15163 * mi/mi-common.h: Include interps.h.
15164 (class mi_interp): Inherit from interp. Define a ctor. Declare
15165 init, resume, suspect, exec, interp_ui_out, set_logging and
15166 pre_command_loop methods.
15167 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15168 (mi_interpreter_init): Rename to ...
15169 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15170 bool, return void and make extern. Adjust.
15171 (mi_interpreter_resume): ... Rename to ...
15172 (mi_interp::resume): ... this. Remove the 'data' parameter,
15173 return void and make extern. Adjust.
15174 (mi_interpreter_suspend): ... Rename to ...
15175 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15176 return void and make extern. Adjust.
15177 (mi_interpreter_exec): ... Rename to ...
15178 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15179 extern. Adjust.
15180 (mi_interpreter_pre_command_loop): ... Rename to ...
15181 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15182 parameter and make extern.
15183 (mi_on_normal_stop_1): Adjust.
15184 (mi_ui_out): Rename to ...
15185 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15186 parameter and make extern. Adjust.
15187 (mi_set_logging): Rename to ...
15188 (mi_interp::set_logging): ... this. Remove the 'interp'
15189 parameter and make extern. Adjust.
15190 (mi_interp_procs): Delete.
15191 (mi_interp_factory): Adjust to use 'new'.
15192 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15193 (mi_print_exception, mi_execute_command, mi_load_progress):
15194 Adjust.
15195 * tui/tui-interp.c (tui_interp): New class.
15196 (as_tui_interp): Return a tui_interp pointer.
15197 (tui_on_normal_stop, tui_on_signal_received)
15198 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15199 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15200 to use interp::interp_ui_out.
15201 (tui_init): Rename to ...
15202 (tui_interp::init): ... this. Remove the 'self' parameter, use
15203 bool, return void and make extern. Adjust.
15204 (tui_resume): Rename to ...
15205 (tui_interp::resume): ... this. Remove the 'data' parameter,
15206 return void and make extern. Adjust.
15207 (tui_suspend): Rename to ...
15208 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15209 return void and make extern. Adjust.
15210 (tui_ui_out): Rename to ...
15211 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15212 parameter, and make extern. Adjust.
15213 (tui_exec): Rename to ...
15214 (tui_interp::exec): ... this. Remove the 'data' parameter and
15215 make extern.
15216 (tui_interp_procs): Delete.
15217 (tui_interp_factory): Use "new".
15218
65c40c95
TT
152192017-02-02 Tom Tromey <tom@tromey.com>
15220
15221 * rust-exp.y (ends_raw_string, space_then_number)
15222 (rust_identifier_start_p): Return bool.
15223 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15224 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15225 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15226 (rust_chartype_p): Return bool.
15227 (val_print_struct, rust_print_struct_def, rust_print_type):
15228 Update.
15229 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15230 Return bool.
15231
b50f188d
TT
152322017-02-02 Tom Tromey <tom@tromey.com>
15233
15234 * rust-lang.c: Reindent.
15235
03c85b11
TT
152362017-02-02 Tom Tromey <tom@tromey.com>
15237
15238 * rust-lang.h (rust_crate_for_block): Update.
15239 * rust-lang.c (rust_crate_for_block): Return std::string.
15240 (rust_get_disr_info): Use std:;string, not
15241 gdb::unique_xmalloc_ptr.
15242 * rust-exp.y (crate_name): Update.
15243
9b6da501
PA
152442017-02-02 Pedro Alves <palves@redhat.com>
15245
15246 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15247 field out of gdb_disassembler_test and make it static.
15248
ec4cb20b
PA
152492017-02-02 Pedro Alves <palves@redhat.com>
15250
15251 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15252 mi1_interp and mi_interp fields.
15253
5be5dbf0
PA
152542017-02-02 Pedro Alves <palves@redhat.com>
15255
616268b6
PA
15256 * cli/cli-interp.c (struct saved_output_files, saved_output):
15257 Moved from cli/cli-logging.c.
15258 (cli_set_logging): New function.
15259 (cli_interp_procs): Install cli_set_logging.
15260 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15261 Declare.
15262 * cli/cli-logging.c (struct saved_output_files, saved_output):
15263 Moved to cli/cli-interp.c.
15264 (pop_output_files): Don't save outputs here.
15265 (make_logging_output): New function.
15266 (handle_redirections): Don't build tee nor save previous outputs
15267 here.
15268 * interps.c (current_interp_set_logging): Change prototype.
15269 Assume there's always a set_logging_proc method installed.
15270 * interps.h (interp_set_logging_ftype): Change prototype.
15271 (current_interp_set_logging): Change prototype and adjust comment.
15272 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15273 use make_logging_output.
15274 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
152752017-02-02 Pedro Alves <palves@redhat.com>
15276
5be5dbf0
PA
15277 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15278 from ...
15279 (set_logging_overwrite): ... here.
15280 (logging_no_redirect_file): Delete.
15281 (set_logging_redirect): Don't handle redirection on the fly.
15282 Instead warn that "logging off" / "logging on" is necessary.
15283 (pop_output_files): Delete references to logging_no_redirect_file.
15284 (show_logging_command): Always speak in terms of what will happen
15285 once logging is reenabled.
15286
c99cc448
PA
152872017-02-02 Pedro Alves <palves@redhat.com>
15288
15289 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15290
8b172ce7
PA
152912017-02-02 Pedro Alves <palves@redhat.com>
15292
15293 * disasm.c (gdb_pretty_print_insn): Rename to ...
15294 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15295 Remove gdbarch parameter. Adapt to clear the object's buffers
15296 instead of allocating new buffers, and to print using the object's
15297 gdb_disassembler instead of calling gdb_print_insn.
15298 (dump_insns): Use gdb_pretty_print_disassembler.
15299 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15300 (gdb_pretty_print_disassembler): New class.
15301 * record-btrace.c (btrace_insn_history): Use
15302 gdb_pretty_print_disassembler.
15303
d7e74731
PA
153042017-02-02 Pedro Alves <palves@redhat.com>
15305
15306 * ada-lang.c (type_as_string): Use string_file.
15307 * ada-valprint.c (ada_print_floating): Use string_file.
15308 * ada-varobj.c (ada_varobj_scalar_image)
15309 (ada_varobj_get_value_image): Use string_file.
15310 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15311 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15312 * breakpoint.c (update_inserted_breakpoint_locations)
15313 (insert_breakpoint_locations, reattach_breakpoints)
15314 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15315 (print_it_watchpoint): Use string_file.
15316 (save_breakpoints): Use stdio_file.
15317 * c-exp.y (oper): Use string_file.
15318 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15319 tee_file.
15320 (pop_output_files): Use delete.
15321 (handle_redirections): Use stdio_file and tee_file.
15322 * cli/cli-setshow.c (do_show_command): Use string_file.
15323 * compile/compile-c-support.c (c_compute_program): Use
15324 string_file.
15325 * compile/compile-c-symbols.c (generate_vla_size): Take a
15326 'string_file &' instead of a 'ui_file *'.
15327 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15328 of a 'ui_file *'. Use string_file.
15329 (generate_c_for_variable_locations): Take a 'string_file &'
15330 instead of a 'ui_file *'.
15331 * compile/compile-internal.h (generate_c_for_for_one_variable):
15332 Take a 'string_file &' instead of a 'ui_file *'.
15333 * compile/compile-loc2c.c (push, pushf, unary, binary)
15334 (print_label, pushf_register_address, pushf_register)
15335 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15336 'ui_file *'. Adjust.
15337 * compile/compile.c (compile_to_object): Use string_file.
15338 * compile/compile.h (compile_dwarf_expr_to_c)
15339 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15340 'ui_file *'.
15341 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15342 (replace_typedefs_qualified_name): Use string_file and
15343 obstack_copy0.
15344 * disasm.c (gdb_pretty_print_insn): Use string_file.
15345 (gdb_disassembly): Adjust reference the null_stream global.
15346 (do_ui_file_delete): Delete.
15347 (gdb_insn_length): Use null_stream.
15348 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15349 * dwarf2loc.c (dwarf2_compile_property_to_c)
15350 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15351 'string_file &' instead of a 'ui_file *'.
15352 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15353 * dwarf2read.c (do_ui_file_peek_last): Delete.
15354 (dwarf2_compute_name): Use string_file.
15355 * event-top.c (gdb_setup_readline): Use stdio_file.
15356 * gdbarch.sh (verify_gdbarch): Use string_file.
15357 * gdbtypes.c (safe_parse_type): Use null_stream.
15358 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15359 string_file.
15360 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15361 'string_file *' instead of a 'ui_file *'.
15362 (gdbscm_arch_disassemble): Use string_file.
15363 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15364 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15365 inherits from ui_file.
15366 (ioscm_file_port_delete, ioscm_file_port_rewind)
15367 (ioscm_file_port_put): Delete.
15368 (ioscm_file_port_write): Rename to ...
15369 (ioscm_file_port::write): ... this. Remove file_port_magic
15370 checks.
15371 (ioscm_file_port_new): Delete.
15372 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15373 ui_file_up.
15374 * guile/scm-type.c (tyscm_type_name): Use string_file.
15375 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15376 Use string_file.
15377 * infcmd.c (print_return_value_1): Use string_file.
15378 * infrun.c (print_target_wait_results): Use string_file.
15379 * language.c (add_language): Use string_file.
15380 * location.c (explicit_to_string_internal): Use string_file.
15381 * main.c (captured_main_1): Use null_file.
15382 * maint.c (maintenance_print_architecture): Use stdio_file.
15383 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15384 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15385 event_channel>: Change type to mi_console_file pointer.
15386 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15387 (mi_console_file_delete): Delete.
15388 (struct mi_console_file): Delete.
15389 (mi_console_file_magic): Delete.
15390 (mi_console_file_new): Delete.
15391 (mi_console_file::mi_console_file): New.
15392 (mi_console_file_delete): Delete.
15393 (mi_console_file_fputs): Delete.
15394 (mi_console_file::write): New.
15395 (mi_console_raw_packet): Delete.
15396 (mi_console_file::flush): New.
15397 (mi_console_file_flush): Delete.
15398 (mi_console_set_raw): Rename to ...
15399 (mi_console_file::set_raw): ... this.
15400 * mi/mi-console.h (class mi_console_file): New class.
15401 (mi_console_file_new, mi_console_set_raw): Delete.
15402 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15403 (mi_set_logging): Use delete and tee_file. Adjust.
15404 * mi/mi-main.c (output_register): Use string_file.
15405 (mi_cmd_data_evaluate_expression): Use string_file.
15406 (mi_cmd_data_read_memory): Use string_file.
15407 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15408 * mi/mi-out.c (mi_ui_out::main_stream): New.
15409 (mi_ui_out::rewind): Use main_stream and
15410 string_file.
15411 (mi_ui_out::put): Use main_stream and string_file.
15412 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15413 Allocate a 'string_file' instead.
15414 (mi_out_new): Don't allocate a mem_fileopen stream here.
15415 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15416 (mi_ui_out::main_stream): Declare method.
15417 * printcmd.c (eval_command): Use string_file.
15418 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15419 * python/py-arch.c (archpy_disassemble): Use string_file.
15420 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15421 * python/py-frame.c (frapy_str): Use string_file.
15422 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15423 Use string_file.
15424 * python/py-type.c (typy_str): Use string_file.
15425 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15426 * python/py-value.c (valpy_str): Use string_file.
15427 * record-btrace.c (btrace_insn_history): Use string_file.
15428 * regcache.c (regcache_print): Use stdio_file.
15429 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15430 * remote.c (escape_buffer): Use string_file.
15431 * rust-lang.c (rust_get_disr_info): Use string_file.
15432 * serial.c (serial_open_ops_1): Use stdio_file.
15433 (do_serial_close): Use delete.
15434 * stack.c (print_frame_arg): Use string_file.
15435 (print_frame_args): Remove local mem_fileopen stream, not used.
15436 (print_frame): Use string_file.
15437 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15438 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15439 Take a 'string_file *' instead of a 'ui_file *'.
15440 * top.c (new_ui): Use stdio_file and stderr_file.
15441 (free_ui): Use delete.
15442 (execute_command_to_string): Use string_file.
15443 (quit_confirm): Use string_file.
15444 * tracepoint.c (collection_list::append_exp): Use string_file.
15445 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15446 * tui/tui-file.c: Don't include "ui-file.h".
15447 (enum streamtype, struct tui_stream): Delete.
15448 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15449 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15450 (tui_file::tui_file): New method.
15451 (tui_file_fputs): Delete.
15452 (tui_file_get_strbuf): Delete.
15453 (tui_file::puts): New method.
15454 (tui_file_adjust_strbuf): Delete.
15455 (tui_file_flush): Delete.
15456 (tui_file::flush): New method.
15457 * tui/tui-file.h: Tweak intro comment.
15458 Include ui-file.h.
15459 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15460 (tui_file_adjust_strbuf): Delete declarations.
15461 (class tui_file): New class.
15462 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15463 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15464 (tui_register_format): Use string_stream.
15465 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15466 (tui_get_function_from_frame): Use string_file.
15467 * typeprint.c (type_to_string): Use string_file.
15468 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15469 (null_stream): New global.
15470 (ui_file_delete): Delete.
15471 (ui_file::ui_file): New.
15472 (null_file_isatty): Delete.
15473 (ui_file::~ui_file): New.
15474 (null_file_rewind): Delete.
15475 (ui_file::printf): New.
15476 (null_file_put): Delete.
15477 (null_file_flush): Delete.
15478 (ui_file::putstr): New.
15479 (null_file_write): Delete.
15480 (ui_file::putstrn): New.
15481 (null_file_read): Delete.
15482 (ui_file::putc): New.
15483 (null_file_fputs): Delete.
15484 (null_file_write_async_safe): Delete.
15485 (ui_file::vprintf): New.
15486 (null_file_delete): Delete.
15487 (null_file::write): New.
15488 (null_file_fseek): Delete.
15489 (null_file::puts): New.
15490 (ui_file_data): Delete.
15491 (null_file::write_async_safe): New.
15492 (gdb_flush, ui_file_isatty): Adjust.
15493 (ui_file_put, ui_file_rewind): Delete.
15494 (ui_file_write): Adjust.
15495 (ui_file_write_for_put): Delete.
15496 (ui_file_write_async_safe, ui_file_read): Adjust.
15497 (ui_file_fseek): Delete.
15498 (fputs_unfiltered): Adjust.
15499 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15500 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15501 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15502 (set_ui_file_data): Delete.
15503 (string_file::~string_file, string_file::write)
15504 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15505 (do_ui_file_as_string, ui_file_as_string): Delete.
15506 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15507 (struct mem_file): Delete.
15508 (mem_file_new): Delete.
15509 (stdio_file::stdio_file): New.
15510 (mem_file_delete): Delete.
15511 (stdio_file::stdio_file): New.
15512 (mem_fileopen): Delete.
15513 (stdio_file::~stdio_file): New.
15514 (mem_file_rewind): Delete.
15515 (stdio_file::set_stream): New.
15516 (mem_file_put): Delete.
15517 (stdio_file::open): New.
15518 (mem_file_write): Delete.
15519 (stdio_file_magic, struct stdio_file): Delete.
15520 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15521 (stdio_file::flush): New.
15522 (stdio_file_read): Rename to ...
15523 (stdio_file::read): ... this. Adjust.
15524 (stdio_file_write): Rename to ...
15525 (stdio_file::write): ... this. Adjust.
15526 (stdio_file_write_async_safe): Rename to ...
15527 (stdio_file::write_async_safe) ... this. Adjust.
15528 (stdio_file_fputs): Rename to ...
15529 (stdio_file::puts) ... this. Adjust.
15530 (stdio_file_isatty): Delete.
15531 (stdio_file_fseek): Delete.
15532 (stdio_file::isatty): New.
15533 (stderr_file_write): Rename to ...
15534 (stderr_file::write) ... this. Adjust.
15535 (stderr_file_fputs): Rename to ...
15536 (stderr_file::puts) ... this. Adjust.
15537 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15538 (stderr_file::stderr_file): New.
15539 (tee_file_magic): Delete.
15540 (struct tee_file): Delete.
15541 (tee_file::tee_file): New.
15542 (tee_file_new): Delete.
15543 (tee_file::~tee_file): New.
15544 (tee_file_delete): Delete.
15545 (tee_file_flush): Rename to ...
15546 (tee_file::flush): ... this. Adjust.
15547 (tee_file_write): Rename to ...
15548 (tee_file::write): ... this. Adjust.
15549 (tee_file::write_async_safe): New.
15550 (tee_file_fputs): Rename to ...
15551 (tee_file::puts): ... this. Adjust.
15552 (tee_file_isatty): Rename to ...
15553 (tee_file::isatty): ... this. Adjust.
15554 * ui-file.h (struct obstack, struct ui_file): Don't
15555 forward-declare.
15556 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15557 (ui_file_write_ftype)
15558 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15559 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15560 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15561 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15562 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15563 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15564 (set_ui_file_fseek): Delete.
15565 (ui_file_data, ui_file_delete, ui_file_rewind)
15566 (struct ui_file): New.
15567 (ui_file_up): New.
15568 (class null_file): New.
15569 (null_stream): Declare.
15570 (ui_file_write_for_put, ui_file_put): Delete.
15571 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15572 Delete.
15573 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15574 (gdb_fopen, tee_file_new): Delete.
15575 (struct string_file): New.
15576 (struct stdio_file): New.
15577 (stdio_file_up): New.
15578 (struct stderr_file): New.
15579 (class tee_file): New.
15580 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15581 of a 'ui_file *'. Adjust.
15582 * ui-out.h (class ui_out) <field_stream>: Likewise.
15583 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15584 (null_stream): Delete.
15585 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15586 Adjust.
15587 * utils.h (struct ui_file): Delete forward declaration..
15588 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15589 (error_stream): Take a 'string_file &' instead of a
15590 'ui_file *'.
15591 * varobj.c (varobj_value_get_print_value): Use string_file.
15592 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15593 * gdbarch.c: Regenerate.
15594
187808b0
PA
155952017-02-02 Pedro Alves <palves@redhat.com>
15596
15597 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15598 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15599 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15600 Adjust to call gdb_print_insn instead of
15601 gdb_disassembler::print_insn.
15602 (dump_insns, do_mixed_source_and_assembly_deprecated)
15603 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15604 'gdbarch' parameter. Remove gdb_disassembler parameter.
15605 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15606 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15607 declaration.
15608 (gdb_pretty_print_insn): Re-add declaration.
15609 * record-btrace.c (btrace_insn_history): Don't allocate a
15610 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15611
7a8eb317
SM
156122017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15613
15614 * disasm.h (gdb_disassembly): Remove file_string parameter.
15615 * disasm.c (gdb_disassembly): Likewise.
15616 * cli/cli-cmds.c (print_disassembly): Adapt.
15617 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15618 * stack.c (do_gdb_disassembly): Likewise.
15619
7346ef59
AA
156202017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15621
15622 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15623 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15624 targets. And if the implicit value is longer than needed, extract
15625 the first bytes instead of the "least significant" ones.
15626
cd4007e4
MM
156272017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15628
15629 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15630 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15631 (btrace_fetch): Assert can_access_registers_ptid.
15632 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15633 validate_registers_access.
15634
cf77c34e
MM
156352017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15636
15637 * gdbthread.h (can_access_registers_ptid): New.
15638 * thread.c (can_access_registers_ptid): New.
15639
be85ce7d
PA
156402017-02-01 Pedro Alves <palves@redhat.com>
15641
15642 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15643
29b0b251
PA
156442017-01-31 Pedro Alves <palves@redhat.com>
15645
15646 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15647 Fix typos.
15648
289b5b24
PA
156492017-01-31 Pedro Alves <palves@redhat.com>
15650
15651 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15652 not used.
15653
b47413b4
PA
156542017-01-31 Pedro Alves <palves@redhat.com>
15655
15656 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15657
60adb36c
PA
156582017-01-31 Pedro Alves <palves@redhat.com>
15659
15660 * common/scoped_restore.h
15661 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15662 change the value's parameter type to T2.
15663 (make_scoped_restore): Likewise.
15664
2735833d
WT
156652017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15666 Richard Henderson <rth@redhat.com>
15667
15668 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15669 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15670 GS_BASE for older kernels.
15671 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15672 GS_BASE for older kernels.
15673 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15674 and GS_BASE to the offset table.
15675 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15676 system register group.
15677 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15678 for older kernels.
15679 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15680 amd64 ABI.
15681 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15682 AMD64_GSBASE_REGNUM.
15683 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15684 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15685 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15686 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15687 i386/64bit-segments.xml in those rules.
15688 * features/i386/64bit-segments.xml: New file.
15689 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15690 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15691 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15692 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15693 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15694 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15695 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15696 * features/i386/amd64-avx-linux.c: Regenerated.
15697 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15698 * features/i386/amd64-avx-mpx.c: Regenerated.
15699 * features/i386/amd64-avx512-linux.c: Regenerated.
15700 * features/i386/amd64-linux.c: Regenerated.
15701 * features/i386/amd64-mpx-linux.c: Regenerated.
15702 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15703 * features/i386/i386-avx-mpx.c: Regenerated.
15704 * features/i386/x32-avx-linux.c: Regenerated.
15705 * features/i386/x32-avx512-linux.c: Regenerated.
15706 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15707 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15708 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15709 * regformats/i386/amd64-linux.dat: Regenerated.
15710 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15711 * regformats/i386/x32-avx-linux.dat: Regenerated.
15712 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15713 * regformats/i386/x32-linux.dat: Regenerated.
15714
8884e97e
WT
157152017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15716
15717 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15718 Set to AMD64_NUM_REGS.
15719
7005d26a
WT
157202017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15721
15722 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15723 that checks validity of a register number.
15724
4bd2e1b2
KC
157252017-01-27 Kees Cook <keescook@google.com>
15726
15727 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15728 fetch_fpregs if target has fpa registers.
15729 (arm_linux_store_inferior_registers): Call store_fpregs if target
15730 has fpa registers.
15731
7cf1de6c
AA
157322017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15733
15734 * cris-tdep.c (cris_gdbarch_init): Remove check for
15735 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15736
874a1c8c
AT
157372017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15738
15739 * corelow.c (get_core_register_section): Check for regset
15740 existence before checking for REGSET_VARIABLE_SIZE.
15741
d8b49cf0
YQ
157422017-01-26 Yao Qi <yao.qi@linaro.org>
15743 Pedro Alves <palves@redhat.com>
15744
15745 PR gdb/20939
15746 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15747 call memory_error, save memaddr instead.
15748 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15749 negative, cal memory_error.
15750 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15751
658ca58c
YQ
157522017-01-26 Yao Qi <yao.qi@linaro.org>
15753
15754 * disasm-selftests.c (memory_error_test): New function.
15755 (_initialize_disasm_selftests): Register memory_error_test.
15756
79843d45
YQ
157572017-01-26 Yao Qi <yao.qi@linaro.org>
15758
15759 * Makefile.in (SFILES): Add disasm-selftests.c and
15760 selftest-arch.c.
15761 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15762 * disasm-selftests.c: New file.
15763 * selftest-arch.c: New file.
15764 * selftest-arch.h: New file.
15765
8cafda32
YQ
157662017-01-26 Yao Qi <yao.qi@linaro.org>
15767
15768 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15769 to bfd_arch_mep. Don't return 0 if section is not
15770 found. Call print_insn_mep.
15771
e47ad6c0
YQ
157722017-01-26 Pedro Alves <palves@redhat.com>
15773 Yao Qi <yao.qi@linaro.org>
15774
15775 * arm-tdep.c: Include "disasm.h".
15776 (gdb_print_insn_arm): Update code to get gdbarch.
15777 * disasm.c (dis_asm_read_memory): Change it to
15778 gdb_disassembler::dis_asm_read_memory.
15779 (dis_asm_memory_error): Likewise.
15780 (dis_asm_print_address): Likewise.
15781 (gdb_pretty_print_insn): Change it to
15782 gdb_disassembler::pretty_print_insn.
15783 (dump_insns): Add one argument gdb_disassemlber. All
15784 callers updated.
15785 (do_mixed_source_and_assembly_deprecated): Likewise.
15786 (do_mixed_source_and_assembly): Likewise.
15787 (do_assembly_only): Likewise.
15788 (gdb_disassembler::gdb_disassembler): New.
15789 (gdb_disassembler::print_insn): New.
15790 * disasm.h (class gdb_disassembler): New.
15791 (gdb_pretty_print_insn): Remove declaration.
15792 (gdb_disassemble_info): Likewise.
15793 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15794 (gdbscm_disasm_read_memory_worker): Update.
15795 (gdbscm_disasm_read_memory): Update.
15796 (gdbscm_disasm_memory_error): Remove.
15797 (gdbscm_disasm_print_address): Remove.
15798 (gdbscm_disassembler::gdbscm_disassembler): New.
15799 (gdbscm_print_insn_from_port): Update.
15800 * mips-tdep.c: Include disasm.h.
15801 (gdb_print_insn_mips): Update code to get gdbarch.
15802 * record-btrace.c (btrace_insn_history): Update.
15803 * spu-tdep.c: Include disasm.h.
15804 (struct spu_dis_asm_data): Remove.
15805 (struct spu_dis_asm_info): New.
15806 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15807 SPU id.
15808 (gdb_print_insn_spu): Cast disassemble_info to
15809 spu_dis_asm_info.
15810
80d75874
YQ
158112017-01-26 Yao Qi <yao.qi@linaro.org>
15812
15813 * disasm.c (do_ui_file_delete): Delete.
15814 (gdb_insn_length): Move code creating stream to ...
15815 * utils.c (null_stream): ... here. New function.
15816 * utils.h (null_stream): Declare.
15817
60685cd0
SM
158182017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15819
15820 * python/py-inferior.c (find_thread_object): Return directly
15821 from the loop. Remove "found" variable.
15822
eb1cdb62
JB
158232017-01-21 Joel Brobecker <brobecker@adacore.com>
15824
15825 GDB 7.12.1 released.
15826
b1ce6568
SM
158272017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15828
15829 * python/py-function.c (fnpy_call): Reorder declarations to have
15830 the gdbpy_enter object declared first.
15831 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15832
6f8b0407
SM
158332017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15834
fec93fb1 15835 PR python/21068
6f8b0407
SM
15836 * python/python-internal.h (PyMem_RawMalloc): Define for
15837 Python < 3.4.
15838 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15839 PyMem_RawMalloc instead of PyMem_Malloc.
15840
78cbbba8
LM
158412017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15842 Luis Machado <lgustavo@codesourcery.com>
15843
15844 * NEWS (New commands): Mention flash-erase.
15845 (New MI commands): Mention target-flash-erase.
15846 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15847 command.
15848 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15849 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15850 * target.c (flash_erase_command): New function.
15851 (initialize_targets): Add new flash-erase command.
15852 * target.h (flash_erase_command): New declaration.
15853
2132fe85
JB
158542017-01-20 Joel Brobecker <brobecker@adacore.com>
15855
15856 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15857 HAVE_SYS_PROCFS_H is defined.
15858
d1dff226
AH
158592017-01-18 Alan Hayward <alan.hayward@arm.com>
15860
15861 * remote.c (struct cached_reg): Change data into a pointer.
15862 * (stop_reply_dtr): Free data pointers before deleting vector.
15863 (process_stop_reply): Likewise.
15864 (remote_parse_stop_reply): Allocate space for data
15865
9890e433
AH
158662017-01-18 Alan Hayward <alan.hayward@arm.com>
15867
15868 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15869 MAX_REGISTER_SIZE.
15870 (amd64_pseudo_register_read_value): Likewise.
15871 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15872 (store_register_using_P): Likewise.
15873 * regcache.c (regcache_xfer_part): Likewise.
15874
7a36499a
IR
158752017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15876
15877 Split real and pseudo registers.
15878 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15879 (sparc32_pseudo_regnum): New enum.
15880 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15881 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15882 (SPARC32_CP0_REGISTERS): New macro.
15883 (sparc32_pseudo_register_name): New function.
15884 (sparc32_register_name): Use sparc32_pseudo_register_name.
15885 (sparc32_pseudo_register_type): New function.
15886 (sparc32_register_type): Use sparc32_pseudo_register_type.
15887 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15888 pseudo register numbers.
15889 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15890 (SPARC64_CP0_REGISTERS): New macro.
15891 (sparc64_pseudo_register_name): New function.
15892 (sparc64_register_name): Use sparc64_pseudo_register_name.
15893 (sparc64_pseudo_register_type): New function.
15894 (sparc64_register_type): Use sparc64_pseudo_register_type.
15895 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15896 pseudo register numbers.
15897 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15898 sparc64_store_arguments): Handle pseudo register numbers.
15899
6f8976bf
YQ
159002017-01-13 Yao Qi <yao.qi@linaro.org>
15901
15902 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15903 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15904 output.
15905 (getpkt_or_notif_sane_1): Likewise.
15906
e4241ace
YQ
159072017-01-13 Yao Qi <yao.qi@linaro.org>
15908
15909 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15910 of CC. Pass "-x c++-header" instead of "-x c".
15911
3015c064
SM
159122017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15913
15914 * remote.c (remote_can_async_p): Update comment.
15915
fde1b17d
SM
159162017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15917
15918 * linux-nat.c (linux_nat_can_async_p): Update comment.
15919
ca1ca08b
SM
159202017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15921
15922 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15923
4ad2da73
SM
159242017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15925
15926 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15927
c8b23b3f
TT
159282017-01-10 Tom Tromey <tom@tromey.com>
15929
15930 * python/py-type.c (typy_legacy_template_argument): Update.
15931 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15932 ~demangle_parse_info): Declare new members.
15933 (cp_demangled_name_to_comp): Return unique_ptr.
15934 (cp_demangled_name_parse_free)
15935 (make_cleanup_cp_demangled_name_parse_free)
15936 (cp_new_demangle_parse_info): Remove.
15937 * cp-support.c (do_demangled_name_parse_free_cleanup)
15938 (make_cleanup_cp_demangled_name_parse_free): Remove.
15939 (inspect_type, cp_canonicalize_string_full)
15940 (cp_canonicalize_string): Update.
15941 (mangled_name_to_comp): Change return type.
15942 (cp_class_name_from_physname, method_name_from_physname)
15943 (cp_func_name, cp_remove_params): Update.
15944 * cp-name-parser.y (demangle_parse_info): New constructor, from
15945 cp_new_demangle_parse_info.
15946 (~demangle_parse_info): New destructor, from
15947 cp_demangled_name_parse_free.
15948 (cp_merge_demangle_parse_infos): Update.
15949 (cp_demangled_name_to_comp): Change return type.
15950
1ac32117
TT
159512017-01-10 Tom Tromey <tom@tromey.com>
15952
15953 * top.c (prevent_dont_repeat): Change return type.
15954 * python/python.c (execute_gdb_command): Use std::string.
15955 Update.
15956 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15957 * command.h (prevent_dont_repeat): Change return type.
15958 * breakpoint.c (bpstat_do_actions_1): Update.
15959
0cf08227
TT
159602017-01-10 Tom Tromey <tom@tromey.com>
15961
15962 * value.h (scoped_value_mark::~scoped_value_mark): Call
15963 free_to_mark.
15964 (scoped_value_mark::free_to_mark): New method.
15965 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15966 scoped_value_mark.
15967
eb115069
TT
159682017-01-10 Tom Tromey <tom@tromey.com>
15969
15970 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15971 (valpy_reference_value, valpy_const_value, valpy_get_address)
15972 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15973 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15974 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15975 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15976 scoped_value_mark.
15977 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15978 * value.h (scoped_value_mark): New class.
15979
906768f9
TT
159802017-01-10 Tom Tromey <tom@tromey.com>
15981
15982 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15983 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15984 * psymtab.c (discard_psymtabs_upto): Remove.
15985 (make_cleanup_discard_psymtabs): Remove.
15986 (struct psymtab_state): Remove.
15987
bef155c3
TT
159882017-01-10 Tom Tromey <tom@tromey.com>
15989
15990 * record-full.c (record_full_save_cleanups): Remove.
15991 (record_full_save): Use gdb::unlinker.
15992 * gcore.c (do_bfd_delete_cleanup): Remove.
15993 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15994 cleanups.
15995 * dwarf2read.c (unlink_if_set): Remove.
15996 (write_psymtabs_to_index): Use gdb::unlinker.
15997 * common/gdb_unlinker.h: New file.
15998
192b62ce
TT
159992017-01-10 Tom Tromey <tom@tromey.com>
16000
16001 * windows-tdep.c (windows_xfer_shared_library): Update.
16002 * windows-nat.c (windows_make_so): Update.
16003 * utils.h (make_cleanup_bfd_unref): Remove.
16004 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16005 * symfile.h (symfile_bfd_open)
16006 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16007 * symfile.c (read_symbols, symbol_file_add)
16008 (separate_debug_file_exists): Update.
16009 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16010 (generic_load, reread_symbols): Update.
16011 * symfile-mem.c (symbol_file_add_from_memory): Update.
16012 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16013 (spu_symbol_file_add_from_memory): Update.
16014 * solist.h (struct target_so_ops) <bfd_open>: Return
16015 gdb_bfd_ref_ptr.
16016 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16017 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16018 gdb_bfd_ref_ptr.
16019 (solib_map_sections, reload_shared_libraries_1): Update.
16020 * solib-svr4.c (enable_break): Update.
16021 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16022 * solib-frv.c (enable_break2): Update.
16023 * solib-dsbt.c (enable_break): Update.
16024 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16025 gdb_bfd_ref_ptr.
16026 (darwin_solib_get_all_image_info_addr_at_init): Update.
16027 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16028 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16029 * record-full.c (record_full_save): Update.
16030 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16031 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16032 * minidebug.c (find_separate_debug_file_in_section): Return
16033 gdb_bfd_ref_ptr.
16034 * machoread.c (macho_add_oso_symfile): Change abfd to
16035 gdb_bfd_ref_ptr.
16036 (macho_symfile_read_all_oso): Update.
16037 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16038 (macho_symfile_read): Update.
16039 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16040 (jit_bfd_try_read_symtab): Update.
16041 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16042 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16043 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16044 gdb_bfd_ref_ptr.
16045 (gdb_bfd_ref_policy): New struct.
16046 (gdb_bfd_ref_ptr): New typedef.
16047 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16048 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16049 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16050 gdb_bfd_ref_ptr.
16051 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16052 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16053 (gcore_command): Update.
16054 * exec.c (exec_file_attach): Update.
16055 * elfread.c (elf_symfile_read): Update.
16056 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16057 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16058 (open_and_init_dwo_file): Update.
16059 (open_dwp_file): Return gdb_bfd_ref_ptr.
16060 (open_and_init_dwp_file): Update.
16061 * corelow.c (core_open): Update.
16062 * compile/compile-object-load.c (compile_object_load): Update.
16063 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16064 * coffread.c (coff_symfile_read): Update.
16065 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16066 gdb_bfd_ref_ptr. Rename.
16067 (dump_bfd_file, restore_command): Update.
16068 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16069 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16070 (find_separate_debug_file_by_buildid): Update.
16071
50315b21
TT
160722017-01-10 Tom Tromey <tom@tromey.com>
16073
16074 * common/gdb_ref_ptr.h: New file.
16075 * python/py-ref.h (struct gdbpy_ref_policy): New.
16076 (gdbpy_ref): Now a typedef.
16077
fc4007c9
TT
160782017-01-10 Tom Tromey <tom@tromey.com>
16079
16080 * utils.h (make_cleanup_htab_delete): Don't declare.
16081 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16082 Remove.
16083 * linespec.c (decode_compound_collector): Add constructor,
16084 destructor.
16085 (lookup_prefix_sym): Remove cleanup.
16086 (symtab_collector): Add constructor, destructor.
16087 (collect_symtabs_from_filename): Remove cleanup.
16088 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16089 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16090 Use htab_up.
16091 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16092 * dwarf2read.c (dw2_expand_symtabs_matching)
16093 (dw2_map_symbol_filenames, dwarf_decode_macros)
16094 (write_psymtabs_to_index): Use htab_up.
16095 * dwarf2loc.c (func_verify_no_selftailcall)
16096 (call_site_find_chain_1, func_verify_no_selftailcall)
16097 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16098 std::vector, gdb::unique_xmalloc_ptr.
16099 (call_sitep): Remove typedef.
16100 (dwarf2_locexpr_baton_eval): Remove unused variable.
16101
8dbcee67
TT
161022017-01-10 Tom Tromey <tom@tromey.com>
16103
16104 * python/python-internal.h (make_cleanup_py_decref)
16105 (make_cleanup_py_xdecref): Don't declare.
16106 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16107 (py_xdecref, make_cleanup_py_xdecref): Remove.
16108
13df46cc
TT
161092017-01-10 Tom Tromey <tom@tromey.com>
16110
16111 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16112 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16113
06fc9bf7
TT
161142017-01-10 Tom Tromey <tom@tromey.com>
16115
16116 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16117
830a4934
TT
161182017-01-10 Tom Tromey <tom@tromey.com>
16119
16120 * python/py-utils.c (unicode_to_encoded_string)
16121 (python_string_to_target_string)
16122 (python_string_to_target_python_string)
16123 (python_string_to_host_string, gdbpy_obj_to_string)
16124 (get_addr_from_python): Use gdbpy_ref.
16125
4586d543
TT
161262017-01-10 Tom Tromey <tom@tromey.com>
16127
16128 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16129 gdbpy_ref.
16130
59876f8f
TT
161312017-01-10 Tom Tromey <tom@tromey.com>
16132
16133 * python/python.c (eval_python_command, gdbpy_decode_line)
16134 (gdbpy_run_events, gdbpy_start_type_printers)
16135 (gdbpy_apply_type_printers): Use gdbpy_ref.
16136
97d83487
TT
161372017-01-10 Tom Tromey <tom@tromey.com>
16138
16139 * python/py-param.c (get_doc_string, compute_enum_values): Use
16140 gdbpy_ref.
16141
9205649a
TT
161422017-01-10 Tom Tromey <tom@tromey.com>
16143
16144 * python/py-inferior.c (find_thread_object, build_inferior_list):
16145 Use gdbpy_ref.
16146
74c49d45
TT
161472017-01-10 Tom Tromey <tom@tromey.com>
16148
16149 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16150
16361ffb
TT
161512017-01-10 Tom Tromey <tom@tromey.com>
16152
16153 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16154 gdbpy_ref.
16155
905f2cca
TT
161562017-01-10 Tom Tromey <tom@tromey.com>
16157
16158 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16159 extra incref.
16160 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16161 Use gdbpy_ref.
16162
64081434
TT
161632017-01-10 Tom Tromey <tom@tromey.com>
16164
16165 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16166 gdbpy_ref.
16167
59e9e831
TT
161682017-01-10 Tom Tromey <tom@tromey.com>
16169
16170 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16171 decref results of PyArg_ParseTupleAndKeywords.
16172
9de10f6d
TT
161732017-01-10 Tom Tromey <tom@tromey.com>
16174
16175 * python/python.c (python_run_simple_file): Use
16176 unique_xmalloc_ptr, gdbpy_ref.
16177
2bd5759d
TT
161782017-01-10 Tom Tromey <tom@tromey.com>
16179
16180 * python/py-prettyprint.c (print_stack_unless_memory_error)
16181 (print_string_repr, print_children): Use gdbpy_ref.
16182 (dummy_python_frame): New class.
16183 (dummy_python_frame::dummy_python_frame): Rename from
16184 push_dummy_python_frame.
16185 (py_restore_tstate): Remove.
16186
3b4e0e01
TT
161872017-01-10 Tom Tromey <tom@tromey.com>
16188
16189 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16190
17a22718
TT
161912017-01-10 Tom Tromey <tom@tromey.com>
16192
16193 * python/python.c (ensure_python_env, restore_python_env):
16194 Remove.
16195 * python/python-internal.h (ensure_python_env): Don't declare.
16196 * varobj.h (varobj_ensure_python_env): Don't declare.
16197 * varobj.c (varobj_ensure_python_env): Remove.
16198
68cdc557
TT
161992017-01-10 Tom Tromey <tom@tromey.com>
16200
16201 * varobj.c (varobj_value_get_print_value): Use
16202 gdbpy_enter_varobj.
16203
1eba6383
TT
162042017-01-10 Tom Tromey <tom@tromey.com>
16205
16206 * python/py-prettyprint.c (print_string_repr, print_children):
16207 Update.
16208 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16209 of "encoding".
16210 * varobj.c (varobj_value_get_print_value): Update.
16211 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16212
bde7b3e3
TT
162132017-01-10 Tom Tromey <tom@tromey.com>
16214
16215 * varobj.c (varobj_get_display_hint)
16216 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16217 (varobj_set_visualizer, free_variable): Use
16218 gdbpy_enter_varobj.
16219
a7785f8c
TT
162202017-01-10 Tom Tromey <tom@tromey.com>
16221
16222 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16223 (do_finish_initialization): New function. Use gdbpy_ref.
16224 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16225 do_finish_initialization.
16226
2865bfce
TT
162272017-01-10 Tom Tromey <tom@tromey.com>
16228
16229 * python/py-param.c (get_set_value, get_show_value): Use
16230 gdbpy_enter, gdbpy_ref.
16231
0e9dcc75
TT
162322017-01-10 Tom Tromey <tom@tromey.com>
16233
16234 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16235
12a5cedd
TT
162362017-01-10 Tom Tromey <tom@tromey.com>
16237
16238 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16239
788f2586
TT
162402017-01-10 Tom Tromey <tom@tromey.com>
16241
16242 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16243 Use gdbpy_enter_varobj.
16244
6cd67bea
TT
162452017-01-10 Tom Tromey <tom@tromey.com>
16246
16247 * varobj.c (gdbpy_enter_varobj): New constructor.
16248 * python/python-internal.h (gdbpy_enter_varobj): New class.
16249 * python/py-varobj.c (py_varobj_get_iterator): Use
16250 gdbpy_enter_varobj.
16251
14b122bf
TT
162522017-01-10 Tom Tromey <tom@tromey.com>
16253
16254 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16255 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16256 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16257 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16258 unique_xmalloc_ptr.
16259 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16260
bf1ca3b9
TT
162612017-01-10 Tom Tromey <tom@tromey.com>
16262
16263 * python/py-xmethods.c (invoke_match_method): Use
16264 gdbpy_ref.
16265
572a5524
TT
162662017-01-10 Tom Tromey <tom@tromey.com>
16267
16268 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16269 gdbpy_enter, gdbpy_ref.
16270
396a78b6
TT
162712017-01-10 Tom Tromey <tom@tromey.com>
16272
16273 * python/python.c (python_interactive_command): Use gdbpy_enter.
16274
a88b13c7
TT
162752017-01-10 Tom Tromey <tom@tromey.com>
16276
16277 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16278 gdbpy_ref.
16279
e9f0c363
TT
162802017-01-10 Tom Tromey <tom@tromey.com>
16281
16282 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16283 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16284
6349f452
TT
162852017-01-10 Tom Tromey <tom@tromey.com>
16286
16287 * utils.h (htab_deleter): New struct.
16288 (htab_up): New typedef.
16289 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16290 gdbpy_enter, gdbpy_ref, htab_up.
16291
c0171de6
TT
162922017-01-10 Tom Tromey <tom@tromey.com>
16293
16294 * python/py-unwind.c (pending_frame_invalidate): Remove.
16295 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16296
f18e226f
TT
162972017-01-10 Tom Tromey <tom@tromey.com>
16298
16299 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16300 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16301
c57af3f1
TT
163022017-01-10 Tom Tromey <tom@tromey.com>
16303
16304 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16305
60e600ec
TT
163062017-01-10 Tom Tromey <tom@tromey.com>
16307
16308 * python/python.c (gdbpy_eval_from_control_command)
16309 (gdbpy_source_script, gdbpy_run_events)
16310 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16311 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16312 gdbpy_enter.
16313
bf7da5b0
TT
163142017-01-10 Tom Tromey <tom@tromey.com>
16315
16316 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16317
2d38bced
TT
163182017-01-10 Tom Tromey <tom@tromey.com>
16319
16320 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16321
07bc7329
TT
163222017-01-10 Tom Tromey <tom@tromey.com>
16323
16324 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16325 (python_on_inferior_call_pre, python_on_inferior_call_post)
16326 (python_on_memory_change, python_on_register_change)
16327 (python_inferior_exit, python_new_objfile, add_thread_object)
16328 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16329
6e7c365e
TT
163302017-01-10 Tom Tromey <tom@tromey.com>
16331
16332 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16333 (bpfinishpy_handle_exit): Use gdbpy_enter.
16334
6ba0cd40
TT
163352017-01-10 Tom Tromey <tom@tromey.com>
16336
16337 * python/py-cmd.c (cmdpy_destroyer)
16338 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16339 gdbpy_enter.
16340
de2dc875
TT
163412017-01-10 Tom Tromey <tom@tromey.com>
16342
16343 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16344 gdbpy_enter.
16345 (gdbpy_breakpoint_has_cond): Likewise.
16346
4ecee2c4
TT
163472017-01-10 Tom Tromey <tom@tromey.com>
16348
16349 * python/python.c (gdbpy_enter): New constructor.
16350 (~gdbpy_enter): New destructor.
16351 (restore_python_env, ensure_python_env): Rewrite.
16352 * python/python-internal.h (gdbpy_enter): New class.
16353
37fce74f
TT
163542017-01-10 Tom Tromey <tom@tromey.com>
16355
16356 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16357
53a0cca3
TT
163582017-01-10 Tom Tromey <tom@tromey.com>
16359
16360 * python/py-value.c (value_has_field, get_field_flag)
16361 (get_field_type, valpy_getitem, convert_value_from_python): Use
16362 gdbpy_ref.
16363
ff3724f5
TT
163642017-01-10 Tom Tromey <tom@tromey.com>
16365
16366 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16367 gdbpy_ref.
16368
0700aea5
TT
163692017-01-10 Tom Tromey <tom@tromey.com>
16370
16371 * python/py-prettyprint.c (search_pp_list)
16372 (find_pretty_printer_from_objfiles)
16373 (find_pretty_printer_from_progspace)
16374 (find_pretty_printer_from_gdb, find_pretty_printer)
16375 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16376 gdbpy_ref.
16377
1bb44c9f
TT
163782017-01-10 Tom Tromey <tom@tromey.com>
16379
16380 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16381
87ce03fd
TT
163822017-01-10 Tom Tromey <tom@tromey.com>
16383
16384 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16385 (ltpy_get_all_source_lines): Use gdbpy_ref.
16386
ee0a3fb8
TT
163872017-01-10 Tom Tromey <tom@tromey.com>
16388
16389 * python/py-framefilter.c (extract_sym, extract_value)
16390 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16391 gdbpy_ref.
16392
bf2a52fa
TT
163932017-01-10 Tom Tromey <tom@tromey.com>
16394
16395 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16396
f59fe7f8
TT
163972017-01-10 Tom Tromey <tom@tromey.com>
16398
16399 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16400
80bd970a
TT
164012017-01-10 Tom Tromey <tom@tromey.com>
16402
16403 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16404 gdbpy_ref.
16405
d1b3de2e
TT
164062017-01-10 Tom Tromey <tom@tromey.com>
16407
16408 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16409
3bb43384
TT
164102017-01-10 Tom Tromey <tom@tromey.com>
16411
16412 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16413 (typy_range): Use gdbpy_ref.
16414
abf5651e
TT
164152017-01-10 Tom Tromey <tom@tromey.com>
16416
16417 * python/py-threadevent.c (create_thread_event_object): Use
16418 gdbpy_ref.
16419 * python/py-stopevent.c (create_stop_event_object): Simplify.
16420 (emit_stop_event): Use gdbpy_ref.
16421 * python/py-signalevent.c (create_signal_event_object): Use
16422 gdbpy_ref.
16423 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16424 (emit_new_objfile_event, create_clear_objfiles_event_object)
16425 (emit_clear_objfiles_event): Use gdbpy_ref.
16426 * python/py-infevents.c (create_inferior_call_event_object)
16427 (create_register_changed_event_object)
16428 (create_memory_changed_event_object, emit_inferior_call_event)
16429 (emit_memory_changed_event, emit_register_changed_event): Use
16430 gdbpy_ref.
16431 * python/py-exitedevent.c (create_exited_event_object)
16432 (emit_exited_event): Use gdbpy_ref.
16433 * python/py-event.h (evpy_emit_event): Remove
16434 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16435 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16436 * python/py-continueevent.c (emit_continue_event): Use
16437 gdbpy_ref.
16438 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16439 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16440 gdbpy_ref.
16441 * python/py-bpevent.c (create_breakpoint_event_object): Use
16442 gdbpy_ref.
16443
a68ff33e
TT
164442017-01-10 Tom Tromey <tom@tromey.com>
16445
16446 * python/py-ref.h: New file.
16447
7becfd03
SM
164482017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16449
16450 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16451 void.
16452 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16453 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16454 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16455 * ui-out.c (ui_out::redirect): Likewise.
16456 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16457 * cli/cli-logging.c (set_logging_redirect): Update call site of
16458 ui_out::redirect.
16459 (handle_redirections): Likewise.
16460 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16461 * top.c (execute_command_to_string): Likewise.
16462 * utils.c (do_ui_out_redirect_pop): Likewise.
16463
df294654
SM
164642017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16465
16466 * stack.c (_initialize_stack): Update "frame" command help message.
16467
f5e6296e
IB
164682017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16469
16470 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16471
0e2d6fa6
YQ
164722017-01-06 Yao Qi <yao.qi@linaro.org>
16473
16474 * x86-linux-nat.h: Include gdb_proc_service.h.
16475
44d6d3f9
YQ
164762017-01-06 Yao Qi <yao.qi@linaro.org>
16477
16478 * ser-base.h: Include serial.h.
16479
656731fe
YQ
164802017-01-06 Yao Qi <yao.qi@linaro.org>
16481
16482 * ppc-linux-tdep.h: Include ppc-tdep.h.
16483
1ca8f924
YQ
164842017-01-06 Yao Qi <yao.qi@linaro.org>
16485
16486 * nat/amd64-linux-siginfo.h: Include signal.h.
16487
bc3008c4
YQ
164882017-01-06 Yao Qi <yao.qi@linaro.org>
16489
16490 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16491
66c80d03
YQ
164922017-01-06 Yao Qi <yao.qi@linaro.org>
16493
16494 * mi/mi-parse.h: Include mi-cmds.h.
16495
051d2dda
YQ
164962017-01-06 Yao Qi <yao.qi@linaro.org>
16497
16498 * inf-loop.c: Don't include "target.h".
16499 * inf-loop.h: Include it here.
16500
8018d34f
YQ
165012017-01-06 Yao Qi <yao.qi@linaro.org>
16502
16503 * dfp.h: Include "dboulest.h" and "expression.h".
16504
c0b8369c
YQ
165052017-01-06 Yao Qi <yao.qi@linaro.org>
16506
16507 * ax-gdb.h: Include "ax.h".
16508
ad5cba2a
YQ
165092017-01-06 Yao Qi <yao.qi@linaro.org>
16510
16511 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16512 with nat/gdb_ptrace.h.
16513
1c33cd7f
YQ
165142017-01-05 Yao Qi <yao.qi@linaro.org>
16515
16516 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16517 new line.
16518 (mips64_fbsd_sigframe_init): Likewise.
16519
c988ac1d
JB
165202017-01-04 John Baldwin <jhb@FreeBSD.org>
16521
16522 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16523 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16524
b268007c
JB
165252017-01-04 John Baldwin <jhb@FreeBSD.org>
16526
16527 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16528 * NEWS: Mention new FreeBSD/mips native configuration.
16529 * config/mips/fbsd.mh: New file.
16530 * configure.host: Add mips*-*-freebsd*.
16531 * mips-fbsd-nat.c: New file.
16532
387360da
JB
165332017-01-04 John Baldwin <jhb@FreeBSD.org>
16534
16535 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16536 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16537 * NEWS: Mention new FreeBSD/mips target.
16538 * configure.tgt: Add mips*-*-freebsd*.
16539 * mips-fbsd-tdep.c: New file.
16540 * mips-fbsd-tdep.h: New file.
16541
2aaaf250
YQ
165422017-01-04 Yao Qi <yao.qi@linaro.org>
16543
16544 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16545 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16546
61baf725
JB
165472017-01-01 Joel Brobecker <brobecker@adacore.com>
16548
6dbb839a 16549 Update copyright year range in all GDB files.
61baf725 16550
c113e7ff 165512017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16552
c113e7ff 16553 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16554
c113e7ff 16555For older changes see ChangeLog-2016.
c906108c
SS
16556\f
16557Local Variables:
16558mode: change-log
16559left-margin: 8
16560fill-column: 74
16561version-control: never
57da7796 16562coding: utf-8
c906108c 16563End:
This page took 2.708739 seconds and 4 git commands to generate.