Change tic6x target descriptions
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
506fe5f4
YQ
12017-11-24 Yao Qi <yao.qi@linaro.org>
2
3 * arch/tic6x.c: New file.
4 * arch/tic6x.h: New file.
5 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
6 tic6x-core.xml and tic6x-gp.xml.
7 * features/tic6x-c6xp.c: Generated.
8 * features/tic6x-core.c: Generated.
9 * features/tic6x-gp.c: Generated.
10 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
11 "tic6x-".
12
00ea2e2a
SM
132017-11-23 Simon Marchi <simon.marchi@ericsson.com>
14
15 * mi/mi-main.c (list_available_thread_groups): Change map value
16 type to std::vector.
17
f45e2a77
SM
182017-11-23 Simon Marchi <simon.marchi@ericsson.com>
19
20 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
21
bd046f64
SM
222017-11-23 Simon Marchi <simon.marchi@ericsson.com>
23
24 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
25 back to...
26 <children_requested>: ... this.
27 (varobj_get_num_children, varobj_update): Adjust.
28
4c37490d
SM
292017-11-23 Simon Marchi <simon.marchi@ericsson.com>
30
31 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
32 (ada_value_has_mutated): Likewise.
33 * c-varobj.c (varobj_is_anonymous_child): Likewise.
34 (c_is_path_expr_parent): Likewise.
35 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
36 (mi_cmd_var_set_frozen): Likewise.
37 (mi_cmd_var_update_iter): Likewise.
38 (mi_cmd_var_update): Likewise.
39 * varobj.c (pretty_printing): Likewise.
40 (varobj_enable_pretty_printing): Likewise.
41 (struct varobj_root) <floating, is_valid>: Likewise.
42 (struct varobj_dynamic) <children_requested>: Likewise.
43 (delete_variable): Likewise.
44 (delete_variable_1): Likewise.
45 (install_variable): Likewise.
46 (update_type_if_necessary): Likewise.
47 (install_new_value): Likewise.
48 (value_of_root): Likewise.
49 (is_root_p): Likewise.
50 (varobj_create): Likewise.
51 (varobj_delete): Likewise.
52 (varobj_has_more): Likewise.
53 (varobj_set_frozen): Likewise.
54 (varobj_get_frozen): Likewise.
55 (install_dynamic_child): Likewise.
56 (dynamic_varobj_has_child_method): Likewise.
57 (update_dynamic_varobj_children): Likewise.
58 (varobj_get_num_children): Likewise.
59 (varobj_list_children): Likewise.
60 (is_path_expr_parent): Likewise.
61 (varobj_default_is_path_expr_parent): Likewise.
62 (varobj_is_dynamic_p): Likewise.
63 (varobj_set_value): Likewise.
64 (varobj_value_has_mutated): Likewise.
65 (varobj_update): Likewise.
66 (check_scope): Likewise.
67 (value_of_root_1): Likewise.
68 (varobj_value_get_print_value): Likewise.
69 (varobj_editable_p): Likewise.
70 (varobj_value_is_changeable_p): Likewise.
71 (varobj_floating_p): Likewise.
72 (varobj_default_value_is_changeable_p): Likewise.
73 (varobj_invalidate_iter): Likewise.
74 * varobj.h (struct varobj_update_result) <type_changed,
75 children_changed, changed, value_installed>: Likewise.
76 (struct varobj) <updated, frozen, not_fetched>: Likewise.
77 (struct lang_varobj_ops) <value_is_changeable_p,
78 value_has_mutated, is_path_expr_parent>: Likewise.
79 (varobj_delete): Likewise.
80 (varobj_set_frozen): Likewise.
81 (varobj_get_frozen): Likewise.
82 (varobj_set_value): Likewise.
83 (varobj_update): Likewise.
84 (varobj_editable_p): Likewise.
85 (varobj_floating_p): Likewise.
86 (varobj_has_more): Likewise.
87 (varobj_is_dynamic_p): Likewise.
88 (varobj_default_value_is_changeable_p): Likewise.
89 (varobj_value_is_changeable_p): Likewise.
90 (varobj_is_anonymous_child): Likewise.
91 (varobj_default_is_path_expr_parent): Likewise.
92
9c23b42f
SDJ
932017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
94
95 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
96 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
97 <type_str>: Convert to 'std::string'.
98 <expr>: Convert to 'expression_up'.
99 (dtrace_probe_arg_s): Delete type and VEC.
100 (dtrace_probe_enabler_s): Likewise.
101 (struct dtrace_probe): Replace by...
102 (class dtrace_static_probe_ops): ...this and...
103 (class dtrace_probe): ...this.
104 (dtrace_probe_is_linespec): Rename to...
105 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
106 to reflect change.
107 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
108 Adjust code. Create new instance of 'dtrace_probe'.
109 (dtrace_build_arg_exprs): Rename to...
110 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
111 reflect change.
112 (dtrace_get_probes): Rename to...
113 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
114 to reflect change.
115 (dtrace_get_arg): Rename to...
116 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
117 reflect change.
118 (dtrace_probe_is_enabled): Rename to...
119 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
120 change.
121 (dtrace_get_probe_address): Rename to...
122 (dtrace_probe::get_relocated_address): ...this. Adjust code
123 to reflect change.
124 (dtrace_get_probe_argument_count): Rename to...
125 (dtrace_probe::get_argument_count): ...this. Adjust code to
126 reflect change.
127 (dtrace_can_evaluate_probe_arguments): Rename to...
128 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
129 to reflect change.
130 (dtrace_evaluate_probe_argument): Rename to...
131 (dtrace_probe::evaluate_argument): ...this. Adjust code to
132 reflect change.
133 (dtrace_compile_to_ax): Rename to...
134 (dtrace_probe::compile_to_ax): ...this. Adjust code to
135 reflect change.
136 (dtrace_probe_destroy): Delete.
137 (dtrace_type_name): Rename to...
138 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
139 reflect change.
140 (dtrace_probe::get_static_ops): New method.
141 (dtrace_gen_info_probes_table_header): Rename to...
142 (dtrace_static_probe_ops::gen_info_probes_table_header):
143 ...this. Adjust code to reflect change.
144 (dtrace_gen_info_probes_table_values): Rename to...
145 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
146 code to reflect change.
147 (dtrace_enable_probe): Rename to...
148 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
149 change.
150 (dtrace_disable_probe): Rename to...
151 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
152 change.
153 (struct probe_ops dtrace_probe_ops): Delete.
154 (info_probes_dtrace_command): Call 'info_probes_for_spops'
155 instead of 'info_probes_for_ops'.
156 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
157 of 'all_probe_ops'.
158
0e9ae10f
SDJ
1592017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
160 Simon Marchi <simark@simark.ca>
161
162 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
163 variable.
164 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
165 <aexpr>: Change type to 'expression_up'.
166 (stap_probe_arg_s): Delete type and VEC.
167 (struct stap_probe): Delete. Replace by...
168 (class stap_static_probe_ops): ...this and...
169 (class stap_probe): ...this. Rename variables to add 'm_'
170 prefix. Do not use 'union' for arguments anymore.
171 (stap_get_expected_argument_type): Receive probe name instead
172 of 'struct stap_probe'. Adjust code.
173 (stap_parse_probe_arguments): Rename to...
174 (stap_probe::parse_arguments): ...this. Adjust code to
175 reflect change.
176 (stap_get_probe_address): Rename to...
177 (stap_probe::get_relocated_address): ...this. Adjust code
178 to reflect change.
179 (stap_get_probe_argument_count): Rename to...
180 (stap_probe::get_argument_count): ...this. Adjust code
181 to reflect change.
182 (stap_get_arg): Rename to...
183 (stap_probe::get_arg_by_number'): ...this. Adjust code to
184 reflect change.
185 (can_evaluate_probe_arguments): Rename to...
186 (stap_probe::can_evaluate_arguments): ...this. Adjust code
187 to reflect change.
188 (stap_evaluate_probe_argument): Rename to...
189 (stap_probe::evaluate_argument): ...this. Adjust code
190 to reflect change.
191 (stap_compile_to_ax): Rename to...
192 (stap_probe::compile_to_ax): ...this. Adjust code to
193 reflect change.
194 (stap_probe_destroy): Delete.
195 (stap_modify_semaphore): Adjust comment.
196 (stap_set_semaphore): Rename to...
197 (stap_probe::set_semaphore): ...this. Adjust code to reflect
198 change.
199 (stap_clear_semaphore): Rename to...
200 (stap_probe::clear_semaphore): ...this. Adjust code to
201 reflect change.
202 (stap_probe::get_static_ops): New method.
203 (handle_stap_probe): Adjust code to create instance of
204 'stap_probe'.
205 (stap_get_probes): Rename to...
206 (stap_static_probe_ops::get_probes): ...this. Adjust code to
207 reflect change.
208 (stap_probe_is_linespec): Rename to...
209 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
210 reflect change.
211 (stap_type_name): Rename to...
212 (stap_static_probe_ops::type_name): ...this. Adjust code to
213 reflect change.
214 (stap_gen_info_probes_table_header): Rename to...
215 (stap_static_probe_ops::gen_info_probes_table_header):
216 ...this. Adjust code to reflect change.
217 (stap_gen_info_probes_table_values): Rename to...
218 (stap_probe::gen_info_probes_table_values): ...this. Adjust
219 code to reflect change.
220 (struct probe_ops stap_probe_ops): Delete.
221 (info_probes_stap_command): Use 'info_probes_for_spops'
222 instead of 'info_probes_for_ops'.
223 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
224 of 'all_probe_ops'.
225
935676c9
SDJ
2262017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
227
228 * break-catch-throw.c (fetch_probe_arguments): Use
229 'probe.prob' instead of 'probe.probe'.
230 * breakpoint.c (create_longjmp_master_breakpoint): Call
231 'can_evaluate_arguments' and 'get_relocated_address' methods
232 from probe.
233 (create_exception_master_breakpoint): Likewise.
234 (add_location_to_breakpoint): Use 'sal->prob' instead of
235 'sal->probe'.
236 (bkpt_probe_insert_location): Call 'set_semaphore' method from
237 probe.
238 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
239 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
240 of 'probe_ops'.
241 (probe_key_free): Call 'delete' on probe.
242 (check_exception_resume): Use 'probe.prob' instead of
243 'probe.probe'.
244 * location.c (string_to_event_location_basic): Call
245 'probe_linespec_to_static_ops'.
246 * probe.c (class any_static_probe_ops): New class.
247 (any_static_probe_ops any_static_probe_ops): New variable.
248 (parse_probes_in_pspace): Receive 'static_probe_ops' as
249 argument. Adjust code to reflect change.
250 (parse_probes): Use 'static_probe_ops' instead of
251 'probe_ops'. Adjust code to reflect change.
252 (find_probes_in_objfile): Call methods to get name and
253 provider from probe.
254 (find_probe_by_pc): Use 'result.prob' instead of
255 'result.probe'. Call 'get_relocated_address' method from
256 probe.
257 (collect_probes): Adjust comment and argument list to receive
258 'static_probe_ops' instead of 'probe_ops'. Adjust code to
259 reflect change. Call necessary methods from probe.
260 (compare_probes): Call methods to get name and provider from
261 probes.
262 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
263 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
264 adjust code accordingly.
265 (print_ui_out_not_applicables): Likewise.
266 (info_probes_for_ops): Rename to...
267 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
268 as argument instead of 'probe_ops'. Adjust code. Call
269 necessary methods from probe.
270 (info_probes_command): Use 'info_probes_for_spops'.
271 (enable_probes_command): Pass correct argument to
272 'collect_probes'. Call methods from probe.
273 (disable_probes_command): Likewise.
274 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
275 (get_probe_argument_count): Move to
276 'any_static_probe_ops::get_argument_count'.
277 (can_evaluate_probe_arguments): Move to
278 'any_static_probe_ops::can_evaluate_arguments'.
279 (evaluate_probe_argument): Move to
280 'any_static_probe_ops::evaluate_argument'.
281 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
282 'probe.probe'.
283 (probe_linespec_to_ops): Rename to...
284 (probe_linespec_to_static_ops): ...this. Adjust code.
285 (probe_any_is_linespec): Rename to...
286 (any_static_probe_ops::is_linespec): ...this.
287 (probe_any_get_probes): Rename to...
288 (any_static_probe_ops::get_probes): ...this.
289 (any_static_probe_ops::type_name): New method.
290 (any_static_probe_ops::gen_info_probes_table_header): New
291 method.
292 (compute_probe_arg): Use 'pc_probe.prob' instead of
293 'pc_probe.probe'. Call methods from probe.
294 (compile_probe_arg): Likewise.
295 (std::vector<const probe_ops *> all_probe_ops): Delete.
296 (std::vector<const static_probe_ops *> all_static_probe_ops):
297 New variable.
298 (_initialize_probe): Use 'all_static_probe_ops' instead of
299 'all_probe_ops'.
300 * probe.h (struct info_probe_column) <field_name>: Delete
301 extraneous newline
302 (info_probe_column_s): Delete type and VEC.
303 (struct probe_ops): Delete. Replace with...
304 (class static_probe_ops): ...this and...
305 (clas probe): ...this.
306 (struct bound_probe) <bound_probe>: Delete extraneous
307 newline. Adjust constructor to receive 'probe' instead of
308 'struct probe'.
309 <probe>: Rename to...
310 <prob>: ...this. Delete extraneous newline.
311 <objfile>: Delete extraneous newline.
312 (register_probe_ops): Delete unused prototype.
313 (info_probes_for_ops): Rename to...
314 (info_probes_for_spops): ...this. Adjust comment.
315 (get_probe_address): Move to 'probe::get_address'.
316 (get_probe_argument_count): Move to
317 'probe::get_argument_count'.
318 (can_evaluate_probe_arguments): Move to
319 'probe::can_evaluate_arguments'.
320 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
321 * solib-svr4.c (struct svr4_info): Adjust comment.
322 (struct probe_and_action) <probe>: Rename to...
323 <prob>: ...this.
324 (register_solib_event_probe): Receive 'probe' instead of
325 'struct probe' as argument. Use 'prob' instead of 'probe'
326 when applicable.
327 (solib_event_probe_action): Call 'get_argument_count' method
328 from probe. Adjust comment.
329 (svr4_handle_solib_event): Adjust comment. Call
330 'evaluate_argument' method from probe.
331 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
332 from probe.
333 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
334 'struct probe'. Call 'can_evaluate_arguments' from probe.
335 * symfile.h: Forward declare 'class probe' instead of 'struct
336 probe'.
337 * symtab.h: Likewise.
338 (struct symtab_and_line) <probe>: Rename to...
339 <prob>: ...this.
340 * tracepoint.c (start_tracing): Use 'prob' when applicable.
341 Call probe methods.
342 (stop_tracing): Likewise.
343
8f6cb6c3
JB
3442017-11-22 Joel Brobecker <brobecker@adacore.com>
345
346 * ravenscar-thread.c (ravenscar_inferior_created): Remove
347 trailing newline at end of string in call to warning.
348
479f8de1
SM
3492017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
350
351 * osdata.h: Include vector isntead of vec.h.
352 (osdata_column_s): Remove typedef.
353 (struct osdata_column): Add constructor.
354 <name, value>: Change type to std::string.
355 (DEF_VEC_O (osdata_column_s)): Remove.
356 (osdata_item_s): Remove typedef.
357 (struct osdata_item) <columns>: Change type to std::vector.
358 (DEF_VEC_O (osdata_item_s)): Remove.
359 (struct osdata): Add constructor.
360 <type>: Change type to std::string.
361 <items>: Change type to std::vector.
362 (osdata_p): Remove typedef.
363 (DEF_VEC_P (osdata_p)): Remove.
364 (osdata_parse): Return a unique_ptr.
365 (osdata_free): Remove.
366 (make_cleanup_osdata_free): Remove.
367 (get_osdata): Return a unique_ptr.
368 (get_osdata_column): Return pointer to std::string, take a
369 reference to osdata_item as parameter.
370 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
371 unique_ptr.
372 <property_name>: Change type to std::string.
373 (osdata_start_osdata): Allocate osdata with new and adjust.
374 (osdata_start_item): Adjust.
375 (osdata_start_column): Adjust.
376 (osdata_end_column): Adjust.
377 (clear_parsing_data): Remove.
378 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
379 (osdata_item_clear): Remove.
380 (get_osdata): return a unique_ptr and adjust.
381 (get_osdata_column): Return a pointer to std::string and adjust.
382 (info_osdata): Adjust.
383 * mi/mi-main.c: Include <map>.
384 (free_vector_of_osdata_items): Remove.
385 (list_available_thread_groups): Adjust, use std::map instead of
386 splay tree.
387
41bd68f5
SM
3882017-11-22 Simon Marchi <simon.marchi@ericsson.com>
389
390 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
391 case in switch.
392
7e2fd2f4
SM
3932017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
396
0604393c
SM
3972017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
398
399 * varobj.h (struct varobj_update_result): Add constructor, add
400 move constructor, disable copy and assign, initialize fields.
401 <newobj>: Change type to std::vector.
402 (varobj_update): Return std::vector.
403 * varobj.c (install_dynamic_child): Change VEC parameters to
404 std::vector and adjust.
405 (update_dynamic_varobj_children): Likewise.
406 (varobj_update): Return std::vector and adjust.
407 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
408
ddf0ea08
SM
4092017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
410
411 * varobj.h (struct varobj) <parent>: Remove const.
412 <children>: Change type to std::vector.
413 (varobj_list_children): Return std::vector const reference.
414 (varobj_restrict_range): Change parameter type to std::vector
415 const reference.
416 * varobj.c (varobj_has_more): Adjust.
417 (varobj_restrict_range): Change parameter type to std::vector
418 const reference and adjust.
419 (install_dynamic_child): Adjust.
420 (update_dynamic_varobj_children): Adjust.
421 (varobj_list_children): Return std::vector const reference and
422 adjust.
423 (varobj_add_child): Adjust.
424 (update_type_if_necessary): Adjust.
425 (varobj_update): Adjust.
426 (delete_variable_1): Adjust.
427 * ada-varobj.c (ada_value_has_mutated): Adjust.
428 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
429
9e5b9d2b
SM
4302017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
431
432 * varobj.h (struct varobj): Add constructor and destructor,
433 initialize fields.
434 * varobj.c (struct varobj_root): Initialize fields.
435 (struct varobj_dynamic): Initialize fields.
436 (varobj_create): Use unique_ptr instead of cleanup. Create
437 varobj with new instead of new_root_variable.
438 (delete_variable_1): Free variable with delete instead of
439 free_variable.
440 (create_child_with_value): Create variable with new instead of
441 new_variable.
442 (varobj::varobj): New.
443 (varobj::~varobj): New (body mostly coming from free_variable).
444 (new_variable): Remove.
445 (free_variable): Remove.
446 (do_free_variable_cleanup): Remove.
447 (make_cleanup_free_variable): Remove.
448
fc35dab1
UW
4492017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
450
451 * core-regset.c: Remove file.
452 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
453
2400729e
UW
4542017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
455
456 * NEWS: Document use of GNU MPFR.
457 * README: Likewise.
458
459 * Makefile.in (LIBMPFR): Add define.
460 (CLIBS): Add $(LIBMPFR).
461 * configure.ac: Add --with-mpfr configure option.
462 * configure: Regenerate.
463 * config.in: Regenerate.
464
465 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
466 (class mpfr_float_ops): New type.
467 (mpfr_float_ops::from_target): Two new overloaded functions.
468 (mpfr_float_ops::to_target): Likewise.
469 (mpfr_float_ops::to_string): New function.
470 (mpfr_float_ops::from_string): Likewise.
471 (mpfr_float_ops::to_longest): Likewise.
472 (mpfr_float_ops::from_longest): Likewise.
473 (mpfr_float_ops::from_ulongest): Likewise.
474 (mpfr_float_ops::to_host_double): Likewise.
475 (mpfr_float_ops::from_host_double): Likewise.
476 (mpfr_float_ops::convert): Likewise.
477 (mpfr_float_ops::binop): Likewise.
478 (mpfr_float_ops::compare): Likewise.
479 (get_target_float_ops): Use mpfr_float_ops if available.
480
7a26362d
UW
4812017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
482
483 * target-float.c: Do not include <math.h>.
484 Include <cmath> and <limits>.
485 (DOUBLEST): Do not define.
486 (class target_float_ops): New type.
487 (class host_float_ops): New templated type.
488 (class decimal_float_ops): New type.
489
490 (floatformat_to_doublest): Rename to ...
491 (host_float_ops<T>::from_target): ... this. Use template type T
492 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
493 (host_float_ops<T>::from_target): New overload using a type argument.
494 (floatformat_from_doublest): Rename to ...
495 (host_float_ops<T>::to_target): ... this. Use template type T
496 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
497 (host_float_ops<T>::to_target): New overload using a type argument.
498 (floatformat_printf_format): New function.
499 (struct printf_length_modifier): New templated type.
500 (floatformat_to_string): Rename to ...
501 (host_float_ops<T>::to_string): ... this. Use type instead of
502 floatformat argument. Use floatformat_printf_format and
503 printf_length_modifier. Remove special handling of invalid numbers,
504 infinities and NaN (moved to target_float_to_string).
505 (struct scanf_length_modifier): New templated type.
506 (floatformat_from_string): Rename to ...
507 (host_float_ops<T>::from_string): ... this. Use type instead of
508 floatformat argument. Use scanf_length_modifier.
509 (floatformat_to_longest): Rename to ...
510 (host_float_ops<T>::to_longest): ... this. Use type instead of
511 floatformat argument. Handle out-of-range values deterministically.
512 (floatformat_from_longest): Rename to ...
513 (host_float_ops<T>::from_longest): ... this. Use type instead of
514 floatformat argument.
515 (floatformat_from_ulongest): Rename to ...
516 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
517 floatformat argument.
518 (floatformat_to_host_double): Rename to ...
519 (host_float_ops<T>::to_host_double): ... this. Use type instead of
520 floatformat argument.
521 (floatformat_from_host_double): Rename to ...
522 (host_float_ops<T>::from_host_double): ... this. Use type instead of
523 floatformat argument.
524 (floatformat_convert): Rename to ...
525 (host_float_ops<T>::convert): ... this. Use type instead of
526 floatformat arguments. Remove handling of no-op conversions.
527 (floatformat_binop): Rename to ...
528 (host_float_ops<T>::binop): ... this. Use type instead of
529 floatformat arguments.
530 (floatformat_compare): Rename to ...
531 (host_float_ops<T>::compare): ... this. Use type instead of
532 floatformat arguments.
533
534 (match_endianness): Use type instead of length/byte_order arguments.
535 (set_decnumber_context): Likewise.
536 (decimal_from_number): Likewise. Update calls.
537 (decimal_to_number): Likewise.
538 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
539 (decimal_float_ops::to_host_double): New dummy function.
540 (decimal_float_ops::from_host_double): Likewise.
541 (decimal_to_string): Rename to ...
542 (decimal_float_ops::to_string): ... this. Use type instead of
543 length/byte_order arguments. Update calls.
544 (decimal_from_string): Rename to ...
545 (decimal_float_ops::from_string): ... this. Use type instead of
546 length/byte_order arguments. Update calls.
547 (decimal_from_longest): Rename to ...
548 (decimal_float_ops::from_longest): ... this. Use type instead of
549 length/byte_order arguments. Update calls.
550 (decimal_from_ulongest): Rename to ...
551 (decimal_float_ops::from_ulongest): ... this. Use type instead of
552 length/byte_order arguments. Update calls.
553 (decimal_to_longest): Rename to ...
554 (decimal_float_ops::to_longest): ... this. Use type instead of
555 length/byte_order arguments. Update calls.
556 (decimal_binop): Rename to ...
557 (decimal_float_ops::binop): ... this. Use type instead of
558 length/byte_order arguments. Update calls.
559 (decimal_compare): Rename to ...
560 (decimal_float_ops::compare): ... this. Use type instead of
561 length/byte_order arguments. Update calls.
562 (decimal_convert): Rename to ...
563 (decimal_float_ops::convert): ... this. Use type instead of
564 length/byte_order arguments. Update calls.
565
566 (target_float_same_category_p): New function.
567 (target_float_same_format_p): Likewise.
568 (target_float_format_length): Likewise.
569 (enum target_float_ops_kind): New type.
570 (get_target_float_ops_kind): New function.
571 (get_target_float_ops): Three new overloaded functions.
572
573 (target_float_is_zero): Update call.
574 (target_float_to_string): Add special handling of invalid numbers,
575 infinities and NaN (moved from floatformat_to_string). Use
576 target_float_ops callback.
577 (target_float_from_string): Use target_float_ops callback.
578 (target_float_to_longest): Likewise.
579 (target_float_from_longest): Likewise.
580 (target_float_from_ulongest): Likewise.
581 (target_float_to_host_double): Likewise.
582 (target_float_from_host_double): Likewise.
583 (target_float_convert): Add special case for no-op conversions.
584 Use target_float_ops callback.
585 (target_float_binop): Use target_float_ops callback.
586 (target_float_compare): Likewise.
587
a9f26f60
YQ
5882017-11-22 Yao Qi <yao.qi@linaro.org>
589
590 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
591
29f9a567
YQ
5922017-11-22 Yao Qi <yao.qi@linaro.org>
593
594 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
595 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
596
3b1b69bf
JG
5972017-11-21 Jerome Guitton <guitton@adacore.com>
598
599 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
600 with event ptid from the lower layer before doing the
601 ravenscar-specific update.
602
54aa6c67
JB
6032017-11-21 Joel Brobecker <brobecker@adacore.com>
604
605 * ravenscar-thread.c (is_ravenscar_task): Also verify that
606 the ptid's TID is nonzero.
607
cf3fbed4
JB
6082017-11-21 Joel Brobecker <brobecker@adacore.com>
609
610 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
611 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
612 Make non-static. Change return type to char *. Adjust code
613 accordingly. Rewrite the function's documentation.
614 (read_atcb): Adjust call to get_tcb_types_info accordingly.
615 * ravenscar-thread.c (ravenscar_inferior_created): Check that
616 we have enough debugging information in the runtime to support
617 Ada task debugging before we enable the ravenscar-thread layer.
618
9edcc12f
JB
6192017-11-21 Joel Brobecker <brobecker@adacore.com>
620
621 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
622 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
623 * ravenscar-thread.c: Add into comment.
624 (base_magic_null_ptid): Delete.
625 (base_ptid): Change documentation.
626 (ravenscar_active_task): Renames ravenscar_running_thread.
627 All callers updated throughout.
628 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
629 (ravenscar_task_is_currently_active): Likewise.
630 (get_base_thread_from_ravenscar_task): Ditto.
631 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
632 (ravenscar_runtime_initialized): Likewise.
633 (get_running_thread_id): Add new parameter "cpu". Adjust
634 implementation to handle this new parameter.
635 (ravenscar_fetch_registers): Small adjustment to use
636 is_ravenscar_task and ravenscar_task_is_currently_active in
637 order to decide whether to use the target beneath or this
638 module's arch_ops.
639 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
640 (ravenscar_stopped_by_sw_breakpoint): Use
641 get_base_thread_from_ravenscar_task to get the underlying
642 thread, rather than using base_ptid.
643 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
644 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
645 Likewise.
646 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
647
65d40437
JB
6482017-11-21 Joel Brobecker <brobecker@adacore.com>
649
650 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
651 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
652 (get_tcb_types_info): Set fieldnos.base_cpu.
653 (read_atcb): Set task_info->base_cpu.
654 (info_task): Print "Base CPU" info if set by runtime.
655
e02544b2
JB
6562017-11-21 Joel Brobecker <brobecker@adacore.com>
657
658 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
659 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
660 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
661 New functions.
662 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
663 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
664 to_stopped_data_address and to_core_of_thread fields of
665 ravenscar_ops.
666
ed0f4273
UW
6672017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
668
669 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
670 (struct gdbarch_tdep): New member long_double_abi.
671 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
672 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
673 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
674 format depending on long_double_abi tdep member.
675 (ppc_floatformat_for_type): Handle __ibm128 type.
676
0fc76421
SM
6772017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
678
679 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
680
e6b2f5ef
PA
6812017-11-21 Pedro Alves <palves@redhat.com>
682
683 * dwarf2read.c (mapped_index::find_name_components_bounds)
684 <completion mode, upper bound>: Use std::lower_bound instead of
685 std::upper_bound.
686 (test_mapped_index_find_name_component_bounds): Remove incorrect
687 "t1_fund" from expected symbols.
688
5c58de74
PA
6892017-11-21 Pedro Alves <palves@redhat.com>
690
691 * dwarf2read.c (mapped_index::name_components_casing): New field.
692 (mapped_index) <build_name_components,
693 find_name_components_bounds): Declare new methods.
694 (mapped_index::find_name_components_bounds)
695 (mapped_index::build_name_components): New methods, factored out
696 from dw2_expand_symtabs_matching_symbol.
697 (check_find_bounds_finds)
698 (test_mapped_index_find_name_component_bounds): New.
699 (run_test): Rename to ...
700 (test_dw2_expand_symtabs_matching_symbol): ... this.
701 (run_test): Reimplement.
702
e1ef7d7a
PA
7032017-11-21 Pedro Alves <palves@redhat.com>
704
705 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
706 (symbol_end): Use cp_ident_is_alnum.
707 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
708 * dwarf2read.c (make_sort_after_prefix_name): New function.
709 (dw2_expand_symtabs_matching_symbol): Use it.
710 (test_symbols): Add more symbols.
711 (run_test): Add tests.
712
cf724bc9
TT
7132017-11-17 Tom Tromey <tom@tromey.com>
714
715 * symtab.h (enum symbol_subclass_kind): New.
716 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
717 Remove.
718 <subclass>: New member.
719 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
720 * rust-lang.c (rust_get_trait_object_pointer): Update.
721 * dwarf2read.c (read_func_scope): Update.
722 (read_variable): Update.
723
68e745e3
TT
7242017-11-17 Tom Tromey <tom@tromey.com>
725
726 * dwarf2read.c (read_func_scope): Update.
727 * symtab.h (struct template_symbol): Derive from symbol.
728 <base>: Remove.
729
71a3c369
TT
7302017-11-17 Tom Tromey <tom@tromey.com>
731
732 * symtab.h (struct symbol) <is_rust_vtable>: New member.
733 (struct rust_vtable_symbol): New.
734 (find_symbol_at_address): Declare.
735 * symtab.c (find_symbol_at_address): New function.
736 * symfile.h (struct quick_symbol_functions)
737 <find_compunit_symtab_by_address>: New member.
738 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
739 function.
740 (debug_sym_quick_functions): Link to
741 debug_qf_find_compunit_symtab_by_address.
742 * rust-lang.c (rust_get_trait_object_pointer): New function.
743 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
744 rust_get_trait_object_pointer.
745 * psymtab.c (psym_relocate): Clear psymbol_map.
746 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
747 functions.
748 (psym_functions): Link to psym_find_compunit_symtab_by_address.
749 * objfiles.h (struct objfile) <psymbol_map>: New member.
750 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
751 (process_die) <DW_TAG_variable>: New case. Call read_variable.
752 (rust_containing_type, read_variable): New functions.
753
7468702d
SM
7542017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
755
756 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
757
37269bc9
SM
7582017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
759
760 * common/filestuff.c: Include <algorithm>.
761 (open_fds): Change type to std::vector<int>.
762 (do_mark_open_fd): Adjust.
763 (unmark_fd_no_cloexec): Adjust.
764 (do_close): Adjust.
765
5c632425
SM
7662017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
767
768 * breakpoint.c (output_thread_groups): Take an std::vector.
769 (print_one_breakpoint_location): Adjust.
770
ced9779b
JB
7712017-11-17 Joel Brobecker <brobecker@adacore.com>
772
773 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
774 (ada_evaluate_subexp_for_cast): New function.
775 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
776 ada_evaluate_subexp_for_cast.
777 (ada_evaluate_subexp) <nosideret>: Replace code by call to
778 eval_skip_value.
779 * eval.c (evaluate_var_value): Make non-static.
780 (evaluate_var_msym_value, eval_skip_value): Likewise.
781 * value.h (evaluate_var_value, evaluate_var_msym_value)
782 (eval_skip_value): Declare.
783
b7e22850
JB
7842017-11-16 Joel Brobecker <brobecker@adacore.com>
785
786 * ada-lang.c (ada_value_cast): Remove parameter "noside".
787 Update all callers.
788
9ccabccd
PA
7892017-11-16 Pedro Alves <palves@redhat.com>
790
791 * python/py-unwind.c (pyuw_sniffer): Translate
792 PyExc_KeyboardInterrupt to a GDB Quit exception.
793
d930703d
PA
7942017-11-16 Pedro Alves <palves@redhat.com>
795
796 * infrun.c (resume_cleanups): Delete.
797 (resume): No longer install a resume_cleanups cleanup nor call
798 QUIT.
799 (proceed): Pass the terminal to the inferior.
800 (keep_going_pass_signal): No longer install a resume_cleanups
801 cleanup.
802
38dc2859
PA
8032017-11-16 Pedro Alves <palves@redhat.com>
804
805 * inf-loop.c (inferior_event_handler): Don't swallow the exception
806 if the prompt is blocked.
807
688fca4f
PA
8082017-11-16 Pedro Alves <palves@redhat.com>
809
810 * breakpoint.c (insert_bp_location): Replace bp_err and
811 bp_err_message locals by a gdb_exception local.
812
e2c33ac7
PA
8132017-11-16 Pedro Alves <palves@redhat.com>
814
815 * inflow.c (scoped_ignore_sigttou): New class.
816 (child_terminal_ours_1, new_tty): Use it.
817
d7236961
UW
8182017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
819
820 * target-float.c (decimal_from_number): Add byte_order argument and
821 call match_endianness. Error if unknown floating-point type.
822 (decimal_to_number): Add byte_order argument and call match_endianness.
823 (decimal_from_longest): Update call. Do not call match_endianness.
824 (decimal_from_ulongest): Likewise.
825 (decimal_binop): Likewise.
826 (decimal_is_zero): Likewise.
827 (decimal_compare): Likewise.
828 (decimal_convert): Likewise.
829
d8ae99a7
PM
8302017-11-16 Phil Muldoon <pmuldoon@redhat.com>
831
832 * python/python.c (gdbpy_rbreak): New function.
833 * NEWS: Document Python rbreak feature.
834
c632b645
YQ
8352017-11-16 Yao Qi <yao.qi@linaro.org>
836
837 * features/tic6x-c62x.xml: Remove.
838 * features/tic6x-c64x.xml: Remove.
839 * features/tic6x-c64xp.xml: Remove.
840
a014b87a
JB
8412017-11-15 John Baldwin <jhb@FreeBSD.org>
842
843 * symtab.h: Include <array>.
844
94765011
JB
8452017-11-15 John Baldwin <jhb@FreeBSD.org>
846
847 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
848 (bsd_kvm_proc_cmd): Likewise.
849
625ad440
SM
8502017-11-15 Simon Marchi <simon.marchi@ericsson.com>
851
852 * tui/tui-win.c (window_name_completer): Replace VEC with
853 std::vector.
854
c0c11fa9
AC
8552017-11-15 Andrew Cagney <cagney@gnu.org>
856
857 * MAINTAINERS: Remove no-longer applicable entries.
858
34a7ebaf
AC
8592017-11-15 Andrew Cagney <cagney@gnu.org>
860
861 * MAINTAINERS: Move self to Past Maintainers.
862
5334ef39
YQ
8632017-11-15 Yao Qi <yao.qi@linaro.org>
864
865 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
866 * features/nios2-linux.c: Remove.
867 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
868 initialize_tdesc_nios2_linux.
869
a714b0d6
YQ
8702017-11-15 Yao Qi <yao.qi@linaro.org>
871
872 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
873 M68HC11_LAST_HARD_REG + 1.
874
92ffd475
PC
8752017-11-14 Paul Carroll <pcarroll@codesourcery.com>
876
877 PR gdb/22388
878 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
879 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
880 Return TARGET_XFER_EOF if size of returned data is 0.
881
07431908
SM
8822017-11-14 Simon Marchi <simon.marchi@ericsson.com>
883
884 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
885 memory-map-selftests.c.
886 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
887 * memory-map.c (memory_map_start_memory): Fix computation of hi
888 address.
889 * unittests/memory-map-selftests.c: New file.
890
31432a67
JB
8912017-11-09 Joel Brobecker <brobecker@adacore.com>
892
893 * ada-lang.c: Fix some typos in the general command documenting
894 how Ada expressions are being evaluated and how their result
895 is printed.
896
e793c052
TT
8972017-11-09 Tom Tromey <tom@tromey.com>
898
899 * psymtab.c (psymbol_hash): Do not hash string contents.
900 (psymbol_compare): Add comment.
901
7e8835c5
TT
9022017-11-09 Tom Tromey <tom@tromey.com>
903
904 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
905
286acbb5
JB
9062017-11-08 Joel Brobecker <brobecker@adacore.com>
907
908 * ada-exp.y (write_var_from_sym): Remove parameter
909 "orig_left_context". Update all callers.
910
b44ec619
SM
9112017-11-08 Simon Marchi <simon.marchi@ericsson.com>
912
913 * tracepoint.h (class collection_list) <stringify>: Return
914 std::vector<std::string>.
915 (encode_actions_rsp): Change parameters to
916 std::vector<std::string> *.
917 * tracepoint.c (collection_list::stringify): Return
918 std::vector<std::string> and adjust accordingly.
919 (encode_actions_rsp): Changee parameters to
920 std::vector<std::string> and adjust accordingly.
921 * remote.c (free_actions_list),
922 free_actions_list_cleanup_wrapper): Remove.
923 (remote_download_tracepoint): Adjust to std::vector.
924
2f4732b0
TT
9252017-11-08 Tom Tromey <tom@tromey.com>
926
927 * dwarf2read.c (symbolp): Remove typedef.
928 (read_func_scope): Use std::vector.
929 (process_structure_scope): Use std::vector.
930
f9d67a22
PA
9312017-11-08 Pedro Alves <palves@redhat.com>
932
933 * ada-lang.c (ada_make_symbol_completion_list): Use
934 completion_skip_symbol.
935 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
936 (symbol_is_function_or_method(symbol*)): New.
937 (add_symtab_completions): Add complete_symbol_mode parameter. Use
938 completion_skip_symbol.
939 (default_collect_symbol_completion_matches_break_on): Use
940 completion_skip_symbol. Pass down mode.
941 (collect_file_symbol_completion_matches): Pass down mode.
942 * symtab.h (symbol_is_function_or_method): New declarations.
943 (completion_skip_symbol): New template function.
944
56d87ef7
PA
9452017-11-08 Pedro Alves <palves@redhat.com>
946
947 * linespec.c (iterate_over_all_matching_symtabs): Add
948 search_domain parameter. Pass it down to expand_symtabs_matching.
949 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
950 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
951 search_domain.
952 (add_all_symbol_names_from_pspace): Add search_domain parameter.
953 Pass it down.
954 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
955 symbols.
956 (add_matching_symbols_to_info): Add search_domain parameter. Pass
957 it down.
958
1b026119
PA
9592017-11-08 Pedro Alves <palves@redhat.com>
960
961 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
962 text_len locals and don't pass them down.
963 * symtab.c (completion_list_add_name): Remove
964 sym_text/sym_text_len parameters and adjust.
965 (completion_list_add_symbol, completion_list_add_msymbol)
966 (completion_list_objc_symbol, completion_list_add_fields)
967 (add_symtab_completions): Likewise.
968 (default_collect_symbol_completion_matches_break_on)
969 (collect_file_symbol_completion_matches): Remove sym_text_len
970 local and don't pass it down.
971 * symtab.h (completion_list_add_name): Remove
972 sym_text/sym_text_len parameters.
973
c62446b1
PA
9742017-11-08 Pedro Alves <palves@redhat.com>
975
976 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
977 unittests/lookup_name_info-selftests.c.
978 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
979 * cp-support.c: Include "selftest.h".
980 (cp_remove_params_1): Rename from cp_remove_params. Add
981 'require_param' parameter, and handle it.
982 (cp_remove_params): Reimplement.
983 (cp_remove_params_if_any): New.
984 (selftests::quote): New.
985 (selftests::check_remove_params): New.
986 (selftests::test_cp_remove_params): New.
987 (_initialize_cp_support): Install
988 selftests::test_cp_remove_params.
989 * cp-support.h (cp_remove_params_if_any): Declare.
990 * dwarf2read.c :Include "selftest.h".
991 (dw2_expand_symtabs_matching_symbol): Use
992 lookup_name_info::make_ignore_params.
993 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
994 (selftests::dw2_expand_symtabs_matching::string_or_null)
995 (selftests::dw2_expand_symtabs_matching::check_match)
996 (selftests::dw2_expand_symtabs_matching::test_symbols)
997 (selftests::dw2_expand_symtabs_matching::run_test): New.
998 (_initialize_dwarf2_read): Register
999 selftests::dw2_expand_symtabs_matching::run_test.
1000 * psymtab.c (psym_expand_symtabs_matching): Use
1001 lookup_name_info::make_ignore_params.
1002 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1003 If the lookup name wants to ignore parameters, strip them.
1004 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1005 code handling '('.
1006 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1007 (default_collect_symbol_completion_matches_break_on): Don't try to
1008 strip parameters.
1009 * symtab.h (lookup_name_info::lookup_name_info): Add
1010 'ignore_parameters' parameter.
1011 (lookup_name_info::ignore_parameters)
1012 (lookup_name_info::make_ignore_params): New methods.
1013 (lookup_name_info::m_ignore_parameters): New field.
1014 * unittests/lookup_name_info-selftests.c: New file.
1015
61920122
PA
10162017-11-08 Pedro Alves <palves@redhat.com>
1017
1018 * dwarf2read.c (dw2_expand_marked_cus)
1019 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1020 (dw2_expand_symtabs_matching): Move further below.
1021 (dw2_expand_marked_cus): Reindent.
1022
3f563c84
PA
10232017-11-08 Pedro Alves <palves@redhat.com>
1024
1025 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1026 (struct name_component): New.
1027 (mapped_index::name_components): New field.
1028 (mapped_index::symbol_name_at): New method.
1029 (dwarf2_read_index): Call mapped_index ctor.
1030 (dw2_map_matching_symbols): Add comment about name_components
1031 table.
1032 (dw2_expand_symtabs_matching): Factor part to...
1033 (dw2_expand_symtabs_matching_symbol): ... this new function.
1034 Build name components table, and lookup symbols in it before
1035 calling the name matcher.
1036 (dw2_expand_marked_cus): New, factored out from
1037 dw2_expand_symtabs_matching.
1038 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1039
b5ec771e
PA
10402017-11-08 Pedro Alves <palves@redhat.com>
1041
1042 * ada-lang.c (ada_encode): Rename to ..
1043 (ada_encode_1): ... this. Add throw_errors parameter and handle
1044 it.
1045 (ada_encode): Reimplement.
1046 (match_name): Delete, folded into full_name.
1047 (resolve_subexp): No longer pass the encoded name to
1048 ada_lookup_symbol_list.
1049 (should_use_wild_match): Delete.
1050 (name_match_type_from_name): New.
1051 (ada_lookup_simple_minsym): Use lookup_name_info and the
1052 language's symbol_name_matcher_ftype.
1053 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1054 (ada_add_block_renamings): Adjust to use lookup_name_info.
1055 (ada_lookup_name): New.
1056 (add_nonlocal_symbols, ada_add_all_symbols)
1057 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1058 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1059 (ada_name_for_lookup): Delete.
1060 (ada_lookup_encoded_symbol): Construct a verbatim name.
1061 (wild_match): Reverse sense of return type. Use bool.
1062 (full_match): Reverse sense of return type. Inline bits of old
1063 match_name here.
1064 (ada_add_block_symbols): Adjust to use lookup_name_info.
1065 (symbol_completion_match): Delete, folded into...
1066 (ada_lookup_name_info::matches): ... .this new method.
1067 (symbol_completion_add): Delete.
1068 (ada_collect_symbol_completion_matches): Add name_match_type
1069 parameter. Adjust to use lookup_name_info and
1070 completion_list_add_name.
1071 (get_var_value, ada_add_global_exceptions): Adjust to use
1072 lookup_name_info.
1073 (ada_get_symbol_name_cmp): Delete.
1074 (do_wild_match, do_full_match): New functions.
1075 (ada_lookup_name_info::ada_lookup_name_info): New method.
1076 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1077 functions.
1078 (ada_language_defn): Install ada_get_symbol_name_matcher.
1079 * ada-lex.l (processId): If name starts with '<', copy it
1080 verbatim.
1081 * block.c (block_iter_match_step, block_iter_match_first)
1082 (block_iter_match_next, block_lookup_symbol)
1083 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1084 lookup_name_info.
1085 * block.h (block_iter_match_first, block_iter_match_next)
1086 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1087 * c-lang.c (c_language_defn, cplus_language_defn)
1088 (asm_language_defn, minimal_language_defn): Adjust comments to
1089 refer to la_get_symbol_name_matcher.
1090 * completer.c (complete_files_symbols)
1091 (collect_explicit_location_matches, symbol_completer): Pass a
1092 symbol_name_match_type down.
1093 * completer.h (class completion_match, completion_match_result):
1094 New classes.
1095 (completion_tracker::reset_completion_match_result): New method.
1096 (completion_tracker::m_completion_match_result): New field.
1097 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1098 lookup_name_info.
1099 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1100 functions.
1101 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1102 * d-lang.c: Adjust comments to refer to
1103 la_get_symbol_name_matcher.
1104 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1105 Adjust to use lookup_name_info.
1106 (dict_iter_match_first, dict_iter_match_next)
1107 (iter_match_first_hashed, iter_match_next_hashed)
1108 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1109 with a lookup_name_info.
1110 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1111 Likewise.
1112 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1113 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1114 (gdb_index_symbol_name_matcher): New class.
1115 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1116 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1117 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1118 with a symbol_name_match_type.
1119 (f_language_defn): Adjust comments to refer to
1120 la_get_symbol_name_matcher.
1121 * go-lang.c (go_language_defn): Adjust comments to refer to
1122 la_get_symbol_name_matcher.
1123 * language.c (default_symbol_name_matcher)
1124 (language_get_symbol_name_matcher): New functions.
1125 (unknown_language_defn, auto_language_defn): Adjust comments to
1126 refer to la_get_symbol_name_matcher.
1127 * language.h (symbol_name_cmp_ftype): Delete.
1128 (language_defn) <la_collect_symbol_completion_matches>: Add match
1129 type parameter.
1130 <la_get_symbol_name_cmp>: Delete field.
1131 <la_get_symbol_name_matcher>: New field.
1132 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1133 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1134 Declare.
1135 * linespec.c (iterate_over_all_matching_symtabs)
1136 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1137 (find_methods): Add language parameter, and use lookup_name_info
1138 and the language's symbol_name_matcher_ftype.
1139 (linespec_complete_function): Adjust.
1140 (lookup_prefix_sym): Use lookup_name_info.
1141 (add_all_symbol_names_from_pspace): Adjust.
1142 (find_superclass_methods): Add language parameter and pass it
1143 down.
1144 (find_method): Pass symbol language down.
1145 (find_linespec_symbols): Don't demangle or Ada encode here.
1146 (search_minsyms_for_name): Add lookup_name_info parameter.
1147 (add_matching_symbols_to_info): Add name_match_type parameter.
1148 Use lookup_name_info.
1149 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1150 la_get_symbol_name_matcher.
1151 * minsyms.c: Include <algorithm>.
1152 (add_minsym_to_demangled_hash_table): Remove table parameter and
1153 add objfile parameter. Use search_name_hash, and add language to
1154 demangled languages vector.
1155 (struct found_minimal_symbols): New struct.
1156 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1157 New functions.
1158 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1159 input names here. Use lookup_name_info instead. Lookup up
1160 demangled names once for each language in the demangled names
1161 vector.
1162 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1163 demangled names once for each language in the demangled names
1164 vector.
1165 (build_minimal_symbol_hash_tables): Adjust.
1166 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1167 lookup_name_info.
1168 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1169 la_get_symbol_name_matcher.
1170 * objfiles.h: Include <vector>.
1171 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1172 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1173 la_get_symbol_name_matcher.
1174 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1175 la_get_symbol_name_matcher.
1176 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1177 (match_partial_symbol): Use symbol_name_match_type,
1178 lookup_name_info and psymbol_name_matches.
1179 (lookup_partial_symbol): Use lookup_name_info.
1180 (map_block): Use symbol_name_match_type and lookup_name_info.
1181 (psym_map_matching_symbols): Use symbol_name_match_type.
1182 (psymbol_name_matches): New.
1183 (recursively_search_psymtabs): Use lookup_name_info and
1184 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1185 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1186 'kind' parameter to 'domain'.
1187 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1188 la_get_symbol_name_matcher.
1189 * symfile-debug.c (debug_qf_map_matching_symbols)
1190 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1191 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1192 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1193 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1194 Adjust to use symbol_name_match_type.
1195 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1196 (expand_symtabs_matching): Adjust to use lookup_name_info.
1197 * symmisc.c (maintenance_expand_symtabs): Use
1198 lookup_name_info::match_any ().
1199 * symtab.c (symbol_matches_search_name): New.
1200 (eq_symbol_entry): Adjust to use lookup_name_info and the
1201 language's matcher.
1202 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1203 (lookup_name_info::match_any): New.
1204 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1205 (compare_symbol_name): Add language, lookup_name_info and
1206 completion_match_result parameters, and use them.
1207 (completion_list_add_name): Make extern. Add language and
1208 lookup_name_info parameters. Use them.
1209 (completion_list_add_symbol, completion_list_add_msymbol)
1210 (completion_list_objc_symbol): Add lookup_name_info parameters and
1211 adjust. Pass down language.
1212 (completion_list_add_fields): Add lookup_name_info parameters and
1213 adjust. Pass down language.
1214 (add_symtab_completions): Add lookup_name_info parameters and
1215 adjust.
1216 (default_collect_symbol_completion_matches_break_on): Add
1217 name_match_type parameter, and use it. Use lookup_name_info.
1218 (default_collect_symbol_completion_matches)
1219 (collect_symbol_completion_matches): Add name_match_type
1220 parameter, and pass it down.
1221 (collect_symbol_completion_matches_type): Adjust.
1222 (collect_file_symbol_completion_matches): Add name_match_type
1223 parameter, and use lookup_name_info.
1224 * symtab.h: Include <string> and "common/gdb_optional.h".
1225 (enum class symbol_name_match_type): New.
1226 (class ada_lookup_name_info): New.
1227 (struct demangle_for_lookup_info): New.
1228 (class lookup_name_info): New.
1229 (symbol_name_matcher_ftype): New.
1230 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1231 (symbol_matches_search_name): Declare.
1232 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1233 (default_collect_symbol_completion_matches)
1234 (collect_symbol_completion_matches)
1235 (collect_file_symbol_completion_matches): Add name_match_type
1236 parameter.
1237 (iterate_over_symbols): Use lookup_name_info.
1238 (completion_list_add_name): Declare.
1239 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1240 (strncmp_iw_with_mode): Now extern.
1241 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1242 (strncmp_iw_with_mode): Declare.
1243
5ffa0793
PA
12442017-11-08 Keith Seitz <keiths@redhat.com>
1245 Pedro Alves <palves@redhat.com>
1246
1247 * ada-lang.c (ada_language_defn): Install
1248 default_search_name_hash.
1249 * buildsym.c (struct buildsym_compunit): <language>: New field.
1250 (finish_block_internal): Pass language when creating dictionaries.
1251 (start_buildsym_compunit, start_symtab): New language parameters.
1252 Use them.
1253 (restart_symtab): Pass down compilation unit's language.
1254 * buildsym.h (enum language): Forward declare.
1255 (start_symtab): New 'language' parameter.
1256 * c-lang.c (c_language_defn, cplus_language_defn)
1257 (asm_language_defn, minimal_language_defn): Install
1258 default_search_name_hash.
1259 * coffread.c (coff_start_symtab): Adjust.
1260 * d-lang.c (d_language_defn): Install default_search_name_hash.
1261 * dbxread.c (struct symloc): Add 'pst_language' field.
1262 (PST_LANGUAGE): Define.
1263 (start_psymtab, read_ofile_symtab): Use it.
1264 (process_one_symbol): New 'language' parameter. Pass it down.
1265 * dictionary.c (struct dictionary) <language>: New field.
1266 (DICT_LANGUAGE): Define.
1267 (dict_create_hashed, dict_create_hashed_expandable)
1268 (dict_create_linear, dict_create_linear_expandable): New parameter
1269 'language'. Set the dictionary's language.
1270 (iter_match_first_hashed): Adjust to rename.
1271 (insert_symbol_hashed): Assert we don't see mismatching
1272 languages. Adjust to rename.
1273 (dict_hash): Rename to ...
1274 (default_search_name_hash): ... this and make extern.
1275 * dictionary.h (struct language_defn): Forward declare.
1276 (dict_create_hashed): New parameter 'language'.
1277 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1278 * f-lang.c (f_language_defn): Install default_search_name_hash.
1279 * go-lang.c (go_language_defn): Install default_search_name_hash.
1280 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1281 creation.
1282 * language.c (unknown_language_defn, auto_language_defn):
1283 * language.h (language_defn::la_search_name_hash): New field.
1284 (default_search_name_hash): Declare.
1285 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1286 * mdebugread.c (new_block): New parameter 'language'.
1287 * mdebugread.c (parse_symbol): Pass symbol language to block
1288 allocation.
1289 (psymtab_to_symtab_1): Pass down language.
1290 (new_symtab): Pass compunit's language to block allocation.
1291 * objc-lang.c (objc_language_defn): Install
1292 default_search_name_hash.
1293 * opencl-lang.c (opencl_language_defn):
1294 * p-lang.c (pascal_language_defn): Install
1295 default_search_name_hash.
1296 * rust-lang.c (rust_language_defn): Install
1297 default_search_name_hash.
1298 * stabsread.h (enum language): Forward declare.
1299 (process_one_symbol): Add 'language' parameter.
1300 * symtab.c (search_name_hash): New function.
1301 * symtab.h (search_name_hash): Declare.
1302 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1303
2a1dde5d
PA
13042017-11-08 Pedro Alves <palves@redhat.com>
1305
1306 * cp-name-parser.y (main): Don't initialize extra_chars.
1307
95a6b0a1
TT
13082017-11-07 Tom Tromey <tom@tromey.com>
1309
1310 * event-top.h (command_handler): Constify.
1311 * record-full.c (cmd_record_full_start): Update.
1312 * thread.c (thread_apply_all_command): Update.
1313 * printcmd.c (eval_command): Update.
1314 * mi/mi-main.c (mi_execute_cli_command): Update.
1315 (mi_execute_async_cli_command): Update.
1316 * tui/tui-stack.c (tui_update_command): Update.
1317 * cli/cli-interp.c (safe_execute_command): Constify.
1318 * record.c (record_start): Update.
1319 (record_start, record_stop, cmd_record_start): Update.
1320 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1321 (cmd_record_btrace_pt_start): Update.
1322 (cmd_record_btrace_start): Update.
1323 (cmd_record_btrace_start): Update.
1324 * reverse.c (exec_reverse_once): Update.
1325 * python/python.c (execute_gdb_command): Don't copy the command.
1326 * event-top.c (command_line_handler): Update.
1327 (command_handler): Constify.
1328 * defs.h (deprecated_call_command_hook): Constify.
1329 * cli/cli-script.h (execute_user_command): Constify.
1330 * cli/cli-script.c (execute_user_command): Constify.
1331 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1332 (enum command_control_type): Update.
1333 * main.c (catch_command_errors): Remove non-const overload.
1334 (catch_command_errors_ftype): Remove.
1335 * python/py-cmd.c (cmdpy_function): Constify.
1336 * guile/scm-cmd.c (cmdscm_function): Constify.
1337 * cli/cli-dump.c (call_dump_func): Constify.
1338 * cli/cli-decode.c (do_const_cfunc): Constify.
1339 (do_sfunc): Constify.
1340 (cmd_func): Constify.
1341 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1342 * top.h (execute_command): Constify.
1343 * top.c (execute_command): Constify.
1344 (execute_command_to_string): Constify.
1345 (deprecated_call_command_hook): Constify.
1346 * command.h (cmd_func): Constify.
1347 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1348
eb4c3f4a
TT
13492017-11-07 Tom Tromey <tom@tromey.com>
1350
1351 * ada-lang.c (catch_ada_exception_command): Constify.
1352 (catch_assert_command): Constify.
1353 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1354 (catch_rethrow_command): Constify.
1355 (catch_exception_command_1): Constify.
1356 * breakpoint.h (add_catch_command): Constify.
1357 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1358 (catch_syscall_split_args): Constify.
1359 * break-catch-sig.c (catch_signal_command): Constify.
1360 (catch_signal_split_args): Constify.
1361 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1362 cmd_const_sfunc_ftype.
1363 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1364 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1365 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1366 (add_setshow_string_cmd, struct cmd_list_element)
1367 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1368 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1369 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1370 Constify.
1371 (set_cmd_sfunc): Constify.
1372 (empty_sfunc): Constify.
1373 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1374 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1375 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1376 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1377 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1378 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1379 Constify.
1380 (set_cmd_sfunc): Constify.
1381 (cmd_sfunc_ftype): Remove.
1382 * compile/compile.c (set_compile_args): Constify.
1383 * infrun.c (set_disable_randomization): Constify.
1384 * infcmd.c (set_args_command, set_cwd_command): Constify.
1385 * breakpoint.c (set_condition_evaluation_mode): Constify.
1386 (add_catch_command): Constify.
1387 (catch_fork_command_1, catch_exec_command_1)
1388 (catch_load_command_1, catch_unload_command_1): Constify.
1389 (catch_load_or_unload): Constify.
1390 * guile/scm-param.c (pascm_set_func): Constify.
1391 (add_setshow_generic): Constify.
1392 * python/py-param.c (get_set_value): Constify.
1393 * top.h (set_verbose): Constify.
1394 * tui/tui-win.c (tui_set_var_cmd): Constify.
1395 * mi/mi-main.c (set_mi_async_command): Constify.
1396 * cli/cli-logging.c (set_logging_overwrite)
1397 (set_logging_redirect): Constify.
1398 * value.c (set_max_value_size): Constify.
1399 * valprint.c (set_input_radix, set_output_radix): Constify.
1400 * utils.c (set_width_command, set_height_command): Constify.
1401 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1402 * tracepoint.c (set_disconnected_tracing)
1403 (set_circular_trace_buffer, set_trace_buffer_size)
1404 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1405 * top.c (set_history_size_command, set_verbose, set_editing)
1406 (set_gdb_datadir, set_history_filename): Constify.
1407 * target.c (set_targetdebug, maint_set_target_async_command)
1408 (maint_set_target_non_stop_command, set_target_permissions)
1409 (set_write_memory_permission): Constify.
1410 (open_target): Constify.
1411 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1412 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1413 * symtab.c (set_symbol_cache_size_handler): Constify.
1414 * symfile.c (set_ext_lang_command): Constify.
1415 * symfile-debug.c (set_debug_symfile): Constify.
1416 * source.c (set_directories_command): Constify.
1417 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1418 * serial.c (set_parity): Constify.
1419 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1420 * remote.c (set_remote_exec_file, set_remotebreak)
1421 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1422 * record.c (set_record_insn_history_size)
1423 (set_record_call_history_size): Constify.
1424 * record-full.c (set_record_full_insn_max_num): Constify.
1425 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1426 * osabi.c (set_osabi): Constify.
1427 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1428 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1429 * maint.c (maintenance_set_profile_cmd): Constify.
1430 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1431 * language.c (set_language_command, set_range_command)
1432 (set_case_command): Constify.
1433 * infrun.c (set_non_stop, set_observer_mode)
1434 (set_stop_on_solib_events, set_schedlock_func)
1435 (set_exec_direction_func): Constify.
1436 * infcmd.c (set_inferior_tty_command): Constify.
1437 * disasm.c (set_disassembler_options_sfunc): Constify.
1438 * demangle.c (set_demangling_command): Constify.
1439 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1440 * cris-tdep.c (set_cris_version, set_cris_mode)
1441 (set_cris_dwarf2_cfi): Constify.
1442 * corefile.c (set_gnutarget_command): Constify.
1443 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1444 (set_target_wide_charset_sfunc): Constify.
1445 * breakpoint.c (update_dprintf_commands): Constify.
1446 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1447 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1448 (set_disassembly_style_sfunc): Constify.
1449 * arch-utils.c (set_endian, set_architecture): Constify.
1450 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1451 * agent.c (set_can_use_agent): Constify.
1452
5fed81ff
TT
14532017-11-07 Tom Tromey <tom@tromey.com>
1454
1455 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1456 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1457 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1458 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1459 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1460 (parse_int_arg, show_thread_default_detach_sc_cmd)
1461 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1462 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1463 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1464 (show_task_pause_cmd, set_task_detach_sc_cmd)
1465 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1466 (set_noninvasive_cmd, set_thread_pause_cmd)
1467 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1468 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1469 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1470 * windows-nat.c (display_selectors): Constify.
1471 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1472 non-const "cfunc".
1473 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1474 (cmd_cfunc_eq): Likewise.
1475 (struct cmd_list_element): Likewise.
1476 (do_cfunc): Remove.
1477 (cli_user_command_p): Update.
1478 * command.h (add_cmd): Remove non-const overload.
1479 (cmd_cfunc_ftype): Remove typedef.
1480 (cmd_cfunc_eq): Remove non-const overload.
1481 * value.c (show_values): Constify.
1482 * thread.c (thread_apply_all_command): Constify.
1483 * symfile.c (load_command): Constify.
1484 * source.c (directory_command): Constify.
1485 * maint.c (maintenance_internal_error)
1486 (maintenance_demangler_warning, maintenance_space_display)
1487 (maintenance_print_architecture, maintenance_translate_address)
1488 (maintenance_info_selftests, maintenance_internal_warning):
1489 Constify.
1490 * breakpoint.c (disable_trace_command, enable_trace_command):
1491 Constify.
1492 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1493 Constify.
1494 (add_auto_load_safe_path): Constify.
1495 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1496 * top.h (show_commands): Constify.
1497 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1498 * sparc64-tdep.c (adi_examine_command): Constify.
1499 (adi_assign_command): Constify.
1500
1d12d88f
TT
15012017-11-07 Tom Tromey <tom@tromey.com>
1502
1503 * frame.h (info_locals_command, info_args_command): Constify.
1504 * auto-load.h (auto_load_info_scripts): Constify.
1505 * inferior.h (registers_info): Constify.
1506 * copying.c: Rebuild.
1507 * copying.awk: Constify generated commands.
1508 * auto-load.c (auto_load_info_scripts)
1509 (info_auto_load_gdb_scripts): Constify.
1510 * cli/cli-decode.c (struct cmd_list_element): Take a
1511 cmd_const_cfunc_ftype.
1512 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1513 * tui/tui-win.c (tui_all_windows_info): Constify.
1514 * python/py-auto-load.c (info_auto_load_python_scripts):
1515 Constify.
1516 * cli/cli-cmds.c (show_command): Remove non-const overload.
1517 * tracepoint.c (info_tvariables_command, info_scope_command):
1518 Constify.
1519 (info_static_tracepoint_markers_command): Constify.
1520 * thread.c (info_threads_command): Constify.
1521 (print_thread_info_1): Constify.
1522 * target.c (info_target_command): Constify.
1523 * symtab.c (info_sources_command, info_functions_command)
1524 (info_types_command): Constify.
1525 (info_variables_command): Remove non-const overload.
1526 * symfile.c (info_ext_lang_command): Constify.
1527 * stack.c (info_frame_command, info_locals_command)
1528 (info_args_command): Constify.
1529 (backtrace_command): Remove non-const overload.
1530 * source.c (info_source_command, info_line_command): Constify.
1531 * solib.c (info_sharedlibrary_command): Constify.
1532 * skip.c (info_skip_command): Constify.
1533 * ser-go32.c (info_serial_command): Constify.
1534 * reverse.c (info_bookmarks_command): Constify.
1535 * printcmd.c (info_symbol_command, info_address_command)
1536 (info_display_command): Constify.
1537 * osdata.c (info_osdata_command): Constify.
1538 * objc-lang.c (info_selectors_command, info_classes_command):
1539 Constify.
1540 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1541 * memattr.c (info_mem_command): Constify.
1542 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1543 * linux-fork.c (info_checkpoints_command): Constify.
1544 * infrun.c (info_signals_command): Constify.
1545 * inflow.c (info_terminal_command): Constify.
1546 * inferior.c (info_inferiors_command): Constify.
1547 (print_inferior): Constify.
1548 * infcmd.c (info_program_command, info_all_registers_command)
1549 (info_registers_command, info_vector_command)
1550 (info_float_command): Constify.
1551 (registers_info): Constify.
1552 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1553 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1554 Constify.
1555 * f-valprint.c (info_common_command): Constify.
1556 * dcache.c (info_dcache_command): Constify.
1557 (dcache_info_1): Constify.
1558 * darwin-nat-info.c (info_mach_tasks_command)
1559 (info_mach_task_command, info_mach_ports_command)
1560 (info_mach_port_command, info_mach_threads_command)
1561 (info_mach_thread_command, info_mach_regions_command)
1562 (info_mach_regions_recurse_command, info_mach_region_command)
1563 (info_mach_exceptions_command): Constify.
1564 (get_task_from_args): Constify.
1565 * cp-support.c (info_vtbl_command): Constify.
1566 * breakpoint.c (info_watchpoints_command)
1567 (info_tracepoints_command): Constify.
1568 (info_breakpoints_command): Remove non-const overload.
1569 * avr-tdep.c (avr_io_reg_read_command): Constify.
1570 * auxv.c (info_auxv_command): Constify.
1571 * ada-tasks.c (info_tasks_command): Constify.
1572 (info_task): Constify.
1573 * ada-lang.c (info_exceptions_command): Constify.
1574
0b39b52e
TT
15752017-11-07 Tom Tromey <tom@tromey.com>
1576
1577 * solib.h (no_shared_libraries): Constify.
1578 * frame.h (return_command): Constify.
1579 * cli/cli-cmds.h (quit_command): Constify.
1580 * top.h (quit_command, execute_command): Constify.
1581 * target.h (flash_erase_command): Constify.
1582 * inferior.h (set_inferior_args, attach_command): Constify.
1583 * tracepoint.h (start_tracing, stop_tracing): Constify.
1584 * breakpoint.h (break_command, tbreak_command)
1585 (hbreak_command_wrapper, thbreak_command_wrapper)
1586 (rbreak_command_wrapper, watch_command_wrapper)
1587 (awatch_command_wrapper, rwatch_command_wrapper)
1588 (get_tracepoint_by_number): Constify.
1589 * symtab.c (info_variables_command, rbreak_command)
1590 (symtab_symbol_info): Constify.
1591 (info_variables_command): Add non-const overload.
1592 * top.c (dont_repeat_command): Constify.
1593 * breakpoint.c (ignore_command, commands_command)
1594 (condition_command, tbreak_command, hbreak_command)
1595 (thbreak_command, clear_command, break_command)
1596 (info_breakpoints_command, watch_command, rwatch_command)
1597 (awatch_command, trace_command, ftrace_command, strace_command)
1598 (trace_pass_command, break_range_command, dprintf_command)
1599 (agent_printf_command, get_tracepoint_by_number)
1600 (watch_maybe_just_location, trace_pass_command): Constify.
1601 (info_breakpoints_command): Add non-const overload.
1602 * tracefile.c (tsave_command): Constify.
1603 * infcmd.c (attach_command, disconnect_command, signal_command)
1604 (queue_signal_command, stepi_command, nexti_command)
1605 (finish_command, next_command, step_command, until_command)
1606 (advance_command, jump_command, continue_command, run_command)
1607 (start_command, starti_command, interrupt_command)
1608 (run_command_1, set_inferior_args, step_1): Constify.
1609 * inferior.c (add_inferior_command, remove_inferior_command)
1610 (clone_inferior_command): Constify.
1611 * linux-fork.c (checkpoint_command, restart_command): Constify.
1612 * windows-nat.c (signal_event_command): Constify.
1613 * guile/guile.c (guile_repl_command, guile_command): Constify.
1614 * printcmd.c (x_command, display_command, printf_command)
1615 (output_command, set_command, call_command, print_command)
1616 (eval_command): Constify.
1617 (non_const_set_command): Remove.
1618 (_initialize_printcmd): Update.
1619 * source.c (forward_search_command, reverse_search_command):
1620 Constify.
1621 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1622 Constify.
1623 * infrun.c (handle_command): Constify.
1624 * memattr.c (mem_command): Constify.
1625 * stack.c (return_command, up_command, up_silently_command)
1626 (down_command, down_silently_command, frame_command)
1627 (backtrace_command, func_command, backtrace_command_1): Constify.
1628 (backtrace_command): Add non-const overload.
1629 * remote-sim.c (simulator_command): Constify.
1630 * exec.c (set_section_command): Constify.
1631 * tracepoint.c (tdump_command, trace_variable_command)
1632 (tstatus_command, tstop_command, tstart_command)
1633 (end_actions_pseudocommand, while_stepping_pseudocommand)
1634 (collect_pseudocommand, teval_pseudocommand, actions_command)
1635 (start_tracing, stop_tracing): Constify.
1636 * value.c (init_if_undefined_command): Constify.
1637 * tui/tui-stack.c (tui_update_command): Constify.
1638 * tui/tui-win.c (tui_refresh_all_command)
1639 (tui_set_tab_width_command, tui_set_win_height_command)
1640 (tui_set_focus_command, tui_scroll_forward_command)
1641 (tui_scroll_backward_command, tui_scroll_left_command)
1642 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1643 (tui_set_win_height): Constify.
1644 * tui/tui-layout.c (tui_layout_command): Constify.
1645 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1646 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1647 (proc_untrace_sysexit_cmd): Constify.
1648 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1649 (threadset_test_cmd, threadlist_update_test_cmd)
1650 (threadalive_test): Constify.
1651 * objc-lang.c (print_object_command): Constify.
1652 * command.h (add_com): Constify.
1653 * cli/cli-dump.c (restore_command): Constify.
1654 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1655 (help_command, complete_command, shell_command, edit_command)
1656 (list_command, disassemble_command, make_command)
1657 (apropos_command, alias_command): Constify.
1658 * cli/cli-script.c (document_command, define_command)
1659 (while_command, if_command, validate_comname): Constify.
1660 * cli/cli-decode.c (struct cmd_list_element): Change type of
1661 "fun".
1662 * target.c (do_monitor_command, flash_erase_command): Constify.
1663 * regcache.c (reg_flush_command): Constify.
1664 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1665 (reverse_nexti, reverse_continue, reverse_finish)
1666 (save_bookmark_command, goto_bookmark_command)
1667 (exec_reverse_once): Constify.
1668 * python/python.c (python_interactive_command, python_command):
1669 Constify.
1670 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1671 Constify.
1672 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1673 * gcore.c (gcore_command): Constify.
1674
85c4be7c
TT
16752017-11-07 Tom Tromey <tom@tromey.com>
1676
1677 * printcmd.c (x_command): Call set_repeat_arguments.
1678 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1679 * top.c (repeat_arguments): New global.
1680 (set_repeat_arguments): New function.
1681 (execute_command): Handle repeat_arguments.
1682 (show_commands): Calls set_repeat_arguments.
1683 * command.h (set_repeat_arguments): Declare.
1684
022643b4
TT
16852017-11-07 Tom Tromey <tom@tromey.com>
1686
1687 * stack.c (backtrace_command): Use std::string.
1688 (backtrace_command_1): Make "count_exp" const.
1689
5614fb77
TT
16902017-11-07 Tom Tromey <tom@tromey.com>
1691
1692 * source.c (directory_switch, mod_path, add_path): Constify.
1693 * defs.h (add_path, mod_path, directory_switch): Constify.
1694 * mi/mi-cmd-env.c (env_mod_path): Constify.
1695
6be9a197
TT
16962017-11-07 Tom Tromey <tom@tromey.com>
1697
1698 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1699 (run_command_1, continue_command, step_1, jump_command)
1700 (signal_command, until_command, advance_command, finish_command)
1701 (attach_command): Update.
1702
c2252c0d
TT
17032017-11-07 Tom Tromey <tom@tromey.com>
1704
1705 * command.h (set_cmd_cfunc): Don't declare.
1706 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1707
1ee870c5
TT
17082017-11-07 Tom Tromey <tom@tromey.com>
1709
1710 * stack.c (select_frame_command): Constify.
1711 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1712 * command.h (add_com_suppress_notification): Constify.
1713
ee7ddd71
TT
17142017-11-07 Tom Tromey <tom@tromey.com>
1715
1716 * breakpoint.c (stop_command): Constify.
1717 * cli/cli-decode.c (struct cmd_list_element): Constify.
1718 * command.h (add_abbrev_prefix_cmd): Constify.
1719
95e95a6d
PA
17202017-11-07 Pedro Alves <palves@redhat.com>
1721
1722 * breakpoint.c (extract_bp_kind): New enum.
1723 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1724 factored out from ...
1725 (extract_bp_number_and_location): ... here.
1726 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1727
cc638e86
PA
17282017-11-07 Pedro Alves <palves@redhat.com>
1729
1730 * breakpoint.c (extract_bp_number_and_location): Change return
1731 type to void. Throw error instead of warning.
1732 (enable_disable_command): Adjust.
1733
d0fe4701
XR
17342017-11-07 Xavier Roirand <roirand@adacore.com>
1735 Pedro Alves <palves@redhat.com>
1736
1737 * breakpoint.c (map_breakpoint_number_range): New, factored out
1738 from ...
1739 (map_breakpoint_numbers): ... here.
1740 (find_location_by_number): Change parameters from string to
1741 breakpoint number and location.
1742 (extract_bp_number_and_location): New function.
1743 (enable_disable_bp_num_loc)
1744 (enable_disable_breakpoint_location_range)
1745 (enable_disable_command): New functions, factored out ...
1746 (enable_command, disable_command): ... these functions, and
1747 adjusted to support ranges.
1748 * NEWS: Document enable/disable breakpoint location range feature.
1749
635dc5b2
LM
17502017-11-06 Luis Machado <luis.machado@linaro.org>
1751
1752 * MAINTAINERS (Write After Approval): Update my e-mail address.
1753
556e5da5
PA
17542017-11-06 Pedro Alves <palves@redhat.com>
1755
1756 * gnu-nat.c (gnu_terminal_init): Delete.
1757 (gnu_target): Don't install gnu_terminal_init.
1758 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1759 (child_terminal_init): ... this function.
1760
d1928160
PA
17612017-11-06 Pedro Alves <palves@redhat.com>
1762
1763 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1764 sgtty.h.
1765 * config.in, configure: Regenerate.
1766
6aa899ce
PA
17672017-11-06 Pedro Alves <palves@redhat.com>
1768
1769 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1770 (async_init_signals): Adjust.
1771 (handle_stop_sig): Rename to ...
1772 (handle_sigtstp): ... this.
1773 (async_stop_sig): Rename to ...
1774 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1775 SIGTSTP path.
1776 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1777 instead of STOP_SIGNAL thoughout.
1778 (handle_stop_sig): Rename to ...
1779 (handle_sigtstp): ... this.
1780 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1781
a94799ac
PA
17822017-11-06 Pedro Alves <palves@redhat.com>
1783
1784 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1785 longer set flags twice in row.
1786
726e1356
PA
17872017-11-06 Pedro Alves <palves@redhat.com>
1788
1789 * Makefile.in (SER_HARDWIRE): Update comment.
1790 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1791 * common/gdb_termios.h: Delete file.
1792 * common/job-control.c: Include termios.h and unistd.h instead of
1793 gdb_termios.h.
1794 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1795 check.
1796 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1797 Remove sgtty code.
1798 * configure.ac: No longer check for termio.h and sgtty.h.
1799 * configure: Regenerate.
1800 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1801 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1802 Replace PROCESS_GROUP_TYPE references with pid_t references
1803 throughout.
1804 (gdb_getpgrp): Delete.
1805 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1806 (child_terminal_inferior): Remove comment. Remove sgtty code.
1807 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1808 gdb_getpgrp. Use serial_set_tty_state instead aof
1809 serial_noflush_set_tty_state. Remove sgtty code.
1810 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1811 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1812 (inferior_process_group): Now returns pid_t.
1813 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1814 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1815 * ser-event.c (serial_event_ops): Update.
1816 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1817 (dos_ops): Update.
1818 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1819 * ser-pipe.c (pipe_ops): Update.
1820 * ser-tcp.c (tcp_ops): Update.
1821 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1822 HAVE_TERMIOS checks.
1823 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1824 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1825 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1826 assume termios.
1827 (hardwire_noflush_set_tty_state): Delete.
1828 (hardwire_print_tty_state, hardwire_drain_output)
1829 (hardwire_flush_output, hardwire_flush_input)
1830 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1831 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1832 code, and assume termios.
1833 (hardwire_ops): Update.
1834 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1835 * serial.c (serial_noflush_set_tty_state): Delete.
1836 * serial.h (serial_noflush_set_tty_state): Delete.
1837 (serial_ops::noflush_set_tty_state): Delete.
1838
1cfb73db
UW
18392017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1840
1841 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1842 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1843 (COMMON_OBS): Remove doublest.o and dfp.o.
1844 Do not build target-float.c (instead of doublest.c)
1845 with -Wformat-nonliteral.
1846
1847 * doublest.c: Remove file.
1848 * doublest.h: Remove file.
1849 * dfp.c: Remove file.
1850 * dfp.h: Remove file.
1851
1852 * target-float.c: Do not include "doublest.h" and "dfp.h".
1853 (DOUBLEST): Move here from doublest.h.
1854 (enum float_kind): Likewise.
1855 (FLOATFORMAT_CHAR_BIT): Likewise.
1856 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1857 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1858 (floatformat_precision): Likewise.
1859 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1860 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1861 Likewise.
1862 (host_float_format, host_double_format, host_long_double_format):
1863 Likewise.
1864 (floatformat_to_string, floatformat_from_string): Likewise.
1865 (floatformat_to_doublest): Likewise. Also, inline the original
1866 convert_floatformat_to_doublest.
1867 (floatformat_from_doublest): Likewise. Also, inline the original
1868 convert_floatformat_from_doublest.
1869
1870 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1871 (MAX_DECIMAL_STRING): Move here from dfp.c.
1872 (match_endianness): Likewise.
1873 (set_decnumber_context, decimal_check_errors): Likewise.
1874 (decimal_from_number, decimal_to_number): Likewise.
1875 (decimal_to_string, decimal_from_string): Likewise. Make static.
1876 (decimal_from_longest, decimal_from_ulongest): Likewise.
1877 (decimal_to_longest): Likewise.
1878 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1879 (decimal_convert): Likewise.
1880
b07e9c46
UW
18812017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1882
1883 * doublest.c: Do not include "gdbtypes.h".
1884 (extract_typed_floating): Remove.
1885 (store_typed_floating): Remove.
1886 (convert_typed_floating): Remove.
1887 * doublest.h (struct type): Remove.
1888 (DOUBLEST_PRINT_FORMAT): Remove.
1889 (DOUBLEST_SCAN_FORMAT): Remove.
1890 (extract_typed_floating): Remove.
1891 (store_typed_floating): Remove.
1892 (convert_typed_floating): Remove.
1893
1894 * dfp.c (decimal_from_doublest): Remove.
1895 (decimal_to_doublest): Remove.
1896 * dfp.h: Do not include "doublest.h".
1897 (decimal_from_doublest): Remove.
1898 (decimal_to_doublest): Remove.
1899
1900 * value.c: Do not include "doublest.h" and "dfp.h".
1901 (value_as_double): Remove.
1902 (unpack_double): Remove.
1903 (value_from_double): Remove.
1904 (value_from_decfloat): Remove.
1905 * value.h: Do not include "doublest.h".
1906 (value_as_double): Remove.
1907 (unpack_double): Remove.
1908 (value_from_double): Remove.
1909 (value_from_decfloat): Remove.
1910
3b2ca824
UW
19112017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1912
1913 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1914 (i386_extract_return_value): Use target_float_convert.
1915 (i386_store_return_value): Likewise.
1916 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1917 (i387_value_to_register): Likewise.
1918 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1919 (ia64_register_to_value): Use target_float_convert.
1920 (ia64_value_to_register): Likewise.
1921 (ia64_extract_return_value): Likewise.
1922 (ia64_store_return_value): Likewise.
1923 (ia64_push_dummy_call): Likewise.
1924 * m68k-tdep.c: Include "target-float.h".
1925 (m68k_register_to_value): Use target_float_convert.
1926 (m68k_value_to_register): Likewise.
1927 (m68k_svr4_extract_return_value): Likewise.
1928 (m68k_svr4_store_return_value): Likewise.
1929 * ppc-sysv-tdep.c: Include "target-float.h".
1930 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1931 (do_ppc_sysv_return_value): Likewise.
1932 (ppc64_sysv_abi_push_freg): Likewise.
1933 (ppc64_sysv_abi_return_value_base): Likewise.
1934 * rs6000-aix-tdep.c: Include "target-float.h".
1935 (rs6000_push_dummy_call): Use target_float_convert.
1936 (rs6000_return_value): Likewise.
1937 * rs6000-lynx178-tdep.c: Include "target-float.h".
1938 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1939 (rs6000_lynx178_return_value): Likewise.
1940 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1941 (rs6000_register_to_value): Use target_float_convert.
1942 (rs6000_value_to_register): Likewise.
1943 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1944 (arm_extract_return_value): Use target_float_convert.
1945 (arm_store_return_value): Likewise.
1946 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1947 (sh_register_convert_to_virtual): Use target_float_convert.
1948 (sh_register_convert_to_raw): Likewise.
1949 * sh64-tdep.c: Include "target-float.h".
1950 (sh64_extract_return_value): Use target_float_convert.
1951 (sh64_register_convert_to_virtual): Likewise.
1952 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1953
14ad9311
UW
19542017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1955
1956 * target-float.c (floatformat_to_host_double): New function.
1957 (floatformat_from_host_double): Likewise.
1958 (target_float_to_host_double): Likewise.
1959 (target_float_from_host_double): Likewise.
1960 * target-float.h (target_float_to_host_double): Add prototype.
1961 (target_float_from_host_double): Likewise.
1962
1963 * guile/scm-value.c: Include "target-float.h".
1964 (gdbscm_value_to_real): Use target_float_to_host_double.
1965 Handle integer source values via value_as_long.
1966 * guile/scm-math.c: Include "target-float.h". Do not include
1967 "doublest.h", "dfp.h", and "expression.h".
1968 (vlscm_convert_typed_number): Use target_float_from_host_double.
1969 (vlscm_convert_number): Likewise.
1970
1971 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1972 (convert_value_from_python): Use target_float_from_host_double.
1973
50eff16b
UW
19742017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1975
1976 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1977 (cast_from_fixed): Likewise.
1978 (ada_scaling_type): New function.
1979 (ada_delta): Return value instead of DOUBLEST. Perform target
1980 arithmetic instead of host arithmetic.
1981 (scaling_factor): Rename to ...
1982 (ada_scaling_factor) ... this. Make non-static. Return value instead
1983 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1984 (ada_fixed_to_float): Remove.
1985 (ada_float_to_fixed): Remove.
1986 * ada-lang.h (ada_fixed_to_float): Remove.
1987 (ada_float_to_fixed): Remove.
1988 (ada_delta): Return value instead of DOUBLEST.
1989 (ada_scaling_factor): Add prototype.
1990
1991 * ada-typeprint.c: Include "target-float.h".
1992 (print_fixed_point_type): Perform target arithmetic instead of
1993 host arithmetic.
1994 * ada-valprint.c: Include "target-float.h".
1995 (ada_val_print_num): Perform target arithmetic instead of
1996 host arithmetic for fixed-point types.
1997
66c02b9e
UW
19982017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1999
2000 * target-float.c: Include <math.h>.
2001 (floatformat_binop): New function.
2002 (floatformat_compare): Likewise.
2003 (target_float_binop): Likewise.
2004 (target_float_compare): Likewise.
2005 * target-float.h: Include "expression.h".
2006 (target_float_binop): Add prototype.
2007 (target_float_compare): Likewise.
2008
2009 * valarith.c: Do not include "doublest.h" and "dfp.h".
2010 Include "common/byte-vector.h".
2011 (value_args_as_decimal): Remove, replace by ...
2012 (value_args_as_target_float): ... this function. Handle both
2013 binary and decimal target floating-point formats.
2014 (scalar_binop): Handle both binary and decimal FP using
2015 value_args_as_target_float and target_float_binop.
2016 (value_equal): Handle both binary and decimal FP using
2017 value_args_as_target_float and target_float_compare.
2018 (value_less): Likewise.
2019 (value_pos): Handle all scalar types as simple copy.
2020 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2021 * dfp.c (decimal_binop): Throw error instead of internal_error
2022 when called with an unsupported operation code.
2023
f69fdf9b
UW
20242017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2025
2026 * target-float.c (target_float_to_string): New function.
2027 (target_float_from_string): New function.
2028 * target-float.h (target_float_to_string): Add prototype.
2029 (target_float_from_string): Add prototype.
2030
2031 * valprint.c: Include "target-float.h". Do not include
2032 "doublest.h" and "dfp.h".
2033 (print_floating): Use target_float_to_string.
2034 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2035 (printf_floating): Use target_float_to_string.
2036 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2037 (print_i387_value): Use target_float_to_string.
2038 * mips-tdep.c: Include "target-float.h".
2039 (mips_print_fp_register): Use target_float_to_string.
2040 * sh64-tdep.c: Include "target-float.h".
2041 (sh64_do_fp_register): Use target_float_to_string.
2042
2043 * parse.c: Include "target-float.h". Do not include
2044 "doublest.h" and "dfp.h".
2045 (parse_float): Use target_float_from_string.
2046 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2047 (define_symbol): Use target_float_from_string.
2048 * gdbarch-selftests.c: Include "target-float.h".
2049 (register_to_value_test): Use target_float_from_string.
2050
70100014
UW
20512017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2052
2053 * Makefile.c (SFILES): Add target-float.c.
2054 (HFILES_NO_SRCDIR): Add target-float.h.
2055 (COMMON_OBS): Add target-float.o.
2056 * target-float.h: New file.
2057 * target-float.c: New file.
2058
2059 * doublest.c (floatformat_classify): Fix detection of float_zero.
2060
2061 * gdbtypes.c (is_floating_type): New function.
2062 * gdbtypes.h (is_floating_type): Add prototype.
2063
2064 * value.c: Do not include "floatformat.h".
2065 (unpack_double): Use target_float_is_valid.
2066 (is_floating_value): New function.
2067 * value.h (is_floating_value): Add prototype-
2068
2069 * valarith.c: Include "target-float.h".
2070 (value_logical_not): Use target_float_is_zero.
2071
2072 * python/py-value.c: Include "target-float.h".
2073 (valpy_nonzero): Use target_float_is_zero.
2074
ab4b1c46
TT
20752017-11-04 Tom Tromey <tom@tromey.com>
2076
2077 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2078
454dafbd
TT
20792017-11-04 Tom Tromey <tom@tromey.com>
2080
2081 * breakpoint.c (set_momentary_breakpoint): Return
2082 breakpoint_up.
2083 (until_break_command): Update.
2084 (new_until_break_fsm): Change argument types to
2085 breakpoint_up.
2086 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2087 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2088 Remove.
2089 * infcmd.c (finish_forward): Update.
2090 * breakpoint.h (set_momentary_breakpoint)
2091 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2092 (make_cleanup_delete_breakpoint): Remove.
2093 (struct breakpoint_deleter): New.
2094 (breakpoint_up): New typedef.
2095 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2096 (insert_exception_resume_breakpoint): Update.
2097 (insert_exception_resume_from_probe): Update.
2098 (insert_longjmp_resume_breakpoint): Update.
2099 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2100 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2101 * infcall.c (call_function_by_hand_dummy): Update
2102
331b71e5
TT
21032017-11-04 Tom Tromey <tom@tromey.com>
2104
2105 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2106
9f584b37
TT
21072017-11-04 Tom Tromey <tom@tromey.com>
2108
2109 * linux-tdep.c (linux_core_info_proc_mappings): Use
2110 gdb::def_vector.
2111 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2112 "size" argument.
2113 (linux_corefile_thread): Update.
2114 (linux_make_corefile_notes): Remove unused variable.
2115
779bc38e
TT
21162017-11-04 Tom Tromey <tom@tromey.com>
2117
2118 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2119 gdb::byte_vector.
2120
ed2b3126
TT
21212017-11-04 Tom Tromey <tom@tromey.com>
2122
2123 * objfiles.c (do_free_objfile_cleanup): Remove.
2124 * compile/compile-object-load.c (compile_object_load): Update.
2125 * objfiles.h (make_cleanup_free_objfile): Remove.
2126
7f6743fd
TT
21272017-11-04 Tom Tromey <tom@tromey.com>
2128
2129 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2130 (adi_read_versions): Change "tags" to "gdb_byte *".
2131 (adi_print_versions): Likewise.
2132
c80049d3
TT
21332017-11-04 Tom Tromey <tom@tromey.com>
2134
2135 * breakpoint.c
2136 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2137 from start_rbreak_breakpoints.
2138 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2139 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2140 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2141 * symtab.c (do_end_rbreak_breakpoints): Remove.
2142 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2143
167b0be1
TT
21442017-11-04 Tom Tromey <tom@tromey.com>
2145
2146 * cp-namespace.c (reset_directive_searched): Remove.
2147 (cp_lookup_symbol_via_imports): Use scoped_restore.
2148 * cp-support.c (reset_directive_searched): Remove.
2149 (make_symbol_overload_list_using): Use scoped_restore.
2150 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2151 (reset_directive_searched): Remove.
2152
5eae7aea
TT
21532017-11-04 Tom Tromey <tom@tromey.com>
2154
2155 * symfile.c (find_separate_debug_file_by_debuglink): Use
2156 unique_xmalloc_ptr.
2157
c6bcad5f
TT
21582017-11-04 Tom Tromey <tom@tromey.com>
2159
2160 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2161 type of "info".
2162 (compute_stack_depth): Likewise.
2163 (do_compile_dwarf_expr_to_c): Use std::vector.
2164
20dcd8ca
TT
21652017-11-04 Tom Tromey <tom@tromey.com>
2166
2167 * compile/compile-object-load.c (link_callbacks_einfo): Use
2168 std::string.
2169
33c7c59d
TT
21702017-11-04 Tom Tromey <tom@tromey.com>
2171
2172 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2173 Use scoped_free_pendings.
2174 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2175 scoped_free_pendings.
2176 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2177 (xcoff_initial_scan): Likewise.
2178 * buildsym.c (reset_symtab_globals): Update comment.
2179 (scoped_free_pendings): Rename from really_free_pendings.
2180 (prepare_for_building): Update comment.
2181 (buildsym_init): Likewise.
2182 * buildsym.h (class scoped_free_pendings): New class.
2183 (really_free_pendings): Don't declare.
2184
67fa57cf
UW
21852017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2186
2187 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2188 output when converting a zero value to a special byteorder format.
2189
f26ae15b
YQ
21902017-11-02 Yao Qi <yao.qi@linaro.org>
2191
2192 * frame.c (do_frame_register_read): Remove aspace.
2193 * jit.c (jit_frame_sniffer): Likwise.
2194 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2195 * regcache.c (regcache::regcache): Pass nullptr.
2196 (regcache_print): Caller updated.
2197 * regcache.h (regcache::regcache): Remove one constructor
2198 parameter aspace.
2199
6c6e9412
YQ
22002017-11-02 Yao Qi <yao.qi@linaro.org>
2201
2202 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2203
8b86c959
YQ
22042017-11-02 Yao Qi <yao.qi@linaro.org>
2205
2206 * breakpoint.c (insert_single_step_breakpoints): Update.
2207 * frame.c (struct frame_info) <aspace>: Add const.
2208 (frame_save_as_regcache): Add const.
2209 (get_frame_address_space): Return const address_space *.
2210 * frame.h (get_frame_address_space): Update declaration.
2211 * infrun.c (struct step_over_info) <aspace>: Add const.
2212 (set_step_over_info): Make aspace const.
2213 (displaced_step_prepare_throw): Change variable const.
2214 (resume): Likewise.
2215 (proceed): Likewise.
2216 (adjust_pc_after_break): Likewise.
2217 (save_waitstatus): Likewise.
2218 (handle_signal_stop): Likewise.
2219 (keep_going_pass_signal): Likewise.
2220 * jit.c (jit_frame_sniffer): Add const.
2221 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2222 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2223 * record-full.c (record_full_wait_1): Likewise.
2224 * regcache.c (regcache::regcache): Change parameter to const.
2225 * regcache.h (regcache::regcache): Likewise.
2226 (regcache::aspace): Return const address_space *.
2227 (regcache) <m_aspace>: Add const.
2228
a01bda52
YQ
22292017-11-02 Yao Qi <yao.qi@linaro.org>
2230
2231 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2232 * frame.c (create_sentinel_frame): Likewise.
2233 * infrun.c (displaced_step_prepare_throw): Likewise.
2234 (resume): Likewise.
2235 (thread_still_needs_step_over_bp): Likewise.
2236 (proceed): Likewise.
2237 (do_target_wait): Likewise.
2238 (adjust_pc_after_break): Likewise.
2239 (handle_syscall_event): Likewise.
2240 (save_waitstatus): Likewise.
2241 (handle_inferior_event_1): Likewise.
2242 (handle_signal_stop): Likewise.
2243 (keep_going_pass_signal): Likewise.
2244 * linux-nat.c (status_callback): Likewise.
2245 (save_stop_reason): Likewise.
2246 (resume_stopped_resumed_lwps): Likewise.
2247 * record-full.c (record_full_exec_insn): Likewise.
2248 (record_full_wait_1): Likewise.
2249 * regcache.c (get_regcache_aspace): Remove.
2250 * regcache.h (get_regcache_aspace): Remove.
2251
d999647b
YQ
22522017-11-02 Yao Qi <yao.qi@linaro.org>
2253
2254 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2255 (init_regcache_descr): Use gdbarch_num_regs.
2256 (regcache::regcache): Likewise.
2257 (regcache::get_register_status): Likewise.
2258 (regcache::assert_raw_regnum): Likewise.
2259 (regcache::cooked_read): Likewise.
2260 (regcache::cooked_read_value): Likewise.
2261 (regcache::cooked_write): Likewise.
2262 (regcache::dump): Likewise.
2263 (regcache::num_raw_registers): New method.
2264 * regcache.h (class regcache) <num_raw_registers>: New.
2265
4e888c28
YQ
22662017-11-02 Yao Qi <yao.qi@linaro.org>
2267
2268 * regcache.c (regcache::assert_regnum): New method.
2269 (regcache::invalidate): Call assert_regnum.
2270 (regcache::raw_update): Likewise.
2271 (regcache::raw_write): Likewise.
2272 (regcache::raw_read_part): Likewise.
2273 (regcache::raw_write_part): Likewise.
2274 (regcache::raw_supply): Likewise.
2275 (regcache::raw_supply_integer): Likewise.
2276 (regcache::raw_supply_zeroed): Likewise.
2277 (regcache::raw_collect): Likewise.
2278 (regcache::raw_collect_integer): Likewise.
2279 * regcache.h (regcache::assert_regnum): Declare.
2280
2e1b49b3
YQ
22812017-11-02 Yao Qi <yao.qi@linaro.org>
2282
2283 * regcache.c (regcache::dump): Remove code.
2284
6c5218df
YQ
22852017-11-02 Yao Qi <yao.qi@linaro.org>
2286
2287 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2288 Remove.
2289 <sizeof_cooked_register_status>: Remove.
2290 (init_regcache_descr): Update.
2291 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2292 (regcache::save): Likewise.
2293 (regcache::dump): Likewise.
2294
dcc31d28
JB
22952017-11-01 James Bowman <james.bowman@ftdichip.com>
2296
2297 * ft32-tdep.c (ft32_fetch_instruction): New function.
2298 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2299
3a87ae65
SM
23002017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2301
2302 * cli/cli-script.c (execute_control_command): Rename to ...
2303 (execute_control_command_1): ... this.
2304 (execute_control_command): New function.
2305
09b847f3
SM
23062017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2307
2308 * tracepoint.c (tfind_command): Remove const_cast.
2309
f871c485
MG
23102017-10-30 Mike Gulick <mgulick@mathworks.com>
2311
2312 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2313
b020ff80
SM
23142017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2315
2316 * common/common-utils.h (in_inclusive_range): New function.
2317 * arm-tdep.c (arm_record_extension_space): Use
2318 in_inclusive_range.
2319 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2320 * cris-tdep.c (cris_spec_reg_applicable): Use
2321 in_inclusive_range.
2322
1b81856f
PA
23232017-10-30 Pedro Alves <palves@redhat.com>
2324 Simon Marchi <simon.marchi@ericsson.com>
2325
2326 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2327 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2328
31b833b3
PA
23292017-10-30 Pedro Alves <palves@redhat.com>
2330
2331 * common/common-utils.c (string_appendf, string_vappendf): New
2332 functions.
2333 * common/common-utils.h (string_appendf, string_vappendf): New
2334 declarations.
2335 * unittests/common-utils-selftests.c (string_appendf_func)
2336 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2337 (string_vappendf_tests): New functions.
2338 (_initialize_common_utils_selftests): Register "string_appendf" and
2339 "string_vappendf tests".
2340
4a250334
PA
23412017-10-30 Pedro Alves <palves@redhat.com>
2342
2343 * unittests/common-utils-selftests.c (format_func): New typedef.
2344 (string_printf_tests, string_vprintf_tests): Tests factored out
2345 and merged to ...
2346 (test_format_func): ... this new function.
2347 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2348 test_format_func.
2349
16c5c17e
SM
23502017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2351
2352 * darwin-nat.c: Remove include of gdb.h.
2353
7ca51576
SM
23542017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2355
2356 * xtensa-xtregs.c: Fix formatting issues.
2357
c1342859
SM
23582017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2359
2360 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2361
484d8d36
MD
23622017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2363
2364 PR python/21213
2365 * python/py-infthread.c (thpy_get_inferior): Increment reference
2366 of inferior before returning it.
2367
b5540b5f
SM
23682017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2369
2370 * unittests/common-utils-selftests.c (format): Add
2371 ATTRIBUTE_PRINTF.
2372
5a9dcda1
SM
23732017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2374
2375 * xml-syscall.c (struct syscall_desc): Add constructor.
2376 <name>: Change type to std::string.
2377 (syscall_desc_up): New typedef.
2378 (syscall_desc_p): Remove typeder.
2379 (DEF_VEC_P(syscall_desc_p)): Remove.
2380 (struct syscall_group_desc): Add constructor.
2381 <name>: Change type to std::string.
2382 <syscalls>: Change type to std::vector.
2383 (syscall_group_desc_up): New typedef.
2384 (syscall_group_desc_p): Remove typedef.
2385 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2386 (struct syscalls_info) <syscalls>: Change type to std::vector of
2387 unique_ptr.
2388 <groups>: Likewise.
2389 <my_gdb_datadir>: Change type to std::string.
2390 (syscalls_info_up): New typedef.
2391 (allocate_syscalls_info): Remove.
2392 (syscalls_info_free_syscalls_desc): Remove.
2393 (syscalls_info_free_syscall_group_desc): Remove.
2394 (free_syscalls_info): Remove.
2395 (make_cleanup_free_syscalls_info): Remove.
2396 (syscall_group_create_syscall_group_desc): Adjust.
2397 (syscall_group_add_syscall): Adjust.
2398 (syscall_create_syscall_desc): Adjust.
2399 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2400 (init_syscalls_info): Adjust.
2401 (syscall_group_get_group_by_name): Adjust.
2402 (xml_get_syscall_number): Adjust.
2403 (xml_get_syscall_name): Adjust.
2404 (xml_list_of_syscalls): Adjust.
2405 (xml_list_syscalls_by_group): Adjust.
2406 (xml_list_of_groups): Adjust.
2407
45461e0d
SM
24082017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2409
2410 * probe.h: Don't include gdb_vecs.h.
2411 (DEF_VEC_P (probe_p)): Remove.
2412 (find_probes_in_objfile): Return an std::vector.
2413 * probe.c (find_probes_in_objfile): Likewise.
2414 * breakpoint.c (breakpoint_objfile_data)
2415 <longjmp_probes>: Change type to std::vector.
2416 <exception_probes>: Likewise.
2417 (free_breakpoint_probes): Don't manually free vectors.
2418 (create_longjmp_master_breakpoint): Adjust.
2419 (create_exception_master_breakpoint): Adjust.
2420 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2421 parameter type, adjust.
2422 (svr4_create_solib_event_breakpoints): Adjust.
2423
43dce439
SM
24242017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2425
2426 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2427 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2428 with new.
2429 (free_breakpoint_probes): Rename to ...
2430 (free_breakpoint_objfile_data): ... this, and call delete on
2431 bp_objfile_data..
2432
6a1b9516
SM
24332017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2434
2435 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2436 (loaded_script_ptr): Remove typedef.
2437 (DEF_VEC_P (loaded_script_ptr)): Remove.
2438 (struct collect_matching_scripts_data): Add constructor.
2439 <scripts_p>: Change type to (pointer to) std::vector.
2440 (collect_matching_scripts_data): Adjust.
2441 (sort_scripts_by_name): Make suitable for std::sort.
2442 (print_scripts): Don't sort vector, adjust to std::vector.
2443 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2444
593e3209
SM
24452017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2446
2447 * symfile.c (filename_language): Make struct, not typedef. Add
2448 constructor.
2449 <ext>: Change type to std::string.
2450 (DEF_VEC_O (filename_language)): Remove.
2451 (filename_language_table): Change type to std::vector.
2452 (add_filename_language): Adjust.
2453 (set_ext_lang_command): Adjust.
2454 (info_ext_lang_command): Adjust.
2455 (deduce_language_from_filename): Adjust.
2456 (class scoped_restore_filename_language_table): Remove.
2457 (test_filename_language): Use scoped_restore.
2458 (test_set_ext_lang_command): Use scoped_restore, adjust to
2459 std::vector change.
2460
32fa66eb
SM
24612017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2462
2463 * symfile.c: Include selftest.h.
2464 (class scoped_restore_filename_language_table): New.
2465 (test_filename_language): New test.
2466 (test_set_ext_lang_command): New test.
2467 (_initialize_symfile): Register tests.
2468
4a27f119
KS
24692017-10-27 Keith Seitz <keiths@redhat.com>
2470
2471 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2472 in the bp_location, falling back to find_pc_sect_function when
2473 needed.
2474 (add_location_to_breakpoint): Save sal->symbol.
2475 * breakpoint.h (struct bp_location) <symbol>: New field.
2476 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2477 * symtab.h (struct symtab_and_line) <symbol>: New field.
2478
a43f3893
PF
24792017-10-26 Patrick Frants <osscontribute@gmail.com>
2480
7453e6b2 2481 PR gdb/13669
a43f3893
PF
2482 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2483 to rewind obstack.
2484
23cc4e1b
PA
24852017-10-26 Pedro Alves <palves@redhat.com>
2486
2487 * remote.c (remote_async_terminal_ours_p): Delete.
2488 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2489 Remove references to 'remote_async_terminal_ours_p'.
2490
6abc18bb
YQ
24912017-10-26 Yao Qi <yao.qi@linaro.org>
2492
2493 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2494
bd522513
YQ
24952017-10-26 Yao Qi <yao.qi@linaro.org>
2496
2497 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2498 aspace const.
2499 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2500 Likewise.
2501 * breakpoint.c (bpstat_check_location): Remove cast.
2502 (breakpoint_hit_catch_fork): Make aspce const.
2503 (breakpoint_hit_catch_solib): Likewise.
2504 (breakpoint_hit_catch_exec): Likewise.
2505 (breakpoint_hit_ranged_breakpoint): Likewise.
2506 (breakpoint_hit_watchpoint): Likewise.
2507 (base_breakpoint_breakpoint_hit): Likewise.
2508 (bkpt_breakpoint_hit): Likewise.
2509 (dprintf_breakpoint_hit): Likewise.
2510 (tracepoint_breakpoint_hit): Likewise.
2511 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2512
accd0bcd
YQ
25132017-10-26 Yao Qi <yao.qi@linaro.org>
2514
2515 * breakpoint.c (breakpoint_location_address_match): Change
2516 "struct address_space *" to "const address_space".
2517 (breakpoint_location_address_range_overlap): Likewise.
2518 (breakpoint_here_p): Likewise.
2519 (breakpoint_in_range_p): Likewise.
2520 (moribund_breakpoint_here_p): Likewise.
2521 (bp_location_inserted_here_p): Likewise.
2522 (software_breakpoint_inserted_here_p): Likewise.
2523 (hardware_breakpoint_inserted_here_p): Likewise.
2524 (hardware_watchpoint_inserted_in_range): Likewise.
2525 (bpstat_check_location): Likewise.
2526 (bpstat_stop_status): Likewise.
2527 (breakpoint_address_match): Likewise.
2528 (breakpoint_address_match_range): Likewise.
2529 (breakpoint_location_address_match): Likewise.
2530 (breakpoint_location_address_range_overlap): Likewise.
2531 (insert_single_step_breakpoint): Likewise.
2532 (breakpoint_has_location_inserted_here): Likewise.
2533 (single_step_breakpoint_inserted_here_p): Likewise.
2534 (pc_at_non_inline_function): Likewise.
2535 * breakpoint.h (bpstat_stop_status): Update declaration.
2536 (breakpoint_here_p): Likewise.
2537 (breakpoint_in_range_p): Likewise.
2538 (moribund_breakpoint_here_p): Likewise.
2539 (breakpoint_inserted_here_p): Likewise.
2540 (software_breakpoint_inserted_here_p): Likewise.
2541 (hardware_breakpoint_inserted_here_p): Likewise.
2542 (breakpoint_has_location_inserted_here): Likewise.
2543 (single_step_breakpoint_inserted_here_p): Likewise.
2544 (hardware_watchpoint_inserted_in_range): Likewise.
2545 (breakpoint_address_match): Likewise.
2546 (insert_single_step_breakpoint): Likewise.
2547 (pc_at_non_inline_function): Likewise.
2548 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2549 * record.c (record_check_stopped_by_breakpoint): Likewise.
2550 * record.h (record_check_stopped_by_breakpoint): Likewise.
2551 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2552
ac7936df
YQ
25532017-10-25 Yao Qi <yao.qi@linaro.org>
2554
2555 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2556 regcache->arch () instead get_regcache_arch.
2557 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2558 Likewise.
2559 (aarch64_fbsd_store_inferior_registers): Likewise.
2560 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2561 (store_gregs_to_thread): Likewise.
2562 (fetch_fpregs_from_thread): Likewise.
2563 (store_fpregs_to_thread): Likewise.
2564 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2565 (aarch64_store_return_value): Likewise.
2566 (aarch64_software_single_step): Likewise.
2567 * aix-thread.c (aix_thread_wait): Likewise.
2568 (supply_reg32): Likewise.
2569 (supply_sprs64): Likewise.
2570 (supply_sprs32): Likewise.
2571 (fill_gprs64): Likewise.
2572 (fill_gprs32): Likewise.
2573 (fill_sprs64): Likewise.
2574 (fill_sprs32): Likewise.
2575 (store_regs_user_thread): Likewise.
2576 (store_regs_kernel_thread): Likewise.
2577 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2578 (alphabsd_store_inferior_registers): Likewise.
2579 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2580 (alpha_store_return_value): Likewise.
2581 (alpha_deal_with_atomic_sequence): Likewise.
2582 (alpha_next_pc): Likewise.
2583 (alpha_software_single_step): Likewise.
2584 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2585 (amd64bsd_store_inferior_registers): Likewise.
2586 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2587 Likewise.
2588 (amd64_linux_store_inferior_registers): Likewise.
2589 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2590 (amd64_collect_native_gregset): Likewise.
2591 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2592 (amd64obsd_collect_uthread): Likewise.
2593 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2594 (amd64_collect_fpregset): Likewise.
2595 (amd64_supply_fxsave): Likewise.
2596 (amd64_supply_xsave): Likewise.
2597 (amd64_collect_fxsave): Likewise.
2598 (amd64_collect_xsave): Likewise.
2599 * arc-tdep.c (arc_write_pc): Likewise.
2600 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2601 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2602 (arm_fbsd_store_inferior_registers): Likewise.
2603 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2604 (store_vfp_regs): Likewise.
2605 (arm_linux_fetch_inferior_registers): Likewise.
2606 (arm_linux_store_inferior_registers): Likewise.
2607 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2608 (arm_linux_sigreturn_next_pc): Likewise.
2609 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2610 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2611 (fetch_register): Likewise.
2612 (store_register): Likewise.
2613 * arm-tdep.c (arm_is_thumb): Likewise.
2614 (displaced_in_arm_mode): Likewise.
2615 (bx_write_pc): Likewise.
2616 (arm_get_next_pcs_addr_bits_remove): Likewise.
2617 (arm_software_single_step): Likewise.
2618 (arm_extract_return_value): Likewise.
2619 (arm_store_return_value): Likewise.
2620 (arm_write_pc): Likewise.
2621 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2622 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2623 (bsd_uthread_store_registers): Likewise.
2624 * core-regset.c (fetch_core_registers): Likewise.
2625 * corelow.c (get_core_registers): Likewise.
2626 * cris-tdep.c (cris_store_return_value): Likewise.
2627 (cris_extract_return_value): Likewise.
2628 (find_step_target): Likewise.
2629 (find_step_target): Likewise.
2630 (cris_software_single_step): Likewise.
2631 * ctf.c (ctf_fetch_registers): Likewise.
2632 * darwin-nat.c (cancel_breakpoint): Likewise.
2633 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2634 * frv-tdep.c (frv_extract_return_value): Likewise.
2635 * ft32-tdep.c (ft32_store_return_value): Likewise.
2636 (ft32_extract_return_value): Likewise.
2637 * go32-nat.c (fetch_register): Likewise.
2638 (go32_fetch_registers): Likewise.
2639 (go32_store_registers): Likewise.
2640 (store_register): Likewise.
2641 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2642 (h8300_store_return_value): Likewise.
2643 * hppa-linux-nat.c (fetch_register): Likewise.
2644 (store_register): Likewise.
2645 (hppa_linux_fetch_inferior_registers): Likewise.
2646 (hppa_linux_store_inferior_registers): Likewise.
2647 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2648 (i386_darwin_store_inferior_registers): Likewise.
2649 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2650 (gnu_store_registers): Likewise.
2651 * i386-linux-nat.c (fetch_register): Likewise.
2652 (store_register): Likewise.
2653 (supply_gregset): Likewise.
2654 (fill_gregset): Likewise.
2655 (i386_linux_fetch_inferior_registers): Likewise.
2656 (i386_linux_store_inferior_registers): Likewise.
2657 (i386_linux_resume): Likewise.
2658 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2659 Likewise.
2660 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2661 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2662 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2663 (i386obsd_collect_uthread): Likewise.
2664 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2665 (i386_supply_gregset): Likewise.
2666 (i386_collect_gregset): Likewise.
2667 (i386_supply_fpregset): Likewise.
2668 (i386_collect_fpregset): Likewise.
2669 (i386_mpx_bd_base): Likewise.
2670 * i386-v4-nat.c (supply_fpregset): Likewise.
2671 (fill_fpregset): Likewise.
2672 * i387-tdep.c (i387_supply_fsave): Likewise.
2673 (i387_collect_fsave): Likewise.
2674 (i387_supply_fxsave): Likewise.
2675 (i387_collect_fxsave): Likewise.
2676 (i387_supply_xsave): Likewise.
2677 (i387_collect_xsave): Likewise.
2678 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2679 (ia64_linux_store_registers): Likewise.
2680 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2681 (ia64_extract_return_value): Likewise.
2682 (ia64_store_return_value): Likewise.
2683 (find_func_descr): Likewise.
2684 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2685 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2686 (inf_ptrace_store_registers): Likewise.
2687 * infrun.c (use_displaced_stepping): Likewise.
2688 (displaced_step_prepare_throw): Likewise.
2689 (resume): Likewise.
2690 (proceed): Likewise.
2691 (do_target_wait): Likewise.
2692 (adjust_pc_after_break): Likewise.
2693 (handle_inferior_event_1): Likewise.
2694 (handle_signal_stop): Likewise.
2695 (save_infcall_suspend_state): Likewise.
2696 (restore_infcall_suspend_state): Likewise.
2697 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2698 * jit.c (jit_frame_prev_register): Likewise.
2699 * linux-nat.c (save_stop_reason): Likewise.
2700 (linux_nat_wait_1): Likewise.
2701 (resume_stopped_resumed_lwps): Likewise.
2702 * linux-record.c (record_linux_sockaddr): Likewise.
2703 (record_linux_msghdr): Likewise.
2704 (record_linux_system_call): Likewise.
2705 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2706 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2707 (lm32_store_return_value): Likewise.
2708 * m32c-tdep.c (m32c_read_flg): Likewise.
2709 (m32c_pseudo_register_read): Likewise.
2710 (m32c_pseudo_register_write): Likewise.
2711 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2712 (m32r_linux_collect_gregset): Likewise.
2713 * m32r-tdep.c (m32r_store_return_value): Likewise.
2714 (m32r_extract_return_value): Likewise.
2715 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2716 (m68kbsd_collect_fpregset): Likewise.
2717 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2718 * m68k-linux-nat.c (fetch_register): Likewise.
2719 (old_fetch_inferior_registers): Likewise.
2720 (old_store_inferior_registers): Likewise.
2721 (store_regs): Likewise.
2722 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2723 (m68k_svr4_store_return_value): Likewise.
2724 * m88k-tdep.c (m88k_store_arguments): Likewise.
2725 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2726 (mi_cmd_data_write_register_values): Likewise.
2727 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2728 (mips_fbsd_store_inferior_registers): Likewise.
2729 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2730 (mips_fbsd_supply_gregs): Likewise.
2731 (mips_fbsd_collect_fpregs): Likewise.
2732 (mips_fbsd_collect_gregs): Likewise.
2733 (mips_fbsd_supply_fpregset): Likewise.
2734 (mips_fbsd_collect_fpregset): Likewise.
2735 (mips_fbsd_supply_gregset): Likewise.
2736 (mips_fbsd_collect_gregset): Likewise.
2737 * mips-linux-nat.c (supply_gregset): Likewise.
2738 (fill_gregset): Likewise.
2739 (supply_fpregset): Likewise.
2740 (fill_fpregset): Likewise.
2741 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2742 (mips_fill_gregset): Likewise.
2743 (mips_supply_fpregset): Likewise.
2744 (mips_fill_fpregset): Likewise.
2745 (mips64_supply_gregset): Likewise.
2746 (micromips_linux_sigframe_validate): Likewise.
2747 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2748 (mipsnbsd_fetch_inferior_registers): Likewise.
2749 (mipsnbsd_store_inferior_registers): Likewise.
2750 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2751 (mipsnbsd_supply_gregset): Likewise.
2752 (mipsnbsd_iterate_over_regset_sections): Likewise.
2753 (mipsnbsd_supply_reg): Likewise.
2754 (mipsnbsd_supply_fpreg): Likewise.
2755 * mips-tdep.c (mips_in_frame_stub): Likewise.
2756 (mips_dummy_id): Likewise.
2757 (is_octeon_bbit_op): Likewise.
2758 (micromips_bc1_pc): Likewise.
2759 (extended_mips16_next_pc): Likewise.
2760 (mips16_next_pc): Likewise.
2761 (deal_with_atomic_sequence): Likewise.
2762 * moxie-tdep.c (moxie_process_readu): Likewise.
2763 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2764 * nto-procfs.c (procfs_store_registers): Likewise.
2765 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2766 (ppcfbsd_store_inferior_registers): Likewise.
2767 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2768 (fetch_altivec_register): Likewise.
2769 (get_spe_registers): Likewise.
2770 (fetch_spe_register): Likewise.
2771 (fetch_altivec_registers): Likewise.
2772 (fetch_all_gp_regs): Likewise.
2773 (fetch_all_fp_regs): Likewise.
2774 (store_vsx_register): Likewise.
2775 (store_altivec_register): Likewise.
2776 (set_spe_registers): Likewise.
2777 (store_spe_register): Likewise.
2778 (store_altivec_registers): Likewise.
2779 (store_all_gp_regs): Likewise.
2780 (store_all_fp_regs): Likewise.
2781 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2782 (ppc_linux_collect_gregset): Likewise.
2783 (ppc_canonicalize_syscall): Likewise.
2784 (ppc_linux_record_signal): Likewise.
2785 (ppu2spu_prev_register): Likewise.
2786 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2787 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2788 (ppcobsd_store_registers): Likewise.
2789 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2790 Likewise.
2791 (ppc_ravenscar_generic_store_registers): Likewise.
2792 * procfs.c (procfs_fetch_registers): Likewise.
2793 (procfs_store_registers): Likewise.
2794 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2795 (ravenscar_store_registers): Likewise.
2796 (ravenscar_prepare_to_store): Likewise.
2797 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2798 * record-full.c (record_full_wait_1): Likewise.
2799 (record_full_registers_change): Likewise.
2800 (record_full_store_registers): Likewise.
2801 (record_full_core_fetch_registers): Likewise.
2802 (record_full_save): Likewise.
2803 (record_full_goto_insn): Likewise.
2804 * regcache.c (regcache_register_size): Likewise.
2805 (get_regcache_arch): Remove.
2806 (regcache_read_pc): Likewise.
2807 * regcache.h (get_regcache_arch): Remove.
2808 * remote-sim.c (gdbsim_fetch_register): Likewise.
2809 (gdbsim_store_register): Likewise.
2810 * remote.c (fetch_register_using_p): Likewise.
2811 (send_g_packet): Likewise.
2812 (remote_prepare_to_store): Likewise.
2813 (store_registers_using_G): Likewise.
2814 * reverse.c (save_bookmark_command): Likewise.
2815 (goto_bookmark_command): Likewise.
2816 * rs6000-aix-tdep.c (branch_dest): Likewise.
2817 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2818 (fetch_register): Likewise.
2819 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2820 (ppc_collect_reg): Likewise.
2821 (ppc_collect_gregset): Likewise.
2822 (ppc_collect_fpregset): Likewise.
2823 (ppc_collect_vsxregset): Likewise.
2824 (ppc_collect_vrregset): Likewise.
2825 (ppc_displaced_step_hw_singlestep): Likewise.
2826 (rs6000_pseudo_register_read): Likewise.
2827 (rs6000_pseudo_register_write): Likewise.
2828 * s390-linux-nat.c (supply_gregset): Likewise.
2829 (fill_gregset): Likewise.
2830 (s390_linux_fetch_inferior_registers): Likewise.
2831 * s390-linux-tdep.c (s390_write_pc): Likewise.
2832 (s390_software_single_step): Likewise.
2833 (s390_all_but_pc_registers_record): Likewise.
2834 (s390_linux_syscall_record): Likewise.
2835 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2836 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2837 (shnbsd_store_inferior_registers): Likewise.
2838 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2839 (sh_extract_return_value_fpu): Likewise.
2840 (sh_store_return_value_nofpu): Likewise.
2841 (sh_corefile_supply_regset): Likewise.
2842 (sh_corefile_collect_regset): Likewise.
2843 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2844 (sh64_store_return_value): Likewise.
2845 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2846 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2847 (sparc_store_inferior_registers): Likewise.
2848 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2849 (sparc_ravenscar_prepare_to_store): Likewise.
2850 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2851 (sparc_analyze_control_transfer): Likewise.
2852 (sparc_step_trap): Likewise.
2853 (sparc_software_single_step): Likewise.
2854 (sparc32_gdbarch_init): Likewise.
2855 (sparc_supply_rwindow): Likewise.
2856 (sparc_collect_rwindow): Likewise.
2857 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2858 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2859 (sparc64nbsd_collect_gregset): Likewise.
2860 (sparc64nbsd_supply_fpregset): Likewise.
2861 (sparc64nbsd_collect_fpregset): Likewise.
2862 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2863 (sparc64_supply_gregset): Likewise.
2864 (sparc64_collect_gregset): Likewise.
2865 (sparc64_supply_fpregset): Likewise.
2866 (sparc64_collect_fpregset): Likewise.
2867 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2868 * spu-tdep.c (spu_unwind_sp): Likewise.
2869 (spu2ppu_prev_register): Likewise.
2870 (spu_memory_remove_breakpoint): Likewise.
2871 * stack.c (return_command): Likewise.
2872 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2873 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2874 * tracefile.c (trace_save_ctf): Likewise.
2875 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2876 (do_windows_store_inferior_registers): Likewise.
2877 (windows_resume): Likewise.
2878 * xtensa-linux-nat.c (fill_gregset): Likewise.
2879 (supply_gregset_reg): Likewise.
2880 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2881 (xtensa_register_read_masked): Likewise.
2882 (xtensa_supply_gregset): Likewise.
2883 (xtensa_extract_return_value): Likewise.
2884 (xtensa_store_return_value): Likewise.
2885
edd079d9
UW
28862017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2887
2888 * doublest.c (floatformat_from_string): New function.
2889 * doublest.h (floatformat_from_string): Add prototype.
2890
2891 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2892 (OP_FLOAT): ... this.
2893 * expression.h: Do not include "doublest.h".
2894 (union exp_element): Replace doubleconst and decfloatconst by
2895 new element floatconst.
2896 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2897 (ada_evaluate_subexp): Likewise.
2898 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2899 OP_DOUBLE and OP_DECFLOAT.
2900 * expprint.c (print_subexp_standard): Likewise.
2901 (dump_subexp_body_standard): Likewise.
2902 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2903
2904 * parse.c: Include "dfp.h".
2905 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2906 (write_exp_elt_floatcst): New function.
2907 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2908 and OP_DECFLOAT.
2909 (operator_check_standard): Likewise.
2910 (parse_float): Do not accept suffix. Take type as input. Return bool.
2911 Return target format buffer instead of host DOUBLEST.
2912 Use floatformat_from_string and decimal_from_string to parse
2913 either binary or decimal floating-point types.
2914 (parse_c_float): Remove.
2915 * parser-defs.h: Do not include "doublest.h".
2916 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2917 (write_exp_elt_floatcst): Add prototype.
2918 (parse_float): Update prototype.
2919 (parse_c_float): Remove.
2920
2921 * c-exp.y: Do not include "dfp.h".
2922 (typed_val_float): Use byte buffer instead of DOUBLEST.
2923 (typed_val_decfloat): Remove.
2924 (DECFLOAT): Remove.
2925 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2926 (parse_number): Update to new parse_float interface.
2927 Parse suffixes and determine type before calling parse_float.
2928 Handle decimal and binary FP types the same way.
2929
2930 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2931 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2932 (parse_number): Update to new parse_float interface.
2933 Parse suffixes and determine type before calling parse_float.
2934
2935 * f-exp.y: Replace dval by typed_val_float.
2936 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2937 (parse_number): Use parse_float instead of atof.
2938
2939 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2940 (parse_go_float): Remove.
2941 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2942 (parse_number): Call parse_float instead of parse_go_float.
2943 Parse suffixes and determine type before calling parse_float.
2944
2945 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2946 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2947 (parse_number): Update to new parse_float interface.
2948 Parse suffixes and determine type before calling parse_float.
2949
2950 * m2-exp.y: Replace dval by byte buffer val.
2951 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2952 (parse_number): Call parse_float instead of atof.
2953
2954 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2955 (lex_number): Call parse_float instead of strtod.
2956 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2957 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2958 Use write_exp_elt_floatcst.
2959 (unit_testing): Remove static variable.
2960 (rust_type): Do not check unit_testing.
2961 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2962
2963 * ada-exp.y (type_float, type_double): Remove.
2964 (typed_val_float): Use byte buffer instead of DOUBLEST.
2965 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2966 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2967
cc628f3d
AH
29682017-10-25 Alan Hayward <alan.hayward@arm.com>
2969
2970 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2971 * arch/aarch64.h: New file.
2972
09a7c6aa
UW
29732017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2974
2975 * dfp.h (decimal_from_string): Use const reference for argument.
2976 * dfp.c (decimal_from_string): Likewise.
2977
8ba0dd51
UW
29782017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2979
2980 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2981 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2982 * mips-tdep.c (mips_print_fp_register): Likewise.
2983
16e812b2
UW
29842017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2985
2986 * common/format.h (enum argclass): Replace decfloat_arg by
2987 dec32float_arg, dec64float_arg, and dec128float_arg.
2988 * common/format.c (parse_format_string): Update to return
2989 new decimal float argument classes.
2990
2991 * printcmd.c (printf_decfloat): Rename to ...
2992 (printf_floating): ... this. Add argclass argument, and use it
2993 instead of parsing the format string again. Add support for
2994 binary floating-point values, using floatformat_to_string.
2995 Convert value to the target format if it doesn't already match.
2996 (ui_printf): Call printf_floating instead of printf_decfloat,
2997 also for double_arg / long_double_arg. Pass argclass.
2998
2999 * dfp.c (decimal_to_string): Add format string argument.
3000 * dfp.h (decimal_to_string): Likewise.
3001
3002 * doublest.c (floatformat_to_string): Add format string argument.
3003 * doublest.h (floatformat_to_string): Likewise.
3004
fdf0cbc2
UW
30052017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3006
3007 * doublest.c (floatformat_precision): New routine.
3008 (floatformat_to_string): Likewise.
3009 * doublest.c (floatformat_to_string): Add prototype.
3010
3011 * printcmd.c (print_scalar_formatted): Only call print_floating
3012 on floating-point types.
3013 * valprint.c: Do not include "floatformat.h".
3014 (generic_val_print_decfloat): Remove.
3015 (generic_val_print): Call generic_val_print_float for both
3016 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3017 (print_floating): Use floatformat_to_string. Handle decimal float.
3018 (print_decimal_floating): Remove, merge into floatformat_to_string.
3019 * value.h (print_decimal_floating): Remove.
3020
3021 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3022
5033013f
UW
30232017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3024
3025 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3026
a664f67e
SM
30272017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3028
3029 * memattr.h: Don't include vec.h.
3030 (struct mem_attrib): Initialize fields.
3031 <unknown>: New static method.
3032 (struct mem_region): Add constructors, operator<, initialize
3033 fields.
3034 * memattr.c: Include algorithm.
3035 (default_mem_attrib, unknown_mem_attrib): Remove.
3036 (user_mem_region_list): New global.
3037 (target_mem_region_list, mem_region_list): Change type to
3038 std::vector<mem_region>.
3039 (mem_use_target): Now a function.
3040 (target_mem_regions_valid): Change type to bool.
3041 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3042 (require_user_regions): Adjust.
3043 (require_target_regions): Adjust.
3044 (create_mem_region): Adjust.
3045 (lookup_mem_region): Adjust.
3046 (invalidate_target_mem_regions): Adjust.
3047 (mem_clear): Rename to...
3048 (user_mem_clear): ... this, and adjust.
3049 (mem_command): Adjust.
3050 (info_mem_command): Adjust.
3051 (mem_enable, enable_mem_command, mem_disable,
3052 disable_mem_command): Adjust.
3053 (mem_delete): Adjust.
3054 (delete_mem_command): Adjust.
3055 * memory-map.h (parse_memory_map): Return an std::vector.
3056 * memory-map.c (parse_memory_map): Likewise.
3057 (struct memory_map_parsing_data): Add constructor.
3058 <memory_map>: Point to std::vector.
3059 (memory_map_start_memory): Adjust.
3060 (memory_map_end_memory): Adjust.
3061 (memory_map_end_property): Adjust.
3062 (clear_result): Remove.
3063 * remote.c (remote_memory_map): Return an std::vector.
3064 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3065 Remove.
3066 (target_debug_print_mem_region_vector): New.
3067 * target-delegates.c: Regenerate.
3068 * target.h (mem_region_vector): New typedef.
3069 (to_memory_map): Return mem_region_vector.
3070 (target_memory_map): Return an std::vector.
3071 * target.c (target_memory_map): Return an std::vector.
3072 (flash_erase_command): Adjust.
3073
6e17c565
SM
30742017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3075
3076 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3077 Change type to std::string.
3078 (memory_map_start_property): Adjust.
3079 (memory_map_end_property): Adjust.
3080
cfba9872
SM
30812017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3082
3083 * infrun.h: Include common/byte-vector.h.
3084 (struct displaced_step_closure): New struct.
3085 (struct buf_displaced_step_closure): New struct.
3086 * infrun.c (displaced_step_closure::~displaced_step_closure):
3087 Provide default implementation.
3088 (displaced_step_clear): Deallocate step closure with delete.
3089 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3090 (aarch64_displaced_step_closure): ... this, extend
3091 displaced_step_closure.
3092 (aarch64_displaced_step_data) <dsc>: Change type to
3093 aarch64_displaced_step_closure.
3094 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3095 unique_ptr.
3096 (aarch64_displaced_step_fixup): Add cast for displaced step
3097 closure.
3098 * amd64-tdep.c (displaced_step_closure): Rename to ...
3099 (amd64_displaced_step_closure): ... this, extend
3100 displaced_step_closure.
3101 <insn_buf>: Change type to std::vector<gdb_byte>.
3102 <max_len>: Remove.
3103 (fixup_riprel): Change type of DSC parameter, adjust to type
3104 change of insn_buf.
3105 (fixup_displaced_copy): Change type of DSC parameter.
3106 (amd64_displaced_step_copy_insn): Instantiate
3107 amd64_displaced_step_closure.
3108 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3109 to type change of insn_buf.
3110 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3111 parameter DSC.
3112 (arm_linux_copy_svc): Likewise.
3113 (cleanup_kernel_helper_return): Likewise.
3114 (arm_catch_kernel_helper_return): Likewise.
3115 (arm_linux_displaced_step_copy_insn): Instantiate
3116 arm_displaced_step_closure.
3117 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3118 (displaced_read_reg): Change type of parameter DSC.
3119 (branch_write_pc): Likewise.
3120 (load_write_pc): Likewise.
3121 (alu_write_pc): Likewise.
3122 (displaced_write_reg): Likewise.
3123 (arm_copy_unmodified): Likewise.
3124 (thumb_copy_unmodified_32bit): Likewise.
3125 (thumb_copy_unmodified_16bit): Likewise.
3126 (cleanup_preload): Likewise.
3127 (install_preload): Likewise.
3128 (arm_copy_preload): Likewise.
3129 (thumb2_copy_preload): Likewise.
3130 (install_preload_reg): Likewise.
3131 (arm_copy_preload_reg): Likewise.
3132 (cleanup_copro_load_store): Likewise.
3133 (install_copro_load_store): Likewise.
3134 (arm_copy_copro_load_store) Likewise.
3135 (thumb2_copy_copro_load_store): Likewise.
3136 (cleanup_branch): Likewise.
3137 (install_b_bl_blx): Likewise.
3138 (arm_copy_b_bl_blx): Likewise.
3139 (thumb2_copy_b_bl_blx): Likewise.
3140 (thumb_copy_b): Likewise.
3141 (install_bx_blx_reg): Likewise.
3142 (arm_copy_bx_blx_reg): Likewise.
3143 (thumb_copy_bx_blx_reg): Likewise.
3144 (cleanup_alu_imm): Likewise.
3145 (arm_copy_alu_imm): Likewise.
3146 (thumb2_copy_alu_imm): Likewise.
3147 (cleanup_alu_reg): Likewise.
3148 (install_alu_reg): Likewise.
3149 (arm_copy_alu_reg): Likewise.
3150 (thumb_copy_alu_reg): Likewise.
3151 (cleanup_alu_shifted_reg): Likewise.
3152 (install_alu_shifted_reg): Likewise.
3153 (arm_copy_alu_shifted_reg): Likewise.
3154 (cleanup_load): Likewise.
3155 (cleanup_store): Likewise.
3156 (arm_copy_extra_ld_st): Likewise.
3157 (install_load_store): Likewise.
3158 (thumb2_copy_load_literal): Likewise.
3159 (thumb2_copy_load_reg_imm): Likewise.
3160 (arm_copy_ldr_str_ldrb_strb): Likewise.
3161 (cleanup_block_load_all): Likewise.
3162 (cleanup_block_store_pc): Likewise.
3163 (cleanup_block_load_pc): Likewise.
3164 (arm_copy_block_xfer): Likewise.
3165 (thumb2_copy_block_xfer): Likewise.
3166 (cleanup_svc): Likewise.
3167 (install_svc): Likewise.
3168 (arm_copy_svc): Likewise.
3169 (thumb_copy_svc): Likewise.
3170 (arm_copy_undef): Likewise.
3171 (thumb_32bit_copy_undef): Likewise.
3172 (arm_copy_unpred): Likewise.
3173 (arm_decode_misc_memhint_neon): Likewise.
3174 (arm_decode_unconditional): Likewise.
3175 (arm_decode_miscellaneous): Likewise.
3176 (arm_decode_dp_misc): Likewise.
3177 (arm_decode_ld_st_word_ubyte): Likewise.
3178 (arm_decode_media): Likewise.
3179 (arm_decode_b_bl_ldmstm): Likewise.
3180 (arm_decode_ext_reg_ld_st): Likewise.
3181 (thumb2_decode_dp_shift_reg): Likewise.
3182 (thumb2_decode_ext_reg_ld_st): Likewise.
3183 (arm_decode_svc_copro): Likewise.
3184 (thumb2_decode_svc_copro): Likewise.
3185 (install_pc_relative): Likewise.
3186 (thumb_copy_pc_relative_16bit): Likewise.
3187 (thumb_decode_pc_relative_16bit): Likewise.
3188 (thumb_copy_pc_relative_32bit): Likewise.
3189 (thumb_copy_16bit_ldr_literal): Likewise.
3190 (thumb_copy_cbnz_cbz): Likewise.
3191 (thumb2_copy_table_branch): Likewise.
3192 (cleanup_pop_pc_16bit_all): Likewise.
3193 (thumb_copy_pop_pc_16bit): Likewise.
3194 (thumb_process_displaced_16bit_insn): Likewise.
3195 (decode_thumb_32bit_ld_mem_hints): Likewise.
3196 (thumb_process_displaced_32bit_insn): Likewise.
3197 (thumb_process_displaced_insn): Likewise.
3198 (arm_process_displaced_insn): Likewise.
3199 (arm_displaced_init_closure): Likewise.
3200 (arm_displaced_step_fixup): Add cast for closure.
3201 * arm-tdep.h: Include infrun.h.
3202 (displaced_step_closure): Rename to ...
3203 (arm_displaced_step_closure): ... this, extend
3204 displaced_step_closure.
3205 <u::svc::copy_svc_os>: Change type of parameter DSC.
3206 <cleanup>: Likewise.
3207 (arm_process_displaced_insn): Likewise.
3208 (arm_displaced_init_closure): Likewise.
3209 (displaced_read_reg): Likewise.
3210 (displaced_write_reg): Likewise.
3211 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3212 Adjust.
3213 * i386-tdep.h: Include infrun.h.
3214 (i386_displaced_step_closure): New typedef.
3215 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3216 i386_displaced_step_closure.
3217 (i386_displaced_step_fixup): Adjust.
3218 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3219 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3220 and unique_ptr.
3221 (ppc_displaced_step_fixup): Adjust.
3222 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3223 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3224 and unique_ptr.
3225 (s390_displaced_step_fixup): Adjust.
3226
b392b304
SM
32272017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3228
3229 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3230 Remove declarations.
3231
d5833c62
TT
32322017-10-20 Tom Tromey <tom@tromey.com>
3233
3234 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3235 std::vector.
3236 (gdb_bfd_record_inclusion): Update.
3237 (bfdp): Remove typedef.
3238
06d5bbc8
TT
32392017-10-20 Tom Tromey <tom@tromey.com>
3240
3241 * gdb_bfd.c (gdb_bfd_ref): Use new.
3242 (struct gdb_bfd_data): Add constructor, destructor, and member
3243 initializers.
3244 (gdb_bfd_unref): Use delete.
3245
2712ce2e
TT
32462017-10-20 Tom Tromey <tom@tromey.com>
3247
3248 * exec.c (exec_file_attach): Use new_bfd_ref.
3249 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3250 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3251 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3252 new_bfd_ref.
3253 * gdb_bfd.h (new_bfd_ref): New function.
3254
fcc8fb2f
PA
32552017-10-20 Pedro Alves <palves@redhat.com>
3256
3257 * main.c (captured_command_loop): Add attribute noinline.
3258
4c2287b0
SM
32592017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3260
3261 * interps.c (struct interp_factory): Add constructor.
3262 (interp_factory_p): Remove typedef.
3263 (DEF_VEC_P(interp_factory_p)): Remove.
3264 (interpreter_factories): Change type to std::vector.
3265 (interp_factory_register): Adjust.
3266 (interp_lookup): Adjust.
3267 (interpreter_completer): Adjust.
3268
3d415c26
TT
32692017-10-19 Tom Tromey <tom@tromey.com>
3270
3271 * break-catch-syscall.c (catch_syscall_completer): Use
3272 std::string, gdb::unique_xmalloc_ptr.
3273
395423c4
TT
32742017-10-19 Tom Tromey <tom@tromey.com>
3275
3276 * infcall.c (call_function_by_hand_dummy): Use std::string.
3277
54f70bc1
TT
32782017-10-19 Tom Tromey <tom@tromey.com>
3279
3280 * mi/mi-main.c (mi_cmd_execute): Update.
3281 * top.h (prepare_execute_command): Return scoped_value_mark.
3282 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3283 Add move constructor.
3284 * top.c (prepare_execute_command): Return scoped_value_mark.
3285 (execute_command): Update.
3286
63929e84
PA
32872017-10-19 Pedro Alves <palves@redhat.com>
3288
3289 * xml-support.c (xml_fetch_content_from_file): Check fread's
3290 return.
3291
a75868f5
PA
32922017-10-19 Pedro Alves <palves@redhat.com>
3293
3294 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3295 async.
3296 (handle_error_fd): New function.
3297 (ser_base_async): Add/delete an event loop file handler for
3298 error_fd.
3299
2edf834e
PA
33002017-10-19 Pedro Alves <palves@redhat.com>
3301
3302 * xml-support.c (xml_fetch_content_from_file): Don't read in
3303 chunks. Instead use fseek to determine the file's size, and read
3304 it in one go.
3305
c8ba13ad
KS
33062017-11-18 Keith Seitz <keiths@redhat.com>
3307
3308 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3309 types.
3310 Add whitespace to front of type name.
3311
37534686
KS
33122017-10-18 Keith Seitz <keiths@redhat.com>
3313
3314 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3315 DW_AT_accessibility.
3316
28c7c158
YQ
33172017-10-18 Yao Qi <yao.qi@linaro.org>
3318
3319 * features/tic6x-c62x-linux.c: Remove.
3320
30f0b101
TT
33212017-10-17 Tom Tromey <tom@tromey.com>
3322
3323 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3324 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3325 (do_mixed_source_and_assembly): Likewise.
3326
57e12da9
TT
33272017-10-17 Tom Tromey <tom@tromey.com>
3328
3329 * regcache.c (regcache::xfer_part): Remove assertion.
3330
7b700999
PA
33312017-10-17 Pedro Alves <palves@redhat.com>
3332
3333 * xml-support.c (xml_fetch_content_from_file): Call
3334 unique_ptr::release() instead unique_ptr::get() when passing
3335 through xrealloc.
3336
d3037ba6
YQ
33372017-10-17 Yao Qi <yao.qi@linaro.org>
3338
3339 * regcache.c (regcache::xfer_part): Remove parameters read and
3340 write, add parameter is_raw. All callers are updated.
3341
83d5a34d
KS
33422017-10-16 Keith Seitz <keiths@redhat.com>
3343
3344 * c-typeprint.c (enum access_specifier): Moved here from
3345 c_type_print_base.
3346 (output_access_specifier): New function.
3347 (c_type_print_base): Consider typedefs when assessing
3348 whether access labels are needed.
3349 Use output_access_specifier as needed.
3350 Output access specifier for typedefs, if needed.
3351 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3352 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3353 fields.
3354 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3355 accessor macros.
3356
87028b87
TT
33572017-10-16 Tom Tromey <tom@tromey.com>
3358
3359 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3360 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3361 * target.c (target_fileio_read_stralloc): Update.
3362 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3363 * target.h (target_fileio_read_stralloc): Return
3364 unique_xmalloc_ptr.
3365
b7b030ad
TT
33662017-10-16 Tom Tromey <tom@tromey.com>
3367
3368 * xml-syscall.c (xml_init_syscalls_info): Update.
3369 * xml-support.c (xinclude_start_include): Update.
3370 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3371 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3372 (xml_fetch_content_from_file): Likewise.
3373 * osdata.c (get_osdata): Update.
3374 * target.h (target_read_stralloc, target_get_osdata): Return
3375 unique_xmalloc_ptr.
3376 * solib-aix.c (solib_aix_get_library_list): Update.
3377 * solib-target.c (solib_target_current_sos): Update.
3378 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3379 * xml-tdesc.c (fetch_available_features_from_target): Update.
3380 (target_fetch_description_xml): Update.
3381 (file_read_description_xml): Update.
3382 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3383 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3384 (remote_pid_to_exec_file): Update.
3385 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3386 (target_get_osdata): Likewise.
3387
b80406ac
TT
33882017-10-16 Tom Tromey <tom@tromey.com>
3389
3390 * remote.c (remote_register_number_and_offset): Use std::vector.
3391 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3392 (putpkt_binary): Use gdb::def_vector.
3393 (compare_sections_command): Use gdb::byte_vector.
3394
a90ecff8
TT
33952017-10-16 Tom Tromey <tom@tromey.com>
3396
3397 * ppc-linux-nat.c (hwdebug_insert_point): Use
3398 gdb::unique_xmalloc_ptr, XDUP.
3399
2dc0e219
TT
34002017-10-16 Tom Tromey <tom@tromey.com>
3401
3402 * probe.c (parse_probes): Use std::string.
3403 (info_probes_for_ops, enable_probes_command)
3404 (disable_probes_command): Remove cleanups.
3405
b05628f0
TT
34062017-10-16 Tom Tromey <tom@tromey.com>
3407
3408 * buildsym.c (block_compar): Remove.
3409 (end_symtab_get_static_block): Use std::vector.
3410
a79b1bc6
SM
34112017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3412
3413 * memrange.h (struct mem_range): Define operator< and operator==.
3414 (mem_range_s): Remove.
3415 (DEF_VEC_O (mem_range_s)): Remove.
3416 (normalize_mem_ranges): Change parameter type to std::vector.
3417 * memrange.c (compare_mem_ranges): Remove.
3418 (normalize_mem_ranges): Change parameter type to std::vector,
3419 adjust to vector change.
3420 * exec.c (section_table_available_memory): Return vector, remove
3421 parameter.
3422 (section_table_read_available_memory): Adjust to std::vector
3423 change.
3424 * remote.c (remote_read_bytes): Adjust to std::vector
3425 change.
3426 * tracepoint.h (traceframe_available_memory): Change parameter
3427 type to std::vector.
3428 * tracepoint.c (traceframe_available_memory): Change parameter
3429 type to std::vector, adjust.
3430 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3431 std::vector change.
3432 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3433 unittests/memrange-selftests.c.
3434 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3435 * gdb/unittests/memrange-selftests.c: New file.
3436
63f0e930
PA
34372017-10-16 Pedro Alves <palves@redhat.com>
3438
3439 * elfread.c (probe_key_free): Rename range-for variable.
3440 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3441 (find_probe_by_pc, collect_probes): Rename range-for variable.
3442
c40c7bfc
YQ
34432017-10-16 Yao Qi <yao.qi@linaro.org>
3444
3445 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3446 * features/tic6x-c62x.c: Remove.
3447 * features/tic6x-c64x-linux.c: Remove.
3448 * features/tic6x-c64x.c: Remove.
3449 * features/tic6x-c64xp-linux.c: Remove.
3450 * features/tic6x-c64xp.c: Remove.
3451 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3452 initialize_tdesc_tic6x_*_linux functions.
3453 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3454 initialize_tdesc_tic6x_* functions.
3455
df27ae6a
YQ
34562017-10-16 Yao Qi <yao.qi@linaro.org>
3457
3458 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3459 tic6x-c62x.
3460 * regformats/tic6x-c62x.dat: Remove.
3461 * regformats/tic6x-c64x.dat: Remove.
3462 * regformats/tic6x-c64xp.dat: Remove.
3463
86766165
SM
34642017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3465
3466 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3467 (the !HAVE_LIBEXPAT version).
3468
824dfcc3
SM
34692017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3470
3471 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3472 const.
3473
2098b393
SM
34742017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3475
3476 * target.h: Include tracepoint.h.
3477 (enum trace_find_type): Move to tracepoint.h.
3478 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3479 * tracepoint.h: Don't include target.h
3480 (enum trace_find_type): Move from target.h.
3481 (parse_traceframe_info): Return a unique ptr.
3482 * tracepoint.c (current_traceframe_info): Change type to unique
3483 ptr.
3484 (free_traceframe_info): Remove.
3485 (clear_traceframe_info): Don't manually free
3486 current_traceframe_info.
3487 (free_result): Remove.
3488 (parse_traceframe_info): Return a unique ptr.
3489 (get_traceframe_info): Adjust to unique ptr.
3490 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3491 * remote.c (remote_traceframe_info): Return a unique ptr.
3492 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3493 ptr.
3494 * target-debug.h (target_debug_print_traceframe_info_up): New
3495 macro.
3496 * target-delegates.c: Regenerate.
3497
4cdd21a8
SM
34982017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3499
3500 * memrange.h (struct mem_range): Add constructors.
3501 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3502 std::vector<mem_range>.
3503 * tracepoint.c (free_traceframe_info): Don't manually free
3504 vector.
3505 (traceframe_info_start_memory): Adjust to vector change.
3506 (traceframe_available_memory): Likewise.
3507 * tracefile-tfile.c (build_traceframe_info): Likewise.
3508 * ctf.c (ctf_traceframe_info): Likewise.
3509
d0d292a2
SM
35102017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3511
3512 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3513 std::vector<int>.
3514 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3515 (traceframe_info_start_tvar): Adjust to vector change.
3516 (parse_traceframe_info): Allocate with new.
3517 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3518 vector change.
3519 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3520 change.
3521 tfile_traceframe_info): Allocate with new.
3522 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3523 change.
3524
8d3c73ef
SM
35252017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3526
3527 * tracepoint.c (traceframe_info): Rename to...
3528 (current_traceframe_info): ...this.
3529 (clear_traceframe_info): Adjust.
3530 (get_traceframe_info): Adjust.
3531
b129dcac
SM
35322017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3533
3534 * nat/linux-osdata.c: Include algorithm.
3535 (compare_processes): Remove.
3536 (struct pid_pgid_entry): New struct.
3537 (linux_xfer_osdata_processgroups): Use std::vector instead of
3538 XNEWVEC.
3539
af5bf4ad
SM
35402017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3541
3542 * objfiles.h: Don't include symfile.h.
3543 (struct partial_symbol): Remove forward-declaration.
3544 (struct objfile) <global_psymbols, static_psymbols>: Change type
3545 to std::vector<partial_symbol *>.
3546 * objfiles.c (objfile::objfile): Don't memset those fields.
3547 (objfile::~objfile): Don't free those fields.
3548 * psympriv.h (struct psymbol_allocation_list): Remove
3549 forward-declaration.
3550 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3551 to std::vector.
3552 (start_psymtab_common): Change parameters to std::vector.
3553 * psymtab.c: Include algorithm.
3554 (require_partial_symbols): Call shrink_to_fit.
3555 (find_pc_sect_psymbol): Adjust to vector change.
3556 (match_partial_symbol): Likewise.
3557 (lookup_partial_symbol): Likewise.
3558 (psym_relocate): Likewise.
3559 (dump_psymtab): Likewise.
3560 (recursively_search_psymtabs): Likewise.
3561 (compare_psymbols): Remove.
3562 (sort_pst_symbols): Adjust to vector change.
3563 (start_psymtab_common): Likewise.
3564 (end_psymtab_common): Likewise.
3565 (psymbol_bcache_full): De-constify return value.
3566 (add_psymbol_to_bcache): Likewise.
3567 (extend_psymbol_list): Remove.
3568 (append_psymbol_to_list): Adjust to vector change.
3569 (add_psymbol_to_list): Likewise.
3570 (init_psymbol_list): Likewise.
3571 (maintenance_info_psymtabs): Likewise.
3572 (maintenance_check_psymtabs): Likewise.
3573 * symfile.h (struct psymbol_allocation_list): Remove.
3574 * symfile.c (reread_symbols): Adjust to vector change.
3575 * dbxread.c (start_psymtab): Change type of parameters.
3576 (dbx_symfile_read): Adjust to vector change.
3577 (read_dbx_symtab): Likewise.
3578 (start_psymtab): Change type of parameters.
3579 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3580 (create_partial_symtab): Likewise.
3581 (add_partial_symbol): Likewise.
3582 (write_one_signatured_type): Likewise.
3583 (recursively_write_psymbols): Likewise.
3584 * mdebugread.c (parse_partial_symbols): Likewise.
3585 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3586 (scan_xcoff_symtab): Adjust to vector change.
3587 (xcoff_initial_scan): Likewise.
3588
3ec5942f
SM
35892017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3590
3591 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3592
2399fe6a
YQ
35932017-10-13 Yao Qi <yao.qi@linaro.org>
3594
3595 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3596 Remove s390x-*-expedite, add s390x-expedite.
3597
4bf3f4a8
YQ
35982017-10-13 Yao Qi <yao.qi@linaro.org>
3599
3600 * features/s390-gs-linux64.c: Regenerated.
3601 * features/s390x-gs-linux64.c: Regenerated.
3602
9e86da07
TT
36032017-10-13 Tom Tromey <tom@tromey.com>
3604
3605 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3606 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3607 delete.
3608 * symfile.c (symbol_file_add_with_addrs): Use new.
3609 (symbol_file_add_separate): Update comment.
3610 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3611 * jit.c (jit_object_close_impl): Use new.
3612 (jit_unregister_code): Use delete.
3613 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3614 (~objfile): Rename from free_objfile.
3615 (free_objfile_separate_debug, do_free_objfile_cleanup)
3616 (free_all_objfiles, objfile_purge_solibs): Use delete.
3617 * objfiles.h (struct objfile): Add constructor and destructor.
3618 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3619 (allocate_objfile, free_objfile): Don't declare.
3620 (struct objstats): Add initializers.
3621
c2508e90
SM
36222017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3623
3624 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3625 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3626 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3627 * gdbarch.h: Regenerate.
3628 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3629 Adjust comment.
3630 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3631 (i386_displaced_step_fixup): Adjust comment.
3632 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3633
a900ff72
TT
36342017-10-12 Tom Tromey <tom@tromey.com>
3635
3636 * prologue-value.h (pv_area::store_would_trash): Return bool.
3637 (pv_area::find_reg): Likewise.
3638 * prologue-value.c (pv_area::store_would_trash): Return bool.
3639 (pv_area::find_reg): Likewise.
3640
f7b7ed97
TT
36412017-10-12 Tom Tromey <tom@tromey.com>
3642
3643 * s390-linux-tdep.c (s390_store, s390_load)
3644 (s390_check_for_saved, s390_analyze_prologue): Update.
3645 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3646 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3647 * prologue-value.h (class pv_area): Move from prologue-value.c.
3648 Change names of members. Add constructor, destructor, member
3649 functions.
3650 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3651 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3652 (pv_area_fetch, pv_area_scan): Don't declare.
3653 * prologue-value.c (struct pv_area::area_entry): Now member of
3654 pv_area.
3655 (struct pv_area): Move to prologue-value.h.
3656 (pv_area::pv_area): Rename from make_pv_area.
3657 (pv_area::~pv_area): Rename from free_pv_area.
3658 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3659 (clear_entries, find_entry, overlaps, store_would_trash, store)
3660 (fetch, find_reg, scan): Now member of pv_area.
3661 Remove "area" argument. Update.
3662 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3663 Update.
3664 * mn10300-tdep.c (push_reg, check_for_saved)
3665 (mn10300_analyze_prologue): Update.
3666 * mep-tdep.c (is_arg_spill, check_for_saved)
3667 (mep_analyze_prologue): Update.
3668 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3669 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3670 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3671 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3672 Update.
3673 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3674 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3675
466eecee
SM
36762017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3677
3678 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3679 * linux-nat.c (linux_nat_delete_thread): New variable.
3680 (lwp_free): Invoke linux_nat_delete_thread if set.
3681 (linux_nat_set_delete_thread): New function.
3682 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3683 thread delete callback.
3684 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3685 (_initialize_arm_linux_nat): Assign thread delete callback.
3686 * s390-linux-nat.c (s390_delete_thread): New function.
3687 (_initialize_s390_nat): Assign thread delete callback.
3688 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3689 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3690 function.
3691 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3692 declaration.
3693 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3694 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3695
f71c8822
TT
36962017-10-09 Tom Tromey <tom@tromey.com>
3697
3698 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3699 std::string.
3700 * tui/tui-layout.c (enum tui_status): Use std::string.
3701
981a3fb3
TT
37022017-10-11 Tom Tromey <tom@tromey.com>
3703
3704 * gdbthread.h (thread_command): Constify.
3705 * inferior.h (detach_command): Constify.
3706 * top.h (set_history, show_history): Constify.
3707 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3708 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3709 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3710 * printcmd.c (set_command): Constify.
3711 (non_const_set_command): New function.
3712 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3713 * breakpoint.c (enable_command, disable_command, delete_command)
3714 (catch_command, tcatch_command, set_breakpoint_cmd)
3715 (show_breakpoint_cmd): Constify.
3716 * macrocmd.c (macro_command): Constify.
3717 * infcmd.c (unset_command, kill_command, detach_command)
3718 (info_proc_cmd): Constify.
3719 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3720 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3721 (info_auto_load_cmd): Constify.
3722 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3723 (unset_tdesc_cmd): Constify.
3724 * ada-lang.c (set_ada_command, show_ada_command)
3725 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3726 * guile/guile.c (set_guile_command, show_guile_command)
3727 (info_guile_command): Constify.
3728 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3729 Constify.
3730 * skip.c (skip_command): Constify.
3731 * compile/compile.c (_initialize_compile): Constify.
3732 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3733 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3734 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3735 (maint_btrace_pt_show_cmd): Constify.
3736 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3737 Constify.
3738 * python/python.c (user_show_python, user_set_python): Constify.
3739 * mips-tdep.c (set_mips_command, show_mips_command)
3740 (set_mipsfpu_command): Constify.
3741 * record-btrace.c (cmd_record_btrace_start)
3742 (cmd_set_record_btrace, cmd_show_record_btrace)
3743 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3744 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3745 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3746 Constify.
3747 * symfile.c (overlay_command): Constify.
3748 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3749 * cli/cli-logging.c (set_logging_command, show_logging_command):
3750 Constify.
3751 * cli/cli-dump.c (dump_command, append_command)
3752 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3753 (tekhex_dump_command, binary_dump_command)
3754 (binary_append_command): Constify.
3755 * cli/cli-decode.c (struct cmd_list_element): Change type of
3756 "fun".
3757 * cli/cli-cmds.c (info_command, show_command, set_debug)
3758 (show_debug): Constify.
3759 (show_command): Add non-const overload.
3760 * top.c (set_history, show_history): Constify.
3761 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3762 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3763 * target.c (target_command): Constify.
3764 * sparc64-tdep.c (info_adi_command): Constify.
3765 * record-full.c (cmd_record_full_start): Constify.
3766 (set_record_full_command): Constify. Fix typo.
3767 (show_record_full_command): Constify.
3768 * thread.c (thread_command, thread_apply_command): Constify.
3769 * memattr.c (dummy_cmd): Constify.
3770 * value.c (function_command): Constify.
3771 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3772 * probe.c (info_probes_command): Constify.
3773 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3774 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3775 (show_thread_cmd, set_thread_default_cmd)
3776 (show_thread_default_cmd): Constify.
3777 (check_empty): Constify.
3778 * tracepoint.c (tfind_command): Constify.
3779 * cp-support.c (maint_cplus_command): Constify.
3780 * windows-tdep.c (info_w32_command): Constify.
3781 * record.c (cmd_record_start, set_record_command)
3782 (show_record_command, info_record_command, cmd_record_goto):
3783 Constify.
3784 * ravenscar-thread.c (set_ravenscar_command)
3785 (show_ravenscar_command): Constify.
3786 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3787 Constify.
3788 (add_internal_problem_command): Remove casts.
3789 * arc-tdep.c (maintenance_print_arc_command): Constify.
3790 * valprint.c (set_print, show_print, set_print_raw)
3791 (show_print_raw): Constify.
3792 * maint.c (maintenance_command, maintenance_info_command)
3793 (maintenance_print_command, maintenance_set_cmd)
3794 (maintenance_show_cmd, set_per_command_cmd)
3795 (show_per_command_cmd, maintenance_check_command): Constify.
3796 * language.c (set_check, show_check): Constify.
3797 * typeprint.c (show_print_type, set_print_type): Constify.
3798 * go32-nat.c (go32_info_dos_command): Constify.
3799
fdf44873
TT
38002017-10-11 Tom Tromey <tom@tromey.com>
3801
3802 * breakpoint.c (prepare_re_set_context): Remove.
3803 (breakpoint_re_set_one): Update. Don't use cleanups.
3804 (breakpoint_re_set): Use scoped_restore, std::string, and
3805 scoped_restore_current_language.
3806
81b1e71c
TT
38072017-10-11 Tom Tromey <tom@tromey.com>
3808
3809 * breakpoint.c (commands_command_1): Use std::string.
3810 (cleanup_executing_breakpoints): Remove.
3811 (bpstat_do_actions_1): Use scoped_restore.
3812 (bpstat_check_watchpoint): Use std::string.
3813 (decode_static_tracepoint_spec): Likewise.
3814 (break_range_command): Likewise.
3815 (watch_command_1): Likewise.
3816 (compare_breakpoints): Change argument types.
3817 (clear_command): Use std::vector.
3818 (cleanup_executing_breakpoints): Remove.
3819 (update_global_location_list): Use unique_xmalloc_ptr.
3820 (strace_command): Remove unused declaration.
3821
4f9d9906
JB
38222017-10-11 John Baldwin <jhb@FreeBSD.org>
3823
3824 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3825 * NEWS: Mention new FreeBSD/arm native configuration.
3826 * configure.host: Add arm*-*-freebsd*.
3827 * configure.nat: Likewise.
3828 * arm-fbsd-nat.c: New file.
3829
7176dfd2
JB
38302017-10-11 John Baldwin <jhb@FreeBSD.org>
3831
3832 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3833 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3834 * NEWS: Mention new FreeBSD/arm target.
3835 * configure.tgt: Add arm*-*-freebsd*.
3836 * arm-fbsd-tdep.c: New file.
3837 * arm-fbsd-tdep.h: New file.
3838
fe220226
MR
38392017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3840
3841 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3842 `gdbarch_elfcore_write_linux_prpsinfo'.
3843 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3844 method.
3845 (elf_internal_linux_prpsinfo): Remove declaration.
3846 * gdbarch.h: Regenerate.
3847 * gdbarch.c: Regenerate.
3848
a2f63b2e
MR
38492017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3850
3851 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3852 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3853
458ca1d0
PA
38542017-10-11 Pedro Alves <palves@redhat.com>
3855
3856 * breakpoint.c (reattach_breakpoints): Delete.
3857 * breakpoint.h (reattach_breakpoints): Delete.
3858
905014d7
SM
38592017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3860
3861 * symfile.c (registered_sym_fns): Make struct, not typedef.
3862 (DEF_VEC_O (registered_sym_fns)): Remove.
3863 (symtab_fns): Change type to std::vector.
3864 (add_symtab_fns): Adjust.
3865 (find_sym_fns): Adjust.
3866
56d704da
AK
38672017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3868
3869 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3870 * arc-tdep.h (arc_arch_is_em): New function.
3871 (arc_arch_is_hs): Likewise.
3872
7fa29be9
EB
38732017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3874
3875 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3876 parentheses in the declaration.
3877 (macro_lookup_inclusion): Likewise.
3878 (macro_lookup_definition): Likewise.
3879 * p-lang.h (pascal_builtin_types): Likewise.
3880 * tui/tui-data.c (tui_win_list): Likewise.
3881 * tui/tui-data.h (tui_win_list): Likewise.
3882 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3883
d9b477e3
KB
38842017-10-11 Mark Rages <markrages@gmail.com>
3885
3886 * target-memory.c (block_boundaries): Fix for block address not
3887 aligned on block size.
3888
65630365
PA
38892017-10-10 Pedro Alves <palves@redhat.com>
3890 Tom Tromey <tom@tromey.com>
3891
3892 * breakpoint.c (struct captured_breakpoint_query_args)
3893 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3894 (print_breakpoint): New.
3895 * breakpoint.h (print_breakpoint): Declare.
3896 * common/common-exceptions.h (enum return_reason): Remove
3897 references to catch_exceptions.
3898 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3899 Delete.
3900 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3901 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3902 * gdb.h: Delete.
3903 * gdbthread.h (thread_select): Declare.
3904 * mi/mi-cmd-break.c: Don't include gdb.h.
3905 (breakpoint_notify): Use print_breakpoint.
3906 * mi/mi-cmd-catch.c: Don't include gdb.h.
3907 * mi/mi-interp.c: Don't include gdb.h.
3908 (mi_print_breakpoint_for_event): New.
3909 (mi_breakpoint_created, mi_breakpoint_modified): Use
3910 mi_print_breakpoint_for_event.
3911 * mi/mi-main.c: Don't include gdb.h.
3912 (mi_cmd_thread_select): Parse the global thread ID here. Use
3913 thread_select instead of gdb_thread_select.
3914 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3915 of using gdb_list_thread_ids.
3916 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3917 FILEIO_ENOSYS here.
3918 (remote_fileio_request): Use TRY/CATCH instead of
3919 catch_exceptions.
3920 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3921 (symbol_file_add_from_memory_wrapper): Delete.
3922 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3923 * thread.c: Don't include gdb.h.
3924 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3925 (thread_alive): Use thread_select.
3926 (do_captured_thread_select): Delete, parts salvaged as ...
3927 (thread_select): ... this new function.
3928 (gdb_thread_select): Delete.
3929
bf469271
PA
39302017-10-10 Pedro Alves <palves@redhat.com>
3931 Tom Tromey <tom@tromey.com>
3932
3933 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3934 and reverse logic.
3935 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3936 No longer macros. Instead ...
3937 (enum wp_check_result): They're now values of this new
3938 enumeration.
3939 (watchpoint_check): Change return type to wp_check_result and
3940 parameter type to bpstat.
3941 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3942 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3943 catch_errors. Reverse logic of watchpoint_check call.
3944 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3945 pointer as parameter.
3946 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3947 * common/common-exceptions.c (throw_exception_sjlj): Update
3948 comments to avoid mentioning catch_errors.
3949 * exceptions.c (catch_errors): Delete.
3950 * exceptions.h: Update comments to avoid mentioning catch_errors.
3951 (catch_errors_ftype, catch_errors): Delete.
3952 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3953 (hook_stop_stub): Delete.
3954 (restore_selected_frame): Change return type to void, and
3955 parameter type to const frame_id &.
3956 (restore_infcall_control_state): Use TRY/CATCH instead of
3957 catch_errors.
3958 * main.c (captured_command_loop): Return void and remove
3959 parameter. Remove references to catch_errors.
3960 (captured_main): Use TRY/CATCH instead of catch_errors.
3961 * objc-lang.c (objc_submethod_helper_data)
3962 (find_objc_msgcall_submethod_helper): Delete.
3963 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3964 catch_errors.
3965 * record-full.c (record_full_message): Return void.
3966 (record_full_message_args, record_full_message_wrapper): Delete.
3967 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3968 instead of catch_errors.
3969 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3970 parameter type to int.
3971 * solib-darwin.c (open_symbol_file_object): Ditto.
3972 * solib-dsbt.c (open_symbol_file_object): Ditto.
3973 * solib-frv.c (open_symbol_file_object): Ditto.
3974 * solib-svr4.c (open_symbol_file_object): Ditto.
3975 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3976 * solib.c (update_solib_list): Use TRY/CATCH instead of
3977 catch_errors.
3978 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3979 Change type.
3980 * symmisc.c (struct print_symbol_args): Remove.
3981 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3982 (print_symbol): Change type.
3983 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3984 and remove parameters.
3985 (catch_errors): New.
3986 (get_windows_debug_event): Adjust.
3987
1a56bfa5
TT
39882017-10-09 Tom Tromey <tom@tromey.com>
3989
3990 * mi/mi-main.c (free_splay_tree): Remove.
3991 (list_available_thread_groups): Use splay_tree_up.
3992 * common/gdb_splay_tree.h: New file.
3993
0c478e2d
TT
39942017-10-09 Tom Tromey <tom@tromey.com>
3995
3996 * mi/mi-main.c (do_nothing): Remove.
3997 (list_available_thread_groups): Update.
3998
cbd2b4e3
PA
39992017-10-09 Pedro Alves <palves@redhat.com>
4000
4001 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4002 reading registers when switching context.
4003
a181c0bf
JB
40042017-10-09 John Baldwin <jhb@FreeBSD.org>
4005
4006 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4007 (fbsd_convert_siginfo): Likewise.
4008 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4009
6e66f753
SM
40102017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4011
4012 * configure.ac (try_guile_versions): Remove guile-2.2.
4013 * configure: Regenerate.
4014
890e9790
TT
40152017-10-09 Tom Tromey <tom@tromey.com>
4016
4017 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4018 (COMPILE.pre): Use $(CXX).
4019
109483d9
PA
40202017-10-09 Pedro Alves <palves@redhat.com>
4021
4022 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4023 Use bool.
4024 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4025 * cp-support.h (cp_remove_params): Now returns a
4026 gdb::unique_xmalloc_ptr.
4027 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4028 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4029 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4030 returning a gdb::unique_xmalloc_ptr.
4031 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4032 * stack.c (find_frame_funname): Adjust to cp_remove_params
4033 returning a gdb::unique_xmalloc_ptr.
4034
791afaa2
TT
40352017-10-08 Tom Tromey <tom@tromey.com>
4036
4037 * dwarf2read.c (dwarf2_get_dwz_file): Use
4038 gdb::unique_xmalloc_ptr.
4039 (find_slot_in_mapped_hash): Likewise.
4040 (dwarf2_physname): Likewise.
4041 (create_dwo_unit_in_dwp_v1): Use std::string.
4042 (create_dwo_unit_in_dwp_v2): Likewise.
4043 (lookup_dwo_cutu): Likewise.
4044 (inherit_abstract_dies): Use std::vector.
4045 (read_array_type): Likewise.
4046 (dwarf_decode_macros): Remove unused declaration.
4047 (unsigned_int_compar): Remove.
4048 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4049 (psymtabs_addrmap_cleanup): Remove.
4050
30a9c02f
TT
40512017-10-08 Tom Tromey <tom@tromey.com>
4052
4053 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4054 * frame.h (frame_cleanup_after_sniffer): Declare.
4055 (frame_prepare_for_sniffer): Return void.
4056 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4057 type of argument.
4058 (frame_prepare_for_sniffer): Return void.
4059
757325a3
TT
40602017-10-08 Tom Tromey <tom@tromey.com>
4061
4062 * utils.h (make_cleanup_value_free): Remove.
4063 * utils.c (do_value_free, struct cleanup): Remove.
4064 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4065 Use gdb_value_up.
4066 * value.h (struct value_deleter): New.
4067 (gdb_value_up): New typedef.
4068
b9c04fb2
TT
40692017-10-08 Tom Tromey <tom@tromey.com>
4070
4071 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4072 (make_cleanup_free_search_symbols): Remove.
4073 (search_symbols): Return std::vector.
4074 (symbol_search::compare_search_syms): Now member of
4075 symbol_search. Change arguments.
4076 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4077 (symtab_symbol_info, rbreak_command): Update.
4078 * symtab.h (struct symbol_search) <next>: Remove.
4079 Add constructors.
4080 (symbol_search::operator<): New function.
4081 (symbol_search::operator==): New function.
4082 (search_symbols): Remove std::vector.
4083 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4084 (symbol_search::compare_search_syms): Declare.
4085
0d28b0a5
YQ
40862017-10-06 Yao Qi <yao.qi@linaro.org>
4087
4088 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4089 arch/aarch64-insn.o.
4090 Remove one rule.
4091 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4092
71917808
YQ
40932017-10-06 Yao Qi <yao.qi@linaro.org>
4094
4095 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4096 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4097 arch/arm-linux.o respectively.
4098 * configure.tgt: Likewise.
4099
2081b2b2
YQ
41002017-10-06 Yao Qi <yao.qi@linaro.org>
4101
4102 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4103 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4104
a1b85d28
PA
41052017-10-06 Pedro Alves <palves@redhat.com>
4106
4107 * windows-nat.c: Include <algorithm>.
4108
d97987e2
YQ
41092017-10-06 Yao Qi <yao.qi@linaro.org>
4110
4111 * configure.tgt (i386_tobjs): New variable.
4112 (amd64_tobjs): New variable.
4113 Set $cpu_obs and $os_obs.
4114
f38307f5
YQ
41152017-10-06 Yao Qi <yao.qi@linaro.org>
4116
4117 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4118 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4119 (clean): Remove object files and dependency files.
4120 (distclean): Remove the directory.
4121 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4122 * configure: Re-generated.
4123 * configure.tgt: Replace amd64.o with arch/amd64.o.
4124
2f924de6
JM
41252017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4126
4127 PR build/22188
4128 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4129 and SETEND.
4130
2fd9d7ca
PA
41312017-10-05 Pedro Alves <palves@redhat.com>
4132
4133 * linux-nat.c (linux_child_follow_fork): When following the parent
4134 and detaching the child, consult the parent thread's architecture
4135 instead of the child's.
4136
d13b8493
UW
41372017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4138
4139 * ax.h: Do not include "doublest.h".
4140 (union agent_val): Remove.
4141
3b4b2f16
UW
41422017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4143
4144 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4145 (decimal_to_string): Return std::string object.
4146 (decimal_from_string): Accept std::string object. Return bool.
4147 (decimal_from_integral, decimal_from_doublest): Remove.
4148 (decimal_from_longest): Add prototype.
4149 (decimal_from_ulongest): Likewise.
4150 (decimal_to_longest): Likewise.
4151 (decimal_from_doublest): Likewise.
4152 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4153 (MAX_DECIMAL_STRING): Move here.
4154 (decimal_to_string): Return std::string object.
4155 (decimal_from_string): Accept std::string object. Return bool.
4156 (decimal_from_integral): Remove, replace by ...
4157 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4158 (decimal_to_longest): New function.
4159 (decimal_from_floating): Remove, replace by ...
4160 (decimal_from_doublest): ... this new function.
4161 (decimal_to_doublest): Update to new decimal_to_string interface.
4162
4163 * value.c (unpack_long): Use decimal_to_longest.
4164 * valops.c (value_cast): Use decimal_from_doublest instead of
4165 decimal_from_floating. Use decimal_from_[u]longest isntead of
4166 decimal_from_integral.
4167 * valarith.c (value_args_as_decimal): Likewise.
4168 * valprint.c (print_decimal_floating): Update to new
4169 decimal_to_string interface.
4170 * printcmd.c (printf_decfloat): Likewise.
4171 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4172
1841ee5d
UW
41732017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4174
4175 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4176 * gdbtypes.c: Include "floatformat.h".
4177 * value.c: Likewise.
4178 * m68k-tdep.c: Likewise.
4179
4180 * findvar.c: Do not include "floatformat.h".
4181 * amd64-darwin-tdep.c: Likewise.
4182 * arm-linux-tdep.c: Likewise.
4183 * i386-darwin-tdep.c: Likewise.
4184 * i387-tdep.c: Likewise.
4185 * m68k-linux-tdep.c: Likewise.
4186 * mep-tdep.c: Likewise.
4187 * mips-tdep.c: Likewise.
4188 * nios2-tdep.c: Likewise.
4189 * s390-linux-tdep.c: Likewise.
4190 * sparc-obsd-tdep.c: Likewise.
4191 * sparc-tdep.c: Likewise.
4192 * sparc64-tdep.c: Likewise.
4193 * spu-tdep.c: Likewise.
4194 * tic6x-tdep.c: Likewise.
4195 * tilegx-tdep.c: Likewise.
4196 * vax-tdep.c: Likewise.
4197 * xstormy16-tdep.c: Likewise.
4198 * xtensa-tdep.c: Likewise.
4199
4200 * top.c: Do not include "doublest.h".
4201 * aarch64-tdep.c: Likewise.
4202 * alpha-tdep.c: Likewise.
4203 * arm-linux-tdep.c: Likewise.
4204 * m68k-linux-tdep.c: Likewise.
4205 * tilegx-tdep.c: Likewise.
4206 * xstormy16-tdep.c: Likewise.
4207
a80a6471
JB
42082017-10-05 John Baldwin <jhb@FreeBSD.org>
4209
4210 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4211 (mipsn32_fbsd_sigframe): Define.
4212 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4213 for FreeBSD/mipsn32.
4214
12c4bd7f
JB
42152017-10-05 John Baldwin <jhb@FreeBSD.org>
4216
4217 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4218 AT_HWCAP.
4219
c91933e9
TG
42202017-10-05 Tristan Gingold <tgingold@free.fr>
4221
4222 * MAINTAINERS (Misc): Update my email address.
4223
5cd63fda
PA
42242017-10-04 Pedro Alves <palves@redhat.com>
4225
4226 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4227 it instead of target_gdbarch.
4228 (get_remote_state, get_remote_packet_size): Adjust
4229 get_remote_arch_state calls, passing down target_gdbarch
4230 explicitly.
4231 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4232 'gdbarch' and use it instead of target_gdbarch.
4233 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4234 passing down target_gdbarch explicitly.
4235 (struct stop_reply) <arch>: New field.
4236 (remote_parse_stop_reply): Use the stopped thread's architecture,
4237 not the current inferior's. Save the architecture in the
4238 stop_reply.
4239 (process_stop_reply): Use the stop reply's architecture.
4240 (process_g_packet, remote_fetch_registers)
4241 (remote_prepare_to_store, store_registers_using_G)
4242 (remote_store_registers): Adjust get_remote_arch_state calls,
4243 using the regcache's architecture.
4244 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4245 passing down target_gdbarch explicitly.
4246 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4247 beneath instead of calling target_gdbarch.
4248 * target.c (default_thread_architecture): Use the specified
4249 inferior's architecture, instead of the current inferior's
4250 architecture (via target_gdbarch).
4251
ed4227b7
PA
42522017-10-04 Pedro Alves <palves@redhat.com>
4253
4254 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4255 case.
4256 (regcache_print): Handle !target_has_registers here instead.
4257
55b11ddf
PA
42582017-10-04 Pedro Alves <palves@redhat.com>
4259
4260 * frame.c (create_test_frame): Delete.
4261 * frame.h (create_test_frame): Delete.
4262 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4263 (class regcache_test): Delete.
4264 (test_target_has_registers, test_target_has_stack)
4265 (test_target_has_memory, test_target_prepare_to_store)
4266 (test_target_store_registers): New functions.
4267 (test_target_ops): New class.
4268 (register_to_value_test): Error out if there's already a
4269 process_stratum (or higher) target pushed. Create a fuller mock
4270 environment, with mock target_ops, inferior, address space, thread
4271 and inferior_ptid.
4272 * progspace.c (struct address_space): Move to ...
4273 * progspace.h (struct address_space): ... here.
4274 * regcache.h (regcache::~regcache, regcache::raw_write)
4275 [GDB_SELF_TEST]: No longer virtual.
4276
4c71c105
SM
42772017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4278
4279 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4280
73dcd72d
PA
42812017-10-04 Pedro Alves <palves@redhat.com>
4282
4283 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4284 out of 'between TRY and CATCH'.
4285
44704526
PA
42862017-10-04 Pedro Alves <palves@redhat.com>
4287
4288 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4289 * common/common-exceptions.h (TRY): Open an outermost scope.
4290 Expand intro comment.
4291 (CATCH): Reindent.
4292 (END_CATCH): Close the outermost scope.
4293 * completer.c (complete_line_internal): Add missing END_CATCH.
4294
bc3b087d
SDJ
42952017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4296
4297 * NEWS (Changes since GDB 8.0): Add entry about new
4298 'set-cwd-on-gdbserver' feature.
4299 (New remote packets): Add entry for QSetWorkingDir.
4300 * common/common-inferior.h (set_inferior_cwd): New prototype.
4301 * infcmd.c (set_inferior_cwd): Remove "static".
4302 (show_cwd_command): Expand text to include remote debugging.
4303 * remote.c: Add PACKET_QSetWorkingDir.
4304 (remote_protocol_features) <QSetWorkingDir>: New entry for
4305 PACKET_QSetWorkingDir.
4306 (extended_remote_set_inferior_cwd): New function.
4307 (extended_remote_create_inferior): Call
4308 "extended_remote_set_inferior_cwd".
4309 (_initialize_remote): Call "add_packet_config_cmd" for
4310 QSetWorkingDir.
4311
d092c5a2
SDJ
43122017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4313
4314 * NEWS (New commands): Mention "set/show cwd".
4315 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4316 "cd" command's help text.
4317 * common/common-inferior.h (get_inferior_cwd): New prototype.
4318 * infcmd.c (inferior_cwd_scratch): New global variable.
4319 (set_inferior_cwd): New function.
4320 (get_inferior_cwd): Likewise.
4321 (set_cwd_command): Likewise.
4322 (show_cwd_command): Likewise.
4323 (_initialize_infcmd): Add "set/show cwd" commands.
4324 * inferior.h (class inferior) <cwd>: New field.
4325 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4326 (fork_inferior): Change inferior's cwd before its execution.
4327 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4328 to CreateProcess.
4329
7da0a886
SDJ
43302017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4331
4332 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4333 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4334 (COMMON_OBS): Add gdb_tilde_expand.o.
4335 * common/gdb_tilde_expand.c: New file.
4336 * common/gdb_tilde_expand.h: Likewise.
4337
db8dd160
MR
43382017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4339
4340 * gdbarch.sh (objfile): Remove duplicate declaration.
4341 * gdbarch.h: Regenerate.
4342
f8bfbf22
TT
43432017-10-03 Tom Tromey <tom@tromey.com>
4344
4345 * utils.c (internal_vproblem): Use string_vprintf.
4346
5178ed48
TT
43472017-10-03 Tom Tromey <tom@tromey.com>
4348
4349 * printcmd.c (info_symbol_command): Use std::string.
4350
8cff8730
TT
43512017-10-03 Tom Tromey <tom@tromey.com>
4352
4353 * top.c (gdb_safe_append_history): Use std::string.
4354
895b8f30
TT
43552017-10-03 Tom Tromey <tom@tromey.com>
4356
4357 * event-top.c (stdin_event_handler): Update.
4358 * main.c (captured_main_1): Update.
4359 * top.h (make_delete_ui_cleanup): Remove.
4360 (struct ui): Add constructor and destructor.
4361 (new_ui, delete_ui): Remove.
4362 * top.c (make_delete_ui_cleanup): Remove.
4363 (new_ui_command): Use std::unique_ptr.
4364 (delete_ui_cleanup): Remove.
4365 (ui::ui): Rename from new_ui. Update.
4366 (free_ui): Remove.
4367 (ui::~ui): Rename from delete_ui. Update.
4368
0efef640
TT
43692017-10-03 Tom Tromey <tom@tromey.com>
4370
4371 * symfile.c (load_progress): Use gdb::byte_vector.
4372
245ad7d3
TT
43732017-10-03 Tom Tromey <tom@tromey.com>
4374
4375 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4376 declaration.
4377 * printcmd.c (x_command): Remove unused declaration.
4378 * symfile.c (symbol_file_command): Remove unused declaration.
4379
e05550d7
TT
43802017-10-03 Tom Tromey <tom@tromey.com>
4381
4382 * utils.c (internal_vproblem): Use std::string.
4383 (defaulted_query): Likewise.
4384
b95de2b7
TT
43852017-10-03 Tom Tromey <tom@tromey.com>
4386
4387 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4388 * top.c (execute_command_to_string): Update.
4389 * utils.c (make_cleanup_restore_page_info): Remove.
4390 (do_restore_page_info_cleanup): Remove.
4391 (set_batch_flag_and_restore_page_info):
4392 New.
4393 (make_cleanup_restore_page_info): Remove.
4394 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4395 (~set_batch_flag_and_restore_page_info): New
4396 (make_cleanup_restore_uinteger): Remove.
4397 (make_cleanup_restore_integer): Remove.
4398 (struct restore_integer_closure): Remove.
4399 (restore_integer): Remove.
4400 * utils.h (struct set_batch_flag_and_restore_page_info): New
4401 class.
4402 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4403 (make_cleanup_restore_page_info): Remove.
4404 (make_cleanup_restore_uinteger) Remove.
4405 (make_cleanup_restore_integer) Remove.
4406
07036511
TT
44072017-10-03 Tom Tromey <tom@tromey.com>
4408
4409 * record-full.h (record_full_gdb_operation_disable_set): Return
4410 scoped_restore_tmpl<int>.
4411 * infrun.c (adjust_pc_after_break): Update.
4412 (handle_signal_stop): Update.
4413 * record-full.c (record_full_gdb_operation_disable_set): Return
4414 scoped_restore_tmpl<int>.
4415 (record_full_wait_1, record_full_insert_breakpoint)
4416 (record_full_remove_breakpoint, record_full_save)
4417 (record_full_goto_insn): Update.
4418
45320ffa
TT
44192017-10-02 Tom Tromey <tom@tromey.com>
4420
4421 PR rust/22236:
4422 * rust-lang.c (rust_val_print_str): New function.
4423 (val_print_struct): Call it.
4424 (rust_subscript): Preserve name of slice type.
4425
b3e3859b
TT
44262017-10-02 Tom Tromey <tom@tromey.com>
4427
4428 * rust-lang.c (rust_subscript): Handle slices in
4429 EVAL_AVOID_SIDE_EFFECTS case.
4430
01af5e0d
TT
44312017-10-02 Tom Tromey <tom@tromey.com>
4432
4433 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4434
888e3ddb
TT
44352017-10-02 Tom Tromey <tom@tromey.com>
4436
4437 * rust-lang.h (rust_slice_type): Add "extern".
4438
cc536b21
PA
44392017-10-02 Tom Tromey <tom@tromey.com>
4440 Pedro Alves <palves@redhat.com>
4441
4442 * ada-lang.h (ada_exc_info::operator<): Make const.
4443 (ada_exc_info::operator==): Make const.
4444 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4445 Make const.
4446
386c8614
TT
44472017-09-29 Tom Tromey <tom@tromey.com>
4448
4449 * target.c (read_whatever_is_readable): Change type of "result".
4450 Update.
4451 (free_memory_read_result_vector): Remove.
4452 (read_memory_robust): Change return type. Update.
4453 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4454 bin2hex, std::string.
4455 * target.h (memory_read_result_s): Remove typedef.
4456 (free_memory_read_result_vector): Remove.
4457 (read_memory_robust): Return std::vector.
4458
789c4b5e
TT
44592017-09-29 Tom Tromey <tom@tromey.com>
4460
4461 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4462
ab816a27
TT
44632017-09-29 Tom Tromey <tom@tromey.com>
4464
4465 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4466 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4467 operator< and operator==.
4468 (ada_exceptions_list): Return a std::vector.
4469 * ada-lang.c (ada_exc_info::operator<): Rename from
4470 compare_ada_exception_info.
4471 (ada_exc_info::operator==): New.
4472 (sort_remove_dups_ada_exceptions_list): Change type of
4473 "exceptions".
4474 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4475 (ada_add_global_exceptions): Likewise.
4476 (ada_exceptions_list_1): Return a std::vector.
4477 (ada_exceptions_list): Likewise.
4478
52f9abe4
TT
44792017-09-29 Tom Tromey <tom@tromey.com>
4480
4481 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4482 'std::set *'.
4483 (print_one_inferior): Update.
4484 (free_vector_of_ints): Remove.
4485 (list_available_thread_groups): Change "ids" to std::set.
4486 (mi_cmd_list_thread_groups): Update.
4487 (struct collect_cores_data) <core>: Now a std::set.
4488 (collect_cores): Update.
4489 (unique): Remove.
4490 (print_one_inferior): Update.
4491
dcd5ddcc
TT
44922017-09-29 Tom Tromey <tom@tromey.com>
4493
4494 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4495 (mi_execute_async_cli_command): Likewise.
4496 (mi_cmd_trace_frame_collected): Use field_fmt.
4497
45d288cc
TT
44982017-09-29 Tom Tromey <tom@tromey.com>
4499
4500 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4501 gdb::byte_vector.
4502
6afe2f4a
TT
45032017-09-29 Tom Tromey <tom@tromey.com>
4504
4505 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4506
9813429a
TT
45072017-09-29 Tom Tromey <tom@tromey.com>
4508
4509 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4510
2d6960b4
TT
45112017-09-29 Tom Tromey <tom@tromey.com>
4512
4513 * varobj.h (varobj_gen_name): Return std::string.
4514 * varobj.c (varobj_gen_name): Return std::string.
4515 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4516 (mi_cmd_var_delete): Don't copy "name".
4517
784c453a
TT
45182017-09-29 Tom Tromey <tom@tromey.com>
4519
4520 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4521 (mi_cmd_break_insert_1): Update.
4522
a9bc57b9
TT
45232017-09-29 Tom Tromey <tom@tromey.com>
4524
4525 * target.h (make_scoped_defer_target_commit_resume): Update.
4526 * target.c (make_scoped_defer_target_commit_resume): Rename from
4527 make_cleanup_defer_target_commit_resume. Return a
4528 scoped_restore.
4529 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4530
9754d8c4
TT
45312017-09-29 Tom Tromey <tom@tromey.com>
4532
4533 * main.c (captured_main_1): Remove unused declaration.
4534 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4535
99ef965c
TT
45362017-09-29 Tom Tromey <tom@tromey.com>
4537
4538 * symtab.c (search_symbols): Remove unused outer cleanup.
4539 (make_source_files_completion_list): Remove unused declaration.
4540
42518ba7
TT
45412017-09-29 Tom Tromey <tom@tromey.com>
4542
4543 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4544
726b2169
TT
45452017-09-29 Tom Tromey <tom@tromey.com>
4546
4547 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4548 gdb::byte_vector.
4549
55b06432
TT
45502017-09-29 Tom Tromey <tom@tromey.com>
4551
4552 * complaints.c (vcomplaint): Use std::string.
4553
8abcee91
TT
45542017-09-29 Tom Tromey <tom@tromey.com>
4555
4556 * tracepoint.c (trace_variable_command): Use std::string.
4557 (encode_actions_1): Remove unused declarations.
4558 (create_tsv_from_upload): Use std::string.
4559
6ad94bc7
TT
45602017-09-29 Tom Tromey <tom@tromey.com>
4561
4562 * cp-support.c (gdb_demangle): Use std::string.
4563
2003f3d8
TT
45642017-09-29 Tom Tromey <tom@tromey.com>
4565
4566 * stack.c (parse_frame_specification): Use std::string
4567 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4568
8f8accb5
TT
45692017-09-29 Tom Tromey <tom@tromey.com>
4570
4571 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4572
200aa7b1
TT
45732017-09-29 Tom Tromey <tom@tromey.com>
4574
4575 * utils.c (vfprintf_maybe_filtered): Use std::string.
4576 (vfprintf_unfiltered): Likewise.
4577
606aae8a
TT
45782017-09-29 Tom Tromey <tom@tromey.com>
4579
4580 * event-top.c (top_level_prompt): Return std::string.
4581 (display_gdb_prompt): Update.
4582
bd413795
TT
45832017-09-29 Tom Tromey <tom@tromey.com>
4584
4585 * unittests/common-utils-selftests.c (format): New function.
4586 (string_vprintf_tests): New function.
4587 (_initialize_common_utils_selftests): Register new tests.
4588 * common/common-utils.c (string_vprintf): New function.
4589 * common/common-utils.h (string_vprintf): Declare.
4590
256642e8
PA
45912017-09-29 Pedro Alves <palves@redhat.com>
4592
4593 * common/rsp-low.c (unpack_varlen_hex): Constify.
4594 * common/rsp-low.h (unpack_varlen_hex): Constify.
4595 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4596 Constify.
4597 * remote.c (remote_set_permissions, read_ptid)
4598 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4599 (remote_static_tracepoint_marker_at)
4600 (remote_static_tracepoint_markers_by_strid)
4601 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4602 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4603 (parse_tracepoint_definition, parse_tsv_definition)
4604 (parse_static_tracepoint_marker_definition): Constify.
4605 * tracepoint.h (parse_static_tracepoint_marker_definition)
4606 (parse_trace_status, parse_tracepoint_status)
4607 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4608
b6bb3468
PA
46092017-09-29 Pedro Alves <palves@redhat.com>
4610
4611 * remote.c (target_buf, target_buf_size): Delete.
4612 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4613 Use the connection's packet buffer instead.
4614 All callers adjusted.
4615 (_initialize_remote): Remove references to target_buf and
4616 target_buf_size.
4617
b2f8eb7a
PA
46182017-09-28 Pedro Alves <palves@redhat.com>
4619
4620 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4621 unittests/common-utils-selftests.c.
4622 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4623 (COMMON_OBS): Remove utils-selftests.o.
4624 * utils-selftests.c: Move to ...
4625 * unittests/common-utils-selftests.c: ... here and rename self
4626 test to "string_printf".
4627
08302ed2
DE
46282017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4629
4630 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4631 having NULL cus or tus.
4632
96a5a1d3
UW
46332017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4634
4635 * arm-tdep.c: (convert_from_extended): Remove.
4636 (convert_to_extended): Likewise.
4637 (arm_extract_return_value): Use convert_typed_floating.
4638 (arm_store_return_value): Likewise.
4639
4640 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4641 * sh-tdep.c: Do not include "floatformat.h".
4642 (sh_littlebyte_bigword_type): New function.
4643 (sh_register_convert_to_virtual): Use convert_typed_floating.
4644 (sh_register_convert_to_raw): Likewise.
4645 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4646 (sh64_littlebyte_bigword_type): New function.
4647 (sh64_extract_return_value): Use convert_typed_floating.
4648 (sh64_register_convert_to_virtual): Likewise.
4649 (sh64_register_convert_to_raw): Likewise.
4650
0db7851f
UW
46512017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4652
4653 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4654 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4655
4656 * gdbtypes.h (union type_specific): Make field floatformat hold
4657 just a single struct floatformat, not an array.
4658 (floatformat_from_type): Move here.
4659 * gdbtypes.c (floatformat_from_type): Move here. Update to
4660 changed TYPE_FLOATFORMAT definition.
4661 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4662 (recursive_dump_type): Likewise.
4663 (init_float_type): Install correct floatformat for byte order.
4664 (arch_float_type): Likewise.
4665
77b7c781
UW
46662017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4667
4668 * gdbtypes.c (init_type): Change incoming argument from
4669 length-in-bytes to length-in-bits. Assert length is a
4670 multiple of TARGET_CHAR_BITS.
4671 (arch_type, arch_flags_type): Likewise.
4672 (init_integer_type): Update call to init_type.
4673 (init_character_type): Likewise.
4674 (init_boolean_type): Likewise.
4675 (init_float_type): Likewise.
4676 (init_decfloat_type): Likewise.
4677 (init_complex_type): Likewise.
4678 (init_pointer_type): Likewise.
4679 (objfile_type): Likewise.
4680 (arch_integer_type): Update call to arch_type.
4681 (arch_character_type): Likewise.
4682 (arch_boolean_type): Likewise.
4683 (arch_float_type): Likewise.
4684 (arch_decfloat_type): Likewise.
4685 (arch_complex_type): Likewise.
4686 (arch_pointer_type): Likewise.
4687 (gdbtypes_post_init): Likewise.
4688
4689 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4690 (read_base_type): Likewise.
4691 * mdebugread.c (basic_type): Likewise.
4692 * stabsread.c (dbx_init_float_type): Likewise.
4693 (rs6000_builtin_type): Likewise.
4694 (read_range_type): Likewise. Also, fix call to init_integer_type
4695 with erroneous length argument.
4696
4697 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4698 * d-lang.c (build_d_types): Likewise.
4699 * f-lang.c (build_fortran_types): Likewise.
4700 * go-lang.c (build_go_types): Likewise.
4701 * opencl-lang.c (build_opencl_types): Likewise.
4702 * jit.c (finalize_symtab): Likewise.
4703 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4704 (build_std_type_info_type): Likewise.
4705 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4706 update call to arch_flags_type.
4707
4708 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4709 arch_type.
4710 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4711 * windows-tdep.c (windows_get_tlb_type): Likewise.
4712
4713 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4714 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4715 * m32c-tdep.c (make_types): Likewise.
4716 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4717 (rl78_psw_type): Update call to arch_flags_type.
4718 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4719 * rx-tdep.c (rx_psw_type): Likewise.
4720 (rx_fpsw_type): Likewise.
4721 * sparc-tdep.c (sparc_psr_type): Likewise.
4722 (sparc_fsr_type): Likewise.
4723 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4724 (sparc64_ccr_type): Likewise.
4725 (sparc64_fsr_type): Likewise.
4726 (sparc64_fprs_type): Likewise.
4727
f21b4d5c
TT
47282017-09-27 Tom Tromey <tom@tromey.com>
4729
4730 * findcmd.c (find_command): Constify.
4731
643c2ffa
TT
47322017-09-27 Tom Tromey <tom@tromey.com>
4733
4734 * ada-tasks.c (task_command_1, task_command): Constify.
4735
510e5e56
TT
47362017-09-27 Tom Tromey <tom@tromey.com>
4737
4738 * symtab.c (maintenance_print_symbol_cache)
4739 (maintenance_flush_symbol_cache)
4740 (maintenance_print_symbol_cache_statistics): Constify.
4741
e503b191
TT
47422017-09-27 Tom Tromey <tom@tromey.com>
4743
4744 * inferior.c (detach_inferior_command, kill_inferior_command)
4745 (inferior_command): Constify.
4746
4e001312
TT
47472017-09-27 Tom Tromey <tom@tromey.com>
4748
4749 * regcache.c (regcache_print, maintenance_print_registers)
4750 (maintenance_print_raw_registers)
4751 (maintenance_print_cooked_registers)
4752 (maintenance_print_register_groups)
4753 (maintenance_print_remote_registers): Constify.
4754
77763700
TT
47552017-09-27 Tom Tromey <tom@tromey.com>
4756
4757 * printcmd.c (map_display_numbers, undisplay_command)
4758 (enable_disable_display_command, enable_display_command)
4759 (disable_display_command): Constify.
4760
4495129a
TT
47612017-09-27 Tom Tromey <tom@tromey.com>
4762
4763 * breakpoint.h (delete_command): Don't declare.
4764 * breakpoint.c (delete_command, enable_once_command)
4765 (enable_count_command, enable_delete_command, breakpoint_1)
4766 (maintenance_info_breakpoints, stopin_command, stopat_command)
4767 (delete_command, delete_trace_command, save_breakpoints)
4768 (save_breakpoints_command, save_tracepoints_command): Constify.
4769
3088cf40
TT
47702017-09-27 Tom Tromey <tom@tromey.com>
4771
4772 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4773 (skip_ws, extract_identifier, macro_define_command)
4774 (macro_undef_command, macro_list_command): Constify.
4775
69f476a3
TT
47762017-09-27 Tom Tromey <tom@tromey.com>
4777
4778 * infcmd.c (environment_info, set_environment_command)
4779 (unset_environment_command, path_info, info_proc_cmd_1)
4780 (info_proc_cmd_mappings, info_proc_cmd_stat)
4781 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4782 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4783
c4a3e68e
TT
47842017-09-27 Tom Tromey <tom@tromey.com>
4785
4786 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4787 Constify.
4788
c9d31bd6
TT
47892017-09-27 Tom Tromey <tom@tromey.com>
4790
4791 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4792
1f3f85eb
TT
47932017-09-27 Tom Tromey <tom@tromey.com>
4794
4795 * demangle.c (demangle_command): Constify.
4796
9c504b5d
TT
47972017-09-27 Tom Tromey <tom@tromey.com>
4798
4799 * progspace.c (maintenance_info_program_spaces_command):
4800 Constify.
4801
6663cf91
TT
48022017-09-27 Tom Tromey <tom@tromey.com>
4803
4804 * compile/compile.c (check_raw_argument, compile_file_command)
4805 (compile_code_command, compile_print_command): Constify.
4806
34e5fa26
TT
48072017-09-27 Tom Tromey <tom@tromey.com>
4808
4809 * reggroups.c (maintenance_print_reggroups): Constify.
4810
8384c356
TT
48112017-09-27 Tom Tromey <tom@tromey.com>
4812
4813 * dwarf2read.c (save_gdb_index_command): Constify.
4814
884beb0c
TT
48152017-09-27 Tom Tromey <tom@tromey.com>
4816
4817 * stap-probe.c (info_probes_stap_command): Constify.
4818
e0b2930c
TT
48192017-09-27 Tom Tromey <tom@tromey.com>
4820
4821 * fork-child.c (unset_exec_wrapper_command): Constify.
4822
f938677d
TT
48232017-09-27 Tom Tromey <tom@tromey.com>
4824
4825 * btrace.c (get_uint, get_context_size, no_chunk)
4826 (maint_btrace_packet_history_cmd)
4827 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4828 (maint_info_btrace_cmd): Constify.
4829
8949cb87
TT
48302017-09-27 Tom Tromey <tom@tromey.com>
4831
4832 * reverse.c (delete_bookmark_command): Constify.
4833
ac88e2de
TT
48342017-09-27 Tom Tromey <tom@tromey.com>
4835
4836 * remote.c (set_memory_packet_size)
4837 (set_memory_write_packet_size, show_memory_write_packet_size)
4838 (set_memory_read_packet_size, show_memory_read_packet_size)
4839 (compare_sections_command, packet_command, remote_put_command)
4840 (remote_get_command, remote_delete_command): Constify.
4841
bd4c9dfe
TT
48422017-09-27 Tom Tromey <tom@tromey.com>
4843
4844 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4845 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4846 (set_mipsfpu_auto_command): Constify.
4847
5e93d4c6
TT
48482017-09-27 Tom Tromey <tom@tromey.com>
4849
4850 * cli/cli-cmds.h (cd_command): Constify.
4851 * cli/cli-cmds.c (cd_command): Constify.
4852
fc41a75b
TT
48532017-09-27 Tom Tromey <tom@tromey.com>
4854
4855 * thread.c (thread_name_command, thread_find_command): Constify.
4856
67810076
TT
48572017-09-27 Tom Tromey <tom@tromey.com>
4858
4859 * probe.c (enable_probes_command, disable_probes_command):
4860 Constify.
4861
1d8b34a7
TT
48622017-09-27 Tom Tromey <tom@tromey.com>
4863
4864 * symfile.c (symbol_file_command): Constify.
4865 * gdbcore.h (deprecated_file_changed_hook): Constify.
4866 * exec.c (deprecated_file_changed_hook, exec_file_command)
4867 (file_command): Constify.
4868 * defs.h (symbol_file_command): Constify.
4869
442019e1
TT
48702017-09-27 Tom Tromey <tom@tromey.com>
4871
4872 * remote-fileio.c (set_system_call_allowed)
4873 (show_system_call_allowed): Constify.
4874
2983f7cb
TT
48752017-09-27 Tom Tromey <tom@tromey.com>
4876
4877 * tracepoint.c (delete_trace_variable_command)
4878 (tfind_end_command, tfind_start_command, tfind_pc_command)
4879 (tfind_tracepoint_command, tfind_line_command)
4880 (tfind_range_command, tfind_outside_command): Constify.
4881
4fd41b24
TT
48822017-09-27 Tom Tromey <tom@tromey.com>
4883
4884 * ax-gdb.c (maint_agent_printf_command, agent_command)
4885 (agent_eval_command): Constify.
4886
f2fc3015
TT
48872017-09-27 Tom Tromey <tom@tromey.com>
4888
4889 * tracepoint.c (info_scope_command): Constify.
4890 * python/python.c (gdbpy_decode_line): Constify.
4891 * python/py-breakpoint.c (bppy_init): Constify.
4892 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4893 * location.h: (new_linespec_location)
4894 (string_to_event_location_basic, string_to_event_location):
4895 Constify.
4896 * location.c (new_linespec_location)
4897 (string_to_event_location_basic, string_to_event_location):
4898 Constify.
4899 * linespec.h (decode_line_with_current_source)
4900 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4901 * linespec.c (linespec_lex_to_end)
4902 (decode_line_with_current_source)
4903 (decode_line_with_last_displayed): Constify.
4904 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4905 Constify.
4906 * cli/cli-cmds.c (edit_command, list_command): Constify.
4907 * breakpoint.h (until_break_command, watch_command_wrapper)
4908 (awatch_command_wrapper, rwatch_command_wrapper)
4909 (init_ada_exception_breakpoint): Constify.
4910 * breakpoint.c (break_command_1, dprintf_command)
4911 (break_range_command, watch_command_wrapper)
4912 (rwatch_command_wrapper, awatch_command_wrapper)
4913 (until_break_command, init_ada_exception_breakpoint)
4914 (strace_marker_create_sals_from_location, trace_command)
4915 (ftrace_command, strace_command, struct tracepoint): Constify.
4916 * ax-gdb.c (agent_command_1): Constify.
4917 * ada-lang.c (ada_exception_sal): Constify.
4918
8c2f95f4
TT
49192017-09-27 Tom Tromey <tom@tromey.com>
4920
4921 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4922 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4923 (get_context_size, no_chunk, get_insn_history_modifiers)
4924 (cmd_record_insn_history, get_call_history_modifiers)
4925 (cmd_record_call_history): Constify.
4926
a0d65762
TT
49272017-09-27 Tom Tromey <tom@tromey.com>
4928
4929 * source.c (show_substitute_path_command)
4930 (unset_substitute_path_command, set_substitute_path_command):
4931 Constify.
4932
58971144
TT
49332017-09-27 Tom Tromey <tom@tromey.com>
4934
4935 * typeprint.c (maintenance_print_type): Constify.
4936 * maint.c (maintenance_dump_me, maintenance_demangle)
4937 (maintenance_time_display, maintenance_info_sections)
4938 (maintenance_print_statistics, maintenance_deprecate)
4939 (maintenance_undeprecate): Constify.
4940 (maintenance_do_deprecate): Constify. Use std::string.
4941 (maintenance_selftest): Constify.
4942 * gdbtypes.h (maintenance_print_type): Constify.
4943
c482f52c
TT
49442017-09-27 Tom Tromey <tom@tromey.com>
4945
4946 * hppa-tdep.c (unwind_command): Constify.
4947
e100df1a
TT
49482017-09-27 Tom Tromey <tom@tromey.com>
4949
4950 * target-descriptions.c (unset_tdesc_filename_cmd)
4951 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4952 Constify.
4953
31d56ade
TT
49542017-09-27 Tom Tromey <tom@tromey.com>
4955
4956 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4957
b961da0b
TT
49582017-09-27 Tom Tromey <tom@tromey.com>
4959
4960 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4961
e2d8ae16
TT
49622017-09-27 Tom Tromey <tom@tromey.com>
4963
4964 * tui/tui-regs.c (tui_reg_command): Constify.
4965
863779b0
TT
49662017-09-27 Tom Tromey <tom@tromey.com>
4967
4968 * skip.c (skip_file_command, skip_function_command)
4969 (skip_enable_command, skip_disable_command, skip_delete_command):
4970 Constify.
4971
cdb34d4a
TT
49722017-09-27 Tom Tromey <tom@tromey.com>
4973
4974 * record-btrace.c (cmd_record_btrace_bts_start)
4975 (cmd_record_btrace_pt_start): Constify.
4976
e99c83e7
TT
49772017-09-27 Tom Tromey <tom@tromey.com>
4978
4979 * symmisc.c (maintenance_print_symbols)
4980 (maintenance_print_msymbols, maintenance_print_objfiles)
4981 (maintenance_info_symtabs, maintenance_check_symtabs)
4982 (maintenance_expand_symtabs, maintenance_info_line_tables):
4983 Constify.
4984
32faf971
TT
49852017-09-27 Tom Tromey <tom@tromey.com>
4986
4987 * top.c (new_ui_command): Constify.
4988
2cf311eb
TT
49892017-09-27 Tom Tromey <tom@tromey.com>
4990
4991 * symfile.c (add_symbol_file_command)
4992 (remove_symbol_file_command, list_overlays_command)
4993 (map_overlay_command, unmap_overlay_command)
4994 (overlay_auto_command, overlay_manual_command)
4995 (overlay_off_command, overlay_load_command): Constify.
4996
e6738699
TT
49972017-09-27 Tom Tromey <tom@tromey.com>
4998
4999 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5000 (info_spu_mailbox_command, info_spu_dma_command)
5001 (info_spu_proxydma_command): Constify.
5002
aa360cd5
TT
50032017-09-27 Tom Tromey <tom@tromey.com>
5004
5005 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5006
898241a5
TT
50072017-09-27 Tom Tromey <tom@tromey.com>
5008
5009 * cli/cli-script.c (user_defined_command): Constify.
5010
2d0ac106
TT
50112017-09-27 Tom Tromey <tom@tromey.com>
5012
5013 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5014 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5015 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5016 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5017 (dump_binary_value, append_binary_memory, append_binary_value):
5018 Constify.
5019 (struct dump_context) <func>: Constify.
5020 (add_dump_command): Update.
5021
dede02ce
TT
50222017-09-27 Tom Tromey <tom@tromey.com>
5023
5024 * cli/cli-cmds.c (show_version, show_configuration)
5025 (source_command, show_user): Constify.
5026
d3cb6b99
TT
50272017-09-27 Tom Tromey <tom@tromey.com>
5028
5029 * target.c (maintenance_print_target_stack): Constify.
5030
1970a12f
TT
50312017-09-27 Tom Tromey <tom@tromey.com>
5032
5033 * interps.c (interpreter_exec_cmd): Constify.
5034
41243651
TT
50352017-09-27 Tom Tromey <tom@tromey.com>
5036
5037 * record-full.c (cmd_record_full_restore): Constify.
5038
4465d9db
TT
50392017-09-27 Tom Tromey <tom@tromey.com>
5040
5041 * memattr.c (enable_mem_command, disable_mem_command)
5042 (delete_mem_command): Constify.
5043
ad25e423
TT
50442017-09-27 Tom Tromey <tom@tromey.com>
5045
5046 * value.c (show_convenience): Constify.
5047
d64097b1
TT
50482017-09-27 Tom Tromey <tom@tromey.com>
5049
5050 * gdbcore.h (core_file_command): Update.
5051 * corefile.c (core_file_command): Constify.
5052
4d4589ef
TT
50532017-09-27 Tom Tromey <tom@tromey.com>
5054
5055 * user-regs.c (maintenance_print_user_registers): Constify.
5056
32a7bf17
TT
50572017-09-27 Tom Tromey <tom@tromey.com>
5058
5059 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5060
4a475551
TT
50612017-09-27 Tom Tromey <tom@tromey.com>
5062
5063 * cp-support.c (first_component_command): Constify.
5064
990b9f9f
TT
50652017-09-27 Tom Tromey <tom@tromey.com>
5066
5067 * psymtab.c (maintenance_print_psymbols)
5068 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5069 Constify.
5070
c281872e
TT
50712017-09-27 Tom Tromey <tom@tromey.com>
5072
5073 * windows-tdep.c (display_tib): Constify.
5074
5b64bf74
TT
50752017-09-27 Tom Tromey <tom@tromey.com>
5076
5077 * linux-fork.c (delete_checkpoint_command)
5078 (detach_checkpoint_command): Constify.
5079
4ada038f
TT
50802017-09-27 Tom Tromey <tom@tromey.com>
5081
5082 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5083
57f5a81b
TT
50842017-09-27 Tom Tromey <tom@tromey.com>
5085
5086 * arc-tdep.c (dump_arc_instruction_command): Constify.
5087
b0a8e6c4
TT
50882017-09-27 Tom Tromey <tom@tromey.com>
5089
5090 * valprint.c (set_radix, show_radix): Constify.
5091
8d97dc1c
TT
50922017-09-27 Tom Tromey <tom@tromey.com>
5093
5094 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5095
eb7c454d
TT
50962017-09-27 Tom Tromey <tom@tromey.com>
5097
5098 * command.h (not_just_help_class_command): Update.
5099 * cli/cli-decode.h (not_just_help_class_command): Update.
5100 * cli/cli-decode.c (not_just_help_class_command): Constify.
5101
e4e33335
TT
51022017-09-27 Tom Tromey <tom@tromey.com>
5103
5104 * gdb_bfd.c (maintenance_info_bfds): Constify.
5105
0450cc4c
TT
51062017-09-27 Tom Tromey <tom@tromey.com>
5107
5108 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5109 overloads.
5110 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5111 (do_const_cfunc): New function.
5112 (cmd_cfunc_eq): New overload.
5113 (cli_user_command_p): Check do_const_cfunc.
5114 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5115 const_cfunc.
5116 * command.h (add_cmd): Add const overload and no-function
5117 overload.
5118 (set_cmd_cfunc): Add const overload.
5119 (cmd_const_cfunc_ftype): Declare.
5120 (cmd_cfunc_eq): Add const overload.
5121 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5122 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5123 overload.
5124
a9bbfbd8
TT
51252017-09-27 Tom Tromey <tom@tromey.com>
5126
5127 * macroexp.c (get_next_token_for_substitution): New function.
5128 (substitute_args): Call it. Check for __VA_OPT__.
5129
5230b05a
WT
51302017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5131 Pedro Alves <palves@redhat.com>
5132
5133 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5134 producer_is_icc_lt_14.
5135 (producer_is_icc_lt_14): New function.
5136 (check_producer): Add code for checking version of ICC.
5137 (producer_is_icc): Move to producer.c.
5138 (read_structure_type): Restrict ICC workaround to ICC<14.
5139 * producer.c: Include selftest.h.
5140 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5141 New functions.
5142 * producer.h (producer_is_icc): New declaration.
5143
b32b108a
WT
51442017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5145
5146 * Makefile.in (SFILES): Add producer.c.
5147 (COMMON_OBS): Add producer.o
5148 * amd64-tdep.c (producer.h): Add new include.
5149 * dwarf2read.c (producer.h): Add new include.
5150 * producer.c: New file.
5151 * producer.h: New file.
5152 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5153 producer.c.
5154 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5155 producer.h.
5156
5007d765
MK
51572017-09-26 Matthias Klose <doko@ubuntu.com>
5158
5159 * configure.ac: Search ncursesw before ncurses.
5160 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5161 * gdb_curses.h: Include <ncursesw/ncurses.h>
5162 * config.in, configure: Regenerate.
5163
281c4447
RO
51642017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5165
5166 PR gdb/22185
5167 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5168 obsolete.
5169 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5170 Remove i386sol2 support.
5171 * configure.nat <i386sol2>: Remove.
5172 <sol2-64>: Fold into ...
5173 <sol2>: ... this.
5174 Move common settings to default section.
5175 Add sol-thread.o.
5176 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5177 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5178 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5179 <i[34567]86-*-solaris*>: Remove.
5180 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5181
5182 * configure.ac: Remove wctype in libw check.
5183 (_MSE_INT_H): Don't define on Solaris 7-9.
5184 <solaris*>: Remove libthread_db.so.1 check.
5185 * configure: Regenerate.
5186 * config.in: Regenerate.
5187
5188 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5189 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5190 (gdb_ps_size_t): Remove.
5191 Use base types in users.
5192 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5193
5194 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5195
39b06c20
RO
51962017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5197
5198 PR build/22206
5199 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5200 (adi_is_addr_mapped): Likewise.
5201 (PSR_ICC): Don't redefine.
5202 (PSR_IMPL): Likewise.
5203
6c3e20f1
TT
52042017-09-25 Tom Tromey <tom@tromey.com>
5205
5206 * regcache.c (regcache::dump): Use string_printf.
5207
b292235f
TT
52082017-09-25 Tom Tromey <tom@tromey.com>
5209
5210 * regcache.c (class regcache_invalidator): New.
5211 (struct register_to_invalidate): Remove.
5212 (make_cleanup_regcache_invalidate): Remove.
5213 (regcache::raw_write): Use regcache_invalidator.
5214
9ac86b52
TT
52152017-09-25 Tom Tromey <tom@tromey.com>
5216
5217 * spu-tdep.c (spu2ppu_sniffer): Update.
5218 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5219 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5220 Remove.
5221 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5222 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5223 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5224 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5225 (frame_pop): Update.
5226
c0e383c6
TT
52272017-09-25 Tom Tromey <tom@tromey.com>
5228
5229 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5230 * regcache.h (regcache_xfree): Don't declare.
5231 * regcache.c (regcache_xfree): Remove.
5232 (do_regcache_xfree): Use delete.
5233 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5234 * linux-fork.c (free_fork): Use delete.
5235 (fork_save_infrun_state): Likewise.
5236 * jit.c (jit_dealloc_cache): Use delete.
5237 * infrun.c (discard_infcall_suspend_state): Use delete.
5238
791199cc
TT
52392017-09-25 Tom Tromey <tom@tromey.com>
5240
5241 * regcache.h (regcache_xmalloc): Don't declare.
5242 (regcache_raw_set_cached_value): Update comment.
5243 * regcache.c (regcache_xmalloc): Remove.
5244 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5245 * jit.c (jit_frame_sniffer): Use new.
5246 * frame.c (frame_save_as_regcache): Use new.
5247
289e23aa
AA
52482017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5249
5250 * NEWS: Advertise support for guarded-storage registers on IBM z.
5251
1b63490c
AA
52522017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5253
5254 * s390-linux-nat.c (have_regset_gs): New static variable.
5255 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5256 control block and guarded-storage broadcast control regsets.
5257 (s390_read_description): Detect whether the target has
5258 guarded-storage support, return appropriate tdesc.
5259 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5260 (features/s390x-gs-linux64.c): Likewise.
5261 (struct gdbarch_tdep) <have_gs>: New field.
5262 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5263 (s390_gsbc_regset): New variables.
5264 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5265 and s390_gsbc_regset, if applicable.
5266 (s390_core_read_description): Check whether core file was from a
5267 target with guarded-storage support; include appropriate regsets.
5268 (s390_gdbarch_init): Add registers for guarded-storage support.
5269 (_initialize_s390_tdep): Initialize new target descriptions that
5270 include registers for guarded-storage support.
5271 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5272 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5273 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5274 (S390_NUM_REGS): Adjust macro definition.
5275 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5276 (tdesc_s390x_gs_linux64): New declarations.
5277
96235dc1
AA
52782017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5279
5280 * features/s390-gs-linux64.xml: New file.
5281 * features/s390-gs.xml: New file.
5282 * features/s390-gsbc.xml: New file.
5283 * features/s390x-gs-linux64.xml: New file.
5284 * features/Makefile (WHICH): Add s390-gs-linux64 and
5285 s390x-gs-linux64.
5286 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5287 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5288 * features/s390-gs-linux64.c: New generated file.
5289 * features/s390x-gs-linux64.c: New file.
5290 * regformats/s390-gs-linux64.dat: New file.
5291 * regformats/s390x-gs-linux64.dat: New file.
5292
b4a7c699
TT
52932017-09-23 Tom Tromey <tom@tromey.com>
5294
5295 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5296
c2f97536
TT
52972017-09-22 Tom Tromey <tom@tromey.com>
5298
5299 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5300 type to scoped_restore_tmpl.
5301 <scoped_input_handler>: Initialize m_quit_handler directly.
5302
43573013
SDJ
53032017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5304
5305 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5306 (cd_command): Likewise. Free "current_directory" before
5307 assigning to it.
5308 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5309 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5310 * top.c (gdb_dirbuf): Remove global declaration.
5311 * top.h (gdb_dirbuf): Likewise.
5312
6ec2e0f5
SDJ
53132017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5314
5315 * gnulib/aclocal.m4: Regenerate.
5316 * gnulib/config.in: Regenerate.
5317 * gnulib/configure: Regenerate.
5318 * gnulib/import/Makefile.am: Regenerate.
5319 * gnulib/import/Makefile.in: Regenerate.
5320 * gnulib/import/assure.h: New file.
5321 * gnulib/import/at-func.c: Likewise
5322 * gnulib/import/chdir-long.c: New file.
5323 * gnulib/import/chdir-long.h: New file.
5324 * gnulib/import/cloexec.c: New file.
5325 * gnulib/import/cloexec.h: New file.
5326 * gnulib/import/close.c: New file.
5327 * gnulib/import/closedir.c: New file.
5328 * gnulib/import/dirent-private.h: New file.
5329 * gnulib/import/dup-safer.c: New file.
5330 * gnulib/import/dup.c: New file.
5331 * gnulib/import/dup2.c: New file.
5332 * gnulib/import/error.c: New file.
5333 * gnulib/import/error.h: New file.
5334 * gnulib/import/exitfail.c: New file.
5335 * gnulib/import/exitfail.h: New file.
5336 * gnulib/import/fchdir.c: New file.
5337 * gnulib/import/fcntl.c: New file.
5338 * gnulib/import/fcntl.in.h: New file.
5339 * gnulib/import/fd-hook.c: New file.
5340 * gnulib/import/fd-hook.h: New file.
5341 * gnulib/import/fd-safer.c: New file.
5342 * gnulib/import/fdopendir.c: New file.
5343 * gnulib/import/filename.h: New file.
5344 * gnulib/import/filenamecat-lgpl.c: New file.
5345 * gnulib/import/filenamecat.h: New file.
5346 * gnulib/import/fstat.c: New file.
5347 * gnulib/import/fstatat.c: New file.
5348 * gnulib/import/getcwd-lgpl.c: New file.
5349 * gnulib/import/getcwd.c: New file.
5350 * gnulib/import/getdtablesize.c: New file.
5351 * gnulib/import/getlogin_r.c: New file.
5352 * gnulib/import/getprogname.c: New file.
5353 * gnulib/import/getprogname.h: New file.
5354 * gnulib/import/gettext.h: New file.
5355 * gnulib/import/glob-libc.h: New file.
5356 * gnulib/import/glob.c: New file.
5357 * gnulib/import/glob.in.h: New file.
5358 * gnulib/import/intprops.h: New file.
5359 * gnulib/import/m4/chdir-long.m4: New file.
5360 * gnulib/import/m4/close.m4: New file.
5361 * gnulib/import/m4/closedir.m4: New file.
5362 * gnulib/import/m4/d-ino.m4: New file.
5363 * gnulib/import/m4/d-type.m4: New file.
5364 * gnulib/import/m4/dup.m4: New file.
5365 * gnulib/import/m4/dup2.m4: New file.
5366 * gnulib/import/m4/error.m4: New file.
5367 * gnulib/import/m4/fchdir.m4: New file.
5368 * gnulib/import/m4/fcntl.m4: New file.
5369 * gnulib/import/m4/fcntl_h.m4: New file.
5370 * gnulib/import/m4/fdopendir.m4: New file.
5371 * gnulib/import/m4/filenamecat.m4: New file.
5372 * gnulib/import/m4/fstat.m4: New file.
5373 * gnulib/import/m4/fstatat.m4: New file.
5374 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5375 * gnulib/import/m4/getcwd-path-max.m4: New file.
5376 * gnulib/import/m4/getcwd.m4: New file.
5377 * gnulib/import/m4/getdtablesize.m4: New file.
5378 * gnulib/import/m4/getlogin_r.m4: New file.
5379 * gnulib/import/m4/getprogname.m4: New file.
5380 * gnulib/import/m4/glob.m4: New file.
5381 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5382 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5383 * gnulib/import/m4/mempcpy.m4: New file.
5384 * gnulib/import/m4/memrchr.m4: New file.
5385 * gnulib/import/m4/mode_t.m4: New file.
5386 * gnulib/import/m4/msvc-inval.m4: New file.
5387 * gnulib/import/m4/msvc-nothrow.m4: New file.
5388 * gnulib/import/m4/open.m4: New file.
5389 * gnulib/import/m4/openat.m4: New file.
5390 * gnulib/import/m4/opendir.m4: New file.
5391 * gnulib/import/m4/readdir.m4: New file.
5392 * gnulib/import/m4/realloc.m4: New file.
5393 * gnulib/import/m4/rewinddir.m4: New file.
5394 * gnulib/import/m4/save-cwd.m4: New file.
5395 * gnulib/import/m4/strdup.m4: New file.
5396 * gnulib/import/m4/strerror.m4: New file.
5397 * gnulib/import/m4/unistd-safer.m4: New file.
5398 * gnulib/import/mempcpy.c: New file.
5399 * gnulib/import/memrchr.c: New file.
5400 * gnulib/import/msvc-inval.c: New file.
5401 * gnulib/import/msvc-inval.h: New file.
5402 * gnulib/import/msvc-nothrow.c: New file.
5403 * gnulib/import/msvc-nothrow.h: New file.
5404 * gnulib/import/open.c: New file.
5405 * gnulib/import/openat-die.c: New file.
5406 * gnulib/import/openat-priv.h: New file.
5407 * gnulib/import/openat-proc.c: New file.
5408 * gnulib/import/openat.c: New file.
5409 * gnulib/import/openat.h: New file.
5410 * gnulib/import/opendir.c: New file.
5411 * gnulib/import/pipe-safer.c: New file.
5412 * gnulib/import/readdir.c: New file.
5413 * gnulib/import/realloc.c: New file.
5414 * gnulib/import/rewinddir.c: New file.
5415 * gnulib/import/save-cwd.c: New file.
5416 * gnulib/import/save-cwd.h: New file.
5417 * gnulib/import/strdup.c: New file.
5418 * gnulib/import/strerror-override.c: New file.
5419 * gnulib/import/strerror-override.h: New file.
5420 * gnulib/import/strerror.c: New file.
5421 * gnulib/import/unistd--.h: New file.
5422 * gnulib/import/unistd-safer.h: New file.
5423 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5424 "getcwd" and "glob".
5425 * ser-tcp.c: Undefine "close" before redefining it.
5426
432ae719
SM
54272017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5428
5429 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5430 get rid of res_val.
5431
4fa7574e
RO
54322017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5433
5434 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5435 <sol2,sparc>: Likewise.
5436 <sol2-64,i386>: Likewise.
5437
5438 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5439 -Wdeprecated-declarations on *-*-solaris*.
5440 * configure: Regenerate.
5441
5442 * procfs.c: Include "nat/inferior.h".
5443 (procfs_info_proc): Fix typo.
5444
f6327dcb
KB
54452017-09-21 Kevin Buettner <kevinb@redhat.com>
5446
5447 * remote.c (vector): Include.
5448 (struct private_thread_info): Add field, thread_handle.
5449 (free_private_thread_info): Deallocate storage associated with
5450 thread handle.
5451 (get_private_info_thread): Initialize `thread_handle' field.
5452 (struct thread_item): Add field, thread_handle.
5453 (clear_threads_listing_context): Deallocate storage associated
5454 with thread handle.
5455 (start_thread): Add support for "handle" attribute.
5456 (thread_attributes): Add "handle".
5457 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5458 field.
5459 (remote_update_thread_list): Update thread_handle.
5460 (remote_thread_handle_to_thread_info): New function.
5461 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5462
fbbe5337
KB
54632017-09-21 Kevin Buettner <kevinb@redhat.com>
5464
5465 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5466 function.
5467 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5468 * python/python-internal.h (thread_object_type): Declare.
5469
e04ee09e
KB
54702017-09-21 Kevin Buettner <kevinb@redhat.com>
5471
5472 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5473 (target_thread_handle_to_thread_info): Declare.
5474 * target.c (target_thread_handle_to_thread_info): New function.
5475 * target-delegates.c: Regenerate.
5476 * gdbthread.h (find_thread_by_handle): Declare.
5477 * thread.c (find_thread_by_handle): New function.
5478 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5479 function.
5480 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5481
1e5b66ed
SM
54822017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5483
5484 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5485
ebe48ba0
SM
54862017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5487
5488 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5489
0a0bf5dc
YQ
54902017-09-21 Yao Qi <yao.qi@linaro.org>
5491
5492 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5493 to gdb_target_obs.
5494
d1b0a7bf
TT
54952017-09-20 Tom Tromey <tom@tromey.com>
5496
5497 * breakpoint.c (struct counted_command_line): Remove.
5498 (breakpoint_commands): Update.
5499 (alloc_counted_command_line, incref_counted_command_line)
5500 (decref_counted_command_line, do_cleanup_counted_command_line)
5501 (make_cleanup_decref_counted_command_line): Remove.
5502 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5503 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5504 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5505 (save_breakpoints): Update.
5506 * breakpoint.h (counted_command_line): Now a typedef to
5507 shared_ptr.
5508 (struct breakpoint) <commands>: Now a counted_command_line.
5509 (struct bpstats) <command>: Likewise.
5510
48649e1b
TT
55112017-09-20 Tom Tromey <tom@tromey.com>
5512
5513 * breakpoint.c (struct commands_info, do_map_commands_command):
5514 Remove.
5515 (commands_command_1): Update.
5516 (iterate_over_related_breakpoints): Take a function_view.
5517 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5518 (delete_command): Update.
5519 (map_breakpoint_numbers): Take a function_view.
5520 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5521 (disable_command): Update.
5522 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5523 (enable_command): Update.
5524 (struct disp_data, do_enable_breakpoint_disp)
5525 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5526 (do_map_enable_delete_breakpoint): Remove.
5527 (enable_once_command, enable_count_command, enable_delete_command)
5528 (delete_trace_variable_command): Update.
5529
04afa70c
TT
55302017-09-20 Tom Tromey <tom@tromey.com>
5531
5532 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5533 (bpstat_clear): Use delete.
5534 (bpstats): New constructors.
5535 (bpstat_copy, bpstat_stop_status): Use new.
5536 (dprintf_after_condition_true): Update.
5537 * breakpoint.h (bpstats::bpstats): Add constructors.
5538 (bpstats::~bpstats): Add destructor.
5539
c83833f4
PA
55402017-09-20 Pedro Alves <palves@redhat.com>
5541
5542 * eval.c (make_params): Delete, refactored as ...
5543 (class fake_method): ... this new type's ctor.
5544 (fake_method::~fake_method): New.
5545 (evaluate_subexp_standard): Use 'fake_method'.
5546
223ffa71
TT
55472017-09-20 Tom Tromey <tom@tromey.com>
5548
5549 * windows-nat.c (get_windows_debug_event, windows_wait)
5550 (do_initial_windows_stuff, windows_attach): Update.
5551 * utils.c (vwarning, internal_vproblem): Update.
5552 (ui_unregister_input_event_handler_cleanup)
5553 (prepare_to_handle_input): Remove.
5554 (class scoped_input_handler): New.
5555 (defaulted_query, prompt_for_continue): Update.
5556 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5557 Update.
5558 * top.c (undo_terminal_modifications_before_exit): Update.
5559 * target/target.h (target_terminal_init, target_terminal_inferior)
5560 (target_terminal_ours): Don't declare.
5561 (class target_terminal): New.
5562 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5563 (target_terminal_ours_for_output)
5564 (make_cleanup_restore_target_terminal): Don't declare.
5565 (target_terminal_info): Remove.
5566 * target.c (enum terminal_state, terminal_state): Remove.
5567 (target_terminal::terminal_state): Define.
5568 (target_terminal::init): Rename from target_terminal_init.
5569 (target_terminal::inferior): Rename from
5570 target_terminal_inferior.
5571 (target_terminal::ours): Rename from target_terminal_ours.
5572 (target_terminal::ours_for_output): Rename from
5573 target_terminal_ours_for_output.
5574 (target_terminal::info): New method.
5575 (cleanup_restore_target_terminal)
5576 (make_cleanup_restore_target_terminal): Remove.
5577 * solib.c (handle_solib_event): Update.
5578 * remote.c (remote_serial_quit_handler): Update.
5579 (remote_terminal_inferior, remote_wait_as): Update.
5580 * record-full.c (record_full_wait_1): Update.
5581 * nto-procfs.c (procfs_create_inferior): Update.
5582 * nat/fork-inferior.c (startup_inferior): Update.
5583 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5584 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5585 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5586 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5587 (mi_breakpoint_created, mi_breakpoint_deleted)
5588 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5589 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5590 (mi_user_selected_context_changed, report_initial_inferior):
5591 Update.
5592 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5593 (linux_nat_terminal_inferior): Update.
5594 * infrun.c (follow_fork_inferior)
5595 (handle_vfork_child_exec_or_exit, do_target_resume)
5596 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5597 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5598 Update.
5599 * inflow.c (child_terminal_init, info_terminal_command): Update.
5600 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5601 (attach_command): Update.
5602 * infcall.c (call_thread_fsm_should_stop): Update.
5603 * gnu-nat.c (gnu_attach): Update.
5604 * extension.c (struct active_ext_lang_state)
5605 (restore_active_ext_lang): Update.
5606 * exceptions.c (print_flush): Update.
5607 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5608 (struct quit_handler_cleanup_data, restore_quit_handler)
5609 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5610 Remove.
5611 * cp-support.c (gdb_demangle): Update.
5612 * breakpoint.c (update_inserted_breakpoint_locations)
5613 (insert_breakpoint_locations, handle_jit_event)
5614 (disable_breakpoints_in_unloaded_shlib): Update.
5615 * annotate.c (annotate_breakpoints_invalid)
5616 (annotate_frames_invalid): Update.
5617
013af3fc
TT
56182017-09-20 Tom Tromey <tom@tromey.com>
5619
5620 * main.c (catch_command_errors): Rename from
5621 catch_command_errors_const.
5622 (captured_main_1): Update.
5623
06871ae8
PA
56242017-09-20 Pedro Alves <palves@redhat.com>
5625
5626 * cli/cli-cmds.c (list_command): Use print_sal_location.
5627 (print_sal_location): New function.
5628 (ambiguous_line_spec): Use print_sal_location.
5629 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5630 * symtab.c (find_function_start_sal): Likewise.
5631 * symtab.h (symtab_and_line::symbol): New field.
5632
e5f25bc5
PA
56332017-09-20 Pedro Alves <palves@redhat.com>
5634
5635 * linespec.c (minsym_found): Handle non-text minsyms.
5636 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5637
1b7fa39e
WT
56382017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5639
5640 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5641 backslash.
5642
37dd0825
WT
56432017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5644
5645 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5646 vmovups instead vmovaps.
5647 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5648
4e5a4f58
JB
56492017-09-19 John Baldwin <jhb@FreeBSD.org>
5650
5651 * NEWS (Changes since GDB 8.0): Add starti.
5652 * infcmd.c (enum run_break): New.
5653 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5654 case.
5655 (run_command): Use enum run_how.
5656 (start_command): Likewise.
5657 (starti_command): New function.
5658 (RUN_ARGS_HELP): New macro.
5659 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5660 commands. Add starti command.
5661
aa70c9f1
YQ
56622017-09-19 Yao Qi <yao.qi@linaro.org>
5663
5664 * Makefile.in (monitor.o): Remove the rule.
5665
d6541620
YQ
56662017-09-19 Yao Qi <yao.qi@linaro.org>
5667
5668 * annotate.h (struct annotate_arg_emitter): Use
5669 DISABLE_COPY_AND_ASSIGN.
5670 * common/refcounted-object.h (refcounted_object): Likewise.
5671 * completer.h (struct completion_result): Likewise.
5672 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5673 * filename-seen-cache.h (filename_seen_cache): Likewise.
5674 * gdbcore.h (thread_section_name): Likewise.
5675 * gdb_regex.h (compiled_regex): Likewise.
5676 * gdbthread.h (scoped_restore_current_thread): Likewise.
5677 * inferior.h (scoped_restore_current_inferior): Likewise.
5678 * jit.c (jit_reader): Likewise.
5679 * linespec.h (struct linespec_result): Likewise.
5680 * mi/mi-parse.h (struct mi_parse): Likewise.
5681 * nat/fork-inferior.c (execv_argv): Likewise.
5682 * progspace.h (scoped_restore_current_program_space): Likewise.
5683 * python/python-internal.h (class gdbpy_enter): Likewise.
5684 * regcache.h (regcache): Likewise.
5685 * target-descriptions.c (struct tdesc_reg): Likewise.
5686 (struct tdesc_type): Likewise.
5687 (struct tdesc_feature): Likewise.
5688 * ui-out.h (ui_out_emit_type): Likewise.
5689
0615127c
SM
56902017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5691
5692 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5693 label abort_expression.
5694
5e187554
SM
56952017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5696
5697 * common/buffer.c (buffer_xml_printf): Adjust.
5698 * common/xml-utils.c (xml_escape_text): Change return type to
5699 std::string, update code accordingly.
5700 * common/xml-utils.h (xml_escape_text): Change return type to
5701 std::string.
5702 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5703 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5704 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5705 Adjust.
5706
c3d7b541
SM
57072017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5708
5709 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5710 (SUBDIR_UNITTESTS_OBS): Add new object file.
5711 * unittests/xml-utils-selftests.c: New file.
5712
1526853e
SM
57132017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5714
5715 * common/selftest.h (selftest): New struct/interface.
5716 (register_test): Add name parameter, add new overload.
5717 (run_tests): Add filter parameter.
5718 (for_each_selftest_ftype): New typedef.
5719 (for_each_selftest): New declaration.
5720 * common/selftest.c (tests): Change type to
5721 map<string, unique_ptr<selftest>>.
5722 (simple_selftest): New struct.
5723 (register_test): New function.
5724 (register_test): Add name parameter and use it.
5725 (run_tests): Add filter parameter and use it. Add prints.
5726 Adjust to vector -> map change.
5727 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5728 registering selftests.
5729 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5730 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5731 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5732 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5733 * findvar.c (_initialize_findvar): Likewise.
5734 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5735 * maint.c (maintenance_selftest): Update call to run_tests.
5736 (maintenance_info_selftests): New function.
5737 (_initialize_maint_cmds): Register "maintenance info selftests"
5738 command. Update "maintenance selftest" doc.
5739 * regcache.c (_initialize_regcache): Add names when registering
5740 selftests.
5741 * rust-exp.y (_initialize_rust_exp): Likewise.
5742 * selftest-arch.c (gdbarch_selftest): New struct.
5743 (gdbarch_tests): Remove.
5744 (register_test_foreach_arch): Add name parameter. Call
5745 register_test.
5746 (tests_with_arch): Remove, move most content to
5747 gdbarch_selftest::operator().
5748 (_initialize_selftests_foreach_arch): Remove.
5749 * selftest-arch.h (register_test_foreach_arch): Add name
5750 parameter.
5751 (run_tests_with_arch): New declaration.
5752 * utils-selftests.c (_initialize_utils_selftests): Add names
5753 when registering selftests.
5754 * utils.c (_initialize_utils): Likewise.
5755 * unittests/array-view-selftests.c
5756 (_initialize_array_view_selftests): Likewise.
5757 * unittests/environ-selftests.c (_initialize_environ_selftests):
5758 Likewise.
5759 * unittests/function-view-selftests.c
5760 (_initialize_function_view_selftests): Likewise.
5761 * unittests/offset-type-selftests.c
5762 (_initialize_offset_type_selftests): Likewise.
5763 * unittests/optional-selftests.c
5764 (_initialize_optional_selftests): Likewise.
5765 * unittests/scoped_restore-selftests.c
5766 (_initialize_scoped_restore_selftests): Likewise.
5767 * NEWS: Document "maintenance selftest" and "maint info
5768 selftests".
5769
5846367a
SM
57702017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5771
5772 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5773 scoped_restore.
5774
bd77e8ff
SM
57752017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5776
5777 * mi/mi-main.c (mi_load_progress): Make uiout variable
5778 a unique_ptr.
5779
26a67918
PA
57802017-09-15 Pedro Alves <palves@redhat.com>
5781
5782 * compile/compile-c-types.c (convert_enum, convert_int)
5783 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5784
3f8a7804
SM
57852017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5786
5787 * dwarf2read.c (copy_string): Remove.
5788 (parse_macro_definition): Replace copy_string with savestring.
5789
8d200706
YQ
57902017-09-15 Yao Qi <yao.qi@linaro.org>
5791
5792 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5793 gdb_target_obs.
5794 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5795 Likewise.
5796 (i[34567]86-*-linux*): Likewise.
5797
d185219d
SM
57982017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5799
5800 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5801 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5802 <stack>: Change type to std::vector.
5803 <stack_len, stack_allocated>: Remove.
5804 <grow_stack>: Remove.
5805 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5806 (dwarf_expr_context::~dwarf_expr_context): Remove.
5807 (dwarf_expr_context::grow_stack): Remove.
5808 (dwarf_expr_context::push): Adjust.
5809 (dwarf_expr_context::pop): Adjust.
5810 (dwarf_expr_context::fetch): Adjust.
5811 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5812 (dwarf_expr_context::stack_empty_p): Adjust.
5813 (dwarf_expr_context::execute_stack_op): Adjust.
5814
eccd80d6
SM
58152017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5816
5817 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5818 return type to bool.
5819 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5820
69009882
SM
58212017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5822
5823 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5824 Change type to bool.
5825 (dwarf_stack_value) <in_stack_memory>: Likewise.
5826 (dwarf_expr_context) <push_address>: Change parameter type to
5827 bool.
5828 <fetch_in_stack_memory>: Change return type to bool.
5829 <push>: Change parameter type to bool.
5830 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5831 to bool.
5832 (dwarf_expr_context::push_address): Likewise.
5833 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5834 to bool.
5835 (dwarf_expr_context::execute_stack_op): Adjust.
5836 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5837
1e467161
SM
58382017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5839
5840 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5841 (struct dwarf_expr_context) <n_pieces>: Remove.
5842 <pieces>: Change type to std::vector.
5843 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5844 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5845 pieces.
5846 (dwarf_expr_context::add_piece): Adjust.
5847 * dwarf2loc.c (struct piece_closure): Initialize fields.
5848 <n_pieces>: Remove.
5849 <pieces>: Change type to std::vector.
5850 (allocate_piece_closure): Adjust, change parameter to
5851 std::vector rvalue and std::move it to piece_closure.
5852 (rw_pieced_value): Adjust.
5853 (check_pieced_synthetic_pointer): Adjust.
5854 (indirect_synthetic_pointer): Adjust.
5855 (coerce_pieced_ref): Adjust.
5856 (free_pieced_value_closure): Adjust. Use delete to free
5857 piece_closure.
5858 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5859 to allocate_piece_closure.
5860 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5861
0782db84
SM
58622017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5863
5864 * probe.h (probe_ops_cp): Remove typedef.
5865 (DEF_VEC_P (probe_ops_cp)): Remove.
5866 (all_probe_ops): Change type to std::vector.
5867 * probe.c (info_probes_for_ops): Adjust to vector change.
5868 (probe_linespec_to_ops): Likewise.
5869 (all_probe_ops): Change type to std::vector.
5870 (_initialize_probe): Adjust to vector change.
5871 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5872 * elfread.c (elf_get_probes): Likewise.
5873 * stap-probe.c (_initialize_stap_probe): Likewise.
5874
1eac6bea
SM
58752017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5876
5877 * probe.h (struct bound_probe): Define constructors.
5878 * probe.c (bound_probe_s): Remove typedef.
5879 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5880 (collect_probes): Change return type to std::vector, remove
5881 cleanup.
5882 (compare_probes): Return bool, change parameter type. Change
5883 semantic to "less than".
5884 (gen_ui_out_table_header_info): Change parameter to std::vector
5885 and update.
5886 (exists_probe_with_pops): Likewise.
5887 (info_probes_for_ops): Update to std::vector change.
5888 (enable_probes_command): Likewise.
5889 (disable_probes_command): Likewise.
5890
aaa63a31
SM
58912017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5892
5893 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5894 vec to std::vector.
5895 * probe.c (parse_probes_in_pspace): Update.
5896 (find_probes_in_objfile): Update.
5897 (find_probe_by_pc): Update.
5898 (collect_probes): Update.
5899 (probe_any_get_probes): Update.
5900 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5901 return type to reference to std::vector.
5902 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5903 std::vector and update.
5904 (dtrace_process_dof): Likewise.
5905 (dtrace_get_probes): Likewise.
5906 * elfread.c (elf_get_probes): Change return type to std::vector,
5907 store an std::vector in bfd_data.
5908 (probe_key_free): Update to std::vector.
5909 * stap-probe.c (handle_stap_probe): Change parameter to
5910 std::vector and update.
5911 (stap_get_probes): Likewise.
5912 * symfile-debug.c (debug_sym_get_probes): Change return type to
5913 std::vector and update.
5914
cb85b21b
TT
59152017-09-11 Tom Tromey <tom@tromey.com>
5916
5917 * breakpoint.c (program_breakpoint_here_p): Update.
5918 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5919 from make_show_memory_breakpoints_cleanup. Return a
5920 scoped_restore_tmpl<int>.
5921 (restore_show_memory_breakpoints): Remove.
5922 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5923 * mem-break.c (memory_validate_breakpoint): Update.
5924 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5925 (ia64_memory_remove_breakpoint): Update.
5926 (ia64_breakpoint_from_pc): Update.
5927 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5928 from make_show_memory_breakpoints_cleanup.
5929
8fbc99ef
TT
59302017-09-11 Tom Tromey <tom@tromey.com>
5931
5932 * d-namespace.c (d_lookup_symbol): Use std::string.
5933 (find_symbol_in_baseclass): Likewise.
5934
50feb4bd
TT
59352017-09-11 Tom Tromey <tom@tromey.com>
5936
5937 * ctf.c (ctf_start): Use std::string.
5938
c6dc63a1
TT
59392017-09-11 Tom Tromey <tom@tromey.com>
5940
5941 * ada-lang.c (is_known_support_routine): Update.
5942 (ada_unhandled_exception_name_addr_from_raise): Update.
5943 * guile/scm-frame.c (gdbscm_frame_name): Update.
5944 * python/py-frame.c (frapy_name): Update.
5945 (frapy_function): Update.
5946 * stack.h (find_frame_funname): Update.
5947 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5948 (print_frame): Update.
5949
d6b9b80f
TT
59502017-09-11 Tom Tromey <tom@tromey.com>
5951
5952 * findcmd.c (put_bits): Take a gdb::byte_vector.
5953 (parse_find_args): Return gdb::byte_vector. "args" now const.
5954 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5955 cleanups.
5956 (find_command): Update.
5957
a9921622
TT
59582017-09-11 Tom Tromey <tom@tromey.com>
5959
5960 * cli/cli-script.c (class scoped_restore_hook_in): New.
5961 (clear_hook_in_cleanup): Remove.
5962 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5963 scoped_restore_hook_in.
5964
be0d7abb
TT
59652017-09-11 Tom Tromey <tom@tromey.com>
5966
5967 * cli/cli-script.c (restore_interp): Remove.
5968 (read_command_lines): Use scoped_restore_interp.
5969 * interps.c (scoped_restore_interp::set_temp): Rename from
5970 interp_set_temp.
5971 * interps.h (class scoped_restore_interp): New.
5972 (interp_set_temp): Remove.
5973
00f675ff
TT
59742017-09-11 Tom Tromey <tom@tromey.com>
5975
5976 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5977 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5978 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5979 scoped_restore.
5980 (mi_cmd_break_insert_1): Update.
5981 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5982 scoped_restore.
5983
cb791d59
TT
59842017-09-11 Tom Tromey <tom@tromey.com>
5985
5986 * demangle.c (demangle_command): Update.
5987 * breakpoint.c (disable_command): Update.
5988 (enable_command): Update.
5989 (find_location_by_number): Make "number" const. Use
5990 get_number_trailer.
5991 * cli/cli-utils.c (extract_arg): Return std::string.
5992 * probe.c (parse_probe_linespec): Update. Change types.
5993 (collect_probes): Take string arguments.
5994 (parse_probe_linespec): Likewise.
5995 (info_probes_for_ops): Update.
5996 (enable_probes_command): Update.
5997 (disable_probes_command): Update.
5998 * break-catch-sig.c (catch_signal_split_args): Update.
5999 * mi/mi-parse.c (mi_parse): Update.
6000
2039bd9f
TT
60012017-09-11 Tom Tromey <tom@tromey.com>
6002
6003 * language.h (language_enum): Make argument const.
6004 * language.c (language_enum): Make argument const.
6005
f1735a53
TT
60062017-09-11 Tom Tromey <tom@tromey.com>
6007
6008 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6009 as function.
6010 (skip_to_space): Rename from skip_to_space_const.
6011 * common/common-utils.c (skip_to_space): New function.
6012 (skip_to_space): Rename from skip_to_space_const.
6013 * cli/cli-utils.h (get_number): Rename from get_number_const.
6014 (extract_arg): Rename from extract_arg_const.
6015 * cli/cli-utils.c (get_number): Rename from get_number_const.
6016 (extract_arg): Rename from extract_arg_const.
6017 (number_or_range_parser::get_number): Use ::get_number.
6018 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6019 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6020 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6021 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6022 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6023 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6024 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6025 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6026
7d221d74
TT
60272017-09-11 Tom Tromey <tom@tromey.com>
6028
6029 * python/python.c (do_start_initialization): Use
6030 py-event-types.def to initialize types.
6031 Define all object type structures.
6032 * python/python-internal.h: Don't declare event initialization
6033 functions.
6034 * python/py-threadevent.c (thread_event_object_type): Don't
6035 define.
6036 * python/py-stopevent.c (stop_event_object_type): Don't define.
6037 * python/py-signalevent.c (signal_event_object_type): Don't
6038 declare or define.
6039 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6040 (clear_objfiles_event_object_type): Don't declare or define.
6041 * python/py-infevents.c (inferior_call_pre_event_object_type)
6042 (inferior_call_post_event_object_type)
6043 (register_changed_event_object_type)
6044 (memory_changed_event_object_type): Don't declare or define.
6045 * python/py-inferior.c (new_thread_event_object_type)
6046 (new_inferior_event_object_type)
6047 (inferior_deleted_event_object_type): Don't declare or define.
6048 * python/py-exitedevent.c (exited_event_object_type): Don't
6049 declare or define.
6050 * python/py-evts.c (gdbpy_initialize_py_events): Use
6051 py-all-events.def.
6052 * python/py-events.h (thread_event_object_type): Don't declare.
6053 (events_object): Use py-all-events.def.
6054 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6055 py-event-types.def.
6056 * python/py-event-types.def: New file.
6057 * python/py-continueevent.c (create_continue_event_object): Don't
6058 declare or define.
6059 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6060 declare or define.
6061 * python/py-all-events.def: New file.
6062
35c61a1d
TT
60632017-09-11 Tom Tromey <tom@tromey.com>
6064
6065 * python/py-threadevent.c (create_thread_event_object): Return
6066 gdbpy_ref.
6067 * python/py-stopevent.h (create_stop_event_object)
6068 (create_breakpoint_event_object, create_signal_event_object):
6069 Update.
6070 * python/py-stopevent.c (create_stop_event_object): Return
6071 gdbpy_ref.
6072 (emit_stop_event): Update.
6073 * python/py-signalevent.c (create_signal_event_object): Return
6074 gdbpy_ref.
6075 * python/py-infevents.c (create_inferior_call_event_object):
6076 Update.
6077 * python/py-event.h (create_event_object)
6078 (create_thread_event_object): Update.
6079 * python/py-event.c (create_event_object): Return gdbpy_ref.
6080 * python/py-continueevent.c: Return gdbpy_ref.
6081 * python/py-bpevent.c (create_breakpoint_event_object): Return
6082 gdbpy_ref.
6083
7c96f8c1
TT
60842017-09-11 Tom Tromey <tom@tromey.com>
6085
6086 PR python/15622:
6087 * NEWS: Add entry.
6088 * python/python.c (do_start_initialization): Initialize new event
6089 types.
6090 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6091 (gdbpy_initialize_inferior_deleted_event)
6092 (gdbpy_initialize_new_thread_event): Declare.
6093 * python/py-threadevent.c (create_thread_event_object): Add option
6094 "thread" parameter.
6095 * python/py-inferior.c (new_thread_event_object_type)
6096 (new_inferior_event_object_type)
6097 (inferior_deleted_event_object_type): Declare.
6098 (python_new_inferior, python_inferior_deleted): New functions.
6099 (add_thread_object): Emit new_thread event.
6100 (gdbpy_initialize_inferior): Attach new functions to corresponding
6101 observers.
6102 (new_thread, new_inferior, inferior_deleted): Define new event
6103 types.
6104 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6105 registries.
6106 * python/py-events.h (events_object) <new_inferior,
6107 inferior_deleted, new_thread>: New fields.
6108 * python/py-event.h (create_thread_event_breakpoint): Add optional
6109 "thread" parameter.
6110
72542b8e
AB
61112017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6112
6113 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6114 check current_ui instead.
6115 (internal_vproblem): Likewise.
6116
0d64823e
SM
61172017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6118
6119 * thread.c (print_thread_info_1): Remove unnecessary calls to
6120 uiout->is_mi_like_p.
6121
eb1e02fd
TT
61222017-09-09 Tom Tromey <tom@tromey.com>
6123
6124 * namespace.h (add_using_directive): Update.
6125 * namespace.c (add_using_directive): Change type of excludes to
6126 std::vector.
6127 * dwarf2read.c (read_import_statement): Use std::vector.
6128 (read_namespace): Update.
6129 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6130
0fc21fd8
TT
61312017-09-09 Tom Tromey <tom@tromey.com>
6132
6133 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6134
49663d05
TT
61352017-09-09 Tom Tromey <tom@tromey.com>
6136
6137 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6138
0b868b60
TT
61392017-09-09 Tom Tromey <tom@tromey.com>
6140
6141 * stack.c (func_command): Use gdb::def_vector.
6142
c0470d48
TT
61432017-09-09 Tom Tromey <tom@tromey.com>
6144
6145 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6146 ui_out_emit_list, ui_out_emit_tuple.
6147 (mi_cmd_var_update): Likewise.
6148
ca5909c7
TT
61492017-09-09 Tom Tromey <tom@tromey.com>
6150
6151 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6152 ui_out_redirect_pop.
6153 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6154 ui_out_redirect_pop.
6155 * utils.c (do_ui_out_redirect_pop)
6156 (make_cleanup_ui_out_redirect_pop): Remove.
6157 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6158 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6159 * ui-out.h (ui_out_redirect_pop): New class.
6160
e6a2252a
TT
61612017-09-09 Tom Tromey <tom@tromey.com>
6162
6163 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6164 (list_available_thread_groups, mi_cmd_list_thread_groups)
6165 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6166 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6167 Likewise.
6168
393702cd
TT
61692017-09-09 Tom Tromey <tom@tromey.com>
6170
6171 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6172 ui_out_emit_tuple.
6173
76f9c9cf
TT
61742017-09-09 Tom Tromey <tom@tromey.com>
6175
6176 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6177 * stack.c (print_frame): Use ui_out_emit_tuple.
6178 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6179 (info_spu_mailbox_command, info_spu_dma_command)
6180 (info_spu_proxydma_command): Likewise.
6181 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6182 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6183 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6184 ui_out_emit_tuple.
6185 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6186
dc9fe180
TT
61872017-09-09 Tom Tromey <tom@tromey.com>
6188
6189 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6190 (class ui_out_emit_table): Update comment.
6191 * ui-out.c (do_cleanup_table_end)
6192 (make_cleanup_ui_out_table_begin_end): Remove.
6193 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6194 (info_spu_dma_cmdlist): Likewise.
6195 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6196 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6197 ui_out_emit_table.
6198
f8cc3da6
TT
61992017-09-09 Tom Tromey <tom@tromey.com>
6200
6201 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6202 ui_out_emit_list, gdb::optional.
6203
481695ed
JB
62042017-09-09 John Baldwin <jhb@FreeBSD.org>
6205
6206 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6207 prototype.
6208 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6209 prototype.
6210 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6211 prototype.
6212 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6213 * ada-exp.y: Remove _initialize_ada_exp prototype.
6214 * ada-lang.c: Remove _initialize_ada_language prototype.
6215 * ada-tasks.c: Remove _initialize_tasks prototype.
6216 * addrmap.c: Remove _initialize_addrmap prototype.
6217 * agent.c: Remove _initialize_agent prototype.
6218 * aix-thread.c: Remove _initialize_aix_thread prototype.
6219 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6220 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6221 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6222 prototype.
6223 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6224 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6225 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6226 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6227 prototype.
6228 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6229 prototype.
6230 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6231 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6232 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6233 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6234 prototype.
6235 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6236 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6237 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6238 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6239 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6240 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6241 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6242 prototype.
6243 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6244 prototype.
6245 * annotate.c: Remove _initialize_annotate prototype.
6246 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6247 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6248 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6249 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6250 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6251 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6252 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6253 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6254 prototype.
6255 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6256 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6257 * auto-load.c: Remove _initialize_auto_load prototype.
6258 * auxv.c: Remove _initialize_auxv prototype.
6259 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6260 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6261 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6262 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6263 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6264 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6265 prototype.
6266 * break-catch-throw.c: Remove _initialize_break_catch_throw
6267 prototype.
6268 * breakpoint.c: Remove _initialize_breakpoint prototype.
6269 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6270 * btrace.c: Remove _initialize_btrace prototype.
6271 * charset.c: Remove _initialize_charset prototype.
6272 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6273 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6274 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6275 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6276 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6277 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6278 * coffread.c: Remove _initialize_coffread prototype.
6279 * compile/compile.c: Remove _initialize_compile prototype.
6280 * complaints.c: Remove _initialize_complaints prototype.
6281 * completer.c: Remove _initialize_completer prototype.
6282 * copying.awk: Remove _initialize_copying prototype.
6283 * copying.c: Regenerate.
6284 * core-regset.c: Remove _initialize_core_regset prototype.
6285 * corefile.c: Remove _initialize_core prototype.
6286 * corelow.c: Remove _initialize_corelow prototype.
6287 * cp-abi.c: Remove _initialize_cp_abi prototype.
6288 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6289 * cp-support.c: Remove _initialize_cp_support prototype.
6290 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6291 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6292 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6293 * ctf.c: Remove _initialize_ctf prototype.
6294 * d-lang.c: Remove _initialize_d_language prototype.
6295 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6296 prototype.
6297 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6298 * dbxread.c: Remove _initialize_dbxread prototype.
6299 * dcache.c: Remove _initialize_dcache prototype.
6300 * demangle.c: Remove _initialize_demangler prototype.
6301 * disasm-selftests.c: Remove _initialize_disasm_selftests
6302 prototype.
6303 * disasm.c: Remove _initialize_disasm prototype.
6304 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6305 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6306 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6307 prototype.
6308 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6309 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6310 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6311 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6312 * elfread.c: Remove _initialize_elfread prototype.
6313 * exec.c: Remove _initialize_exec prototype.
6314 * extension.c: Remove _initialize_extension prototype.
6315 * f-lang.c: Remove _initialize_f_language prototype.
6316 * f-valprint.c: Remove _initialize_f_valprint prototype.
6317 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6318 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6319 * filesystem.c: Remove _initialize_filesystem prototype.
6320 * findcmd.c: Remove _initialize_mem_search prototype.
6321 * fork-child.c: Remove _initialize_fork_child prototype.
6322 * frame-base.c: Remove _initialize_frame_base prototype.
6323 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6324 * frame.c: Remove _initialize_frame prototype.
6325 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6326 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6327 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6328 * gcore.c: Remove _initialize_gcore prototype.
6329 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6330 * gdbarch.c: Regenerate.
6331 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6332 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6333 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6334 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6335 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6336 * go-lang.c: Remove _initialize_go_language prototype.
6337 * go32-nat.c: Remove _initialize_go32_nat prototype.
6338 * guile/guile.c: Remove _initialize_guile prototype.
6339 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6340 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6341 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6342 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6343 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6344 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6345 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6346 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6347 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6348 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6349 prototype.
6350 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6351 prototype.
6352 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6353 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6354 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6355 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6356 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6357 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6358 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6359 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6360 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6361 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6362 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6363 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6364 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6365 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6366 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6367 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6368 prototype.
6369 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6370 prototype.
6371 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6372 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6373 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6374 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6375 * infcall.c: Remove _initialize_infcall prototype.
6376 * infcmd.c: Remove _initialize_infcmd prototype.
6377 * inferior.c: Remove _initialize_inferiors prototype.
6378 * inflow.c: Remove _initialize_inflow prototype.
6379 * infrun.c: Remove _initialize_infrun prototype.
6380 * interps.c: Remove _initialize_interpreter prototype.
6381 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6382 * jit.c: Remove _initialize_jit prototype.
6383 * language.c: Remove _initialize_language prototype.
6384 * linux-fork.c: Remove _initialize_linux_fork prototype.
6385 * linux-nat.c: Remove _initialize_linux_nat prototype.
6386 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6387 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6388 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6389 * m2-lang.c: Remove _initialize_m2_language prototype.
6390 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6391 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6392 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6393 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6394 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6395 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6396 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6397 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6398 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6399 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6400 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6401 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6402 * machoread.c: Remove _initialize_machoread prototype.
6403 * macrocmd.c: Remove _initialize_macrocmd prototype.
6404 * macroscope.c: Remove _initialize_macroscope prototype.
6405 * maint.c: Remove _initialize_maint_cmds prototype.
6406 * mdebugread.c: Remove _initialize_mdebugread prototype.
6407 * memattr.c: Remove _initialize_mem prototype.
6408 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6409 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6410 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6411 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6412 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6413 * microblaze-linux-tdep.c: Remove
6414 _initialize_microblaze_linux_tdep prototype.
6415 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6416 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6417 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6418 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6419 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6420 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6421 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6422 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6423 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6424 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6425 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6426 prototype.
6427 * mipsread.c: Remove _initialize_mipsread prototype.
6428 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6429 prototype.
6430 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6431 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6432 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6433 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6434 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6435 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6436 prototype.
6437 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6438 * nto-procfs.c: Remove _initialize_procfs prototype.
6439 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6440 * objc-lang.c: Remove _initialize_objc_language prototype.
6441 * objfiles.c: Remove _initialize_objfiles prototype.
6442 * observer.c: Remove observer_test_first_notification_function,
6443 observer_test_second_notification_function,
6444 observer_test_third_notification_function, and
6445 _initialize_observer prototypes.
6446 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6447 * osabi.c: Remove _initialize_gdb_osabi prototype.
6448 * osdata.c: Remove _initialize_osdata prototype.
6449 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6450 * parse.c: Remove _initialize_parse prototype.
6451 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6452 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6453 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6454 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6455 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6456 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6457 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6458 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6459 * printcmd.c: Remove _initialize_printcmd prototype.
6460 * probe.c: Remove _initialize_probe prototype.
6461 * proc-api.c: Remove _initialize_proc_api prototype.
6462 * proc-events.c: Remove _initialize_proc_events prototype.
6463 * proc-service.c: Remove _initialize_proc_service prototype.
6464 * procfs.c: Remove _initialize_procfs prototype.
6465 * psymtab.c: Remove _initialize_psymtab prototype.
6466 * python/python.c: Remove _initialize_python prototype.
6467 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6468 * record-btrace.c: Remove _initialize_record_btrace prototype.
6469 * record-full.c: Remove _initialize_record_full prototype.
6470 * record.c: Remove _initialize_record prototype.
6471 * regcache.c: Remove _initialize_regcache prototype.
6472 * reggroups.c: Remove _initialize_reggroup prototype.
6473 * remote-notif.c: Remove _initialize_notif prototype.
6474 * remote-sim.c: Remove _initialize_remote_sim prototype.
6475 * remote.c: Remove _initialize_remote prototype.
6476 * reverse.c: Remove _initialize_reverse prototype.
6477 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6478 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6479 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6480 prototype.
6481 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6482 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6483 * rust-exp.y: Remove _initialize_rust_exp prototype.
6484 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6485 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6486 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6487 * score-tdep.c: Remove _initialize_score_tdep prototype.
6488 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6489 prototype.
6490 * ser-go32.c: Remove _initialize_ser_dos prototype.
6491 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6492 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6493 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6494 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6495 * serial.c: Remove _initialize_serial prototype.
6496 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6497 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6498 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6499 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6500 * skip.c: Remove _initialize_step_skip prototype.
6501 * sol-thread.c: Remove _initialize_sol_thread prototype.
6502 * solib-aix.c: Remove _initialize_solib_aix prototype.
6503 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6504 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6505 * solib-frv.c: Remove _initialize_frv_solib prototype.
6506 * solib-spu.c: Remove _initialize_spu_solib prototype.
6507 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6508 * solib-target.c: Remove _initialize_solib_target prototype.
6509 * solib.c: Remove _initialize_solib prototype.
6510 * source.c: Remove _initialize_source prototype.
6511 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6512 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6513 prototype.
6514 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6515 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6516 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6517 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6518 prototype.
6519 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6520 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6521 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6522 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6523 prototype.
6524 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6525 prototype.
6526 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6527 prototype.
6528 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6529 prototype.
6530 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6531 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6532 prototype.
6533 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6534 prototype.
6535 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6536 prototype.
6537 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6538 prototype.
6539 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6540 prototype.
6541 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6542 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6543 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6544 * stabsread.c: Remove _initialize_stabsread prototype.
6545 * stack.c: Remove _initialize_stack prototype.
6546 * stap-probe.c: Remove _initialize_stap_probe prototype.
6547 * std-regs.c: Remove _initialize_frame_reg prototype.
6548 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6549 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6550 * symfile.c: Remove _initialize_symfile prototype.
6551 * symmisc.c: Remove _initialize_symmisc prototype.
6552 * symtab.c: Remove _initialize_symtab prototype.
6553 * target-dcache.c: Remove _initialize_target_dcache prototype.
6554 * target-descriptions.c: Remove _initialize_target_descriptions
6555 prototype.
6556 * thread.c: Remove _initialize_thread prototype.
6557 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6558 prototype.
6559 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6560 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6561 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6562 prototype.
6563 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6564 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6565 * tracefile.c: Remove _initialize_tracefile prototype.
6566 * tracepoint.c: Remove _initialize_tracepoint prototype.
6567 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6568 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6569 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6570 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6571 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6572 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6573 * tui/tui.c: Remove _initialize_tui prototype.
6574 * typeprint.c: Remove _initialize_typeprint prototype.
6575 * user-regs.c: Remove _initialize_user_regs prototype.
6576 * utils.c: Remove _initialize_utils prototype.
6577 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6578 * valarith.c: Remove _initialize_valarith prototype.
6579 * valops.c: Remove _initialize_valops prototype.
6580 * valprint.c: Remove _initialize_valprint prototype.
6581 * value.c: Remove _initialize_values prototype.
6582 * varobj.c: Remove _initialize_varobj prototype.
6583 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6584 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6585 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6586 * windows-nat.c: Remove _initialize_windows_nat,
6587 _initialize_check_for_gdb_ini, and _initialize_loadable
6588 prototypes.
6589 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6590 * xcoffread.c: Remove _initialize_xcoffread prototype.
6591 * xml-support.c: Remove _initialize_xml_support prototype.
6592 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6593 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6594 prototype.
6595 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6596 prototype.
6597 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6598
a611b5cb
KS
65992017-09-08 Keith Seitz <keiths@redhat.com>
6600
6601 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6602 field.
6603
469412dd
CW
66042017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6605
6606 * f-valprint.c (f_val_print): Remove check for one byte
6607 sized integers. Remove printing of character type.
6608
a5ad232b
FP
66092017-09-08 Frank Penczek <frank.penczek@intel.com>
6610 Christoph Weinmann <christoph.t.weinmann@intel.com>
6611 Bernhard Heckel <bernhard.heckel@intel.com>
6612
6613 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6614 to maintain proper indentation when printing pointers/refs.
6615
e5014227
JB
66162017-09-07 Joel Brobecker <brobecker@adacore.com>
6617
6618 GDB 8.0.1 released.
6619
63c99141
JB
66202017-09-07 Joel Brobecker <brobecker@adacore.com>
6621
6622 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6623
69c1e056
TT
66242017-09-05 Tom Tromey <tom@tromey.com>
6625
6626 * parse.c (funcall_chain): Now a std::vector.
6627 (start_arglist, end_arglist): Simplify.
6628 (free_funcalls): Remove.
6629 (parse_exp_in_context_1): Remove cleanup.
6630
fef704bf
TT
66312017-09-05 Tom Tromey <tom@tromey.com>
6632
6633 * go-exp.y (go_parse): Don't create a cleanup.
6634
5613c585
TT
66352017-09-05 Tom Tromey <tom@tromey.com>
6636
6637 * d-exp.y (PrimaryExpression): Use std::string.
6638 (d_parse): Don't create a cleanup.
6639
eae49211
TT
66402017-09-05 Tom Tromey <tom@tromey.com>
6641
6642 * utils.c (do_clear_parser_state): Remove.
6643 (make_cleanup_clear_parser_state): Remove.
6644 * p-exp.y (pascal_parse): Use scoped_restore.
6645 * m2-exp.y (m2_parse): Use scoped_restore.
6646 * f-exp.y (f_parse): Use scoped_restore.
6647 * d-exp.y (d_parse): Use scoped_restore.
6648 * c-exp.y (c_parse): Use scoped_restore.
6649 * ada-exp.y (ada_parse): Use scoped_restore.
6650 * utils.h (make_cleanup_clear_parser_state): Remove.
6651
73b9be8b
KS
66522017-09-06 Keith Seitz <keiths@redhat.com>
6653
6654 * dwarf2read.c (dw2_linkage_name_attr): New function.
6655 (dw2_linkage_name): New function.
6656 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6657 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6658 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6659
a102602b
KR
66602017-09-06 Kamil Rytarowski <n54@gmx.com>
6661
6662 * config/djgpp/djconfig.sh: Correct shell portability issue.
6663
28ad437d
KR
66642017-09-06 Kamil Rytarowski <n54@gmx.com>
6665
6666 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6667
351787dd
JB
66682017-09-06 John Baldwin <jhb@FreeBSD.org>
6669
6670 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6671 * NEWS: Mention new FreeBSD/mips native configuration.
6672 * configure.host: Add aarch64*-*-freebsd*.
6673 * configure.nat: Likewise.
6674 * aarch64-fbsd-nat.c: New file.
6675
c0f84956
JB
66762017-09-06 John Baldwin <jhb@FreeBSD.org>
6677
6678 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6679 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6680 * NEWS: Mention new FreeBSD/aarch64 target.
6681 * configure.tgt: Add aarch64*-*-freebsd*.
6682 * aarch64-fbsd-tdep.c: New file.
6683 * aarch64-fbsd-tdep.h: New file.
6684
7610297a
KR
66852017-09-06 Kamil Rytarowski <n54@gmx.com>
6686
6687 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6688
fbd1b771
JK
66892017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6690
6691 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6692 of TLS symbols.
6693
5ca79eae
PW
66942017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6695
6696 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6697 call.
6698
bf93d7ba
SM
66992017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6700
6701 * infrun.c (follow_exec): Call add_thread after
6702 target_find_description.
6703
1bb7c059
SM
67042017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6705
6706 * infrun.c (handle_inferior_event_1): When exec'ing, read
6707 stop_pc after follow_exec.
6708
fc809827
SM
67092017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6710
6711 * remote.c (process_g_packet): Update error message.
6712
d2fcdd85
YQ
67132017-09-05 Yao Qi <yao.qi@linaro.org>
6714
6715 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6716 targets.
6717
e69570ee
PA
67182017-09-05 Pedro Alves <palves@redhat.com>
6719
6720 * eval.c (eval_call, evaluate_funcall): New functions, factored
6721 out from ...
6722 (evaluate_subexp_standard): ... this.
6723
22916b07
YQ
67242017-09-05 Yao Qi <yao.qi@linaro.org>
6725
6726 * amd64-tdep.c (amd64_target_description): Create target
6727 descriptions.
6728 (_initialize_amd64_tdep): Don't call functions
6729 initialize_tdesc_amd64_*. Add self tests.
6730 * arch/amd64.c (amd64_create_target_description): Add parameter
6731 is_linux. Call set_tdesc_osabi if is_linux is true.
6732 * arch/amd64.h (amd64_create_target_description): Update the
6733 declaration.
6734 * arch/i386.c (i386_create_target_description): Add parameter
6735 is_linux. Call set_tdesc_osabi if is_linux is true.
6736 * arch/i386.h (i386_create_target_description): Update
6737 declaration.
6738 * configure.tgt: Add i386.o to gdb_target_obs.
6739 * features/Makefile (XMLTOC): Remove i386/*.xml.
6740 * features/i386/amd64-avx-avx512.c: Remove.
6741 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6742 * features/i386/amd64-avx-mpx.c: Remove.
6743 * features/i386/amd64-avx.c: Remove.
6744 * features/i386/amd64-mpx.c: Remove.
6745 * features/i386/amd64.c: Remove.
6746 * features/i386/i386-avx-avx512.c: Remove.
6747 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6748 * features/i386/i386-avx-mpx.c: Remove.
6749 * features/i386/i386-avx.c: Remove.
6750 * features/i386/i386-mmx.c: Remove.
6751 * features/i386/i386-mpx.c: Remove.
6752 * features/i386/i386.c: Remove.
6753 * i386-tdep.c: Don't include features/i386/i386*.c., include
6754 target-descriptions.h and arch/i386.h.
6755 (i386_target_description): Create target descriptions.
6756 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6757 functions. Do self tests.
6758
0854b7b1
YQ
67592017-09-05 Yao Qi <yao.qi@linaro.org>
6760
6761 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6762 * features/i386/amd64-avx-avx512-linux.c: Removed.
6763 * features/i386/amd64-avx-linux.c: Removed.
6764 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6765 * features/i386/amd64-avx-mpx-linux.c: Removed.
6766 * features/i386/amd64-linux.c: Removed.
6767 * features/i386/amd64-mpx-linux.c: Removed.
6768 * features/i386/x32-avx-avx512-linux.c: Removed.
6769 * features/i386/x32-avx-linux.c: Removed.
6770 * features/i386/x32-linux.c: Removed.
6771
b4570e4b
YQ
67722017-09-05 Yao Qi <yao.qi@linaro.org>
6773
6774 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6775 features/i386/*.c.
6776 (amd64_linux_read_description): Call
6777 amd64_create_target_description.
6778 * arch/amd64.c: New file.
6779 * arch/amd64.h: New file.
6780 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6781 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6782
6c73f67f
YQ
67832017-09-05 Yao Qi <yao.qi@linaro.org>
6784
6785 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6786 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6787 (amd64_linux_read_description): Create target descriptions.
6788 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6789 functions. Add unit tests.
6790 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6791 x32-core.xml.
6792 * features/i386/64bit-avx.c: Generated.
6793 * features/i386/64bit-avx512.c: Generated.
6794 * features/i386/64bit-core.c: Generated.
6795 * features/i386/64bit-linux.c: Generated.
6796 * features/i386/64bit-mpx.c: Generated.
6797 * features/i386/64bit-pkeys.c: Generated.
6798 * features/i386/64bit-segments.c: Generated.
6799 * features/i386/64bit-sse.c: Generated.
6800 * features/i386/x32-core.c: Generated.
6801 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6802 c files for amd64-linux and x32-linux.
6803
9d3d478b
YQ
68042017-09-05 Yao Qi <yao.qi@linaro.org>
6805
6806 * amd64-linux-tdep.c (amd64_linux_read_description): New
6807 function.
6808 (amd64_linux_core_read_description): Call
6809 amd64_linux_read_description.
6810 (amd64_linux_init_abi): Likewise.
6811 (amd64_x32_linux_init_abi): Likewise.
6812 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6813 * x86-linux-nat.c (x86_linux_read_description): Call
6814 amd64_linux_read_description.
6815
b9f1d50f
YQ
68162017-09-05 Yao Qi <yao.qi@linaro.org>
6817
6818 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6819 comments.
6820
188c9e6d
YQ
68212017-09-05 Yao Qi <yao.qi@linaro.org>
6822
6823 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6824 * features/i386/i386-avx-avx512-linux.c: Remove.
6825 * features/i386/i386-avx-linux.c: Remove.
6826 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6827 * features/i386/i386-avx-mpx-linux.c: Remove.
6828 * features/i386/i386-linux.c: Remove.
6829 * features/i386/i386-mmx-linux.c: Remove.
6830 * features/i386/i386-mpx-linux.c: Remove.
6831
5f035c07
YQ
68322017-09-05 Yao Qi <yao.qi@linaro.org>
6833
6834 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6835 (SFILES): Add arch/i386.c.
6836 (HFILES_NO_SRCDIR): Add arch/i386.h.
6837 * arch/i386.c: New file.
6838 * arch/i386.h: New file.
6839 * arch/tdesc.h (allocate_target_description): Declare.
6840 (set_tdesc_architecture): Declare.
6841 (set_tdesc_osabi): Declare.
6842 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6843 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6844 include arch/i386.h.
6845 (i386_linux_read_description): Remove code and call
6846 i386_create_target_description.
6847 (set_tdesc_architecture): New function.
6848 (set_tdesc_osabi): New function.
6849 * target-descriptions.h (allocate_target_description): Remove.
6850
0abe8a89
YQ
68512017-09-05 Yao Qi <yao.qi@linaro.org>
6852
6853 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6854 * target-descriptions.c (tdesc_create_feature): Likewise, and
6855 adjust code.
6856 * features/i386/32bit-avx.c: Re-generated.
6857 * features/i386/32bit-avx512.c: Re-generated.
6858 * features/i386/32bit-core.c: Re-generated.
6859 * features/i386/32bit-linux.c: Re-generated.
6860 * features/i386/32bit-mpx.c: Re-generated.
6861 * features/i386/32bit-pkeys.c: Re-generated.
6862 * features/i386/32bit-sse.c: Re-generated.
6863
0a188386
YQ
68642017-09-05 Yao Qi <yao.qi@linaro.org>
6865
6866 * regformats/regdef.h (struct reg): Override operator == and !=.
6867
f49ff000
YQ
68682017-09-05 Yao Qi <yao.qi@linaro.org>
6869
6870 * arch/tdesc.h: New file.
6871 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6872 * target-descriptions.c: Update comments.
6873 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6874 declarations.
6875 * features/i386/32bit-avx.c: Re-generated.
6876 * features/i386/32bit-avx512.c: Re-generated.
6877 * features/i386/32bit-core.c: Re-generated.
6878 * features/i386/32bit-linux.c: Re-generated.
6879 * features/i386/32bit-mpx.c: Re-generated.
6880 * features/i386/32bit-pkeys.c: Re-generated.
6881 * features/i386/32bit-sse.c: Re-generated.
6882
f7000548
YQ
68832017-09-05 Yao Qi <yao.qi@linaro.org>
6884
6885 * regformats/regdat.sh: Update generated code.
6886
c9a5e2a5
YQ
68872017-09-05 Yao Qi <yao.qi@linaro.org>
6888
6889 * regformats/regdat.sh: Adjust code order.
6890
d6b687ac
SM
68912017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6892
6893 * expprint.c (dump_subexp_body_standard): Use constant format
6894 string in fprintf_filtered call.
6895
a379bfd0
JB
68962017-09-04 John Baldwin <jhb@FreeBSD.org>
6897
6898 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6899 NetBSD/i386.
6900 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6901
f7efc967
JB
69022017-09-04 John Baldwin <jhb@FreeBSD.org>
6903
6904 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6905
c49fbc6c
JB
69062017-09-04 John Baldwin <jhb@FreeBSD.org>
6907
6908 * bsd-kvm.o: Define _KMEMUSER.
6909 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6910 * configure: Regenerate.
6911
26562e73
JB
69122017-09-04 John Baldwin <jhb@FreeBSD.org>
6913
6914 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6915 * i386-fbsd-nat.c: Likewise.
6916
31cf1487
JB
69172017-09-04 John Baldwin <jhb@FreeBSD.org>
6918
6919 * unittests/array-view-selftests.c: Add include of <array>.
6920
5b9f8a7c
JB
69212017-09-04 John Baldwin <jhb@FreeBSD.org>
6922
6923 * spu-tdep.c (flush_ea_cache): Add missing argument to
6924 call_function_by_hand.
6925
d69cf9b2
PA
69262017-09-04 Pedro Alves <palves@redhat.com>
6927
6928 * NEWS (Safer support for debugging with no debug info): New.
6929
3693fdb3
PA
69302017-09-04 Pedro Alves <palves@redhat.com>
6931
6932 * c-exp.y (function_method, function_method_void): Add current
6933 instance flags to TYPE_INSTANCE.
6934 * dwarf2read.c (check_modifier): New.
6935 (compute_delayed_physnames): Assert that only C++ adds delayed
6936 physnames. Mark fn_fields as const/volatile depending on
6937 physname.
6938 * eval.c (make_params): New type_instance_flags parameter. Use
6939 it as the new type's instance flags.
6940 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6941 flags element and pass it to make_params.
6942 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6943 instance flags element.
6944 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6945 * gdbtypes.h: Include "enum-flags.h".
6946 (type_instance_flags): New enum-flags type.
6947 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6948 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6949 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6950 (follow_type_instance_flags): New function.
6951 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6952 * parser-defs.h (follow_type_instance_flags): Declare.
6953 * valops.c (value_struct_elt_for_reference): const/volatile must
6954 match too.
6955
e68cb8e0
PA
69562017-09-04 Pedro Alves <palves@redhat.com>
6957
6958 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6959 function/method scopes; lookup the nested name as a function local
6960 static variable.
6961
858be34c
PA
69622017-09-04 Pedro Alves <palves@redhat.com>
6963
6964 (%type <voidval>): Add function_method.
6965 * c-exp.y (exp): New production for calls with no arguments.
6966 (function_method, function_method_void_or_typelist): New
6967 productions.
6968 (exp): New production for "method()::static_var".
6969 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6970 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6971 Handle OP_FUNC_STATIC_VAR.
6972 * parse.c (operator_length_standard):
6973 Handle OP_FUNC_STATIC_VAR.
6974
dd5901a6
PA
69752017-09-04 Pedro Alves <palves@redhat.com>
6976
6977 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6978 handling.
6979 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6980 Ditto.
6981 * parse.c (operator_length_standard, operator_check_standard):
6982 Ditto.
6983 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6984
46a4882b
PA
69852017-09-04 Pedro Alves <palves@redhat.com>
6986
6987 * ax-gdb.c: Include "typeprint.h".
6988 (gen_expr_for_cast): New function.
6989 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6990 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6991 type is unknown.
6992 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6993 nodebug_data_symbol.
6994 * eval.c: Include "typeprint.h".
6995 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6996 Error out if symbol has unknown type.
6997 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6998 evaluate_subexp_for_cast.
6999 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7000 OP_VAR_MSYM_VALUE.
7001 (evaluate_subexp_for_cast): New function.
7002 * gdbtypes.c (init_nodebug_var_type): New function.
7003 (objfile_type): Use it to initialize types of variables with no
7004 debug info.
7005 * typeprint.c (error_unknown_type): New.
7006 * typeprint.h (error_unknown_type): New declaration.
7007 * compile/compile-c-types.c (convert_type_basic): Handle
7008 TYPE_CODE_ERROR; warn and fallback to int for variables with
7009 unknown type.
7010
fe13dfec
PA
70112017-09-04 Pedro Alves <palves@redhat.com>
7012
7013 * eval.c (evaluate_var_value): New function, factored out from ...
7014 (evaluate_subexp_standard): ... here.
7015
d008ee21
PA
70162017-09-04 Pedro Alves <palves@redhat.com>
7017
7018 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7019 Remove useless assignments to 'op'.
7020
827d0c51
PA
70212017-09-04 Pedro Alves <palves@redhat.com>
7022
7023 * eval.c (eval_skip_value): New function.
7024 (evaluate_subexp_standard): Use it.
7025
2c5a2be1
PA
70262017-09-04 Pedro Alves <palves@redhat.com>
7027
7028 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7029 function name from symbol/minsym and pass it to
7030 error_call_unknown_return_type.
7031
74ea4be4
PA
70322017-09-04 Pedro Alves <palves@redhat.com>
7033
7034 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7035 * ax-gdb.c (gen_msym_var_ref): New function.
7036 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7037 * eval.c (evaluate_var_msym_value): New function.
7038 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7039 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7040 to call_function_by_hand.
7041 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7042 Handle OP_VAR_MSYM_VALUE.
7043 (union exp_element) <msymbol>: New field.
7044 * minsyms.h (struct type): Forward declare.
7045 (find_minsym_type_and_address): Declare.
7046 * parse.c (write_exp_elt_msym): New function.
7047 (write_exp_msymbol): Delete, refactored as ...
7048 (find_minsym_type_and_address): ... this new function.
7049 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7050 (operator_length_standard, operator_check_standard): Handle
7051 OP_VAR_MSYM_VALUE.
7052 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7053
7022349d
PA
70542017-09-04 Pedro Alves <palves@redhat.com>
7055
7056 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7057 TYPE_GNU_IFUNC specially here. Throw error if return type is
7058 unknown.
7059 * ada-typeprint.c (print_func_type): Handle functions with unknown
7060 return type.
7061 * c-typeprint.c (c_type_print_base): Handle functions and methods
7062 with unknown return type.
7063 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7064 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7065 * compile/compile-c-types.c: Include "objfiles.h".
7066 (convert_func): For functions with unknown return type, warn and
7067 default to int.
7068 * compile/compile-object-run.c (compile_object_run): Adjust call
7069 to call_function_by_hand_dummy.
7070 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7071 call_function_by_hand.
7072 * eval.c (evaluate_subexp_standard): Adjust calls to
7073 call_function_by_hand. Handle functions and methods with unknown
7074 return type. Pass expect_type to call_function_by_hand.
7075 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7076 return type.
7077 * gcore.c (call_target_sbrk): Adjust call to
7078 call_function_by_hand.
7079 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7080 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7081 an integer address type instead of nodebug.
7082 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7083 call_function_by_hand.
7084 * infcall.c (error_call_unknown_return_type): New function.
7085 (call_function_by_hand): New "default_return_type" parameter.
7086 Pass it down.
7087 (call_function_by_hand_dummy): New "default_return_type"
7088 parameter. Use it instead of defaulting to int. If there's no
7089 default and the return type is unknown, throw an error. If
7090 there's a default return type, and the called function has no
7091 debug info, then assume the function is prototyped.
7092 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7093 New "default_return_type" parameter.
7094 (error_call_unknown_return_type): New declaration.
7095 * linux-fork.c (call_lseek): Cast return type of lseek.
7096 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7097 call_function_by_hand.
7098 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7099 calls to call_function_by_hand.
7100 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7101 return type.
7102 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7103 (value_nsstring, print_object_command): Adjust calls to
7104 call_function_by_hand.
7105 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7106 functions with unknown return type.
7107 (pascal_type_print_func_varspec_suffix): New function.
7108 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7109 TYPE_CODE_METHOD>: Use it.
7110 * python/py-value.c (valpy_call): Adjust call to
7111 call_function_by_hand.
7112 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7113 call_function_by_hand.
7114 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7115 call_function_by_hand.
7116 * valops.c (value_allocate_space_in_inferior): Adjust call to
7117 call_function_by_hand.
7118 * typeprint.c (type_print_unknown_return_type): New function.
7119 * typeprint.h (type_print_unknown_return_type): New declaration.
7120
54990598
PA
71212017-09-04 Pedro Alves <palves@redhat.com>
7122
7123 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7124 types with more than one parameter as prototyped.
7125
9a24775b
PA
71262017-09-04 Pedro Alves <palves@redhat.com>
7127
7128 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7129 (disassemble_command): Use gdb_disassembly_flags instead of bare
7130 int.
7131 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7132 (dump_insns, do_mixed_source_and_assembly_deprecated)
7133 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7134 Use gdb_disassembly_flags instead of bare int.
7135 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7136 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7137 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7138 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7139 (enum gdb_disassembly_flag): ... values of this new enumeration.
7140 (gdb_disassembly_flags): Define.
7141 (gdb_disassembly)
7142 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7143 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7144 gdb_disassembly_flags instead of bare int.
7145 * record-btrace.c (btrace_insn_history)
7146 (record_btrace_insn_history, record_btrace_insn_history_range)
7147 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7148 instead of bare int.
7149 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7150 Use gdb_disassembly_flags instead of bare int.
7151 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7152 Define.
7153 * target-delegates.c: Regenerate.
7154 * target.c (target_insn_history, target_insn_history_from)
7155 (target_insn_history_range): Use gdb_disassembly_flags instead of
7156 bare int.
7157 * target.h: Include "disasm.h".
7158 (struct target_ops) <to_insn_history, to_insn_history_from,
7159 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7160 int.
7161 (target_insn_history, target_insn_history_from)
7162 (target_insn_history_range): Use gdb_disassembly_flags instead of
7163 bare int.
7164
80a65e9b
SM
71652017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7166
7167 * cli/cli-script.c (build_command_line): For if/while commands,
7168 check whether args is empty.
7169
6b66338c
SM
71702017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7171
7172 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7173 (enum command_control_type): Likewise.
7174 (struct command_line): Likewise.
7175 (free_command_lines): Likewise.
7176 (struct command_lines_deleter): Likewise.
7177 (command_line_up): Likewise.
7178 (read_command_lines): Likewise.
7179 (read_command_lines_1): Likewise.
7180 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7181 (enum command_control_type): Likewise.
7182 (struct command_line): Likewise.
7183 (free_command_lines): Likewise.
7184 (struct command_lines_deleter): Likewise.
7185 (command_line_up): Likewise.
7186 (read_command_lines): Likewise.
7187 (read_command_lines_1): Likewise.
7188 * breakpoint.h: Include cli/cli-script.h.
7189 * extension-priv.h: Likewise.
7190 * gdbcmd.h: Likewise.
7191
51abb421
PA
71922017-09-04 Pedro Alves <palves@redhat.com>
7193
7194 * ada-lang.c (is_known_support_routine): Move sal declaration to
7195 where it is initialized.
7196 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7197 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7198 (clear_command, update_static_tracepoint): Remove init_sal
7199 references. Move declarations closer to initializations.
7200 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7201 initializations.
7202 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7203 references. Move sal declarations closer to initializations.
7204 * frame.c (find_frame_sal): Return a symtab_and_line via function
7205 return instead of output parameter. Remove init_sal references.
7206 * frame.h (find_frame_sal): Return a symtab_and_line via function
7207 return instead of output parameter.
7208 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7209 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7210 instead of memset.
7211 (gdbscm_find_pc_line): Remove init_sal reference.
7212 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7213 references. Move declarations closer to initializations.
7214 * infcmd.c (set_step_frame): Update. Move declarations closer to
7215 initializations.
7216 (finish_backward): Remove init_sal references. Move declarations
7217 closer to initializations.
7218 * infrun.c (process_event_stop_test, handle_step_into_function)
7219 (insert_hp_step_resume_breakpoint_at_frame)
7220 (insert_step_resume_breakpoint_at_caller): Likewise.
7221 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7222 (symbol_to_sal): Likewise.
7223 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7224 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7225 to its initialization.
7226 * reverse.c (save_bookmark_command): Use new/delete. Remove
7227 init_sal references. Move declarations closer to initializations.
7228 * source.c (get_current_source_symtab_and_line): Remove brace
7229 initialization.
7230 (set_current_source_symtab_and_line): Now takes the sal by const
7231 reference. Remove brace initialization.
7232 (line_info): Remove init_sal reference.
7233 * source.h (set_current_source_symtab_and_line): Now takes a
7234 symtab_and_line via const reference.
7235 * stack.c (set_current_sal_from_frame): Adjust.
7236 (print_frame_info): Adjust.
7237 (get_last_displayed_sal): Return the sal via function return
7238 instead of via output parameter. Simplify.
7239 (frame_info): Adjust.
7240 * stack.h (get_last_displayed_sal): Return the sal via function
7241 return instead of via output parameter.
7242 * symtab.c (init_sal): Delete.
7243 (find_pc_sect_line): Remove init_sal references. Move
7244 declarations closer to initializations.
7245 (find_function_start_sal): Remove init_sal references. Move
7246 declarations closer to initializations.
7247 * symtab.h (struct symtab_and_line): In-class initialize all
7248 fields.
7249 * tracepoint.c (set_traceframe_context)
7250 (print_one_static_tracepoint_marker): Remove init_sal references.
7251 Move declarations closer to initializations.
7252 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7253 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7254 declarations closer to initializations.
7255 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7256 init_sal references. Adjust.
7257
6c5b2ebe
PA
72582017-09-04 Pedro Alves <palves@redhat.com>
7259
7260 * ax-gdb.c (agent_command_1): Use range-for.
7261 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7262 * breakpoint.c: Include "common/array-view.h".
7263 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7264 parameter from struct symtabs_and_lines to
7265 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7266 (breakpoint_sals_to_pc): Change sals parameter from struct
7267 symtabs_and_lines to std::vector reference.
7268 (check_fast_tracepoint_sals): Change sals parameter from struct
7269 symtabs_and_lines to std::array_view. Use range-for.
7270 (decode_static_tracepoint_spec): Return a std::vector instead of
7271 symtabs_and_lines. Update.
7272 (create_breakpoint): Update.
7273 (break_range_command, until_break_command, clear_command): Update.
7274 (base_breakpoint_decode_location, bkpt_decode_location)
7275 (bkpt_probe_create_sals_from_location)
7276 (bkpt_probe_decode_location, tracepoint_decode_location)
7277 (tracepoint_probe_decode_location)
7278 (strace_marker_create_sals_from_location): Return a std::vector
7279 instead of symtabs_and_lines.
7280 (strace_marker_create_breakpoints_sal): Update.
7281 (strace_marker_decode_location): Return a std::vector instead of
7282 symtabs_and_lines. Update.
7283 (update_breakpoint_locations): Change struct symtabs_and_lines
7284 parameters to gdb::array_view. Adjust.
7285 (location_to_sals): Return a std::vector instead of
7286 symtabs_and_lines. Update.
7287 (breakpoint_re_set_default): Use std::vector instead of struct
7288 symtabs_and_lines.
7289 (decode_location_default): Return a std::vector instead of
7290 symtabs_and_lines. Update.
7291 * breakpoint.h: Include "common/array-view.h".
7292 (struct breakpoint_ops) <decode_location>: Now returns a
7293 std::vector instead of returning a symtabs_and_lines via output
7294 parameter.
7295 (update_breakpoint_locations): Change sals parameters to use
7296 gdb::array_view.
7297 * cli/cli-cmds.c (edit_command, list_command): Update to use
7298 std::vector and gdb::array_view.
7299 (ambiguous_line_spec): Adjust to use gdb::array_view and
7300 range-for.
7301 (compare_symtabs): Rename to ...
7302 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7303 const reference and adjust.
7304 (filter_sals): Rewrite using std::vector and standard algorithms.
7305 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7306 (jump_command): Update to use std::vector.
7307 * linespec.c (struct linespec_state) <canonical_names>: Update
7308 comment.
7309 (add_sal_to_sals_basic): Delete.
7310 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7311 (decode_line_2, create_sals_line_offset)
7312 (convert_address_location_to_sals, convert_linespec_to_sals)
7313 (convert_explicit_location_to_sals, parse_linespec)
7314 (event_location_to_sals, decode_line_full, decode_line_1)
7315 (decode_line_with_current_source)
7316 (decode_line_with_last_displayed, decode_objc)
7317 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7318 (linespec_result::~linespec_result): Adjust to use std::vector
7319 instead of symtabs_and_lines.
7320 * linespec.h (linespec_sals::sals): Now a std::vector.
7321 (struct linespec_result): Use std::vector, bool, and in-class
7322 initialization.
7323 (decode_line_1, decode_line_with_current_source)
7324 (decode_line_with_last_displayed): Return std::vector.
7325 * macrocmd.c (info_macros_command): Use std::vector.
7326 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7327 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7328 std::vector.
7329 * probe.h (parse_probes): Return a std::vector.
7330 * python/python.c (gdbpy_decode_line): Use std::vector and
7331 gdb::array_view.
7332 * source.c (select_source_symtab, line_info): Use std::vector.
7333 * stack.c (func_command): Use std::vector.
7334 * symtab.h (struct symtabs_and_lines): Delete.
7335 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7336
7c44b49c
PA
73372017-09-04 Pedro Alves <palves@redhat.com>
7338
7339 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7340 unittests/array-view-selftests.c.
7341 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7342 * common/array-view.h: New file.
7343 * unittests/array-view-selftests.c: New file.
7344
e439fa14
PA
73452017-09-04 Pedro Alves <palves@redhat.com>
7346
7347 * cli/cli-cmds.c (edit_command): Pass message to
7348 ambiguous_line_spec.
7349 (list_command): Pass message to ambiguous_line_spec. Say
7350 "first"/"last" instead of "start" and "end" to be consistent with
7351 the manual.
7352 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7353 them to print formatted message.
7354
7525b645
PA
73552017-09-04 Pedro Alves <palves@redhat.com>
7356
7357 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7358 ftrace_update_insns by reference instead of pointer.
7359
badc0020
YQ
73602017-09-04 Yao Qi <yao.qi@linaro.org>
7361
7362 * i386-go32-tdep.c: Include x86-xstate.h.
7363 (i386_go32_init_abi): Call i386_target_description.
7364 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7365 if xcr0 is X86_XSTATE_X87_MASK.
7366 * i386-tdep.h (tdesc_i386): Remove the declaration.
7367 (tdesc_i386_mmx): Likewise.
7368
d78bdb54
YQ
73692017-09-04 Yao Qi <yao.qi@linaro.org>
7370
7371 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7372 X86_XSTATE_SSE_MASK instead of 0.
7373
ca1fa5ee
YQ
73742017-09-04 Yao Qi <yao.qi@linaro.org>
7375
7376 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7377 i386_target_description.
7378 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7379 i386_target_description.
7380 * i386-tdep.c (i386_gdbarch_init): Likewise.
7381
2434b019
YQ
73822017-09-04 Yao Qi <yao.qi@linaro.org>
7383
7384 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7385 (x86_darwin_init_abi_64): Call amd64_target_description.
7386 * amd64-dicos-tdep.c: Likewise.
7387 * amd64-fbsd-nat.c: Likewise.
7388 * amd64-fbsd-tdep.c: Likewise.
7389 * amd64-nbsd-tdep.c: Likewise.
7390 * amd64-obsd-tdep.c: Likewise.
7391 * amd64-sol2-tdep.c: Likewise.
7392 * amd64-windows-tdep.c: Likewise.
7393 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7394
0860c437
SM
73952017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7396
7397 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7398 (btrace_function) <insn>: Change type to use std::vector.
7399 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7400 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7401 ftrace_update_insns, ftrace_compute_global_level_offset,
7402 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7403 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7404 change to std::vector.
7405 (ftrace_update_insns): Adjust to change to std::vector, change
7406 type of INSN parameter.
7407 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7408 * record-btrace.c (btrace_call_history_insn_range,
7409 btrace_compute_src_line_range,
7410 record_btrace_frame_prev_register): Adjust to change to
7411 std::vector.
7412 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7413 to change to std::vector.
7414
0638b7f9
TT
74152017-09-03 Tom Tromey <tom@tromey.com>
7416
7417 * corefile.c (reopen_exec_file): Use std::string.
7418
8f84fb0e
TT
74192017-09-03 Tom Tromey <tom@tromey.com>
7420
7421 * compile/compile.c (compile_register_name_mangled): Return
7422 std::string.
7423 * compile/compile-loc2c.c (pushf_register_address): Update.
7424 (pushf_register): Update.
7425 * compile/compile-c-types.c (convert_array): Update.
7426 * compile/compile-c-symbols.c (generate_vla_size): Update.
7427 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7428 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7429 (convert_one_symbol): Update.
7430 (generate_c_for_for_one_variable): Update.
7431 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7432 std::string.
7433 (generate_register_struct): Update.
7434 * compile/compile-internal.h (c_get_range_decl_name): Return a
7435 std::string.
7436 (compile_register_name_mangled): Return std::string.
7437
18e9961f
TT
74382017-09-03 Tom Tromey <tom@tromey.com>
7439
7440 * utils.c (perror_string): Return a std::string.
7441 (throw_perror_with_name, perror_warning_with_name): Update.
7442
45343786
TT
74432017-09-03 Tom Tromey <tom@tromey.com>
7444
7445 * demangle.c (demangle_command): Use std::string,
7446 unique_xmalloc_ptr.
7447
b57af503
TT
74482017-09-03 Tom Tromey <tom@tromey.com>
7449
7450 * cli/cli-setshow.c (do_set_command): Use std::string.
7451
6eecf35f
TT
74522017-09-03 Tom Tromey <tom@tromey.com>
7453
7454 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7455
56496dd4
TT
74562017-09-03 Tom Tromey <tom@tromey.com>
7457
7458 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7459
e91a1fa7
TT
74602017-09-03 Tom Tromey <tom@tromey.com>
7461
7462 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7463 gdb::unique_xmalloc_ptr.
7464
7ffd83d7
TT
74652017-09-03 Tom Tromey <tom@tromey.com>
7466
7467 * thread.c (print_thread_info_1): Use string_printf.
7468 (thread_apply_command, thread_apply_all_command): Use
7469 std::string.
7470
1ccbe998
TT
74712017-09-03 Tom Tromey <tom@tromey.com>
7472
7473 * valprint.c (val_print_string): Update.
7474 * gdbcore.h (memory_error_message): Return std::string.
7475 * corefile.c (memory_error_message): Return std::string.
7476 (memory_error): Update.
7477 * breakpoint.c (insert_bp_location): Update.
7478
23fdd69e
SM
74792017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7480
7481 * target/waitstatus.h (target_waitstatus_to_string): Change
7482 return type to std::string.
7483 * target/waitstatus.c (target_waitstatus_to_string): Return
7484 std::string.
7485 * target.h (target_waitstatus_to_string): Remove declaration.
7486 * infrun.c (resume, clear_proceed_status_thread,
7487 print_target_wait_results, do_target_wait, save_waitstatus,
7488 stop_all_threads): Adjust.
7489 * record-btrace.c (record_btrace_wait): Adjust.
7490 * target-debug.h
7491 (target_debug_print_struct_target_waitstatus_p): Adjust.
7492
5c811d30
JK
74932017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7494
7495 PR gdb/22046
7496 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7497 detection.
7498
0a2dde4a
SDJ
74992017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7500
7501 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7502 for setting/unsetting environment variables on the remote target.
7503 (New remote packets): Add entries for QEnvironmentHexEncoded,
7504 QEnvironmentUnset and QEnvironmentReset.
7505 * common/environ.c (gdb_environ::operator=): Extend method to
7506 handle m_user_set_env_list and m_user_unset_env_list.
7507 (gdb_environ::clear): Likewise.
7508 (match_var_in_string): Change type of first parameter from 'char
7509 *' to 'const char *'.
7510 (gdb_environ::set): Extend method to handle
7511 m_user_set_env_list and m_user_unset_env_list.
7512 (gdb_environ::unset): Likewise.
7513 (gdb_environ::clear_user_set_env): New method.
7514 (gdb_environ::user_set_envp): Likewise.
7515 (gdb_environ::user_unset_envp): Likewise.
7516 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7517 m_user_unset_env_list on move constructor/assignment.
7518 (unset): Add new default parameter 'update_unset_list = true'.
7519 (clear_user_set_env): New method.
7520 (user_set_envp): Likewise.
7521 (user_unset_envp): Likewise.
7522 (m_user_set_env_list): New std::set.
7523 (m_user_unset_env_list): Likewise.
7524 * common/rsp-low.c (hex2str): New function.
7525 (bin2hex): New overload for bin2hex function.
7526 * common/rsp-low.c (hex2str): New prototype.
7527 (str2hex): New overload prototype.
7528 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7529 QEnvironmentUnset and QEnvironmentReset.
7530 (remote_protocol_features): Add QEnvironmentHexEncoded,
7531 QEnvironmentUnset and QEnvironmentReset packets.
7532 (send_environment_packet): New function.
7533 (extended_remote_environment_support): Likewise.
7534 (extended_remote_create_inferior): Call
7535 extended_remote_environment_support.
7536 (_initialize_remote): Add QEnvironmentHexEncoded,
7537 QEnvironmentUnset and QEnvironmentReset packet configs.
7538 * unittests/environ-selftests.c (gdb_selftest_env_var):
7539 New variable.
7540 (test_vector_initialization): New function.
7541 (test_init_from_host_environ): Likewise.
7542 (test_reinit_from_host_environ): Likewise.
7543 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7544 Likewise.
7545 (test_unset_set_empty_vector): Likewise.
7546 (test_vector_clear): Likewise.
7547 (test_std_move): Likewise.
7548 (test_move_constructor):
7549 (test_self_move): Likewise.
7550 (test_set_unset_reset): Likewise.
7551 (run_tests): Rewrite in terms of the functions above.
7552
654670a4
WP
75532017-08-31 Weimin Pan <weimin.pan@oracle.com>
7554
7555 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7556 (adi_available): Use a temp variable of type CORE_ADDR as argument
7557 3 when calling target_auxv_search.
7558 (adi_normalize_address): Use masks and xor operators to calculate
7559 normalized address.
7560 (adi_read_versions, adi_write_versions, adi_print_versions)
7561 (do_examine, do_assign): Use paddress.
7562
7755ddb7
JB
75632017-08-29 John Baldwin <jhb@FreeBSD.org>
7564
7565 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7566 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7567 out of loop and add supply of FIR.
7568 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7569 add collect of FIR.
7570
fd437cbc
SM
75712017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7572
3804a343 7573 PR gdb/21827
fd437cbc
SM
7574 * cli/cli-script.c (define_command): Don't convert command name
7575 to lower case.
7576
988f6b3d
JB
75772017-08-25 Joel Brobecker <brobecker@adacore.com>
7578
7579 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7580 Update all callers accordingly. Remove all code blocks handling
7581 the case where DISPP is not NULL.
7582
663c44ac
JK
75832017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7584
7585 PR symtab/22003
7586 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7587 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7588 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7589
f1902523
JK
75902017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7591
7592 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7593 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7594 (read_comp_units_from_section): New parameter abbrev_section, use
7595 read_and_check_comp_unit_head, allocate signatured_type if needed.
7596 (create_all_comp_units): Update read_comp_units_from_section caller.
7597
87215ad1
SDJ
75982017-08-23 Pedro Alves <palves@redhat.com>
7599
7600 PR remote/21852
7601 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7602 to null_ptid and switch to thread without reading the registers
7603 after adding the inferior.
7604
6e41ddec
JK
76052017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7606
7607 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7608 compile-gcc.
7609 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7610 (compile_to_object): Implement compile_gcc.
7611 (_initialize_compile): Install "set compile-gcc". Initialize
7612 compile_gcc.
7613
e68c32d5
JK
76142017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7615
7616 * compile/compile.c (compile_to_object): Conditionally call
7617 set_verbose. Conditionally call compile or compile_v0.
7618
58afddc6
WP
76192017-08-07 Weimin Pan <weimin.pan@oracle.com>
7620
7621 * sparc64-tdep.h: (adi_normalize_address): New export.
7622 * sparc-nat.h: (open_adi_tag_fd): New export.
7623 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7624 * sparc64-linux-tdep.c:
7625 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7626 (sparc64_linux_handle_segmentation_fault): New function.
7627 (sparc64_linux_init_abi): Register
7628 sparc64_linux_handle_segmentation_fault
7629 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7630 (sparc64_addr_bits_remove): New function.
7631 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7632 (MAX_PROC_NAME_SIZE): New macro.
7633 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7634 (sparc64adilist): New variable.
7635 (adi_proc_list): New variable.
7636 (find_adi_info): New function.
7637 (add_adi_info): New function.
7638 (get_adi_info_proc): New function.
7639 (get_adi_info): New function.
7640 (info_adi_command): New function.
7641 (read_maps_entry): New function.
7642 (adi_available): New function.
7643 (adi_normalize_address): New function.
7644 (adi_align_address): New function.
7645 (adi_convert_byte_count): New function.
7646 (adi_tag_fd): New function.
7647 (adi_is_addr_mapped): New function.
7648 (adi_read_versions): New function.
7649 (adi_write_versions): New function.
7650 (adi_print_versions): New function.
7651 (do_examine): New function.
7652 (do_assign): New function.
7653 (adi_examine_command): New function.
7654 (adi_assign_command): New function.
7655 (_initialize_sparc64_adi_tdep): New function.
7656
11db9430
SM
76572017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7658
7659 * breakpoint.c (breakpoints_info): Rename to ...
7660 (info_breakpoints_command): ... this.
7661 (watchpoints_info): Rename to ...
7662 (info_watchpoints_command): ... this.
7663 (tracepoints_info): Rename to ...
7664 (info_tracepoints_command): ... this.
7665 (_initialize_breakpoint): Adjust.
7666 * dcache.c (dcache_info): Rename to ...
7667 (info_display_command): ... this.
7668 (_initialize_dcache): Adjust.
7669 * frame.h (args_info): Rename to ...
7670 (info_args_command): ... this.
7671 (locals_info): Rename to ...
7672 (info_locals_command): ... this.
7673 * infcmd.c (nofp_registers_info): Rename to ...
7674 (info_registers_command): ... this.
7675 (float_info): Rename to ...
7676 (info_float_command): ... this.
7677 (program_info): Rename to ...
7678 (info_program_command): ... this.
7679 (all_registers_info): Rename to ...
7680 (info_all_registers_command): ... this.
7681 (vector_info): Rename to ...
7682 (info_vector_command): ... this.
7683 (float_info): Rename to ...
7684 (info_float_command): ... this.
7685 (_initialize_infcmd): Adjust.
7686 * inferior.h (term_info): Rename to ...
7687 (info_terminal_command): ... this.
7688 * inflow.c (term_info): Rename to ...
7689 (info_terminal_command): ... this.
7690 (_initialize_inflow): Adjust.
7691 * infrun.c (signals_info): Rename to ...
7692 (info_signals_command): ... this.
7693 (_initialize_infrun): Adjust.
7694 * objc-lang.c (classes_info): Rename to ...
7695 (info_classes_command): ... this.
7696 (selectors_info): Rename to ...
7697 (info_selectors_command): ... this.
7698 (_initialize_objc_language): Adjust.
7699 * printcmd.c (sym_info): Rename to ...
7700 (info_symbol_command): ... this.
7701 (address_info): Rename to ...
7702 (info_address_command): ... this.
7703 (display_info): Rename to ...
7704 (info_display_command): ... this.
7705 (_initialize_printcmd): Adjust.
7706 * reverse.c (bookmarks_info): Rename to ...
7707 (info_breakpoints_command): ... this.
7708 (_initialize_reverse): Adjust.
7709 * ser-go32.c (dos_info): Rename to ...
7710 (info_serial_command): ... this.
7711 (_initialize_ser_dos): Adjust.
7712 * skip.c (skip_info): Rename to ...
7713 (info_skip_command): ... this.
7714 (_initialize_step_skip): Adjust.
7715 * source.c (line_info): Rename to ...
7716 (info_line_command): ... this.
7717 (source_info): Rename to ...
7718 (info_source_command)
7719 * stack.c (frame_info): Rename to ...
7720 (info_frame_command): ... this.
7721 (locals_info): Rename to ...
7722 (info_locals_command): ... this.
7723 (args_info): Rename to ...
7724 (info_args_command): ... this.
7725 (_initialize_stack): Adjust.
7726 * symtab.c (sources_info): Rename to ...
7727 (info_sources_command): ... this.
7728 (variables_info): Rename to ...
7729 (info_variables_command): ... this.
7730 (functions_info): Rename to ...
7731 (info_functions_command): ... this.
7732 (types_info): Rename to ...
7733 (info_types_command): ... this.
7734 (_initialize_symtab): Adjust.
7735 * target.c (target_info): Rename to ...
7736 (info_target_command): ... this.
7737 (initialize_targets): Adjust.
7738 * tracepoint.c (tvariables_info): Rename to ...
7739 (info_tvariables_command): ... this.
7740 (scope_info): Rename to ...
7741 (info_scope_command): ... this.
7742 (trace_dump_actions): Adjust.
7743 (_initialize_tracepoint): Adjust.
7744
b270e6f9
TT
77452017-08-22 Tom Tromey <tom@tromey.com>
7746
7747 * breakpoint.h (install_breakpoint): Update.
7748 * breakpoint.c (add_solib_catchpoint): Update.
7749 (install_breakpoint): Change argument to a std::unique_ptr.
7750 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7751 (create_breakpoint_sal, create_breakpoint): Update.
7752 (watch_command_1, catch_exec_command_1)
7753 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7754 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7755 Return the breakpoint.
7756 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7757 (new_single_step_breakpoint): Update.
7758 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7759 std::unique_ptr.
7760 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7761 std::unique_ptr.
7762 * break-catch-sig.c (create_signal_catchpoint): Use
7763 std::unique_ptr.
7764 * ada-lang.c (create_ada_exception_catchpoint): Use
7765 std::unique_ptr.
7766
36bd8eaa
TT
77672017-08-22 Tom Tromey <tom@tromey.com>
7768
7769 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7770
56f37645
TT
77712017-08-22 Tom Tromey <tom@tromey.com>
7772
7773 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7774 (lookup_partial_symbol): Update.
7775
0b581c69
TT
77762017-08-22 Tom Tromey <tom@tromey.com>
7777
7778 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7779 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7780 (find_and_open_source, symtab_to_fullname): Update.
7781 * psymtab.c (psymtab_to_fullname): Update.
7782
14278e1f
TT
77832017-08-22 Tom Tromey <tom@tromey.com>
7784
7785 * exec.c (exec_file_attach): Update.
7786 * linux-thread-db.c (try_thread_db_load): Update.
7787 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7788 * utils.c (gdb_realpath): Change return type.
7789 (gdb_realpath_keepfile): Update.
7790 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7791 (_initialize_utils): Register the new self test.
7792 * source.c (openp): Update.
7793 (find_and_open_source): Update.
7794 * nto-tdep.c (nto_find_and_open_solib): Update.
7795 * main.c (set_gdb_data_directory): Update.
7796 (captured_main_1): Update.
7797 * dwarf2read.c (dwarf2_get_dwz_file): Update
7798 (dw2_map_symbol_filenames): Update.
7799 * auto-load.c (auto_load_safe_path_vec_update): Update.
7800 (filename_is_in_auto_load_safe_path_vec): Change type of
7801 "filename_realp".
7802 (auto_load_objfile_script): Update.
7803 (file_is_auto_load_safe): Update. Use std::string.
7804 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7805
4971c9a7
TT
78062017-08-22 Tom Tromey <tom@tromey.com>
7807
7808 * utils.c (gdb_realpath_keepfile): Return a
7809 gdb::unique_xmalloc_ptr.
7810 * exec.c (exec_file_attach): Update.
7811 * utils.h (gdb_realpath_keepfile): Return a
7812 gdb::unique_xmalloc_ptr.
7813
e3e41d58
TT
78142017-08-22 Tom Tromey <tom@tromey.com>
7815
7816 * compile/compile.c (compile_file_command): Use
7817 gdb::unique_xmalloc_ptr, std::string.
7818 * utils.c (gdb_abspath): Change return type.
7819 * source.c (openp): Update.
7820 * objfiles.c (allocate_objfile): Update.
7821 * main.c (set_gdb_data_directory): Update.
7822 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7823
0d999a6e
ZZ
78242017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7825
7826 * cli-cmds.c (list_commands): List actual code around more than
7827 one location.
7828
329d5e7e
JB
78292017-08-21 John Baldwin <jhb@FreeBSD.org>
7830
7831 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7832
bf223d3e
PA
78332017-08-21 Pedro Alves <palves@redhat.com>
7834
7835 PR gdb/19487
7836 * c-exp.y (variable production): Handle function aliases.
7837 * minsyms.c (msymbol_is_text): New function.
7838 * minsyms.h (msymbol_is_text): Declare.
7839 * symtab.c (find_function_alias_target): New function.
7840 * symtab.h (find_function_alias_target): Declare.
7841
c973d0aa
PA
78422017-08-21 Pedro Alves <palves@redhat.com>
7843
7844 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7845 typedefs.
7846 * typeprint.c (whatis_exp): If handling "whatis", and expression
7847 is OP_TYPE, strip one typedef level. Otherwise don't strip
7848 typedefs here.
7849 * valops.c (value_cast): Save "to" type before resolving
7850 stubs/typedefs. Use that type as resulting value's type.
7851
2989a365
TT
78522017-08-18 Tom Tromey <tom@tromey.com>
7853 Pedro Alves <palves@redhat.com>
7854
7855 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7856 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7857 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7858 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7859 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7860 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7861 (linux_get_siginfo_data): Add "thread" argument. Use
7862 scoped_restore.
7863 * linux-nat.c (linux_child_follow_fork)
7864 (check_stopped_by_watchpoint): Use scoped_restore.
7865 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7866 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7867 (restore_inferior_ptid, save_inferior_ptid): Remove.
7868 * btrace.c (btrace_fetch): Use scoped_restore.
7869 * bsd-uthread.c (bsd_uthread_fetch_registers)
7870 (bsd_uthread_store_registers): Use scoped_restore.
7871 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7872 scoped_restore.
7873 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7874 (aix_thread_xfer_partial): Use scoped_restore.
7875 * inferior.h (save_inferior_ptid): Remove.
7876
e60eb288
YQ
78772017-08-18 Yao Qi <yao.qi@linaro.org>
7878
7879 PR tdep/21818
7880 * arm-tdep.c (gdb_print_insn_arm): Mark
7881 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7882
6d580b63
YQ
78832017-08-18 Yao Qi <yao.qi@linaro.org>
7884
7885 * NEWS: Mention GDBserver's new option "--selftest".
7886 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7887 * selftest.c: Move it to common/selftest.c.
7888 * selftest.h: Move it to common/selftest.h.
7889 * selftest-arch.c (reset): New function.
7890 (tests_with_arch): Call reset.
7891
86dcbf50
YQ
78922017-08-18 Yao Qi <yao.qi@linaro.org>
7893
7894 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7895 instead of exception_fprintf and printf_filtered.
7896
7649770c
YQ
78972017-08-18 Yao Qi <yao.qi@linaro.org>
7898
7899 * selftest.c (register_self_test): Rename it to
7900 selftests::register_test.
7901 (run_self_tests): selftest::run_tests.
7902 * selftest.h: Update declarations.
7903 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7904 selftests::register_test_foreach_arch.
7905 * selftest-arch.h: Update declaration.
7906 * aarch64-tdep.c: Update.
7907 * arm-tdep.c: Likewise.
7908 * disasm-selftests.c: Likewise.
7909 * dwarf2loc.c: Likewise.
7910 * dwarf2-frame.c: Likewise.
7911 * findvar.c: Likewise.
7912 * gdbarch-selftests.c: Likewise.
7913 * maint.c (maintenance_selftest): Likewise.
7914 * regcache.c: Likewise.
7915 * rust-exp.y: Likewise.
7916 * selftest-arch.c: Likewise.
7917 * unittests/environ-selftests.c: Likewise.
7918 * unittests/function-view-selftests.c: Likewise.
7919 * unittests/offset-type-selftests.c: Likewise.
7920 * unittests/optional-selftests.c: Likewise.
7921 * unittests/scoped_restore-selftests.c: Likewise.
7922 * utils-selftests.c: Likewise.
7923
b0cba12e
PA
79242017-08-17 Pedro Alves <palves@redhat.com>
7925
7926 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7927 local.
7928
4c8aa72d
PA
79292017-08-17 Pedro Alves <palves@redhat.com>
7930
7931 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7932 field.
7933 (reset_die_in_process): Delete, replaced by ...
7934 (process_die_scope): ... this new class. Make it responsible for
7935 freeing cu->line_header too.
7936 (process_die): Use process_die_scope.
7937 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7938 cu->line_header_die_owner. Don't release the line header if it's
7939 owned by the CU.
7940 (setup_type_unit_groups): Make the CU/DIE own the line header.
7941 Don't release the line header here.
7942
ba713918
AL
79432017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7944
7945 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7946
44d0fb3a
RK
79472017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7948
7949 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7950 Single-Key mode
7951
a5afdb16
RK
79522017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7953
7954 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7955 mode command list.
7956
47613aeb
SH
79572017-08-15 Stafford Horne <shorne@gmail.com>
7958
7959 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7960
9c3cc999
SH
79612017-08-15 Stafford Horne <shorne@gmail.com>
7962
7963 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7964
206726fb
SDJ
79652017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7966
7967 PR gdb/21954
7968 * infcmd.c (unset_environment_command): Use the 'clear' method on
7969 the environment instead of resetting it.
7970
0335ac6d
JB
79712017-08-15 John Baldwin <jhb@FreeBSD.org>
7972
7973 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7974 platforms.
7975
d3abe1c8
TT
79762017-08-14 Tom Tromey <tom@tromey.com>
7977
7978 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7979 (print_binary_chars): Likewise.
7980 (BITS_IN_BYTES): Remove.
7981
d6382fff
TT
79822017-08-14 Tom Tromey <tom@tromey.com>
7983
7984 PR gdb/21675
7985 * valprint.c (LOW_ZERO): Change value to 034.
7986 (print_octal_chars): Add static_asserts for octal constants.
7987 * printcmd.c (print_scalar_formatted): Add 'd' case.
7988
f978cb06
TT
79892017-08-11 Tom Tromey <tom@tromey.com>
7990
7991 * symfile.c (add_symbol_file_command): Use std::vector.
7992
2f5404b3
TT
79932017-08-14 Tom Tromey <tom@tromey.com>
7994
7995 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7996 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7997 std::move.
7998 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7999
de7985c3
PA
80002017-08-11 Pedro Alves <palves@redhat.com>
8001
8002 * infrun.c (process_event_stop_test): Adjust
8003 function_name_is_marked_for_skip call.
8004 * skip.c: Include <list>.
8005 (skiplist_entry): Make it a class with private fields, and
8006 getters/setters.
8007 (skiplist_entry_chain): Delete.
8008 (skiplist_entries): New.
8009 (skiplist_entry_count): Delete.
8010 (highest_skiplist_entry_num): New.
8011 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8012 (add_skiplist_entry): Delete.
8013 (skiplist_entry::skiplist_entry): New.
8014 (skiplist_entry::add_entry): New.
8015 (skip_file_command, skip_function): Adjust.
8016 (compile_skip_regexp): Delete.
8017 (skip_command): Don't compile regexp here. Adjust to use
8018 skiplist_entry::add_entry.
8019 (skip_info): Adjust to use range-for and getters.
8020 (skip_enable_command, skip_disable_command): Adjust to use
8021 range-for and setters.
8022 (skip_delete_command): Adjust to use std::list.
8023 (add_skiplist_entry): Delete.
8024 (skip_file_p): Delete, refactored as ...
8025 (skiplist_entry::do_skip_file_p): ... this new method.
8026 (skip_gfile_p): Delete, refactored as ...
8027 (skiplist_entry::do_gskip_file_p): ... this new method.
8028 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8029 (skiplist_entry::skip_function_p): ... this new method.
8030 (function_name_is_marked_for_skip): Now returns bool, and takes
8031 the function sal by const reference. Adjust to use range-for and
8032 skiplist_entry methods.
8033 (_initialize_step_skip): Remove references to
8034 skiplist_entry_chain, skiplist_entry_count.
8035 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8036 takes the function sal by const reference.
8037
be7d3cd5
YQ
80382017-08-11 Yao Qi <yao.qi@linaro.org>
8039
8040 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8041 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8042 (dwarf2_frame_cache):
8043 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8044 RETURN_MASK_ALL and set *this_case to NULL.
8045 * frame-unwind.h: Update comments.
8046
1c90d9f0
YQ
80472017-08-11 Yao Qi <yao.qi@linaro.org>
8048
8049 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8050 (dwarf2_frame_state_copy_regs): Remove.
8051 (dwarf2_frame_state_free_regs): Remove.
8052 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8053 (dwarf2_restore_rule): Call method .alloc_regs instead of
8054 dwarf2_frame_state_alloc_regs.
8055 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8056 constructor. Call std::move.
8057 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8058 (dwarf2_frame_cache): Likewise.
8059
8060 [GDB_SELF_TEST]: Include selftest.h and
8061 selftest-arch.h.
8062 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8063 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8064 execute_cfa_program_test.
8065
8066 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8067 copy ctor, assignment operator, move assignment.
8068 <alloc_regs>: New method.
8069 <swap>: New method.
8070 (struct dwarf2_frame_state): Delete dtor.
8071 (dwarf2_frame_state_alloc_regs): Remove declaration.
8072 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8073 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8074
afe37d6b
YQ
80752017-08-11 Yao Qi <yao.qi@linaro.org>
8076
8077 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8078 (dwarf2_frame_state::dwarf2_frame_state): New.
8079 (dwarf2_frame_state::~dwarf2_frame_state): New.
8080 (dwarf2_fetch_cfa_info): Update.
8081 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8082 rather than a pointer. Update code.
8083 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8084 dtor.
8085 <data_align, code_align, retaddr_column>: Change them to const.
8086 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8087 to bool.
8088
b348037f
YQ
80892017-08-11 Yao Qi <yao.qi@linaro.org>
8090
8091 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8092 <loc.exp>: New field.
8093 * dwarf2-frame.c (execute_cfa_program): Update.
8094 (dwarf2_frame_prev_register): Update.
8095
e7c9de26
PA
80962017-08-10 Pedro Alves <palves@redhat.com>
8097
8098 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8099
e8c6b620
JB
81002017-08-09 John Baldwin <jhb@FreeBSD.org>
8101
8102 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8103 (fbsd_pending_children): Use std::list.
8104 (fbsd_remember_child): Likewise.
8105 (fbsd_is_child_pending): Likewise.
8106 (fbsd_pending_vfork_done): Use std::forward_list.
8107 (fbsd_add_vfork_done): Likewise.
8108 (fbsd_is_vfork_done_pending): Likewise.
8109 (fbsd_next_vfork_done): Likewise.
8110
e4a26669
JB
81112017-08-09 John Baldwin <jhb@FreeBSD.org>
8112
8113 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8114 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8115 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8116 for `mapfilename'.
8117 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8118 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8119
142311d3
JB
81202017-08-09 John Baldwin <jhb@FreeBSD.org>
8121
8122 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8123 "filestuff.h".
8124 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8125
42fa2e0e
TT
81262017-08-09 Tom Tromey <tom@tromey.com>
8127
8128 * skip.c (skiplist_entry): New constructor.
8129 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8130 (skiplist_entry::file_is_glob): Now bool.
8131 (skiplist_entry::file, skiplist_entry::function): Now
8132 std::string.
8133 (make_skip_entry): Return a unique_ptr. Use new.
8134 (free_skiplist_entry, free_skiplist_entry_cleanup)
8135 (make_free_skiplist_entry_cleanup): Remove.
8136 (skip_command, skip_disable_command, add_skiplist_entry)
8137 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8138 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8139 (function_name_is_marked_for_skip): Update.
8140 (skip_delete_command): Update. Use delete.
8141
cd3af38d
JW
81422017-08-09 Jiong Wang <jiong.wang@arm.com>
8143
8144 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8145 (aarch64_linux_core_read_description): New function.
8146 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8147
29592bde
PA
81482017-08-09 Pedro Alves <palves@redhat.com>
8149
8150 * cp-name-parser.y (cp_comp_to_string): Return a
8151 gdb::unique_xmalloc_ptr<char>.
8152 * cp-support.c (replace_typedefs_qualified_name)
8153 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8154 (cp_canonicalize_string_full): Use op= instead of explicit
8155 convertion.
8156 (cp_class_name_from_physname, method_name_from_physname)
8157 (cp_func_name, cp_remove_params): Adjust to use
8158 gdb::unique_xmalloc_ptr<char>.
8159 * cp-support.h (cp_comp_to_string): Return a
8160 gdb::unique_xmalloc_ptr<char>.
8161 * python/py-type.c (typy_lookup_type): Adjust to use
8162 gdb::unique_xmalloc_ptr<char>.
8163
b3340438
L
81642017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8165
8166 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8167
e88e8651
YQ
81682017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8169 Yao Qi <yao.qi@linaro.org>
8170
8171 * cp-support.c (cp_canonicalize_string_full): Use
8172 gdb::unique_xmalloc_ptr<char>.
8173 (cp_canonicalize_string): Likewise.
8174
f5a29eb0
YQ
81752017-08-09 Yao Qi <yao.qi@linaro.org>
8176
8177 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8178 * regformats/i386/amd64-avx-avx512.dat: Remove.
8179 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8180 * regformats/i386/amd64-avx-mpx.dat:Remove.
8181 * regformats/i386/amd64-avx.dat: Remove.
8182 * regformats/i386/amd64-mpx.dat: Remove.
8183 * regformats/i386/i386-avx-avx512.dat: Remove.
8184 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8185 * regformats/i386/i386-avx-mpx.dat: Remove.
8186 * regformats/i386/i386-mmx.dat: Remove.
8187 * regformats/i386/i386-mpx.dat: Remove.
8188
57757c2f
YQ
81892017-08-09 Yao Qi <yao.qi@linaro.org>
8190
8191 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8192 * amd64-tdep.c: Don't include features/i386/x32*.c.
8193 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8194 functions.
8195 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8196 and i386/x32-avx-avx512.
8197 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8198 and i386/x32.xml.
8199 * features/i386/x32-avx-avx512.c: Removed.
8200 * features/i386/x32-avx-avx512.xml: Removed.
8201 * features/i386/x32-avx.c: Removed.
8202 * features/i386/x32-avx.xml: Removed.
8203 * features/i386/x32.c: Removed.
8204 * features/i386/x32.xml: Removed.
8205 * regformats/i386/x32-avx-avx512.dat: Removed.
8206 * regformats/i386/x32-avx.dat: Removed.
8207 * regformats/i386/x32.dat: Removed.
8208
ba7b109b
MR
82092017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8210
8211 PR breakpoints/21886
8212 * mem-break.c (default_memory_insert_breakpoint): Use
8213 `->placed_address' rather than `->reqstd_address' for the
8214 breakpoint location.
8215
e347efc3
MR
82162017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8217
8218 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8219 assertions.
8220
0dba2a6c
MR
82212017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8222
8223 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8224 a union of `tdep_info', `tdesc_data' and `id'.
8225 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8226 rather than `info.tdep_info'.
8227 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8228 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8229 * i386-tdep.c (i386_gdbarch_init): Likewise.
8230 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8231 * mips-tdep.c (mips_gdbarch_init): Likewise.
8232 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8233 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8234 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8235 `info.tdep_info'.
8236 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8237 `info.tdep_info'.
8238 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8239 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8240 `info.tdep_info'.
8241 * spu-tdep.c (spu_gdbarch_init): Likewise.
8242 * gdbarch.h: Regenerate.
8243
16eb6b2d
LS
82442017-08-07 Leszek Swirski <leszeks@google.com>
8245
7b005726 8246 PR symtab/20899
16eb6b2d
LS
8247 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8248
74cbb09e
SM
82492017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8250
8251 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8252 (gdbsim_open): Rename gdb_argv args object to argv.
8253
ee0c3293
TT
82542017-08-05 Tom Tromey <tom@tromey.com>
8255
8256 * compile/compile-object-load.c (compile_object_load): Use
8257 gdb::unique_xmalloc_ptr.
8258 * cli/cli-dump.c (scan_filename): Rename from
8259 scan_filename_with_cleanup. Change return type.
8260 (scan_expression): Rename from scan_expression_with_cleanup.
8261 Change return type.
8262 (dump_memory_to_file, dump_value_to_file, restore_command):
8263 Use gdb::unique_xmalloc_ptr. Update.
8264 * cli/cli-cmds.c (find_and_open_script): Use
8265 gdb::unique_xmalloc_ptr.
8266 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8267 * symmisc.c (maintenance_print_symbols)
8268 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8269 * symfile.c (symfile_bfd_open, generic_load)
8270 (add_symbol_file_command, remove_symbol_file_command): Use
8271 gdb::unique_xmalloc_ptr.
8272 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8273 * psymtab.c (maintenance_print_psymbols): Use
8274 gdb::unique_xmalloc_ptr.
8275 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8276 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8277 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8278 (reload_shared_libraries_1): Likewise.
8279
3232fabd
TT
82802017-08-05 Tom Tromey <tom@tromey.com>
8281
8282 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8283 (rust_op_vector, rust_set_vector): New typedefs.
8284 (current_parser): New global.
8285 (work_obstack): Change to pointer type. Update all users.
8286 (rust_ast, pstate): Remove globals.
8287 (struct rust_parser): New.
8288 (%union) <params, field_inits>: Change type.
8289 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8290 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8291 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8292 (convert_params_to_types, convert_params_to_expression): Change
8293 type of "params".
8294 (ast_string): Change type of "fields".
8295 (rust_parse): Make a rust_parser. Remove cleanups.
8296 (rust_lex_tests): Make and install an auto_obstack.
8297
f02fd774
YQ
82982017-08-04 Yao Qi <yao.qi@linaro.org>
8299
8300 * configure.srv (ipa_x32_linux_regobj): New.
8301 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8302 instead of X86_TDESC_AVX512.
8303 (initialize_low_tracepoint): Call
8304 init_registers_x32_avx_avx512_linux.
8305
91975afd
YQ
83062017-08-04 Yao Qi <yao.qi@linaro.org>
8307
8308 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8309
2331fa3a
RK
83102017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8311
8312 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8313
744e4fe1
TT
83142017-08-03 Tom Tromey <tom@tromey.com>
8315
8316 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8317 Remove.
8318 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8319
1c034b67
TT
83202017-08-03 Tom Tromey <tom@tromey.com>
8321
8322 * python/py-param.c (compute_enum_values): Use gdb_argv.
8323
773a1edc
TT
83242017-08-03 Tom Tromey <tom@tromey.com>
8325
8326 * utils.h (struct gdb_argv_deleter): New.
8327 (gdb_argv): New class.
8328 * utils.c (gdb_argv::reset): New method.
8329 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8330 * tracefile.c (tsave_command): Use gdb_argv.
8331 * top.c (new_ui_command): Use gdb_argv.
8332 * symmisc.c (maintenance_print_symbols)
8333 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8334 * symfile.c (symbol_file_command, generic_load)
8335 (remove_symbol_file_command): Use gdb_argv.
8336 * stack.c (backtrace_command): Use gdb_argv.
8337 * source.c (add_path, show_substitute_path_command)
8338 (unset_substitute_path_command, set_substitute_path_command):
8339 Use gdb_argv.
8340 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8341 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8342 * remote.c (extended_remote_run, remote_put_command)
8343 (remote_get_command, remote_delete_command): Use gdb_argv.
8344 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8345 (gdbsim_open): Use gdb_argv.
8346 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8347 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8348 * procfs.c (procfs_info_proc): Use gdb_argv.
8349 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8350 * infrun.c (handle_command): Use gdb_argv.
8351 * inferior.c (add_inferior_command, clone_inferior_command):
8352 Use gdb_argv.
8353 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8354 * exec.c (exec_file_command): Use gdb_argv.
8355 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8356 * compile/compile.c (build_argc_argv): Use gdb_argv.
8357
0d50bde3
TT
83582017-08-03 Tom Tromey <tom@tromey.com>
8359
8360 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8361
7f968c89
TT
83622017-08-03 Tom Tromey <tom@tromey.com>
8363
8364 * python/python.c (compute_python_string): Return std::string.
8365 (gdbpy_eval_from_control_command): Update.
8366 (do_start_initialization): Use std::string.
8367 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8368 xstrprintf.
8369 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8370 xstrprintf.
8371
3c9ebddd
TT
83722017-08-03 Tom Tromey <tom@tromey.com>
8373
8374 * top.h (do_restore_instream_cleanup): Remove.
8375 * top.c (do_restore_instream_cleanup): Remove.
8376 (read_command_file): Use scoped_restore.
8377 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8378
b51b225e
TT
83792017-08-03 Tom Tromey <tom@tromey.com>
8380
8381 * cli/cli-script.c (execute_user_command)
8382 (execute_control_command): Use scoped_restore.
8383
ac991630
TT
83842017-08-03 Tom Tromey <tom@tromey.com>
8385
8386 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8387 (execute_user_command): Remove user_call_depth; use
8388 user_args_stack's size instead.
8389
898e0c8e
TT
83902017-08-03 Tom Tromey <tom@tromey.com>
8391
8392 * top.h (in_user_command): Remove.
8393 * top.c (in_user_command): Remove.
8394 * cli/cli-script.c (do_restore_user_call_depth)
8395 (execute_user_command): Update.
8396
26fcd5d7
TT
83972017-08-03 Tom Tromey <tom@tromey.com>
8398
8399 * valops.c (search_struct_method): Use gdb::byte_vector.
8400 * valarith.c (value_concat): Use std::vector.
8401 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8402 (simple_search_memory): Likewise.
8403 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8404 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8405 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8406 * elfread.c (elf_rel_plt_read): Use std::string.
8407 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8408 * cli/cli-dump.c (restore_section_callback): Use
8409 gdb::byte_vector.
8410
7c218e6c
TT
84112017-08-03 Tom Tromey <tom@tromey.com>
8412
8413 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8414
31b68d4a
TT
84152017-08-03 Tom Tromey <tom@tromey.com>
8416
8417 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8418 (tui_register_format): Use scoped_restore.
8419
2ec845e7
TT
84202017-08-03 Tom Tromey <tom@tromey.com>
8421
8422 * reverse.c (exec_direction_default): Remove.
8423 (exec_reverse_once): Use scoped_restore.
8424 * remote.c (restore_remote_timeout): Remove.
8425 (remote_flash_erase, remote_flash_write, remote_flash_done)
8426 (readchar, remote_serial_write): Use scoped_restore.
8427 * cli/cli-script.c (struct source_cleanup_lines_args)
8428 (source_cleanup_lines): Remove.
8429 (script_from_file): Use scoped_restore.
8430 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8431 (source_command): Use scoped_restore.
8432
b3bc8453
TT
84332017-08-03 Tom Tromey <tom@tromey.com>
8434
8435 * utils.h (make_cleanup_free_so): Remove.
8436 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8437 * solist.h (struct so_deleter): New.
8438 (so_list_up): New typedef.
8439 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8440
e3ad2841
TT
84412017-08-03 Tom Tromey <tom@tromey.com>
8442
8443 * utils.h (make_cleanup_restore_current_language): Remove.
8444 * utils.c (do_restore_current_language)
8445 (make_cleanup_restore_current_language): Remove.
8446 * parse.c (parse_exp_in_context_1)
8447 (parse_expression_with_language): Use
8448 scoped_restore_current_language.
8449 * mi/mi-main.c (mi_cmd_execute): Use
8450 scoped_restore_current_language.
8451 * language.h (scoped_restore_current_language): New class.
8452
b80cf838
TT
84532017-08-03 Tom Tromey <tom@tromey.com>
8454
8455 * compile/compile.c (cleanup_unlink_file): Remove.
8456 (compile_to_object): Use gdb::unlinker.
8457 (eval_compile_command): Likewise.
8458
fad0444a
TT
84592017-08-03 Tom Tromey <tom@tromey.com>
8460
8461 * utils.h (make_cleanup_fclose): Remove.
8462 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8463
6e7bc05c
TT
84642017-08-03 Tom Tromey <tom@tromey.com>
8465
8466 * top.c (open_terminal_stream): Return gdb_file_up.
8467 (new_ui_command): Update.
8468
4a45905b
TT
84692017-08-03 Tom Tromey <tom@tromey.com>
8470
8471 * source.c (print_source_lines_base, forward_search_command)
8472 (reverse_search_command): Use gdb_file_up.
8473
7cd06d6e
TT
84742017-08-03 Tom Tromey <tom@tromey.com>
8475
8476 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8477
ed166945
TT
84782017-08-03 Tom Tromey <tom@tromey.com>
8479
8480 * cli/cli-cmds.c (find_and_open_script): Change return type.
8481 Remove "streamp" and "full_path" parameters.
8482 (source_script_with_search): Update.
8483 * auto-load.c (source_script_file): Update.
8484 * cli/cli-cmds.h (find_and_open_script): Change type.
8485 (open_script): New struct.
8486
d419f42d
TT
84872017-08-03 Tom Tromey <tom@tromey.com>
8488
8489 * xml-support.c (xml_fetch_content_from_file): Update.
8490 * ui-file.c (stdio_file::open): Update.
8491 * tracefile-tfile.c (tfile_start): Update.
8492 * remote.c (remote_file_put, remote_file_get): Update.
8493 * nat/linux-procfs.c (linux_proc_get_int)
8494 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8495 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8496 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8497 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8498 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8499 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8500 * linux-nat.c (linux_proc_pending_signals): Update.
8501 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8502 (file_closer): Remove.
8503 * compile/compile.c (compile_to_object): Update.
8504 * common/filestuff.h (struct gdb_file_deleter): New.
8505 (gdb_file_up): New typedef.
8506 (gdb_fopen_cloexec): Change return type.
8507 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8508 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8509 (dump_binary_file, restore_binary_file): Update.
8510 * auto-load.c (auto_load_objfile_script_1): Update.
8511
4a2b031d
TT
85122017-08-03 Tom Tromey <tom@tromey.com>
8513
8514 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8515 (info_static_tracepoint_markers_command): Likewise.
8516 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8517 * skip.c (skip_info): Use ui_out_emit_table.
8518 * progspace.c (print_program_space): Use ui_out_emit_table.
8519 * osdata.c (info_osdata): Use ui_out_emit_table.
8520 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8521 ui_out_emit_table.
8522 * linux-thread-db.c (info_auto_load_libthread_db): Use
8523 ui_out_emit_table.
8524 * inferior.c (print_inferior): Use ui_out_emit_table.
8525 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8526 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8527 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8528 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8529 * ui-out.h (class ui_out_emit_table): New.
8530
a4f320fd
MR
85312017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8532
8533 * mips-tdep.c (mips_fpu_type_str): New function.
8534 (mips_dump_tdep): Call it.
8535
a2f1f308
MR
85362017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8537
8538 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8539 `->mips_fpu_type'.
8540
7e5ed83b
XR
85412017-07-31 Xavier Roirand <roirand@adacore.com>
8542
8543 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8544
4c9dc811
XR
85452017-07-27 Xavier Roirand <roirand@adacore.com>
8546
8547 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8548
27d41eac
YQ
85492017-07-26 Yao Qi <yao.qi@linaro.org>
8550
8551 * cli/cli-cmds.c (maintenancechecklist): New variable.
8552 * gdbcmd.h (maintenancechecklist): Declare it.
8553 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8554 Call i386_linux_read_description with different masks.
8555 * maint.c (maintenance_check_command): New function.
8556 (_initialize_maint_cmds): Call add_prefix_cmd.
8557 * target-descriptions.c (tdesc_reg): override operator != and ==.
8558 (tdesc_type): Likewise.
8559 (tdesc_feature): Likewise.
8560 (target_desc): Likewise.
8561 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8562 (maintenance_check_xml_descriptions): New function.
8563 (_initialize_target_descriptions) Add command "xml-descriptions".
8564 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8565
ea03d0d3
YQ
85662017-07-26 Yao Qi <yao.qi@linaro.org>
8567
8568 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8569 Include features/i386/32bit-*.c.
8570 (i386_linux_read_description): Generate target description if it
8571 doesn't exist.
8572 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8573 functions.
8574 * features/i386/32bit-linux.c: Re-generated.
8575 * features/i386/32bit-sse.c: Likewise.
8576 * target-descriptions.c (print_c_feature::visit): Print code to
8577 set register number if needed.
8578 (print_c_feature) <m_next_regnum>: New field.
8579
25aa13e5
YQ
85802017-07-26 Yao Qi <yao.qi@linaro.org>
8581
8582 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8583 (FEATURE_XMLFILES): New.
8584 (FEATURE_CFILES): New.
8585 New rules.
8586 (clean-cfiles): Remove generated c files.
8587 * features/i386/32bit-avx.c: Generated.
8588 * features/i386/32bit-avx512.c: Generated.
8589 * features/i386/32bit-core.c: Generated.
8590 * features/i386/32bit-linux.c: Generated.
8591 * features/i386/32bit-mpx.c: Generated.
8592 * features/i386/32bit-pkeys.c: Generated.
8593 * features/i386/32bit-sse.c: Generated.
8594 * target-descriptions.c: Include algorithm.
8595 (tdesc_element_visitor): Add method visit_end.
8596 (print_c_tdesc): Implement visit_end.
8597 (print_c_tdesc:: m_filename_after_features): Move it to
8598 protected.
8599 (print_c_feature): New class.
8600 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8601 name starts with "i386/32bit-".
8602
6eb1e6a8
YQ
86032017-07-26 Yao Qi <yao.qi@linaro.org>
8604
8605 * target-descriptions.c (tdesc_element_visitor): New class.
8606 (tdesc_element): New class.
8607 (tdesc_reg): Inherit from tdesc_element.
8608 (tdesc_reg::accept): New function.
8609 (tdesc_type): Inherit from tdesc_element.
8610 (tdesc_type::accept): New function.
8611 (tdesc_feature): Inherit from tdesc_element.
8612 (tdesc_feature::accept): New function.
8613 (target_desc): Inherit from tdesc_element.
8614 (target_desc::target_desc): New.
8615 (target_desc::~target_desc): New.
8616 (target_desc::accept): New.
8617 (allocate_target_description): Use new.
8618 (free_target_description): Use delete.
8619 (print_c_tdesc): New class.
8620 (maint_print_c_tdesc_cmd): Adjust.
8621
8622 * features/aarch64.c: Re-generated.
8623 * features/arc-arcompact.c: Re-generated.
8624 * features/arc-v2.c: Re-generated.
8625 * features/arm/arm-with-iwmmxt.c: Re-generated.
8626 * features/arm/arm-with-m.c: Re-generated.
8627 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8628 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8629 * features/arm/arm-with-neon.c: Re-generated.
8630 * features/arm/arm-with-vfpv2.c: Re-generated.
8631 * features/arm/arm-with-vfpv3.c: Re-generated.
8632 * features/i386/amd64-avx-avx512.c: Re-generated.
8633 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8634 * features/i386/amd64-avx.c: Re-generated.
8635 * features/i386/amd64-avx-linux.c: Re-generated.
8636 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8637 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8638 * features/i386/amd64-avx-mpx.c: Re-generated.
8639 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8640 * features/i386/amd64.c: Re-generated.
8641 * features/i386/amd64-linux.c: Re-generated.
8642 * features/i386/amd64-mpx.c: Re-generated.
8643 * features/i386/amd64-mpx-linux.c: Re-generated.
8644 * features/i386/i386-avx-avx512.c: Re-generated.
8645 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8646 * features/i386/i386-avx.c: Re-generated.
8647 * features/i386/i386-avx-linux.c: Re-generated.
8648 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8649 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8650 * features/i386/i386-avx-mpx.c: Re-generated.
8651 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8652 * features/i386/i386.c: Re-generated.
8653 * features/i386/i386-linux.c: Re-generated.
8654 * features/i386/i386-mmx.c: Re-generated.
8655 * features/i386/i386-mmx-linux.c: Re-generated.
8656 * features/i386/i386-mpx.c: Re-generated.
8657 * features/i386/i386-mpx-linux.c: Re-generated.
8658 * features/i386/x32-avx-avx512.c: Re-generated.
8659 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8660 * features/i386/x32-avx.c: Re-generated.
8661 * features/i386/x32-avx-linux.c: Re-generated.
8662 * features/i386/x32.c: Re-generated.
8663 * features/i386/x32-linux.c: Re-generated.
8664 * features/microblaze.c: Re-generated.
8665 * features/microblaze-with-stack-protect.c: Re-generated.
8666 * features/mips64-dsp-linux.c: Re-generated.
8667 * features/mips64-linux.c: Re-generated.
8668 * features/mips-dsp-linux.c: Re-generated.
8669 * features/mips-linux.c: Re-generated.
8670 * features/nds32.c: Re-generated.
8671 * features/nios2.c: Re-generated.
8672 * features/nios2-linux.c: Re-generated.
8673 * features/rs6000/powerpc-32.c: Re-generated.
8674 * features/rs6000/powerpc-32l.c: Re-generated.
8675 * features/rs6000/powerpc-403.c: Re-generated.
8676 * features/rs6000/powerpc-403gc.c : Re-generated.
8677 * features/rs6000/powerpc-405.c: Re-generated.
8678 * features/rs6000/powerpc-505.c: Re-generated.
8679 * features/rs6000/powerpc-601.c: Re-generated.
8680 * features/rs6000/powerpc-602.c: Re-generated.
8681 * features/rs6000/powerpc-603.c: Re-generated.
8682 * features/rs6000/powerpc-604.c: Re-generated.
8683 * features/rs6000/powerpc-64.c: Re-generated.
8684 * features/rs6000/powerpc-64l.c: Re-generated.
8685 * features/rs6000/powerpc-7400.c: Re-generated.
8686 * features/rs6000/powerpc-750.c: Re-generated.
8687 * features/rs6000/powerpc-860.c: Re-generated.
8688 * features/rs6000/powerpc-altivec32.c: Re-generated.
8689 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8690 * features/rs6000/powerpc-altivec64.c: Re-generated.
8691 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8692 * features/rs6000/powerpc-cell32l.c: Re-generated.
8693 * features/rs6000/powerpc-cell64l.c: Re-generated.
8694 * features/rs6000/powerpc-e500.c: Re-generated.
8695 * features/rs6000/powerpc-e500l.c: Re-generated.
8696 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8697 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8698 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8699 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8700 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8701 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8702 * features/rs6000/powerpc-vsx32.c: Re-generated.
8703 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8704 * features/rs6000/powerpc-vsx64.c: Re-generated.
8705 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8706 * features/rs6000/rs6000.c: Re-generated.
8707 * features/s390-linux32.c: Re-generated.
8708 * features/s390-linux32v1.c: Re-generated.
8709 * features/s390-linux32v2.c: Re-generated.
8710 * features/s390-linux64.c: Re-generated.
8711 * features/s390-linux64v1.c: Re-generated.
8712 * features/s390-linux64v2.c: Re-generated.
8713 * features/s390-te-linux64.c: Re-generated.
8714 * features/s390-tevx-linux64.c: Re-generated.
8715 * features/s390-vx-linux64.c: Re-generated.
8716 * features/s390x-linux64.c: Re-generated.
8717 * features/s390x-linux64v1.c: Re-generated.
8718 * features/s390x-linux64v2.c: Re-generated.
8719 * features/s390x-te-linux64.c: Re-generated.
8720 * features/s390x-tevx-linux64.c: Re-generated.
8721 * features/s390x-vx-linux64.c: Re-generated.
8722 * features/sparc/sparc32-solaris.c: Re-generated.
8723 * features/sparc/sparc64-solaris.c: Re-generated.
8724 * features/tic6x-c62x.c: Re-generated.
8725 * features/tic6x-c62x-linux.c: Re-generated.
8726 * features/tic6x-c64x.c: Re-generated.
8727 * features/tic6x-c64x-linux.c: Re-generated.
8728 * features/tic6x-c64xp.c: Re-generated.
8729 * features/tic6x-c64xp-linux.c: Re-generated.
8730
35b4818d
YQ
87312017-07-26 Yao Qi <yao.qi@linaro.org>
8732
8733 * i386-linux-tdep.c (i386_linux_read_description): New function.
8734 (i386_linux_core_read_description): Call
8735 i386_linux_read_description.
8736 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8737 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8738 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8739 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8740 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8741 * x86-linux-nat.c (x86_linux_read_description): Call
8742 i386_linux_read_description.
8743
8e2141c6
YQ
87442017-07-26 Yao Qi <yao.qi@linaro.org>
8745
8746 * NEWS: Mention it.
8747 * features/Makefile (%.c: %.xml): Pass the xml file name to
8748 command "maint print c-tdesc".
8749 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8750 name from 'arg'.
8751
b468ff4c
YQ
87522017-07-26 Yao Qi <yao.qi@linaro.org>
8753
8754 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8755 in-class initialization.
8756 (tdesc_create_feature): Call new instead of XCNEW.
8757 (free_target_description): Ue delete.
8758
b9c0e1b4
JB
87592017-07-25 John Baldwin <jhb@FreeBSD.org>
8760
8761 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8762
a04b5337
YQ
87632017-07-25 Yao Qi <yao.qi@linaro.org>
8764
8765 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8766 constant.
8767 (amd64_x32_init_abi): Likewise.
8768 * amd64-tdep.h (amd64_init_abi): Update declaration.
8769 (amd64_x32_init_abi): Likewise.
8770
02ad7fc2
YQ
87712017-07-25 Yao Qi <yao.qi@linaro.org>
8772
8773 PR tdep/21717
8774 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8775 condition for FPSCR.
8776 (arm_linux_store_inferior_registers): Likewise.
8777
b6f48cb0
TT
87782017-07-22 Tom Tromey <tom@tromey.com>
8779
8780 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8781 <syscalls_counts>: Now a std::vector.
8782 (get_catch_syscall_inferior_data): Use "new".
8783 (catch_syscall_inferior_data_cleanup): Use "delete".
8784 (insert_catch_syscall, remove_catch_syscall)
8785 (clear_syscall_counts): Update.
8786
e12c9b7a
TT
87872017-07-22 Tom Tromey <tom@tromey.com>
8788
8789 * break-catch-syscall.c (syscall_catchpoint)
8790 <syscalls_to_be_caught>: Now a std::vector<int>
8791 (~syscall_catchpoint): Remove.
8792 (insert_catch_syscall, remove_catch_syscall)
8793 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8794 (print_mention_catch_syscall, print_recreate_catch_syscall):
8795 Update.
8796 (create_syscall_event_catchpoint): Change type of "filter"
8797 parameter.
8798 (catch_syscall_split_args): Return a std::vector.
8799 (catch_syscall_command_1, catching_syscall_number_1): Update.
8800
4fa8aeac
TT
88012017-07-22 Tom Tromey <tom@tromey.com>
8802
8803 * break-catch-throw.c (struct exception_catchpoint)
8804 <exception_rx>: Now a std::string.
8805 (~exception_catchpoint): Remove.
8806 (print_one_detail_exception_catchpoint): Update.
8807 (handle_gnu_v3_exceptions): Change type of except_rx.
8808 (extract_exception_regexp): Return a std::string.
8809 (catch_exception_command_1): Update.
8810
f746a154
TT
88112017-07-22 Tom Tromey <tom@tromey.com>
8812
8813 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8814 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8815 std::vector.
8816 <catch_all>: Now a bool.
8817 (~signal_catchpoint): Remove.
8818 (signal_catchpoint_insert_location)
8819 (signal_catchpoint_remove_location)
8820 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8821 (signal_catchpoint_print_mention)
8822 (signal_catchpoint_print_recreate)
8823 (signal_catchpoint_explains_signal): Update.
8824 (create_signal_catchpoint): Change type of "filter" and
8825 "catch_all".
8826 (catch_signal_split_args): Return a std::vector. Change type of
8827 "catch_all".
8828 (catch_signal_command): Update.
8829
47e77640
PA
88302017-07-20 Pedro Alves <palves@redhat.com>
8831
8832 * ada-lang.c (ada_language_defn): Make extern.
8833 (_initialize_ada_language): Remove add_language call.
8834 * c-lang.c (c_language_defn, cplus_language_defn)
8835 (asm_language_defn, minimal_language_defn): Make extern.
8836 (_initialize_c_language): Delete.
8837 * completer.c (compare_cstrings): Delete, moved to utils.h.
8838 * d-lang.c (d_language_defn): Make extern.
8839 (_initialize_d_language): Remove add_language calls.
8840 * defs.h (enum language): Add comment.
8841 * f-lang.c (f_language_defn): Make extern.
8842 (_initialize_f_language): Remove add_language call.
8843 * go-lang.c (go_language_defn): Make extern.
8844 (_initialize_go_language): Remove add_language call.
8845 * language.c: Include <algorithm>.
8846 (languages): Redefine as const array.
8847 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8848 (set_language_command): Handle "local". Use for-range loop.
8849 (set_language): Remove loop.
8850 (language_enum): Rewrite.
8851 (language_def, language_str): Remove loops.
8852 (add_language): Delete.
8853 (add_set_language_command): New, based on add_languages.
8854 (skip_language_trampoline): Adjust.
8855 (local_language_defn): Delete.
8856 (language_gdbarch_post_init): Adjust.
8857 (_initialize_language): Remove add_language calls. Call
8858 add_set_language_command.
8859 * language.h (add_language): Delete.
8860 (auto_language_defn)
8861 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8862 (asm_language_defn, c_language_defn, cplus_language_defn)
8863 (d_language_defn, f_language_defn, go_language_defn)
8864 (m2_language_defn, objc_language_defn, opencl_language_defn)
8865 (pascal_language_defn, rust_language_defn): Declare.
8866 * m2-lang.c (m2_language_defn): Make extern.
8867 (_initialize_m2_language): Remove add_language call.
8868 * objc-lang.c (objc_language_defn): Make extern.
8869 (_initialize_objc_language): Remove add_language call.
8870 * opencl-lang.c (opencl_language_defn): Make extern.
8871 (_initialize_opencl_language): Remove add_language call.
8872 * p-lang.c (pascal_language_defn): Make extern.
8873 (_initialize_pascal_language): Delete.
8874 * rust-lang.c (rust_language_defn): Make extern.
8875 (_initialize_rust_language): Delete.
8876 * utils.h (compare_cstrings): New static inline function.
8877
edb0c9cb
PA
88782017-07-20 Pedro Alves <palves@redhat.com>
8879
8880 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8881 (get_var_value): Constify parameters.
8882 (get_int_var_value): Change prototype.
8883 (to_fixed_range_type): Adjust.
8884 * ada-lang.h (get_int_var_value): Change prototype.
8885
a778f165
PA
88862017-07-20 Pedro Alves <palves@redhat.com>
8887
8888 * dwarf2read.c (dw2_lookup_symbol): Use
8889 SYMBOL_MATCHES_SEARCH_NAME.
8890 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8891
42edd901
PA
88922017-07-20 Pedro Alves <palves@redhat.com>
8893
8894 * block.c (block_iter_name_step, block_iter_name_first)
8895 (block_iter_name_next): Delete.
8896 (block_lookup_symbol_primary): Adjust to use
8897 dict_iter_match_first/dict_iter_match_next.
8898 * block.h (block_iter_name_first, block_iter_name_next): Delete
8899 declarations.
8900 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8901 dict_iter_match_first/dict_iter_match_next.
8902
cf325299
PA
89032017-07-20 Pedro Alves <palves@redhat.com>
8904
8905 * cp-support.c (cp_find_first_component_aux): Add missing case for
8906 end of string.
8907
c5ed0576
DB
89082017-07-18 David Blaikie <dblaikie@gmail.com>
8909
8910 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8911 of dwo_cu's dwo_file.
8912
27841e76
YQ
89132017-07-18 Yao Qi <yao.qi@linaro.org>
8914
8915 * remote.c (store_registers_using_G): Remove one line comment.
8916
cfb7e58b
YQ
89172017-07-18 Yao Qi <yao.qi@linaro.org>
8918
8919 * regcache.c (regcache_cpy): Simplify it.
8920 (regcache::cpy_no_passthrough): Remove it.
8921 * regcache.h (cpy_no_passthrough): Remove it.
8922 (regcache_dup, regcache_cpy): Update comments.
8923
386535dd
PA
89242017-07-18 Pedro Alves <palves@redhat.com>
8925
8926 * remote-sim.c (sim_command_completer): Adjust to work with a
8927 completion_tracker instead of a VEC.
8928
c45ec17c
PA
89292017-07-17 Pedro Alves <palves@redhat.com>
8930
8931 * completer.c (complete_source_filenames): New function.
8932 (complete_address_and_linespec_locations): New function.
8933 (location_completer): Use complete_address_and_linespec_locations.
8934 (completion_tracker::build_completion_result): Honor the tracker's
8935 request to suppress append.
8936 * completer.h (completion_tracker::suppress_append_ws)
8937 (completion_tracker::set_suppress_append_ws): New methods.
8938 (completion_tracker::m_suppress_append_ws): New field.
8939 (complete_source_filenames): New declaration.
8940 * linespec.c (linespec_complete_what): New.
8941 (struct ls_parser) <complete_what, completion_word,
8942 completion_quote_char, completion_quote_end, completion_tracker>:
8943 New fields.
8944 (string_find_incomplete_keyword_at_end): New.
8945 (linespec_lexer_lex_string): Record quote char. If in completion
8946 mode, don't throw.
8947 (linespec_lexer_consume_token): Advance the completion word point.
8948 (linespec_lexer_peek_token): Save/restore completion info.
8949 (save_stream_and_consume_token): New.
8950 (set_completion_after_number): New.
8951 (linespec_parse_basic): Set what to complete next depending on
8952 token. Handle function and label completions specially.
8953 (parse_linespec): Disable objc shortcut in completion mode. Set
8954 what to complete next depending on token type. Skip keyword if in
8955 completion mode.
8956 (complete_linespec_component, linespec_complete): New.
8957 * linespec.h (linespec_complete): Declare.
8958
be966d42
PA
89592017-07-17 Pedro Alves <palves@redhat.com>
8960
8961 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8962 Handle 'operator<' / 'operator<<'.
8963
a2459270
PA
89642017-07-17 Pedro Alves <palves@redhat.com>
8965
8966 * completer.c (collect_explicit_location_matches): Handle
8967 MATCH_LABEL.
8968 (convert_explicit_location_to_linespec): New, factored out from
8969 ...
8970 (convert_explicit_location_to_sals): ... this.
8971 (complete_label): New.
8972 (linespec_complete_label, find_label_symbols_in_block): New.
8973 (find_label_symbols): Add completion_mode parameter and adjust to
8974 call find_label_symbols_in_block.
8975 * linespec.h (linespec_complete_label): Declare.
8976
c6756f62
PA
89772017-07-17 Pedro Alves <palves@redhat.com>
8978
8979 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8980 complete_symbol_mode parameter.
8981 * cli/cli-cmds.c (complete_command): Get the completion result out
8982 of the handle_brkchars tracker if used a custom word point.
8983 * completer.c: Include "linespec.h".
8984 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8985 (advance_to_expression_complete_word_point): New.
8986 (completion_tracker::completes_to_completion_word): New.
8987 (complete_files_symbols): Pass down
8988 complete_symbol_mode::EXPRESSION.
8989 (explicit_options, probe_options): New.
8990 (collect_explicit_location_matches): Complete on the
8991 explictit_loc->foo instead of word. Use
8992 linespec_complete_function. Handle MATCH_LINE. Handle offering
8993 keyword and options completions.
8994 (backup_text_ptr): Delete.
8995 (skip_keyword): New.
8996 (complete_explicit_location): Remove 'word' parameter. Add
8997 language, quoted_arg_start and quoted_arg_end parameters.
8998 Rewrite, parsing left to right.
8999 (location_completer): Rewrite.
9000 (location_completer_handle_brkchars): New function.
9001 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9002 (enum complete_line_internal_reason): Adjust comments.
9003 (completion_tracker::discard_completions): New.
9004 (completer_handle_brkchars_func_for_completer): Handle
9005 location_completer.
9006 (gdb_custom_word_point_brkchars)
9007 (gdb_org_rl_basic_quote_characters): New.
9008 (gdb_completion_word_break_characters_throw)
9009 (completion_find_completion_word): Handle trackers that use a
9010 custom word point.
9011 (completion_tracker::advance_custom_word_point_by): New.
9012 (completion_tracker::build_completion_result): Don't rely on
9013 readline appending the quote char.
9014 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9015 use a custom word point.
9016 (gdb_rl_attempted_completion_function): Restore
9017 rl_basic_quote_characters.
9018 * completer.h (class completion_tracker): Extend intro comment.
9019 (completion_tracker::set_quote_char)
9020 (completion_tracker::quote_char)
9021 (completion_tracker::set_use_custom_word_point)
9022 (completion_tracker::use_custom_word_point)
9023 (completion_tracker::custom_word_point)
9024 (completion_tracker::set_custom_word_point)
9025 (completion_tracker::advance_custom_word_point_by)
9026 (completion_tracker::completes_to_completion_word)
9027 (completion_tracker::discard_completions): New methods.
9028 (completion_tracker::m_quote_char)
9029 (completion_tracker::m_use_custom_word_point)
9030 (completion_tracker::m_custom_word_point): New fields.
9031 (advance_to_expression_complete_word_point): Declare.
9032 * f-lang.c (f_collect_symbol_completion_matches): Add
9033 complete_symbol_mode parameter.
9034 * language.h (struct language_defn)
9035 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9036 parameter.
9037 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9038 (linespec_complete_function): New function.
9039 (linespec_lexer_lex_keyword): Adjust.
9040 * linespec.h (linespec_keywords, linespec_complete_function): New
9041 declarations.
9042 * location.c (find_end_quote): New function.
9043 (explicit_location_lex_one): Add explicit_completion_info
9044 parameter. Save quoting info. Don't throw if being called for
9045 completion. Don't handle Ada operators here.
9046 (is_cp_operator, skip_op_false_positives, first_of)
9047 (explicit_location_lex_one_function): New function.
9048 (string_to_explicit_location): Replace 'dont_throw' parameter with
9049 an explicit_completion_info pointer parameter. Handle it. Don't
9050 use explicit_location_lex_one to lex function names. Use
9051 explicit_location_lex_one_function instead.
9052 * location.h (struct explicit_completion_info): New.
9053 (string_to_explicit_location): Replace 'dont_throw' parameter with
9054 an explicit_completion_info pointer parameter.
9055 * symtab.c (default_collect_symbol_completion_matches_break_on):
9056 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9057 (default_collect_symbol_completion_matches)
9058 (collect_symbol_completion_matches): Add complete_symbol_mode
9059 parameter.
9060 (collect_symbol_completion_matches_type): Pass down
9061 complete_symbol_mode::EXPRESSION.
9062 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9063 parameter. Handle LINESPEC mode.
9064 * symtab.h (complete_symbol_mode): New.
9065 (default_collect_symbol_completion_matches_break_on)
9066 (default_collect_symbol_completion_matches)
9067 (collect_symbol_completion_matches)
9068 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9069 parameter.
9070
1d550c82
PA
90712017-07-17 Pedro Alves <palves@redhat.com>
9072
9073 * utils.c (enum class strncmp_iw_mode): New.
9074 (strcmp_iw): Rename to ...
9075 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9076 parameters. Handle them.
9077 (strncmp_iw): New.
9078 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9079 * utils.h (strncmp_iw): Declare.
9080 (strcmp_iw): Move describing comments here.
9081
8090b426
PA
90822017-07-17 Pedro Alves <palves@redhat.com>
9083
9084 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9085 CP_OPERATOR_STR.
9086 * c-typeprint.c (is_type_conversion_operator): Use
9087 CP_OPERATOR_STR.
9088 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9089 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9090 CP_OPERATOR_LEN.
9091 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9092 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9093 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9094 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9095 CP_OPERATOR_STR.
9096 * location.c: Include "cp-support.h".
9097 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9098 CP_OPERATOR_STR.
9099 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9100 CP_OPERATOR_LEN.
9101
6a2c1b87
PA
91022017-07-17 Pedro Alves <palves@redhat.com>
9103
9104 * cli/cli-cmds.c (complete_command): Use a completion tracker
9105 along with completion_find_completion_word for handle_brkchars
9106 phase.
9107 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9108 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9109 (struct gdb_rl_completion_word_info): New.
9110 (gdb_rl_find_completion_word): New.
9111 (completion_find_completion_word): New.
9112 * completer.h (completion_find_completion_word): Declare.
9113
eb3ff9a5
PA
91142017-07-17 Pedro Alves <palves@redhat.com>
9115
9116 * ada-lang.c (symbol_completion_match): Adjust comments.
9117 (symbol_completion_add): Replace vector parameter with
9118 completion_tracker parameter. Use it.
9119 (ada_make_symbol_completion_list): Rename to...
9120 (ada_collect_symbol_completion_matches): ... this. Add
9121 completion_tracker parameter and use it.
9122 (ada_language_defn): Adjust.
9123 * break-catch-syscall.c (catch_syscall_completer): Adjust
9124 prototype and work with completion_tracker instead of VEC.
9125 * breakpoint.c (condition_completer): Adjust prototype and work
9126 with completion_tracker instead of VEC.
9127 * c-lang.c (c_language_defn, cplus_language_defn)
9128 (asm_language_defn, minimal_language_defn): Adjust to renames.
9129 * cli/cli-cmds.c (complete_command): Rework using
9130 completion_tracker. Catch exceptions when completing.
9131 * cli/cli-decode.c (integer_unlimited_completer)
9132 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9133 with completion_tracker instead of VEC.
9134 * command.h (struct completion_tracker): Forward declare.
9135 (completer_ftype, completer_handle_brkchars_ftype): Change
9136 types.
9137 (complete_on_cmdlist, complete_on_enum): Adjust.
9138 * completer.c: Include <algorithm>.
9139 (struct gdb_completer_state): New.
9140 (current_completion): New global.
9141 (readline_line_completion_function): Delete.
9142 (noop_completer, filename_completer)
9143 (filename_completer_handle_brkchars, complete_files_symbols)
9144 (linespec_location_completer): Adjust to work with a
9145 completion_tracker instead of a VEC.
9146 (string_or_empty): New.
9147 (collect_explicit_location_matches): Adjust to work with a
9148 completion_tracker instead of a VEC.
9149 (explicit_location_completer): Rename to ...
9150 (complete_explicit_location): ... this and adjust to work with a
9151 completion_tracker instead of a VEC.
9152 (location_completer): Adjust to work with a completion_tracker
9153 instead of a VEC.
9154 (add_struct_fields): Adjust to work with a completion_list instead
9155 of VEC.
9156 (expression_completer): Rename to ...
9157 (complete_expression): ... this and adjust to work with a
9158 completion_tracker instead of a VEC. Use complete_files_symbols.
9159 (expression_completer): Reimplement on top of complete_expression.
9160 (symbol_completer): Adjust to work with a completion_tracker
9161 instead of a VEC.
9162 (enum complete_line_internal_reason): Add describing comments.
9163 (complete_line_internal_normal_command): Adjust to work with a
9164 completion_tracker instead of a VEC.
9165 (complete_line_internal): Rename to ...
9166 (complete_line_internal_1): ... this and adjust to work with a
9167 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9168 handle_brkchars phase.
9169 (new_completion_tracker): Delete.
9170 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9171 complete_line_internal_1.
9172 (free_completion_tracker): Delete.
9173 (INITIAL_COMPLETION_HTAB_SIZE): New.
9174 (completion_tracker::completion_tracker)
9175 (completion_tracker::~completion_tracker): New.
9176 (maybe_add_completion): Delete.
9177 (completion_tracker::maybe_add_completion)
9178 (completion_tracker::add_completion)
9179 (completion_tracker::add_completions): New.
9180 (throw_max_completions_reached_error): Delete.
9181 (complete_line): Adjust to work with a completion_tracker instead
9182 of a VEC. Don't create a completion_tracker_t or check for max
9183 completions here.
9184 (command_completer, command_completer_handle_brkchars)
9185 (signal_completer, reg_or_group_completer_1)
9186 (reg_or_group_completer, default_completer_handle_brkchars):
9187 Adjust to work with a completion_tracker.
9188 (gdb_completion_word_break_characters_throw): New.
9189 (gdb_completion_word_break_characters): Reimplement.
9190 (line_completion_function): Delete.
9191 (completion_tracker::recompute_lowest_common_denominator)
9192 (expand_preserving_ws)
9193 (completion_tracker::build_completion_result)
9194 (completion_result::completion_result)
9195 (completion_result::completion_result)
9196 (completion_result::~completion_result)
9197 (completion_result::completion_result)
9198 (completion_result::release_match_list, compare_cstrings)
9199 (completion_result::sort_match_list)
9200 (completion_result::reset_match_list)
9201 (gdb_rl_attempted_completion_function_throw)
9202 (gdb_rl_attempted_completion_function): New.
9203 * completer.h (completion_list, struct completion_result)
9204 (class completion_tracker): New.
9205 (complete_line): Add completion_tracker parameter.
9206 (readline_line_completion_function): Delete.
9207 (gdb_rl_attempted_completion_function): New.
9208 (noop_completer, filename_completer, expression_completer)
9209 (location_completer, symbol_completer, command_completer)
9210 (signal_completer, reg_or_group_completer): Update prototypes.
9211 (completion_tracker_t, new_completion_tracker)
9212 (make_cleanup_free_completion_tracker): Delete.
9213 (enum maybe_add_completion_enum): Delete.
9214 (maybe_add_completion): Delete.
9215 (throw_max_completions_reached_error): Delete.
9216 * corefile.c (complete_set_gnutarget): Adjust to work with a
9217 completion_tracker instead of a VEC.
9218 * cp-abi.c (cp_abi_completer): Adjust to work with a
9219 completion_tracker instead of a VEC.
9220 * d-lang.c (d_language_defn): Adjust.
9221 * disasm.c (disassembler_options_completer): Adjust to work with a
9222 completion_tracker instead of a VEC.
9223 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9224 (f_collect_symbol_completion_matches): ... this. Adjust to work
9225 with a completion_tracker instead of a VEC.
9226 (f_language_defn): Adjust.
9227 * go-lang.c (go_language_defn): Adjust.
9228 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9229 Adjust to work with a completion_tracker instead of a VEC.
9230 * infrun.c (handle_completer): Likewise.
9231 * interps.c (interpreter_completer): Likewise.
9232 * interps.h (interpreter_completer): Likewise.
9233 * language.c (unknown_language_defn, auto_language_defn)
9234 (local_language_defn): Adjust.
9235 * language.h (language_defn::la_make_symbol_completion_list):
9236 Rename to ...
9237 (language_defn::la_collect_symbol_completion_matches): ... this
9238 and adjust to work with a completion_tracker instead of a VEC.
9239 * m2-lang.c (m2_language_defn): Adjust.
9240 * objc-lang.c (objc_language_defn): Adjust.
9241 * opencl-lang.c (opencl_language_defn): Adjust.
9242 * p-lang.c (pascal_language_defn): Adjust.
9243 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9244 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9245 with a completion_tracker.
9246 * rust-lang.c (rust_language_defn): Adjust.
9247 * symtab.c (free_completion_list, do_free_completion_list)
9248 (return_val, completion_tracker): Delete.
9249 (completion_list_add_name, completion_list_add_symbol)
9250 (completion_list_add_msymbol, completion_list_objc_symbol)
9251 (completion_list_add_fields, add_symtab_completions): Add
9252 completion_tracker parameter and use it.
9253 (default_make_symbol_completion_list_break_on_1): Rename to...
9254 (default_collect_symbol_completion_matches_break_on): ... this.
9255 Add completion_tracker parameter and use it instead of allocating
9256 a completion tracker here.
9257 (default_make_symbol_completion_list_break_on): Delete old
9258 implementation.
9259 (default_make_symbol_completion_list): Delete.
9260 (default_collect_symbol_completion_matches): New.
9261 (make_symbol_completion_list): Delete.
9262 (collect_symbol_completion_matches): New.
9263 (make_symbol_completion_type): Rename to ...
9264 (collect_symbol_completion_matches_type): ... this. Add
9265 completion_tracker parameter and use it instead of VEC.
9266 (make_file_symbol_completion_list_1): Rename to...
9267 (collect_file_symbol_completion_matches): ... this. Add
9268 completion_tracker parameter and use it instead of VEC.
9269 (make_file_symbol_completion_list): Delete.
9270 (add_filename_to_list): Use completion_list instead of a VEC.
9271 (add_partial_filename_data::list): Now a completion_list.
9272 (make_source_files_completion_list): Work with a completion_list
9273 instead of a VEC.
9274 * symtab.h: Include "completer.h".
9275 (default_make_symbol_completion_list_break_on)
9276 (default_make_symbol_completion_list, make_symbol_completion_list)
9277 (make_symbol_completion_type, make_file_symbol_completion_list)
9278 (make_source_files_completion_list): Delete.
9279 (default_collect_symbol_completion_matches_break_on)
9280 (default_collect_symbol_completion_matches)
9281 (collect_symbol_completion_matches)
9282 (collect_symbol_completion_matches_type)
9283 (collect_file_symbol_completion_matches)
9284 (make_source_files_completion_list): New.
9285 * top.c (init_main): Don't install a rl_completion_entry_function
9286 hook. Install a rl_attempted_completion_function hook instead.
9287 * tui/tui-layout.c (layout_completer): Adjust to work with a
9288 completion_tracker.
9289 * tui/tui-regs.c (tui_reggroup_completer):
9290 * tui/tui-win.c (window_name_completer, focus_completer)
9291 (winheight_completer): Adjust to work with a completion_tracker.
9292 * value.c: Include "completer.h".
9293 (complete_internalvar): Adjust to work with a completion_tracker.
9294 * value.h (complete_internalvar): Likewise.
9295
6e1dbf8c
PA
92962017-07-17 Pedro Alves <palves@redhat.com>
9297
9298 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9299 renames.
9300 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9301 comments to completer_ftype's declaration.
9302 <completer_handle_brkchars>: Change type to
9303 completer_handle_brkchars_ftype.
9304 * command.h (completer_ftype): Add describing comment and give
9305 names to parameters.
9306 (completer_ftype_void): Rename to ...
9307 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9308 (set_cmd_completer_handle_brkchars): Adjust.
9309 * completer.c (filename_completer_handle_brkchars): New function.
9310 (complete_line_internal_normal_command): New function, factored
9311 out from ...
9312 (complete_line_internal): ... here.
9313 (command_completer_handle_brkchars)
9314 (default_completer_handle_brkchars)
9315 (completer_handle_brkchars_func_for_completer): New functions.
9316 * completer.h (set_gdb_completion_word_break_characters): Delete
9317 declaration.
9318 (completer_handle_brkchars_func_for_completer): New declaration.
9319 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9320 completer_handle_brkchars_func_for_completer.
9321
78b13106
PA
93222017-07-17 Pedro Alves <palves@redhat.com>
9323
9324 * completer.c (symbol_completer): New function, based on
9325 make_symbol_completion_list_fn.
9326 * completer.h (symbol_completer): New declaration.
9327 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9328 * python/py-cmd.c (completers): Adjust.
9329 * symtab.c (make_symbol_completion_list_fn): Delete.
9330 * symtab.h (make_symbol_completion_list_fn): Delete.
9331 * cli/cli-decode.c (add_cmd): Adjust.
9332
bbf2f4df
PA
93332017-07-17 Pedro Alves <palves@redhat.com>
9334
9335 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9336 * dwarf2read.c: Include "filename-seen-cache.h".
9337 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9338 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9339 * filename-seen-cache.c: New file.
9340 * filename-seen-cache.h: New file.
9341 * symtab.c: Include "filename-seen-cache.h".
9342 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9343 (create_filename_seen_cache, clear_filename_seen_cache)
9344 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9345 to filename-seen-cache.h/filename-seen-cache.c.
9346 (output_source_filename, sources_info)
9347 (maybe_add_partial_symtab_filename)
9348 (make_source_files_completion_list): Adjust to use
9349 filename_seen_cache.
9350
330cdd98
PA
93512017-07-17 Pedro Alves <palves@redhat.com>
9352
9353 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9354 fields.
9355 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9356 dwarf2_debug_sections*)): New.
9357 (dwarf2_per_objfile::dwarf2_per_objfile(const
9358 dwarf2_per_objfile&)): Declare as deleted.
9359 (dwarf2_per_objfile::operator=): Declare as deleted.
9360 (dwarf2_per_objfile::dwarf2_per_objfile)
9361 (dwarf2_per_objfile::~dwarf2_per_objfile)
9362 (dwarf2_per_objfile::free_cached_comp_units): New.
9363 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9364 ctor. Call dwarf2_per_objfile's ctor manually.
9365 (dwarf2_locate_sections): Deleted/refactored as ...
9366 (dwarf2_per_objfile::locate_sections): ... this new method.
9367 (free_cached_comp_units): Defer to
9368 dwarf2_per_objfile::free_cached_comp_units.
9369 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9370
8880f2a9
TT
93712017-07-14 Tom Tromey <tom@tromey.com>
9372
9373 PR rust/21764:
9374 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9375 parameter.
9376 <UNOP_SIZEOF>: Split into separate case.
9377 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9378
65547233
TT
93792017-07-14 Tom Tromey <tom@tromey.com>
9380
9381 PR rust/21763:
9382 * symtab.c (symbol_matches_domain): Add language_rust to special
9383 case.
9384 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9385 treat LOC_TYPEDEF symbols as variables.
9386
8f14146e
PA
93872017-07-14 Pedro Alves <palves@redhat.com>
9388
9389 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9390 symtabs matching all symtabs with SRCFILE as file name instead of
9391 only considering the first hit, with lookup_symtab.
9392
2347965c
SM
93932017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9394
9395 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9396 operator_name parameters.
9397 (gen_expr): Update function call.
9398
40f4af28
SM
93992017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9400
9401 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9402 parameter.
9403 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9404 Likewise.
9405 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9406 parameter, use agent_expr::gdbarch instead, update function
9407 calls.
9408 (locexpr_tracepoint_var_ref): Likewise.
9409 (loclist_tracepoint_var_ref): Likewise.
9410 * ax-gdb.c (gen_trace_static_fields): Likewise.
9411 (gen_traced_pop): Likewise.
9412 (gen_frame_args_address): Likewise.
9413 (gen_frame_locals_address): Likewise.
9414 (gen_var_ref): Likewise.
9415 (gen_struct_ref_recursive): Likewise.
9416 (gen_static_field): Likewise.
9417 (gen_maybe_namespace_elt): Likewise.
9418 (gen_expr): Likewise.
9419 (gen_trace_for_var): Likewise.
9420 (gen_trace_for_expr): Likewise.
9421 (gen_trace_for_return_address): Likewise.
9422
053f8057
SM
94232017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9424
9425 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9426 parameter.
9427 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9428
6661ad48
SM
94292017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9430
9431 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9432 from ax, update calls.
9433 (gen_usual_arithmetic): Likewise.
9434 (gen_integral_promotions): Likewise.
9435 (gen_bitfield_ref): Likewise.
9436 (gen_primitive_field): Likewise.
9437 (gen_struct_ref_recursive): Likewise.
9438 (gen_struct_ref): Likewise.
9439 (gen_maybe_namespace_elt): Likewise.
9440 (gen_struct_elt_for_reference): Likewise.
9441 (gen_namespace_elt): Likewise.
9442 (gen_aggregate_elt_ref): Likewise.
9443 (gen_expr): Get gdbarch from ax, update calls.
9444 (gen_expr_binop_rest): Likewise.
9445
c55a47e7
PA
94462017-07-13 Pedro Alves <palves@redhat.com>
9447
9448 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9449 as default tdesc.
9450 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9451 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9452 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9453 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9454 tdep.
9455 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9456 Get final tdesc from the tdep.
9457 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9458 default tdesc.
9459 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9460 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9461 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9462 Use it as default tdesc.
9463 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9464 down to amd_init_abi. No longer handle fallback tdesc here.
9465 * amd64-tdep.h (tdesc_x32): Declare.
9466 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9467 parameter.
9468 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9469 as default tdesc.
9470
55efceab
AA
94712017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9472
9473 * s390-linux-tdep.c (s390_process_record): Add support for
9474 instructions new in arch12.
9475
0aa37b65
JB
94762017-07-11 John Baldwin <jhb@FreeBSD.org>
9477
9478 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9479 PT_GETFSBASE and PT_GETGSBASE.
9480 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9481 PT_SETGSBASE.
9482
48aeef91
JB
94832017-07-11 John Baldwin <jhb@FreeBSD.org>
9484
9485 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9486 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9487 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9488 those rules.
9489 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9490 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9491 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9492 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9493 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9494 * features/i386/amd64.xml: Add 64bit-segments.xml.
9495 * features/i386/amd64-avx-avx512.c: Regenerated.
9496 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9497 * features/i386/amd64-avx-mpx.c: Regenerated.
9498 * features/i386/amd64-avx.c: Regenerated.
9499 * features/i386/amd64-mpx.c: Regenerated.
9500 * features/i386/amd64.c: Regenerated.
9501 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9502 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9503 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9504 * regformats/i386/amd64-avx.dat: Regenerated.
9505 * regformats/i386/amd64-mpx.dat: Regenerated.
9506 * regformats/i386/amd64.dat: Regenerated.
9507
77c501bc
YQ
95082017-07-10 Yao Qi <yao.qi@linaro.org>
9509
9510 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9511 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9512
6dc8d757
AK
95132017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9514
9515 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9516 unsetenv.
9517 * gnulib/aclocal.m4: Regenerate.
9518 * gnulib/config.in: Regenerate.
9519 * gnulib/configure: Regenerate.
9520 * gnulib/import/Makefile.am: Regenerate.
9521 * gnulib/import/Makefile.in: Regenerate.
9522 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9523 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9524 * gnulib/import/m4/environ.m4: New file.
9525 * gnulib/import/m4/setenv.m4: New file.
9526 * gnulib/import/setenv.c: New file.
9527 * gnulib/import/unsetenv.c: New file.
9528
266934d1
SM
95292017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9530
9531 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9532 address when op is DW_OP_addr.
9533
03278692
TT
95342017-07-09 Tom Tromey <tom@tromey.com>
9535
9536 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9537 check and apply to outer type.
9538
4b654465
JB
95392017-07-07 John Baldwin <jhb@FreeBSD.org>
9540
9541 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9542 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9543 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9544 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9545
2af9fc44
JB
95462017-07-07 John Baldwin <jhb@FreeBSD.org>
9547
9548 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9549
382b69bb
JB
95502017-07-07 John Baldwin <jhb@FreeBSD.org>
9551
9552 * corelow.c (get_core_siginfo): Remove.
9553 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9554 instead of get_core_siginfo.
9555 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9556 * gdbarch.h: Re-generate.
9557 * gdbarch.c: Re-generate.
9558 * linux-tdep.c (linux_core_xfer_siginfo): New.
9559 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9560
6e5eab33
JB
95612017-07-07 John Baldwin <jhb@FreeBSD.org>
9562
9563 * corelow.c (thread_section_name): Move to ...
9564 * gdbcore.h (thread_section_name): ... here.
9565
929edea9
JB
95662017-07-07 John Baldwin <jhb@FreeBSD.org>
9567
9568 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9569 (struct siginfo32): New.
9570 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9571 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9572 via ptrace(PT_LWPINFO).
9573
762c974a
JB
95742017-07-07 John Baldwin <jhb@FreeBSD.org>
9575
9576 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9577 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9578 (fbsd_get_siginfo_type): New.
9579 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9580 (_initialize_fbsd_tdep): New.
9581
33c5cd75
DB
95822017-07-06 David Blaikie <dblaikie@gmail.com>
9583
9584 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9585 a singular dwo_unit*) to support multiple CUs in the same way that
9586 multiple TUs are supported.
9587 (create_cus_hash_table): Replace create_dwo_cu with a function for
9588 parsing multiple CUs from a DWO file.
9589 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9590 create_dwo_cu.
9591 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9592 htab_find, rather than comparing the signature to a singleton CU in
9593 the dwo_file.
9594
8455d262
PA
95952017-07-06 Pedro Alves <palves@redhat.com>
9596
9597 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9598
4da3eb35
PA
95992017-07-04 Pedro Alves <palves@redhat.com>
9600
9601 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9602 * gdbtypes.h (TYPE_STATIC): Delete.
9603 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9604 is_synchronized, is_native>: Delete.
9605 <dummy>: Bump.
9606 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9607 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9608 (TYPE_FN_FIELD_ABSTRACT): Delete.
9609
5bfd255c
SM
96102017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9611
9612 * buffer.h (buffer_finish): Fix spelling mistakes.
9613
25c54127
EZ
96142017-07-01 Eli Zaretskii <eliz@gnu.org>
9615
9616 * .dir-locals.el: Automatically switch to C-style comments in
9617 versions of Emacs that support the feature.
9618
dc4bde35
SDJ
96192017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9620 Pedro Alves <palves@redhat.com>
9621
9622 PR cli/21688
9623 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9624 (process_next_line): New variable 'inline_cmd'.
9625 Adjust 'if' clauses for "python", "compile" and "guile" to use
9626 'command_name_equals' and check for '!inline_cmd'.
9627
51ed89aa
SDJ
96282017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9629
9630 PR cli/21688
9631 * cli/cli-script.c (command_name_equals_not_inline): New function.
9632 (process_next_line): Adjust 'if' clauses for "python", "compile"
9633 and "guile" to use command_name_equals_not_inline.
9634
eb17d413
PA
96352017-06-29 Pedro Alves <palves@redhat.com>
9636
9637 * completer.c (expression_completer): Call
9638 linespec_location_completer instead of location_completer.
9639
195bcdd5
PA
96402017-06-29 Pedro Alves <palves@redhat.com>
9641
9642 * completer.c (expression_completer): Remove code that recomputes
9643 'text' from 'word'.
9644
adc764e7
YQ
96452017-06-29 Yao Qi <yao.qi@linaro.org>
9646
9647 * regformats/regdat.sh: Generate code with
9648 "ifndef IN_PROCESS_AGENT".
9649
6e75794e
PA
96502017-06-28 Pedro Alves <palves@redhat.com>
9651
9652 * command.h: Include "common/scoped_restore.h".
9653
bc491f2e
YQ
96542017-06-28 Yao Qi <yao.qi@linaro.org>
9655
9656 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9657 instead of obstack_grow.
9658
41664b45
DG
96592017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9660
9661 PR gdb/21337
9662 * symfile.c (reread_symbols): Call objfiles_changed just before
9663 read_symbols.
9664
6da67eb1
PA
96652017-06-27 Pedro Alves <palves@redhat.com>
9666
9667 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9668 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9669 (completion_list_add_symbol, completion_list_add_msymbol):
9670 ... these new functions.
9671 (add_symtab_completions)
9672 (default_make_symbol_completion_list_break_on_1): Adjust.
9673
23732b1e
PA
96742017-06-27 Pedro Alves <palves@redhat.com>
9675
9676 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9677 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9678 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9679 dtor.
9680 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9681 'storage_obstack' field an auto_obstack. In-class initialize all
9682 non-bitfield fields. Make minsyms_read bool.
9683 * symfile.c (read_symbols): Adjust.
9684
a4d1e79a
AH
96852017-06-27 Alan Hayward <alan.hayward@arm.com>
9686
9687 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9688 (gdbsim_store_register): Likewise.
9689
8268c778
PA
96902017-06-27 Pedro Alves <palves@redhat.com>
9691
9692 * c-exp.y (name_obstack): Now an auto_obstack.
9693 (yylex): Use auto_obstack::clear.
9694 (c_parse): Use auto_obstack::clear instead of reinitializing and
9695 freeing the obstack.
9696 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9697 * d-exp.y (name_obstack): Now an auto_obstack.
9698 (yylex): Use auto_obstack::clear.
9699 (d_parse): Use auto_obstack::clear instead of reinitializing and
9700 freeing the obstack.
9701 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9702 auto_obstack.
9703 * dwarf2read.c (create_addrmap_from_index)
9704 (dwarf2_build_psymtabs_hard)
9705 (update_enumeration_type_from_children): Likewise.
9706 * gdb_obstack.h (auto_obstack): New type.
9707 * go-exp.y (name_obstack): Now an auto_obstack.
9708 (build_packaged_name): Use auto_obstack::clear.
9709 (go_parse): Use auto_obstack::clear instead of reinitializing and
9710 freeing the obstack.
9711 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9712 auto_obstack.
9713 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9714 * rust-exp.y (work_obstack): Now an auto_obstack.
9715 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9716 reinitializing and freeing the obstack.
9717 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9718 (host_char_to_target): Use auto_obstack.
9719 * utils.h (make_cleanup_obstack_free): Delete declaration.
9720 * valprint.c (generic_emit_char, generic_printstr): Use
9721 auto_obstack.
9722
db665f42
SM
97232017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9724
9725 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9726 thread.
9727 (darwin_init_thread_list): Don't update dummy thread.
9728 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9729
873c0814
SM
97302017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9731
9732 * record-full.c (netorder16): Remove.
9733
8b5a7a6e
SM
97342017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9735
9736 * common/diagnostics.h: Define macros for GCC.
9737 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9738 * common/vec.h: Include diagnostics.h.
9739 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9740 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9741 warning.
9742
d1435379
SM
97432017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9744
9745 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9746 New macro.
9747 * ada-lex.l: Ignore deprecated register warnings.
9748
cc75e0fd
SM
97492017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9750
9751 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9752 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9753
07809eaf
SM
97542017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9755
9756 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9757 its own line.
9758
f076f034
SM
97592017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9760
9761 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9762
0dd5cbc5
AH
97632017-06-23 Alan Hayward <alan.hayward@arm.com>
9764
9765 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9766 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9767 (xtensa_register_read_masked): Likewise.
9768
d4c6ce5b
SDJ
97692017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9770
9771 * common/environ.c (gdb_environ::unset): Update comment.
9772
16892a03
AH
97732017-06-22 Alan Hayward <alan.hayward@arm.com>
9774
9775 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9776 registers.
9777
d7dcbefc
AH
97782017-06-22 Alan Hayward <alan.hayward@arm.com>
9779
9780 * record-full.c (record_full_exec_insn): Use byte_vector.
9781
b30ff123
YQ
97822017-06-22 Yao Qi <yao.qi@linaro.org>
9783
9784 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9785 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9786
4fa847d7
AH
97872017-06-22 Alan Hayward <alan.hayward@arm.com>
9788
9789 * remote.c (cached_reg): Move from here...
9790 * regcache.h (cached_reg): ...to here.
9791 * python/py-unwind.c (struct reg_info): Remove.
9792 (cached_frame_info): Use cached_reg_t.
9793 (pyuw_prev_register): Likewise.
9794 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9795 (pyuw_dealloc_cache): Free all registers.
9796
f4906a9a
PA
97972017-06-22 Pedro Alves <palves@redhat.com>
9798 Simon Marchi <simon.marchi@ericsson.com>
9799
9800 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9801 warning.
9802 * common/diagnostics.h: New file.
9803
b45a1208
PA
98042017-06-22 Pedro Alves <palves@redhat.com>
9805
9806 * common/agent.h: Add include guards.
9807
e4da2c61
SM
98082017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9809
9810 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9811 talk about addressable units instead of bytes.
9812
96160d60
SDJ
98132017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9814
9815 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9816 of '::const_iterator'.
9817
9a6c7d9c
SDJ
98182017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9819
9820 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9821 'unittests/environ-selftests.c'.
9822 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9823 * charset.c (find_charset_names): Declare object 'iconv_env'.
9824 Update code to use 'iconv_env' object. Remove call to
9825 'free_environ'.
9826 * common/environ.c: Include <utility>.
9827 (make_environ): Delete function.
9828 (free_environ): Delete function.
9829 (gdb_environ::clear): New function.
9830 (gdb_environ::operator=): New function.
9831 (gdb_environ::get): Likewise.
9832 (environ_vector): Delete function.
9833 (set_in_environ): Delete function.
9834 (gdb_environ::set): New function.
9835 (unset_in_environ): Delete function.
9836 (gdb_environ::unset): New function.
9837 (gdb_environ::envp): Likewise.
9838 * common/environ.h: Include <vector>.
9839 (struct gdb_environ): Delete; transform into...
9840 (class gdb_environ): ... this class.
9841 (free_environ): Delete prototype.
9842 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9843 environ_vector): Likewise.
9844 * infcmd.c (run_command_1): Update code to call
9845 'envp' from 'gdb_environ' class.
9846 (environment_info): Update code to call methods from 'gdb_environ'
9847 class.
9848 (unset_environment_command): Likewise.
9849 (path_info): Likewise.
9850 (path_command): Likewise.
9851 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9852 (inferior::inferior): Initialize 'environment' using the host's
9853 information.
9854 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9855 Include "environ.h".
9856 (class inferior) <environment>: Change type from 'struct
9857 gdb_environ' to 'gdb_environ'.
9858 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9859 methods from 'gdb_environ' class.
9860 * solib.c (solib_find_1): Likewise
9861 * unittests/environ-selftests.c: New file.
9862
75c554cf
YQ
98632017-06-20 Yao Qi <yao.qi@linaro.org>
9864
9865 * features/i386/i386-linux.xml: Exchange the order of including
9866 32bit-linux.xml and 32bit-sse.xml.
9867 * features/i386/i386-linux.c: Regenerated.
9868
72ddacb7
YQ
98692017-06-20 Yao Qi <yao.qi@linaro.org>
9870
9871 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9872 Delete copy ctor and assignment operator.
9873 (tdesc_type): Likewise.
9874 (tdesc_feature): Likewise.
9875 (tdesc_free_reg): Remove.
9876 (tdesc_create_reg): Use new.
9877 (tdesc_free_type): Remove.
9878 (tdesc_create_vector): Use new.
9879 (tdesc_create_union): Likewise.
9880 (tdesc_create_flags): Likewise.
9881 (tdesc_create_enum): Likewise.
9882 (tdesc_free_feature): Delete.
9883 (free_target_description): Use delete.
9884
325c9fd4
JB
98852017-06-19 John Baldwin <jhb@FreeBSD.org>
9886
9887 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9888 registers.
9889
16b7a719
PA
98902017-06-19 Pedro Alves <palves@redhat.com>
9891
9892 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9893 after gdb::unlinker.
9894
1c8e01c9
SDJ
98952017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9896
9897 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9898 gdb_environ to access an environment variable.
9899
ffce45d2
TP
99002017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9901
9902 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9903 gdb_byte*.
9904
1d4fbac9
SM
99052017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9906
9907 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9908
8465943a
SM
99092017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9910
9911 * configure: Re-generate.
9912 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9913
3e019bdc
SM
99142017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9915
9916 * configure: Re-generate.
9917 * warning.m4: Pass -Werror to compiler when checking for
9918 supported warning flags.
9919
cf0dd6f0
SM
99202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9921
9922 * Makefile.in (COMPILE.pre): Add "-x c++".
9923
6f98355c
YQ
99242017-06-16 Alan Hayward <alan.hayward@arm.com>
9925 Pedro Alves <palves@redhat.com>
9926 Yao Qi <yao.qi@linaro.org>
9927
9928 * defs.h (RequireLongest): New.
9929 (extract_integer): Declare function template.
9930 (extract_signed_integer): Remove the declaration, but define it
9931 static inline.
9932 (extract_unsigned_integer): Likewise.
9933 (store_integer): Declare function template.
9934 (store_signed_integer): Remove the declaration, but define it
9935 static inline.
9936 (store_unsigned_integer): Likewise.
9937 * findvar.c (extract_integer): New function template.
9938 (extract_signed_integer): Remove.
9939 (extract_unsigned_integer): Remove.
9940 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9941 instantiations.
9942 (store_integer): New function template.
9943 (store_signed_integer): Remove.
9944 (store_unsigned_integer): Remove.
9945 (store_integer): Explicit instantiations.
9946 * regcache.c (regcache_raw_read_signed): Update.
9947 (regcache::raw_read): New function.
9948 (regcache::raw_read_signed): Remove.
9949 (regcache::raw_read_unsigned): Remove.
9950 (regcache_raw_read_unsigned): Update.
9951 (regcache_raw_write_unsigned): Update.
9952 (regcache::raw_write_signed): Remove.
9953 (regcache::raw_write): New function.
9954 (regcache_cooked_read_signed): Update.
9955 (regcache::raw_write_unsigned): Remove.
9956 (regcache::cooked_read_signed): Remove.
9957 (regcache_cooked_read_unsigned): Update.
9958 (regcache::cooked_read_unsigned): Remove.
9959 (regcache_cooked_write_signed): Update.
9960 (regcache_cooked_write_unsigned): Update.
9961 * regcache.h (regcache) <raw_read_signed>: Remove.
9962 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9963 <raw_read, raw_write>: New.
9964 <cooked_read_signed, cooked_write_signed>: Remove.
9965 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9966 <cooked_read, cooked_write>: New.
9967 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9968 (sh64_pseudo_register_write): Update.
9969
a87dc45a
AK
99702017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9971
9972 * arc-tdep.c (arc_disassembler_options): New variable.
9973 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9974 of default_print_insn.
9975 (arc_delayed_print_insn): Set info->section when needed,
9976 use default_print_insn to retrieve a disassembler.
9977
45159d6a
SDJ
99782017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9979
9980 PR gdb/21574
9981 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9982 to mention $SHELL and startup-with-shell.
9983
b46c4cf0
MF
99842017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9985
9986 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9987
6394c606
YQ
99882017-06-14 Yao Qi <yao.qi@linaro.org>
9989
9990 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9991 default_print_insn instead of print_insn_aarch64.
9992 * arm-tdep.c (gdb_print_insn_arm): Call
9993 default_print_insn instead of print_insn_big_arm
9994 and print_insn_little_arm.
9995 * i386-tdep.c (i386_print_insn): Call default_print_insn
9996 instead of print_insn_i386.
9997 * ia64-tdep.c (ia64_print_insn): Call
9998 default_print_insn instead of print_insn_ia64.
9999 * mips-tdep.c (gdb_print_insn_mips): Call
10000 default_print_insn instead of print_insn_big_mips
10001 and print_insn_little_mips.
10002 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10003 instead of print_insn_spu.
10004
d5722aa2
PA
100052017-06-14 Pedro Alves <palves@redhat.com>
10006
10007 * ada-lang.c: Include "common/byte-vector.h".
10008 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10009 * charset.c (wchar_iterator::iterate): Resize the vector instead
10010 of reserving it.
10011 * common/byte-vector.h: Include "common/def-vector.h".
10012 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10013 * cli/cli-dump.c: Include "common/byte-vector.h".
10014 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10015 * common/byte-vector.h: New file.
10016 * common/def-vector.h: New file.
10017 * common/default-init-alloc.h: New file.
10018 * dwarf2loc.c: Include "common/byte-vector.h".
10019 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10020 instead of reserving it.
10021 * dwarf2read.c: Include "common/byte-vector.h".
10022 (data_buf::m_vec): Now a gdb::byte_vector.
10023 * gdb_regex.c: Include "common/def-vector.h".
10024 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10025 * mi/mi-main.c: Include "common/byte-vector.h".
10026 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10027 * printcmd.c: Include "common/byte-vector.h".
10028 (print_scalar_formatted): Use gdb::byte_vector.
10029 * valprint.c: Include "common/byte-vector.h".
10030 (maybe_negate_by_bytes, print_decimal_chars): Use
10031 gdb::byte_vector.
10032
01ec7a27
SM
100332017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10034
10035 * darwin-nat.c: Include "nat/fork-inferior.h".
10036
848d9074
SM
100372017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10038
10039 * configure.nat: Factor out Darwin bits that are not
10040 architecture-specific. Add fork-inferior.o.
10041
3b912944
SM
100422017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10043
10044 * configure.nat: Factor out AIX bits that are not
10045 architecture-specific. Add fork-inferior.o.
10046
55acdf22
AA
100472017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10048
10049 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10050 (read_pieced_value, write_pieced_value): ...here. Reduce to
10051 wrappers that just call rw_pieced_value.
10052
f65e2044
AA
100532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10054
10055 * dwarf2loc.c (write_pieced_value): When writing the data for a
10056 memory piece, use write_memory_with_notification instead of
10057 write_memory.
10058
23f945bf
AA
100592017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10060
10061 * valops.c (read_value_memory): Change embedded_offset to
10062 represent a bit offset instead of a byte offset.
10063 * value.h (read_value_memory): Adjust comment.
10064
f236533e
AA
100652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10066
10067 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10068 dest_offset_bits and source_offset_bits.
10069 (write_pieced_value): Likewise.
10070
65d84b76
AA
100712017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10072
10073 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10074 given by DW_OP_bit_piece.
10075 (write_pieced_value): Likewise.
10076
242d31ab
AA
100772017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10078
10079 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10080 some other preparations to the places where sufficient information
10081 is available.
10082 (write_pieced_value): Likewise.
10083
03c8af18
AA
100842017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10085
10086 * dwarf2loc.c (bits_to_bytes): New function.
10087 (read_pieced_value): Fix offset calculations for register pieces
10088 on big-endian targets.
10089 (write_pieced_value): Likewise.
10090
840989c1
AA
100912017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10092
10093 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10094 (write_pieced_value): Likewise.
10095
359b19bb
AA
100962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10097
10098 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10099 transfer the source value's least significant bits, instead of its
10100 lowest-addressed ones. Rename type_len to max_offset.
10101 (read_pieced_value): Mirror above changes to write_pieced_value as
10102 applicable.
10103
07c9ca3b
AA
101042017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10105
10106 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10107 truncate full bytes from dest_offset_bits before using it as an
10108 offset into the buffer.
10109
f1cc9874
AA
101102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10111
10112 * dwarf2loc.c (write_pieced_value): Include transfer size in
10113 byte-wise check.
10114
cdaac320
AA
101152017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10116
10117 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10118 calculation of this_size.
10119
af547a96
AA
101202017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10121
10122 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10123 when targeting a bit-field.
10124 (write_pieced_value): Likewise.
10125
ddd7882a
AA
101262017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10127
10128 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10129 (allocate_piece_closure): Drop addr_size parameter.
10130 (dwarf2_evaluate_loc_desc_full): Adjust call to
10131 allocate_piece_closure.
10132
e9352324
AA
101332017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10134
10135 PR gdb/21226
10136 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10137 the LSB end, independent of endianness.
10138
d5d1163e
AA
101392017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10140
10141 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10142 size capping.
10143
032bb6ea
YQ
101442017-06-13 Yao Qi <yao.qi@linaro.org>
10145
10146 * mips-linux-nat.c: Move include features/mips*-linux.c to
10147 mips-linux-tdep.c.
10148 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10149 to mips-linux-tdep.c.
10150 * mips-linux-tdep.c: Include features/mips*-linux.c
10151 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10152 functions.
10153 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10154 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10155 (tdesc_mips64_dsp_linux): Declare.
10156
f12f6bad
TT
101572017-06-12 Tom Tromey <tom@tromey.com>
10158
10159 * valprint.h (val_print_type_code_int): Remove.
10160 * valprint.c (generic_val_print_int): Always call
10161 val_print_scalar_formatted.
10162 (val_print_type_code_int): Remove.
10163 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10164 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10165 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10166 * ada-valprint.c (ada_val_print_num): Use
10167 val_print_scalar_formatted.
10168
d9109c80
TT
101692017-06-12 Tom Tromey <tom@tromey.com>
10170
10171 * printcmd.c (print_scalar_formatted): Unify the two switches.
10172 Don't convert scalars to LONGEST.
10173
4ac0cb1c
TT
101742017-06-12 Tom Tromey <tom@tromey.com>
10175
10176 PR exp/16225:
10177 * valprint.h (print_decimal_chars): Update.
10178 * valprint.c (maybe_negate_by_bytes): New function.
10179 (print_decimal_chars): Add "is_signed" argument.
10180 * printcmd.c (print_scalar_formatted): Update.
10181
30a25466
TT
101822017-06-12 Tom Tromey <tom@tromey.com>
10183
10184 PR exp/16225:
10185 * valprint.h (print_binary_chars, print_hex_chars): Update.
10186 * valprint.c (val_print_type_code_int): Update.
10187 (print_binary_chars): Add "zero_pad" argument.
10188 (emit_octal_digit): New function.
10189 (print_octal_chars): Don't zero-pad.
10190 (print_decimal_chars): Likewise.
10191 (print_hex_chars): Add "zero_pad" argument.
10192 * sh64-tdep.c (sh64_do_fp_register): Update.
10193 * regcache.c (regcache::dump): Update.
10194 * printcmd.c (print_scalar_formatted): Update.
10195 * infcmd.c (default_print_one_register_info): Update.
10196
b3464d03
PA
101972017-06-12 Pedro Alves <palves@redhat.com>
10198 Alan Hayward <alan.hayward@arm.com>
10199
10200 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10201 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10202 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10203 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10204 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10205
4b76cda9
PA
102062017-06-12 Pedro Alves <palves@redhat.com>
10207
10208 * dwarf2read.c (mapped_symtab::data): Now a vector of
10209 symtab_index_entry instead of vector of
10210 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10211 whether an element's name is NULL instead of checking whether the
10212 element itself is NULL.
10213 (find_slot): Change return type. Adjust.
10214 (hash_expand, , add_index_entry, uniquify_cu_indices)
10215 (write_hash_table): Adjust.
10216
e8f8bcb3
PA
102172017-06-12 Pedro Alves <palves@redhat.com>
10218
10219 * dwarf2read.c (recursively_count_psymbols): New function.
10220 (write_psymtabs_to_index): Call it to compute number of psyms and
10221 pass estimate size of psyms_seen to unordered_set's ctor.
10222
70a1152b
PA
102232017-06-12 Pedro Alves <palves@redhat.com>
10224
10225 * dwarf2read.c (write_hash_table): Check if key already exists
10226 before emplacing.
10227
c2f134ac
PA
102282017-06-12 Pedro Alves <palves@redhat.com>
10229
10230 * dwarf2read.c (data_buf::append_space): Rename to...
10231 (data_buf::grow): ... this, and make private. Adjust all callers.
10232 (data_buf::append_uint): New method.
10233 (add_address_entry, write_one_signatured_type)
10234 (write_psymtabs_to_index): Use it.
10235
a81e6d4d
PA
102362017-06-12 Pedro Alves <palves@redhat.com>
10237
10238 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10239 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10240 (data_buf::file_write): Call ::fwrite directly.
10241
6fd931f2
PA
102422017-06-12 Pedro Alves <palves@redhat.com>
10243
10244 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10245 std::vector::erase.
10246
bc8f2430
JK
102472017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10248
10249 Code cleanup: C++ify .gdb_index producer.
10250 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10251 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10252 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10253 (create_strtab, add_string): Remove.
10254 (file_write, data_buf): New.
10255 (struct symtab_index_entry): Use std::vector for cu_indices.
10256 (struct mapped_symtab): Use std::vector for data.
10257 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10258 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10259 Remove.
10260 (find_slot): Change return type. Update it to the new data structures.
10261 (hash_expand, add_index_entry): Update it to the new data structures.
10262 (offset_type_compare): Remove.
10263 (uniquify_cu_indices): Update it to the new data structures.
10264 (c_str_view, c_str_view_hasher, vector_hasher): New.
10265 (add_indices_to_cpool): Remove.
10266 (write_hash_table): Update it to the new data structures.
10267 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10268 (eq_psymtab_cu_index): Remove.
10269 (psym_index_map): New typedef.
10270 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10271 reference and std::unordered_map for cu_index_htab.
10272 (add_address_entry, add_address_entry_worker, write_address_map)
10273 (write_psymbols): Update it to the new data structures.
10274 (write_obstack): Remove.
10275 (struct signatured_type_index_data): Change types_list to a data_buf
10276 reference and psyms_seen to a std::unordered_set reference.
10277 (write_one_signatured_type, recursively_write_psymbols)
10278 (write_psymtabs_to_index): Update it to the new data structures.
10279
c4dcb155
SM
102802017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10281
10282 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10283 separate-debug-file commands.
10284 * symfile.h (separate_debug_file_debug): New global.
10285 * symfile.c (separate_debug_file_debug): New global.
10286 (separate_debug_file_exists, find_separate_debug_file): Add
10287 debug output.
10288 (_initialize_symfile): Add "set debug separate-debug-file"
10289 command.
10290 * build-id.c (build_id_to_debug_bfd,
10291 find_separate_debug_file_by_buildid): Add debug output.
10292
6d45d4b4
SM
102932017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10294
10295 * gdbarch.sh (displaced_step_free_closure): Remove.
10296 * gdbarch.h, gdbarch.c: Re-generate.
10297 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10298 displaced_step_free_closure.
10299 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10300 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10301 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10302 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10303 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10304 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10305 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10306 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10307 * infrun.c (displaced_step_clear): Call xfree instead of
10308 gdbarch_displaced_step_free_closure.
10309
2f91880f
SDJ
103102017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10311
10312 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10313 NULL".
10314
b8b6e72f
AH
103152017-06-08 Alan Hayward <alan.hayward@arm.com>
10316
10317 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10318 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10319 (mn10300_push_dummy_call): Likewise.
10320
5369082e
AH
103212017-06-08 Alan Hayward <alan.hayward@arm.com>
10322
10323 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10324
ff4ca5ac
AH
103252017-06-08 Alan Hayward <alan.hayward@arm.com>
10326
10327 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10328
aefd8b33
SDJ
103292017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10330
10331 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10332 able to start inferiors using a shell.
10333 (New remote packets): Announce new packet "QStartupWithShell".
10334 * remote.c: Add PACKET_QStartupWithShell.
10335 (extended_remote_create_inferior): Handle new
10336 PACKET_QStartupWithShell.
10337 (remote_protocol_features) <QStartupWithShell>: New entry for
10338 PACKET_QStartupWithShell.
10339 (_initialize_remote): Call "add_packet_config_cmd" for
10340 QStartupShell.
10341
2090129c
SDJ
103422017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10343 Pedro Alves <palves@redhat.com>
10344
10345 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10346 and "nat/fork-inferior.h".
10347 * common/common-inferior.h: New file, with contents from
10348 "gdb/inferior.h".
10349 * commom/common-utils.c: Include "common-utils.h".
10350 (stringify_argv): New function.
10351 * common/common-utils.h (stringify_argv): New prototype.
10352 * configure.nat: Add "fork-inferior.o" as a dependency for
10353 "*linux*", "fbsd*" and "nbsd*" hosts.
10354 * corefile.c (get_exec_file): Update comment.
10355 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10356 instead of "startup_inferior".
10357 (darwin_create_inferior): Call "add_thread_silent" after
10358 "fork_inferior".
10359 * fork-child.c: Cleanup unnecessary includes.
10360 (SHELL_FILE): Move to "common/common-fork-child.c".
10361 (environ): Likewise.
10362 (exec_wrapper): Initialize.
10363 (get_exec_wrapper): New function.
10364 (breakup_args): Move to "common/common-fork-child.c"; rename to
10365 "breakup_args_for_exec".
10366 (escape_bang_in_quoted_argument): Move to
10367 "common/common-fork-child.c".
10368 (saved_ui): New variable.
10369 (prefork_hook): New function.
10370 (postfork_hook): Likewise.
10371 (postfork_child_hook): Likewise.
10372 (gdb_startup_inferior): Likewise.
10373 (fork_inferior): Move to "common/common-fork-child.c". Update
10374 function to support gdbserver.
10375 (startup_inferior): Likewise.
10376 * gdbcore.h (get_exec_file): Remove declaration.
10377 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10378 instead of "startup_inferior". Call "add_thread_silent" after
10379 "fork_inferior".
10380 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10381 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10382 instead of "startup_inferior". Call "add_thread_silent" after
10383 "fork_inferior".
10384 * inferior.h: Include "common-inferior.h".
10385 (trace_start_error): Move to "common/common-utils.h".
10386 (trace_start_error_with_name): Likewise.
10387 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10388 (startup_inferior): Likewise.
10389 (gdb_startup_inferior): New prototype.
10390 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10391 * nat/fork-inferior.h: New file.
10392 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10393 instead of "startup_inferior". Call "add_thread_silent" after
10394 "fork_inferior".
10395 * target.h (target_terminal_init): Move prototype to
10396 "target/target.h".
10397 (target_terminal_inferior): Likewise.
10398 (target_terminal_ours): Likewise.
10399 * target/target.h (target_terminal_init): New prototype, moved
10400 from "target.h".
10401 (target_terminal_inferior): Likewise.
10402 (target_terminal_ours): Likewise.
10403 * utils.c (gdb_flush_out_err): New function.
10404
043a4934
SDJ
104052017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10406
10407 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10408 * common/common-gdbthread.h: New file, with parts from
10409 "gdb/gdbthread.h".
10410 * gdbthread.h: Include "common-gdbthread.h".
10411 (switch_to_thread): Moved to "common/common-gdbthread.h".
10412
15652511
SDJ
104132017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10414
10415 * Makefile.in (SFILES): Add "common/job-control.c".
10416 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10417 (COMMON_OBS): Add "job-control.o".
10418 * common/job-control.c: New file, with contents from
10419 "gdb/inflow.c".
10420 * common/job-control.h: New file, with contents from "terminal.h".
10421 * fork-child.c: Include "job-control.h".
10422 * inflow.c: Include "job-control.h".
10423 (gdb_setpgid): Move to "common/common-inflow.c".
10424 (_initialize_inflow): Move setting of "job_control" to
10425 "handle_job_control".
10426 * terminal.h (job_control): Moved to "common/common-terminal.h".
10427 (gdb_setpgid): Likewise.
10428 * top.c: Include "job_control.h".
10429 * utils.c: Likewise.
10430 (job_control): Moved to "job-control.c".
10431
2d7cc5c7
PA
104322017-06-07 Pedro Alves <palves@redhat.com>
10433
10434 * Makefile.in (SFILES): Add gdb_regex.c.
10435 (COMMON_OBS): Add gdb_regex.o.
10436 * ada-lang.c (ada_add_standard_exceptions)
10437 (ada_add_exceptions_from_frame, name_matches_regex)
10438 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10439 parameter type to compiled_regex. Adjust.
10440 (ada_exceptions_list): Use compiled_regex.
10441 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10442 std::unique_ptr<compiled_regex>.
10443 (exception_catchpoint::~exception_catchpoint): Remove regfree
10444 call.
10445 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10446 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10447 * breakpoint.c (solib_catchpoint::compiled): Now a
10448 std::unique_ptr<compiled_regex>.
10449 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10450 (check_status_catch_solib): Adjust to use compiled_regex.
10451 (add_solib_catchpoint): Adjust to use compiled_regex.
10452 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10453 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10454 compiled_regex reference. Adjust to use it.
10455 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10456 declaration. Include "gdb_regex.h".
10457 (apropos_cmd): Change regex parameter to compiled_regex reference.
10458 * gdb_regex.c: New file.
10459 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10460 declarations.
10461 (class compiled_regex): New.
10462 * linux-tdep.c: Include "common/gdb_optional.h".
10463 (struct mapping_regexes): New, factored out from
10464 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10465 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10466 gdb::optional and remove cleanups. Adjust to compiled_regex.
10467 * probe.c: Include "common/gdb_optional.h".
10468 (collect_probes): Use compiled_regex and gdb::optional and remove
10469 cleanups.
10470 * skip.c: Include "common/gdb_optional.h".
10471 (skiplist_entry::compiled_function_regexp): Now a
10472 gdb::optional<compiled_regex>.
10473 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10474 (free_skiplist_entry): Remove regfree call.
10475 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10476 compiled_regex and gdb::optional.
10477 * symtab.c: Include "common/gdb_optional.h".
10478 (search_symbols): Use compiled_regex and gdb::optional.
10479 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10480 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10481 to gdb_regex.c.
10482
50d6adef
AH
104832017-06-07 Alan Hayward <alan.hayward@arm.com>
10484
10485 * regcache.c (regcache::save): Avoid buffer use.
10486 (regcache::dump): Likewise.
10487
4a8a33c8
AH
104882017-06-07 Alan Hayward <alan.hayward@arm.com>
10489
10490 * sh-tdep.c (sh_pseudo_register_read): Remove
10491 MAX_REGISTER_SIZE.
10492 (sh_pseudo_register_write): Likewise.
10493 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10494 (sh64_pseudo_register_write): Likewise
10495
d1be909e
AH
104962017-06-07 Alan Hayward <alan.hayward@arm.com>
10497
10498 * aarch64-tdep.c (aarch64_store_return_value): Use
10499 V_REGISTER_SIZE.
10500 (aarch64_pseudo_read_value): Likewise.
10501 (aarch64_pseudo_write): Likewise.
10502
f4a65042
YQ
105032017-06-06 Yao Qi <yao.qi@linaro.org>
10504
10505 * regformats/regdef.h (set_register_cache): Remove the
10506 declaration.
10507
9f7fb0aa
AH
105082017-06-06 Alan Hayward <alan.hayward@arm.com>
10509
10510 * frame.c (frame_unwind_register_signed): Use
10511 frame_unwind_register_value.
10512
e1e01040
PA
105132017-06-06 Pedro Alves <palves@redhat.com>
10514
10515 PR breakpoints/21553
10516 * breakpoint.c (create_breakpoints_sal_default)
10517 (init_breakpoint_sal, create_breakpoint_sal): Use
10518 gdb::unique_xmalloc_ptr for string parameters.
10519 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10520 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10521 (base_breakpoint_create_breakpoints_sal)
10522 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10523 (strace_marker_create_breakpoints_sal)
10524 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10525 string parameters.
10526 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10527 gdb::unique_xmalloc_ptr for string parameters.
10528 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10529 parameters.
10530
fbe654c8
AH
105312017-06-06 Alan Hayward <alan.hayward@arm.com>
10532
10533 * alpha-tdep.c (alpha_register_to_value): Use
10534 get_frame_register_value.
10535 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10536
ae0d01d6
AH
105372017-06-06 Alan Hayward <alan.hayward@arm.com>
10538
10539 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10540 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10541 (ia64_value_to_register): Likewise.
10542 (ia64_extract_return_value): Likewise.
10543 (ia64_store_return_value): Likewise.
10544 (ia64_push_dummy_call): Likewise.
10545
49cf576c
JB
105462017-06-04 Joel Brobecker <brobecker@adacore.com>
10547
10548 GDB 8.0 released.
10549
26b6a6ab
SM
105502017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10551
10552 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10553
22827c51
SM
105542017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10555
10556 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10557 parameter.
10558 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10559
0e05cf3a
SM
105602017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10561
10562 * event-loop.c (poll_timers): Unallocate timer using delete
10563 instead of xfree.
10564
c1fc2657
SM
105652017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10566
10567 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10568 (struct breakpoint) <~breakpoint>: New.
10569 (struct watchpoint): Inherit from breakpoint.
10570 <~watchpoint>: New.
10571 <base>: Remove.
10572 (struct tracepoint): Inherit from breakpoint.
10573 <base>: Remove.
10574 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10575 (struct longjmp_breakpoint): Inherit from breakpoint.
10576 <~longjmp_breakpoint>: New.
10577 <base>: Remove.
10578 (new_breakpoint_from_type): Remove casts.
10579 (watchpoint_in_thread_scope): Remove reference to base field.
10580 (watchpoint_del_at_next_stop): Likewise.
10581 (update_watchpoint): Likewise.
10582 (watchpoint_check): Likewise.
10583 (bpstat_check_watchpoint): Likewise.
10584 (set_longjmp_breakpoint): Likewise.
10585 (struct fork_catchpoint): Inherit from breakpoint.
10586 <base>: Remove.
10587 (struct solib_catchpoint): Inherit from breakpoint.
10588 <~solib_catchpoint>: New.
10589 <base>: Remove.
10590 (dtor_catch_solib): Change to ...
10591 (solib_catchpoint::~solib_catchpoint): ... this.
10592 (breakpoint_hit_catch_solib): Remove reference to base field.
10593 (add_solib_catchpoint): Likewise.
10594 (create_fork_vfork_event_catchpoint): Likewise.
10595 (struct exec_catchpoint): Inherit from breakpoint.
10596 <~exec_catchpoint>: New.
10597 <base>: Remove.
10598 (dtor_catch_exec): Change to ...
10599 (exec_catchpoint::~exec_catchpoint): ... this.
10600 (dtor_watchpoint): Change to ...
10601 (watchpoint::~watchpoint): ... this.
10602 (watch_command_1): Remove reference to base field.
10603 (catch_exec_command_1): Likewise.
10604 (base_breakpoint_dtor): Change to ...
10605 (breakpoint::~breakpoint): ... this.
10606 (base_breakpoint_ops): Remove dtor field value.
10607 (longjmp_bkpt_dtor): Change to ...
10608 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10609 (strace_marker_create_breakpoints_sal): Remove reference to base
10610 field.
10611 (delete_breakpoint): Don't manually call breakpoint destructor.
10612 (create_tracepoint_from_upload): Remove reference to base field.
10613 (trace_pass_set_count): Likewise.
10614 (initialize_breakpoint_ops): Don't initialize
10615 momentary_breakpoint_ops, don't set dtors.
10616 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10617 <~ada_catchpoint>: New.
10618 <base>: Remove.
10619 (create_excep_cond_exprs): Remove reference to base field.
10620 (dtor_exception): Change to ...
10621 (ada_catchpoint::~ada_catchpoint): ... this.
10622 (dtor_catch_exception): Remove.
10623 (dtor_catch_exception_unhandled): Remove.
10624 (dtor_catch_assert): Remove.
10625 (create_ada_exception_catchpoint): Remove reference to base
10626 field.
10627 (initialize_ada_catchpoint_ops): Don't set dtors.
10628 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10629 breakpoint.
10630 <~signal_catchpoint>: New.
10631 <base>: Remove.
10632 (signal_catchpoint_dtor): Change to ...
10633 (signal_catchpoint::~signal_catchpoint): ... this.
10634 (create_signal_catchpoint): Remove reference to base field.
10635 (initialize_signal_catchpoint_ops): Don't set dtor.
10636 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10637 from breakpoint.
10638 <~syscall_catchpoint>: New.
10639 <base>: Remove.
10640 (dtor_catch_syscall): Change to ...
10641 (syscall_catchpoint::~syscall_catchpoint): ... this.
10642 (create_syscall_event_catchpoint): Remove reference to base
10643 field.
10644 (initialize_syscall_catchpoint_ops): Don't set dtor.
10645 * break-catch-throw.c (struct exception_catchpoint): Inherit
10646 from breakpoint.
10647 <~exception_catchpoint>: New.
10648 <base>: Remove.
10649 (dtor_exception_catchpoint): Change to ...
10650 (exception_catchpoint::~exception_catchpoint): ... this.
10651 (handle_gnu_v3_exceptions): Remove reference to base field.
10652 (initialize_throw_catchpoint_ops): Don't set dtor.
10653 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10654 field.
10655 * remote.c (remote_get_tracepoint_status): Likewise.
10656 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10657 * tracefile.c (tracefile_fetch_registers): Likewise.
10658 * tracepoint.c (actions_command): Likewise.
10659 (validate_actionline): Likewise.
10660 (tfind_1): Likewise.
10661 (get_traceframe_location): Likewise.
10662 (find_matching_tracepoint_location): Likewise.
10663 (parse_tracepoint_status): Likewise.
10664 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10665
3b0871f4
SM
106662017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10667
10668 * breakpoint.c (struct longjmp_breakpoint): New struct.
10669 (is_tracepoint_type): Change return type to bool.
10670 (is_longjmp_type): New function.
10671 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10672 (set_raw_breakpoint_without_location): Use
10673 new_breakpoint_from_type.
10674 (set_raw_breakpoint): Likewise.
10675
a5e364af
SM
106762017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10677
10678 * breakpoint.c (new_breakpoint_from_type): New function.
10679 (create_breakpoint_sal): Use new_breakpoint_from_type and
10680 unique_ptr.
10681 (create_breakpoint): Likewise.
10682
ae3b3f34
SM
106832017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10684
10685 * memattr.c (mem_info_command): Rename to ...
10686 (info_mem_command): ... this.
10687 (mem_enable_command): Rename to ...
10688 (enable_mem_command): ... this.
10689 (mem_disable_command): Rename to ...
10690 (disable_mem_command): ... this.
10691 (mem_delete_command): Rename to ...
10692 (delete_mem_command): ... this.
10693 (_initialize_mem): Adjust function names.
10694
13ace077
MM
106952017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10696
10697 * btrace.c (handle_pt_insn_events): New.
10698 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10699 STATUS. Split into this and ...
10700 (handle_pt_insn_event_flags): ... this.
10701
c56ccc05
MM
107022017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10703
10704 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10705 and struct pt_insn.resynced.
10706 * configure: Regenerated.
10707 * config.in: Regenerated.
10708
08c3f6d2
TW
107092017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10710
10711 * btrace.c (ftrace_find_call_by_number): New function.
10712 (ftrace_new_function): Store objects, not pointers.
10713 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10714 ftrace_new_gap, ftrace_update_function,
10715 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10716 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10717 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10718 btrace_ends_with_single_insn, btrace_call_get): Account for
10719 btrace_thread_info::functions now storing objects.
10720 * btrace.h (struct btrace_thread_info): Add constructor.
10721 (struct btrace_thread_info) <functions>: Make std::vector.
10722 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10723 Initialize with default values.
10724 * record-btrace.c (record_btrace_frame_sniffer): Account for
10725 btrace_thread_info::functions now storing objects.
10726
8ffd39f2
TW
107272017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10728
10729 * btrace.c: Remove typedef bfun_s.
10730 (ftrace_new_gap): Directly add gaps to the list of gaps.
10731 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10732 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10733 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10734 instead of gdb VEC.
10735
4aeb0dfc
TW
107362017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10737
10738 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10739 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10740 with btrace_thread_info::next_segment and
10741 btrace_thread_info::prev_segment.
10742 * btrace.h: Remove struct btrace_func_link.
10743 (struct btrace_function): Replace pair of function segment pointers
10744 with pair of indices.
10745 * python/py-record-btrace.c (btpy_call_prev_sibling,
10746 btpy_call_next_sibling): Replace references to
10747 btrace_thread_info::segment with btrace_thread_info::next_segment and
10748 btrace_thread_info::prev_segment.
10749 * record-btrace.c (record_btrace_frame_this_id): Use
10750 btrace_find_call_by_number.
10751
eb8f2b9c
TW
107522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10753
10754 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10755 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10756 btrace_insn_next, btrace_insn_prev): Remove references to
10757 btrace_thread_info::flow.
10758 * btrace.h (struct btrace_function): Remove FLOW.
10759
42bfe59e
TW
107602017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10761
10762 * btrace.c (ftrace_find_call_by_number): New function.
10763 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10764 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10765 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10766 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10767 index.
10768 * btrace.h (struct btrace_function): Turn UP into an index.
10769 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10770 as an index.
10771 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10772 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10773 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10774
b54b03bd
TW
107752017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10776
10777 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10778 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10779 ftrace_update_function, ftrace_compute_global_level_offset,
10780 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10781 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10782 btrace_insn_end, btrace_is_empty): Remove references to
10783 btrace_thread_info::begin and btrace_thread_info::end.
10784 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10785 (struct btrace_thread_info) <functions>: Adjust comment.
10786 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10787 btrace_thread_info::begin.
10788
8286623c
TW
107892017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10790
10791 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10792 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10793 ftrace_update_function): Remove arguments that implicitly were always
10794 BTINFO->END.
10795 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10796 Don't pass BTINFO->END.
10797
a0f1b963
TW
107982017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10799
10800 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10801 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10802 btrace_find_insn_by_number): Replace function segment pointer with
10803 index.
10804 (btrace_insn_cmp): Simplify.
10805 * btrace.h: (struct btrace_insn_iterator) Rename index to
10806 insn_index. Replace function segment pointer with index into function
10807 segment vector.
10808 * record-btrace.c (record_btrace_call_history): Replace function
10809 segment pointer use with index.
10810 (record_btrace_frame_sniffer): Retrieve function call segment through
10811 vector.
10812 (record_btrace_set_replay): Remove defunc't safety check.
10813
f158f208
TW
108142017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10815
10816 * btrace.c (btrace_ends_with_single_insn): New function.
10817 (btrace_call_get, btrace_call_number, btrace_call_begin,
10818 btrace_call_end, btrace_call_next, btrace_call_prev,
10819 btrace_find_call_by_number): Use index into call segment vector
10820 instead of pointer.
10821 (btrace_call_cmp): Simplify.
10822 * btrace.h (struct btrace_call_iterator): Replace function call segment
10823 pointer with index into vector.
10824 * record-btrace.c (record_btrace_call_history): Use index instead of
10825 pointer.
10826
521103fd
TW
108272017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10828
10829 * btrace.c (btrace_insn_begin, btrace_insn_end,
10830 btrace_find_insn_by_number): Add btinfo to iterator.
10831 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10832
17b89b34
TW
108332017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10834
10835 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10836 and save pointers directly.
10837 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10838 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10839 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10840 changed signature of functions.
10841 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10842 (btrace_fetch): Remove code that adds btrace_function pointers to
10843 vector of btrace_functions.
10844 (btrace_clear): Simplify freeing vector of btrace_functions.
10845
2b51eddc
TW
108462017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10847
10848 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10849 Replace VEC_* with std::vector functions.
10850 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10851 (struct btrace_thread_info)<functions>: Change type to std::vector.
10852
db6be0d5
SM
108532017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10854
10855 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10856 "Removed targets and native configurations" up. Merge duplicate
10857 "New commands" sub-sections. Add "New options" sub-sections.
10858
b057297a
AH
108592017-05-26 Alan Hayward <alan.hayward@arm.com>
10860
10861 * defs.h (copy_integer_to_size): New declaration.
10862 * findvar.c (copy_integer_to_size): New function.
10863 (do_cint_test): New selftest function.
10864 (copy_integer_to_size_test): Likewise.
10865 (_initialize_findvar): Likewise.
10866 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10867 (mips_fbsd_collect_reg): Use raw_collect_integer.
10868 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10869 (mips64_fill_gregset): Use raw_collect_integer
10870 (mips64_fill_fpregset): Use raw_supply_integer.
10871 * regcache.c (regcache::raw_supply_integer): New function.
10872 (regcache::raw_collect_integer): Likewise.
10873 * regcache.h: (regcache::raw_supply_integer): New declaration.
10874 (regcache::raw_collect_integer): Likewise.
10875
b77b02a5
YQ
108762017-05-24 Yao Qi <yao.qi@linaro.org>
10877
10878 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10879 (COMMON_OBS): Add gdbarch-selftests.o.
10880 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10881 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10882 * gdbarch-selftests.c: New file.
10883 * regcache.h (regcache) <~regcache>: Mark it virtual if
10884 GDB_SELF_TEST.
10885 <raw_write>: Likewise.
10886
e521e87e
YQ
108872017-05-24 Yao Qi <yao.qi@linaro.org>
10888
10889 * regcache.c (current_regcache): Change it to
10890 regcache::current_regcache.
10891 (regcache_observer_target_changed): Update.
10892 (regcache_thread_ptid_changed): Make it a regcache static
10893 method.
10894 (regcache_thread_ptid_changed): Update.
10895 (class regcache_access): New.
10896 (current_regcache_test): Update.
10897 (_initialize_regcache): Update.
10898 * regcache.h: Include forward_list.
10899 (regcache): Declare regcache_thread_ptid_changed and declare
10900 registers_changed_ptid as friend.
10901
d8e07dda
YQ
109022017-05-24 Yao Qi <yao.qi@linaro.org>
10903
10904 * i387-tdep.c (i387_register_to_value): Use register_size
10905 instead of TYPE_LENGTH.
10906 * m68k-tdep.c (m68k_register_to_value): Likewise.
10907
8c8f9122
YQ
109082017-05-24 Yao Qi <yao.qi@linaro.org>
10909
10910 * i387-tdep.c (i387_convert_register_p): Return false if type
10911 code isn't TYPE_CODE_FLT.
10912
68fce50f
YQ
109132017-05-24 Yao Qi <yao.qi@linaro.org>
10914
10915 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10916 length is 4.
10917 (alpha_register_to_value): Remove type length check.
10918 (alpha_value_to_register): Likewise.
10919
88954b49
YQ
109202017-05-24 Yao Qi <yao.qi@linaro.org>
10921
10922 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10923 TYPE_CODE_FLT.
10924
e3ec9b69
YQ
109252017-05-24 Yao Qi <yao.qi@linaro.org>
10926
10927 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10928 TYPE_CODE_FLT or not.
10929
cdd238da
YQ
109302017-05-24 Yao Qi <yao.qi@linaro.org>
10931
10932 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10933 * avr-tdep.c (avr_gdbarch_init): Likewise.
10934 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10935 * cris-tdep.c (cris_gdbarch_init): Likewise.
10936 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10937 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10938 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10939 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10940 * mep-tdep.c (mep_gdbarch_init): Likewise.
10941 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10942 * mips-tdep.c (mips_gdbarch_init): Likewise.
10943 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10944 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10945 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10946 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10947 * v850-tdep.c (v850_gdbarch_init): Likewise.
10948
7a3929c4
YQ
109492017-05-24 Yao Qi <yao.qi@linaro.org>
10950
10951 * selftest-arch.c (tests_with_arch): Call registers_changed
10952 and reinit_frame_cache.
10953 * selftest.c (run_self_tests): Likewise.
10954
f4985dba
YQ
109552017-05-24 Yao Qi <yao.qi@linaro.org>
10956
10957 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10958 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10959
ab20fa4a
YQ
109602017-05-24 Yao Qi <yao.qi@linaro.org>
10961
10962 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10963 set_gdbarch_print_insn.
10964
f532ab94
YQ
109652017-05-24 Yao Qi <yao.qi@linaro.org>
10966
10967 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10968 set_gdbarch_print_insn.
10969
39503f82
YQ
109702017-05-24 Yao Qi <yao.qi@linaro.org>
10971
10972 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10973 set_gdbarch_print_insn.
10974 * arc-tdep.c (arc_gdbarch_init): Likewise.
10975 * arch-utils.c: include dis-asm.h.
10976 (default_print_insn): New function.
10977 * arch-utils.h (default_print_insn): Declare.
10978 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10979 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10980 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10981 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10982 * frv-tdep.c (frv_gdbarch_init): Likewise.
10983 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10984 * gdbarch.sh (print_insn): Use default_print_insn.
10985 * gdbarch.c: Regenerated.
10986 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10987 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10988 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10989 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10990 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10991 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10992 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10993 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10994 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10995 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10996 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10997 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10998 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10999 * mt-tdep.c (mt_gdbarch_init): Likewise.
11000 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11001 * nios2-tdep.c (nios2_print_insn): Remove.
11002 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11003 * rx-tdep.c (rx_gdbarch_init): Likewise.
11004 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11005 * score-tdep.c (score_print_insn): Remove.
11006 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11007 * sh-tdep.c (sh_gdbarch_init): Likewise.
11008 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11009 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11010 * tic6x-tdep.c (tic6x_print_insn): Remove.
11011 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11012 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11013 * v850-tdep.c (v850_gdbarch_init): Likewise.
11014 * vax-tdep.c (vax_gdbarch_init): Likewise.
11015 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11016 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11017
f7241d4f
JB
110182017-05-23 John Baldwin <jhb@FreeBSD.org>
11019
11020 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11021 (MIPS_FP0_REGNUM): Remove.
11022 (MIPS_FSR_REGNUM): Remove.
11023 (mips_fbsd_supply_fpregs): Use mips_regnum.
11024 (mips_fbsd_supply_gregs): Likewise.
11025 (mips_fbsd_collect_fpregs): Likewise.
11026 (mips_fbsd_collect_gregs): Likewise.
11027
d489d81d
JB
110282017-05-23 John Baldwin <jhb@FreeBSD.org>
11029
11030 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11031 (getpfpregs_supplies): New function.
11032 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11033 getfpregs_supplies.
11034 (mips_fbsd_store_inferior_registers): Likewise.
11035
e11b3cdc
PA
110362017-05-22 Pedro Alves <palves@redhat.com>
11037
11038 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11039 maintainer.
11040
0f068fb5
AH
110412017-05-22 Alan Hayward <alan.hayward@arm.com>
11042
11043 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11044 (store_register): Likewise.
11045 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11046 (get_decimal_float_return_value): Likewise.
11047 (do_ppc_sysv_return_value): Likewise.
11048 (ppc64_sysv_abi_push_integer): Likewise.
11049 (ppc64_sysv_abi_push_freg): Likewise.
11050 (ppc64_sysv_abi_return_value_base): Likewise.
11051 (ppc64_sysv_abi_return_value): Likewise.
11052 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11053 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11054 * rs6000-nat.c: Likewise.
11055 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11056 (rs6000_value_to_register): Likewise.
11057 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11058
e6cf65f2
TT
110592017-05-21 Tom Tromey <tom@tromey.com>
11060
11061 PR rust/21466:
11062 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11063 arrays as "[T]", not "[T; ]".
11064
43cc5389
TT
110652017-05-19 Tom Tromey <tom@tromey.com>
11066
11067 PR rust/21484:
11068 * rust-lang.c (exp_descriptor_rust): New function.
11069 (rust_language_defn): Use it.
11070 * p-lang.c (pascal_language_defn): Update.
11071 * opencl-lang.c (opencl_language_defn): Update.
11072 * objc-lang.c (objc_language_defn): Update.
11073 * m2-lang.c (m2_language_defn): Update.
11074 * language.h (struct language_defn)
11075 <la_watch_location_expression>: New member.
11076 * language.c (unknown_language_defn, auto_language_defn)
11077 (local_language_defn): Update.
11078 * go-lang.c (go_language_defn): Update.
11079 * f-lang.c (f_language_defn): Update.
11080 * d-lang.c (d_language_defn): Update.
11081 * c-lang.h (c_watch_location_expression): Declare.
11082 * c-lang.c (c_watch_location_expression): New function.
11083 (c_language_defn, cplus_language_defn, asm_language_defn)
11084 (minimal_language_defn): Use it.
11085 * breakpoint.c (watch_command_1): Call
11086 la_watch_location_expression.
11087 * ada-lang.c (ada_language_defn): Update.
11088
7a6e7fcc
RO
110892017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11090
6e7e1744
RO
11091 PR tui/21482
11092 * gdb_curses.h (NOMACROS): Define.
11093 (NCURSES_NOMACROS): Define.
11094
110952017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11096
11097 PR tui/21482
7a6e7fcc
RO
11098 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11099 arg to char *.
11100 * tui/tui-wingeneral.c (box_win): Likewise.
11101 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11102 (tui_show_source_line): Likewise.
11103 (tui_show_exec_info_content): Likewise.
11104
1933fd8e
VM
111052017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11106
11107 * sparc-tdep.c (sparc_structure_return_p)
11108 (sparc_arg_on_registers_p): New functions.
11109 (sparc32_store_arguments): Use them.
11110 * sparc64-tdep.c (sparc64_16_byte_align_p)
11111 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11112 Handle TYPE_CODE_ARRAY.
11113
21873064
YQ
111142017-05-17 Yao Qi <yao.qi@linaro.org>
11115
11116 * cli/cli-decode.c (add_alias_cmd): New function.
11117 * command.h (add_alias_cmd): Declare.
11118 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11119 instead call add_alias_cmd.
11120
2b351b19
PA
111212017-05-17 Pedro Alves <palves@redhat.com>
11122
11123 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11124 (nat_makefile_frag): ... this. All references updated.
11125 * configure.ac: Likewise.
11126 * configure.nat: Likewise. Enhance comments.
11127 * configure: Regenerate.
11128
5f2ad7a3
RO
111292017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11130
11131 * procfs.c (procfs_create_inferior): Change prototype to match
11132 definition.
11133
adf3dde5
EZ
111342017-05-13 Eli Zaretskii <eliz@gnu.org>
11135
11136 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11137 C++ compiler warning.
11138
6830f270
TT
111392017-05-12 Tom Tromey <tom@tromey.com>
11140
11141 PR rust/21483:
11142 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11143 recurse, just call value_struct_elt directly.
11144
68f2f2e3
TT
111452017-05-12 Tom Tromey <tom@tromey.com>
11146
11147 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11148 OP_RUST_ARRAY>: Fix.
11149
256afbc2
TT
111502017-05-12 Tom Tromey <tom@tromey.com>
11151
11152 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11153
94bb8dfe
YQ
111542017-05-09 Yao Qi <yao.qi@linaro.org>
11155
11156 * regcache.c: Include <forward_list>.
11157 (struct regcache_list): Remove.
11158 (current_regcache): Update.
11159 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11160 (regcache_thread_ptid_changed): Likewise.
11161 (registers_changed_ptid): Likewise.
11162 (current_regcache_size): Likewise.
11163
8248946c
YQ
111642017-05-09 Yao Qi <yao.qi@linaro.org>
11165
11166 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11167 (current_regcache_size): New function.
11168 (current_regcache_test): New function.
11169 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11170
313c5961
AH
111712017-05-08 Alan Hayward <alan.hayward@arm.com>
11172
11173 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11174 (print_gp_register_row): Use get_frame_register_value.
11175
27bfc1d1
AH
111762017-05-08 Alan Hayward <alan.hayward@arm.com>
11177
11178 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11179 (mips_supply_fpregset): Likewise.
11180 (mips64_supply_gregset): Likewise.
11181
146e6c5c
AH
111822017-05-08 Alan Hayward <alan.hayward@arm.com>
11183
11184 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11185 regcache->raw_supply_zeroed.
11186
e50f25ec
SDJ
111872017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11188
11189 * configure.nat: Rearrange 'case' statements to match
11190 host before cpu.
11191
21ea5acd
SDJ
111922017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11193
11194 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11195 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11196 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11197 "@nat_extra_makefile_frag@".
11198 (Makefile): Remove dependency on "@frags@".
11199 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11200 (data-directory/Makefile): Likewise.
11201 * config/aarch64/linux.mh: Deleted; moved contents to
11202 "gdb/configure.nat".
11203 * config/alpha/alpha-linux.mh: Likewise.
11204 * config/alpha/nbsd.mh: Likewise.
11205 * config/arm/linux.mh: Likewise.
11206 * config/arm/nbsdelf.mh: Likewise.
11207 * config/i386/cygwin.mh: Likewise.
11208 * config/i386/cygwin64.mh: Likewise.
11209 * config/i386/darwin.mh: Likewise.
11210 * config/i386/fbsd.mh: Likewise.
11211 * config/i386/fbsd64.mh: Likewise.
11212 * config/i386/go32.mh: Likewise.
11213 * config/i386/i386gnu.mh: Likewise.
11214 * config/i386/i386sol2.mh: Likewise.
11215 * config/i386/linux.mh: Likewise.
11216 * config/i386/linux64.mh: Likewise.
11217 * config/i386/mingw.mh: Likewise.
11218 * config/i386/mingw64.mh: Likewise.
11219 * config/i386/nbsd64.mh: Likewise.
11220 * config/i386/nbsdelf.mh: Likewise.
11221 * config/i386/nto.mh: Likewise.
11222 * config/i386/obsd.mh: Likewise.
11223 * config/i386/obsd64.mh: Likewise.
11224 * config/i386/sol2-64.mh: Likewise.
11225 * config/ia64/linux.mh: Likewise.
11226 * config/m32r/linux.mh: Likewise.
11227 * config/m68k/linux.mh: Likewise.
11228 * config/m68k/nbsdelf.mh: Likewise.
11229 * config/m68k/obsd.mh: Likewise.
11230 * config/m88k/obsd.mh: Likewise.
11231 * config/mips/fbsd.mh: Likewise.
11232 * config/mips/linux.mh: Likewise.
11233 * config/mips/nbsd.mh: Likewise.
11234 * config/mips/obsd64.mh: Likewise.
11235 * config/pa/linux.mh: Likewise.
11236 * config/pa/nbsd.mh: Likewise.
11237 * config/pa/obsd.mh: Likewise.
11238 * config/powerpc/aix.mh: Likewise.
11239 * config/powerpc/fbsd.mh: Likewise.
11240 * config/powerpc/linux.mh: Likewise.
11241 * config/powerpc/nbsd.mh: Likewise.
11242 * config/powerpc/obsd.mh: Likewise.
11243 * config/powerpc/ppc64-linux.mh: Likewise.
11244 * config/powerpc/spu-linux.mh: Likewise.
11245 * config/s390/linux.mh: Likewise.
11246 * config/sh/nbsd.mh: Likewise.
11247 * config/sparc/fbsd.mh: Likewise.
11248 * config/sparc/linux.mh: Likewise.
11249 * config/sparc/linux64.mh: Likewise.
11250 * config/sparc/nbsd64.mh: Likewise.
11251 * config/sparc/nbsdelf.mh: Likewise.
11252 * config/sparc/obsd64.mh: Likewise.
11253 * config/sparc/sol2.mh: Likewise.
11254 * config/tilegx/linux.mh: Likewise.
11255 * config/vax/nbsdelf.mh: Likewise.
11256 * config/vax/obsd.mh: Likewise.
11257 * config/xtensa/linux.mh: Likewise.
11258 * config/i386/i386gnu.mn: New file, with excerpts from
11259 "config/i386/i386gnu.mh".
11260 * configure: Regenerate.
11261 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11262 *.mh files under "gdb/config".
11263 * configure.nat: New file, with contents from the
11264 "gdb/config/*/*.mh" files.
11265
7ed1acaf
TW
112662017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11267
11268 * btrace.c (btrace_clear): Free insn vector.
11269
e13cb306
PA
112702017-05-05 Pedro Alves <palves@redhat.com>
11271
11272 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11273 * configure: Regenerate.
11274
5ed8105e
PA
112752017-05-04 Pedro Alves <palves@redhat.com>
11276
11277 * Makefile.in (SFILES): Add progspace-and-thread.c.
11278 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11279 (COMMON_OBS): Add progspace-and-thread.o.
11280 * breakpoint.c: Include "progspace-and-thread.h".
11281 (update_inserted_breakpoint_locations)
11282 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11283 Use scoped_restore_current_pspace_and_thread.
11284 (create_std_terminate_master_breakpoint): Use
11285 scoped_restore_current_program_space.
11286 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11287 (print_breakpoint_location): Use
11288 scoped_restore_current_program_space.
11289 (bp_loc_is_permanent): Use
11290 scoped_restore_current_pspace_and_thread.
11291 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11292 (download_tracepoint_locations): Use
11293 scoped_restore_current_pspace_and_thread.
11294 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11295 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11296 (enum step_over_calls_kind): Moved from inferior.h.
11297 (class scoped_restore_current_thread): New class.
11298 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11299 declaration.
11300 (scoped_restore_current_thread): New class.
11301 * infcmd.c: Include "common/gdb_optional.h".
11302 (continue_1, proceed_after_attach): Use
11303 scoped_restore_current_thread.
11304 (notice_new_inferior): Use scoped_restore_current_thread.
11305 * inferior.c: Include "progspace-and-thread.h".
11306 (restore_inferior, save_current_inferior): Delete.
11307 (add_inferior_command, clone_inferior_command): Use
11308 scoped_restore_current_pspace_and_thread.
11309 * inferior.h (scoped_restore_current_inferior): New class.
11310 * infrun.c: Include "progspace-and-thread.h" and
11311 "common/gdb_optional.h".
11312 (follow_fork_inferior): Use
11313 scoped_restore_current_pspace_and_thread.
11314 (scoped_restore_exited_inferior): New class.
11315 (handle_vfork_child_exec_or_exit): Use
11316 scoped_restore_exited_inferior,
11317 scoped_restore_current_pspace_and_thread,
11318 scoped_restore_current_thread and scoped_restore.
11319 (fetch_inferior_event): Use scoped_restore_current_thread.
11320 * linespec.c (decode_line_full, decode_line_1): Use
11321 scoped_restore_current_program_space.
11322 * mi/mi-main.c: Include "progspace-and-thread.h".
11323 (exec_continue): Use scoped_restore_current_thread.
11324 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11325 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11326 * proc-service.c (ps_pglobal_lookup): Use
11327 scoped_restore_current_program_space.
11328 * progspace-and-thread.c: New file.
11329 * progspace-and-thread.h: New file.
11330 * progspace.c (release_program_space, clone_program_space): Use
11331 scoped_restore_current_program_space.
11332 (restore_program_space, save_current_program_space)
11333 (save_current_space_and_thread): Delete.
11334 (switch_to_program_space_and_thread): Moved to
11335 progspace-and-thread.c.
11336 * progspace.h (save_current_program_space)
11337 (save_current_space_and_thread): Delete declarations.
11338 (scoped_restore_current_program_space): New class.
11339 * remote.c (remote_btrace_maybe_reopen): Use
11340 scoped_restore_current_thread.
11341 * symtab.c: Include "progspace-and-thread.h".
11342 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11343 * thread.c (print_thread_info_1): Use
11344 scoped_restore_current_thread.
11345 (struct current_thread_cleanup): Delete.
11346 (do_restore_current_thread_cleanup)
11347 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11348 (scoped_restore_current_thread::~scoped_restore_current_thread):
11349 ... this new dtor.
11350 (make_cleanup_restore_current_thread): Rename/convert to ...
11351 (scoped_restore_current_thread::scoped_restore_current_thread):
11352 ... this new ctor.
11353 (thread_apply_all_command): Use scoped_restore_current_thread.
11354 (thread_apply_command): Use scoped_restore_current_thread.
11355 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11356 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11357
f6223dbb
PA
113582017-05-04 Pedro Alves <palves@redhat.com>
11359
11360 * thread.c (make_cleanup_restore_current_thread): Move
11361 find_thread_ptid call before the is_stopped call. Assert that the
11362 thread is found. Replace is_stopped call by checking the thread's
11363 state directly. Remove unnecessary NULL-thread check.
11364
3c3ae77e
PA
113652017-05-04 Pedro Alves <palves@redhat.com>
11366
11367 * corelow.c (thread_section_name): New class.
11368 (get_core_register_section, get_core_siginfo): Use it.
11369
45eba0ab
AA
113702017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11371
11372 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11373 (get_core_register_section): Remove xfree of NULL pointer.
11374
f81fdd35
AH
113752017-05-03 Alan Hayward <alan.hayward@arm.com>
11376
11377 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11378 * regcache.c (regcache::raw_supply_zeroed): New function.
11379 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11380
35837774
SM
113812017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11382
11383 * gdbarch.sh: Remove commented out definition of
11384 TARGET_CHAR_BIT.
11385 * gdbarch.h: Re-generate.
11386
c94fee56
SDJ
113872017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11388
11389 * configure: Regenerate.
11390
d17f7b36
SM
113912017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11392
11393 * solib-target.c (solib_target_relocate_section_addresses):
11394 Remove num_section_bases, num_bases, segment_bases variables.
11395
b560ebd6
SM
113962017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11397
11398 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11399
f2f46dfc
SM
114002017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11401
11402 * solib-target.c: Include <vector>
11403 (struct lm_info_target) <~lm_info_target>: Remove.
11404 <segment_bases, section_bases>: Change type to
11405 std::vector<CORE_ADDR>.
11406 (library_list_start_segment, library_list_start_section,
11407 library_list_end_library,
11408 solib_target_relocate_section_addresses): Adjust.
11409
a0ff9e1a
SM
114102017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11411
11412 * gdbarch.sh (software_single_step): Change return type to
11413 std::vector<CORE_ADDR>.
11414 * gdbarch.c, gdbarch.h: Re-generate.
11415 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11416 Adjust.
11417 (arm_deal_with_atomic_sequence_raw): Adjust.
11418 (thumb_get_next_pcs_raw): Adjust.
11419 (arm_get_next_pcs_raw): Adjust.
11420 (arm_get_next_pcs): Adjust.
11421 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11422 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11423 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11424 (alpha_software_single_step): Adjust.
11425 * alpha-tdep.h (alpha_software_single_step): Adjust.
11426 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11427 * arm-tdep.c (arm_software_single_step): Adjust.
11428 (arm_breakpoint_kind_from_current_state): Adjust.
11429 * arm-tdep.h (arm_software_single_step): Adjust.
11430 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11431 * cris-tdep.c (cris_software_single_step): Adjust.
11432 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11433 (micromips_deal_with_atomic_sequence): Adjust.
11434 (deal_with_atomic_sequence): Adjust.
11435 (mips_software_single_step): Adjust.
11436 * mips-tdep.h (mips_software_single_step): Adjust.
11437 * moxie-tdep.c (moxie_software_single_step): Adjust.
11438 * nios2-tdep.c (nios2_software_single_step): Adjust.
11439 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11440 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11441 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11442 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11443 * sparc-tdep.c (sparc_software_single_step): Adjust.
11444 * spu-tdep.c (spu_software_single_step): Adjust.
11445 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11446
ea480a30
SM
114472017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11448
11449 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11450 * gdbarch.h: Re-generate.
11451
d050f7d7
TW
114522017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11453
11454 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11455 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11456 * python/py-instruction.c, python/py-instruction.h: New file.
11457 * python/py-record.c: Add py-instruction.h include.
11458 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11459 gdb.RecordInstruction.
11460 * python/python-internal.h: Add gdbpy_initialize_instruction
11461 declaration.
11462 * python/python.c (do_start_initialization): Add
11463 gdbpy_initialize_instruction.
11464
14f819c8
TW
114652017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11466
11467 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11468 Remove.
11469 (btrace_func_from_recpy_func): New function.
11470 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11471 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11472 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11473 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11474 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11475 Also, use new helper functions.
11476 (btpy_list_item): Use new helper functions.
11477 (recpy_bt_function_call_history): Use new type name.
11478 (btpy_call_getset): Remove.
11479 (gdbpy_initialize_btrace): Remove code to initialize
11480 gdb.BtraceFunctionCall.
11481 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11482 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11483 recpy_bt_func_prev, recpy_bt_func_next): New export.
11484 * python/py-record.c (recpy_func_type): New static object.
11485 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11486 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11487 recpy_func_next): New function.
11488 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11489 (recpy_func_getset): New static object.
11490 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11491 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11492
0ed5da75
TW
114932017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11494
11495 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11496 (btpy_object, btpy_insn_type, btpy_new): Remove.
11497 (btpy_list_object): Use gdb.RecordInstruction type instead of
11498 gdb.BtraceInstruction type.
11499 (btrace_insn_from_recpy_insn): New function.
11500 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11501 btpy_new.
11502 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11503 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11504 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11505 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11506 instead of btpy_object.
11507 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11508 btpy_insn_data, btpy_insn_decode): Rename to ...
11509 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11510 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11511 recpy_bt_insn_decode): This. Also, use new helper functions.
11512 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11513 recpy_insn_type.
11514 (btpy_insn_getset): Remove.
11515 (gdbpy_initialize_btrace): Remove code to initialize
11516 gdb.BtraceInstruction. Use recpy_element_object.
11517 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11518 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11519 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11520 * python/py-record.c (recpy_insn_type): New static object.
11521 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11522 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11523 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11524 New function.
11525 (recpy_insn_getset): New static object.
11526 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11527 * python/py-record.h (recpy_element_object): New typedef.
11528 (recpy_insn_type, recpy_insn_new): New export.
11529
913aeadd
TW
115302017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11531
11532 * py-record-btrace.c (btpy_insn_new): Removed.
11533 (btpy_insn_or_gap_new): New function.
11534 (btpy_insn_error): Removed.
11535 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11536 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11537 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11538 btpy_insn_or_gap_new instead of btpy_insn_new.
11539 (btpy_insn_getset): Remove btpy_insn_error.
11540 * py-record.c (recpy_gap_type): New static object.
11541 (recpy_gap_object): New typedef.
11542 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11543 recpy_gap_reason_string): New function.
11544 (recpy_gap_getset): New static object.
11545 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11546 * py-record.h (recpy_gap_new): New export.
11547
a3be24ad
TW
115482017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11549
11550 * python/py-record.c (recpy_ptid): Remove.
11551 (recpy_record_getset): Remove recpy_ptid.
11552
ae20e79a
TW
115532017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11554
11555 * btrace.c (btrace_fetch): Set inferior_ptid.
11556 * python/py-record-btrace.c: Add "py-record.h" include.
11557 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11558 recpy_bt_end, recpy_bt_instruction_history,
11559 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11560 in gdb.Record object instead of current ptid.
11561 * python/py-record.c: Include new "py-record.h" file.
11562 (recpy_record_object): Moved to py-record.h.
11563 * python/py-record.h: New file.
11564
8d0050ea
TW
115652017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11566
11567 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11568 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11569 indentation.
11570
3f380b50
JB
115712017-05-01 Joel Brobecker <brobecker@adacore.com>
11572
11573 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11574 the past maintainers section.
11575
07495424
YQ
115762017-04-28 Yao Qi <yao.qi@linaro.org>
11577
11578 * infcmd.c (get_return_value): Use regcache ctor, and remove
11579 cleanup.
11580
deb1fa3e
YQ
115812017-04-28 Yao Qi <yao.qi@linaro.org>
11582 Pedro Alves <palves@redhat.com>
11583
11584 * regcache.c (regcache::regcache): New tag dispatch ctor.
11585 (do_cooked_read): Moved above.
11586 (regcache_dup): Use the tag dispatch ctor..
11587 * regcache.h (regcache): Declare ctor, delete copy ctor and
11588 assignment operator, remove friend regcache_dup.
11589
b421c83c
YQ
115902017-04-28 Yao Qi <yao.qi@linaro.org>
11591
11592 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11593 call method save instead of regcache_cpy.
11594 * regcache.h (struct regcache): Make regcache_dup a friend.
11595
ef79d9a3
YQ
115962017-04-28 Yao Qi <yao.qi@linaro.org>
11597
11598 * regcache.c (struct regcache): Move to regcache.h
11599 (regcache::arch): New method.
11600 (regcache_get_ptid): Update.
11601 (get_regcache_arch): Call arch method.
11602 (get_regcache_aspace): Call method aspace.
11603 (register_buffer): Change it to method.
11604 (regcache_save): Change it to regcache::save.
11605 (regcache_restore): Likewise.
11606 (regcache_cpy_no_passthrough): Remove the declaration.
11607 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11608 (regcache_cpy_no_passthrough): Change it to method
11609 cpy_no_passthrough.
11610 (regcache_register_status): Change it to method
11611 get_register_status.
11612 (regcache_invalidate): Change it to method invalidate.
11613 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11614 (regcache_raw_update): Change it to method raw_update.
11615 (regcache_raw_read): Likewise.
11616 (regcache_raw_read_signed): Likewise.
11617 (regcache_raw_read_unsigned): Likewise.
11618 (regcache_raw_write_signed): Likewise.
11619 (regcache_raw_write_unsigned): Likewise.
11620 (regcache_cooked_read): Likewise.
11621 (regcache_cooked_read_value): Likewise.
11622 (regcache_cooked_read_signed): Likewise.
11623 (regcache_cooked_read_unsigned): Likewise.
11624 (regcache_cooked_write_signed): Likewise.
11625 (regcache_cooked_write_unsigned): Likewise.
11626 (regcache_raw_set_cached_value): Likewise.
11627 (regcache_raw_write): Likewise.
11628 (regcache_cooked_write): Likewise.
11629 (regcache_xfer_part): Likewise.
11630 (regcache_raw_read_part): Likewise.
11631 (regcache_raw_write_part): Likewise.
11632 (regcache_cooked_read_part): Likewise.
11633 (regcache_cooked_write_part): Likewise.
11634 (regcache_raw_supply): Likewise.
11635 (regcache_raw_collect): Likewise.
11636 (regcache_transfer_regset): Likewise.
11637 (regcache_supply_regset): Likewise.
11638 (regcache_collect_regset): Likewise.
11639 (regcache_debug_print_register): Likewise.
11640 (enum regcache_dump_what): Move it to regcache.h.
11641 (regcache_dump): Change it to method dump.
11642 * regcache.h (enum regcache_dump_what): New.
11643 (class regcache): New.
11644 * target.c (target_fetch_registers): Call method
11645 debug_print_register.
11646 (target_store_registers): Likewise.
11647
f8fdb78e
SM
116482017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11649
11650 * windows-nat.c (struct lm_info_windows): Initialize field.
11651 (windows_make_so): Allocate lm_info_windows with new.
11652 (windows_free_so): Free lm_info_windows with delete.
11653
9ccbfd7b
SM
116542017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11655
11656 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11657 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11658 cleanup.
11659 (darwin_free_so): Free lm_info_darwin with delete.
11660
76e75227
SM
116612017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11662
11663 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11664 <l_addr_p>: Change type to bool.
11665 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11666 (svr4_free_so): Free lm_info_svr4 with delete.
11667 (svr4_copy_library_list): Replace memcpy with call to copy
11668 constructor.
11669 (library_list_start_library, svr4_default_sos): Allocate
11670 lm_info_svr4 with new.
11671
51046d9e
SM
116722017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11673
11674 * solib-target.c (struct lm_info_target): Add destructor,
11675 initialize fields.
11676 <name>: Change type to std::string.
11677 (library_list_start_library): Allocate lm_info_target with new.
11678 (solib_target_free_library_list): Free lm_info_target with
11679 delete.
11680 (solib_target_current_sos): Adapt to std::string.
11681 (solib_target_free_so): Free lm_info_target with delete.
11682
4023ae76
SM
116832017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11684
11685 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11686 fields.
11687 (frv_current_sos): Allocate lm_info_frv with new.
11688 (frv_relocate_main_executable): Free lm_info_frv with delete,
11689 allocate with new.
11690 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11691
af43057b
SM
116922017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11693
11694 * solib-frv.c (struct lm_info_frv): Fix indentation.
11695
b0911207
SM
116962017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11697
11698 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11699 map field.
11700 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11701 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11702 and allocate with new.
11703 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11704
6c401f72
SM
117052017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11706
11707 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11708 <filename, member_name>: Change type to std::string.
11709 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11710 (library_list_start_library): Allocate lm_info_aix with new.
11711 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11712 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11713 with copy constructor.
11714
d0e449a1
SM
117152017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11716
11717 * solist.h (struct lm_info): Remove.
11718 (struct lm_info_base): New class.
11719 (struct so_list) <lm_info>: Change type to lm_info_base *.
11720 * nto-tdep.c (struct lm_info): Remove.
11721 (lm_addr): Adjust.
11722 * solib-aix.c (struct lm_info): Rename to ...
11723 (struct lm_info_aix): ... this. Extend lm_info_base.
11724 (lm_info_p): Rename to ...
11725 (lm_info_aix_p): ... this, and adjust.
11726 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11727 solib_aix_parse_libraries, library_list_start_library,
11728 solib_aix_free_library_list, solib_aix_parse_libraries,
11729 solib_aix_get_library_list,
11730 solib_aix_relocate_section_addresses, solib_aix_free_so,
11731 solib_aix_get_section_offsets,
11732 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11733 Adjust.
11734 (struct solib_aix_inferior_data) <library_list>: Adjust.
11735 * solib-darwin.c (struct lm_info): Rename to ...
11736 (struct lm_info_darwin): ... this. Extend lm_info_base.
11737 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11738 * solib-dsbt.c (struct lm_info): Rename to ...
11739 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11740 (struct dsbt_info) <main_executable_lm_info): Adjust.
11741 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11742 dsbt_relocate_section_addresses): Adjust.
11743 * solib-frv.c (struct lm_info): Rename to ...
11744 (struct lm_info_frv): ... this. Extend lm_info_base.
11745 (main_executable_lm_info): Adjust.
11746 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11747 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11748 find_canonical_descriptor_in_load_object,
11749 frv_fdpic_find_canonical_descriptor): Adjust.
11750 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11751 to lm_info_svr4.
11752 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11753 svr4_clear_so, svr4_copy_library_list,
11754 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11755 svr4_current_sos, svr4_fetch_objfile_link_map,
11756 solist_update_incremental): Adjust.
11757 * solib-svr4.h (struct lm_info_svr4): Move here from
11758 solib-svr4.c.
11759 * solib-target.c (struct lm_info): Rename to ...
11760 (struct lm_info_target): ... this. Extend lm_info_base.
11761 (lm_info_p): Rename to ...
11762 (lm_info_target_p): ... this.
11763 (solib_target_parse_libraries, library_list_start_segment,
11764 library_list_start_section, library_list_start_library,
11765 library_list_end_library, solib_target_free_library_list,
11766 solib_target_current_sos, solib_target_free_so,
11767 solib_target_relocate_section_addresses): Adjust.
11768 * windows-nat.c (struct lm_info): Rename to ...
11769 (struct lm_info_windows): ... this. Extend lm_info_base.
11770 (windows_make_so, handle_load_dll, handle_unload_dll,
11771 windows_xfer_shared_libraries): Adjust.
11772
434a4023
SM
117732017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11774
11775 * solib-darwin.c (struct darwin_so_list): Remove.
11776 (darwin_current_sos): Allocate an so_list object instead of a
11777 darwin_so_list, separately allocate an lm_info object.
11778 (darwin_free_so): Free lm_info.
11779
428544e8
JB
117802017-04-28 John Baldwin <jhb@FreeBSD.org>
11781
11782 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11783 with fprintf_filtered.
11784
4621115f
YQ
117852017-04-28 Yao Qi <yao.qi@linaro.org>
11786
11787 * regcache.c (regcache::regcache): New function.
11788 (regcache::~regcache): New function.
11789 (regcache_xmalloc_1): Remove.
11790 (regcache_xmalloc): Call new regcache.
11791 (regcache_xfree): Call delete regcache.
11792 (get_thread_arch_aspace_regcache): Call new regcache.
11793
339053c2
YQ
117942017-04-28 Yao Qi <yao.qi@linaro.org>
11795
11796 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11797 lwp instead of ptid_get_lwp.
11798
7974a605
YQ
117992017-04-28 Yao Qi <yao.qi@linaro.org>
11800
11801 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11802 lwp_info instead of getting from inferior_ptid.
11803
e15c3eb4
KS
118042017-04-27 Keith Seitz <keiths@redhat.com>
11805
11806 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11807 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11808 (CV_CONVERSION_BADNESS): Define.
11809 (rank_one_type): Remove overly restrictive rvalue reference
11810 rank checks.
11811 Add cv-qualifier checks and subranks for type equality.
11812 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11813 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11814 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11815
72bc1d24
SM
118162017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11817
11818 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11819 count when creating the object.
11820
55bcecda
UW
118212017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11822 Ulrich Weigand <uweigand@de.ibm.com>
11823
11824 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11825 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11826 is used in AIX.
11827 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11828 (process_xcoff_symbol): Likewise.
11829 (scan_xcoff_symtab): Likewise.
11830
5c99fcf8
AH
118312017-04-26 Alan Hayward <alan.hayward@arm.com>
11832
11833 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11834 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11835 (ia64_access_reg): Use get_frame_register_unsigned.
11836 (ia64_access_rse_reg): Likewise.
11837 (ia64_libunwind_frame_prev_register): Likewise.
11838
b41c5a85
JW
118392017-04-26 Jiong Wang <jiong.wang@arm.com>
11840
11841 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11842 * gdbarch.c: Regenerated.
11843 * gdbarch.h: Regenerated.
11844 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11845 visibility external.
11846 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11847 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11848 (enum cfa_how_kind): Move to ...
11849 (struct dwarf2_frame_state_reg_info): Likewise.
11850 (struct dwarf2_frame_state): Likewise.
11851 * dwarf2-frame.h: ... here.
11852 (dwarf2_frame_state_alloc_regs): New declaration.
11853 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11854 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11855
c185f580
AH
118562017-04-26 Alan Hayward <alan.hayward@arm.com>
11857
11858 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11859 regcache_raw_read_unsigned.
11860 (xtensa_pseudo_register_write): Likewise.
11861
19c45594
AH
118622017-04-26 Alan Hayward <alan.hayward@arm.com>
11863
11864 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11865 (nds32_pseudo_register_write): Likewise.
11866
4658f12e
YQ
118672017-04-25 Yao Qi <yao.qi@linaro.org>
11868
11869 * regcache.c (struct regcache) <readonly_p>: Change its type
11870 to bool.
11871 (regcache_xmalloc_1): Update parameter type and callers update.
11872
d581dda8
YQ
118732017-04-25 Yao Qi <yao.qi@linaro.org>
11874
11875 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11876 set_gdbarch_wchar_bit.
11877 * arm-tdep.c (arm_gdbarch_init): Likewise.
11878
debed3db
PA
118792017-04-25 Pedro Alves <palves@redhat.com>
11880
11881 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11882 (BothAreRelocatable, memcopy, memmove): Don't define.
11883 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11884 macros.
11885
b0b92aeb
PA
118862017-04-25 Pedro Alves <palves@redhat.com>
11887
11888 * common/common-defs.h: Include "common/poison.h".
11889 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11890 and adjust.
11891 * common/poison.h: New file.
11892 * common/traits.h: Include <type_traits>.
11893 (Not, Or, Requires): New, moved from common/function-view.h.
11894
16c4d54a
PA
118952017-04-25 Pedro Alves <palves@redhat.com>
11896
11897 * breakpoint.h (struct breakpoint): In-class initialize all
11898 fields. Make boolean fields "bool".
11899 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11900 memset call and initializations no longer necessary.
11901
b5c36682
PA
119022017-04-25 Pedro Alves <palves@redhat.com>
11903
11904 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11905 reference.
11906 (pt_btrace_insn): New function.
11907 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11908
5625a286
PA
119092017-04-25 Pedro Alves <palves@redhat.com>
11910
11911 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11912 "base" field and inherit from "bp_location" instead. Add
11913 non-default ctor.
11914 (allocate_location_exception): Use new non-default ctor.
11915 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11916 (init_bp_location): Convert to ...
11917 (bp_location::bp_location): ... this new ctor, and remove memset
11918 call.
11919 (base_breakpoint_allocate_location): Use the new non-default ctor.
11920 * breakpoint.h (bp_location): Now a class. Declare default and
11921 non-default ctors. In-class initialize all members.
11922 (init_bp_location): Remove declaration.
11923
23bcc18f
PA
119242017-04-25 Pedro Alves <palves@redhat.com>
11925
11926 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11927 assignment operator.
11928
e1ba3053
YQ
119292017-04-24 Yao Qi <yao.qi@linaro.org>
11930
11931 * doublest.c (convert_doublest_to_floatformat): Call
11932 floatformat_totalsize_bytes.
11933
10f489e5
TT
119342017-04-22 Tom Tromey <tom@tromey.com>
11935
11936 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11937 ui_out_emit_list.
11938 * stack.c (print_frame): Use ui_out_emit_list.
11939 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11940 ui_out_emit_list.
11941 * mi/mi-main.c (print_one_inferior)
11942 (mi_cmd_data_list_register_names)
11943 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11944 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11945 ui_out_emit_list.
11946 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11947 (mi_output_solib_attribs): Use ui_out_emit_list,
11948 ui_out_emit_tuple.
11949 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11950 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11951 (mi_cmd_stack_list_args, list_args_or_locals): Use
11952 ui_out_emit_list.
11953 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11954 * breakpoint.c (print_solib_event, output_thread_groups): Use
11955 ui_out_emit_list.
11956
0092b74d
TT
119572017-04-22 Tom Tromey <tom@tromey.com>
11958
11959 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11960 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11961 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11962
a14a62dd
TT
119632017-04-22 Tom Tromey <tom@tromey.com>
11964
11965 * tracepoint.c (tvariables_info_1)
11966 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11967
46b9c129
TT
119682017-04-22 Tom Tromey <tom@tromey.com>
11969
11970 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11971 annotate_arg_emitter.
11972 * breakpoint.c (print_mention_watchpoint)
11973 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11974 * annotate.h (struct annotate_arg_emitter): New.
11975
2e783024
TT
119762017-04-22 Tom Tromey <tom@tromey.com>
11977
11978 * record-btrace.c (record_btrace_insn_history)
11979 (record_btrace_insn_history_range, record_btrace_call_history)
11980 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11981 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11982 ui_out_emit_tuple.
11983 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11984 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11985 * skip.c (skip_info): Use ui_out_emit_tuple.
11986 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11987 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11988 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11989 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11990 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11991 ui_out_emit_tuple.
11992 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11993 (output_register, mi_cmd_data_read_memory)
11994 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11995 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11996 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11997 Use ui_out_emit_tuple.
11998 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11999 ui_out_emit_tuple.
12000 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12001 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12002 * linux-thread-db.c (info_auto_load_libthread_db): Use
12003 ui_out_emit_tuple.
12004 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12005 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12006 * disasm.c (do_mixed_source_and_assembly_deprecated)
12007 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12008 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12009 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12010 * breakpoint.c (print_one_breakpoint_location)
12011 (print_one_breakpoint): Use ui_out_emit_tuple.
12012 * auto-load.c (print_script, info_auto_load_cmd): Use
12013 ui_out_emit_tuple.
12014 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12015
9be21bb4
SM
120162017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12017
12018 * thread.c (print_thread_info_1): Remove dead code.
12019
0d4c07af
JK
120202017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12021
12022 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12023 GDB_SELF_TEST.
12024 * arm-tdep.c (selftests::arm_record_test): Likewise.
12025
4daf993d
YQ
120262017-04-21 Yao Qi <yao.qi@linaro.org>
12027
12028 * regcache.c (regcache_restore): Remove argument 2. Replace
12029 argument 3 with regcache. Get register status from
12030 src->register_status and get register contents from
12031 register_buffer (src, regnum).
12032 (regcache_cpy): Update.
12033
a6c21d4a
PA
120342017-04-19 Pedro Alves <palves@redhat.com>
12035
12036 * gdbthread.h (thread): Add missing closing parenthesis in
12037 comment.
12038
3a3fd0fd
PA
120392017-04-19 Pedro Alves <palves@redhat.com>
12040
12041 * common/refcounted-object.h: New file.
12042 * gdbthread.h: Include "common/refcounted-object.h".
12043 (thread_info): Inherit from refcounted_object and add comments.
12044 (thread_info::incref, thread_info::decref)
12045 (thread_info::m_refcount): Delete.
12046 (thread_info::deletable): Use the refcounted_object::refcount()
12047 method.
12048 * inferior.c (current_inferior_): Add comment.
12049 (set_current_inferior): Increment/decrement refcounts.
12050 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12051 not-deletable instead of comparing with the current inferior.
12052 (initialize_inferiors): Increment the initial inferior's refcount.
12053 * inferior.h (struct inferior): Forward declare.
12054 Include "common/refcounted-object.h".
12055 (current_inferior, set_current_inferior): Move declaration to
12056 before struct inferior's definition, and fix comment.
12057 (inferior): Inherit from refcounted_object. Add comments.
12058 * thread.c (switch_to_thread_no_regs): Reference the thread's
12059 inferior pointer directly instead of doing a ptid lookup.
12060 (switch_to_no_thread): New function.
12061 (switch_to_thread(thread_info *)): New function, factored out
12062 from ...
12063 (switch_to_thread(ptid_t)): ... this.
12064 (restore_current_thread): Delete.
12065 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12066 fields, and add 'inf' field.
12067 (do_restore_current_thread_cleanup): Check whether old->inf is
12068 alive instead of looking up an inferior by ptid. Use
12069 switch_to_thread and switch_to_no_thread.
12070 (restore_current_thread_cleanup_dtor): Use old->inf directly
12071 instead of lookup up an inferior by id. Decref the inferior.
12072 Don't restore 'removable'.
12073 (make_cleanup_restore_current_thread): Same the inferior pointer
12074 in old, instead of the inferior number. Incref the inferior.
12075 Don't save/clear 'removable'.
12076
9bcb1f16
PA
120772017-04-19 Pedro Alves <palves@redhat.com>
12078
12079 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12080 unittests/scoped_restore-selftests.c.
12081 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12082 * common/scoped_restore.h (scoped_restore_base): Make "class".
12083 (scoped_restore_base::release): New public method.
12084 (scoped_restore_base::scoped_restore_base): New protected ctor.
12085 (scoped_restore_base::m_saved_var): New protected field.
12086 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12087 scoped_restore_base base class instead of m_saved_var directly.
12088 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12089 (scoped_restore_tmpl::scoped_restore_tmpl(const
12090 scoped_restore_tmpl<T>&)): Likewise.
12091 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12092 method.
12093 (scoped_restore_tmpl::saved_var): New method.
12094 (scoped_restore_tmpl::m_saved_var): Delete.
12095 * inferior.h (inferior::detaching): Now a bool.
12096 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12097 cleanup.
12098 * unittests/scoped_restore-selftests.c: New file.
12099
26fcd539
PA
121002017-04-19 Pedro Alves <palves@redhat.com>
12101
12102 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12103 Re-sort in alphabetic order.
12104
fdd243b0
PA
121052017-04-18 Pedro Alves <palves@redhat.com>
12106
12107 * xml-support.c (obstack_xml_printf): Delete.
12108 * xml-support.h (obstack_xml_printf): Delete.
12109
4895cde2
PA
121102017-04-18 Pedro Alves <palves@redhat.com>
12111
12112 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12113 vdebug, verror, body_text, start_element, end_element, name,
12114 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12115 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12116 is_xinclude>: Make private and add m_ prefix.
12117 (gdb_xml_parser::body_text): New method, based on ...
12118 (gdb_xml_body_text): ... this. Adjust.
12119 (gdb_xml_parser::vdebug): New method, based on ...
12120 (gdb_xml_debug): ... this. Adjust.
12121 (gdb_xml_parser::verror): New method, based on ...
12122 (gdb_xml_error): ... this. Adjust.
12123 (gdb_xml_parser::start_element): New method, based on ...
12124 (gdb_xml_start_element): ... this. Adjust.
12125 (gdb_xml_start_element_wrapper): Defer to
12126 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12127 (gdb_xml_parser::end_element): New method, based on ...
12128 (gdb_xml_end_element_wrapper): ... this. Adjust.
12129 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12130 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12131 (gdb_xml_parser::use_dtd): New method, based on ...
12132 (gdb_xml_use_dtd): ... this. Adjust.
12133 (gdb_xml_parser::parse): New method, based on ...
12134 (gdb_xml_parse): ... this. Adjust.
12135 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12136 (xinclude_start_include): Adjust to call the parser's name method.
12137 (xml_xinclude_default, xml_xinclude_start_doctype)
12138 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12139 method.
12140 (xml_process_xincludes): Adjust to call parser methods.
12141 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12142 declarations.
12143
bd8a901f
PA
121442017-04-18 Pedro Alves <palves@redhat.com>
12145
12146 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12147 gdb::optional<std::string>.
12148 * xml-support.c: Include <string>.
12149 (scope_level::scope_level(scope_level &&))
12150 (scope_level::~scope_level): Delete.
12151 (scope_level::body): Now a std::string.
12152 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12153 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12154 parameter.
12155 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12156 (xinclude_parsing_data::output): Now a std::string reference.
12157 (xinclude_start_include): Adjust.
12158 (xml_xinclude_default): Adjust.
12159 (xml_process_xincludes): Add 'output' parameter, and return bool.
12160 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12161 and return bool.
12162 * xml-tdesc.c: Include <unordered_map> and <string>.
12163 (tdesc_xml_cache): Delete.
12164 (tdesc_xml_cache_s): Delete.
12165 (xml_cache): Now an std::unordered_map.
12166 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12167 (target_fetch_description_xml): Change return type to
12168 gdb::optional<std::string>, and adjust.
12169 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12170 (target_fetch_description_xml): Change return type to
12171 gdb::optional<std::string>.
12172
d35d1958
PA
121732017-04-18 Pedro Alves <palves@redhat.com>
12174
12175 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12176 unittests/optional-selftests.c.
12177 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12178 * unittests/optional-selftests.c: New file.
12179 * unittests/optional/assignment/1.cc: New file.
12180 * unittests/optional/assignment/2.cc: New file.
12181 * unittests/optional/assignment/3.cc: New file.
12182 * unittests/optional/assignment/4.cc: New file.
12183 * unittests/optional/assignment/5.cc: New file.
12184 * unittests/optional/assignment/6.cc: New file.
12185 * unittests/optional/assignment/7.cc: New file.
12186 * unittests/optional/cons/copy.cc: New file.
12187 * unittests/optional/cons/default.cc: New file.
12188 * unittests/optional/cons/move.cc: New file.
12189 * unittests/optional/cons/value.cc: New file.
12190 * unittests/optional/in_place.cc: New file.
12191 * unittests/optional/observers/1.cc: New file.
12192 * unittests/optional/observers/2.cc: New file.
12193
22796e97
PA
121942017-04-18 Pedro Alves <palves@redhat.com>
12195
12196 * common/gdb_optional.h: Include common/traits.h.
12197 (in_place_t): New type.
12198 (in_place): New constexpr variable.
12199 (optional::optional): Remove member initialization of
12200 m_instantiated.
12201 (optional::optional(in_place_t...)): New constructor.
12202 (optional::~optional): Use reset.
12203 (optional::optional(const optional&)): New.
12204 (optional::optional(const optional&&)): New.
12205 (optional::optional(T &)): New.
12206 (optional::optional(T &&)): New.
12207 (operator::operator=(const optional &)): New.
12208 (operator::operator=(optional &&)): New.
12209 (operator::operator= (const T &))
12210 (operator::operator= (T &&))
12211 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12212 (operator::reset): New.
12213 (operator::m_instantiated):: Add in-class initializer.
12214 * common/traits.h: Include <type_traits>.
12215 (struct And): New types.
12216
a7fc9b61
PA
122172017-04-18 Pedro Alves <palves@redhat.com>
12218
12219 * xml-support.c: Include <vector>.
12220 (scope_level::scope_level(const gdb_xml_element *))
12221 (scope_level::scope_level(scope_level&&)): New.
12222 (scope_level::~scope_level): New.
12223 (scope_level_s): Delete.
12224 (gdb_xml_parser::scopes): Now a std::vector.
12225 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12226 Use std::vector.
12227 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12228 scope cleanup code.
12229 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12230 of the scopes member. Use std::vector::emplace_back.
12231
010151c9
PA
122322017-04-18 Pedro Alves <palves@redhat.com>
12233
12234 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12235 a bool.
12236 (gdb_xml_end_element): Change type of first parameter.
12237 (gdb_xml_cleanup): Rename to ...
12238 (gdb_xml_parser::~gdb_xml_parser): ... this.
12239 (gdb_xml_create_parser_and_cleanup): Delete with ...
12240 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12241 to this new ctor.
12242 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12243 using gdb_xml_create_parser_and_cleanup.
12244 (xinclude_parsing_data): Add ctor/dtor.
12245 (xml_xinclude_cleanup): Delete.
12246 (xml_process_xincludes): Create a local xinclude_parsing_data
12247 instead of heap-allocating one. Create a local gdb_xml_parser
12248 instead of heap-allocating one with
12249 gdb_xml_create_parser_and_cleanup.
12250
d56060f0
JB
122512017-04-18 John Baldwin <jhb@FreeBSD.org>
12252
12253 PR threads/20743
12254 * fbsd-nat.c (resume_one_thread_cb): Remove.
12255 (resume_all_threads_cb): Remove.
12256 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12257 iterate_over_threads.
12258
305d16a9
JB
122592017-04-17 Joel Brobecker <brobecker@adacore.com>
12260
12261 * NEWS: Create a new section for the next release branch.
12262 Rename the section of the current branch, now that it has
12263 been cut.
12264
8bb57231
JB
122652017-04-17 Joel Brobecker <brobecker@adacore.com>
12266
12267 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12268 * version.in: Bump version to 8.0.50.DATE-git.
12269
096c92dd
SDJ
122702017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12271
12272 PR gdb/21385
12273 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12274 independently of the host, and fix build breakage on Cygwin.
12275
0550c955
PA
122762017-04-13 Pedro Alves <palves@redhat.com>
12277
12278 * inferior.c (free_inferior): Convert to ...
12279 (inferior::~inferior): ... this dtor.
12280 (inferior::inferior): New ctor, factored out from ...
12281 (add_inferior_silent): ... here. Allocate the inferior with a new
12282 expression.
12283 (delete_inferior): Call delete instead of free_inferior.
12284 * inferior.h (gdb_environ, continuation): Forward declare.
12285 (inferior): Now a class. Add in-class initialization to all
12286 members. Make boolean fields bool, except 'detaching'.
12287 (inferior::inferior): New explicit ctor.
12288 (inferior::~inferior): New.
12289
e3d60dfc
PA
122902017-04-13 Pedro Alves <palves@redhat.com>
12291
12292 * inferior.c (init_inferior_list): Delete.
12293 * inferior.h (init_inferior_list): Delete.
12294
5fd69d0a
PA
122952017-04-13 Pedro Alves <palves@redhat.com>
12296
12297 PR threads/13217
12298 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12299 (top level): Call it twice, with different thread sets.
12300
c6609450
PA
123012017-04-13 Pedro Alves <palves@redhat.com>
12302
12303 * thread.c: Include <algorithm>.
12304 (thread_array_cleanup): Delete.
12305 (scoped_inc_dec_ref): New class.
12306 (live_threads_count): New function.
12307 (set_thread_refcount): Delete.
12308 (tp_array_compar_ascending): Now a bool.
12309 (tp_array_compar): Convert to a std::sort comparison function.
12310 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12311 and live_threads_count.
12312
2a00d7ce
PA
123132017-04-13 Pedro Alves <palves@redhat.com>
12314
12315 * infrun.c (follow_fork_inferior): Also switch the current
12316 inferior.
12317
441d7c93
PA
123182017-04-13 Pedro Alves <palves@redhat.com>
12319
12320 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12321 before calling create_internal_breakpoint.
12322
808480f6
PA
123232017-04-13 Pedro Alves <palves@redhat.com>
12324
12325 * fork-child.c (execv_argv): New class.
12326 (breakup_args): Refactored as ...
12327 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12328 Copy arguments to storage and replace separators with NULL
12329 terminators in place.
12330 (escape_bang_in_quoted_argument): Adjust to return bool.
12331 (execv_argv::execv_argv): New ctor.
12332 (execv_argv::init_for_shell): New method, factored out from
12333 fork_inferior. Don't strdup strings into the vector.
12334 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12335 Remove free_vector_argv call.
12336
ad3d022a
YQ
123372017-04-13 Yao Qi <yao.qi@linaro.org>
12338
12339 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12340 tdep->rx_psw_type.
12341
e6ddc3bf
YQ
123422017-04-13 Yao Qi <yao.qi@linaro.org>
12343
12344 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12345 * rx-tdep.c (rx_gdbarch_init): Likewise.
12346
bfb8cf90
PA
123472017-04-13 Pedro Alves <palves@redhat.com>
12348
12349 * breakpoint.h (struct breakpoint): Reindent.
12350
f5336ca5
PA
123512017-04-13 Pedro Alves <palves@redhat.com>
12352
12353 * breakpoint.c (bp_location): Rename to ...
12354 (bp_locations): ... this. All references updated.
12355 (bp_location_count): Rename to ...
12356 (bp_locations_count): ... this. All references updated.
12357 (bp_location_placed_address_before_address_max): Rename to ...
12358 (bp_locations_placed_address_before_address_max): ... this. All
12359 references updated.
12360 (bp_location_shadow_len_after_address_max): Rename to ...
12361 (bp_locations_shadow_len_after_address_max): ... this. All
12362 references updated.
12363 (bp_location_compare_addrs): Rename to ...
12364 (bp_locations_compare_addrs): ... this. All references updated.
12365 (bp_location_compare):Rename to ...
12366 (bp_locations_compare): ... this. All references updated.
12367 (bp_location_target_extensions_update): Rename to ...
12368 (bp_locations_target_extensions_update): ... this. All references
12369 updated.
12370
be628ab8
SDJ
123712017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12372
12373 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12374 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12375 'sgtty.h'.
12376 * common/gdb_termios.h: New file, with parts of "terminal.h".
12377 * inflow.c: Include "gdb_termios.h".
12378 * ser-unix.c: Include "gdb_termios.h".
12379 * terminal.h: Move terminal-related defines to
12380 "common/gdb_termios.h".
12381
8e9e35b1
TT
123822017-04-12 Tom Tromey <tom@tromey.com>
12383
12384 * probe.c (parse_probes): Update.
12385 * location.h (delete_event_location): Don't declare.
12386 (event_location_deleter::operator()): Update.
12387 * location.c (event_location_deleter::operator()): Rename from
12388 delete_event_location.
12389 * linespec.h (linespec_result) <location>: Change type to
12390 event_location_up.
12391 * linespec.c (canonicalize_linespec, event_location_to_sals)
12392 (decode_objc): Update.
12393 (linespec_result): Don't call delete_event_location.
12394 * breakpoint.c (create_breakpoints_sal)
12395 (bkpt_probe_create_sals_from_location)
12396 (strace_marker_create_sals_from_location): Update.
12397
16e802b9
TT
123982017-04-12 Tom Tromey <tom@tromey.com>
12399
12400 * linespec.h (struct linespec_result): Add constructor and
12401 destructor.
12402 (init_linespec_result, destroy_linespec_result)
12403 (make_cleanup_destroy_linespec_result): Don't declare.
12404 * linespec.c (init_linespec_result): Remove.
12405 (linespec_result::~linespec_result): Rename from
12406 destroy_linespec_result. Update.
12407 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12408 Remove.
12409 * breakpoint.c (create_breakpoint, break_range_command)
12410 (decode_location_default): Update.
12411 * ax-gdb.c (agent_command_1): Update.
12412
d28cd78a
TT
124132017-04-12 Tom Tromey <tom@tromey.com>
12414
12415 * remote.c (remote_download_tracepoint): Update.
12416 * python/py-breakpoint.c (bppy_get_location): Update.
12417 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12418 (gdbscm_breakpoint_location): Update.
12419 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12420 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12421 Change type to event_location_up.
12422 * breakpoint.c (create_overlay_event_breakpoint)
12423 (create_longjmp_master_breakpoint)
12424 (create_std_terminate_master_breakpoint)
12425 (create_exception_master_breakpoint)
12426 (breakpoint_event_location_empty_p, print_breakpoint_location)
12427 (print_one_breakpoint_location, create_thread_event_breakpoint)
12428 (init_breakpoint_sal, create_breakpoint)
12429 (print_recreate_ranged_breakpoint, break_range_command)
12430 (init_ada_exception_breakpoint, say_where): Update.
12431 (base_breakpoint_dtor): Don't call delete_event_location.
12432 (bkpt_print_recreate, tracepoint_print_recreate)
12433 (dprintf_print_recreate, update_static_tracepoint)
12434 (breakpoint_re_set_default): Update.
12435
711799d5
TT
124362017-04-12 Tom Tromey <tom@tromey.com>
12437
12438 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12439 type of "to_do". Update.
12440 (compute_stack_depth): Use std::vector.
12441
52d214d3
TT
124422017-04-12 Tom Tromey <tom@tromey.com>
12443
12444 * printcmd.c (find_instruction_backward): Use std::vector.
12445
4c404b8b
TT
124462017-04-12 Tom Tromey <tom@tromey.com>
12447
12448 * symfile.c (objfilep): Remove typedef.
12449 (reread_symbols): Use a std::vector.
12450
156d9eab
TT
124512017-04-12 Tom Tromey <tom@tromey.com>
12452
12453 * mi/mi-main.c (exec_direction_forward): Remove.
12454 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12455 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12456 scoped_restore.
12457 * guile/guile.c (guile_repl_command, guile_command)
12458 (gdbscm_execute_gdb_command): Use scoped_restore.
12459 * go-exp.y (go_parse): Use scoped_restore.
12460 * d-exp.y (d_parse): Use scoped_restore.
12461 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12462 * c-exp.y (c_parse): Use scoped_restore.
12463
4d89769a
TT
124642017-04-12 Tom Tromey <tom@tromey.com>
12465
12466 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12467 (mi_parse): Update return type.
12468 (mi_parse_free): Remove.
12469 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12470 (mi_parse::~mi_parse): Rename from mi_parse_free.
12471 (mi_parse_cleanup): Remove.
12472 (mi_parse): Return a unique_ptr. Use new.
12473 * mi/mi-main.c (mi_execute_command): Update.
12474
4b217cc7
TT
124752017-04-12 Tom Tromey <tom@tromey.com>
12476
12477 * location.c (explicit_location_lex_one): Return a
12478 unique_xmalloc_ptr.
12479 (string_to_explicit_location): Update. Remove cleanups.
12480
59d3651b
TT
124812017-04-12 Tom Tromey <tom@tromey.com>
12482
12483 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12484 (compare_value_and_voffset): Change type. Update.
12485 (compute_vtable_size): Change type of "offset_vec".
12486 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12487 (gnuv3_get_typeid): Remove extraneous declaration.
12488
b24b0d6c
TT
124892017-04-12 Tom Tromey <tom@tromey.com>
12490
12491 * charset.h (wchar_iterator): Fix comment.
12492
80a3b8c5
TT
124932017-04-12 Tom Tromey <tom@tromey.com>
12494
12495 * charset.c (iconv_wrapper): New class.
12496 (cleanup_iconv): Remove.
12497 (convert_between_encodings): Use it.
12498
c83dd867
TT
124992017-04-12 Tom Tromey <tom@tromey.com>
12500
12501 * symfile.h (increment_reading_symtab): Update type.
12502 * symfile.c (decrement_reading_symtab): Remove.
12503 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12504 * psymtab.c (psymtab_to_symtab): Update.
12505 * dwarf2read.c (dw2_instantiate_symtab): Update.
12506
0e8621a0
TT
125072017-04-12 Tom Tromey <tom@tromey.com>
12508
12509 * jit.c (struct jit_reader): Declare separately. Add constructor
12510 and destructor. Change type of "handle".
12511 (loaded_jit_reader): Define separately.
12512 (jit_reader_load): Update. New "new".
12513 (jit_reader_unload_command): Use "delete".
12514 * gdb-dlfcn.h (struct dlclose_deleter): New.
12515 (gdb_dlhandle_up): New typedef.
12516 (gdb_dlopen, gdb_dlsym): Update types.
12517 (gdb_dlclose): Remove.
12518 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12519 (gdb_dlsym): Change type of "handle".
12520 (make_cleanup_dlclose): Remove.
12521 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12522 * compile/compile-c-support.c (load_libcc): Update.
12523
67d89901
TT
125242017-04-12 Tom Tromey <tom@tromey.com>
12525
12526 * symtab.h (find_pcs_for_symtab_line): Change return type.
12527 * symtab.c (find_pcs_for_symtab_line): Change return type.
12528 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12529 type of "vec". Update.
12530 (ltpy_get_pcs_for_line): Update.
12531 * linespec.c (decode_digits_ordinary): Update.
12532
93921405
TT
125332017-04-12 Tom Tromey <tom@tromey.com>
12534
12535 * tracepoint.c (actions_command): Update.
12536 * python/python.c (python_command, python_interactive_command):
12537 Update.
12538 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12539 * guile/guile.c (guile_command): Update.
12540 * defs.h (read_command_lines, read_command_lines_1): Return
12541 command_line_up.
12542 (command_lines_deleter): New struct.
12543 (command_line_up): New typedef.
12544 * compile/compile.c (compile_code_command)
12545 (compile_print_command): Update.
12546 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12547 command_line_up.
12548 (make_cleanup_free_command_lines): Remove.
12549 * cli/cli-script.c (get_command_line, read_command_lines_1)
12550 (copy_command_lines): Return command_line_up.
12551 (while_command, if_command, read_command_lines, define_command)
12552 (document_command): Update.
12553 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12554 Remove.
12555 * breakpoint.h (breakpoint_set_commands): Change type of
12556 "commands".
12557 * breakpoint.c (breakpoint_set_commands): Change type of
12558 "commands". Update.
12559 (do_map_commands_command, update_dprintf_command_list)
12560 (create_tracepoint_from_upload): Update.
12561
ffc2605c
TT
125622017-04-12 Tom Tromey <tom@tromey.com>
12563
12564 * tracepoint.c (scope_info): Update.
12565 * spu-tdep.c (spu_catch_start): Update.
12566 * python/python.c (gdbpy_decode_line): Update.
12567 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12568 * python/py-breakpoint.c (bppy_init): Update.
12569 * probe.c (parse_probes): Update.
12570 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12571 * location.h (event_location_deleter): New struct.
12572 (event_location_up): New typedef.
12573 (new_linespec_location, new_address_location, new_probe_location)
12574 (new_explicit_location, copy_event_location)
12575 (string_to_event_location, string_to_event_location_basic)
12576 (string_to_explicit_location): Update return type.
12577 (make_cleanup_delete_event_location): Remove.
12578 * location.c (new_linespec_location, new_address_location)
12579 (new_probe_location, new_explicit_location, copy_event_location):
12580 Return event_location_up.
12581 (delete_event_location_cleanup)
12582 (make_cleanup_delete_event_location): Remove.
12583 (string_to_explicit_location, string_to_event_location_basic)
12584 (string_to_event_location): Return event_location_up.
12585 * linespec.c (canonicalize_linespec, event_location_to_sals)
12586 (decode_line_with_current_source)
12587 (decode_line_with_last_displayed, decode_objc): Update.
12588 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12589 * completer.c (location_completer): Update.
12590 * cli/cli-cmds.c (edit_command, list_command): Update.
12591 * breakpoint.c (create_overlay_event_breakpoint)
12592 (create_longjmp_master_breakpoint)
12593 (create_std_terminate_master_breakpoint)
12594 (create_exception_master_breakpoint)
12595 (create_thread_event_breakpoint): Update.
12596 (init_breakpoint_sal): Update. Remove some dead code.
12597 (create_breakpoint_sal): Change type of "location". Update.
12598 (create_breakpoints_sal, create_breakpoint, break_command_1)
12599 (dprintf_command, break_range_command, until_break_command)
12600 (init_ada_exception_breakpoint)
12601 (strace_marker_create_sals_from_location)
12602 (update_static_tracepoint, trace_command, ftrace_command)
12603 (strace_command, create_tracepoint_from_upload): Update.
12604 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12605 * ax-gdb.c (agent_command_1): Update.
12606
8f10c932
PA
126072017-04-12 Pedro Alves <palves@redhat.com>
12608
12609 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12610 * configure.tgt: Handle i[34567]86-*-go32* and
12611 i[34567]86-*-msdosdjgpp*.
12612 * i386-tdep.c (i386_svr4_reg_to_regnum):
12613 Make extern.
12614 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12615 i386-go32-tdep.c.
12616 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12617 * i386-go32-tdep.c: New file.
12618 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12619 declarations.
12620
0a31ccfb
SM
126212017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12622
12623 * aix-thread.c (pd_status2str): Change return type to const char *.
12624
e9bb3fbb
PA
126252017-04-12 Pedro Alves <palves@redhat.com>
12626
12627 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12628 calls to set_gdbarch_gnu_triplet_regexp.
12629
53375380
PA
126302017-04-12 Pedro Alves <palves@redhat.com>
12631
12632 PR gdb/21323
12633 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12634 New enum value.
12635 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12636 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12637 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12638 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12639 * gdbarch.h, gdbarch.c: Regenerate.
12640 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12641 gdbarch_wchar_bit and gdbarch_wchar_signed.
12642 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12643 * arm-tdep.c (arm_gdbarch_init): Likewise.
12644 * avr-tdep.c (avr_gdbarch_init): Likewise.
12645 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12646 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12647 * i386-tdep.c (i386_go32_init_abi): Likewise.
12648 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12649 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12650 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12651 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12652 * sh-tdep.c (sh_gdbarch_init): Likewise.
12653 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12654 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12655 * windows-tdep.c (windows_init_abi): Likewise.
12656 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12657
53e710ac
PA
126582017-04-12 Pedro Alves <palves@redhat.com>
12659
12660 PR c++/21323
12661 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12662 cplus_primitive_type_char32_t>: New enum values.
12663 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12664 and cplus_primitive_type_char32_t.
12665 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12666 32, use the archtecture's built-in type for char16_t and char32_t,
12667 respectively. Otherwise, fallback to init_integer_type as before,
12668 but make the type unsigned, and issue a complaint.
12669 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12670
ab0538b8
AH
126712017-04-12 Alan Hayward <alan.hayward@arm.com>
12672
5e0e0422 12673 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12674 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12675
5430098f
SDJ
126762017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12677
12678 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12679 'const char *'.
12680
7c5ded6a
SDJ
126812017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12682
12683 * common/common-utils.c (free_vector_argv): New function.
12684 * common/common-utils.h: Include <vector>.
12685 (free_vector_argv): New prototype.
12686 * darwin-nat.c (darwin_create_inferior): Rewrite function
12687 prototype in order to constify "exec_file" and accept a
12688 "std::string" for "allargs".
12689 * fork-child.c: Include <vector>.
12690 (breakup_args): Rewrite function, using C++.
12691 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12692 and accept "std::string" for "allargs". Update the code to
12693 calculate "argv" based on "allargs". Update calls to "exec_fun"
12694 and "execvp".
12695 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12696 order to constify "exec_file" and accept a "std::string" for
12697 "allargs".
12698 * go32-nat.c (go32_create_inferior): Likewise.
12699 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12700 * infcmd.c (run_command_1): Constify "exec_file". Use
12701 "std::string" for inferior arguments.
12702 * inferior.h (fork_inferior): Update prototype.
12703 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12704 prototype in order to constify "exec_file" and accept a
12705 "std::string" for "allargs".
12706 * nto-procfs.c (procfs_create_inferior): Likewise.
12707 * procfs.c (procfs_create_inferior): Likewise.
12708 * remote-sim.c (gdbsim_create_inferior): Likewise.
12709 * remote.c (extended_remote_run): Update code to accept
12710 "std::string" as argument.
12711 (extended_remote_create_inferior): Rewrite function prototype in
12712 order to constify "exec_file" and accept a "std::string" for
12713 "allargs".
12714 * rs6000-nat.c (super_create_inferior): Likewise.
12715 (rs6000_create_inferior): Likewise.
12716 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12717 * windows-nat.c (windows_create_inferior): Likewise.
12718
ae0eee42
PA
127192017-04-11 Pedro Alves <palves@redhat.com>
12720
12721 * thread.c: Fix whitespace throughout.
12722
a6acac06
PR
127232017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12724
12725 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12726
64403bd1
AH
127272017-04-11 Alan Hayward <alan.hayward@arm.com>
12728
12729 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12730
a5bef50f
SDJ
127312017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12732
12733 PR gdb/21364
12734 * osdata.c (info_osdata): Check if 'type' is an empty string
12735 instead of NULL.
12736
9295a5a9
PA
127372017-04-10 Pedro Alves <palves@redhat.com>
12738
12739 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12740 (ptid_to_global_thread_id, in_thread_list)
12741 (do_captured_list_thread_ids, set_resumed, set_running)
12742 (set_executing, set_stop_requested, finish_thread_state)
12743 (validate_registers_access, can_access_registers_ptid)
12744 (print_thread_info_1, switch_to_thread)
12745 (do_restore_current_thread_cleanup)
12746 (make_cleanup_restore_current_thread, thread_command)
12747 (thread_name_command): Use operator== instead of ptid_equal.
12748
996812e3
PA
127492017-04-10 Pedro Alves <palves@redhat.com>
12750
12751 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12752 (current_thread_cleanup_chain): Delete.
12753 (restore_current_thread_cleanup_dtor)
12754 (make_cleanup_restore_current_thread): Remove references to
12755 current_thread_cleanup_chain.
12756
845b344f
AH
127572017-04-10 Alan Hayward <alan.hayward@arm.com>
12758
12759 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12760 REG_UNKNOWN.
12761
803bdfe4
YQ
127622017-04-10 Yao Qi <yao.qi@linaro.org>
12763
12764 PR gdb/19942
12765 * gdbthread.h (thread_info::deletable): New method.
12766 (thread_info::incref): New method.
12767 (thread_info::decref): New method.
12768 (thread_info::refcount): Move it to private.
12769 * infrun.c (save_stop_context): Call inc_refcount.
12770 (release_stop_context_cleanup): Likewise.
12771 * thread.c (set_thread_exited): New function.
12772 (init_thread_list): Delete "tp" only it is deletable, otherwise
12773 call set_thread_exited.
12774 (delete_thread_1): Call set_thread_exited.
12775 (current_thread_cleanup) <inferior_pid>: Remove.
12776 <thread>: New field.
12777 (restore_current_thread_ptid_changed): Removed.
12778 (do_restore_current_thread_cleanup): Adjust.
12779 (restore_current_thread_cleanup_dtor): Don't call
12780 find_thread_ptid.
12781 (set_thread_refcount): Use dec_refcount.
12782 (make_cleanup_restore_current_thread): Adjust.
12783 (thread_apply_all_command): Call inc_refcount.
12784 (_initialize_thread): Don't call
12785 observer_attach_thread_ptid_changed.
12786
8c25b497
YQ
127872017-04-10 Yao Qi <yao.qi@linaro.org>
12788
12789 * thread.c (delete_thread_1): Hoist code on marking thread as
12790 exited.
12791
8473b447
SM
127922017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12793
12794 * windows-nat.c (windows_detach): Initialize ptid with
12795 minus_one_ptid.
12796
6670ec13
SM
127972017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12798
12799 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12800
ba2f91bb
AH
128012017-04-07 Alan Hayward <alan.hayward@arm.com>
12802
12803 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12804 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12805 (bfin_pseudo_register_write): Likewise
12806
436252de
SM
128072017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12808
12809 * common/ptid.h (struct ptid): Change to...
12810 (class ptid_t): ... this.
12811 <ptid_t>: New constructors.
12812 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12813 matches>: New methods.
12814 <make_null, make_minus_one>: New static methods.
12815 <pid>: Rename to...
12816 <m_pid>: ...this.
12817 <lwp>: Rename to...
12818 <m_lwp>: ...this.
12819 <tid>: Rename to...
12820 <m_tid>: ...this.
12821 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12822 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12823 as references, move comment to class ptid_t.
12824 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12825 ptid_t static methods.
12826 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12827 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12828 Take ptid arguments as references, implement using ptid_t methods.
12829 * unittests/ptid-selftests.c: New file.
12830 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12831 unittests/ptid-selftests.c.
12832 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12833
0dedf377
TP
128342017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12835
12836 * python/python.c (python_run_simple_file): Cast mode literal to
12837 non-const char pointer as expected by PyFile_FromString.
12838
4e9868d4
SM
128392017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12840
12841 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12842 minus_one_ptid and null_ptid.
12843
9bf2a700
PA
128442017-04-05 Pedro Alves <palves@redhat.com>
12845
12846 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12847 * configure: Regenerate.
12848
a121b7c1
PA
128492017-04-05 Pedro Alves <palves@redhat.com>
12850
12851 * ada-exp.y (yyerror): Constify.
12852 * ada-lang.c (bound_name, get_selections)
12853 (ada_variant_discrim_type)
12854 (ada_variant_discrim_name, ada_value_struct_elt)
12855 (ada_lookup_struct_elt_type, is_unchecked_variant)
12856 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12857 (catch_ada_exception_command_split)
12858 (catch_ada_assert_command_split, catch_assert_command)
12859 (ada_op_name): Constify.
12860 * ada-lang.h (ada_yyerror, get_selections)
12861 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12862 * arc-tdep.c (arc_print_frame_cache): Constify.
12863 * arm-tdep.c (arm_skip_stub): Constify.
12864 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12865 (gen_aggregate_elt_ref): Constify.
12866 * bcache.c (print_bcache_statistics): Constify.
12867 * bcache.h (print_bcache_statistics): Constify.
12868 * break-catch-throw.c (catch_exception_command_1):
12869 * breakpoint.c (struct ep_type_description::description):
12870 Constify.
12871 (add_solib_catchpoint): Constify.
12872 (catch_fork_command_1): Add cast.
12873 (add_catch_command): Constify.
12874 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12875 Constify.
12876 * bsd-uthread.c (bsd_uthread_state): Constify.
12877 * buildsym.c (patch_subfile_names): Constify.
12878 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12879 Constify.
12880 * c-exp.y (yyerror): Constify.
12881 (token::oper): Constify.
12882 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12883 * c-varobj.c (cplus_describe_child): Constify.
12884 * charset.c (find_charset_names): Add cast.
12885 (find_charset_names): Constify array and add const_cast.
12886 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12887 (edit_command): Constify.
12888 * cli/cli-decode.c (lookup_cmd): Constify.
12889 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12890 Constify.
12891 (struct dump_context): Constify.
12892 (add_dump_command, restore_command): Constify.
12893 * cli/cli-script.c (get_command_line): Constify.
12894 * cli/cli-script.h (get_command_line): Constify.
12895 * cli/cli-utils.c (check_for_argument): Constify.
12896 * cli/cli-utils.h (check_for_argument): Constify.
12897 * coff-pe-read.c (struct read_pe_section_data): Constify.
12898 * command.h (lookup_cmd): Constify.
12899 * common/print-utils.c (decimal2str): Constify.
12900 * completer.c (gdb_print_filename): Constify.
12901 * corefile.c (set_gnutarget): Constify.
12902 * cp-name-parser.y (yyerror): Constify.
12903 * cp-valprint.c (cp_print_class_member): Constify.
12904 * cris-tdep.c (cris_register_name, crisv32_register_name):
12905 Constify.
12906 * d-exp.y (yyerror): Constify.
12907 (struct token::oper): Constify.
12908 * d-lang.h (d_yyerror): Constify.
12909 * dbxread.c (struct header_file_location::name): Constify.
12910 (add_old_header_file, add_new_header_file, last_function_name)
12911 (dbx_next_symbol_text, add_bincl_to_list)
12912 (find_corresponding_bincl_psymtab, set_namestring)
12913 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12914 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12915 * defs.h (command_line_input, print_address_symbolic)
12916 (deprecated_readline_begin_hook): Constify.
12917 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12918 Constify.
12919 * event-top.c (handle_line_of_input): Constify and add cast.
12920 * exceptions.c (catch_errors): Constify.
12921 * exceptions.h (catch_errors): Constify.
12922 * expprint.c (print_subexp_standard, op_string, op_name)
12923 (op_name_standard, dump_raw_expression, dump_raw_expression):
12924 * expression.h (op_name, op_string, dump_raw_expression):
12925 Constify.
12926 * f-exp.y (yyerror): Constify.
12927 (struct token::oper): Constify.
12928 (struct f77_boolean_val::name): Constify.
12929 * f-lang.c (f_word_break_characters): Constify.
12930 * f-lang.h (f_yyerror): Constify.
12931 * fork-child.c (fork_inferior): Add cast.
12932 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12933 (new_variant): Constify.
12934 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12935 * gdbarch.c: Regenerate.
12936 * gdbcore.h (set_gnutarget): Constify.
12937 * go-exp.y (yyerror): Constify.
12938 (token::oper): Constify.
12939 * go-lang.h (go_yyerror): Constify.
12940 * go32-nat.c (go32_sysinfo): Constify.
12941 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12942 * guile/scm-cmd.c (cmdscm_function): Constify.
12943 * guile/scm-param.c (pascm_param_value): Constify.
12944 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12945 (h8300sx_register_name): Constify.
12946 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12947 Constify.
12948 * ia64-tdep.c (ia64_register_names): Constify.
12949 * infcmd.c (construct_inferior_arguments): Constify.
12950 (path_command, attach_post_wait): Constify.
12951 * language.c (show_range_command, show_case_command)
12952 (unk_lang_error): Constify.
12953 * language.h (language_defn::la_error)
12954 (language_defn::la_name_of_this): Constify.
12955 * linespec.c (decode_line_2): Constify.
12956 * linux-thread-db.c (thread_db_err_str): Constify.
12957 * lm32-tdep.c (lm32_register_name): Constify.
12958 * m2-exp.y (yyerror): Constify.
12959 * m2-lang.h (m2_yyerror): Constify.
12960 * m32r-tdep.c (m32r_register_names): Constify and make static.
12961 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12962 * m88k-tdep.c (m88k_register_name): Constify.
12963 * macroexp.c (appendmem): Constify.
12964 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12965 (upgrade_type, parse_external, parse_partial_symbols)
12966 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12967 (new_symbol): Constify.
12968 * memattr.c (mem_info_command): Constify.
12969 * mep-tdep.c (register_name_from_keyword): Constify.
12970 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12971 Constify.
12972 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12973 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12974 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12975 cast.
12976 (mi_execute_async_cli_command): Constify.
12977 * mips-tdep.c (mips_register_name): Constify.
12978 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12979 (am33_register_name, am33_2_register_name)
12980 * moxie-tdep.c (moxie_register_names): Constify.
12981 * nat/linux-osdata.c (osdata_type): Constify fields.
12982 * nto-tdep.c (nto_parse_redirection): Constify.
12983 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12984 (lookup_child_selector): Constify.
12985 (objc_methcall::name): Constify.
12986 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12987 (lookup_struct_typedef): Constify.
12988 * objfiles.c (pc_in_section): Constify.
12989 * objfiles.h (pc_in_section): Constify.
12990 * p-exp.y (struct token::oper): Constify.
12991 (yyerror): Constify.
12992 * p-lang.h (pascal_yyerror): Constify.
12993 * parser-defs.h (op_name_standard): Constify.
12994 (op_print::string): Constify.
12995 (exp_descriptor::op_name): Constify.
12996 * printcmd.c (print_address_symbolic): Constify.
12997 * psymtab.c (print_partial_symbols): Constify.
12998 * python/py-breakpoint.c (stop_func): Constify.
12999 (bppy_get_expression): Constify.
13000 * python/py-cmd.c (cmdpy_completer::name): Constify.
13001 (cmdpy_function): Constify.
13002 * python/py-event.c (evpy_add_attribute)
13003 (gdbpy_initialize_event_generic): Constify.
13004 * python/py-event.h (evpy_add_attribute)
13005 (gdbpy_initialize_event_generic): Constify.
13006 * python/py-evts.c (add_new_registry): Constify.
13007 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13008 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13009 * python/py-inferior.c (get_buffer): Add cast.
13010 * python/py-param.c (parm_constant::name): Constify.
13011 * python/py-unwind.c (fprint_frame_id): Constify.
13012 * python/python.c (gdbpy_parameter_value): Constify.
13013 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13014 * remote.c (memory_packet_config::name): Constify.
13015 (show_packet_config_cmd, remote_write_bytes)
13016 (remote_buffer_add_string):
13017 * reverse.c (exec_reverse_once): Constify.
13018 * rs6000-tdep.c (variant::name, variant::description): Constify.
13019 * rust-exp.y (rustyyerror): Constify.
13020 * rust-lang.c (rust_op_name): Constify.
13021 * rust-lang.h (rustyyerror): Constify.
13022 * serial.h (serial_ops::name): Constify.
13023 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13024 (sh_sh3e_register_name, sh_sh2e_register_name)
13025 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13026 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13027 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13028 (sh_sh4al_dsp_register_name): Constify.
13029 * sh64-tdep.c (sh64_register_name): Constify.
13030 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13031 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13032 * stabsread.c (patch_block_stabs, read_type_number)
13033 (ref_map::stabs, ref_add, process_reference)
13034 (symbol_reference_defined, define_symbol, define_symbol)
13035 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13036 (read_one_struct_field, read_struct_fields, read_baseclasses)
13037 (read_tilde_fields, read_struct_type, read_array_type)
13038 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13039 (read_huge_number, read_range_type, read_args, common_block_start)
13040 (find_name_end): Constify.
13041 * stabsread.h (common_block_start, define_symbol)
13042 (process_one_symbol, symbol_reference_defined, ref_add):
13043 * symfile.c (get_section_index, add_symbol_file_command):
13044 * symfile.h (get_section_index): Constify.
13045 * target-descriptions.c (tdesc_type::name): Constify.
13046 (tdesc_free_type): Add cast.
13047 * target.c (find_default_run_target):
13048 (add_deprecated_target_alias, find_default_run_target)
13049 (target_announce_detach): Constify.
13050 (do_option): Constify.
13051 * target.h (add_deprecated_target_alias): Constify.
13052 * thread.c (print_thread_info_1): Constify.
13053 * top.c (deprecated_readline_begin_hook, command_line_input):
13054 Constify.
13055 (init_main): Add casts.
13056 * top.h (handle_line_of_input): Constify.
13057 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13058 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13059 (tfind_command): Rename to ...
13060 (tfind_command_1): ... this and constify.
13061 (tfind_command): New function.
13062 (tfind_end_command, tfind_start_command): Adjust.
13063 (encode_source_string): Constify.
13064 * tracepoint.h (encode_source_string): Constify.
13065 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13066 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13067 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13068 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13069 * tui/tui-win.c (parse_scrolling_args): Constify.
13070 * tui/tui-windata.c (tui_erase_data_content): Constify.
13071 * tui/tui-windata.h (tui_erase_data_content): Constify.
13072 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13073 * tui/tui.c (tui_enable): Add cast.
13074 * utils.c (defaulted_query): Constify.
13075 (init_page_info): Add cast.
13076 (puts_debug, subset_compare): Constify.
13077 * utils.h (subset_compare): Constify.
13078 * varobj.c (varobj_format_string): Constify.
13079 * varobj.h (varobj_format_string): Constify.
13080 * vax-tdep.c (vax_register_name): Constify.
13081 * windows-nat.c (windows_detach): Constify.
13082 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13083 * xml-support.c (gdb_xml_end_element): Constify.
13084 * xml-tdesc.c (tdesc_start_reg): Constify.
13085 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13086 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13087 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13088
995816ba
PA
130892017-04-05 Pedro Alves <palves@redhat.com>
13090
13091 * proc-api.c (struct trans): Constify.
13092 (procfs_note): Constify.
13093 * proc-events.c (struct trans, syscall_table):
13094 * proc-flags.c (struct trans): Constify.
13095 * proc-utils.h (procfs_note): Constify.
13096 * proc-why.c (struct trans): Constify.
13097 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13098 (procfs_detach): Constify.
13099 * sol-thread.c (struct string_map): Constify.
13100 (td_err_string, td_state_string): Constify.
13101
3e83a920
PA
131022017-04-05 Pedro Alves <palves@redhat.com>
13103
13104 * proc-api.c (procfs_filename): Don't initialize
13105 procfs_filename.
13106 (prepare_to_trace): Assume procfs_filename is non-NULL.
13107 (_initialize_proc_api): Give procfs_filename a default value here.
13108
63160a43
PA
131092017-04-05 Pedro Alves <palves@redhat.com>
13110
13111 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13112 'cond_string' parameter.
13113 (extract_exception_regexp): Constify 'string' parameter.
13114 (catch_exception_command_1): Constify.
13115 * breakpoint.c (init_catchpoint)
13116 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13117 parameter.
13118 (ep_parse_optional_if_clause, catch_fork_command_1)
13119 (catch_exec_command_1): Constify.
13120 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13121 parameter.
13122 (ep_parse_optional_if_clause): Constify.
13123 * cli/cli-utils.c (remove_trailing_whitespace)
13124 (check_for_argument): Constify.
13125 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13126 non-const overload.
13127 (check_for_argument): Likewise.
13128
9b2eba3d
PA
131292017-04-05 Pedro Alves <palves@redhat.com>
13130
13131 * event-top.c (command_line_handler): Add cast to execute_command
13132 call.
13133 * record-btrace.c (cmd_record_btrace_bts_start)
13134 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13135 (cmd_record_btrace_start): Add cast to execute_command call.
13136 * record-full.c (record_full_goto_insn):
13137 * record.c (record_start, record_stop): Add cast to
13138 execute_command_to_string calls.
13139 (cmd_record_start): Add cast to execute_command calls.
13140
2adadf51
PA
131412017-04-05 Pedro Alves <palves@redhat.com>
13142
13143 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13144 static inline function.
13145 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13146 array and use gdb_PyArg_ParseTupleAndKeywords.
13147 * python/py-cmd.c (cmdpy_init): Likewise.
13148 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13149 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13150 (infpy_search_memory): Likewise.
13151 * python/py-objfile.c (objfpy_add_separate_debug_file)
13152 (gdbpy_lookup_objfile): Likewise.
13153 * python/py-symbol.c (gdbpy_lookup_symbol)
13154 (gdbpy_lookup_global_symbol): Likewise.
13155 * python/py-type.c (gdbpy_lookup_type): Likewise.
13156 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13157 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13158 Likewise.
13159
0d1f4ceb
PA
131602017-04-05 Pedro Alves <palves@redhat.com>
13161
13162 * python/python-internal.h (gdb_PyGetSetDef): New type.
13163 * python/py-block.c (block_object_getset)
13164 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13165 * python/py-event.c (event_object_getset)
13166 (finish_breakpoint_object_getset): Likewise.
13167 * python/py-inferior.c (inferior_object_getset): Likewise.
13168 * python/py-infthread.c (thread_object_getset): Likewise.
13169 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13170 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13171 * python/py-objfile.c (objfile_getset): Likewise.
13172 * python/py-progspace.c (pspace_getset): Likewise.
13173 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13174 Likewise.
13175 * python/py-record.c (recpy_record_getset): Likewise.
13176 * python/py-symbol.c (symbol_object_getset): Likewise.
13177 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13178 Likewise.
13179 * python/py-type.c (type_object_getset, field_object_getset):
13180 Likewise.
13181 * python/py-value.c (value_object_getset): Likewise.
13182
4d759979
PA
131832017-04-05 Pedro Alves <palves@redhat.com>
13184
13185 * python/python-internal.h (gdb_PyObject_CallMethod)
13186 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13187 New functions.
13188 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13189 (PySys_GetObject, PySys_SetPath): New macros.
13190
fdf9e36f
PA
131912017-04-05 Pedro Alves <palves@redhat.com>
13192
13193 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13194 info_osdata_command.
13195 * osdata.c (info_osdata_command): Rename to ...
13196 (info_osdata): ... this. Constify 'type' parameter, and remove
13197 the 'from_tty' parameter. Accept NULL TYPE.
13198 (info_osdata_command): New function.
13199 * osdata.h (info_osdata_command): Remove declaration.
13200 (info_osdata): New declaration.
13201
9f33b8b7
PA
132022017-04-05 Pedro Alves <palves@redhat.com>
13203
13204 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13205 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13206 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13207 parameter.
13208 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13209 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13210 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13211 parameter.
13212 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13213 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13214 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13215 (mi_cmd_file_list_exec_source_files)
13216 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13217 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13218 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13219 parameter.
13220 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13221 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13222 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13223 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13224 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13225 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13226 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13227 'command' parameter.
13228 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13229 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13230 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13231 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13232 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13233 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13234 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13235 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13236 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13237 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13238 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13239 parameter.
13240 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13241 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13242 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13243 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13244 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13245 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13246 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13247 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13248 (mi_cmd_data_list_changed_registers)
13249 (mi_cmd_data_write_register_values)
13250 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13251 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13252 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13253 (mi_cmd_list_features, mi_cmd_list_target_features)
13254 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13255 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13256 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13257 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13258 (mi_cmd_trace_frame_collected): Constify 'command'
13259 parameter.
13260 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13261 'command' parameter.
13262
67cb5b2d
PA
132632017-04-05 Pedro Alves <palves@redhat.com>
13264
13265 * ada-lang.c (ada_completer_word_break_characters): Now a const
13266 array.
13267 (ada_get_gdb_completer_word_break_characters): Constify.
13268 * completer.c (gdb_completer_command_word_break_characters)
13269 (gdb_completer_file_name_break_characters)
13270 (gdb_completer_quote_characters): Now const arrays.
13271 (get_gdb_completer_quote_characters): Constify.
13272 (set_rl_completer_word_break_characters): New function.
13273 (set_gdb_completion_word_break_characters)
13274 (complete_line_internal): Use it.
13275 * completer.h (get_gdb_completer_quote_characters): Constify.
13276 (set_rl_completer_word_break_characters): Declare.
13277 * f-lang.c (f_word_break_characters): Constify.
13278 * language.c (default_word_break_characters): Constify.
13279 * language.h (language_defn::la_word_break_characters): Constify.
13280 (default_word_break_characters): Constify.
13281 * top.c (init_main): Use set_rl_completer_word_break_characters.
13282
7a114964
PA
132832017-04-05 Pedro Alves <palves@redhat.com>
13284
13285 * aix-thread.c (aix_thread_pid_to_str)
13286 (aix_thread_extra_thread_info): Constify.
13287 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13288 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13289 (bsd_uthread_pid_to_str): Constify.
13290 * corelow.c (core_pid_to_str): Constify.
13291 * darwin-nat.c (darwin_pid_to_str): Constify.
13292 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13293 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13294 Constify.
13295 * gnu-nat.c (gnu_pid_to_str): Constify.
13296 * go32-nat.c (go32_pid_to_str): Constify.
13297 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13298 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13299 * inferior.c (inferior_pid_to_str): Constify.
13300 * linux-nat.c (linux_nat_pid_to_str): Constify.
13301 * linux-tdep.c (linux_core_pid_to_str): Constify.
13302 * linux-thread-db.c (thread_db_pid_to_str)
13303 (thread_db_extra_thread_info): Constify.
13304 * nto-tdep.c (nto_extra_thread_info): Constify.
13305 * nto-tdep.h (nto_extra_thread_info): Constify.
13306 * obsd-nat.c (obsd_pid_to_str): Constify.
13307 * procfs.c (procfs_pid_to_str): Constify.
13308 * ravenscar-thread.c (ravenscar_extra_thread_info)
13309 (ravenscar_pid_to_str): Constify.
13310 * remote-sim.c (gdbsim_pid_to_str): Constify.
13311 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13312 Constify.
13313 * sol-thread.c (solaris_pid_to_str): Constify.
13314 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13315 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13316 * target.c (default_pid_to_str, target_pid_to_str)
13317 (normal_pid_to_str, default_pid_to_str): Constify.
13318 * target.h (target_ops::to_pid_to_str)
13319 (target_ops::to_extra_thread_info): Constify.
13320 (target_pid_to_str, normal_pid_to_str): Constify.
13321 * windows-nat.c (windows_pid_to_str): Constify.
13322 * gdbarch.sh (core_pid_to_str): Constify.
13323 * target-delegates.c: Regenerate.
13324 * gdbarch.h, gdbarch.c: Regenerate.
13325
69bbf465
PA
133262017-04-05 Pedro Alves <palves@redhat.com>
13327
13328 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13329 the memory of the temporary warning_pre_print override.
13330 * utils.c (warning_pre_print): Constify.
13331 * utils.h (warning_pre_print): Constify.
13332
be47f9e8
PA
133332017-04-05 Pedro Alves <palves@redhat.com>
13334
13335 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13336 (shell_command): New function.
13337 (make_command): Use std::string.
13338 (init_cli_cmds): Register shell_command instead of shell_escape.
13339
bde6261a
PA
133402017-04-05 Pedro Alves <palves@redhat.com>
13341
13342 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13343 * tracepoint.c (default_collect): Don't initialize.
13344
b38ef47f
PA
133452017-04-05 Pedro Alves <palves@redhat.com>
13346
13347 * macroexp.c (macro_buffer::shared): Now a bool.
13348 (init_buffer): Update.
13349 (init_shared_buffer): Constify 'addr' parameter.
13350 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13351 casts.
13352
f995bbe8
PA
133532017-04-05 Pedro Alves <palves@redhat.com>
13354
13355 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13356 * disasm.c (set_disassembler_options): Constify local.
13357 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13358
4a596fe2
SDJ
133592017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13360
13361 PR gdb/21352
13362 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13363 option.
13364
2cad08ea
YQ
133652017-04-05 Yao Qi <yao.qi@linaro.org>
13366
13367 * frame.c (frame_unwind_register_unsigned): Call
13368 frame_unwind_register_value.
13369
55a98976
YQ
133702017-04-05 Yao Qi <yao.qi@linaro.org>
13371
13372 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13373 Use gdb_test_multiple, and don't match anchor.
13374
4ac40124
PA
133752017-04-05 Pedro Alves <palves@redhat.com>
13376
13377 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13378 (Write After Approval): Remove Simon Marchi.
13379
c053b654
PA
133802017-04-05 Pedro Alves <palves@redhat.com>
13381
13382 * common/gdb_optional.h (optional::optional): Make constexpr and
13383 initialize m_dummy.
13384
4c7bf4f9
JB
133852017-04-04 John Baldwin <jhb@FreeBSD.org>
13386
13387 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13388 (amd64fbsd_jmp_buf_reg_offset): Remove.
13389 (amd64fbsd_supply_uthread): Remove function.
13390 (amd64fbsd_collect_uthread): Remove function.
13391 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13392 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13393 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13394 (fbsd-nat.c): Update comment.
13395 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13396 (i386fbsd_jmp_buf_reg_offset): Remove.
13397 (i386fbsd_supply_uthread): Remove function.
13398 (i386fbsd_collect_uthread): Remove function.
13399 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13400
1e1a8bef
JB
134012017-04-04 John Baldwin <jhb@FreeBSD.org>
13402
13403 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13404 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13405 * NEWS: Mention that support for FreeBSD/alpha was removed.
13406 * alpha-fbsd-tdep.c: Delete file.
13407 * config/alpha/fbsd.mh: Delete file.
13408 * configure.host: Delete alpha*-*-freebsd* and
13409 alpha*-*-kfreebsd*-gnu.
13410 * configure.tgt: Delete alpha*-*-freebsd* and
13411 alpha*-*-kfreebsd*-gnu.
13412
49907934
JB
134132017-04-04 John Baldwin <jhb@FreeBSD.org>
13414
13415 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13416 amd64bsd_store_inferior_registers): Use ptid from regcache.
13417
6f77053d
PA
134182017-04-04 Pedro Alves <palves@redhat.com>
13419
13420 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13421 data fields, make them private and add "m_" prefixes.
13422 (lnp_state_machine::lnp_state_machine): New ctor.
13423 (record_line, check_line_address, handle_set_discriminator)
13424 (handle_set_address, handle_advance_pc, handle_special_opcode)
13425 (handle_advance_line, handle_set_file, handle_negate_stmt)
13426 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13427 (end_sequence, advance_line): New methods.
13428 (m_gdbarch, m_record_lines_p): New fields.
13429 (lnp_reader_state): Delete.
13430 (dwarf_record_line): Rename to ...
13431 (lnp_state_machine::record_line): ... adjust.
13432 (init_lnp_state_machine): Delete.
13433 (lnp_state_machine::lnp_state_machine): New.
13434 (check_line_address): Rename to ...
13435 (lnp_state_machine::check_line_address): This.
13436 (dwarf_decode_lines_1): Remove reference to "reader_state".
13437 Adjust lnp_state_machine having a non-default ctor. Use bool.
13438 State machine internal state manipulation moved to
13439 lnp_state_machine methods.
13440
9c541725
PA
134412017-04-04 Pedro Alves <palves@redhat.com>
13442
13443 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13444 unittests/offset-type-selftests.c.
13445 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13446 * common/offset-type.h: New file.
13447 * common/preprocessor.h: New file.
13448 * common/traits.h: New file.
13449 * common/valid-expr.h: New file.
13450 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13451 sect_offset and cu_offset strong typedefs throughout.
13452 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13453 typedefs throughout.
13454 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13455 sect_offset and cu_offset strong typedefs throughout.
13456 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13457 typedefs throughout.
13458 * gdbtypes.h: Include "common/offset-type.h".
13459 (cu_offset): Now an offset type (strong typedef) instead of a
13460 struct.
13461 (sect_offset): Likewise.
13462 (union call_site_parameter_u): Rename "param_offset" field to
13463 "param_cu_off".
13464 * unittests/offset-type-selftests.c: New file.
13465
ecfb656c
PA
134662017-04-04 Pedro Alves <palves@redhat.com>
13467
13468 * common/underlying.h: New file.
13469 * dwarf2read.c: Include "common/gdb_optional.h" and
13470 "common/underlying.h".
13471 (dir_index, file_name_index): New types.
13472 (file_entry): Use them.
13473 (file_entry::include): Use to_underlying.
13474 (line_header::add_file_name): Use dir_index.
13475 (read_formatted_entries): Use gdb::optional. Read form before
13476 writting to file_entry.
13477 (dwarf_decode_line_header): Use dir_index.
13478 (lnp_state_machine::current_file): Use to_underlying.
13479 (lnp_state_machine::file): Change type to file_name_index.
13480 (dwarf_record_line): Use to_underlying.
13481 (init_lnp_state_machine): Use file_name_index.
13482 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13483
d194f1fe
PA
134842017-04-04 Pedro Alves <palves@redhat.com>
13485
13486 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13487 operator bool, has_value and get methods.
13488
fff8551c
PA
134892017-04-04 Pedro Alves <palves@redhat.com>
13490
13491 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13492 fields.
13493 (line_header): Initialize all data fields. Change type of
13494 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13495 Change type of include_dirs to std::vector<const char *>. Remove
13496 num_include_dirs, include_dirs_size. Change type of file_names to
13497 std::vector<file_entry>. Remove num_file_names, file_names_size.
13498 (line_header::line_header): New.
13499 (line_header::add_include_dir, line_header::add_file_name): New
13500 methods.
13501 (line_header::include_dir_at): Remove NULL check.
13502 (line_header::file_name_at): Add const overload.
13503 (line_header_up): New unique_ptr typedef.
13504 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13505 std::vector. Remove free_line_header call.
13506 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13507 free_line_header call.
13508 (free_cu_line_header): Delete.
13509 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13510 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13511 Adjust to use std::vector.
13512 (free_line_header): Delete.
13513 (free_line_header_voidp): Use delete.
13514 (add_include_dir): Replace with ...
13515 (line_header::add_include_dir): ... this method. Use std::vector.
13516 (add_file_name): Replace with ...
13517 (line_header::add_file_name): ... this method. Use std::vector.
13518 (add_include_dir_stub): Delete.
13519 (read_formatted_entries): Remove memset.
13520 (dwarf_decode_line_header): Return a line_header_up instead of a
13521 raw pointer. Remove cleanup handling. Pass lambdas to
13522 read_formatted_entries. Adjust to use line_header methods.
13523 (dwarf_decode_lines_1): Adjust to use line_header methods.
13524 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13525 use std::vector.
13526
d62a8ae2
SM
135272017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13528
13529 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13530 instead of struct ptid.
13531
db3a1dc7
AH
135322017-05-04 Alan Hayward <alan.hayward@arm.com>
13533
13534 * frame.c (get_frame_register_bytes): Unwind using value.
13535 (put_frame_register_bytes): Likewise.
13536
b1b45502
IB
135372017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13538
13539 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13540 aggregate-like.
13541
ec13808e
JK
135422017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13543
13544 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13545
12316564
YQ
135462017-03-29 Yao Qi <yao.qi@linaro.org>
13547
13548 * gdbthread.h (struct thread_info): Declare constructor and
13549 destructor. Add some in-class member initializers.
13550 * thread.c (free_thread): Remove.
13551 (init_thread_list): Call delete instead of free_thread.
13552 (new_thread): Call thread_info constructor.
13553 (thread_info::thread_info): New function.
13554 (thread_info::~thread_info): New function.
13555 (delete_thread_1): Call delete instead of free_thread.
13556 (make_cleanup_restore_current_thread): Move tp and frame to
13557 inner block.
13558
fe5f7374
AK
135592017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13560
13561 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13562 (arc_skip_prologue): Likewise.
13563 (arc_make_frame_cache): Likewise.
13564 (arc_pv_get_operand): New function.
13565 (arc_is_in_prologue): Likewise.
13566 (arc_analyze_prologue): Likewise.
13567 (arc_print_frame_cache): Likewise.
13568 (MAX_PROLOGUE_LENGTH): New constant.
13569
eea78757
AK
135702017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13571
13572 * configure.tgt: Add arc-insn.o.
13573 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13574 (dump_arc_instruction_command): New function.
13575 (arc_fprintf_disasm): Likewise.
13576 (arc_disassemble_info): Likewise.
13577 (arc_insn_get_operand_value): Likewise.
13578 (arc_insn_get_operand_value_signed): Likewise.
13579 (arc_insn_get_memory_base_reg): Likewise.
13580 (arc_insn_get_memory_offset): Likewise.
13581 (arc_insn_get_branch_target): Likewise.
13582 (arc_insn_dump): Likewise.
13583 (arc_insn_get_linear_next_pc): Likewise.
13584 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13585 (arc_disassemble_info): Likewise.
13586 (arc_insn_get_branch_target): Likewise.
13587 (arc_insn_get_linear_next_pc): Likewise.
13588 * NEWS: Mention new "maint print arc arc-instruction".
13589
3be78afd
AK
135902017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13591
13592 * arc-tdep (maintenance_print_arc_list): New variable.
13593 (maintenance_print_arc_command): New function.
13594
296ec4fa
AK
135952017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13596
13597 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13598 Add "limm" and "reserved".
13599 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13600 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13601 * arc-tdep.h (arc_regnum): Likewise.
13602
f74f865e
MF
136032017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13604
13605 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13606 for THREADPTR register.
13607 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13608 register.
13609 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13610 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13611 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13612
0d0bf81a
MF
136132017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13614
13615 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13616 registers above gdbarch_num_regs (gdbarch) as privileged in
13617 call0 ABI.
13618
0ce4291e
MF
136192017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13620
13621 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13622 for a single specified register or for all registers in
13623 a0_base..a0_base + C0_NREGS range.
13624 (supply_gregset_reg): Call regcache_raw_supply for a single
13625 specified register or for all registers in a0_base..a0_base +
13626 C0_NREGS range.
13627
c56054f9
MF
136282017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13629
13630 * arch/xtensa.h (C0_NREGS): Add definition.
13631 * xtensa-tdep.c (C0_NREGS): Remove definition.
13632
a4398628
MF
136332017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13634
13635 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13636 Drop xtensa_default_isa initialization.
13637 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13638
8c43009f
PA
136392017-03-27 Pedro Alves <palves@redhat.com>
13640
13641 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13642 (file_entry::include_dir): New method.
13643 (line_header::include_dir_at, line_header::file_name_at): New
13644 methods.
13645 (setup_type_unit_groups, setup_type_unit_groups)
13646 (psymtab_include_file_name): Simplify using the new methods.
13647 (lnp_state_machine) <the_line_header>: New field.
13648 <file>: Add comment.
13649 (lnp_state_machine::current_file): New method.
13650 (dwarf_record_line): Simplify using the new methods.
13651 (init_lnp_state_machine): Initialize the "the_line_header" field.
13652 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13653 Simplify using the new methods.
13654
a7e80b9e
PA
136552017-03-27 Pedro Alves <palves@redhat.com>
13656
13657 * cp-name-parser.y (make_empty): Delete.
13658 (demangler_special, nested_name, ptr_operator, array_indicator)
13659 (direct_declarator, declarator_1): Use fill_comp instead of
13660 make_empty.
13661
21047726
PA
136622017-03-27 Pedro Alves <palves@redhat.com>
13663
13664 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13665 to ATTRIBUTE_PRINTF.
13666 * solib-target.c (library_list_start_list): Print "string" not
13667 "version".
13668 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13669 gdb_xml_error call.
13670
d721ba37
PA
136712017-03-27 Pedro Alves <palves@redhat.com>
13672
13673 * dwarf2read.c (struct file_and_directory): New.
13674 (dwarf2_get_dwz_file): Adjust to use std::string.
13675 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13676 (find_file_and_directory): Adjust to return a file_and_directory
13677 object.
13678 (read_file_scope): Adjust to use file_and_directory. Remove
13679 make_cleanup/do_cleanups calls.
13680 (open_and_init_dwp_file): Adjust to use std::string. Remove
13681 make_cleanup/do_cleanups calls.
13682 * python/python.c (do_start_initialization): Adjust to ldirname
13683 returning a std::string.
13684 * utils.c (ldirname): Now returns a std::string.
13685 * utils.h (ldirname): Change return type to std::string.
13686 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13687 returning a std::string.
13688 * xml-tdesc.c (file_read_description_xml): Likewise.
13689
ed771251
AH
136902017-03-24 Alan Hayward <alan.hayward@arm.com>
13691
13692 * regcache.c (regcache_debug_print_register): New function.
13693 * regcache.h (regcache_debug_print_register): New declaration.
13694 * target.c (debug_print_register): Remove.
13695 (target_fetch_registers): Call regcache_debug_print_register.
13696 (target_store_registers): Likewise.
13697
568c1b9f
PB
136982017-03-24 Pádraig Brady <pbrady@fb.com>
13699
13700 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13701 reference beyond the 'lh->include_dirs' array before accessing to
13702 it.
13703 (psymtab_include_file_name): Likewise.
13704 (dwarf_decode_lines_1): Likewise.
13705 (dwarf_decode_lines): Likewise.
13706 (file_file_name): Likewise.
13707
3e00d44f
SM
137082017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13709
13710 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13711 inferior_ptid.
13712 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13713 ps_lsetfpregs): Likewise.
13714 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13715 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13716 ps_lsetfpregs): Likewise.
13717 * target.c (target_fetch_registers, target_store_registers):
13718 Remove asserts.
13719
077ae656
AH
137202017-03-23 Alan Hayward <alan.hayward@arm.com>
13721
13722 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13723
1e2b521d
YQ
137242017-03-23 Yao Qi <yao.qi@linaro.org>
13725
13726 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13727 (_initialize_aarch64_tdep): Register it.
13728 (aarch64_record_load_store): Handle PRFM instruction.
13729 (aarch64_process_record_test): New function.
13730
33877125
YQ
137312017-03-23 Yao Qi <yao.qi@linaro.org>
13732
13733 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13734 indentation.
13735
a0eef940
YQ
137362017-03-23 Yao Qi <yao.qi@linaro.org>
13737
13738 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13739
3f2a3564
PR
137402017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13741
13742 python/python.c (do_start_initialization): Fix memory leak.
13743
b67aeab0
SM
137442017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13745
13746 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13747 using get_ptrace_pid.
13748 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13749 inferior_ptid.
13750 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13751 inferior_ptid instead of pid.
13752
ffdbe864
YQ
137532017-03-22 Yao Qi <yao.qi@linaro.org>
13754
13755 * aarch64-tdep.c: Wrap locally used classes in anonymous
13756 namespace.
13757 * arm-tdep.c: Likewise.
13758 * linespec.c: Likewise.
13759 * ui-out.c: Likewise.
13760
9d736fbf
JG
137612017-03-22 Jonah Graham <jonah@kichwacoders.com>
13762
13763 PR gdb/19637
13764 * python/lib/gdb/printer/bound_registers.py: Import sys.
13765
3de88e9a
SM
137662017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13767
13768 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13769 windows_thread_info parameter and use it instead of
13770 current_thread.
13771 (windows_fetch_inferior_registers): Don't set current_thread,
13772 pass the thread to do_windows_fetch_inferior_registers. Use
13773 ptid from regcache instead of inferior_ptid.
13774 (do_windows_store_inferior_registers): Add windows_thread_info
13775 parameter and use it instead of current_thread.
13776 (windows_store_inferior_registers): Don't set current_thread,
13777 pass the thread to do_windows_store_inferior_registers. Use
13778 ptid from regcache instead of inferior_ptid.
13779
0e7b8f61
SM
137802017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13781
13782 * ser-mingw.c (ser_windows_raw): Remove reference to
13783 struct serial::current_timeout.
13784
5badf10a
IR
137852017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13786
13787 PR tdep/20928
13788 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13789 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13790 (sparc64_fsr_type): Fix %fsr decoding.
13791
cee59b3f
TW
137922017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13793
13794 * python/py-record-btrace.c (btpy_insn_data): Change return type
13795 for Python 2.
13796
639a9038
SM
137972017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13798
13799 * spu-linux-nat.c (spu_fetch_inferior_registers,
13800 spu_store_inferior_registers): Use ptid from regcache, set and
13801 restore inferior_ptid.
13802 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13803 Likewise.
13804
bcc0c096
SM
138052017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13806
13807 * i386-linux-nat.c (fetch_register, store_register,
13808 i386_linux_fetch_inferior_registers,
13809 i386_linux_store_inferior_registers): Use ptid from regcache.
13810 * ia64-linux-nat.c (ia64_linux_fetch_register,
13811 ia64_linux_store_register): Likewise.
13812 * inf-ptrace.c (inf_ptrace_fetch_register,
13813 inf_ptrace_store_register): Likewise.
13814 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13815 m32r_linux_store_inferior_registers): Likewise.
13816 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13817 m68kbsd_store_inferior_registers): Likewise.
13818 * m68k-linux-nat.c (fetch_register, store_register,
13819 m68k_linux_fetch_inferior_registers,
13820 m68k_linux_store_inferior_registers): Likewise.
13821 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13822 m88kbsd_store_inferior_registers): Likewise.
13823 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13824 mips_fbsd_store_inferior_registers): Likewise.
13825 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13826 mips64_linux_regsets_store_registers): Likewise.
13827 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13828 mipsnbsd_store_inferior_registers): Likewise.
13829 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13830 mips64obsd_store_inferior_registers): Likewise.
13831 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13832 Likewise.
13833 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13834 ppcfbsd_store_inferior_registers): Likewise.
13835 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13836 ppc_linux_store_inferior_registers): Likewise.
13837 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13838 ppcnbsd_store_inferior_registers): Likewise.
13839 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13840 ppcobsd_store_registers): Likewise.
13841 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13842 Likewise.
13843 * ravenscar-thread.c (ravenscar_fetch_registers,
13844 ravenscar_store_registers, ravenscar_prepare_to_store):
13845 Likewise.
13846 * record-btrace.c (record_btrace_fetch_registers,
13847 record_btrace_store_registers, record_btrace_prepare_to_store):
13848 Likewise.
13849 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13850 Lookup inferior using ptid from regcache, instead of
13851 current_inferior.
13852 * remote.c (remote_fetch_registers, remote_store_registers): Use
13853 ptid from regcache.
13854 * rs6000-nat.c (fetch_register, store_register): Likewise.
13855 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13856 s390_linux_store_inferior_registers): Likewise.
13857 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13858 shnbsd_store_inferior_registers): Likewise.
13859 * sol-thread.c (sol_thread_fetch_registers,
13860 sol_thread_store_registers): Likewise.
13861 * sparc-nat.c (sparc_fetch_inferior_registers,
13862 sparc_store_inferior_registers): Likewise.
13863 * tilegx-linux-nat.c (fetch_inferior_registers,
13864 store_inferior_registers): Likewise.
13865 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13866 vaxbsd_store_inferior_registers): Likewise.
13867 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13868 store_xtregs): Likewise.
13869
c0f55cc6
AV
138702017-03-20 Artemiy Volkov <artemiyv@acm.org>
13871
13872 PR gdb/14441
13873 * NEWS: Mention support for rvalue references in GDB and python.
13874 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13875 supports both lvalue and rvalue references.
13876
15c0a2a9
AV
138772017-03-20 Artemiy Volkov <artemiyv@acm.org>
13878
13879 PR gdb/14441
13880 * gdbtypes.c (rank_one_type): Implement overloading
13881 resolution rules regarding rvalue references.
13882
aa006118
AV
138832017-03-20 Artemiy Volkov <artemiyv@acm.org>
13884
13885 PR gdb/14441
13886 * aarch64-tdep.c (aarch64_type_align)
13887 (aarch64_extract_return_value, aarch64_store_return_value): Change
13888 lvalue reference type checks to general reference type checks.
13889 * amd64-tdep.c (amd64_classify): Likewise.
13890 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13891 Likewise.
13892 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13893 (arm_store_return_value): Likewise.
13894 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13895 * c-typeprint.c (c_print_type): Likewise.
13896 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13897 (cplus_number_of_children, cplus_describe_child): Likewise.
13898 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13899 * completer.c (expression_completer): Likewise.
13900 * cp-support.c (make_symbol_overload_list_adl_namespace):
13901 Likewise.
13902 * darwin-nat-info.c (info_mach_region_command): Likewise.
13903 * dwarf2loc.c (entry_data_value_coerce_ref)
13904 (value_of_dwarf_reg_entry): Likewise.
13905 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13906 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13907 Likewise.
13908 * findvar.c (extract_typed_address, store_typed_address):
13909 Likewise.
13910 * gdbtypes.c (rank_one_type): Likewise.
13911 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13912 * infcall.c (value_arg_coerce): Likewise.
13913 * language.c (pointer_type): Likewise.
13914 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13915 Likewise.
13916 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13917 * mn10300-tdep.c (mn10300_type_align): Likewise.
13918 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13919 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13920 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13921 Likewise.
13922 * printcmd.c (print_formatted, x_command): Likewise.
13923 * python/py-type.c (typy_get_composite, typy_template_argument):
13924 Likewise.
13925 * python/py-value.c (valpy_referenced_value)
13926 (valpy_get_dynamic_type, value_has_field): Likewise.
13927 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13928 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13929 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13930 * spu-tdep.c (spu_scalar_value_p): Likewise.
13931 * symtab.c (lookup_symbol_aux): Likewise.
13932 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13933 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13934 Likewise.
13935 * valops.c (value_cast_pointers, value_cast)
13936 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13937 (value_struct_elt, value_struct_elt_bitpos)
13938 (value_find_oload_method_list, find_overload_match)
13939 (value_rtti_indirect_type): Likewise.
13940 * valprint.c (val_print_scalar_type_p, generic_val_print):
13941 Likewise.
13942 * value.c (value_actual_type, value_as_address, unpack_long)
13943 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13944 (coerce_ref): Likewise.
13945 * varobj.c (varobj_get_value_type): Likewise.
13946
3fcf899d
AV
139472017-03-20 Artemiy Volkov <artemiyv@acm.org>
13948
13949 PR gdb/14441
13950 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13951 table of constants.
13952 * python/lib/gdb/command/explore.py: Support exploring values
13953 of rvalue reference types.
13954 * python/lib/gdb/types.py: Implement get_basic_type() for
13955 rvalue reference types.
13956 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13957 constant.
13958 * python/py-value.c (valpy_getitem): Add an rvalue reference
13959 check.
13960 (valpy_reference_value): Add new parameter "refcode".
13961 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13962 New wrappers for valpy_reference_value().
13963 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13964 (gdbpy_invoke_xmethod): Likewise.
13965
4297a3f0
AV
139662017-03-20 Artemiy Volkov <artemiyv@acm.org>
13967
13968 PR gdb/14441
13969 * dwarf2read.c (process_die, read_type_die_1): Handle the
13970 DW_TAG_rvalue_reference_type DIE.
13971 (read_tag_reference_type): Add new parameter "refcode".
13972
e1cb3213
AV
139732017-03-20 Artemiy Volkov <artemiyv@acm.org>
13974
13975 PR gdb/14441
13976 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13977 (c_type_print_modifier, c_type_print_varspec_suffix)
13978 (c_type_print_base): Support printing rvalue reference types.
13979 * c-valprint.c (c_val_print, c_value_print): Support printing
13980 rvalue reference values.
13981
e4347c89
AV
139822017-03-20 Artemiy Volkov <artemiyv@acm.org>
13983
13984 PR gdb/14441
13985 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13986 typename.
13987 * cp-support.c (replace_typedefs): Handle
13988 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13989 * python/py-type.c (typy_lookup_type): Likewise.
13990
53cc15f5
AV
139912017-03-20 Artemiy Volkov <artemiyv@acm.org>
13992
13993 PR gdb/14441
13994 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13995 * parse.c (insert_type): Change assert statement.
13996 (follow_types): Handle rvalue reference types.
13997 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13998 constant.
13999
a65cfae5
AV
140002017-03-20 Artemiy Volkov <artemiyv@acm.org>
14001
14002 PR gdb/14441
14003 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14004 value_ref() interface.
14005 * c-valprint.c (c_value_print): Likewise.
14006 * infcall.c (value_arg_coerce): Likewise.
14007 * python/py-value.c (valpy_reference_value): Likewise.
14008 * valops.c (value_cast, value_reinterpret_cast)
14009 (value_dynamic_cast, typecmp): Likewise.
14010 (value_ref): Parameterize by kind of return value reference type.
14011 * value.h (value_ref): Add new parameter "refcode".
14012
3b224330
AV
140132017-03-20 Artemiy Volkov <artemiyv@acm.org>
14014
14015 PR gdb/14441
14016 * dwarf2read.c (read_tag_reference_type): Use
14017 lookup_lvalue_reference_type() instead of lookup_reference_type().
14018 * eval.c (evaluate_subexp_standard): Likewise.
14019 * f-exp.y: Likewise.
14020 * gdbtypes.c (make_reference_type, lookup_reference_type):
14021 Generalize with rvalue reference types.
14022 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14023 convenience wrappers for lookup_reference_type().
14024 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14025 reference kind parameter.
14026 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14027 wrappers for lookup_reference_type().
14028 * guile/scm-type.c (gdbscm_type_reference): Use
14029 lookup_lvalue_reference_type() instead of lookup_reference_type().
14030 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14031 * parse.c (follow_types): Likewise.
14032 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14033 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14034 Likewise.
14035 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14036 (gdbpy_invoke_xmethod): Likewise.
14037 * stabsread.c: Provide extra argument to make_reference_type()
14038 call.
14039 * valops.c (value_ref, value_rtti_indirect_type): Use
14040 lookup_lvalue_reference_type() instead of lookup_reference_type().
14041
f9aeb8d4
AV
140422017-03-20 Artemiy Volkov <artemiyv@acm.org>
14043
14044 PR gdb/14441
14045 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14046 (TYPE_IS_REFERENCE): New macro.
14047 (struct type): Add rvalue_reference_type field.
14048 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14049
51457a05
MAL
140502017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14051
14052 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14053 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14054 New function definition.
14055 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14056 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14057 New function declaration.
14058 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14059 * mi/mi-interp.h: New file.
14060 * solib.c (info_sharedlibrary_command): Replace for loop with
14061 ALL_SO_LIBS macro
14062 * solib.h (update_solib_list): New function declaration.
14063 (so_list_head): Move macro.
14064 * solist.h (ALL_SO_LIBS): New macro.
14065
e696b3ad
MAL
140662017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14067
14068 * infcmd.c (post_create_inferior): Remove unused argument in
14069 call to solib_add.
14070 * remote.c (remote_start_remote): Likewise.
14071 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14072 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14073 (enable_break): Likewise.
14074 * solib.c (update_solib_list): Remove unused target argument
14075 and its documentation.
14076 (solib_add): Remove unused target argument. Remove unused
14077 argument in call to update_solib_list.
14078 (info_sharedlibrary_command): Remove unused argument in call
14079 to update_solib_list.
14080 (sharedlibrary_command): Remove unused argument in call to
14081 solib_add.
14082 (handle_solib_event): Likewise.
14083 (reload_shared_libraries): Likewise.
14084 * solib.h (solib_add): Remove unused target argument.
14085
dcb84eda
AA
140862017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14087
14088 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14089 (s390_displaced_step_fixup): Cover relative branches with the
14090 default fixup handling. This fixes lack of support for some
14091 relative branch instructions.
14092
d9cb6cdc
SM
140932017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14094
14095 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14096 ptid from regcache.
14097
1afaf9f4
SM
140982017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14099
14100 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14101 i386_darwin_store_inferior_registers): Use ptid from regcache.
14102
aac12e24
SM
141032017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14104
14105 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14106 i386bsd_store_inferior_registers): Use ptid from regcache.
14107
bbe1eef1
SM
141082017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14109
14110 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14111 hppaobsd_store_registers): Use ptid from regcache.
14112
10799020
SM
141132017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14114
14115 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14116 hppanbsd_store_registers): Use ptid from regcache.
14117
00204cf7
SM
141182017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14119
14120 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14121 from regcache. Use get_ptrace_pid.
14122
11a33714
SM
141232017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14124
14125 * corelow.c (get_core_register_section): Use ptid from regcache,
14126 update doc.
14127
317cd492
SM
141282017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14129
14130 * bsd-uthread.c (bsd_uthread_fetch_registers,
14131 bsd_uthread_store_registers): Use ptid from regcache, set and
14132 restore inferior_ptid.
14133
9ac8a7c2
SM
141342017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14135
14136 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14137 fetch_fp_regs, store_register, store_regs, store_fp_register,
14138 store_fp_regs): Use ptid from regcache.
14139
4ac4bb6a
SM
141402017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14141
14142 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14143 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14144 store_vfp_regs): Use ptid from regcache.
14145
9bcbdca8
PA
141462017-03-17 Pedro Alves <palves@redhat.com>
14147
14148 PR remote/21188
14149 * ser-base.c (ser_base_wait_for): Add comment.
14150 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14151 version.
14152 * ser-unix.c (hardwire_raw): Remove reference to
14153 scb->current_timeout.
14154 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14155 (hardwire_ops): Install ser_base_readchar instead of
14156 hardwire_readchar.
14157 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14158 Remove fields.
14159
7503099f
JG
141602017-03-17 Jonah Graham <jonah@kichwacoders.com>
14161
14162 PR gdb/19637
14163 * python/lib/gdb/printer/bound_registers.py: Add support for
14164 Python 3.
14165
7942e96e
AA
141662017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14167
14168 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14169 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14170 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14171 byte_offset to subobj_byte_offset. Fix the handling of
14172 DWARF_VALUE_STACK on big-endian targets when coming via an
14173 implicit pointer.
14174 (dwarf2_evaluate_loc_desc): Adjust call to
14175 dwarf2_evaluate_loc_desc_full.
14176 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14177 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14178
ba14f379
YQ
141792017-03-16 Yao Qi <yao.qi@linaro.org>
14180
14181 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14182 and REVSH instructions.
14183
b121eeb9
YQ
141842017-03-16 Yao Qi <yao.qi@linaro.org>
14185
14186 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14187 (arm_record_test): Declare.
14188 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14189 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14190 align with the manual.
14191 (thumb_record_misc): Adjust the code order to align with the
14192 manual.
14193 (thumb2_record_decode_insn_handler): Fix instruction matching.
14194 (instruction_reader_thumb): New class.
14195 (arm_record_test): New function.
14196
728a7913
YQ
141972017-03-16 Yao Qi <yao.qi@linaro.org>
14198
14199 * arm-tdep.c (abstract_memory_reader): New class.
14200 (instruction_reader): New class.
14201 (extract_arm_insn): Add argument 'reader'. Callers updated.
14202 (decode_insn): Likewise.
14203
34b43320
DE
142042017-03-16 Doug Evans <dje@google.com>
14205
a7c0469f
DE
14206 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14207 member. Change type of TYPE member to SCM. All uses updated.
14208 (lsscm_make_lazy_string_smob): Add assert.
14209 (lsscm_make_lazy_string): Flag bad length values.
14210 (lsscm_elt_type): New function.
14211 (gdbscm_lazy_string_to_value): Rewrite to use
14212 lsscm_safe_lazy_string_to_value.
14213 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14214 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14215 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14216 in incoming type.
14217 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14218 * guile/scm-type.c (tyscm_scm_to_type): New function.
14219
142202017-03-15 Doug Evans <dje@google.com>
14221
34b43320
DE
14222 PR python/17728, python/18439, python/18779
14223 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14224 member. Change type of TYPE member to PyObject *. All uses updated.
14225 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14226 (gdbpy_create_lazy_string_object): Flag bad length values.
14227 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14228 Handle typedefs in incoming type.
14229 (stpy_lazy_string_elt_type): New function.
14230 (gdbpy_extract_lazy_string): Call it.
14231 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14232 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14233 typedefs in incoming type.
14234
a3a5fecc
DE
142352017-03-16 Doug Evans <dje@google.com>
14236
14237 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14238 * guile/scm-type.c (tyscm_scm_to_type): New function.
14239
28f1c605
JW
142402017-03-16 Jiong Wang <jiong.wang@arm.com>
14241
14242 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14243 "ULONGEST" for "skip".
14244
87c336f6
AA
142452017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14246
14247 PR gdb/21220
14248 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14249 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14250 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14251 over ptrace peek/poke until end of buffer or error.
14252
cf81cf60
SM
142532017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14254
14255 * parse.c (length_of_subexp): Make static.
14256 * parser-defs.h (length_of_subexp): Remove.
14257
a379284a
AA
142582017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14259
14260 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14261 as well.
14262
8a6200ba
PA
142632017-03-14 Pedro Alves <palves@redhat.com>
14264
14265 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14266 (main): Use std::unique_ptr. Remove calls to
14267 cp_demangled_name_parse_free.
14268
f79ec206
SM
142692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14270
14271 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14272 alphabsd_store_inferior_registers): Use regcache->ptid instead
14273 of inferior_ptid.
14274
edb5fb00
SM
142752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14276
14277 * aix-thread.c (aix_thread_fetch_registers,
14278 aix_thread_store_registers): Use regcache->ptid instead of
14279 inferior_ptid.
14280
55119686
SM
142812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14282
14283 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14284 store_gregs_to_thread, fetch_fpregs_from_thread,
14285 store_fpregs_to_thread): Use regcache->ptid instead of
14286 inferior_ptid.
14287
6a06fbb7
SM
142882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14289
14290 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14291 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14292 instead of inferior_ptid.
14293
c6386875
SM
142942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14295
14296 * target.c (target_fetch_registers, target_store_registers): Add
14297 assert.
14298
ddaaf0fb
SM
142992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14300
14301 * regcache.h (regcache_get_ptid): New function.
14302 * regcache.c (regcache_get_ptid): New function.
14303
b9da89d1 143042017-03-13 Mark Wielaard <mark@klomp.org>
14305
14306 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14307
5f4d1085
KS
143082017-03-10 Keith Seitz <keiths@redhat.com>
14309
14310 PR c++/8218
14311 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14312
c65d6b55
PA
143132017-03-08 Pedro Alves <palves@redhat.com>
14314
14315 PR gdb/18360
14316 * infrun.c (start_step_over, do_target_resume, resume)
14317 (restart_threads): Assert we're not resuming a thread that is
14318 meant to be stopped.
14319 (infrun_thread_stop_requested_callback): Delete.
14320 (infrun_thread_stop_requested): If the thread is internally
14321 stopped, queue a pending stop event and clear the thread's
14322 inline-frame state.
14323 (handle_stop_requested): New function.
14324 (handle_syscall_event, handle_inferior_event_1): Use
14325 handle_stop_requested.
14326 (handle_stop_requested): New function.
14327 (handle_signal_stop): Set the thread's stop_signal here instead of
14328 at caller.
14329 (finish_step_over): Clear step over info unconditionally.
14330 (handle_signal_stop): If the user had interrupted the event
14331 thread, consider the stop a random signal.
14332 (handle_signal_stop) <signal arrived while stepping over
14333 breakpoint>: Don't restart threads here.
14334 (stop_waiting): Don't clear step-over info here.
14335
15c22686
PA
143362017-03-08 Pedro Alves <palves@redhat.com>
14337
14338 PR 21206
14339 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14340 goes to argument 2, not 1.
14341
6e5d74e7
PA
143422017-03-08 Pedro Alves <palves@redhat.com>
14343
14344 PR cli/21218
14345 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14346 display_gdb_prompt.
14347 (command_line_input): Add comment.
14348
9753a2f6
PA
143492017-03-08 Pedro Alves <palves@redhat.com>
14350
14351 PR tui/21216
14352 * tui/tui-file.c (tui_file::write): New.
14353 * tui/tui-file.h (tui_file): Override "write".
14354 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14355 factored out from ...
14356 (tui_puts): ... here.
14357 (tui_putc): Use them.
14358 (tui_write): New function.
14359 * tui/tui-io.h (tui_write): Declare.
14360
1672e0d9
SDJ
143612017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14362
14363 * Makefile.in (SFILES): Replace "environ.c" with
14364 "common/environ.c".
14365 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14366 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14367 to...
14368 * common/environ.c: ... here.
14369 * environ.h: Moved to...
14370 * common/environ.h: ... here.
14371
f7bb4e3a
PB
143722017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14373
14374 * gdbarch.sh (pstring_ptr): New static function.
14375 (gdbarch_disassembler_options): Use it.
14376 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14377 not valid_disassembler_option->name.
14378 * gdbarch.c: Regenerate.
14379
e45ced6c
PB
143802017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14381
14382 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14383
5f6fd321
PA
143842017-03-07 Pedro Alves <palves@redhat.com>
14385
14386 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14387
6dbb839a 143882017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14389
14390 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14391 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14392 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14393 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14394
d274ecf4
SM
143952017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14396
14397 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14398
df97be55
SM
143992017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14400
14401 * remote.c (remote_add_target_side_commands): Use range-based
14402 for loop.
14403
7d45f3df
YQ
144042017-03-03 Yao Qi <yao.qi@linaro.org>
14405
14406 PR gdb/21165
14407 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14408 value is lazy.
14409 * valprint.c (common_val_print): Likewise.
14410
65b48a81
PB
144112017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14412
14413 * NEWS: Mention new set/show disassembler-options commands.
14414 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14415 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14416 (prospective_options): New static variable.
14417 (gdb_disassembler::gdb_disassembler): Initialize
14418 m_di.disassembler_options.
14419 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14420 (get_disassembler_options): New function.
14421 (set_disassembler_options): Likewise.
14422 (set_disassembler_options_sfunc): Likewise.
14423 (show_disassembler_options_sfunc): Likewise.
14424 (disassembler_options_completer): Likewise.
14425 (_initialize_disasm): Likewise.
14426 * disasm.h (get_disassembler_options): New prototype.
14427 (set_disassembler_options): Likewise.
14428 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14429 (gdbarch_verify_disassembler_options): Likewise.
14430 * gdbarch.c: Regenerate.
14431 * gdbarch.h: Likewise.
14432 * arm-tdep.c (num_disassembly_options): Delete.
14433 (set_disassembly_style): Likewise.
14434 (arm_disassembler_options): New static variable.
14435 (set_disassembly_style_sfunc): Convert short style name into long
14436 option name. Call set_disassembler_options.
14437 (show_disassembly_style_sfunc): New function.
14438 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14439 set_gdbarch_verify_disassembler_options.
14440 (_initialize_arm_tdep): Delete regnames variable and update callers.
14441 (arm_disassembler_options): Initialize.
14442 (disasm_options): New variable.
14443 (num_disassembly_options): Rename from this...
14444 (num_disassembly_styles): ...to this. Compute by scanning through
14445 disasm_options.
14446 (valid_disassembly_styles): Initialize using disasm_options.
14447 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14448 set_arm_regname_option.
14449 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14450 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14451 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14452 set_gdbarch_verify_disassembler_options.
14453 * s390-tdep.c (s390_disassembler_options): New static variable.
14454 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14455 set_gdbarch_verify_disassembler_options.
14456
d538e36d
SM
144572017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14458
14459 * remote.c (remote_add_target_side_condition): Remove "struct"
14460 keyword from range-based for loop.
14461
83621223
SM
144622017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14463
14464 * remote.c (remote_add_target_side_condition): Use range-based
14465 for loop. Update comment.
14466
2123df0e
YQ
144672017-02-27 Yao Qi <yao.qi@linaro.org>
14468
14469 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14470
8e368124
AH
144712017-02-26 Alan Hayward <alan.hayward@arm.com>
14472
14473 * regcache.c (regcache_raw_update): New function.
14474 (regcache_raw_read): Move code to regcache_raw_update.
14475 * regcache.h (regcache_raw_update): New declaration.
14476 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14477
a49dd8dd
JK
144782017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14479
14480 * dwarf2read.c (create_debug_type_hash_table): Initialize
14481 header.signature and header.type_offset_in_tu.
14482
34e4bae9
PA
144832017-02-24 Pedro Alves <palves@redhat.com>
14484
14485 * symtab.c (make_file_symbol_completion_list_1): Use
14486 add_symtab_completions.
14487
b0e4b369
AH
144882017-02-24 Alan Hayward <alan.hayward@arm.com>
14489
14490 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14491
975c21ab
AH
144922017-02-24 Alan Hayward <alan.hayward@arm.com>
14493
14494 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14495 I386_MAX_REGISTER_SIZE.
14496 (i386_pseudo_register_write): Likewise.
14497 (i386_process_record): Likewise.
14498 * i387-tdep.c (i387_supply_xsave): Likewise.
14499 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14500 (store_register): Likewise.
14501
14bc53a8
PA
145022017-02-23 Pedro Alves <palves@redhat.com>
14503
14504 * ada-lang.c: Include "common/function-view.h".
14505 (ada_iterate_over_symbols): Adjust to use function_view as
14506 callback type.
14507 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14508 (ada_make_symbol_completion_list): Use a lambda.
14509 (ada_exc_search_name_matches): Delete.
14510 (name_matches_regex): New.
14511 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14512 * compile/compile-c-support.c: Include "common/function-view.h".
14513 (print_one_macro): Change prototype to accept a ui_file pointer.
14514 (write_macro_definitions): Use a lambda.
14515 * dwarf2read.c: Include "common/function-view.h".
14516 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14517 (dw2_expand_symtabs_matching): Adjust to use function_view as
14518 callback type.
14519 * language.h: Include "common/function-view.h".
14520 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14521 function_view as callback type.
14522 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14523 * linespec.c: Include "common/function-view.h".
14524 (collect_info::add_symbol): New method.
14525 (struct symbol_and_data_callback, iterate_inline_only, struct
14526 symbol_matcher_data, iterate_name_matcher): Delete.
14527 (iterate_over_all_matching_symtabs): Adjust to use function_view
14528 as callback type and lambdas.
14529 (iterate_over_file_blocks): Adjust to use function_view as
14530 callback type.
14531 (decode_compound_collector): Now a class with private fields.
14532 (decode_compound_collector::release_symbols): New method.
14533 (collect_one_symbol): Rename to...
14534 (decode_compound_collector::operator()): ... this and adjust.
14535 (lookup_prefix_sym): decode_compound_collector construction bits
14536 move to decode_compound_collector ctor. Pass the
14537 decode_compound_collector object directly as callback. Remove
14538 cleanups and use decode_compound_collector::release_symbols
14539 instead.
14540 (symtab_collector): Now a class with private fields.
14541 (symtab_collector::release_symtabs): New method.
14542 (add_symtabs_to_list): Rename to...
14543 (symtab_collector::operator()): ... this and adjust.
14544 (collect_symtabs_from_filename): symtab_collector construction
14545 bits move to symtab_collector ctor. Pass the symtab_collector
14546 object directly as callback. Remove cleanups and use
14547 symtab_collector::release_symtabs instead.
14548 (collect_symbols): Delete.
14549 (add_matching_symbols_to_info): Use lambdas.
14550 * macrocmd.c (print_macro_callback): Delete.
14551 (info_macro_command): Use a lambda.
14552 (info_macros_command): Pass print_macro_definition as callable
14553 directly.
14554 (print_one_macro): Remove 'ignore' parameter.
14555 (macro_list_command): Adjust.
14556 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14557 (macro_for_each_data::user_data): Delete field.
14558 (foreach_macro): Adjust to call the function_view.
14559 (macro_for_each): Adjust to use function_view as callback type.
14560 (foreach_macro_in_scope): Adjust to call the function_view.
14561 (macro_for_each_in_scope): Adjust to use function_view as callback
14562 type.
14563 * macrotab.h: Include "common/function-view.h".
14564 (macro_callback_fn): Declare a prototype instead of a pointer.
14565 Remove "user_data" parameter.
14566 (macro_for_each, macro_for_each_in_scope): Adjust to use
14567 function_view as callback type.
14568 * psymtab.c (partial_map_expand_apply)
14569 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14570 Adjust to use function_view as callback type and to return bool.
14571 (psym_expand_symtabs_matching): Adjust to use function_view as
14572 callback types.
14573 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14574 to use function_view as callback type and to return bool.
14575 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14576 callback types.
14577 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14578 as callback types.
14579 * symfile.h: Include "common/function-view.h".
14580 (expand_symtabs_file_matcher_ftype)
14581 (expand_symtabs_symbol_matcher_ftype)
14582 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14583 return bool.
14584 (quick_symbol_functions::map_symtabs_matching_filename)
14585 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14586 function_view as callback type and return bool.
14587 (expand_symtabs_matching): Adjust to use function_view as callback
14588 type.
14589 (maintenance_expand_name_matcher)
14590 (maintenance_expand_file_matcher): Delete.
14591 (maintenance_expand_symtabs): Use lambdas.
14592 * symtab.c (iterate_over_some_symtabs): Adjust to use
14593 function_view as callback types and return bool.
14594 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14595 of a cleanup.
14596 (lookup_symtab_callback): Delete.
14597 (lookup_symtab): Use a lambda.
14598 (iterate_over_symbols): Adjust to use function_view as callback
14599 type.
14600 (struct search_symbols_data, search_symbols_file_matches)
14601 (search_symbols_name_matches): Delete.
14602 (search_symbols): Use a pair of lambdas.
14603 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14604 (symtab_expansion_callback): Delete.
14605 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14606 * symtab.h: Include "common/function-view.h".
14607 (iterate_over_some_symtabs): Adjust to use function_view as
14608 callback type and return bool.
14609 (iterate_over_symtabs): Adjust to use function_view as callback
14610 type.
14611 (symbol_found_callback_ftype): Remove 'data' parameter and return
14612 bool.
14613 (iterate_over_symbols): Adjust to use function_view as callback
14614 type.
14615
07e253aa
PA
146162017-02-23 Pedro Alves <palves@redhat.com>
14617
14618 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14619 (%.o) <unittests/%.c>: New pattern.
14620 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14621 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14622 * common/function-view.h: New file.
14623 * unittests/function-view-selftests.c: New file.
14624 * configure: Regenerate.
14625
8eaf5320
SM
146262017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14627
14628 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14629 inferior_ptid.
14630 * go32-nat.c (go32_thread_alive): Likewise.
14631
38768751
YQ
146322017-02-23 Yao Qi <yao.qi@linaro.org>
14633
14634 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14635 delete.
14636
0a8beaba
YQ
146372017-02-23 Yao Qi <yao.qi@linaro.org>
14638
14639 * varobj.c (varobj_clear_saved_item): Use delete instead of
14640 xfree.
14641 (update_dynamic_varobj_children): Likewise.
14642
58fdfd2c
JK
146432017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14644
14645 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14646
1b90b139
SM
146472017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14648
14649 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14650 m_enum_value to 0 in default constructor.
14651
2039d74e
EBM
146522017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14653
14654 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14655 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14656 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14657 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14658 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14659 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14660 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14661 IS_STORE_CONDITIONAL_INSN.
14662
7814882a
JK
146632017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14664
14665 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14666
0ae60b63
JK
146672017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14668
14669 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14670
0224619f
JK
146712017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14672
14673 * dwarf2read.c (skip_one_die, read_attribute_value)
14674 (dwarf2_const_value_attr, dump_die_shallow)
14675 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14676 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14677
0af92d60
JK
146782017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14679
14680 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14681 (dwarf_parse_macro_header): Accept DWARF version 5.
14682 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14683
216f72a1
JK
146842017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14685
14686 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14687 DW_AT_GNU_*.
14688 * common/common-exceptions.h (enum errors): Likewise.
14689 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14690 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14691 (dwarf_expr_context::execute_stack_op): Likewise.
14692 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14693 Likewise.
14694 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14695 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14696 (show_entry_values_debug, call_site_to_target_addr)
14697 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14698 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14699 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14700 (value_of_dwarf_block_entry, indirect_pieced_value)
14701 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14702 (disassemble_dwarf_expression): Likewise.
14703 * dwarf2read.c (process_die, inherit_abstract_dies)
14704 (read_call_site_scope): Likewise.
14705 * gdbtypes.h (struct func_type, struct call_site_parameter)
14706 (struct call_site): Likewise.
14707 * stack.c (read_frame_arg): Likewise.
14708 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14709
43988095
JK
147102017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14711
14712 * defs.h (read_unsigned_leb128): New declaration.
14713 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14714 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14715 (dwarf2_find_location_expression): Call also
14716 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14717 * dwarf2loc.h (dwarf2_version): New declaration.
14718 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14719 rnglists.
14720 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14721 .debug_rnglists.
14722 (struct dwop_section_names): Add loclists_dwo.
14723 (dwop_section_names): Add .debug_loclists.dwo.
14724 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14725 (struct dwarf2_per_cu_data): Add dwarf_version.
14726 (struct dwo_sections): Add loclists.
14727 (struct attr_abbrev): Add implicit_const.
14728 (read_indirect_line_string): New declaration.
14729 (read_unsigned_leb128): Delete declaration.
14730 (rcuh_kind): New definition.
14731 (read_and_check_comp_unit_head): Change parameter
14732 is_debug_types_section to section_kind.
14733 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14734 (read_comp_unit_head): Change parameter abfd to section, add parameter
14735 section_kind. Handle DWARF-5.
14736 (error_check_comp_unit_head): Accept also DWARF version 5.
14737 (read_and_check_comp_unit_head): Change parameter
14738 is_debug_types_section to section_kind.
14739 (read_and_check_type_unit_head): Delete function.
14740 (read_abbrev_offset): Handle DWARF-5.
14741 (create_debug_type_hash_table): Add parameter section_kind. Process
14742 only DW_UT_type. Use signature and type_offset_in_tu from struct
14743 comp_unit_head.
14744 (create_debug_types_hash_table): Update create_debug_type_hash_table
14745 caller.
14746 (create_all_type_units): Call create_debug_type_hash_table.
14747 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14748 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14749 caller.
14750 (skip_one_die): Handle DW_FORM_implicit_const.
14751 (dwarf2_rnglists_process): New function.
14752 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14753 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14754 (read_attribute_value): Handle DW_FORM_implicit_const,
14755 DW_FORM_line_strp.
14756 (read_attribute): Handle DW_FORM_implicit_const.
14757 (read_indirect_string_at_offset_from): New function from
14758 read_indirect_string_at_offset.
14759 (read_indirect_string_at_offset): Call
14760 read_indirect_string_at_offset_from.
14761 (read_indirect_line_string_at_offset): New function.
14762 (read_indirect_string): New function comment.
14763 (read_indirect_line_string): New function.
14764 (read_unsigned_leb128): Make it global.
14765 (dwarf2_string_attr): Handle DWARF-5.
14766 (add_include_dir_stub, read_formatted_entries): New functions.
14767 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14768 Handle DWARF-5.
14769 (per_cu_header_read_in): Update read_comp_unit_head caller.
14770 (dwarf2_version): New function.
14771 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14772 rnglists.
14773 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14774 fields.
14775
22d2f3ab
JK
147762017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14777
14778 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14779
5f46c5a5
JK
147802017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14781
14782 * dwarf2read.c (dwarf2_ranges_process): New function from
14783 dwarf2_ranges_read.
14784 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14785 dwarf2_ranges_process.
14786
78d4d2c5
JK
147872017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14788
14789 * dwarf2read.c (create_debug_type_hash_table): New function from
14790 create_debug_types_hash_table.
14791 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14792 (create_all_type_units, open_and_init_dwo_file): Update
14793 create_debug_types_hash_table callers.
14794
1b076f25
SDJ
147952017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14796
14797 PR gdb/16188
14798 * fork-child.c (trace_start_error): Fix thinko. va_end should
14799 refer to 'ap', not 'args'.
14800
0db8980c
SDJ
148012017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14802 Pedro Alves <palves@redhat.com>
14803
14804 PR gdb/16188
14805 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14806 calls succeeded.
14807 * fork-child.c (trace_start_error): New function.
14808 (trace_start_error_with_name): Likewise.
14809 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14810 * inf-ptrace.c (inf_ptrace_me): Likewise.
14811 * inferior.h (trace_start_error): New prototype.
14812 (trace_start_error_with_name): Likewise.
14813
99e8a4f9
SDJ
148142017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14815
14816 PR gdb/21164
14817 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14818 NULL before using it.
14819 * symmisc.c (maintenance_print_symbols): Likewise.
14820 (maintenance_print_msymbols): Likewise.
14821
4e746bb6
TW
148222017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14823
14824 * NEWS: Add record Python bindings entry.
14825
148262017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14827
14828 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14829 py-record-full.o.
14830 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14831 * python/py-record-btrace.c, python/py-record-btrace.h,
14832 python/py-record-full.c, python/py-record-full.h: New file.
14833 * python/py-record.c: Add include for py-record-btrace.h and
14834 py-record-full.h.
14835 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14836 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14837 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14838 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14839 New definition.
14840 (gdbpy_initialize_btrace): New export.
14841 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14842
148432017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14844
14845 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14846 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14847 * python/py-record.c: New file.
14848 * python/python-internal.h (gdbpy_start_recording,
14849 gdbpy_current_recording, gdpy_stop_recording,
14850 gdbpy_initialize_record): New export.
14851 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14852 (python_GdbMethods): Add gdbpy_start_recording,
14853 gdbpy_current_recording and gdbpy_stop_recording.
14854
148552017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14856
14857 * record-btrace.c (record_btrace_record_method): New function.
14858 (init_record_btrace_ops): Initialize to_record_method.
14859 * record-full.c (record_full_record_method): New function.
14860 (init_record_full_ops, init_record_full_core_ops): Add
14861 record_full_record_method.
14862 * record.h (enum record_method): New enum.
14863 * target-debug.h (target_debug_print_enum_record_method: New define.
14864 * target-delegates.c: Regenerate.
14865 * target.c (target_record_method): New function.
14866 * target.h: Include record.h.
14867 (struct target_ops) <to_record_method>: New field.
14868 (target_record_method): New export.
14869
148702017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14871
14872 * record.h (record_start, record_stop): New export.
14873 * record.c (record_start, record_stop): New function.
14874
148752017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14876
14877 * btrace.c (btrace_fetch): Copy function call segments pointer
14878 into a vector.
14879 (btrace_clear): Clear the vector.
14880 (btrace_find_insn_by_number): Use binary search to find the correct
14881 function call segment.
14882 * btrace.h (brace_fun_p): New typedef.
14883 (struct btrace_thread_info) <functions>: New field.
14884
148852017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14886
14887 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14888 * btrace.c (btrace_decode_error): ... here. New function.
14889 * btrace.h (btrace_decode_error): New export.
14890
148912017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14892
14893 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14894 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14895 btrace_find_insn_by_number): Remove special case for gaps.
14896 * btrace.h (btrace_insn_get_error): New export.
14897 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14898 * record-btrace.c (btrace_insn_history): Print number for gaps.
14899 (record_btrace_info, record_btrace_goto): Handle gaps.
14900
3f77c769
TT
149012017-02-14 Tom Tromey <tom@tromey.com>
14902
14903 PR python/13598:
14904 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14905 event.
14906 * python/py-evts.c (gdbpy_initialize_py_events): Add
14907 before_prompt registry.
14908 * python/py-events.h (events_object) <before_prompt>: New field.
14909
4c2c7ac6
MM
149102017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14911
14912 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14913
5cf30ebf
LM
149142017-02-13 Luis Machado <lgustavo@codesourcery.com>
14915
14916 * symfile (_initialize_symfile): Add usage text to the load command's
14917 help text.
14918
26a06916
SM
149192017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14920
14921 * utils.c (defaulted_query): Don't query on secondary UIs.
14922
0b145e37
TT
149232017-02-10 Tom Tromey <tom@tromey.com>
14924
14925 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14926
2d8365c4
TT
149272017-02-10 Tom Tromey <tom@tromey.com>
14928
14929 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14930 "cleanup" local.
14931 * python/py-type.c (typy_legacy_template_argument): Remove
14932 unnecessary "cleanup" local.
14933
2bb8f231
TT
149342017-02-10 Tom Tromey <tom@tromey.com>
14935
14936 * python/python.c (do_start_initialization): New function, from
14937 _initialize_python.
14938 (_initialize_python): Call do_start_initialization.
14939 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14940 goto.
14941
1bdfaf42
TT
149422017-02-10 Tom Tromey <tom@tromey.com>
14943
14944 * python/py-prettyprint.c (pretty_print_one_value): Use
14945 gdbpy_ref.
14946
88b6faea
TT
149472017-02-10 Tom Tromey <tom@tromey.com>
14948
14949 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14950 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14951 gdbpy_ref.
14952 * python/py-type.c (field_new): Use gdbpy_ref.
14953 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14954 gdbpy_ref.
14955 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14956 (py_free_pspace): Likewise.
14957 (pspace_to_pspace_object): Likewise.
14958 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14959 (py_free_objfile): Likewise.
14960 (objfile_to_objfile_object): Likewise.
14961 * python/py-inferior.c (delete_thread_object): Use
14962 gdbpy_ref.
14963 (infpy_read_memory): Likewise.
14964 (py_free_inferior): Likewise.
14965 * python/py-evtregistry.c (create_eventregistry_object): Use
14966 gdbpy_ref.
14967 * python/py-event.c (create_event_object): Use gdbpy_ref.
14968
7780f186
TT
149692017-02-10 Tom Tromey <tom@tromey.com>
14970
14971 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14972 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14973 used.
14974 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14975 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14976 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14977 python/py-framefilter.c, python/py-function.c,
14978 python/py-inferior.c, python/py-infevents.c,
14979 python/py-linetable.c, python/py-newobjfileevent.c,
14980 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14981 python/py-signalevent.c, python/py-stopevent.c,
14982 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14983 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14984 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14985 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14986
d4b0bb18
TT
149872017-02-10 Tom Tromey <tom@tromey.com>
14988
14989 * ui-out.h (ui_out_emit_type): New class.
14990 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14991 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14992 and ui_out_emit_tuple.
14993 (enumerate_locals): Likewise.
14994 (py_mi_print_variables, py_print_locals, py_print_args): Use
14995 ui_out_emit_list.
14996 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14997 ui_out_emit_list.
14998 * common/gdb_optional.h: New file.
14999
f67f945c
MG
150002017-02-10 Martin Galvan <martingalvan@sourceware.org>
15001
15002 * MAINTAINERS (Write After Approval): Update my e-mail address.
15003
18da0c51
MG
150042017-02-10 Martin Galvan <martingalvan@sourceware.org>
15005
15006 PR gdb/21122
15007 * breakpoint.c (_initialize_breakpoint): Update the help description
15008 of the 'commands' command to indicate that it takes a list argument.
15009
62c14536
SM
150102017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15011
15012 * interps.c (current_interp_set_logging): Remove "return".
15013
ff6fa247
GB
150142017-02-09 Gary Benson <gbenson@redhat.com>
15015
15016 * symtab.c (add_symtab_completions): Prevent NULL pointer
15017 dereference.
15018
a474bd8e
PA
150192017-02-08 Pedro Alves <palves@redhat.com>
15020
15021 * interps.c (interp::interp): Remove reference to quiet_p.
15022 (interp_set): Make static. Remove dead "Switching to" output
15023 code.
15024 (interp_quiet_p, interp_set_quiet): Delete.
15025 (interpreter_exec_cmd): Don't set the interpreter quiet.
15026 * interps.h (interp_quiet_p): Make static.
15027 (class interp) <quiet_p>: Remove field
15028
3d7b173c
JG
150292017-02-08 Jerome Guitton <guitton@adacore.com>
15030
604c4576
JG
15031 * cli/cli-decode.c (find_command_name_length): Make it extern.
15032 * cli/cli-decode.h (find_command_name_length): Declare.
15033 * cli/cli-script.c (command_name_equals, line_first_arg):
15034 New functions.
15035 (process_next_line): Use cli-decode to parse command names.
15036 (build_command_line): Make args a constant pointer.
15037
150382017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15039
3d7b173c
JG
15040 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15041 Remove case-insensitive search.
15042
1291063d
JM
150432017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15044
15045 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15046 at the end of the line. Avoids an ARI warning.
15047
20b477a7
LM
150482017-02-06 Luis Machado <lgustavo@codesourcery.com>
15049
15050 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15051 rdseed instructions.
15052 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15053
3f7b46f2
IR
150542017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15055
15056 PR tdep/20936
15057 Provide and use sparc32 and sparc64 target description XML files.
15058 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15059 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15060 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15061 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15062 * features/sparc/sparc32-solaris.xml: New file.
15063 * features/sparc/sparc64-solaris.xml: New file.
15064 * features/sparc/sparc32-solaris.c: Generated.
15065 * features/sparc/sparc64-solaris.c: Generated.
15066 * sparc-tdep.h: Account for differences in target descriptions.
15067 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15068 (sparc32_register_type): Use target provided registers.
15069 (validate_tdesc_registers): New function.
15070 (sparc32_gdbarch_init): Use tdesc_has_registers.
15071 Set pseudoregister functions.
15072 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15073 (sparc64_register_type): Use target provided registers.
15074 (sparc64_init_abi): Set pseudoregister functions.
15075
f0fd41c1
TT
150762017-02-03 Tom Tromey <tom@tromey.com>
15077
15078 PR rust/21097:
15079 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15080 with a single member.
15081
d6f9b0fb
PA
150822017-02-03 Pedro Alves <palves@redhat.com>
15083
15084 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15085 (cli_interp_base::~cli_interp_base): New.
15086 (cli_interp): New struct.
15087 (as_cli_interp): Cast the interp itself to cli_interp.
15088 (cli_interpreter_pre_command_loop): Rename to ...
15089 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15090 parameter.
15091 (cli_interpreter_init): Rename to ...
15092 (cli_interp::init): ... this. Remove 'self' parameter. Use
15093 boolean. Make extern.
15094 (cli_interpreter_resume): Rename to ...
15095 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15096 extern.
15097 (cli_interpreter_suspend): Rename to ...
15098 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15099 extern.
15100 (cli_interpreter_exec): Rename to ...
15101 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15102 extern.
15103 (cli_interpreter_supports_command_editing): Rename to ...
15104 (cli_interp_base::supports_command_editing): ... this. Remove
15105 'interp' parameter. Make extern.
15106 (cli_ui_out): Rename to ...
15107 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15108 Make extern.
15109 (cli_set_logging): Rename to ...
15110 (cli_interp_base::set_logging): ... this. Remove 'interp'
15111 parameter. Make extern.
15112 (cli_interp_procs): Delete.
15113 (cli_interp_factory): Adjust to use "new".
15114 * cli/cli-interp.h: Include "interps.h".
15115 (struct cli_interp_base): New struct.
15116 * interps.c (struct interp): Delete. Fields moved to interps.h.
15117 (interp_new): Delete.
15118 (interp::interp, interp::~interp): New.
15119 (interp_set): Use bool, and return void. Assume the interpreter
15120 has suspend, init and resume methods, and that the all return
15121 void.
15122 (set_top_level_interpreter): interp_set returns void.
15123 (interp_ui_out): Adapt.
15124 (current_interp_set_logging): Adapt.
15125 (interp_data): Delete.
15126 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15127 (interp_exec): Adapt.
15128 (top_level_interpreter_data): Delete.
15129 * interps.h (interp_init_ftype, interp_resume_ftype)
15130 (interp_suspend_ftype, interp_exec_ftype)
15131 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15132 (class interp): New.
15133 (interp_new): Delete.
15134 (interp_set): Now returns void. Use bool.
15135 (interp_data, top_level_interpreter_data): Delete.
15136 * mi/mi-common.h: Include interps.h.
15137 (class mi_interp): Inherit from interp. Define a ctor. Declare
15138 init, resume, suspect, exec, interp_ui_out, set_logging and
15139 pre_command_loop methods.
15140 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15141 (mi_interpreter_init): Rename to ...
15142 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15143 bool, return void and make extern. Adjust.
15144 (mi_interpreter_resume): ... Rename to ...
15145 (mi_interp::resume): ... this. Remove the 'data' parameter,
15146 return void and make extern. Adjust.
15147 (mi_interpreter_suspend): ... Rename to ...
15148 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15149 return void and make extern. Adjust.
15150 (mi_interpreter_exec): ... Rename to ...
15151 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15152 extern. Adjust.
15153 (mi_interpreter_pre_command_loop): ... Rename to ...
15154 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15155 parameter and make extern.
15156 (mi_on_normal_stop_1): Adjust.
15157 (mi_ui_out): Rename to ...
15158 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15159 parameter and make extern. Adjust.
15160 (mi_set_logging): Rename to ...
15161 (mi_interp::set_logging): ... this. Remove the 'interp'
15162 parameter and make extern. Adjust.
15163 (mi_interp_procs): Delete.
15164 (mi_interp_factory): Adjust to use 'new'.
15165 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15166 (mi_print_exception, mi_execute_command, mi_load_progress):
15167 Adjust.
15168 * tui/tui-interp.c (tui_interp): New class.
15169 (as_tui_interp): Return a tui_interp pointer.
15170 (tui_on_normal_stop, tui_on_signal_received)
15171 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15172 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15173 to use interp::interp_ui_out.
15174 (tui_init): Rename to ...
15175 (tui_interp::init): ... this. Remove the 'self' parameter, use
15176 bool, return void and make extern. Adjust.
15177 (tui_resume): Rename to ...
15178 (tui_interp::resume): ... this. Remove the 'data' parameter,
15179 return void and make extern. Adjust.
15180 (tui_suspend): Rename to ...
15181 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15182 return void and make extern. Adjust.
15183 (tui_ui_out): Rename to ...
15184 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15185 parameter, and make extern. Adjust.
15186 (tui_exec): Rename to ...
15187 (tui_interp::exec): ... this. Remove the 'data' parameter and
15188 make extern.
15189 (tui_interp_procs): Delete.
15190 (tui_interp_factory): Use "new".
15191
65c40c95
TT
151922017-02-02 Tom Tromey <tom@tromey.com>
15193
15194 * rust-exp.y (ends_raw_string, space_then_number)
15195 (rust_identifier_start_p): Return bool.
15196 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15197 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15198 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15199 (rust_chartype_p): Return bool.
15200 (val_print_struct, rust_print_struct_def, rust_print_type):
15201 Update.
15202 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15203 Return bool.
15204
b50f188d
TT
152052017-02-02 Tom Tromey <tom@tromey.com>
15206
15207 * rust-lang.c: Reindent.
15208
03c85b11
TT
152092017-02-02 Tom Tromey <tom@tromey.com>
15210
15211 * rust-lang.h (rust_crate_for_block): Update.
15212 * rust-lang.c (rust_crate_for_block): Return std::string.
15213 (rust_get_disr_info): Use std:;string, not
15214 gdb::unique_xmalloc_ptr.
15215 * rust-exp.y (crate_name): Update.
15216
9b6da501
PA
152172017-02-02 Pedro Alves <palves@redhat.com>
15218
15219 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15220 field out of gdb_disassembler_test and make it static.
15221
ec4cb20b
PA
152222017-02-02 Pedro Alves <palves@redhat.com>
15223
15224 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15225 mi1_interp and mi_interp fields.
15226
5be5dbf0
PA
152272017-02-02 Pedro Alves <palves@redhat.com>
15228
616268b6
PA
15229 * cli/cli-interp.c (struct saved_output_files, saved_output):
15230 Moved from cli/cli-logging.c.
15231 (cli_set_logging): New function.
15232 (cli_interp_procs): Install cli_set_logging.
15233 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15234 Declare.
15235 * cli/cli-logging.c (struct saved_output_files, saved_output):
15236 Moved to cli/cli-interp.c.
15237 (pop_output_files): Don't save outputs here.
15238 (make_logging_output): New function.
15239 (handle_redirections): Don't build tee nor save previous outputs
15240 here.
15241 * interps.c (current_interp_set_logging): Change prototype.
15242 Assume there's always a set_logging_proc method installed.
15243 * interps.h (interp_set_logging_ftype): Change prototype.
15244 (current_interp_set_logging): Change prototype and adjust comment.
15245 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15246 use make_logging_output.
15247 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
152482017-02-02 Pedro Alves <palves@redhat.com>
15249
5be5dbf0
PA
15250 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15251 from ...
15252 (set_logging_overwrite): ... here.
15253 (logging_no_redirect_file): Delete.
15254 (set_logging_redirect): Don't handle redirection on the fly.
15255 Instead warn that "logging off" / "logging on" is necessary.
15256 (pop_output_files): Delete references to logging_no_redirect_file.
15257 (show_logging_command): Always speak in terms of what will happen
15258 once logging is reenabled.
15259
c99cc448
PA
152602017-02-02 Pedro Alves <palves@redhat.com>
15261
15262 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15263
8b172ce7
PA
152642017-02-02 Pedro Alves <palves@redhat.com>
15265
15266 * disasm.c (gdb_pretty_print_insn): Rename to ...
15267 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15268 Remove gdbarch parameter. Adapt to clear the object's buffers
15269 instead of allocating new buffers, and to print using the object's
15270 gdb_disassembler instead of calling gdb_print_insn.
15271 (dump_insns): Use gdb_pretty_print_disassembler.
15272 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15273 (gdb_pretty_print_disassembler): New class.
15274 * record-btrace.c (btrace_insn_history): Use
15275 gdb_pretty_print_disassembler.
15276
d7e74731
PA
152772017-02-02 Pedro Alves <palves@redhat.com>
15278
15279 * ada-lang.c (type_as_string): Use string_file.
15280 * ada-valprint.c (ada_print_floating): Use string_file.
15281 * ada-varobj.c (ada_varobj_scalar_image)
15282 (ada_varobj_get_value_image): Use string_file.
15283 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15284 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15285 * breakpoint.c (update_inserted_breakpoint_locations)
15286 (insert_breakpoint_locations, reattach_breakpoints)
15287 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15288 (print_it_watchpoint): Use string_file.
15289 (save_breakpoints): Use stdio_file.
15290 * c-exp.y (oper): Use string_file.
15291 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15292 tee_file.
15293 (pop_output_files): Use delete.
15294 (handle_redirections): Use stdio_file and tee_file.
15295 * cli/cli-setshow.c (do_show_command): Use string_file.
15296 * compile/compile-c-support.c (c_compute_program): Use
15297 string_file.
15298 * compile/compile-c-symbols.c (generate_vla_size): Take a
15299 'string_file &' instead of a 'ui_file *'.
15300 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15301 of a 'ui_file *'. Use string_file.
15302 (generate_c_for_variable_locations): Take a 'string_file &'
15303 instead of a 'ui_file *'.
15304 * compile/compile-internal.h (generate_c_for_for_one_variable):
15305 Take a 'string_file &' instead of a 'ui_file *'.
15306 * compile/compile-loc2c.c (push, pushf, unary, binary)
15307 (print_label, pushf_register_address, pushf_register)
15308 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15309 'ui_file *'. Adjust.
15310 * compile/compile.c (compile_to_object): Use string_file.
15311 * compile/compile.h (compile_dwarf_expr_to_c)
15312 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15313 'ui_file *'.
15314 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15315 (replace_typedefs_qualified_name): Use string_file and
15316 obstack_copy0.
15317 * disasm.c (gdb_pretty_print_insn): Use string_file.
15318 (gdb_disassembly): Adjust reference the null_stream global.
15319 (do_ui_file_delete): Delete.
15320 (gdb_insn_length): Use null_stream.
15321 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15322 * dwarf2loc.c (dwarf2_compile_property_to_c)
15323 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15324 'string_file &' instead of a 'ui_file *'.
15325 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15326 * dwarf2read.c (do_ui_file_peek_last): Delete.
15327 (dwarf2_compute_name): Use string_file.
15328 * event-top.c (gdb_setup_readline): Use stdio_file.
15329 * gdbarch.sh (verify_gdbarch): Use string_file.
15330 * gdbtypes.c (safe_parse_type): Use null_stream.
15331 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15332 string_file.
15333 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15334 'string_file *' instead of a 'ui_file *'.
15335 (gdbscm_arch_disassemble): Use string_file.
15336 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15337 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15338 inherits from ui_file.
15339 (ioscm_file_port_delete, ioscm_file_port_rewind)
15340 (ioscm_file_port_put): Delete.
15341 (ioscm_file_port_write): Rename to ...
15342 (ioscm_file_port::write): ... this. Remove file_port_magic
15343 checks.
15344 (ioscm_file_port_new): Delete.
15345 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15346 ui_file_up.
15347 * guile/scm-type.c (tyscm_type_name): Use string_file.
15348 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15349 Use string_file.
15350 * infcmd.c (print_return_value_1): Use string_file.
15351 * infrun.c (print_target_wait_results): Use string_file.
15352 * language.c (add_language): Use string_file.
15353 * location.c (explicit_to_string_internal): Use string_file.
15354 * main.c (captured_main_1): Use null_file.
15355 * maint.c (maintenance_print_architecture): Use stdio_file.
15356 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15357 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15358 event_channel>: Change type to mi_console_file pointer.
15359 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15360 (mi_console_file_delete): Delete.
15361 (struct mi_console_file): Delete.
15362 (mi_console_file_magic): Delete.
15363 (mi_console_file_new): Delete.
15364 (mi_console_file::mi_console_file): New.
15365 (mi_console_file_delete): Delete.
15366 (mi_console_file_fputs): Delete.
15367 (mi_console_file::write): New.
15368 (mi_console_raw_packet): Delete.
15369 (mi_console_file::flush): New.
15370 (mi_console_file_flush): Delete.
15371 (mi_console_set_raw): Rename to ...
15372 (mi_console_file::set_raw): ... this.
15373 * mi/mi-console.h (class mi_console_file): New class.
15374 (mi_console_file_new, mi_console_set_raw): Delete.
15375 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15376 (mi_set_logging): Use delete and tee_file. Adjust.
15377 * mi/mi-main.c (output_register): Use string_file.
15378 (mi_cmd_data_evaluate_expression): Use string_file.
15379 (mi_cmd_data_read_memory): Use string_file.
15380 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15381 * mi/mi-out.c (mi_ui_out::main_stream): New.
15382 (mi_ui_out::rewind): Use main_stream and
15383 string_file.
15384 (mi_ui_out::put): Use main_stream and string_file.
15385 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15386 Allocate a 'string_file' instead.
15387 (mi_out_new): Don't allocate a mem_fileopen stream here.
15388 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15389 (mi_ui_out::main_stream): Declare method.
15390 * printcmd.c (eval_command): Use string_file.
15391 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15392 * python/py-arch.c (archpy_disassemble): Use string_file.
15393 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15394 * python/py-frame.c (frapy_str): Use string_file.
15395 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15396 Use string_file.
15397 * python/py-type.c (typy_str): Use string_file.
15398 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15399 * python/py-value.c (valpy_str): Use string_file.
15400 * record-btrace.c (btrace_insn_history): Use string_file.
15401 * regcache.c (regcache_print): Use stdio_file.
15402 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15403 * remote.c (escape_buffer): Use string_file.
15404 * rust-lang.c (rust_get_disr_info): Use string_file.
15405 * serial.c (serial_open_ops_1): Use stdio_file.
15406 (do_serial_close): Use delete.
15407 * stack.c (print_frame_arg): Use string_file.
15408 (print_frame_args): Remove local mem_fileopen stream, not used.
15409 (print_frame): Use string_file.
15410 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15411 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15412 Take a 'string_file *' instead of a 'ui_file *'.
15413 * top.c (new_ui): Use stdio_file and stderr_file.
15414 (free_ui): Use delete.
15415 (execute_command_to_string): Use string_file.
15416 (quit_confirm): Use string_file.
15417 * tracepoint.c (collection_list::append_exp): Use string_file.
15418 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15419 * tui/tui-file.c: Don't include "ui-file.h".
15420 (enum streamtype, struct tui_stream): Delete.
15421 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15422 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15423 (tui_file::tui_file): New method.
15424 (tui_file_fputs): Delete.
15425 (tui_file_get_strbuf): Delete.
15426 (tui_file::puts): New method.
15427 (tui_file_adjust_strbuf): Delete.
15428 (tui_file_flush): Delete.
15429 (tui_file::flush): New method.
15430 * tui/tui-file.h: Tweak intro comment.
15431 Include ui-file.h.
15432 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15433 (tui_file_adjust_strbuf): Delete declarations.
15434 (class tui_file): New class.
15435 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15436 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15437 (tui_register_format): Use string_stream.
15438 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15439 (tui_get_function_from_frame): Use string_file.
15440 * typeprint.c (type_to_string): Use string_file.
15441 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15442 (null_stream): New global.
15443 (ui_file_delete): Delete.
15444 (ui_file::ui_file): New.
15445 (null_file_isatty): Delete.
15446 (ui_file::~ui_file): New.
15447 (null_file_rewind): Delete.
15448 (ui_file::printf): New.
15449 (null_file_put): Delete.
15450 (null_file_flush): Delete.
15451 (ui_file::putstr): New.
15452 (null_file_write): Delete.
15453 (ui_file::putstrn): New.
15454 (null_file_read): Delete.
15455 (ui_file::putc): New.
15456 (null_file_fputs): Delete.
15457 (null_file_write_async_safe): Delete.
15458 (ui_file::vprintf): New.
15459 (null_file_delete): Delete.
15460 (null_file::write): New.
15461 (null_file_fseek): Delete.
15462 (null_file::puts): New.
15463 (ui_file_data): Delete.
15464 (null_file::write_async_safe): New.
15465 (gdb_flush, ui_file_isatty): Adjust.
15466 (ui_file_put, ui_file_rewind): Delete.
15467 (ui_file_write): Adjust.
15468 (ui_file_write_for_put): Delete.
15469 (ui_file_write_async_safe, ui_file_read): Adjust.
15470 (ui_file_fseek): Delete.
15471 (fputs_unfiltered): Adjust.
15472 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15473 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15474 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15475 (set_ui_file_data): Delete.
15476 (string_file::~string_file, string_file::write)
15477 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15478 (do_ui_file_as_string, ui_file_as_string): Delete.
15479 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15480 (struct mem_file): Delete.
15481 (mem_file_new): Delete.
15482 (stdio_file::stdio_file): New.
15483 (mem_file_delete): Delete.
15484 (stdio_file::stdio_file): New.
15485 (mem_fileopen): Delete.
15486 (stdio_file::~stdio_file): New.
15487 (mem_file_rewind): Delete.
15488 (stdio_file::set_stream): New.
15489 (mem_file_put): Delete.
15490 (stdio_file::open): New.
15491 (mem_file_write): Delete.
15492 (stdio_file_magic, struct stdio_file): Delete.
15493 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15494 (stdio_file::flush): New.
15495 (stdio_file_read): Rename to ...
15496 (stdio_file::read): ... this. Adjust.
15497 (stdio_file_write): Rename to ...
15498 (stdio_file::write): ... this. Adjust.
15499 (stdio_file_write_async_safe): Rename to ...
15500 (stdio_file::write_async_safe) ... this. Adjust.
15501 (stdio_file_fputs): Rename to ...
15502 (stdio_file::puts) ... this. Adjust.
15503 (stdio_file_isatty): Delete.
15504 (stdio_file_fseek): Delete.
15505 (stdio_file::isatty): New.
15506 (stderr_file_write): Rename to ...
15507 (stderr_file::write) ... this. Adjust.
15508 (stderr_file_fputs): Rename to ...
15509 (stderr_file::puts) ... this. Adjust.
15510 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15511 (stderr_file::stderr_file): New.
15512 (tee_file_magic): Delete.
15513 (struct tee_file): Delete.
15514 (tee_file::tee_file): New.
15515 (tee_file_new): Delete.
15516 (tee_file::~tee_file): New.
15517 (tee_file_delete): Delete.
15518 (tee_file_flush): Rename to ...
15519 (tee_file::flush): ... this. Adjust.
15520 (tee_file_write): Rename to ...
15521 (tee_file::write): ... this. Adjust.
15522 (tee_file::write_async_safe): New.
15523 (tee_file_fputs): Rename to ...
15524 (tee_file::puts): ... this. Adjust.
15525 (tee_file_isatty): Rename to ...
15526 (tee_file::isatty): ... this. Adjust.
15527 * ui-file.h (struct obstack, struct ui_file): Don't
15528 forward-declare.
15529 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15530 (ui_file_write_ftype)
15531 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15532 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15533 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15534 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15535 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15536 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15537 (set_ui_file_fseek): Delete.
15538 (ui_file_data, ui_file_delete, ui_file_rewind)
15539 (struct ui_file): New.
15540 (ui_file_up): New.
15541 (class null_file): New.
15542 (null_stream): Declare.
15543 (ui_file_write_for_put, ui_file_put): Delete.
15544 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15545 Delete.
15546 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15547 (gdb_fopen, tee_file_new): Delete.
15548 (struct string_file): New.
15549 (struct stdio_file): New.
15550 (stdio_file_up): New.
15551 (struct stderr_file): New.
15552 (class tee_file): New.
15553 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15554 of a 'ui_file *'. Adjust.
15555 * ui-out.h (class ui_out) <field_stream>: Likewise.
15556 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15557 (null_stream): Delete.
15558 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15559 Adjust.
15560 * utils.h (struct ui_file): Delete forward declaration..
15561 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15562 (error_stream): Take a 'string_file &' instead of a
15563 'ui_file *'.
15564 * varobj.c (varobj_value_get_print_value): Use string_file.
15565 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15566 * gdbarch.c: Regenerate.
15567
187808b0
PA
155682017-02-02 Pedro Alves <palves@redhat.com>
15569
15570 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15571 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15572 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15573 Adjust to call gdb_print_insn instead of
15574 gdb_disassembler::print_insn.
15575 (dump_insns, do_mixed_source_and_assembly_deprecated)
15576 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15577 'gdbarch' parameter. Remove gdb_disassembler parameter.
15578 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15579 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15580 declaration.
15581 (gdb_pretty_print_insn): Re-add declaration.
15582 * record-btrace.c (btrace_insn_history): Don't allocate a
15583 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15584
7a8eb317
SM
155852017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15586
15587 * disasm.h (gdb_disassembly): Remove file_string parameter.
15588 * disasm.c (gdb_disassembly): Likewise.
15589 * cli/cli-cmds.c (print_disassembly): Adapt.
15590 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15591 * stack.c (do_gdb_disassembly): Likewise.
15592
7346ef59
AA
155932017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15594
15595 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15596 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15597 targets. And if the implicit value is longer than needed, extract
15598 the first bytes instead of the "least significant" ones.
15599
cd4007e4
MM
156002017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15601
15602 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15603 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15604 (btrace_fetch): Assert can_access_registers_ptid.
15605 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15606 validate_registers_access.
15607
cf77c34e
MM
156082017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15609
15610 * gdbthread.h (can_access_registers_ptid): New.
15611 * thread.c (can_access_registers_ptid): New.
15612
be85ce7d
PA
156132017-02-01 Pedro Alves <palves@redhat.com>
15614
15615 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15616
29b0b251
PA
156172017-01-31 Pedro Alves <palves@redhat.com>
15618
15619 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15620 Fix typos.
15621
289b5b24
PA
156222017-01-31 Pedro Alves <palves@redhat.com>
15623
15624 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15625 not used.
15626
b47413b4
PA
156272017-01-31 Pedro Alves <palves@redhat.com>
15628
15629 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15630
60adb36c
PA
156312017-01-31 Pedro Alves <palves@redhat.com>
15632
15633 * common/scoped_restore.h
15634 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15635 change the value's parameter type to T2.
15636 (make_scoped_restore): Likewise.
15637
2735833d
WT
156382017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15639 Richard Henderson <rth@redhat.com>
15640
15641 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15642 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15643 GS_BASE for older kernels.
15644 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15645 GS_BASE for older kernels.
15646 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15647 and GS_BASE to the offset table.
15648 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15649 system register group.
15650 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15651 for older kernels.
15652 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15653 amd64 ABI.
15654 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15655 AMD64_GSBASE_REGNUM.
15656 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15657 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15658 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15659 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15660 i386/64bit-segments.xml in those rules.
15661 * features/i386/64bit-segments.xml: New file.
15662 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15663 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15664 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15665 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15666 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15667 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15668 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15669 * features/i386/amd64-avx-linux.c: Regenerated.
15670 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15671 * features/i386/amd64-avx-mpx.c: Regenerated.
15672 * features/i386/amd64-avx512-linux.c: Regenerated.
15673 * features/i386/amd64-linux.c: Regenerated.
15674 * features/i386/amd64-mpx-linux.c: Regenerated.
15675 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15676 * features/i386/i386-avx-mpx.c: Regenerated.
15677 * features/i386/x32-avx-linux.c: Regenerated.
15678 * features/i386/x32-avx512-linux.c: Regenerated.
15679 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15680 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15681 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15682 * regformats/i386/amd64-linux.dat: Regenerated.
15683 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15684 * regformats/i386/x32-avx-linux.dat: Regenerated.
15685 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15686 * regformats/i386/x32-linux.dat: Regenerated.
15687
8884e97e
WT
156882017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15689
15690 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15691 Set to AMD64_NUM_REGS.
15692
7005d26a
WT
156932017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15694
15695 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15696 that checks validity of a register number.
15697
4bd2e1b2
KC
156982017-01-27 Kees Cook <keescook@google.com>
15699
15700 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15701 fetch_fpregs if target has fpa registers.
15702 (arm_linux_store_inferior_registers): Call store_fpregs if target
15703 has fpa registers.
15704
7cf1de6c
AA
157052017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15706
15707 * cris-tdep.c (cris_gdbarch_init): Remove check for
15708 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15709
874a1c8c
AT
157102017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15711
15712 * corelow.c (get_core_register_section): Check for regset
15713 existence before checking for REGSET_VARIABLE_SIZE.
15714
d8b49cf0
YQ
157152017-01-26 Yao Qi <yao.qi@linaro.org>
15716 Pedro Alves <palves@redhat.com>
15717
15718 PR gdb/20939
15719 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15720 call memory_error, save memaddr instead.
15721 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15722 negative, cal memory_error.
15723 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15724
658ca58c
YQ
157252017-01-26 Yao Qi <yao.qi@linaro.org>
15726
15727 * disasm-selftests.c (memory_error_test): New function.
15728 (_initialize_disasm_selftests): Register memory_error_test.
15729
79843d45
YQ
157302017-01-26 Yao Qi <yao.qi@linaro.org>
15731
15732 * Makefile.in (SFILES): Add disasm-selftests.c and
15733 selftest-arch.c.
15734 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15735 * disasm-selftests.c: New file.
15736 * selftest-arch.c: New file.
15737 * selftest-arch.h: New file.
15738
8cafda32
YQ
157392017-01-26 Yao Qi <yao.qi@linaro.org>
15740
15741 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15742 to bfd_arch_mep. Don't return 0 if section is not
15743 found. Call print_insn_mep.
15744
e47ad6c0
YQ
157452017-01-26 Pedro Alves <palves@redhat.com>
15746 Yao Qi <yao.qi@linaro.org>
15747
15748 * arm-tdep.c: Include "disasm.h".
15749 (gdb_print_insn_arm): Update code to get gdbarch.
15750 * disasm.c (dis_asm_read_memory): Change it to
15751 gdb_disassembler::dis_asm_read_memory.
15752 (dis_asm_memory_error): Likewise.
15753 (dis_asm_print_address): Likewise.
15754 (gdb_pretty_print_insn): Change it to
15755 gdb_disassembler::pretty_print_insn.
15756 (dump_insns): Add one argument gdb_disassemlber. All
15757 callers updated.
15758 (do_mixed_source_and_assembly_deprecated): Likewise.
15759 (do_mixed_source_and_assembly): Likewise.
15760 (do_assembly_only): Likewise.
15761 (gdb_disassembler::gdb_disassembler): New.
15762 (gdb_disassembler::print_insn): New.
15763 * disasm.h (class gdb_disassembler): New.
15764 (gdb_pretty_print_insn): Remove declaration.
15765 (gdb_disassemble_info): Likewise.
15766 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15767 (gdbscm_disasm_read_memory_worker): Update.
15768 (gdbscm_disasm_read_memory): Update.
15769 (gdbscm_disasm_memory_error): Remove.
15770 (gdbscm_disasm_print_address): Remove.
15771 (gdbscm_disassembler::gdbscm_disassembler): New.
15772 (gdbscm_print_insn_from_port): Update.
15773 * mips-tdep.c: Include disasm.h.
15774 (gdb_print_insn_mips): Update code to get gdbarch.
15775 * record-btrace.c (btrace_insn_history): Update.
15776 * spu-tdep.c: Include disasm.h.
15777 (struct spu_dis_asm_data): Remove.
15778 (struct spu_dis_asm_info): New.
15779 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15780 SPU id.
15781 (gdb_print_insn_spu): Cast disassemble_info to
15782 spu_dis_asm_info.
15783
80d75874
YQ
157842017-01-26 Yao Qi <yao.qi@linaro.org>
15785
15786 * disasm.c (do_ui_file_delete): Delete.
15787 (gdb_insn_length): Move code creating stream to ...
15788 * utils.c (null_stream): ... here. New function.
15789 * utils.h (null_stream): Declare.
15790
60685cd0
SM
157912017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15792
15793 * python/py-inferior.c (find_thread_object): Return directly
15794 from the loop. Remove "found" variable.
15795
eb1cdb62
JB
157962017-01-21 Joel Brobecker <brobecker@adacore.com>
15797
15798 GDB 7.12.1 released.
15799
b1ce6568
SM
158002017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15801
15802 * python/py-function.c (fnpy_call): Reorder declarations to have
15803 the gdbpy_enter object declared first.
15804 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15805
6f8b0407
SM
158062017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15807
fec93fb1 15808 PR python/21068
6f8b0407
SM
15809 * python/python-internal.h (PyMem_RawMalloc): Define for
15810 Python < 3.4.
15811 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15812 PyMem_RawMalloc instead of PyMem_Malloc.
15813
78cbbba8
LM
158142017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15815 Luis Machado <lgustavo@codesourcery.com>
15816
15817 * NEWS (New commands): Mention flash-erase.
15818 (New MI commands): Mention target-flash-erase.
15819 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15820 command.
15821 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15822 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15823 * target.c (flash_erase_command): New function.
15824 (initialize_targets): Add new flash-erase command.
15825 * target.h (flash_erase_command): New declaration.
15826
2132fe85
JB
158272017-01-20 Joel Brobecker <brobecker@adacore.com>
15828
15829 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15830 HAVE_SYS_PROCFS_H is defined.
15831
d1dff226
AH
158322017-01-18 Alan Hayward <alan.hayward@arm.com>
15833
15834 * remote.c (struct cached_reg): Change data into a pointer.
15835 * (stop_reply_dtr): Free data pointers before deleting vector.
15836 (process_stop_reply): Likewise.
15837 (remote_parse_stop_reply): Allocate space for data
15838
9890e433
AH
158392017-01-18 Alan Hayward <alan.hayward@arm.com>
15840
15841 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15842 MAX_REGISTER_SIZE.
15843 (amd64_pseudo_register_read_value): Likewise.
15844 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15845 (store_register_using_P): Likewise.
15846 * regcache.c (regcache_xfer_part): Likewise.
15847
7a36499a
IR
158482017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15849
15850 Split real and pseudo registers.
15851 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15852 (sparc32_pseudo_regnum): New enum.
15853 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15854 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15855 (SPARC32_CP0_REGISTERS): New macro.
15856 (sparc32_pseudo_register_name): New function.
15857 (sparc32_register_name): Use sparc32_pseudo_register_name.
15858 (sparc32_pseudo_register_type): New function.
15859 (sparc32_register_type): Use sparc32_pseudo_register_type.
15860 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15861 pseudo register numbers.
15862 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15863 (SPARC64_CP0_REGISTERS): New macro.
15864 (sparc64_pseudo_register_name): New function.
15865 (sparc64_register_name): Use sparc64_pseudo_register_name.
15866 (sparc64_pseudo_register_type): New function.
15867 (sparc64_register_type): Use sparc64_pseudo_register_type.
15868 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15869 pseudo register numbers.
15870 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15871 sparc64_store_arguments): Handle pseudo register numbers.
15872
6f8976bf
YQ
158732017-01-13 Yao Qi <yao.qi@linaro.org>
15874
15875 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15876 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15877 output.
15878 (getpkt_or_notif_sane_1): Likewise.
15879
e4241ace
YQ
158802017-01-13 Yao Qi <yao.qi@linaro.org>
15881
15882 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15883 of CC. Pass "-x c++-header" instead of "-x c".
15884
3015c064
SM
158852017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15886
15887 * remote.c (remote_can_async_p): Update comment.
15888
fde1b17d
SM
158892017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15890
15891 * linux-nat.c (linux_nat_can_async_p): Update comment.
15892
ca1ca08b
SM
158932017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15894
15895 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15896
4ad2da73
SM
158972017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15898
15899 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15900
c8b23b3f
TT
159012017-01-10 Tom Tromey <tom@tromey.com>
15902
15903 * python/py-type.c (typy_legacy_template_argument): Update.
15904 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15905 ~demangle_parse_info): Declare new members.
15906 (cp_demangled_name_to_comp): Return unique_ptr.
15907 (cp_demangled_name_parse_free)
15908 (make_cleanup_cp_demangled_name_parse_free)
15909 (cp_new_demangle_parse_info): Remove.
15910 * cp-support.c (do_demangled_name_parse_free_cleanup)
15911 (make_cleanup_cp_demangled_name_parse_free): Remove.
15912 (inspect_type, cp_canonicalize_string_full)
15913 (cp_canonicalize_string): Update.
15914 (mangled_name_to_comp): Change return type.
15915 (cp_class_name_from_physname, method_name_from_physname)
15916 (cp_func_name, cp_remove_params): Update.
15917 * cp-name-parser.y (demangle_parse_info): New constructor, from
15918 cp_new_demangle_parse_info.
15919 (~demangle_parse_info): New destructor, from
15920 cp_demangled_name_parse_free.
15921 (cp_merge_demangle_parse_infos): Update.
15922 (cp_demangled_name_to_comp): Change return type.
15923
1ac32117
TT
159242017-01-10 Tom Tromey <tom@tromey.com>
15925
15926 * top.c (prevent_dont_repeat): Change return type.
15927 * python/python.c (execute_gdb_command): Use std::string.
15928 Update.
15929 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15930 * command.h (prevent_dont_repeat): Change return type.
15931 * breakpoint.c (bpstat_do_actions_1): Update.
15932
0cf08227
TT
159332017-01-10 Tom Tromey <tom@tromey.com>
15934
15935 * value.h (scoped_value_mark::~scoped_value_mark): Call
15936 free_to_mark.
15937 (scoped_value_mark::free_to_mark): New method.
15938 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15939 scoped_value_mark.
15940
eb115069
TT
159412017-01-10 Tom Tromey <tom@tromey.com>
15942
15943 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15944 (valpy_reference_value, valpy_const_value, valpy_get_address)
15945 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15946 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15947 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15948 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15949 scoped_value_mark.
15950 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15951 * value.h (scoped_value_mark): New class.
15952
906768f9
TT
159532017-01-10 Tom Tromey <tom@tromey.com>
15954
15955 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15956 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15957 * psymtab.c (discard_psymtabs_upto): Remove.
15958 (make_cleanup_discard_psymtabs): Remove.
15959 (struct psymtab_state): Remove.
15960
bef155c3
TT
159612017-01-10 Tom Tromey <tom@tromey.com>
15962
15963 * record-full.c (record_full_save_cleanups): Remove.
15964 (record_full_save): Use gdb::unlinker.
15965 * gcore.c (do_bfd_delete_cleanup): Remove.
15966 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15967 cleanups.
15968 * dwarf2read.c (unlink_if_set): Remove.
15969 (write_psymtabs_to_index): Use gdb::unlinker.
15970 * common/gdb_unlinker.h: New file.
15971
192b62ce
TT
159722017-01-10 Tom Tromey <tom@tromey.com>
15973
15974 * windows-tdep.c (windows_xfer_shared_library): Update.
15975 * windows-nat.c (windows_make_so): Update.
15976 * utils.h (make_cleanup_bfd_unref): Remove.
15977 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15978 * symfile.h (symfile_bfd_open)
15979 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15980 * symfile.c (read_symbols, symbol_file_add)
15981 (separate_debug_file_exists): Update.
15982 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15983 (generic_load, reread_symbols): Update.
15984 * symfile-mem.c (symbol_file_add_from_memory): Update.
15985 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15986 (spu_symbol_file_add_from_memory): Update.
15987 * solist.h (struct target_so_ops) <bfd_open>: Return
15988 gdb_bfd_ref_ptr.
15989 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15990 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15991 gdb_bfd_ref_ptr.
15992 (solib_map_sections, reload_shared_libraries_1): Update.
15993 * solib-svr4.c (enable_break): Update.
15994 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15995 * solib-frv.c (enable_break2): Update.
15996 * solib-dsbt.c (enable_break): Update.
15997 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15998 gdb_bfd_ref_ptr.
15999 (darwin_solib_get_all_image_info_addr_at_init): Update.
16000 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16001 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16002 * record-full.c (record_full_save): Update.
16003 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16004 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16005 * minidebug.c (find_separate_debug_file_in_section): Return
16006 gdb_bfd_ref_ptr.
16007 * machoread.c (macho_add_oso_symfile): Change abfd to
16008 gdb_bfd_ref_ptr.
16009 (macho_symfile_read_all_oso): Update.
16010 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16011 (macho_symfile_read): Update.
16012 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16013 (jit_bfd_try_read_symtab): Update.
16014 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16015 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16016 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16017 gdb_bfd_ref_ptr.
16018 (gdb_bfd_ref_policy): New struct.
16019 (gdb_bfd_ref_ptr): New typedef.
16020 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16021 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16022 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16023 gdb_bfd_ref_ptr.
16024 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16025 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16026 (gcore_command): Update.
16027 * exec.c (exec_file_attach): Update.
16028 * elfread.c (elf_symfile_read): Update.
16029 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16030 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16031 (open_and_init_dwo_file): Update.
16032 (open_dwp_file): Return gdb_bfd_ref_ptr.
16033 (open_and_init_dwp_file): Update.
16034 * corelow.c (core_open): Update.
16035 * compile/compile-object-load.c (compile_object_load): Update.
16036 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16037 * coffread.c (coff_symfile_read): Update.
16038 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16039 gdb_bfd_ref_ptr. Rename.
16040 (dump_bfd_file, restore_command): Update.
16041 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16042 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16043 (find_separate_debug_file_by_buildid): Update.
16044
50315b21
TT
160452017-01-10 Tom Tromey <tom@tromey.com>
16046
16047 * common/gdb_ref_ptr.h: New file.
16048 * python/py-ref.h (struct gdbpy_ref_policy): New.
16049 (gdbpy_ref): Now a typedef.
16050
fc4007c9
TT
160512017-01-10 Tom Tromey <tom@tromey.com>
16052
16053 * utils.h (make_cleanup_htab_delete): Don't declare.
16054 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16055 Remove.
16056 * linespec.c (decode_compound_collector): Add constructor,
16057 destructor.
16058 (lookup_prefix_sym): Remove cleanup.
16059 (symtab_collector): Add constructor, destructor.
16060 (collect_symtabs_from_filename): Remove cleanup.
16061 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16062 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16063 Use htab_up.
16064 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16065 * dwarf2read.c (dw2_expand_symtabs_matching)
16066 (dw2_map_symbol_filenames, dwarf_decode_macros)
16067 (write_psymtabs_to_index): Use htab_up.
16068 * dwarf2loc.c (func_verify_no_selftailcall)
16069 (call_site_find_chain_1, func_verify_no_selftailcall)
16070 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16071 std::vector, gdb::unique_xmalloc_ptr.
16072 (call_sitep): Remove typedef.
16073 (dwarf2_locexpr_baton_eval): Remove unused variable.
16074
8dbcee67
TT
160752017-01-10 Tom Tromey <tom@tromey.com>
16076
16077 * python/python-internal.h (make_cleanup_py_decref)
16078 (make_cleanup_py_xdecref): Don't declare.
16079 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16080 (py_xdecref, make_cleanup_py_xdecref): Remove.
16081
13df46cc
TT
160822017-01-10 Tom Tromey <tom@tromey.com>
16083
16084 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16085 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16086
06fc9bf7
TT
160872017-01-10 Tom Tromey <tom@tromey.com>
16088
16089 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16090
830a4934
TT
160912017-01-10 Tom Tromey <tom@tromey.com>
16092
16093 * python/py-utils.c (unicode_to_encoded_string)
16094 (python_string_to_target_string)
16095 (python_string_to_target_python_string)
16096 (python_string_to_host_string, gdbpy_obj_to_string)
16097 (get_addr_from_python): Use gdbpy_ref.
16098
4586d543
TT
160992017-01-10 Tom Tromey <tom@tromey.com>
16100
16101 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16102 gdbpy_ref.
16103
59876f8f
TT
161042017-01-10 Tom Tromey <tom@tromey.com>
16105
16106 * python/python.c (eval_python_command, gdbpy_decode_line)
16107 (gdbpy_run_events, gdbpy_start_type_printers)
16108 (gdbpy_apply_type_printers): Use gdbpy_ref.
16109
97d83487
TT
161102017-01-10 Tom Tromey <tom@tromey.com>
16111
16112 * python/py-param.c (get_doc_string, compute_enum_values): Use
16113 gdbpy_ref.
16114
9205649a
TT
161152017-01-10 Tom Tromey <tom@tromey.com>
16116
16117 * python/py-inferior.c (find_thread_object, build_inferior_list):
16118 Use gdbpy_ref.
16119
74c49d45
TT
161202017-01-10 Tom Tromey <tom@tromey.com>
16121
16122 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16123
16361ffb
TT
161242017-01-10 Tom Tromey <tom@tromey.com>
16125
16126 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16127 gdbpy_ref.
16128
905f2cca
TT
161292017-01-10 Tom Tromey <tom@tromey.com>
16130
16131 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16132 extra incref.
16133 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16134 Use gdbpy_ref.
16135
64081434
TT
161362017-01-10 Tom Tromey <tom@tromey.com>
16137
16138 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16139 gdbpy_ref.
16140
59e9e831
TT
161412017-01-10 Tom Tromey <tom@tromey.com>
16142
16143 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16144 decref results of PyArg_ParseTupleAndKeywords.
16145
9de10f6d
TT
161462017-01-10 Tom Tromey <tom@tromey.com>
16147
16148 * python/python.c (python_run_simple_file): Use
16149 unique_xmalloc_ptr, gdbpy_ref.
16150
2bd5759d
TT
161512017-01-10 Tom Tromey <tom@tromey.com>
16152
16153 * python/py-prettyprint.c (print_stack_unless_memory_error)
16154 (print_string_repr, print_children): Use gdbpy_ref.
16155 (dummy_python_frame): New class.
16156 (dummy_python_frame::dummy_python_frame): Rename from
16157 push_dummy_python_frame.
16158 (py_restore_tstate): Remove.
16159
3b4e0e01
TT
161602017-01-10 Tom Tromey <tom@tromey.com>
16161
16162 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16163
17a22718
TT
161642017-01-10 Tom Tromey <tom@tromey.com>
16165
16166 * python/python.c (ensure_python_env, restore_python_env):
16167 Remove.
16168 * python/python-internal.h (ensure_python_env): Don't declare.
16169 * varobj.h (varobj_ensure_python_env): Don't declare.
16170 * varobj.c (varobj_ensure_python_env): Remove.
16171
68cdc557
TT
161722017-01-10 Tom Tromey <tom@tromey.com>
16173
16174 * varobj.c (varobj_value_get_print_value): Use
16175 gdbpy_enter_varobj.
16176
1eba6383
TT
161772017-01-10 Tom Tromey <tom@tromey.com>
16178
16179 * python/py-prettyprint.c (print_string_repr, print_children):
16180 Update.
16181 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16182 of "encoding".
16183 * varobj.c (varobj_value_get_print_value): Update.
16184 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16185
bde7b3e3
TT
161862017-01-10 Tom Tromey <tom@tromey.com>
16187
16188 * varobj.c (varobj_get_display_hint)
16189 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16190 (varobj_set_visualizer, free_variable): Use
16191 gdbpy_enter_varobj.
16192
a7785f8c
TT
161932017-01-10 Tom Tromey <tom@tromey.com>
16194
16195 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16196 (do_finish_initialization): New function. Use gdbpy_ref.
16197 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16198 do_finish_initialization.
16199
2865bfce
TT
162002017-01-10 Tom Tromey <tom@tromey.com>
16201
16202 * python/py-param.c (get_set_value, get_show_value): Use
16203 gdbpy_enter, gdbpy_ref.
16204
0e9dcc75
TT
162052017-01-10 Tom Tromey <tom@tromey.com>
16206
16207 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16208
12a5cedd
TT
162092017-01-10 Tom Tromey <tom@tromey.com>
16210
16211 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16212
788f2586
TT
162132017-01-10 Tom Tromey <tom@tromey.com>
16214
16215 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16216 Use gdbpy_enter_varobj.
16217
6cd67bea
TT
162182017-01-10 Tom Tromey <tom@tromey.com>
16219
16220 * varobj.c (gdbpy_enter_varobj): New constructor.
16221 * python/python-internal.h (gdbpy_enter_varobj): New class.
16222 * python/py-varobj.c (py_varobj_get_iterator): Use
16223 gdbpy_enter_varobj.
16224
14b122bf
TT
162252017-01-10 Tom Tromey <tom@tromey.com>
16226
16227 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16228 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16229 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16230 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16231 unique_xmalloc_ptr.
16232 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16233
bf1ca3b9
TT
162342017-01-10 Tom Tromey <tom@tromey.com>
16235
16236 * python/py-xmethods.c (invoke_match_method): Use
16237 gdbpy_ref.
16238
572a5524
TT
162392017-01-10 Tom Tromey <tom@tromey.com>
16240
16241 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16242 gdbpy_enter, gdbpy_ref.
16243
396a78b6
TT
162442017-01-10 Tom Tromey <tom@tromey.com>
16245
16246 * python/python.c (python_interactive_command): Use gdbpy_enter.
16247
a88b13c7
TT
162482017-01-10 Tom Tromey <tom@tromey.com>
16249
16250 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16251 gdbpy_ref.
16252
e9f0c363
TT
162532017-01-10 Tom Tromey <tom@tromey.com>
16254
16255 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16256 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16257
6349f452
TT
162582017-01-10 Tom Tromey <tom@tromey.com>
16259
16260 * utils.h (htab_deleter): New struct.
16261 (htab_up): New typedef.
16262 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16263 gdbpy_enter, gdbpy_ref, htab_up.
16264
c0171de6
TT
162652017-01-10 Tom Tromey <tom@tromey.com>
16266
16267 * python/py-unwind.c (pending_frame_invalidate): Remove.
16268 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16269
f18e226f
TT
162702017-01-10 Tom Tromey <tom@tromey.com>
16271
16272 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16273 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16274
c57af3f1
TT
162752017-01-10 Tom Tromey <tom@tromey.com>
16276
16277 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16278
60e600ec
TT
162792017-01-10 Tom Tromey <tom@tromey.com>
16280
16281 * python/python.c (gdbpy_eval_from_control_command)
16282 (gdbpy_source_script, gdbpy_run_events)
16283 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16284 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16285 gdbpy_enter.
16286
bf7da5b0
TT
162872017-01-10 Tom Tromey <tom@tromey.com>
16288
16289 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16290
2d38bced
TT
162912017-01-10 Tom Tromey <tom@tromey.com>
16292
16293 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16294
07bc7329
TT
162952017-01-10 Tom Tromey <tom@tromey.com>
16296
16297 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16298 (python_on_inferior_call_pre, python_on_inferior_call_post)
16299 (python_on_memory_change, python_on_register_change)
16300 (python_inferior_exit, python_new_objfile, add_thread_object)
16301 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16302
6e7c365e
TT
163032017-01-10 Tom Tromey <tom@tromey.com>
16304
16305 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16306 (bpfinishpy_handle_exit): Use gdbpy_enter.
16307
6ba0cd40
TT
163082017-01-10 Tom Tromey <tom@tromey.com>
16309
16310 * python/py-cmd.c (cmdpy_destroyer)
16311 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16312 gdbpy_enter.
16313
de2dc875
TT
163142017-01-10 Tom Tromey <tom@tromey.com>
16315
16316 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16317 gdbpy_enter.
16318 (gdbpy_breakpoint_has_cond): Likewise.
16319
4ecee2c4
TT
163202017-01-10 Tom Tromey <tom@tromey.com>
16321
16322 * python/python.c (gdbpy_enter): New constructor.
16323 (~gdbpy_enter): New destructor.
16324 (restore_python_env, ensure_python_env): Rewrite.
16325 * python/python-internal.h (gdbpy_enter): New class.
16326
37fce74f
TT
163272017-01-10 Tom Tromey <tom@tromey.com>
16328
16329 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16330
53a0cca3
TT
163312017-01-10 Tom Tromey <tom@tromey.com>
16332
16333 * python/py-value.c (value_has_field, get_field_flag)
16334 (get_field_type, valpy_getitem, convert_value_from_python): Use
16335 gdbpy_ref.
16336
ff3724f5
TT
163372017-01-10 Tom Tromey <tom@tromey.com>
16338
16339 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16340 gdbpy_ref.
16341
0700aea5
TT
163422017-01-10 Tom Tromey <tom@tromey.com>
16343
16344 * python/py-prettyprint.c (search_pp_list)
16345 (find_pretty_printer_from_objfiles)
16346 (find_pretty_printer_from_progspace)
16347 (find_pretty_printer_from_gdb, find_pretty_printer)
16348 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16349 gdbpy_ref.
16350
1bb44c9f
TT
163512017-01-10 Tom Tromey <tom@tromey.com>
16352
16353 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16354
87ce03fd
TT
163552017-01-10 Tom Tromey <tom@tromey.com>
16356
16357 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16358 (ltpy_get_all_source_lines): Use gdbpy_ref.
16359
ee0a3fb8
TT
163602017-01-10 Tom Tromey <tom@tromey.com>
16361
16362 * python/py-framefilter.c (extract_sym, extract_value)
16363 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16364 gdbpy_ref.
16365
bf2a52fa
TT
163662017-01-10 Tom Tromey <tom@tromey.com>
16367
16368 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16369
f59fe7f8
TT
163702017-01-10 Tom Tromey <tom@tromey.com>
16371
16372 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16373
80bd970a
TT
163742017-01-10 Tom Tromey <tom@tromey.com>
16375
16376 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16377 gdbpy_ref.
16378
d1b3de2e
TT
163792017-01-10 Tom Tromey <tom@tromey.com>
16380
16381 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16382
3bb43384
TT
163832017-01-10 Tom Tromey <tom@tromey.com>
16384
16385 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16386 (typy_range): Use gdbpy_ref.
16387
abf5651e
TT
163882017-01-10 Tom Tromey <tom@tromey.com>
16389
16390 * python/py-threadevent.c (create_thread_event_object): Use
16391 gdbpy_ref.
16392 * python/py-stopevent.c (create_stop_event_object): Simplify.
16393 (emit_stop_event): Use gdbpy_ref.
16394 * python/py-signalevent.c (create_signal_event_object): Use
16395 gdbpy_ref.
16396 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16397 (emit_new_objfile_event, create_clear_objfiles_event_object)
16398 (emit_clear_objfiles_event): Use gdbpy_ref.
16399 * python/py-infevents.c (create_inferior_call_event_object)
16400 (create_register_changed_event_object)
16401 (create_memory_changed_event_object, emit_inferior_call_event)
16402 (emit_memory_changed_event, emit_register_changed_event): Use
16403 gdbpy_ref.
16404 * python/py-exitedevent.c (create_exited_event_object)
16405 (emit_exited_event): Use gdbpy_ref.
16406 * python/py-event.h (evpy_emit_event): Remove
16407 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16408 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16409 * python/py-continueevent.c (emit_continue_event): Use
16410 gdbpy_ref.
16411 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16412 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16413 gdbpy_ref.
16414 * python/py-bpevent.c (create_breakpoint_event_object): Use
16415 gdbpy_ref.
16416
a68ff33e
TT
164172017-01-10 Tom Tromey <tom@tromey.com>
16418
16419 * python/py-ref.h: New file.
16420
7becfd03
SM
164212017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16422
16423 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16424 void.
16425 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16426 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16427 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16428 * ui-out.c (ui_out::redirect): Likewise.
16429 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16430 * cli/cli-logging.c (set_logging_redirect): Update call site of
16431 ui_out::redirect.
16432 (handle_redirections): Likewise.
16433 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16434 * top.c (execute_command_to_string): Likewise.
16435 * utils.c (do_ui_out_redirect_pop): Likewise.
16436
df294654
SM
164372017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16438
16439 * stack.c (_initialize_stack): Update "frame" command help message.
16440
f5e6296e
IB
164412017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16442
16443 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16444
0e2d6fa6
YQ
164452017-01-06 Yao Qi <yao.qi@linaro.org>
16446
16447 * x86-linux-nat.h: Include gdb_proc_service.h.
16448
44d6d3f9
YQ
164492017-01-06 Yao Qi <yao.qi@linaro.org>
16450
16451 * ser-base.h: Include serial.h.
16452
656731fe
YQ
164532017-01-06 Yao Qi <yao.qi@linaro.org>
16454
16455 * ppc-linux-tdep.h: Include ppc-tdep.h.
16456
1ca8f924
YQ
164572017-01-06 Yao Qi <yao.qi@linaro.org>
16458
16459 * nat/amd64-linux-siginfo.h: Include signal.h.
16460
bc3008c4
YQ
164612017-01-06 Yao Qi <yao.qi@linaro.org>
16462
16463 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16464
66c80d03
YQ
164652017-01-06 Yao Qi <yao.qi@linaro.org>
16466
16467 * mi/mi-parse.h: Include mi-cmds.h.
16468
051d2dda
YQ
164692017-01-06 Yao Qi <yao.qi@linaro.org>
16470
16471 * inf-loop.c: Don't include "target.h".
16472 * inf-loop.h: Include it here.
16473
8018d34f
YQ
164742017-01-06 Yao Qi <yao.qi@linaro.org>
16475
16476 * dfp.h: Include "dboulest.h" and "expression.h".
16477
c0b8369c
YQ
164782017-01-06 Yao Qi <yao.qi@linaro.org>
16479
16480 * ax-gdb.h: Include "ax.h".
16481
ad5cba2a
YQ
164822017-01-06 Yao Qi <yao.qi@linaro.org>
16483
16484 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16485 with nat/gdb_ptrace.h.
16486
1c33cd7f
YQ
164872017-01-05 Yao Qi <yao.qi@linaro.org>
16488
16489 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16490 new line.
16491 (mips64_fbsd_sigframe_init): Likewise.
16492
c988ac1d
JB
164932017-01-04 John Baldwin <jhb@FreeBSD.org>
16494
16495 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16496 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16497
b268007c
JB
164982017-01-04 John Baldwin <jhb@FreeBSD.org>
16499
16500 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16501 * NEWS: Mention new FreeBSD/mips native configuration.
16502 * config/mips/fbsd.mh: New file.
16503 * configure.host: Add mips*-*-freebsd*.
16504 * mips-fbsd-nat.c: New file.
16505
387360da
JB
165062017-01-04 John Baldwin <jhb@FreeBSD.org>
16507
16508 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16509 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16510 * NEWS: Mention new FreeBSD/mips target.
16511 * configure.tgt: Add mips*-*-freebsd*.
16512 * mips-fbsd-tdep.c: New file.
16513 * mips-fbsd-tdep.h: New file.
16514
2aaaf250
YQ
165152017-01-04 Yao Qi <yao.qi@linaro.org>
16516
16517 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16518 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16519
61baf725
JB
165202017-01-01 Joel Brobecker <brobecker@adacore.com>
16521
6dbb839a 16522 Update copyright year range in all GDB files.
61baf725 16523
c113e7ff 165242017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16525
c113e7ff 16526 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16527
c113e7ff 16528For older changes see ChangeLog-2016.
c906108c
SS
16529\f
16530Local Variables:
16531mode: change-log
16532left-margin: 8
16533fill-column: 74
16534version-control: never
57da7796 16535coding: utf-8
c906108c 16536End:
This page took 3.059357 seconds and 4 git commands to generate.