Add xml selftests for aarch64 target description.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
6654d750
AH
12017-11-24 Alan Hayward <alan.hayward@arm.com>
2
3 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
4 selftest.
5
49bdb7ee
AH
62017-11-24 Alan Hayward <alan.hayward@arm.com>
7
8 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
9 * arch/aarch64.c (aarch64_create_target_description): Create
10 new target description.
11 * features/Makefile: Add new files.
12 * features/aarch64.c: Remove file.
13 * features/aarch64-core.c: New autogenerated file.
14 * features/aarch64-fpu.c: New autogenerated file.
15 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
16
172017-11-24 Alan Hayward <alan.hayward@arm.com>
18
19 * Makefile.in: Add new files.
20 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
21 aarch64_read_description.
22 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
23 Call aarch64_read_description.
24 * aarch64-tdep.c (aarch64_read_description): New function.
25 (aarch64_gdbarch_init): Call aarch64_read_description.
26 * aarch64-tdep.h (aarch64_read_description): New function.
27 * arch/aarch64.c: New file.
28 * configure.tgt: Add new files.
29
98ead37e
YQ
302017-11-24 Yao Qi <yao.qi@linaro.org>
31
32 * mi/mi-main.c (register_changed_p): Update.
33 * value.c (value_contents_bits_eq): Change return type.
34 (value_contents_eq): Likewise.
35 * value.h: Update comments.
36
62ad7ce7
YQ
372017-11-24 Yao Qi <yao.qi@linaro.org>
38
39 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
40 local 'changed'. Remove error.
41 (register_changed_p): Change return type to bool.
42
506fe5f4
YQ
432017-11-24 Yao Qi <yao.qi@linaro.org>
44
45 * arch/tic6x.c: New file.
46 * arch/tic6x.h: New file.
47 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
48 tic6x-core.xml and tic6x-gp.xml.
49 * features/tic6x-c6xp.c: Generated.
50 * features/tic6x-core.c: Generated.
51 * features/tic6x-gp.c: Generated.
52 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
53 "tic6x-".
54
00ea2e2a
SM
552017-11-23 Simon Marchi <simon.marchi@ericsson.com>
56
57 * mi/mi-main.c (list_available_thread_groups): Change map value
58 type to std::vector.
59
f45e2a77
SM
602017-11-23 Simon Marchi <simon.marchi@ericsson.com>
61
62 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
63
bd046f64
SM
642017-11-23 Simon Marchi <simon.marchi@ericsson.com>
65
66 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
67 back to...
68 <children_requested>: ... this.
69 (varobj_get_num_children, varobj_update): Adjust.
70
4c37490d
SM
712017-11-23 Simon Marchi <simon.marchi@ericsson.com>
72
73 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
74 (ada_value_has_mutated): Likewise.
75 * c-varobj.c (varobj_is_anonymous_child): Likewise.
76 (c_is_path_expr_parent): Likewise.
77 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
78 (mi_cmd_var_set_frozen): Likewise.
79 (mi_cmd_var_update_iter): Likewise.
80 (mi_cmd_var_update): Likewise.
81 * varobj.c (pretty_printing): Likewise.
82 (varobj_enable_pretty_printing): Likewise.
83 (struct varobj_root) <floating, is_valid>: Likewise.
84 (struct varobj_dynamic) <children_requested>: Likewise.
85 (delete_variable): Likewise.
86 (delete_variable_1): Likewise.
87 (install_variable): Likewise.
88 (update_type_if_necessary): Likewise.
89 (install_new_value): Likewise.
90 (value_of_root): Likewise.
91 (is_root_p): Likewise.
92 (varobj_create): Likewise.
93 (varobj_delete): Likewise.
94 (varobj_has_more): Likewise.
95 (varobj_set_frozen): Likewise.
96 (varobj_get_frozen): Likewise.
97 (install_dynamic_child): Likewise.
98 (dynamic_varobj_has_child_method): Likewise.
99 (update_dynamic_varobj_children): Likewise.
100 (varobj_get_num_children): Likewise.
101 (varobj_list_children): Likewise.
102 (is_path_expr_parent): Likewise.
103 (varobj_default_is_path_expr_parent): Likewise.
104 (varobj_is_dynamic_p): Likewise.
105 (varobj_set_value): Likewise.
106 (varobj_value_has_mutated): Likewise.
107 (varobj_update): Likewise.
108 (check_scope): Likewise.
109 (value_of_root_1): Likewise.
110 (varobj_value_get_print_value): Likewise.
111 (varobj_editable_p): Likewise.
112 (varobj_value_is_changeable_p): Likewise.
113 (varobj_floating_p): Likewise.
114 (varobj_default_value_is_changeable_p): Likewise.
115 (varobj_invalidate_iter): Likewise.
116 * varobj.h (struct varobj_update_result) <type_changed,
117 children_changed, changed, value_installed>: Likewise.
118 (struct varobj) <updated, frozen, not_fetched>: Likewise.
119 (struct lang_varobj_ops) <value_is_changeable_p,
120 value_has_mutated, is_path_expr_parent>: Likewise.
121 (varobj_delete): Likewise.
122 (varobj_set_frozen): Likewise.
123 (varobj_get_frozen): Likewise.
124 (varobj_set_value): Likewise.
125 (varobj_update): Likewise.
126 (varobj_editable_p): Likewise.
127 (varobj_floating_p): Likewise.
128 (varobj_has_more): Likewise.
129 (varobj_is_dynamic_p): Likewise.
130 (varobj_default_value_is_changeable_p): Likewise.
131 (varobj_value_is_changeable_p): Likewise.
132 (varobj_is_anonymous_child): Likewise.
133 (varobj_default_is_path_expr_parent): Likewise.
134
9c23b42f
SDJ
1352017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
136
137 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
138 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
139 <type_str>: Convert to 'std::string'.
140 <expr>: Convert to 'expression_up'.
141 (dtrace_probe_arg_s): Delete type and VEC.
142 (dtrace_probe_enabler_s): Likewise.
143 (struct dtrace_probe): Replace by...
144 (class dtrace_static_probe_ops): ...this and...
145 (class dtrace_probe): ...this.
146 (dtrace_probe_is_linespec): Rename to...
147 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
148 to reflect change.
149 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
150 Adjust code. Create new instance of 'dtrace_probe'.
151 (dtrace_build_arg_exprs): Rename to...
152 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
153 reflect change.
154 (dtrace_get_probes): Rename to...
155 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
156 to reflect change.
157 (dtrace_get_arg): Rename to...
158 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
159 reflect change.
160 (dtrace_probe_is_enabled): Rename to...
161 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
162 change.
163 (dtrace_get_probe_address): Rename to...
164 (dtrace_probe::get_relocated_address): ...this. Adjust code
165 to reflect change.
166 (dtrace_get_probe_argument_count): Rename to...
167 (dtrace_probe::get_argument_count): ...this. Adjust code to
168 reflect change.
169 (dtrace_can_evaluate_probe_arguments): Rename to...
170 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
171 to reflect change.
172 (dtrace_evaluate_probe_argument): Rename to...
173 (dtrace_probe::evaluate_argument): ...this. Adjust code to
174 reflect change.
175 (dtrace_compile_to_ax): Rename to...
176 (dtrace_probe::compile_to_ax): ...this. Adjust code to
177 reflect change.
178 (dtrace_probe_destroy): Delete.
179 (dtrace_type_name): Rename to...
180 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
181 reflect change.
182 (dtrace_probe::get_static_ops): New method.
183 (dtrace_gen_info_probes_table_header): Rename to...
184 (dtrace_static_probe_ops::gen_info_probes_table_header):
185 ...this. Adjust code to reflect change.
186 (dtrace_gen_info_probes_table_values): Rename to...
187 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
188 code to reflect change.
189 (dtrace_enable_probe): Rename to...
190 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
191 change.
192 (dtrace_disable_probe): Rename to...
193 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
194 change.
195 (struct probe_ops dtrace_probe_ops): Delete.
196 (info_probes_dtrace_command): Call 'info_probes_for_spops'
197 instead of 'info_probes_for_ops'.
198 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
199 of 'all_probe_ops'.
200
0e9ae10f
SDJ
2012017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
202 Simon Marchi <simark@simark.ca>
203
204 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
205 variable.
206 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
207 <aexpr>: Change type to 'expression_up'.
208 (stap_probe_arg_s): Delete type and VEC.
209 (struct stap_probe): Delete. Replace by...
210 (class stap_static_probe_ops): ...this and...
211 (class stap_probe): ...this. Rename variables to add 'm_'
212 prefix. Do not use 'union' for arguments anymore.
213 (stap_get_expected_argument_type): Receive probe name instead
214 of 'struct stap_probe'. Adjust code.
215 (stap_parse_probe_arguments): Rename to...
216 (stap_probe::parse_arguments): ...this. Adjust code to
217 reflect change.
218 (stap_get_probe_address): Rename to...
219 (stap_probe::get_relocated_address): ...this. Adjust code
220 to reflect change.
221 (stap_get_probe_argument_count): Rename to...
222 (stap_probe::get_argument_count): ...this. Adjust code
223 to reflect change.
224 (stap_get_arg): Rename to...
225 (stap_probe::get_arg_by_number'): ...this. Adjust code to
226 reflect change.
227 (can_evaluate_probe_arguments): Rename to...
228 (stap_probe::can_evaluate_arguments): ...this. Adjust code
229 to reflect change.
230 (stap_evaluate_probe_argument): Rename to...
231 (stap_probe::evaluate_argument): ...this. Adjust code
232 to reflect change.
233 (stap_compile_to_ax): Rename to...
234 (stap_probe::compile_to_ax): ...this. Adjust code to
235 reflect change.
236 (stap_probe_destroy): Delete.
237 (stap_modify_semaphore): Adjust comment.
238 (stap_set_semaphore): Rename to...
239 (stap_probe::set_semaphore): ...this. Adjust code to reflect
240 change.
241 (stap_clear_semaphore): Rename to...
242 (stap_probe::clear_semaphore): ...this. Adjust code to
243 reflect change.
244 (stap_probe::get_static_ops): New method.
245 (handle_stap_probe): Adjust code to create instance of
246 'stap_probe'.
247 (stap_get_probes): Rename to...
248 (stap_static_probe_ops::get_probes): ...this. Adjust code to
249 reflect change.
250 (stap_probe_is_linespec): Rename to...
251 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
252 reflect change.
253 (stap_type_name): Rename to...
254 (stap_static_probe_ops::type_name): ...this. Adjust code to
255 reflect change.
256 (stap_gen_info_probes_table_header): Rename to...
257 (stap_static_probe_ops::gen_info_probes_table_header):
258 ...this. Adjust code to reflect change.
259 (stap_gen_info_probes_table_values): Rename to...
260 (stap_probe::gen_info_probes_table_values): ...this. Adjust
261 code to reflect change.
262 (struct probe_ops stap_probe_ops): Delete.
263 (info_probes_stap_command): Use 'info_probes_for_spops'
264 instead of 'info_probes_for_ops'.
265 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
266 of 'all_probe_ops'.
267
935676c9
SDJ
2682017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
269
270 * break-catch-throw.c (fetch_probe_arguments): Use
271 'probe.prob' instead of 'probe.probe'.
272 * breakpoint.c (create_longjmp_master_breakpoint): Call
273 'can_evaluate_arguments' and 'get_relocated_address' methods
274 from probe.
275 (create_exception_master_breakpoint): Likewise.
276 (add_location_to_breakpoint): Use 'sal->prob' instead of
277 'sal->probe'.
278 (bkpt_probe_insert_location): Call 'set_semaphore' method from
279 probe.
280 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
281 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
282 of 'probe_ops'.
283 (probe_key_free): Call 'delete' on probe.
284 (check_exception_resume): Use 'probe.prob' instead of
285 'probe.probe'.
286 * location.c (string_to_event_location_basic): Call
287 'probe_linespec_to_static_ops'.
288 * probe.c (class any_static_probe_ops): New class.
289 (any_static_probe_ops any_static_probe_ops): New variable.
290 (parse_probes_in_pspace): Receive 'static_probe_ops' as
291 argument. Adjust code to reflect change.
292 (parse_probes): Use 'static_probe_ops' instead of
293 'probe_ops'. Adjust code to reflect change.
294 (find_probes_in_objfile): Call methods to get name and
295 provider from probe.
296 (find_probe_by_pc): Use 'result.prob' instead of
297 'result.probe'. Call 'get_relocated_address' method from
298 probe.
299 (collect_probes): Adjust comment and argument list to receive
300 'static_probe_ops' instead of 'probe_ops'. Adjust code to
301 reflect change. Call necessary methods from probe.
302 (compare_probes): Call methods to get name and provider from
303 probes.
304 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
305 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
306 adjust code accordingly.
307 (print_ui_out_not_applicables): Likewise.
308 (info_probes_for_ops): Rename to...
309 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
310 as argument instead of 'probe_ops'. Adjust code. Call
311 necessary methods from probe.
312 (info_probes_command): Use 'info_probes_for_spops'.
313 (enable_probes_command): Pass correct argument to
314 'collect_probes'. Call methods from probe.
315 (disable_probes_command): Likewise.
316 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
317 (get_probe_argument_count): Move to
318 'any_static_probe_ops::get_argument_count'.
319 (can_evaluate_probe_arguments): Move to
320 'any_static_probe_ops::can_evaluate_arguments'.
321 (evaluate_probe_argument): Move to
322 'any_static_probe_ops::evaluate_argument'.
323 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
324 'probe.probe'.
325 (probe_linespec_to_ops): Rename to...
326 (probe_linespec_to_static_ops): ...this. Adjust code.
327 (probe_any_is_linespec): Rename to...
328 (any_static_probe_ops::is_linespec): ...this.
329 (probe_any_get_probes): Rename to...
330 (any_static_probe_ops::get_probes): ...this.
331 (any_static_probe_ops::type_name): New method.
332 (any_static_probe_ops::gen_info_probes_table_header): New
333 method.
334 (compute_probe_arg): Use 'pc_probe.prob' instead of
335 'pc_probe.probe'. Call methods from probe.
336 (compile_probe_arg): Likewise.
337 (std::vector<const probe_ops *> all_probe_ops): Delete.
338 (std::vector<const static_probe_ops *> all_static_probe_ops):
339 New variable.
340 (_initialize_probe): Use 'all_static_probe_ops' instead of
341 'all_probe_ops'.
342 * probe.h (struct info_probe_column) <field_name>: Delete
343 extraneous newline
344 (info_probe_column_s): Delete type and VEC.
345 (struct probe_ops): Delete. Replace with...
346 (class static_probe_ops): ...this and...
347 (clas probe): ...this.
348 (struct bound_probe) <bound_probe>: Delete extraneous
349 newline. Adjust constructor to receive 'probe' instead of
350 'struct probe'.
351 <probe>: Rename to...
352 <prob>: ...this. Delete extraneous newline.
353 <objfile>: Delete extraneous newline.
354 (register_probe_ops): Delete unused prototype.
355 (info_probes_for_ops): Rename to...
356 (info_probes_for_spops): ...this. Adjust comment.
357 (get_probe_address): Move to 'probe::get_address'.
358 (get_probe_argument_count): Move to
359 'probe::get_argument_count'.
360 (can_evaluate_probe_arguments): Move to
361 'probe::can_evaluate_arguments'.
362 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
363 * solib-svr4.c (struct svr4_info): Adjust comment.
364 (struct probe_and_action) <probe>: Rename to...
365 <prob>: ...this.
366 (register_solib_event_probe): Receive 'probe' instead of
367 'struct probe' as argument. Use 'prob' instead of 'probe'
368 when applicable.
369 (solib_event_probe_action): Call 'get_argument_count' method
370 from probe. Adjust comment.
371 (svr4_handle_solib_event): Adjust comment. Call
372 'evaluate_argument' method from probe.
373 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
374 from probe.
375 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
376 'struct probe'. Call 'can_evaluate_arguments' from probe.
377 * symfile.h: Forward declare 'class probe' instead of 'struct
378 probe'.
379 * symtab.h: Likewise.
380 (struct symtab_and_line) <probe>: Rename to...
381 <prob>: ...this.
382 * tracepoint.c (start_tracing): Use 'prob' when applicable.
383 Call probe methods.
384 (stop_tracing): Likewise.
385
8f6cb6c3
JB
3862017-11-22 Joel Brobecker <brobecker@adacore.com>
387
388 * ravenscar-thread.c (ravenscar_inferior_created): Remove
389 trailing newline at end of string in call to warning.
390
479f8de1
SM
3912017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
392
393 * osdata.h: Include vector isntead of vec.h.
394 (osdata_column_s): Remove typedef.
395 (struct osdata_column): Add constructor.
396 <name, value>: Change type to std::string.
397 (DEF_VEC_O (osdata_column_s)): Remove.
398 (osdata_item_s): Remove typedef.
399 (struct osdata_item) <columns>: Change type to std::vector.
400 (DEF_VEC_O (osdata_item_s)): Remove.
401 (struct osdata): Add constructor.
402 <type>: Change type to std::string.
403 <items>: Change type to std::vector.
404 (osdata_p): Remove typedef.
405 (DEF_VEC_P (osdata_p)): Remove.
406 (osdata_parse): Return a unique_ptr.
407 (osdata_free): Remove.
408 (make_cleanup_osdata_free): Remove.
409 (get_osdata): Return a unique_ptr.
410 (get_osdata_column): Return pointer to std::string, take a
411 reference to osdata_item as parameter.
412 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
413 unique_ptr.
414 <property_name>: Change type to std::string.
415 (osdata_start_osdata): Allocate osdata with new and adjust.
416 (osdata_start_item): Adjust.
417 (osdata_start_column): Adjust.
418 (osdata_end_column): Adjust.
419 (clear_parsing_data): Remove.
420 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
421 (osdata_item_clear): Remove.
422 (get_osdata): return a unique_ptr and adjust.
423 (get_osdata_column): Return a pointer to std::string and adjust.
424 (info_osdata): Adjust.
425 * mi/mi-main.c: Include <map>.
426 (free_vector_of_osdata_items): Remove.
427 (list_available_thread_groups): Adjust, use std::map instead of
428 splay tree.
429
41bd68f5
SM
4302017-11-22 Simon Marchi <simon.marchi@ericsson.com>
431
432 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
433 case in switch.
434
7e2fd2f4
SM
4352017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
436
437 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
438
0604393c
SM
4392017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
440
441 * varobj.h (struct varobj_update_result): Add constructor, add
442 move constructor, disable copy and assign, initialize fields.
443 <newobj>: Change type to std::vector.
444 (varobj_update): Return std::vector.
445 * varobj.c (install_dynamic_child): Change VEC parameters to
446 std::vector and adjust.
447 (update_dynamic_varobj_children): Likewise.
448 (varobj_update): Return std::vector and adjust.
449 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
450
ddf0ea08
SM
4512017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
452
453 * varobj.h (struct varobj) <parent>: Remove const.
454 <children>: Change type to std::vector.
455 (varobj_list_children): Return std::vector const reference.
456 (varobj_restrict_range): Change parameter type to std::vector
457 const reference.
458 * varobj.c (varobj_has_more): Adjust.
459 (varobj_restrict_range): Change parameter type to std::vector
460 const reference and adjust.
461 (install_dynamic_child): Adjust.
462 (update_dynamic_varobj_children): Adjust.
463 (varobj_list_children): Return std::vector const reference and
464 adjust.
465 (varobj_add_child): Adjust.
466 (update_type_if_necessary): Adjust.
467 (varobj_update): Adjust.
468 (delete_variable_1): Adjust.
469 * ada-varobj.c (ada_value_has_mutated): Adjust.
470 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
471
9e5b9d2b
SM
4722017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
473
474 * varobj.h (struct varobj): Add constructor and destructor,
475 initialize fields.
476 * varobj.c (struct varobj_root): Initialize fields.
477 (struct varobj_dynamic): Initialize fields.
478 (varobj_create): Use unique_ptr instead of cleanup. Create
479 varobj with new instead of new_root_variable.
480 (delete_variable_1): Free variable with delete instead of
481 free_variable.
482 (create_child_with_value): Create variable with new instead of
483 new_variable.
484 (varobj::varobj): New.
485 (varobj::~varobj): New (body mostly coming from free_variable).
486 (new_variable): Remove.
487 (free_variable): Remove.
488 (do_free_variable_cleanup): Remove.
489 (make_cleanup_free_variable): Remove.
490
fc35dab1
UW
4912017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
492
493 * core-regset.c: Remove file.
494 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
495
2400729e
UW
4962017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
497
498 * NEWS: Document use of GNU MPFR.
499 * README: Likewise.
500
501 * Makefile.in (LIBMPFR): Add define.
502 (CLIBS): Add $(LIBMPFR).
503 * configure.ac: Add --with-mpfr configure option.
504 * configure: Regenerate.
505 * config.in: Regenerate.
506
507 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
508 (class mpfr_float_ops): New type.
509 (mpfr_float_ops::from_target): Two new overloaded functions.
510 (mpfr_float_ops::to_target): Likewise.
511 (mpfr_float_ops::to_string): New function.
512 (mpfr_float_ops::from_string): Likewise.
513 (mpfr_float_ops::to_longest): Likewise.
514 (mpfr_float_ops::from_longest): Likewise.
515 (mpfr_float_ops::from_ulongest): Likewise.
516 (mpfr_float_ops::to_host_double): Likewise.
517 (mpfr_float_ops::from_host_double): Likewise.
518 (mpfr_float_ops::convert): Likewise.
519 (mpfr_float_ops::binop): Likewise.
520 (mpfr_float_ops::compare): Likewise.
521 (get_target_float_ops): Use mpfr_float_ops if available.
522
7a26362d
UW
5232017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
524
525 * target-float.c: Do not include <math.h>.
526 Include <cmath> and <limits>.
527 (DOUBLEST): Do not define.
528 (class target_float_ops): New type.
529 (class host_float_ops): New templated type.
530 (class decimal_float_ops): New type.
531
532 (floatformat_to_doublest): Rename to ...
533 (host_float_ops<T>::from_target): ... this. Use template type T
534 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
535 (host_float_ops<T>::from_target): New overload using a type argument.
536 (floatformat_from_doublest): Rename to ...
537 (host_float_ops<T>::to_target): ... this. Use template type T
538 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
539 (host_float_ops<T>::to_target): New overload using a type argument.
540 (floatformat_printf_format): New function.
541 (struct printf_length_modifier): New templated type.
542 (floatformat_to_string): Rename to ...
543 (host_float_ops<T>::to_string): ... this. Use type instead of
544 floatformat argument. Use floatformat_printf_format and
545 printf_length_modifier. Remove special handling of invalid numbers,
546 infinities and NaN (moved to target_float_to_string).
547 (struct scanf_length_modifier): New templated type.
548 (floatformat_from_string): Rename to ...
549 (host_float_ops<T>::from_string): ... this. Use type instead of
550 floatformat argument. Use scanf_length_modifier.
551 (floatformat_to_longest): Rename to ...
552 (host_float_ops<T>::to_longest): ... this. Use type instead of
553 floatformat argument. Handle out-of-range values deterministically.
554 (floatformat_from_longest): Rename to ...
555 (host_float_ops<T>::from_longest): ... this. Use type instead of
556 floatformat argument.
557 (floatformat_from_ulongest): Rename to ...
558 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
559 floatformat argument.
560 (floatformat_to_host_double): Rename to ...
561 (host_float_ops<T>::to_host_double): ... this. Use type instead of
562 floatformat argument.
563 (floatformat_from_host_double): Rename to ...
564 (host_float_ops<T>::from_host_double): ... this. Use type instead of
565 floatformat argument.
566 (floatformat_convert): Rename to ...
567 (host_float_ops<T>::convert): ... this. Use type instead of
568 floatformat arguments. Remove handling of no-op conversions.
569 (floatformat_binop): Rename to ...
570 (host_float_ops<T>::binop): ... this. Use type instead of
571 floatformat arguments.
572 (floatformat_compare): Rename to ...
573 (host_float_ops<T>::compare): ... this. Use type instead of
574 floatformat arguments.
575
576 (match_endianness): Use type instead of length/byte_order arguments.
577 (set_decnumber_context): Likewise.
578 (decimal_from_number): Likewise. Update calls.
579 (decimal_to_number): Likewise.
580 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
581 (decimal_float_ops::to_host_double): New dummy function.
582 (decimal_float_ops::from_host_double): Likewise.
583 (decimal_to_string): Rename to ...
584 (decimal_float_ops::to_string): ... this. Use type instead of
585 length/byte_order arguments. Update calls.
586 (decimal_from_string): Rename to ...
587 (decimal_float_ops::from_string): ... this. Use type instead of
588 length/byte_order arguments. Update calls.
589 (decimal_from_longest): Rename to ...
590 (decimal_float_ops::from_longest): ... this. Use type instead of
591 length/byte_order arguments. Update calls.
592 (decimal_from_ulongest): Rename to ...
593 (decimal_float_ops::from_ulongest): ... this. Use type instead of
594 length/byte_order arguments. Update calls.
595 (decimal_to_longest): Rename to ...
596 (decimal_float_ops::to_longest): ... this. Use type instead of
597 length/byte_order arguments. Update calls.
598 (decimal_binop): Rename to ...
599 (decimal_float_ops::binop): ... this. Use type instead of
600 length/byte_order arguments. Update calls.
601 (decimal_compare): Rename to ...
602 (decimal_float_ops::compare): ... this. Use type instead of
603 length/byte_order arguments. Update calls.
604 (decimal_convert): Rename to ...
605 (decimal_float_ops::convert): ... this. Use type instead of
606 length/byte_order arguments. Update calls.
607
608 (target_float_same_category_p): New function.
609 (target_float_same_format_p): Likewise.
610 (target_float_format_length): Likewise.
611 (enum target_float_ops_kind): New type.
612 (get_target_float_ops_kind): New function.
613 (get_target_float_ops): Three new overloaded functions.
614
615 (target_float_is_zero): Update call.
616 (target_float_to_string): Add special handling of invalid numbers,
617 infinities and NaN (moved from floatformat_to_string). Use
618 target_float_ops callback.
619 (target_float_from_string): Use target_float_ops callback.
620 (target_float_to_longest): Likewise.
621 (target_float_from_longest): Likewise.
622 (target_float_from_ulongest): Likewise.
623 (target_float_to_host_double): Likewise.
624 (target_float_from_host_double): Likewise.
625 (target_float_convert): Add special case for no-op conversions.
626 Use target_float_ops callback.
627 (target_float_binop): Use target_float_ops callback.
628 (target_float_compare): Likewise.
629
a9f26f60
YQ
6302017-11-22 Yao Qi <yao.qi@linaro.org>
631
632 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
633
29f9a567
YQ
6342017-11-22 Yao Qi <yao.qi@linaro.org>
635
636 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
637 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
638
3b1b69bf
JG
6392017-11-21 Jerome Guitton <guitton@adacore.com>
640
641 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
642 with event ptid from the lower layer before doing the
643 ravenscar-specific update.
644
54aa6c67
JB
6452017-11-21 Joel Brobecker <brobecker@adacore.com>
646
647 * ravenscar-thread.c (is_ravenscar_task): Also verify that
648 the ptid's TID is nonzero.
649
cf3fbed4
JB
6502017-11-21 Joel Brobecker <brobecker@adacore.com>
651
652 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
653 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
654 Make non-static. Change return type to char *. Adjust code
655 accordingly. Rewrite the function's documentation.
656 (read_atcb): Adjust call to get_tcb_types_info accordingly.
657 * ravenscar-thread.c (ravenscar_inferior_created): Check that
658 we have enough debugging information in the runtime to support
659 Ada task debugging before we enable the ravenscar-thread layer.
660
9edcc12f
JB
6612017-11-21 Joel Brobecker <brobecker@adacore.com>
662
663 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
664 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
665 * ravenscar-thread.c: Add into comment.
666 (base_magic_null_ptid): Delete.
667 (base_ptid): Change documentation.
668 (ravenscar_active_task): Renames ravenscar_running_thread.
669 All callers updated throughout.
670 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
671 (ravenscar_task_is_currently_active): Likewise.
672 (get_base_thread_from_ravenscar_task): Ditto.
673 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
674 (ravenscar_runtime_initialized): Likewise.
675 (get_running_thread_id): Add new parameter "cpu". Adjust
676 implementation to handle this new parameter.
677 (ravenscar_fetch_registers): Small adjustment to use
678 is_ravenscar_task and ravenscar_task_is_currently_active in
679 order to decide whether to use the target beneath or this
680 module's arch_ops.
681 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
682 (ravenscar_stopped_by_sw_breakpoint): Use
683 get_base_thread_from_ravenscar_task to get the underlying
684 thread, rather than using base_ptid.
685 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
686 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
687 Likewise.
688 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
689
65d40437
JB
6902017-11-21 Joel Brobecker <brobecker@adacore.com>
691
692 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
693 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
694 (get_tcb_types_info): Set fieldnos.base_cpu.
695 (read_atcb): Set task_info->base_cpu.
696 (info_task): Print "Base CPU" info if set by runtime.
697
e02544b2
JB
6982017-11-21 Joel Brobecker <brobecker@adacore.com>
699
700 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
701 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
702 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
703 New functions.
704 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
705 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
706 to_stopped_data_address and to_core_of_thread fields of
707 ravenscar_ops.
708
ed0f4273
UW
7092017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
710
711 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
712 (struct gdbarch_tdep): New member long_double_abi.
713 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
714 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
715 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
716 format depending on long_double_abi tdep member.
717 (ppc_floatformat_for_type): Handle __ibm128 type.
718
0fc76421
SM
7192017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
720
721 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
722
e6b2f5ef
PA
7232017-11-21 Pedro Alves <palves@redhat.com>
724
725 * dwarf2read.c (mapped_index::find_name_components_bounds)
726 <completion mode, upper bound>: Use std::lower_bound instead of
727 std::upper_bound.
728 (test_mapped_index_find_name_component_bounds): Remove incorrect
729 "t1_fund" from expected symbols.
730
5c58de74
PA
7312017-11-21 Pedro Alves <palves@redhat.com>
732
733 * dwarf2read.c (mapped_index::name_components_casing): New field.
734 (mapped_index) <build_name_components,
735 find_name_components_bounds): Declare new methods.
736 (mapped_index::find_name_components_bounds)
737 (mapped_index::build_name_components): New methods, factored out
738 from dw2_expand_symtabs_matching_symbol.
739 (check_find_bounds_finds)
740 (test_mapped_index_find_name_component_bounds): New.
741 (run_test): Rename to ...
742 (test_dw2_expand_symtabs_matching_symbol): ... this.
743 (run_test): Reimplement.
744
e1ef7d7a
PA
7452017-11-21 Pedro Alves <palves@redhat.com>
746
747 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
748 (symbol_end): Use cp_ident_is_alnum.
749 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
750 * dwarf2read.c (make_sort_after_prefix_name): New function.
751 (dw2_expand_symtabs_matching_symbol): Use it.
752 (test_symbols): Add more symbols.
753 (run_test): Add tests.
754
cf724bc9
TT
7552017-11-17 Tom Tromey <tom@tromey.com>
756
757 * symtab.h (enum symbol_subclass_kind): New.
758 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
759 Remove.
760 <subclass>: New member.
761 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
762 * rust-lang.c (rust_get_trait_object_pointer): Update.
763 * dwarf2read.c (read_func_scope): Update.
764 (read_variable): Update.
765
68e745e3
TT
7662017-11-17 Tom Tromey <tom@tromey.com>
767
768 * dwarf2read.c (read_func_scope): Update.
769 * symtab.h (struct template_symbol): Derive from symbol.
770 <base>: Remove.
771
71a3c369
TT
7722017-11-17 Tom Tromey <tom@tromey.com>
773
774 * symtab.h (struct symbol) <is_rust_vtable>: New member.
775 (struct rust_vtable_symbol): New.
776 (find_symbol_at_address): Declare.
777 * symtab.c (find_symbol_at_address): New function.
778 * symfile.h (struct quick_symbol_functions)
779 <find_compunit_symtab_by_address>: New member.
780 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
781 function.
782 (debug_sym_quick_functions): Link to
783 debug_qf_find_compunit_symtab_by_address.
784 * rust-lang.c (rust_get_trait_object_pointer): New function.
785 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
786 rust_get_trait_object_pointer.
787 * psymtab.c (psym_relocate): Clear psymbol_map.
788 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
789 functions.
790 (psym_functions): Link to psym_find_compunit_symtab_by_address.
791 * objfiles.h (struct objfile) <psymbol_map>: New member.
792 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
793 (process_die) <DW_TAG_variable>: New case. Call read_variable.
794 (rust_containing_type, read_variable): New functions.
795
7468702d
SM
7962017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
797
798 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
799
37269bc9
SM
8002017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
801
802 * common/filestuff.c: Include <algorithm>.
803 (open_fds): Change type to std::vector<int>.
804 (do_mark_open_fd): Adjust.
805 (unmark_fd_no_cloexec): Adjust.
806 (do_close): Adjust.
807
5c632425
SM
8082017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
809
810 * breakpoint.c (output_thread_groups): Take an std::vector.
811 (print_one_breakpoint_location): Adjust.
812
ced9779b
JB
8132017-11-17 Joel Brobecker <brobecker@adacore.com>
814
815 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
816 (ada_evaluate_subexp_for_cast): New function.
817 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
818 ada_evaluate_subexp_for_cast.
819 (ada_evaluate_subexp) <nosideret>: Replace code by call to
820 eval_skip_value.
821 * eval.c (evaluate_var_value): Make non-static.
822 (evaluate_var_msym_value, eval_skip_value): Likewise.
823 * value.h (evaluate_var_value, evaluate_var_msym_value)
824 (eval_skip_value): Declare.
825
b7e22850
JB
8262017-11-16 Joel Brobecker <brobecker@adacore.com>
827
828 * ada-lang.c (ada_value_cast): Remove parameter "noside".
829 Update all callers.
830
9ccabccd
PA
8312017-11-16 Pedro Alves <palves@redhat.com>
832
833 * python/py-unwind.c (pyuw_sniffer): Translate
834 PyExc_KeyboardInterrupt to a GDB Quit exception.
835
d930703d
PA
8362017-11-16 Pedro Alves <palves@redhat.com>
837
838 * infrun.c (resume_cleanups): Delete.
839 (resume): No longer install a resume_cleanups cleanup nor call
840 QUIT.
841 (proceed): Pass the terminal to the inferior.
842 (keep_going_pass_signal): No longer install a resume_cleanups
843 cleanup.
844
38dc2859
PA
8452017-11-16 Pedro Alves <palves@redhat.com>
846
847 * inf-loop.c (inferior_event_handler): Don't swallow the exception
848 if the prompt is blocked.
849
688fca4f
PA
8502017-11-16 Pedro Alves <palves@redhat.com>
851
852 * breakpoint.c (insert_bp_location): Replace bp_err and
853 bp_err_message locals by a gdb_exception local.
854
e2c33ac7
PA
8552017-11-16 Pedro Alves <palves@redhat.com>
856
857 * inflow.c (scoped_ignore_sigttou): New class.
858 (child_terminal_ours_1, new_tty): Use it.
859
d7236961
UW
8602017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
861
862 * target-float.c (decimal_from_number): Add byte_order argument and
863 call match_endianness. Error if unknown floating-point type.
864 (decimal_to_number): Add byte_order argument and call match_endianness.
865 (decimal_from_longest): Update call. Do not call match_endianness.
866 (decimal_from_ulongest): Likewise.
867 (decimal_binop): Likewise.
868 (decimal_is_zero): Likewise.
869 (decimal_compare): Likewise.
870 (decimal_convert): Likewise.
871
d8ae99a7
PM
8722017-11-16 Phil Muldoon <pmuldoon@redhat.com>
873
874 * python/python.c (gdbpy_rbreak): New function.
875 * NEWS: Document Python rbreak feature.
876
c632b645
YQ
8772017-11-16 Yao Qi <yao.qi@linaro.org>
878
879 * features/tic6x-c62x.xml: Remove.
880 * features/tic6x-c64x.xml: Remove.
881 * features/tic6x-c64xp.xml: Remove.
882
a014b87a
JB
8832017-11-15 John Baldwin <jhb@FreeBSD.org>
884
885 * symtab.h: Include <array>.
886
94765011
JB
8872017-11-15 John Baldwin <jhb@FreeBSD.org>
888
889 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
890 (bsd_kvm_proc_cmd): Likewise.
891
625ad440
SM
8922017-11-15 Simon Marchi <simon.marchi@ericsson.com>
893
894 * tui/tui-win.c (window_name_completer): Replace VEC with
895 std::vector.
896
c0c11fa9
AC
8972017-11-15 Andrew Cagney <cagney@gnu.org>
898
899 * MAINTAINERS: Remove no-longer applicable entries.
900
34a7ebaf
AC
9012017-11-15 Andrew Cagney <cagney@gnu.org>
902
903 * MAINTAINERS: Move self to Past Maintainers.
904
5334ef39
YQ
9052017-11-15 Yao Qi <yao.qi@linaro.org>
906
907 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
908 * features/nios2-linux.c: Remove.
909 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
910 initialize_tdesc_nios2_linux.
911
a714b0d6
YQ
9122017-11-15 Yao Qi <yao.qi@linaro.org>
913
914 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
915 M68HC11_LAST_HARD_REG + 1.
916
92ffd475
PC
9172017-11-14 Paul Carroll <pcarroll@codesourcery.com>
918
919 PR gdb/22388
920 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
921 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
922 Return TARGET_XFER_EOF if size of returned data is 0.
923
07431908
SM
9242017-11-14 Simon Marchi <simon.marchi@ericsson.com>
925
926 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
927 memory-map-selftests.c.
928 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
929 * memory-map.c (memory_map_start_memory): Fix computation of hi
930 address.
931 * unittests/memory-map-selftests.c: New file.
932
31432a67
JB
9332017-11-09 Joel Brobecker <brobecker@adacore.com>
934
935 * ada-lang.c: Fix some typos in the general command documenting
936 how Ada expressions are being evaluated and how their result
937 is printed.
938
e793c052
TT
9392017-11-09 Tom Tromey <tom@tromey.com>
940
941 * psymtab.c (psymbol_hash): Do not hash string contents.
942 (psymbol_compare): Add comment.
943
7e8835c5
TT
9442017-11-09 Tom Tromey <tom@tromey.com>
945
946 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
947
286acbb5
JB
9482017-11-08 Joel Brobecker <brobecker@adacore.com>
949
950 * ada-exp.y (write_var_from_sym): Remove parameter
951 "orig_left_context". Update all callers.
952
b44ec619
SM
9532017-11-08 Simon Marchi <simon.marchi@ericsson.com>
954
955 * tracepoint.h (class collection_list) <stringify>: Return
956 std::vector<std::string>.
957 (encode_actions_rsp): Change parameters to
958 std::vector<std::string> *.
959 * tracepoint.c (collection_list::stringify): Return
960 std::vector<std::string> and adjust accordingly.
961 (encode_actions_rsp): Changee parameters to
962 std::vector<std::string> and adjust accordingly.
963 * remote.c (free_actions_list),
964 free_actions_list_cleanup_wrapper): Remove.
965 (remote_download_tracepoint): Adjust to std::vector.
966
2f4732b0
TT
9672017-11-08 Tom Tromey <tom@tromey.com>
968
969 * dwarf2read.c (symbolp): Remove typedef.
970 (read_func_scope): Use std::vector.
971 (process_structure_scope): Use std::vector.
972
f9d67a22
PA
9732017-11-08 Pedro Alves <palves@redhat.com>
974
975 * ada-lang.c (ada_make_symbol_completion_list): Use
976 completion_skip_symbol.
977 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
978 (symbol_is_function_or_method(symbol*)): New.
979 (add_symtab_completions): Add complete_symbol_mode parameter. Use
980 completion_skip_symbol.
981 (default_collect_symbol_completion_matches_break_on): Use
982 completion_skip_symbol. Pass down mode.
983 (collect_file_symbol_completion_matches): Pass down mode.
984 * symtab.h (symbol_is_function_or_method): New declarations.
985 (completion_skip_symbol): New template function.
986
56d87ef7
PA
9872017-11-08 Pedro Alves <palves@redhat.com>
988
989 * linespec.c (iterate_over_all_matching_symtabs): Add
990 search_domain parameter. Pass it down to expand_symtabs_matching.
991 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
992 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
993 search_domain.
994 (add_all_symbol_names_from_pspace): Add search_domain parameter.
995 Pass it down.
996 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
997 symbols.
998 (add_matching_symbols_to_info): Add search_domain parameter. Pass
999 it down.
1000
1b026119
PA
10012017-11-08 Pedro Alves <palves@redhat.com>
1002
1003 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1004 text_len locals and don't pass them down.
1005 * symtab.c (completion_list_add_name): Remove
1006 sym_text/sym_text_len parameters and adjust.
1007 (completion_list_add_symbol, completion_list_add_msymbol)
1008 (completion_list_objc_symbol, completion_list_add_fields)
1009 (add_symtab_completions): Likewise.
1010 (default_collect_symbol_completion_matches_break_on)
1011 (collect_file_symbol_completion_matches): Remove sym_text_len
1012 local and don't pass it down.
1013 * symtab.h (completion_list_add_name): Remove
1014 sym_text/sym_text_len parameters.
1015
c62446b1
PA
10162017-11-08 Pedro Alves <palves@redhat.com>
1017
1018 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1019 unittests/lookup_name_info-selftests.c.
1020 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1021 * cp-support.c: Include "selftest.h".
1022 (cp_remove_params_1): Rename from cp_remove_params. Add
1023 'require_param' parameter, and handle it.
1024 (cp_remove_params): Reimplement.
1025 (cp_remove_params_if_any): New.
1026 (selftests::quote): New.
1027 (selftests::check_remove_params): New.
1028 (selftests::test_cp_remove_params): New.
1029 (_initialize_cp_support): Install
1030 selftests::test_cp_remove_params.
1031 * cp-support.h (cp_remove_params_if_any): Declare.
1032 * dwarf2read.c :Include "selftest.h".
1033 (dw2_expand_symtabs_matching_symbol): Use
1034 lookup_name_info::make_ignore_params.
1035 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1036 (selftests::dw2_expand_symtabs_matching::string_or_null)
1037 (selftests::dw2_expand_symtabs_matching::check_match)
1038 (selftests::dw2_expand_symtabs_matching::test_symbols)
1039 (selftests::dw2_expand_symtabs_matching::run_test): New.
1040 (_initialize_dwarf2_read): Register
1041 selftests::dw2_expand_symtabs_matching::run_test.
1042 * psymtab.c (psym_expand_symtabs_matching): Use
1043 lookup_name_info::make_ignore_params.
1044 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1045 If the lookup name wants to ignore parameters, strip them.
1046 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1047 code handling '('.
1048 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1049 (default_collect_symbol_completion_matches_break_on): Don't try to
1050 strip parameters.
1051 * symtab.h (lookup_name_info::lookup_name_info): Add
1052 'ignore_parameters' parameter.
1053 (lookup_name_info::ignore_parameters)
1054 (lookup_name_info::make_ignore_params): New methods.
1055 (lookup_name_info::m_ignore_parameters): New field.
1056 * unittests/lookup_name_info-selftests.c: New file.
1057
61920122
PA
10582017-11-08 Pedro Alves <palves@redhat.com>
1059
1060 * dwarf2read.c (dw2_expand_marked_cus)
1061 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1062 (dw2_expand_symtabs_matching): Move further below.
1063 (dw2_expand_marked_cus): Reindent.
1064
3f563c84
PA
10652017-11-08 Pedro Alves <palves@redhat.com>
1066
1067 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1068 (struct name_component): New.
1069 (mapped_index::name_components): New field.
1070 (mapped_index::symbol_name_at): New method.
1071 (dwarf2_read_index): Call mapped_index ctor.
1072 (dw2_map_matching_symbols): Add comment about name_components
1073 table.
1074 (dw2_expand_symtabs_matching): Factor part to...
1075 (dw2_expand_symtabs_matching_symbol): ... this new function.
1076 Build name components table, and lookup symbols in it before
1077 calling the name matcher.
1078 (dw2_expand_marked_cus): New, factored out from
1079 dw2_expand_symtabs_matching.
1080 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1081
b5ec771e
PA
10822017-11-08 Pedro Alves <palves@redhat.com>
1083
1084 * ada-lang.c (ada_encode): Rename to ..
1085 (ada_encode_1): ... this. Add throw_errors parameter and handle
1086 it.
1087 (ada_encode): Reimplement.
1088 (match_name): Delete, folded into full_name.
1089 (resolve_subexp): No longer pass the encoded name to
1090 ada_lookup_symbol_list.
1091 (should_use_wild_match): Delete.
1092 (name_match_type_from_name): New.
1093 (ada_lookup_simple_minsym): Use lookup_name_info and the
1094 language's symbol_name_matcher_ftype.
1095 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1096 (ada_add_block_renamings): Adjust to use lookup_name_info.
1097 (ada_lookup_name): New.
1098 (add_nonlocal_symbols, ada_add_all_symbols)
1099 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1100 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1101 (ada_name_for_lookup): Delete.
1102 (ada_lookup_encoded_symbol): Construct a verbatim name.
1103 (wild_match): Reverse sense of return type. Use bool.
1104 (full_match): Reverse sense of return type. Inline bits of old
1105 match_name here.
1106 (ada_add_block_symbols): Adjust to use lookup_name_info.
1107 (symbol_completion_match): Delete, folded into...
1108 (ada_lookup_name_info::matches): ... .this new method.
1109 (symbol_completion_add): Delete.
1110 (ada_collect_symbol_completion_matches): Add name_match_type
1111 parameter. Adjust to use lookup_name_info and
1112 completion_list_add_name.
1113 (get_var_value, ada_add_global_exceptions): Adjust to use
1114 lookup_name_info.
1115 (ada_get_symbol_name_cmp): Delete.
1116 (do_wild_match, do_full_match): New functions.
1117 (ada_lookup_name_info::ada_lookup_name_info): New method.
1118 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1119 functions.
1120 (ada_language_defn): Install ada_get_symbol_name_matcher.
1121 * ada-lex.l (processId): If name starts with '<', copy it
1122 verbatim.
1123 * block.c (block_iter_match_step, block_iter_match_first)
1124 (block_iter_match_next, block_lookup_symbol)
1125 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1126 lookup_name_info.
1127 * block.h (block_iter_match_first, block_iter_match_next)
1128 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1129 * c-lang.c (c_language_defn, cplus_language_defn)
1130 (asm_language_defn, minimal_language_defn): Adjust comments to
1131 refer to la_get_symbol_name_matcher.
1132 * completer.c (complete_files_symbols)
1133 (collect_explicit_location_matches, symbol_completer): Pass a
1134 symbol_name_match_type down.
1135 * completer.h (class completion_match, completion_match_result):
1136 New classes.
1137 (completion_tracker::reset_completion_match_result): New method.
1138 (completion_tracker::m_completion_match_result): New field.
1139 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1140 lookup_name_info.
1141 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1142 functions.
1143 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1144 * d-lang.c: Adjust comments to refer to
1145 la_get_symbol_name_matcher.
1146 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1147 Adjust to use lookup_name_info.
1148 (dict_iter_match_first, dict_iter_match_next)
1149 (iter_match_first_hashed, iter_match_next_hashed)
1150 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1151 with a lookup_name_info.
1152 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1153 Likewise.
1154 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1155 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1156 (gdb_index_symbol_name_matcher): New class.
1157 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1158 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1159 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1160 with a symbol_name_match_type.
1161 (f_language_defn): Adjust comments to refer to
1162 la_get_symbol_name_matcher.
1163 * go-lang.c (go_language_defn): Adjust comments to refer to
1164 la_get_symbol_name_matcher.
1165 * language.c (default_symbol_name_matcher)
1166 (language_get_symbol_name_matcher): New functions.
1167 (unknown_language_defn, auto_language_defn): Adjust comments to
1168 refer to la_get_symbol_name_matcher.
1169 * language.h (symbol_name_cmp_ftype): Delete.
1170 (language_defn) <la_collect_symbol_completion_matches>: Add match
1171 type parameter.
1172 <la_get_symbol_name_cmp>: Delete field.
1173 <la_get_symbol_name_matcher>: New field.
1174 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1175 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1176 Declare.
1177 * linespec.c (iterate_over_all_matching_symtabs)
1178 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1179 (find_methods): Add language parameter, and use lookup_name_info
1180 and the language's symbol_name_matcher_ftype.
1181 (linespec_complete_function): Adjust.
1182 (lookup_prefix_sym): Use lookup_name_info.
1183 (add_all_symbol_names_from_pspace): Adjust.
1184 (find_superclass_methods): Add language parameter and pass it
1185 down.
1186 (find_method): Pass symbol language down.
1187 (find_linespec_symbols): Don't demangle or Ada encode here.
1188 (search_minsyms_for_name): Add lookup_name_info parameter.
1189 (add_matching_symbols_to_info): Add name_match_type parameter.
1190 Use lookup_name_info.
1191 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1192 la_get_symbol_name_matcher.
1193 * minsyms.c: Include <algorithm>.
1194 (add_minsym_to_demangled_hash_table): Remove table parameter and
1195 add objfile parameter. Use search_name_hash, and add language to
1196 demangled languages vector.
1197 (struct found_minimal_symbols): New struct.
1198 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1199 New functions.
1200 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1201 input names here. Use lookup_name_info instead. Lookup up
1202 demangled names once for each language in the demangled names
1203 vector.
1204 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1205 demangled names once for each language in the demangled names
1206 vector.
1207 (build_minimal_symbol_hash_tables): Adjust.
1208 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1209 lookup_name_info.
1210 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1211 la_get_symbol_name_matcher.
1212 * objfiles.h: Include <vector>.
1213 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1214 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1215 la_get_symbol_name_matcher.
1216 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1217 la_get_symbol_name_matcher.
1218 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1219 (match_partial_symbol): Use symbol_name_match_type,
1220 lookup_name_info and psymbol_name_matches.
1221 (lookup_partial_symbol): Use lookup_name_info.
1222 (map_block): Use symbol_name_match_type and lookup_name_info.
1223 (psym_map_matching_symbols): Use symbol_name_match_type.
1224 (psymbol_name_matches): New.
1225 (recursively_search_psymtabs): Use lookup_name_info and
1226 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1227 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1228 'kind' parameter to 'domain'.
1229 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1230 la_get_symbol_name_matcher.
1231 * symfile-debug.c (debug_qf_map_matching_symbols)
1232 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1233 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1234 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1235 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1236 Adjust to use symbol_name_match_type.
1237 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1238 (expand_symtabs_matching): Adjust to use lookup_name_info.
1239 * symmisc.c (maintenance_expand_symtabs): Use
1240 lookup_name_info::match_any ().
1241 * symtab.c (symbol_matches_search_name): New.
1242 (eq_symbol_entry): Adjust to use lookup_name_info and the
1243 language's matcher.
1244 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1245 (lookup_name_info::match_any): New.
1246 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1247 (compare_symbol_name): Add language, lookup_name_info and
1248 completion_match_result parameters, and use them.
1249 (completion_list_add_name): Make extern. Add language and
1250 lookup_name_info parameters. Use them.
1251 (completion_list_add_symbol, completion_list_add_msymbol)
1252 (completion_list_objc_symbol): Add lookup_name_info parameters and
1253 adjust. Pass down language.
1254 (completion_list_add_fields): Add lookup_name_info parameters and
1255 adjust. Pass down language.
1256 (add_symtab_completions): Add lookup_name_info parameters and
1257 adjust.
1258 (default_collect_symbol_completion_matches_break_on): Add
1259 name_match_type parameter, and use it. Use lookup_name_info.
1260 (default_collect_symbol_completion_matches)
1261 (collect_symbol_completion_matches): Add name_match_type
1262 parameter, and pass it down.
1263 (collect_symbol_completion_matches_type): Adjust.
1264 (collect_file_symbol_completion_matches): Add name_match_type
1265 parameter, and use lookup_name_info.
1266 * symtab.h: Include <string> and "common/gdb_optional.h".
1267 (enum class symbol_name_match_type): New.
1268 (class ada_lookup_name_info): New.
1269 (struct demangle_for_lookup_info): New.
1270 (class lookup_name_info): New.
1271 (symbol_name_matcher_ftype): New.
1272 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1273 (symbol_matches_search_name): Declare.
1274 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1275 (default_collect_symbol_completion_matches)
1276 (collect_symbol_completion_matches)
1277 (collect_file_symbol_completion_matches): Add name_match_type
1278 parameter.
1279 (iterate_over_symbols): Use lookup_name_info.
1280 (completion_list_add_name): Declare.
1281 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1282 (strncmp_iw_with_mode): Now extern.
1283 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1284 (strncmp_iw_with_mode): Declare.
1285
5ffa0793
PA
12862017-11-08 Keith Seitz <keiths@redhat.com>
1287 Pedro Alves <palves@redhat.com>
1288
1289 * ada-lang.c (ada_language_defn): Install
1290 default_search_name_hash.
1291 * buildsym.c (struct buildsym_compunit): <language>: New field.
1292 (finish_block_internal): Pass language when creating dictionaries.
1293 (start_buildsym_compunit, start_symtab): New language parameters.
1294 Use them.
1295 (restart_symtab): Pass down compilation unit's language.
1296 * buildsym.h (enum language): Forward declare.
1297 (start_symtab): New 'language' parameter.
1298 * c-lang.c (c_language_defn, cplus_language_defn)
1299 (asm_language_defn, minimal_language_defn): Install
1300 default_search_name_hash.
1301 * coffread.c (coff_start_symtab): Adjust.
1302 * d-lang.c (d_language_defn): Install default_search_name_hash.
1303 * dbxread.c (struct symloc): Add 'pst_language' field.
1304 (PST_LANGUAGE): Define.
1305 (start_psymtab, read_ofile_symtab): Use it.
1306 (process_one_symbol): New 'language' parameter. Pass it down.
1307 * dictionary.c (struct dictionary) <language>: New field.
1308 (DICT_LANGUAGE): Define.
1309 (dict_create_hashed, dict_create_hashed_expandable)
1310 (dict_create_linear, dict_create_linear_expandable): New parameter
1311 'language'. Set the dictionary's language.
1312 (iter_match_first_hashed): Adjust to rename.
1313 (insert_symbol_hashed): Assert we don't see mismatching
1314 languages. Adjust to rename.
1315 (dict_hash): Rename to ...
1316 (default_search_name_hash): ... this and make extern.
1317 * dictionary.h (struct language_defn): Forward declare.
1318 (dict_create_hashed): New parameter 'language'.
1319 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1320 * f-lang.c (f_language_defn): Install default_search_name_hash.
1321 * go-lang.c (go_language_defn): Install default_search_name_hash.
1322 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1323 creation.
1324 * language.c (unknown_language_defn, auto_language_defn):
1325 * language.h (language_defn::la_search_name_hash): New field.
1326 (default_search_name_hash): Declare.
1327 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1328 * mdebugread.c (new_block): New parameter 'language'.
1329 * mdebugread.c (parse_symbol): Pass symbol language to block
1330 allocation.
1331 (psymtab_to_symtab_1): Pass down language.
1332 (new_symtab): Pass compunit's language to block allocation.
1333 * objc-lang.c (objc_language_defn): Install
1334 default_search_name_hash.
1335 * opencl-lang.c (opencl_language_defn):
1336 * p-lang.c (pascal_language_defn): Install
1337 default_search_name_hash.
1338 * rust-lang.c (rust_language_defn): Install
1339 default_search_name_hash.
1340 * stabsread.h (enum language): Forward declare.
1341 (process_one_symbol): Add 'language' parameter.
1342 * symtab.c (search_name_hash): New function.
1343 * symtab.h (search_name_hash): Declare.
1344 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1345
2a1dde5d
PA
13462017-11-08 Pedro Alves <palves@redhat.com>
1347
1348 * cp-name-parser.y (main): Don't initialize extra_chars.
1349
95a6b0a1
TT
13502017-11-07 Tom Tromey <tom@tromey.com>
1351
1352 * event-top.h (command_handler): Constify.
1353 * record-full.c (cmd_record_full_start): Update.
1354 * thread.c (thread_apply_all_command): Update.
1355 * printcmd.c (eval_command): Update.
1356 * mi/mi-main.c (mi_execute_cli_command): Update.
1357 (mi_execute_async_cli_command): Update.
1358 * tui/tui-stack.c (tui_update_command): Update.
1359 * cli/cli-interp.c (safe_execute_command): Constify.
1360 * record.c (record_start): Update.
1361 (record_start, record_stop, cmd_record_start): Update.
1362 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1363 (cmd_record_btrace_pt_start): Update.
1364 (cmd_record_btrace_start): Update.
1365 (cmd_record_btrace_start): Update.
1366 * reverse.c (exec_reverse_once): Update.
1367 * python/python.c (execute_gdb_command): Don't copy the command.
1368 * event-top.c (command_line_handler): Update.
1369 (command_handler): Constify.
1370 * defs.h (deprecated_call_command_hook): Constify.
1371 * cli/cli-script.h (execute_user_command): Constify.
1372 * cli/cli-script.c (execute_user_command): Constify.
1373 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1374 (enum command_control_type): Update.
1375 * main.c (catch_command_errors): Remove non-const overload.
1376 (catch_command_errors_ftype): Remove.
1377 * python/py-cmd.c (cmdpy_function): Constify.
1378 * guile/scm-cmd.c (cmdscm_function): Constify.
1379 * cli/cli-dump.c (call_dump_func): Constify.
1380 * cli/cli-decode.c (do_const_cfunc): Constify.
1381 (do_sfunc): Constify.
1382 (cmd_func): Constify.
1383 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1384 * top.h (execute_command): Constify.
1385 * top.c (execute_command): Constify.
1386 (execute_command_to_string): Constify.
1387 (deprecated_call_command_hook): Constify.
1388 * command.h (cmd_func): Constify.
1389 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1390
eb4c3f4a
TT
13912017-11-07 Tom Tromey <tom@tromey.com>
1392
1393 * ada-lang.c (catch_ada_exception_command): Constify.
1394 (catch_assert_command): Constify.
1395 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1396 (catch_rethrow_command): Constify.
1397 (catch_exception_command_1): Constify.
1398 * breakpoint.h (add_catch_command): Constify.
1399 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1400 (catch_syscall_split_args): Constify.
1401 * break-catch-sig.c (catch_signal_command): Constify.
1402 (catch_signal_split_args): Constify.
1403 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1404 cmd_const_sfunc_ftype.
1405 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1406 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1407 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1408 (add_setshow_string_cmd, struct cmd_list_element)
1409 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1410 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1411 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1412 Constify.
1413 (set_cmd_sfunc): Constify.
1414 (empty_sfunc): Constify.
1415 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1416 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1417 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1418 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1419 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1420 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1421 Constify.
1422 (set_cmd_sfunc): Constify.
1423 (cmd_sfunc_ftype): Remove.
1424 * compile/compile.c (set_compile_args): Constify.
1425 * infrun.c (set_disable_randomization): Constify.
1426 * infcmd.c (set_args_command, set_cwd_command): Constify.
1427 * breakpoint.c (set_condition_evaluation_mode): Constify.
1428 (add_catch_command): Constify.
1429 (catch_fork_command_1, catch_exec_command_1)
1430 (catch_load_command_1, catch_unload_command_1): Constify.
1431 (catch_load_or_unload): Constify.
1432 * guile/scm-param.c (pascm_set_func): Constify.
1433 (add_setshow_generic): Constify.
1434 * python/py-param.c (get_set_value): Constify.
1435 * top.h (set_verbose): Constify.
1436 * tui/tui-win.c (tui_set_var_cmd): Constify.
1437 * mi/mi-main.c (set_mi_async_command): Constify.
1438 * cli/cli-logging.c (set_logging_overwrite)
1439 (set_logging_redirect): Constify.
1440 * value.c (set_max_value_size): Constify.
1441 * valprint.c (set_input_radix, set_output_radix): Constify.
1442 * utils.c (set_width_command, set_height_command): Constify.
1443 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1444 * tracepoint.c (set_disconnected_tracing)
1445 (set_circular_trace_buffer, set_trace_buffer_size)
1446 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1447 * top.c (set_history_size_command, set_verbose, set_editing)
1448 (set_gdb_datadir, set_history_filename): Constify.
1449 * target.c (set_targetdebug, maint_set_target_async_command)
1450 (maint_set_target_non_stop_command, set_target_permissions)
1451 (set_write_memory_permission): Constify.
1452 (open_target): Constify.
1453 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1454 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1455 * symtab.c (set_symbol_cache_size_handler): Constify.
1456 * symfile.c (set_ext_lang_command): Constify.
1457 * symfile-debug.c (set_debug_symfile): Constify.
1458 * source.c (set_directories_command): Constify.
1459 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1460 * serial.c (set_parity): Constify.
1461 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1462 * remote.c (set_remote_exec_file, set_remotebreak)
1463 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1464 * record.c (set_record_insn_history_size)
1465 (set_record_call_history_size): Constify.
1466 * record-full.c (set_record_full_insn_max_num): Constify.
1467 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1468 * osabi.c (set_osabi): Constify.
1469 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1470 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1471 * maint.c (maintenance_set_profile_cmd): Constify.
1472 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1473 * language.c (set_language_command, set_range_command)
1474 (set_case_command): Constify.
1475 * infrun.c (set_non_stop, set_observer_mode)
1476 (set_stop_on_solib_events, set_schedlock_func)
1477 (set_exec_direction_func): Constify.
1478 * infcmd.c (set_inferior_tty_command): Constify.
1479 * disasm.c (set_disassembler_options_sfunc): Constify.
1480 * demangle.c (set_demangling_command): Constify.
1481 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1482 * cris-tdep.c (set_cris_version, set_cris_mode)
1483 (set_cris_dwarf2_cfi): Constify.
1484 * corefile.c (set_gnutarget_command): Constify.
1485 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1486 (set_target_wide_charset_sfunc): Constify.
1487 * breakpoint.c (update_dprintf_commands): Constify.
1488 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1489 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1490 (set_disassembly_style_sfunc): Constify.
1491 * arch-utils.c (set_endian, set_architecture): Constify.
1492 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1493 * agent.c (set_can_use_agent): Constify.
1494
5fed81ff
TT
14952017-11-07 Tom Tromey <tom@tromey.com>
1496
1497 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1498 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1499 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1500 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1501 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1502 (parse_int_arg, show_thread_default_detach_sc_cmd)
1503 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1504 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1505 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1506 (show_task_pause_cmd, set_task_detach_sc_cmd)
1507 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1508 (set_noninvasive_cmd, set_thread_pause_cmd)
1509 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1510 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1511 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1512 * windows-nat.c (display_selectors): Constify.
1513 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1514 non-const "cfunc".
1515 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1516 (cmd_cfunc_eq): Likewise.
1517 (struct cmd_list_element): Likewise.
1518 (do_cfunc): Remove.
1519 (cli_user_command_p): Update.
1520 * command.h (add_cmd): Remove non-const overload.
1521 (cmd_cfunc_ftype): Remove typedef.
1522 (cmd_cfunc_eq): Remove non-const overload.
1523 * value.c (show_values): Constify.
1524 * thread.c (thread_apply_all_command): Constify.
1525 * symfile.c (load_command): Constify.
1526 * source.c (directory_command): Constify.
1527 * maint.c (maintenance_internal_error)
1528 (maintenance_demangler_warning, maintenance_space_display)
1529 (maintenance_print_architecture, maintenance_translate_address)
1530 (maintenance_info_selftests, maintenance_internal_warning):
1531 Constify.
1532 * breakpoint.c (disable_trace_command, enable_trace_command):
1533 Constify.
1534 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1535 Constify.
1536 (add_auto_load_safe_path): Constify.
1537 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1538 * top.h (show_commands): Constify.
1539 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1540 * sparc64-tdep.c (adi_examine_command): Constify.
1541 (adi_assign_command): Constify.
1542
1d12d88f
TT
15432017-11-07 Tom Tromey <tom@tromey.com>
1544
1545 * frame.h (info_locals_command, info_args_command): Constify.
1546 * auto-load.h (auto_load_info_scripts): Constify.
1547 * inferior.h (registers_info): Constify.
1548 * copying.c: Rebuild.
1549 * copying.awk: Constify generated commands.
1550 * auto-load.c (auto_load_info_scripts)
1551 (info_auto_load_gdb_scripts): Constify.
1552 * cli/cli-decode.c (struct cmd_list_element): Take a
1553 cmd_const_cfunc_ftype.
1554 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1555 * tui/tui-win.c (tui_all_windows_info): Constify.
1556 * python/py-auto-load.c (info_auto_load_python_scripts):
1557 Constify.
1558 * cli/cli-cmds.c (show_command): Remove non-const overload.
1559 * tracepoint.c (info_tvariables_command, info_scope_command):
1560 Constify.
1561 (info_static_tracepoint_markers_command): Constify.
1562 * thread.c (info_threads_command): Constify.
1563 (print_thread_info_1): Constify.
1564 * target.c (info_target_command): Constify.
1565 * symtab.c (info_sources_command, info_functions_command)
1566 (info_types_command): Constify.
1567 (info_variables_command): Remove non-const overload.
1568 * symfile.c (info_ext_lang_command): Constify.
1569 * stack.c (info_frame_command, info_locals_command)
1570 (info_args_command): Constify.
1571 (backtrace_command): Remove non-const overload.
1572 * source.c (info_source_command, info_line_command): Constify.
1573 * solib.c (info_sharedlibrary_command): Constify.
1574 * skip.c (info_skip_command): Constify.
1575 * ser-go32.c (info_serial_command): Constify.
1576 * reverse.c (info_bookmarks_command): Constify.
1577 * printcmd.c (info_symbol_command, info_address_command)
1578 (info_display_command): Constify.
1579 * osdata.c (info_osdata_command): Constify.
1580 * objc-lang.c (info_selectors_command, info_classes_command):
1581 Constify.
1582 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1583 * memattr.c (info_mem_command): Constify.
1584 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1585 * linux-fork.c (info_checkpoints_command): Constify.
1586 * infrun.c (info_signals_command): Constify.
1587 * inflow.c (info_terminal_command): Constify.
1588 * inferior.c (info_inferiors_command): Constify.
1589 (print_inferior): Constify.
1590 * infcmd.c (info_program_command, info_all_registers_command)
1591 (info_registers_command, info_vector_command)
1592 (info_float_command): Constify.
1593 (registers_info): Constify.
1594 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1595 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1596 Constify.
1597 * f-valprint.c (info_common_command): Constify.
1598 * dcache.c (info_dcache_command): Constify.
1599 (dcache_info_1): Constify.
1600 * darwin-nat-info.c (info_mach_tasks_command)
1601 (info_mach_task_command, info_mach_ports_command)
1602 (info_mach_port_command, info_mach_threads_command)
1603 (info_mach_thread_command, info_mach_regions_command)
1604 (info_mach_regions_recurse_command, info_mach_region_command)
1605 (info_mach_exceptions_command): Constify.
1606 (get_task_from_args): Constify.
1607 * cp-support.c (info_vtbl_command): Constify.
1608 * breakpoint.c (info_watchpoints_command)
1609 (info_tracepoints_command): Constify.
1610 (info_breakpoints_command): Remove non-const overload.
1611 * avr-tdep.c (avr_io_reg_read_command): Constify.
1612 * auxv.c (info_auxv_command): Constify.
1613 * ada-tasks.c (info_tasks_command): Constify.
1614 (info_task): Constify.
1615 * ada-lang.c (info_exceptions_command): Constify.
1616
0b39b52e
TT
16172017-11-07 Tom Tromey <tom@tromey.com>
1618
1619 * solib.h (no_shared_libraries): Constify.
1620 * frame.h (return_command): Constify.
1621 * cli/cli-cmds.h (quit_command): Constify.
1622 * top.h (quit_command, execute_command): Constify.
1623 * target.h (flash_erase_command): Constify.
1624 * inferior.h (set_inferior_args, attach_command): Constify.
1625 * tracepoint.h (start_tracing, stop_tracing): Constify.
1626 * breakpoint.h (break_command, tbreak_command)
1627 (hbreak_command_wrapper, thbreak_command_wrapper)
1628 (rbreak_command_wrapper, watch_command_wrapper)
1629 (awatch_command_wrapper, rwatch_command_wrapper)
1630 (get_tracepoint_by_number): Constify.
1631 * symtab.c (info_variables_command, rbreak_command)
1632 (symtab_symbol_info): Constify.
1633 (info_variables_command): Add non-const overload.
1634 * top.c (dont_repeat_command): Constify.
1635 * breakpoint.c (ignore_command, commands_command)
1636 (condition_command, tbreak_command, hbreak_command)
1637 (thbreak_command, clear_command, break_command)
1638 (info_breakpoints_command, watch_command, rwatch_command)
1639 (awatch_command, trace_command, ftrace_command, strace_command)
1640 (trace_pass_command, break_range_command, dprintf_command)
1641 (agent_printf_command, get_tracepoint_by_number)
1642 (watch_maybe_just_location, trace_pass_command): Constify.
1643 (info_breakpoints_command): Add non-const overload.
1644 * tracefile.c (tsave_command): Constify.
1645 * infcmd.c (attach_command, disconnect_command, signal_command)
1646 (queue_signal_command, stepi_command, nexti_command)
1647 (finish_command, next_command, step_command, until_command)
1648 (advance_command, jump_command, continue_command, run_command)
1649 (start_command, starti_command, interrupt_command)
1650 (run_command_1, set_inferior_args, step_1): Constify.
1651 * inferior.c (add_inferior_command, remove_inferior_command)
1652 (clone_inferior_command): Constify.
1653 * linux-fork.c (checkpoint_command, restart_command): Constify.
1654 * windows-nat.c (signal_event_command): Constify.
1655 * guile/guile.c (guile_repl_command, guile_command): Constify.
1656 * printcmd.c (x_command, display_command, printf_command)
1657 (output_command, set_command, call_command, print_command)
1658 (eval_command): Constify.
1659 (non_const_set_command): Remove.
1660 (_initialize_printcmd): Update.
1661 * source.c (forward_search_command, reverse_search_command):
1662 Constify.
1663 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1664 Constify.
1665 * infrun.c (handle_command): Constify.
1666 * memattr.c (mem_command): Constify.
1667 * stack.c (return_command, up_command, up_silently_command)
1668 (down_command, down_silently_command, frame_command)
1669 (backtrace_command, func_command, backtrace_command_1): Constify.
1670 (backtrace_command): Add non-const overload.
1671 * remote-sim.c (simulator_command): Constify.
1672 * exec.c (set_section_command): Constify.
1673 * tracepoint.c (tdump_command, trace_variable_command)
1674 (tstatus_command, tstop_command, tstart_command)
1675 (end_actions_pseudocommand, while_stepping_pseudocommand)
1676 (collect_pseudocommand, teval_pseudocommand, actions_command)
1677 (start_tracing, stop_tracing): Constify.
1678 * value.c (init_if_undefined_command): Constify.
1679 * tui/tui-stack.c (tui_update_command): Constify.
1680 * tui/tui-win.c (tui_refresh_all_command)
1681 (tui_set_tab_width_command, tui_set_win_height_command)
1682 (tui_set_focus_command, tui_scroll_forward_command)
1683 (tui_scroll_backward_command, tui_scroll_left_command)
1684 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1685 (tui_set_win_height): Constify.
1686 * tui/tui-layout.c (tui_layout_command): Constify.
1687 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1688 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1689 (proc_untrace_sysexit_cmd): Constify.
1690 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1691 (threadset_test_cmd, threadlist_update_test_cmd)
1692 (threadalive_test): Constify.
1693 * objc-lang.c (print_object_command): Constify.
1694 * command.h (add_com): Constify.
1695 * cli/cli-dump.c (restore_command): Constify.
1696 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1697 (help_command, complete_command, shell_command, edit_command)
1698 (list_command, disassemble_command, make_command)
1699 (apropos_command, alias_command): Constify.
1700 * cli/cli-script.c (document_command, define_command)
1701 (while_command, if_command, validate_comname): Constify.
1702 * cli/cli-decode.c (struct cmd_list_element): Change type of
1703 "fun".
1704 * target.c (do_monitor_command, flash_erase_command): Constify.
1705 * regcache.c (reg_flush_command): Constify.
1706 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1707 (reverse_nexti, reverse_continue, reverse_finish)
1708 (save_bookmark_command, goto_bookmark_command)
1709 (exec_reverse_once): Constify.
1710 * python/python.c (python_interactive_command, python_command):
1711 Constify.
1712 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1713 Constify.
1714 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1715 * gcore.c (gcore_command): Constify.
1716
85c4be7c
TT
17172017-11-07 Tom Tromey <tom@tromey.com>
1718
1719 * printcmd.c (x_command): Call set_repeat_arguments.
1720 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1721 * top.c (repeat_arguments): New global.
1722 (set_repeat_arguments): New function.
1723 (execute_command): Handle repeat_arguments.
1724 (show_commands): Calls set_repeat_arguments.
1725 * command.h (set_repeat_arguments): Declare.
1726
022643b4
TT
17272017-11-07 Tom Tromey <tom@tromey.com>
1728
1729 * stack.c (backtrace_command): Use std::string.
1730 (backtrace_command_1): Make "count_exp" const.
1731
5614fb77
TT
17322017-11-07 Tom Tromey <tom@tromey.com>
1733
1734 * source.c (directory_switch, mod_path, add_path): Constify.
1735 * defs.h (add_path, mod_path, directory_switch): Constify.
1736 * mi/mi-cmd-env.c (env_mod_path): Constify.
1737
6be9a197
TT
17382017-11-07 Tom Tromey <tom@tromey.com>
1739
1740 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1741 (run_command_1, continue_command, step_1, jump_command)
1742 (signal_command, until_command, advance_command, finish_command)
1743 (attach_command): Update.
1744
c2252c0d
TT
17452017-11-07 Tom Tromey <tom@tromey.com>
1746
1747 * command.h (set_cmd_cfunc): Don't declare.
1748 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1749
1ee870c5
TT
17502017-11-07 Tom Tromey <tom@tromey.com>
1751
1752 * stack.c (select_frame_command): Constify.
1753 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1754 * command.h (add_com_suppress_notification): Constify.
1755
ee7ddd71
TT
17562017-11-07 Tom Tromey <tom@tromey.com>
1757
1758 * breakpoint.c (stop_command): Constify.
1759 * cli/cli-decode.c (struct cmd_list_element): Constify.
1760 * command.h (add_abbrev_prefix_cmd): Constify.
1761
95e95a6d
PA
17622017-11-07 Pedro Alves <palves@redhat.com>
1763
1764 * breakpoint.c (extract_bp_kind): New enum.
1765 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1766 factored out from ...
1767 (extract_bp_number_and_location): ... here.
1768 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1769
cc638e86
PA
17702017-11-07 Pedro Alves <palves@redhat.com>
1771
1772 * breakpoint.c (extract_bp_number_and_location): Change return
1773 type to void. Throw error instead of warning.
1774 (enable_disable_command): Adjust.
1775
d0fe4701
XR
17762017-11-07 Xavier Roirand <roirand@adacore.com>
1777 Pedro Alves <palves@redhat.com>
1778
1779 * breakpoint.c (map_breakpoint_number_range): New, factored out
1780 from ...
1781 (map_breakpoint_numbers): ... here.
1782 (find_location_by_number): Change parameters from string to
1783 breakpoint number and location.
1784 (extract_bp_number_and_location): New function.
1785 (enable_disable_bp_num_loc)
1786 (enable_disable_breakpoint_location_range)
1787 (enable_disable_command): New functions, factored out ...
1788 (enable_command, disable_command): ... these functions, and
1789 adjusted to support ranges.
1790 * NEWS: Document enable/disable breakpoint location range feature.
1791
635dc5b2
LM
17922017-11-06 Luis Machado <luis.machado@linaro.org>
1793
1794 * MAINTAINERS (Write After Approval): Update my e-mail address.
1795
556e5da5
PA
17962017-11-06 Pedro Alves <palves@redhat.com>
1797
1798 * gnu-nat.c (gnu_terminal_init): Delete.
1799 (gnu_target): Don't install gnu_terminal_init.
1800 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1801 (child_terminal_init): ... this function.
1802
d1928160
PA
18032017-11-06 Pedro Alves <palves@redhat.com>
1804
1805 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1806 sgtty.h.
1807 * config.in, configure: Regenerate.
1808
6aa899ce
PA
18092017-11-06 Pedro Alves <palves@redhat.com>
1810
1811 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1812 (async_init_signals): Adjust.
1813 (handle_stop_sig): Rename to ...
1814 (handle_sigtstp): ... this.
1815 (async_stop_sig): Rename to ...
1816 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1817 SIGTSTP path.
1818 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1819 instead of STOP_SIGNAL thoughout.
1820 (handle_stop_sig): Rename to ...
1821 (handle_sigtstp): ... this.
1822 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1823
a94799ac
PA
18242017-11-06 Pedro Alves <palves@redhat.com>
1825
1826 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1827 longer set flags twice in row.
1828
726e1356
PA
18292017-11-06 Pedro Alves <palves@redhat.com>
1830
1831 * Makefile.in (SER_HARDWIRE): Update comment.
1832 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1833 * common/gdb_termios.h: Delete file.
1834 * common/job-control.c: Include termios.h and unistd.h instead of
1835 gdb_termios.h.
1836 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1837 check.
1838 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1839 Remove sgtty code.
1840 * configure.ac: No longer check for termio.h and sgtty.h.
1841 * configure: Regenerate.
1842 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1843 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1844 Replace PROCESS_GROUP_TYPE references with pid_t references
1845 throughout.
1846 (gdb_getpgrp): Delete.
1847 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1848 (child_terminal_inferior): Remove comment. Remove sgtty code.
1849 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1850 gdb_getpgrp. Use serial_set_tty_state instead aof
1851 serial_noflush_set_tty_state. Remove sgtty code.
1852 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1853 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1854 (inferior_process_group): Now returns pid_t.
1855 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1856 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1857 * ser-event.c (serial_event_ops): Update.
1858 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1859 (dos_ops): Update.
1860 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1861 * ser-pipe.c (pipe_ops): Update.
1862 * ser-tcp.c (tcp_ops): Update.
1863 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1864 HAVE_TERMIOS checks.
1865 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1866 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1867 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1868 assume termios.
1869 (hardwire_noflush_set_tty_state): Delete.
1870 (hardwire_print_tty_state, hardwire_drain_output)
1871 (hardwire_flush_output, hardwire_flush_input)
1872 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1873 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1874 code, and assume termios.
1875 (hardwire_ops): Update.
1876 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1877 * serial.c (serial_noflush_set_tty_state): Delete.
1878 * serial.h (serial_noflush_set_tty_state): Delete.
1879 (serial_ops::noflush_set_tty_state): Delete.
1880
1cfb73db
UW
18812017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1882
1883 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1884 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1885 (COMMON_OBS): Remove doublest.o and dfp.o.
1886 Do not build target-float.c (instead of doublest.c)
1887 with -Wformat-nonliteral.
1888
1889 * doublest.c: Remove file.
1890 * doublest.h: Remove file.
1891 * dfp.c: Remove file.
1892 * dfp.h: Remove file.
1893
1894 * target-float.c: Do not include "doublest.h" and "dfp.h".
1895 (DOUBLEST): Move here from doublest.h.
1896 (enum float_kind): Likewise.
1897 (FLOATFORMAT_CHAR_BIT): Likewise.
1898 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1899 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1900 (floatformat_precision): Likewise.
1901 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1902 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1903 Likewise.
1904 (host_float_format, host_double_format, host_long_double_format):
1905 Likewise.
1906 (floatformat_to_string, floatformat_from_string): Likewise.
1907 (floatformat_to_doublest): Likewise. Also, inline the original
1908 convert_floatformat_to_doublest.
1909 (floatformat_from_doublest): Likewise. Also, inline the original
1910 convert_floatformat_from_doublest.
1911
1912 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1913 (MAX_DECIMAL_STRING): Move here from dfp.c.
1914 (match_endianness): Likewise.
1915 (set_decnumber_context, decimal_check_errors): Likewise.
1916 (decimal_from_number, decimal_to_number): Likewise.
1917 (decimal_to_string, decimal_from_string): Likewise. Make static.
1918 (decimal_from_longest, decimal_from_ulongest): Likewise.
1919 (decimal_to_longest): Likewise.
1920 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1921 (decimal_convert): Likewise.
1922
b07e9c46
UW
19232017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1924
1925 * doublest.c: Do not include "gdbtypes.h".
1926 (extract_typed_floating): Remove.
1927 (store_typed_floating): Remove.
1928 (convert_typed_floating): Remove.
1929 * doublest.h (struct type): Remove.
1930 (DOUBLEST_PRINT_FORMAT): Remove.
1931 (DOUBLEST_SCAN_FORMAT): Remove.
1932 (extract_typed_floating): Remove.
1933 (store_typed_floating): Remove.
1934 (convert_typed_floating): Remove.
1935
1936 * dfp.c (decimal_from_doublest): Remove.
1937 (decimal_to_doublest): Remove.
1938 * dfp.h: Do not include "doublest.h".
1939 (decimal_from_doublest): Remove.
1940 (decimal_to_doublest): Remove.
1941
1942 * value.c: Do not include "doublest.h" and "dfp.h".
1943 (value_as_double): Remove.
1944 (unpack_double): Remove.
1945 (value_from_double): Remove.
1946 (value_from_decfloat): Remove.
1947 * value.h: Do not include "doublest.h".
1948 (value_as_double): Remove.
1949 (unpack_double): Remove.
1950 (value_from_double): Remove.
1951 (value_from_decfloat): Remove.
1952
3b2ca824
UW
19532017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1954
1955 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1956 (i386_extract_return_value): Use target_float_convert.
1957 (i386_store_return_value): Likewise.
1958 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1959 (i387_value_to_register): Likewise.
1960 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1961 (ia64_register_to_value): Use target_float_convert.
1962 (ia64_value_to_register): Likewise.
1963 (ia64_extract_return_value): Likewise.
1964 (ia64_store_return_value): Likewise.
1965 (ia64_push_dummy_call): Likewise.
1966 * m68k-tdep.c: Include "target-float.h".
1967 (m68k_register_to_value): Use target_float_convert.
1968 (m68k_value_to_register): Likewise.
1969 (m68k_svr4_extract_return_value): Likewise.
1970 (m68k_svr4_store_return_value): Likewise.
1971 * ppc-sysv-tdep.c: Include "target-float.h".
1972 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1973 (do_ppc_sysv_return_value): Likewise.
1974 (ppc64_sysv_abi_push_freg): Likewise.
1975 (ppc64_sysv_abi_return_value_base): Likewise.
1976 * rs6000-aix-tdep.c: Include "target-float.h".
1977 (rs6000_push_dummy_call): Use target_float_convert.
1978 (rs6000_return_value): Likewise.
1979 * rs6000-lynx178-tdep.c: Include "target-float.h".
1980 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1981 (rs6000_lynx178_return_value): Likewise.
1982 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1983 (rs6000_register_to_value): Use target_float_convert.
1984 (rs6000_value_to_register): Likewise.
1985 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1986 (arm_extract_return_value): Use target_float_convert.
1987 (arm_store_return_value): Likewise.
1988 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1989 (sh_register_convert_to_virtual): Use target_float_convert.
1990 (sh_register_convert_to_raw): Likewise.
1991 * sh64-tdep.c: Include "target-float.h".
1992 (sh64_extract_return_value): Use target_float_convert.
1993 (sh64_register_convert_to_virtual): Likewise.
1994 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1995
14ad9311
UW
19962017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1997
1998 * target-float.c (floatformat_to_host_double): New function.
1999 (floatformat_from_host_double): Likewise.
2000 (target_float_to_host_double): Likewise.
2001 (target_float_from_host_double): Likewise.
2002 * target-float.h (target_float_to_host_double): Add prototype.
2003 (target_float_from_host_double): Likewise.
2004
2005 * guile/scm-value.c: Include "target-float.h".
2006 (gdbscm_value_to_real): Use target_float_to_host_double.
2007 Handle integer source values via value_as_long.
2008 * guile/scm-math.c: Include "target-float.h". Do not include
2009 "doublest.h", "dfp.h", and "expression.h".
2010 (vlscm_convert_typed_number): Use target_float_from_host_double.
2011 (vlscm_convert_number): Likewise.
2012
2013 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2014 (convert_value_from_python): Use target_float_from_host_double.
2015
50eff16b
UW
20162017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2017
2018 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2019 (cast_from_fixed): Likewise.
2020 (ada_scaling_type): New function.
2021 (ada_delta): Return value instead of DOUBLEST. Perform target
2022 arithmetic instead of host arithmetic.
2023 (scaling_factor): Rename to ...
2024 (ada_scaling_factor) ... this. Make non-static. Return value instead
2025 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2026 (ada_fixed_to_float): Remove.
2027 (ada_float_to_fixed): Remove.
2028 * ada-lang.h (ada_fixed_to_float): Remove.
2029 (ada_float_to_fixed): Remove.
2030 (ada_delta): Return value instead of DOUBLEST.
2031 (ada_scaling_factor): Add prototype.
2032
2033 * ada-typeprint.c: Include "target-float.h".
2034 (print_fixed_point_type): Perform target arithmetic instead of
2035 host arithmetic.
2036 * ada-valprint.c: Include "target-float.h".
2037 (ada_val_print_num): Perform target arithmetic instead of
2038 host arithmetic for fixed-point types.
2039
66c02b9e
UW
20402017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2041
2042 * target-float.c: Include <math.h>.
2043 (floatformat_binop): New function.
2044 (floatformat_compare): Likewise.
2045 (target_float_binop): Likewise.
2046 (target_float_compare): Likewise.
2047 * target-float.h: Include "expression.h".
2048 (target_float_binop): Add prototype.
2049 (target_float_compare): Likewise.
2050
2051 * valarith.c: Do not include "doublest.h" and "dfp.h".
2052 Include "common/byte-vector.h".
2053 (value_args_as_decimal): Remove, replace by ...
2054 (value_args_as_target_float): ... this function. Handle both
2055 binary and decimal target floating-point formats.
2056 (scalar_binop): Handle both binary and decimal FP using
2057 value_args_as_target_float and target_float_binop.
2058 (value_equal): Handle both binary and decimal FP using
2059 value_args_as_target_float and target_float_compare.
2060 (value_less): Likewise.
2061 (value_pos): Handle all scalar types as simple copy.
2062 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2063 * dfp.c (decimal_binop): Throw error instead of internal_error
2064 when called with an unsupported operation code.
2065
f69fdf9b
UW
20662017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2067
2068 * target-float.c (target_float_to_string): New function.
2069 (target_float_from_string): New function.
2070 * target-float.h (target_float_to_string): Add prototype.
2071 (target_float_from_string): Add prototype.
2072
2073 * valprint.c: Include "target-float.h". Do not include
2074 "doublest.h" and "dfp.h".
2075 (print_floating): Use target_float_to_string.
2076 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2077 (printf_floating): Use target_float_to_string.
2078 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2079 (print_i387_value): Use target_float_to_string.
2080 * mips-tdep.c: Include "target-float.h".
2081 (mips_print_fp_register): Use target_float_to_string.
2082 * sh64-tdep.c: Include "target-float.h".
2083 (sh64_do_fp_register): Use target_float_to_string.
2084
2085 * parse.c: Include "target-float.h". Do not include
2086 "doublest.h" and "dfp.h".
2087 (parse_float): Use target_float_from_string.
2088 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2089 (define_symbol): Use target_float_from_string.
2090 * gdbarch-selftests.c: Include "target-float.h".
2091 (register_to_value_test): Use target_float_from_string.
2092
70100014
UW
20932017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2094
2095 * Makefile.c (SFILES): Add target-float.c.
2096 (HFILES_NO_SRCDIR): Add target-float.h.
2097 (COMMON_OBS): Add target-float.o.
2098 * target-float.h: New file.
2099 * target-float.c: New file.
2100
2101 * doublest.c (floatformat_classify): Fix detection of float_zero.
2102
2103 * gdbtypes.c (is_floating_type): New function.
2104 * gdbtypes.h (is_floating_type): Add prototype.
2105
2106 * value.c: Do not include "floatformat.h".
2107 (unpack_double): Use target_float_is_valid.
2108 (is_floating_value): New function.
2109 * value.h (is_floating_value): Add prototype-
2110
2111 * valarith.c: Include "target-float.h".
2112 (value_logical_not): Use target_float_is_zero.
2113
2114 * python/py-value.c: Include "target-float.h".
2115 (valpy_nonzero): Use target_float_is_zero.
2116
ab4b1c46
TT
21172017-11-04 Tom Tromey <tom@tromey.com>
2118
2119 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2120
454dafbd
TT
21212017-11-04 Tom Tromey <tom@tromey.com>
2122
2123 * breakpoint.c (set_momentary_breakpoint): Return
2124 breakpoint_up.
2125 (until_break_command): Update.
2126 (new_until_break_fsm): Change argument types to
2127 breakpoint_up.
2128 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2129 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2130 Remove.
2131 * infcmd.c (finish_forward): Update.
2132 * breakpoint.h (set_momentary_breakpoint)
2133 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2134 (make_cleanup_delete_breakpoint): Remove.
2135 (struct breakpoint_deleter): New.
2136 (breakpoint_up): New typedef.
2137 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2138 (insert_exception_resume_breakpoint): Update.
2139 (insert_exception_resume_from_probe): Update.
2140 (insert_longjmp_resume_breakpoint): Update.
2141 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2142 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2143 * infcall.c (call_function_by_hand_dummy): Update
2144
331b71e5
TT
21452017-11-04 Tom Tromey <tom@tromey.com>
2146
2147 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2148
9f584b37
TT
21492017-11-04 Tom Tromey <tom@tromey.com>
2150
2151 * linux-tdep.c (linux_core_info_proc_mappings): Use
2152 gdb::def_vector.
2153 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2154 "size" argument.
2155 (linux_corefile_thread): Update.
2156 (linux_make_corefile_notes): Remove unused variable.
2157
779bc38e
TT
21582017-11-04 Tom Tromey <tom@tromey.com>
2159
2160 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2161 gdb::byte_vector.
2162
ed2b3126
TT
21632017-11-04 Tom Tromey <tom@tromey.com>
2164
2165 * objfiles.c (do_free_objfile_cleanup): Remove.
2166 * compile/compile-object-load.c (compile_object_load): Update.
2167 * objfiles.h (make_cleanup_free_objfile): Remove.
2168
7f6743fd
TT
21692017-11-04 Tom Tromey <tom@tromey.com>
2170
2171 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2172 (adi_read_versions): Change "tags" to "gdb_byte *".
2173 (adi_print_versions): Likewise.
2174
c80049d3
TT
21752017-11-04 Tom Tromey <tom@tromey.com>
2176
2177 * breakpoint.c
2178 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2179 from start_rbreak_breakpoints.
2180 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2181 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2182 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2183 * symtab.c (do_end_rbreak_breakpoints): Remove.
2184 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2185
167b0be1
TT
21862017-11-04 Tom Tromey <tom@tromey.com>
2187
2188 * cp-namespace.c (reset_directive_searched): Remove.
2189 (cp_lookup_symbol_via_imports): Use scoped_restore.
2190 * cp-support.c (reset_directive_searched): Remove.
2191 (make_symbol_overload_list_using): Use scoped_restore.
2192 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2193 (reset_directive_searched): Remove.
2194
5eae7aea
TT
21952017-11-04 Tom Tromey <tom@tromey.com>
2196
2197 * symfile.c (find_separate_debug_file_by_debuglink): Use
2198 unique_xmalloc_ptr.
2199
c6bcad5f
TT
22002017-11-04 Tom Tromey <tom@tromey.com>
2201
2202 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2203 type of "info".
2204 (compute_stack_depth): Likewise.
2205 (do_compile_dwarf_expr_to_c): Use std::vector.
2206
20dcd8ca
TT
22072017-11-04 Tom Tromey <tom@tromey.com>
2208
2209 * compile/compile-object-load.c (link_callbacks_einfo): Use
2210 std::string.
2211
33c7c59d
TT
22122017-11-04 Tom Tromey <tom@tromey.com>
2213
2214 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2215 Use scoped_free_pendings.
2216 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2217 scoped_free_pendings.
2218 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2219 (xcoff_initial_scan): Likewise.
2220 * buildsym.c (reset_symtab_globals): Update comment.
2221 (scoped_free_pendings): Rename from really_free_pendings.
2222 (prepare_for_building): Update comment.
2223 (buildsym_init): Likewise.
2224 * buildsym.h (class scoped_free_pendings): New class.
2225 (really_free_pendings): Don't declare.
2226
67fa57cf
UW
22272017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2228
2229 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2230 output when converting a zero value to a special byteorder format.
2231
f26ae15b
YQ
22322017-11-02 Yao Qi <yao.qi@linaro.org>
2233
2234 * frame.c (do_frame_register_read): Remove aspace.
2235 * jit.c (jit_frame_sniffer): Likwise.
2236 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2237 * regcache.c (regcache::regcache): Pass nullptr.
2238 (regcache_print): Caller updated.
2239 * regcache.h (regcache::regcache): Remove one constructor
2240 parameter aspace.
2241
6c6e9412
YQ
22422017-11-02 Yao Qi <yao.qi@linaro.org>
2243
2244 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2245
8b86c959
YQ
22462017-11-02 Yao Qi <yao.qi@linaro.org>
2247
2248 * breakpoint.c (insert_single_step_breakpoints): Update.
2249 * frame.c (struct frame_info) <aspace>: Add const.
2250 (frame_save_as_regcache): Add const.
2251 (get_frame_address_space): Return const address_space *.
2252 * frame.h (get_frame_address_space): Update declaration.
2253 * infrun.c (struct step_over_info) <aspace>: Add const.
2254 (set_step_over_info): Make aspace const.
2255 (displaced_step_prepare_throw): Change variable const.
2256 (resume): Likewise.
2257 (proceed): Likewise.
2258 (adjust_pc_after_break): Likewise.
2259 (save_waitstatus): Likewise.
2260 (handle_signal_stop): Likewise.
2261 (keep_going_pass_signal): Likewise.
2262 * jit.c (jit_frame_sniffer): Add const.
2263 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2264 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2265 * record-full.c (record_full_wait_1): Likewise.
2266 * regcache.c (regcache::regcache): Change parameter to const.
2267 * regcache.h (regcache::regcache): Likewise.
2268 (regcache::aspace): Return const address_space *.
2269 (regcache) <m_aspace>: Add const.
2270
a01bda52
YQ
22712017-11-02 Yao Qi <yao.qi@linaro.org>
2272
2273 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2274 * frame.c (create_sentinel_frame): Likewise.
2275 * infrun.c (displaced_step_prepare_throw): Likewise.
2276 (resume): Likewise.
2277 (thread_still_needs_step_over_bp): Likewise.
2278 (proceed): Likewise.
2279 (do_target_wait): Likewise.
2280 (adjust_pc_after_break): Likewise.
2281 (handle_syscall_event): Likewise.
2282 (save_waitstatus): Likewise.
2283 (handle_inferior_event_1): Likewise.
2284 (handle_signal_stop): Likewise.
2285 (keep_going_pass_signal): Likewise.
2286 * linux-nat.c (status_callback): Likewise.
2287 (save_stop_reason): Likewise.
2288 (resume_stopped_resumed_lwps): Likewise.
2289 * record-full.c (record_full_exec_insn): Likewise.
2290 (record_full_wait_1): Likewise.
2291 * regcache.c (get_regcache_aspace): Remove.
2292 * regcache.h (get_regcache_aspace): Remove.
2293
d999647b
YQ
22942017-11-02 Yao Qi <yao.qi@linaro.org>
2295
2296 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2297 (init_regcache_descr): Use gdbarch_num_regs.
2298 (regcache::regcache): Likewise.
2299 (regcache::get_register_status): Likewise.
2300 (regcache::assert_raw_regnum): Likewise.
2301 (regcache::cooked_read): Likewise.
2302 (regcache::cooked_read_value): Likewise.
2303 (regcache::cooked_write): Likewise.
2304 (regcache::dump): Likewise.
2305 (regcache::num_raw_registers): New method.
2306 * regcache.h (class regcache) <num_raw_registers>: New.
2307
4e888c28
YQ
23082017-11-02 Yao Qi <yao.qi@linaro.org>
2309
2310 * regcache.c (regcache::assert_regnum): New method.
2311 (regcache::invalidate): Call assert_regnum.
2312 (regcache::raw_update): Likewise.
2313 (regcache::raw_write): Likewise.
2314 (regcache::raw_read_part): Likewise.
2315 (regcache::raw_write_part): Likewise.
2316 (regcache::raw_supply): Likewise.
2317 (regcache::raw_supply_integer): Likewise.
2318 (regcache::raw_supply_zeroed): Likewise.
2319 (regcache::raw_collect): Likewise.
2320 (regcache::raw_collect_integer): Likewise.
2321 * regcache.h (regcache::assert_regnum): Declare.
2322
2e1b49b3
YQ
23232017-11-02 Yao Qi <yao.qi@linaro.org>
2324
2325 * regcache.c (regcache::dump): Remove code.
2326
6c5218df
YQ
23272017-11-02 Yao Qi <yao.qi@linaro.org>
2328
2329 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2330 Remove.
2331 <sizeof_cooked_register_status>: Remove.
2332 (init_regcache_descr): Update.
2333 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2334 (regcache::save): Likewise.
2335 (regcache::dump): Likewise.
2336
dcc31d28
JB
23372017-11-01 James Bowman <james.bowman@ftdichip.com>
2338
2339 * ft32-tdep.c (ft32_fetch_instruction): New function.
2340 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2341
3a87ae65
SM
23422017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2343
2344 * cli/cli-script.c (execute_control_command): Rename to ...
2345 (execute_control_command_1): ... this.
2346 (execute_control_command): New function.
2347
09b847f3
SM
23482017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2349
2350 * tracepoint.c (tfind_command): Remove const_cast.
2351
f871c485
MG
23522017-10-30 Mike Gulick <mgulick@mathworks.com>
2353
2354 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2355
b020ff80
SM
23562017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2357
2358 * common/common-utils.h (in_inclusive_range): New function.
2359 * arm-tdep.c (arm_record_extension_space): Use
2360 in_inclusive_range.
2361 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2362 * cris-tdep.c (cris_spec_reg_applicable): Use
2363 in_inclusive_range.
2364
1b81856f
PA
23652017-10-30 Pedro Alves <palves@redhat.com>
2366 Simon Marchi <simon.marchi@ericsson.com>
2367
2368 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2369 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2370
31b833b3
PA
23712017-10-30 Pedro Alves <palves@redhat.com>
2372
2373 * common/common-utils.c (string_appendf, string_vappendf): New
2374 functions.
2375 * common/common-utils.h (string_appendf, string_vappendf): New
2376 declarations.
2377 * unittests/common-utils-selftests.c (string_appendf_func)
2378 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2379 (string_vappendf_tests): New functions.
2380 (_initialize_common_utils_selftests): Register "string_appendf" and
2381 "string_vappendf tests".
2382
4a250334
PA
23832017-10-30 Pedro Alves <palves@redhat.com>
2384
2385 * unittests/common-utils-selftests.c (format_func): New typedef.
2386 (string_printf_tests, string_vprintf_tests): Tests factored out
2387 and merged to ...
2388 (test_format_func): ... this new function.
2389 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2390 test_format_func.
2391
16c5c17e
SM
23922017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2393
2394 * darwin-nat.c: Remove include of gdb.h.
2395
7ca51576
SM
23962017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2397
2398 * xtensa-xtregs.c: Fix formatting issues.
2399
c1342859
SM
24002017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2401
2402 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2403
484d8d36
MD
24042017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2405
2406 PR python/21213
2407 * python/py-infthread.c (thpy_get_inferior): Increment reference
2408 of inferior before returning it.
2409
b5540b5f
SM
24102017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2411
2412 * unittests/common-utils-selftests.c (format): Add
2413 ATTRIBUTE_PRINTF.
2414
5a9dcda1
SM
24152017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2416
2417 * xml-syscall.c (struct syscall_desc): Add constructor.
2418 <name>: Change type to std::string.
2419 (syscall_desc_up): New typedef.
2420 (syscall_desc_p): Remove typeder.
2421 (DEF_VEC_P(syscall_desc_p)): Remove.
2422 (struct syscall_group_desc): Add constructor.
2423 <name>: Change type to std::string.
2424 <syscalls>: Change type to std::vector.
2425 (syscall_group_desc_up): New typedef.
2426 (syscall_group_desc_p): Remove typedef.
2427 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2428 (struct syscalls_info) <syscalls>: Change type to std::vector of
2429 unique_ptr.
2430 <groups>: Likewise.
2431 <my_gdb_datadir>: Change type to std::string.
2432 (syscalls_info_up): New typedef.
2433 (allocate_syscalls_info): Remove.
2434 (syscalls_info_free_syscalls_desc): Remove.
2435 (syscalls_info_free_syscall_group_desc): Remove.
2436 (free_syscalls_info): Remove.
2437 (make_cleanup_free_syscalls_info): Remove.
2438 (syscall_group_create_syscall_group_desc): Adjust.
2439 (syscall_group_add_syscall): Adjust.
2440 (syscall_create_syscall_desc): Adjust.
2441 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2442 (init_syscalls_info): Adjust.
2443 (syscall_group_get_group_by_name): Adjust.
2444 (xml_get_syscall_number): Adjust.
2445 (xml_get_syscall_name): Adjust.
2446 (xml_list_of_syscalls): Adjust.
2447 (xml_list_syscalls_by_group): Adjust.
2448 (xml_list_of_groups): Adjust.
2449
45461e0d
SM
24502017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2451
2452 * probe.h: Don't include gdb_vecs.h.
2453 (DEF_VEC_P (probe_p)): Remove.
2454 (find_probes_in_objfile): Return an std::vector.
2455 * probe.c (find_probes_in_objfile): Likewise.
2456 * breakpoint.c (breakpoint_objfile_data)
2457 <longjmp_probes>: Change type to std::vector.
2458 <exception_probes>: Likewise.
2459 (free_breakpoint_probes): Don't manually free vectors.
2460 (create_longjmp_master_breakpoint): Adjust.
2461 (create_exception_master_breakpoint): Adjust.
2462 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2463 parameter type, adjust.
2464 (svr4_create_solib_event_breakpoints): Adjust.
2465
43dce439
SM
24662017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2467
2468 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2469 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2470 with new.
2471 (free_breakpoint_probes): Rename to ...
2472 (free_breakpoint_objfile_data): ... this, and call delete on
2473 bp_objfile_data..
2474
6a1b9516
SM
24752017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2476
2477 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2478 (loaded_script_ptr): Remove typedef.
2479 (DEF_VEC_P (loaded_script_ptr)): Remove.
2480 (struct collect_matching_scripts_data): Add constructor.
2481 <scripts_p>: Change type to (pointer to) std::vector.
2482 (collect_matching_scripts_data): Adjust.
2483 (sort_scripts_by_name): Make suitable for std::sort.
2484 (print_scripts): Don't sort vector, adjust to std::vector.
2485 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2486
593e3209
SM
24872017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2488
2489 * symfile.c (filename_language): Make struct, not typedef. Add
2490 constructor.
2491 <ext>: Change type to std::string.
2492 (DEF_VEC_O (filename_language)): Remove.
2493 (filename_language_table): Change type to std::vector.
2494 (add_filename_language): Adjust.
2495 (set_ext_lang_command): Adjust.
2496 (info_ext_lang_command): Adjust.
2497 (deduce_language_from_filename): Adjust.
2498 (class scoped_restore_filename_language_table): Remove.
2499 (test_filename_language): Use scoped_restore.
2500 (test_set_ext_lang_command): Use scoped_restore, adjust to
2501 std::vector change.
2502
32fa66eb
SM
25032017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2504
2505 * symfile.c: Include selftest.h.
2506 (class scoped_restore_filename_language_table): New.
2507 (test_filename_language): New test.
2508 (test_set_ext_lang_command): New test.
2509 (_initialize_symfile): Register tests.
2510
4a27f119
KS
25112017-10-27 Keith Seitz <keiths@redhat.com>
2512
2513 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2514 in the bp_location, falling back to find_pc_sect_function when
2515 needed.
2516 (add_location_to_breakpoint): Save sal->symbol.
2517 * breakpoint.h (struct bp_location) <symbol>: New field.
2518 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2519 * symtab.h (struct symtab_and_line) <symbol>: New field.
2520
a43f3893
PF
25212017-10-26 Patrick Frants <osscontribute@gmail.com>
2522
7453e6b2 2523 PR gdb/13669
a43f3893
PF
2524 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2525 to rewind obstack.
2526
23cc4e1b
PA
25272017-10-26 Pedro Alves <palves@redhat.com>
2528
2529 * remote.c (remote_async_terminal_ours_p): Delete.
2530 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2531 Remove references to 'remote_async_terminal_ours_p'.
2532
6abc18bb
YQ
25332017-10-26 Yao Qi <yao.qi@linaro.org>
2534
2535 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2536
bd522513
YQ
25372017-10-26 Yao Qi <yao.qi@linaro.org>
2538
2539 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2540 aspace const.
2541 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2542 Likewise.
2543 * breakpoint.c (bpstat_check_location): Remove cast.
2544 (breakpoint_hit_catch_fork): Make aspce const.
2545 (breakpoint_hit_catch_solib): Likewise.
2546 (breakpoint_hit_catch_exec): Likewise.
2547 (breakpoint_hit_ranged_breakpoint): Likewise.
2548 (breakpoint_hit_watchpoint): Likewise.
2549 (base_breakpoint_breakpoint_hit): Likewise.
2550 (bkpt_breakpoint_hit): Likewise.
2551 (dprintf_breakpoint_hit): Likewise.
2552 (tracepoint_breakpoint_hit): Likewise.
2553 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2554
accd0bcd
YQ
25552017-10-26 Yao Qi <yao.qi@linaro.org>
2556
2557 * breakpoint.c (breakpoint_location_address_match): Change
2558 "struct address_space *" to "const address_space".
2559 (breakpoint_location_address_range_overlap): Likewise.
2560 (breakpoint_here_p): Likewise.
2561 (breakpoint_in_range_p): Likewise.
2562 (moribund_breakpoint_here_p): Likewise.
2563 (bp_location_inserted_here_p): Likewise.
2564 (software_breakpoint_inserted_here_p): Likewise.
2565 (hardware_breakpoint_inserted_here_p): Likewise.
2566 (hardware_watchpoint_inserted_in_range): Likewise.
2567 (bpstat_check_location): Likewise.
2568 (bpstat_stop_status): Likewise.
2569 (breakpoint_address_match): Likewise.
2570 (breakpoint_address_match_range): Likewise.
2571 (breakpoint_location_address_match): Likewise.
2572 (breakpoint_location_address_range_overlap): Likewise.
2573 (insert_single_step_breakpoint): Likewise.
2574 (breakpoint_has_location_inserted_here): Likewise.
2575 (single_step_breakpoint_inserted_here_p): Likewise.
2576 (pc_at_non_inline_function): Likewise.
2577 * breakpoint.h (bpstat_stop_status): Update declaration.
2578 (breakpoint_here_p): Likewise.
2579 (breakpoint_in_range_p): Likewise.
2580 (moribund_breakpoint_here_p): Likewise.
2581 (breakpoint_inserted_here_p): Likewise.
2582 (software_breakpoint_inserted_here_p): Likewise.
2583 (hardware_breakpoint_inserted_here_p): Likewise.
2584 (breakpoint_has_location_inserted_here): Likewise.
2585 (single_step_breakpoint_inserted_here_p): Likewise.
2586 (hardware_watchpoint_inserted_in_range): Likewise.
2587 (breakpoint_address_match): Likewise.
2588 (insert_single_step_breakpoint): Likewise.
2589 (pc_at_non_inline_function): Likewise.
2590 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2591 * record.c (record_check_stopped_by_breakpoint): Likewise.
2592 * record.h (record_check_stopped_by_breakpoint): Likewise.
2593 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2594
ac7936df
YQ
25952017-10-25 Yao Qi <yao.qi@linaro.org>
2596
2597 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2598 regcache->arch () instead get_regcache_arch.
2599 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2600 Likewise.
2601 (aarch64_fbsd_store_inferior_registers): Likewise.
2602 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2603 (store_gregs_to_thread): Likewise.
2604 (fetch_fpregs_from_thread): Likewise.
2605 (store_fpregs_to_thread): Likewise.
2606 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2607 (aarch64_store_return_value): Likewise.
2608 (aarch64_software_single_step): Likewise.
2609 * aix-thread.c (aix_thread_wait): Likewise.
2610 (supply_reg32): Likewise.
2611 (supply_sprs64): Likewise.
2612 (supply_sprs32): Likewise.
2613 (fill_gprs64): Likewise.
2614 (fill_gprs32): Likewise.
2615 (fill_sprs64): Likewise.
2616 (fill_sprs32): Likewise.
2617 (store_regs_user_thread): Likewise.
2618 (store_regs_kernel_thread): Likewise.
2619 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2620 (alphabsd_store_inferior_registers): Likewise.
2621 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2622 (alpha_store_return_value): Likewise.
2623 (alpha_deal_with_atomic_sequence): Likewise.
2624 (alpha_next_pc): Likewise.
2625 (alpha_software_single_step): Likewise.
2626 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2627 (amd64bsd_store_inferior_registers): Likewise.
2628 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2629 Likewise.
2630 (amd64_linux_store_inferior_registers): Likewise.
2631 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2632 (amd64_collect_native_gregset): Likewise.
2633 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2634 (amd64obsd_collect_uthread): Likewise.
2635 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2636 (amd64_collect_fpregset): Likewise.
2637 (amd64_supply_fxsave): Likewise.
2638 (amd64_supply_xsave): Likewise.
2639 (amd64_collect_fxsave): Likewise.
2640 (amd64_collect_xsave): Likewise.
2641 * arc-tdep.c (arc_write_pc): Likewise.
2642 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2643 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2644 (arm_fbsd_store_inferior_registers): Likewise.
2645 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2646 (store_vfp_regs): Likewise.
2647 (arm_linux_fetch_inferior_registers): Likewise.
2648 (arm_linux_store_inferior_registers): Likewise.
2649 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2650 (arm_linux_sigreturn_next_pc): Likewise.
2651 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2652 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2653 (fetch_register): Likewise.
2654 (store_register): Likewise.
2655 * arm-tdep.c (arm_is_thumb): Likewise.
2656 (displaced_in_arm_mode): Likewise.
2657 (bx_write_pc): Likewise.
2658 (arm_get_next_pcs_addr_bits_remove): Likewise.
2659 (arm_software_single_step): Likewise.
2660 (arm_extract_return_value): Likewise.
2661 (arm_store_return_value): Likewise.
2662 (arm_write_pc): Likewise.
2663 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2664 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2665 (bsd_uthread_store_registers): Likewise.
2666 * core-regset.c (fetch_core_registers): Likewise.
2667 * corelow.c (get_core_registers): Likewise.
2668 * cris-tdep.c (cris_store_return_value): Likewise.
2669 (cris_extract_return_value): Likewise.
2670 (find_step_target): Likewise.
2671 (find_step_target): Likewise.
2672 (cris_software_single_step): Likewise.
2673 * ctf.c (ctf_fetch_registers): Likewise.
2674 * darwin-nat.c (cancel_breakpoint): Likewise.
2675 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2676 * frv-tdep.c (frv_extract_return_value): Likewise.
2677 * ft32-tdep.c (ft32_store_return_value): Likewise.
2678 (ft32_extract_return_value): Likewise.
2679 * go32-nat.c (fetch_register): Likewise.
2680 (go32_fetch_registers): Likewise.
2681 (go32_store_registers): Likewise.
2682 (store_register): Likewise.
2683 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2684 (h8300_store_return_value): Likewise.
2685 * hppa-linux-nat.c (fetch_register): Likewise.
2686 (store_register): Likewise.
2687 (hppa_linux_fetch_inferior_registers): Likewise.
2688 (hppa_linux_store_inferior_registers): Likewise.
2689 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2690 (i386_darwin_store_inferior_registers): Likewise.
2691 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2692 (gnu_store_registers): Likewise.
2693 * i386-linux-nat.c (fetch_register): Likewise.
2694 (store_register): Likewise.
2695 (supply_gregset): Likewise.
2696 (fill_gregset): Likewise.
2697 (i386_linux_fetch_inferior_registers): Likewise.
2698 (i386_linux_store_inferior_registers): Likewise.
2699 (i386_linux_resume): Likewise.
2700 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2701 Likewise.
2702 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2703 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2704 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2705 (i386obsd_collect_uthread): Likewise.
2706 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2707 (i386_supply_gregset): Likewise.
2708 (i386_collect_gregset): Likewise.
2709 (i386_supply_fpregset): Likewise.
2710 (i386_collect_fpregset): Likewise.
2711 (i386_mpx_bd_base): Likewise.
2712 * i386-v4-nat.c (supply_fpregset): Likewise.
2713 (fill_fpregset): Likewise.
2714 * i387-tdep.c (i387_supply_fsave): Likewise.
2715 (i387_collect_fsave): Likewise.
2716 (i387_supply_fxsave): Likewise.
2717 (i387_collect_fxsave): Likewise.
2718 (i387_supply_xsave): Likewise.
2719 (i387_collect_xsave): Likewise.
2720 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2721 (ia64_linux_store_registers): Likewise.
2722 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2723 (ia64_extract_return_value): Likewise.
2724 (ia64_store_return_value): Likewise.
2725 (find_func_descr): Likewise.
2726 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2727 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2728 (inf_ptrace_store_registers): Likewise.
2729 * infrun.c (use_displaced_stepping): Likewise.
2730 (displaced_step_prepare_throw): Likewise.
2731 (resume): Likewise.
2732 (proceed): Likewise.
2733 (do_target_wait): Likewise.
2734 (adjust_pc_after_break): Likewise.
2735 (handle_inferior_event_1): Likewise.
2736 (handle_signal_stop): Likewise.
2737 (save_infcall_suspend_state): Likewise.
2738 (restore_infcall_suspend_state): Likewise.
2739 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2740 * jit.c (jit_frame_prev_register): Likewise.
2741 * linux-nat.c (save_stop_reason): Likewise.
2742 (linux_nat_wait_1): Likewise.
2743 (resume_stopped_resumed_lwps): Likewise.
2744 * linux-record.c (record_linux_sockaddr): Likewise.
2745 (record_linux_msghdr): Likewise.
2746 (record_linux_system_call): Likewise.
2747 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2748 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2749 (lm32_store_return_value): Likewise.
2750 * m32c-tdep.c (m32c_read_flg): Likewise.
2751 (m32c_pseudo_register_read): Likewise.
2752 (m32c_pseudo_register_write): Likewise.
2753 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2754 (m32r_linux_collect_gregset): Likewise.
2755 * m32r-tdep.c (m32r_store_return_value): Likewise.
2756 (m32r_extract_return_value): Likewise.
2757 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2758 (m68kbsd_collect_fpregset): Likewise.
2759 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2760 * m68k-linux-nat.c (fetch_register): Likewise.
2761 (old_fetch_inferior_registers): Likewise.
2762 (old_store_inferior_registers): Likewise.
2763 (store_regs): Likewise.
2764 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2765 (m68k_svr4_store_return_value): Likewise.
2766 * m88k-tdep.c (m88k_store_arguments): Likewise.
2767 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2768 (mi_cmd_data_write_register_values): Likewise.
2769 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2770 (mips_fbsd_store_inferior_registers): Likewise.
2771 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2772 (mips_fbsd_supply_gregs): Likewise.
2773 (mips_fbsd_collect_fpregs): Likewise.
2774 (mips_fbsd_collect_gregs): Likewise.
2775 (mips_fbsd_supply_fpregset): Likewise.
2776 (mips_fbsd_collect_fpregset): Likewise.
2777 (mips_fbsd_supply_gregset): Likewise.
2778 (mips_fbsd_collect_gregset): Likewise.
2779 * mips-linux-nat.c (supply_gregset): Likewise.
2780 (fill_gregset): Likewise.
2781 (supply_fpregset): Likewise.
2782 (fill_fpregset): Likewise.
2783 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2784 (mips_fill_gregset): Likewise.
2785 (mips_supply_fpregset): Likewise.
2786 (mips_fill_fpregset): Likewise.
2787 (mips64_supply_gregset): Likewise.
2788 (micromips_linux_sigframe_validate): Likewise.
2789 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2790 (mipsnbsd_fetch_inferior_registers): Likewise.
2791 (mipsnbsd_store_inferior_registers): Likewise.
2792 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2793 (mipsnbsd_supply_gregset): Likewise.
2794 (mipsnbsd_iterate_over_regset_sections): Likewise.
2795 (mipsnbsd_supply_reg): Likewise.
2796 (mipsnbsd_supply_fpreg): Likewise.
2797 * mips-tdep.c (mips_in_frame_stub): Likewise.
2798 (mips_dummy_id): Likewise.
2799 (is_octeon_bbit_op): Likewise.
2800 (micromips_bc1_pc): Likewise.
2801 (extended_mips16_next_pc): Likewise.
2802 (mips16_next_pc): Likewise.
2803 (deal_with_atomic_sequence): Likewise.
2804 * moxie-tdep.c (moxie_process_readu): Likewise.
2805 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2806 * nto-procfs.c (procfs_store_registers): Likewise.
2807 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2808 (ppcfbsd_store_inferior_registers): Likewise.
2809 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2810 (fetch_altivec_register): Likewise.
2811 (get_spe_registers): Likewise.
2812 (fetch_spe_register): Likewise.
2813 (fetch_altivec_registers): Likewise.
2814 (fetch_all_gp_regs): Likewise.
2815 (fetch_all_fp_regs): Likewise.
2816 (store_vsx_register): Likewise.
2817 (store_altivec_register): Likewise.
2818 (set_spe_registers): Likewise.
2819 (store_spe_register): Likewise.
2820 (store_altivec_registers): Likewise.
2821 (store_all_gp_regs): Likewise.
2822 (store_all_fp_regs): Likewise.
2823 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2824 (ppc_linux_collect_gregset): Likewise.
2825 (ppc_canonicalize_syscall): Likewise.
2826 (ppc_linux_record_signal): Likewise.
2827 (ppu2spu_prev_register): Likewise.
2828 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2829 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2830 (ppcobsd_store_registers): Likewise.
2831 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2832 Likewise.
2833 (ppc_ravenscar_generic_store_registers): Likewise.
2834 * procfs.c (procfs_fetch_registers): Likewise.
2835 (procfs_store_registers): Likewise.
2836 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2837 (ravenscar_store_registers): Likewise.
2838 (ravenscar_prepare_to_store): Likewise.
2839 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2840 * record-full.c (record_full_wait_1): Likewise.
2841 (record_full_registers_change): Likewise.
2842 (record_full_store_registers): Likewise.
2843 (record_full_core_fetch_registers): Likewise.
2844 (record_full_save): Likewise.
2845 (record_full_goto_insn): Likewise.
2846 * regcache.c (regcache_register_size): Likewise.
2847 (get_regcache_arch): Remove.
2848 (regcache_read_pc): Likewise.
2849 * regcache.h (get_regcache_arch): Remove.
2850 * remote-sim.c (gdbsim_fetch_register): Likewise.
2851 (gdbsim_store_register): Likewise.
2852 * remote.c (fetch_register_using_p): Likewise.
2853 (send_g_packet): Likewise.
2854 (remote_prepare_to_store): Likewise.
2855 (store_registers_using_G): Likewise.
2856 * reverse.c (save_bookmark_command): Likewise.
2857 (goto_bookmark_command): Likewise.
2858 * rs6000-aix-tdep.c (branch_dest): Likewise.
2859 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2860 (fetch_register): Likewise.
2861 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2862 (ppc_collect_reg): Likewise.
2863 (ppc_collect_gregset): Likewise.
2864 (ppc_collect_fpregset): Likewise.
2865 (ppc_collect_vsxregset): Likewise.
2866 (ppc_collect_vrregset): Likewise.
2867 (ppc_displaced_step_hw_singlestep): Likewise.
2868 (rs6000_pseudo_register_read): Likewise.
2869 (rs6000_pseudo_register_write): Likewise.
2870 * s390-linux-nat.c (supply_gregset): Likewise.
2871 (fill_gregset): Likewise.
2872 (s390_linux_fetch_inferior_registers): Likewise.
2873 * s390-linux-tdep.c (s390_write_pc): Likewise.
2874 (s390_software_single_step): Likewise.
2875 (s390_all_but_pc_registers_record): Likewise.
2876 (s390_linux_syscall_record): Likewise.
2877 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2878 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2879 (shnbsd_store_inferior_registers): Likewise.
2880 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2881 (sh_extract_return_value_fpu): Likewise.
2882 (sh_store_return_value_nofpu): Likewise.
2883 (sh_corefile_supply_regset): Likewise.
2884 (sh_corefile_collect_regset): Likewise.
2885 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2886 (sh64_store_return_value): Likewise.
2887 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2888 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2889 (sparc_store_inferior_registers): Likewise.
2890 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2891 (sparc_ravenscar_prepare_to_store): Likewise.
2892 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2893 (sparc_analyze_control_transfer): Likewise.
2894 (sparc_step_trap): Likewise.
2895 (sparc_software_single_step): Likewise.
2896 (sparc32_gdbarch_init): Likewise.
2897 (sparc_supply_rwindow): Likewise.
2898 (sparc_collect_rwindow): Likewise.
2899 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2900 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2901 (sparc64nbsd_collect_gregset): Likewise.
2902 (sparc64nbsd_supply_fpregset): Likewise.
2903 (sparc64nbsd_collect_fpregset): Likewise.
2904 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2905 (sparc64_supply_gregset): Likewise.
2906 (sparc64_collect_gregset): Likewise.
2907 (sparc64_supply_fpregset): Likewise.
2908 (sparc64_collect_fpregset): Likewise.
2909 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2910 * spu-tdep.c (spu_unwind_sp): Likewise.
2911 (spu2ppu_prev_register): Likewise.
2912 (spu_memory_remove_breakpoint): Likewise.
2913 * stack.c (return_command): Likewise.
2914 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2915 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2916 * tracefile.c (trace_save_ctf): Likewise.
2917 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2918 (do_windows_store_inferior_registers): Likewise.
2919 (windows_resume): Likewise.
2920 * xtensa-linux-nat.c (fill_gregset): Likewise.
2921 (supply_gregset_reg): Likewise.
2922 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2923 (xtensa_register_read_masked): Likewise.
2924 (xtensa_supply_gregset): Likewise.
2925 (xtensa_extract_return_value): Likewise.
2926 (xtensa_store_return_value): Likewise.
2927
edd079d9
UW
29282017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2929
2930 * doublest.c (floatformat_from_string): New function.
2931 * doublest.h (floatformat_from_string): Add prototype.
2932
2933 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2934 (OP_FLOAT): ... this.
2935 * expression.h: Do not include "doublest.h".
2936 (union exp_element): Replace doubleconst and decfloatconst by
2937 new element floatconst.
2938 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2939 (ada_evaluate_subexp): Likewise.
2940 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2941 OP_DOUBLE and OP_DECFLOAT.
2942 * expprint.c (print_subexp_standard): Likewise.
2943 (dump_subexp_body_standard): Likewise.
2944 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2945
2946 * parse.c: Include "dfp.h".
2947 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2948 (write_exp_elt_floatcst): New function.
2949 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2950 and OP_DECFLOAT.
2951 (operator_check_standard): Likewise.
2952 (parse_float): Do not accept suffix. Take type as input. Return bool.
2953 Return target format buffer instead of host DOUBLEST.
2954 Use floatformat_from_string and decimal_from_string to parse
2955 either binary or decimal floating-point types.
2956 (parse_c_float): Remove.
2957 * parser-defs.h: Do not include "doublest.h".
2958 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2959 (write_exp_elt_floatcst): Add prototype.
2960 (parse_float): Update prototype.
2961 (parse_c_float): Remove.
2962
2963 * c-exp.y: Do not include "dfp.h".
2964 (typed_val_float): Use byte buffer instead of DOUBLEST.
2965 (typed_val_decfloat): Remove.
2966 (DECFLOAT): Remove.
2967 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2968 (parse_number): Update to new parse_float interface.
2969 Parse suffixes and determine type before calling parse_float.
2970 Handle decimal and binary FP types the same way.
2971
2972 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2973 (FLOAT_LITERAL): 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 * f-exp.y: Replace dval by typed_val_float.
2978 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2979 (parse_number): Use parse_float instead of atof.
2980
2981 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2982 (parse_go_float): Remove.
2983 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2984 (parse_number): Call parse_float instead of parse_go_float.
2985 Parse suffixes and determine type before calling parse_float.
2986
2987 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2988 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2989 (parse_number): Update to new parse_float interface.
2990 Parse suffixes and determine type before calling parse_float.
2991
2992 * m2-exp.y: Replace dval by byte buffer val.
2993 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2994 (parse_number): Call parse_float instead of atof.
2995
2996 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2997 (lex_number): Call parse_float instead of strtod.
2998 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2999 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3000 Use write_exp_elt_floatcst.
3001 (unit_testing): Remove static variable.
3002 (rust_type): Do not check unit_testing.
3003 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3004
3005 * ada-exp.y (type_float, type_double): Remove.
3006 (typed_val_float): Use byte buffer instead of DOUBLEST.
3007 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3008 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3009
cc628f3d
AH
30102017-10-25 Alan Hayward <alan.hayward@arm.com>
3011
3012 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3013 * arch/aarch64.h: New file.
3014
09a7c6aa
UW
30152017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3016
3017 * dfp.h (decimal_from_string): Use const reference for argument.
3018 * dfp.c (decimal_from_string): Likewise.
3019
8ba0dd51
UW
30202017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3021
3022 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3023 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3024 * mips-tdep.c (mips_print_fp_register): Likewise.
3025
16e812b2
UW
30262017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3027
3028 * common/format.h (enum argclass): Replace decfloat_arg by
3029 dec32float_arg, dec64float_arg, and dec128float_arg.
3030 * common/format.c (parse_format_string): Update to return
3031 new decimal float argument classes.
3032
3033 * printcmd.c (printf_decfloat): Rename to ...
3034 (printf_floating): ... this. Add argclass argument, and use it
3035 instead of parsing the format string again. Add support for
3036 binary floating-point values, using floatformat_to_string.
3037 Convert value to the target format if it doesn't already match.
3038 (ui_printf): Call printf_floating instead of printf_decfloat,
3039 also for double_arg / long_double_arg. Pass argclass.
3040
3041 * dfp.c (decimal_to_string): Add format string argument.
3042 * dfp.h (decimal_to_string): Likewise.
3043
3044 * doublest.c (floatformat_to_string): Add format string argument.
3045 * doublest.h (floatformat_to_string): Likewise.
3046
fdf0cbc2
UW
30472017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3048
3049 * doublest.c (floatformat_precision): New routine.
3050 (floatformat_to_string): Likewise.
3051 * doublest.c (floatformat_to_string): Add prototype.
3052
3053 * printcmd.c (print_scalar_formatted): Only call print_floating
3054 on floating-point types.
3055 * valprint.c: Do not include "floatformat.h".
3056 (generic_val_print_decfloat): Remove.
3057 (generic_val_print): Call generic_val_print_float for both
3058 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3059 (print_floating): Use floatformat_to_string. Handle decimal float.
3060 (print_decimal_floating): Remove, merge into floatformat_to_string.
3061 * value.h (print_decimal_floating): Remove.
3062
3063 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3064
5033013f
UW
30652017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3066
3067 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3068
a664f67e
SM
30692017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3070
3071 * memattr.h: Don't include vec.h.
3072 (struct mem_attrib): Initialize fields.
3073 <unknown>: New static method.
3074 (struct mem_region): Add constructors, operator<, initialize
3075 fields.
3076 * memattr.c: Include algorithm.
3077 (default_mem_attrib, unknown_mem_attrib): Remove.
3078 (user_mem_region_list): New global.
3079 (target_mem_region_list, mem_region_list): Change type to
3080 std::vector<mem_region>.
3081 (mem_use_target): Now a function.
3082 (target_mem_regions_valid): Change type to bool.
3083 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3084 (require_user_regions): Adjust.
3085 (require_target_regions): Adjust.
3086 (create_mem_region): Adjust.
3087 (lookup_mem_region): Adjust.
3088 (invalidate_target_mem_regions): Adjust.
3089 (mem_clear): Rename to...
3090 (user_mem_clear): ... this, and adjust.
3091 (mem_command): Adjust.
3092 (info_mem_command): Adjust.
3093 (mem_enable, enable_mem_command, mem_disable,
3094 disable_mem_command): Adjust.
3095 (mem_delete): Adjust.
3096 (delete_mem_command): Adjust.
3097 * memory-map.h (parse_memory_map): Return an std::vector.
3098 * memory-map.c (parse_memory_map): Likewise.
3099 (struct memory_map_parsing_data): Add constructor.
3100 <memory_map>: Point to std::vector.
3101 (memory_map_start_memory): Adjust.
3102 (memory_map_end_memory): Adjust.
3103 (memory_map_end_property): Adjust.
3104 (clear_result): Remove.
3105 * remote.c (remote_memory_map): Return an std::vector.
3106 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3107 Remove.
3108 (target_debug_print_mem_region_vector): New.
3109 * target-delegates.c: Regenerate.
3110 * target.h (mem_region_vector): New typedef.
3111 (to_memory_map): Return mem_region_vector.
3112 (target_memory_map): Return an std::vector.
3113 * target.c (target_memory_map): Return an std::vector.
3114 (flash_erase_command): Adjust.
3115
6e17c565
SM
31162017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3117
3118 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3119 Change type to std::string.
3120 (memory_map_start_property): Adjust.
3121 (memory_map_end_property): Adjust.
3122
cfba9872
SM
31232017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3124
3125 * infrun.h: Include common/byte-vector.h.
3126 (struct displaced_step_closure): New struct.
3127 (struct buf_displaced_step_closure): New struct.
3128 * infrun.c (displaced_step_closure::~displaced_step_closure):
3129 Provide default implementation.
3130 (displaced_step_clear): Deallocate step closure with delete.
3131 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3132 (aarch64_displaced_step_closure): ... this, extend
3133 displaced_step_closure.
3134 (aarch64_displaced_step_data) <dsc>: Change type to
3135 aarch64_displaced_step_closure.
3136 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3137 unique_ptr.
3138 (aarch64_displaced_step_fixup): Add cast for displaced step
3139 closure.
3140 * amd64-tdep.c (displaced_step_closure): Rename to ...
3141 (amd64_displaced_step_closure): ... this, extend
3142 displaced_step_closure.
3143 <insn_buf>: Change type to std::vector<gdb_byte>.
3144 <max_len>: Remove.
3145 (fixup_riprel): Change type of DSC parameter, adjust to type
3146 change of insn_buf.
3147 (fixup_displaced_copy): Change type of DSC parameter.
3148 (amd64_displaced_step_copy_insn): Instantiate
3149 amd64_displaced_step_closure.
3150 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3151 to type change of insn_buf.
3152 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3153 parameter DSC.
3154 (arm_linux_copy_svc): Likewise.
3155 (cleanup_kernel_helper_return): Likewise.
3156 (arm_catch_kernel_helper_return): Likewise.
3157 (arm_linux_displaced_step_copy_insn): Instantiate
3158 arm_displaced_step_closure.
3159 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3160 (displaced_read_reg): Change type of parameter DSC.
3161 (branch_write_pc): Likewise.
3162 (load_write_pc): Likewise.
3163 (alu_write_pc): Likewise.
3164 (displaced_write_reg): Likewise.
3165 (arm_copy_unmodified): Likewise.
3166 (thumb_copy_unmodified_32bit): Likewise.
3167 (thumb_copy_unmodified_16bit): Likewise.
3168 (cleanup_preload): Likewise.
3169 (install_preload): Likewise.
3170 (arm_copy_preload): Likewise.
3171 (thumb2_copy_preload): Likewise.
3172 (install_preload_reg): Likewise.
3173 (arm_copy_preload_reg): Likewise.
3174 (cleanup_copro_load_store): Likewise.
3175 (install_copro_load_store): Likewise.
3176 (arm_copy_copro_load_store) Likewise.
3177 (thumb2_copy_copro_load_store): Likewise.
3178 (cleanup_branch): Likewise.
3179 (install_b_bl_blx): Likewise.
3180 (arm_copy_b_bl_blx): Likewise.
3181 (thumb2_copy_b_bl_blx): Likewise.
3182 (thumb_copy_b): Likewise.
3183 (install_bx_blx_reg): Likewise.
3184 (arm_copy_bx_blx_reg): Likewise.
3185 (thumb_copy_bx_blx_reg): Likewise.
3186 (cleanup_alu_imm): Likewise.
3187 (arm_copy_alu_imm): Likewise.
3188 (thumb2_copy_alu_imm): Likewise.
3189 (cleanup_alu_reg): Likewise.
3190 (install_alu_reg): Likewise.
3191 (arm_copy_alu_reg): Likewise.
3192 (thumb_copy_alu_reg): Likewise.
3193 (cleanup_alu_shifted_reg): Likewise.
3194 (install_alu_shifted_reg): Likewise.
3195 (arm_copy_alu_shifted_reg): Likewise.
3196 (cleanup_load): Likewise.
3197 (cleanup_store): Likewise.
3198 (arm_copy_extra_ld_st): Likewise.
3199 (install_load_store): Likewise.
3200 (thumb2_copy_load_literal): Likewise.
3201 (thumb2_copy_load_reg_imm): Likewise.
3202 (arm_copy_ldr_str_ldrb_strb): Likewise.
3203 (cleanup_block_load_all): Likewise.
3204 (cleanup_block_store_pc): Likewise.
3205 (cleanup_block_load_pc): Likewise.
3206 (arm_copy_block_xfer): Likewise.
3207 (thumb2_copy_block_xfer): Likewise.
3208 (cleanup_svc): Likewise.
3209 (install_svc): Likewise.
3210 (arm_copy_svc): Likewise.
3211 (thumb_copy_svc): Likewise.
3212 (arm_copy_undef): Likewise.
3213 (thumb_32bit_copy_undef): Likewise.
3214 (arm_copy_unpred): Likewise.
3215 (arm_decode_misc_memhint_neon): Likewise.
3216 (arm_decode_unconditional): Likewise.
3217 (arm_decode_miscellaneous): Likewise.
3218 (arm_decode_dp_misc): Likewise.
3219 (arm_decode_ld_st_word_ubyte): Likewise.
3220 (arm_decode_media): Likewise.
3221 (arm_decode_b_bl_ldmstm): Likewise.
3222 (arm_decode_ext_reg_ld_st): Likewise.
3223 (thumb2_decode_dp_shift_reg): Likewise.
3224 (thumb2_decode_ext_reg_ld_st): Likewise.
3225 (arm_decode_svc_copro): Likewise.
3226 (thumb2_decode_svc_copro): Likewise.
3227 (install_pc_relative): Likewise.
3228 (thumb_copy_pc_relative_16bit): Likewise.
3229 (thumb_decode_pc_relative_16bit): Likewise.
3230 (thumb_copy_pc_relative_32bit): Likewise.
3231 (thumb_copy_16bit_ldr_literal): Likewise.
3232 (thumb_copy_cbnz_cbz): Likewise.
3233 (thumb2_copy_table_branch): Likewise.
3234 (cleanup_pop_pc_16bit_all): Likewise.
3235 (thumb_copy_pop_pc_16bit): Likewise.
3236 (thumb_process_displaced_16bit_insn): Likewise.
3237 (decode_thumb_32bit_ld_mem_hints): Likewise.
3238 (thumb_process_displaced_32bit_insn): Likewise.
3239 (thumb_process_displaced_insn): Likewise.
3240 (arm_process_displaced_insn): Likewise.
3241 (arm_displaced_init_closure): Likewise.
3242 (arm_displaced_step_fixup): Add cast for closure.
3243 * arm-tdep.h: Include infrun.h.
3244 (displaced_step_closure): Rename to ...
3245 (arm_displaced_step_closure): ... this, extend
3246 displaced_step_closure.
3247 <u::svc::copy_svc_os>: Change type of parameter DSC.
3248 <cleanup>: Likewise.
3249 (arm_process_displaced_insn): Likewise.
3250 (arm_displaced_init_closure): Likewise.
3251 (displaced_read_reg): Likewise.
3252 (displaced_write_reg): Likewise.
3253 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3254 Adjust.
3255 * i386-tdep.h: Include infrun.h.
3256 (i386_displaced_step_closure): New typedef.
3257 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3258 i386_displaced_step_closure.
3259 (i386_displaced_step_fixup): Adjust.
3260 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3261 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3262 and unique_ptr.
3263 (ppc_displaced_step_fixup): Adjust.
3264 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3265 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3266 and unique_ptr.
3267 (s390_displaced_step_fixup): Adjust.
3268
b392b304
SM
32692017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3270
3271 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3272 Remove declarations.
3273
d5833c62
TT
32742017-10-20 Tom Tromey <tom@tromey.com>
3275
3276 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3277 std::vector.
3278 (gdb_bfd_record_inclusion): Update.
3279 (bfdp): Remove typedef.
3280
06d5bbc8
TT
32812017-10-20 Tom Tromey <tom@tromey.com>
3282
3283 * gdb_bfd.c (gdb_bfd_ref): Use new.
3284 (struct gdb_bfd_data): Add constructor, destructor, and member
3285 initializers.
3286 (gdb_bfd_unref): Use delete.
3287
2712ce2e
TT
32882017-10-20 Tom Tromey <tom@tromey.com>
3289
3290 * exec.c (exec_file_attach): Use new_bfd_ref.
3291 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3292 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3293 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3294 new_bfd_ref.
3295 * gdb_bfd.h (new_bfd_ref): New function.
3296
fcc8fb2f
PA
32972017-10-20 Pedro Alves <palves@redhat.com>
3298
3299 * main.c (captured_command_loop): Add attribute noinline.
3300
4c2287b0
SM
33012017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3302
3303 * interps.c (struct interp_factory): Add constructor.
3304 (interp_factory_p): Remove typedef.
3305 (DEF_VEC_P(interp_factory_p)): Remove.
3306 (interpreter_factories): Change type to std::vector.
3307 (interp_factory_register): Adjust.
3308 (interp_lookup): Adjust.
3309 (interpreter_completer): Adjust.
3310
3d415c26
TT
33112017-10-19 Tom Tromey <tom@tromey.com>
3312
3313 * break-catch-syscall.c (catch_syscall_completer): Use
3314 std::string, gdb::unique_xmalloc_ptr.
3315
395423c4
TT
33162017-10-19 Tom Tromey <tom@tromey.com>
3317
3318 * infcall.c (call_function_by_hand_dummy): Use std::string.
3319
54f70bc1
TT
33202017-10-19 Tom Tromey <tom@tromey.com>
3321
3322 * mi/mi-main.c (mi_cmd_execute): Update.
3323 * top.h (prepare_execute_command): Return scoped_value_mark.
3324 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3325 Add move constructor.
3326 * top.c (prepare_execute_command): Return scoped_value_mark.
3327 (execute_command): Update.
3328
63929e84
PA
33292017-10-19 Pedro Alves <palves@redhat.com>
3330
3331 * xml-support.c (xml_fetch_content_from_file): Check fread's
3332 return.
3333
a75868f5
PA
33342017-10-19 Pedro Alves <palves@redhat.com>
3335
3336 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3337 async.
3338 (handle_error_fd): New function.
3339 (ser_base_async): Add/delete an event loop file handler for
3340 error_fd.
3341
2edf834e
PA
33422017-10-19 Pedro Alves <palves@redhat.com>
3343
3344 * xml-support.c (xml_fetch_content_from_file): Don't read in
3345 chunks. Instead use fseek to determine the file's size, and read
3346 it in one go.
3347
c8ba13ad
KS
33482017-11-18 Keith Seitz <keiths@redhat.com>
3349
3350 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3351 types.
3352 Add whitespace to front of type name.
3353
37534686
KS
33542017-10-18 Keith Seitz <keiths@redhat.com>
3355
3356 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3357 DW_AT_accessibility.
3358
28c7c158
YQ
33592017-10-18 Yao Qi <yao.qi@linaro.org>
3360
3361 * features/tic6x-c62x-linux.c: Remove.
3362
30f0b101
TT
33632017-10-17 Tom Tromey <tom@tromey.com>
3364
3365 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3366 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3367 (do_mixed_source_and_assembly): Likewise.
3368
57e12da9
TT
33692017-10-17 Tom Tromey <tom@tromey.com>
3370
3371 * regcache.c (regcache::xfer_part): Remove assertion.
3372
7b700999
PA
33732017-10-17 Pedro Alves <palves@redhat.com>
3374
3375 * xml-support.c (xml_fetch_content_from_file): Call
3376 unique_ptr::release() instead unique_ptr::get() when passing
3377 through xrealloc.
3378
d3037ba6
YQ
33792017-10-17 Yao Qi <yao.qi@linaro.org>
3380
3381 * regcache.c (regcache::xfer_part): Remove parameters read and
3382 write, add parameter is_raw. All callers are updated.
3383
83d5a34d
KS
33842017-10-16 Keith Seitz <keiths@redhat.com>
3385
3386 * c-typeprint.c (enum access_specifier): Moved here from
3387 c_type_print_base.
3388 (output_access_specifier): New function.
3389 (c_type_print_base): Consider typedefs when assessing
3390 whether access labels are needed.
3391 Use output_access_specifier as needed.
3392 Output access specifier for typedefs, if needed.
3393 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3394 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3395 fields.
3396 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3397 accessor macros.
3398
87028b87
TT
33992017-10-16 Tom Tromey <tom@tromey.com>
3400
3401 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3402 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3403 * target.c (target_fileio_read_stralloc): Update.
3404 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3405 * target.h (target_fileio_read_stralloc): Return
3406 unique_xmalloc_ptr.
3407
b7b030ad
TT
34082017-10-16 Tom Tromey <tom@tromey.com>
3409
3410 * xml-syscall.c (xml_init_syscalls_info): Update.
3411 * xml-support.c (xinclude_start_include): Update.
3412 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3413 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3414 (xml_fetch_content_from_file): Likewise.
3415 * osdata.c (get_osdata): Update.
3416 * target.h (target_read_stralloc, target_get_osdata): Return
3417 unique_xmalloc_ptr.
3418 * solib-aix.c (solib_aix_get_library_list): Update.
3419 * solib-target.c (solib_target_current_sos): Update.
3420 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3421 * xml-tdesc.c (fetch_available_features_from_target): Update.
3422 (target_fetch_description_xml): Update.
3423 (file_read_description_xml): Update.
3424 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3425 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3426 (remote_pid_to_exec_file): Update.
3427 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3428 (target_get_osdata): Likewise.
3429
b80406ac
TT
34302017-10-16 Tom Tromey <tom@tromey.com>
3431
3432 * remote.c (remote_register_number_and_offset): Use std::vector.
3433 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3434 (putpkt_binary): Use gdb::def_vector.
3435 (compare_sections_command): Use gdb::byte_vector.
3436
a90ecff8
TT
34372017-10-16 Tom Tromey <tom@tromey.com>
3438
3439 * ppc-linux-nat.c (hwdebug_insert_point): Use
3440 gdb::unique_xmalloc_ptr, XDUP.
3441
2dc0e219
TT
34422017-10-16 Tom Tromey <tom@tromey.com>
3443
3444 * probe.c (parse_probes): Use std::string.
3445 (info_probes_for_ops, enable_probes_command)
3446 (disable_probes_command): Remove cleanups.
3447
b05628f0
TT
34482017-10-16 Tom Tromey <tom@tromey.com>
3449
3450 * buildsym.c (block_compar): Remove.
3451 (end_symtab_get_static_block): Use std::vector.
3452
a79b1bc6
SM
34532017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3454
3455 * memrange.h (struct mem_range): Define operator< and operator==.
3456 (mem_range_s): Remove.
3457 (DEF_VEC_O (mem_range_s)): Remove.
3458 (normalize_mem_ranges): Change parameter type to std::vector.
3459 * memrange.c (compare_mem_ranges): Remove.
3460 (normalize_mem_ranges): Change parameter type to std::vector,
3461 adjust to vector change.
3462 * exec.c (section_table_available_memory): Return vector, remove
3463 parameter.
3464 (section_table_read_available_memory): Adjust to std::vector
3465 change.
3466 * remote.c (remote_read_bytes): Adjust to std::vector
3467 change.
3468 * tracepoint.h (traceframe_available_memory): Change parameter
3469 type to std::vector.
3470 * tracepoint.c (traceframe_available_memory): Change parameter
3471 type to std::vector, adjust.
3472 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3473 std::vector change.
3474 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3475 unittests/memrange-selftests.c.
3476 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3477 * gdb/unittests/memrange-selftests.c: New file.
3478
63f0e930
PA
34792017-10-16 Pedro Alves <palves@redhat.com>
3480
3481 * elfread.c (probe_key_free): Rename range-for variable.
3482 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3483 (find_probe_by_pc, collect_probes): Rename range-for variable.
3484
c40c7bfc
YQ
34852017-10-16 Yao Qi <yao.qi@linaro.org>
3486
3487 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3488 * features/tic6x-c62x.c: Remove.
3489 * features/tic6x-c64x-linux.c: Remove.
3490 * features/tic6x-c64x.c: Remove.
3491 * features/tic6x-c64xp-linux.c: Remove.
3492 * features/tic6x-c64xp.c: Remove.
3493 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3494 initialize_tdesc_tic6x_*_linux functions.
3495 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3496 initialize_tdesc_tic6x_* functions.
3497
df27ae6a
YQ
34982017-10-16 Yao Qi <yao.qi@linaro.org>
3499
3500 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3501 tic6x-c62x.
3502 * regformats/tic6x-c62x.dat: Remove.
3503 * regformats/tic6x-c64x.dat: Remove.
3504 * regformats/tic6x-c64xp.dat: Remove.
3505
86766165
SM
35062017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3507
3508 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3509 (the !HAVE_LIBEXPAT version).
3510
824dfcc3
SM
35112017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3512
3513 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3514 const.
3515
2098b393
SM
35162017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3517
3518 * target.h: Include tracepoint.h.
3519 (enum trace_find_type): Move to tracepoint.h.
3520 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3521 * tracepoint.h: Don't include target.h
3522 (enum trace_find_type): Move from target.h.
3523 (parse_traceframe_info): Return a unique ptr.
3524 * tracepoint.c (current_traceframe_info): Change type to unique
3525 ptr.
3526 (free_traceframe_info): Remove.
3527 (clear_traceframe_info): Don't manually free
3528 current_traceframe_info.
3529 (free_result): Remove.
3530 (parse_traceframe_info): Return a unique ptr.
3531 (get_traceframe_info): Adjust to unique ptr.
3532 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3533 * remote.c (remote_traceframe_info): Return a unique ptr.
3534 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3535 ptr.
3536 * target-debug.h (target_debug_print_traceframe_info_up): New
3537 macro.
3538 * target-delegates.c: Regenerate.
3539
4cdd21a8
SM
35402017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3541
3542 * memrange.h (struct mem_range): Add constructors.
3543 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3544 std::vector<mem_range>.
3545 * tracepoint.c (free_traceframe_info): Don't manually free
3546 vector.
3547 (traceframe_info_start_memory): Adjust to vector change.
3548 (traceframe_available_memory): Likewise.
3549 * tracefile-tfile.c (build_traceframe_info): Likewise.
3550 * ctf.c (ctf_traceframe_info): Likewise.
3551
d0d292a2
SM
35522017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3553
3554 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3555 std::vector<int>.
3556 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3557 (traceframe_info_start_tvar): Adjust to vector change.
3558 (parse_traceframe_info): Allocate with new.
3559 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3560 vector change.
3561 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3562 change.
3563 tfile_traceframe_info): Allocate with new.
3564 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3565 change.
3566
8d3c73ef
SM
35672017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3568
3569 * tracepoint.c (traceframe_info): Rename to...
3570 (current_traceframe_info): ...this.
3571 (clear_traceframe_info): Adjust.
3572 (get_traceframe_info): Adjust.
3573
b129dcac
SM
35742017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3575
3576 * nat/linux-osdata.c: Include algorithm.
3577 (compare_processes): Remove.
3578 (struct pid_pgid_entry): New struct.
3579 (linux_xfer_osdata_processgroups): Use std::vector instead of
3580 XNEWVEC.
3581
af5bf4ad
SM
35822017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3583
3584 * objfiles.h: Don't include symfile.h.
3585 (struct partial_symbol): Remove forward-declaration.
3586 (struct objfile) <global_psymbols, static_psymbols>: Change type
3587 to std::vector<partial_symbol *>.
3588 * objfiles.c (objfile::objfile): Don't memset those fields.
3589 (objfile::~objfile): Don't free those fields.
3590 * psympriv.h (struct psymbol_allocation_list): Remove
3591 forward-declaration.
3592 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3593 to std::vector.
3594 (start_psymtab_common): Change parameters to std::vector.
3595 * psymtab.c: Include algorithm.
3596 (require_partial_symbols): Call shrink_to_fit.
3597 (find_pc_sect_psymbol): Adjust to vector change.
3598 (match_partial_symbol): Likewise.
3599 (lookup_partial_symbol): Likewise.
3600 (psym_relocate): Likewise.
3601 (dump_psymtab): Likewise.
3602 (recursively_search_psymtabs): Likewise.
3603 (compare_psymbols): Remove.
3604 (sort_pst_symbols): Adjust to vector change.
3605 (start_psymtab_common): Likewise.
3606 (end_psymtab_common): Likewise.
3607 (psymbol_bcache_full): De-constify return value.
3608 (add_psymbol_to_bcache): Likewise.
3609 (extend_psymbol_list): Remove.
3610 (append_psymbol_to_list): Adjust to vector change.
3611 (add_psymbol_to_list): Likewise.
3612 (init_psymbol_list): Likewise.
3613 (maintenance_info_psymtabs): Likewise.
3614 (maintenance_check_psymtabs): Likewise.
3615 * symfile.h (struct psymbol_allocation_list): Remove.
3616 * symfile.c (reread_symbols): Adjust to vector change.
3617 * dbxread.c (start_psymtab): Change type of parameters.
3618 (dbx_symfile_read): Adjust to vector change.
3619 (read_dbx_symtab): Likewise.
3620 (start_psymtab): Change type of parameters.
3621 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3622 (create_partial_symtab): Likewise.
3623 (add_partial_symbol): Likewise.
3624 (write_one_signatured_type): Likewise.
3625 (recursively_write_psymbols): Likewise.
3626 * mdebugread.c (parse_partial_symbols): Likewise.
3627 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3628 (scan_xcoff_symtab): Adjust to vector change.
3629 (xcoff_initial_scan): Likewise.
3630
3ec5942f
SM
36312017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3632
3633 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3634
2399fe6a
YQ
36352017-10-13 Yao Qi <yao.qi@linaro.org>
3636
3637 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3638 Remove s390x-*-expedite, add s390x-expedite.
3639
4bf3f4a8
YQ
36402017-10-13 Yao Qi <yao.qi@linaro.org>
3641
3642 * features/s390-gs-linux64.c: Regenerated.
3643 * features/s390x-gs-linux64.c: Regenerated.
3644
9e86da07
TT
36452017-10-13 Tom Tromey <tom@tromey.com>
3646
3647 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3648 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3649 delete.
3650 * symfile.c (symbol_file_add_with_addrs): Use new.
3651 (symbol_file_add_separate): Update comment.
3652 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3653 * jit.c (jit_object_close_impl): Use new.
3654 (jit_unregister_code): Use delete.
3655 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3656 (~objfile): Rename from free_objfile.
3657 (free_objfile_separate_debug, do_free_objfile_cleanup)
3658 (free_all_objfiles, objfile_purge_solibs): Use delete.
3659 * objfiles.h (struct objfile): Add constructor and destructor.
3660 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3661 (allocate_objfile, free_objfile): Don't declare.
3662 (struct objstats): Add initializers.
3663
c2508e90
SM
36642017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3665
3666 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3667 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3668 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3669 * gdbarch.h: Regenerate.
3670 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3671 Adjust comment.
3672 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3673 (i386_displaced_step_fixup): Adjust comment.
3674 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3675
a900ff72
TT
36762017-10-12 Tom Tromey <tom@tromey.com>
3677
3678 * prologue-value.h (pv_area::store_would_trash): Return bool.
3679 (pv_area::find_reg): Likewise.
3680 * prologue-value.c (pv_area::store_would_trash): Return bool.
3681 (pv_area::find_reg): Likewise.
3682
f7b7ed97
TT
36832017-10-12 Tom Tromey <tom@tromey.com>
3684
3685 * s390-linux-tdep.c (s390_store, s390_load)
3686 (s390_check_for_saved, s390_analyze_prologue): Update.
3687 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3688 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3689 * prologue-value.h (class pv_area): Move from prologue-value.c.
3690 Change names of members. Add constructor, destructor, member
3691 functions.
3692 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3693 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3694 (pv_area_fetch, pv_area_scan): Don't declare.
3695 * prologue-value.c (struct pv_area::area_entry): Now member of
3696 pv_area.
3697 (struct pv_area): Move to prologue-value.h.
3698 (pv_area::pv_area): Rename from make_pv_area.
3699 (pv_area::~pv_area): Rename from free_pv_area.
3700 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3701 (clear_entries, find_entry, overlaps, store_would_trash, store)
3702 (fetch, find_reg, scan): Now member of pv_area.
3703 Remove "area" argument. Update.
3704 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3705 Update.
3706 * mn10300-tdep.c (push_reg, check_for_saved)
3707 (mn10300_analyze_prologue): Update.
3708 * mep-tdep.c (is_arg_spill, check_for_saved)
3709 (mep_analyze_prologue): Update.
3710 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3711 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3712 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3713 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3714 Update.
3715 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3716 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3717
466eecee
SM
37182017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3719
3720 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3721 * linux-nat.c (linux_nat_delete_thread): New variable.
3722 (lwp_free): Invoke linux_nat_delete_thread if set.
3723 (linux_nat_set_delete_thread): New function.
3724 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3725 thread delete callback.
3726 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3727 (_initialize_arm_linux_nat): Assign thread delete callback.
3728 * s390-linux-nat.c (s390_delete_thread): New function.
3729 (_initialize_s390_nat): Assign thread delete callback.
3730 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3731 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3732 function.
3733 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3734 declaration.
3735 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3736 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3737
f71c8822
TT
37382017-10-09 Tom Tromey <tom@tromey.com>
3739
3740 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3741 std::string.
3742 * tui/tui-layout.c (enum tui_status): Use std::string.
3743
981a3fb3
TT
37442017-10-11 Tom Tromey <tom@tromey.com>
3745
3746 * gdbthread.h (thread_command): Constify.
3747 * inferior.h (detach_command): Constify.
3748 * top.h (set_history, show_history): Constify.
3749 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3750 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3751 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3752 * printcmd.c (set_command): Constify.
3753 (non_const_set_command): New function.
3754 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3755 * breakpoint.c (enable_command, disable_command, delete_command)
3756 (catch_command, tcatch_command, set_breakpoint_cmd)
3757 (show_breakpoint_cmd): Constify.
3758 * macrocmd.c (macro_command): Constify.
3759 * infcmd.c (unset_command, kill_command, detach_command)
3760 (info_proc_cmd): Constify.
3761 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3762 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3763 (info_auto_load_cmd): Constify.
3764 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3765 (unset_tdesc_cmd): Constify.
3766 * ada-lang.c (set_ada_command, show_ada_command)
3767 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3768 * guile/guile.c (set_guile_command, show_guile_command)
3769 (info_guile_command): Constify.
3770 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3771 Constify.
3772 * skip.c (skip_command): Constify.
3773 * compile/compile.c (_initialize_compile): Constify.
3774 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3775 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3776 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3777 (maint_btrace_pt_show_cmd): Constify.
3778 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3779 Constify.
3780 * python/python.c (user_show_python, user_set_python): Constify.
3781 * mips-tdep.c (set_mips_command, show_mips_command)
3782 (set_mipsfpu_command): Constify.
3783 * record-btrace.c (cmd_record_btrace_start)
3784 (cmd_set_record_btrace, cmd_show_record_btrace)
3785 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3786 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3787 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3788 Constify.
3789 * symfile.c (overlay_command): Constify.
3790 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3791 * cli/cli-logging.c (set_logging_command, show_logging_command):
3792 Constify.
3793 * cli/cli-dump.c (dump_command, append_command)
3794 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3795 (tekhex_dump_command, binary_dump_command)
3796 (binary_append_command): Constify.
3797 * cli/cli-decode.c (struct cmd_list_element): Change type of
3798 "fun".
3799 * cli/cli-cmds.c (info_command, show_command, set_debug)
3800 (show_debug): Constify.
3801 (show_command): Add non-const overload.
3802 * top.c (set_history, show_history): Constify.
3803 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3804 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3805 * target.c (target_command): Constify.
3806 * sparc64-tdep.c (info_adi_command): Constify.
3807 * record-full.c (cmd_record_full_start): Constify.
3808 (set_record_full_command): Constify. Fix typo.
3809 (show_record_full_command): Constify.
3810 * thread.c (thread_command, thread_apply_command): Constify.
3811 * memattr.c (dummy_cmd): Constify.
3812 * value.c (function_command): Constify.
3813 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3814 * probe.c (info_probes_command): Constify.
3815 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3816 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3817 (show_thread_cmd, set_thread_default_cmd)
3818 (show_thread_default_cmd): Constify.
3819 (check_empty): Constify.
3820 * tracepoint.c (tfind_command): Constify.
3821 * cp-support.c (maint_cplus_command): Constify.
3822 * windows-tdep.c (info_w32_command): Constify.
3823 * record.c (cmd_record_start, set_record_command)
3824 (show_record_command, info_record_command, cmd_record_goto):
3825 Constify.
3826 * ravenscar-thread.c (set_ravenscar_command)
3827 (show_ravenscar_command): Constify.
3828 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3829 Constify.
3830 (add_internal_problem_command): Remove casts.
3831 * arc-tdep.c (maintenance_print_arc_command): Constify.
3832 * valprint.c (set_print, show_print, set_print_raw)
3833 (show_print_raw): Constify.
3834 * maint.c (maintenance_command, maintenance_info_command)
3835 (maintenance_print_command, maintenance_set_cmd)
3836 (maintenance_show_cmd, set_per_command_cmd)
3837 (show_per_command_cmd, maintenance_check_command): Constify.
3838 * language.c (set_check, show_check): Constify.
3839 * typeprint.c (show_print_type, set_print_type): Constify.
3840 * go32-nat.c (go32_info_dos_command): Constify.
3841
fdf44873
TT
38422017-10-11 Tom Tromey <tom@tromey.com>
3843
3844 * breakpoint.c (prepare_re_set_context): Remove.
3845 (breakpoint_re_set_one): Update. Don't use cleanups.
3846 (breakpoint_re_set): Use scoped_restore, std::string, and
3847 scoped_restore_current_language.
3848
81b1e71c
TT
38492017-10-11 Tom Tromey <tom@tromey.com>
3850
3851 * breakpoint.c (commands_command_1): Use std::string.
3852 (cleanup_executing_breakpoints): Remove.
3853 (bpstat_do_actions_1): Use scoped_restore.
3854 (bpstat_check_watchpoint): Use std::string.
3855 (decode_static_tracepoint_spec): Likewise.
3856 (break_range_command): Likewise.
3857 (watch_command_1): Likewise.
3858 (compare_breakpoints): Change argument types.
3859 (clear_command): Use std::vector.
3860 (cleanup_executing_breakpoints): Remove.
3861 (update_global_location_list): Use unique_xmalloc_ptr.
3862 (strace_command): Remove unused declaration.
3863
4f9d9906
JB
38642017-10-11 John Baldwin <jhb@FreeBSD.org>
3865
3866 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3867 * NEWS: Mention new FreeBSD/arm native configuration.
3868 * configure.host: Add arm*-*-freebsd*.
3869 * configure.nat: Likewise.
3870 * arm-fbsd-nat.c: New file.
3871
7176dfd2
JB
38722017-10-11 John Baldwin <jhb@FreeBSD.org>
3873
3874 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3875 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3876 * NEWS: Mention new FreeBSD/arm target.
3877 * configure.tgt: Add arm*-*-freebsd*.
3878 * arm-fbsd-tdep.c: New file.
3879 * arm-fbsd-tdep.h: New file.
3880
fe220226
MR
38812017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3882
3883 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3884 `gdbarch_elfcore_write_linux_prpsinfo'.
3885 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3886 method.
3887 (elf_internal_linux_prpsinfo): Remove declaration.
3888 * gdbarch.h: Regenerate.
3889 * gdbarch.c: Regenerate.
3890
a2f63b2e
MR
38912017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3892
3893 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3894 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3895
458ca1d0
PA
38962017-10-11 Pedro Alves <palves@redhat.com>
3897
3898 * breakpoint.c (reattach_breakpoints): Delete.
3899 * breakpoint.h (reattach_breakpoints): Delete.
3900
905014d7
SM
39012017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3902
3903 * symfile.c (registered_sym_fns): Make struct, not typedef.
3904 (DEF_VEC_O (registered_sym_fns)): Remove.
3905 (symtab_fns): Change type to std::vector.
3906 (add_symtab_fns): Adjust.
3907 (find_sym_fns): Adjust.
3908
56d704da
AK
39092017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3910
3911 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3912 * arc-tdep.h (arc_arch_is_em): New function.
3913 (arc_arch_is_hs): Likewise.
3914
7fa29be9
EB
39152017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3916
3917 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3918 parentheses in the declaration.
3919 (macro_lookup_inclusion): Likewise.
3920 (macro_lookup_definition): Likewise.
3921 * p-lang.h (pascal_builtin_types): Likewise.
3922 * tui/tui-data.c (tui_win_list): Likewise.
3923 * tui/tui-data.h (tui_win_list): Likewise.
3924 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3925
d9b477e3
KB
39262017-10-11 Mark Rages <markrages@gmail.com>
3927
3928 * target-memory.c (block_boundaries): Fix for block address not
3929 aligned on block size.
3930
65630365
PA
39312017-10-10 Pedro Alves <palves@redhat.com>
3932 Tom Tromey <tom@tromey.com>
3933
3934 * breakpoint.c (struct captured_breakpoint_query_args)
3935 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3936 (print_breakpoint): New.
3937 * breakpoint.h (print_breakpoint): Declare.
3938 * common/common-exceptions.h (enum return_reason): Remove
3939 references to catch_exceptions.
3940 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3941 Delete.
3942 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3943 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3944 * gdb.h: Delete.
3945 * gdbthread.h (thread_select): Declare.
3946 * mi/mi-cmd-break.c: Don't include gdb.h.
3947 (breakpoint_notify): Use print_breakpoint.
3948 * mi/mi-cmd-catch.c: Don't include gdb.h.
3949 * mi/mi-interp.c: Don't include gdb.h.
3950 (mi_print_breakpoint_for_event): New.
3951 (mi_breakpoint_created, mi_breakpoint_modified): Use
3952 mi_print_breakpoint_for_event.
3953 * mi/mi-main.c: Don't include gdb.h.
3954 (mi_cmd_thread_select): Parse the global thread ID here. Use
3955 thread_select instead of gdb_thread_select.
3956 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3957 of using gdb_list_thread_ids.
3958 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3959 FILEIO_ENOSYS here.
3960 (remote_fileio_request): Use TRY/CATCH instead of
3961 catch_exceptions.
3962 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3963 (symbol_file_add_from_memory_wrapper): Delete.
3964 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3965 * thread.c: Don't include gdb.h.
3966 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3967 (thread_alive): Use thread_select.
3968 (do_captured_thread_select): Delete, parts salvaged as ...
3969 (thread_select): ... this new function.
3970 (gdb_thread_select): Delete.
3971
bf469271
PA
39722017-10-10 Pedro Alves <palves@redhat.com>
3973 Tom Tromey <tom@tromey.com>
3974
3975 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3976 and reverse logic.
3977 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3978 No longer macros. Instead ...
3979 (enum wp_check_result): They're now values of this new
3980 enumeration.
3981 (watchpoint_check): Change return type to wp_check_result and
3982 parameter type to bpstat.
3983 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3984 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3985 catch_errors. Reverse logic of watchpoint_check call.
3986 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3987 pointer as parameter.
3988 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3989 * common/common-exceptions.c (throw_exception_sjlj): Update
3990 comments to avoid mentioning catch_errors.
3991 * exceptions.c (catch_errors): Delete.
3992 * exceptions.h: Update comments to avoid mentioning catch_errors.
3993 (catch_errors_ftype, catch_errors): Delete.
3994 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3995 (hook_stop_stub): Delete.
3996 (restore_selected_frame): Change return type to void, and
3997 parameter type to const frame_id &.
3998 (restore_infcall_control_state): Use TRY/CATCH instead of
3999 catch_errors.
4000 * main.c (captured_command_loop): Return void and remove
4001 parameter. Remove references to catch_errors.
4002 (captured_main): Use TRY/CATCH instead of catch_errors.
4003 * objc-lang.c (objc_submethod_helper_data)
4004 (find_objc_msgcall_submethod_helper): Delete.
4005 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4006 catch_errors.
4007 * record-full.c (record_full_message): Return void.
4008 (record_full_message_args, record_full_message_wrapper): Delete.
4009 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4010 instead of catch_errors.
4011 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4012 parameter type to int.
4013 * solib-darwin.c (open_symbol_file_object): Ditto.
4014 * solib-dsbt.c (open_symbol_file_object): Ditto.
4015 * solib-frv.c (open_symbol_file_object): Ditto.
4016 * solib-svr4.c (open_symbol_file_object): Ditto.
4017 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4018 * solib.c (update_solib_list): Use TRY/CATCH instead of
4019 catch_errors.
4020 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4021 Change type.
4022 * symmisc.c (struct print_symbol_args): Remove.
4023 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4024 (print_symbol): Change type.
4025 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4026 and remove parameters.
4027 (catch_errors): New.
4028 (get_windows_debug_event): Adjust.
4029
1a56bfa5
TT
40302017-10-09 Tom Tromey <tom@tromey.com>
4031
4032 * mi/mi-main.c (free_splay_tree): Remove.
4033 (list_available_thread_groups): Use splay_tree_up.
4034 * common/gdb_splay_tree.h: New file.
4035
0c478e2d
TT
40362017-10-09 Tom Tromey <tom@tromey.com>
4037
4038 * mi/mi-main.c (do_nothing): Remove.
4039 (list_available_thread_groups): Update.
4040
cbd2b4e3
PA
40412017-10-09 Pedro Alves <palves@redhat.com>
4042
4043 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4044 reading registers when switching context.
4045
a181c0bf
JB
40462017-10-09 John Baldwin <jhb@FreeBSD.org>
4047
4048 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4049 (fbsd_convert_siginfo): Likewise.
4050 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4051
6e66f753
SM
40522017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4053
4054 * configure.ac (try_guile_versions): Remove guile-2.2.
4055 * configure: Regenerate.
4056
890e9790
TT
40572017-10-09 Tom Tromey <tom@tromey.com>
4058
4059 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4060 (COMPILE.pre): Use $(CXX).
4061
109483d9
PA
40622017-10-09 Pedro Alves <palves@redhat.com>
4063
4064 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4065 Use bool.
4066 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4067 * cp-support.h (cp_remove_params): Now returns a
4068 gdb::unique_xmalloc_ptr.
4069 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4070 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4071 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4072 returning a gdb::unique_xmalloc_ptr.
4073 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4074 * stack.c (find_frame_funname): Adjust to cp_remove_params
4075 returning a gdb::unique_xmalloc_ptr.
4076
791afaa2
TT
40772017-10-08 Tom Tromey <tom@tromey.com>
4078
4079 * dwarf2read.c (dwarf2_get_dwz_file): Use
4080 gdb::unique_xmalloc_ptr.
4081 (find_slot_in_mapped_hash): Likewise.
4082 (dwarf2_physname): Likewise.
4083 (create_dwo_unit_in_dwp_v1): Use std::string.
4084 (create_dwo_unit_in_dwp_v2): Likewise.
4085 (lookup_dwo_cutu): Likewise.
4086 (inherit_abstract_dies): Use std::vector.
4087 (read_array_type): Likewise.
4088 (dwarf_decode_macros): Remove unused declaration.
4089 (unsigned_int_compar): Remove.
4090 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4091 (psymtabs_addrmap_cleanup): Remove.
4092
30a9c02f
TT
40932017-10-08 Tom Tromey <tom@tromey.com>
4094
4095 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4096 * frame.h (frame_cleanup_after_sniffer): Declare.
4097 (frame_prepare_for_sniffer): Return void.
4098 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4099 type of argument.
4100 (frame_prepare_for_sniffer): Return void.
4101
757325a3
TT
41022017-10-08 Tom Tromey <tom@tromey.com>
4103
4104 * utils.h (make_cleanup_value_free): Remove.
4105 * utils.c (do_value_free, struct cleanup): Remove.
4106 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4107 Use gdb_value_up.
4108 * value.h (struct value_deleter): New.
4109 (gdb_value_up): New typedef.
4110
b9c04fb2
TT
41112017-10-08 Tom Tromey <tom@tromey.com>
4112
4113 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4114 (make_cleanup_free_search_symbols): Remove.
4115 (search_symbols): Return std::vector.
4116 (symbol_search::compare_search_syms): Now member of
4117 symbol_search. Change arguments.
4118 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4119 (symtab_symbol_info, rbreak_command): Update.
4120 * symtab.h (struct symbol_search) <next>: Remove.
4121 Add constructors.
4122 (symbol_search::operator<): New function.
4123 (symbol_search::operator==): New function.
4124 (search_symbols): Remove std::vector.
4125 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4126 (symbol_search::compare_search_syms): Declare.
4127
0d28b0a5
YQ
41282017-10-06 Yao Qi <yao.qi@linaro.org>
4129
4130 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4131 arch/aarch64-insn.o.
4132 Remove one rule.
4133 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4134
71917808
YQ
41352017-10-06 Yao Qi <yao.qi@linaro.org>
4136
4137 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4138 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4139 arch/arm-linux.o respectively.
4140 * configure.tgt: Likewise.
4141
2081b2b2
YQ
41422017-10-06 Yao Qi <yao.qi@linaro.org>
4143
4144 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4145 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4146
a1b85d28
PA
41472017-10-06 Pedro Alves <palves@redhat.com>
4148
4149 * windows-nat.c: Include <algorithm>.
4150
d97987e2
YQ
41512017-10-06 Yao Qi <yao.qi@linaro.org>
4152
4153 * configure.tgt (i386_tobjs): New variable.
4154 (amd64_tobjs): New variable.
4155 Set $cpu_obs and $os_obs.
4156
f38307f5
YQ
41572017-10-06 Yao Qi <yao.qi@linaro.org>
4158
4159 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4160 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4161 (clean): Remove object files and dependency files.
4162 (distclean): Remove the directory.
4163 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4164 * configure: Re-generated.
4165 * configure.tgt: Replace amd64.o with arch/amd64.o.
4166
2f924de6
JM
41672017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4168
4169 PR build/22188
4170 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4171 and SETEND.
4172
2fd9d7ca
PA
41732017-10-05 Pedro Alves <palves@redhat.com>
4174
4175 * linux-nat.c (linux_child_follow_fork): When following the parent
4176 and detaching the child, consult the parent thread's architecture
4177 instead of the child's.
4178
d13b8493
UW
41792017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4180
4181 * ax.h: Do not include "doublest.h".
4182 (union agent_val): Remove.
4183
3b4b2f16
UW
41842017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4185
4186 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4187 (decimal_to_string): Return std::string object.
4188 (decimal_from_string): Accept std::string object. Return bool.
4189 (decimal_from_integral, decimal_from_doublest): Remove.
4190 (decimal_from_longest): Add prototype.
4191 (decimal_from_ulongest): Likewise.
4192 (decimal_to_longest): Likewise.
4193 (decimal_from_doublest): Likewise.
4194 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4195 (MAX_DECIMAL_STRING): Move here.
4196 (decimal_to_string): Return std::string object.
4197 (decimal_from_string): Accept std::string object. Return bool.
4198 (decimal_from_integral): Remove, replace by ...
4199 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4200 (decimal_to_longest): New function.
4201 (decimal_from_floating): Remove, replace by ...
4202 (decimal_from_doublest): ... this new function.
4203 (decimal_to_doublest): Update to new decimal_to_string interface.
4204
4205 * value.c (unpack_long): Use decimal_to_longest.
4206 * valops.c (value_cast): Use decimal_from_doublest instead of
4207 decimal_from_floating. Use decimal_from_[u]longest isntead of
4208 decimal_from_integral.
4209 * valarith.c (value_args_as_decimal): Likewise.
4210 * valprint.c (print_decimal_floating): Update to new
4211 decimal_to_string interface.
4212 * printcmd.c (printf_decfloat): Likewise.
4213 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4214
1841ee5d
UW
42152017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4216
4217 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4218 * gdbtypes.c: Include "floatformat.h".
4219 * value.c: Likewise.
4220 * m68k-tdep.c: Likewise.
4221
4222 * findvar.c: Do not include "floatformat.h".
4223 * amd64-darwin-tdep.c: Likewise.
4224 * arm-linux-tdep.c: Likewise.
4225 * i386-darwin-tdep.c: Likewise.
4226 * i387-tdep.c: Likewise.
4227 * m68k-linux-tdep.c: Likewise.
4228 * mep-tdep.c: Likewise.
4229 * mips-tdep.c: Likewise.
4230 * nios2-tdep.c: Likewise.
4231 * s390-linux-tdep.c: Likewise.
4232 * sparc-obsd-tdep.c: Likewise.
4233 * sparc-tdep.c: Likewise.
4234 * sparc64-tdep.c: Likewise.
4235 * spu-tdep.c: Likewise.
4236 * tic6x-tdep.c: Likewise.
4237 * tilegx-tdep.c: Likewise.
4238 * vax-tdep.c: Likewise.
4239 * xstormy16-tdep.c: Likewise.
4240 * xtensa-tdep.c: Likewise.
4241
4242 * top.c: Do not include "doublest.h".
4243 * aarch64-tdep.c: Likewise.
4244 * alpha-tdep.c: Likewise.
4245 * arm-linux-tdep.c: Likewise.
4246 * m68k-linux-tdep.c: Likewise.
4247 * tilegx-tdep.c: Likewise.
4248 * xstormy16-tdep.c: Likewise.
4249
a80a6471
JB
42502017-10-05 John Baldwin <jhb@FreeBSD.org>
4251
4252 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4253 (mipsn32_fbsd_sigframe): Define.
4254 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4255 for FreeBSD/mipsn32.
4256
12c4bd7f
JB
42572017-10-05 John Baldwin <jhb@FreeBSD.org>
4258
4259 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4260 AT_HWCAP.
4261
c91933e9
TG
42622017-10-05 Tristan Gingold <tgingold@free.fr>
4263
4264 * MAINTAINERS (Misc): Update my email address.
4265
5cd63fda
PA
42662017-10-04 Pedro Alves <palves@redhat.com>
4267
4268 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4269 it instead of target_gdbarch.
4270 (get_remote_state, get_remote_packet_size): Adjust
4271 get_remote_arch_state calls, passing down target_gdbarch
4272 explicitly.
4273 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4274 'gdbarch' and use it instead of target_gdbarch.
4275 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4276 passing down target_gdbarch explicitly.
4277 (struct stop_reply) <arch>: New field.
4278 (remote_parse_stop_reply): Use the stopped thread's architecture,
4279 not the current inferior's. Save the architecture in the
4280 stop_reply.
4281 (process_stop_reply): Use the stop reply's architecture.
4282 (process_g_packet, remote_fetch_registers)
4283 (remote_prepare_to_store, store_registers_using_G)
4284 (remote_store_registers): Adjust get_remote_arch_state calls,
4285 using the regcache's architecture.
4286 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4287 passing down target_gdbarch explicitly.
4288 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4289 beneath instead of calling target_gdbarch.
4290 * target.c (default_thread_architecture): Use the specified
4291 inferior's architecture, instead of the current inferior's
4292 architecture (via target_gdbarch).
4293
ed4227b7
PA
42942017-10-04 Pedro Alves <palves@redhat.com>
4295
4296 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4297 case.
4298 (regcache_print): Handle !target_has_registers here instead.
4299
55b11ddf
PA
43002017-10-04 Pedro Alves <palves@redhat.com>
4301
4302 * frame.c (create_test_frame): Delete.
4303 * frame.h (create_test_frame): Delete.
4304 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4305 (class regcache_test): Delete.
4306 (test_target_has_registers, test_target_has_stack)
4307 (test_target_has_memory, test_target_prepare_to_store)
4308 (test_target_store_registers): New functions.
4309 (test_target_ops): New class.
4310 (register_to_value_test): Error out if there's already a
4311 process_stratum (or higher) target pushed. Create a fuller mock
4312 environment, with mock target_ops, inferior, address space, thread
4313 and inferior_ptid.
4314 * progspace.c (struct address_space): Move to ...
4315 * progspace.h (struct address_space): ... here.
4316 * regcache.h (regcache::~regcache, regcache::raw_write)
4317 [GDB_SELF_TEST]: No longer virtual.
4318
4c71c105
SM
43192017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4320
4321 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4322
73dcd72d
PA
43232017-10-04 Pedro Alves <palves@redhat.com>
4324
4325 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4326 out of 'between TRY and CATCH'.
4327
44704526
PA
43282017-10-04 Pedro Alves <palves@redhat.com>
4329
4330 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4331 * common/common-exceptions.h (TRY): Open an outermost scope.
4332 Expand intro comment.
4333 (CATCH): Reindent.
4334 (END_CATCH): Close the outermost scope.
4335 * completer.c (complete_line_internal): Add missing END_CATCH.
4336
bc3b087d
SDJ
43372017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4338
4339 * NEWS (Changes since GDB 8.0): Add entry about new
4340 'set-cwd-on-gdbserver' feature.
4341 (New remote packets): Add entry for QSetWorkingDir.
4342 * common/common-inferior.h (set_inferior_cwd): New prototype.
4343 * infcmd.c (set_inferior_cwd): Remove "static".
4344 (show_cwd_command): Expand text to include remote debugging.
4345 * remote.c: Add PACKET_QSetWorkingDir.
4346 (remote_protocol_features) <QSetWorkingDir>: New entry for
4347 PACKET_QSetWorkingDir.
4348 (extended_remote_set_inferior_cwd): New function.
4349 (extended_remote_create_inferior): Call
4350 "extended_remote_set_inferior_cwd".
4351 (_initialize_remote): Call "add_packet_config_cmd" for
4352 QSetWorkingDir.
4353
d092c5a2
SDJ
43542017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4355
4356 * NEWS (New commands): Mention "set/show cwd".
4357 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4358 "cd" command's help text.
4359 * common/common-inferior.h (get_inferior_cwd): New prototype.
4360 * infcmd.c (inferior_cwd_scratch): New global variable.
4361 (set_inferior_cwd): New function.
4362 (get_inferior_cwd): Likewise.
4363 (set_cwd_command): Likewise.
4364 (show_cwd_command): Likewise.
4365 (_initialize_infcmd): Add "set/show cwd" commands.
4366 * inferior.h (class inferior) <cwd>: New field.
4367 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4368 (fork_inferior): Change inferior's cwd before its execution.
4369 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4370 to CreateProcess.
4371
7da0a886
SDJ
43722017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4373
4374 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4375 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4376 (COMMON_OBS): Add gdb_tilde_expand.o.
4377 * common/gdb_tilde_expand.c: New file.
4378 * common/gdb_tilde_expand.h: Likewise.
4379
db8dd160
MR
43802017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4381
4382 * gdbarch.sh (objfile): Remove duplicate declaration.
4383 * gdbarch.h: Regenerate.
4384
f8bfbf22
TT
43852017-10-03 Tom Tromey <tom@tromey.com>
4386
4387 * utils.c (internal_vproblem): Use string_vprintf.
4388
5178ed48
TT
43892017-10-03 Tom Tromey <tom@tromey.com>
4390
4391 * printcmd.c (info_symbol_command): Use std::string.
4392
8cff8730
TT
43932017-10-03 Tom Tromey <tom@tromey.com>
4394
4395 * top.c (gdb_safe_append_history): Use std::string.
4396
895b8f30
TT
43972017-10-03 Tom Tromey <tom@tromey.com>
4398
4399 * event-top.c (stdin_event_handler): Update.
4400 * main.c (captured_main_1): Update.
4401 * top.h (make_delete_ui_cleanup): Remove.
4402 (struct ui): Add constructor and destructor.
4403 (new_ui, delete_ui): Remove.
4404 * top.c (make_delete_ui_cleanup): Remove.
4405 (new_ui_command): Use std::unique_ptr.
4406 (delete_ui_cleanup): Remove.
4407 (ui::ui): Rename from new_ui. Update.
4408 (free_ui): Remove.
4409 (ui::~ui): Rename from delete_ui. Update.
4410
0efef640
TT
44112017-10-03 Tom Tromey <tom@tromey.com>
4412
4413 * symfile.c (load_progress): Use gdb::byte_vector.
4414
245ad7d3
TT
44152017-10-03 Tom Tromey <tom@tromey.com>
4416
4417 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4418 declaration.
4419 * printcmd.c (x_command): Remove unused declaration.
4420 * symfile.c (symbol_file_command): Remove unused declaration.
4421
e05550d7
TT
44222017-10-03 Tom Tromey <tom@tromey.com>
4423
4424 * utils.c (internal_vproblem): Use std::string.
4425 (defaulted_query): Likewise.
4426
b95de2b7
TT
44272017-10-03 Tom Tromey <tom@tromey.com>
4428
4429 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4430 * top.c (execute_command_to_string): Update.
4431 * utils.c (make_cleanup_restore_page_info): Remove.
4432 (do_restore_page_info_cleanup): Remove.
4433 (set_batch_flag_and_restore_page_info):
4434 New.
4435 (make_cleanup_restore_page_info): Remove.
4436 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4437 (~set_batch_flag_and_restore_page_info): New
4438 (make_cleanup_restore_uinteger): Remove.
4439 (make_cleanup_restore_integer): Remove.
4440 (struct restore_integer_closure): Remove.
4441 (restore_integer): Remove.
4442 * utils.h (struct set_batch_flag_and_restore_page_info): New
4443 class.
4444 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4445 (make_cleanup_restore_page_info): Remove.
4446 (make_cleanup_restore_uinteger) Remove.
4447 (make_cleanup_restore_integer) Remove.
4448
07036511
TT
44492017-10-03 Tom Tromey <tom@tromey.com>
4450
4451 * record-full.h (record_full_gdb_operation_disable_set): Return
4452 scoped_restore_tmpl<int>.
4453 * infrun.c (adjust_pc_after_break): Update.
4454 (handle_signal_stop): Update.
4455 * record-full.c (record_full_gdb_operation_disable_set): Return
4456 scoped_restore_tmpl<int>.
4457 (record_full_wait_1, record_full_insert_breakpoint)
4458 (record_full_remove_breakpoint, record_full_save)
4459 (record_full_goto_insn): Update.
4460
45320ffa
TT
44612017-10-02 Tom Tromey <tom@tromey.com>
4462
4463 PR rust/22236:
4464 * rust-lang.c (rust_val_print_str): New function.
4465 (val_print_struct): Call it.
4466 (rust_subscript): Preserve name of slice type.
4467
b3e3859b
TT
44682017-10-02 Tom Tromey <tom@tromey.com>
4469
4470 * rust-lang.c (rust_subscript): Handle slices in
4471 EVAL_AVOID_SIDE_EFFECTS case.
4472
01af5e0d
TT
44732017-10-02 Tom Tromey <tom@tromey.com>
4474
4475 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4476
888e3ddb
TT
44772017-10-02 Tom Tromey <tom@tromey.com>
4478
4479 * rust-lang.h (rust_slice_type): Add "extern".
4480
cc536b21
PA
44812017-10-02 Tom Tromey <tom@tromey.com>
4482 Pedro Alves <palves@redhat.com>
4483
4484 * ada-lang.h (ada_exc_info::operator<): Make const.
4485 (ada_exc_info::operator==): Make const.
4486 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4487 Make const.
4488
386c8614
TT
44892017-09-29 Tom Tromey <tom@tromey.com>
4490
4491 * target.c (read_whatever_is_readable): Change type of "result".
4492 Update.
4493 (free_memory_read_result_vector): Remove.
4494 (read_memory_robust): Change return type. Update.
4495 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4496 bin2hex, std::string.
4497 * target.h (memory_read_result_s): Remove typedef.
4498 (free_memory_read_result_vector): Remove.
4499 (read_memory_robust): Return std::vector.
4500
789c4b5e
TT
45012017-09-29 Tom Tromey <tom@tromey.com>
4502
4503 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4504
ab816a27
TT
45052017-09-29 Tom Tromey <tom@tromey.com>
4506
4507 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4508 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4509 operator< and operator==.
4510 (ada_exceptions_list): Return a std::vector.
4511 * ada-lang.c (ada_exc_info::operator<): Rename from
4512 compare_ada_exception_info.
4513 (ada_exc_info::operator==): New.
4514 (sort_remove_dups_ada_exceptions_list): Change type of
4515 "exceptions".
4516 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4517 (ada_add_global_exceptions): Likewise.
4518 (ada_exceptions_list_1): Return a std::vector.
4519 (ada_exceptions_list): Likewise.
4520
52f9abe4
TT
45212017-09-29 Tom Tromey <tom@tromey.com>
4522
4523 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4524 'std::set *'.
4525 (print_one_inferior): Update.
4526 (free_vector_of_ints): Remove.
4527 (list_available_thread_groups): Change "ids" to std::set.
4528 (mi_cmd_list_thread_groups): Update.
4529 (struct collect_cores_data) <core>: Now a std::set.
4530 (collect_cores): Update.
4531 (unique): Remove.
4532 (print_one_inferior): Update.
4533
dcd5ddcc
TT
45342017-09-29 Tom Tromey <tom@tromey.com>
4535
4536 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4537 (mi_execute_async_cli_command): Likewise.
4538 (mi_cmd_trace_frame_collected): Use field_fmt.
4539
45d288cc
TT
45402017-09-29 Tom Tromey <tom@tromey.com>
4541
4542 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4543 gdb::byte_vector.
4544
6afe2f4a
TT
45452017-09-29 Tom Tromey <tom@tromey.com>
4546
4547 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4548
9813429a
TT
45492017-09-29 Tom Tromey <tom@tromey.com>
4550
4551 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4552
2d6960b4
TT
45532017-09-29 Tom Tromey <tom@tromey.com>
4554
4555 * varobj.h (varobj_gen_name): Return std::string.
4556 * varobj.c (varobj_gen_name): Return std::string.
4557 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4558 (mi_cmd_var_delete): Don't copy "name".
4559
784c453a
TT
45602017-09-29 Tom Tromey <tom@tromey.com>
4561
4562 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4563 (mi_cmd_break_insert_1): Update.
4564
a9bc57b9
TT
45652017-09-29 Tom Tromey <tom@tromey.com>
4566
4567 * target.h (make_scoped_defer_target_commit_resume): Update.
4568 * target.c (make_scoped_defer_target_commit_resume): Rename from
4569 make_cleanup_defer_target_commit_resume. Return a
4570 scoped_restore.
4571 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4572
9754d8c4
TT
45732017-09-29 Tom Tromey <tom@tromey.com>
4574
4575 * main.c (captured_main_1): Remove unused declaration.
4576 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4577
99ef965c
TT
45782017-09-29 Tom Tromey <tom@tromey.com>
4579
4580 * symtab.c (search_symbols): Remove unused outer cleanup.
4581 (make_source_files_completion_list): Remove unused declaration.
4582
42518ba7
TT
45832017-09-29 Tom Tromey <tom@tromey.com>
4584
4585 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4586
726b2169
TT
45872017-09-29 Tom Tromey <tom@tromey.com>
4588
4589 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4590 gdb::byte_vector.
4591
55b06432
TT
45922017-09-29 Tom Tromey <tom@tromey.com>
4593
4594 * complaints.c (vcomplaint): Use std::string.
4595
8abcee91
TT
45962017-09-29 Tom Tromey <tom@tromey.com>
4597
4598 * tracepoint.c (trace_variable_command): Use std::string.
4599 (encode_actions_1): Remove unused declarations.
4600 (create_tsv_from_upload): Use std::string.
4601
6ad94bc7
TT
46022017-09-29 Tom Tromey <tom@tromey.com>
4603
4604 * cp-support.c (gdb_demangle): Use std::string.
4605
2003f3d8
TT
46062017-09-29 Tom Tromey <tom@tromey.com>
4607
4608 * stack.c (parse_frame_specification): Use std::string
4609 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4610
8f8accb5
TT
46112017-09-29 Tom Tromey <tom@tromey.com>
4612
4613 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4614
200aa7b1
TT
46152017-09-29 Tom Tromey <tom@tromey.com>
4616
4617 * utils.c (vfprintf_maybe_filtered): Use std::string.
4618 (vfprintf_unfiltered): Likewise.
4619
606aae8a
TT
46202017-09-29 Tom Tromey <tom@tromey.com>
4621
4622 * event-top.c (top_level_prompt): Return std::string.
4623 (display_gdb_prompt): Update.
4624
bd413795
TT
46252017-09-29 Tom Tromey <tom@tromey.com>
4626
4627 * unittests/common-utils-selftests.c (format): New function.
4628 (string_vprintf_tests): New function.
4629 (_initialize_common_utils_selftests): Register new tests.
4630 * common/common-utils.c (string_vprintf): New function.
4631 * common/common-utils.h (string_vprintf): Declare.
4632
256642e8
PA
46332017-09-29 Pedro Alves <palves@redhat.com>
4634
4635 * common/rsp-low.c (unpack_varlen_hex): Constify.
4636 * common/rsp-low.h (unpack_varlen_hex): Constify.
4637 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4638 Constify.
4639 * remote.c (remote_set_permissions, read_ptid)
4640 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4641 (remote_static_tracepoint_marker_at)
4642 (remote_static_tracepoint_markers_by_strid)
4643 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4644 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4645 (parse_tracepoint_definition, parse_tsv_definition)
4646 (parse_static_tracepoint_marker_definition): Constify.
4647 * tracepoint.h (parse_static_tracepoint_marker_definition)
4648 (parse_trace_status, parse_tracepoint_status)
4649 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4650
b6bb3468
PA
46512017-09-29 Pedro Alves <palves@redhat.com>
4652
4653 * remote.c (target_buf, target_buf_size): Delete.
4654 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4655 Use the connection's packet buffer instead.
4656 All callers adjusted.
4657 (_initialize_remote): Remove references to target_buf and
4658 target_buf_size.
4659
b2f8eb7a
PA
46602017-09-28 Pedro Alves <palves@redhat.com>
4661
4662 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4663 unittests/common-utils-selftests.c.
4664 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4665 (COMMON_OBS): Remove utils-selftests.o.
4666 * utils-selftests.c: Move to ...
4667 * unittests/common-utils-selftests.c: ... here and rename self
4668 test to "string_printf".
4669
08302ed2
DE
46702017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4671
4672 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4673 having NULL cus or tus.
4674
96a5a1d3
UW
46752017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4676
4677 * arm-tdep.c: (convert_from_extended): Remove.
4678 (convert_to_extended): Likewise.
4679 (arm_extract_return_value): Use convert_typed_floating.
4680 (arm_store_return_value): Likewise.
4681
4682 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4683 * sh-tdep.c: Do not include "floatformat.h".
4684 (sh_littlebyte_bigword_type): New function.
4685 (sh_register_convert_to_virtual): Use convert_typed_floating.
4686 (sh_register_convert_to_raw): Likewise.
4687 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4688 (sh64_littlebyte_bigword_type): New function.
4689 (sh64_extract_return_value): Use convert_typed_floating.
4690 (sh64_register_convert_to_virtual): Likewise.
4691 (sh64_register_convert_to_raw): Likewise.
4692
0db7851f
UW
46932017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4694
4695 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4696 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4697
4698 * gdbtypes.h (union type_specific): Make field floatformat hold
4699 just a single struct floatformat, not an array.
4700 (floatformat_from_type): Move here.
4701 * gdbtypes.c (floatformat_from_type): Move here. Update to
4702 changed TYPE_FLOATFORMAT definition.
4703 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4704 (recursive_dump_type): Likewise.
4705 (init_float_type): Install correct floatformat for byte order.
4706 (arch_float_type): Likewise.
4707
77b7c781
UW
47082017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4709
4710 * gdbtypes.c (init_type): Change incoming argument from
4711 length-in-bytes to length-in-bits. Assert length is a
4712 multiple of TARGET_CHAR_BITS.
4713 (arch_type, arch_flags_type): Likewise.
4714 (init_integer_type): Update call to init_type.
4715 (init_character_type): Likewise.
4716 (init_boolean_type): Likewise.
4717 (init_float_type): Likewise.
4718 (init_decfloat_type): Likewise.
4719 (init_complex_type): Likewise.
4720 (init_pointer_type): Likewise.
4721 (objfile_type): Likewise.
4722 (arch_integer_type): Update call to arch_type.
4723 (arch_character_type): Likewise.
4724 (arch_boolean_type): Likewise.
4725 (arch_float_type): Likewise.
4726 (arch_decfloat_type): Likewise.
4727 (arch_complex_type): Likewise.
4728 (arch_pointer_type): Likewise.
4729 (gdbtypes_post_init): Likewise.
4730
4731 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4732 (read_base_type): Likewise.
4733 * mdebugread.c (basic_type): Likewise.
4734 * stabsread.c (dbx_init_float_type): Likewise.
4735 (rs6000_builtin_type): Likewise.
4736 (read_range_type): Likewise. Also, fix call to init_integer_type
4737 with erroneous length argument.
4738
4739 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4740 * d-lang.c (build_d_types): Likewise.
4741 * f-lang.c (build_fortran_types): Likewise.
4742 * go-lang.c (build_go_types): Likewise.
4743 * opencl-lang.c (build_opencl_types): Likewise.
4744 * jit.c (finalize_symtab): Likewise.
4745 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4746 (build_std_type_info_type): Likewise.
4747 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4748 update call to arch_flags_type.
4749
4750 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4751 arch_type.
4752 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4753 * windows-tdep.c (windows_get_tlb_type): Likewise.
4754
4755 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4756 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4757 * m32c-tdep.c (make_types): Likewise.
4758 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4759 (rl78_psw_type): Update call to arch_flags_type.
4760 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4761 * rx-tdep.c (rx_psw_type): Likewise.
4762 (rx_fpsw_type): Likewise.
4763 * sparc-tdep.c (sparc_psr_type): Likewise.
4764 (sparc_fsr_type): Likewise.
4765 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4766 (sparc64_ccr_type): Likewise.
4767 (sparc64_fsr_type): Likewise.
4768 (sparc64_fprs_type): Likewise.
4769
f21b4d5c
TT
47702017-09-27 Tom Tromey <tom@tromey.com>
4771
4772 * findcmd.c (find_command): Constify.
4773
643c2ffa
TT
47742017-09-27 Tom Tromey <tom@tromey.com>
4775
4776 * ada-tasks.c (task_command_1, task_command): Constify.
4777
510e5e56
TT
47782017-09-27 Tom Tromey <tom@tromey.com>
4779
4780 * symtab.c (maintenance_print_symbol_cache)
4781 (maintenance_flush_symbol_cache)
4782 (maintenance_print_symbol_cache_statistics): Constify.
4783
e503b191
TT
47842017-09-27 Tom Tromey <tom@tromey.com>
4785
4786 * inferior.c (detach_inferior_command, kill_inferior_command)
4787 (inferior_command): Constify.
4788
4e001312
TT
47892017-09-27 Tom Tromey <tom@tromey.com>
4790
4791 * regcache.c (regcache_print, maintenance_print_registers)
4792 (maintenance_print_raw_registers)
4793 (maintenance_print_cooked_registers)
4794 (maintenance_print_register_groups)
4795 (maintenance_print_remote_registers): Constify.
4796
77763700
TT
47972017-09-27 Tom Tromey <tom@tromey.com>
4798
4799 * printcmd.c (map_display_numbers, undisplay_command)
4800 (enable_disable_display_command, enable_display_command)
4801 (disable_display_command): Constify.
4802
4495129a
TT
48032017-09-27 Tom Tromey <tom@tromey.com>
4804
4805 * breakpoint.h (delete_command): Don't declare.
4806 * breakpoint.c (delete_command, enable_once_command)
4807 (enable_count_command, enable_delete_command, breakpoint_1)
4808 (maintenance_info_breakpoints, stopin_command, stopat_command)
4809 (delete_command, delete_trace_command, save_breakpoints)
4810 (save_breakpoints_command, save_tracepoints_command): Constify.
4811
3088cf40
TT
48122017-09-27 Tom Tromey <tom@tromey.com>
4813
4814 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4815 (skip_ws, extract_identifier, macro_define_command)
4816 (macro_undef_command, macro_list_command): Constify.
4817
69f476a3
TT
48182017-09-27 Tom Tromey <tom@tromey.com>
4819
4820 * infcmd.c (environment_info, set_environment_command)
4821 (unset_environment_command, path_info, info_proc_cmd_1)
4822 (info_proc_cmd_mappings, info_proc_cmd_stat)
4823 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4824 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4825
c4a3e68e
TT
48262017-09-27 Tom Tromey <tom@tromey.com>
4827
4828 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4829 Constify.
4830
c9d31bd6
TT
48312017-09-27 Tom Tromey <tom@tromey.com>
4832
4833 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4834
1f3f85eb
TT
48352017-09-27 Tom Tromey <tom@tromey.com>
4836
4837 * demangle.c (demangle_command): Constify.
4838
9c504b5d
TT
48392017-09-27 Tom Tromey <tom@tromey.com>
4840
4841 * progspace.c (maintenance_info_program_spaces_command):
4842 Constify.
4843
6663cf91
TT
48442017-09-27 Tom Tromey <tom@tromey.com>
4845
4846 * compile/compile.c (check_raw_argument, compile_file_command)
4847 (compile_code_command, compile_print_command): Constify.
4848
34e5fa26
TT
48492017-09-27 Tom Tromey <tom@tromey.com>
4850
4851 * reggroups.c (maintenance_print_reggroups): Constify.
4852
8384c356
TT
48532017-09-27 Tom Tromey <tom@tromey.com>
4854
4855 * dwarf2read.c (save_gdb_index_command): Constify.
4856
884beb0c
TT
48572017-09-27 Tom Tromey <tom@tromey.com>
4858
4859 * stap-probe.c (info_probes_stap_command): Constify.
4860
e0b2930c
TT
48612017-09-27 Tom Tromey <tom@tromey.com>
4862
4863 * fork-child.c (unset_exec_wrapper_command): Constify.
4864
f938677d
TT
48652017-09-27 Tom Tromey <tom@tromey.com>
4866
4867 * btrace.c (get_uint, get_context_size, no_chunk)
4868 (maint_btrace_packet_history_cmd)
4869 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4870 (maint_info_btrace_cmd): Constify.
4871
8949cb87
TT
48722017-09-27 Tom Tromey <tom@tromey.com>
4873
4874 * reverse.c (delete_bookmark_command): Constify.
4875
ac88e2de
TT
48762017-09-27 Tom Tromey <tom@tromey.com>
4877
4878 * remote.c (set_memory_packet_size)
4879 (set_memory_write_packet_size, show_memory_write_packet_size)
4880 (set_memory_read_packet_size, show_memory_read_packet_size)
4881 (compare_sections_command, packet_command, remote_put_command)
4882 (remote_get_command, remote_delete_command): Constify.
4883
bd4c9dfe
TT
48842017-09-27 Tom Tromey <tom@tromey.com>
4885
4886 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4887 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4888 (set_mipsfpu_auto_command): Constify.
4889
5e93d4c6
TT
48902017-09-27 Tom Tromey <tom@tromey.com>
4891
4892 * cli/cli-cmds.h (cd_command): Constify.
4893 * cli/cli-cmds.c (cd_command): Constify.
4894
fc41a75b
TT
48952017-09-27 Tom Tromey <tom@tromey.com>
4896
4897 * thread.c (thread_name_command, thread_find_command): Constify.
4898
67810076
TT
48992017-09-27 Tom Tromey <tom@tromey.com>
4900
4901 * probe.c (enable_probes_command, disable_probes_command):
4902 Constify.
4903
1d8b34a7
TT
49042017-09-27 Tom Tromey <tom@tromey.com>
4905
4906 * symfile.c (symbol_file_command): Constify.
4907 * gdbcore.h (deprecated_file_changed_hook): Constify.
4908 * exec.c (deprecated_file_changed_hook, exec_file_command)
4909 (file_command): Constify.
4910 * defs.h (symbol_file_command): Constify.
4911
442019e1
TT
49122017-09-27 Tom Tromey <tom@tromey.com>
4913
4914 * remote-fileio.c (set_system_call_allowed)
4915 (show_system_call_allowed): Constify.
4916
2983f7cb
TT
49172017-09-27 Tom Tromey <tom@tromey.com>
4918
4919 * tracepoint.c (delete_trace_variable_command)
4920 (tfind_end_command, tfind_start_command, tfind_pc_command)
4921 (tfind_tracepoint_command, tfind_line_command)
4922 (tfind_range_command, tfind_outside_command): Constify.
4923
4fd41b24
TT
49242017-09-27 Tom Tromey <tom@tromey.com>
4925
4926 * ax-gdb.c (maint_agent_printf_command, agent_command)
4927 (agent_eval_command): Constify.
4928
f2fc3015
TT
49292017-09-27 Tom Tromey <tom@tromey.com>
4930
4931 * tracepoint.c (info_scope_command): Constify.
4932 * python/python.c (gdbpy_decode_line): Constify.
4933 * python/py-breakpoint.c (bppy_init): Constify.
4934 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4935 * location.h: (new_linespec_location)
4936 (string_to_event_location_basic, string_to_event_location):
4937 Constify.
4938 * location.c (new_linespec_location)
4939 (string_to_event_location_basic, string_to_event_location):
4940 Constify.
4941 * linespec.h (decode_line_with_current_source)
4942 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4943 * linespec.c (linespec_lex_to_end)
4944 (decode_line_with_current_source)
4945 (decode_line_with_last_displayed): Constify.
4946 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4947 Constify.
4948 * cli/cli-cmds.c (edit_command, list_command): Constify.
4949 * breakpoint.h (until_break_command, watch_command_wrapper)
4950 (awatch_command_wrapper, rwatch_command_wrapper)
4951 (init_ada_exception_breakpoint): Constify.
4952 * breakpoint.c (break_command_1, dprintf_command)
4953 (break_range_command, watch_command_wrapper)
4954 (rwatch_command_wrapper, awatch_command_wrapper)
4955 (until_break_command, init_ada_exception_breakpoint)
4956 (strace_marker_create_sals_from_location, trace_command)
4957 (ftrace_command, strace_command, struct tracepoint): Constify.
4958 * ax-gdb.c (agent_command_1): Constify.
4959 * ada-lang.c (ada_exception_sal): Constify.
4960
8c2f95f4
TT
49612017-09-27 Tom Tromey <tom@tromey.com>
4962
4963 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4964 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4965 (get_context_size, no_chunk, get_insn_history_modifiers)
4966 (cmd_record_insn_history, get_call_history_modifiers)
4967 (cmd_record_call_history): Constify.
4968
a0d65762
TT
49692017-09-27 Tom Tromey <tom@tromey.com>
4970
4971 * source.c (show_substitute_path_command)
4972 (unset_substitute_path_command, set_substitute_path_command):
4973 Constify.
4974
58971144
TT
49752017-09-27 Tom Tromey <tom@tromey.com>
4976
4977 * typeprint.c (maintenance_print_type): Constify.
4978 * maint.c (maintenance_dump_me, maintenance_demangle)
4979 (maintenance_time_display, maintenance_info_sections)
4980 (maintenance_print_statistics, maintenance_deprecate)
4981 (maintenance_undeprecate): Constify.
4982 (maintenance_do_deprecate): Constify. Use std::string.
4983 (maintenance_selftest): Constify.
4984 * gdbtypes.h (maintenance_print_type): Constify.
4985
c482f52c
TT
49862017-09-27 Tom Tromey <tom@tromey.com>
4987
4988 * hppa-tdep.c (unwind_command): Constify.
4989
e100df1a
TT
49902017-09-27 Tom Tromey <tom@tromey.com>
4991
4992 * target-descriptions.c (unset_tdesc_filename_cmd)
4993 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4994 Constify.
4995
31d56ade
TT
49962017-09-27 Tom Tromey <tom@tromey.com>
4997
4998 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4999
b961da0b
TT
50002017-09-27 Tom Tromey <tom@tromey.com>
5001
5002 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5003
e2d8ae16
TT
50042017-09-27 Tom Tromey <tom@tromey.com>
5005
5006 * tui/tui-regs.c (tui_reg_command): Constify.
5007
863779b0
TT
50082017-09-27 Tom Tromey <tom@tromey.com>
5009
5010 * skip.c (skip_file_command, skip_function_command)
5011 (skip_enable_command, skip_disable_command, skip_delete_command):
5012 Constify.
5013
cdb34d4a
TT
50142017-09-27 Tom Tromey <tom@tromey.com>
5015
5016 * record-btrace.c (cmd_record_btrace_bts_start)
5017 (cmd_record_btrace_pt_start): Constify.
5018
e99c83e7
TT
50192017-09-27 Tom Tromey <tom@tromey.com>
5020
5021 * symmisc.c (maintenance_print_symbols)
5022 (maintenance_print_msymbols, maintenance_print_objfiles)
5023 (maintenance_info_symtabs, maintenance_check_symtabs)
5024 (maintenance_expand_symtabs, maintenance_info_line_tables):
5025 Constify.
5026
32faf971
TT
50272017-09-27 Tom Tromey <tom@tromey.com>
5028
5029 * top.c (new_ui_command): Constify.
5030
2cf311eb
TT
50312017-09-27 Tom Tromey <tom@tromey.com>
5032
5033 * symfile.c (add_symbol_file_command)
5034 (remove_symbol_file_command, list_overlays_command)
5035 (map_overlay_command, unmap_overlay_command)
5036 (overlay_auto_command, overlay_manual_command)
5037 (overlay_off_command, overlay_load_command): Constify.
5038
e6738699
TT
50392017-09-27 Tom Tromey <tom@tromey.com>
5040
5041 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5042 (info_spu_mailbox_command, info_spu_dma_command)
5043 (info_spu_proxydma_command): Constify.
5044
aa360cd5
TT
50452017-09-27 Tom Tromey <tom@tromey.com>
5046
5047 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5048
898241a5
TT
50492017-09-27 Tom Tromey <tom@tromey.com>
5050
5051 * cli/cli-script.c (user_defined_command): Constify.
5052
2d0ac106
TT
50532017-09-27 Tom Tromey <tom@tromey.com>
5054
5055 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5056 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5057 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5058 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5059 (dump_binary_value, append_binary_memory, append_binary_value):
5060 Constify.
5061 (struct dump_context) <func>: Constify.
5062 (add_dump_command): Update.
5063
dede02ce
TT
50642017-09-27 Tom Tromey <tom@tromey.com>
5065
5066 * cli/cli-cmds.c (show_version, show_configuration)
5067 (source_command, show_user): Constify.
5068
d3cb6b99
TT
50692017-09-27 Tom Tromey <tom@tromey.com>
5070
5071 * target.c (maintenance_print_target_stack): Constify.
5072
1970a12f
TT
50732017-09-27 Tom Tromey <tom@tromey.com>
5074
5075 * interps.c (interpreter_exec_cmd): Constify.
5076
41243651
TT
50772017-09-27 Tom Tromey <tom@tromey.com>
5078
5079 * record-full.c (cmd_record_full_restore): Constify.
5080
4465d9db
TT
50812017-09-27 Tom Tromey <tom@tromey.com>
5082
5083 * memattr.c (enable_mem_command, disable_mem_command)
5084 (delete_mem_command): Constify.
5085
ad25e423
TT
50862017-09-27 Tom Tromey <tom@tromey.com>
5087
5088 * value.c (show_convenience): Constify.
5089
d64097b1
TT
50902017-09-27 Tom Tromey <tom@tromey.com>
5091
5092 * gdbcore.h (core_file_command): Update.
5093 * corefile.c (core_file_command): Constify.
5094
4d4589ef
TT
50952017-09-27 Tom Tromey <tom@tromey.com>
5096
5097 * user-regs.c (maintenance_print_user_registers): Constify.
5098
32a7bf17
TT
50992017-09-27 Tom Tromey <tom@tromey.com>
5100
5101 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5102
4a475551
TT
51032017-09-27 Tom Tromey <tom@tromey.com>
5104
5105 * cp-support.c (first_component_command): Constify.
5106
990b9f9f
TT
51072017-09-27 Tom Tromey <tom@tromey.com>
5108
5109 * psymtab.c (maintenance_print_psymbols)
5110 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5111 Constify.
5112
c281872e
TT
51132017-09-27 Tom Tromey <tom@tromey.com>
5114
5115 * windows-tdep.c (display_tib): Constify.
5116
5b64bf74
TT
51172017-09-27 Tom Tromey <tom@tromey.com>
5118
5119 * linux-fork.c (delete_checkpoint_command)
5120 (detach_checkpoint_command): Constify.
5121
4ada038f
TT
51222017-09-27 Tom Tromey <tom@tromey.com>
5123
5124 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5125
57f5a81b
TT
51262017-09-27 Tom Tromey <tom@tromey.com>
5127
5128 * arc-tdep.c (dump_arc_instruction_command): Constify.
5129
b0a8e6c4
TT
51302017-09-27 Tom Tromey <tom@tromey.com>
5131
5132 * valprint.c (set_radix, show_radix): Constify.
5133
8d97dc1c
TT
51342017-09-27 Tom Tromey <tom@tromey.com>
5135
5136 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5137
eb7c454d
TT
51382017-09-27 Tom Tromey <tom@tromey.com>
5139
5140 * command.h (not_just_help_class_command): Update.
5141 * cli/cli-decode.h (not_just_help_class_command): Update.
5142 * cli/cli-decode.c (not_just_help_class_command): Constify.
5143
e4e33335
TT
51442017-09-27 Tom Tromey <tom@tromey.com>
5145
5146 * gdb_bfd.c (maintenance_info_bfds): Constify.
5147
0450cc4c
TT
51482017-09-27 Tom Tromey <tom@tromey.com>
5149
5150 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5151 overloads.
5152 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5153 (do_const_cfunc): New function.
5154 (cmd_cfunc_eq): New overload.
5155 (cli_user_command_p): Check do_const_cfunc.
5156 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5157 const_cfunc.
5158 * command.h (add_cmd): Add const overload and no-function
5159 overload.
5160 (set_cmd_cfunc): Add const overload.
5161 (cmd_const_cfunc_ftype): Declare.
5162 (cmd_cfunc_eq): Add const overload.
5163 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5164 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5165 overload.
5166
a9bbfbd8
TT
51672017-09-27 Tom Tromey <tom@tromey.com>
5168
5169 * macroexp.c (get_next_token_for_substitution): New function.
5170 (substitute_args): Call it. Check for __VA_OPT__.
5171
5230b05a
WT
51722017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5173 Pedro Alves <palves@redhat.com>
5174
5175 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5176 producer_is_icc_lt_14.
5177 (producer_is_icc_lt_14): New function.
5178 (check_producer): Add code for checking version of ICC.
5179 (producer_is_icc): Move to producer.c.
5180 (read_structure_type): Restrict ICC workaround to ICC<14.
5181 * producer.c: Include selftest.h.
5182 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5183 New functions.
5184 * producer.h (producer_is_icc): New declaration.
5185
b32b108a
WT
51862017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5187
5188 * Makefile.in (SFILES): Add producer.c.
5189 (COMMON_OBS): Add producer.o
5190 * amd64-tdep.c (producer.h): Add new include.
5191 * dwarf2read.c (producer.h): Add new include.
5192 * producer.c: New file.
5193 * producer.h: New file.
5194 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5195 producer.c.
5196 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5197 producer.h.
5198
5007d765
MK
51992017-09-26 Matthias Klose <doko@ubuntu.com>
5200
5201 * configure.ac: Search ncursesw before ncurses.
5202 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5203 * gdb_curses.h: Include <ncursesw/ncurses.h>
5204 * config.in, configure: Regenerate.
5205
281c4447
RO
52062017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5207
5208 PR gdb/22185
5209 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5210 obsolete.
5211 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5212 Remove i386sol2 support.
5213 * configure.nat <i386sol2>: Remove.
5214 <sol2-64>: Fold into ...
5215 <sol2>: ... this.
5216 Move common settings to default section.
5217 Add sol-thread.o.
5218 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5219 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5220 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5221 <i[34567]86-*-solaris*>: Remove.
5222 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5223
5224 * configure.ac: Remove wctype in libw check.
5225 (_MSE_INT_H): Don't define on Solaris 7-9.
5226 <solaris*>: Remove libthread_db.so.1 check.
5227 * configure: Regenerate.
5228 * config.in: Regenerate.
5229
5230 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5231 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5232 (gdb_ps_size_t): Remove.
5233 Use base types in users.
5234 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5235
5236 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5237
39b06c20
RO
52382017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5239
5240 PR build/22206
5241 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5242 (adi_is_addr_mapped): Likewise.
5243 (PSR_ICC): Don't redefine.
5244 (PSR_IMPL): Likewise.
5245
6c3e20f1
TT
52462017-09-25 Tom Tromey <tom@tromey.com>
5247
5248 * regcache.c (regcache::dump): Use string_printf.
5249
b292235f
TT
52502017-09-25 Tom Tromey <tom@tromey.com>
5251
5252 * regcache.c (class regcache_invalidator): New.
5253 (struct register_to_invalidate): Remove.
5254 (make_cleanup_regcache_invalidate): Remove.
5255 (regcache::raw_write): Use regcache_invalidator.
5256
9ac86b52
TT
52572017-09-25 Tom Tromey <tom@tromey.com>
5258
5259 * spu-tdep.c (spu2ppu_sniffer): Update.
5260 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5261 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5262 Remove.
5263 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5264 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5265 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5266 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5267 (frame_pop): Update.
5268
c0e383c6
TT
52692017-09-25 Tom Tromey <tom@tromey.com>
5270
5271 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5272 * regcache.h (regcache_xfree): Don't declare.
5273 * regcache.c (regcache_xfree): Remove.
5274 (do_regcache_xfree): Use delete.
5275 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5276 * linux-fork.c (free_fork): Use delete.
5277 (fork_save_infrun_state): Likewise.
5278 * jit.c (jit_dealloc_cache): Use delete.
5279 * infrun.c (discard_infcall_suspend_state): Use delete.
5280
791199cc
TT
52812017-09-25 Tom Tromey <tom@tromey.com>
5282
5283 * regcache.h (regcache_xmalloc): Don't declare.
5284 (regcache_raw_set_cached_value): Update comment.
5285 * regcache.c (regcache_xmalloc): Remove.
5286 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5287 * jit.c (jit_frame_sniffer): Use new.
5288 * frame.c (frame_save_as_regcache): Use new.
5289
289e23aa
AA
52902017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5291
5292 * NEWS: Advertise support for guarded-storage registers on IBM z.
5293
1b63490c
AA
52942017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5295
5296 * s390-linux-nat.c (have_regset_gs): New static variable.
5297 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5298 control block and guarded-storage broadcast control regsets.
5299 (s390_read_description): Detect whether the target has
5300 guarded-storage support, return appropriate tdesc.
5301 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5302 (features/s390x-gs-linux64.c): Likewise.
5303 (struct gdbarch_tdep) <have_gs>: New field.
5304 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5305 (s390_gsbc_regset): New variables.
5306 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5307 and s390_gsbc_regset, if applicable.
5308 (s390_core_read_description): Check whether core file was from a
5309 target with guarded-storage support; include appropriate regsets.
5310 (s390_gdbarch_init): Add registers for guarded-storage support.
5311 (_initialize_s390_tdep): Initialize new target descriptions that
5312 include registers for guarded-storage support.
5313 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5314 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5315 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5316 (S390_NUM_REGS): Adjust macro definition.
5317 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5318 (tdesc_s390x_gs_linux64): New declarations.
5319
96235dc1
AA
53202017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5321
5322 * features/s390-gs-linux64.xml: New file.
5323 * features/s390-gs.xml: New file.
5324 * features/s390-gsbc.xml: New file.
5325 * features/s390x-gs-linux64.xml: New file.
5326 * features/Makefile (WHICH): Add s390-gs-linux64 and
5327 s390x-gs-linux64.
5328 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5329 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5330 * features/s390-gs-linux64.c: New generated file.
5331 * features/s390x-gs-linux64.c: New file.
5332 * regformats/s390-gs-linux64.dat: New file.
5333 * regformats/s390x-gs-linux64.dat: New file.
5334
b4a7c699
TT
53352017-09-23 Tom Tromey <tom@tromey.com>
5336
5337 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5338
c2f97536
TT
53392017-09-22 Tom Tromey <tom@tromey.com>
5340
5341 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5342 type to scoped_restore_tmpl.
5343 <scoped_input_handler>: Initialize m_quit_handler directly.
5344
43573013
SDJ
53452017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5346
5347 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5348 (cd_command): Likewise. Free "current_directory" before
5349 assigning to it.
5350 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5351 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5352 * top.c (gdb_dirbuf): Remove global declaration.
5353 * top.h (gdb_dirbuf): Likewise.
5354
6ec2e0f5
SDJ
53552017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5356
5357 * gnulib/aclocal.m4: Regenerate.
5358 * gnulib/config.in: Regenerate.
5359 * gnulib/configure: Regenerate.
5360 * gnulib/import/Makefile.am: Regenerate.
5361 * gnulib/import/Makefile.in: Regenerate.
5362 * gnulib/import/assure.h: New file.
5363 * gnulib/import/at-func.c: Likewise
5364 * gnulib/import/chdir-long.c: New file.
5365 * gnulib/import/chdir-long.h: New file.
5366 * gnulib/import/cloexec.c: New file.
5367 * gnulib/import/cloexec.h: New file.
5368 * gnulib/import/close.c: New file.
5369 * gnulib/import/closedir.c: New file.
5370 * gnulib/import/dirent-private.h: New file.
5371 * gnulib/import/dup-safer.c: New file.
5372 * gnulib/import/dup.c: New file.
5373 * gnulib/import/dup2.c: New file.
5374 * gnulib/import/error.c: New file.
5375 * gnulib/import/error.h: New file.
5376 * gnulib/import/exitfail.c: New file.
5377 * gnulib/import/exitfail.h: New file.
5378 * gnulib/import/fchdir.c: New file.
5379 * gnulib/import/fcntl.c: New file.
5380 * gnulib/import/fcntl.in.h: New file.
5381 * gnulib/import/fd-hook.c: New file.
5382 * gnulib/import/fd-hook.h: New file.
5383 * gnulib/import/fd-safer.c: New file.
5384 * gnulib/import/fdopendir.c: New file.
5385 * gnulib/import/filename.h: New file.
5386 * gnulib/import/filenamecat-lgpl.c: New file.
5387 * gnulib/import/filenamecat.h: New file.
5388 * gnulib/import/fstat.c: New file.
5389 * gnulib/import/fstatat.c: New file.
5390 * gnulib/import/getcwd-lgpl.c: New file.
5391 * gnulib/import/getcwd.c: New file.
5392 * gnulib/import/getdtablesize.c: New file.
5393 * gnulib/import/getlogin_r.c: New file.
5394 * gnulib/import/getprogname.c: New file.
5395 * gnulib/import/getprogname.h: New file.
5396 * gnulib/import/gettext.h: New file.
5397 * gnulib/import/glob-libc.h: New file.
5398 * gnulib/import/glob.c: New file.
5399 * gnulib/import/glob.in.h: New file.
5400 * gnulib/import/intprops.h: New file.
5401 * gnulib/import/m4/chdir-long.m4: New file.
5402 * gnulib/import/m4/close.m4: New file.
5403 * gnulib/import/m4/closedir.m4: New file.
5404 * gnulib/import/m4/d-ino.m4: New file.
5405 * gnulib/import/m4/d-type.m4: New file.
5406 * gnulib/import/m4/dup.m4: New file.
5407 * gnulib/import/m4/dup2.m4: New file.
5408 * gnulib/import/m4/error.m4: New file.
5409 * gnulib/import/m4/fchdir.m4: New file.
5410 * gnulib/import/m4/fcntl.m4: New file.
5411 * gnulib/import/m4/fcntl_h.m4: New file.
5412 * gnulib/import/m4/fdopendir.m4: New file.
5413 * gnulib/import/m4/filenamecat.m4: New file.
5414 * gnulib/import/m4/fstat.m4: New file.
5415 * gnulib/import/m4/fstatat.m4: New file.
5416 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5417 * gnulib/import/m4/getcwd-path-max.m4: New file.
5418 * gnulib/import/m4/getcwd.m4: New file.
5419 * gnulib/import/m4/getdtablesize.m4: New file.
5420 * gnulib/import/m4/getlogin_r.m4: New file.
5421 * gnulib/import/m4/getprogname.m4: New file.
5422 * gnulib/import/m4/glob.m4: New file.
5423 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5424 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5425 * gnulib/import/m4/mempcpy.m4: New file.
5426 * gnulib/import/m4/memrchr.m4: New file.
5427 * gnulib/import/m4/mode_t.m4: New file.
5428 * gnulib/import/m4/msvc-inval.m4: New file.
5429 * gnulib/import/m4/msvc-nothrow.m4: New file.
5430 * gnulib/import/m4/open.m4: New file.
5431 * gnulib/import/m4/openat.m4: New file.
5432 * gnulib/import/m4/opendir.m4: New file.
5433 * gnulib/import/m4/readdir.m4: New file.
5434 * gnulib/import/m4/realloc.m4: New file.
5435 * gnulib/import/m4/rewinddir.m4: New file.
5436 * gnulib/import/m4/save-cwd.m4: New file.
5437 * gnulib/import/m4/strdup.m4: New file.
5438 * gnulib/import/m4/strerror.m4: New file.
5439 * gnulib/import/m4/unistd-safer.m4: New file.
5440 * gnulib/import/mempcpy.c: New file.
5441 * gnulib/import/memrchr.c: New file.
5442 * gnulib/import/msvc-inval.c: New file.
5443 * gnulib/import/msvc-inval.h: New file.
5444 * gnulib/import/msvc-nothrow.c: New file.
5445 * gnulib/import/msvc-nothrow.h: New file.
5446 * gnulib/import/open.c: New file.
5447 * gnulib/import/openat-die.c: New file.
5448 * gnulib/import/openat-priv.h: New file.
5449 * gnulib/import/openat-proc.c: New file.
5450 * gnulib/import/openat.c: New file.
5451 * gnulib/import/openat.h: New file.
5452 * gnulib/import/opendir.c: New file.
5453 * gnulib/import/pipe-safer.c: New file.
5454 * gnulib/import/readdir.c: New file.
5455 * gnulib/import/realloc.c: New file.
5456 * gnulib/import/rewinddir.c: New file.
5457 * gnulib/import/save-cwd.c: New file.
5458 * gnulib/import/save-cwd.h: New file.
5459 * gnulib/import/strdup.c: New file.
5460 * gnulib/import/strerror-override.c: New file.
5461 * gnulib/import/strerror-override.h: New file.
5462 * gnulib/import/strerror.c: New file.
5463 * gnulib/import/unistd--.h: New file.
5464 * gnulib/import/unistd-safer.h: New file.
5465 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5466 "getcwd" and "glob".
5467 * ser-tcp.c: Undefine "close" before redefining it.
5468
432ae719
SM
54692017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5470
5471 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5472 get rid of res_val.
5473
4fa7574e
RO
54742017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5475
5476 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5477 <sol2,sparc>: Likewise.
5478 <sol2-64,i386>: Likewise.
5479
5480 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5481 -Wdeprecated-declarations on *-*-solaris*.
5482 * configure: Regenerate.
5483
5484 * procfs.c: Include "nat/inferior.h".
5485 (procfs_info_proc): Fix typo.
5486
f6327dcb
KB
54872017-09-21 Kevin Buettner <kevinb@redhat.com>
5488
5489 * remote.c (vector): Include.
5490 (struct private_thread_info): Add field, thread_handle.
5491 (free_private_thread_info): Deallocate storage associated with
5492 thread handle.
5493 (get_private_info_thread): Initialize `thread_handle' field.
5494 (struct thread_item): Add field, thread_handle.
5495 (clear_threads_listing_context): Deallocate storage associated
5496 with thread handle.
5497 (start_thread): Add support for "handle" attribute.
5498 (thread_attributes): Add "handle".
5499 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5500 field.
5501 (remote_update_thread_list): Update thread_handle.
5502 (remote_thread_handle_to_thread_info): New function.
5503 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5504
fbbe5337
KB
55052017-09-21 Kevin Buettner <kevinb@redhat.com>
5506
5507 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5508 function.
5509 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5510 * python/python-internal.h (thread_object_type): Declare.
5511
e04ee09e
KB
55122017-09-21 Kevin Buettner <kevinb@redhat.com>
5513
5514 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5515 (target_thread_handle_to_thread_info): Declare.
5516 * target.c (target_thread_handle_to_thread_info): New function.
5517 * target-delegates.c: Regenerate.
5518 * gdbthread.h (find_thread_by_handle): Declare.
5519 * thread.c (find_thread_by_handle): New function.
5520 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5521 function.
5522 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5523
1e5b66ed
SM
55242017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5525
5526 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5527
ebe48ba0
SM
55282017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5529
5530 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5531
0a0bf5dc
YQ
55322017-09-21 Yao Qi <yao.qi@linaro.org>
5533
5534 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5535 to gdb_target_obs.
5536
d1b0a7bf
TT
55372017-09-20 Tom Tromey <tom@tromey.com>
5538
5539 * breakpoint.c (struct counted_command_line): Remove.
5540 (breakpoint_commands): Update.
5541 (alloc_counted_command_line, incref_counted_command_line)
5542 (decref_counted_command_line, do_cleanup_counted_command_line)
5543 (make_cleanup_decref_counted_command_line): Remove.
5544 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5545 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5546 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5547 (save_breakpoints): Update.
5548 * breakpoint.h (counted_command_line): Now a typedef to
5549 shared_ptr.
5550 (struct breakpoint) <commands>: Now a counted_command_line.
5551 (struct bpstats) <command>: Likewise.
5552
48649e1b
TT
55532017-09-20 Tom Tromey <tom@tromey.com>
5554
5555 * breakpoint.c (struct commands_info, do_map_commands_command):
5556 Remove.
5557 (commands_command_1): Update.
5558 (iterate_over_related_breakpoints): Take a function_view.
5559 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5560 (delete_command): Update.
5561 (map_breakpoint_numbers): Take a function_view.
5562 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5563 (disable_command): Update.
5564 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5565 (enable_command): Update.
5566 (struct disp_data, do_enable_breakpoint_disp)
5567 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5568 (do_map_enable_delete_breakpoint): Remove.
5569 (enable_once_command, enable_count_command, enable_delete_command)
5570 (delete_trace_variable_command): Update.
5571
04afa70c
TT
55722017-09-20 Tom Tromey <tom@tromey.com>
5573
5574 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5575 (bpstat_clear): Use delete.
5576 (bpstats): New constructors.
5577 (bpstat_copy, bpstat_stop_status): Use new.
5578 (dprintf_after_condition_true): Update.
5579 * breakpoint.h (bpstats::bpstats): Add constructors.
5580 (bpstats::~bpstats): Add destructor.
5581
c83833f4
PA
55822017-09-20 Pedro Alves <palves@redhat.com>
5583
5584 * eval.c (make_params): Delete, refactored as ...
5585 (class fake_method): ... this new type's ctor.
5586 (fake_method::~fake_method): New.
5587 (evaluate_subexp_standard): Use 'fake_method'.
5588
223ffa71
TT
55892017-09-20 Tom Tromey <tom@tromey.com>
5590
5591 * windows-nat.c (get_windows_debug_event, windows_wait)
5592 (do_initial_windows_stuff, windows_attach): Update.
5593 * utils.c (vwarning, internal_vproblem): Update.
5594 (ui_unregister_input_event_handler_cleanup)
5595 (prepare_to_handle_input): Remove.
5596 (class scoped_input_handler): New.
5597 (defaulted_query, prompt_for_continue): Update.
5598 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5599 Update.
5600 * top.c (undo_terminal_modifications_before_exit): Update.
5601 * target/target.h (target_terminal_init, target_terminal_inferior)
5602 (target_terminal_ours): Don't declare.
5603 (class target_terminal): New.
5604 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5605 (target_terminal_ours_for_output)
5606 (make_cleanup_restore_target_terminal): Don't declare.
5607 (target_terminal_info): Remove.
5608 * target.c (enum terminal_state, terminal_state): Remove.
5609 (target_terminal::terminal_state): Define.
5610 (target_terminal::init): Rename from target_terminal_init.
5611 (target_terminal::inferior): Rename from
5612 target_terminal_inferior.
5613 (target_terminal::ours): Rename from target_terminal_ours.
5614 (target_terminal::ours_for_output): Rename from
5615 target_terminal_ours_for_output.
5616 (target_terminal::info): New method.
5617 (cleanup_restore_target_terminal)
5618 (make_cleanup_restore_target_terminal): Remove.
5619 * solib.c (handle_solib_event): Update.
5620 * remote.c (remote_serial_quit_handler): Update.
5621 (remote_terminal_inferior, remote_wait_as): Update.
5622 * record-full.c (record_full_wait_1): Update.
5623 * nto-procfs.c (procfs_create_inferior): Update.
5624 * nat/fork-inferior.c (startup_inferior): Update.
5625 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5626 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5627 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5628 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5629 (mi_breakpoint_created, mi_breakpoint_deleted)
5630 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5631 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5632 (mi_user_selected_context_changed, report_initial_inferior):
5633 Update.
5634 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5635 (linux_nat_terminal_inferior): Update.
5636 * infrun.c (follow_fork_inferior)
5637 (handle_vfork_child_exec_or_exit, do_target_resume)
5638 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5639 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5640 Update.
5641 * inflow.c (child_terminal_init, info_terminal_command): Update.
5642 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5643 (attach_command): Update.
5644 * infcall.c (call_thread_fsm_should_stop): Update.
5645 * gnu-nat.c (gnu_attach): Update.
5646 * extension.c (struct active_ext_lang_state)
5647 (restore_active_ext_lang): Update.
5648 * exceptions.c (print_flush): Update.
5649 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5650 (struct quit_handler_cleanup_data, restore_quit_handler)
5651 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5652 Remove.
5653 * cp-support.c (gdb_demangle): Update.
5654 * breakpoint.c (update_inserted_breakpoint_locations)
5655 (insert_breakpoint_locations, handle_jit_event)
5656 (disable_breakpoints_in_unloaded_shlib): Update.
5657 * annotate.c (annotate_breakpoints_invalid)
5658 (annotate_frames_invalid): Update.
5659
013af3fc
TT
56602017-09-20 Tom Tromey <tom@tromey.com>
5661
5662 * main.c (catch_command_errors): Rename from
5663 catch_command_errors_const.
5664 (captured_main_1): Update.
5665
06871ae8
PA
56662017-09-20 Pedro Alves <palves@redhat.com>
5667
5668 * cli/cli-cmds.c (list_command): Use print_sal_location.
5669 (print_sal_location): New function.
5670 (ambiguous_line_spec): Use print_sal_location.
5671 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5672 * symtab.c (find_function_start_sal): Likewise.
5673 * symtab.h (symtab_and_line::symbol): New field.
5674
e5f25bc5
PA
56752017-09-20 Pedro Alves <palves@redhat.com>
5676
5677 * linespec.c (minsym_found): Handle non-text minsyms.
5678 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5679
1b7fa39e
WT
56802017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5681
5682 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5683 backslash.
5684
37dd0825
WT
56852017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5686
5687 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5688 vmovups instead vmovaps.
5689 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5690
4e5a4f58
JB
56912017-09-19 John Baldwin <jhb@FreeBSD.org>
5692
5693 * NEWS (Changes since GDB 8.0): Add starti.
5694 * infcmd.c (enum run_break): New.
5695 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5696 case.
5697 (run_command): Use enum run_how.
5698 (start_command): Likewise.
5699 (starti_command): New function.
5700 (RUN_ARGS_HELP): New macro.
5701 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5702 commands. Add starti command.
5703
aa70c9f1
YQ
57042017-09-19 Yao Qi <yao.qi@linaro.org>
5705
5706 * Makefile.in (monitor.o): Remove the rule.
5707
d6541620
YQ
57082017-09-19 Yao Qi <yao.qi@linaro.org>
5709
5710 * annotate.h (struct annotate_arg_emitter): Use
5711 DISABLE_COPY_AND_ASSIGN.
5712 * common/refcounted-object.h (refcounted_object): Likewise.
5713 * completer.h (struct completion_result): Likewise.
5714 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5715 * filename-seen-cache.h (filename_seen_cache): Likewise.
5716 * gdbcore.h (thread_section_name): Likewise.
5717 * gdb_regex.h (compiled_regex): Likewise.
5718 * gdbthread.h (scoped_restore_current_thread): Likewise.
5719 * inferior.h (scoped_restore_current_inferior): Likewise.
5720 * jit.c (jit_reader): Likewise.
5721 * linespec.h (struct linespec_result): Likewise.
5722 * mi/mi-parse.h (struct mi_parse): Likewise.
5723 * nat/fork-inferior.c (execv_argv): Likewise.
5724 * progspace.h (scoped_restore_current_program_space): Likewise.
5725 * python/python-internal.h (class gdbpy_enter): Likewise.
5726 * regcache.h (regcache): Likewise.
5727 * target-descriptions.c (struct tdesc_reg): Likewise.
5728 (struct tdesc_type): Likewise.
5729 (struct tdesc_feature): Likewise.
5730 * ui-out.h (ui_out_emit_type): Likewise.
5731
0615127c
SM
57322017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5733
5734 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5735 label abort_expression.
5736
5e187554
SM
57372017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5738
5739 * common/buffer.c (buffer_xml_printf): Adjust.
5740 * common/xml-utils.c (xml_escape_text): Change return type to
5741 std::string, update code accordingly.
5742 * common/xml-utils.h (xml_escape_text): Change return type to
5743 std::string.
5744 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5745 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5746 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5747 Adjust.
5748
c3d7b541
SM
57492017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5750
5751 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5752 (SUBDIR_UNITTESTS_OBS): Add new object file.
5753 * unittests/xml-utils-selftests.c: New file.
5754
1526853e
SM
57552017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5756
5757 * common/selftest.h (selftest): New struct/interface.
5758 (register_test): Add name parameter, add new overload.
5759 (run_tests): Add filter parameter.
5760 (for_each_selftest_ftype): New typedef.
5761 (for_each_selftest): New declaration.
5762 * common/selftest.c (tests): Change type to
5763 map<string, unique_ptr<selftest>>.
5764 (simple_selftest): New struct.
5765 (register_test): New function.
5766 (register_test): Add name parameter and use it.
5767 (run_tests): Add filter parameter and use it. Add prints.
5768 Adjust to vector -> map change.
5769 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5770 registering selftests.
5771 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5772 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5773 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5774 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5775 * findvar.c (_initialize_findvar): Likewise.
5776 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5777 * maint.c (maintenance_selftest): Update call to run_tests.
5778 (maintenance_info_selftests): New function.
5779 (_initialize_maint_cmds): Register "maintenance info selftests"
5780 command. Update "maintenance selftest" doc.
5781 * regcache.c (_initialize_regcache): Add names when registering
5782 selftests.
5783 * rust-exp.y (_initialize_rust_exp): Likewise.
5784 * selftest-arch.c (gdbarch_selftest): New struct.
5785 (gdbarch_tests): Remove.
5786 (register_test_foreach_arch): Add name parameter. Call
5787 register_test.
5788 (tests_with_arch): Remove, move most content to
5789 gdbarch_selftest::operator().
5790 (_initialize_selftests_foreach_arch): Remove.
5791 * selftest-arch.h (register_test_foreach_arch): Add name
5792 parameter.
5793 (run_tests_with_arch): New declaration.
5794 * utils-selftests.c (_initialize_utils_selftests): Add names
5795 when registering selftests.
5796 * utils.c (_initialize_utils): Likewise.
5797 * unittests/array-view-selftests.c
5798 (_initialize_array_view_selftests): Likewise.
5799 * unittests/environ-selftests.c (_initialize_environ_selftests):
5800 Likewise.
5801 * unittests/function-view-selftests.c
5802 (_initialize_function_view_selftests): Likewise.
5803 * unittests/offset-type-selftests.c
5804 (_initialize_offset_type_selftests): Likewise.
5805 * unittests/optional-selftests.c
5806 (_initialize_optional_selftests): Likewise.
5807 * unittests/scoped_restore-selftests.c
5808 (_initialize_scoped_restore_selftests): Likewise.
5809 * NEWS: Document "maintenance selftest" and "maint info
5810 selftests".
5811
5846367a
SM
58122017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5813
5814 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5815 scoped_restore.
5816
bd77e8ff
SM
58172017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5818
5819 * mi/mi-main.c (mi_load_progress): Make uiout variable
5820 a unique_ptr.
5821
26a67918
PA
58222017-09-15 Pedro Alves <palves@redhat.com>
5823
5824 * compile/compile-c-types.c (convert_enum, convert_int)
5825 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5826
3f8a7804
SM
58272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5828
5829 * dwarf2read.c (copy_string): Remove.
5830 (parse_macro_definition): Replace copy_string with savestring.
5831
8d200706
YQ
58322017-09-15 Yao Qi <yao.qi@linaro.org>
5833
5834 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5835 gdb_target_obs.
5836 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5837 Likewise.
5838 (i[34567]86-*-linux*): Likewise.
5839
d185219d
SM
58402017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5841
5842 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5843 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5844 <stack>: Change type to std::vector.
5845 <stack_len, stack_allocated>: Remove.
5846 <grow_stack>: Remove.
5847 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5848 (dwarf_expr_context::~dwarf_expr_context): Remove.
5849 (dwarf_expr_context::grow_stack): Remove.
5850 (dwarf_expr_context::push): Adjust.
5851 (dwarf_expr_context::pop): Adjust.
5852 (dwarf_expr_context::fetch): Adjust.
5853 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5854 (dwarf_expr_context::stack_empty_p): Adjust.
5855 (dwarf_expr_context::execute_stack_op): Adjust.
5856
eccd80d6
SM
58572017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5858
5859 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5860 return type to bool.
5861 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5862
69009882
SM
58632017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5864
5865 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5866 Change type to bool.
5867 (dwarf_stack_value) <in_stack_memory>: Likewise.
5868 (dwarf_expr_context) <push_address>: Change parameter type to
5869 bool.
5870 <fetch_in_stack_memory>: Change return type to bool.
5871 <push>: Change parameter type to bool.
5872 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5873 to bool.
5874 (dwarf_expr_context::push_address): Likewise.
5875 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5876 to bool.
5877 (dwarf_expr_context::execute_stack_op): Adjust.
5878 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5879
1e467161
SM
58802017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5881
5882 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5883 (struct dwarf_expr_context) <n_pieces>: Remove.
5884 <pieces>: Change type to std::vector.
5885 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5886 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5887 pieces.
5888 (dwarf_expr_context::add_piece): Adjust.
5889 * dwarf2loc.c (struct piece_closure): Initialize fields.
5890 <n_pieces>: Remove.
5891 <pieces>: Change type to std::vector.
5892 (allocate_piece_closure): Adjust, change parameter to
5893 std::vector rvalue and std::move it to piece_closure.
5894 (rw_pieced_value): Adjust.
5895 (check_pieced_synthetic_pointer): Adjust.
5896 (indirect_synthetic_pointer): Adjust.
5897 (coerce_pieced_ref): Adjust.
5898 (free_pieced_value_closure): Adjust. Use delete to free
5899 piece_closure.
5900 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5901 to allocate_piece_closure.
5902 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5903
0782db84
SM
59042017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5905
5906 * probe.h (probe_ops_cp): Remove typedef.
5907 (DEF_VEC_P (probe_ops_cp)): Remove.
5908 (all_probe_ops): Change type to std::vector.
5909 * probe.c (info_probes_for_ops): Adjust to vector change.
5910 (probe_linespec_to_ops): Likewise.
5911 (all_probe_ops): Change type to std::vector.
5912 (_initialize_probe): Adjust to vector change.
5913 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5914 * elfread.c (elf_get_probes): Likewise.
5915 * stap-probe.c (_initialize_stap_probe): Likewise.
5916
1eac6bea
SM
59172017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5918
5919 * probe.h (struct bound_probe): Define constructors.
5920 * probe.c (bound_probe_s): Remove typedef.
5921 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5922 (collect_probes): Change return type to std::vector, remove
5923 cleanup.
5924 (compare_probes): Return bool, change parameter type. Change
5925 semantic to "less than".
5926 (gen_ui_out_table_header_info): Change parameter to std::vector
5927 and update.
5928 (exists_probe_with_pops): Likewise.
5929 (info_probes_for_ops): Update to std::vector change.
5930 (enable_probes_command): Likewise.
5931 (disable_probes_command): Likewise.
5932
aaa63a31
SM
59332017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5934
5935 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5936 vec to std::vector.
5937 * probe.c (parse_probes_in_pspace): Update.
5938 (find_probes_in_objfile): Update.
5939 (find_probe_by_pc): Update.
5940 (collect_probes): Update.
5941 (probe_any_get_probes): Update.
5942 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5943 return type to reference to std::vector.
5944 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5945 std::vector and update.
5946 (dtrace_process_dof): Likewise.
5947 (dtrace_get_probes): Likewise.
5948 * elfread.c (elf_get_probes): Change return type to std::vector,
5949 store an std::vector in bfd_data.
5950 (probe_key_free): Update to std::vector.
5951 * stap-probe.c (handle_stap_probe): Change parameter to
5952 std::vector and update.
5953 (stap_get_probes): Likewise.
5954 * symfile-debug.c (debug_sym_get_probes): Change return type to
5955 std::vector and update.
5956
cb85b21b
TT
59572017-09-11 Tom Tromey <tom@tromey.com>
5958
5959 * breakpoint.c (program_breakpoint_here_p): Update.
5960 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5961 from make_show_memory_breakpoints_cleanup. Return a
5962 scoped_restore_tmpl<int>.
5963 (restore_show_memory_breakpoints): Remove.
5964 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5965 * mem-break.c (memory_validate_breakpoint): Update.
5966 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5967 (ia64_memory_remove_breakpoint): Update.
5968 (ia64_breakpoint_from_pc): Update.
5969 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5970 from make_show_memory_breakpoints_cleanup.
5971
8fbc99ef
TT
59722017-09-11 Tom Tromey <tom@tromey.com>
5973
5974 * d-namespace.c (d_lookup_symbol): Use std::string.
5975 (find_symbol_in_baseclass): Likewise.
5976
50feb4bd
TT
59772017-09-11 Tom Tromey <tom@tromey.com>
5978
5979 * ctf.c (ctf_start): Use std::string.
5980
c6dc63a1
TT
59812017-09-11 Tom Tromey <tom@tromey.com>
5982
5983 * ada-lang.c (is_known_support_routine): Update.
5984 (ada_unhandled_exception_name_addr_from_raise): Update.
5985 * guile/scm-frame.c (gdbscm_frame_name): Update.
5986 * python/py-frame.c (frapy_name): Update.
5987 (frapy_function): Update.
5988 * stack.h (find_frame_funname): Update.
5989 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5990 (print_frame): Update.
5991
d6b9b80f
TT
59922017-09-11 Tom Tromey <tom@tromey.com>
5993
5994 * findcmd.c (put_bits): Take a gdb::byte_vector.
5995 (parse_find_args): Return gdb::byte_vector. "args" now const.
5996 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5997 cleanups.
5998 (find_command): Update.
5999
a9921622
TT
60002017-09-11 Tom Tromey <tom@tromey.com>
6001
6002 * cli/cli-script.c (class scoped_restore_hook_in): New.
6003 (clear_hook_in_cleanup): Remove.
6004 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6005 scoped_restore_hook_in.
6006
be0d7abb
TT
60072017-09-11 Tom Tromey <tom@tromey.com>
6008
6009 * cli/cli-script.c (restore_interp): Remove.
6010 (read_command_lines): Use scoped_restore_interp.
6011 * interps.c (scoped_restore_interp::set_temp): Rename from
6012 interp_set_temp.
6013 * interps.h (class scoped_restore_interp): New.
6014 (interp_set_temp): Remove.
6015
00f675ff
TT
60162017-09-11 Tom Tromey <tom@tromey.com>
6017
6018 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6019 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6020 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6021 scoped_restore.
6022 (mi_cmd_break_insert_1): Update.
6023 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6024 scoped_restore.
6025
cb791d59
TT
60262017-09-11 Tom Tromey <tom@tromey.com>
6027
6028 * demangle.c (demangle_command): Update.
6029 * breakpoint.c (disable_command): Update.
6030 (enable_command): Update.
6031 (find_location_by_number): Make "number" const. Use
6032 get_number_trailer.
6033 * cli/cli-utils.c (extract_arg): Return std::string.
6034 * probe.c (parse_probe_linespec): Update. Change types.
6035 (collect_probes): Take string arguments.
6036 (parse_probe_linespec): Likewise.
6037 (info_probes_for_ops): Update.
6038 (enable_probes_command): Update.
6039 (disable_probes_command): Update.
6040 * break-catch-sig.c (catch_signal_split_args): Update.
6041 * mi/mi-parse.c (mi_parse): Update.
6042
2039bd9f
TT
60432017-09-11 Tom Tromey <tom@tromey.com>
6044
6045 * language.h (language_enum): Make argument const.
6046 * language.c (language_enum): Make argument const.
6047
f1735a53
TT
60482017-09-11 Tom Tromey <tom@tromey.com>
6049
6050 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6051 as function.
6052 (skip_to_space): Rename from skip_to_space_const.
6053 * common/common-utils.c (skip_to_space): New function.
6054 (skip_to_space): Rename from skip_to_space_const.
6055 * cli/cli-utils.h (get_number): Rename from get_number_const.
6056 (extract_arg): Rename from extract_arg_const.
6057 * cli/cli-utils.c (get_number): Rename from get_number_const.
6058 (extract_arg): Rename from extract_arg_const.
6059 (number_or_range_parser::get_number): Use ::get_number.
6060 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6061 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6062 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6063 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6064 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6065 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6066 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6067 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6068
7d221d74
TT
60692017-09-11 Tom Tromey <tom@tromey.com>
6070
6071 * python/python.c (do_start_initialization): Use
6072 py-event-types.def to initialize types.
6073 Define all object type structures.
6074 * python/python-internal.h: Don't declare event initialization
6075 functions.
6076 * python/py-threadevent.c (thread_event_object_type): Don't
6077 define.
6078 * python/py-stopevent.c (stop_event_object_type): Don't define.
6079 * python/py-signalevent.c (signal_event_object_type): Don't
6080 declare or define.
6081 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6082 (clear_objfiles_event_object_type): Don't declare or define.
6083 * python/py-infevents.c (inferior_call_pre_event_object_type)
6084 (inferior_call_post_event_object_type)
6085 (register_changed_event_object_type)
6086 (memory_changed_event_object_type): Don't declare or define.
6087 * python/py-inferior.c (new_thread_event_object_type)
6088 (new_inferior_event_object_type)
6089 (inferior_deleted_event_object_type): Don't declare or define.
6090 * python/py-exitedevent.c (exited_event_object_type): Don't
6091 declare or define.
6092 * python/py-evts.c (gdbpy_initialize_py_events): Use
6093 py-all-events.def.
6094 * python/py-events.h (thread_event_object_type): Don't declare.
6095 (events_object): Use py-all-events.def.
6096 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6097 py-event-types.def.
6098 * python/py-event-types.def: New file.
6099 * python/py-continueevent.c (create_continue_event_object): Don't
6100 declare or define.
6101 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6102 declare or define.
6103 * python/py-all-events.def: New file.
6104
35c61a1d
TT
61052017-09-11 Tom Tromey <tom@tromey.com>
6106
6107 * python/py-threadevent.c (create_thread_event_object): Return
6108 gdbpy_ref.
6109 * python/py-stopevent.h (create_stop_event_object)
6110 (create_breakpoint_event_object, create_signal_event_object):
6111 Update.
6112 * python/py-stopevent.c (create_stop_event_object): Return
6113 gdbpy_ref.
6114 (emit_stop_event): Update.
6115 * python/py-signalevent.c (create_signal_event_object): Return
6116 gdbpy_ref.
6117 * python/py-infevents.c (create_inferior_call_event_object):
6118 Update.
6119 * python/py-event.h (create_event_object)
6120 (create_thread_event_object): Update.
6121 * python/py-event.c (create_event_object): Return gdbpy_ref.
6122 * python/py-continueevent.c: Return gdbpy_ref.
6123 * python/py-bpevent.c (create_breakpoint_event_object): Return
6124 gdbpy_ref.
6125
7c96f8c1
TT
61262017-09-11 Tom Tromey <tom@tromey.com>
6127
6128 PR python/15622:
6129 * NEWS: Add entry.
6130 * python/python.c (do_start_initialization): Initialize new event
6131 types.
6132 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6133 (gdbpy_initialize_inferior_deleted_event)
6134 (gdbpy_initialize_new_thread_event): Declare.
6135 * python/py-threadevent.c (create_thread_event_object): Add option
6136 "thread" parameter.
6137 * python/py-inferior.c (new_thread_event_object_type)
6138 (new_inferior_event_object_type)
6139 (inferior_deleted_event_object_type): Declare.
6140 (python_new_inferior, python_inferior_deleted): New functions.
6141 (add_thread_object): Emit new_thread event.
6142 (gdbpy_initialize_inferior): Attach new functions to corresponding
6143 observers.
6144 (new_thread, new_inferior, inferior_deleted): Define new event
6145 types.
6146 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6147 registries.
6148 * python/py-events.h (events_object) <new_inferior,
6149 inferior_deleted, new_thread>: New fields.
6150 * python/py-event.h (create_thread_event_breakpoint): Add optional
6151 "thread" parameter.
6152
72542b8e
AB
61532017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6154
6155 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6156 check current_ui instead.
6157 (internal_vproblem): Likewise.
6158
0d64823e
SM
61592017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6160
6161 * thread.c (print_thread_info_1): Remove unnecessary calls to
6162 uiout->is_mi_like_p.
6163
eb1e02fd
TT
61642017-09-09 Tom Tromey <tom@tromey.com>
6165
6166 * namespace.h (add_using_directive): Update.
6167 * namespace.c (add_using_directive): Change type of excludes to
6168 std::vector.
6169 * dwarf2read.c (read_import_statement): Use std::vector.
6170 (read_namespace): Update.
6171 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6172
0fc21fd8
TT
61732017-09-09 Tom Tromey <tom@tromey.com>
6174
6175 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6176
49663d05
TT
61772017-09-09 Tom Tromey <tom@tromey.com>
6178
6179 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6180
0b868b60
TT
61812017-09-09 Tom Tromey <tom@tromey.com>
6182
6183 * stack.c (func_command): Use gdb::def_vector.
6184
c0470d48
TT
61852017-09-09 Tom Tromey <tom@tromey.com>
6186
6187 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6188 ui_out_emit_list, ui_out_emit_tuple.
6189 (mi_cmd_var_update): Likewise.
6190
ca5909c7
TT
61912017-09-09 Tom Tromey <tom@tromey.com>
6192
6193 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6194 ui_out_redirect_pop.
6195 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6196 ui_out_redirect_pop.
6197 * utils.c (do_ui_out_redirect_pop)
6198 (make_cleanup_ui_out_redirect_pop): Remove.
6199 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6200 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6201 * ui-out.h (ui_out_redirect_pop): New class.
6202
e6a2252a
TT
62032017-09-09 Tom Tromey <tom@tromey.com>
6204
6205 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6206 (list_available_thread_groups, mi_cmd_list_thread_groups)
6207 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6208 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6209 Likewise.
6210
393702cd
TT
62112017-09-09 Tom Tromey <tom@tromey.com>
6212
6213 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6214 ui_out_emit_tuple.
6215
76f9c9cf
TT
62162017-09-09 Tom Tromey <tom@tromey.com>
6217
6218 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6219 * stack.c (print_frame): Use ui_out_emit_tuple.
6220 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6221 (info_spu_mailbox_command, info_spu_dma_command)
6222 (info_spu_proxydma_command): Likewise.
6223 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6224 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6225 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6226 ui_out_emit_tuple.
6227 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6228
dc9fe180
TT
62292017-09-09 Tom Tromey <tom@tromey.com>
6230
6231 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6232 (class ui_out_emit_table): Update comment.
6233 * ui-out.c (do_cleanup_table_end)
6234 (make_cleanup_ui_out_table_begin_end): Remove.
6235 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6236 (info_spu_dma_cmdlist): Likewise.
6237 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6238 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6239 ui_out_emit_table.
6240
f8cc3da6
TT
62412017-09-09 Tom Tromey <tom@tromey.com>
6242
6243 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6244 ui_out_emit_list, gdb::optional.
6245
481695ed
JB
62462017-09-09 John Baldwin <jhb@FreeBSD.org>
6247
6248 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6249 prototype.
6250 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6251 prototype.
6252 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6253 prototype.
6254 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6255 * ada-exp.y: Remove _initialize_ada_exp prototype.
6256 * ada-lang.c: Remove _initialize_ada_language prototype.
6257 * ada-tasks.c: Remove _initialize_tasks prototype.
6258 * addrmap.c: Remove _initialize_addrmap prototype.
6259 * agent.c: Remove _initialize_agent prototype.
6260 * aix-thread.c: Remove _initialize_aix_thread prototype.
6261 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6262 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6263 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6264 prototype.
6265 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6266 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6267 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6268 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6269 prototype.
6270 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6271 prototype.
6272 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6273 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6274 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6275 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6276 prototype.
6277 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6278 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6279 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6280 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6281 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6282 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6283 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6284 prototype.
6285 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6286 prototype.
6287 * annotate.c: Remove _initialize_annotate prototype.
6288 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6289 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6290 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6291 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6292 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6293 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6294 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6295 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6296 prototype.
6297 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6298 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6299 * auto-load.c: Remove _initialize_auto_load prototype.
6300 * auxv.c: Remove _initialize_auxv prototype.
6301 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6302 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6303 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6304 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6305 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6306 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6307 prototype.
6308 * break-catch-throw.c: Remove _initialize_break_catch_throw
6309 prototype.
6310 * breakpoint.c: Remove _initialize_breakpoint prototype.
6311 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6312 * btrace.c: Remove _initialize_btrace prototype.
6313 * charset.c: Remove _initialize_charset prototype.
6314 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6315 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6316 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6317 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6318 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6319 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6320 * coffread.c: Remove _initialize_coffread prototype.
6321 * compile/compile.c: Remove _initialize_compile prototype.
6322 * complaints.c: Remove _initialize_complaints prototype.
6323 * completer.c: Remove _initialize_completer prototype.
6324 * copying.awk: Remove _initialize_copying prototype.
6325 * copying.c: Regenerate.
6326 * core-regset.c: Remove _initialize_core_regset prototype.
6327 * corefile.c: Remove _initialize_core prototype.
6328 * corelow.c: Remove _initialize_corelow prototype.
6329 * cp-abi.c: Remove _initialize_cp_abi prototype.
6330 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6331 * cp-support.c: Remove _initialize_cp_support prototype.
6332 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6333 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6334 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6335 * ctf.c: Remove _initialize_ctf prototype.
6336 * d-lang.c: Remove _initialize_d_language prototype.
6337 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6338 prototype.
6339 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6340 * dbxread.c: Remove _initialize_dbxread prototype.
6341 * dcache.c: Remove _initialize_dcache prototype.
6342 * demangle.c: Remove _initialize_demangler prototype.
6343 * disasm-selftests.c: Remove _initialize_disasm_selftests
6344 prototype.
6345 * disasm.c: Remove _initialize_disasm prototype.
6346 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6347 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6348 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6349 prototype.
6350 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6351 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6352 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6353 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6354 * elfread.c: Remove _initialize_elfread prototype.
6355 * exec.c: Remove _initialize_exec prototype.
6356 * extension.c: Remove _initialize_extension prototype.
6357 * f-lang.c: Remove _initialize_f_language prototype.
6358 * f-valprint.c: Remove _initialize_f_valprint prototype.
6359 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6360 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6361 * filesystem.c: Remove _initialize_filesystem prototype.
6362 * findcmd.c: Remove _initialize_mem_search prototype.
6363 * fork-child.c: Remove _initialize_fork_child prototype.
6364 * frame-base.c: Remove _initialize_frame_base prototype.
6365 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6366 * frame.c: Remove _initialize_frame prototype.
6367 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6368 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6369 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6370 * gcore.c: Remove _initialize_gcore prototype.
6371 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6372 * gdbarch.c: Regenerate.
6373 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6374 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6375 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6376 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6377 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6378 * go-lang.c: Remove _initialize_go_language prototype.
6379 * go32-nat.c: Remove _initialize_go32_nat prototype.
6380 * guile/guile.c: Remove _initialize_guile prototype.
6381 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6382 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6383 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6384 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6385 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6386 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6387 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6388 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6389 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6390 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6391 prototype.
6392 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6393 prototype.
6394 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6395 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6396 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6397 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6398 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6399 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6400 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6401 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6402 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6403 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6404 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6405 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6406 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6407 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6408 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6409 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6410 prototype.
6411 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6412 prototype.
6413 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6414 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6415 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6416 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6417 * infcall.c: Remove _initialize_infcall prototype.
6418 * infcmd.c: Remove _initialize_infcmd prototype.
6419 * inferior.c: Remove _initialize_inferiors prototype.
6420 * inflow.c: Remove _initialize_inflow prototype.
6421 * infrun.c: Remove _initialize_infrun prototype.
6422 * interps.c: Remove _initialize_interpreter prototype.
6423 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6424 * jit.c: Remove _initialize_jit prototype.
6425 * language.c: Remove _initialize_language prototype.
6426 * linux-fork.c: Remove _initialize_linux_fork prototype.
6427 * linux-nat.c: Remove _initialize_linux_nat prototype.
6428 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6429 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6430 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6431 * m2-lang.c: Remove _initialize_m2_language prototype.
6432 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6433 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6434 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6435 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6436 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6437 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6438 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6439 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6440 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6441 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6442 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6443 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6444 * machoread.c: Remove _initialize_machoread prototype.
6445 * macrocmd.c: Remove _initialize_macrocmd prototype.
6446 * macroscope.c: Remove _initialize_macroscope prototype.
6447 * maint.c: Remove _initialize_maint_cmds prototype.
6448 * mdebugread.c: Remove _initialize_mdebugread prototype.
6449 * memattr.c: Remove _initialize_mem prototype.
6450 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6451 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6452 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6453 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6454 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6455 * microblaze-linux-tdep.c: Remove
6456 _initialize_microblaze_linux_tdep prototype.
6457 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6458 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6459 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6460 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6461 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6462 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6463 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6464 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6465 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6466 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6467 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6468 prototype.
6469 * mipsread.c: Remove _initialize_mipsread prototype.
6470 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6471 prototype.
6472 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6473 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6474 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6475 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6476 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6477 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6478 prototype.
6479 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6480 * nto-procfs.c: Remove _initialize_procfs prototype.
6481 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6482 * objc-lang.c: Remove _initialize_objc_language prototype.
6483 * objfiles.c: Remove _initialize_objfiles prototype.
6484 * observer.c: Remove observer_test_first_notification_function,
6485 observer_test_second_notification_function,
6486 observer_test_third_notification_function, and
6487 _initialize_observer prototypes.
6488 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6489 * osabi.c: Remove _initialize_gdb_osabi prototype.
6490 * osdata.c: Remove _initialize_osdata prototype.
6491 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6492 * parse.c: Remove _initialize_parse prototype.
6493 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6494 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6495 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6496 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6497 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6498 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6499 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6500 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6501 * printcmd.c: Remove _initialize_printcmd prototype.
6502 * probe.c: Remove _initialize_probe prototype.
6503 * proc-api.c: Remove _initialize_proc_api prototype.
6504 * proc-events.c: Remove _initialize_proc_events prototype.
6505 * proc-service.c: Remove _initialize_proc_service prototype.
6506 * procfs.c: Remove _initialize_procfs prototype.
6507 * psymtab.c: Remove _initialize_psymtab prototype.
6508 * python/python.c: Remove _initialize_python prototype.
6509 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6510 * record-btrace.c: Remove _initialize_record_btrace prototype.
6511 * record-full.c: Remove _initialize_record_full prototype.
6512 * record.c: Remove _initialize_record prototype.
6513 * regcache.c: Remove _initialize_regcache prototype.
6514 * reggroups.c: Remove _initialize_reggroup prototype.
6515 * remote-notif.c: Remove _initialize_notif prototype.
6516 * remote-sim.c: Remove _initialize_remote_sim prototype.
6517 * remote.c: Remove _initialize_remote prototype.
6518 * reverse.c: Remove _initialize_reverse prototype.
6519 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6520 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6521 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6522 prototype.
6523 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6524 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6525 * rust-exp.y: Remove _initialize_rust_exp prototype.
6526 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6527 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6528 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6529 * score-tdep.c: Remove _initialize_score_tdep prototype.
6530 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6531 prototype.
6532 * ser-go32.c: Remove _initialize_ser_dos prototype.
6533 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6534 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6535 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6536 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6537 * serial.c: Remove _initialize_serial prototype.
6538 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6539 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6540 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6541 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6542 * skip.c: Remove _initialize_step_skip prototype.
6543 * sol-thread.c: Remove _initialize_sol_thread prototype.
6544 * solib-aix.c: Remove _initialize_solib_aix prototype.
6545 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6546 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6547 * solib-frv.c: Remove _initialize_frv_solib prototype.
6548 * solib-spu.c: Remove _initialize_spu_solib prototype.
6549 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6550 * solib-target.c: Remove _initialize_solib_target prototype.
6551 * solib.c: Remove _initialize_solib prototype.
6552 * source.c: Remove _initialize_source prototype.
6553 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6554 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6555 prototype.
6556 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6557 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6558 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6559 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6560 prototype.
6561 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6562 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6563 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6564 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6565 prototype.
6566 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6567 prototype.
6568 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6569 prototype.
6570 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6571 prototype.
6572 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6573 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6574 prototype.
6575 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6576 prototype.
6577 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6578 prototype.
6579 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6580 prototype.
6581 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6582 prototype.
6583 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6584 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6585 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6586 * stabsread.c: Remove _initialize_stabsread prototype.
6587 * stack.c: Remove _initialize_stack prototype.
6588 * stap-probe.c: Remove _initialize_stap_probe prototype.
6589 * std-regs.c: Remove _initialize_frame_reg prototype.
6590 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6591 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6592 * symfile.c: Remove _initialize_symfile prototype.
6593 * symmisc.c: Remove _initialize_symmisc prototype.
6594 * symtab.c: Remove _initialize_symtab prototype.
6595 * target-dcache.c: Remove _initialize_target_dcache prototype.
6596 * target-descriptions.c: Remove _initialize_target_descriptions
6597 prototype.
6598 * thread.c: Remove _initialize_thread prototype.
6599 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6600 prototype.
6601 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6602 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6603 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6604 prototype.
6605 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6606 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6607 * tracefile.c: Remove _initialize_tracefile prototype.
6608 * tracepoint.c: Remove _initialize_tracepoint prototype.
6609 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6610 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6611 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6612 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6613 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6614 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6615 * tui/tui.c: Remove _initialize_tui prototype.
6616 * typeprint.c: Remove _initialize_typeprint prototype.
6617 * user-regs.c: Remove _initialize_user_regs prototype.
6618 * utils.c: Remove _initialize_utils prototype.
6619 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6620 * valarith.c: Remove _initialize_valarith prototype.
6621 * valops.c: Remove _initialize_valops prototype.
6622 * valprint.c: Remove _initialize_valprint prototype.
6623 * value.c: Remove _initialize_values prototype.
6624 * varobj.c: Remove _initialize_varobj prototype.
6625 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6626 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6627 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6628 * windows-nat.c: Remove _initialize_windows_nat,
6629 _initialize_check_for_gdb_ini, and _initialize_loadable
6630 prototypes.
6631 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6632 * xcoffread.c: Remove _initialize_xcoffread prototype.
6633 * xml-support.c: Remove _initialize_xml_support prototype.
6634 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6635 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6636 prototype.
6637 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6638 prototype.
6639 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6640
a611b5cb
KS
66412017-09-08 Keith Seitz <keiths@redhat.com>
6642
6643 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6644 field.
6645
469412dd
CW
66462017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6647
6648 * f-valprint.c (f_val_print): Remove check for one byte
6649 sized integers. Remove printing of character type.
6650
a5ad232b
FP
66512017-09-08 Frank Penczek <frank.penczek@intel.com>
6652 Christoph Weinmann <christoph.t.weinmann@intel.com>
6653 Bernhard Heckel <bernhard.heckel@intel.com>
6654
6655 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6656 to maintain proper indentation when printing pointers/refs.
6657
e5014227
JB
66582017-09-07 Joel Brobecker <brobecker@adacore.com>
6659
6660 GDB 8.0.1 released.
6661
63c99141
JB
66622017-09-07 Joel Brobecker <brobecker@adacore.com>
6663
6664 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6665
69c1e056
TT
66662017-09-05 Tom Tromey <tom@tromey.com>
6667
6668 * parse.c (funcall_chain): Now a std::vector.
6669 (start_arglist, end_arglist): Simplify.
6670 (free_funcalls): Remove.
6671 (parse_exp_in_context_1): Remove cleanup.
6672
fef704bf
TT
66732017-09-05 Tom Tromey <tom@tromey.com>
6674
6675 * go-exp.y (go_parse): Don't create a cleanup.
6676
5613c585
TT
66772017-09-05 Tom Tromey <tom@tromey.com>
6678
6679 * d-exp.y (PrimaryExpression): Use std::string.
6680 (d_parse): Don't create a cleanup.
6681
eae49211
TT
66822017-09-05 Tom Tromey <tom@tromey.com>
6683
6684 * utils.c (do_clear_parser_state): Remove.
6685 (make_cleanup_clear_parser_state): Remove.
6686 * p-exp.y (pascal_parse): Use scoped_restore.
6687 * m2-exp.y (m2_parse): Use scoped_restore.
6688 * f-exp.y (f_parse): Use scoped_restore.
6689 * d-exp.y (d_parse): Use scoped_restore.
6690 * c-exp.y (c_parse): Use scoped_restore.
6691 * ada-exp.y (ada_parse): Use scoped_restore.
6692 * utils.h (make_cleanup_clear_parser_state): Remove.
6693
73b9be8b
KS
66942017-09-06 Keith Seitz <keiths@redhat.com>
6695
6696 * dwarf2read.c (dw2_linkage_name_attr): New function.
6697 (dw2_linkage_name): New function.
6698 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6699 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6700 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6701
a102602b
KR
67022017-09-06 Kamil Rytarowski <n54@gmx.com>
6703
6704 * config/djgpp/djconfig.sh: Correct shell portability issue.
6705
28ad437d
KR
67062017-09-06 Kamil Rytarowski <n54@gmx.com>
6707
6708 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6709
351787dd
JB
67102017-09-06 John Baldwin <jhb@FreeBSD.org>
6711
6712 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6713 * NEWS: Mention new FreeBSD/mips native configuration.
6714 * configure.host: Add aarch64*-*-freebsd*.
6715 * configure.nat: Likewise.
6716 * aarch64-fbsd-nat.c: New file.
6717
c0f84956
JB
67182017-09-06 John Baldwin <jhb@FreeBSD.org>
6719
6720 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6721 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6722 * NEWS: Mention new FreeBSD/aarch64 target.
6723 * configure.tgt: Add aarch64*-*-freebsd*.
6724 * aarch64-fbsd-tdep.c: New file.
6725 * aarch64-fbsd-tdep.h: New file.
6726
7610297a
KR
67272017-09-06 Kamil Rytarowski <n54@gmx.com>
6728
6729 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6730
fbd1b771
JK
67312017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6732
6733 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6734 of TLS symbols.
6735
5ca79eae
PW
67362017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6737
6738 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6739 call.
6740
bf93d7ba
SM
67412017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6742
6743 * infrun.c (follow_exec): Call add_thread after
6744 target_find_description.
6745
1bb7c059
SM
67462017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6747
6748 * infrun.c (handle_inferior_event_1): When exec'ing, read
6749 stop_pc after follow_exec.
6750
fc809827
SM
67512017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6752
6753 * remote.c (process_g_packet): Update error message.
6754
d2fcdd85
YQ
67552017-09-05 Yao Qi <yao.qi@linaro.org>
6756
6757 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6758 targets.
6759
e69570ee
PA
67602017-09-05 Pedro Alves <palves@redhat.com>
6761
6762 * eval.c (eval_call, evaluate_funcall): New functions, factored
6763 out from ...
6764 (evaluate_subexp_standard): ... this.
6765
22916b07
YQ
67662017-09-05 Yao Qi <yao.qi@linaro.org>
6767
6768 * amd64-tdep.c (amd64_target_description): Create target
6769 descriptions.
6770 (_initialize_amd64_tdep): Don't call functions
6771 initialize_tdesc_amd64_*. Add self tests.
6772 * arch/amd64.c (amd64_create_target_description): Add parameter
6773 is_linux. Call set_tdesc_osabi if is_linux is true.
6774 * arch/amd64.h (amd64_create_target_description): Update the
6775 declaration.
6776 * arch/i386.c (i386_create_target_description): Add parameter
6777 is_linux. Call set_tdesc_osabi if is_linux is true.
6778 * arch/i386.h (i386_create_target_description): Update
6779 declaration.
6780 * configure.tgt: Add i386.o to gdb_target_obs.
6781 * features/Makefile (XMLTOC): Remove i386/*.xml.
6782 * features/i386/amd64-avx-avx512.c: Remove.
6783 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6784 * features/i386/amd64-avx-mpx.c: Remove.
6785 * features/i386/amd64-avx.c: Remove.
6786 * features/i386/amd64-mpx.c: Remove.
6787 * features/i386/amd64.c: Remove.
6788 * features/i386/i386-avx-avx512.c: Remove.
6789 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6790 * features/i386/i386-avx-mpx.c: Remove.
6791 * features/i386/i386-avx.c: Remove.
6792 * features/i386/i386-mmx.c: Remove.
6793 * features/i386/i386-mpx.c: Remove.
6794 * features/i386/i386.c: Remove.
6795 * i386-tdep.c: Don't include features/i386/i386*.c., include
6796 target-descriptions.h and arch/i386.h.
6797 (i386_target_description): Create target descriptions.
6798 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6799 functions. Do self tests.
6800
0854b7b1
YQ
68012017-09-05 Yao Qi <yao.qi@linaro.org>
6802
6803 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6804 * features/i386/amd64-avx-avx512-linux.c: Removed.
6805 * features/i386/amd64-avx-linux.c: Removed.
6806 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6807 * features/i386/amd64-avx-mpx-linux.c: Removed.
6808 * features/i386/amd64-linux.c: Removed.
6809 * features/i386/amd64-mpx-linux.c: Removed.
6810 * features/i386/x32-avx-avx512-linux.c: Removed.
6811 * features/i386/x32-avx-linux.c: Removed.
6812 * features/i386/x32-linux.c: Removed.
6813
b4570e4b
YQ
68142017-09-05 Yao Qi <yao.qi@linaro.org>
6815
6816 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6817 features/i386/*.c.
6818 (amd64_linux_read_description): Call
6819 amd64_create_target_description.
6820 * arch/amd64.c: New file.
6821 * arch/amd64.h: New file.
6822 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6823 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6824
6c73f67f
YQ
68252017-09-05 Yao Qi <yao.qi@linaro.org>
6826
6827 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6828 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6829 (amd64_linux_read_description): Create target descriptions.
6830 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6831 functions. Add unit tests.
6832 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6833 x32-core.xml.
6834 * features/i386/64bit-avx.c: Generated.
6835 * features/i386/64bit-avx512.c: Generated.
6836 * features/i386/64bit-core.c: Generated.
6837 * features/i386/64bit-linux.c: Generated.
6838 * features/i386/64bit-mpx.c: Generated.
6839 * features/i386/64bit-pkeys.c: Generated.
6840 * features/i386/64bit-segments.c: Generated.
6841 * features/i386/64bit-sse.c: Generated.
6842 * features/i386/x32-core.c: Generated.
6843 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6844 c files for amd64-linux and x32-linux.
6845
9d3d478b
YQ
68462017-09-05 Yao Qi <yao.qi@linaro.org>
6847
6848 * amd64-linux-tdep.c (amd64_linux_read_description): New
6849 function.
6850 (amd64_linux_core_read_description): Call
6851 amd64_linux_read_description.
6852 (amd64_linux_init_abi): Likewise.
6853 (amd64_x32_linux_init_abi): Likewise.
6854 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6855 * x86-linux-nat.c (x86_linux_read_description): Call
6856 amd64_linux_read_description.
6857
b9f1d50f
YQ
68582017-09-05 Yao Qi <yao.qi@linaro.org>
6859
6860 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6861 comments.
6862
188c9e6d
YQ
68632017-09-05 Yao Qi <yao.qi@linaro.org>
6864
6865 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6866 * features/i386/i386-avx-avx512-linux.c: Remove.
6867 * features/i386/i386-avx-linux.c: Remove.
6868 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6869 * features/i386/i386-avx-mpx-linux.c: Remove.
6870 * features/i386/i386-linux.c: Remove.
6871 * features/i386/i386-mmx-linux.c: Remove.
6872 * features/i386/i386-mpx-linux.c: Remove.
6873
5f035c07
YQ
68742017-09-05 Yao Qi <yao.qi@linaro.org>
6875
6876 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6877 (SFILES): Add arch/i386.c.
6878 (HFILES_NO_SRCDIR): Add arch/i386.h.
6879 * arch/i386.c: New file.
6880 * arch/i386.h: New file.
6881 * arch/tdesc.h (allocate_target_description): Declare.
6882 (set_tdesc_architecture): Declare.
6883 (set_tdesc_osabi): Declare.
6884 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6885 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6886 include arch/i386.h.
6887 (i386_linux_read_description): Remove code and call
6888 i386_create_target_description.
6889 (set_tdesc_architecture): New function.
6890 (set_tdesc_osabi): New function.
6891 * target-descriptions.h (allocate_target_description): Remove.
6892
0abe8a89
YQ
68932017-09-05 Yao Qi <yao.qi@linaro.org>
6894
6895 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6896 * target-descriptions.c (tdesc_create_feature): Likewise, and
6897 adjust code.
6898 * features/i386/32bit-avx.c: Re-generated.
6899 * features/i386/32bit-avx512.c: Re-generated.
6900 * features/i386/32bit-core.c: Re-generated.
6901 * features/i386/32bit-linux.c: Re-generated.
6902 * features/i386/32bit-mpx.c: Re-generated.
6903 * features/i386/32bit-pkeys.c: Re-generated.
6904 * features/i386/32bit-sse.c: Re-generated.
6905
0a188386
YQ
69062017-09-05 Yao Qi <yao.qi@linaro.org>
6907
6908 * regformats/regdef.h (struct reg): Override operator == and !=.
6909
f49ff000
YQ
69102017-09-05 Yao Qi <yao.qi@linaro.org>
6911
6912 * arch/tdesc.h: New file.
6913 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6914 * target-descriptions.c: Update comments.
6915 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6916 declarations.
6917 * features/i386/32bit-avx.c: Re-generated.
6918 * features/i386/32bit-avx512.c: Re-generated.
6919 * features/i386/32bit-core.c: Re-generated.
6920 * features/i386/32bit-linux.c: Re-generated.
6921 * features/i386/32bit-mpx.c: Re-generated.
6922 * features/i386/32bit-pkeys.c: Re-generated.
6923 * features/i386/32bit-sse.c: Re-generated.
6924
f7000548
YQ
69252017-09-05 Yao Qi <yao.qi@linaro.org>
6926
6927 * regformats/regdat.sh: Update generated code.
6928
c9a5e2a5
YQ
69292017-09-05 Yao Qi <yao.qi@linaro.org>
6930
6931 * regformats/regdat.sh: Adjust code order.
6932
d6b687ac
SM
69332017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6934
6935 * expprint.c (dump_subexp_body_standard): Use constant format
6936 string in fprintf_filtered call.
6937
a379bfd0
JB
69382017-09-04 John Baldwin <jhb@FreeBSD.org>
6939
6940 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6941 NetBSD/i386.
6942 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6943
f7efc967
JB
69442017-09-04 John Baldwin <jhb@FreeBSD.org>
6945
6946 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6947
c49fbc6c
JB
69482017-09-04 John Baldwin <jhb@FreeBSD.org>
6949
6950 * bsd-kvm.o: Define _KMEMUSER.
6951 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6952 * configure: Regenerate.
6953
26562e73
JB
69542017-09-04 John Baldwin <jhb@FreeBSD.org>
6955
6956 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6957 * i386-fbsd-nat.c: Likewise.
6958
31cf1487
JB
69592017-09-04 John Baldwin <jhb@FreeBSD.org>
6960
6961 * unittests/array-view-selftests.c: Add include of <array>.
6962
5b9f8a7c
JB
69632017-09-04 John Baldwin <jhb@FreeBSD.org>
6964
6965 * spu-tdep.c (flush_ea_cache): Add missing argument to
6966 call_function_by_hand.
6967
d69cf9b2
PA
69682017-09-04 Pedro Alves <palves@redhat.com>
6969
6970 * NEWS (Safer support for debugging with no debug info): New.
6971
3693fdb3
PA
69722017-09-04 Pedro Alves <palves@redhat.com>
6973
6974 * c-exp.y (function_method, function_method_void): Add current
6975 instance flags to TYPE_INSTANCE.
6976 * dwarf2read.c (check_modifier): New.
6977 (compute_delayed_physnames): Assert that only C++ adds delayed
6978 physnames. Mark fn_fields as const/volatile depending on
6979 physname.
6980 * eval.c (make_params): New type_instance_flags parameter. Use
6981 it as the new type's instance flags.
6982 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6983 flags element and pass it to make_params.
6984 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6985 instance flags element.
6986 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6987 * gdbtypes.h: Include "enum-flags.h".
6988 (type_instance_flags): New enum-flags type.
6989 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6990 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6991 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6992 (follow_type_instance_flags): New function.
6993 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6994 * parser-defs.h (follow_type_instance_flags): Declare.
6995 * valops.c (value_struct_elt_for_reference): const/volatile must
6996 match too.
6997
e68cb8e0
PA
69982017-09-04 Pedro Alves <palves@redhat.com>
6999
7000 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7001 function/method scopes; lookup the nested name as a function local
7002 static variable.
7003
858be34c
PA
70042017-09-04 Pedro Alves <palves@redhat.com>
7005
7006 (%type <voidval>): Add function_method.
7007 * c-exp.y (exp): New production for calls with no arguments.
7008 (function_method, function_method_void_or_typelist): New
7009 productions.
7010 (exp): New production for "method()::static_var".
7011 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7012 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7013 Handle OP_FUNC_STATIC_VAR.
7014 * parse.c (operator_length_standard):
7015 Handle OP_FUNC_STATIC_VAR.
7016
dd5901a6
PA
70172017-09-04 Pedro Alves <palves@redhat.com>
7018
7019 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7020 handling.
7021 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7022 Ditto.
7023 * parse.c (operator_length_standard, operator_check_standard):
7024 Ditto.
7025 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7026
46a4882b
PA
70272017-09-04 Pedro Alves <palves@redhat.com>
7028
7029 * ax-gdb.c: Include "typeprint.h".
7030 (gen_expr_for_cast): New function.
7031 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7032 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7033 type is unknown.
7034 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7035 nodebug_data_symbol.
7036 * eval.c: Include "typeprint.h".
7037 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7038 Error out if symbol has unknown type.
7039 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7040 evaluate_subexp_for_cast.
7041 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7042 OP_VAR_MSYM_VALUE.
7043 (evaluate_subexp_for_cast): New function.
7044 * gdbtypes.c (init_nodebug_var_type): New function.
7045 (objfile_type): Use it to initialize types of variables with no
7046 debug info.
7047 * typeprint.c (error_unknown_type): New.
7048 * typeprint.h (error_unknown_type): New declaration.
7049 * compile/compile-c-types.c (convert_type_basic): Handle
7050 TYPE_CODE_ERROR; warn and fallback to int for variables with
7051 unknown type.
7052
fe13dfec
PA
70532017-09-04 Pedro Alves <palves@redhat.com>
7054
7055 * eval.c (evaluate_var_value): New function, factored out from ...
7056 (evaluate_subexp_standard): ... here.
7057
d008ee21
PA
70582017-09-04 Pedro Alves <palves@redhat.com>
7059
7060 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7061 Remove useless assignments to 'op'.
7062
827d0c51
PA
70632017-09-04 Pedro Alves <palves@redhat.com>
7064
7065 * eval.c (eval_skip_value): New function.
7066 (evaluate_subexp_standard): Use it.
7067
2c5a2be1
PA
70682017-09-04 Pedro Alves <palves@redhat.com>
7069
7070 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7071 function name from symbol/minsym and pass it to
7072 error_call_unknown_return_type.
7073
74ea4be4
PA
70742017-09-04 Pedro Alves <palves@redhat.com>
7075
7076 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7077 * ax-gdb.c (gen_msym_var_ref): New function.
7078 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7079 * eval.c (evaluate_var_msym_value): New function.
7080 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7081 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7082 to call_function_by_hand.
7083 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7084 Handle OP_VAR_MSYM_VALUE.
7085 (union exp_element) <msymbol>: New field.
7086 * minsyms.h (struct type): Forward declare.
7087 (find_minsym_type_and_address): Declare.
7088 * parse.c (write_exp_elt_msym): New function.
7089 (write_exp_msymbol): Delete, refactored as ...
7090 (find_minsym_type_and_address): ... this new function.
7091 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7092 (operator_length_standard, operator_check_standard): Handle
7093 OP_VAR_MSYM_VALUE.
7094 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7095
7022349d
PA
70962017-09-04 Pedro Alves <palves@redhat.com>
7097
7098 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7099 TYPE_GNU_IFUNC specially here. Throw error if return type is
7100 unknown.
7101 * ada-typeprint.c (print_func_type): Handle functions with unknown
7102 return type.
7103 * c-typeprint.c (c_type_print_base): Handle functions and methods
7104 with unknown return type.
7105 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7106 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7107 * compile/compile-c-types.c: Include "objfiles.h".
7108 (convert_func): For functions with unknown return type, warn and
7109 default to int.
7110 * compile/compile-object-run.c (compile_object_run): Adjust call
7111 to call_function_by_hand_dummy.
7112 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7113 call_function_by_hand.
7114 * eval.c (evaluate_subexp_standard): Adjust calls to
7115 call_function_by_hand. Handle functions and methods with unknown
7116 return type. Pass expect_type to call_function_by_hand.
7117 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7118 return type.
7119 * gcore.c (call_target_sbrk): Adjust call to
7120 call_function_by_hand.
7121 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7122 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7123 an integer address type instead of nodebug.
7124 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7125 call_function_by_hand.
7126 * infcall.c (error_call_unknown_return_type): New function.
7127 (call_function_by_hand): New "default_return_type" parameter.
7128 Pass it down.
7129 (call_function_by_hand_dummy): New "default_return_type"
7130 parameter. Use it instead of defaulting to int. If there's no
7131 default and the return type is unknown, throw an error. If
7132 there's a default return type, and the called function has no
7133 debug info, then assume the function is prototyped.
7134 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7135 New "default_return_type" parameter.
7136 (error_call_unknown_return_type): New declaration.
7137 * linux-fork.c (call_lseek): Cast return type of lseek.
7138 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7139 call_function_by_hand.
7140 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7141 calls to call_function_by_hand.
7142 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7143 return type.
7144 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7145 (value_nsstring, print_object_command): Adjust calls to
7146 call_function_by_hand.
7147 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7148 functions with unknown return type.
7149 (pascal_type_print_func_varspec_suffix): New function.
7150 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7151 TYPE_CODE_METHOD>: Use it.
7152 * python/py-value.c (valpy_call): Adjust call to
7153 call_function_by_hand.
7154 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7155 call_function_by_hand.
7156 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7157 call_function_by_hand.
7158 * valops.c (value_allocate_space_in_inferior): Adjust call to
7159 call_function_by_hand.
7160 * typeprint.c (type_print_unknown_return_type): New function.
7161 * typeprint.h (type_print_unknown_return_type): New declaration.
7162
54990598
PA
71632017-09-04 Pedro Alves <palves@redhat.com>
7164
7165 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7166 types with more than one parameter as prototyped.
7167
9a24775b
PA
71682017-09-04 Pedro Alves <palves@redhat.com>
7169
7170 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7171 (disassemble_command): Use gdb_disassembly_flags instead of bare
7172 int.
7173 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7174 (dump_insns, do_mixed_source_and_assembly_deprecated)
7175 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7176 Use gdb_disassembly_flags instead of bare int.
7177 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7178 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7179 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7180 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7181 (enum gdb_disassembly_flag): ... values of this new enumeration.
7182 (gdb_disassembly_flags): Define.
7183 (gdb_disassembly)
7184 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7185 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7186 gdb_disassembly_flags instead of bare int.
7187 * record-btrace.c (btrace_insn_history)
7188 (record_btrace_insn_history, record_btrace_insn_history_range)
7189 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7190 instead of bare int.
7191 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7192 Use gdb_disassembly_flags instead of bare int.
7193 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7194 Define.
7195 * target-delegates.c: Regenerate.
7196 * target.c (target_insn_history, target_insn_history_from)
7197 (target_insn_history_range): Use gdb_disassembly_flags instead of
7198 bare int.
7199 * target.h: Include "disasm.h".
7200 (struct target_ops) <to_insn_history, to_insn_history_from,
7201 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7202 int.
7203 (target_insn_history, target_insn_history_from)
7204 (target_insn_history_range): Use gdb_disassembly_flags instead of
7205 bare int.
7206
80a65e9b
SM
72072017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7208
7209 * cli/cli-script.c (build_command_line): For if/while commands,
7210 check whether args is empty.
7211
6b66338c
SM
72122017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7213
7214 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7215 (enum command_control_type): Likewise.
7216 (struct command_line): Likewise.
7217 (free_command_lines): Likewise.
7218 (struct command_lines_deleter): Likewise.
7219 (command_line_up): Likewise.
7220 (read_command_lines): Likewise.
7221 (read_command_lines_1): Likewise.
7222 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7223 (enum command_control_type): Likewise.
7224 (struct command_line): Likewise.
7225 (free_command_lines): Likewise.
7226 (struct command_lines_deleter): Likewise.
7227 (command_line_up): Likewise.
7228 (read_command_lines): Likewise.
7229 (read_command_lines_1): Likewise.
7230 * breakpoint.h: Include cli/cli-script.h.
7231 * extension-priv.h: Likewise.
7232 * gdbcmd.h: Likewise.
7233
51abb421
PA
72342017-09-04 Pedro Alves <palves@redhat.com>
7235
7236 * ada-lang.c (is_known_support_routine): Move sal declaration to
7237 where it is initialized.
7238 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7239 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7240 (clear_command, update_static_tracepoint): Remove init_sal
7241 references. Move declarations closer to initializations.
7242 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7243 initializations.
7244 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7245 references. Move sal declarations closer to initializations.
7246 * frame.c (find_frame_sal): Return a symtab_and_line via function
7247 return instead of output parameter. Remove init_sal references.
7248 * frame.h (find_frame_sal): Return a symtab_and_line via function
7249 return instead of output parameter.
7250 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7251 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7252 instead of memset.
7253 (gdbscm_find_pc_line): Remove init_sal reference.
7254 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7255 references. Move declarations closer to initializations.
7256 * infcmd.c (set_step_frame): Update. Move declarations closer to
7257 initializations.
7258 (finish_backward): Remove init_sal references. Move declarations
7259 closer to initializations.
7260 * infrun.c (process_event_stop_test, handle_step_into_function)
7261 (insert_hp_step_resume_breakpoint_at_frame)
7262 (insert_step_resume_breakpoint_at_caller): Likewise.
7263 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7264 (symbol_to_sal): Likewise.
7265 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7266 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7267 to its initialization.
7268 * reverse.c (save_bookmark_command): Use new/delete. Remove
7269 init_sal references. Move declarations closer to initializations.
7270 * source.c (get_current_source_symtab_and_line): Remove brace
7271 initialization.
7272 (set_current_source_symtab_and_line): Now takes the sal by const
7273 reference. Remove brace initialization.
7274 (line_info): Remove init_sal reference.
7275 * source.h (set_current_source_symtab_and_line): Now takes a
7276 symtab_and_line via const reference.
7277 * stack.c (set_current_sal_from_frame): Adjust.
7278 (print_frame_info): Adjust.
7279 (get_last_displayed_sal): Return the sal via function return
7280 instead of via output parameter. Simplify.
7281 (frame_info): Adjust.
7282 * stack.h (get_last_displayed_sal): Return the sal via function
7283 return instead of via output parameter.
7284 * symtab.c (init_sal): Delete.
7285 (find_pc_sect_line): Remove init_sal references. Move
7286 declarations closer to initializations.
7287 (find_function_start_sal): Remove init_sal references. Move
7288 declarations closer to initializations.
7289 * symtab.h (struct symtab_and_line): In-class initialize all
7290 fields.
7291 * tracepoint.c (set_traceframe_context)
7292 (print_one_static_tracepoint_marker): Remove init_sal references.
7293 Move declarations closer to initializations.
7294 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7295 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7296 declarations closer to initializations.
7297 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7298 init_sal references. Adjust.
7299
6c5b2ebe
PA
73002017-09-04 Pedro Alves <palves@redhat.com>
7301
7302 * ax-gdb.c (agent_command_1): Use range-for.
7303 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7304 * breakpoint.c: Include "common/array-view.h".
7305 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7306 parameter from struct symtabs_and_lines to
7307 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7308 (breakpoint_sals_to_pc): Change sals parameter from struct
7309 symtabs_and_lines to std::vector reference.
7310 (check_fast_tracepoint_sals): Change sals parameter from struct
7311 symtabs_and_lines to std::array_view. Use range-for.
7312 (decode_static_tracepoint_spec): Return a std::vector instead of
7313 symtabs_and_lines. Update.
7314 (create_breakpoint): Update.
7315 (break_range_command, until_break_command, clear_command): Update.
7316 (base_breakpoint_decode_location, bkpt_decode_location)
7317 (bkpt_probe_create_sals_from_location)
7318 (bkpt_probe_decode_location, tracepoint_decode_location)
7319 (tracepoint_probe_decode_location)
7320 (strace_marker_create_sals_from_location): Return a std::vector
7321 instead of symtabs_and_lines.
7322 (strace_marker_create_breakpoints_sal): Update.
7323 (strace_marker_decode_location): Return a std::vector instead of
7324 symtabs_and_lines. Update.
7325 (update_breakpoint_locations): Change struct symtabs_and_lines
7326 parameters to gdb::array_view. Adjust.
7327 (location_to_sals): Return a std::vector instead of
7328 symtabs_and_lines. Update.
7329 (breakpoint_re_set_default): Use std::vector instead of struct
7330 symtabs_and_lines.
7331 (decode_location_default): Return a std::vector instead of
7332 symtabs_and_lines. Update.
7333 * breakpoint.h: Include "common/array-view.h".
7334 (struct breakpoint_ops) <decode_location>: Now returns a
7335 std::vector instead of returning a symtabs_and_lines via output
7336 parameter.
7337 (update_breakpoint_locations): Change sals parameters to use
7338 gdb::array_view.
7339 * cli/cli-cmds.c (edit_command, list_command): Update to use
7340 std::vector and gdb::array_view.
7341 (ambiguous_line_spec): Adjust to use gdb::array_view and
7342 range-for.
7343 (compare_symtabs): Rename to ...
7344 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7345 const reference and adjust.
7346 (filter_sals): Rewrite using std::vector and standard algorithms.
7347 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7348 (jump_command): Update to use std::vector.
7349 * linespec.c (struct linespec_state) <canonical_names>: Update
7350 comment.
7351 (add_sal_to_sals_basic): Delete.
7352 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7353 (decode_line_2, create_sals_line_offset)
7354 (convert_address_location_to_sals, convert_linespec_to_sals)
7355 (convert_explicit_location_to_sals, parse_linespec)
7356 (event_location_to_sals, decode_line_full, decode_line_1)
7357 (decode_line_with_current_source)
7358 (decode_line_with_last_displayed, decode_objc)
7359 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7360 (linespec_result::~linespec_result): Adjust to use std::vector
7361 instead of symtabs_and_lines.
7362 * linespec.h (linespec_sals::sals): Now a std::vector.
7363 (struct linespec_result): Use std::vector, bool, and in-class
7364 initialization.
7365 (decode_line_1, decode_line_with_current_source)
7366 (decode_line_with_last_displayed): Return std::vector.
7367 * macrocmd.c (info_macros_command): Use std::vector.
7368 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7369 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7370 std::vector.
7371 * probe.h (parse_probes): Return a std::vector.
7372 * python/python.c (gdbpy_decode_line): Use std::vector and
7373 gdb::array_view.
7374 * source.c (select_source_symtab, line_info): Use std::vector.
7375 * stack.c (func_command): Use std::vector.
7376 * symtab.h (struct symtabs_and_lines): Delete.
7377 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7378
7c44b49c
PA
73792017-09-04 Pedro Alves <palves@redhat.com>
7380
7381 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7382 unittests/array-view-selftests.c.
7383 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7384 * common/array-view.h: New file.
7385 * unittests/array-view-selftests.c: New file.
7386
e439fa14
PA
73872017-09-04 Pedro Alves <palves@redhat.com>
7388
7389 * cli/cli-cmds.c (edit_command): Pass message to
7390 ambiguous_line_spec.
7391 (list_command): Pass message to ambiguous_line_spec. Say
7392 "first"/"last" instead of "start" and "end" to be consistent with
7393 the manual.
7394 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7395 them to print formatted message.
7396
7525b645
PA
73972017-09-04 Pedro Alves <palves@redhat.com>
7398
7399 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7400 ftrace_update_insns by reference instead of pointer.
7401
badc0020
YQ
74022017-09-04 Yao Qi <yao.qi@linaro.org>
7403
7404 * i386-go32-tdep.c: Include x86-xstate.h.
7405 (i386_go32_init_abi): Call i386_target_description.
7406 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7407 if xcr0 is X86_XSTATE_X87_MASK.
7408 * i386-tdep.h (tdesc_i386): Remove the declaration.
7409 (tdesc_i386_mmx): Likewise.
7410
d78bdb54
YQ
74112017-09-04 Yao Qi <yao.qi@linaro.org>
7412
7413 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7414 X86_XSTATE_SSE_MASK instead of 0.
7415
ca1fa5ee
YQ
74162017-09-04 Yao Qi <yao.qi@linaro.org>
7417
7418 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7419 i386_target_description.
7420 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7421 i386_target_description.
7422 * i386-tdep.c (i386_gdbarch_init): Likewise.
7423
2434b019
YQ
74242017-09-04 Yao Qi <yao.qi@linaro.org>
7425
7426 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7427 (x86_darwin_init_abi_64): Call amd64_target_description.
7428 * amd64-dicos-tdep.c: Likewise.
7429 * amd64-fbsd-nat.c: Likewise.
7430 * amd64-fbsd-tdep.c: Likewise.
7431 * amd64-nbsd-tdep.c: Likewise.
7432 * amd64-obsd-tdep.c: Likewise.
7433 * amd64-sol2-tdep.c: Likewise.
7434 * amd64-windows-tdep.c: Likewise.
7435 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7436
0860c437
SM
74372017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7438
7439 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7440 (btrace_function) <insn>: Change type to use std::vector.
7441 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7442 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7443 ftrace_update_insns, ftrace_compute_global_level_offset,
7444 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7445 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7446 change to std::vector.
7447 (ftrace_update_insns): Adjust to change to std::vector, change
7448 type of INSN parameter.
7449 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7450 * record-btrace.c (btrace_call_history_insn_range,
7451 btrace_compute_src_line_range,
7452 record_btrace_frame_prev_register): Adjust to change to
7453 std::vector.
7454 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7455 to change to std::vector.
7456
0638b7f9
TT
74572017-09-03 Tom Tromey <tom@tromey.com>
7458
7459 * corefile.c (reopen_exec_file): Use std::string.
7460
8f84fb0e
TT
74612017-09-03 Tom Tromey <tom@tromey.com>
7462
7463 * compile/compile.c (compile_register_name_mangled): Return
7464 std::string.
7465 * compile/compile-loc2c.c (pushf_register_address): Update.
7466 (pushf_register): Update.
7467 * compile/compile-c-types.c (convert_array): Update.
7468 * compile/compile-c-symbols.c (generate_vla_size): Update.
7469 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7470 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7471 (convert_one_symbol): Update.
7472 (generate_c_for_for_one_variable): Update.
7473 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7474 std::string.
7475 (generate_register_struct): Update.
7476 * compile/compile-internal.h (c_get_range_decl_name): Return a
7477 std::string.
7478 (compile_register_name_mangled): Return std::string.
7479
18e9961f
TT
74802017-09-03 Tom Tromey <tom@tromey.com>
7481
7482 * utils.c (perror_string): Return a std::string.
7483 (throw_perror_with_name, perror_warning_with_name): Update.
7484
45343786
TT
74852017-09-03 Tom Tromey <tom@tromey.com>
7486
7487 * demangle.c (demangle_command): Use std::string,
7488 unique_xmalloc_ptr.
7489
b57af503
TT
74902017-09-03 Tom Tromey <tom@tromey.com>
7491
7492 * cli/cli-setshow.c (do_set_command): Use std::string.
7493
6eecf35f
TT
74942017-09-03 Tom Tromey <tom@tromey.com>
7495
7496 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7497
56496dd4
TT
74982017-09-03 Tom Tromey <tom@tromey.com>
7499
7500 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7501
e91a1fa7
TT
75022017-09-03 Tom Tromey <tom@tromey.com>
7503
7504 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7505 gdb::unique_xmalloc_ptr.
7506
7ffd83d7
TT
75072017-09-03 Tom Tromey <tom@tromey.com>
7508
7509 * thread.c (print_thread_info_1): Use string_printf.
7510 (thread_apply_command, thread_apply_all_command): Use
7511 std::string.
7512
1ccbe998
TT
75132017-09-03 Tom Tromey <tom@tromey.com>
7514
7515 * valprint.c (val_print_string): Update.
7516 * gdbcore.h (memory_error_message): Return std::string.
7517 * corefile.c (memory_error_message): Return std::string.
7518 (memory_error): Update.
7519 * breakpoint.c (insert_bp_location): Update.
7520
23fdd69e
SM
75212017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7522
7523 * target/waitstatus.h (target_waitstatus_to_string): Change
7524 return type to std::string.
7525 * target/waitstatus.c (target_waitstatus_to_string): Return
7526 std::string.
7527 * target.h (target_waitstatus_to_string): Remove declaration.
7528 * infrun.c (resume, clear_proceed_status_thread,
7529 print_target_wait_results, do_target_wait, save_waitstatus,
7530 stop_all_threads): Adjust.
7531 * record-btrace.c (record_btrace_wait): Adjust.
7532 * target-debug.h
7533 (target_debug_print_struct_target_waitstatus_p): Adjust.
7534
5c811d30
JK
75352017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7536
7537 PR gdb/22046
7538 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7539 detection.
7540
0a2dde4a
SDJ
75412017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7542
7543 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7544 for setting/unsetting environment variables on the remote target.
7545 (New remote packets): Add entries for QEnvironmentHexEncoded,
7546 QEnvironmentUnset and QEnvironmentReset.
7547 * common/environ.c (gdb_environ::operator=): Extend method to
7548 handle m_user_set_env_list and m_user_unset_env_list.
7549 (gdb_environ::clear): Likewise.
7550 (match_var_in_string): Change type of first parameter from 'char
7551 *' to 'const char *'.
7552 (gdb_environ::set): Extend method to handle
7553 m_user_set_env_list and m_user_unset_env_list.
7554 (gdb_environ::unset): Likewise.
7555 (gdb_environ::clear_user_set_env): New method.
7556 (gdb_environ::user_set_envp): Likewise.
7557 (gdb_environ::user_unset_envp): Likewise.
7558 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7559 m_user_unset_env_list on move constructor/assignment.
7560 (unset): Add new default parameter 'update_unset_list = true'.
7561 (clear_user_set_env): New method.
7562 (user_set_envp): Likewise.
7563 (user_unset_envp): Likewise.
7564 (m_user_set_env_list): New std::set.
7565 (m_user_unset_env_list): Likewise.
7566 * common/rsp-low.c (hex2str): New function.
7567 (bin2hex): New overload for bin2hex function.
7568 * common/rsp-low.c (hex2str): New prototype.
7569 (str2hex): New overload prototype.
7570 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7571 QEnvironmentUnset and QEnvironmentReset.
7572 (remote_protocol_features): Add QEnvironmentHexEncoded,
7573 QEnvironmentUnset and QEnvironmentReset packets.
7574 (send_environment_packet): New function.
7575 (extended_remote_environment_support): Likewise.
7576 (extended_remote_create_inferior): Call
7577 extended_remote_environment_support.
7578 (_initialize_remote): Add QEnvironmentHexEncoded,
7579 QEnvironmentUnset and QEnvironmentReset packet configs.
7580 * unittests/environ-selftests.c (gdb_selftest_env_var):
7581 New variable.
7582 (test_vector_initialization): New function.
7583 (test_init_from_host_environ): Likewise.
7584 (test_reinit_from_host_environ): Likewise.
7585 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7586 Likewise.
7587 (test_unset_set_empty_vector): Likewise.
7588 (test_vector_clear): Likewise.
7589 (test_std_move): Likewise.
7590 (test_move_constructor):
7591 (test_self_move): Likewise.
7592 (test_set_unset_reset): Likewise.
7593 (run_tests): Rewrite in terms of the functions above.
7594
654670a4
WP
75952017-08-31 Weimin Pan <weimin.pan@oracle.com>
7596
7597 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7598 (adi_available): Use a temp variable of type CORE_ADDR as argument
7599 3 when calling target_auxv_search.
7600 (adi_normalize_address): Use masks and xor operators to calculate
7601 normalized address.
7602 (adi_read_versions, adi_write_versions, adi_print_versions)
7603 (do_examine, do_assign): Use paddress.
7604
7755ddb7
JB
76052017-08-29 John Baldwin <jhb@FreeBSD.org>
7606
7607 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7608 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7609 out of loop and add supply of FIR.
7610 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7611 add collect of FIR.
7612
fd437cbc
SM
76132017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7614
3804a343 7615 PR gdb/21827
fd437cbc
SM
7616 * cli/cli-script.c (define_command): Don't convert command name
7617 to lower case.
7618
988f6b3d
JB
76192017-08-25 Joel Brobecker <brobecker@adacore.com>
7620
7621 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7622 Update all callers accordingly. Remove all code blocks handling
7623 the case where DISPP is not NULL.
7624
663c44ac
JK
76252017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7626
7627 PR symtab/22003
7628 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7629 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7630 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7631
f1902523
JK
76322017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7633
7634 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7635 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7636 (read_comp_units_from_section): New parameter abbrev_section, use
7637 read_and_check_comp_unit_head, allocate signatured_type if needed.
7638 (create_all_comp_units): Update read_comp_units_from_section caller.
7639
87215ad1
SDJ
76402017-08-23 Pedro Alves <palves@redhat.com>
7641
7642 PR remote/21852
7643 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7644 to null_ptid and switch to thread without reading the registers
7645 after adding the inferior.
7646
6e41ddec
JK
76472017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7648
7649 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7650 compile-gcc.
7651 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7652 (compile_to_object): Implement compile_gcc.
7653 (_initialize_compile): Install "set compile-gcc". Initialize
7654 compile_gcc.
7655
e68c32d5
JK
76562017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7657
7658 * compile/compile.c (compile_to_object): Conditionally call
7659 set_verbose. Conditionally call compile or compile_v0.
7660
58afddc6
WP
76612017-08-07 Weimin Pan <weimin.pan@oracle.com>
7662
7663 * sparc64-tdep.h: (adi_normalize_address): New export.
7664 * sparc-nat.h: (open_adi_tag_fd): New export.
7665 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7666 * sparc64-linux-tdep.c:
7667 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7668 (sparc64_linux_handle_segmentation_fault): New function.
7669 (sparc64_linux_init_abi): Register
7670 sparc64_linux_handle_segmentation_fault
7671 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7672 (sparc64_addr_bits_remove): New function.
7673 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7674 (MAX_PROC_NAME_SIZE): New macro.
7675 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7676 (sparc64adilist): New variable.
7677 (adi_proc_list): New variable.
7678 (find_adi_info): New function.
7679 (add_adi_info): New function.
7680 (get_adi_info_proc): New function.
7681 (get_adi_info): New function.
7682 (info_adi_command): New function.
7683 (read_maps_entry): New function.
7684 (adi_available): New function.
7685 (adi_normalize_address): New function.
7686 (adi_align_address): New function.
7687 (adi_convert_byte_count): New function.
7688 (adi_tag_fd): New function.
7689 (adi_is_addr_mapped): New function.
7690 (adi_read_versions): New function.
7691 (adi_write_versions): New function.
7692 (adi_print_versions): New function.
7693 (do_examine): New function.
7694 (do_assign): New function.
7695 (adi_examine_command): New function.
7696 (adi_assign_command): New function.
7697 (_initialize_sparc64_adi_tdep): New function.
7698
11db9430
SM
76992017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7700
7701 * breakpoint.c (breakpoints_info): Rename to ...
7702 (info_breakpoints_command): ... this.
7703 (watchpoints_info): Rename to ...
7704 (info_watchpoints_command): ... this.
7705 (tracepoints_info): Rename to ...
7706 (info_tracepoints_command): ... this.
7707 (_initialize_breakpoint): Adjust.
7708 * dcache.c (dcache_info): Rename to ...
7709 (info_display_command): ... this.
7710 (_initialize_dcache): Adjust.
7711 * frame.h (args_info): Rename to ...
7712 (info_args_command): ... this.
7713 (locals_info): Rename to ...
7714 (info_locals_command): ... this.
7715 * infcmd.c (nofp_registers_info): Rename to ...
7716 (info_registers_command): ... this.
7717 (float_info): Rename to ...
7718 (info_float_command): ... this.
7719 (program_info): Rename to ...
7720 (info_program_command): ... this.
7721 (all_registers_info): Rename to ...
7722 (info_all_registers_command): ... this.
7723 (vector_info): Rename to ...
7724 (info_vector_command): ... this.
7725 (float_info): Rename to ...
7726 (info_float_command): ... this.
7727 (_initialize_infcmd): Adjust.
7728 * inferior.h (term_info): Rename to ...
7729 (info_terminal_command): ... this.
7730 * inflow.c (term_info): Rename to ...
7731 (info_terminal_command): ... this.
7732 (_initialize_inflow): Adjust.
7733 * infrun.c (signals_info): Rename to ...
7734 (info_signals_command): ... this.
7735 (_initialize_infrun): Adjust.
7736 * objc-lang.c (classes_info): Rename to ...
7737 (info_classes_command): ... this.
7738 (selectors_info): Rename to ...
7739 (info_selectors_command): ... this.
7740 (_initialize_objc_language): Adjust.
7741 * printcmd.c (sym_info): Rename to ...
7742 (info_symbol_command): ... this.
7743 (address_info): Rename to ...
7744 (info_address_command): ... this.
7745 (display_info): Rename to ...
7746 (info_display_command): ... this.
7747 (_initialize_printcmd): Adjust.
7748 * reverse.c (bookmarks_info): Rename to ...
7749 (info_breakpoints_command): ... this.
7750 (_initialize_reverse): Adjust.
7751 * ser-go32.c (dos_info): Rename to ...
7752 (info_serial_command): ... this.
7753 (_initialize_ser_dos): Adjust.
7754 * skip.c (skip_info): Rename to ...
7755 (info_skip_command): ... this.
7756 (_initialize_step_skip): Adjust.
7757 * source.c (line_info): Rename to ...
7758 (info_line_command): ... this.
7759 (source_info): Rename to ...
7760 (info_source_command)
7761 * stack.c (frame_info): Rename to ...
7762 (info_frame_command): ... this.
7763 (locals_info): Rename to ...
7764 (info_locals_command): ... this.
7765 (args_info): Rename to ...
7766 (info_args_command): ... this.
7767 (_initialize_stack): Adjust.
7768 * symtab.c (sources_info): Rename to ...
7769 (info_sources_command): ... this.
7770 (variables_info): Rename to ...
7771 (info_variables_command): ... this.
7772 (functions_info): Rename to ...
7773 (info_functions_command): ... this.
7774 (types_info): Rename to ...
7775 (info_types_command): ... this.
7776 (_initialize_symtab): Adjust.
7777 * target.c (target_info): Rename to ...
7778 (info_target_command): ... this.
7779 (initialize_targets): Adjust.
7780 * tracepoint.c (tvariables_info): Rename to ...
7781 (info_tvariables_command): ... this.
7782 (scope_info): Rename to ...
7783 (info_scope_command): ... this.
7784 (trace_dump_actions): Adjust.
7785 (_initialize_tracepoint): Adjust.
7786
b270e6f9
TT
77872017-08-22 Tom Tromey <tom@tromey.com>
7788
7789 * breakpoint.h (install_breakpoint): Update.
7790 * breakpoint.c (add_solib_catchpoint): Update.
7791 (install_breakpoint): Change argument to a std::unique_ptr.
7792 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7793 (create_breakpoint_sal, create_breakpoint): Update.
7794 (watch_command_1, catch_exec_command_1)
7795 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7796 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7797 Return the breakpoint.
7798 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7799 (new_single_step_breakpoint): Update.
7800 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7801 std::unique_ptr.
7802 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7803 std::unique_ptr.
7804 * break-catch-sig.c (create_signal_catchpoint): Use
7805 std::unique_ptr.
7806 * ada-lang.c (create_ada_exception_catchpoint): Use
7807 std::unique_ptr.
7808
36bd8eaa
TT
78092017-08-22 Tom Tromey <tom@tromey.com>
7810
7811 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7812
56f37645
TT
78132017-08-22 Tom Tromey <tom@tromey.com>
7814
7815 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7816 (lookup_partial_symbol): Update.
7817
0b581c69
TT
78182017-08-22 Tom Tromey <tom@tromey.com>
7819
7820 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7821 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7822 (find_and_open_source, symtab_to_fullname): Update.
7823 * psymtab.c (psymtab_to_fullname): Update.
7824
14278e1f
TT
78252017-08-22 Tom Tromey <tom@tromey.com>
7826
7827 * exec.c (exec_file_attach): Update.
7828 * linux-thread-db.c (try_thread_db_load): Update.
7829 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7830 * utils.c (gdb_realpath): Change return type.
7831 (gdb_realpath_keepfile): Update.
7832 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7833 (_initialize_utils): Register the new self test.
7834 * source.c (openp): Update.
7835 (find_and_open_source): Update.
7836 * nto-tdep.c (nto_find_and_open_solib): Update.
7837 * main.c (set_gdb_data_directory): Update.
7838 (captured_main_1): Update.
7839 * dwarf2read.c (dwarf2_get_dwz_file): Update
7840 (dw2_map_symbol_filenames): Update.
7841 * auto-load.c (auto_load_safe_path_vec_update): Update.
7842 (filename_is_in_auto_load_safe_path_vec): Change type of
7843 "filename_realp".
7844 (auto_load_objfile_script): Update.
7845 (file_is_auto_load_safe): Update. Use std::string.
7846 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7847
4971c9a7
TT
78482017-08-22 Tom Tromey <tom@tromey.com>
7849
7850 * utils.c (gdb_realpath_keepfile): Return a
7851 gdb::unique_xmalloc_ptr.
7852 * exec.c (exec_file_attach): Update.
7853 * utils.h (gdb_realpath_keepfile): Return a
7854 gdb::unique_xmalloc_ptr.
7855
e3e41d58
TT
78562017-08-22 Tom Tromey <tom@tromey.com>
7857
7858 * compile/compile.c (compile_file_command): Use
7859 gdb::unique_xmalloc_ptr, std::string.
7860 * utils.c (gdb_abspath): Change return type.
7861 * source.c (openp): Update.
7862 * objfiles.c (allocate_objfile): Update.
7863 * main.c (set_gdb_data_directory): Update.
7864 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7865
0d999a6e
ZZ
78662017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7867
7868 * cli-cmds.c (list_commands): List actual code around more than
7869 one location.
7870
329d5e7e
JB
78712017-08-21 John Baldwin <jhb@FreeBSD.org>
7872
7873 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7874
bf223d3e
PA
78752017-08-21 Pedro Alves <palves@redhat.com>
7876
7877 PR gdb/19487
7878 * c-exp.y (variable production): Handle function aliases.
7879 * minsyms.c (msymbol_is_text): New function.
7880 * minsyms.h (msymbol_is_text): Declare.
7881 * symtab.c (find_function_alias_target): New function.
7882 * symtab.h (find_function_alias_target): Declare.
7883
c973d0aa
PA
78842017-08-21 Pedro Alves <palves@redhat.com>
7885
7886 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7887 typedefs.
7888 * typeprint.c (whatis_exp): If handling "whatis", and expression
7889 is OP_TYPE, strip one typedef level. Otherwise don't strip
7890 typedefs here.
7891 * valops.c (value_cast): Save "to" type before resolving
7892 stubs/typedefs. Use that type as resulting value's type.
7893
2989a365
TT
78942017-08-18 Tom Tromey <tom@tromey.com>
7895 Pedro Alves <palves@redhat.com>
7896
7897 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7898 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7899 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7900 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7901 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7902 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7903 (linux_get_siginfo_data): Add "thread" argument. Use
7904 scoped_restore.
7905 * linux-nat.c (linux_child_follow_fork)
7906 (check_stopped_by_watchpoint): Use scoped_restore.
7907 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7908 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7909 (restore_inferior_ptid, save_inferior_ptid): Remove.
7910 * btrace.c (btrace_fetch): Use scoped_restore.
7911 * bsd-uthread.c (bsd_uthread_fetch_registers)
7912 (bsd_uthread_store_registers): Use scoped_restore.
7913 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7914 scoped_restore.
7915 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7916 (aix_thread_xfer_partial): Use scoped_restore.
7917 * inferior.h (save_inferior_ptid): Remove.
7918
e60eb288
YQ
79192017-08-18 Yao Qi <yao.qi@linaro.org>
7920
7921 PR tdep/21818
7922 * arm-tdep.c (gdb_print_insn_arm): Mark
7923 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7924
6d580b63
YQ
79252017-08-18 Yao Qi <yao.qi@linaro.org>
7926
7927 * NEWS: Mention GDBserver's new option "--selftest".
7928 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7929 * selftest.c: Move it to common/selftest.c.
7930 * selftest.h: Move it to common/selftest.h.
7931 * selftest-arch.c (reset): New function.
7932 (tests_with_arch): Call reset.
7933
86dcbf50
YQ
79342017-08-18 Yao Qi <yao.qi@linaro.org>
7935
7936 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7937 instead of exception_fprintf and printf_filtered.
7938
7649770c
YQ
79392017-08-18 Yao Qi <yao.qi@linaro.org>
7940
7941 * selftest.c (register_self_test): Rename it to
7942 selftests::register_test.
7943 (run_self_tests): selftest::run_tests.
7944 * selftest.h: Update declarations.
7945 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7946 selftests::register_test_foreach_arch.
7947 * selftest-arch.h: Update declaration.
7948 * aarch64-tdep.c: Update.
7949 * arm-tdep.c: Likewise.
7950 * disasm-selftests.c: Likewise.
7951 * dwarf2loc.c: Likewise.
7952 * dwarf2-frame.c: Likewise.
7953 * findvar.c: Likewise.
7954 * gdbarch-selftests.c: Likewise.
7955 * maint.c (maintenance_selftest): Likewise.
7956 * regcache.c: Likewise.
7957 * rust-exp.y: Likewise.
7958 * selftest-arch.c: Likewise.
7959 * unittests/environ-selftests.c: Likewise.
7960 * unittests/function-view-selftests.c: Likewise.
7961 * unittests/offset-type-selftests.c: Likewise.
7962 * unittests/optional-selftests.c: Likewise.
7963 * unittests/scoped_restore-selftests.c: Likewise.
7964 * utils-selftests.c: Likewise.
7965
b0cba12e
PA
79662017-08-17 Pedro Alves <palves@redhat.com>
7967
7968 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7969 local.
7970
4c8aa72d
PA
79712017-08-17 Pedro Alves <palves@redhat.com>
7972
7973 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7974 field.
7975 (reset_die_in_process): Delete, replaced by ...
7976 (process_die_scope): ... this new class. Make it responsible for
7977 freeing cu->line_header too.
7978 (process_die): Use process_die_scope.
7979 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7980 cu->line_header_die_owner. Don't release the line header if it's
7981 owned by the CU.
7982 (setup_type_unit_groups): Make the CU/DIE own the line header.
7983 Don't release the line header here.
7984
ba713918
AL
79852017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7986
7987 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7988
44d0fb3a
RK
79892017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7990
7991 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7992 Single-Key mode
7993
a5afdb16
RK
79942017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7995
7996 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7997 mode command list.
7998
47613aeb
SH
79992017-08-15 Stafford Horne <shorne@gmail.com>
8000
8001 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8002
9c3cc999
SH
80032017-08-15 Stafford Horne <shorne@gmail.com>
8004
8005 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8006
206726fb
SDJ
80072017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8008
8009 PR gdb/21954
8010 * infcmd.c (unset_environment_command): Use the 'clear' method on
8011 the environment instead of resetting it.
8012
0335ac6d
JB
80132017-08-15 John Baldwin <jhb@FreeBSD.org>
8014
8015 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8016 platforms.
8017
d3abe1c8
TT
80182017-08-14 Tom Tromey <tom@tromey.com>
8019
8020 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8021 (print_binary_chars): Likewise.
8022 (BITS_IN_BYTES): Remove.
8023
d6382fff
TT
80242017-08-14 Tom Tromey <tom@tromey.com>
8025
8026 PR gdb/21675
8027 * valprint.c (LOW_ZERO): Change value to 034.
8028 (print_octal_chars): Add static_asserts for octal constants.
8029 * printcmd.c (print_scalar_formatted): Add 'd' case.
8030
f978cb06
TT
80312017-08-11 Tom Tromey <tom@tromey.com>
8032
8033 * symfile.c (add_symbol_file_command): Use std::vector.
8034
2f5404b3
TT
80352017-08-14 Tom Tromey <tom@tromey.com>
8036
8037 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8038 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8039 std::move.
8040 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8041
de7985c3
PA
80422017-08-11 Pedro Alves <palves@redhat.com>
8043
8044 * infrun.c (process_event_stop_test): Adjust
8045 function_name_is_marked_for_skip call.
8046 * skip.c: Include <list>.
8047 (skiplist_entry): Make it a class with private fields, and
8048 getters/setters.
8049 (skiplist_entry_chain): Delete.
8050 (skiplist_entries): New.
8051 (skiplist_entry_count): Delete.
8052 (highest_skiplist_entry_num): New.
8053 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8054 (add_skiplist_entry): Delete.
8055 (skiplist_entry::skiplist_entry): New.
8056 (skiplist_entry::add_entry): New.
8057 (skip_file_command, skip_function): Adjust.
8058 (compile_skip_regexp): Delete.
8059 (skip_command): Don't compile regexp here. Adjust to use
8060 skiplist_entry::add_entry.
8061 (skip_info): Adjust to use range-for and getters.
8062 (skip_enable_command, skip_disable_command): Adjust to use
8063 range-for and setters.
8064 (skip_delete_command): Adjust to use std::list.
8065 (add_skiplist_entry): Delete.
8066 (skip_file_p): Delete, refactored as ...
8067 (skiplist_entry::do_skip_file_p): ... this new method.
8068 (skip_gfile_p): Delete, refactored as ...
8069 (skiplist_entry::do_gskip_file_p): ... this new method.
8070 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8071 (skiplist_entry::skip_function_p): ... this new method.
8072 (function_name_is_marked_for_skip): Now returns bool, and takes
8073 the function sal by const reference. Adjust to use range-for and
8074 skiplist_entry methods.
8075 (_initialize_step_skip): Remove references to
8076 skiplist_entry_chain, skiplist_entry_count.
8077 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8078 takes the function sal by const reference.
8079
be7d3cd5
YQ
80802017-08-11 Yao Qi <yao.qi@linaro.org>
8081
8082 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8083 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8084 (dwarf2_frame_cache):
8085 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8086 RETURN_MASK_ALL and set *this_case to NULL.
8087 * frame-unwind.h: Update comments.
8088
1c90d9f0
YQ
80892017-08-11 Yao Qi <yao.qi@linaro.org>
8090
8091 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8092 (dwarf2_frame_state_copy_regs): Remove.
8093 (dwarf2_frame_state_free_regs): Remove.
8094 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8095 (dwarf2_restore_rule): Call method .alloc_regs instead of
8096 dwarf2_frame_state_alloc_regs.
8097 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8098 constructor. Call std::move.
8099 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8100 (dwarf2_frame_cache): Likewise.
8101
8102 [GDB_SELF_TEST]: Include selftest.h and
8103 selftest-arch.h.
8104 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8105 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8106 execute_cfa_program_test.
8107
8108 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8109 copy ctor, assignment operator, move assignment.
8110 <alloc_regs>: New method.
8111 <swap>: New method.
8112 (struct dwarf2_frame_state): Delete dtor.
8113 (dwarf2_frame_state_alloc_regs): Remove declaration.
8114 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8115 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8116
afe37d6b
YQ
81172017-08-11 Yao Qi <yao.qi@linaro.org>
8118
8119 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8120 (dwarf2_frame_state::dwarf2_frame_state): New.
8121 (dwarf2_frame_state::~dwarf2_frame_state): New.
8122 (dwarf2_fetch_cfa_info): Update.
8123 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8124 rather than a pointer. Update code.
8125 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8126 dtor.
8127 <data_align, code_align, retaddr_column>: Change them to const.
8128 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8129 to bool.
8130
b348037f
YQ
81312017-08-11 Yao Qi <yao.qi@linaro.org>
8132
8133 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8134 <loc.exp>: New field.
8135 * dwarf2-frame.c (execute_cfa_program): Update.
8136 (dwarf2_frame_prev_register): Update.
8137
e7c9de26
PA
81382017-08-10 Pedro Alves <palves@redhat.com>
8139
8140 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8141
e8c6b620
JB
81422017-08-09 John Baldwin <jhb@FreeBSD.org>
8143
8144 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8145 (fbsd_pending_children): Use std::list.
8146 (fbsd_remember_child): Likewise.
8147 (fbsd_is_child_pending): Likewise.
8148 (fbsd_pending_vfork_done): Use std::forward_list.
8149 (fbsd_add_vfork_done): Likewise.
8150 (fbsd_is_vfork_done_pending): Likewise.
8151 (fbsd_next_vfork_done): Likewise.
8152
e4a26669
JB
81532017-08-09 John Baldwin <jhb@FreeBSD.org>
8154
8155 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8156 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8157 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8158 for `mapfilename'.
8159 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8160 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8161
142311d3
JB
81622017-08-09 John Baldwin <jhb@FreeBSD.org>
8163
8164 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8165 "filestuff.h".
8166 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8167
42fa2e0e
TT
81682017-08-09 Tom Tromey <tom@tromey.com>
8169
8170 * skip.c (skiplist_entry): New constructor.
8171 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8172 (skiplist_entry::file_is_glob): Now bool.
8173 (skiplist_entry::file, skiplist_entry::function): Now
8174 std::string.
8175 (make_skip_entry): Return a unique_ptr. Use new.
8176 (free_skiplist_entry, free_skiplist_entry_cleanup)
8177 (make_free_skiplist_entry_cleanup): Remove.
8178 (skip_command, skip_disable_command, add_skiplist_entry)
8179 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8180 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8181 (function_name_is_marked_for_skip): Update.
8182 (skip_delete_command): Update. Use delete.
8183
cd3af38d
JW
81842017-08-09 Jiong Wang <jiong.wang@arm.com>
8185
8186 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8187 (aarch64_linux_core_read_description): New function.
8188 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8189
29592bde
PA
81902017-08-09 Pedro Alves <palves@redhat.com>
8191
8192 * cp-name-parser.y (cp_comp_to_string): Return a
8193 gdb::unique_xmalloc_ptr<char>.
8194 * cp-support.c (replace_typedefs_qualified_name)
8195 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8196 (cp_canonicalize_string_full): Use op= instead of explicit
8197 convertion.
8198 (cp_class_name_from_physname, method_name_from_physname)
8199 (cp_func_name, cp_remove_params): Adjust to use
8200 gdb::unique_xmalloc_ptr<char>.
8201 * cp-support.h (cp_comp_to_string): Return a
8202 gdb::unique_xmalloc_ptr<char>.
8203 * python/py-type.c (typy_lookup_type): Adjust to use
8204 gdb::unique_xmalloc_ptr<char>.
8205
b3340438
L
82062017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8207
8208 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8209
e88e8651
YQ
82102017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8211 Yao Qi <yao.qi@linaro.org>
8212
8213 * cp-support.c (cp_canonicalize_string_full): Use
8214 gdb::unique_xmalloc_ptr<char>.
8215 (cp_canonicalize_string): Likewise.
8216
f5a29eb0
YQ
82172017-08-09 Yao Qi <yao.qi@linaro.org>
8218
8219 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8220 * regformats/i386/amd64-avx-avx512.dat: Remove.
8221 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8222 * regformats/i386/amd64-avx-mpx.dat:Remove.
8223 * regformats/i386/amd64-avx.dat: Remove.
8224 * regformats/i386/amd64-mpx.dat: Remove.
8225 * regformats/i386/i386-avx-avx512.dat: Remove.
8226 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8227 * regformats/i386/i386-avx-mpx.dat: Remove.
8228 * regformats/i386/i386-mmx.dat: Remove.
8229 * regformats/i386/i386-mpx.dat: Remove.
8230
57757c2f
YQ
82312017-08-09 Yao Qi <yao.qi@linaro.org>
8232
8233 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8234 * amd64-tdep.c: Don't include features/i386/x32*.c.
8235 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8236 functions.
8237 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8238 and i386/x32-avx-avx512.
8239 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8240 and i386/x32.xml.
8241 * features/i386/x32-avx-avx512.c: Removed.
8242 * features/i386/x32-avx-avx512.xml: Removed.
8243 * features/i386/x32-avx.c: Removed.
8244 * features/i386/x32-avx.xml: Removed.
8245 * features/i386/x32.c: Removed.
8246 * features/i386/x32.xml: Removed.
8247 * regformats/i386/x32-avx-avx512.dat: Removed.
8248 * regformats/i386/x32-avx.dat: Removed.
8249 * regformats/i386/x32.dat: Removed.
8250
ba7b109b
MR
82512017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8252
8253 PR breakpoints/21886
8254 * mem-break.c (default_memory_insert_breakpoint): Use
8255 `->placed_address' rather than `->reqstd_address' for the
8256 breakpoint location.
8257
e347efc3
MR
82582017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8259
8260 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8261 assertions.
8262
0dba2a6c
MR
82632017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8264
8265 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8266 a union of `tdep_info', `tdesc_data' and `id'.
8267 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8268 rather than `info.tdep_info'.
8269 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8270 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8271 * i386-tdep.c (i386_gdbarch_init): Likewise.
8272 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8273 * mips-tdep.c (mips_gdbarch_init): Likewise.
8274 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8275 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8276 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8277 `info.tdep_info'.
8278 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8279 `info.tdep_info'.
8280 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8281 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8282 `info.tdep_info'.
8283 * spu-tdep.c (spu_gdbarch_init): Likewise.
8284 * gdbarch.h: Regenerate.
8285
16eb6b2d
LS
82862017-08-07 Leszek Swirski <leszeks@google.com>
8287
7b005726 8288 PR symtab/20899
16eb6b2d
LS
8289 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8290
74cbb09e
SM
82912017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8292
8293 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8294 (gdbsim_open): Rename gdb_argv args object to argv.
8295
ee0c3293
TT
82962017-08-05 Tom Tromey <tom@tromey.com>
8297
8298 * compile/compile-object-load.c (compile_object_load): Use
8299 gdb::unique_xmalloc_ptr.
8300 * cli/cli-dump.c (scan_filename): Rename from
8301 scan_filename_with_cleanup. Change return type.
8302 (scan_expression): Rename from scan_expression_with_cleanup.
8303 Change return type.
8304 (dump_memory_to_file, dump_value_to_file, restore_command):
8305 Use gdb::unique_xmalloc_ptr. Update.
8306 * cli/cli-cmds.c (find_and_open_script): Use
8307 gdb::unique_xmalloc_ptr.
8308 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8309 * symmisc.c (maintenance_print_symbols)
8310 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8311 * symfile.c (symfile_bfd_open, generic_load)
8312 (add_symbol_file_command, remove_symbol_file_command): Use
8313 gdb::unique_xmalloc_ptr.
8314 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8315 * psymtab.c (maintenance_print_psymbols): Use
8316 gdb::unique_xmalloc_ptr.
8317 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8318 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8319 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8320 (reload_shared_libraries_1): Likewise.
8321
3232fabd
TT
83222017-08-05 Tom Tromey <tom@tromey.com>
8323
8324 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8325 (rust_op_vector, rust_set_vector): New typedefs.
8326 (current_parser): New global.
8327 (work_obstack): Change to pointer type. Update all users.
8328 (rust_ast, pstate): Remove globals.
8329 (struct rust_parser): New.
8330 (%union) <params, field_inits>: Change type.
8331 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8332 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8333 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8334 (convert_params_to_types, convert_params_to_expression): Change
8335 type of "params".
8336 (ast_string): Change type of "fields".
8337 (rust_parse): Make a rust_parser. Remove cleanups.
8338 (rust_lex_tests): Make and install an auto_obstack.
8339
f02fd774
YQ
83402017-08-04 Yao Qi <yao.qi@linaro.org>
8341
8342 * configure.srv (ipa_x32_linux_regobj): New.
8343 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8344 instead of X86_TDESC_AVX512.
8345 (initialize_low_tracepoint): Call
8346 init_registers_x32_avx_avx512_linux.
8347
91975afd
YQ
83482017-08-04 Yao Qi <yao.qi@linaro.org>
8349
8350 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8351
2331fa3a
RK
83522017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8353
8354 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8355
744e4fe1
TT
83562017-08-03 Tom Tromey <tom@tromey.com>
8357
8358 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8359 Remove.
8360 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8361
1c034b67
TT
83622017-08-03 Tom Tromey <tom@tromey.com>
8363
8364 * python/py-param.c (compute_enum_values): Use gdb_argv.
8365
773a1edc
TT
83662017-08-03 Tom Tromey <tom@tromey.com>
8367
8368 * utils.h (struct gdb_argv_deleter): New.
8369 (gdb_argv): New class.
8370 * utils.c (gdb_argv::reset): New method.
8371 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8372 * tracefile.c (tsave_command): Use gdb_argv.
8373 * top.c (new_ui_command): Use gdb_argv.
8374 * symmisc.c (maintenance_print_symbols)
8375 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8376 * symfile.c (symbol_file_command, generic_load)
8377 (remove_symbol_file_command): Use gdb_argv.
8378 * stack.c (backtrace_command): Use gdb_argv.
8379 * source.c (add_path, show_substitute_path_command)
8380 (unset_substitute_path_command, set_substitute_path_command):
8381 Use gdb_argv.
8382 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8383 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8384 * remote.c (extended_remote_run, remote_put_command)
8385 (remote_get_command, remote_delete_command): Use gdb_argv.
8386 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8387 (gdbsim_open): Use gdb_argv.
8388 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8389 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8390 * procfs.c (procfs_info_proc): Use gdb_argv.
8391 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8392 * infrun.c (handle_command): Use gdb_argv.
8393 * inferior.c (add_inferior_command, clone_inferior_command):
8394 Use gdb_argv.
8395 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8396 * exec.c (exec_file_command): Use gdb_argv.
8397 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8398 * compile/compile.c (build_argc_argv): Use gdb_argv.
8399
0d50bde3
TT
84002017-08-03 Tom Tromey <tom@tromey.com>
8401
8402 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8403
7f968c89
TT
84042017-08-03 Tom Tromey <tom@tromey.com>
8405
8406 * python/python.c (compute_python_string): Return std::string.
8407 (gdbpy_eval_from_control_command): Update.
8408 (do_start_initialization): Use std::string.
8409 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8410 xstrprintf.
8411 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8412 xstrprintf.
8413
3c9ebddd
TT
84142017-08-03 Tom Tromey <tom@tromey.com>
8415
8416 * top.h (do_restore_instream_cleanup): Remove.
8417 * top.c (do_restore_instream_cleanup): Remove.
8418 (read_command_file): Use scoped_restore.
8419 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8420
b51b225e
TT
84212017-08-03 Tom Tromey <tom@tromey.com>
8422
8423 * cli/cli-script.c (execute_user_command)
8424 (execute_control_command): Use scoped_restore.
8425
ac991630
TT
84262017-08-03 Tom Tromey <tom@tromey.com>
8427
8428 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8429 (execute_user_command): Remove user_call_depth; use
8430 user_args_stack's size instead.
8431
898e0c8e
TT
84322017-08-03 Tom Tromey <tom@tromey.com>
8433
8434 * top.h (in_user_command): Remove.
8435 * top.c (in_user_command): Remove.
8436 * cli/cli-script.c (do_restore_user_call_depth)
8437 (execute_user_command): Update.
8438
26fcd5d7
TT
84392017-08-03 Tom Tromey <tom@tromey.com>
8440
8441 * valops.c (search_struct_method): Use gdb::byte_vector.
8442 * valarith.c (value_concat): Use std::vector.
8443 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8444 (simple_search_memory): Likewise.
8445 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8446 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8447 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8448 * elfread.c (elf_rel_plt_read): Use std::string.
8449 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8450 * cli/cli-dump.c (restore_section_callback): Use
8451 gdb::byte_vector.
8452
7c218e6c
TT
84532017-08-03 Tom Tromey <tom@tromey.com>
8454
8455 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8456
31b68d4a
TT
84572017-08-03 Tom Tromey <tom@tromey.com>
8458
8459 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8460 (tui_register_format): Use scoped_restore.
8461
2ec845e7
TT
84622017-08-03 Tom Tromey <tom@tromey.com>
8463
8464 * reverse.c (exec_direction_default): Remove.
8465 (exec_reverse_once): Use scoped_restore.
8466 * remote.c (restore_remote_timeout): Remove.
8467 (remote_flash_erase, remote_flash_write, remote_flash_done)
8468 (readchar, remote_serial_write): Use scoped_restore.
8469 * cli/cli-script.c (struct source_cleanup_lines_args)
8470 (source_cleanup_lines): Remove.
8471 (script_from_file): Use scoped_restore.
8472 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8473 (source_command): Use scoped_restore.
8474
b3bc8453
TT
84752017-08-03 Tom Tromey <tom@tromey.com>
8476
8477 * utils.h (make_cleanup_free_so): Remove.
8478 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8479 * solist.h (struct so_deleter): New.
8480 (so_list_up): New typedef.
8481 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8482
e3ad2841
TT
84832017-08-03 Tom Tromey <tom@tromey.com>
8484
8485 * utils.h (make_cleanup_restore_current_language): Remove.
8486 * utils.c (do_restore_current_language)
8487 (make_cleanup_restore_current_language): Remove.
8488 * parse.c (parse_exp_in_context_1)
8489 (parse_expression_with_language): Use
8490 scoped_restore_current_language.
8491 * mi/mi-main.c (mi_cmd_execute): Use
8492 scoped_restore_current_language.
8493 * language.h (scoped_restore_current_language): New class.
8494
b80cf838
TT
84952017-08-03 Tom Tromey <tom@tromey.com>
8496
8497 * compile/compile.c (cleanup_unlink_file): Remove.
8498 (compile_to_object): Use gdb::unlinker.
8499 (eval_compile_command): Likewise.
8500
fad0444a
TT
85012017-08-03 Tom Tromey <tom@tromey.com>
8502
8503 * utils.h (make_cleanup_fclose): Remove.
8504 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8505
6e7bc05c
TT
85062017-08-03 Tom Tromey <tom@tromey.com>
8507
8508 * top.c (open_terminal_stream): Return gdb_file_up.
8509 (new_ui_command): Update.
8510
4a45905b
TT
85112017-08-03 Tom Tromey <tom@tromey.com>
8512
8513 * source.c (print_source_lines_base, forward_search_command)
8514 (reverse_search_command): Use gdb_file_up.
8515
7cd06d6e
TT
85162017-08-03 Tom Tromey <tom@tromey.com>
8517
8518 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8519
ed166945
TT
85202017-08-03 Tom Tromey <tom@tromey.com>
8521
8522 * cli/cli-cmds.c (find_and_open_script): Change return type.
8523 Remove "streamp" and "full_path" parameters.
8524 (source_script_with_search): Update.
8525 * auto-load.c (source_script_file): Update.
8526 * cli/cli-cmds.h (find_and_open_script): Change type.
8527 (open_script): New struct.
8528
d419f42d
TT
85292017-08-03 Tom Tromey <tom@tromey.com>
8530
8531 * xml-support.c (xml_fetch_content_from_file): Update.
8532 * ui-file.c (stdio_file::open): Update.
8533 * tracefile-tfile.c (tfile_start): Update.
8534 * remote.c (remote_file_put, remote_file_get): Update.
8535 * nat/linux-procfs.c (linux_proc_get_int)
8536 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8537 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8538 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8539 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8540 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8541 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8542 * linux-nat.c (linux_proc_pending_signals): Update.
8543 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8544 (file_closer): Remove.
8545 * compile/compile.c (compile_to_object): Update.
8546 * common/filestuff.h (struct gdb_file_deleter): New.
8547 (gdb_file_up): New typedef.
8548 (gdb_fopen_cloexec): Change return type.
8549 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8550 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8551 (dump_binary_file, restore_binary_file): Update.
8552 * auto-load.c (auto_load_objfile_script_1): Update.
8553
4a2b031d
TT
85542017-08-03 Tom Tromey <tom@tromey.com>
8555
8556 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8557 (info_static_tracepoint_markers_command): Likewise.
8558 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8559 * skip.c (skip_info): Use ui_out_emit_table.
8560 * progspace.c (print_program_space): Use ui_out_emit_table.
8561 * osdata.c (info_osdata): Use ui_out_emit_table.
8562 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8563 ui_out_emit_table.
8564 * linux-thread-db.c (info_auto_load_libthread_db): Use
8565 ui_out_emit_table.
8566 * inferior.c (print_inferior): Use ui_out_emit_table.
8567 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8568 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8569 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8570 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8571 * ui-out.h (class ui_out_emit_table): New.
8572
a4f320fd
MR
85732017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8574
8575 * mips-tdep.c (mips_fpu_type_str): New function.
8576 (mips_dump_tdep): Call it.
8577
a2f1f308
MR
85782017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8579
8580 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8581 `->mips_fpu_type'.
8582
7e5ed83b
XR
85832017-07-31 Xavier Roirand <roirand@adacore.com>
8584
8585 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8586
4c9dc811
XR
85872017-07-27 Xavier Roirand <roirand@adacore.com>
8588
8589 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8590
27d41eac
YQ
85912017-07-26 Yao Qi <yao.qi@linaro.org>
8592
8593 * cli/cli-cmds.c (maintenancechecklist): New variable.
8594 * gdbcmd.h (maintenancechecklist): Declare it.
8595 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8596 Call i386_linux_read_description with different masks.
8597 * maint.c (maintenance_check_command): New function.
8598 (_initialize_maint_cmds): Call add_prefix_cmd.
8599 * target-descriptions.c (tdesc_reg): override operator != and ==.
8600 (tdesc_type): Likewise.
8601 (tdesc_feature): Likewise.
8602 (target_desc): Likewise.
8603 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8604 (maintenance_check_xml_descriptions): New function.
8605 (_initialize_target_descriptions) Add command "xml-descriptions".
8606 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8607
ea03d0d3
YQ
86082017-07-26 Yao Qi <yao.qi@linaro.org>
8609
8610 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8611 Include features/i386/32bit-*.c.
8612 (i386_linux_read_description): Generate target description if it
8613 doesn't exist.
8614 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8615 functions.
8616 * features/i386/32bit-linux.c: Re-generated.
8617 * features/i386/32bit-sse.c: Likewise.
8618 * target-descriptions.c (print_c_feature::visit): Print code to
8619 set register number if needed.
8620 (print_c_feature) <m_next_regnum>: New field.
8621
25aa13e5
YQ
86222017-07-26 Yao Qi <yao.qi@linaro.org>
8623
8624 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8625 (FEATURE_XMLFILES): New.
8626 (FEATURE_CFILES): New.
8627 New rules.
8628 (clean-cfiles): Remove generated c files.
8629 * features/i386/32bit-avx.c: Generated.
8630 * features/i386/32bit-avx512.c: Generated.
8631 * features/i386/32bit-core.c: Generated.
8632 * features/i386/32bit-linux.c: Generated.
8633 * features/i386/32bit-mpx.c: Generated.
8634 * features/i386/32bit-pkeys.c: Generated.
8635 * features/i386/32bit-sse.c: Generated.
8636 * target-descriptions.c: Include algorithm.
8637 (tdesc_element_visitor): Add method visit_end.
8638 (print_c_tdesc): Implement visit_end.
8639 (print_c_tdesc:: m_filename_after_features): Move it to
8640 protected.
8641 (print_c_feature): New class.
8642 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8643 name starts with "i386/32bit-".
8644
6eb1e6a8
YQ
86452017-07-26 Yao Qi <yao.qi@linaro.org>
8646
8647 * target-descriptions.c (tdesc_element_visitor): New class.
8648 (tdesc_element): New class.
8649 (tdesc_reg): Inherit from tdesc_element.
8650 (tdesc_reg::accept): New function.
8651 (tdesc_type): Inherit from tdesc_element.
8652 (tdesc_type::accept): New function.
8653 (tdesc_feature): Inherit from tdesc_element.
8654 (tdesc_feature::accept): New function.
8655 (target_desc): Inherit from tdesc_element.
8656 (target_desc::target_desc): New.
8657 (target_desc::~target_desc): New.
8658 (target_desc::accept): New.
8659 (allocate_target_description): Use new.
8660 (free_target_description): Use delete.
8661 (print_c_tdesc): New class.
8662 (maint_print_c_tdesc_cmd): Adjust.
8663
8664 * features/aarch64.c: Re-generated.
8665 * features/arc-arcompact.c: Re-generated.
8666 * features/arc-v2.c: Re-generated.
8667 * features/arm/arm-with-iwmmxt.c: Re-generated.
8668 * features/arm/arm-with-m.c: Re-generated.
8669 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8670 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8671 * features/arm/arm-with-neon.c: Re-generated.
8672 * features/arm/arm-with-vfpv2.c: Re-generated.
8673 * features/arm/arm-with-vfpv3.c: Re-generated.
8674 * features/i386/amd64-avx-avx512.c: Re-generated.
8675 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8676 * features/i386/amd64-avx.c: Re-generated.
8677 * features/i386/amd64-avx-linux.c: Re-generated.
8678 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8679 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8680 * features/i386/amd64-avx-mpx.c: Re-generated.
8681 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8682 * features/i386/amd64.c: Re-generated.
8683 * features/i386/amd64-linux.c: Re-generated.
8684 * features/i386/amd64-mpx.c: Re-generated.
8685 * features/i386/amd64-mpx-linux.c: Re-generated.
8686 * features/i386/i386-avx-avx512.c: Re-generated.
8687 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8688 * features/i386/i386-avx.c: Re-generated.
8689 * features/i386/i386-avx-linux.c: Re-generated.
8690 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8691 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8692 * features/i386/i386-avx-mpx.c: Re-generated.
8693 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8694 * features/i386/i386.c: Re-generated.
8695 * features/i386/i386-linux.c: Re-generated.
8696 * features/i386/i386-mmx.c: Re-generated.
8697 * features/i386/i386-mmx-linux.c: Re-generated.
8698 * features/i386/i386-mpx.c: Re-generated.
8699 * features/i386/i386-mpx-linux.c: Re-generated.
8700 * features/i386/x32-avx-avx512.c: Re-generated.
8701 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8702 * features/i386/x32-avx.c: Re-generated.
8703 * features/i386/x32-avx-linux.c: Re-generated.
8704 * features/i386/x32.c: Re-generated.
8705 * features/i386/x32-linux.c: Re-generated.
8706 * features/microblaze.c: Re-generated.
8707 * features/microblaze-with-stack-protect.c: Re-generated.
8708 * features/mips64-dsp-linux.c: Re-generated.
8709 * features/mips64-linux.c: Re-generated.
8710 * features/mips-dsp-linux.c: Re-generated.
8711 * features/mips-linux.c: Re-generated.
8712 * features/nds32.c: Re-generated.
8713 * features/nios2.c: Re-generated.
8714 * features/nios2-linux.c: Re-generated.
8715 * features/rs6000/powerpc-32.c: Re-generated.
8716 * features/rs6000/powerpc-32l.c: Re-generated.
8717 * features/rs6000/powerpc-403.c: Re-generated.
8718 * features/rs6000/powerpc-403gc.c : Re-generated.
8719 * features/rs6000/powerpc-405.c: Re-generated.
8720 * features/rs6000/powerpc-505.c: Re-generated.
8721 * features/rs6000/powerpc-601.c: Re-generated.
8722 * features/rs6000/powerpc-602.c: Re-generated.
8723 * features/rs6000/powerpc-603.c: Re-generated.
8724 * features/rs6000/powerpc-604.c: Re-generated.
8725 * features/rs6000/powerpc-64.c: Re-generated.
8726 * features/rs6000/powerpc-64l.c: Re-generated.
8727 * features/rs6000/powerpc-7400.c: Re-generated.
8728 * features/rs6000/powerpc-750.c: Re-generated.
8729 * features/rs6000/powerpc-860.c: Re-generated.
8730 * features/rs6000/powerpc-altivec32.c: Re-generated.
8731 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8732 * features/rs6000/powerpc-altivec64.c: Re-generated.
8733 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8734 * features/rs6000/powerpc-cell32l.c: Re-generated.
8735 * features/rs6000/powerpc-cell64l.c: Re-generated.
8736 * features/rs6000/powerpc-e500.c: Re-generated.
8737 * features/rs6000/powerpc-e500l.c: Re-generated.
8738 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8739 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8740 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8741 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8742 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8743 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8744 * features/rs6000/powerpc-vsx32.c: Re-generated.
8745 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8746 * features/rs6000/powerpc-vsx64.c: Re-generated.
8747 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8748 * features/rs6000/rs6000.c: Re-generated.
8749 * features/s390-linux32.c: Re-generated.
8750 * features/s390-linux32v1.c: Re-generated.
8751 * features/s390-linux32v2.c: Re-generated.
8752 * features/s390-linux64.c: Re-generated.
8753 * features/s390-linux64v1.c: Re-generated.
8754 * features/s390-linux64v2.c: Re-generated.
8755 * features/s390-te-linux64.c: Re-generated.
8756 * features/s390-tevx-linux64.c: Re-generated.
8757 * features/s390-vx-linux64.c: Re-generated.
8758 * features/s390x-linux64.c: Re-generated.
8759 * features/s390x-linux64v1.c: Re-generated.
8760 * features/s390x-linux64v2.c: Re-generated.
8761 * features/s390x-te-linux64.c: Re-generated.
8762 * features/s390x-tevx-linux64.c: Re-generated.
8763 * features/s390x-vx-linux64.c: Re-generated.
8764 * features/sparc/sparc32-solaris.c: Re-generated.
8765 * features/sparc/sparc64-solaris.c: Re-generated.
8766 * features/tic6x-c62x.c: Re-generated.
8767 * features/tic6x-c62x-linux.c: Re-generated.
8768 * features/tic6x-c64x.c: Re-generated.
8769 * features/tic6x-c64x-linux.c: Re-generated.
8770 * features/tic6x-c64xp.c: Re-generated.
8771 * features/tic6x-c64xp-linux.c: Re-generated.
8772
35b4818d
YQ
87732017-07-26 Yao Qi <yao.qi@linaro.org>
8774
8775 * i386-linux-tdep.c (i386_linux_read_description): New function.
8776 (i386_linux_core_read_description): Call
8777 i386_linux_read_description.
8778 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8779 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8780 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8781 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8782 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8783 * x86-linux-nat.c (x86_linux_read_description): Call
8784 i386_linux_read_description.
8785
8e2141c6
YQ
87862017-07-26 Yao Qi <yao.qi@linaro.org>
8787
8788 * NEWS: Mention it.
8789 * features/Makefile (%.c: %.xml): Pass the xml file name to
8790 command "maint print c-tdesc".
8791 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8792 name from 'arg'.
8793
b468ff4c
YQ
87942017-07-26 Yao Qi <yao.qi@linaro.org>
8795
8796 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8797 in-class initialization.
8798 (tdesc_create_feature): Call new instead of XCNEW.
8799 (free_target_description): Ue delete.
8800
b9c0e1b4
JB
88012017-07-25 John Baldwin <jhb@FreeBSD.org>
8802
8803 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8804
a04b5337
YQ
88052017-07-25 Yao Qi <yao.qi@linaro.org>
8806
8807 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8808 constant.
8809 (amd64_x32_init_abi): Likewise.
8810 * amd64-tdep.h (amd64_init_abi): Update declaration.
8811 (amd64_x32_init_abi): Likewise.
8812
02ad7fc2
YQ
88132017-07-25 Yao Qi <yao.qi@linaro.org>
8814
8815 PR tdep/21717
8816 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8817 condition for FPSCR.
8818 (arm_linux_store_inferior_registers): Likewise.
8819
b6f48cb0
TT
88202017-07-22 Tom Tromey <tom@tromey.com>
8821
8822 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8823 <syscalls_counts>: Now a std::vector.
8824 (get_catch_syscall_inferior_data): Use "new".
8825 (catch_syscall_inferior_data_cleanup): Use "delete".
8826 (insert_catch_syscall, remove_catch_syscall)
8827 (clear_syscall_counts): Update.
8828
e12c9b7a
TT
88292017-07-22 Tom Tromey <tom@tromey.com>
8830
8831 * break-catch-syscall.c (syscall_catchpoint)
8832 <syscalls_to_be_caught>: Now a std::vector<int>
8833 (~syscall_catchpoint): Remove.
8834 (insert_catch_syscall, remove_catch_syscall)
8835 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8836 (print_mention_catch_syscall, print_recreate_catch_syscall):
8837 Update.
8838 (create_syscall_event_catchpoint): Change type of "filter"
8839 parameter.
8840 (catch_syscall_split_args): Return a std::vector.
8841 (catch_syscall_command_1, catching_syscall_number_1): Update.
8842
4fa8aeac
TT
88432017-07-22 Tom Tromey <tom@tromey.com>
8844
8845 * break-catch-throw.c (struct exception_catchpoint)
8846 <exception_rx>: Now a std::string.
8847 (~exception_catchpoint): Remove.
8848 (print_one_detail_exception_catchpoint): Update.
8849 (handle_gnu_v3_exceptions): Change type of except_rx.
8850 (extract_exception_regexp): Return a std::string.
8851 (catch_exception_command_1): Update.
8852
f746a154
TT
88532017-07-22 Tom Tromey <tom@tromey.com>
8854
8855 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8856 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8857 std::vector.
8858 <catch_all>: Now a bool.
8859 (~signal_catchpoint): Remove.
8860 (signal_catchpoint_insert_location)
8861 (signal_catchpoint_remove_location)
8862 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8863 (signal_catchpoint_print_mention)
8864 (signal_catchpoint_print_recreate)
8865 (signal_catchpoint_explains_signal): Update.
8866 (create_signal_catchpoint): Change type of "filter" and
8867 "catch_all".
8868 (catch_signal_split_args): Return a std::vector. Change type of
8869 "catch_all".
8870 (catch_signal_command): Update.
8871
47e77640
PA
88722017-07-20 Pedro Alves <palves@redhat.com>
8873
8874 * ada-lang.c (ada_language_defn): Make extern.
8875 (_initialize_ada_language): Remove add_language call.
8876 * c-lang.c (c_language_defn, cplus_language_defn)
8877 (asm_language_defn, minimal_language_defn): Make extern.
8878 (_initialize_c_language): Delete.
8879 * completer.c (compare_cstrings): Delete, moved to utils.h.
8880 * d-lang.c (d_language_defn): Make extern.
8881 (_initialize_d_language): Remove add_language calls.
8882 * defs.h (enum language): Add comment.
8883 * f-lang.c (f_language_defn): Make extern.
8884 (_initialize_f_language): Remove add_language call.
8885 * go-lang.c (go_language_defn): Make extern.
8886 (_initialize_go_language): Remove add_language call.
8887 * language.c: Include <algorithm>.
8888 (languages): Redefine as const array.
8889 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8890 (set_language_command): Handle "local". Use for-range loop.
8891 (set_language): Remove loop.
8892 (language_enum): Rewrite.
8893 (language_def, language_str): Remove loops.
8894 (add_language): Delete.
8895 (add_set_language_command): New, based on add_languages.
8896 (skip_language_trampoline): Adjust.
8897 (local_language_defn): Delete.
8898 (language_gdbarch_post_init): Adjust.
8899 (_initialize_language): Remove add_language calls. Call
8900 add_set_language_command.
8901 * language.h (add_language): Delete.
8902 (auto_language_defn)
8903 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8904 (asm_language_defn, c_language_defn, cplus_language_defn)
8905 (d_language_defn, f_language_defn, go_language_defn)
8906 (m2_language_defn, objc_language_defn, opencl_language_defn)
8907 (pascal_language_defn, rust_language_defn): Declare.
8908 * m2-lang.c (m2_language_defn): Make extern.
8909 (_initialize_m2_language): Remove add_language call.
8910 * objc-lang.c (objc_language_defn): Make extern.
8911 (_initialize_objc_language): Remove add_language call.
8912 * opencl-lang.c (opencl_language_defn): Make extern.
8913 (_initialize_opencl_language): Remove add_language call.
8914 * p-lang.c (pascal_language_defn): Make extern.
8915 (_initialize_pascal_language): Delete.
8916 * rust-lang.c (rust_language_defn): Make extern.
8917 (_initialize_rust_language): Delete.
8918 * utils.h (compare_cstrings): New static inline function.
8919
edb0c9cb
PA
89202017-07-20 Pedro Alves <palves@redhat.com>
8921
8922 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8923 (get_var_value): Constify parameters.
8924 (get_int_var_value): Change prototype.
8925 (to_fixed_range_type): Adjust.
8926 * ada-lang.h (get_int_var_value): Change prototype.
8927
a778f165
PA
89282017-07-20 Pedro Alves <palves@redhat.com>
8929
8930 * dwarf2read.c (dw2_lookup_symbol): Use
8931 SYMBOL_MATCHES_SEARCH_NAME.
8932 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8933
42edd901
PA
89342017-07-20 Pedro Alves <palves@redhat.com>
8935
8936 * block.c (block_iter_name_step, block_iter_name_first)
8937 (block_iter_name_next): Delete.
8938 (block_lookup_symbol_primary): Adjust to use
8939 dict_iter_match_first/dict_iter_match_next.
8940 * block.h (block_iter_name_first, block_iter_name_next): Delete
8941 declarations.
8942 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8943 dict_iter_match_first/dict_iter_match_next.
8944
cf325299
PA
89452017-07-20 Pedro Alves <palves@redhat.com>
8946
8947 * cp-support.c (cp_find_first_component_aux): Add missing case for
8948 end of string.
8949
c5ed0576
DB
89502017-07-18 David Blaikie <dblaikie@gmail.com>
8951
8952 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8953 of dwo_cu's dwo_file.
8954
27841e76
YQ
89552017-07-18 Yao Qi <yao.qi@linaro.org>
8956
8957 * remote.c (store_registers_using_G): Remove one line comment.
8958
cfb7e58b
YQ
89592017-07-18 Yao Qi <yao.qi@linaro.org>
8960
8961 * regcache.c (regcache_cpy): Simplify it.
8962 (regcache::cpy_no_passthrough): Remove it.
8963 * regcache.h (cpy_no_passthrough): Remove it.
8964 (regcache_dup, regcache_cpy): Update comments.
8965
386535dd
PA
89662017-07-18 Pedro Alves <palves@redhat.com>
8967
8968 * remote-sim.c (sim_command_completer): Adjust to work with a
8969 completion_tracker instead of a VEC.
8970
c45ec17c
PA
89712017-07-17 Pedro Alves <palves@redhat.com>
8972
8973 * completer.c (complete_source_filenames): New function.
8974 (complete_address_and_linespec_locations): New function.
8975 (location_completer): Use complete_address_and_linespec_locations.
8976 (completion_tracker::build_completion_result): Honor the tracker's
8977 request to suppress append.
8978 * completer.h (completion_tracker::suppress_append_ws)
8979 (completion_tracker::set_suppress_append_ws): New methods.
8980 (completion_tracker::m_suppress_append_ws): New field.
8981 (complete_source_filenames): New declaration.
8982 * linespec.c (linespec_complete_what): New.
8983 (struct ls_parser) <complete_what, completion_word,
8984 completion_quote_char, completion_quote_end, completion_tracker>:
8985 New fields.
8986 (string_find_incomplete_keyword_at_end): New.
8987 (linespec_lexer_lex_string): Record quote char. If in completion
8988 mode, don't throw.
8989 (linespec_lexer_consume_token): Advance the completion word point.
8990 (linespec_lexer_peek_token): Save/restore completion info.
8991 (save_stream_and_consume_token): New.
8992 (set_completion_after_number): New.
8993 (linespec_parse_basic): Set what to complete next depending on
8994 token. Handle function and label completions specially.
8995 (parse_linespec): Disable objc shortcut in completion mode. Set
8996 what to complete next depending on token type. Skip keyword if in
8997 completion mode.
8998 (complete_linespec_component, linespec_complete): New.
8999 * linespec.h (linespec_complete): Declare.
9000
be966d42
PA
90012017-07-17 Pedro Alves <palves@redhat.com>
9002
9003 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9004 Handle 'operator<' / 'operator<<'.
9005
a2459270
PA
90062017-07-17 Pedro Alves <palves@redhat.com>
9007
9008 * completer.c (collect_explicit_location_matches): Handle
9009 MATCH_LABEL.
9010 (convert_explicit_location_to_linespec): New, factored out from
9011 ...
9012 (convert_explicit_location_to_sals): ... this.
9013 (complete_label): New.
9014 (linespec_complete_label, find_label_symbols_in_block): New.
9015 (find_label_symbols): Add completion_mode parameter and adjust to
9016 call find_label_symbols_in_block.
9017 * linespec.h (linespec_complete_label): Declare.
9018
c6756f62
PA
90192017-07-17 Pedro Alves <palves@redhat.com>
9020
9021 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9022 complete_symbol_mode parameter.
9023 * cli/cli-cmds.c (complete_command): Get the completion result out
9024 of the handle_brkchars tracker if used a custom word point.
9025 * completer.c: Include "linespec.h".
9026 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9027 (advance_to_expression_complete_word_point): New.
9028 (completion_tracker::completes_to_completion_word): New.
9029 (complete_files_symbols): Pass down
9030 complete_symbol_mode::EXPRESSION.
9031 (explicit_options, probe_options): New.
9032 (collect_explicit_location_matches): Complete on the
9033 explictit_loc->foo instead of word. Use
9034 linespec_complete_function. Handle MATCH_LINE. Handle offering
9035 keyword and options completions.
9036 (backup_text_ptr): Delete.
9037 (skip_keyword): New.
9038 (complete_explicit_location): Remove 'word' parameter. Add
9039 language, quoted_arg_start and quoted_arg_end parameters.
9040 Rewrite, parsing left to right.
9041 (location_completer): Rewrite.
9042 (location_completer_handle_brkchars): New function.
9043 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9044 (enum complete_line_internal_reason): Adjust comments.
9045 (completion_tracker::discard_completions): New.
9046 (completer_handle_brkchars_func_for_completer): Handle
9047 location_completer.
9048 (gdb_custom_word_point_brkchars)
9049 (gdb_org_rl_basic_quote_characters): New.
9050 (gdb_completion_word_break_characters_throw)
9051 (completion_find_completion_word): Handle trackers that use a
9052 custom word point.
9053 (completion_tracker::advance_custom_word_point_by): New.
9054 (completion_tracker::build_completion_result): Don't rely on
9055 readline appending the quote char.
9056 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9057 use a custom word point.
9058 (gdb_rl_attempted_completion_function): Restore
9059 rl_basic_quote_characters.
9060 * completer.h (class completion_tracker): Extend intro comment.
9061 (completion_tracker::set_quote_char)
9062 (completion_tracker::quote_char)
9063 (completion_tracker::set_use_custom_word_point)
9064 (completion_tracker::use_custom_word_point)
9065 (completion_tracker::custom_word_point)
9066 (completion_tracker::set_custom_word_point)
9067 (completion_tracker::advance_custom_word_point_by)
9068 (completion_tracker::completes_to_completion_word)
9069 (completion_tracker::discard_completions): New methods.
9070 (completion_tracker::m_quote_char)
9071 (completion_tracker::m_use_custom_word_point)
9072 (completion_tracker::m_custom_word_point): New fields.
9073 (advance_to_expression_complete_word_point): Declare.
9074 * f-lang.c (f_collect_symbol_completion_matches): Add
9075 complete_symbol_mode parameter.
9076 * language.h (struct language_defn)
9077 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9078 parameter.
9079 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9080 (linespec_complete_function): New function.
9081 (linespec_lexer_lex_keyword): Adjust.
9082 * linespec.h (linespec_keywords, linespec_complete_function): New
9083 declarations.
9084 * location.c (find_end_quote): New function.
9085 (explicit_location_lex_one): Add explicit_completion_info
9086 parameter. Save quoting info. Don't throw if being called for
9087 completion. Don't handle Ada operators here.
9088 (is_cp_operator, skip_op_false_positives, first_of)
9089 (explicit_location_lex_one_function): New function.
9090 (string_to_explicit_location): Replace 'dont_throw' parameter with
9091 an explicit_completion_info pointer parameter. Handle it. Don't
9092 use explicit_location_lex_one to lex function names. Use
9093 explicit_location_lex_one_function instead.
9094 * location.h (struct explicit_completion_info): New.
9095 (string_to_explicit_location): Replace 'dont_throw' parameter with
9096 an explicit_completion_info pointer parameter.
9097 * symtab.c (default_collect_symbol_completion_matches_break_on):
9098 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9099 (default_collect_symbol_completion_matches)
9100 (collect_symbol_completion_matches): Add complete_symbol_mode
9101 parameter.
9102 (collect_symbol_completion_matches_type): Pass down
9103 complete_symbol_mode::EXPRESSION.
9104 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9105 parameter. Handle LINESPEC mode.
9106 * symtab.h (complete_symbol_mode): New.
9107 (default_collect_symbol_completion_matches_break_on)
9108 (default_collect_symbol_completion_matches)
9109 (collect_symbol_completion_matches)
9110 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9111 parameter.
9112
1d550c82
PA
91132017-07-17 Pedro Alves <palves@redhat.com>
9114
9115 * utils.c (enum class strncmp_iw_mode): New.
9116 (strcmp_iw): Rename to ...
9117 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9118 parameters. Handle them.
9119 (strncmp_iw): New.
9120 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9121 * utils.h (strncmp_iw): Declare.
9122 (strcmp_iw): Move describing comments here.
9123
8090b426
PA
91242017-07-17 Pedro Alves <palves@redhat.com>
9125
9126 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9127 CP_OPERATOR_STR.
9128 * c-typeprint.c (is_type_conversion_operator): Use
9129 CP_OPERATOR_STR.
9130 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9131 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9132 CP_OPERATOR_LEN.
9133 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9134 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9135 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9136 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9137 CP_OPERATOR_STR.
9138 * location.c: Include "cp-support.h".
9139 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9140 CP_OPERATOR_STR.
9141 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9142 CP_OPERATOR_LEN.
9143
6a2c1b87
PA
91442017-07-17 Pedro Alves <palves@redhat.com>
9145
9146 * cli/cli-cmds.c (complete_command): Use a completion tracker
9147 along with completion_find_completion_word for handle_brkchars
9148 phase.
9149 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9150 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9151 (struct gdb_rl_completion_word_info): New.
9152 (gdb_rl_find_completion_word): New.
9153 (completion_find_completion_word): New.
9154 * completer.h (completion_find_completion_word): Declare.
9155
eb3ff9a5
PA
91562017-07-17 Pedro Alves <palves@redhat.com>
9157
9158 * ada-lang.c (symbol_completion_match): Adjust comments.
9159 (symbol_completion_add): Replace vector parameter with
9160 completion_tracker parameter. Use it.
9161 (ada_make_symbol_completion_list): Rename to...
9162 (ada_collect_symbol_completion_matches): ... this. Add
9163 completion_tracker parameter and use it.
9164 (ada_language_defn): Adjust.
9165 * break-catch-syscall.c (catch_syscall_completer): Adjust
9166 prototype and work with completion_tracker instead of VEC.
9167 * breakpoint.c (condition_completer): Adjust prototype and work
9168 with completion_tracker instead of VEC.
9169 * c-lang.c (c_language_defn, cplus_language_defn)
9170 (asm_language_defn, minimal_language_defn): Adjust to renames.
9171 * cli/cli-cmds.c (complete_command): Rework using
9172 completion_tracker. Catch exceptions when completing.
9173 * cli/cli-decode.c (integer_unlimited_completer)
9174 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9175 with completion_tracker instead of VEC.
9176 * command.h (struct completion_tracker): Forward declare.
9177 (completer_ftype, completer_handle_brkchars_ftype): Change
9178 types.
9179 (complete_on_cmdlist, complete_on_enum): Adjust.
9180 * completer.c: Include <algorithm>.
9181 (struct gdb_completer_state): New.
9182 (current_completion): New global.
9183 (readline_line_completion_function): Delete.
9184 (noop_completer, filename_completer)
9185 (filename_completer_handle_brkchars, complete_files_symbols)
9186 (linespec_location_completer): Adjust to work with a
9187 completion_tracker instead of a VEC.
9188 (string_or_empty): New.
9189 (collect_explicit_location_matches): Adjust to work with a
9190 completion_tracker instead of a VEC.
9191 (explicit_location_completer): Rename to ...
9192 (complete_explicit_location): ... this and adjust to work with a
9193 completion_tracker instead of a VEC.
9194 (location_completer): Adjust to work with a completion_tracker
9195 instead of a VEC.
9196 (add_struct_fields): Adjust to work with a completion_list instead
9197 of VEC.
9198 (expression_completer): Rename to ...
9199 (complete_expression): ... this and adjust to work with a
9200 completion_tracker instead of a VEC. Use complete_files_symbols.
9201 (expression_completer): Reimplement on top of complete_expression.
9202 (symbol_completer): Adjust to work with a completion_tracker
9203 instead of a VEC.
9204 (enum complete_line_internal_reason): Add describing comments.
9205 (complete_line_internal_normal_command): Adjust to work with a
9206 completion_tracker instead of a VEC.
9207 (complete_line_internal): Rename to ...
9208 (complete_line_internal_1): ... this and adjust to work with a
9209 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9210 handle_brkchars phase.
9211 (new_completion_tracker): Delete.
9212 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9213 complete_line_internal_1.
9214 (free_completion_tracker): Delete.
9215 (INITIAL_COMPLETION_HTAB_SIZE): New.
9216 (completion_tracker::completion_tracker)
9217 (completion_tracker::~completion_tracker): New.
9218 (maybe_add_completion): Delete.
9219 (completion_tracker::maybe_add_completion)
9220 (completion_tracker::add_completion)
9221 (completion_tracker::add_completions): New.
9222 (throw_max_completions_reached_error): Delete.
9223 (complete_line): Adjust to work with a completion_tracker instead
9224 of a VEC. Don't create a completion_tracker_t or check for max
9225 completions here.
9226 (command_completer, command_completer_handle_brkchars)
9227 (signal_completer, reg_or_group_completer_1)
9228 (reg_or_group_completer, default_completer_handle_brkchars):
9229 Adjust to work with a completion_tracker.
9230 (gdb_completion_word_break_characters_throw): New.
9231 (gdb_completion_word_break_characters): Reimplement.
9232 (line_completion_function): Delete.
9233 (completion_tracker::recompute_lowest_common_denominator)
9234 (expand_preserving_ws)
9235 (completion_tracker::build_completion_result)
9236 (completion_result::completion_result)
9237 (completion_result::completion_result)
9238 (completion_result::~completion_result)
9239 (completion_result::completion_result)
9240 (completion_result::release_match_list, compare_cstrings)
9241 (completion_result::sort_match_list)
9242 (completion_result::reset_match_list)
9243 (gdb_rl_attempted_completion_function_throw)
9244 (gdb_rl_attempted_completion_function): New.
9245 * completer.h (completion_list, struct completion_result)
9246 (class completion_tracker): New.
9247 (complete_line): Add completion_tracker parameter.
9248 (readline_line_completion_function): Delete.
9249 (gdb_rl_attempted_completion_function): New.
9250 (noop_completer, filename_completer, expression_completer)
9251 (location_completer, symbol_completer, command_completer)
9252 (signal_completer, reg_or_group_completer): Update prototypes.
9253 (completion_tracker_t, new_completion_tracker)
9254 (make_cleanup_free_completion_tracker): Delete.
9255 (enum maybe_add_completion_enum): Delete.
9256 (maybe_add_completion): Delete.
9257 (throw_max_completions_reached_error): Delete.
9258 * corefile.c (complete_set_gnutarget): Adjust to work with a
9259 completion_tracker instead of a VEC.
9260 * cp-abi.c (cp_abi_completer): Adjust to work with a
9261 completion_tracker instead of a VEC.
9262 * d-lang.c (d_language_defn): Adjust.
9263 * disasm.c (disassembler_options_completer): Adjust to work with a
9264 completion_tracker instead of a VEC.
9265 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9266 (f_collect_symbol_completion_matches): ... this. Adjust to work
9267 with a completion_tracker instead of a VEC.
9268 (f_language_defn): Adjust.
9269 * go-lang.c (go_language_defn): Adjust.
9270 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9271 Adjust to work with a completion_tracker instead of a VEC.
9272 * infrun.c (handle_completer): Likewise.
9273 * interps.c (interpreter_completer): Likewise.
9274 * interps.h (interpreter_completer): Likewise.
9275 * language.c (unknown_language_defn, auto_language_defn)
9276 (local_language_defn): Adjust.
9277 * language.h (language_defn::la_make_symbol_completion_list):
9278 Rename to ...
9279 (language_defn::la_collect_symbol_completion_matches): ... this
9280 and adjust to work with a completion_tracker instead of a VEC.
9281 * m2-lang.c (m2_language_defn): Adjust.
9282 * objc-lang.c (objc_language_defn): Adjust.
9283 * opencl-lang.c (opencl_language_defn): Adjust.
9284 * p-lang.c (pascal_language_defn): Adjust.
9285 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9286 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9287 with a completion_tracker.
9288 * rust-lang.c (rust_language_defn): Adjust.
9289 * symtab.c (free_completion_list, do_free_completion_list)
9290 (return_val, completion_tracker): Delete.
9291 (completion_list_add_name, completion_list_add_symbol)
9292 (completion_list_add_msymbol, completion_list_objc_symbol)
9293 (completion_list_add_fields, add_symtab_completions): Add
9294 completion_tracker parameter and use it.
9295 (default_make_symbol_completion_list_break_on_1): Rename to...
9296 (default_collect_symbol_completion_matches_break_on): ... this.
9297 Add completion_tracker parameter and use it instead of allocating
9298 a completion tracker here.
9299 (default_make_symbol_completion_list_break_on): Delete old
9300 implementation.
9301 (default_make_symbol_completion_list): Delete.
9302 (default_collect_symbol_completion_matches): New.
9303 (make_symbol_completion_list): Delete.
9304 (collect_symbol_completion_matches): New.
9305 (make_symbol_completion_type): Rename to ...
9306 (collect_symbol_completion_matches_type): ... this. Add
9307 completion_tracker parameter and use it instead of VEC.
9308 (make_file_symbol_completion_list_1): Rename to...
9309 (collect_file_symbol_completion_matches): ... this. Add
9310 completion_tracker parameter and use it instead of VEC.
9311 (make_file_symbol_completion_list): Delete.
9312 (add_filename_to_list): Use completion_list instead of a VEC.
9313 (add_partial_filename_data::list): Now a completion_list.
9314 (make_source_files_completion_list): Work with a completion_list
9315 instead of a VEC.
9316 * symtab.h: Include "completer.h".
9317 (default_make_symbol_completion_list_break_on)
9318 (default_make_symbol_completion_list, make_symbol_completion_list)
9319 (make_symbol_completion_type, make_file_symbol_completion_list)
9320 (make_source_files_completion_list): Delete.
9321 (default_collect_symbol_completion_matches_break_on)
9322 (default_collect_symbol_completion_matches)
9323 (collect_symbol_completion_matches)
9324 (collect_symbol_completion_matches_type)
9325 (collect_file_symbol_completion_matches)
9326 (make_source_files_completion_list): New.
9327 * top.c (init_main): Don't install a rl_completion_entry_function
9328 hook. Install a rl_attempted_completion_function hook instead.
9329 * tui/tui-layout.c (layout_completer): Adjust to work with a
9330 completion_tracker.
9331 * tui/tui-regs.c (tui_reggroup_completer):
9332 * tui/tui-win.c (window_name_completer, focus_completer)
9333 (winheight_completer): Adjust to work with a completion_tracker.
9334 * value.c: Include "completer.h".
9335 (complete_internalvar): Adjust to work with a completion_tracker.
9336 * value.h (complete_internalvar): Likewise.
9337
6e1dbf8c
PA
93382017-07-17 Pedro Alves <palves@redhat.com>
9339
9340 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9341 renames.
9342 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9343 comments to completer_ftype's declaration.
9344 <completer_handle_brkchars>: Change type to
9345 completer_handle_brkchars_ftype.
9346 * command.h (completer_ftype): Add describing comment and give
9347 names to parameters.
9348 (completer_ftype_void): Rename to ...
9349 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9350 (set_cmd_completer_handle_brkchars): Adjust.
9351 * completer.c (filename_completer_handle_brkchars): New function.
9352 (complete_line_internal_normal_command): New function, factored
9353 out from ...
9354 (complete_line_internal): ... here.
9355 (command_completer_handle_brkchars)
9356 (default_completer_handle_brkchars)
9357 (completer_handle_brkchars_func_for_completer): New functions.
9358 * completer.h (set_gdb_completion_word_break_characters): Delete
9359 declaration.
9360 (completer_handle_brkchars_func_for_completer): New declaration.
9361 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9362 completer_handle_brkchars_func_for_completer.
9363
78b13106
PA
93642017-07-17 Pedro Alves <palves@redhat.com>
9365
9366 * completer.c (symbol_completer): New function, based on
9367 make_symbol_completion_list_fn.
9368 * completer.h (symbol_completer): New declaration.
9369 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9370 * python/py-cmd.c (completers): Adjust.
9371 * symtab.c (make_symbol_completion_list_fn): Delete.
9372 * symtab.h (make_symbol_completion_list_fn): Delete.
9373 * cli/cli-decode.c (add_cmd): Adjust.
9374
bbf2f4df
PA
93752017-07-17 Pedro Alves <palves@redhat.com>
9376
9377 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9378 * dwarf2read.c: Include "filename-seen-cache.h".
9379 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9380 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9381 * filename-seen-cache.c: New file.
9382 * filename-seen-cache.h: New file.
9383 * symtab.c: Include "filename-seen-cache.h".
9384 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9385 (create_filename_seen_cache, clear_filename_seen_cache)
9386 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9387 to filename-seen-cache.h/filename-seen-cache.c.
9388 (output_source_filename, sources_info)
9389 (maybe_add_partial_symtab_filename)
9390 (make_source_files_completion_list): Adjust to use
9391 filename_seen_cache.
9392
330cdd98
PA
93932017-07-17 Pedro Alves <palves@redhat.com>
9394
9395 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9396 fields.
9397 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9398 dwarf2_debug_sections*)): New.
9399 (dwarf2_per_objfile::dwarf2_per_objfile(const
9400 dwarf2_per_objfile&)): Declare as deleted.
9401 (dwarf2_per_objfile::operator=): Declare as deleted.
9402 (dwarf2_per_objfile::dwarf2_per_objfile)
9403 (dwarf2_per_objfile::~dwarf2_per_objfile)
9404 (dwarf2_per_objfile::free_cached_comp_units): New.
9405 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9406 ctor. Call dwarf2_per_objfile's ctor manually.
9407 (dwarf2_locate_sections): Deleted/refactored as ...
9408 (dwarf2_per_objfile::locate_sections): ... this new method.
9409 (free_cached_comp_units): Defer to
9410 dwarf2_per_objfile::free_cached_comp_units.
9411 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9412
8880f2a9
TT
94132017-07-14 Tom Tromey <tom@tromey.com>
9414
9415 PR rust/21764:
9416 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9417 parameter.
9418 <UNOP_SIZEOF>: Split into separate case.
9419 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9420
65547233
TT
94212017-07-14 Tom Tromey <tom@tromey.com>
9422
9423 PR rust/21763:
9424 * symtab.c (symbol_matches_domain): Add language_rust to special
9425 case.
9426 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9427 treat LOC_TYPEDEF symbols as variables.
9428
8f14146e
PA
94292017-07-14 Pedro Alves <palves@redhat.com>
9430
9431 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9432 symtabs matching all symtabs with SRCFILE as file name instead of
9433 only considering the first hit, with lookup_symtab.
9434
2347965c
SM
94352017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9436
9437 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9438 operator_name parameters.
9439 (gen_expr): Update function call.
9440
40f4af28
SM
94412017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9442
9443 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9444 parameter.
9445 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9446 Likewise.
9447 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9448 parameter, use agent_expr::gdbarch instead, update function
9449 calls.
9450 (locexpr_tracepoint_var_ref): Likewise.
9451 (loclist_tracepoint_var_ref): Likewise.
9452 * ax-gdb.c (gen_trace_static_fields): Likewise.
9453 (gen_traced_pop): Likewise.
9454 (gen_frame_args_address): Likewise.
9455 (gen_frame_locals_address): Likewise.
9456 (gen_var_ref): Likewise.
9457 (gen_struct_ref_recursive): Likewise.
9458 (gen_static_field): Likewise.
9459 (gen_maybe_namespace_elt): Likewise.
9460 (gen_expr): Likewise.
9461 (gen_trace_for_var): Likewise.
9462 (gen_trace_for_expr): Likewise.
9463 (gen_trace_for_return_address): Likewise.
9464
053f8057
SM
94652017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9466
9467 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9468 parameter.
9469 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9470
6661ad48
SM
94712017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9472
9473 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9474 from ax, update calls.
9475 (gen_usual_arithmetic): Likewise.
9476 (gen_integral_promotions): Likewise.
9477 (gen_bitfield_ref): Likewise.
9478 (gen_primitive_field): Likewise.
9479 (gen_struct_ref_recursive): Likewise.
9480 (gen_struct_ref): Likewise.
9481 (gen_maybe_namespace_elt): Likewise.
9482 (gen_struct_elt_for_reference): Likewise.
9483 (gen_namespace_elt): Likewise.
9484 (gen_aggregate_elt_ref): Likewise.
9485 (gen_expr): Get gdbarch from ax, update calls.
9486 (gen_expr_binop_rest): Likewise.
9487
c55a47e7
PA
94882017-07-13 Pedro Alves <palves@redhat.com>
9489
9490 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9491 as default tdesc.
9492 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9493 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9494 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9495 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9496 tdep.
9497 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9498 Get final tdesc from the tdep.
9499 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9500 default tdesc.
9501 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9502 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9503 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9504 Use it as default tdesc.
9505 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9506 down to amd_init_abi. No longer handle fallback tdesc here.
9507 * amd64-tdep.h (tdesc_x32): Declare.
9508 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9509 parameter.
9510 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9511 as default tdesc.
9512
55efceab
AA
95132017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9514
9515 * s390-linux-tdep.c (s390_process_record): Add support for
9516 instructions new in arch12.
9517
0aa37b65
JB
95182017-07-11 John Baldwin <jhb@FreeBSD.org>
9519
9520 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9521 PT_GETFSBASE and PT_GETGSBASE.
9522 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9523 PT_SETGSBASE.
9524
48aeef91
JB
95252017-07-11 John Baldwin <jhb@FreeBSD.org>
9526
9527 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9528 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9529 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9530 those rules.
9531 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9532 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9533 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9534 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9535 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9536 * features/i386/amd64.xml: Add 64bit-segments.xml.
9537 * features/i386/amd64-avx-avx512.c: Regenerated.
9538 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9539 * features/i386/amd64-avx-mpx.c: Regenerated.
9540 * features/i386/amd64-avx.c: Regenerated.
9541 * features/i386/amd64-mpx.c: Regenerated.
9542 * features/i386/amd64.c: Regenerated.
9543 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9544 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9545 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9546 * regformats/i386/amd64-avx.dat: Regenerated.
9547 * regformats/i386/amd64-mpx.dat: Regenerated.
9548 * regformats/i386/amd64.dat: Regenerated.
9549
77c501bc
YQ
95502017-07-10 Yao Qi <yao.qi@linaro.org>
9551
9552 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9553 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9554
6dc8d757
AK
95552017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9556
9557 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9558 unsetenv.
9559 * gnulib/aclocal.m4: Regenerate.
9560 * gnulib/config.in: Regenerate.
9561 * gnulib/configure: Regenerate.
9562 * gnulib/import/Makefile.am: Regenerate.
9563 * gnulib/import/Makefile.in: Regenerate.
9564 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9565 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9566 * gnulib/import/m4/environ.m4: New file.
9567 * gnulib/import/m4/setenv.m4: New file.
9568 * gnulib/import/setenv.c: New file.
9569 * gnulib/import/unsetenv.c: New file.
9570
266934d1
SM
95712017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9572
9573 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9574 address when op is DW_OP_addr.
9575
03278692
TT
95762017-07-09 Tom Tromey <tom@tromey.com>
9577
9578 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9579 check and apply to outer type.
9580
4b654465
JB
95812017-07-07 John Baldwin <jhb@FreeBSD.org>
9582
9583 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9584 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9585 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9586 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9587
2af9fc44
JB
95882017-07-07 John Baldwin <jhb@FreeBSD.org>
9589
9590 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9591
382b69bb
JB
95922017-07-07 John Baldwin <jhb@FreeBSD.org>
9593
9594 * corelow.c (get_core_siginfo): Remove.
9595 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9596 instead of get_core_siginfo.
9597 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9598 * gdbarch.h: Re-generate.
9599 * gdbarch.c: Re-generate.
9600 * linux-tdep.c (linux_core_xfer_siginfo): New.
9601 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9602
6e5eab33
JB
96032017-07-07 John Baldwin <jhb@FreeBSD.org>
9604
9605 * corelow.c (thread_section_name): Move to ...
9606 * gdbcore.h (thread_section_name): ... here.
9607
929edea9
JB
96082017-07-07 John Baldwin <jhb@FreeBSD.org>
9609
9610 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9611 (struct siginfo32): New.
9612 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9613 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9614 via ptrace(PT_LWPINFO).
9615
762c974a
JB
96162017-07-07 John Baldwin <jhb@FreeBSD.org>
9617
9618 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9619 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9620 (fbsd_get_siginfo_type): New.
9621 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9622 (_initialize_fbsd_tdep): New.
9623
33c5cd75
DB
96242017-07-06 David Blaikie <dblaikie@gmail.com>
9625
9626 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9627 a singular dwo_unit*) to support multiple CUs in the same way that
9628 multiple TUs are supported.
9629 (create_cus_hash_table): Replace create_dwo_cu with a function for
9630 parsing multiple CUs from a DWO file.
9631 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9632 create_dwo_cu.
9633 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9634 htab_find, rather than comparing the signature to a singleton CU in
9635 the dwo_file.
9636
8455d262
PA
96372017-07-06 Pedro Alves <palves@redhat.com>
9638
9639 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9640
4da3eb35
PA
96412017-07-04 Pedro Alves <palves@redhat.com>
9642
9643 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9644 * gdbtypes.h (TYPE_STATIC): Delete.
9645 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9646 is_synchronized, is_native>: Delete.
9647 <dummy>: Bump.
9648 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9649 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9650 (TYPE_FN_FIELD_ABSTRACT): Delete.
9651
5bfd255c
SM
96522017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9653
9654 * buffer.h (buffer_finish): Fix spelling mistakes.
9655
25c54127
EZ
96562017-07-01 Eli Zaretskii <eliz@gnu.org>
9657
9658 * .dir-locals.el: Automatically switch to C-style comments in
9659 versions of Emacs that support the feature.
9660
dc4bde35
SDJ
96612017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9662 Pedro Alves <palves@redhat.com>
9663
9664 PR cli/21688
9665 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9666 (process_next_line): New variable 'inline_cmd'.
9667 Adjust 'if' clauses for "python", "compile" and "guile" to use
9668 'command_name_equals' and check for '!inline_cmd'.
9669
51ed89aa
SDJ
96702017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9671
9672 PR cli/21688
9673 * cli/cli-script.c (command_name_equals_not_inline): New function.
9674 (process_next_line): Adjust 'if' clauses for "python", "compile"
9675 and "guile" to use command_name_equals_not_inline.
9676
eb17d413
PA
96772017-06-29 Pedro Alves <palves@redhat.com>
9678
9679 * completer.c (expression_completer): Call
9680 linespec_location_completer instead of location_completer.
9681
195bcdd5
PA
96822017-06-29 Pedro Alves <palves@redhat.com>
9683
9684 * completer.c (expression_completer): Remove code that recomputes
9685 'text' from 'word'.
9686
adc764e7
YQ
96872017-06-29 Yao Qi <yao.qi@linaro.org>
9688
9689 * regformats/regdat.sh: Generate code with
9690 "ifndef IN_PROCESS_AGENT".
9691
6e75794e
PA
96922017-06-28 Pedro Alves <palves@redhat.com>
9693
9694 * command.h: Include "common/scoped_restore.h".
9695
bc491f2e
YQ
96962017-06-28 Yao Qi <yao.qi@linaro.org>
9697
9698 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9699 instead of obstack_grow.
9700
41664b45
DG
97012017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9702
9703 PR gdb/21337
9704 * symfile.c (reread_symbols): Call objfiles_changed just before
9705 read_symbols.
9706
6da67eb1
PA
97072017-06-27 Pedro Alves <palves@redhat.com>
9708
9709 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9710 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9711 (completion_list_add_symbol, completion_list_add_msymbol):
9712 ... these new functions.
9713 (add_symtab_completions)
9714 (default_make_symbol_completion_list_break_on_1): Adjust.
9715
23732b1e
PA
97162017-06-27 Pedro Alves <palves@redhat.com>
9717
9718 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9719 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9720 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9721 dtor.
9722 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9723 'storage_obstack' field an auto_obstack. In-class initialize all
9724 non-bitfield fields. Make minsyms_read bool.
9725 * symfile.c (read_symbols): Adjust.
9726
a4d1e79a
AH
97272017-06-27 Alan Hayward <alan.hayward@arm.com>
9728
9729 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9730 (gdbsim_store_register): Likewise.
9731
8268c778
PA
97322017-06-27 Pedro Alves <palves@redhat.com>
9733
9734 * c-exp.y (name_obstack): Now an auto_obstack.
9735 (yylex): Use auto_obstack::clear.
9736 (c_parse): Use auto_obstack::clear instead of reinitializing and
9737 freeing the obstack.
9738 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9739 * d-exp.y (name_obstack): Now an auto_obstack.
9740 (yylex): Use auto_obstack::clear.
9741 (d_parse): Use auto_obstack::clear instead of reinitializing and
9742 freeing the obstack.
9743 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9744 auto_obstack.
9745 * dwarf2read.c (create_addrmap_from_index)
9746 (dwarf2_build_psymtabs_hard)
9747 (update_enumeration_type_from_children): Likewise.
9748 * gdb_obstack.h (auto_obstack): New type.
9749 * go-exp.y (name_obstack): Now an auto_obstack.
9750 (build_packaged_name): Use auto_obstack::clear.
9751 (go_parse): Use auto_obstack::clear instead of reinitializing and
9752 freeing the obstack.
9753 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9754 auto_obstack.
9755 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9756 * rust-exp.y (work_obstack): Now an auto_obstack.
9757 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9758 reinitializing and freeing the obstack.
9759 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9760 (host_char_to_target): Use auto_obstack.
9761 * utils.h (make_cleanup_obstack_free): Delete declaration.
9762 * valprint.c (generic_emit_char, generic_printstr): Use
9763 auto_obstack.
9764
db665f42
SM
97652017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9766
9767 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9768 thread.
9769 (darwin_init_thread_list): Don't update dummy thread.
9770 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9771
873c0814
SM
97722017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9773
9774 * record-full.c (netorder16): Remove.
9775
8b5a7a6e
SM
97762017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9777
9778 * common/diagnostics.h: Define macros for GCC.
9779 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9780 * common/vec.h: Include diagnostics.h.
9781 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9782 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9783 warning.
9784
d1435379
SM
97852017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9786
9787 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9788 New macro.
9789 * ada-lex.l: Ignore deprecated register warnings.
9790
cc75e0fd
SM
97912017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9792
9793 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9794 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9795
07809eaf
SM
97962017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9797
9798 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9799 its own line.
9800
f076f034
SM
98012017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9802
9803 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9804
0dd5cbc5
AH
98052017-06-23 Alan Hayward <alan.hayward@arm.com>
9806
9807 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9808 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9809 (xtensa_register_read_masked): Likewise.
9810
d4c6ce5b
SDJ
98112017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9812
9813 * common/environ.c (gdb_environ::unset): Update comment.
9814
16892a03
AH
98152017-06-22 Alan Hayward <alan.hayward@arm.com>
9816
9817 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9818 registers.
9819
d7dcbefc
AH
98202017-06-22 Alan Hayward <alan.hayward@arm.com>
9821
9822 * record-full.c (record_full_exec_insn): Use byte_vector.
9823
b30ff123
YQ
98242017-06-22 Yao Qi <yao.qi@linaro.org>
9825
9826 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9827 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9828
4fa847d7
AH
98292017-06-22 Alan Hayward <alan.hayward@arm.com>
9830
9831 * remote.c (cached_reg): Move from here...
9832 * regcache.h (cached_reg): ...to here.
9833 * python/py-unwind.c (struct reg_info): Remove.
9834 (cached_frame_info): Use cached_reg_t.
9835 (pyuw_prev_register): Likewise.
9836 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9837 (pyuw_dealloc_cache): Free all registers.
9838
f4906a9a
PA
98392017-06-22 Pedro Alves <palves@redhat.com>
9840 Simon Marchi <simon.marchi@ericsson.com>
9841
9842 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9843 warning.
9844 * common/diagnostics.h: New file.
9845
b45a1208
PA
98462017-06-22 Pedro Alves <palves@redhat.com>
9847
9848 * common/agent.h: Add include guards.
9849
e4da2c61
SM
98502017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9851
9852 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9853 talk about addressable units instead of bytes.
9854
96160d60
SDJ
98552017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9856
9857 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9858 of '::const_iterator'.
9859
9a6c7d9c
SDJ
98602017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9861
9862 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9863 'unittests/environ-selftests.c'.
9864 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9865 * charset.c (find_charset_names): Declare object 'iconv_env'.
9866 Update code to use 'iconv_env' object. Remove call to
9867 'free_environ'.
9868 * common/environ.c: Include <utility>.
9869 (make_environ): Delete function.
9870 (free_environ): Delete function.
9871 (gdb_environ::clear): New function.
9872 (gdb_environ::operator=): New function.
9873 (gdb_environ::get): Likewise.
9874 (environ_vector): Delete function.
9875 (set_in_environ): Delete function.
9876 (gdb_environ::set): New function.
9877 (unset_in_environ): Delete function.
9878 (gdb_environ::unset): New function.
9879 (gdb_environ::envp): Likewise.
9880 * common/environ.h: Include <vector>.
9881 (struct gdb_environ): Delete; transform into...
9882 (class gdb_environ): ... this class.
9883 (free_environ): Delete prototype.
9884 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9885 environ_vector): Likewise.
9886 * infcmd.c (run_command_1): Update code to call
9887 'envp' from 'gdb_environ' class.
9888 (environment_info): Update code to call methods from 'gdb_environ'
9889 class.
9890 (unset_environment_command): Likewise.
9891 (path_info): Likewise.
9892 (path_command): Likewise.
9893 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9894 (inferior::inferior): Initialize 'environment' using the host's
9895 information.
9896 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9897 Include "environ.h".
9898 (class inferior) <environment>: Change type from 'struct
9899 gdb_environ' to 'gdb_environ'.
9900 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9901 methods from 'gdb_environ' class.
9902 * solib.c (solib_find_1): Likewise
9903 * unittests/environ-selftests.c: New file.
9904
75c554cf
YQ
99052017-06-20 Yao Qi <yao.qi@linaro.org>
9906
9907 * features/i386/i386-linux.xml: Exchange the order of including
9908 32bit-linux.xml and 32bit-sse.xml.
9909 * features/i386/i386-linux.c: Regenerated.
9910
72ddacb7
YQ
99112017-06-20 Yao Qi <yao.qi@linaro.org>
9912
9913 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9914 Delete copy ctor and assignment operator.
9915 (tdesc_type): Likewise.
9916 (tdesc_feature): Likewise.
9917 (tdesc_free_reg): Remove.
9918 (tdesc_create_reg): Use new.
9919 (tdesc_free_type): Remove.
9920 (tdesc_create_vector): Use new.
9921 (tdesc_create_union): Likewise.
9922 (tdesc_create_flags): Likewise.
9923 (tdesc_create_enum): Likewise.
9924 (tdesc_free_feature): Delete.
9925 (free_target_description): Use delete.
9926
325c9fd4
JB
99272017-06-19 John Baldwin <jhb@FreeBSD.org>
9928
9929 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9930 registers.
9931
16b7a719
PA
99322017-06-19 Pedro Alves <palves@redhat.com>
9933
9934 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9935 after gdb::unlinker.
9936
1c8e01c9
SDJ
99372017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9938
9939 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9940 gdb_environ to access an environment variable.
9941
ffce45d2
TP
99422017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9943
9944 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9945 gdb_byte*.
9946
1d4fbac9
SM
99472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9948
9949 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9950
8465943a
SM
99512017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9952
9953 * configure: Re-generate.
9954 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9955
3e019bdc
SM
99562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9957
9958 * configure: Re-generate.
9959 * warning.m4: Pass -Werror to compiler when checking for
9960 supported warning flags.
9961
cf0dd6f0
SM
99622017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9963
9964 * Makefile.in (COMPILE.pre): Add "-x c++".
9965
6f98355c
YQ
99662017-06-16 Alan Hayward <alan.hayward@arm.com>
9967 Pedro Alves <palves@redhat.com>
9968 Yao Qi <yao.qi@linaro.org>
9969
9970 * defs.h (RequireLongest): New.
9971 (extract_integer): Declare function template.
9972 (extract_signed_integer): Remove the declaration, but define it
9973 static inline.
9974 (extract_unsigned_integer): Likewise.
9975 (store_integer): Declare function template.
9976 (store_signed_integer): Remove the declaration, but define it
9977 static inline.
9978 (store_unsigned_integer): Likewise.
9979 * findvar.c (extract_integer): New function template.
9980 (extract_signed_integer): Remove.
9981 (extract_unsigned_integer): Remove.
9982 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9983 instantiations.
9984 (store_integer): New function template.
9985 (store_signed_integer): Remove.
9986 (store_unsigned_integer): Remove.
9987 (store_integer): Explicit instantiations.
9988 * regcache.c (regcache_raw_read_signed): Update.
9989 (regcache::raw_read): New function.
9990 (regcache::raw_read_signed): Remove.
9991 (regcache::raw_read_unsigned): Remove.
9992 (regcache_raw_read_unsigned): Update.
9993 (regcache_raw_write_unsigned): Update.
9994 (regcache::raw_write_signed): Remove.
9995 (regcache::raw_write): New function.
9996 (regcache_cooked_read_signed): Update.
9997 (regcache::raw_write_unsigned): Remove.
9998 (regcache::cooked_read_signed): Remove.
9999 (regcache_cooked_read_unsigned): Update.
10000 (regcache::cooked_read_unsigned): Remove.
10001 (regcache_cooked_write_signed): Update.
10002 (regcache_cooked_write_unsigned): Update.
10003 * regcache.h (regcache) <raw_read_signed>: Remove.
10004 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10005 <raw_read, raw_write>: New.
10006 <cooked_read_signed, cooked_write_signed>: Remove.
10007 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10008 <cooked_read, cooked_write>: New.
10009 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10010 (sh64_pseudo_register_write): Update.
10011
a87dc45a
AK
100122017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10013
10014 * arc-tdep.c (arc_disassembler_options): New variable.
10015 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10016 of default_print_insn.
10017 (arc_delayed_print_insn): Set info->section when needed,
10018 use default_print_insn to retrieve a disassembler.
10019
45159d6a
SDJ
100202017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10021
10022 PR gdb/21574
10023 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10024 to mention $SHELL and startup-with-shell.
10025
b46c4cf0
MF
100262017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10027
10028 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10029
6394c606
YQ
100302017-06-14 Yao Qi <yao.qi@linaro.org>
10031
10032 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10033 default_print_insn instead of print_insn_aarch64.
10034 * arm-tdep.c (gdb_print_insn_arm): Call
10035 default_print_insn instead of print_insn_big_arm
10036 and print_insn_little_arm.
10037 * i386-tdep.c (i386_print_insn): Call default_print_insn
10038 instead of print_insn_i386.
10039 * ia64-tdep.c (ia64_print_insn): Call
10040 default_print_insn instead of print_insn_ia64.
10041 * mips-tdep.c (gdb_print_insn_mips): Call
10042 default_print_insn instead of print_insn_big_mips
10043 and print_insn_little_mips.
10044 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10045 instead of print_insn_spu.
10046
d5722aa2
PA
100472017-06-14 Pedro Alves <palves@redhat.com>
10048
10049 * ada-lang.c: Include "common/byte-vector.h".
10050 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10051 * charset.c (wchar_iterator::iterate): Resize the vector instead
10052 of reserving it.
10053 * common/byte-vector.h: Include "common/def-vector.h".
10054 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10055 * cli/cli-dump.c: Include "common/byte-vector.h".
10056 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10057 * common/byte-vector.h: New file.
10058 * common/def-vector.h: New file.
10059 * common/default-init-alloc.h: New file.
10060 * dwarf2loc.c: Include "common/byte-vector.h".
10061 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10062 instead of reserving it.
10063 * dwarf2read.c: Include "common/byte-vector.h".
10064 (data_buf::m_vec): Now a gdb::byte_vector.
10065 * gdb_regex.c: Include "common/def-vector.h".
10066 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10067 * mi/mi-main.c: Include "common/byte-vector.h".
10068 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10069 * printcmd.c: Include "common/byte-vector.h".
10070 (print_scalar_formatted): Use gdb::byte_vector.
10071 * valprint.c: Include "common/byte-vector.h".
10072 (maybe_negate_by_bytes, print_decimal_chars): Use
10073 gdb::byte_vector.
10074
01ec7a27
SM
100752017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10076
10077 * darwin-nat.c: Include "nat/fork-inferior.h".
10078
848d9074
SM
100792017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10080
10081 * configure.nat: Factor out Darwin bits that are not
10082 architecture-specific. Add fork-inferior.o.
10083
3b912944
SM
100842017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10085
10086 * configure.nat: Factor out AIX bits that are not
10087 architecture-specific. Add fork-inferior.o.
10088
55acdf22
AA
100892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10090
10091 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10092 (read_pieced_value, write_pieced_value): ...here. Reduce to
10093 wrappers that just call rw_pieced_value.
10094
f65e2044
AA
100952017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10096
10097 * dwarf2loc.c (write_pieced_value): When writing the data for a
10098 memory piece, use write_memory_with_notification instead of
10099 write_memory.
10100
23f945bf
AA
101012017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10102
10103 * valops.c (read_value_memory): Change embedded_offset to
10104 represent a bit offset instead of a byte offset.
10105 * value.h (read_value_memory): Adjust comment.
10106
f236533e
AA
101072017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10108
10109 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10110 dest_offset_bits and source_offset_bits.
10111 (write_pieced_value): Likewise.
10112
65d84b76
AA
101132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10114
10115 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10116 given by DW_OP_bit_piece.
10117 (write_pieced_value): Likewise.
10118
242d31ab
AA
101192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10120
10121 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10122 some other preparations to the places where sufficient information
10123 is available.
10124 (write_pieced_value): Likewise.
10125
03c8af18
AA
101262017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10127
10128 * dwarf2loc.c (bits_to_bytes): New function.
10129 (read_pieced_value): Fix offset calculations for register pieces
10130 on big-endian targets.
10131 (write_pieced_value): Likewise.
10132
840989c1
AA
101332017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10134
10135 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10136 (write_pieced_value): Likewise.
10137
359b19bb
AA
101382017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10139
10140 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10141 transfer the source value's least significant bits, instead of its
10142 lowest-addressed ones. Rename type_len to max_offset.
10143 (read_pieced_value): Mirror above changes to write_pieced_value as
10144 applicable.
10145
07c9ca3b
AA
101462017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10147
10148 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10149 truncate full bytes from dest_offset_bits before using it as an
10150 offset into the buffer.
10151
f1cc9874
AA
101522017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10153
10154 * dwarf2loc.c (write_pieced_value): Include transfer size in
10155 byte-wise check.
10156
cdaac320
AA
101572017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10158
10159 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10160 calculation of this_size.
10161
af547a96
AA
101622017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10163
10164 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10165 when targeting a bit-field.
10166 (write_pieced_value): Likewise.
10167
ddd7882a
AA
101682017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10169
10170 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10171 (allocate_piece_closure): Drop addr_size parameter.
10172 (dwarf2_evaluate_loc_desc_full): Adjust call to
10173 allocate_piece_closure.
10174
e9352324
AA
101752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10176
10177 PR gdb/21226
10178 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10179 the LSB end, independent of endianness.
10180
d5d1163e
AA
101812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10182
10183 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10184 size capping.
10185
032bb6ea
YQ
101862017-06-13 Yao Qi <yao.qi@linaro.org>
10187
10188 * mips-linux-nat.c: Move include features/mips*-linux.c to
10189 mips-linux-tdep.c.
10190 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10191 to mips-linux-tdep.c.
10192 * mips-linux-tdep.c: Include features/mips*-linux.c
10193 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10194 functions.
10195 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10196 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10197 (tdesc_mips64_dsp_linux): Declare.
10198
f12f6bad
TT
101992017-06-12 Tom Tromey <tom@tromey.com>
10200
10201 * valprint.h (val_print_type_code_int): Remove.
10202 * valprint.c (generic_val_print_int): Always call
10203 val_print_scalar_formatted.
10204 (val_print_type_code_int): Remove.
10205 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10206 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10207 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10208 * ada-valprint.c (ada_val_print_num): Use
10209 val_print_scalar_formatted.
10210
d9109c80
TT
102112017-06-12 Tom Tromey <tom@tromey.com>
10212
10213 * printcmd.c (print_scalar_formatted): Unify the two switches.
10214 Don't convert scalars to LONGEST.
10215
4ac0cb1c
TT
102162017-06-12 Tom Tromey <tom@tromey.com>
10217
10218 PR exp/16225:
10219 * valprint.h (print_decimal_chars): Update.
10220 * valprint.c (maybe_negate_by_bytes): New function.
10221 (print_decimal_chars): Add "is_signed" argument.
10222 * printcmd.c (print_scalar_formatted): Update.
10223
30a25466
TT
102242017-06-12 Tom Tromey <tom@tromey.com>
10225
10226 PR exp/16225:
10227 * valprint.h (print_binary_chars, print_hex_chars): Update.
10228 * valprint.c (val_print_type_code_int): Update.
10229 (print_binary_chars): Add "zero_pad" argument.
10230 (emit_octal_digit): New function.
10231 (print_octal_chars): Don't zero-pad.
10232 (print_decimal_chars): Likewise.
10233 (print_hex_chars): Add "zero_pad" argument.
10234 * sh64-tdep.c (sh64_do_fp_register): Update.
10235 * regcache.c (regcache::dump): Update.
10236 * printcmd.c (print_scalar_formatted): Update.
10237 * infcmd.c (default_print_one_register_info): Update.
10238
b3464d03
PA
102392017-06-12 Pedro Alves <palves@redhat.com>
10240 Alan Hayward <alan.hayward@arm.com>
10241
10242 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10243 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10244 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10245 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10246 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10247
4b76cda9
PA
102482017-06-12 Pedro Alves <palves@redhat.com>
10249
10250 * dwarf2read.c (mapped_symtab::data): Now a vector of
10251 symtab_index_entry instead of vector of
10252 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10253 whether an element's name is NULL instead of checking whether the
10254 element itself is NULL.
10255 (find_slot): Change return type. Adjust.
10256 (hash_expand, , add_index_entry, uniquify_cu_indices)
10257 (write_hash_table): Adjust.
10258
e8f8bcb3
PA
102592017-06-12 Pedro Alves <palves@redhat.com>
10260
10261 * dwarf2read.c (recursively_count_psymbols): New function.
10262 (write_psymtabs_to_index): Call it to compute number of psyms and
10263 pass estimate size of psyms_seen to unordered_set's ctor.
10264
70a1152b
PA
102652017-06-12 Pedro Alves <palves@redhat.com>
10266
10267 * dwarf2read.c (write_hash_table): Check if key already exists
10268 before emplacing.
10269
c2f134ac
PA
102702017-06-12 Pedro Alves <palves@redhat.com>
10271
10272 * dwarf2read.c (data_buf::append_space): Rename to...
10273 (data_buf::grow): ... this, and make private. Adjust all callers.
10274 (data_buf::append_uint): New method.
10275 (add_address_entry, write_one_signatured_type)
10276 (write_psymtabs_to_index): Use it.
10277
a81e6d4d
PA
102782017-06-12 Pedro Alves <palves@redhat.com>
10279
10280 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10281 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10282 (data_buf::file_write): Call ::fwrite directly.
10283
6fd931f2
PA
102842017-06-12 Pedro Alves <palves@redhat.com>
10285
10286 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10287 std::vector::erase.
10288
bc8f2430
JK
102892017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10290
10291 Code cleanup: C++ify .gdb_index producer.
10292 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10293 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10294 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10295 (create_strtab, add_string): Remove.
10296 (file_write, data_buf): New.
10297 (struct symtab_index_entry): Use std::vector for cu_indices.
10298 (struct mapped_symtab): Use std::vector for data.
10299 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10300 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10301 Remove.
10302 (find_slot): Change return type. Update it to the new data structures.
10303 (hash_expand, add_index_entry): Update it to the new data structures.
10304 (offset_type_compare): Remove.
10305 (uniquify_cu_indices): Update it to the new data structures.
10306 (c_str_view, c_str_view_hasher, vector_hasher): New.
10307 (add_indices_to_cpool): Remove.
10308 (write_hash_table): Update it to the new data structures.
10309 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10310 (eq_psymtab_cu_index): Remove.
10311 (psym_index_map): New typedef.
10312 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10313 reference and std::unordered_map for cu_index_htab.
10314 (add_address_entry, add_address_entry_worker, write_address_map)
10315 (write_psymbols): Update it to the new data structures.
10316 (write_obstack): Remove.
10317 (struct signatured_type_index_data): Change types_list to a data_buf
10318 reference and psyms_seen to a std::unordered_set reference.
10319 (write_one_signatured_type, recursively_write_psymbols)
10320 (write_psymtabs_to_index): Update it to the new data structures.
10321
c4dcb155
SM
103222017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10323
10324 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10325 separate-debug-file commands.
10326 * symfile.h (separate_debug_file_debug): New global.
10327 * symfile.c (separate_debug_file_debug): New global.
10328 (separate_debug_file_exists, find_separate_debug_file): Add
10329 debug output.
10330 (_initialize_symfile): Add "set debug separate-debug-file"
10331 command.
10332 * build-id.c (build_id_to_debug_bfd,
10333 find_separate_debug_file_by_buildid): Add debug output.
10334
6d45d4b4
SM
103352017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10336
10337 * gdbarch.sh (displaced_step_free_closure): Remove.
10338 * gdbarch.h, gdbarch.c: Re-generate.
10339 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10340 displaced_step_free_closure.
10341 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10342 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10343 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10344 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10345 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10346 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10347 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10348 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10349 * infrun.c (displaced_step_clear): Call xfree instead of
10350 gdbarch_displaced_step_free_closure.
10351
2f91880f
SDJ
103522017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10353
10354 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10355 NULL".
10356
b8b6e72f
AH
103572017-06-08 Alan Hayward <alan.hayward@arm.com>
10358
10359 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10360 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10361 (mn10300_push_dummy_call): Likewise.
10362
5369082e
AH
103632017-06-08 Alan Hayward <alan.hayward@arm.com>
10364
10365 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10366
ff4ca5ac
AH
103672017-06-08 Alan Hayward <alan.hayward@arm.com>
10368
10369 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10370
aefd8b33
SDJ
103712017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10372
10373 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10374 able to start inferiors using a shell.
10375 (New remote packets): Announce new packet "QStartupWithShell".
10376 * remote.c: Add PACKET_QStartupWithShell.
10377 (extended_remote_create_inferior): Handle new
10378 PACKET_QStartupWithShell.
10379 (remote_protocol_features) <QStartupWithShell>: New entry for
10380 PACKET_QStartupWithShell.
10381 (_initialize_remote): Call "add_packet_config_cmd" for
10382 QStartupShell.
10383
2090129c
SDJ
103842017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10385 Pedro Alves <palves@redhat.com>
10386
10387 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10388 and "nat/fork-inferior.h".
10389 * common/common-inferior.h: New file, with contents from
10390 "gdb/inferior.h".
10391 * commom/common-utils.c: Include "common-utils.h".
10392 (stringify_argv): New function.
10393 * common/common-utils.h (stringify_argv): New prototype.
10394 * configure.nat: Add "fork-inferior.o" as a dependency for
10395 "*linux*", "fbsd*" and "nbsd*" hosts.
10396 * corefile.c (get_exec_file): Update comment.
10397 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10398 instead of "startup_inferior".
10399 (darwin_create_inferior): Call "add_thread_silent" after
10400 "fork_inferior".
10401 * fork-child.c: Cleanup unnecessary includes.
10402 (SHELL_FILE): Move to "common/common-fork-child.c".
10403 (environ): Likewise.
10404 (exec_wrapper): Initialize.
10405 (get_exec_wrapper): New function.
10406 (breakup_args): Move to "common/common-fork-child.c"; rename to
10407 "breakup_args_for_exec".
10408 (escape_bang_in_quoted_argument): Move to
10409 "common/common-fork-child.c".
10410 (saved_ui): New variable.
10411 (prefork_hook): New function.
10412 (postfork_hook): Likewise.
10413 (postfork_child_hook): Likewise.
10414 (gdb_startup_inferior): Likewise.
10415 (fork_inferior): Move to "common/common-fork-child.c". Update
10416 function to support gdbserver.
10417 (startup_inferior): Likewise.
10418 * gdbcore.h (get_exec_file): Remove declaration.
10419 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10420 instead of "startup_inferior". Call "add_thread_silent" after
10421 "fork_inferior".
10422 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10423 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10424 instead of "startup_inferior". Call "add_thread_silent" after
10425 "fork_inferior".
10426 * inferior.h: Include "common-inferior.h".
10427 (trace_start_error): Move to "common/common-utils.h".
10428 (trace_start_error_with_name): Likewise.
10429 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10430 (startup_inferior): Likewise.
10431 (gdb_startup_inferior): New prototype.
10432 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10433 * nat/fork-inferior.h: New file.
10434 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10435 instead of "startup_inferior". Call "add_thread_silent" after
10436 "fork_inferior".
10437 * target.h (target_terminal_init): Move prototype to
10438 "target/target.h".
10439 (target_terminal_inferior): Likewise.
10440 (target_terminal_ours): Likewise.
10441 * target/target.h (target_terminal_init): New prototype, moved
10442 from "target.h".
10443 (target_terminal_inferior): Likewise.
10444 (target_terminal_ours): Likewise.
10445 * utils.c (gdb_flush_out_err): New function.
10446
043a4934
SDJ
104472017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10448
10449 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10450 * common/common-gdbthread.h: New file, with parts from
10451 "gdb/gdbthread.h".
10452 * gdbthread.h: Include "common-gdbthread.h".
10453 (switch_to_thread): Moved to "common/common-gdbthread.h".
10454
15652511
SDJ
104552017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10456
10457 * Makefile.in (SFILES): Add "common/job-control.c".
10458 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10459 (COMMON_OBS): Add "job-control.o".
10460 * common/job-control.c: New file, with contents from
10461 "gdb/inflow.c".
10462 * common/job-control.h: New file, with contents from "terminal.h".
10463 * fork-child.c: Include "job-control.h".
10464 * inflow.c: Include "job-control.h".
10465 (gdb_setpgid): Move to "common/common-inflow.c".
10466 (_initialize_inflow): Move setting of "job_control" to
10467 "handle_job_control".
10468 * terminal.h (job_control): Moved to "common/common-terminal.h".
10469 (gdb_setpgid): Likewise.
10470 * top.c: Include "job_control.h".
10471 * utils.c: Likewise.
10472 (job_control): Moved to "job-control.c".
10473
2d7cc5c7
PA
104742017-06-07 Pedro Alves <palves@redhat.com>
10475
10476 * Makefile.in (SFILES): Add gdb_regex.c.
10477 (COMMON_OBS): Add gdb_regex.o.
10478 * ada-lang.c (ada_add_standard_exceptions)
10479 (ada_add_exceptions_from_frame, name_matches_regex)
10480 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10481 parameter type to compiled_regex. Adjust.
10482 (ada_exceptions_list): Use compiled_regex.
10483 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10484 std::unique_ptr<compiled_regex>.
10485 (exception_catchpoint::~exception_catchpoint): Remove regfree
10486 call.
10487 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10488 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10489 * breakpoint.c (solib_catchpoint::compiled): Now a
10490 std::unique_ptr<compiled_regex>.
10491 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10492 (check_status_catch_solib): Adjust to use compiled_regex.
10493 (add_solib_catchpoint): Adjust to use compiled_regex.
10494 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10495 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10496 compiled_regex reference. Adjust to use it.
10497 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10498 declaration. Include "gdb_regex.h".
10499 (apropos_cmd): Change regex parameter to compiled_regex reference.
10500 * gdb_regex.c: New file.
10501 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10502 declarations.
10503 (class compiled_regex): New.
10504 * linux-tdep.c: Include "common/gdb_optional.h".
10505 (struct mapping_regexes): New, factored out from
10506 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10507 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10508 gdb::optional and remove cleanups. Adjust to compiled_regex.
10509 * probe.c: Include "common/gdb_optional.h".
10510 (collect_probes): Use compiled_regex and gdb::optional and remove
10511 cleanups.
10512 * skip.c: Include "common/gdb_optional.h".
10513 (skiplist_entry::compiled_function_regexp): Now a
10514 gdb::optional<compiled_regex>.
10515 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10516 (free_skiplist_entry): Remove regfree call.
10517 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10518 compiled_regex and gdb::optional.
10519 * symtab.c: Include "common/gdb_optional.h".
10520 (search_symbols): Use compiled_regex and gdb::optional.
10521 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10522 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10523 to gdb_regex.c.
10524
50d6adef
AH
105252017-06-07 Alan Hayward <alan.hayward@arm.com>
10526
10527 * regcache.c (regcache::save): Avoid buffer use.
10528 (regcache::dump): Likewise.
10529
4a8a33c8
AH
105302017-06-07 Alan Hayward <alan.hayward@arm.com>
10531
10532 * sh-tdep.c (sh_pseudo_register_read): Remove
10533 MAX_REGISTER_SIZE.
10534 (sh_pseudo_register_write): Likewise.
10535 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10536 (sh64_pseudo_register_write): Likewise
10537
d1be909e
AH
105382017-06-07 Alan Hayward <alan.hayward@arm.com>
10539
10540 * aarch64-tdep.c (aarch64_store_return_value): Use
10541 V_REGISTER_SIZE.
10542 (aarch64_pseudo_read_value): Likewise.
10543 (aarch64_pseudo_write): Likewise.
10544
f4a65042
YQ
105452017-06-06 Yao Qi <yao.qi@linaro.org>
10546
10547 * regformats/regdef.h (set_register_cache): Remove the
10548 declaration.
10549
9f7fb0aa
AH
105502017-06-06 Alan Hayward <alan.hayward@arm.com>
10551
10552 * frame.c (frame_unwind_register_signed): Use
10553 frame_unwind_register_value.
10554
e1e01040
PA
105552017-06-06 Pedro Alves <palves@redhat.com>
10556
10557 PR breakpoints/21553
10558 * breakpoint.c (create_breakpoints_sal_default)
10559 (init_breakpoint_sal, create_breakpoint_sal): Use
10560 gdb::unique_xmalloc_ptr for string parameters.
10561 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10562 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10563 (base_breakpoint_create_breakpoints_sal)
10564 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10565 (strace_marker_create_breakpoints_sal)
10566 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10567 string parameters.
10568 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10569 gdb::unique_xmalloc_ptr for string parameters.
10570 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10571 parameters.
10572
fbe654c8
AH
105732017-06-06 Alan Hayward <alan.hayward@arm.com>
10574
10575 * alpha-tdep.c (alpha_register_to_value): Use
10576 get_frame_register_value.
10577 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10578
ae0d01d6
AH
105792017-06-06 Alan Hayward <alan.hayward@arm.com>
10580
10581 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10582 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10583 (ia64_value_to_register): Likewise.
10584 (ia64_extract_return_value): Likewise.
10585 (ia64_store_return_value): Likewise.
10586 (ia64_push_dummy_call): Likewise.
10587
49cf576c
JB
105882017-06-04 Joel Brobecker <brobecker@adacore.com>
10589
10590 GDB 8.0 released.
10591
26b6a6ab
SM
105922017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10593
10594 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10595
22827c51
SM
105962017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10597
10598 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10599 parameter.
10600 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10601
0e05cf3a
SM
106022017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10603
10604 * event-loop.c (poll_timers): Unallocate timer using delete
10605 instead of xfree.
10606
c1fc2657
SM
106072017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10608
10609 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10610 (struct breakpoint) <~breakpoint>: New.
10611 (struct watchpoint): Inherit from breakpoint.
10612 <~watchpoint>: New.
10613 <base>: Remove.
10614 (struct tracepoint): Inherit from breakpoint.
10615 <base>: Remove.
10616 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10617 (struct longjmp_breakpoint): Inherit from breakpoint.
10618 <~longjmp_breakpoint>: New.
10619 <base>: Remove.
10620 (new_breakpoint_from_type): Remove casts.
10621 (watchpoint_in_thread_scope): Remove reference to base field.
10622 (watchpoint_del_at_next_stop): Likewise.
10623 (update_watchpoint): Likewise.
10624 (watchpoint_check): Likewise.
10625 (bpstat_check_watchpoint): Likewise.
10626 (set_longjmp_breakpoint): Likewise.
10627 (struct fork_catchpoint): Inherit from breakpoint.
10628 <base>: Remove.
10629 (struct solib_catchpoint): Inherit from breakpoint.
10630 <~solib_catchpoint>: New.
10631 <base>: Remove.
10632 (dtor_catch_solib): Change to ...
10633 (solib_catchpoint::~solib_catchpoint): ... this.
10634 (breakpoint_hit_catch_solib): Remove reference to base field.
10635 (add_solib_catchpoint): Likewise.
10636 (create_fork_vfork_event_catchpoint): Likewise.
10637 (struct exec_catchpoint): Inherit from breakpoint.
10638 <~exec_catchpoint>: New.
10639 <base>: Remove.
10640 (dtor_catch_exec): Change to ...
10641 (exec_catchpoint::~exec_catchpoint): ... this.
10642 (dtor_watchpoint): Change to ...
10643 (watchpoint::~watchpoint): ... this.
10644 (watch_command_1): Remove reference to base field.
10645 (catch_exec_command_1): Likewise.
10646 (base_breakpoint_dtor): Change to ...
10647 (breakpoint::~breakpoint): ... this.
10648 (base_breakpoint_ops): Remove dtor field value.
10649 (longjmp_bkpt_dtor): Change to ...
10650 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10651 (strace_marker_create_breakpoints_sal): Remove reference to base
10652 field.
10653 (delete_breakpoint): Don't manually call breakpoint destructor.
10654 (create_tracepoint_from_upload): Remove reference to base field.
10655 (trace_pass_set_count): Likewise.
10656 (initialize_breakpoint_ops): Don't initialize
10657 momentary_breakpoint_ops, don't set dtors.
10658 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10659 <~ada_catchpoint>: New.
10660 <base>: Remove.
10661 (create_excep_cond_exprs): Remove reference to base field.
10662 (dtor_exception): Change to ...
10663 (ada_catchpoint::~ada_catchpoint): ... this.
10664 (dtor_catch_exception): Remove.
10665 (dtor_catch_exception_unhandled): Remove.
10666 (dtor_catch_assert): Remove.
10667 (create_ada_exception_catchpoint): Remove reference to base
10668 field.
10669 (initialize_ada_catchpoint_ops): Don't set dtors.
10670 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10671 breakpoint.
10672 <~signal_catchpoint>: New.
10673 <base>: Remove.
10674 (signal_catchpoint_dtor): Change to ...
10675 (signal_catchpoint::~signal_catchpoint): ... this.
10676 (create_signal_catchpoint): Remove reference to base field.
10677 (initialize_signal_catchpoint_ops): Don't set dtor.
10678 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10679 from breakpoint.
10680 <~syscall_catchpoint>: New.
10681 <base>: Remove.
10682 (dtor_catch_syscall): Change to ...
10683 (syscall_catchpoint::~syscall_catchpoint): ... this.
10684 (create_syscall_event_catchpoint): Remove reference to base
10685 field.
10686 (initialize_syscall_catchpoint_ops): Don't set dtor.
10687 * break-catch-throw.c (struct exception_catchpoint): Inherit
10688 from breakpoint.
10689 <~exception_catchpoint>: New.
10690 <base>: Remove.
10691 (dtor_exception_catchpoint): Change to ...
10692 (exception_catchpoint::~exception_catchpoint): ... this.
10693 (handle_gnu_v3_exceptions): Remove reference to base field.
10694 (initialize_throw_catchpoint_ops): Don't set dtor.
10695 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10696 field.
10697 * remote.c (remote_get_tracepoint_status): Likewise.
10698 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10699 * tracefile.c (tracefile_fetch_registers): Likewise.
10700 * tracepoint.c (actions_command): Likewise.
10701 (validate_actionline): Likewise.
10702 (tfind_1): Likewise.
10703 (get_traceframe_location): Likewise.
10704 (find_matching_tracepoint_location): Likewise.
10705 (parse_tracepoint_status): Likewise.
10706 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10707
3b0871f4
SM
107082017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10709
10710 * breakpoint.c (struct longjmp_breakpoint): New struct.
10711 (is_tracepoint_type): Change return type to bool.
10712 (is_longjmp_type): New function.
10713 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10714 (set_raw_breakpoint_without_location): Use
10715 new_breakpoint_from_type.
10716 (set_raw_breakpoint): Likewise.
10717
a5e364af
SM
107182017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10719
10720 * breakpoint.c (new_breakpoint_from_type): New function.
10721 (create_breakpoint_sal): Use new_breakpoint_from_type and
10722 unique_ptr.
10723 (create_breakpoint): Likewise.
10724
ae3b3f34
SM
107252017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10726
10727 * memattr.c (mem_info_command): Rename to ...
10728 (info_mem_command): ... this.
10729 (mem_enable_command): Rename to ...
10730 (enable_mem_command): ... this.
10731 (mem_disable_command): Rename to ...
10732 (disable_mem_command): ... this.
10733 (mem_delete_command): Rename to ...
10734 (delete_mem_command): ... this.
10735 (_initialize_mem): Adjust function names.
10736
13ace077
MM
107372017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10738
10739 * btrace.c (handle_pt_insn_events): New.
10740 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10741 STATUS. Split into this and ...
10742 (handle_pt_insn_event_flags): ... this.
10743
c56ccc05
MM
107442017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10745
10746 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10747 and struct pt_insn.resynced.
10748 * configure: Regenerated.
10749 * config.in: Regenerated.
10750
08c3f6d2
TW
107512017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10752
10753 * btrace.c (ftrace_find_call_by_number): New function.
10754 (ftrace_new_function): Store objects, not pointers.
10755 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10756 ftrace_new_gap, ftrace_update_function,
10757 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10758 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10759 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10760 btrace_ends_with_single_insn, btrace_call_get): Account for
10761 btrace_thread_info::functions now storing objects.
10762 * btrace.h (struct btrace_thread_info): Add constructor.
10763 (struct btrace_thread_info) <functions>: Make std::vector.
10764 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10765 Initialize with default values.
10766 * record-btrace.c (record_btrace_frame_sniffer): Account for
10767 btrace_thread_info::functions now storing objects.
10768
8ffd39f2
TW
107692017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10770
10771 * btrace.c: Remove typedef bfun_s.
10772 (ftrace_new_gap): Directly add gaps to the list of gaps.
10773 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10774 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10775 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10776 instead of gdb VEC.
10777
4aeb0dfc
TW
107782017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10779
10780 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10781 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10782 with btrace_thread_info::next_segment and
10783 btrace_thread_info::prev_segment.
10784 * btrace.h: Remove struct btrace_func_link.
10785 (struct btrace_function): Replace pair of function segment pointers
10786 with pair of indices.
10787 * python/py-record-btrace.c (btpy_call_prev_sibling,
10788 btpy_call_next_sibling): Replace references to
10789 btrace_thread_info::segment with btrace_thread_info::next_segment and
10790 btrace_thread_info::prev_segment.
10791 * record-btrace.c (record_btrace_frame_this_id): Use
10792 btrace_find_call_by_number.
10793
eb8f2b9c
TW
107942017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10795
10796 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10797 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10798 btrace_insn_next, btrace_insn_prev): Remove references to
10799 btrace_thread_info::flow.
10800 * btrace.h (struct btrace_function): Remove FLOW.
10801
42bfe59e
TW
108022017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10803
10804 * btrace.c (ftrace_find_call_by_number): New function.
10805 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10806 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10807 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10808 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10809 index.
10810 * btrace.h (struct btrace_function): Turn UP into an index.
10811 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10812 as an index.
10813 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10814 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10815 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10816
b54b03bd
TW
108172017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10818
10819 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10820 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10821 ftrace_update_function, ftrace_compute_global_level_offset,
10822 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10823 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10824 btrace_insn_end, btrace_is_empty): Remove references to
10825 btrace_thread_info::begin and btrace_thread_info::end.
10826 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10827 (struct btrace_thread_info) <functions>: Adjust comment.
10828 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10829 btrace_thread_info::begin.
10830
8286623c
TW
108312017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10832
10833 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10834 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10835 ftrace_update_function): Remove arguments that implicitly were always
10836 BTINFO->END.
10837 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10838 Don't pass BTINFO->END.
10839
a0f1b963
TW
108402017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10841
10842 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10843 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10844 btrace_find_insn_by_number): Replace function segment pointer with
10845 index.
10846 (btrace_insn_cmp): Simplify.
10847 * btrace.h: (struct btrace_insn_iterator) Rename index to
10848 insn_index. Replace function segment pointer with index into function
10849 segment vector.
10850 * record-btrace.c (record_btrace_call_history): Replace function
10851 segment pointer use with index.
10852 (record_btrace_frame_sniffer): Retrieve function call segment through
10853 vector.
10854 (record_btrace_set_replay): Remove defunc't safety check.
10855
f158f208
TW
108562017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10857
10858 * btrace.c (btrace_ends_with_single_insn): New function.
10859 (btrace_call_get, btrace_call_number, btrace_call_begin,
10860 btrace_call_end, btrace_call_next, btrace_call_prev,
10861 btrace_find_call_by_number): Use index into call segment vector
10862 instead of pointer.
10863 (btrace_call_cmp): Simplify.
10864 * btrace.h (struct btrace_call_iterator): Replace function call segment
10865 pointer with index into vector.
10866 * record-btrace.c (record_btrace_call_history): Use index instead of
10867 pointer.
10868
521103fd
TW
108692017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10870
10871 * btrace.c (btrace_insn_begin, btrace_insn_end,
10872 btrace_find_insn_by_number): Add btinfo to iterator.
10873 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10874
17b89b34
TW
108752017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10876
10877 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10878 and save pointers directly.
10879 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10880 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10881 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10882 changed signature of functions.
10883 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10884 (btrace_fetch): Remove code that adds btrace_function pointers to
10885 vector of btrace_functions.
10886 (btrace_clear): Simplify freeing vector of btrace_functions.
10887
2b51eddc
TW
108882017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10889
10890 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10891 Replace VEC_* with std::vector functions.
10892 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10893 (struct btrace_thread_info)<functions>: Change type to std::vector.
10894
db6be0d5
SM
108952017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10896
10897 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10898 "Removed targets and native configurations" up. Merge duplicate
10899 "New commands" sub-sections. Add "New options" sub-sections.
10900
b057297a
AH
109012017-05-26 Alan Hayward <alan.hayward@arm.com>
10902
10903 * defs.h (copy_integer_to_size): New declaration.
10904 * findvar.c (copy_integer_to_size): New function.
10905 (do_cint_test): New selftest function.
10906 (copy_integer_to_size_test): Likewise.
10907 (_initialize_findvar): Likewise.
10908 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10909 (mips_fbsd_collect_reg): Use raw_collect_integer.
10910 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10911 (mips64_fill_gregset): Use raw_collect_integer
10912 (mips64_fill_fpregset): Use raw_supply_integer.
10913 * regcache.c (regcache::raw_supply_integer): New function.
10914 (regcache::raw_collect_integer): Likewise.
10915 * regcache.h: (regcache::raw_supply_integer): New declaration.
10916 (regcache::raw_collect_integer): Likewise.
10917
b77b02a5
YQ
109182017-05-24 Yao Qi <yao.qi@linaro.org>
10919
10920 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10921 (COMMON_OBS): Add gdbarch-selftests.o.
10922 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10923 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10924 * gdbarch-selftests.c: New file.
10925 * regcache.h (regcache) <~regcache>: Mark it virtual if
10926 GDB_SELF_TEST.
10927 <raw_write>: Likewise.
10928
e521e87e
YQ
109292017-05-24 Yao Qi <yao.qi@linaro.org>
10930
10931 * regcache.c (current_regcache): Change it to
10932 regcache::current_regcache.
10933 (regcache_observer_target_changed): Update.
10934 (regcache_thread_ptid_changed): Make it a regcache static
10935 method.
10936 (regcache_thread_ptid_changed): Update.
10937 (class regcache_access): New.
10938 (current_regcache_test): Update.
10939 (_initialize_regcache): Update.
10940 * regcache.h: Include forward_list.
10941 (regcache): Declare regcache_thread_ptid_changed and declare
10942 registers_changed_ptid as friend.
10943
d8e07dda
YQ
109442017-05-24 Yao Qi <yao.qi@linaro.org>
10945
10946 * i387-tdep.c (i387_register_to_value): Use register_size
10947 instead of TYPE_LENGTH.
10948 * m68k-tdep.c (m68k_register_to_value): Likewise.
10949
8c8f9122
YQ
109502017-05-24 Yao Qi <yao.qi@linaro.org>
10951
10952 * i387-tdep.c (i387_convert_register_p): Return false if type
10953 code isn't TYPE_CODE_FLT.
10954
68fce50f
YQ
109552017-05-24 Yao Qi <yao.qi@linaro.org>
10956
10957 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10958 length is 4.
10959 (alpha_register_to_value): Remove type length check.
10960 (alpha_value_to_register): Likewise.
10961
88954b49
YQ
109622017-05-24 Yao Qi <yao.qi@linaro.org>
10963
10964 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10965 TYPE_CODE_FLT.
10966
e3ec9b69
YQ
109672017-05-24 Yao Qi <yao.qi@linaro.org>
10968
10969 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10970 TYPE_CODE_FLT or not.
10971
cdd238da
YQ
109722017-05-24 Yao Qi <yao.qi@linaro.org>
10973
10974 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10975 * avr-tdep.c (avr_gdbarch_init): Likewise.
10976 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10977 * cris-tdep.c (cris_gdbarch_init): Likewise.
10978 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10979 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10980 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10981 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10982 * mep-tdep.c (mep_gdbarch_init): Likewise.
10983 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10984 * mips-tdep.c (mips_gdbarch_init): Likewise.
10985 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10986 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10987 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10988 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10989 * v850-tdep.c (v850_gdbarch_init): Likewise.
10990
7a3929c4
YQ
109912017-05-24 Yao Qi <yao.qi@linaro.org>
10992
10993 * selftest-arch.c (tests_with_arch): Call registers_changed
10994 and reinit_frame_cache.
10995 * selftest.c (run_self_tests): Likewise.
10996
f4985dba
YQ
109972017-05-24 Yao Qi <yao.qi@linaro.org>
10998
10999 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11000 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11001
ab20fa4a
YQ
110022017-05-24 Yao Qi <yao.qi@linaro.org>
11003
11004 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11005 set_gdbarch_print_insn.
11006
f532ab94
YQ
110072017-05-24 Yao Qi <yao.qi@linaro.org>
11008
11009 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11010 set_gdbarch_print_insn.
11011
39503f82
YQ
110122017-05-24 Yao Qi <yao.qi@linaro.org>
11013
11014 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11015 set_gdbarch_print_insn.
11016 * arc-tdep.c (arc_gdbarch_init): Likewise.
11017 * arch-utils.c: include dis-asm.h.
11018 (default_print_insn): New function.
11019 * arch-utils.h (default_print_insn): Declare.
11020 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11021 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11022 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11023 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11024 * frv-tdep.c (frv_gdbarch_init): Likewise.
11025 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11026 * gdbarch.sh (print_insn): Use default_print_insn.
11027 * gdbarch.c: Regenerated.
11028 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11029 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11030 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11031 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11032 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11033 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11034 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11035 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11036 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11037 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11038 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11039 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11040 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11041 * mt-tdep.c (mt_gdbarch_init): Likewise.
11042 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11043 * nios2-tdep.c (nios2_print_insn): Remove.
11044 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11045 * rx-tdep.c (rx_gdbarch_init): Likewise.
11046 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11047 * score-tdep.c (score_print_insn): Remove.
11048 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11049 * sh-tdep.c (sh_gdbarch_init): Likewise.
11050 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11051 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11052 * tic6x-tdep.c (tic6x_print_insn): Remove.
11053 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11054 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11055 * v850-tdep.c (v850_gdbarch_init): Likewise.
11056 * vax-tdep.c (vax_gdbarch_init): Likewise.
11057 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11058 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11059
f7241d4f
JB
110602017-05-23 John Baldwin <jhb@FreeBSD.org>
11061
11062 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11063 (MIPS_FP0_REGNUM): Remove.
11064 (MIPS_FSR_REGNUM): Remove.
11065 (mips_fbsd_supply_fpregs): Use mips_regnum.
11066 (mips_fbsd_supply_gregs): Likewise.
11067 (mips_fbsd_collect_fpregs): Likewise.
11068 (mips_fbsd_collect_gregs): Likewise.
11069
d489d81d
JB
110702017-05-23 John Baldwin <jhb@FreeBSD.org>
11071
11072 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11073 (getpfpregs_supplies): New function.
11074 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11075 getfpregs_supplies.
11076 (mips_fbsd_store_inferior_registers): Likewise.
11077
e11b3cdc
PA
110782017-05-22 Pedro Alves <palves@redhat.com>
11079
11080 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11081 maintainer.
11082
0f068fb5
AH
110832017-05-22 Alan Hayward <alan.hayward@arm.com>
11084
11085 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11086 (store_register): Likewise.
11087 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11088 (get_decimal_float_return_value): Likewise.
11089 (do_ppc_sysv_return_value): Likewise.
11090 (ppc64_sysv_abi_push_integer): Likewise.
11091 (ppc64_sysv_abi_push_freg): Likewise.
11092 (ppc64_sysv_abi_return_value_base): Likewise.
11093 (ppc64_sysv_abi_return_value): Likewise.
11094 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11095 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11096 * rs6000-nat.c: Likewise.
11097 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11098 (rs6000_value_to_register): Likewise.
11099 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11100
e6cf65f2
TT
111012017-05-21 Tom Tromey <tom@tromey.com>
11102
11103 PR rust/21466:
11104 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11105 arrays as "[T]", not "[T; ]".
11106
43cc5389
TT
111072017-05-19 Tom Tromey <tom@tromey.com>
11108
11109 PR rust/21484:
11110 * rust-lang.c (exp_descriptor_rust): New function.
11111 (rust_language_defn): Use it.
11112 * p-lang.c (pascal_language_defn): Update.
11113 * opencl-lang.c (opencl_language_defn): Update.
11114 * objc-lang.c (objc_language_defn): Update.
11115 * m2-lang.c (m2_language_defn): Update.
11116 * language.h (struct language_defn)
11117 <la_watch_location_expression>: New member.
11118 * language.c (unknown_language_defn, auto_language_defn)
11119 (local_language_defn): Update.
11120 * go-lang.c (go_language_defn): Update.
11121 * f-lang.c (f_language_defn): Update.
11122 * d-lang.c (d_language_defn): Update.
11123 * c-lang.h (c_watch_location_expression): Declare.
11124 * c-lang.c (c_watch_location_expression): New function.
11125 (c_language_defn, cplus_language_defn, asm_language_defn)
11126 (minimal_language_defn): Use it.
11127 * breakpoint.c (watch_command_1): Call
11128 la_watch_location_expression.
11129 * ada-lang.c (ada_language_defn): Update.
11130
7a6e7fcc
RO
111312017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11132
6e7e1744
RO
11133 PR tui/21482
11134 * gdb_curses.h (NOMACROS): Define.
11135 (NCURSES_NOMACROS): Define.
11136
111372017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11138
11139 PR tui/21482
7a6e7fcc
RO
11140 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11141 arg to char *.
11142 * tui/tui-wingeneral.c (box_win): Likewise.
11143 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11144 (tui_show_source_line): Likewise.
11145 (tui_show_exec_info_content): Likewise.
11146
1933fd8e
VM
111472017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11148
11149 * sparc-tdep.c (sparc_structure_return_p)
11150 (sparc_arg_on_registers_p): New functions.
11151 (sparc32_store_arguments): Use them.
11152 * sparc64-tdep.c (sparc64_16_byte_align_p)
11153 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11154 Handle TYPE_CODE_ARRAY.
11155
21873064
YQ
111562017-05-17 Yao Qi <yao.qi@linaro.org>
11157
11158 * cli/cli-decode.c (add_alias_cmd): New function.
11159 * command.h (add_alias_cmd): Declare.
11160 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11161 instead call add_alias_cmd.
11162
2b351b19
PA
111632017-05-17 Pedro Alves <palves@redhat.com>
11164
11165 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11166 (nat_makefile_frag): ... this. All references updated.
11167 * configure.ac: Likewise.
11168 * configure.nat: Likewise. Enhance comments.
11169 * configure: Regenerate.
11170
5f2ad7a3
RO
111712017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11172
11173 * procfs.c (procfs_create_inferior): Change prototype to match
11174 definition.
11175
adf3dde5
EZ
111762017-05-13 Eli Zaretskii <eliz@gnu.org>
11177
11178 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11179 C++ compiler warning.
11180
6830f270
TT
111812017-05-12 Tom Tromey <tom@tromey.com>
11182
11183 PR rust/21483:
11184 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11185 recurse, just call value_struct_elt directly.
11186
68f2f2e3
TT
111872017-05-12 Tom Tromey <tom@tromey.com>
11188
11189 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11190 OP_RUST_ARRAY>: Fix.
11191
256afbc2
TT
111922017-05-12 Tom Tromey <tom@tromey.com>
11193
11194 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11195
94bb8dfe
YQ
111962017-05-09 Yao Qi <yao.qi@linaro.org>
11197
11198 * regcache.c: Include <forward_list>.
11199 (struct regcache_list): Remove.
11200 (current_regcache): Update.
11201 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11202 (regcache_thread_ptid_changed): Likewise.
11203 (registers_changed_ptid): Likewise.
11204 (current_regcache_size): Likewise.
11205
8248946c
YQ
112062017-05-09 Yao Qi <yao.qi@linaro.org>
11207
11208 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11209 (current_regcache_size): New function.
11210 (current_regcache_test): New function.
11211 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11212
313c5961
AH
112132017-05-08 Alan Hayward <alan.hayward@arm.com>
11214
11215 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11216 (print_gp_register_row): Use get_frame_register_value.
11217
27bfc1d1
AH
112182017-05-08 Alan Hayward <alan.hayward@arm.com>
11219
11220 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11221 (mips_supply_fpregset): Likewise.
11222 (mips64_supply_gregset): Likewise.
11223
146e6c5c
AH
112242017-05-08 Alan Hayward <alan.hayward@arm.com>
11225
11226 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11227 regcache->raw_supply_zeroed.
11228
e50f25ec
SDJ
112292017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11230
11231 * configure.nat: Rearrange 'case' statements to match
11232 host before cpu.
11233
21ea5acd
SDJ
112342017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11235
11236 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11237 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11238 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11239 "@nat_extra_makefile_frag@".
11240 (Makefile): Remove dependency on "@frags@".
11241 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11242 (data-directory/Makefile): Likewise.
11243 * config/aarch64/linux.mh: Deleted; moved contents to
11244 "gdb/configure.nat".
11245 * config/alpha/alpha-linux.mh: Likewise.
11246 * config/alpha/nbsd.mh: Likewise.
11247 * config/arm/linux.mh: Likewise.
11248 * config/arm/nbsdelf.mh: Likewise.
11249 * config/i386/cygwin.mh: Likewise.
11250 * config/i386/cygwin64.mh: Likewise.
11251 * config/i386/darwin.mh: Likewise.
11252 * config/i386/fbsd.mh: Likewise.
11253 * config/i386/fbsd64.mh: Likewise.
11254 * config/i386/go32.mh: Likewise.
11255 * config/i386/i386gnu.mh: Likewise.
11256 * config/i386/i386sol2.mh: Likewise.
11257 * config/i386/linux.mh: Likewise.
11258 * config/i386/linux64.mh: Likewise.
11259 * config/i386/mingw.mh: Likewise.
11260 * config/i386/mingw64.mh: Likewise.
11261 * config/i386/nbsd64.mh: Likewise.
11262 * config/i386/nbsdelf.mh: Likewise.
11263 * config/i386/nto.mh: Likewise.
11264 * config/i386/obsd.mh: Likewise.
11265 * config/i386/obsd64.mh: Likewise.
11266 * config/i386/sol2-64.mh: Likewise.
11267 * config/ia64/linux.mh: Likewise.
11268 * config/m32r/linux.mh: Likewise.
11269 * config/m68k/linux.mh: Likewise.
11270 * config/m68k/nbsdelf.mh: Likewise.
11271 * config/m68k/obsd.mh: Likewise.
11272 * config/m88k/obsd.mh: Likewise.
11273 * config/mips/fbsd.mh: Likewise.
11274 * config/mips/linux.mh: Likewise.
11275 * config/mips/nbsd.mh: Likewise.
11276 * config/mips/obsd64.mh: Likewise.
11277 * config/pa/linux.mh: Likewise.
11278 * config/pa/nbsd.mh: Likewise.
11279 * config/pa/obsd.mh: Likewise.
11280 * config/powerpc/aix.mh: Likewise.
11281 * config/powerpc/fbsd.mh: Likewise.
11282 * config/powerpc/linux.mh: Likewise.
11283 * config/powerpc/nbsd.mh: Likewise.
11284 * config/powerpc/obsd.mh: Likewise.
11285 * config/powerpc/ppc64-linux.mh: Likewise.
11286 * config/powerpc/spu-linux.mh: Likewise.
11287 * config/s390/linux.mh: Likewise.
11288 * config/sh/nbsd.mh: Likewise.
11289 * config/sparc/fbsd.mh: Likewise.
11290 * config/sparc/linux.mh: Likewise.
11291 * config/sparc/linux64.mh: Likewise.
11292 * config/sparc/nbsd64.mh: Likewise.
11293 * config/sparc/nbsdelf.mh: Likewise.
11294 * config/sparc/obsd64.mh: Likewise.
11295 * config/sparc/sol2.mh: Likewise.
11296 * config/tilegx/linux.mh: Likewise.
11297 * config/vax/nbsdelf.mh: Likewise.
11298 * config/vax/obsd.mh: Likewise.
11299 * config/xtensa/linux.mh: Likewise.
11300 * config/i386/i386gnu.mn: New file, with excerpts from
11301 "config/i386/i386gnu.mh".
11302 * configure: Regenerate.
11303 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11304 *.mh files under "gdb/config".
11305 * configure.nat: New file, with contents from the
11306 "gdb/config/*/*.mh" files.
11307
7ed1acaf
TW
113082017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11309
11310 * btrace.c (btrace_clear): Free insn vector.
11311
e13cb306
PA
113122017-05-05 Pedro Alves <palves@redhat.com>
11313
11314 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11315 * configure: Regenerate.
11316
5ed8105e
PA
113172017-05-04 Pedro Alves <palves@redhat.com>
11318
11319 * Makefile.in (SFILES): Add progspace-and-thread.c.
11320 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11321 (COMMON_OBS): Add progspace-and-thread.o.
11322 * breakpoint.c: Include "progspace-and-thread.h".
11323 (update_inserted_breakpoint_locations)
11324 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11325 Use scoped_restore_current_pspace_and_thread.
11326 (create_std_terminate_master_breakpoint): Use
11327 scoped_restore_current_program_space.
11328 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11329 (print_breakpoint_location): Use
11330 scoped_restore_current_program_space.
11331 (bp_loc_is_permanent): Use
11332 scoped_restore_current_pspace_and_thread.
11333 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11334 (download_tracepoint_locations): Use
11335 scoped_restore_current_pspace_and_thread.
11336 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11337 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11338 (enum step_over_calls_kind): Moved from inferior.h.
11339 (class scoped_restore_current_thread): New class.
11340 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11341 declaration.
11342 (scoped_restore_current_thread): New class.
11343 * infcmd.c: Include "common/gdb_optional.h".
11344 (continue_1, proceed_after_attach): Use
11345 scoped_restore_current_thread.
11346 (notice_new_inferior): Use scoped_restore_current_thread.
11347 * inferior.c: Include "progspace-and-thread.h".
11348 (restore_inferior, save_current_inferior): Delete.
11349 (add_inferior_command, clone_inferior_command): Use
11350 scoped_restore_current_pspace_and_thread.
11351 * inferior.h (scoped_restore_current_inferior): New class.
11352 * infrun.c: Include "progspace-and-thread.h" and
11353 "common/gdb_optional.h".
11354 (follow_fork_inferior): Use
11355 scoped_restore_current_pspace_and_thread.
11356 (scoped_restore_exited_inferior): New class.
11357 (handle_vfork_child_exec_or_exit): Use
11358 scoped_restore_exited_inferior,
11359 scoped_restore_current_pspace_and_thread,
11360 scoped_restore_current_thread and scoped_restore.
11361 (fetch_inferior_event): Use scoped_restore_current_thread.
11362 * linespec.c (decode_line_full, decode_line_1): Use
11363 scoped_restore_current_program_space.
11364 * mi/mi-main.c: Include "progspace-and-thread.h".
11365 (exec_continue): Use scoped_restore_current_thread.
11366 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11367 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11368 * proc-service.c (ps_pglobal_lookup): Use
11369 scoped_restore_current_program_space.
11370 * progspace-and-thread.c: New file.
11371 * progspace-and-thread.h: New file.
11372 * progspace.c (release_program_space, clone_program_space): Use
11373 scoped_restore_current_program_space.
11374 (restore_program_space, save_current_program_space)
11375 (save_current_space_and_thread): Delete.
11376 (switch_to_program_space_and_thread): Moved to
11377 progspace-and-thread.c.
11378 * progspace.h (save_current_program_space)
11379 (save_current_space_and_thread): Delete declarations.
11380 (scoped_restore_current_program_space): New class.
11381 * remote.c (remote_btrace_maybe_reopen): Use
11382 scoped_restore_current_thread.
11383 * symtab.c: Include "progspace-and-thread.h".
11384 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11385 * thread.c (print_thread_info_1): Use
11386 scoped_restore_current_thread.
11387 (struct current_thread_cleanup): Delete.
11388 (do_restore_current_thread_cleanup)
11389 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11390 (scoped_restore_current_thread::~scoped_restore_current_thread):
11391 ... this new dtor.
11392 (make_cleanup_restore_current_thread): Rename/convert to ...
11393 (scoped_restore_current_thread::scoped_restore_current_thread):
11394 ... this new ctor.
11395 (thread_apply_all_command): Use scoped_restore_current_thread.
11396 (thread_apply_command): Use scoped_restore_current_thread.
11397 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11398 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11399
f6223dbb
PA
114002017-05-04 Pedro Alves <palves@redhat.com>
11401
11402 * thread.c (make_cleanup_restore_current_thread): Move
11403 find_thread_ptid call before the is_stopped call. Assert that the
11404 thread is found. Replace is_stopped call by checking the thread's
11405 state directly. Remove unnecessary NULL-thread check.
11406
3c3ae77e
PA
114072017-05-04 Pedro Alves <palves@redhat.com>
11408
11409 * corelow.c (thread_section_name): New class.
11410 (get_core_register_section, get_core_siginfo): Use it.
11411
45eba0ab
AA
114122017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11413
11414 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11415 (get_core_register_section): Remove xfree of NULL pointer.
11416
f81fdd35
AH
114172017-05-03 Alan Hayward <alan.hayward@arm.com>
11418
11419 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11420 * regcache.c (regcache::raw_supply_zeroed): New function.
11421 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11422
35837774
SM
114232017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11424
11425 * gdbarch.sh: Remove commented out definition of
11426 TARGET_CHAR_BIT.
11427 * gdbarch.h: Re-generate.
11428
c94fee56
SDJ
114292017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11430
11431 * configure: Regenerate.
11432
d17f7b36
SM
114332017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11434
11435 * solib-target.c (solib_target_relocate_section_addresses):
11436 Remove num_section_bases, num_bases, segment_bases variables.
11437
b560ebd6
SM
114382017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11439
11440 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11441
f2f46dfc
SM
114422017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11443
11444 * solib-target.c: Include <vector>
11445 (struct lm_info_target) <~lm_info_target>: Remove.
11446 <segment_bases, section_bases>: Change type to
11447 std::vector<CORE_ADDR>.
11448 (library_list_start_segment, library_list_start_section,
11449 library_list_end_library,
11450 solib_target_relocate_section_addresses): Adjust.
11451
a0ff9e1a
SM
114522017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11453
11454 * gdbarch.sh (software_single_step): Change return type to
11455 std::vector<CORE_ADDR>.
11456 * gdbarch.c, gdbarch.h: Re-generate.
11457 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11458 Adjust.
11459 (arm_deal_with_atomic_sequence_raw): Adjust.
11460 (thumb_get_next_pcs_raw): Adjust.
11461 (arm_get_next_pcs_raw): Adjust.
11462 (arm_get_next_pcs): Adjust.
11463 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11464 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11465 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11466 (alpha_software_single_step): Adjust.
11467 * alpha-tdep.h (alpha_software_single_step): Adjust.
11468 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11469 * arm-tdep.c (arm_software_single_step): Adjust.
11470 (arm_breakpoint_kind_from_current_state): Adjust.
11471 * arm-tdep.h (arm_software_single_step): Adjust.
11472 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11473 * cris-tdep.c (cris_software_single_step): Adjust.
11474 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11475 (micromips_deal_with_atomic_sequence): Adjust.
11476 (deal_with_atomic_sequence): Adjust.
11477 (mips_software_single_step): Adjust.
11478 * mips-tdep.h (mips_software_single_step): Adjust.
11479 * moxie-tdep.c (moxie_software_single_step): Adjust.
11480 * nios2-tdep.c (nios2_software_single_step): Adjust.
11481 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11482 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11483 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11484 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11485 * sparc-tdep.c (sparc_software_single_step): Adjust.
11486 * spu-tdep.c (spu_software_single_step): Adjust.
11487 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11488
ea480a30
SM
114892017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11490
11491 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11492 * gdbarch.h: Re-generate.
11493
d050f7d7
TW
114942017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11495
11496 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11497 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11498 * python/py-instruction.c, python/py-instruction.h: New file.
11499 * python/py-record.c: Add py-instruction.h include.
11500 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11501 gdb.RecordInstruction.
11502 * python/python-internal.h: Add gdbpy_initialize_instruction
11503 declaration.
11504 * python/python.c (do_start_initialization): Add
11505 gdbpy_initialize_instruction.
11506
14f819c8
TW
115072017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11508
11509 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11510 Remove.
11511 (btrace_func_from_recpy_func): New function.
11512 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11513 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11514 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11515 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11516 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11517 Also, use new helper functions.
11518 (btpy_list_item): Use new helper functions.
11519 (recpy_bt_function_call_history): Use new type name.
11520 (btpy_call_getset): Remove.
11521 (gdbpy_initialize_btrace): Remove code to initialize
11522 gdb.BtraceFunctionCall.
11523 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11524 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11525 recpy_bt_func_prev, recpy_bt_func_next): New export.
11526 * python/py-record.c (recpy_func_type): New static object.
11527 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11528 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11529 recpy_func_next): New function.
11530 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11531 (recpy_func_getset): New static object.
11532 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11533 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11534
0ed5da75
TW
115352017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11536
11537 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11538 (btpy_object, btpy_insn_type, btpy_new): Remove.
11539 (btpy_list_object): Use gdb.RecordInstruction type instead of
11540 gdb.BtraceInstruction type.
11541 (btrace_insn_from_recpy_insn): New function.
11542 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11543 btpy_new.
11544 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11545 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11546 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11547 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11548 instead of btpy_object.
11549 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11550 btpy_insn_data, btpy_insn_decode): Rename to ...
11551 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11552 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11553 recpy_bt_insn_decode): This. Also, use new helper functions.
11554 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11555 recpy_insn_type.
11556 (btpy_insn_getset): Remove.
11557 (gdbpy_initialize_btrace): Remove code to initialize
11558 gdb.BtraceInstruction. Use recpy_element_object.
11559 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11560 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11561 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11562 * python/py-record.c (recpy_insn_type): New static object.
11563 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11564 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11565 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11566 New function.
11567 (recpy_insn_getset): New static object.
11568 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11569 * python/py-record.h (recpy_element_object): New typedef.
11570 (recpy_insn_type, recpy_insn_new): New export.
11571
913aeadd
TW
115722017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11573
11574 * py-record-btrace.c (btpy_insn_new): Removed.
11575 (btpy_insn_or_gap_new): New function.
11576 (btpy_insn_error): Removed.
11577 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11578 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11579 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11580 btpy_insn_or_gap_new instead of btpy_insn_new.
11581 (btpy_insn_getset): Remove btpy_insn_error.
11582 * py-record.c (recpy_gap_type): New static object.
11583 (recpy_gap_object): New typedef.
11584 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11585 recpy_gap_reason_string): New function.
11586 (recpy_gap_getset): New static object.
11587 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11588 * py-record.h (recpy_gap_new): New export.
11589
a3be24ad
TW
115902017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11591
11592 * python/py-record.c (recpy_ptid): Remove.
11593 (recpy_record_getset): Remove recpy_ptid.
11594
ae20e79a
TW
115952017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11596
11597 * btrace.c (btrace_fetch): Set inferior_ptid.
11598 * python/py-record-btrace.c: Add "py-record.h" include.
11599 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11600 recpy_bt_end, recpy_bt_instruction_history,
11601 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11602 in gdb.Record object instead of current ptid.
11603 * python/py-record.c: Include new "py-record.h" file.
11604 (recpy_record_object): Moved to py-record.h.
11605 * python/py-record.h: New file.
11606
8d0050ea
TW
116072017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11608
11609 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11610 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11611 indentation.
11612
3f380b50
JB
116132017-05-01 Joel Brobecker <brobecker@adacore.com>
11614
11615 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11616 the past maintainers section.
11617
07495424
YQ
116182017-04-28 Yao Qi <yao.qi@linaro.org>
11619
11620 * infcmd.c (get_return_value): Use regcache ctor, and remove
11621 cleanup.
11622
deb1fa3e
YQ
116232017-04-28 Yao Qi <yao.qi@linaro.org>
11624 Pedro Alves <palves@redhat.com>
11625
11626 * regcache.c (regcache::regcache): New tag dispatch ctor.
11627 (do_cooked_read): Moved above.
11628 (regcache_dup): Use the tag dispatch ctor..
11629 * regcache.h (regcache): Declare ctor, delete copy ctor and
11630 assignment operator, remove friend regcache_dup.
11631
b421c83c
YQ
116322017-04-28 Yao Qi <yao.qi@linaro.org>
11633
11634 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11635 call method save instead of regcache_cpy.
11636 * regcache.h (struct regcache): Make regcache_dup a friend.
11637
ef79d9a3
YQ
116382017-04-28 Yao Qi <yao.qi@linaro.org>
11639
11640 * regcache.c (struct regcache): Move to regcache.h
11641 (regcache::arch): New method.
11642 (regcache_get_ptid): Update.
11643 (get_regcache_arch): Call arch method.
11644 (get_regcache_aspace): Call method aspace.
11645 (register_buffer): Change it to method.
11646 (regcache_save): Change it to regcache::save.
11647 (regcache_restore): Likewise.
11648 (regcache_cpy_no_passthrough): Remove the declaration.
11649 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11650 (regcache_cpy_no_passthrough): Change it to method
11651 cpy_no_passthrough.
11652 (regcache_register_status): Change it to method
11653 get_register_status.
11654 (regcache_invalidate): Change it to method invalidate.
11655 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11656 (regcache_raw_update): Change it to method raw_update.
11657 (regcache_raw_read): Likewise.
11658 (regcache_raw_read_signed): Likewise.
11659 (regcache_raw_read_unsigned): Likewise.
11660 (regcache_raw_write_signed): Likewise.
11661 (regcache_raw_write_unsigned): Likewise.
11662 (regcache_cooked_read): Likewise.
11663 (regcache_cooked_read_value): Likewise.
11664 (regcache_cooked_read_signed): Likewise.
11665 (regcache_cooked_read_unsigned): Likewise.
11666 (regcache_cooked_write_signed): Likewise.
11667 (regcache_cooked_write_unsigned): Likewise.
11668 (regcache_raw_set_cached_value): Likewise.
11669 (regcache_raw_write): Likewise.
11670 (regcache_cooked_write): Likewise.
11671 (regcache_xfer_part): Likewise.
11672 (regcache_raw_read_part): Likewise.
11673 (regcache_raw_write_part): Likewise.
11674 (regcache_cooked_read_part): Likewise.
11675 (regcache_cooked_write_part): Likewise.
11676 (regcache_raw_supply): Likewise.
11677 (regcache_raw_collect): Likewise.
11678 (regcache_transfer_regset): Likewise.
11679 (regcache_supply_regset): Likewise.
11680 (regcache_collect_regset): Likewise.
11681 (regcache_debug_print_register): Likewise.
11682 (enum regcache_dump_what): Move it to regcache.h.
11683 (regcache_dump): Change it to method dump.
11684 * regcache.h (enum regcache_dump_what): New.
11685 (class regcache): New.
11686 * target.c (target_fetch_registers): Call method
11687 debug_print_register.
11688 (target_store_registers): Likewise.
11689
f8fdb78e
SM
116902017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11691
11692 * windows-nat.c (struct lm_info_windows): Initialize field.
11693 (windows_make_so): Allocate lm_info_windows with new.
11694 (windows_free_so): Free lm_info_windows with delete.
11695
9ccbfd7b
SM
116962017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11697
11698 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11699 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11700 cleanup.
11701 (darwin_free_so): Free lm_info_darwin with delete.
11702
76e75227
SM
117032017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11704
11705 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11706 <l_addr_p>: Change type to bool.
11707 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11708 (svr4_free_so): Free lm_info_svr4 with delete.
11709 (svr4_copy_library_list): Replace memcpy with call to copy
11710 constructor.
11711 (library_list_start_library, svr4_default_sos): Allocate
11712 lm_info_svr4 with new.
11713
51046d9e
SM
117142017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11715
11716 * solib-target.c (struct lm_info_target): Add destructor,
11717 initialize fields.
11718 <name>: Change type to std::string.
11719 (library_list_start_library): Allocate lm_info_target with new.
11720 (solib_target_free_library_list): Free lm_info_target with
11721 delete.
11722 (solib_target_current_sos): Adapt to std::string.
11723 (solib_target_free_so): Free lm_info_target with delete.
11724
4023ae76
SM
117252017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11726
11727 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11728 fields.
11729 (frv_current_sos): Allocate lm_info_frv with new.
11730 (frv_relocate_main_executable): Free lm_info_frv with delete,
11731 allocate with new.
11732 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11733
af43057b
SM
117342017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11735
11736 * solib-frv.c (struct lm_info_frv): Fix indentation.
11737
b0911207
SM
117382017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11739
11740 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11741 map field.
11742 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11743 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11744 and allocate with new.
11745 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11746
6c401f72
SM
117472017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11748
11749 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11750 <filename, member_name>: Change type to std::string.
11751 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11752 (library_list_start_library): Allocate lm_info_aix with new.
11753 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11754 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11755 with copy constructor.
11756
d0e449a1
SM
117572017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11758
11759 * solist.h (struct lm_info): Remove.
11760 (struct lm_info_base): New class.
11761 (struct so_list) <lm_info>: Change type to lm_info_base *.
11762 * nto-tdep.c (struct lm_info): Remove.
11763 (lm_addr): Adjust.
11764 * solib-aix.c (struct lm_info): Rename to ...
11765 (struct lm_info_aix): ... this. Extend lm_info_base.
11766 (lm_info_p): Rename to ...
11767 (lm_info_aix_p): ... this, and adjust.
11768 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11769 solib_aix_parse_libraries, library_list_start_library,
11770 solib_aix_free_library_list, solib_aix_parse_libraries,
11771 solib_aix_get_library_list,
11772 solib_aix_relocate_section_addresses, solib_aix_free_so,
11773 solib_aix_get_section_offsets,
11774 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11775 Adjust.
11776 (struct solib_aix_inferior_data) <library_list>: Adjust.
11777 * solib-darwin.c (struct lm_info): Rename to ...
11778 (struct lm_info_darwin): ... this. Extend lm_info_base.
11779 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11780 * solib-dsbt.c (struct lm_info): Rename to ...
11781 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11782 (struct dsbt_info) <main_executable_lm_info): Adjust.
11783 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11784 dsbt_relocate_section_addresses): Adjust.
11785 * solib-frv.c (struct lm_info): Rename to ...
11786 (struct lm_info_frv): ... this. Extend lm_info_base.
11787 (main_executable_lm_info): Adjust.
11788 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11789 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11790 find_canonical_descriptor_in_load_object,
11791 frv_fdpic_find_canonical_descriptor): Adjust.
11792 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11793 to lm_info_svr4.
11794 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11795 svr4_clear_so, svr4_copy_library_list,
11796 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11797 svr4_current_sos, svr4_fetch_objfile_link_map,
11798 solist_update_incremental): Adjust.
11799 * solib-svr4.h (struct lm_info_svr4): Move here from
11800 solib-svr4.c.
11801 * solib-target.c (struct lm_info): Rename to ...
11802 (struct lm_info_target): ... this. Extend lm_info_base.
11803 (lm_info_p): Rename to ...
11804 (lm_info_target_p): ... this.
11805 (solib_target_parse_libraries, library_list_start_segment,
11806 library_list_start_section, library_list_start_library,
11807 library_list_end_library, solib_target_free_library_list,
11808 solib_target_current_sos, solib_target_free_so,
11809 solib_target_relocate_section_addresses): Adjust.
11810 * windows-nat.c (struct lm_info): Rename to ...
11811 (struct lm_info_windows): ... this. Extend lm_info_base.
11812 (windows_make_so, handle_load_dll, handle_unload_dll,
11813 windows_xfer_shared_libraries): Adjust.
11814
434a4023
SM
118152017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11816
11817 * solib-darwin.c (struct darwin_so_list): Remove.
11818 (darwin_current_sos): Allocate an so_list object instead of a
11819 darwin_so_list, separately allocate an lm_info object.
11820 (darwin_free_so): Free lm_info.
11821
428544e8
JB
118222017-04-28 John Baldwin <jhb@FreeBSD.org>
11823
11824 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11825 with fprintf_filtered.
11826
4621115f
YQ
118272017-04-28 Yao Qi <yao.qi@linaro.org>
11828
11829 * regcache.c (regcache::regcache): New function.
11830 (regcache::~regcache): New function.
11831 (regcache_xmalloc_1): Remove.
11832 (regcache_xmalloc): Call new regcache.
11833 (regcache_xfree): Call delete regcache.
11834 (get_thread_arch_aspace_regcache): Call new regcache.
11835
339053c2
YQ
118362017-04-28 Yao Qi <yao.qi@linaro.org>
11837
11838 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11839 lwp instead of ptid_get_lwp.
11840
7974a605
YQ
118412017-04-28 Yao Qi <yao.qi@linaro.org>
11842
11843 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11844 lwp_info instead of getting from inferior_ptid.
11845
e15c3eb4
KS
118462017-04-27 Keith Seitz <keiths@redhat.com>
11847
11848 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11849 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11850 (CV_CONVERSION_BADNESS): Define.
11851 (rank_one_type): Remove overly restrictive rvalue reference
11852 rank checks.
11853 Add cv-qualifier checks and subranks for type equality.
11854 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11855 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11856 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11857
72bc1d24
SM
118582017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11859
11860 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11861 count when creating the object.
11862
55bcecda
UW
118632017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11864 Ulrich Weigand <uweigand@de.ibm.com>
11865
11866 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11867 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11868 is used in AIX.
11869 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11870 (process_xcoff_symbol): Likewise.
11871 (scan_xcoff_symtab): Likewise.
11872
5c99fcf8
AH
118732017-04-26 Alan Hayward <alan.hayward@arm.com>
11874
11875 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11876 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11877 (ia64_access_reg): Use get_frame_register_unsigned.
11878 (ia64_access_rse_reg): Likewise.
11879 (ia64_libunwind_frame_prev_register): Likewise.
11880
b41c5a85
JW
118812017-04-26 Jiong Wang <jiong.wang@arm.com>
11882
11883 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11884 * gdbarch.c: Regenerated.
11885 * gdbarch.h: Regenerated.
11886 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11887 visibility external.
11888 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11889 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11890 (enum cfa_how_kind): Move to ...
11891 (struct dwarf2_frame_state_reg_info): Likewise.
11892 (struct dwarf2_frame_state): Likewise.
11893 * dwarf2-frame.h: ... here.
11894 (dwarf2_frame_state_alloc_regs): New declaration.
11895 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11896 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11897
c185f580
AH
118982017-04-26 Alan Hayward <alan.hayward@arm.com>
11899
11900 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11901 regcache_raw_read_unsigned.
11902 (xtensa_pseudo_register_write): Likewise.
11903
19c45594
AH
119042017-04-26 Alan Hayward <alan.hayward@arm.com>
11905
11906 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11907 (nds32_pseudo_register_write): Likewise.
11908
4658f12e
YQ
119092017-04-25 Yao Qi <yao.qi@linaro.org>
11910
11911 * regcache.c (struct regcache) <readonly_p>: Change its type
11912 to bool.
11913 (regcache_xmalloc_1): Update parameter type and callers update.
11914
d581dda8
YQ
119152017-04-25 Yao Qi <yao.qi@linaro.org>
11916
11917 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11918 set_gdbarch_wchar_bit.
11919 * arm-tdep.c (arm_gdbarch_init): Likewise.
11920
debed3db
PA
119212017-04-25 Pedro Alves <palves@redhat.com>
11922
11923 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11924 (BothAreRelocatable, memcopy, memmove): Don't define.
11925 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11926 macros.
11927
b0b92aeb
PA
119282017-04-25 Pedro Alves <palves@redhat.com>
11929
11930 * common/common-defs.h: Include "common/poison.h".
11931 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11932 and adjust.
11933 * common/poison.h: New file.
11934 * common/traits.h: Include <type_traits>.
11935 (Not, Or, Requires): New, moved from common/function-view.h.
11936
16c4d54a
PA
119372017-04-25 Pedro Alves <palves@redhat.com>
11938
11939 * breakpoint.h (struct breakpoint): In-class initialize all
11940 fields. Make boolean fields "bool".
11941 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11942 memset call and initializations no longer necessary.
11943
b5c36682
PA
119442017-04-25 Pedro Alves <palves@redhat.com>
11945
11946 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11947 reference.
11948 (pt_btrace_insn): New function.
11949 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11950
5625a286
PA
119512017-04-25 Pedro Alves <palves@redhat.com>
11952
11953 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11954 "base" field and inherit from "bp_location" instead. Add
11955 non-default ctor.
11956 (allocate_location_exception): Use new non-default ctor.
11957 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11958 (init_bp_location): Convert to ...
11959 (bp_location::bp_location): ... this new ctor, and remove memset
11960 call.
11961 (base_breakpoint_allocate_location): Use the new non-default ctor.
11962 * breakpoint.h (bp_location): Now a class. Declare default and
11963 non-default ctors. In-class initialize all members.
11964 (init_bp_location): Remove declaration.
11965
23bcc18f
PA
119662017-04-25 Pedro Alves <palves@redhat.com>
11967
11968 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11969 assignment operator.
11970
e1ba3053
YQ
119712017-04-24 Yao Qi <yao.qi@linaro.org>
11972
11973 * doublest.c (convert_doublest_to_floatformat): Call
11974 floatformat_totalsize_bytes.
11975
10f489e5
TT
119762017-04-22 Tom Tromey <tom@tromey.com>
11977
11978 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11979 ui_out_emit_list.
11980 * stack.c (print_frame): Use ui_out_emit_list.
11981 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11982 ui_out_emit_list.
11983 * mi/mi-main.c (print_one_inferior)
11984 (mi_cmd_data_list_register_names)
11985 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11986 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11987 ui_out_emit_list.
11988 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11989 (mi_output_solib_attribs): Use ui_out_emit_list,
11990 ui_out_emit_tuple.
11991 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11992 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11993 (mi_cmd_stack_list_args, list_args_or_locals): Use
11994 ui_out_emit_list.
11995 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11996 * breakpoint.c (print_solib_event, output_thread_groups): Use
11997 ui_out_emit_list.
11998
0092b74d
TT
119992017-04-22 Tom Tromey <tom@tromey.com>
12000
12001 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12002 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12003 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12004
a14a62dd
TT
120052017-04-22 Tom Tromey <tom@tromey.com>
12006
12007 * tracepoint.c (tvariables_info_1)
12008 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12009
46b9c129
TT
120102017-04-22 Tom Tromey <tom@tromey.com>
12011
12012 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12013 annotate_arg_emitter.
12014 * breakpoint.c (print_mention_watchpoint)
12015 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12016 * annotate.h (struct annotate_arg_emitter): New.
12017
2e783024
TT
120182017-04-22 Tom Tromey <tom@tromey.com>
12019
12020 * record-btrace.c (record_btrace_insn_history)
12021 (record_btrace_insn_history_range, record_btrace_call_history)
12022 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12023 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12024 ui_out_emit_tuple.
12025 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12026 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12027 * skip.c (skip_info): Use ui_out_emit_tuple.
12028 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12029 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12030 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12031 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12032 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12033 ui_out_emit_tuple.
12034 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12035 (output_register, mi_cmd_data_read_memory)
12036 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12037 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12038 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12039 Use ui_out_emit_tuple.
12040 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12041 ui_out_emit_tuple.
12042 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12043 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12044 * linux-thread-db.c (info_auto_load_libthread_db): Use
12045 ui_out_emit_tuple.
12046 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12047 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12048 * disasm.c (do_mixed_source_and_assembly_deprecated)
12049 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12050 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12051 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12052 * breakpoint.c (print_one_breakpoint_location)
12053 (print_one_breakpoint): Use ui_out_emit_tuple.
12054 * auto-load.c (print_script, info_auto_load_cmd): Use
12055 ui_out_emit_tuple.
12056 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12057
9be21bb4
SM
120582017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12059
12060 * thread.c (print_thread_info_1): Remove dead code.
12061
0d4c07af
JK
120622017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12063
12064 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12065 GDB_SELF_TEST.
12066 * arm-tdep.c (selftests::arm_record_test): Likewise.
12067
4daf993d
YQ
120682017-04-21 Yao Qi <yao.qi@linaro.org>
12069
12070 * regcache.c (regcache_restore): Remove argument 2. Replace
12071 argument 3 with regcache. Get register status from
12072 src->register_status and get register contents from
12073 register_buffer (src, regnum).
12074 (regcache_cpy): Update.
12075
a6c21d4a
PA
120762017-04-19 Pedro Alves <palves@redhat.com>
12077
12078 * gdbthread.h (thread): Add missing closing parenthesis in
12079 comment.
12080
3a3fd0fd
PA
120812017-04-19 Pedro Alves <palves@redhat.com>
12082
12083 * common/refcounted-object.h: New file.
12084 * gdbthread.h: Include "common/refcounted-object.h".
12085 (thread_info): Inherit from refcounted_object and add comments.
12086 (thread_info::incref, thread_info::decref)
12087 (thread_info::m_refcount): Delete.
12088 (thread_info::deletable): Use the refcounted_object::refcount()
12089 method.
12090 * inferior.c (current_inferior_): Add comment.
12091 (set_current_inferior): Increment/decrement refcounts.
12092 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12093 not-deletable instead of comparing with the current inferior.
12094 (initialize_inferiors): Increment the initial inferior's refcount.
12095 * inferior.h (struct inferior): Forward declare.
12096 Include "common/refcounted-object.h".
12097 (current_inferior, set_current_inferior): Move declaration to
12098 before struct inferior's definition, and fix comment.
12099 (inferior): Inherit from refcounted_object. Add comments.
12100 * thread.c (switch_to_thread_no_regs): Reference the thread's
12101 inferior pointer directly instead of doing a ptid lookup.
12102 (switch_to_no_thread): New function.
12103 (switch_to_thread(thread_info *)): New function, factored out
12104 from ...
12105 (switch_to_thread(ptid_t)): ... this.
12106 (restore_current_thread): Delete.
12107 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12108 fields, and add 'inf' field.
12109 (do_restore_current_thread_cleanup): Check whether old->inf is
12110 alive instead of looking up an inferior by ptid. Use
12111 switch_to_thread and switch_to_no_thread.
12112 (restore_current_thread_cleanup_dtor): Use old->inf directly
12113 instead of lookup up an inferior by id. Decref the inferior.
12114 Don't restore 'removable'.
12115 (make_cleanup_restore_current_thread): Same the inferior pointer
12116 in old, instead of the inferior number. Incref the inferior.
12117 Don't save/clear 'removable'.
12118
9bcb1f16
PA
121192017-04-19 Pedro Alves <palves@redhat.com>
12120
12121 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12122 unittests/scoped_restore-selftests.c.
12123 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12124 * common/scoped_restore.h (scoped_restore_base): Make "class".
12125 (scoped_restore_base::release): New public method.
12126 (scoped_restore_base::scoped_restore_base): New protected ctor.
12127 (scoped_restore_base::m_saved_var): New protected field.
12128 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12129 scoped_restore_base base class instead of m_saved_var directly.
12130 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12131 (scoped_restore_tmpl::scoped_restore_tmpl(const
12132 scoped_restore_tmpl<T>&)): Likewise.
12133 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12134 method.
12135 (scoped_restore_tmpl::saved_var): New method.
12136 (scoped_restore_tmpl::m_saved_var): Delete.
12137 * inferior.h (inferior::detaching): Now a bool.
12138 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12139 cleanup.
12140 * unittests/scoped_restore-selftests.c: New file.
12141
26fcd539
PA
121422017-04-19 Pedro Alves <palves@redhat.com>
12143
12144 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12145 Re-sort in alphabetic order.
12146
fdd243b0
PA
121472017-04-18 Pedro Alves <palves@redhat.com>
12148
12149 * xml-support.c (obstack_xml_printf): Delete.
12150 * xml-support.h (obstack_xml_printf): Delete.
12151
4895cde2
PA
121522017-04-18 Pedro Alves <palves@redhat.com>
12153
12154 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12155 vdebug, verror, body_text, start_element, end_element, name,
12156 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12157 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12158 is_xinclude>: Make private and add m_ prefix.
12159 (gdb_xml_parser::body_text): New method, based on ...
12160 (gdb_xml_body_text): ... this. Adjust.
12161 (gdb_xml_parser::vdebug): New method, based on ...
12162 (gdb_xml_debug): ... this. Adjust.
12163 (gdb_xml_parser::verror): New method, based on ...
12164 (gdb_xml_error): ... this. Adjust.
12165 (gdb_xml_parser::start_element): New method, based on ...
12166 (gdb_xml_start_element): ... this. Adjust.
12167 (gdb_xml_start_element_wrapper): Defer to
12168 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12169 (gdb_xml_parser::end_element): New method, based on ...
12170 (gdb_xml_end_element_wrapper): ... this. Adjust.
12171 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12172 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12173 (gdb_xml_parser::use_dtd): New method, based on ...
12174 (gdb_xml_use_dtd): ... this. Adjust.
12175 (gdb_xml_parser::parse): New method, based on ...
12176 (gdb_xml_parse): ... this. Adjust.
12177 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12178 (xinclude_start_include): Adjust to call the parser's name method.
12179 (xml_xinclude_default, xml_xinclude_start_doctype)
12180 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12181 method.
12182 (xml_process_xincludes): Adjust to call parser methods.
12183 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12184 declarations.
12185
bd8a901f
PA
121862017-04-18 Pedro Alves <palves@redhat.com>
12187
12188 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12189 gdb::optional<std::string>.
12190 * xml-support.c: Include <string>.
12191 (scope_level::scope_level(scope_level &&))
12192 (scope_level::~scope_level): Delete.
12193 (scope_level::body): Now a std::string.
12194 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12195 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12196 parameter.
12197 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12198 (xinclude_parsing_data::output): Now a std::string reference.
12199 (xinclude_start_include): Adjust.
12200 (xml_xinclude_default): Adjust.
12201 (xml_process_xincludes): Add 'output' parameter, and return bool.
12202 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12203 and return bool.
12204 * xml-tdesc.c: Include <unordered_map> and <string>.
12205 (tdesc_xml_cache): Delete.
12206 (tdesc_xml_cache_s): Delete.
12207 (xml_cache): Now an std::unordered_map.
12208 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12209 (target_fetch_description_xml): Change return type to
12210 gdb::optional<std::string>, and adjust.
12211 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12212 (target_fetch_description_xml): Change return type to
12213 gdb::optional<std::string>.
12214
d35d1958
PA
122152017-04-18 Pedro Alves <palves@redhat.com>
12216
12217 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12218 unittests/optional-selftests.c.
12219 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12220 * unittests/optional-selftests.c: New file.
12221 * unittests/optional/assignment/1.cc: New file.
12222 * unittests/optional/assignment/2.cc: New file.
12223 * unittests/optional/assignment/3.cc: New file.
12224 * unittests/optional/assignment/4.cc: New file.
12225 * unittests/optional/assignment/5.cc: New file.
12226 * unittests/optional/assignment/6.cc: New file.
12227 * unittests/optional/assignment/7.cc: New file.
12228 * unittests/optional/cons/copy.cc: New file.
12229 * unittests/optional/cons/default.cc: New file.
12230 * unittests/optional/cons/move.cc: New file.
12231 * unittests/optional/cons/value.cc: New file.
12232 * unittests/optional/in_place.cc: New file.
12233 * unittests/optional/observers/1.cc: New file.
12234 * unittests/optional/observers/2.cc: New file.
12235
22796e97
PA
122362017-04-18 Pedro Alves <palves@redhat.com>
12237
12238 * common/gdb_optional.h: Include common/traits.h.
12239 (in_place_t): New type.
12240 (in_place): New constexpr variable.
12241 (optional::optional): Remove member initialization of
12242 m_instantiated.
12243 (optional::optional(in_place_t...)): New constructor.
12244 (optional::~optional): Use reset.
12245 (optional::optional(const optional&)): New.
12246 (optional::optional(const optional&&)): New.
12247 (optional::optional(T &)): New.
12248 (optional::optional(T &&)): New.
12249 (operator::operator=(const optional &)): New.
12250 (operator::operator=(optional &&)): New.
12251 (operator::operator= (const T &))
12252 (operator::operator= (T &&))
12253 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12254 (operator::reset): New.
12255 (operator::m_instantiated):: Add in-class initializer.
12256 * common/traits.h: Include <type_traits>.
12257 (struct And): New types.
12258
a7fc9b61
PA
122592017-04-18 Pedro Alves <palves@redhat.com>
12260
12261 * xml-support.c: Include <vector>.
12262 (scope_level::scope_level(const gdb_xml_element *))
12263 (scope_level::scope_level(scope_level&&)): New.
12264 (scope_level::~scope_level): New.
12265 (scope_level_s): Delete.
12266 (gdb_xml_parser::scopes): Now a std::vector.
12267 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12268 Use std::vector.
12269 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12270 scope cleanup code.
12271 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12272 of the scopes member. Use std::vector::emplace_back.
12273
010151c9
PA
122742017-04-18 Pedro Alves <palves@redhat.com>
12275
12276 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12277 a bool.
12278 (gdb_xml_end_element): Change type of first parameter.
12279 (gdb_xml_cleanup): Rename to ...
12280 (gdb_xml_parser::~gdb_xml_parser): ... this.
12281 (gdb_xml_create_parser_and_cleanup): Delete with ...
12282 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12283 to this new ctor.
12284 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12285 using gdb_xml_create_parser_and_cleanup.
12286 (xinclude_parsing_data): Add ctor/dtor.
12287 (xml_xinclude_cleanup): Delete.
12288 (xml_process_xincludes): Create a local xinclude_parsing_data
12289 instead of heap-allocating one. Create a local gdb_xml_parser
12290 instead of heap-allocating one with
12291 gdb_xml_create_parser_and_cleanup.
12292
d56060f0
JB
122932017-04-18 John Baldwin <jhb@FreeBSD.org>
12294
12295 PR threads/20743
12296 * fbsd-nat.c (resume_one_thread_cb): Remove.
12297 (resume_all_threads_cb): Remove.
12298 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12299 iterate_over_threads.
12300
305d16a9
JB
123012017-04-17 Joel Brobecker <brobecker@adacore.com>
12302
12303 * NEWS: Create a new section for the next release branch.
12304 Rename the section of the current branch, now that it has
12305 been cut.
12306
8bb57231
JB
123072017-04-17 Joel Brobecker <brobecker@adacore.com>
12308
12309 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12310 * version.in: Bump version to 8.0.50.DATE-git.
12311
096c92dd
SDJ
123122017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12313
12314 PR gdb/21385
12315 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12316 independently of the host, and fix build breakage on Cygwin.
12317
0550c955
PA
123182017-04-13 Pedro Alves <palves@redhat.com>
12319
12320 * inferior.c (free_inferior): Convert to ...
12321 (inferior::~inferior): ... this dtor.
12322 (inferior::inferior): New ctor, factored out from ...
12323 (add_inferior_silent): ... here. Allocate the inferior with a new
12324 expression.
12325 (delete_inferior): Call delete instead of free_inferior.
12326 * inferior.h (gdb_environ, continuation): Forward declare.
12327 (inferior): Now a class. Add in-class initialization to all
12328 members. Make boolean fields bool, except 'detaching'.
12329 (inferior::inferior): New explicit ctor.
12330 (inferior::~inferior): New.
12331
e3d60dfc
PA
123322017-04-13 Pedro Alves <palves@redhat.com>
12333
12334 * inferior.c (init_inferior_list): Delete.
12335 * inferior.h (init_inferior_list): Delete.
12336
5fd69d0a
PA
123372017-04-13 Pedro Alves <palves@redhat.com>
12338
12339 PR threads/13217
12340 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12341 (top level): Call it twice, with different thread sets.
12342
c6609450
PA
123432017-04-13 Pedro Alves <palves@redhat.com>
12344
12345 * thread.c: Include <algorithm>.
12346 (thread_array_cleanup): Delete.
12347 (scoped_inc_dec_ref): New class.
12348 (live_threads_count): New function.
12349 (set_thread_refcount): Delete.
12350 (tp_array_compar_ascending): Now a bool.
12351 (tp_array_compar): Convert to a std::sort comparison function.
12352 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12353 and live_threads_count.
12354
2a00d7ce
PA
123552017-04-13 Pedro Alves <palves@redhat.com>
12356
12357 * infrun.c (follow_fork_inferior): Also switch the current
12358 inferior.
12359
441d7c93
PA
123602017-04-13 Pedro Alves <palves@redhat.com>
12361
12362 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12363 before calling create_internal_breakpoint.
12364
808480f6
PA
123652017-04-13 Pedro Alves <palves@redhat.com>
12366
12367 * fork-child.c (execv_argv): New class.
12368 (breakup_args): Refactored as ...
12369 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12370 Copy arguments to storage and replace separators with NULL
12371 terminators in place.
12372 (escape_bang_in_quoted_argument): Adjust to return bool.
12373 (execv_argv::execv_argv): New ctor.
12374 (execv_argv::init_for_shell): New method, factored out from
12375 fork_inferior. Don't strdup strings into the vector.
12376 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12377 Remove free_vector_argv call.
12378
ad3d022a
YQ
123792017-04-13 Yao Qi <yao.qi@linaro.org>
12380
12381 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12382 tdep->rx_psw_type.
12383
e6ddc3bf
YQ
123842017-04-13 Yao Qi <yao.qi@linaro.org>
12385
12386 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12387 * rx-tdep.c (rx_gdbarch_init): Likewise.
12388
bfb8cf90
PA
123892017-04-13 Pedro Alves <palves@redhat.com>
12390
12391 * breakpoint.h (struct breakpoint): Reindent.
12392
f5336ca5
PA
123932017-04-13 Pedro Alves <palves@redhat.com>
12394
12395 * breakpoint.c (bp_location): Rename to ...
12396 (bp_locations): ... this. All references updated.
12397 (bp_location_count): Rename to ...
12398 (bp_locations_count): ... this. All references updated.
12399 (bp_location_placed_address_before_address_max): Rename to ...
12400 (bp_locations_placed_address_before_address_max): ... this. All
12401 references updated.
12402 (bp_location_shadow_len_after_address_max): Rename to ...
12403 (bp_locations_shadow_len_after_address_max): ... this. All
12404 references updated.
12405 (bp_location_compare_addrs): Rename to ...
12406 (bp_locations_compare_addrs): ... this. All references updated.
12407 (bp_location_compare):Rename to ...
12408 (bp_locations_compare): ... this. All references updated.
12409 (bp_location_target_extensions_update): Rename to ...
12410 (bp_locations_target_extensions_update): ... this. All references
12411 updated.
12412
be628ab8
SDJ
124132017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12414
12415 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12416 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12417 'sgtty.h'.
12418 * common/gdb_termios.h: New file, with parts of "terminal.h".
12419 * inflow.c: Include "gdb_termios.h".
12420 * ser-unix.c: Include "gdb_termios.h".
12421 * terminal.h: Move terminal-related defines to
12422 "common/gdb_termios.h".
12423
8e9e35b1
TT
124242017-04-12 Tom Tromey <tom@tromey.com>
12425
12426 * probe.c (parse_probes): Update.
12427 * location.h (delete_event_location): Don't declare.
12428 (event_location_deleter::operator()): Update.
12429 * location.c (event_location_deleter::operator()): Rename from
12430 delete_event_location.
12431 * linespec.h (linespec_result) <location>: Change type to
12432 event_location_up.
12433 * linespec.c (canonicalize_linespec, event_location_to_sals)
12434 (decode_objc): Update.
12435 (linespec_result): Don't call delete_event_location.
12436 * breakpoint.c (create_breakpoints_sal)
12437 (bkpt_probe_create_sals_from_location)
12438 (strace_marker_create_sals_from_location): Update.
12439
16e802b9
TT
124402017-04-12 Tom Tromey <tom@tromey.com>
12441
12442 * linespec.h (struct linespec_result): Add constructor and
12443 destructor.
12444 (init_linespec_result, destroy_linespec_result)
12445 (make_cleanup_destroy_linespec_result): Don't declare.
12446 * linespec.c (init_linespec_result): Remove.
12447 (linespec_result::~linespec_result): Rename from
12448 destroy_linespec_result. Update.
12449 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12450 Remove.
12451 * breakpoint.c (create_breakpoint, break_range_command)
12452 (decode_location_default): Update.
12453 * ax-gdb.c (agent_command_1): Update.
12454
d28cd78a
TT
124552017-04-12 Tom Tromey <tom@tromey.com>
12456
12457 * remote.c (remote_download_tracepoint): Update.
12458 * python/py-breakpoint.c (bppy_get_location): Update.
12459 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12460 (gdbscm_breakpoint_location): Update.
12461 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12462 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12463 Change type to event_location_up.
12464 * breakpoint.c (create_overlay_event_breakpoint)
12465 (create_longjmp_master_breakpoint)
12466 (create_std_terminate_master_breakpoint)
12467 (create_exception_master_breakpoint)
12468 (breakpoint_event_location_empty_p, print_breakpoint_location)
12469 (print_one_breakpoint_location, create_thread_event_breakpoint)
12470 (init_breakpoint_sal, create_breakpoint)
12471 (print_recreate_ranged_breakpoint, break_range_command)
12472 (init_ada_exception_breakpoint, say_where): Update.
12473 (base_breakpoint_dtor): Don't call delete_event_location.
12474 (bkpt_print_recreate, tracepoint_print_recreate)
12475 (dprintf_print_recreate, update_static_tracepoint)
12476 (breakpoint_re_set_default): Update.
12477
711799d5
TT
124782017-04-12 Tom Tromey <tom@tromey.com>
12479
12480 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12481 type of "to_do". Update.
12482 (compute_stack_depth): Use std::vector.
12483
52d214d3
TT
124842017-04-12 Tom Tromey <tom@tromey.com>
12485
12486 * printcmd.c (find_instruction_backward): Use std::vector.
12487
4c404b8b
TT
124882017-04-12 Tom Tromey <tom@tromey.com>
12489
12490 * symfile.c (objfilep): Remove typedef.
12491 (reread_symbols): Use a std::vector.
12492
156d9eab
TT
124932017-04-12 Tom Tromey <tom@tromey.com>
12494
12495 * mi/mi-main.c (exec_direction_forward): Remove.
12496 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12497 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12498 scoped_restore.
12499 * guile/guile.c (guile_repl_command, guile_command)
12500 (gdbscm_execute_gdb_command): Use scoped_restore.
12501 * go-exp.y (go_parse): Use scoped_restore.
12502 * d-exp.y (d_parse): Use scoped_restore.
12503 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12504 * c-exp.y (c_parse): Use scoped_restore.
12505
4d89769a
TT
125062017-04-12 Tom Tromey <tom@tromey.com>
12507
12508 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12509 (mi_parse): Update return type.
12510 (mi_parse_free): Remove.
12511 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12512 (mi_parse::~mi_parse): Rename from mi_parse_free.
12513 (mi_parse_cleanup): Remove.
12514 (mi_parse): Return a unique_ptr. Use new.
12515 * mi/mi-main.c (mi_execute_command): Update.
12516
4b217cc7
TT
125172017-04-12 Tom Tromey <tom@tromey.com>
12518
12519 * location.c (explicit_location_lex_one): Return a
12520 unique_xmalloc_ptr.
12521 (string_to_explicit_location): Update. Remove cleanups.
12522
59d3651b
TT
125232017-04-12 Tom Tromey <tom@tromey.com>
12524
12525 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12526 (compare_value_and_voffset): Change type. Update.
12527 (compute_vtable_size): Change type of "offset_vec".
12528 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12529 (gnuv3_get_typeid): Remove extraneous declaration.
12530
b24b0d6c
TT
125312017-04-12 Tom Tromey <tom@tromey.com>
12532
12533 * charset.h (wchar_iterator): Fix comment.
12534
80a3b8c5
TT
125352017-04-12 Tom Tromey <tom@tromey.com>
12536
12537 * charset.c (iconv_wrapper): New class.
12538 (cleanup_iconv): Remove.
12539 (convert_between_encodings): Use it.
12540
c83dd867
TT
125412017-04-12 Tom Tromey <tom@tromey.com>
12542
12543 * symfile.h (increment_reading_symtab): Update type.
12544 * symfile.c (decrement_reading_symtab): Remove.
12545 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12546 * psymtab.c (psymtab_to_symtab): Update.
12547 * dwarf2read.c (dw2_instantiate_symtab): Update.
12548
0e8621a0
TT
125492017-04-12 Tom Tromey <tom@tromey.com>
12550
12551 * jit.c (struct jit_reader): Declare separately. Add constructor
12552 and destructor. Change type of "handle".
12553 (loaded_jit_reader): Define separately.
12554 (jit_reader_load): Update. New "new".
12555 (jit_reader_unload_command): Use "delete".
12556 * gdb-dlfcn.h (struct dlclose_deleter): New.
12557 (gdb_dlhandle_up): New typedef.
12558 (gdb_dlopen, gdb_dlsym): Update types.
12559 (gdb_dlclose): Remove.
12560 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12561 (gdb_dlsym): Change type of "handle".
12562 (make_cleanup_dlclose): Remove.
12563 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12564 * compile/compile-c-support.c (load_libcc): Update.
12565
67d89901
TT
125662017-04-12 Tom Tromey <tom@tromey.com>
12567
12568 * symtab.h (find_pcs_for_symtab_line): Change return type.
12569 * symtab.c (find_pcs_for_symtab_line): Change return type.
12570 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12571 type of "vec". Update.
12572 (ltpy_get_pcs_for_line): Update.
12573 * linespec.c (decode_digits_ordinary): Update.
12574
93921405
TT
125752017-04-12 Tom Tromey <tom@tromey.com>
12576
12577 * tracepoint.c (actions_command): Update.
12578 * python/python.c (python_command, python_interactive_command):
12579 Update.
12580 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12581 * guile/guile.c (guile_command): Update.
12582 * defs.h (read_command_lines, read_command_lines_1): Return
12583 command_line_up.
12584 (command_lines_deleter): New struct.
12585 (command_line_up): New typedef.
12586 * compile/compile.c (compile_code_command)
12587 (compile_print_command): Update.
12588 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12589 command_line_up.
12590 (make_cleanup_free_command_lines): Remove.
12591 * cli/cli-script.c (get_command_line, read_command_lines_1)
12592 (copy_command_lines): Return command_line_up.
12593 (while_command, if_command, read_command_lines, define_command)
12594 (document_command): Update.
12595 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12596 Remove.
12597 * breakpoint.h (breakpoint_set_commands): Change type of
12598 "commands".
12599 * breakpoint.c (breakpoint_set_commands): Change type of
12600 "commands". Update.
12601 (do_map_commands_command, update_dprintf_command_list)
12602 (create_tracepoint_from_upload): Update.
12603
ffc2605c
TT
126042017-04-12 Tom Tromey <tom@tromey.com>
12605
12606 * tracepoint.c (scope_info): Update.
12607 * spu-tdep.c (spu_catch_start): Update.
12608 * python/python.c (gdbpy_decode_line): Update.
12609 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12610 * python/py-breakpoint.c (bppy_init): Update.
12611 * probe.c (parse_probes): Update.
12612 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12613 * location.h (event_location_deleter): New struct.
12614 (event_location_up): New typedef.
12615 (new_linespec_location, new_address_location, new_probe_location)
12616 (new_explicit_location, copy_event_location)
12617 (string_to_event_location, string_to_event_location_basic)
12618 (string_to_explicit_location): Update return type.
12619 (make_cleanup_delete_event_location): Remove.
12620 * location.c (new_linespec_location, new_address_location)
12621 (new_probe_location, new_explicit_location, copy_event_location):
12622 Return event_location_up.
12623 (delete_event_location_cleanup)
12624 (make_cleanup_delete_event_location): Remove.
12625 (string_to_explicit_location, string_to_event_location_basic)
12626 (string_to_event_location): Return event_location_up.
12627 * linespec.c (canonicalize_linespec, event_location_to_sals)
12628 (decode_line_with_current_source)
12629 (decode_line_with_last_displayed, decode_objc): Update.
12630 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12631 * completer.c (location_completer): Update.
12632 * cli/cli-cmds.c (edit_command, list_command): Update.
12633 * breakpoint.c (create_overlay_event_breakpoint)
12634 (create_longjmp_master_breakpoint)
12635 (create_std_terminate_master_breakpoint)
12636 (create_exception_master_breakpoint)
12637 (create_thread_event_breakpoint): Update.
12638 (init_breakpoint_sal): Update. Remove some dead code.
12639 (create_breakpoint_sal): Change type of "location". Update.
12640 (create_breakpoints_sal, create_breakpoint, break_command_1)
12641 (dprintf_command, break_range_command, until_break_command)
12642 (init_ada_exception_breakpoint)
12643 (strace_marker_create_sals_from_location)
12644 (update_static_tracepoint, trace_command, ftrace_command)
12645 (strace_command, create_tracepoint_from_upload): Update.
12646 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12647 * ax-gdb.c (agent_command_1): Update.
12648
8f10c932
PA
126492017-04-12 Pedro Alves <palves@redhat.com>
12650
12651 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12652 * configure.tgt: Handle i[34567]86-*-go32* and
12653 i[34567]86-*-msdosdjgpp*.
12654 * i386-tdep.c (i386_svr4_reg_to_regnum):
12655 Make extern.
12656 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12657 i386-go32-tdep.c.
12658 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12659 * i386-go32-tdep.c: New file.
12660 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12661 declarations.
12662
0a31ccfb
SM
126632017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12664
12665 * aix-thread.c (pd_status2str): Change return type to const char *.
12666
e9bb3fbb
PA
126672017-04-12 Pedro Alves <palves@redhat.com>
12668
12669 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12670 calls to set_gdbarch_gnu_triplet_regexp.
12671
53375380
PA
126722017-04-12 Pedro Alves <palves@redhat.com>
12673
12674 PR gdb/21323
12675 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12676 New enum value.
12677 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12678 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12679 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12680 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12681 * gdbarch.h, gdbarch.c: Regenerate.
12682 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12683 gdbarch_wchar_bit and gdbarch_wchar_signed.
12684 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12685 * arm-tdep.c (arm_gdbarch_init): Likewise.
12686 * avr-tdep.c (avr_gdbarch_init): Likewise.
12687 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12688 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12689 * i386-tdep.c (i386_go32_init_abi): Likewise.
12690 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12691 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12692 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12693 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12694 * sh-tdep.c (sh_gdbarch_init): Likewise.
12695 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12696 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12697 * windows-tdep.c (windows_init_abi): Likewise.
12698 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12699
53e710ac
PA
127002017-04-12 Pedro Alves <palves@redhat.com>
12701
12702 PR c++/21323
12703 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12704 cplus_primitive_type_char32_t>: New enum values.
12705 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12706 and cplus_primitive_type_char32_t.
12707 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12708 32, use the archtecture's built-in type for char16_t and char32_t,
12709 respectively. Otherwise, fallback to init_integer_type as before,
12710 but make the type unsigned, and issue a complaint.
12711 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12712
ab0538b8
AH
127132017-04-12 Alan Hayward <alan.hayward@arm.com>
12714
5e0e0422 12715 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12716 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12717
5430098f
SDJ
127182017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12719
12720 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12721 'const char *'.
12722
7c5ded6a
SDJ
127232017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12724
12725 * common/common-utils.c (free_vector_argv): New function.
12726 * common/common-utils.h: Include <vector>.
12727 (free_vector_argv): New prototype.
12728 * darwin-nat.c (darwin_create_inferior): Rewrite function
12729 prototype in order to constify "exec_file" and accept a
12730 "std::string" for "allargs".
12731 * fork-child.c: Include <vector>.
12732 (breakup_args): Rewrite function, using C++.
12733 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12734 and accept "std::string" for "allargs". Update the code to
12735 calculate "argv" based on "allargs". Update calls to "exec_fun"
12736 and "execvp".
12737 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12738 order to constify "exec_file" and accept a "std::string" for
12739 "allargs".
12740 * go32-nat.c (go32_create_inferior): Likewise.
12741 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12742 * infcmd.c (run_command_1): Constify "exec_file". Use
12743 "std::string" for inferior arguments.
12744 * inferior.h (fork_inferior): Update prototype.
12745 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12746 prototype in order to constify "exec_file" and accept a
12747 "std::string" for "allargs".
12748 * nto-procfs.c (procfs_create_inferior): Likewise.
12749 * procfs.c (procfs_create_inferior): Likewise.
12750 * remote-sim.c (gdbsim_create_inferior): Likewise.
12751 * remote.c (extended_remote_run): Update code to accept
12752 "std::string" as argument.
12753 (extended_remote_create_inferior): Rewrite function prototype in
12754 order to constify "exec_file" and accept a "std::string" for
12755 "allargs".
12756 * rs6000-nat.c (super_create_inferior): Likewise.
12757 (rs6000_create_inferior): Likewise.
12758 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12759 * windows-nat.c (windows_create_inferior): Likewise.
12760
ae0eee42
PA
127612017-04-11 Pedro Alves <palves@redhat.com>
12762
12763 * thread.c: Fix whitespace throughout.
12764
a6acac06
PR
127652017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12766
12767 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12768
64403bd1
AH
127692017-04-11 Alan Hayward <alan.hayward@arm.com>
12770
12771 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12772
a5bef50f
SDJ
127732017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12774
12775 PR gdb/21364
12776 * osdata.c (info_osdata): Check if 'type' is an empty string
12777 instead of NULL.
12778
9295a5a9
PA
127792017-04-10 Pedro Alves <palves@redhat.com>
12780
12781 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12782 (ptid_to_global_thread_id, in_thread_list)
12783 (do_captured_list_thread_ids, set_resumed, set_running)
12784 (set_executing, set_stop_requested, finish_thread_state)
12785 (validate_registers_access, can_access_registers_ptid)
12786 (print_thread_info_1, switch_to_thread)
12787 (do_restore_current_thread_cleanup)
12788 (make_cleanup_restore_current_thread, thread_command)
12789 (thread_name_command): Use operator== instead of ptid_equal.
12790
996812e3
PA
127912017-04-10 Pedro Alves <palves@redhat.com>
12792
12793 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12794 (current_thread_cleanup_chain): Delete.
12795 (restore_current_thread_cleanup_dtor)
12796 (make_cleanup_restore_current_thread): Remove references to
12797 current_thread_cleanup_chain.
12798
845b344f
AH
127992017-04-10 Alan Hayward <alan.hayward@arm.com>
12800
12801 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12802 REG_UNKNOWN.
12803
803bdfe4
YQ
128042017-04-10 Yao Qi <yao.qi@linaro.org>
12805
12806 PR gdb/19942
12807 * gdbthread.h (thread_info::deletable): New method.
12808 (thread_info::incref): New method.
12809 (thread_info::decref): New method.
12810 (thread_info::refcount): Move it to private.
12811 * infrun.c (save_stop_context): Call inc_refcount.
12812 (release_stop_context_cleanup): Likewise.
12813 * thread.c (set_thread_exited): New function.
12814 (init_thread_list): Delete "tp" only it is deletable, otherwise
12815 call set_thread_exited.
12816 (delete_thread_1): Call set_thread_exited.
12817 (current_thread_cleanup) <inferior_pid>: Remove.
12818 <thread>: New field.
12819 (restore_current_thread_ptid_changed): Removed.
12820 (do_restore_current_thread_cleanup): Adjust.
12821 (restore_current_thread_cleanup_dtor): Don't call
12822 find_thread_ptid.
12823 (set_thread_refcount): Use dec_refcount.
12824 (make_cleanup_restore_current_thread): Adjust.
12825 (thread_apply_all_command): Call inc_refcount.
12826 (_initialize_thread): Don't call
12827 observer_attach_thread_ptid_changed.
12828
8c25b497
YQ
128292017-04-10 Yao Qi <yao.qi@linaro.org>
12830
12831 * thread.c (delete_thread_1): Hoist code on marking thread as
12832 exited.
12833
8473b447
SM
128342017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12835
12836 * windows-nat.c (windows_detach): Initialize ptid with
12837 minus_one_ptid.
12838
6670ec13
SM
128392017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12840
12841 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12842
ba2f91bb
AH
128432017-04-07 Alan Hayward <alan.hayward@arm.com>
12844
12845 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12846 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12847 (bfin_pseudo_register_write): Likewise
12848
436252de
SM
128492017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12850
12851 * common/ptid.h (struct ptid): Change to...
12852 (class ptid_t): ... this.
12853 <ptid_t>: New constructors.
12854 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12855 matches>: New methods.
12856 <make_null, make_minus_one>: New static methods.
12857 <pid>: Rename to...
12858 <m_pid>: ...this.
12859 <lwp>: Rename to...
12860 <m_lwp>: ...this.
12861 <tid>: Rename to...
12862 <m_tid>: ...this.
12863 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12864 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12865 as references, move comment to class ptid_t.
12866 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12867 ptid_t static methods.
12868 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12869 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12870 Take ptid arguments as references, implement using ptid_t methods.
12871 * unittests/ptid-selftests.c: New file.
12872 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12873 unittests/ptid-selftests.c.
12874 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12875
0dedf377
TP
128762017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12877
12878 * python/python.c (python_run_simple_file): Cast mode literal to
12879 non-const char pointer as expected by PyFile_FromString.
12880
4e9868d4
SM
128812017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12882
12883 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12884 minus_one_ptid and null_ptid.
12885
9bf2a700
PA
128862017-04-05 Pedro Alves <palves@redhat.com>
12887
12888 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12889 * configure: Regenerate.
12890
a121b7c1
PA
128912017-04-05 Pedro Alves <palves@redhat.com>
12892
12893 * ada-exp.y (yyerror): Constify.
12894 * ada-lang.c (bound_name, get_selections)
12895 (ada_variant_discrim_type)
12896 (ada_variant_discrim_name, ada_value_struct_elt)
12897 (ada_lookup_struct_elt_type, is_unchecked_variant)
12898 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12899 (catch_ada_exception_command_split)
12900 (catch_ada_assert_command_split, catch_assert_command)
12901 (ada_op_name): Constify.
12902 * ada-lang.h (ada_yyerror, get_selections)
12903 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12904 * arc-tdep.c (arc_print_frame_cache): Constify.
12905 * arm-tdep.c (arm_skip_stub): Constify.
12906 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12907 (gen_aggregate_elt_ref): Constify.
12908 * bcache.c (print_bcache_statistics): Constify.
12909 * bcache.h (print_bcache_statistics): Constify.
12910 * break-catch-throw.c (catch_exception_command_1):
12911 * breakpoint.c (struct ep_type_description::description):
12912 Constify.
12913 (add_solib_catchpoint): Constify.
12914 (catch_fork_command_1): Add cast.
12915 (add_catch_command): Constify.
12916 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12917 Constify.
12918 * bsd-uthread.c (bsd_uthread_state): Constify.
12919 * buildsym.c (patch_subfile_names): Constify.
12920 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12921 Constify.
12922 * c-exp.y (yyerror): Constify.
12923 (token::oper): Constify.
12924 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12925 * c-varobj.c (cplus_describe_child): Constify.
12926 * charset.c (find_charset_names): Add cast.
12927 (find_charset_names): Constify array and add const_cast.
12928 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12929 (edit_command): Constify.
12930 * cli/cli-decode.c (lookup_cmd): Constify.
12931 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12932 Constify.
12933 (struct dump_context): Constify.
12934 (add_dump_command, restore_command): Constify.
12935 * cli/cli-script.c (get_command_line): Constify.
12936 * cli/cli-script.h (get_command_line): Constify.
12937 * cli/cli-utils.c (check_for_argument): Constify.
12938 * cli/cli-utils.h (check_for_argument): Constify.
12939 * coff-pe-read.c (struct read_pe_section_data): Constify.
12940 * command.h (lookup_cmd): Constify.
12941 * common/print-utils.c (decimal2str): Constify.
12942 * completer.c (gdb_print_filename): Constify.
12943 * corefile.c (set_gnutarget): Constify.
12944 * cp-name-parser.y (yyerror): Constify.
12945 * cp-valprint.c (cp_print_class_member): Constify.
12946 * cris-tdep.c (cris_register_name, crisv32_register_name):
12947 Constify.
12948 * d-exp.y (yyerror): Constify.
12949 (struct token::oper): Constify.
12950 * d-lang.h (d_yyerror): Constify.
12951 * dbxread.c (struct header_file_location::name): Constify.
12952 (add_old_header_file, add_new_header_file, last_function_name)
12953 (dbx_next_symbol_text, add_bincl_to_list)
12954 (find_corresponding_bincl_psymtab, set_namestring)
12955 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12956 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12957 * defs.h (command_line_input, print_address_symbolic)
12958 (deprecated_readline_begin_hook): Constify.
12959 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12960 Constify.
12961 * event-top.c (handle_line_of_input): Constify and add cast.
12962 * exceptions.c (catch_errors): Constify.
12963 * exceptions.h (catch_errors): Constify.
12964 * expprint.c (print_subexp_standard, op_string, op_name)
12965 (op_name_standard, dump_raw_expression, dump_raw_expression):
12966 * expression.h (op_name, op_string, dump_raw_expression):
12967 Constify.
12968 * f-exp.y (yyerror): Constify.
12969 (struct token::oper): Constify.
12970 (struct f77_boolean_val::name): Constify.
12971 * f-lang.c (f_word_break_characters): Constify.
12972 * f-lang.h (f_yyerror): Constify.
12973 * fork-child.c (fork_inferior): Add cast.
12974 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12975 (new_variant): Constify.
12976 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12977 * gdbarch.c: Regenerate.
12978 * gdbcore.h (set_gnutarget): Constify.
12979 * go-exp.y (yyerror): Constify.
12980 (token::oper): Constify.
12981 * go-lang.h (go_yyerror): Constify.
12982 * go32-nat.c (go32_sysinfo): Constify.
12983 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12984 * guile/scm-cmd.c (cmdscm_function): Constify.
12985 * guile/scm-param.c (pascm_param_value): Constify.
12986 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12987 (h8300sx_register_name): Constify.
12988 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12989 Constify.
12990 * ia64-tdep.c (ia64_register_names): Constify.
12991 * infcmd.c (construct_inferior_arguments): Constify.
12992 (path_command, attach_post_wait): Constify.
12993 * language.c (show_range_command, show_case_command)
12994 (unk_lang_error): Constify.
12995 * language.h (language_defn::la_error)
12996 (language_defn::la_name_of_this): Constify.
12997 * linespec.c (decode_line_2): Constify.
12998 * linux-thread-db.c (thread_db_err_str): Constify.
12999 * lm32-tdep.c (lm32_register_name): Constify.
13000 * m2-exp.y (yyerror): Constify.
13001 * m2-lang.h (m2_yyerror): Constify.
13002 * m32r-tdep.c (m32r_register_names): Constify and make static.
13003 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13004 * m88k-tdep.c (m88k_register_name): Constify.
13005 * macroexp.c (appendmem): Constify.
13006 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13007 (upgrade_type, parse_external, parse_partial_symbols)
13008 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13009 (new_symbol): Constify.
13010 * memattr.c (mem_info_command): Constify.
13011 * mep-tdep.c (register_name_from_keyword): Constify.
13012 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13013 Constify.
13014 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13015 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13016 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13017 cast.
13018 (mi_execute_async_cli_command): Constify.
13019 * mips-tdep.c (mips_register_name): Constify.
13020 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13021 (am33_register_name, am33_2_register_name)
13022 * moxie-tdep.c (moxie_register_names): Constify.
13023 * nat/linux-osdata.c (osdata_type): Constify fields.
13024 * nto-tdep.c (nto_parse_redirection): Constify.
13025 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13026 (lookup_child_selector): Constify.
13027 (objc_methcall::name): Constify.
13028 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13029 (lookup_struct_typedef): Constify.
13030 * objfiles.c (pc_in_section): Constify.
13031 * objfiles.h (pc_in_section): Constify.
13032 * p-exp.y (struct token::oper): Constify.
13033 (yyerror): Constify.
13034 * p-lang.h (pascal_yyerror): Constify.
13035 * parser-defs.h (op_name_standard): Constify.
13036 (op_print::string): Constify.
13037 (exp_descriptor::op_name): Constify.
13038 * printcmd.c (print_address_symbolic): Constify.
13039 * psymtab.c (print_partial_symbols): Constify.
13040 * python/py-breakpoint.c (stop_func): Constify.
13041 (bppy_get_expression): Constify.
13042 * python/py-cmd.c (cmdpy_completer::name): Constify.
13043 (cmdpy_function): Constify.
13044 * python/py-event.c (evpy_add_attribute)
13045 (gdbpy_initialize_event_generic): Constify.
13046 * python/py-event.h (evpy_add_attribute)
13047 (gdbpy_initialize_event_generic): Constify.
13048 * python/py-evts.c (add_new_registry): Constify.
13049 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13050 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13051 * python/py-inferior.c (get_buffer): Add cast.
13052 * python/py-param.c (parm_constant::name): Constify.
13053 * python/py-unwind.c (fprint_frame_id): Constify.
13054 * python/python.c (gdbpy_parameter_value): Constify.
13055 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13056 * remote.c (memory_packet_config::name): Constify.
13057 (show_packet_config_cmd, remote_write_bytes)
13058 (remote_buffer_add_string):
13059 * reverse.c (exec_reverse_once): Constify.
13060 * rs6000-tdep.c (variant::name, variant::description): Constify.
13061 * rust-exp.y (rustyyerror): Constify.
13062 * rust-lang.c (rust_op_name): Constify.
13063 * rust-lang.h (rustyyerror): Constify.
13064 * serial.h (serial_ops::name): Constify.
13065 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13066 (sh_sh3e_register_name, sh_sh2e_register_name)
13067 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13068 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13069 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13070 (sh_sh4al_dsp_register_name): Constify.
13071 * sh64-tdep.c (sh64_register_name): Constify.
13072 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13073 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13074 * stabsread.c (patch_block_stabs, read_type_number)
13075 (ref_map::stabs, ref_add, process_reference)
13076 (symbol_reference_defined, define_symbol, define_symbol)
13077 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13078 (read_one_struct_field, read_struct_fields, read_baseclasses)
13079 (read_tilde_fields, read_struct_type, read_array_type)
13080 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13081 (read_huge_number, read_range_type, read_args, common_block_start)
13082 (find_name_end): Constify.
13083 * stabsread.h (common_block_start, define_symbol)
13084 (process_one_symbol, symbol_reference_defined, ref_add):
13085 * symfile.c (get_section_index, add_symbol_file_command):
13086 * symfile.h (get_section_index): Constify.
13087 * target-descriptions.c (tdesc_type::name): Constify.
13088 (tdesc_free_type): Add cast.
13089 * target.c (find_default_run_target):
13090 (add_deprecated_target_alias, find_default_run_target)
13091 (target_announce_detach): Constify.
13092 (do_option): Constify.
13093 * target.h (add_deprecated_target_alias): Constify.
13094 * thread.c (print_thread_info_1): Constify.
13095 * top.c (deprecated_readline_begin_hook, command_line_input):
13096 Constify.
13097 (init_main): Add casts.
13098 * top.h (handle_line_of_input): Constify.
13099 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13100 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13101 (tfind_command): Rename to ...
13102 (tfind_command_1): ... this and constify.
13103 (tfind_command): New function.
13104 (tfind_end_command, tfind_start_command): Adjust.
13105 (encode_source_string): Constify.
13106 * tracepoint.h (encode_source_string): Constify.
13107 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13108 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13109 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13110 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13111 * tui/tui-win.c (parse_scrolling_args): Constify.
13112 * tui/tui-windata.c (tui_erase_data_content): Constify.
13113 * tui/tui-windata.h (tui_erase_data_content): Constify.
13114 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13115 * tui/tui.c (tui_enable): Add cast.
13116 * utils.c (defaulted_query): Constify.
13117 (init_page_info): Add cast.
13118 (puts_debug, subset_compare): Constify.
13119 * utils.h (subset_compare): Constify.
13120 * varobj.c (varobj_format_string): Constify.
13121 * varobj.h (varobj_format_string): Constify.
13122 * vax-tdep.c (vax_register_name): Constify.
13123 * windows-nat.c (windows_detach): Constify.
13124 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13125 * xml-support.c (gdb_xml_end_element): Constify.
13126 * xml-tdesc.c (tdesc_start_reg): Constify.
13127 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13128 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13129 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13130
995816ba
PA
131312017-04-05 Pedro Alves <palves@redhat.com>
13132
13133 * proc-api.c (struct trans): Constify.
13134 (procfs_note): Constify.
13135 * proc-events.c (struct trans, syscall_table):
13136 * proc-flags.c (struct trans): Constify.
13137 * proc-utils.h (procfs_note): Constify.
13138 * proc-why.c (struct trans): Constify.
13139 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13140 (procfs_detach): Constify.
13141 * sol-thread.c (struct string_map): Constify.
13142 (td_err_string, td_state_string): Constify.
13143
3e83a920
PA
131442017-04-05 Pedro Alves <palves@redhat.com>
13145
13146 * proc-api.c (procfs_filename): Don't initialize
13147 procfs_filename.
13148 (prepare_to_trace): Assume procfs_filename is non-NULL.
13149 (_initialize_proc_api): Give procfs_filename a default value here.
13150
63160a43
PA
131512017-04-05 Pedro Alves <palves@redhat.com>
13152
13153 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13154 'cond_string' parameter.
13155 (extract_exception_regexp): Constify 'string' parameter.
13156 (catch_exception_command_1): Constify.
13157 * breakpoint.c (init_catchpoint)
13158 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13159 parameter.
13160 (ep_parse_optional_if_clause, catch_fork_command_1)
13161 (catch_exec_command_1): Constify.
13162 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13163 parameter.
13164 (ep_parse_optional_if_clause): Constify.
13165 * cli/cli-utils.c (remove_trailing_whitespace)
13166 (check_for_argument): Constify.
13167 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13168 non-const overload.
13169 (check_for_argument): Likewise.
13170
9b2eba3d
PA
131712017-04-05 Pedro Alves <palves@redhat.com>
13172
13173 * event-top.c (command_line_handler): Add cast to execute_command
13174 call.
13175 * record-btrace.c (cmd_record_btrace_bts_start)
13176 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13177 (cmd_record_btrace_start): Add cast to execute_command call.
13178 * record-full.c (record_full_goto_insn):
13179 * record.c (record_start, record_stop): Add cast to
13180 execute_command_to_string calls.
13181 (cmd_record_start): Add cast to execute_command calls.
13182
2adadf51
PA
131832017-04-05 Pedro Alves <palves@redhat.com>
13184
13185 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13186 static inline function.
13187 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13188 array and use gdb_PyArg_ParseTupleAndKeywords.
13189 * python/py-cmd.c (cmdpy_init): Likewise.
13190 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13191 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13192 (infpy_search_memory): Likewise.
13193 * python/py-objfile.c (objfpy_add_separate_debug_file)
13194 (gdbpy_lookup_objfile): Likewise.
13195 * python/py-symbol.c (gdbpy_lookup_symbol)
13196 (gdbpy_lookup_global_symbol): Likewise.
13197 * python/py-type.c (gdbpy_lookup_type): Likewise.
13198 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13199 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13200 Likewise.
13201
0d1f4ceb
PA
132022017-04-05 Pedro Alves <palves@redhat.com>
13203
13204 * python/python-internal.h (gdb_PyGetSetDef): New type.
13205 * python/py-block.c (block_object_getset)
13206 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13207 * python/py-event.c (event_object_getset)
13208 (finish_breakpoint_object_getset): Likewise.
13209 * python/py-inferior.c (inferior_object_getset): Likewise.
13210 * python/py-infthread.c (thread_object_getset): Likewise.
13211 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13212 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13213 * python/py-objfile.c (objfile_getset): Likewise.
13214 * python/py-progspace.c (pspace_getset): Likewise.
13215 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13216 Likewise.
13217 * python/py-record.c (recpy_record_getset): Likewise.
13218 * python/py-symbol.c (symbol_object_getset): Likewise.
13219 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13220 Likewise.
13221 * python/py-type.c (type_object_getset, field_object_getset):
13222 Likewise.
13223 * python/py-value.c (value_object_getset): Likewise.
13224
4d759979
PA
132252017-04-05 Pedro Alves <palves@redhat.com>
13226
13227 * python/python-internal.h (gdb_PyObject_CallMethod)
13228 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13229 New functions.
13230 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13231 (PySys_GetObject, PySys_SetPath): New macros.
13232
fdf9e36f
PA
132332017-04-05 Pedro Alves <palves@redhat.com>
13234
13235 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13236 info_osdata_command.
13237 * osdata.c (info_osdata_command): Rename to ...
13238 (info_osdata): ... this. Constify 'type' parameter, and remove
13239 the 'from_tty' parameter. Accept NULL TYPE.
13240 (info_osdata_command): New function.
13241 * osdata.h (info_osdata_command): Remove declaration.
13242 (info_osdata): New declaration.
13243
9f33b8b7
PA
132442017-04-05 Pedro Alves <palves@redhat.com>
13245
13246 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13247 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13248 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13249 parameter.
13250 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13251 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13252 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13253 parameter.
13254 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13255 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13256 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13257 (mi_cmd_file_list_exec_source_files)
13258 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13259 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13260 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13261 parameter.
13262 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13263 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13264 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13265 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13266 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13267 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13268 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13269 'command' parameter.
13270 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13271 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13272 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13273 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13274 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13275 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13276 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13277 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13278 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13279 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13280 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13281 parameter.
13282 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13283 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13284 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13285 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13286 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13287 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13288 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13289 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13290 (mi_cmd_data_list_changed_registers)
13291 (mi_cmd_data_write_register_values)
13292 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13293 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13294 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13295 (mi_cmd_list_features, mi_cmd_list_target_features)
13296 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13297 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13298 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13299 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13300 (mi_cmd_trace_frame_collected): Constify 'command'
13301 parameter.
13302 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13303 'command' parameter.
13304
67cb5b2d
PA
133052017-04-05 Pedro Alves <palves@redhat.com>
13306
13307 * ada-lang.c (ada_completer_word_break_characters): Now a const
13308 array.
13309 (ada_get_gdb_completer_word_break_characters): Constify.
13310 * completer.c (gdb_completer_command_word_break_characters)
13311 (gdb_completer_file_name_break_characters)
13312 (gdb_completer_quote_characters): Now const arrays.
13313 (get_gdb_completer_quote_characters): Constify.
13314 (set_rl_completer_word_break_characters): New function.
13315 (set_gdb_completion_word_break_characters)
13316 (complete_line_internal): Use it.
13317 * completer.h (get_gdb_completer_quote_characters): Constify.
13318 (set_rl_completer_word_break_characters): Declare.
13319 * f-lang.c (f_word_break_characters): Constify.
13320 * language.c (default_word_break_characters): Constify.
13321 * language.h (language_defn::la_word_break_characters): Constify.
13322 (default_word_break_characters): Constify.
13323 * top.c (init_main): Use set_rl_completer_word_break_characters.
13324
7a114964
PA
133252017-04-05 Pedro Alves <palves@redhat.com>
13326
13327 * aix-thread.c (aix_thread_pid_to_str)
13328 (aix_thread_extra_thread_info): Constify.
13329 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13330 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13331 (bsd_uthread_pid_to_str): Constify.
13332 * corelow.c (core_pid_to_str): Constify.
13333 * darwin-nat.c (darwin_pid_to_str): Constify.
13334 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13335 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13336 Constify.
13337 * gnu-nat.c (gnu_pid_to_str): Constify.
13338 * go32-nat.c (go32_pid_to_str): Constify.
13339 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13340 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13341 * inferior.c (inferior_pid_to_str): Constify.
13342 * linux-nat.c (linux_nat_pid_to_str): Constify.
13343 * linux-tdep.c (linux_core_pid_to_str): Constify.
13344 * linux-thread-db.c (thread_db_pid_to_str)
13345 (thread_db_extra_thread_info): Constify.
13346 * nto-tdep.c (nto_extra_thread_info): Constify.
13347 * nto-tdep.h (nto_extra_thread_info): Constify.
13348 * obsd-nat.c (obsd_pid_to_str): Constify.
13349 * procfs.c (procfs_pid_to_str): Constify.
13350 * ravenscar-thread.c (ravenscar_extra_thread_info)
13351 (ravenscar_pid_to_str): Constify.
13352 * remote-sim.c (gdbsim_pid_to_str): Constify.
13353 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13354 Constify.
13355 * sol-thread.c (solaris_pid_to_str): Constify.
13356 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13357 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13358 * target.c (default_pid_to_str, target_pid_to_str)
13359 (normal_pid_to_str, default_pid_to_str): Constify.
13360 * target.h (target_ops::to_pid_to_str)
13361 (target_ops::to_extra_thread_info): Constify.
13362 (target_pid_to_str, normal_pid_to_str): Constify.
13363 * windows-nat.c (windows_pid_to_str): Constify.
13364 * gdbarch.sh (core_pid_to_str): Constify.
13365 * target-delegates.c: Regenerate.
13366 * gdbarch.h, gdbarch.c: Regenerate.
13367
69bbf465
PA
133682017-04-05 Pedro Alves <palves@redhat.com>
13369
13370 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13371 the memory of the temporary warning_pre_print override.
13372 * utils.c (warning_pre_print): Constify.
13373 * utils.h (warning_pre_print): Constify.
13374
be47f9e8
PA
133752017-04-05 Pedro Alves <palves@redhat.com>
13376
13377 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13378 (shell_command): New function.
13379 (make_command): Use std::string.
13380 (init_cli_cmds): Register shell_command instead of shell_escape.
13381
bde6261a
PA
133822017-04-05 Pedro Alves <palves@redhat.com>
13383
13384 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13385 * tracepoint.c (default_collect): Don't initialize.
13386
b38ef47f
PA
133872017-04-05 Pedro Alves <palves@redhat.com>
13388
13389 * macroexp.c (macro_buffer::shared): Now a bool.
13390 (init_buffer): Update.
13391 (init_shared_buffer): Constify 'addr' parameter.
13392 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13393 casts.
13394
f995bbe8
PA
133952017-04-05 Pedro Alves <palves@redhat.com>
13396
13397 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13398 * disasm.c (set_disassembler_options): Constify local.
13399 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13400
4a596fe2
SDJ
134012017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13402
13403 PR gdb/21352
13404 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13405 option.
13406
2cad08ea
YQ
134072017-04-05 Yao Qi <yao.qi@linaro.org>
13408
13409 * frame.c (frame_unwind_register_unsigned): Call
13410 frame_unwind_register_value.
13411
55a98976
YQ
134122017-04-05 Yao Qi <yao.qi@linaro.org>
13413
13414 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13415 Use gdb_test_multiple, and don't match anchor.
13416
4ac40124
PA
134172017-04-05 Pedro Alves <palves@redhat.com>
13418
13419 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13420 (Write After Approval): Remove Simon Marchi.
13421
c053b654
PA
134222017-04-05 Pedro Alves <palves@redhat.com>
13423
13424 * common/gdb_optional.h (optional::optional): Make constexpr and
13425 initialize m_dummy.
13426
4c7bf4f9
JB
134272017-04-04 John Baldwin <jhb@FreeBSD.org>
13428
13429 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13430 (amd64fbsd_jmp_buf_reg_offset): Remove.
13431 (amd64fbsd_supply_uthread): Remove function.
13432 (amd64fbsd_collect_uthread): Remove function.
13433 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13434 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13435 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13436 (fbsd-nat.c): Update comment.
13437 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13438 (i386fbsd_jmp_buf_reg_offset): Remove.
13439 (i386fbsd_supply_uthread): Remove function.
13440 (i386fbsd_collect_uthread): Remove function.
13441 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13442
1e1a8bef
JB
134432017-04-04 John Baldwin <jhb@FreeBSD.org>
13444
13445 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13446 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13447 * NEWS: Mention that support for FreeBSD/alpha was removed.
13448 * alpha-fbsd-tdep.c: Delete file.
13449 * config/alpha/fbsd.mh: Delete file.
13450 * configure.host: Delete alpha*-*-freebsd* and
13451 alpha*-*-kfreebsd*-gnu.
13452 * configure.tgt: Delete alpha*-*-freebsd* and
13453 alpha*-*-kfreebsd*-gnu.
13454
49907934
JB
134552017-04-04 John Baldwin <jhb@FreeBSD.org>
13456
13457 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13458 amd64bsd_store_inferior_registers): Use ptid from regcache.
13459
6f77053d
PA
134602017-04-04 Pedro Alves <palves@redhat.com>
13461
13462 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13463 data fields, make them private and add "m_" prefixes.
13464 (lnp_state_machine::lnp_state_machine): New ctor.
13465 (record_line, check_line_address, handle_set_discriminator)
13466 (handle_set_address, handle_advance_pc, handle_special_opcode)
13467 (handle_advance_line, handle_set_file, handle_negate_stmt)
13468 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13469 (end_sequence, advance_line): New methods.
13470 (m_gdbarch, m_record_lines_p): New fields.
13471 (lnp_reader_state): Delete.
13472 (dwarf_record_line): Rename to ...
13473 (lnp_state_machine::record_line): ... adjust.
13474 (init_lnp_state_machine): Delete.
13475 (lnp_state_machine::lnp_state_machine): New.
13476 (check_line_address): Rename to ...
13477 (lnp_state_machine::check_line_address): This.
13478 (dwarf_decode_lines_1): Remove reference to "reader_state".
13479 Adjust lnp_state_machine having a non-default ctor. Use bool.
13480 State machine internal state manipulation moved to
13481 lnp_state_machine methods.
13482
9c541725
PA
134832017-04-04 Pedro Alves <palves@redhat.com>
13484
13485 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13486 unittests/offset-type-selftests.c.
13487 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13488 * common/offset-type.h: New file.
13489 * common/preprocessor.h: New file.
13490 * common/traits.h: New file.
13491 * common/valid-expr.h: New file.
13492 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13493 sect_offset and cu_offset strong typedefs throughout.
13494 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13495 typedefs throughout.
13496 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13497 sect_offset and cu_offset strong typedefs throughout.
13498 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13499 typedefs throughout.
13500 * gdbtypes.h: Include "common/offset-type.h".
13501 (cu_offset): Now an offset type (strong typedef) instead of a
13502 struct.
13503 (sect_offset): Likewise.
13504 (union call_site_parameter_u): Rename "param_offset" field to
13505 "param_cu_off".
13506 * unittests/offset-type-selftests.c: New file.
13507
ecfb656c
PA
135082017-04-04 Pedro Alves <palves@redhat.com>
13509
13510 * common/underlying.h: New file.
13511 * dwarf2read.c: Include "common/gdb_optional.h" and
13512 "common/underlying.h".
13513 (dir_index, file_name_index): New types.
13514 (file_entry): Use them.
13515 (file_entry::include): Use to_underlying.
13516 (line_header::add_file_name): Use dir_index.
13517 (read_formatted_entries): Use gdb::optional. Read form before
13518 writting to file_entry.
13519 (dwarf_decode_line_header): Use dir_index.
13520 (lnp_state_machine::current_file): Use to_underlying.
13521 (lnp_state_machine::file): Change type to file_name_index.
13522 (dwarf_record_line): Use to_underlying.
13523 (init_lnp_state_machine): Use file_name_index.
13524 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13525
d194f1fe
PA
135262017-04-04 Pedro Alves <palves@redhat.com>
13527
13528 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13529 operator bool, has_value and get methods.
13530
fff8551c
PA
135312017-04-04 Pedro Alves <palves@redhat.com>
13532
13533 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13534 fields.
13535 (line_header): Initialize all data fields. Change type of
13536 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13537 Change type of include_dirs to std::vector<const char *>. Remove
13538 num_include_dirs, include_dirs_size. Change type of file_names to
13539 std::vector<file_entry>. Remove num_file_names, file_names_size.
13540 (line_header::line_header): New.
13541 (line_header::add_include_dir, line_header::add_file_name): New
13542 methods.
13543 (line_header::include_dir_at): Remove NULL check.
13544 (line_header::file_name_at): Add const overload.
13545 (line_header_up): New unique_ptr typedef.
13546 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13547 std::vector. Remove free_line_header call.
13548 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13549 free_line_header call.
13550 (free_cu_line_header): Delete.
13551 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13552 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13553 Adjust to use std::vector.
13554 (free_line_header): Delete.
13555 (free_line_header_voidp): Use delete.
13556 (add_include_dir): Replace with ...
13557 (line_header::add_include_dir): ... this method. Use std::vector.
13558 (add_file_name): Replace with ...
13559 (line_header::add_file_name): ... this method. Use std::vector.
13560 (add_include_dir_stub): Delete.
13561 (read_formatted_entries): Remove memset.
13562 (dwarf_decode_line_header): Return a line_header_up instead of a
13563 raw pointer. Remove cleanup handling. Pass lambdas to
13564 read_formatted_entries. Adjust to use line_header methods.
13565 (dwarf_decode_lines_1): Adjust to use line_header methods.
13566 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13567 use std::vector.
13568
d62a8ae2
SM
135692017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13570
13571 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13572 instead of struct ptid.
13573
db3a1dc7
AH
135742017-05-04 Alan Hayward <alan.hayward@arm.com>
13575
13576 * frame.c (get_frame_register_bytes): Unwind using value.
13577 (put_frame_register_bytes): Likewise.
13578
b1b45502
IB
135792017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13580
13581 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13582 aggregate-like.
13583
ec13808e
JK
135842017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13585
13586 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13587
12316564
YQ
135882017-03-29 Yao Qi <yao.qi@linaro.org>
13589
13590 * gdbthread.h (struct thread_info): Declare constructor and
13591 destructor. Add some in-class member initializers.
13592 * thread.c (free_thread): Remove.
13593 (init_thread_list): Call delete instead of free_thread.
13594 (new_thread): Call thread_info constructor.
13595 (thread_info::thread_info): New function.
13596 (thread_info::~thread_info): New function.
13597 (delete_thread_1): Call delete instead of free_thread.
13598 (make_cleanup_restore_current_thread): Move tp and frame to
13599 inner block.
13600
fe5f7374
AK
136012017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13602
13603 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13604 (arc_skip_prologue): Likewise.
13605 (arc_make_frame_cache): Likewise.
13606 (arc_pv_get_operand): New function.
13607 (arc_is_in_prologue): Likewise.
13608 (arc_analyze_prologue): Likewise.
13609 (arc_print_frame_cache): Likewise.
13610 (MAX_PROLOGUE_LENGTH): New constant.
13611
eea78757
AK
136122017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13613
13614 * configure.tgt: Add arc-insn.o.
13615 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13616 (dump_arc_instruction_command): New function.
13617 (arc_fprintf_disasm): Likewise.
13618 (arc_disassemble_info): Likewise.
13619 (arc_insn_get_operand_value): Likewise.
13620 (arc_insn_get_operand_value_signed): Likewise.
13621 (arc_insn_get_memory_base_reg): Likewise.
13622 (arc_insn_get_memory_offset): Likewise.
13623 (arc_insn_get_branch_target): Likewise.
13624 (arc_insn_dump): Likewise.
13625 (arc_insn_get_linear_next_pc): Likewise.
13626 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13627 (arc_disassemble_info): Likewise.
13628 (arc_insn_get_branch_target): Likewise.
13629 (arc_insn_get_linear_next_pc): Likewise.
13630 * NEWS: Mention new "maint print arc arc-instruction".
13631
3be78afd
AK
136322017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13633
13634 * arc-tdep (maintenance_print_arc_list): New variable.
13635 (maintenance_print_arc_command): New function.
13636
296ec4fa
AK
136372017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13638
13639 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13640 Add "limm" and "reserved".
13641 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13642 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13643 * arc-tdep.h (arc_regnum): Likewise.
13644
f74f865e
MF
136452017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13646
13647 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13648 for THREADPTR register.
13649 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13650 register.
13651 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13652 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13653 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13654
0d0bf81a
MF
136552017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13656
13657 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13658 registers above gdbarch_num_regs (gdbarch) as privileged in
13659 call0 ABI.
13660
0ce4291e
MF
136612017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13662
13663 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13664 for a single specified register or for all registers in
13665 a0_base..a0_base + C0_NREGS range.
13666 (supply_gregset_reg): Call regcache_raw_supply for a single
13667 specified register or for all registers in a0_base..a0_base +
13668 C0_NREGS range.
13669
c56054f9
MF
136702017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13671
13672 * arch/xtensa.h (C0_NREGS): Add definition.
13673 * xtensa-tdep.c (C0_NREGS): Remove definition.
13674
a4398628
MF
136752017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13676
13677 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13678 Drop xtensa_default_isa initialization.
13679 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13680
8c43009f
PA
136812017-03-27 Pedro Alves <palves@redhat.com>
13682
13683 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13684 (file_entry::include_dir): New method.
13685 (line_header::include_dir_at, line_header::file_name_at): New
13686 methods.
13687 (setup_type_unit_groups, setup_type_unit_groups)
13688 (psymtab_include_file_name): Simplify using the new methods.
13689 (lnp_state_machine) <the_line_header>: New field.
13690 <file>: Add comment.
13691 (lnp_state_machine::current_file): New method.
13692 (dwarf_record_line): Simplify using the new methods.
13693 (init_lnp_state_machine): Initialize the "the_line_header" field.
13694 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13695 Simplify using the new methods.
13696
a7e80b9e
PA
136972017-03-27 Pedro Alves <palves@redhat.com>
13698
13699 * cp-name-parser.y (make_empty): Delete.
13700 (demangler_special, nested_name, ptr_operator, array_indicator)
13701 (direct_declarator, declarator_1): Use fill_comp instead of
13702 make_empty.
13703
21047726
PA
137042017-03-27 Pedro Alves <palves@redhat.com>
13705
13706 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13707 to ATTRIBUTE_PRINTF.
13708 * solib-target.c (library_list_start_list): Print "string" not
13709 "version".
13710 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13711 gdb_xml_error call.
13712
d721ba37
PA
137132017-03-27 Pedro Alves <palves@redhat.com>
13714
13715 * dwarf2read.c (struct file_and_directory): New.
13716 (dwarf2_get_dwz_file): Adjust to use std::string.
13717 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13718 (find_file_and_directory): Adjust to return a file_and_directory
13719 object.
13720 (read_file_scope): Adjust to use file_and_directory. Remove
13721 make_cleanup/do_cleanups calls.
13722 (open_and_init_dwp_file): Adjust to use std::string. Remove
13723 make_cleanup/do_cleanups calls.
13724 * python/python.c (do_start_initialization): Adjust to ldirname
13725 returning a std::string.
13726 * utils.c (ldirname): Now returns a std::string.
13727 * utils.h (ldirname): Change return type to std::string.
13728 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13729 returning a std::string.
13730 * xml-tdesc.c (file_read_description_xml): Likewise.
13731
ed771251
AH
137322017-03-24 Alan Hayward <alan.hayward@arm.com>
13733
13734 * regcache.c (regcache_debug_print_register): New function.
13735 * regcache.h (regcache_debug_print_register): New declaration.
13736 * target.c (debug_print_register): Remove.
13737 (target_fetch_registers): Call regcache_debug_print_register.
13738 (target_store_registers): Likewise.
13739
568c1b9f
PB
137402017-03-24 Pádraig Brady <pbrady@fb.com>
13741
13742 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13743 reference beyond the 'lh->include_dirs' array before accessing to
13744 it.
13745 (psymtab_include_file_name): Likewise.
13746 (dwarf_decode_lines_1): Likewise.
13747 (dwarf_decode_lines): Likewise.
13748 (file_file_name): Likewise.
13749
3e00d44f
SM
137502017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13751
13752 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13753 inferior_ptid.
13754 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13755 ps_lsetfpregs): Likewise.
13756 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13757 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13758 ps_lsetfpregs): Likewise.
13759 * target.c (target_fetch_registers, target_store_registers):
13760 Remove asserts.
13761
077ae656
AH
137622017-03-23 Alan Hayward <alan.hayward@arm.com>
13763
13764 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13765
1e2b521d
YQ
137662017-03-23 Yao Qi <yao.qi@linaro.org>
13767
13768 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13769 (_initialize_aarch64_tdep): Register it.
13770 (aarch64_record_load_store): Handle PRFM instruction.
13771 (aarch64_process_record_test): New function.
13772
33877125
YQ
137732017-03-23 Yao Qi <yao.qi@linaro.org>
13774
13775 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13776 indentation.
13777
a0eef940
YQ
137782017-03-23 Yao Qi <yao.qi@linaro.org>
13779
13780 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13781
3f2a3564
PR
137822017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13783
13784 python/python.c (do_start_initialization): Fix memory leak.
13785
b67aeab0
SM
137862017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13787
13788 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13789 using get_ptrace_pid.
13790 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13791 inferior_ptid.
13792 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13793 inferior_ptid instead of pid.
13794
ffdbe864
YQ
137952017-03-22 Yao Qi <yao.qi@linaro.org>
13796
13797 * aarch64-tdep.c: Wrap locally used classes in anonymous
13798 namespace.
13799 * arm-tdep.c: Likewise.
13800 * linespec.c: Likewise.
13801 * ui-out.c: Likewise.
13802
9d736fbf
JG
138032017-03-22 Jonah Graham <jonah@kichwacoders.com>
13804
13805 PR gdb/19637
13806 * python/lib/gdb/printer/bound_registers.py: Import sys.
13807
3de88e9a
SM
138082017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13809
13810 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13811 windows_thread_info parameter and use it instead of
13812 current_thread.
13813 (windows_fetch_inferior_registers): Don't set current_thread,
13814 pass the thread to do_windows_fetch_inferior_registers. Use
13815 ptid from regcache instead of inferior_ptid.
13816 (do_windows_store_inferior_registers): Add windows_thread_info
13817 parameter and use it instead of current_thread.
13818 (windows_store_inferior_registers): Don't set current_thread,
13819 pass the thread to do_windows_store_inferior_registers. Use
13820 ptid from regcache instead of inferior_ptid.
13821
0e7b8f61
SM
138222017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13823
13824 * ser-mingw.c (ser_windows_raw): Remove reference to
13825 struct serial::current_timeout.
13826
5badf10a
IR
138272017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13828
13829 PR tdep/20928
13830 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13831 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13832 (sparc64_fsr_type): Fix %fsr decoding.
13833
cee59b3f
TW
138342017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13835
13836 * python/py-record-btrace.c (btpy_insn_data): Change return type
13837 for Python 2.
13838
639a9038
SM
138392017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13840
13841 * spu-linux-nat.c (spu_fetch_inferior_registers,
13842 spu_store_inferior_registers): Use ptid from regcache, set and
13843 restore inferior_ptid.
13844 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13845 Likewise.
13846
bcc0c096
SM
138472017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13848
13849 * i386-linux-nat.c (fetch_register, store_register,
13850 i386_linux_fetch_inferior_registers,
13851 i386_linux_store_inferior_registers): Use ptid from regcache.
13852 * ia64-linux-nat.c (ia64_linux_fetch_register,
13853 ia64_linux_store_register): Likewise.
13854 * inf-ptrace.c (inf_ptrace_fetch_register,
13855 inf_ptrace_store_register): Likewise.
13856 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13857 m32r_linux_store_inferior_registers): Likewise.
13858 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13859 m68kbsd_store_inferior_registers): Likewise.
13860 * m68k-linux-nat.c (fetch_register, store_register,
13861 m68k_linux_fetch_inferior_registers,
13862 m68k_linux_store_inferior_registers): Likewise.
13863 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13864 m88kbsd_store_inferior_registers): Likewise.
13865 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13866 mips_fbsd_store_inferior_registers): Likewise.
13867 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13868 mips64_linux_regsets_store_registers): Likewise.
13869 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13870 mipsnbsd_store_inferior_registers): Likewise.
13871 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13872 mips64obsd_store_inferior_registers): Likewise.
13873 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13874 Likewise.
13875 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13876 ppcfbsd_store_inferior_registers): Likewise.
13877 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13878 ppc_linux_store_inferior_registers): Likewise.
13879 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13880 ppcnbsd_store_inferior_registers): Likewise.
13881 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13882 ppcobsd_store_registers): Likewise.
13883 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13884 Likewise.
13885 * ravenscar-thread.c (ravenscar_fetch_registers,
13886 ravenscar_store_registers, ravenscar_prepare_to_store):
13887 Likewise.
13888 * record-btrace.c (record_btrace_fetch_registers,
13889 record_btrace_store_registers, record_btrace_prepare_to_store):
13890 Likewise.
13891 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13892 Lookup inferior using ptid from regcache, instead of
13893 current_inferior.
13894 * remote.c (remote_fetch_registers, remote_store_registers): Use
13895 ptid from regcache.
13896 * rs6000-nat.c (fetch_register, store_register): Likewise.
13897 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13898 s390_linux_store_inferior_registers): Likewise.
13899 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13900 shnbsd_store_inferior_registers): Likewise.
13901 * sol-thread.c (sol_thread_fetch_registers,
13902 sol_thread_store_registers): Likewise.
13903 * sparc-nat.c (sparc_fetch_inferior_registers,
13904 sparc_store_inferior_registers): Likewise.
13905 * tilegx-linux-nat.c (fetch_inferior_registers,
13906 store_inferior_registers): Likewise.
13907 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13908 vaxbsd_store_inferior_registers): Likewise.
13909 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13910 store_xtregs): Likewise.
13911
c0f55cc6
AV
139122017-03-20 Artemiy Volkov <artemiyv@acm.org>
13913
13914 PR gdb/14441
13915 * NEWS: Mention support for rvalue references in GDB and python.
13916 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13917 supports both lvalue and rvalue references.
13918
15c0a2a9
AV
139192017-03-20 Artemiy Volkov <artemiyv@acm.org>
13920
13921 PR gdb/14441
13922 * gdbtypes.c (rank_one_type): Implement overloading
13923 resolution rules regarding rvalue references.
13924
aa006118
AV
139252017-03-20 Artemiy Volkov <artemiyv@acm.org>
13926
13927 PR gdb/14441
13928 * aarch64-tdep.c (aarch64_type_align)
13929 (aarch64_extract_return_value, aarch64_store_return_value): Change
13930 lvalue reference type checks to general reference type checks.
13931 * amd64-tdep.c (amd64_classify): Likewise.
13932 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13933 Likewise.
13934 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13935 (arm_store_return_value): Likewise.
13936 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13937 * c-typeprint.c (c_print_type): Likewise.
13938 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13939 (cplus_number_of_children, cplus_describe_child): Likewise.
13940 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13941 * completer.c (expression_completer): Likewise.
13942 * cp-support.c (make_symbol_overload_list_adl_namespace):
13943 Likewise.
13944 * darwin-nat-info.c (info_mach_region_command): Likewise.
13945 * dwarf2loc.c (entry_data_value_coerce_ref)
13946 (value_of_dwarf_reg_entry): Likewise.
13947 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13948 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13949 Likewise.
13950 * findvar.c (extract_typed_address, store_typed_address):
13951 Likewise.
13952 * gdbtypes.c (rank_one_type): Likewise.
13953 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13954 * infcall.c (value_arg_coerce): Likewise.
13955 * language.c (pointer_type): Likewise.
13956 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13957 Likewise.
13958 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13959 * mn10300-tdep.c (mn10300_type_align): Likewise.
13960 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13961 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13962 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13963 Likewise.
13964 * printcmd.c (print_formatted, x_command): Likewise.
13965 * python/py-type.c (typy_get_composite, typy_template_argument):
13966 Likewise.
13967 * python/py-value.c (valpy_referenced_value)
13968 (valpy_get_dynamic_type, value_has_field): Likewise.
13969 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13970 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13971 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13972 * spu-tdep.c (spu_scalar_value_p): Likewise.
13973 * symtab.c (lookup_symbol_aux): Likewise.
13974 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13975 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13976 Likewise.
13977 * valops.c (value_cast_pointers, value_cast)
13978 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13979 (value_struct_elt, value_struct_elt_bitpos)
13980 (value_find_oload_method_list, find_overload_match)
13981 (value_rtti_indirect_type): Likewise.
13982 * valprint.c (val_print_scalar_type_p, generic_val_print):
13983 Likewise.
13984 * value.c (value_actual_type, value_as_address, unpack_long)
13985 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13986 (coerce_ref): Likewise.
13987 * varobj.c (varobj_get_value_type): Likewise.
13988
3fcf899d
AV
139892017-03-20 Artemiy Volkov <artemiyv@acm.org>
13990
13991 PR gdb/14441
13992 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13993 table of constants.
13994 * python/lib/gdb/command/explore.py: Support exploring values
13995 of rvalue reference types.
13996 * python/lib/gdb/types.py: Implement get_basic_type() for
13997 rvalue reference types.
13998 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13999 constant.
14000 * python/py-value.c (valpy_getitem): Add an rvalue reference
14001 check.
14002 (valpy_reference_value): Add new parameter "refcode".
14003 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14004 New wrappers for valpy_reference_value().
14005 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14006 (gdbpy_invoke_xmethod): Likewise.
14007
4297a3f0
AV
140082017-03-20 Artemiy Volkov <artemiyv@acm.org>
14009
14010 PR gdb/14441
14011 * dwarf2read.c (process_die, read_type_die_1): Handle the
14012 DW_TAG_rvalue_reference_type DIE.
14013 (read_tag_reference_type): Add new parameter "refcode".
14014
e1cb3213
AV
140152017-03-20 Artemiy Volkov <artemiyv@acm.org>
14016
14017 PR gdb/14441
14018 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14019 (c_type_print_modifier, c_type_print_varspec_suffix)
14020 (c_type_print_base): Support printing rvalue reference types.
14021 * c-valprint.c (c_val_print, c_value_print): Support printing
14022 rvalue reference values.
14023
e4347c89
AV
140242017-03-20 Artemiy Volkov <artemiyv@acm.org>
14025
14026 PR gdb/14441
14027 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14028 typename.
14029 * cp-support.c (replace_typedefs): Handle
14030 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14031 * python/py-type.c (typy_lookup_type): Likewise.
14032
53cc15f5
AV
140332017-03-20 Artemiy Volkov <artemiyv@acm.org>
14034
14035 PR gdb/14441
14036 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14037 * parse.c (insert_type): Change assert statement.
14038 (follow_types): Handle rvalue reference types.
14039 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14040 constant.
14041
a65cfae5
AV
140422017-03-20 Artemiy Volkov <artemiyv@acm.org>
14043
14044 PR gdb/14441
14045 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14046 value_ref() interface.
14047 * c-valprint.c (c_value_print): Likewise.
14048 * infcall.c (value_arg_coerce): Likewise.
14049 * python/py-value.c (valpy_reference_value): Likewise.
14050 * valops.c (value_cast, value_reinterpret_cast)
14051 (value_dynamic_cast, typecmp): Likewise.
14052 (value_ref): Parameterize by kind of return value reference type.
14053 * value.h (value_ref): Add new parameter "refcode".
14054
3b224330
AV
140552017-03-20 Artemiy Volkov <artemiyv@acm.org>
14056
14057 PR gdb/14441
14058 * dwarf2read.c (read_tag_reference_type): Use
14059 lookup_lvalue_reference_type() instead of lookup_reference_type().
14060 * eval.c (evaluate_subexp_standard): Likewise.
14061 * f-exp.y: Likewise.
14062 * gdbtypes.c (make_reference_type, lookup_reference_type):
14063 Generalize with rvalue reference types.
14064 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14065 convenience wrappers for lookup_reference_type().
14066 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14067 reference kind parameter.
14068 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14069 wrappers for lookup_reference_type().
14070 * guile/scm-type.c (gdbscm_type_reference): Use
14071 lookup_lvalue_reference_type() instead of lookup_reference_type().
14072 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14073 * parse.c (follow_types): Likewise.
14074 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14075 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14076 Likewise.
14077 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14078 (gdbpy_invoke_xmethod): Likewise.
14079 * stabsread.c: Provide extra argument to make_reference_type()
14080 call.
14081 * valops.c (value_ref, value_rtti_indirect_type): Use
14082 lookup_lvalue_reference_type() instead of lookup_reference_type().
14083
f9aeb8d4
AV
140842017-03-20 Artemiy Volkov <artemiyv@acm.org>
14085
14086 PR gdb/14441
14087 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14088 (TYPE_IS_REFERENCE): New macro.
14089 (struct type): Add rvalue_reference_type field.
14090 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14091
51457a05
MAL
140922017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14093
14094 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14095 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14096 New function definition.
14097 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14098 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14099 New function declaration.
14100 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14101 * mi/mi-interp.h: New file.
14102 * solib.c (info_sharedlibrary_command): Replace for loop with
14103 ALL_SO_LIBS macro
14104 * solib.h (update_solib_list): New function declaration.
14105 (so_list_head): Move macro.
14106 * solist.h (ALL_SO_LIBS): New macro.
14107
e696b3ad
MAL
141082017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14109
14110 * infcmd.c (post_create_inferior): Remove unused argument in
14111 call to solib_add.
14112 * remote.c (remote_start_remote): Likewise.
14113 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14114 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14115 (enable_break): Likewise.
14116 * solib.c (update_solib_list): Remove unused target argument
14117 and its documentation.
14118 (solib_add): Remove unused target argument. Remove unused
14119 argument in call to update_solib_list.
14120 (info_sharedlibrary_command): Remove unused argument in call
14121 to update_solib_list.
14122 (sharedlibrary_command): Remove unused argument in call to
14123 solib_add.
14124 (handle_solib_event): Likewise.
14125 (reload_shared_libraries): Likewise.
14126 * solib.h (solib_add): Remove unused target argument.
14127
dcb84eda
AA
141282017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14129
14130 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14131 (s390_displaced_step_fixup): Cover relative branches with the
14132 default fixup handling. This fixes lack of support for some
14133 relative branch instructions.
14134
d9cb6cdc
SM
141352017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14136
14137 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14138 ptid from regcache.
14139
1afaf9f4
SM
141402017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14141
14142 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14143 i386_darwin_store_inferior_registers): Use ptid from regcache.
14144
aac12e24
SM
141452017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14146
14147 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14148 i386bsd_store_inferior_registers): Use ptid from regcache.
14149
bbe1eef1
SM
141502017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14151
14152 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14153 hppaobsd_store_registers): Use ptid from regcache.
14154
10799020
SM
141552017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14156
14157 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14158 hppanbsd_store_registers): Use ptid from regcache.
14159
00204cf7
SM
141602017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14161
14162 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14163 from regcache. Use get_ptrace_pid.
14164
11a33714
SM
141652017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14166
14167 * corelow.c (get_core_register_section): Use ptid from regcache,
14168 update doc.
14169
317cd492
SM
141702017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14171
14172 * bsd-uthread.c (bsd_uthread_fetch_registers,
14173 bsd_uthread_store_registers): Use ptid from regcache, set and
14174 restore inferior_ptid.
14175
9ac8a7c2
SM
141762017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14177
14178 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14179 fetch_fp_regs, store_register, store_regs, store_fp_register,
14180 store_fp_regs): Use ptid from regcache.
14181
4ac4bb6a
SM
141822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14183
14184 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14185 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14186 store_vfp_regs): Use ptid from regcache.
14187
9bcbdca8
PA
141882017-03-17 Pedro Alves <palves@redhat.com>
14189
14190 PR remote/21188
14191 * ser-base.c (ser_base_wait_for): Add comment.
14192 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14193 version.
14194 * ser-unix.c (hardwire_raw): Remove reference to
14195 scb->current_timeout.
14196 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14197 (hardwire_ops): Install ser_base_readchar instead of
14198 hardwire_readchar.
14199 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14200 Remove fields.
14201
7503099f
JG
142022017-03-17 Jonah Graham <jonah@kichwacoders.com>
14203
14204 PR gdb/19637
14205 * python/lib/gdb/printer/bound_registers.py: Add support for
14206 Python 3.
14207
7942e96e
AA
142082017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14209
14210 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14211 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14212 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14213 byte_offset to subobj_byte_offset. Fix the handling of
14214 DWARF_VALUE_STACK on big-endian targets when coming via an
14215 implicit pointer.
14216 (dwarf2_evaluate_loc_desc): Adjust call to
14217 dwarf2_evaluate_loc_desc_full.
14218 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14219 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14220
ba14f379
YQ
142212017-03-16 Yao Qi <yao.qi@linaro.org>
14222
14223 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14224 and REVSH instructions.
14225
b121eeb9
YQ
142262017-03-16 Yao Qi <yao.qi@linaro.org>
14227
14228 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14229 (arm_record_test): Declare.
14230 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14231 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14232 align with the manual.
14233 (thumb_record_misc): Adjust the code order to align with the
14234 manual.
14235 (thumb2_record_decode_insn_handler): Fix instruction matching.
14236 (instruction_reader_thumb): New class.
14237 (arm_record_test): New function.
14238
728a7913
YQ
142392017-03-16 Yao Qi <yao.qi@linaro.org>
14240
14241 * arm-tdep.c (abstract_memory_reader): New class.
14242 (instruction_reader): New class.
14243 (extract_arm_insn): Add argument 'reader'. Callers updated.
14244 (decode_insn): Likewise.
14245
34b43320
DE
142462017-03-16 Doug Evans <dje@google.com>
14247
a7c0469f
DE
14248 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14249 member. Change type of TYPE member to SCM. All uses updated.
14250 (lsscm_make_lazy_string_smob): Add assert.
14251 (lsscm_make_lazy_string): Flag bad length values.
14252 (lsscm_elt_type): New function.
14253 (gdbscm_lazy_string_to_value): Rewrite to use
14254 lsscm_safe_lazy_string_to_value.
14255 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14256 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14257 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14258 in incoming type.
14259 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14260 * guile/scm-type.c (tyscm_scm_to_type): New function.
14261
142622017-03-15 Doug Evans <dje@google.com>
14263
34b43320
DE
14264 PR python/17728, python/18439, python/18779
14265 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14266 member. Change type of TYPE member to PyObject *. All uses updated.
14267 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14268 (gdbpy_create_lazy_string_object): Flag bad length values.
14269 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14270 Handle typedefs in incoming type.
14271 (stpy_lazy_string_elt_type): New function.
14272 (gdbpy_extract_lazy_string): Call it.
14273 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14274 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14275 typedefs in incoming type.
14276
a3a5fecc
DE
142772017-03-16 Doug Evans <dje@google.com>
14278
14279 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14280 * guile/scm-type.c (tyscm_scm_to_type): New function.
14281
28f1c605
JW
142822017-03-16 Jiong Wang <jiong.wang@arm.com>
14283
14284 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14285 "ULONGEST" for "skip".
14286
87c336f6
AA
142872017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14288
14289 PR gdb/21220
14290 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14291 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14292 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14293 over ptrace peek/poke until end of buffer or error.
14294
cf81cf60
SM
142952017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14296
14297 * parse.c (length_of_subexp): Make static.
14298 * parser-defs.h (length_of_subexp): Remove.
14299
a379284a
AA
143002017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14301
14302 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14303 as well.
14304
8a6200ba
PA
143052017-03-14 Pedro Alves <palves@redhat.com>
14306
14307 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14308 (main): Use std::unique_ptr. Remove calls to
14309 cp_demangled_name_parse_free.
14310
f79ec206
SM
143112017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14312
14313 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14314 alphabsd_store_inferior_registers): Use regcache->ptid instead
14315 of inferior_ptid.
14316
edb5fb00
SM
143172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14318
14319 * aix-thread.c (aix_thread_fetch_registers,
14320 aix_thread_store_registers): Use regcache->ptid instead of
14321 inferior_ptid.
14322
55119686
SM
143232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14324
14325 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14326 store_gregs_to_thread, fetch_fpregs_from_thread,
14327 store_fpregs_to_thread): Use regcache->ptid instead of
14328 inferior_ptid.
14329
6a06fbb7
SM
143302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14331
14332 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14333 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14334 instead of inferior_ptid.
14335
c6386875
SM
143362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14337
14338 * target.c (target_fetch_registers, target_store_registers): Add
14339 assert.
14340
ddaaf0fb
SM
143412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14342
14343 * regcache.h (regcache_get_ptid): New function.
14344 * regcache.c (regcache_get_ptid): New function.
14345
b9da89d1 143462017-03-13 Mark Wielaard <mark@klomp.org>
14347
14348 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14349
5f4d1085
KS
143502017-03-10 Keith Seitz <keiths@redhat.com>
14351
14352 PR c++/8218
14353 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14354
c65d6b55
PA
143552017-03-08 Pedro Alves <palves@redhat.com>
14356
14357 PR gdb/18360
14358 * infrun.c (start_step_over, do_target_resume, resume)
14359 (restart_threads): Assert we're not resuming a thread that is
14360 meant to be stopped.
14361 (infrun_thread_stop_requested_callback): Delete.
14362 (infrun_thread_stop_requested): If the thread is internally
14363 stopped, queue a pending stop event and clear the thread's
14364 inline-frame state.
14365 (handle_stop_requested): New function.
14366 (handle_syscall_event, handle_inferior_event_1): Use
14367 handle_stop_requested.
14368 (handle_stop_requested): New function.
14369 (handle_signal_stop): Set the thread's stop_signal here instead of
14370 at caller.
14371 (finish_step_over): Clear step over info unconditionally.
14372 (handle_signal_stop): If the user had interrupted the event
14373 thread, consider the stop a random signal.
14374 (handle_signal_stop) <signal arrived while stepping over
14375 breakpoint>: Don't restart threads here.
14376 (stop_waiting): Don't clear step-over info here.
14377
15c22686
PA
143782017-03-08 Pedro Alves <palves@redhat.com>
14379
14380 PR 21206
14381 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14382 goes to argument 2, not 1.
14383
6e5d74e7
PA
143842017-03-08 Pedro Alves <palves@redhat.com>
14385
14386 PR cli/21218
14387 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14388 display_gdb_prompt.
14389 (command_line_input): Add comment.
14390
9753a2f6
PA
143912017-03-08 Pedro Alves <palves@redhat.com>
14392
14393 PR tui/21216
14394 * tui/tui-file.c (tui_file::write): New.
14395 * tui/tui-file.h (tui_file): Override "write".
14396 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14397 factored out from ...
14398 (tui_puts): ... here.
14399 (tui_putc): Use them.
14400 (tui_write): New function.
14401 * tui/tui-io.h (tui_write): Declare.
14402
1672e0d9
SDJ
144032017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14404
14405 * Makefile.in (SFILES): Replace "environ.c" with
14406 "common/environ.c".
14407 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14408 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14409 to...
14410 * common/environ.c: ... here.
14411 * environ.h: Moved to...
14412 * common/environ.h: ... here.
14413
f7bb4e3a
PB
144142017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14415
14416 * gdbarch.sh (pstring_ptr): New static function.
14417 (gdbarch_disassembler_options): Use it.
14418 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14419 not valid_disassembler_option->name.
14420 * gdbarch.c: Regenerate.
14421
e45ced6c
PB
144222017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14423
14424 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14425
5f6fd321
PA
144262017-03-07 Pedro Alves <palves@redhat.com>
14427
14428 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14429
6dbb839a 144302017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14431
14432 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14433 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14434 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14435 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14436
d274ecf4
SM
144372017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14438
14439 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14440
df97be55
SM
144412017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14442
14443 * remote.c (remote_add_target_side_commands): Use range-based
14444 for loop.
14445
7d45f3df
YQ
144462017-03-03 Yao Qi <yao.qi@linaro.org>
14447
14448 PR gdb/21165
14449 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14450 value is lazy.
14451 * valprint.c (common_val_print): Likewise.
14452
65b48a81
PB
144532017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14454
14455 * NEWS: Mention new set/show disassembler-options commands.
14456 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14457 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14458 (prospective_options): New static variable.
14459 (gdb_disassembler::gdb_disassembler): Initialize
14460 m_di.disassembler_options.
14461 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14462 (get_disassembler_options): New function.
14463 (set_disassembler_options): Likewise.
14464 (set_disassembler_options_sfunc): Likewise.
14465 (show_disassembler_options_sfunc): Likewise.
14466 (disassembler_options_completer): Likewise.
14467 (_initialize_disasm): Likewise.
14468 * disasm.h (get_disassembler_options): New prototype.
14469 (set_disassembler_options): Likewise.
14470 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14471 (gdbarch_verify_disassembler_options): Likewise.
14472 * gdbarch.c: Regenerate.
14473 * gdbarch.h: Likewise.
14474 * arm-tdep.c (num_disassembly_options): Delete.
14475 (set_disassembly_style): Likewise.
14476 (arm_disassembler_options): New static variable.
14477 (set_disassembly_style_sfunc): Convert short style name into long
14478 option name. Call set_disassembler_options.
14479 (show_disassembly_style_sfunc): New function.
14480 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14481 set_gdbarch_verify_disassembler_options.
14482 (_initialize_arm_tdep): Delete regnames variable and update callers.
14483 (arm_disassembler_options): Initialize.
14484 (disasm_options): New variable.
14485 (num_disassembly_options): Rename from this...
14486 (num_disassembly_styles): ...to this. Compute by scanning through
14487 disasm_options.
14488 (valid_disassembly_styles): Initialize using disasm_options.
14489 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14490 set_arm_regname_option.
14491 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14492 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14493 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14494 set_gdbarch_verify_disassembler_options.
14495 * s390-tdep.c (s390_disassembler_options): New static variable.
14496 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14497 set_gdbarch_verify_disassembler_options.
14498
d538e36d
SM
144992017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14500
14501 * remote.c (remote_add_target_side_condition): Remove "struct"
14502 keyword from range-based for loop.
14503
83621223
SM
145042017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14505
14506 * remote.c (remote_add_target_side_condition): Use range-based
14507 for loop. Update comment.
14508
2123df0e
YQ
145092017-02-27 Yao Qi <yao.qi@linaro.org>
14510
14511 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14512
8e368124
AH
145132017-02-26 Alan Hayward <alan.hayward@arm.com>
14514
14515 * regcache.c (regcache_raw_update): New function.
14516 (regcache_raw_read): Move code to regcache_raw_update.
14517 * regcache.h (regcache_raw_update): New declaration.
14518 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14519
a49dd8dd
JK
145202017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14521
14522 * dwarf2read.c (create_debug_type_hash_table): Initialize
14523 header.signature and header.type_offset_in_tu.
14524
34e4bae9
PA
145252017-02-24 Pedro Alves <palves@redhat.com>
14526
14527 * symtab.c (make_file_symbol_completion_list_1): Use
14528 add_symtab_completions.
14529
b0e4b369
AH
145302017-02-24 Alan Hayward <alan.hayward@arm.com>
14531
14532 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14533
975c21ab
AH
145342017-02-24 Alan Hayward <alan.hayward@arm.com>
14535
14536 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14537 I386_MAX_REGISTER_SIZE.
14538 (i386_pseudo_register_write): Likewise.
14539 (i386_process_record): Likewise.
14540 * i387-tdep.c (i387_supply_xsave): Likewise.
14541 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14542 (store_register): Likewise.
14543
14bc53a8
PA
145442017-02-23 Pedro Alves <palves@redhat.com>
14545
14546 * ada-lang.c: Include "common/function-view.h".
14547 (ada_iterate_over_symbols): Adjust to use function_view as
14548 callback type.
14549 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14550 (ada_make_symbol_completion_list): Use a lambda.
14551 (ada_exc_search_name_matches): Delete.
14552 (name_matches_regex): New.
14553 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14554 * compile/compile-c-support.c: Include "common/function-view.h".
14555 (print_one_macro): Change prototype to accept a ui_file pointer.
14556 (write_macro_definitions): Use a lambda.
14557 * dwarf2read.c: Include "common/function-view.h".
14558 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14559 (dw2_expand_symtabs_matching): Adjust to use function_view as
14560 callback type.
14561 * language.h: Include "common/function-view.h".
14562 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14563 function_view as callback type.
14564 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14565 * linespec.c: Include "common/function-view.h".
14566 (collect_info::add_symbol): New method.
14567 (struct symbol_and_data_callback, iterate_inline_only, struct
14568 symbol_matcher_data, iterate_name_matcher): Delete.
14569 (iterate_over_all_matching_symtabs): Adjust to use function_view
14570 as callback type and lambdas.
14571 (iterate_over_file_blocks): Adjust to use function_view as
14572 callback type.
14573 (decode_compound_collector): Now a class with private fields.
14574 (decode_compound_collector::release_symbols): New method.
14575 (collect_one_symbol): Rename to...
14576 (decode_compound_collector::operator()): ... this and adjust.
14577 (lookup_prefix_sym): decode_compound_collector construction bits
14578 move to decode_compound_collector ctor. Pass the
14579 decode_compound_collector object directly as callback. Remove
14580 cleanups and use decode_compound_collector::release_symbols
14581 instead.
14582 (symtab_collector): Now a class with private fields.
14583 (symtab_collector::release_symtabs): New method.
14584 (add_symtabs_to_list): Rename to...
14585 (symtab_collector::operator()): ... this and adjust.
14586 (collect_symtabs_from_filename): symtab_collector construction
14587 bits move to symtab_collector ctor. Pass the symtab_collector
14588 object directly as callback. Remove cleanups and use
14589 symtab_collector::release_symtabs instead.
14590 (collect_symbols): Delete.
14591 (add_matching_symbols_to_info): Use lambdas.
14592 * macrocmd.c (print_macro_callback): Delete.
14593 (info_macro_command): Use a lambda.
14594 (info_macros_command): Pass print_macro_definition as callable
14595 directly.
14596 (print_one_macro): Remove 'ignore' parameter.
14597 (macro_list_command): Adjust.
14598 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14599 (macro_for_each_data::user_data): Delete field.
14600 (foreach_macro): Adjust to call the function_view.
14601 (macro_for_each): Adjust to use function_view as callback type.
14602 (foreach_macro_in_scope): Adjust to call the function_view.
14603 (macro_for_each_in_scope): Adjust to use function_view as callback
14604 type.
14605 * macrotab.h: Include "common/function-view.h".
14606 (macro_callback_fn): Declare a prototype instead of a pointer.
14607 Remove "user_data" parameter.
14608 (macro_for_each, macro_for_each_in_scope): Adjust to use
14609 function_view as callback type.
14610 * psymtab.c (partial_map_expand_apply)
14611 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14612 Adjust to use function_view as callback type and to return bool.
14613 (psym_expand_symtabs_matching): Adjust to use function_view as
14614 callback types.
14615 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14616 to use function_view as callback type and to return bool.
14617 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14618 callback types.
14619 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14620 as callback types.
14621 * symfile.h: Include "common/function-view.h".
14622 (expand_symtabs_file_matcher_ftype)
14623 (expand_symtabs_symbol_matcher_ftype)
14624 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14625 return bool.
14626 (quick_symbol_functions::map_symtabs_matching_filename)
14627 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14628 function_view as callback type and return bool.
14629 (expand_symtabs_matching): Adjust to use function_view as callback
14630 type.
14631 (maintenance_expand_name_matcher)
14632 (maintenance_expand_file_matcher): Delete.
14633 (maintenance_expand_symtabs): Use lambdas.
14634 * symtab.c (iterate_over_some_symtabs): Adjust to use
14635 function_view as callback types and return bool.
14636 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14637 of a cleanup.
14638 (lookup_symtab_callback): Delete.
14639 (lookup_symtab): Use a lambda.
14640 (iterate_over_symbols): Adjust to use function_view as callback
14641 type.
14642 (struct search_symbols_data, search_symbols_file_matches)
14643 (search_symbols_name_matches): Delete.
14644 (search_symbols): Use a pair of lambdas.
14645 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14646 (symtab_expansion_callback): Delete.
14647 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14648 * symtab.h: Include "common/function-view.h".
14649 (iterate_over_some_symtabs): Adjust to use function_view as
14650 callback type and return bool.
14651 (iterate_over_symtabs): Adjust to use function_view as callback
14652 type.
14653 (symbol_found_callback_ftype): Remove 'data' parameter and return
14654 bool.
14655 (iterate_over_symbols): Adjust to use function_view as callback
14656 type.
14657
07e253aa
PA
146582017-02-23 Pedro Alves <palves@redhat.com>
14659
14660 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14661 (%.o) <unittests/%.c>: New pattern.
14662 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14663 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14664 * common/function-view.h: New file.
14665 * unittests/function-view-selftests.c: New file.
14666 * configure: Regenerate.
14667
8eaf5320
SM
146682017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14669
14670 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14671 inferior_ptid.
14672 * go32-nat.c (go32_thread_alive): Likewise.
14673
38768751
YQ
146742017-02-23 Yao Qi <yao.qi@linaro.org>
14675
14676 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14677 delete.
14678
0a8beaba
YQ
146792017-02-23 Yao Qi <yao.qi@linaro.org>
14680
14681 * varobj.c (varobj_clear_saved_item): Use delete instead of
14682 xfree.
14683 (update_dynamic_varobj_children): Likewise.
14684
58fdfd2c
JK
146852017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14686
14687 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14688
1b90b139
SM
146892017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14690
14691 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14692 m_enum_value to 0 in default constructor.
14693
2039d74e
EBM
146942017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14695
14696 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14697 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14698 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14699 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14700 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14701 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14702 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14703 IS_STORE_CONDITIONAL_INSN.
14704
7814882a
JK
147052017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14706
14707 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14708
0ae60b63
JK
147092017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14710
14711 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14712
0224619f
JK
147132017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14714
14715 * dwarf2read.c (skip_one_die, read_attribute_value)
14716 (dwarf2_const_value_attr, dump_die_shallow)
14717 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14718 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14719
0af92d60
JK
147202017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14721
14722 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14723 (dwarf_parse_macro_header): Accept DWARF version 5.
14724 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14725
216f72a1
JK
147262017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14727
14728 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14729 DW_AT_GNU_*.
14730 * common/common-exceptions.h (enum errors): Likewise.
14731 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14732 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14733 (dwarf_expr_context::execute_stack_op): Likewise.
14734 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14735 Likewise.
14736 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14737 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14738 (show_entry_values_debug, call_site_to_target_addr)
14739 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14740 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14741 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14742 (value_of_dwarf_block_entry, indirect_pieced_value)
14743 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14744 (disassemble_dwarf_expression): Likewise.
14745 * dwarf2read.c (process_die, inherit_abstract_dies)
14746 (read_call_site_scope): Likewise.
14747 * gdbtypes.h (struct func_type, struct call_site_parameter)
14748 (struct call_site): Likewise.
14749 * stack.c (read_frame_arg): Likewise.
14750 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14751
43988095
JK
147522017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14753
14754 * defs.h (read_unsigned_leb128): New declaration.
14755 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14756 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14757 (dwarf2_find_location_expression): Call also
14758 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14759 * dwarf2loc.h (dwarf2_version): New declaration.
14760 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14761 rnglists.
14762 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14763 .debug_rnglists.
14764 (struct dwop_section_names): Add loclists_dwo.
14765 (dwop_section_names): Add .debug_loclists.dwo.
14766 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14767 (struct dwarf2_per_cu_data): Add dwarf_version.
14768 (struct dwo_sections): Add loclists.
14769 (struct attr_abbrev): Add implicit_const.
14770 (read_indirect_line_string): New declaration.
14771 (read_unsigned_leb128): Delete declaration.
14772 (rcuh_kind): New definition.
14773 (read_and_check_comp_unit_head): Change parameter
14774 is_debug_types_section to section_kind.
14775 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14776 (read_comp_unit_head): Change parameter abfd to section, add parameter
14777 section_kind. Handle DWARF-5.
14778 (error_check_comp_unit_head): Accept also DWARF version 5.
14779 (read_and_check_comp_unit_head): Change parameter
14780 is_debug_types_section to section_kind.
14781 (read_and_check_type_unit_head): Delete function.
14782 (read_abbrev_offset): Handle DWARF-5.
14783 (create_debug_type_hash_table): Add parameter section_kind. Process
14784 only DW_UT_type. Use signature and type_offset_in_tu from struct
14785 comp_unit_head.
14786 (create_debug_types_hash_table): Update create_debug_type_hash_table
14787 caller.
14788 (create_all_type_units): Call create_debug_type_hash_table.
14789 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14790 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14791 caller.
14792 (skip_one_die): Handle DW_FORM_implicit_const.
14793 (dwarf2_rnglists_process): New function.
14794 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14795 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14796 (read_attribute_value): Handle DW_FORM_implicit_const,
14797 DW_FORM_line_strp.
14798 (read_attribute): Handle DW_FORM_implicit_const.
14799 (read_indirect_string_at_offset_from): New function from
14800 read_indirect_string_at_offset.
14801 (read_indirect_string_at_offset): Call
14802 read_indirect_string_at_offset_from.
14803 (read_indirect_line_string_at_offset): New function.
14804 (read_indirect_string): New function comment.
14805 (read_indirect_line_string): New function.
14806 (read_unsigned_leb128): Make it global.
14807 (dwarf2_string_attr): Handle DWARF-5.
14808 (add_include_dir_stub, read_formatted_entries): New functions.
14809 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14810 Handle DWARF-5.
14811 (per_cu_header_read_in): Update read_comp_unit_head caller.
14812 (dwarf2_version): New function.
14813 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14814 rnglists.
14815 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14816 fields.
14817
22d2f3ab
JK
148182017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14819
14820 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14821
5f46c5a5
JK
148222017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14823
14824 * dwarf2read.c (dwarf2_ranges_process): New function from
14825 dwarf2_ranges_read.
14826 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14827 dwarf2_ranges_process.
14828
78d4d2c5
JK
148292017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14830
14831 * dwarf2read.c (create_debug_type_hash_table): New function from
14832 create_debug_types_hash_table.
14833 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14834 (create_all_type_units, open_and_init_dwo_file): Update
14835 create_debug_types_hash_table callers.
14836
1b076f25
SDJ
148372017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14838
14839 PR gdb/16188
14840 * fork-child.c (trace_start_error): Fix thinko. va_end should
14841 refer to 'ap', not 'args'.
14842
0db8980c
SDJ
148432017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14844 Pedro Alves <palves@redhat.com>
14845
14846 PR gdb/16188
14847 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14848 calls succeeded.
14849 * fork-child.c (trace_start_error): New function.
14850 (trace_start_error_with_name): Likewise.
14851 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14852 * inf-ptrace.c (inf_ptrace_me): Likewise.
14853 * inferior.h (trace_start_error): New prototype.
14854 (trace_start_error_with_name): Likewise.
14855
99e8a4f9
SDJ
148562017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14857
14858 PR gdb/21164
14859 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14860 NULL before using it.
14861 * symmisc.c (maintenance_print_symbols): Likewise.
14862 (maintenance_print_msymbols): Likewise.
14863
4e746bb6
TW
148642017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14865
14866 * NEWS: Add record Python bindings entry.
14867
148682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14869
14870 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14871 py-record-full.o.
14872 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14873 * python/py-record-btrace.c, python/py-record-btrace.h,
14874 python/py-record-full.c, python/py-record-full.h: New file.
14875 * python/py-record.c: Add include for py-record-btrace.h and
14876 py-record-full.h.
14877 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14878 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14879 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14880 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14881 New definition.
14882 (gdbpy_initialize_btrace): New export.
14883 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14884
148852017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14886
14887 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14888 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14889 * python/py-record.c: New file.
14890 * python/python-internal.h (gdbpy_start_recording,
14891 gdbpy_current_recording, gdpy_stop_recording,
14892 gdbpy_initialize_record): New export.
14893 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14894 (python_GdbMethods): Add gdbpy_start_recording,
14895 gdbpy_current_recording and gdbpy_stop_recording.
14896
148972017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14898
14899 * record-btrace.c (record_btrace_record_method): New function.
14900 (init_record_btrace_ops): Initialize to_record_method.
14901 * record-full.c (record_full_record_method): New function.
14902 (init_record_full_ops, init_record_full_core_ops): Add
14903 record_full_record_method.
14904 * record.h (enum record_method): New enum.
14905 * target-debug.h (target_debug_print_enum_record_method: New define.
14906 * target-delegates.c: Regenerate.
14907 * target.c (target_record_method): New function.
14908 * target.h: Include record.h.
14909 (struct target_ops) <to_record_method>: New field.
14910 (target_record_method): New export.
14911
149122017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14913
14914 * record.h (record_start, record_stop): New export.
14915 * record.c (record_start, record_stop): New function.
14916
149172017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14918
14919 * btrace.c (btrace_fetch): Copy function call segments pointer
14920 into a vector.
14921 (btrace_clear): Clear the vector.
14922 (btrace_find_insn_by_number): Use binary search to find the correct
14923 function call segment.
14924 * btrace.h (brace_fun_p): New typedef.
14925 (struct btrace_thread_info) <functions>: New field.
14926
149272017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14928
14929 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14930 * btrace.c (btrace_decode_error): ... here. New function.
14931 * btrace.h (btrace_decode_error): New export.
14932
149332017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14934
14935 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14936 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14937 btrace_find_insn_by_number): Remove special case for gaps.
14938 * btrace.h (btrace_insn_get_error): New export.
14939 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14940 * record-btrace.c (btrace_insn_history): Print number for gaps.
14941 (record_btrace_info, record_btrace_goto): Handle gaps.
14942
3f77c769
TT
149432017-02-14 Tom Tromey <tom@tromey.com>
14944
14945 PR python/13598:
14946 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14947 event.
14948 * python/py-evts.c (gdbpy_initialize_py_events): Add
14949 before_prompt registry.
14950 * python/py-events.h (events_object) <before_prompt>: New field.
14951
4c2c7ac6
MM
149522017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14953
14954 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14955
5cf30ebf
LM
149562017-02-13 Luis Machado <lgustavo@codesourcery.com>
14957
14958 * symfile (_initialize_symfile): Add usage text to the load command's
14959 help text.
14960
26a06916
SM
149612017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14962
14963 * utils.c (defaulted_query): Don't query on secondary UIs.
14964
0b145e37
TT
149652017-02-10 Tom Tromey <tom@tromey.com>
14966
14967 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14968
2d8365c4
TT
149692017-02-10 Tom Tromey <tom@tromey.com>
14970
14971 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14972 "cleanup" local.
14973 * python/py-type.c (typy_legacy_template_argument): Remove
14974 unnecessary "cleanup" local.
14975
2bb8f231
TT
149762017-02-10 Tom Tromey <tom@tromey.com>
14977
14978 * python/python.c (do_start_initialization): New function, from
14979 _initialize_python.
14980 (_initialize_python): Call do_start_initialization.
14981 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14982 goto.
14983
1bdfaf42
TT
149842017-02-10 Tom Tromey <tom@tromey.com>
14985
14986 * python/py-prettyprint.c (pretty_print_one_value): Use
14987 gdbpy_ref.
14988
88b6faea
TT
149892017-02-10 Tom Tromey <tom@tromey.com>
14990
14991 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14992 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14993 gdbpy_ref.
14994 * python/py-type.c (field_new): Use gdbpy_ref.
14995 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14996 gdbpy_ref.
14997 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14998 (py_free_pspace): Likewise.
14999 (pspace_to_pspace_object): Likewise.
15000 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15001 (py_free_objfile): Likewise.
15002 (objfile_to_objfile_object): Likewise.
15003 * python/py-inferior.c (delete_thread_object): Use
15004 gdbpy_ref.
15005 (infpy_read_memory): Likewise.
15006 (py_free_inferior): Likewise.
15007 * python/py-evtregistry.c (create_eventregistry_object): Use
15008 gdbpy_ref.
15009 * python/py-event.c (create_event_object): Use gdbpy_ref.
15010
7780f186
TT
150112017-02-10 Tom Tromey <tom@tromey.com>
15012
15013 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15014 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15015 used.
15016 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15017 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15018 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15019 python/py-framefilter.c, python/py-function.c,
15020 python/py-inferior.c, python/py-infevents.c,
15021 python/py-linetable.c, python/py-newobjfileevent.c,
15022 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15023 python/py-signalevent.c, python/py-stopevent.c,
15024 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15025 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15026 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15027 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15028
d4b0bb18
TT
150292017-02-10 Tom Tromey <tom@tromey.com>
15030
15031 * ui-out.h (ui_out_emit_type): New class.
15032 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15033 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15034 and ui_out_emit_tuple.
15035 (enumerate_locals): Likewise.
15036 (py_mi_print_variables, py_print_locals, py_print_args): Use
15037 ui_out_emit_list.
15038 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15039 ui_out_emit_list.
15040 * common/gdb_optional.h: New file.
15041
f67f945c
MG
150422017-02-10 Martin Galvan <martingalvan@sourceware.org>
15043
15044 * MAINTAINERS (Write After Approval): Update my e-mail address.
15045
18da0c51
MG
150462017-02-10 Martin Galvan <martingalvan@sourceware.org>
15047
15048 PR gdb/21122
15049 * breakpoint.c (_initialize_breakpoint): Update the help description
15050 of the 'commands' command to indicate that it takes a list argument.
15051
62c14536
SM
150522017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15053
15054 * interps.c (current_interp_set_logging): Remove "return".
15055
ff6fa247
GB
150562017-02-09 Gary Benson <gbenson@redhat.com>
15057
15058 * symtab.c (add_symtab_completions): Prevent NULL pointer
15059 dereference.
15060
a474bd8e
PA
150612017-02-08 Pedro Alves <palves@redhat.com>
15062
15063 * interps.c (interp::interp): Remove reference to quiet_p.
15064 (interp_set): Make static. Remove dead "Switching to" output
15065 code.
15066 (interp_quiet_p, interp_set_quiet): Delete.
15067 (interpreter_exec_cmd): Don't set the interpreter quiet.
15068 * interps.h (interp_quiet_p): Make static.
15069 (class interp) <quiet_p>: Remove field
15070
3d7b173c
JG
150712017-02-08 Jerome Guitton <guitton@adacore.com>
15072
604c4576
JG
15073 * cli/cli-decode.c (find_command_name_length): Make it extern.
15074 * cli/cli-decode.h (find_command_name_length): Declare.
15075 * cli/cli-script.c (command_name_equals, line_first_arg):
15076 New functions.
15077 (process_next_line): Use cli-decode to parse command names.
15078 (build_command_line): Make args a constant pointer.
15079
150802017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15081
3d7b173c
JG
15082 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15083 Remove case-insensitive search.
15084
1291063d
JM
150852017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15086
15087 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15088 at the end of the line. Avoids an ARI warning.
15089
20b477a7
LM
150902017-02-06 Luis Machado <lgustavo@codesourcery.com>
15091
15092 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15093 rdseed instructions.
15094 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15095
3f7b46f2
IR
150962017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15097
15098 PR tdep/20936
15099 Provide and use sparc32 and sparc64 target description XML files.
15100 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15101 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15102 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15103 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15104 * features/sparc/sparc32-solaris.xml: New file.
15105 * features/sparc/sparc64-solaris.xml: New file.
15106 * features/sparc/sparc32-solaris.c: Generated.
15107 * features/sparc/sparc64-solaris.c: Generated.
15108 * sparc-tdep.h: Account for differences in target descriptions.
15109 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15110 (sparc32_register_type): Use target provided registers.
15111 (validate_tdesc_registers): New function.
15112 (sparc32_gdbarch_init): Use tdesc_has_registers.
15113 Set pseudoregister functions.
15114 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15115 (sparc64_register_type): Use target provided registers.
15116 (sparc64_init_abi): Set pseudoregister functions.
15117
f0fd41c1
TT
151182017-02-03 Tom Tromey <tom@tromey.com>
15119
15120 PR rust/21097:
15121 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15122 with a single member.
15123
d6f9b0fb
PA
151242017-02-03 Pedro Alves <palves@redhat.com>
15125
15126 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15127 (cli_interp_base::~cli_interp_base): New.
15128 (cli_interp): New struct.
15129 (as_cli_interp): Cast the interp itself to cli_interp.
15130 (cli_interpreter_pre_command_loop): Rename to ...
15131 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15132 parameter.
15133 (cli_interpreter_init): Rename to ...
15134 (cli_interp::init): ... this. Remove 'self' parameter. Use
15135 boolean. Make extern.
15136 (cli_interpreter_resume): Rename to ...
15137 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15138 extern.
15139 (cli_interpreter_suspend): Rename to ...
15140 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15141 extern.
15142 (cli_interpreter_exec): Rename to ...
15143 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15144 extern.
15145 (cli_interpreter_supports_command_editing): Rename to ...
15146 (cli_interp_base::supports_command_editing): ... this. Remove
15147 'interp' parameter. Make extern.
15148 (cli_ui_out): Rename to ...
15149 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15150 Make extern.
15151 (cli_set_logging): Rename to ...
15152 (cli_interp_base::set_logging): ... this. Remove 'interp'
15153 parameter. Make extern.
15154 (cli_interp_procs): Delete.
15155 (cli_interp_factory): Adjust to use "new".
15156 * cli/cli-interp.h: Include "interps.h".
15157 (struct cli_interp_base): New struct.
15158 * interps.c (struct interp): Delete. Fields moved to interps.h.
15159 (interp_new): Delete.
15160 (interp::interp, interp::~interp): New.
15161 (interp_set): Use bool, and return void. Assume the interpreter
15162 has suspend, init and resume methods, and that the all return
15163 void.
15164 (set_top_level_interpreter): interp_set returns void.
15165 (interp_ui_out): Adapt.
15166 (current_interp_set_logging): Adapt.
15167 (interp_data): Delete.
15168 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15169 (interp_exec): Adapt.
15170 (top_level_interpreter_data): Delete.
15171 * interps.h (interp_init_ftype, interp_resume_ftype)
15172 (interp_suspend_ftype, interp_exec_ftype)
15173 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15174 (class interp): New.
15175 (interp_new): Delete.
15176 (interp_set): Now returns void. Use bool.
15177 (interp_data, top_level_interpreter_data): Delete.
15178 * mi/mi-common.h: Include interps.h.
15179 (class mi_interp): Inherit from interp. Define a ctor. Declare
15180 init, resume, suspect, exec, interp_ui_out, set_logging and
15181 pre_command_loop methods.
15182 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15183 (mi_interpreter_init): Rename to ...
15184 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15185 bool, return void and make extern. Adjust.
15186 (mi_interpreter_resume): ... Rename to ...
15187 (mi_interp::resume): ... this. Remove the 'data' parameter,
15188 return void and make extern. Adjust.
15189 (mi_interpreter_suspend): ... Rename to ...
15190 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15191 return void and make extern. Adjust.
15192 (mi_interpreter_exec): ... Rename to ...
15193 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15194 extern. Adjust.
15195 (mi_interpreter_pre_command_loop): ... Rename to ...
15196 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15197 parameter and make extern.
15198 (mi_on_normal_stop_1): Adjust.
15199 (mi_ui_out): Rename to ...
15200 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15201 parameter and make extern. Adjust.
15202 (mi_set_logging): Rename to ...
15203 (mi_interp::set_logging): ... this. Remove the 'interp'
15204 parameter and make extern. Adjust.
15205 (mi_interp_procs): Delete.
15206 (mi_interp_factory): Adjust to use 'new'.
15207 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15208 (mi_print_exception, mi_execute_command, mi_load_progress):
15209 Adjust.
15210 * tui/tui-interp.c (tui_interp): New class.
15211 (as_tui_interp): Return a tui_interp pointer.
15212 (tui_on_normal_stop, tui_on_signal_received)
15213 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15214 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15215 to use interp::interp_ui_out.
15216 (tui_init): Rename to ...
15217 (tui_interp::init): ... this. Remove the 'self' parameter, use
15218 bool, return void and make extern. Adjust.
15219 (tui_resume): Rename to ...
15220 (tui_interp::resume): ... this. Remove the 'data' parameter,
15221 return void and make extern. Adjust.
15222 (tui_suspend): Rename to ...
15223 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15224 return void and make extern. Adjust.
15225 (tui_ui_out): Rename to ...
15226 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15227 parameter, and make extern. Adjust.
15228 (tui_exec): Rename to ...
15229 (tui_interp::exec): ... this. Remove the 'data' parameter and
15230 make extern.
15231 (tui_interp_procs): Delete.
15232 (tui_interp_factory): Use "new".
15233
65c40c95
TT
152342017-02-02 Tom Tromey <tom@tromey.com>
15235
15236 * rust-exp.y (ends_raw_string, space_then_number)
15237 (rust_identifier_start_p): Return bool.
15238 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15239 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15240 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15241 (rust_chartype_p): Return bool.
15242 (val_print_struct, rust_print_struct_def, rust_print_type):
15243 Update.
15244 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15245 Return bool.
15246
b50f188d
TT
152472017-02-02 Tom Tromey <tom@tromey.com>
15248
15249 * rust-lang.c: Reindent.
15250
03c85b11
TT
152512017-02-02 Tom Tromey <tom@tromey.com>
15252
15253 * rust-lang.h (rust_crate_for_block): Update.
15254 * rust-lang.c (rust_crate_for_block): Return std::string.
15255 (rust_get_disr_info): Use std:;string, not
15256 gdb::unique_xmalloc_ptr.
15257 * rust-exp.y (crate_name): Update.
15258
9b6da501
PA
152592017-02-02 Pedro Alves <palves@redhat.com>
15260
15261 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15262 field out of gdb_disassembler_test and make it static.
15263
ec4cb20b
PA
152642017-02-02 Pedro Alves <palves@redhat.com>
15265
15266 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15267 mi1_interp and mi_interp fields.
15268
5be5dbf0
PA
152692017-02-02 Pedro Alves <palves@redhat.com>
15270
616268b6
PA
15271 * cli/cli-interp.c (struct saved_output_files, saved_output):
15272 Moved from cli/cli-logging.c.
15273 (cli_set_logging): New function.
15274 (cli_interp_procs): Install cli_set_logging.
15275 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15276 Declare.
15277 * cli/cli-logging.c (struct saved_output_files, saved_output):
15278 Moved to cli/cli-interp.c.
15279 (pop_output_files): Don't save outputs here.
15280 (make_logging_output): New function.
15281 (handle_redirections): Don't build tee nor save previous outputs
15282 here.
15283 * interps.c (current_interp_set_logging): Change prototype.
15284 Assume there's always a set_logging_proc method installed.
15285 * interps.h (interp_set_logging_ftype): Change prototype.
15286 (current_interp_set_logging): Change prototype and adjust comment.
15287 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15288 use make_logging_output.
15289 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
152902017-02-02 Pedro Alves <palves@redhat.com>
15291
5be5dbf0
PA
15292 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15293 from ...
15294 (set_logging_overwrite): ... here.
15295 (logging_no_redirect_file): Delete.
15296 (set_logging_redirect): Don't handle redirection on the fly.
15297 Instead warn that "logging off" / "logging on" is necessary.
15298 (pop_output_files): Delete references to logging_no_redirect_file.
15299 (show_logging_command): Always speak in terms of what will happen
15300 once logging is reenabled.
15301
c99cc448
PA
153022017-02-02 Pedro Alves <palves@redhat.com>
15303
15304 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15305
8b172ce7
PA
153062017-02-02 Pedro Alves <palves@redhat.com>
15307
15308 * disasm.c (gdb_pretty_print_insn): Rename to ...
15309 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15310 Remove gdbarch parameter. Adapt to clear the object's buffers
15311 instead of allocating new buffers, and to print using the object's
15312 gdb_disassembler instead of calling gdb_print_insn.
15313 (dump_insns): Use gdb_pretty_print_disassembler.
15314 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15315 (gdb_pretty_print_disassembler): New class.
15316 * record-btrace.c (btrace_insn_history): Use
15317 gdb_pretty_print_disassembler.
15318
d7e74731
PA
153192017-02-02 Pedro Alves <palves@redhat.com>
15320
15321 * ada-lang.c (type_as_string): Use string_file.
15322 * ada-valprint.c (ada_print_floating): Use string_file.
15323 * ada-varobj.c (ada_varobj_scalar_image)
15324 (ada_varobj_get_value_image): Use string_file.
15325 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15326 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15327 * breakpoint.c (update_inserted_breakpoint_locations)
15328 (insert_breakpoint_locations, reattach_breakpoints)
15329 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15330 (print_it_watchpoint): Use string_file.
15331 (save_breakpoints): Use stdio_file.
15332 * c-exp.y (oper): Use string_file.
15333 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15334 tee_file.
15335 (pop_output_files): Use delete.
15336 (handle_redirections): Use stdio_file and tee_file.
15337 * cli/cli-setshow.c (do_show_command): Use string_file.
15338 * compile/compile-c-support.c (c_compute_program): Use
15339 string_file.
15340 * compile/compile-c-symbols.c (generate_vla_size): Take a
15341 'string_file &' instead of a 'ui_file *'.
15342 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15343 of a 'ui_file *'. Use string_file.
15344 (generate_c_for_variable_locations): Take a 'string_file &'
15345 instead of a 'ui_file *'.
15346 * compile/compile-internal.h (generate_c_for_for_one_variable):
15347 Take a 'string_file &' instead of a 'ui_file *'.
15348 * compile/compile-loc2c.c (push, pushf, unary, binary)
15349 (print_label, pushf_register_address, pushf_register)
15350 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15351 'ui_file *'. Adjust.
15352 * compile/compile.c (compile_to_object): Use string_file.
15353 * compile/compile.h (compile_dwarf_expr_to_c)
15354 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15355 'ui_file *'.
15356 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15357 (replace_typedefs_qualified_name): Use string_file and
15358 obstack_copy0.
15359 * disasm.c (gdb_pretty_print_insn): Use string_file.
15360 (gdb_disassembly): Adjust reference the null_stream global.
15361 (do_ui_file_delete): Delete.
15362 (gdb_insn_length): Use null_stream.
15363 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15364 * dwarf2loc.c (dwarf2_compile_property_to_c)
15365 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15366 'string_file &' instead of a 'ui_file *'.
15367 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15368 * dwarf2read.c (do_ui_file_peek_last): Delete.
15369 (dwarf2_compute_name): Use string_file.
15370 * event-top.c (gdb_setup_readline): Use stdio_file.
15371 * gdbarch.sh (verify_gdbarch): Use string_file.
15372 * gdbtypes.c (safe_parse_type): Use null_stream.
15373 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15374 string_file.
15375 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15376 'string_file *' instead of a 'ui_file *'.
15377 (gdbscm_arch_disassemble): Use string_file.
15378 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15379 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15380 inherits from ui_file.
15381 (ioscm_file_port_delete, ioscm_file_port_rewind)
15382 (ioscm_file_port_put): Delete.
15383 (ioscm_file_port_write): Rename to ...
15384 (ioscm_file_port::write): ... this. Remove file_port_magic
15385 checks.
15386 (ioscm_file_port_new): Delete.
15387 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15388 ui_file_up.
15389 * guile/scm-type.c (tyscm_type_name): Use string_file.
15390 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15391 Use string_file.
15392 * infcmd.c (print_return_value_1): Use string_file.
15393 * infrun.c (print_target_wait_results): Use string_file.
15394 * language.c (add_language): Use string_file.
15395 * location.c (explicit_to_string_internal): Use string_file.
15396 * main.c (captured_main_1): Use null_file.
15397 * maint.c (maintenance_print_architecture): Use stdio_file.
15398 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15399 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15400 event_channel>: Change type to mi_console_file pointer.
15401 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15402 (mi_console_file_delete): Delete.
15403 (struct mi_console_file): Delete.
15404 (mi_console_file_magic): Delete.
15405 (mi_console_file_new): Delete.
15406 (mi_console_file::mi_console_file): New.
15407 (mi_console_file_delete): Delete.
15408 (mi_console_file_fputs): Delete.
15409 (mi_console_file::write): New.
15410 (mi_console_raw_packet): Delete.
15411 (mi_console_file::flush): New.
15412 (mi_console_file_flush): Delete.
15413 (mi_console_set_raw): Rename to ...
15414 (mi_console_file::set_raw): ... this.
15415 * mi/mi-console.h (class mi_console_file): New class.
15416 (mi_console_file_new, mi_console_set_raw): Delete.
15417 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15418 (mi_set_logging): Use delete and tee_file. Adjust.
15419 * mi/mi-main.c (output_register): Use string_file.
15420 (mi_cmd_data_evaluate_expression): Use string_file.
15421 (mi_cmd_data_read_memory): Use string_file.
15422 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15423 * mi/mi-out.c (mi_ui_out::main_stream): New.
15424 (mi_ui_out::rewind): Use main_stream and
15425 string_file.
15426 (mi_ui_out::put): Use main_stream and string_file.
15427 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15428 Allocate a 'string_file' instead.
15429 (mi_out_new): Don't allocate a mem_fileopen stream here.
15430 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15431 (mi_ui_out::main_stream): Declare method.
15432 * printcmd.c (eval_command): Use string_file.
15433 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15434 * python/py-arch.c (archpy_disassemble): Use string_file.
15435 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15436 * python/py-frame.c (frapy_str): Use string_file.
15437 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15438 Use string_file.
15439 * python/py-type.c (typy_str): Use string_file.
15440 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15441 * python/py-value.c (valpy_str): Use string_file.
15442 * record-btrace.c (btrace_insn_history): Use string_file.
15443 * regcache.c (regcache_print): Use stdio_file.
15444 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15445 * remote.c (escape_buffer): Use string_file.
15446 * rust-lang.c (rust_get_disr_info): Use string_file.
15447 * serial.c (serial_open_ops_1): Use stdio_file.
15448 (do_serial_close): Use delete.
15449 * stack.c (print_frame_arg): Use string_file.
15450 (print_frame_args): Remove local mem_fileopen stream, not used.
15451 (print_frame): Use string_file.
15452 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15453 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15454 Take a 'string_file *' instead of a 'ui_file *'.
15455 * top.c (new_ui): Use stdio_file and stderr_file.
15456 (free_ui): Use delete.
15457 (execute_command_to_string): Use string_file.
15458 (quit_confirm): Use string_file.
15459 * tracepoint.c (collection_list::append_exp): Use string_file.
15460 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15461 * tui/tui-file.c: Don't include "ui-file.h".
15462 (enum streamtype, struct tui_stream): Delete.
15463 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15464 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15465 (tui_file::tui_file): New method.
15466 (tui_file_fputs): Delete.
15467 (tui_file_get_strbuf): Delete.
15468 (tui_file::puts): New method.
15469 (tui_file_adjust_strbuf): Delete.
15470 (tui_file_flush): Delete.
15471 (tui_file::flush): New method.
15472 * tui/tui-file.h: Tweak intro comment.
15473 Include ui-file.h.
15474 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15475 (tui_file_adjust_strbuf): Delete declarations.
15476 (class tui_file): New class.
15477 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15478 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15479 (tui_register_format): Use string_stream.
15480 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15481 (tui_get_function_from_frame): Use string_file.
15482 * typeprint.c (type_to_string): Use string_file.
15483 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15484 (null_stream): New global.
15485 (ui_file_delete): Delete.
15486 (ui_file::ui_file): New.
15487 (null_file_isatty): Delete.
15488 (ui_file::~ui_file): New.
15489 (null_file_rewind): Delete.
15490 (ui_file::printf): New.
15491 (null_file_put): Delete.
15492 (null_file_flush): Delete.
15493 (ui_file::putstr): New.
15494 (null_file_write): Delete.
15495 (ui_file::putstrn): New.
15496 (null_file_read): Delete.
15497 (ui_file::putc): New.
15498 (null_file_fputs): Delete.
15499 (null_file_write_async_safe): Delete.
15500 (ui_file::vprintf): New.
15501 (null_file_delete): Delete.
15502 (null_file::write): New.
15503 (null_file_fseek): Delete.
15504 (null_file::puts): New.
15505 (ui_file_data): Delete.
15506 (null_file::write_async_safe): New.
15507 (gdb_flush, ui_file_isatty): Adjust.
15508 (ui_file_put, ui_file_rewind): Delete.
15509 (ui_file_write): Adjust.
15510 (ui_file_write_for_put): Delete.
15511 (ui_file_write_async_safe, ui_file_read): Adjust.
15512 (ui_file_fseek): Delete.
15513 (fputs_unfiltered): Adjust.
15514 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15515 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15516 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15517 (set_ui_file_data): Delete.
15518 (string_file::~string_file, string_file::write)
15519 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15520 (do_ui_file_as_string, ui_file_as_string): Delete.
15521 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15522 (struct mem_file): Delete.
15523 (mem_file_new): Delete.
15524 (stdio_file::stdio_file): New.
15525 (mem_file_delete): Delete.
15526 (stdio_file::stdio_file): New.
15527 (mem_fileopen): Delete.
15528 (stdio_file::~stdio_file): New.
15529 (mem_file_rewind): Delete.
15530 (stdio_file::set_stream): New.
15531 (mem_file_put): Delete.
15532 (stdio_file::open): New.
15533 (mem_file_write): Delete.
15534 (stdio_file_magic, struct stdio_file): Delete.
15535 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15536 (stdio_file::flush): New.
15537 (stdio_file_read): Rename to ...
15538 (stdio_file::read): ... this. Adjust.
15539 (stdio_file_write): Rename to ...
15540 (stdio_file::write): ... this. Adjust.
15541 (stdio_file_write_async_safe): Rename to ...
15542 (stdio_file::write_async_safe) ... this. Adjust.
15543 (stdio_file_fputs): Rename to ...
15544 (stdio_file::puts) ... this. Adjust.
15545 (stdio_file_isatty): Delete.
15546 (stdio_file_fseek): Delete.
15547 (stdio_file::isatty): New.
15548 (stderr_file_write): Rename to ...
15549 (stderr_file::write) ... this. Adjust.
15550 (stderr_file_fputs): Rename to ...
15551 (stderr_file::puts) ... this. Adjust.
15552 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15553 (stderr_file::stderr_file): New.
15554 (tee_file_magic): Delete.
15555 (struct tee_file): Delete.
15556 (tee_file::tee_file): New.
15557 (tee_file_new): Delete.
15558 (tee_file::~tee_file): New.
15559 (tee_file_delete): Delete.
15560 (tee_file_flush): Rename to ...
15561 (tee_file::flush): ... this. Adjust.
15562 (tee_file_write): Rename to ...
15563 (tee_file::write): ... this. Adjust.
15564 (tee_file::write_async_safe): New.
15565 (tee_file_fputs): Rename to ...
15566 (tee_file::puts): ... this. Adjust.
15567 (tee_file_isatty): Rename to ...
15568 (tee_file::isatty): ... this. Adjust.
15569 * ui-file.h (struct obstack, struct ui_file): Don't
15570 forward-declare.
15571 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15572 (ui_file_write_ftype)
15573 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15574 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15575 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15576 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15577 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15578 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15579 (set_ui_file_fseek): Delete.
15580 (ui_file_data, ui_file_delete, ui_file_rewind)
15581 (struct ui_file): New.
15582 (ui_file_up): New.
15583 (class null_file): New.
15584 (null_stream): Declare.
15585 (ui_file_write_for_put, ui_file_put): Delete.
15586 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15587 Delete.
15588 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15589 (gdb_fopen, tee_file_new): Delete.
15590 (struct string_file): New.
15591 (struct stdio_file): New.
15592 (stdio_file_up): New.
15593 (struct stderr_file): New.
15594 (class tee_file): New.
15595 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15596 of a 'ui_file *'. Adjust.
15597 * ui-out.h (class ui_out) <field_stream>: Likewise.
15598 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15599 (null_stream): Delete.
15600 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15601 Adjust.
15602 * utils.h (struct ui_file): Delete forward declaration..
15603 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15604 (error_stream): Take a 'string_file &' instead of a
15605 'ui_file *'.
15606 * varobj.c (varobj_value_get_print_value): Use string_file.
15607 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15608 * gdbarch.c: Regenerate.
15609
187808b0
PA
156102017-02-02 Pedro Alves <palves@redhat.com>
15611
15612 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15613 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15614 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15615 Adjust to call gdb_print_insn instead of
15616 gdb_disassembler::print_insn.
15617 (dump_insns, do_mixed_source_and_assembly_deprecated)
15618 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15619 'gdbarch' parameter. Remove gdb_disassembler parameter.
15620 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15621 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15622 declaration.
15623 (gdb_pretty_print_insn): Re-add declaration.
15624 * record-btrace.c (btrace_insn_history): Don't allocate a
15625 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15626
7a8eb317
SM
156272017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15628
15629 * disasm.h (gdb_disassembly): Remove file_string parameter.
15630 * disasm.c (gdb_disassembly): Likewise.
15631 * cli/cli-cmds.c (print_disassembly): Adapt.
15632 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15633 * stack.c (do_gdb_disassembly): Likewise.
15634
7346ef59
AA
156352017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15636
15637 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15638 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15639 targets. And if the implicit value is longer than needed, extract
15640 the first bytes instead of the "least significant" ones.
15641
cd4007e4
MM
156422017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15643
15644 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15645 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15646 (btrace_fetch): Assert can_access_registers_ptid.
15647 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15648 validate_registers_access.
15649
cf77c34e
MM
156502017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15651
15652 * gdbthread.h (can_access_registers_ptid): New.
15653 * thread.c (can_access_registers_ptid): New.
15654
be85ce7d
PA
156552017-02-01 Pedro Alves <palves@redhat.com>
15656
15657 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15658
29b0b251
PA
156592017-01-31 Pedro Alves <palves@redhat.com>
15660
15661 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15662 Fix typos.
15663
289b5b24
PA
156642017-01-31 Pedro Alves <palves@redhat.com>
15665
15666 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15667 not used.
15668
b47413b4
PA
156692017-01-31 Pedro Alves <palves@redhat.com>
15670
15671 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15672
60adb36c
PA
156732017-01-31 Pedro Alves <palves@redhat.com>
15674
15675 * common/scoped_restore.h
15676 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15677 change the value's parameter type to T2.
15678 (make_scoped_restore): Likewise.
15679
2735833d
WT
156802017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15681 Richard Henderson <rth@redhat.com>
15682
15683 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15684 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15685 GS_BASE for older kernels.
15686 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15687 GS_BASE for older kernels.
15688 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15689 and GS_BASE to the offset table.
15690 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15691 system register group.
15692 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15693 for older kernels.
15694 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15695 amd64 ABI.
15696 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15697 AMD64_GSBASE_REGNUM.
15698 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15699 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15700 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15701 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15702 i386/64bit-segments.xml in those rules.
15703 * features/i386/64bit-segments.xml: New file.
15704 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15705 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15706 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15707 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15708 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15709 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15710 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15711 * features/i386/amd64-avx-linux.c: Regenerated.
15712 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15713 * features/i386/amd64-avx-mpx.c: Regenerated.
15714 * features/i386/amd64-avx512-linux.c: Regenerated.
15715 * features/i386/amd64-linux.c: Regenerated.
15716 * features/i386/amd64-mpx-linux.c: Regenerated.
15717 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15718 * features/i386/i386-avx-mpx.c: Regenerated.
15719 * features/i386/x32-avx-linux.c: Regenerated.
15720 * features/i386/x32-avx512-linux.c: Regenerated.
15721 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15722 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15723 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15724 * regformats/i386/amd64-linux.dat: Regenerated.
15725 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15726 * regformats/i386/x32-avx-linux.dat: Regenerated.
15727 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15728 * regformats/i386/x32-linux.dat: Regenerated.
15729
8884e97e
WT
157302017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15731
15732 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15733 Set to AMD64_NUM_REGS.
15734
7005d26a
WT
157352017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15736
15737 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15738 that checks validity of a register number.
15739
4bd2e1b2
KC
157402017-01-27 Kees Cook <keescook@google.com>
15741
15742 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15743 fetch_fpregs if target has fpa registers.
15744 (arm_linux_store_inferior_registers): Call store_fpregs if target
15745 has fpa registers.
15746
7cf1de6c
AA
157472017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15748
15749 * cris-tdep.c (cris_gdbarch_init): Remove check for
15750 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15751
874a1c8c
AT
157522017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15753
15754 * corelow.c (get_core_register_section): Check for regset
15755 existence before checking for REGSET_VARIABLE_SIZE.
15756
d8b49cf0
YQ
157572017-01-26 Yao Qi <yao.qi@linaro.org>
15758 Pedro Alves <palves@redhat.com>
15759
15760 PR gdb/20939
15761 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15762 call memory_error, save memaddr instead.
15763 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15764 negative, cal memory_error.
15765 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15766
658ca58c
YQ
157672017-01-26 Yao Qi <yao.qi@linaro.org>
15768
15769 * disasm-selftests.c (memory_error_test): New function.
15770 (_initialize_disasm_selftests): Register memory_error_test.
15771
79843d45
YQ
157722017-01-26 Yao Qi <yao.qi@linaro.org>
15773
15774 * Makefile.in (SFILES): Add disasm-selftests.c and
15775 selftest-arch.c.
15776 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15777 * disasm-selftests.c: New file.
15778 * selftest-arch.c: New file.
15779 * selftest-arch.h: New file.
15780
8cafda32
YQ
157812017-01-26 Yao Qi <yao.qi@linaro.org>
15782
15783 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15784 to bfd_arch_mep. Don't return 0 if section is not
15785 found. Call print_insn_mep.
15786
e47ad6c0
YQ
157872017-01-26 Pedro Alves <palves@redhat.com>
15788 Yao Qi <yao.qi@linaro.org>
15789
15790 * arm-tdep.c: Include "disasm.h".
15791 (gdb_print_insn_arm): Update code to get gdbarch.
15792 * disasm.c (dis_asm_read_memory): Change it to
15793 gdb_disassembler::dis_asm_read_memory.
15794 (dis_asm_memory_error): Likewise.
15795 (dis_asm_print_address): Likewise.
15796 (gdb_pretty_print_insn): Change it to
15797 gdb_disassembler::pretty_print_insn.
15798 (dump_insns): Add one argument gdb_disassemlber. All
15799 callers updated.
15800 (do_mixed_source_and_assembly_deprecated): Likewise.
15801 (do_mixed_source_and_assembly): Likewise.
15802 (do_assembly_only): Likewise.
15803 (gdb_disassembler::gdb_disassembler): New.
15804 (gdb_disassembler::print_insn): New.
15805 * disasm.h (class gdb_disassembler): New.
15806 (gdb_pretty_print_insn): Remove declaration.
15807 (gdb_disassemble_info): Likewise.
15808 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15809 (gdbscm_disasm_read_memory_worker): Update.
15810 (gdbscm_disasm_read_memory): Update.
15811 (gdbscm_disasm_memory_error): Remove.
15812 (gdbscm_disasm_print_address): Remove.
15813 (gdbscm_disassembler::gdbscm_disassembler): New.
15814 (gdbscm_print_insn_from_port): Update.
15815 * mips-tdep.c: Include disasm.h.
15816 (gdb_print_insn_mips): Update code to get gdbarch.
15817 * record-btrace.c (btrace_insn_history): Update.
15818 * spu-tdep.c: Include disasm.h.
15819 (struct spu_dis_asm_data): Remove.
15820 (struct spu_dis_asm_info): New.
15821 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15822 SPU id.
15823 (gdb_print_insn_spu): Cast disassemble_info to
15824 spu_dis_asm_info.
15825
80d75874
YQ
158262017-01-26 Yao Qi <yao.qi@linaro.org>
15827
15828 * disasm.c (do_ui_file_delete): Delete.
15829 (gdb_insn_length): Move code creating stream to ...
15830 * utils.c (null_stream): ... here. New function.
15831 * utils.h (null_stream): Declare.
15832
60685cd0
SM
158332017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15834
15835 * python/py-inferior.c (find_thread_object): Return directly
15836 from the loop. Remove "found" variable.
15837
eb1cdb62
JB
158382017-01-21 Joel Brobecker <brobecker@adacore.com>
15839
15840 GDB 7.12.1 released.
15841
b1ce6568
SM
158422017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15843
15844 * python/py-function.c (fnpy_call): Reorder declarations to have
15845 the gdbpy_enter object declared first.
15846 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15847
6f8b0407
SM
158482017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15849
fec93fb1 15850 PR python/21068
6f8b0407
SM
15851 * python/python-internal.h (PyMem_RawMalloc): Define for
15852 Python < 3.4.
15853 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15854 PyMem_RawMalloc instead of PyMem_Malloc.
15855
78cbbba8
LM
158562017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15857 Luis Machado <lgustavo@codesourcery.com>
15858
15859 * NEWS (New commands): Mention flash-erase.
15860 (New MI commands): Mention target-flash-erase.
15861 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15862 command.
15863 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15864 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15865 * target.c (flash_erase_command): New function.
15866 (initialize_targets): Add new flash-erase command.
15867 * target.h (flash_erase_command): New declaration.
15868
2132fe85
JB
158692017-01-20 Joel Brobecker <brobecker@adacore.com>
15870
15871 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15872 HAVE_SYS_PROCFS_H is defined.
15873
d1dff226
AH
158742017-01-18 Alan Hayward <alan.hayward@arm.com>
15875
15876 * remote.c (struct cached_reg): Change data into a pointer.
15877 * (stop_reply_dtr): Free data pointers before deleting vector.
15878 (process_stop_reply): Likewise.
15879 (remote_parse_stop_reply): Allocate space for data
15880
9890e433
AH
158812017-01-18 Alan Hayward <alan.hayward@arm.com>
15882
15883 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15884 MAX_REGISTER_SIZE.
15885 (amd64_pseudo_register_read_value): Likewise.
15886 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15887 (store_register_using_P): Likewise.
15888 * regcache.c (regcache_xfer_part): Likewise.
15889
7a36499a
IR
158902017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15891
15892 Split real and pseudo registers.
15893 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15894 (sparc32_pseudo_regnum): New enum.
15895 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15896 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15897 (SPARC32_CP0_REGISTERS): New macro.
15898 (sparc32_pseudo_register_name): New function.
15899 (sparc32_register_name): Use sparc32_pseudo_register_name.
15900 (sparc32_pseudo_register_type): New function.
15901 (sparc32_register_type): Use sparc32_pseudo_register_type.
15902 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15903 pseudo register numbers.
15904 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15905 (SPARC64_CP0_REGISTERS): New macro.
15906 (sparc64_pseudo_register_name): New function.
15907 (sparc64_register_name): Use sparc64_pseudo_register_name.
15908 (sparc64_pseudo_register_type): New function.
15909 (sparc64_register_type): Use sparc64_pseudo_register_type.
15910 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15911 pseudo register numbers.
15912 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15913 sparc64_store_arguments): Handle pseudo register numbers.
15914
6f8976bf
YQ
159152017-01-13 Yao Qi <yao.qi@linaro.org>
15916
15917 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15918 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15919 output.
15920 (getpkt_or_notif_sane_1): Likewise.
15921
e4241ace
YQ
159222017-01-13 Yao Qi <yao.qi@linaro.org>
15923
15924 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15925 of CC. Pass "-x c++-header" instead of "-x c".
15926
3015c064
SM
159272017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15928
15929 * remote.c (remote_can_async_p): Update comment.
15930
fde1b17d
SM
159312017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15932
15933 * linux-nat.c (linux_nat_can_async_p): Update comment.
15934
ca1ca08b
SM
159352017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15936
15937 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15938
4ad2da73
SM
159392017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15940
15941 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15942
c8b23b3f
TT
159432017-01-10 Tom Tromey <tom@tromey.com>
15944
15945 * python/py-type.c (typy_legacy_template_argument): Update.
15946 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15947 ~demangle_parse_info): Declare new members.
15948 (cp_demangled_name_to_comp): Return unique_ptr.
15949 (cp_demangled_name_parse_free)
15950 (make_cleanup_cp_demangled_name_parse_free)
15951 (cp_new_demangle_parse_info): Remove.
15952 * cp-support.c (do_demangled_name_parse_free_cleanup)
15953 (make_cleanup_cp_demangled_name_parse_free): Remove.
15954 (inspect_type, cp_canonicalize_string_full)
15955 (cp_canonicalize_string): Update.
15956 (mangled_name_to_comp): Change return type.
15957 (cp_class_name_from_physname, method_name_from_physname)
15958 (cp_func_name, cp_remove_params): Update.
15959 * cp-name-parser.y (demangle_parse_info): New constructor, from
15960 cp_new_demangle_parse_info.
15961 (~demangle_parse_info): New destructor, from
15962 cp_demangled_name_parse_free.
15963 (cp_merge_demangle_parse_infos): Update.
15964 (cp_demangled_name_to_comp): Change return type.
15965
1ac32117
TT
159662017-01-10 Tom Tromey <tom@tromey.com>
15967
15968 * top.c (prevent_dont_repeat): Change return type.
15969 * python/python.c (execute_gdb_command): Use std::string.
15970 Update.
15971 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15972 * command.h (prevent_dont_repeat): Change return type.
15973 * breakpoint.c (bpstat_do_actions_1): Update.
15974
0cf08227
TT
159752017-01-10 Tom Tromey <tom@tromey.com>
15976
15977 * value.h (scoped_value_mark::~scoped_value_mark): Call
15978 free_to_mark.
15979 (scoped_value_mark::free_to_mark): New method.
15980 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15981 scoped_value_mark.
15982
eb115069
TT
159832017-01-10 Tom Tromey <tom@tromey.com>
15984
15985 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15986 (valpy_reference_value, valpy_const_value, valpy_get_address)
15987 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15988 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15989 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15990 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15991 scoped_value_mark.
15992 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15993 * value.h (scoped_value_mark): New class.
15994
906768f9
TT
159952017-01-10 Tom Tromey <tom@tromey.com>
15996
15997 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15998 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15999 * psymtab.c (discard_psymtabs_upto): Remove.
16000 (make_cleanup_discard_psymtabs): Remove.
16001 (struct psymtab_state): Remove.
16002
bef155c3
TT
160032017-01-10 Tom Tromey <tom@tromey.com>
16004
16005 * record-full.c (record_full_save_cleanups): Remove.
16006 (record_full_save): Use gdb::unlinker.
16007 * gcore.c (do_bfd_delete_cleanup): Remove.
16008 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16009 cleanups.
16010 * dwarf2read.c (unlink_if_set): Remove.
16011 (write_psymtabs_to_index): Use gdb::unlinker.
16012 * common/gdb_unlinker.h: New file.
16013
192b62ce
TT
160142017-01-10 Tom Tromey <tom@tromey.com>
16015
16016 * windows-tdep.c (windows_xfer_shared_library): Update.
16017 * windows-nat.c (windows_make_so): Update.
16018 * utils.h (make_cleanup_bfd_unref): Remove.
16019 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16020 * symfile.h (symfile_bfd_open)
16021 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16022 * symfile.c (read_symbols, symbol_file_add)
16023 (separate_debug_file_exists): Update.
16024 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16025 (generic_load, reread_symbols): Update.
16026 * symfile-mem.c (symbol_file_add_from_memory): Update.
16027 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16028 (spu_symbol_file_add_from_memory): Update.
16029 * solist.h (struct target_so_ops) <bfd_open>: Return
16030 gdb_bfd_ref_ptr.
16031 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16032 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16033 gdb_bfd_ref_ptr.
16034 (solib_map_sections, reload_shared_libraries_1): Update.
16035 * solib-svr4.c (enable_break): Update.
16036 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16037 * solib-frv.c (enable_break2): Update.
16038 * solib-dsbt.c (enable_break): Update.
16039 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16040 gdb_bfd_ref_ptr.
16041 (darwin_solib_get_all_image_info_addr_at_init): Update.
16042 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16043 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16044 * record-full.c (record_full_save): Update.
16045 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16046 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16047 * minidebug.c (find_separate_debug_file_in_section): Return
16048 gdb_bfd_ref_ptr.
16049 * machoread.c (macho_add_oso_symfile): Change abfd to
16050 gdb_bfd_ref_ptr.
16051 (macho_symfile_read_all_oso): Update.
16052 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16053 (macho_symfile_read): Update.
16054 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16055 (jit_bfd_try_read_symtab): Update.
16056 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16057 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16058 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16059 gdb_bfd_ref_ptr.
16060 (gdb_bfd_ref_policy): New struct.
16061 (gdb_bfd_ref_ptr): New typedef.
16062 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16063 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16064 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16065 gdb_bfd_ref_ptr.
16066 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16067 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16068 (gcore_command): Update.
16069 * exec.c (exec_file_attach): Update.
16070 * elfread.c (elf_symfile_read): Update.
16071 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16072 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16073 (open_and_init_dwo_file): Update.
16074 (open_dwp_file): Return gdb_bfd_ref_ptr.
16075 (open_and_init_dwp_file): Update.
16076 * corelow.c (core_open): Update.
16077 * compile/compile-object-load.c (compile_object_load): Update.
16078 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16079 * coffread.c (coff_symfile_read): Update.
16080 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16081 gdb_bfd_ref_ptr. Rename.
16082 (dump_bfd_file, restore_command): Update.
16083 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16084 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16085 (find_separate_debug_file_by_buildid): Update.
16086
50315b21
TT
160872017-01-10 Tom Tromey <tom@tromey.com>
16088
16089 * common/gdb_ref_ptr.h: New file.
16090 * python/py-ref.h (struct gdbpy_ref_policy): New.
16091 (gdbpy_ref): Now a typedef.
16092
fc4007c9
TT
160932017-01-10 Tom Tromey <tom@tromey.com>
16094
16095 * utils.h (make_cleanup_htab_delete): Don't declare.
16096 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16097 Remove.
16098 * linespec.c (decode_compound_collector): Add constructor,
16099 destructor.
16100 (lookup_prefix_sym): Remove cleanup.
16101 (symtab_collector): Add constructor, destructor.
16102 (collect_symtabs_from_filename): Remove cleanup.
16103 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16104 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16105 Use htab_up.
16106 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16107 * dwarf2read.c (dw2_expand_symtabs_matching)
16108 (dw2_map_symbol_filenames, dwarf_decode_macros)
16109 (write_psymtabs_to_index): Use htab_up.
16110 * dwarf2loc.c (func_verify_no_selftailcall)
16111 (call_site_find_chain_1, func_verify_no_selftailcall)
16112 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16113 std::vector, gdb::unique_xmalloc_ptr.
16114 (call_sitep): Remove typedef.
16115 (dwarf2_locexpr_baton_eval): Remove unused variable.
16116
8dbcee67
TT
161172017-01-10 Tom Tromey <tom@tromey.com>
16118
16119 * python/python-internal.h (make_cleanup_py_decref)
16120 (make_cleanup_py_xdecref): Don't declare.
16121 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16122 (py_xdecref, make_cleanup_py_xdecref): Remove.
16123
13df46cc
TT
161242017-01-10 Tom Tromey <tom@tromey.com>
16125
16126 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16127 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16128
06fc9bf7
TT
161292017-01-10 Tom Tromey <tom@tromey.com>
16130
16131 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16132
830a4934
TT
161332017-01-10 Tom Tromey <tom@tromey.com>
16134
16135 * python/py-utils.c (unicode_to_encoded_string)
16136 (python_string_to_target_string)
16137 (python_string_to_target_python_string)
16138 (python_string_to_host_string, gdbpy_obj_to_string)
16139 (get_addr_from_python): Use gdbpy_ref.
16140
4586d543
TT
161412017-01-10 Tom Tromey <tom@tromey.com>
16142
16143 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16144 gdbpy_ref.
16145
59876f8f
TT
161462017-01-10 Tom Tromey <tom@tromey.com>
16147
16148 * python/python.c (eval_python_command, gdbpy_decode_line)
16149 (gdbpy_run_events, gdbpy_start_type_printers)
16150 (gdbpy_apply_type_printers): Use gdbpy_ref.
16151
97d83487
TT
161522017-01-10 Tom Tromey <tom@tromey.com>
16153
16154 * python/py-param.c (get_doc_string, compute_enum_values): Use
16155 gdbpy_ref.
16156
9205649a
TT
161572017-01-10 Tom Tromey <tom@tromey.com>
16158
16159 * python/py-inferior.c (find_thread_object, build_inferior_list):
16160 Use gdbpy_ref.
16161
74c49d45
TT
161622017-01-10 Tom Tromey <tom@tromey.com>
16163
16164 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16165
16361ffb
TT
161662017-01-10 Tom Tromey <tom@tromey.com>
16167
16168 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16169 gdbpy_ref.
16170
905f2cca
TT
161712017-01-10 Tom Tromey <tom@tromey.com>
16172
16173 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16174 extra incref.
16175 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16176 Use gdbpy_ref.
16177
64081434
TT
161782017-01-10 Tom Tromey <tom@tromey.com>
16179
16180 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16181 gdbpy_ref.
16182
59e9e831
TT
161832017-01-10 Tom Tromey <tom@tromey.com>
16184
16185 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16186 decref results of PyArg_ParseTupleAndKeywords.
16187
9de10f6d
TT
161882017-01-10 Tom Tromey <tom@tromey.com>
16189
16190 * python/python.c (python_run_simple_file): Use
16191 unique_xmalloc_ptr, gdbpy_ref.
16192
2bd5759d
TT
161932017-01-10 Tom Tromey <tom@tromey.com>
16194
16195 * python/py-prettyprint.c (print_stack_unless_memory_error)
16196 (print_string_repr, print_children): Use gdbpy_ref.
16197 (dummy_python_frame): New class.
16198 (dummy_python_frame::dummy_python_frame): Rename from
16199 push_dummy_python_frame.
16200 (py_restore_tstate): Remove.
16201
3b4e0e01
TT
162022017-01-10 Tom Tromey <tom@tromey.com>
16203
16204 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16205
17a22718
TT
162062017-01-10 Tom Tromey <tom@tromey.com>
16207
16208 * python/python.c (ensure_python_env, restore_python_env):
16209 Remove.
16210 * python/python-internal.h (ensure_python_env): Don't declare.
16211 * varobj.h (varobj_ensure_python_env): Don't declare.
16212 * varobj.c (varobj_ensure_python_env): Remove.
16213
68cdc557
TT
162142017-01-10 Tom Tromey <tom@tromey.com>
16215
16216 * varobj.c (varobj_value_get_print_value): Use
16217 gdbpy_enter_varobj.
16218
1eba6383
TT
162192017-01-10 Tom Tromey <tom@tromey.com>
16220
16221 * python/py-prettyprint.c (print_string_repr, print_children):
16222 Update.
16223 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16224 of "encoding".
16225 * varobj.c (varobj_value_get_print_value): Update.
16226 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16227
bde7b3e3
TT
162282017-01-10 Tom Tromey <tom@tromey.com>
16229
16230 * varobj.c (varobj_get_display_hint)
16231 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16232 (varobj_set_visualizer, free_variable): Use
16233 gdbpy_enter_varobj.
16234
a7785f8c
TT
162352017-01-10 Tom Tromey <tom@tromey.com>
16236
16237 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16238 (do_finish_initialization): New function. Use gdbpy_ref.
16239 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16240 do_finish_initialization.
16241
2865bfce
TT
162422017-01-10 Tom Tromey <tom@tromey.com>
16243
16244 * python/py-param.c (get_set_value, get_show_value): Use
16245 gdbpy_enter, gdbpy_ref.
16246
0e9dcc75
TT
162472017-01-10 Tom Tromey <tom@tromey.com>
16248
16249 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16250
12a5cedd
TT
162512017-01-10 Tom Tromey <tom@tromey.com>
16252
16253 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16254
788f2586
TT
162552017-01-10 Tom Tromey <tom@tromey.com>
16256
16257 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16258 Use gdbpy_enter_varobj.
16259
6cd67bea
TT
162602017-01-10 Tom Tromey <tom@tromey.com>
16261
16262 * varobj.c (gdbpy_enter_varobj): New constructor.
16263 * python/python-internal.h (gdbpy_enter_varobj): New class.
16264 * python/py-varobj.c (py_varobj_get_iterator): Use
16265 gdbpy_enter_varobj.
16266
14b122bf
TT
162672017-01-10 Tom Tromey <tom@tromey.com>
16268
16269 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16270 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16271 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16272 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16273 unique_xmalloc_ptr.
16274 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16275
bf1ca3b9
TT
162762017-01-10 Tom Tromey <tom@tromey.com>
16277
16278 * python/py-xmethods.c (invoke_match_method): Use
16279 gdbpy_ref.
16280
572a5524
TT
162812017-01-10 Tom Tromey <tom@tromey.com>
16282
16283 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16284 gdbpy_enter, gdbpy_ref.
16285
396a78b6
TT
162862017-01-10 Tom Tromey <tom@tromey.com>
16287
16288 * python/python.c (python_interactive_command): Use gdbpy_enter.
16289
a88b13c7
TT
162902017-01-10 Tom Tromey <tom@tromey.com>
16291
16292 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16293 gdbpy_ref.
16294
e9f0c363
TT
162952017-01-10 Tom Tromey <tom@tromey.com>
16296
16297 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16298 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16299
6349f452
TT
163002017-01-10 Tom Tromey <tom@tromey.com>
16301
16302 * utils.h (htab_deleter): New struct.
16303 (htab_up): New typedef.
16304 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16305 gdbpy_enter, gdbpy_ref, htab_up.
16306
c0171de6
TT
163072017-01-10 Tom Tromey <tom@tromey.com>
16308
16309 * python/py-unwind.c (pending_frame_invalidate): Remove.
16310 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16311
f18e226f
TT
163122017-01-10 Tom Tromey <tom@tromey.com>
16313
16314 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16315 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16316
c57af3f1
TT
163172017-01-10 Tom Tromey <tom@tromey.com>
16318
16319 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16320
60e600ec
TT
163212017-01-10 Tom Tromey <tom@tromey.com>
16322
16323 * python/python.c (gdbpy_eval_from_control_command)
16324 (gdbpy_source_script, gdbpy_run_events)
16325 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16326 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16327 gdbpy_enter.
16328
bf7da5b0
TT
163292017-01-10 Tom Tromey <tom@tromey.com>
16330
16331 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16332
2d38bced
TT
163332017-01-10 Tom Tromey <tom@tromey.com>
16334
16335 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16336
07bc7329
TT
163372017-01-10 Tom Tromey <tom@tromey.com>
16338
16339 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16340 (python_on_inferior_call_pre, python_on_inferior_call_post)
16341 (python_on_memory_change, python_on_register_change)
16342 (python_inferior_exit, python_new_objfile, add_thread_object)
16343 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16344
6e7c365e
TT
163452017-01-10 Tom Tromey <tom@tromey.com>
16346
16347 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16348 (bpfinishpy_handle_exit): Use gdbpy_enter.
16349
6ba0cd40
TT
163502017-01-10 Tom Tromey <tom@tromey.com>
16351
16352 * python/py-cmd.c (cmdpy_destroyer)
16353 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16354 gdbpy_enter.
16355
de2dc875
TT
163562017-01-10 Tom Tromey <tom@tromey.com>
16357
16358 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16359 gdbpy_enter.
16360 (gdbpy_breakpoint_has_cond): Likewise.
16361
4ecee2c4
TT
163622017-01-10 Tom Tromey <tom@tromey.com>
16363
16364 * python/python.c (gdbpy_enter): New constructor.
16365 (~gdbpy_enter): New destructor.
16366 (restore_python_env, ensure_python_env): Rewrite.
16367 * python/python-internal.h (gdbpy_enter): New class.
16368
37fce74f
TT
163692017-01-10 Tom Tromey <tom@tromey.com>
16370
16371 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16372
53a0cca3
TT
163732017-01-10 Tom Tromey <tom@tromey.com>
16374
16375 * python/py-value.c (value_has_field, get_field_flag)
16376 (get_field_type, valpy_getitem, convert_value_from_python): Use
16377 gdbpy_ref.
16378
ff3724f5
TT
163792017-01-10 Tom Tromey <tom@tromey.com>
16380
16381 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16382 gdbpy_ref.
16383
0700aea5
TT
163842017-01-10 Tom Tromey <tom@tromey.com>
16385
16386 * python/py-prettyprint.c (search_pp_list)
16387 (find_pretty_printer_from_objfiles)
16388 (find_pretty_printer_from_progspace)
16389 (find_pretty_printer_from_gdb, find_pretty_printer)
16390 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16391 gdbpy_ref.
16392
1bb44c9f
TT
163932017-01-10 Tom Tromey <tom@tromey.com>
16394
16395 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16396
87ce03fd
TT
163972017-01-10 Tom Tromey <tom@tromey.com>
16398
16399 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16400 (ltpy_get_all_source_lines): Use gdbpy_ref.
16401
ee0a3fb8
TT
164022017-01-10 Tom Tromey <tom@tromey.com>
16403
16404 * python/py-framefilter.c (extract_sym, extract_value)
16405 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16406 gdbpy_ref.
16407
bf2a52fa
TT
164082017-01-10 Tom Tromey <tom@tromey.com>
16409
16410 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16411
f59fe7f8
TT
164122017-01-10 Tom Tromey <tom@tromey.com>
16413
16414 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16415
80bd970a
TT
164162017-01-10 Tom Tromey <tom@tromey.com>
16417
16418 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16419 gdbpy_ref.
16420
d1b3de2e
TT
164212017-01-10 Tom Tromey <tom@tromey.com>
16422
16423 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16424
3bb43384
TT
164252017-01-10 Tom Tromey <tom@tromey.com>
16426
16427 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16428 (typy_range): Use gdbpy_ref.
16429
abf5651e
TT
164302017-01-10 Tom Tromey <tom@tromey.com>
16431
16432 * python/py-threadevent.c (create_thread_event_object): Use
16433 gdbpy_ref.
16434 * python/py-stopevent.c (create_stop_event_object): Simplify.
16435 (emit_stop_event): Use gdbpy_ref.
16436 * python/py-signalevent.c (create_signal_event_object): Use
16437 gdbpy_ref.
16438 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16439 (emit_new_objfile_event, create_clear_objfiles_event_object)
16440 (emit_clear_objfiles_event): Use gdbpy_ref.
16441 * python/py-infevents.c (create_inferior_call_event_object)
16442 (create_register_changed_event_object)
16443 (create_memory_changed_event_object, emit_inferior_call_event)
16444 (emit_memory_changed_event, emit_register_changed_event): Use
16445 gdbpy_ref.
16446 * python/py-exitedevent.c (create_exited_event_object)
16447 (emit_exited_event): Use gdbpy_ref.
16448 * python/py-event.h (evpy_emit_event): Remove
16449 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16450 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16451 * python/py-continueevent.c (emit_continue_event): Use
16452 gdbpy_ref.
16453 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16454 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16455 gdbpy_ref.
16456 * python/py-bpevent.c (create_breakpoint_event_object): Use
16457 gdbpy_ref.
16458
a68ff33e
TT
164592017-01-10 Tom Tromey <tom@tromey.com>
16460
16461 * python/py-ref.h: New file.
16462
7becfd03
SM
164632017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16464
16465 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16466 void.
16467 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16468 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16469 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16470 * ui-out.c (ui_out::redirect): Likewise.
16471 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16472 * cli/cli-logging.c (set_logging_redirect): Update call site of
16473 ui_out::redirect.
16474 (handle_redirections): Likewise.
16475 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16476 * top.c (execute_command_to_string): Likewise.
16477 * utils.c (do_ui_out_redirect_pop): Likewise.
16478
df294654
SM
164792017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16480
16481 * stack.c (_initialize_stack): Update "frame" command help message.
16482
f5e6296e
IB
164832017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16484
16485 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16486
0e2d6fa6
YQ
164872017-01-06 Yao Qi <yao.qi@linaro.org>
16488
16489 * x86-linux-nat.h: Include gdb_proc_service.h.
16490
44d6d3f9
YQ
164912017-01-06 Yao Qi <yao.qi@linaro.org>
16492
16493 * ser-base.h: Include serial.h.
16494
656731fe
YQ
164952017-01-06 Yao Qi <yao.qi@linaro.org>
16496
16497 * ppc-linux-tdep.h: Include ppc-tdep.h.
16498
1ca8f924
YQ
164992017-01-06 Yao Qi <yao.qi@linaro.org>
16500
16501 * nat/amd64-linux-siginfo.h: Include signal.h.
16502
bc3008c4
YQ
165032017-01-06 Yao Qi <yao.qi@linaro.org>
16504
16505 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16506
66c80d03
YQ
165072017-01-06 Yao Qi <yao.qi@linaro.org>
16508
16509 * mi/mi-parse.h: Include mi-cmds.h.
16510
051d2dda
YQ
165112017-01-06 Yao Qi <yao.qi@linaro.org>
16512
16513 * inf-loop.c: Don't include "target.h".
16514 * inf-loop.h: Include it here.
16515
8018d34f
YQ
165162017-01-06 Yao Qi <yao.qi@linaro.org>
16517
16518 * dfp.h: Include "dboulest.h" and "expression.h".
16519
c0b8369c
YQ
165202017-01-06 Yao Qi <yao.qi@linaro.org>
16521
16522 * ax-gdb.h: Include "ax.h".
16523
ad5cba2a
YQ
165242017-01-06 Yao Qi <yao.qi@linaro.org>
16525
16526 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16527 with nat/gdb_ptrace.h.
16528
1c33cd7f
YQ
165292017-01-05 Yao Qi <yao.qi@linaro.org>
16530
16531 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16532 new line.
16533 (mips64_fbsd_sigframe_init): Likewise.
16534
c988ac1d
JB
165352017-01-04 John Baldwin <jhb@FreeBSD.org>
16536
16537 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16538 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16539
b268007c
JB
165402017-01-04 John Baldwin <jhb@FreeBSD.org>
16541
16542 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16543 * NEWS: Mention new FreeBSD/mips native configuration.
16544 * config/mips/fbsd.mh: New file.
16545 * configure.host: Add mips*-*-freebsd*.
16546 * mips-fbsd-nat.c: New file.
16547
387360da
JB
165482017-01-04 John Baldwin <jhb@FreeBSD.org>
16549
16550 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16551 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16552 * NEWS: Mention new FreeBSD/mips target.
16553 * configure.tgt: Add mips*-*-freebsd*.
16554 * mips-fbsd-tdep.c: New file.
16555 * mips-fbsd-tdep.h: New file.
16556
2aaaf250
YQ
165572017-01-04 Yao Qi <yao.qi@linaro.org>
16558
16559 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16560 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16561
61baf725
JB
165622017-01-01 Joel Brobecker <brobecker@adacore.com>
16563
6dbb839a 16564 Update copyright year range in all GDB files.
61baf725 16565
c113e7ff 165662017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16567
c113e7ff 16568 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16569
c113e7ff 16570For older changes see ChangeLog-2016.
c906108c
SS
16571\f
16572Local Variables:
16573mode: change-log
16574left-margin: 8
16575fill-column: 74
16576version-control: never
57da7796 16577coding: utf-8
c906108c 16578End:
This page took 3.720013 seconds and 4 git commands to generate.