]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Change register_changed_p returns bool
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
62ad7ce7
YQ
12017-11-24 Yao Qi <yao.qi@linaro.org>
2
3 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
4 local 'changed'. Remove error.
5 (register_changed_p): Change return type to bool.
6
506fe5f4
YQ
72017-11-24 Yao Qi <yao.qi@linaro.org>
8
9 * arch/tic6x.c: New file.
10 * arch/tic6x.h: New file.
11 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
12 tic6x-core.xml and tic6x-gp.xml.
13 * features/tic6x-c6xp.c: Generated.
14 * features/tic6x-core.c: Generated.
15 * features/tic6x-gp.c: Generated.
16 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
17 "tic6x-".
18
00ea2e2a
SM
192017-11-23 Simon Marchi <simon.marchi@ericsson.com>
20
21 * mi/mi-main.c (list_available_thread_groups): Change map value
22 type to std::vector.
23
f45e2a77
SM
242017-11-23 Simon Marchi <simon.marchi@ericsson.com>
25
26 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
27
bd046f64
SM
282017-11-23 Simon Marchi <simon.marchi@ericsson.com>
29
30 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
31 back to...
32 <children_requested>: ... this.
33 (varobj_get_num_children, varobj_update): Adjust.
34
4c37490d
SM
352017-11-23 Simon Marchi <simon.marchi@ericsson.com>
36
37 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
38 (ada_value_has_mutated): Likewise.
39 * c-varobj.c (varobj_is_anonymous_child): Likewise.
40 (c_is_path_expr_parent): Likewise.
41 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
42 (mi_cmd_var_set_frozen): Likewise.
43 (mi_cmd_var_update_iter): Likewise.
44 (mi_cmd_var_update): Likewise.
45 * varobj.c (pretty_printing): Likewise.
46 (varobj_enable_pretty_printing): Likewise.
47 (struct varobj_root) <floating, is_valid>: Likewise.
48 (struct varobj_dynamic) <children_requested>: Likewise.
49 (delete_variable): Likewise.
50 (delete_variable_1): Likewise.
51 (install_variable): Likewise.
52 (update_type_if_necessary): Likewise.
53 (install_new_value): Likewise.
54 (value_of_root): Likewise.
55 (is_root_p): Likewise.
56 (varobj_create): Likewise.
57 (varobj_delete): Likewise.
58 (varobj_has_more): Likewise.
59 (varobj_set_frozen): Likewise.
60 (varobj_get_frozen): Likewise.
61 (install_dynamic_child): Likewise.
62 (dynamic_varobj_has_child_method): Likewise.
63 (update_dynamic_varobj_children): Likewise.
64 (varobj_get_num_children): Likewise.
65 (varobj_list_children): Likewise.
66 (is_path_expr_parent): Likewise.
67 (varobj_default_is_path_expr_parent): Likewise.
68 (varobj_is_dynamic_p): Likewise.
69 (varobj_set_value): Likewise.
70 (varobj_value_has_mutated): Likewise.
71 (varobj_update): Likewise.
72 (check_scope): Likewise.
73 (value_of_root_1): Likewise.
74 (varobj_value_get_print_value): Likewise.
75 (varobj_editable_p): Likewise.
76 (varobj_value_is_changeable_p): Likewise.
77 (varobj_floating_p): Likewise.
78 (varobj_default_value_is_changeable_p): Likewise.
79 (varobj_invalidate_iter): Likewise.
80 * varobj.h (struct varobj_update_result) <type_changed,
81 children_changed, changed, value_installed>: Likewise.
82 (struct varobj) <updated, frozen, not_fetched>: Likewise.
83 (struct lang_varobj_ops) <value_is_changeable_p,
84 value_has_mutated, is_path_expr_parent>: Likewise.
85 (varobj_delete): Likewise.
86 (varobj_set_frozen): Likewise.
87 (varobj_get_frozen): Likewise.
88 (varobj_set_value): Likewise.
89 (varobj_update): Likewise.
90 (varobj_editable_p): Likewise.
91 (varobj_floating_p): Likewise.
92 (varobj_has_more): Likewise.
93 (varobj_is_dynamic_p): Likewise.
94 (varobj_default_value_is_changeable_p): Likewise.
95 (varobj_value_is_changeable_p): Likewise.
96 (varobj_is_anonymous_child): Likewise.
97 (varobj_default_is_path_expr_parent): Likewise.
98
9c23b42f
SDJ
992017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
100
101 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
102 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
103 <type_str>: Convert to 'std::string'.
104 <expr>: Convert to 'expression_up'.
105 (dtrace_probe_arg_s): Delete type and VEC.
106 (dtrace_probe_enabler_s): Likewise.
107 (struct dtrace_probe): Replace by...
108 (class dtrace_static_probe_ops): ...this and...
109 (class dtrace_probe): ...this.
110 (dtrace_probe_is_linespec): Rename to...
111 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
112 to reflect change.
113 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
114 Adjust code. Create new instance of 'dtrace_probe'.
115 (dtrace_build_arg_exprs): Rename to...
116 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
117 reflect change.
118 (dtrace_get_probes): Rename to...
119 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
120 to reflect change.
121 (dtrace_get_arg): Rename to...
122 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
123 reflect change.
124 (dtrace_probe_is_enabled): Rename to...
125 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
126 change.
127 (dtrace_get_probe_address): Rename to...
128 (dtrace_probe::get_relocated_address): ...this. Adjust code
129 to reflect change.
130 (dtrace_get_probe_argument_count): Rename to...
131 (dtrace_probe::get_argument_count): ...this. Adjust code to
132 reflect change.
133 (dtrace_can_evaluate_probe_arguments): Rename to...
134 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
135 to reflect change.
136 (dtrace_evaluate_probe_argument): Rename to...
137 (dtrace_probe::evaluate_argument): ...this. Adjust code to
138 reflect change.
139 (dtrace_compile_to_ax): Rename to...
140 (dtrace_probe::compile_to_ax): ...this. Adjust code to
141 reflect change.
142 (dtrace_probe_destroy): Delete.
143 (dtrace_type_name): Rename to...
144 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
145 reflect change.
146 (dtrace_probe::get_static_ops): New method.
147 (dtrace_gen_info_probes_table_header): Rename to...
148 (dtrace_static_probe_ops::gen_info_probes_table_header):
149 ...this. Adjust code to reflect change.
150 (dtrace_gen_info_probes_table_values): Rename to...
151 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
152 code to reflect change.
153 (dtrace_enable_probe): Rename to...
154 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
155 change.
156 (dtrace_disable_probe): Rename to...
157 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
158 change.
159 (struct probe_ops dtrace_probe_ops): Delete.
160 (info_probes_dtrace_command): Call 'info_probes_for_spops'
161 instead of 'info_probes_for_ops'.
162 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
163 of 'all_probe_ops'.
164
0e9ae10f
SDJ
1652017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
166 Simon Marchi <simark@simark.ca>
167
168 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
169 variable.
170 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
171 <aexpr>: Change type to 'expression_up'.
172 (stap_probe_arg_s): Delete type and VEC.
173 (struct stap_probe): Delete. Replace by...
174 (class stap_static_probe_ops): ...this and...
175 (class stap_probe): ...this. Rename variables to add 'm_'
176 prefix. Do not use 'union' for arguments anymore.
177 (stap_get_expected_argument_type): Receive probe name instead
178 of 'struct stap_probe'. Adjust code.
179 (stap_parse_probe_arguments): Rename to...
180 (stap_probe::parse_arguments): ...this. Adjust code to
181 reflect change.
182 (stap_get_probe_address): Rename to...
183 (stap_probe::get_relocated_address): ...this. Adjust code
184 to reflect change.
185 (stap_get_probe_argument_count): Rename to...
186 (stap_probe::get_argument_count): ...this. Adjust code
187 to reflect change.
188 (stap_get_arg): Rename to...
189 (stap_probe::get_arg_by_number'): ...this. Adjust code to
190 reflect change.
191 (can_evaluate_probe_arguments): Rename to...
192 (stap_probe::can_evaluate_arguments): ...this. Adjust code
193 to reflect change.
194 (stap_evaluate_probe_argument): Rename to...
195 (stap_probe::evaluate_argument): ...this. Adjust code
196 to reflect change.
197 (stap_compile_to_ax): Rename to...
198 (stap_probe::compile_to_ax): ...this. Adjust code to
199 reflect change.
200 (stap_probe_destroy): Delete.
201 (stap_modify_semaphore): Adjust comment.
202 (stap_set_semaphore): Rename to...
203 (stap_probe::set_semaphore): ...this. Adjust code to reflect
204 change.
205 (stap_clear_semaphore): Rename to...
206 (stap_probe::clear_semaphore): ...this. Adjust code to
207 reflect change.
208 (stap_probe::get_static_ops): New method.
209 (handle_stap_probe): Adjust code to create instance of
210 'stap_probe'.
211 (stap_get_probes): Rename to...
212 (stap_static_probe_ops::get_probes): ...this. Adjust code to
213 reflect change.
214 (stap_probe_is_linespec): Rename to...
215 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
216 reflect change.
217 (stap_type_name): Rename to...
218 (stap_static_probe_ops::type_name): ...this. Adjust code to
219 reflect change.
220 (stap_gen_info_probes_table_header): Rename to...
221 (stap_static_probe_ops::gen_info_probes_table_header):
222 ...this. Adjust code to reflect change.
223 (stap_gen_info_probes_table_values): Rename to...
224 (stap_probe::gen_info_probes_table_values): ...this. Adjust
225 code to reflect change.
226 (struct probe_ops stap_probe_ops): Delete.
227 (info_probes_stap_command): Use 'info_probes_for_spops'
228 instead of 'info_probes_for_ops'.
229 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
230 of 'all_probe_ops'.
231
935676c9
SDJ
2322017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
233
234 * break-catch-throw.c (fetch_probe_arguments): Use
235 'probe.prob' instead of 'probe.probe'.
236 * breakpoint.c (create_longjmp_master_breakpoint): Call
237 'can_evaluate_arguments' and 'get_relocated_address' methods
238 from probe.
239 (create_exception_master_breakpoint): Likewise.
240 (add_location_to_breakpoint): Use 'sal->prob' instead of
241 'sal->probe'.
242 (bkpt_probe_insert_location): Call 'set_semaphore' method from
243 probe.
244 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
245 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
246 of 'probe_ops'.
247 (probe_key_free): Call 'delete' on probe.
248 (check_exception_resume): Use 'probe.prob' instead of
249 'probe.probe'.
250 * location.c (string_to_event_location_basic): Call
251 'probe_linespec_to_static_ops'.
252 * probe.c (class any_static_probe_ops): New class.
253 (any_static_probe_ops any_static_probe_ops): New variable.
254 (parse_probes_in_pspace): Receive 'static_probe_ops' as
255 argument. Adjust code to reflect change.
256 (parse_probes): Use 'static_probe_ops' instead of
257 'probe_ops'. Adjust code to reflect change.
258 (find_probes_in_objfile): Call methods to get name and
259 provider from probe.
260 (find_probe_by_pc): Use 'result.prob' instead of
261 'result.probe'. Call 'get_relocated_address' method from
262 probe.
263 (collect_probes): Adjust comment and argument list to receive
264 'static_probe_ops' instead of 'probe_ops'. Adjust code to
265 reflect change. Call necessary methods from probe.
266 (compare_probes): Call methods to get name and provider from
267 probes.
268 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
269 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
270 adjust code accordingly.
271 (print_ui_out_not_applicables): Likewise.
272 (info_probes_for_ops): Rename to...
273 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
274 as argument instead of 'probe_ops'. Adjust code. Call
275 necessary methods from probe.
276 (info_probes_command): Use 'info_probes_for_spops'.
277 (enable_probes_command): Pass correct argument to
278 'collect_probes'. Call methods from probe.
279 (disable_probes_command): Likewise.
280 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
281 (get_probe_argument_count): Move to
282 'any_static_probe_ops::get_argument_count'.
283 (can_evaluate_probe_arguments): Move to
284 'any_static_probe_ops::can_evaluate_arguments'.
285 (evaluate_probe_argument): Move to
286 'any_static_probe_ops::evaluate_argument'.
287 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
288 'probe.probe'.
289 (probe_linespec_to_ops): Rename to...
290 (probe_linespec_to_static_ops): ...this. Adjust code.
291 (probe_any_is_linespec): Rename to...
292 (any_static_probe_ops::is_linespec): ...this.
293 (probe_any_get_probes): Rename to...
294 (any_static_probe_ops::get_probes): ...this.
295 (any_static_probe_ops::type_name): New method.
296 (any_static_probe_ops::gen_info_probes_table_header): New
297 method.
298 (compute_probe_arg): Use 'pc_probe.prob' instead of
299 'pc_probe.probe'. Call methods from probe.
300 (compile_probe_arg): Likewise.
301 (std::vector<const probe_ops *> all_probe_ops): Delete.
302 (std::vector<const static_probe_ops *> all_static_probe_ops):
303 New variable.
304 (_initialize_probe): Use 'all_static_probe_ops' instead of
305 'all_probe_ops'.
306 * probe.h (struct info_probe_column) <field_name>: Delete
307 extraneous newline
308 (info_probe_column_s): Delete type and VEC.
309 (struct probe_ops): Delete. Replace with...
310 (class static_probe_ops): ...this and...
311 (clas probe): ...this.
312 (struct bound_probe) <bound_probe>: Delete extraneous
313 newline. Adjust constructor to receive 'probe' instead of
314 'struct probe'.
315 <probe>: Rename to...
316 <prob>: ...this. Delete extraneous newline.
317 <objfile>: Delete extraneous newline.
318 (register_probe_ops): Delete unused prototype.
319 (info_probes_for_ops): Rename to...
320 (info_probes_for_spops): ...this. Adjust comment.
321 (get_probe_address): Move to 'probe::get_address'.
322 (get_probe_argument_count): Move to
323 'probe::get_argument_count'.
324 (can_evaluate_probe_arguments): Move to
325 'probe::can_evaluate_arguments'.
326 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
327 * solib-svr4.c (struct svr4_info): Adjust comment.
328 (struct probe_and_action) <probe>: Rename to...
329 <prob>: ...this.
330 (register_solib_event_probe): Receive 'probe' instead of
331 'struct probe' as argument. Use 'prob' instead of 'probe'
332 when applicable.
333 (solib_event_probe_action): Call 'get_argument_count' method
334 from probe. Adjust comment.
335 (svr4_handle_solib_event): Adjust comment. Call
336 'evaluate_argument' method from probe.
337 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
338 from probe.
339 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
340 'struct probe'. Call 'can_evaluate_arguments' from probe.
341 * symfile.h: Forward declare 'class probe' instead of 'struct
342 probe'.
343 * symtab.h: Likewise.
344 (struct symtab_and_line) <probe>: Rename to...
345 <prob>: ...this.
346 * tracepoint.c (start_tracing): Use 'prob' when applicable.
347 Call probe methods.
348 (stop_tracing): Likewise.
349
8f6cb6c3
JB
3502017-11-22 Joel Brobecker <brobecker@adacore.com>
351
352 * ravenscar-thread.c (ravenscar_inferior_created): Remove
353 trailing newline at end of string in call to warning.
354
479f8de1
SM
3552017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
356
357 * osdata.h: Include vector isntead of vec.h.
358 (osdata_column_s): Remove typedef.
359 (struct osdata_column): Add constructor.
360 <name, value>: Change type to std::string.
361 (DEF_VEC_O (osdata_column_s)): Remove.
362 (osdata_item_s): Remove typedef.
363 (struct osdata_item) <columns>: Change type to std::vector.
364 (DEF_VEC_O (osdata_item_s)): Remove.
365 (struct osdata): Add constructor.
366 <type>: Change type to std::string.
367 <items>: Change type to std::vector.
368 (osdata_p): Remove typedef.
369 (DEF_VEC_P (osdata_p)): Remove.
370 (osdata_parse): Return a unique_ptr.
371 (osdata_free): Remove.
372 (make_cleanup_osdata_free): Remove.
373 (get_osdata): Return a unique_ptr.
374 (get_osdata_column): Return pointer to std::string, take a
375 reference to osdata_item as parameter.
376 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
377 unique_ptr.
378 <property_name>: Change type to std::string.
379 (osdata_start_osdata): Allocate osdata with new and adjust.
380 (osdata_start_item): Adjust.
381 (osdata_start_column): Adjust.
382 (osdata_end_column): Adjust.
383 (clear_parsing_data): Remove.
384 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
385 (osdata_item_clear): Remove.
386 (get_osdata): return a unique_ptr and adjust.
387 (get_osdata_column): Return a pointer to std::string and adjust.
388 (info_osdata): Adjust.
389 * mi/mi-main.c: Include <map>.
390 (free_vector_of_osdata_items): Remove.
391 (list_available_thread_groups): Adjust, use std::map instead of
392 splay tree.
393
41bd68f5
SM
3942017-11-22 Simon Marchi <simon.marchi@ericsson.com>
395
396 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
397 case in switch.
398
7e2fd2f4
SM
3992017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
400
401 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
402
0604393c
SM
4032017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
404
405 * varobj.h (struct varobj_update_result): Add constructor, add
406 move constructor, disable copy and assign, initialize fields.
407 <newobj>: Change type to std::vector.
408 (varobj_update): Return std::vector.
409 * varobj.c (install_dynamic_child): Change VEC parameters to
410 std::vector and adjust.
411 (update_dynamic_varobj_children): Likewise.
412 (varobj_update): Return std::vector and adjust.
413 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
414
ddf0ea08
SM
4152017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
416
417 * varobj.h (struct varobj) <parent>: Remove const.
418 <children>: Change type to std::vector.
419 (varobj_list_children): Return std::vector const reference.
420 (varobj_restrict_range): Change parameter type to std::vector
421 const reference.
422 * varobj.c (varobj_has_more): Adjust.
423 (varobj_restrict_range): Change parameter type to std::vector
424 const reference and adjust.
425 (install_dynamic_child): Adjust.
426 (update_dynamic_varobj_children): Adjust.
427 (varobj_list_children): Return std::vector const reference and
428 adjust.
429 (varobj_add_child): Adjust.
430 (update_type_if_necessary): Adjust.
431 (varobj_update): Adjust.
432 (delete_variable_1): Adjust.
433 * ada-varobj.c (ada_value_has_mutated): Adjust.
434 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
435
9e5b9d2b
SM
4362017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
437
438 * varobj.h (struct varobj): Add constructor and destructor,
439 initialize fields.
440 * varobj.c (struct varobj_root): Initialize fields.
441 (struct varobj_dynamic): Initialize fields.
442 (varobj_create): Use unique_ptr instead of cleanup. Create
443 varobj with new instead of new_root_variable.
444 (delete_variable_1): Free variable with delete instead of
445 free_variable.
446 (create_child_with_value): Create variable with new instead of
447 new_variable.
448 (varobj::varobj): New.
449 (varobj::~varobj): New (body mostly coming from free_variable).
450 (new_variable): Remove.
451 (free_variable): Remove.
452 (do_free_variable_cleanup): Remove.
453 (make_cleanup_free_variable): Remove.
454
fc35dab1
UW
4552017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
456
457 * core-regset.c: Remove file.
458 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
459
2400729e
UW
4602017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
461
462 * NEWS: Document use of GNU MPFR.
463 * README: Likewise.
464
465 * Makefile.in (LIBMPFR): Add define.
466 (CLIBS): Add $(LIBMPFR).
467 * configure.ac: Add --with-mpfr configure option.
468 * configure: Regenerate.
469 * config.in: Regenerate.
470
471 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
472 (class mpfr_float_ops): New type.
473 (mpfr_float_ops::from_target): Two new overloaded functions.
474 (mpfr_float_ops::to_target): Likewise.
475 (mpfr_float_ops::to_string): New function.
476 (mpfr_float_ops::from_string): Likewise.
477 (mpfr_float_ops::to_longest): Likewise.
478 (mpfr_float_ops::from_longest): Likewise.
479 (mpfr_float_ops::from_ulongest): Likewise.
480 (mpfr_float_ops::to_host_double): Likewise.
481 (mpfr_float_ops::from_host_double): Likewise.
482 (mpfr_float_ops::convert): Likewise.
483 (mpfr_float_ops::binop): Likewise.
484 (mpfr_float_ops::compare): Likewise.
485 (get_target_float_ops): Use mpfr_float_ops if available.
486
7a26362d
UW
4872017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
488
489 * target-float.c: Do not include <math.h>.
490 Include <cmath> and <limits>.
491 (DOUBLEST): Do not define.
492 (class target_float_ops): New type.
493 (class host_float_ops): New templated type.
494 (class decimal_float_ops): New type.
495
496 (floatformat_to_doublest): Rename to ...
497 (host_float_ops<T>::from_target): ... this. Use template type T
498 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
499 (host_float_ops<T>::from_target): New overload using a type argument.
500 (floatformat_from_doublest): Rename to ...
501 (host_float_ops<T>::to_target): ... this. Use template type T
502 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
503 (host_float_ops<T>::to_target): New overload using a type argument.
504 (floatformat_printf_format): New function.
505 (struct printf_length_modifier): New templated type.
506 (floatformat_to_string): Rename to ...
507 (host_float_ops<T>::to_string): ... this. Use type instead of
508 floatformat argument. Use floatformat_printf_format and
509 printf_length_modifier. Remove special handling of invalid numbers,
510 infinities and NaN (moved to target_float_to_string).
511 (struct scanf_length_modifier): New templated type.
512 (floatformat_from_string): Rename to ...
513 (host_float_ops<T>::from_string): ... this. Use type instead of
514 floatformat argument. Use scanf_length_modifier.
515 (floatformat_to_longest): Rename to ...
516 (host_float_ops<T>::to_longest): ... this. Use type instead of
517 floatformat argument. Handle out-of-range values deterministically.
518 (floatformat_from_longest): Rename to ...
519 (host_float_ops<T>::from_longest): ... this. Use type instead of
520 floatformat argument.
521 (floatformat_from_ulongest): Rename to ...
522 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
523 floatformat argument.
524 (floatformat_to_host_double): Rename to ...
525 (host_float_ops<T>::to_host_double): ... this. Use type instead of
526 floatformat argument.
527 (floatformat_from_host_double): Rename to ...
528 (host_float_ops<T>::from_host_double): ... this. Use type instead of
529 floatformat argument.
530 (floatformat_convert): Rename to ...
531 (host_float_ops<T>::convert): ... this. Use type instead of
532 floatformat arguments. Remove handling of no-op conversions.
533 (floatformat_binop): Rename to ...
534 (host_float_ops<T>::binop): ... this. Use type instead of
535 floatformat arguments.
536 (floatformat_compare): Rename to ...
537 (host_float_ops<T>::compare): ... this. Use type instead of
538 floatformat arguments.
539
540 (match_endianness): Use type instead of length/byte_order arguments.
541 (set_decnumber_context): Likewise.
542 (decimal_from_number): Likewise. Update calls.
543 (decimal_to_number): Likewise.
544 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
545 (decimal_float_ops::to_host_double): New dummy function.
546 (decimal_float_ops::from_host_double): Likewise.
547 (decimal_to_string): Rename to ...
548 (decimal_float_ops::to_string): ... this. Use type instead of
549 length/byte_order arguments. Update calls.
550 (decimal_from_string): Rename to ...
551 (decimal_float_ops::from_string): ... this. Use type instead of
552 length/byte_order arguments. Update calls.
553 (decimal_from_longest): Rename to ...
554 (decimal_float_ops::from_longest): ... this. Use type instead of
555 length/byte_order arguments. Update calls.
556 (decimal_from_ulongest): Rename to ...
557 (decimal_float_ops::from_ulongest): ... this. Use type instead of
558 length/byte_order arguments. Update calls.
559 (decimal_to_longest): Rename to ...
560 (decimal_float_ops::to_longest): ... this. Use type instead of
561 length/byte_order arguments. Update calls.
562 (decimal_binop): Rename to ...
563 (decimal_float_ops::binop): ... this. Use type instead of
564 length/byte_order arguments. Update calls.
565 (decimal_compare): Rename to ...
566 (decimal_float_ops::compare): ... this. Use type instead of
567 length/byte_order arguments. Update calls.
568 (decimal_convert): Rename to ...
569 (decimal_float_ops::convert): ... this. Use type instead of
570 length/byte_order arguments. Update calls.
571
572 (target_float_same_category_p): New function.
573 (target_float_same_format_p): Likewise.
574 (target_float_format_length): Likewise.
575 (enum target_float_ops_kind): New type.
576 (get_target_float_ops_kind): New function.
577 (get_target_float_ops): Three new overloaded functions.
578
579 (target_float_is_zero): Update call.
580 (target_float_to_string): Add special handling of invalid numbers,
581 infinities and NaN (moved from floatformat_to_string). Use
582 target_float_ops callback.
583 (target_float_from_string): Use target_float_ops callback.
584 (target_float_to_longest): Likewise.
585 (target_float_from_longest): Likewise.
586 (target_float_from_ulongest): Likewise.
587 (target_float_to_host_double): Likewise.
588 (target_float_from_host_double): Likewise.
589 (target_float_convert): Add special case for no-op conversions.
590 Use target_float_ops callback.
591 (target_float_binop): Use target_float_ops callback.
592 (target_float_compare): Likewise.
593
a9f26f60
YQ
5942017-11-22 Yao Qi <yao.qi@linaro.org>
595
596 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
597
29f9a567
YQ
5982017-11-22 Yao Qi <yao.qi@linaro.org>
599
600 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
601 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
602
3b1b69bf
JG
6032017-11-21 Jerome Guitton <guitton@adacore.com>
604
605 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
606 with event ptid from the lower layer before doing the
607 ravenscar-specific update.
608
54aa6c67
JB
6092017-11-21 Joel Brobecker <brobecker@adacore.com>
610
611 * ravenscar-thread.c (is_ravenscar_task): Also verify that
612 the ptid's TID is nonzero.
613
cf3fbed4
JB
6142017-11-21 Joel Brobecker <brobecker@adacore.com>
615
616 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
617 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
618 Make non-static. Change return type to char *. Adjust code
619 accordingly. Rewrite the function's documentation.
620 (read_atcb): Adjust call to get_tcb_types_info accordingly.
621 * ravenscar-thread.c (ravenscar_inferior_created): Check that
622 we have enough debugging information in the runtime to support
623 Ada task debugging before we enable the ravenscar-thread layer.
624
9edcc12f
JB
6252017-11-21 Joel Brobecker <brobecker@adacore.com>
626
627 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
628 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
629 * ravenscar-thread.c: Add into comment.
630 (base_magic_null_ptid): Delete.
631 (base_ptid): Change documentation.
632 (ravenscar_active_task): Renames ravenscar_running_thread.
633 All callers updated throughout.
634 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
635 (ravenscar_task_is_currently_active): Likewise.
636 (get_base_thread_from_ravenscar_task): Ditto.
637 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
638 (ravenscar_runtime_initialized): Likewise.
639 (get_running_thread_id): Add new parameter "cpu". Adjust
640 implementation to handle this new parameter.
641 (ravenscar_fetch_registers): Small adjustment to use
642 is_ravenscar_task and ravenscar_task_is_currently_active in
643 order to decide whether to use the target beneath or this
644 module's arch_ops.
645 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
646 (ravenscar_stopped_by_sw_breakpoint): Use
647 get_base_thread_from_ravenscar_task to get the underlying
648 thread, rather than using base_ptid.
649 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
650 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
651 Likewise.
652 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
653
65d40437
JB
6542017-11-21 Joel Brobecker <brobecker@adacore.com>
655
656 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
657 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
658 (get_tcb_types_info): Set fieldnos.base_cpu.
659 (read_atcb): Set task_info->base_cpu.
660 (info_task): Print "Base CPU" info if set by runtime.
661
e02544b2
JB
6622017-11-21 Joel Brobecker <brobecker@adacore.com>
663
664 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
665 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
666 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
667 New functions.
668 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
669 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
670 to_stopped_data_address and to_core_of_thread fields of
671 ravenscar_ops.
672
ed0f4273
UW
6732017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
674
675 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
676 (struct gdbarch_tdep): New member long_double_abi.
677 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
678 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
679 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
680 format depending on long_double_abi tdep member.
681 (ppc_floatformat_for_type): Handle __ibm128 type.
682
0fc76421
SM
6832017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
684
685 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
686
e6b2f5ef
PA
6872017-11-21 Pedro Alves <palves@redhat.com>
688
689 * dwarf2read.c (mapped_index::find_name_components_bounds)
690 <completion mode, upper bound>: Use std::lower_bound instead of
691 std::upper_bound.
692 (test_mapped_index_find_name_component_bounds): Remove incorrect
693 "t1_fund" from expected symbols.
694
5c58de74
PA
6952017-11-21 Pedro Alves <palves@redhat.com>
696
697 * dwarf2read.c (mapped_index::name_components_casing): New field.
698 (mapped_index) <build_name_components,
699 find_name_components_bounds): Declare new methods.
700 (mapped_index::find_name_components_bounds)
701 (mapped_index::build_name_components): New methods, factored out
702 from dw2_expand_symtabs_matching_symbol.
703 (check_find_bounds_finds)
704 (test_mapped_index_find_name_component_bounds): New.
705 (run_test): Rename to ...
706 (test_dw2_expand_symtabs_matching_symbol): ... this.
707 (run_test): Reimplement.
708
e1ef7d7a
PA
7092017-11-21 Pedro Alves <palves@redhat.com>
710
711 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
712 (symbol_end): Use cp_ident_is_alnum.
713 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
714 * dwarf2read.c (make_sort_after_prefix_name): New function.
715 (dw2_expand_symtabs_matching_symbol): Use it.
716 (test_symbols): Add more symbols.
717 (run_test): Add tests.
718
cf724bc9
TT
7192017-11-17 Tom Tromey <tom@tromey.com>
720
721 * symtab.h (enum symbol_subclass_kind): New.
722 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
723 Remove.
724 <subclass>: New member.
725 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
726 * rust-lang.c (rust_get_trait_object_pointer): Update.
727 * dwarf2read.c (read_func_scope): Update.
728 (read_variable): Update.
729
68e745e3
TT
7302017-11-17 Tom Tromey <tom@tromey.com>
731
732 * dwarf2read.c (read_func_scope): Update.
733 * symtab.h (struct template_symbol): Derive from symbol.
734 <base>: Remove.
735
71a3c369
TT
7362017-11-17 Tom Tromey <tom@tromey.com>
737
738 * symtab.h (struct symbol) <is_rust_vtable>: New member.
739 (struct rust_vtable_symbol): New.
740 (find_symbol_at_address): Declare.
741 * symtab.c (find_symbol_at_address): New function.
742 * symfile.h (struct quick_symbol_functions)
743 <find_compunit_symtab_by_address>: New member.
744 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
745 function.
746 (debug_sym_quick_functions): Link to
747 debug_qf_find_compunit_symtab_by_address.
748 * rust-lang.c (rust_get_trait_object_pointer): New function.
749 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
750 rust_get_trait_object_pointer.
751 * psymtab.c (psym_relocate): Clear psymbol_map.
752 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
753 functions.
754 (psym_functions): Link to psym_find_compunit_symtab_by_address.
755 * objfiles.h (struct objfile) <psymbol_map>: New member.
756 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
757 (process_die) <DW_TAG_variable>: New case. Call read_variable.
758 (rust_containing_type, read_variable): New functions.
759
7468702d
SM
7602017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
761
762 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
763
37269bc9
SM
7642017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
765
766 * common/filestuff.c: Include <algorithm>.
767 (open_fds): Change type to std::vector<int>.
768 (do_mark_open_fd): Adjust.
769 (unmark_fd_no_cloexec): Adjust.
770 (do_close): Adjust.
771
5c632425
SM
7722017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
773
774 * breakpoint.c (output_thread_groups): Take an std::vector.
775 (print_one_breakpoint_location): Adjust.
776
ced9779b
JB
7772017-11-17 Joel Brobecker <brobecker@adacore.com>
778
779 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
780 (ada_evaluate_subexp_for_cast): New function.
781 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
782 ada_evaluate_subexp_for_cast.
783 (ada_evaluate_subexp) <nosideret>: Replace code by call to
784 eval_skip_value.
785 * eval.c (evaluate_var_value): Make non-static.
786 (evaluate_var_msym_value, eval_skip_value): Likewise.
787 * value.h (evaluate_var_value, evaluate_var_msym_value)
788 (eval_skip_value): Declare.
789
b7e22850
JB
7902017-11-16 Joel Brobecker <brobecker@adacore.com>
791
792 * ada-lang.c (ada_value_cast): Remove parameter "noside".
793 Update all callers.
794
9ccabccd
PA
7952017-11-16 Pedro Alves <palves@redhat.com>
796
797 * python/py-unwind.c (pyuw_sniffer): Translate
798 PyExc_KeyboardInterrupt to a GDB Quit exception.
799
d930703d
PA
8002017-11-16 Pedro Alves <palves@redhat.com>
801
802 * infrun.c (resume_cleanups): Delete.
803 (resume): No longer install a resume_cleanups cleanup nor call
804 QUIT.
805 (proceed): Pass the terminal to the inferior.
806 (keep_going_pass_signal): No longer install a resume_cleanups
807 cleanup.
808
38dc2859
PA
8092017-11-16 Pedro Alves <palves@redhat.com>
810
811 * inf-loop.c (inferior_event_handler): Don't swallow the exception
812 if the prompt is blocked.
813
688fca4f
PA
8142017-11-16 Pedro Alves <palves@redhat.com>
815
816 * breakpoint.c (insert_bp_location): Replace bp_err and
817 bp_err_message locals by a gdb_exception local.
818
e2c33ac7
PA
8192017-11-16 Pedro Alves <palves@redhat.com>
820
821 * inflow.c (scoped_ignore_sigttou): New class.
822 (child_terminal_ours_1, new_tty): Use it.
823
d7236961
UW
8242017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
825
826 * target-float.c (decimal_from_number): Add byte_order argument and
827 call match_endianness. Error if unknown floating-point type.
828 (decimal_to_number): Add byte_order argument and call match_endianness.
829 (decimal_from_longest): Update call. Do not call match_endianness.
830 (decimal_from_ulongest): Likewise.
831 (decimal_binop): Likewise.
832 (decimal_is_zero): Likewise.
833 (decimal_compare): Likewise.
834 (decimal_convert): Likewise.
835
d8ae99a7
PM
8362017-11-16 Phil Muldoon <pmuldoon@redhat.com>
837
838 * python/python.c (gdbpy_rbreak): New function.
839 * NEWS: Document Python rbreak feature.
840
c632b645
YQ
8412017-11-16 Yao Qi <yao.qi@linaro.org>
842
843 * features/tic6x-c62x.xml: Remove.
844 * features/tic6x-c64x.xml: Remove.
845 * features/tic6x-c64xp.xml: Remove.
846
a014b87a
JB
8472017-11-15 John Baldwin <jhb@FreeBSD.org>
848
849 * symtab.h: Include <array>.
850
94765011
JB
8512017-11-15 John Baldwin <jhb@FreeBSD.org>
852
853 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
854 (bsd_kvm_proc_cmd): Likewise.
855
625ad440
SM
8562017-11-15 Simon Marchi <simon.marchi@ericsson.com>
857
858 * tui/tui-win.c (window_name_completer): Replace VEC with
859 std::vector.
860
c0c11fa9
AC
8612017-11-15 Andrew Cagney <cagney@gnu.org>
862
863 * MAINTAINERS: Remove no-longer applicable entries.
864
34a7ebaf
AC
8652017-11-15 Andrew Cagney <cagney@gnu.org>
866
867 * MAINTAINERS: Move self to Past Maintainers.
868
5334ef39
YQ
8692017-11-15 Yao Qi <yao.qi@linaro.org>
870
871 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
872 * features/nios2-linux.c: Remove.
873 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
874 initialize_tdesc_nios2_linux.
875
a714b0d6
YQ
8762017-11-15 Yao Qi <yao.qi@linaro.org>
877
878 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
879 M68HC11_LAST_HARD_REG + 1.
880
92ffd475
PC
8812017-11-14 Paul Carroll <pcarroll@codesourcery.com>
882
883 PR gdb/22388
884 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
885 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
886 Return TARGET_XFER_EOF if size of returned data is 0.
887
07431908
SM
8882017-11-14 Simon Marchi <simon.marchi@ericsson.com>
889
890 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
891 memory-map-selftests.c.
892 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
893 * memory-map.c (memory_map_start_memory): Fix computation of hi
894 address.
895 * unittests/memory-map-selftests.c: New file.
896
31432a67
JB
8972017-11-09 Joel Brobecker <brobecker@adacore.com>
898
899 * ada-lang.c: Fix some typos in the general command documenting
900 how Ada expressions are being evaluated and how their result
901 is printed.
902
e793c052
TT
9032017-11-09 Tom Tromey <tom@tromey.com>
904
905 * psymtab.c (psymbol_hash): Do not hash string contents.
906 (psymbol_compare): Add comment.
907
7e8835c5
TT
9082017-11-09 Tom Tromey <tom@tromey.com>
909
910 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
911
286acbb5
JB
9122017-11-08 Joel Brobecker <brobecker@adacore.com>
913
914 * ada-exp.y (write_var_from_sym): Remove parameter
915 "orig_left_context". Update all callers.
916
b44ec619
SM
9172017-11-08 Simon Marchi <simon.marchi@ericsson.com>
918
919 * tracepoint.h (class collection_list) <stringify>: Return
920 std::vector<std::string>.
921 (encode_actions_rsp): Change parameters to
922 std::vector<std::string> *.
923 * tracepoint.c (collection_list::stringify): Return
924 std::vector<std::string> and adjust accordingly.
925 (encode_actions_rsp): Changee parameters to
926 std::vector<std::string> and adjust accordingly.
927 * remote.c (free_actions_list),
928 free_actions_list_cleanup_wrapper): Remove.
929 (remote_download_tracepoint): Adjust to std::vector.
930
2f4732b0
TT
9312017-11-08 Tom Tromey <tom@tromey.com>
932
933 * dwarf2read.c (symbolp): Remove typedef.
934 (read_func_scope): Use std::vector.
935 (process_structure_scope): Use std::vector.
936
f9d67a22
PA
9372017-11-08 Pedro Alves <palves@redhat.com>
938
939 * ada-lang.c (ada_make_symbol_completion_list): Use
940 completion_skip_symbol.
941 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
942 (symbol_is_function_or_method(symbol*)): New.
943 (add_symtab_completions): Add complete_symbol_mode parameter. Use
944 completion_skip_symbol.
945 (default_collect_symbol_completion_matches_break_on): Use
946 completion_skip_symbol. Pass down mode.
947 (collect_file_symbol_completion_matches): Pass down mode.
948 * symtab.h (symbol_is_function_or_method): New declarations.
949 (completion_skip_symbol): New template function.
950
56d87ef7
PA
9512017-11-08 Pedro Alves <palves@redhat.com>
952
953 * linespec.c (iterate_over_all_matching_symtabs): Add
954 search_domain parameter. Pass it down to expand_symtabs_matching.
955 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
956 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
957 search_domain.
958 (add_all_symbol_names_from_pspace): Add search_domain parameter.
959 Pass it down.
960 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
961 symbols.
962 (add_matching_symbols_to_info): Add search_domain parameter. Pass
963 it down.
964
1b026119
PA
9652017-11-08 Pedro Alves <palves@redhat.com>
966
967 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
968 text_len locals and don't pass them down.
969 * symtab.c (completion_list_add_name): Remove
970 sym_text/sym_text_len parameters and adjust.
971 (completion_list_add_symbol, completion_list_add_msymbol)
972 (completion_list_objc_symbol, completion_list_add_fields)
973 (add_symtab_completions): Likewise.
974 (default_collect_symbol_completion_matches_break_on)
975 (collect_file_symbol_completion_matches): Remove sym_text_len
976 local and don't pass it down.
977 * symtab.h (completion_list_add_name): Remove
978 sym_text/sym_text_len parameters.
979
c62446b1
PA
9802017-11-08 Pedro Alves <palves@redhat.com>
981
982 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
983 unittests/lookup_name_info-selftests.c.
984 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
985 * cp-support.c: Include "selftest.h".
986 (cp_remove_params_1): Rename from cp_remove_params. Add
987 'require_param' parameter, and handle it.
988 (cp_remove_params): Reimplement.
989 (cp_remove_params_if_any): New.
990 (selftests::quote): New.
991 (selftests::check_remove_params): New.
992 (selftests::test_cp_remove_params): New.
993 (_initialize_cp_support): Install
994 selftests::test_cp_remove_params.
995 * cp-support.h (cp_remove_params_if_any): Declare.
996 * dwarf2read.c :Include "selftest.h".
997 (dw2_expand_symtabs_matching_symbol): Use
998 lookup_name_info::make_ignore_params.
999 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1000 (selftests::dw2_expand_symtabs_matching::string_or_null)
1001 (selftests::dw2_expand_symtabs_matching::check_match)
1002 (selftests::dw2_expand_symtabs_matching::test_symbols)
1003 (selftests::dw2_expand_symtabs_matching::run_test): New.
1004 (_initialize_dwarf2_read): Register
1005 selftests::dw2_expand_symtabs_matching::run_test.
1006 * psymtab.c (psym_expand_symtabs_matching): Use
1007 lookup_name_info::make_ignore_params.
1008 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1009 If the lookup name wants to ignore parameters, strip them.
1010 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1011 code handling '('.
1012 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1013 (default_collect_symbol_completion_matches_break_on): Don't try to
1014 strip parameters.
1015 * symtab.h (lookup_name_info::lookup_name_info): Add
1016 'ignore_parameters' parameter.
1017 (lookup_name_info::ignore_parameters)
1018 (lookup_name_info::make_ignore_params): New methods.
1019 (lookup_name_info::m_ignore_parameters): New field.
1020 * unittests/lookup_name_info-selftests.c: New file.
1021
61920122
PA
10222017-11-08 Pedro Alves <palves@redhat.com>
1023
1024 * dwarf2read.c (dw2_expand_marked_cus)
1025 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1026 (dw2_expand_symtabs_matching): Move further below.
1027 (dw2_expand_marked_cus): Reindent.
1028
3f563c84
PA
10292017-11-08 Pedro Alves <palves@redhat.com>
1030
1031 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1032 (struct name_component): New.
1033 (mapped_index::name_components): New field.
1034 (mapped_index::symbol_name_at): New method.
1035 (dwarf2_read_index): Call mapped_index ctor.
1036 (dw2_map_matching_symbols): Add comment about name_components
1037 table.
1038 (dw2_expand_symtabs_matching): Factor part to...
1039 (dw2_expand_symtabs_matching_symbol): ... this new function.
1040 Build name components table, and lookup symbols in it before
1041 calling the name matcher.
1042 (dw2_expand_marked_cus): New, factored out from
1043 dw2_expand_symtabs_matching.
1044 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1045
b5ec771e
PA
10462017-11-08 Pedro Alves <palves@redhat.com>
1047
1048 * ada-lang.c (ada_encode): Rename to ..
1049 (ada_encode_1): ... this. Add throw_errors parameter and handle
1050 it.
1051 (ada_encode): Reimplement.
1052 (match_name): Delete, folded into full_name.
1053 (resolve_subexp): No longer pass the encoded name to
1054 ada_lookup_symbol_list.
1055 (should_use_wild_match): Delete.
1056 (name_match_type_from_name): New.
1057 (ada_lookup_simple_minsym): Use lookup_name_info and the
1058 language's symbol_name_matcher_ftype.
1059 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1060 (ada_add_block_renamings): Adjust to use lookup_name_info.
1061 (ada_lookup_name): New.
1062 (add_nonlocal_symbols, ada_add_all_symbols)
1063 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1064 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1065 (ada_name_for_lookup): Delete.
1066 (ada_lookup_encoded_symbol): Construct a verbatim name.
1067 (wild_match): Reverse sense of return type. Use bool.
1068 (full_match): Reverse sense of return type. Inline bits of old
1069 match_name here.
1070 (ada_add_block_symbols): Adjust to use lookup_name_info.
1071 (symbol_completion_match): Delete, folded into...
1072 (ada_lookup_name_info::matches): ... .this new method.
1073 (symbol_completion_add): Delete.
1074 (ada_collect_symbol_completion_matches): Add name_match_type
1075 parameter. Adjust to use lookup_name_info and
1076 completion_list_add_name.
1077 (get_var_value, ada_add_global_exceptions): Adjust to use
1078 lookup_name_info.
1079 (ada_get_symbol_name_cmp): Delete.
1080 (do_wild_match, do_full_match): New functions.
1081 (ada_lookup_name_info::ada_lookup_name_info): New method.
1082 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1083 functions.
1084 (ada_language_defn): Install ada_get_symbol_name_matcher.
1085 * ada-lex.l (processId): If name starts with '<', copy it
1086 verbatim.
1087 * block.c (block_iter_match_step, block_iter_match_first)
1088 (block_iter_match_next, block_lookup_symbol)
1089 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1090 lookup_name_info.
1091 * block.h (block_iter_match_first, block_iter_match_next)
1092 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1093 * c-lang.c (c_language_defn, cplus_language_defn)
1094 (asm_language_defn, minimal_language_defn): Adjust comments to
1095 refer to la_get_symbol_name_matcher.
1096 * completer.c (complete_files_symbols)
1097 (collect_explicit_location_matches, symbol_completer): Pass a
1098 symbol_name_match_type down.
1099 * completer.h (class completion_match, completion_match_result):
1100 New classes.
1101 (completion_tracker::reset_completion_match_result): New method.
1102 (completion_tracker::m_completion_match_result): New field.
1103 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1104 lookup_name_info.
1105 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1106 functions.
1107 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1108 * d-lang.c: Adjust comments to refer to
1109 la_get_symbol_name_matcher.
1110 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1111 Adjust to use lookup_name_info.
1112 (dict_iter_match_first, dict_iter_match_next)
1113 (iter_match_first_hashed, iter_match_next_hashed)
1114 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1115 with a lookup_name_info.
1116 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1117 Likewise.
1118 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1119 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1120 (gdb_index_symbol_name_matcher): New class.
1121 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1122 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1123 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1124 with a symbol_name_match_type.
1125 (f_language_defn): Adjust comments to refer to
1126 la_get_symbol_name_matcher.
1127 * go-lang.c (go_language_defn): Adjust comments to refer to
1128 la_get_symbol_name_matcher.
1129 * language.c (default_symbol_name_matcher)
1130 (language_get_symbol_name_matcher): New functions.
1131 (unknown_language_defn, auto_language_defn): Adjust comments to
1132 refer to la_get_symbol_name_matcher.
1133 * language.h (symbol_name_cmp_ftype): Delete.
1134 (language_defn) <la_collect_symbol_completion_matches>: Add match
1135 type parameter.
1136 <la_get_symbol_name_cmp>: Delete field.
1137 <la_get_symbol_name_matcher>: New field.
1138 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1139 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1140 Declare.
1141 * linespec.c (iterate_over_all_matching_symtabs)
1142 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1143 (find_methods): Add language parameter, and use lookup_name_info
1144 and the language's symbol_name_matcher_ftype.
1145 (linespec_complete_function): Adjust.
1146 (lookup_prefix_sym): Use lookup_name_info.
1147 (add_all_symbol_names_from_pspace): Adjust.
1148 (find_superclass_methods): Add language parameter and pass it
1149 down.
1150 (find_method): Pass symbol language down.
1151 (find_linespec_symbols): Don't demangle or Ada encode here.
1152 (search_minsyms_for_name): Add lookup_name_info parameter.
1153 (add_matching_symbols_to_info): Add name_match_type parameter.
1154 Use lookup_name_info.
1155 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1156 la_get_symbol_name_matcher.
1157 * minsyms.c: Include <algorithm>.
1158 (add_minsym_to_demangled_hash_table): Remove table parameter and
1159 add objfile parameter. Use search_name_hash, and add language to
1160 demangled languages vector.
1161 (struct found_minimal_symbols): New struct.
1162 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1163 New functions.
1164 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1165 input names here. Use lookup_name_info instead. Lookup up
1166 demangled names once for each language in the demangled names
1167 vector.
1168 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1169 demangled names once for each language in the demangled names
1170 vector.
1171 (build_minimal_symbol_hash_tables): Adjust.
1172 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1173 lookup_name_info.
1174 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1175 la_get_symbol_name_matcher.
1176 * objfiles.h: Include <vector>.
1177 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1178 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1179 la_get_symbol_name_matcher.
1180 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1181 la_get_symbol_name_matcher.
1182 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1183 (match_partial_symbol): Use symbol_name_match_type,
1184 lookup_name_info and psymbol_name_matches.
1185 (lookup_partial_symbol): Use lookup_name_info.
1186 (map_block): Use symbol_name_match_type and lookup_name_info.
1187 (psym_map_matching_symbols): Use symbol_name_match_type.
1188 (psymbol_name_matches): New.
1189 (recursively_search_psymtabs): Use lookup_name_info and
1190 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1191 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1192 'kind' parameter to 'domain'.
1193 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1194 la_get_symbol_name_matcher.
1195 * symfile-debug.c (debug_qf_map_matching_symbols)
1196 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1197 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1198 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1199 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1200 Adjust to use symbol_name_match_type.
1201 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1202 (expand_symtabs_matching): Adjust to use lookup_name_info.
1203 * symmisc.c (maintenance_expand_symtabs): Use
1204 lookup_name_info::match_any ().
1205 * symtab.c (symbol_matches_search_name): New.
1206 (eq_symbol_entry): Adjust to use lookup_name_info and the
1207 language's matcher.
1208 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1209 (lookup_name_info::match_any): New.
1210 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1211 (compare_symbol_name): Add language, lookup_name_info and
1212 completion_match_result parameters, and use them.
1213 (completion_list_add_name): Make extern. Add language and
1214 lookup_name_info parameters. Use them.
1215 (completion_list_add_symbol, completion_list_add_msymbol)
1216 (completion_list_objc_symbol): Add lookup_name_info parameters and
1217 adjust. Pass down language.
1218 (completion_list_add_fields): Add lookup_name_info parameters and
1219 adjust. Pass down language.
1220 (add_symtab_completions): Add lookup_name_info parameters and
1221 adjust.
1222 (default_collect_symbol_completion_matches_break_on): Add
1223 name_match_type parameter, and use it. Use lookup_name_info.
1224 (default_collect_symbol_completion_matches)
1225 (collect_symbol_completion_matches): Add name_match_type
1226 parameter, and pass it down.
1227 (collect_symbol_completion_matches_type): Adjust.
1228 (collect_file_symbol_completion_matches): Add name_match_type
1229 parameter, and use lookup_name_info.
1230 * symtab.h: Include <string> and "common/gdb_optional.h".
1231 (enum class symbol_name_match_type): New.
1232 (class ada_lookup_name_info): New.
1233 (struct demangle_for_lookup_info): New.
1234 (class lookup_name_info): New.
1235 (symbol_name_matcher_ftype): New.
1236 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1237 (symbol_matches_search_name): Declare.
1238 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1239 (default_collect_symbol_completion_matches)
1240 (collect_symbol_completion_matches)
1241 (collect_file_symbol_completion_matches): Add name_match_type
1242 parameter.
1243 (iterate_over_symbols): Use lookup_name_info.
1244 (completion_list_add_name): Declare.
1245 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1246 (strncmp_iw_with_mode): Now extern.
1247 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1248 (strncmp_iw_with_mode): Declare.
1249
5ffa0793
PA
12502017-11-08 Keith Seitz <keiths@redhat.com>
1251 Pedro Alves <palves@redhat.com>
1252
1253 * ada-lang.c (ada_language_defn): Install
1254 default_search_name_hash.
1255 * buildsym.c (struct buildsym_compunit): <language>: New field.
1256 (finish_block_internal): Pass language when creating dictionaries.
1257 (start_buildsym_compunit, start_symtab): New language parameters.
1258 Use them.
1259 (restart_symtab): Pass down compilation unit's language.
1260 * buildsym.h (enum language): Forward declare.
1261 (start_symtab): New 'language' parameter.
1262 * c-lang.c (c_language_defn, cplus_language_defn)
1263 (asm_language_defn, minimal_language_defn): Install
1264 default_search_name_hash.
1265 * coffread.c (coff_start_symtab): Adjust.
1266 * d-lang.c (d_language_defn): Install default_search_name_hash.
1267 * dbxread.c (struct symloc): Add 'pst_language' field.
1268 (PST_LANGUAGE): Define.
1269 (start_psymtab, read_ofile_symtab): Use it.
1270 (process_one_symbol): New 'language' parameter. Pass it down.
1271 * dictionary.c (struct dictionary) <language>: New field.
1272 (DICT_LANGUAGE): Define.
1273 (dict_create_hashed, dict_create_hashed_expandable)
1274 (dict_create_linear, dict_create_linear_expandable): New parameter
1275 'language'. Set the dictionary's language.
1276 (iter_match_first_hashed): Adjust to rename.
1277 (insert_symbol_hashed): Assert we don't see mismatching
1278 languages. Adjust to rename.
1279 (dict_hash): Rename to ...
1280 (default_search_name_hash): ... this and make extern.
1281 * dictionary.h (struct language_defn): Forward declare.
1282 (dict_create_hashed): New parameter 'language'.
1283 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1284 * f-lang.c (f_language_defn): Install default_search_name_hash.
1285 * go-lang.c (go_language_defn): Install default_search_name_hash.
1286 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1287 creation.
1288 * language.c (unknown_language_defn, auto_language_defn):
1289 * language.h (language_defn::la_search_name_hash): New field.
1290 (default_search_name_hash): Declare.
1291 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1292 * mdebugread.c (new_block): New parameter 'language'.
1293 * mdebugread.c (parse_symbol): Pass symbol language to block
1294 allocation.
1295 (psymtab_to_symtab_1): Pass down language.
1296 (new_symtab): Pass compunit's language to block allocation.
1297 * objc-lang.c (objc_language_defn): Install
1298 default_search_name_hash.
1299 * opencl-lang.c (opencl_language_defn):
1300 * p-lang.c (pascal_language_defn): Install
1301 default_search_name_hash.
1302 * rust-lang.c (rust_language_defn): Install
1303 default_search_name_hash.
1304 * stabsread.h (enum language): Forward declare.
1305 (process_one_symbol): Add 'language' parameter.
1306 * symtab.c (search_name_hash): New function.
1307 * symtab.h (search_name_hash): Declare.
1308 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1309
2a1dde5d
PA
13102017-11-08 Pedro Alves <palves@redhat.com>
1311
1312 * cp-name-parser.y (main): Don't initialize extra_chars.
1313
95a6b0a1
TT
13142017-11-07 Tom Tromey <tom@tromey.com>
1315
1316 * event-top.h (command_handler): Constify.
1317 * record-full.c (cmd_record_full_start): Update.
1318 * thread.c (thread_apply_all_command): Update.
1319 * printcmd.c (eval_command): Update.
1320 * mi/mi-main.c (mi_execute_cli_command): Update.
1321 (mi_execute_async_cli_command): Update.
1322 * tui/tui-stack.c (tui_update_command): Update.
1323 * cli/cli-interp.c (safe_execute_command): Constify.
1324 * record.c (record_start): Update.
1325 (record_start, record_stop, cmd_record_start): Update.
1326 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1327 (cmd_record_btrace_pt_start): Update.
1328 (cmd_record_btrace_start): Update.
1329 (cmd_record_btrace_start): Update.
1330 * reverse.c (exec_reverse_once): Update.
1331 * python/python.c (execute_gdb_command): Don't copy the command.
1332 * event-top.c (command_line_handler): Update.
1333 (command_handler): Constify.
1334 * defs.h (deprecated_call_command_hook): Constify.
1335 * cli/cli-script.h (execute_user_command): Constify.
1336 * cli/cli-script.c (execute_user_command): Constify.
1337 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1338 (enum command_control_type): Update.
1339 * main.c (catch_command_errors): Remove non-const overload.
1340 (catch_command_errors_ftype): Remove.
1341 * python/py-cmd.c (cmdpy_function): Constify.
1342 * guile/scm-cmd.c (cmdscm_function): Constify.
1343 * cli/cli-dump.c (call_dump_func): Constify.
1344 * cli/cli-decode.c (do_const_cfunc): Constify.
1345 (do_sfunc): Constify.
1346 (cmd_func): Constify.
1347 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1348 * top.h (execute_command): Constify.
1349 * top.c (execute_command): Constify.
1350 (execute_command_to_string): Constify.
1351 (deprecated_call_command_hook): Constify.
1352 * command.h (cmd_func): Constify.
1353 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1354
eb4c3f4a
TT
13552017-11-07 Tom Tromey <tom@tromey.com>
1356
1357 * ada-lang.c (catch_ada_exception_command): Constify.
1358 (catch_assert_command): Constify.
1359 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1360 (catch_rethrow_command): Constify.
1361 (catch_exception_command_1): Constify.
1362 * breakpoint.h (add_catch_command): Constify.
1363 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1364 (catch_syscall_split_args): Constify.
1365 * break-catch-sig.c (catch_signal_command): Constify.
1366 (catch_signal_split_args): Constify.
1367 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1368 cmd_const_sfunc_ftype.
1369 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1370 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1371 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1372 (add_setshow_string_cmd, struct cmd_list_element)
1373 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1374 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1375 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1376 Constify.
1377 (set_cmd_sfunc): Constify.
1378 (empty_sfunc): Constify.
1379 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1380 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1381 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1382 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1383 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1384 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1385 Constify.
1386 (set_cmd_sfunc): Constify.
1387 (cmd_sfunc_ftype): Remove.
1388 * compile/compile.c (set_compile_args): Constify.
1389 * infrun.c (set_disable_randomization): Constify.
1390 * infcmd.c (set_args_command, set_cwd_command): Constify.
1391 * breakpoint.c (set_condition_evaluation_mode): Constify.
1392 (add_catch_command): Constify.
1393 (catch_fork_command_1, catch_exec_command_1)
1394 (catch_load_command_1, catch_unload_command_1): Constify.
1395 (catch_load_or_unload): Constify.
1396 * guile/scm-param.c (pascm_set_func): Constify.
1397 (add_setshow_generic): Constify.
1398 * python/py-param.c (get_set_value): Constify.
1399 * top.h (set_verbose): Constify.
1400 * tui/tui-win.c (tui_set_var_cmd): Constify.
1401 * mi/mi-main.c (set_mi_async_command): Constify.
1402 * cli/cli-logging.c (set_logging_overwrite)
1403 (set_logging_redirect): Constify.
1404 * value.c (set_max_value_size): Constify.
1405 * valprint.c (set_input_radix, set_output_radix): Constify.
1406 * utils.c (set_width_command, set_height_command): Constify.
1407 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1408 * tracepoint.c (set_disconnected_tracing)
1409 (set_circular_trace_buffer, set_trace_buffer_size)
1410 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1411 * top.c (set_history_size_command, set_verbose, set_editing)
1412 (set_gdb_datadir, set_history_filename): Constify.
1413 * target.c (set_targetdebug, maint_set_target_async_command)
1414 (maint_set_target_non_stop_command, set_target_permissions)
1415 (set_write_memory_permission): Constify.
1416 (open_target): Constify.
1417 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1418 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1419 * symtab.c (set_symbol_cache_size_handler): Constify.
1420 * symfile.c (set_ext_lang_command): Constify.
1421 * symfile-debug.c (set_debug_symfile): Constify.
1422 * source.c (set_directories_command): Constify.
1423 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1424 * serial.c (set_parity): Constify.
1425 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1426 * remote.c (set_remote_exec_file, set_remotebreak)
1427 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1428 * record.c (set_record_insn_history_size)
1429 (set_record_call_history_size): Constify.
1430 * record-full.c (set_record_full_insn_max_num): Constify.
1431 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1432 * osabi.c (set_osabi): Constify.
1433 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1434 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1435 * maint.c (maintenance_set_profile_cmd): Constify.
1436 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1437 * language.c (set_language_command, set_range_command)
1438 (set_case_command): Constify.
1439 * infrun.c (set_non_stop, set_observer_mode)
1440 (set_stop_on_solib_events, set_schedlock_func)
1441 (set_exec_direction_func): Constify.
1442 * infcmd.c (set_inferior_tty_command): Constify.
1443 * disasm.c (set_disassembler_options_sfunc): Constify.
1444 * demangle.c (set_demangling_command): Constify.
1445 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1446 * cris-tdep.c (set_cris_version, set_cris_mode)
1447 (set_cris_dwarf2_cfi): Constify.
1448 * corefile.c (set_gnutarget_command): Constify.
1449 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1450 (set_target_wide_charset_sfunc): Constify.
1451 * breakpoint.c (update_dprintf_commands): Constify.
1452 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1453 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1454 (set_disassembly_style_sfunc): Constify.
1455 * arch-utils.c (set_endian, set_architecture): Constify.
1456 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1457 * agent.c (set_can_use_agent): Constify.
1458
5fed81ff
TT
14592017-11-07 Tom Tromey <tom@tromey.com>
1460
1461 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1462 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1463 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1464 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1465 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1466 (parse_int_arg, show_thread_default_detach_sc_cmd)
1467 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1468 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1469 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1470 (show_task_pause_cmd, set_task_detach_sc_cmd)
1471 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1472 (set_noninvasive_cmd, set_thread_pause_cmd)
1473 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1474 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1475 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1476 * windows-nat.c (display_selectors): Constify.
1477 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1478 non-const "cfunc".
1479 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1480 (cmd_cfunc_eq): Likewise.
1481 (struct cmd_list_element): Likewise.
1482 (do_cfunc): Remove.
1483 (cli_user_command_p): Update.
1484 * command.h (add_cmd): Remove non-const overload.
1485 (cmd_cfunc_ftype): Remove typedef.
1486 (cmd_cfunc_eq): Remove non-const overload.
1487 * value.c (show_values): Constify.
1488 * thread.c (thread_apply_all_command): Constify.
1489 * symfile.c (load_command): Constify.
1490 * source.c (directory_command): Constify.
1491 * maint.c (maintenance_internal_error)
1492 (maintenance_demangler_warning, maintenance_space_display)
1493 (maintenance_print_architecture, maintenance_translate_address)
1494 (maintenance_info_selftests, maintenance_internal_warning):
1495 Constify.
1496 * breakpoint.c (disable_trace_command, enable_trace_command):
1497 Constify.
1498 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1499 Constify.
1500 (add_auto_load_safe_path): Constify.
1501 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1502 * top.h (show_commands): Constify.
1503 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1504 * sparc64-tdep.c (adi_examine_command): Constify.
1505 (adi_assign_command): Constify.
1506
1d12d88f
TT
15072017-11-07 Tom Tromey <tom@tromey.com>
1508
1509 * frame.h (info_locals_command, info_args_command): Constify.
1510 * auto-load.h (auto_load_info_scripts): Constify.
1511 * inferior.h (registers_info): Constify.
1512 * copying.c: Rebuild.
1513 * copying.awk: Constify generated commands.
1514 * auto-load.c (auto_load_info_scripts)
1515 (info_auto_load_gdb_scripts): Constify.
1516 * cli/cli-decode.c (struct cmd_list_element): Take a
1517 cmd_const_cfunc_ftype.
1518 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1519 * tui/tui-win.c (tui_all_windows_info): Constify.
1520 * python/py-auto-load.c (info_auto_load_python_scripts):
1521 Constify.
1522 * cli/cli-cmds.c (show_command): Remove non-const overload.
1523 * tracepoint.c (info_tvariables_command, info_scope_command):
1524 Constify.
1525 (info_static_tracepoint_markers_command): Constify.
1526 * thread.c (info_threads_command): Constify.
1527 (print_thread_info_1): Constify.
1528 * target.c (info_target_command): Constify.
1529 * symtab.c (info_sources_command, info_functions_command)
1530 (info_types_command): Constify.
1531 (info_variables_command): Remove non-const overload.
1532 * symfile.c (info_ext_lang_command): Constify.
1533 * stack.c (info_frame_command, info_locals_command)
1534 (info_args_command): Constify.
1535 (backtrace_command): Remove non-const overload.
1536 * source.c (info_source_command, info_line_command): Constify.
1537 * solib.c (info_sharedlibrary_command): Constify.
1538 * skip.c (info_skip_command): Constify.
1539 * ser-go32.c (info_serial_command): Constify.
1540 * reverse.c (info_bookmarks_command): Constify.
1541 * printcmd.c (info_symbol_command, info_address_command)
1542 (info_display_command): Constify.
1543 * osdata.c (info_osdata_command): Constify.
1544 * objc-lang.c (info_selectors_command, info_classes_command):
1545 Constify.
1546 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1547 * memattr.c (info_mem_command): Constify.
1548 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1549 * linux-fork.c (info_checkpoints_command): Constify.
1550 * infrun.c (info_signals_command): Constify.
1551 * inflow.c (info_terminal_command): Constify.
1552 * inferior.c (info_inferiors_command): Constify.
1553 (print_inferior): Constify.
1554 * infcmd.c (info_program_command, info_all_registers_command)
1555 (info_registers_command, info_vector_command)
1556 (info_float_command): Constify.
1557 (registers_info): Constify.
1558 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1559 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1560 Constify.
1561 * f-valprint.c (info_common_command): Constify.
1562 * dcache.c (info_dcache_command): Constify.
1563 (dcache_info_1): Constify.
1564 * darwin-nat-info.c (info_mach_tasks_command)
1565 (info_mach_task_command, info_mach_ports_command)
1566 (info_mach_port_command, info_mach_threads_command)
1567 (info_mach_thread_command, info_mach_regions_command)
1568 (info_mach_regions_recurse_command, info_mach_region_command)
1569 (info_mach_exceptions_command): Constify.
1570 (get_task_from_args): Constify.
1571 * cp-support.c (info_vtbl_command): Constify.
1572 * breakpoint.c (info_watchpoints_command)
1573 (info_tracepoints_command): Constify.
1574 (info_breakpoints_command): Remove non-const overload.
1575 * avr-tdep.c (avr_io_reg_read_command): Constify.
1576 * auxv.c (info_auxv_command): Constify.
1577 * ada-tasks.c (info_tasks_command): Constify.
1578 (info_task): Constify.
1579 * ada-lang.c (info_exceptions_command): Constify.
1580
0b39b52e
TT
15812017-11-07 Tom Tromey <tom@tromey.com>
1582
1583 * solib.h (no_shared_libraries): Constify.
1584 * frame.h (return_command): Constify.
1585 * cli/cli-cmds.h (quit_command): Constify.
1586 * top.h (quit_command, execute_command): Constify.
1587 * target.h (flash_erase_command): Constify.
1588 * inferior.h (set_inferior_args, attach_command): Constify.
1589 * tracepoint.h (start_tracing, stop_tracing): Constify.
1590 * breakpoint.h (break_command, tbreak_command)
1591 (hbreak_command_wrapper, thbreak_command_wrapper)
1592 (rbreak_command_wrapper, watch_command_wrapper)
1593 (awatch_command_wrapper, rwatch_command_wrapper)
1594 (get_tracepoint_by_number): Constify.
1595 * symtab.c (info_variables_command, rbreak_command)
1596 (symtab_symbol_info): Constify.
1597 (info_variables_command): Add non-const overload.
1598 * top.c (dont_repeat_command): Constify.
1599 * breakpoint.c (ignore_command, commands_command)
1600 (condition_command, tbreak_command, hbreak_command)
1601 (thbreak_command, clear_command, break_command)
1602 (info_breakpoints_command, watch_command, rwatch_command)
1603 (awatch_command, trace_command, ftrace_command, strace_command)
1604 (trace_pass_command, break_range_command, dprintf_command)
1605 (agent_printf_command, get_tracepoint_by_number)
1606 (watch_maybe_just_location, trace_pass_command): Constify.
1607 (info_breakpoints_command): Add non-const overload.
1608 * tracefile.c (tsave_command): Constify.
1609 * infcmd.c (attach_command, disconnect_command, signal_command)
1610 (queue_signal_command, stepi_command, nexti_command)
1611 (finish_command, next_command, step_command, until_command)
1612 (advance_command, jump_command, continue_command, run_command)
1613 (start_command, starti_command, interrupt_command)
1614 (run_command_1, set_inferior_args, step_1): Constify.
1615 * inferior.c (add_inferior_command, remove_inferior_command)
1616 (clone_inferior_command): Constify.
1617 * linux-fork.c (checkpoint_command, restart_command): Constify.
1618 * windows-nat.c (signal_event_command): Constify.
1619 * guile/guile.c (guile_repl_command, guile_command): Constify.
1620 * printcmd.c (x_command, display_command, printf_command)
1621 (output_command, set_command, call_command, print_command)
1622 (eval_command): Constify.
1623 (non_const_set_command): Remove.
1624 (_initialize_printcmd): Update.
1625 * source.c (forward_search_command, reverse_search_command):
1626 Constify.
1627 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1628 Constify.
1629 * infrun.c (handle_command): Constify.
1630 * memattr.c (mem_command): Constify.
1631 * stack.c (return_command, up_command, up_silently_command)
1632 (down_command, down_silently_command, frame_command)
1633 (backtrace_command, func_command, backtrace_command_1): Constify.
1634 (backtrace_command): Add non-const overload.
1635 * remote-sim.c (simulator_command): Constify.
1636 * exec.c (set_section_command): Constify.
1637 * tracepoint.c (tdump_command, trace_variable_command)
1638 (tstatus_command, tstop_command, tstart_command)
1639 (end_actions_pseudocommand, while_stepping_pseudocommand)
1640 (collect_pseudocommand, teval_pseudocommand, actions_command)
1641 (start_tracing, stop_tracing): Constify.
1642 * value.c (init_if_undefined_command): Constify.
1643 * tui/tui-stack.c (tui_update_command): Constify.
1644 * tui/tui-win.c (tui_refresh_all_command)
1645 (tui_set_tab_width_command, tui_set_win_height_command)
1646 (tui_set_focus_command, tui_scroll_forward_command)
1647 (tui_scroll_backward_command, tui_scroll_left_command)
1648 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1649 (tui_set_win_height): Constify.
1650 * tui/tui-layout.c (tui_layout_command): Constify.
1651 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1652 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1653 (proc_untrace_sysexit_cmd): Constify.
1654 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1655 (threadset_test_cmd, threadlist_update_test_cmd)
1656 (threadalive_test): Constify.
1657 * objc-lang.c (print_object_command): Constify.
1658 * command.h (add_com): Constify.
1659 * cli/cli-dump.c (restore_command): Constify.
1660 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1661 (help_command, complete_command, shell_command, edit_command)
1662 (list_command, disassemble_command, make_command)
1663 (apropos_command, alias_command): Constify.
1664 * cli/cli-script.c (document_command, define_command)
1665 (while_command, if_command, validate_comname): Constify.
1666 * cli/cli-decode.c (struct cmd_list_element): Change type of
1667 "fun".
1668 * target.c (do_monitor_command, flash_erase_command): Constify.
1669 * regcache.c (reg_flush_command): Constify.
1670 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1671 (reverse_nexti, reverse_continue, reverse_finish)
1672 (save_bookmark_command, goto_bookmark_command)
1673 (exec_reverse_once): Constify.
1674 * python/python.c (python_interactive_command, python_command):
1675 Constify.
1676 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1677 Constify.
1678 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1679 * gcore.c (gcore_command): Constify.
1680
85c4be7c
TT
16812017-11-07 Tom Tromey <tom@tromey.com>
1682
1683 * printcmd.c (x_command): Call set_repeat_arguments.
1684 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1685 * top.c (repeat_arguments): New global.
1686 (set_repeat_arguments): New function.
1687 (execute_command): Handle repeat_arguments.
1688 (show_commands): Calls set_repeat_arguments.
1689 * command.h (set_repeat_arguments): Declare.
1690
022643b4
TT
16912017-11-07 Tom Tromey <tom@tromey.com>
1692
1693 * stack.c (backtrace_command): Use std::string.
1694 (backtrace_command_1): Make "count_exp" const.
1695
5614fb77
TT
16962017-11-07 Tom Tromey <tom@tromey.com>
1697
1698 * source.c (directory_switch, mod_path, add_path): Constify.
1699 * defs.h (add_path, mod_path, directory_switch): Constify.
1700 * mi/mi-cmd-env.c (env_mod_path): Constify.
1701
6be9a197
TT
17022017-11-07 Tom Tromey <tom@tromey.com>
1703
1704 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1705 (run_command_1, continue_command, step_1, jump_command)
1706 (signal_command, until_command, advance_command, finish_command)
1707 (attach_command): Update.
1708
c2252c0d
TT
17092017-11-07 Tom Tromey <tom@tromey.com>
1710
1711 * command.h (set_cmd_cfunc): Don't declare.
1712 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1713
1ee870c5
TT
17142017-11-07 Tom Tromey <tom@tromey.com>
1715
1716 * stack.c (select_frame_command): Constify.
1717 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1718 * command.h (add_com_suppress_notification): Constify.
1719
ee7ddd71
TT
17202017-11-07 Tom Tromey <tom@tromey.com>
1721
1722 * breakpoint.c (stop_command): Constify.
1723 * cli/cli-decode.c (struct cmd_list_element): Constify.
1724 * command.h (add_abbrev_prefix_cmd): Constify.
1725
95e95a6d
PA
17262017-11-07 Pedro Alves <palves@redhat.com>
1727
1728 * breakpoint.c (extract_bp_kind): New enum.
1729 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1730 factored out from ...
1731 (extract_bp_number_and_location): ... here.
1732 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1733
cc638e86
PA
17342017-11-07 Pedro Alves <palves@redhat.com>
1735
1736 * breakpoint.c (extract_bp_number_and_location): Change return
1737 type to void. Throw error instead of warning.
1738 (enable_disable_command): Adjust.
1739
d0fe4701
XR
17402017-11-07 Xavier Roirand <roirand@adacore.com>
1741 Pedro Alves <palves@redhat.com>
1742
1743 * breakpoint.c (map_breakpoint_number_range): New, factored out
1744 from ...
1745 (map_breakpoint_numbers): ... here.
1746 (find_location_by_number): Change parameters from string to
1747 breakpoint number and location.
1748 (extract_bp_number_and_location): New function.
1749 (enable_disable_bp_num_loc)
1750 (enable_disable_breakpoint_location_range)
1751 (enable_disable_command): New functions, factored out ...
1752 (enable_command, disable_command): ... these functions, and
1753 adjusted to support ranges.
1754 * NEWS: Document enable/disable breakpoint location range feature.
1755
635dc5b2
LM
17562017-11-06 Luis Machado <luis.machado@linaro.org>
1757
1758 * MAINTAINERS (Write After Approval): Update my e-mail address.
1759
556e5da5
PA
17602017-11-06 Pedro Alves <palves@redhat.com>
1761
1762 * gnu-nat.c (gnu_terminal_init): Delete.
1763 (gnu_target): Don't install gnu_terminal_init.
1764 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1765 (child_terminal_init): ... this function.
1766
d1928160
PA
17672017-11-06 Pedro Alves <palves@redhat.com>
1768
1769 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1770 sgtty.h.
1771 * config.in, configure: Regenerate.
1772
6aa899ce
PA
17732017-11-06 Pedro Alves <palves@redhat.com>
1774
1775 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1776 (async_init_signals): Adjust.
1777 (handle_stop_sig): Rename to ...
1778 (handle_sigtstp): ... this.
1779 (async_stop_sig): Rename to ...
1780 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1781 SIGTSTP path.
1782 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1783 instead of STOP_SIGNAL thoughout.
1784 (handle_stop_sig): Rename to ...
1785 (handle_sigtstp): ... this.
1786 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1787
a94799ac
PA
17882017-11-06 Pedro Alves <palves@redhat.com>
1789
1790 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1791 longer set flags twice in row.
1792
726e1356
PA
17932017-11-06 Pedro Alves <palves@redhat.com>
1794
1795 * Makefile.in (SER_HARDWIRE): Update comment.
1796 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1797 * common/gdb_termios.h: Delete file.
1798 * common/job-control.c: Include termios.h and unistd.h instead of
1799 gdb_termios.h.
1800 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1801 check.
1802 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1803 Remove sgtty code.
1804 * configure.ac: No longer check for termio.h and sgtty.h.
1805 * configure: Regenerate.
1806 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1807 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1808 Replace PROCESS_GROUP_TYPE references with pid_t references
1809 throughout.
1810 (gdb_getpgrp): Delete.
1811 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1812 (child_terminal_inferior): Remove comment. Remove sgtty code.
1813 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1814 gdb_getpgrp. Use serial_set_tty_state instead aof
1815 serial_noflush_set_tty_state. Remove sgtty code.
1816 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1817 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1818 (inferior_process_group): Now returns pid_t.
1819 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1820 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1821 * ser-event.c (serial_event_ops): Update.
1822 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1823 (dos_ops): Update.
1824 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1825 * ser-pipe.c (pipe_ops): Update.
1826 * ser-tcp.c (tcp_ops): Update.
1827 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1828 HAVE_TERMIOS checks.
1829 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1830 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1831 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1832 assume termios.
1833 (hardwire_noflush_set_tty_state): Delete.
1834 (hardwire_print_tty_state, hardwire_drain_output)
1835 (hardwire_flush_output, hardwire_flush_input)
1836 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1837 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1838 code, and assume termios.
1839 (hardwire_ops): Update.
1840 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1841 * serial.c (serial_noflush_set_tty_state): Delete.
1842 * serial.h (serial_noflush_set_tty_state): Delete.
1843 (serial_ops::noflush_set_tty_state): Delete.
1844
1cfb73db
UW
18452017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1846
1847 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1848 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1849 (COMMON_OBS): Remove doublest.o and dfp.o.
1850 Do not build target-float.c (instead of doublest.c)
1851 with -Wformat-nonliteral.
1852
1853 * doublest.c: Remove file.
1854 * doublest.h: Remove file.
1855 * dfp.c: Remove file.
1856 * dfp.h: Remove file.
1857
1858 * target-float.c: Do not include "doublest.h" and "dfp.h".
1859 (DOUBLEST): Move here from doublest.h.
1860 (enum float_kind): Likewise.
1861 (FLOATFORMAT_CHAR_BIT): Likewise.
1862 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1863 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1864 (floatformat_precision): Likewise.
1865 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1866 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1867 Likewise.
1868 (host_float_format, host_double_format, host_long_double_format):
1869 Likewise.
1870 (floatformat_to_string, floatformat_from_string): Likewise.
1871 (floatformat_to_doublest): Likewise. Also, inline the original
1872 convert_floatformat_to_doublest.
1873 (floatformat_from_doublest): Likewise. Also, inline the original
1874 convert_floatformat_from_doublest.
1875
1876 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1877 (MAX_DECIMAL_STRING): Move here from dfp.c.
1878 (match_endianness): Likewise.
1879 (set_decnumber_context, decimal_check_errors): Likewise.
1880 (decimal_from_number, decimal_to_number): Likewise.
1881 (decimal_to_string, decimal_from_string): Likewise. Make static.
1882 (decimal_from_longest, decimal_from_ulongest): Likewise.
1883 (decimal_to_longest): Likewise.
1884 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1885 (decimal_convert): Likewise.
1886
b07e9c46
UW
18872017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1888
1889 * doublest.c: Do not include "gdbtypes.h".
1890 (extract_typed_floating): Remove.
1891 (store_typed_floating): Remove.
1892 (convert_typed_floating): Remove.
1893 * doublest.h (struct type): Remove.
1894 (DOUBLEST_PRINT_FORMAT): Remove.
1895 (DOUBLEST_SCAN_FORMAT): Remove.
1896 (extract_typed_floating): Remove.
1897 (store_typed_floating): Remove.
1898 (convert_typed_floating): Remove.
1899
1900 * dfp.c (decimal_from_doublest): Remove.
1901 (decimal_to_doublest): Remove.
1902 * dfp.h: Do not include "doublest.h".
1903 (decimal_from_doublest): Remove.
1904 (decimal_to_doublest): Remove.
1905
1906 * value.c: Do not include "doublest.h" and "dfp.h".
1907 (value_as_double): Remove.
1908 (unpack_double): Remove.
1909 (value_from_double): Remove.
1910 (value_from_decfloat): Remove.
1911 * value.h: Do not include "doublest.h".
1912 (value_as_double): Remove.
1913 (unpack_double): Remove.
1914 (value_from_double): Remove.
1915 (value_from_decfloat): Remove.
1916
3b2ca824
UW
19172017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1918
1919 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1920 (i386_extract_return_value): Use target_float_convert.
1921 (i386_store_return_value): Likewise.
1922 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1923 (i387_value_to_register): Likewise.
1924 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1925 (ia64_register_to_value): Use target_float_convert.
1926 (ia64_value_to_register): Likewise.
1927 (ia64_extract_return_value): Likewise.
1928 (ia64_store_return_value): Likewise.
1929 (ia64_push_dummy_call): Likewise.
1930 * m68k-tdep.c: Include "target-float.h".
1931 (m68k_register_to_value): Use target_float_convert.
1932 (m68k_value_to_register): Likewise.
1933 (m68k_svr4_extract_return_value): Likewise.
1934 (m68k_svr4_store_return_value): Likewise.
1935 * ppc-sysv-tdep.c: Include "target-float.h".
1936 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1937 (do_ppc_sysv_return_value): Likewise.
1938 (ppc64_sysv_abi_push_freg): Likewise.
1939 (ppc64_sysv_abi_return_value_base): Likewise.
1940 * rs6000-aix-tdep.c: Include "target-float.h".
1941 (rs6000_push_dummy_call): Use target_float_convert.
1942 (rs6000_return_value): Likewise.
1943 * rs6000-lynx178-tdep.c: Include "target-float.h".
1944 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1945 (rs6000_lynx178_return_value): Likewise.
1946 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1947 (rs6000_register_to_value): Use target_float_convert.
1948 (rs6000_value_to_register): Likewise.
1949 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1950 (arm_extract_return_value): Use target_float_convert.
1951 (arm_store_return_value): Likewise.
1952 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1953 (sh_register_convert_to_virtual): Use target_float_convert.
1954 (sh_register_convert_to_raw): Likewise.
1955 * sh64-tdep.c: Include "target-float.h".
1956 (sh64_extract_return_value): Use target_float_convert.
1957 (sh64_register_convert_to_virtual): Likewise.
1958 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1959
14ad9311
UW
19602017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1961
1962 * target-float.c (floatformat_to_host_double): New function.
1963 (floatformat_from_host_double): Likewise.
1964 (target_float_to_host_double): Likewise.
1965 (target_float_from_host_double): Likewise.
1966 * target-float.h (target_float_to_host_double): Add prototype.
1967 (target_float_from_host_double): Likewise.
1968
1969 * guile/scm-value.c: Include "target-float.h".
1970 (gdbscm_value_to_real): Use target_float_to_host_double.
1971 Handle integer source values via value_as_long.
1972 * guile/scm-math.c: Include "target-float.h". Do not include
1973 "doublest.h", "dfp.h", and "expression.h".
1974 (vlscm_convert_typed_number): Use target_float_from_host_double.
1975 (vlscm_convert_number): Likewise.
1976
1977 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1978 (convert_value_from_python): Use target_float_from_host_double.
1979
50eff16b
UW
19802017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1981
1982 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1983 (cast_from_fixed): Likewise.
1984 (ada_scaling_type): New function.
1985 (ada_delta): Return value instead of DOUBLEST. Perform target
1986 arithmetic instead of host arithmetic.
1987 (scaling_factor): Rename to ...
1988 (ada_scaling_factor) ... this. Make non-static. Return value instead
1989 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1990 (ada_fixed_to_float): Remove.
1991 (ada_float_to_fixed): Remove.
1992 * ada-lang.h (ada_fixed_to_float): Remove.
1993 (ada_float_to_fixed): Remove.
1994 (ada_delta): Return value instead of DOUBLEST.
1995 (ada_scaling_factor): Add prototype.
1996
1997 * ada-typeprint.c: Include "target-float.h".
1998 (print_fixed_point_type): Perform target arithmetic instead of
1999 host arithmetic.
2000 * ada-valprint.c: Include "target-float.h".
2001 (ada_val_print_num): Perform target arithmetic instead of
2002 host arithmetic for fixed-point types.
2003
66c02b9e
UW
20042017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2005
2006 * target-float.c: Include <math.h>.
2007 (floatformat_binop): New function.
2008 (floatformat_compare): Likewise.
2009 (target_float_binop): Likewise.
2010 (target_float_compare): Likewise.
2011 * target-float.h: Include "expression.h".
2012 (target_float_binop): Add prototype.
2013 (target_float_compare): Likewise.
2014
2015 * valarith.c: Do not include "doublest.h" and "dfp.h".
2016 Include "common/byte-vector.h".
2017 (value_args_as_decimal): Remove, replace by ...
2018 (value_args_as_target_float): ... this function. Handle both
2019 binary and decimal target floating-point formats.
2020 (scalar_binop): Handle both binary and decimal FP using
2021 value_args_as_target_float and target_float_binop.
2022 (value_equal): Handle both binary and decimal FP using
2023 value_args_as_target_float and target_float_compare.
2024 (value_less): Likewise.
2025 (value_pos): Handle all scalar types as simple copy.
2026 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2027 * dfp.c (decimal_binop): Throw error instead of internal_error
2028 when called with an unsupported operation code.
2029
f69fdf9b
UW
20302017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2031
2032 * target-float.c (target_float_to_string): New function.
2033 (target_float_from_string): New function.
2034 * target-float.h (target_float_to_string): Add prototype.
2035 (target_float_from_string): Add prototype.
2036
2037 * valprint.c: Include "target-float.h". Do not include
2038 "doublest.h" and "dfp.h".
2039 (print_floating): Use target_float_to_string.
2040 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2041 (printf_floating): Use target_float_to_string.
2042 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2043 (print_i387_value): Use target_float_to_string.
2044 * mips-tdep.c: Include "target-float.h".
2045 (mips_print_fp_register): Use target_float_to_string.
2046 * sh64-tdep.c: Include "target-float.h".
2047 (sh64_do_fp_register): Use target_float_to_string.
2048
2049 * parse.c: Include "target-float.h". Do not include
2050 "doublest.h" and "dfp.h".
2051 (parse_float): Use target_float_from_string.
2052 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2053 (define_symbol): Use target_float_from_string.
2054 * gdbarch-selftests.c: Include "target-float.h".
2055 (register_to_value_test): Use target_float_from_string.
2056
70100014
UW
20572017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2058
2059 * Makefile.c (SFILES): Add target-float.c.
2060 (HFILES_NO_SRCDIR): Add target-float.h.
2061 (COMMON_OBS): Add target-float.o.
2062 * target-float.h: New file.
2063 * target-float.c: New file.
2064
2065 * doublest.c (floatformat_classify): Fix detection of float_zero.
2066
2067 * gdbtypes.c (is_floating_type): New function.
2068 * gdbtypes.h (is_floating_type): Add prototype.
2069
2070 * value.c: Do not include "floatformat.h".
2071 (unpack_double): Use target_float_is_valid.
2072 (is_floating_value): New function.
2073 * value.h (is_floating_value): Add prototype-
2074
2075 * valarith.c: Include "target-float.h".
2076 (value_logical_not): Use target_float_is_zero.
2077
2078 * python/py-value.c: Include "target-float.h".
2079 (valpy_nonzero): Use target_float_is_zero.
2080
ab4b1c46
TT
20812017-11-04 Tom Tromey <tom@tromey.com>
2082
2083 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2084
454dafbd
TT
20852017-11-04 Tom Tromey <tom@tromey.com>
2086
2087 * breakpoint.c (set_momentary_breakpoint): Return
2088 breakpoint_up.
2089 (until_break_command): Update.
2090 (new_until_break_fsm): Change argument types to
2091 breakpoint_up.
2092 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2093 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2094 Remove.
2095 * infcmd.c (finish_forward): Update.
2096 * breakpoint.h (set_momentary_breakpoint)
2097 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2098 (make_cleanup_delete_breakpoint): Remove.
2099 (struct breakpoint_deleter): New.
2100 (breakpoint_up): New typedef.
2101 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2102 (insert_exception_resume_breakpoint): Update.
2103 (insert_exception_resume_from_probe): Update.
2104 (insert_longjmp_resume_breakpoint): Update.
2105 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2106 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2107 * infcall.c (call_function_by_hand_dummy): Update
2108
331b71e5
TT
21092017-11-04 Tom Tromey <tom@tromey.com>
2110
2111 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2112
9f584b37
TT
21132017-11-04 Tom Tromey <tom@tromey.com>
2114
2115 * linux-tdep.c (linux_core_info_proc_mappings): Use
2116 gdb::def_vector.
2117 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2118 "size" argument.
2119 (linux_corefile_thread): Update.
2120 (linux_make_corefile_notes): Remove unused variable.
2121
779bc38e
TT
21222017-11-04 Tom Tromey <tom@tromey.com>
2123
2124 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2125 gdb::byte_vector.
2126
ed2b3126
TT
21272017-11-04 Tom Tromey <tom@tromey.com>
2128
2129 * objfiles.c (do_free_objfile_cleanup): Remove.
2130 * compile/compile-object-load.c (compile_object_load): Update.
2131 * objfiles.h (make_cleanup_free_objfile): Remove.
2132
7f6743fd
TT
21332017-11-04 Tom Tromey <tom@tromey.com>
2134
2135 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2136 (adi_read_versions): Change "tags" to "gdb_byte *".
2137 (adi_print_versions): Likewise.
2138
c80049d3
TT
21392017-11-04 Tom Tromey <tom@tromey.com>
2140
2141 * breakpoint.c
2142 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2143 from start_rbreak_breakpoints.
2144 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2145 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2146 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2147 * symtab.c (do_end_rbreak_breakpoints): Remove.
2148 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2149
167b0be1
TT
21502017-11-04 Tom Tromey <tom@tromey.com>
2151
2152 * cp-namespace.c (reset_directive_searched): Remove.
2153 (cp_lookup_symbol_via_imports): Use scoped_restore.
2154 * cp-support.c (reset_directive_searched): Remove.
2155 (make_symbol_overload_list_using): Use scoped_restore.
2156 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2157 (reset_directive_searched): Remove.
2158
5eae7aea
TT
21592017-11-04 Tom Tromey <tom@tromey.com>
2160
2161 * symfile.c (find_separate_debug_file_by_debuglink): Use
2162 unique_xmalloc_ptr.
2163
c6bcad5f
TT
21642017-11-04 Tom Tromey <tom@tromey.com>
2165
2166 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2167 type of "info".
2168 (compute_stack_depth): Likewise.
2169 (do_compile_dwarf_expr_to_c): Use std::vector.
2170
20dcd8ca
TT
21712017-11-04 Tom Tromey <tom@tromey.com>
2172
2173 * compile/compile-object-load.c (link_callbacks_einfo): Use
2174 std::string.
2175
33c7c59d
TT
21762017-11-04 Tom Tromey <tom@tromey.com>
2177
2178 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2179 Use scoped_free_pendings.
2180 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2181 scoped_free_pendings.
2182 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2183 (xcoff_initial_scan): Likewise.
2184 * buildsym.c (reset_symtab_globals): Update comment.
2185 (scoped_free_pendings): Rename from really_free_pendings.
2186 (prepare_for_building): Update comment.
2187 (buildsym_init): Likewise.
2188 * buildsym.h (class scoped_free_pendings): New class.
2189 (really_free_pendings): Don't declare.
2190
67fa57cf
UW
21912017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2192
2193 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2194 output when converting a zero value to a special byteorder format.
2195
f26ae15b
YQ
21962017-11-02 Yao Qi <yao.qi@linaro.org>
2197
2198 * frame.c (do_frame_register_read): Remove aspace.
2199 * jit.c (jit_frame_sniffer): Likwise.
2200 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2201 * regcache.c (regcache::regcache): Pass nullptr.
2202 (regcache_print): Caller updated.
2203 * regcache.h (regcache::regcache): Remove one constructor
2204 parameter aspace.
2205
6c6e9412
YQ
22062017-11-02 Yao Qi <yao.qi@linaro.org>
2207
2208 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2209
8b86c959
YQ
22102017-11-02 Yao Qi <yao.qi@linaro.org>
2211
2212 * breakpoint.c (insert_single_step_breakpoints): Update.
2213 * frame.c (struct frame_info) <aspace>: Add const.
2214 (frame_save_as_regcache): Add const.
2215 (get_frame_address_space): Return const address_space *.
2216 * frame.h (get_frame_address_space): Update declaration.
2217 * infrun.c (struct step_over_info) <aspace>: Add const.
2218 (set_step_over_info): Make aspace const.
2219 (displaced_step_prepare_throw): Change variable const.
2220 (resume): Likewise.
2221 (proceed): Likewise.
2222 (adjust_pc_after_break): Likewise.
2223 (save_waitstatus): Likewise.
2224 (handle_signal_stop): Likewise.
2225 (keep_going_pass_signal): Likewise.
2226 * jit.c (jit_frame_sniffer): Add const.
2227 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2228 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2229 * record-full.c (record_full_wait_1): Likewise.
2230 * regcache.c (regcache::regcache): Change parameter to const.
2231 * regcache.h (regcache::regcache): Likewise.
2232 (regcache::aspace): Return const address_space *.
2233 (regcache) <m_aspace>: Add const.
2234
a01bda52
YQ
22352017-11-02 Yao Qi <yao.qi@linaro.org>
2236
2237 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2238 * frame.c (create_sentinel_frame): Likewise.
2239 * infrun.c (displaced_step_prepare_throw): Likewise.
2240 (resume): Likewise.
2241 (thread_still_needs_step_over_bp): Likewise.
2242 (proceed): Likewise.
2243 (do_target_wait): Likewise.
2244 (adjust_pc_after_break): Likewise.
2245 (handle_syscall_event): Likewise.
2246 (save_waitstatus): Likewise.
2247 (handle_inferior_event_1): Likewise.
2248 (handle_signal_stop): Likewise.
2249 (keep_going_pass_signal): Likewise.
2250 * linux-nat.c (status_callback): Likewise.
2251 (save_stop_reason): Likewise.
2252 (resume_stopped_resumed_lwps): Likewise.
2253 * record-full.c (record_full_exec_insn): Likewise.
2254 (record_full_wait_1): Likewise.
2255 * regcache.c (get_regcache_aspace): Remove.
2256 * regcache.h (get_regcache_aspace): Remove.
2257
d999647b
YQ
22582017-11-02 Yao Qi <yao.qi@linaro.org>
2259
2260 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2261 (init_regcache_descr): Use gdbarch_num_regs.
2262 (regcache::regcache): Likewise.
2263 (regcache::get_register_status): Likewise.
2264 (regcache::assert_raw_regnum): Likewise.
2265 (regcache::cooked_read): Likewise.
2266 (regcache::cooked_read_value): Likewise.
2267 (regcache::cooked_write): Likewise.
2268 (regcache::dump): Likewise.
2269 (regcache::num_raw_registers): New method.
2270 * regcache.h (class regcache) <num_raw_registers>: New.
2271
4e888c28
YQ
22722017-11-02 Yao Qi <yao.qi@linaro.org>
2273
2274 * regcache.c (regcache::assert_regnum): New method.
2275 (regcache::invalidate): Call assert_regnum.
2276 (regcache::raw_update): Likewise.
2277 (regcache::raw_write): Likewise.
2278 (regcache::raw_read_part): Likewise.
2279 (regcache::raw_write_part): Likewise.
2280 (regcache::raw_supply): Likewise.
2281 (regcache::raw_supply_integer): Likewise.
2282 (regcache::raw_supply_zeroed): Likewise.
2283 (regcache::raw_collect): Likewise.
2284 (regcache::raw_collect_integer): Likewise.
2285 * regcache.h (regcache::assert_regnum): Declare.
2286
2e1b49b3
YQ
22872017-11-02 Yao Qi <yao.qi@linaro.org>
2288
2289 * regcache.c (regcache::dump): Remove code.
2290
6c5218df
YQ
22912017-11-02 Yao Qi <yao.qi@linaro.org>
2292
2293 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2294 Remove.
2295 <sizeof_cooked_register_status>: Remove.
2296 (init_regcache_descr): Update.
2297 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2298 (regcache::save): Likewise.
2299 (regcache::dump): Likewise.
2300
dcc31d28
JB
23012017-11-01 James Bowman <james.bowman@ftdichip.com>
2302
2303 * ft32-tdep.c (ft32_fetch_instruction): New function.
2304 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2305
3a87ae65
SM
23062017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2307
2308 * cli/cli-script.c (execute_control_command): Rename to ...
2309 (execute_control_command_1): ... this.
2310 (execute_control_command): New function.
2311
09b847f3
SM
23122017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2313
2314 * tracepoint.c (tfind_command): Remove const_cast.
2315
f871c485
MG
23162017-10-30 Mike Gulick <mgulick@mathworks.com>
2317
2318 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2319
b020ff80
SM
23202017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2321
2322 * common/common-utils.h (in_inclusive_range): New function.
2323 * arm-tdep.c (arm_record_extension_space): Use
2324 in_inclusive_range.
2325 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2326 * cris-tdep.c (cris_spec_reg_applicable): Use
2327 in_inclusive_range.
2328
1b81856f
PA
23292017-10-30 Pedro Alves <palves@redhat.com>
2330 Simon Marchi <simon.marchi@ericsson.com>
2331
2332 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2333 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2334
31b833b3
PA
23352017-10-30 Pedro Alves <palves@redhat.com>
2336
2337 * common/common-utils.c (string_appendf, string_vappendf): New
2338 functions.
2339 * common/common-utils.h (string_appendf, string_vappendf): New
2340 declarations.
2341 * unittests/common-utils-selftests.c (string_appendf_func)
2342 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2343 (string_vappendf_tests): New functions.
2344 (_initialize_common_utils_selftests): Register "string_appendf" and
2345 "string_vappendf tests".
2346
4a250334
PA
23472017-10-30 Pedro Alves <palves@redhat.com>
2348
2349 * unittests/common-utils-selftests.c (format_func): New typedef.
2350 (string_printf_tests, string_vprintf_tests): Tests factored out
2351 and merged to ...
2352 (test_format_func): ... this new function.
2353 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2354 test_format_func.
2355
16c5c17e
SM
23562017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2357
2358 * darwin-nat.c: Remove include of gdb.h.
2359
7ca51576
SM
23602017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2361
2362 * xtensa-xtregs.c: Fix formatting issues.
2363
c1342859
SM
23642017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2365
2366 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2367
484d8d36
MD
23682017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2369
2370 PR python/21213
2371 * python/py-infthread.c (thpy_get_inferior): Increment reference
2372 of inferior before returning it.
2373
b5540b5f
SM
23742017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2375
2376 * unittests/common-utils-selftests.c (format): Add
2377 ATTRIBUTE_PRINTF.
2378
5a9dcda1
SM
23792017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2380
2381 * xml-syscall.c (struct syscall_desc): Add constructor.
2382 <name>: Change type to std::string.
2383 (syscall_desc_up): New typedef.
2384 (syscall_desc_p): Remove typeder.
2385 (DEF_VEC_P(syscall_desc_p)): Remove.
2386 (struct syscall_group_desc): Add constructor.
2387 <name>: Change type to std::string.
2388 <syscalls>: Change type to std::vector.
2389 (syscall_group_desc_up): New typedef.
2390 (syscall_group_desc_p): Remove typedef.
2391 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2392 (struct syscalls_info) <syscalls>: Change type to std::vector of
2393 unique_ptr.
2394 <groups>: Likewise.
2395 <my_gdb_datadir>: Change type to std::string.
2396 (syscalls_info_up): New typedef.
2397 (allocate_syscalls_info): Remove.
2398 (syscalls_info_free_syscalls_desc): Remove.
2399 (syscalls_info_free_syscall_group_desc): Remove.
2400 (free_syscalls_info): Remove.
2401 (make_cleanup_free_syscalls_info): Remove.
2402 (syscall_group_create_syscall_group_desc): Adjust.
2403 (syscall_group_add_syscall): Adjust.
2404 (syscall_create_syscall_desc): Adjust.
2405 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2406 (init_syscalls_info): Adjust.
2407 (syscall_group_get_group_by_name): Adjust.
2408 (xml_get_syscall_number): Adjust.
2409 (xml_get_syscall_name): Adjust.
2410 (xml_list_of_syscalls): Adjust.
2411 (xml_list_syscalls_by_group): Adjust.
2412 (xml_list_of_groups): Adjust.
2413
45461e0d
SM
24142017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2415
2416 * probe.h: Don't include gdb_vecs.h.
2417 (DEF_VEC_P (probe_p)): Remove.
2418 (find_probes_in_objfile): Return an std::vector.
2419 * probe.c (find_probes_in_objfile): Likewise.
2420 * breakpoint.c (breakpoint_objfile_data)
2421 <longjmp_probes>: Change type to std::vector.
2422 <exception_probes>: Likewise.
2423 (free_breakpoint_probes): Don't manually free vectors.
2424 (create_longjmp_master_breakpoint): Adjust.
2425 (create_exception_master_breakpoint): Adjust.
2426 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2427 parameter type, adjust.
2428 (svr4_create_solib_event_breakpoints): Adjust.
2429
43dce439
SM
24302017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2431
2432 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2433 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2434 with new.
2435 (free_breakpoint_probes): Rename to ...
2436 (free_breakpoint_objfile_data): ... this, and call delete on
2437 bp_objfile_data..
2438
6a1b9516
SM
24392017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2440
2441 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2442 (loaded_script_ptr): Remove typedef.
2443 (DEF_VEC_P (loaded_script_ptr)): Remove.
2444 (struct collect_matching_scripts_data): Add constructor.
2445 <scripts_p>: Change type to (pointer to) std::vector.
2446 (collect_matching_scripts_data): Adjust.
2447 (sort_scripts_by_name): Make suitable for std::sort.
2448 (print_scripts): Don't sort vector, adjust to std::vector.
2449 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2450
593e3209
SM
24512017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2452
2453 * symfile.c (filename_language): Make struct, not typedef. Add
2454 constructor.
2455 <ext>: Change type to std::string.
2456 (DEF_VEC_O (filename_language)): Remove.
2457 (filename_language_table): Change type to std::vector.
2458 (add_filename_language): Adjust.
2459 (set_ext_lang_command): Adjust.
2460 (info_ext_lang_command): Adjust.
2461 (deduce_language_from_filename): Adjust.
2462 (class scoped_restore_filename_language_table): Remove.
2463 (test_filename_language): Use scoped_restore.
2464 (test_set_ext_lang_command): Use scoped_restore, adjust to
2465 std::vector change.
2466
32fa66eb
SM
24672017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2468
2469 * symfile.c: Include selftest.h.
2470 (class scoped_restore_filename_language_table): New.
2471 (test_filename_language): New test.
2472 (test_set_ext_lang_command): New test.
2473 (_initialize_symfile): Register tests.
2474
4a27f119
KS
24752017-10-27 Keith Seitz <keiths@redhat.com>
2476
2477 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2478 in the bp_location, falling back to find_pc_sect_function when
2479 needed.
2480 (add_location_to_breakpoint): Save sal->symbol.
2481 * breakpoint.h (struct bp_location) <symbol>: New field.
2482 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2483 * symtab.h (struct symtab_and_line) <symbol>: New field.
2484
a43f3893
PF
24852017-10-26 Patrick Frants <osscontribute@gmail.com>
2486
7453e6b2 2487 PR gdb/13669
a43f3893
PF
2488 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2489 to rewind obstack.
2490
23cc4e1b
PA
24912017-10-26 Pedro Alves <palves@redhat.com>
2492
2493 * remote.c (remote_async_terminal_ours_p): Delete.
2494 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2495 Remove references to 'remote_async_terminal_ours_p'.
2496
6abc18bb
YQ
24972017-10-26 Yao Qi <yao.qi@linaro.org>
2498
2499 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2500
bd522513
YQ
25012017-10-26 Yao Qi <yao.qi@linaro.org>
2502
2503 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2504 aspace const.
2505 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2506 Likewise.
2507 * breakpoint.c (bpstat_check_location): Remove cast.
2508 (breakpoint_hit_catch_fork): Make aspce const.
2509 (breakpoint_hit_catch_solib): Likewise.
2510 (breakpoint_hit_catch_exec): Likewise.
2511 (breakpoint_hit_ranged_breakpoint): Likewise.
2512 (breakpoint_hit_watchpoint): Likewise.
2513 (base_breakpoint_breakpoint_hit): Likewise.
2514 (bkpt_breakpoint_hit): Likewise.
2515 (dprintf_breakpoint_hit): Likewise.
2516 (tracepoint_breakpoint_hit): Likewise.
2517 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2518
accd0bcd
YQ
25192017-10-26 Yao Qi <yao.qi@linaro.org>
2520
2521 * breakpoint.c (breakpoint_location_address_match): Change
2522 "struct address_space *" to "const address_space".
2523 (breakpoint_location_address_range_overlap): Likewise.
2524 (breakpoint_here_p): Likewise.
2525 (breakpoint_in_range_p): Likewise.
2526 (moribund_breakpoint_here_p): Likewise.
2527 (bp_location_inserted_here_p): Likewise.
2528 (software_breakpoint_inserted_here_p): Likewise.
2529 (hardware_breakpoint_inserted_here_p): Likewise.
2530 (hardware_watchpoint_inserted_in_range): Likewise.
2531 (bpstat_check_location): Likewise.
2532 (bpstat_stop_status): Likewise.
2533 (breakpoint_address_match): Likewise.
2534 (breakpoint_address_match_range): Likewise.
2535 (breakpoint_location_address_match): Likewise.
2536 (breakpoint_location_address_range_overlap): Likewise.
2537 (insert_single_step_breakpoint): Likewise.
2538 (breakpoint_has_location_inserted_here): Likewise.
2539 (single_step_breakpoint_inserted_here_p): Likewise.
2540 (pc_at_non_inline_function): Likewise.
2541 * breakpoint.h (bpstat_stop_status): Update declaration.
2542 (breakpoint_here_p): Likewise.
2543 (breakpoint_in_range_p): Likewise.
2544 (moribund_breakpoint_here_p): Likewise.
2545 (breakpoint_inserted_here_p): Likewise.
2546 (software_breakpoint_inserted_here_p): Likewise.
2547 (hardware_breakpoint_inserted_here_p): Likewise.
2548 (breakpoint_has_location_inserted_here): Likewise.
2549 (single_step_breakpoint_inserted_here_p): Likewise.
2550 (hardware_watchpoint_inserted_in_range): Likewise.
2551 (breakpoint_address_match): Likewise.
2552 (insert_single_step_breakpoint): Likewise.
2553 (pc_at_non_inline_function): Likewise.
2554 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2555 * record.c (record_check_stopped_by_breakpoint): Likewise.
2556 * record.h (record_check_stopped_by_breakpoint): Likewise.
2557 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2558
ac7936df
YQ
25592017-10-25 Yao Qi <yao.qi@linaro.org>
2560
2561 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2562 regcache->arch () instead get_regcache_arch.
2563 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2564 Likewise.
2565 (aarch64_fbsd_store_inferior_registers): Likewise.
2566 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2567 (store_gregs_to_thread): Likewise.
2568 (fetch_fpregs_from_thread): Likewise.
2569 (store_fpregs_to_thread): Likewise.
2570 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2571 (aarch64_store_return_value): Likewise.
2572 (aarch64_software_single_step): Likewise.
2573 * aix-thread.c (aix_thread_wait): Likewise.
2574 (supply_reg32): Likewise.
2575 (supply_sprs64): Likewise.
2576 (supply_sprs32): Likewise.
2577 (fill_gprs64): Likewise.
2578 (fill_gprs32): Likewise.
2579 (fill_sprs64): Likewise.
2580 (fill_sprs32): Likewise.
2581 (store_regs_user_thread): Likewise.
2582 (store_regs_kernel_thread): Likewise.
2583 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2584 (alphabsd_store_inferior_registers): Likewise.
2585 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2586 (alpha_store_return_value): Likewise.
2587 (alpha_deal_with_atomic_sequence): Likewise.
2588 (alpha_next_pc): Likewise.
2589 (alpha_software_single_step): Likewise.
2590 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2591 (amd64bsd_store_inferior_registers): Likewise.
2592 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2593 Likewise.
2594 (amd64_linux_store_inferior_registers): Likewise.
2595 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2596 (amd64_collect_native_gregset): Likewise.
2597 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2598 (amd64obsd_collect_uthread): Likewise.
2599 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2600 (amd64_collect_fpregset): Likewise.
2601 (amd64_supply_fxsave): Likewise.
2602 (amd64_supply_xsave): Likewise.
2603 (amd64_collect_fxsave): Likewise.
2604 (amd64_collect_xsave): Likewise.
2605 * arc-tdep.c (arc_write_pc): Likewise.
2606 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2607 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2608 (arm_fbsd_store_inferior_registers): Likewise.
2609 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2610 (store_vfp_regs): Likewise.
2611 (arm_linux_fetch_inferior_registers): Likewise.
2612 (arm_linux_store_inferior_registers): Likewise.
2613 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2614 (arm_linux_sigreturn_next_pc): Likewise.
2615 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2616 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2617 (fetch_register): Likewise.
2618 (store_register): Likewise.
2619 * arm-tdep.c (arm_is_thumb): Likewise.
2620 (displaced_in_arm_mode): Likewise.
2621 (bx_write_pc): Likewise.
2622 (arm_get_next_pcs_addr_bits_remove): Likewise.
2623 (arm_software_single_step): Likewise.
2624 (arm_extract_return_value): Likewise.
2625 (arm_store_return_value): Likewise.
2626 (arm_write_pc): Likewise.
2627 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2628 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2629 (bsd_uthread_store_registers): Likewise.
2630 * core-regset.c (fetch_core_registers): Likewise.
2631 * corelow.c (get_core_registers): Likewise.
2632 * cris-tdep.c (cris_store_return_value): Likewise.
2633 (cris_extract_return_value): Likewise.
2634 (find_step_target): Likewise.
2635 (find_step_target): Likewise.
2636 (cris_software_single_step): Likewise.
2637 * ctf.c (ctf_fetch_registers): Likewise.
2638 * darwin-nat.c (cancel_breakpoint): Likewise.
2639 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2640 * frv-tdep.c (frv_extract_return_value): Likewise.
2641 * ft32-tdep.c (ft32_store_return_value): Likewise.
2642 (ft32_extract_return_value): Likewise.
2643 * go32-nat.c (fetch_register): Likewise.
2644 (go32_fetch_registers): Likewise.
2645 (go32_store_registers): Likewise.
2646 (store_register): Likewise.
2647 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2648 (h8300_store_return_value): Likewise.
2649 * hppa-linux-nat.c (fetch_register): Likewise.
2650 (store_register): Likewise.
2651 (hppa_linux_fetch_inferior_registers): Likewise.
2652 (hppa_linux_store_inferior_registers): Likewise.
2653 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2654 (i386_darwin_store_inferior_registers): Likewise.
2655 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2656 (gnu_store_registers): Likewise.
2657 * i386-linux-nat.c (fetch_register): Likewise.
2658 (store_register): Likewise.
2659 (supply_gregset): Likewise.
2660 (fill_gregset): Likewise.
2661 (i386_linux_fetch_inferior_registers): Likewise.
2662 (i386_linux_store_inferior_registers): Likewise.
2663 (i386_linux_resume): Likewise.
2664 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2665 Likewise.
2666 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2667 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2668 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2669 (i386obsd_collect_uthread): Likewise.
2670 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2671 (i386_supply_gregset): Likewise.
2672 (i386_collect_gregset): Likewise.
2673 (i386_supply_fpregset): Likewise.
2674 (i386_collect_fpregset): Likewise.
2675 (i386_mpx_bd_base): Likewise.
2676 * i386-v4-nat.c (supply_fpregset): Likewise.
2677 (fill_fpregset): Likewise.
2678 * i387-tdep.c (i387_supply_fsave): Likewise.
2679 (i387_collect_fsave): Likewise.
2680 (i387_supply_fxsave): Likewise.
2681 (i387_collect_fxsave): Likewise.
2682 (i387_supply_xsave): Likewise.
2683 (i387_collect_xsave): Likewise.
2684 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2685 (ia64_linux_store_registers): Likewise.
2686 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2687 (ia64_extract_return_value): Likewise.
2688 (ia64_store_return_value): Likewise.
2689 (find_func_descr): Likewise.
2690 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2691 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2692 (inf_ptrace_store_registers): Likewise.
2693 * infrun.c (use_displaced_stepping): Likewise.
2694 (displaced_step_prepare_throw): Likewise.
2695 (resume): Likewise.
2696 (proceed): Likewise.
2697 (do_target_wait): Likewise.
2698 (adjust_pc_after_break): Likewise.
2699 (handle_inferior_event_1): Likewise.
2700 (handle_signal_stop): Likewise.
2701 (save_infcall_suspend_state): Likewise.
2702 (restore_infcall_suspend_state): Likewise.
2703 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2704 * jit.c (jit_frame_prev_register): Likewise.
2705 * linux-nat.c (save_stop_reason): Likewise.
2706 (linux_nat_wait_1): Likewise.
2707 (resume_stopped_resumed_lwps): Likewise.
2708 * linux-record.c (record_linux_sockaddr): Likewise.
2709 (record_linux_msghdr): Likewise.
2710 (record_linux_system_call): Likewise.
2711 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2712 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2713 (lm32_store_return_value): Likewise.
2714 * m32c-tdep.c (m32c_read_flg): Likewise.
2715 (m32c_pseudo_register_read): Likewise.
2716 (m32c_pseudo_register_write): Likewise.
2717 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2718 (m32r_linux_collect_gregset): Likewise.
2719 * m32r-tdep.c (m32r_store_return_value): Likewise.
2720 (m32r_extract_return_value): Likewise.
2721 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2722 (m68kbsd_collect_fpregset): Likewise.
2723 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2724 * m68k-linux-nat.c (fetch_register): Likewise.
2725 (old_fetch_inferior_registers): Likewise.
2726 (old_store_inferior_registers): Likewise.
2727 (store_regs): Likewise.
2728 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2729 (m68k_svr4_store_return_value): Likewise.
2730 * m88k-tdep.c (m88k_store_arguments): Likewise.
2731 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2732 (mi_cmd_data_write_register_values): Likewise.
2733 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2734 (mips_fbsd_store_inferior_registers): Likewise.
2735 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2736 (mips_fbsd_supply_gregs): Likewise.
2737 (mips_fbsd_collect_fpregs): Likewise.
2738 (mips_fbsd_collect_gregs): Likewise.
2739 (mips_fbsd_supply_fpregset): Likewise.
2740 (mips_fbsd_collect_fpregset): Likewise.
2741 (mips_fbsd_supply_gregset): Likewise.
2742 (mips_fbsd_collect_gregset): Likewise.
2743 * mips-linux-nat.c (supply_gregset): Likewise.
2744 (fill_gregset): Likewise.
2745 (supply_fpregset): Likewise.
2746 (fill_fpregset): Likewise.
2747 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2748 (mips_fill_gregset): Likewise.
2749 (mips_supply_fpregset): Likewise.
2750 (mips_fill_fpregset): Likewise.
2751 (mips64_supply_gregset): Likewise.
2752 (micromips_linux_sigframe_validate): Likewise.
2753 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2754 (mipsnbsd_fetch_inferior_registers): Likewise.
2755 (mipsnbsd_store_inferior_registers): Likewise.
2756 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2757 (mipsnbsd_supply_gregset): Likewise.
2758 (mipsnbsd_iterate_over_regset_sections): Likewise.
2759 (mipsnbsd_supply_reg): Likewise.
2760 (mipsnbsd_supply_fpreg): Likewise.
2761 * mips-tdep.c (mips_in_frame_stub): Likewise.
2762 (mips_dummy_id): Likewise.
2763 (is_octeon_bbit_op): Likewise.
2764 (micromips_bc1_pc): Likewise.
2765 (extended_mips16_next_pc): Likewise.
2766 (mips16_next_pc): Likewise.
2767 (deal_with_atomic_sequence): Likewise.
2768 * moxie-tdep.c (moxie_process_readu): Likewise.
2769 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2770 * nto-procfs.c (procfs_store_registers): Likewise.
2771 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2772 (ppcfbsd_store_inferior_registers): Likewise.
2773 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2774 (fetch_altivec_register): Likewise.
2775 (get_spe_registers): Likewise.
2776 (fetch_spe_register): Likewise.
2777 (fetch_altivec_registers): Likewise.
2778 (fetch_all_gp_regs): Likewise.
2779 (fetch_all_fp_regs): Likewise.
2780 (store_vsx_register): Likewise.
2781 (store_altivec_register): Likewise.
2782 (set_spe_registers): Likewise.
2783 (store_spe_register): Likewise.
2784 (store_altivec_registers): Likewise.
2785 (store_all_gp_regs): Likewise.
2786 (store_all_fp_regs): Likewise.
2787 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2788 (ppc_linux_collect_gregset): Likewise.
2789 (ppc_canonicalize_syscall): Likewise.
2790 (ppc_linux_record_signal): Likewise.
2791 (ppu2spu_prev_register): Likewise.
2792 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2793 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2794 (ppcobsd_store_registers): Likewise.
2795 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2796 Likewise.
2797 (ppc_ravenscar_generic_store_registers): Likewise.
2798 * procfs.c (procfs_fetch_registers): Likewise.
2799 (procfs_store_registers): Likewise.
2800 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2801 (ravenscar_store_registers): Likewise.
2802 (ravenscar_prepare_to_store): Likewise.
2803 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2804 * record-full.c (record_full_wait_1): Likewise.
2805 (record_full_registers_change): Likewise.
2806 (record_full_store_registers): Likewise.
2807 (record_full_core_fetch_registers): Likewise.
2808 (record_full_save): Likewise.
2809 (record_full_goto_insn): Likewise.
2810 * regcache.c (regcache_register_size): Likewise.
2811 (get_regcache_arch): Remove.
2812 (regcache_read_pc): Likewise.
2813 * regcache.h (get_regcache_arch): Remove.
2814 * remote-sim.c (gdbsim_fetch_register): Likewise.
2815 (gdbsim_store_register): Likewise.
2816 * remote.c (fetch_register_using_p): Likewise.
2817 (send_g_packet): Likewise.
2818 (remote_prepare_to_store): Likewise.
2819 (store_registers_using_G): Likewise.
2820 * reverse.c (save_bookmark_command): Likewise.
2821 (goto_bookmark_command): Likewise.
2822 * rs6000-aix-tdep.c (branch_dest): Likewise.
2823 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2824 (fetch_register): Likewise.
2825 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2826 (ppc_collect_reg): Likewise.
2827 (ppc_collect_gregset): Likewise.
2828 (ppc_collect_fpregset): Likewise.
2829 (ppc_collect_vsxregset): Likewise.
2830 (ppc_collect_vrregset): Likewise.
2831 (ppc_displaced_step_hw_singlestep): Likewise.
2832 (rs6000_pseudo_register_read): Likewise.
2833 (rs6000_pseudo_register_write): Likewise.
2834 * s390-linux-nat.c (supply_gregset): Likewise.
2835 (fill_gregset): Likewise.
2836 (s390_linux_fetch_inferior_registers): Likewise.
2837 * s390-linux-tdep.c (s390_write_pc): Likewise.
2838 (s390_software_single_step): Likewise.
2839 (s390_all_but_pc_registers_record): Likewise.
2840 (s390_linux_syscall_record): Likewise.
2841 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2842 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2843 (shnbsd_store_inferior_registers): Likewise.
2844 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2845 (sh_extract_return_value_fpu): Likewise.
2846 (sh_store_return_value_nofpu): Likewise.
2847 (sh_corefile_supply_regset): Likewise.
2848 (sh_corefile_collect_regset): Likewise.
2849 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2850 (sh64_store_return_value): Likewise.
2851 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2852 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2853 (sparc_store_inferior_registers): Likewise.
2854 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2855 (sparc_ravenscar_prepare_to_store): Likewise.
2856 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2857 (sparc_analyze_control_transfer): Likewise.
2858 (sparc_step_trap): Likewise.
2859 (sparc_software_single_step): Likewise.
2860 (sparc32_gdbarch_init): Likewise.
2861 (sparc_supply_rwindow): Likewise.
2862 (sparc_collect_rwindow): Likewise.
2863 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2864 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2865 (sparc64nbsd_collect_gregset): Likewise.
2866 (sparc64nbsd_supply_fpregset): Likewise.
2867 (sparc64nbsd_collect_fpregset): Likewise.
2868 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2869 (sparc64_supply_gregset): Likewise.
2870 (sparc64_collect_gregset): Likewise.
2871 (sparc64_supply_fpregset): Likewise.
2872 (sparc64_collect_fpregset): Likewise.
2873 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2874 * spu-tdep.c (spu_unwind_sp): Likewise.
2875 (spu2ppu_prev_register): Likewise.
2876 (spu_memory_remove_breakpoint): Likewise.
2877 * stack.c (return_command): Likewise.
2878 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2879 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2880 * tracefile.c (trace_save_ctf): Likewise.
2881 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2882 (do_windows_store_inferior_registers): Likewise.
2883 (windows_resume): Likewise.
2884 * xtensa-linux-nat.c (fill_gregset): Likewise.
2885 (supply_gregset_reg): Likewise.
2886 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2887 (xtensa_register_read_masked): Likewise.
2888 (xtensa_supply_gregset): Likewise.
2889 (xtensa_extract_return_value): Likewise.
2890 (xtensa_store_return_value): Likewise.
2891
edd079d9
UW
28922017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2893
2894 * doublest.c (floatformat_from_string): New function.
2895 * doublest.h (floatformat_from_string): Add prototype.
2896
2897 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2898 (OP_FLOAT): ... this.
2899 * expression.h: Do not include "doublest.h".
2900 (union exp_element): Replace doubleconst and decfloatconst by
2901 new element floatconst.
2902 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2903 (ada_evaluate_subexp): Likewise.
2904 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2905 OP_DOUBLE and OP_DECFLOAT.
2906 * expprint.c (print_subexp_standard): Likewise.
2907 (dump_subexp_body_standard): Likewise.
2908 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2909
2910 * parse.c: Include "dfp.h".
2911 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2912 (write_exp_elt_floatcst): New function.
2913 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2914 and OP_DECFLOAT.
2915 (operator_check_standard): Likewise.
2916 (parse_float): Do not accept suffix. Take type as input. Return bool.
2917 Return target format buffer instead of host DOUBLEST.
2918 Use floatformat_from_string and decimal_from_string to parse
2919 either binary or decimal floating-point types.
2920 (parse_c_float): Remove.
2921 * parser-defs.h: Do not include "doublest.h".
2922 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2923 (write_exp_elt_floatcst): Add prototype.
2924 (parse_float): Update prototype.
2925 (parse_c_float): Remove.
2926
2927 * c-exp.y: Do not include "dfp.h".
2928 (typed_val_float): Use byte buffer instead of DOUBLEST.
2929 (typed_val_decfloat): Remove.
2930 (DECFLOAT): Remove.
2931 (FLOAT): 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 Handle decimal and binary FP types the same way.
2935
2936 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2937 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2938 (parse_number): Update to new parse_float interface.
2939 Parse suffixes and determine type before calling parse_float.
2940
2941 * f-exp.y: Replace dval by typed_val_float.
2942 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2943 (parse_number): Use parse_float instead of atof.
2944
2945 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2946 (parse_go_float): Remove.
2947 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2948 (parse_number): Call parse_float instead of parse_go_float.
2949 Parse suffixes and determine type before calling parse_float.
2950
2951 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2952 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2953 (parse_number): Update to new parse_float interface.
2954 Parse suffixes and determine type before calling parse_float.
2955
2956 * m2-exp.y: Replace dval by byte buffer val.
2957 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2958 (parse_number): Call parse_float instead of atof.
2959
2960 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2961 (lex_number): Call parse_float instead of strtod.
2962 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2963 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2964 Use write_exp_elt_floatcst.
2965 (unit_testing): Remove static variable.
2966 (rust_type): Do not check unit_testing.
2967 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2968
2969 * ada-exp.y (type_float, type_double): Remove.
2970 (typed_val_float): Use byte buffer instead of DOUBLEST.
2971 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2972 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2973
cc628f3d
AH
29742017-10-25 Alan Hayward <alan.hayward@arm.com>
2975
2976 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2977 * arch/aarch64.h: New file.
2978
09a7c6aa
UW
29792017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2980
2981 * dfp.h (decimal_from_string): Use const reference for argument.
2982 * dfp.c (decimal_from_string): Likewise.
2983
8ba0dd51
UW
29842017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2985
2986 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2987 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2988 * mips-tdep.c (mips_print_fp_register): Likewise.
2989
16e812b2
UW
29902017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2991
2992 * common/format.h (enum argclass): Replace decfloat_arg by
2993 dec32float_arg, dec64float_arg, and dec128float_arg.
2994 * common/format.c (parse_format_string): Update to return
2995 new decimal float argument classes.
2996
2997 * printcmd.c (printf_decfloat): Rename to ...
2998 (printf_floating): ... this. Add argclass argument, and use it
2999 instead of parsing the format string again. Add support for
3000 binary floating-point values, using floatformat_to_string.
3001 Convert value to the target format if it doesn't already match.
3002 (ui_printf): Call printf_floating instead of printf_decfloat,
3003 also for double_arg / long_double_arg. Pass argclass.
3004
3005 * dfp.c (decimal_to_string): Add format string argument.
3006 * dfp.h (decimal_to_string): Likewise.
3007
3008 * doublest.c (floatformat_to_string): Add format string argument.
3009 * doublest.h (floatformat_to_string): Likewise.
3010
fdf0cbc2
UW
30112017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3012
3013 * doublest.c (floatformat_precision): New routine.
3014 (floatformat_to_string): Likewise.
3015 * doublest.c (floatformat_to_string): Add prototype.
3016
3017 * printcmd.c (print_scalar_formatted): Only call print_floating
3018 on floating-point types.
3019 * valprint.c: Do not include "floatformat.h".
3020 (generic_val_print_decfloat): Remove.
3021 (generic_val_print): Call generic_val_print_float for both
3022 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3023 (print_floating): Use floatformat_to_string. Handle decimal float.
3024 (print_decimal_floating): Remove, merge into floatformat_to_string.
3025 * value.h (print_decimal_floating): Remove.
3026
3027 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3028
5033013f
UW
30292017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3030
3031 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3032
a664f67e
SM
30332017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3034
3035 * memattr.h: Don't include vec.h.
3036 (struct mem_attrib): Initialize fields.
3037 <unknown>: New static method.
3038 (struct mem_region): Add constructors, operator<, initialize
3039 fields.
3040 * memattr.c: Include algorithm.
3041 (default_mem_attrib, unknown_mem_attrib): Remove.
3042 (user_mem_region_list): New global.
3043 (target_mem_region_list, mem_region_list): Change type to
3044 std::vector<mem_region>.
3045 (mem_use_target): Now a function.
3046 (target_mem_regions_valid): Change type to bool.
3047 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3048 (require_user_regions): Adjust.
3049 (require_target_regions): Adjust.
3050 (create_mem_region): Adjust.
3051 (lookup_mem_region): Adjust.
3052 (invalidate_target_mem_regions): Adjust.
3053 (mem_clear): Rename to...
3054 (user_mem_clear): ... this, and adjust.
3055 (mem_command): Adjust.
3056 (info_mem_command): Adjust.
3057 (mem_enable, enable_mem_command, mem_disable,
3058 disable_mem_command): Adjust.
3059 (mem_delete): Adjust.
3060 (delete_mem_command): Adjust.
3061 * memory-map.h (parse_memory_map): Return an std::vector.
3062 * memory-map.c (parse_memory_map): Likewise.
3063 (struct memory_map_parsing_data): Add constructor.
3064 <memory_map>: Point to std::vector.
3065 (memory_map_start_memory): Adjust.
3066 (memory_map_end_memory): Adjust.
3067 (memory_map_end_property): Adjust.
3068 (clear_result): Remove.
3069 * remote.c (remote_memory_map): Return an std::vector.
3070 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3071 Remove.
3072 (target_debug_print_mem_region_vector): New.
3073 * target-delegates.c: Regenerate.
3074 * target.h (mem_region_vector): New typedef.
3075 (to_memory_map): Return mem_region_vector.
3076 (target_memory_map): Return an std::vector.
3077 * target.c (target_memory_map): Return an std::vector.
3078 (flash_erase_command): Adjust.
3079
6e17c565
SM
30802017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3081
3082 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3083 Change type to std::string.
3084 (memory_map_start_property): Adjust.
3085 (memory_map_end_property): Adjust.
3086
cfba9872
SM
30872017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3088
3089 * infrun.h: Include common/byte-vector.h.
3090 (struct displaced_step_closure): New struct.
3091 (struct buf_displaced_step_closure): New struct.
3092 * infrun.c (displaced_step_closure::~displaced_step_closure):
3093 Provide default implementation.
3094 (displaced_step_clear): Deallocate step closure with delete.
3095 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3096 (aarch64_displaced_step_closure): ... this, extend
3097 displaced_step_closure.
3098 (aarch64_displaced_step_data) <dsc>: Change type to
3099 aarch64_displaced_step_closure.
3100 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3101 unique_ptr.
3102 (aarch64_displaced_step_fixup): Add cast for displaced step
3103 closure.
3104 * amd64-tdep.c (displaced_step_closure): Rename to ...
3105 (amd64_displaced_step_closure): ... this, extend
3106 displaced_step_closure.
3107 <insn_buf>: Change type to std::vector<gdb_byte>.
3108 <max_len>: Remove.
3109 (fixup_riprel): Change type of DSC parameter, adjust to type
3110 change of insn_buf.
3111 (fixup_displaced_copy): Change type of DSC parameter.
3112 (amd64_displaced_step_copy_insn): Instantiate
3113 amd64_displaced_step_closure.
3114 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3115 to type change of insn_buf.
3116 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3117 parameter DSC.
3118 (arm_linux_copy_svc): Likewise.
3119 (cleanup_kernel_helper_return): Likewise.
3120 (arm_catch_kernel_helper_return): Likewise.
3121 (arm_linux_displaced_step_copy_insn): Instantiate
3122 arm_displaced_step_closure.
3123 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3124 (displaced_read_reg): Change type of parameter DSC.
3125 (branch_write_pc): Likewise.
3126 (load_write_pc): Likewise.
3127 (alu_write_pc): Likewise.
3128 (displaced_write_reg): Likewise.
3129 (arm_copy_unmodified): Likewise.
3130 (thumb_copy_unmodified_32bit): Likewise.
3131 (thumb_copy_unmodified_16bit): Likewise.
3132 (cleanup_preload): Likewise.
3133 (install_preload): Likewise.
3134 (arm_copy_preload): Likewise.
3135 (thumb2_copy_preload): Likewise.
3136 (install_preload_reg): Likewise.
3137 (arm_copy_preload_reg): Likewise.
3138 (cleanup_copro_load_store): Likewise.
3139 (install_copro_load_store): Likewise.
3140 (arm_copy_copro_load_store) Likewise.
3141 (thumb2_copy_copro_load_store): Likewise.
3142 (cleanup_branch): Likewise.
3143 (install_b_bl_blx): Likewise.
3144 (arm_copy_b_bl_blx): Likewise.
3145 (thumb2_copy_b_bl_blx): Likewise.
3146 (thumb_copy_b): Likewise.
3147 (install_bx_blx_reg): Likewise.
3148 (arm_copy_bx_blx_reg): Likewise.
3149 (thumb_copy_bx_blx_reg): Likewise.
3150 (cleanup_alu_imm): Likewise.
3151 (arm_copy_alu_imm): Likewise.
3152 (thumb2_copy_alu_imm): Likewise.
3153 (cleanup_alu_reg): Likewise.
3154 (install_alu_reg): Likewise.
3155 (arm_copy_alu_reg): Likewise.
3156 (thumb_copy_alu_reg): Likewise.
3157 (cleanup_alu_shifted_reg): Likewise.
3158 (install_alu_shifted_reg): Likewise.
3159 (arm_copy_alu_shifted_reg): Likewise.
3160 (cleanup_load): Likewise.
3161 (cleanup_store): Likewise.
3162 (arm_copy_extra_ld_st): Likewise.
3163 (install_load_store): Likewise.
3164 (thumb2_copy_load_literal): Likewise.
3165 (thumb2_copy_load_reg_imm): Likewise.
3166 (arm_copy_ldr_str_ldrb_strb): Likewise.
3167 (cleanup_block_load_all): Likewise.
3168 (cleanup_block_store_pc): Likewise.
3169 (cleanup_block_load_pc): Likewise.
3170 (arm_copy_block_xfer): Likewise.
3171 (thumb2_copy_block_xfer): Likewise.
3172 (cleanup_svc): Likewise.
3173 (install_svc): Likewise.
3174 (arm_copy_svc): Likewise.
3175 (thumb_copy_svc): Likewise.
3176 (arm_copy_undef): Likewise.
3177 (thumb_32bit_copy_undef): Likewise.
3178 (arm_copy_unpred): Likewise.
3179 (arm_decode_misc_memhint_neon): Likewise.
3180 (arm_decode_unconditional): Likewise.
3181 (arm_decode_miscellaneous): Likewise.
3182 (arm_decode_dp_misc): Likewise.
3183 (arm_decode_ld_st_word_ubyte): Likewise.
3184 (arm_decode_media): Likewise.
3185 (arm_decode_b_bl_ldmstm): Likewise.
3186 (arm_decode_ext_reg_ld_st): Likewise.
3187 (thumb2_decode_dp_shift_reg): Likewise.
3188 (thumb2_decode_ext_reg_ld_st): Likewise.
3189 (arm_decode_svc_copro): Likewise.
3190 (thumb2_decode_svc_copro): Likewise.
3191 (install_pc_relative): Likewise.
3192 (thumb_copy_pc_relative_16bit): Likewise.
3193 (thumb_decode_pc_relative_16bit): Likewise.
3194 (thumb_copy_pc_relative_32bit): Likewise.
3195 (thumb_copy_16bit_ldr_literal): Likewise.
3196 (thumb_copy_cbnz_cbz): Likewise.
3197 (thumb2_copy_table_branch): Likewise.
3198 (cleanup_pop_pc_16bit_all): Likewise.
3199 (thumb_copy_pop_pc_16bit): Likewise.
3200 (thumb_process_displaced_16bit_insn): Likewise.
3201 (decode_thumb_32bit_ld_mem_hints): Likewise.
3202 (thumb_process_displaced_32bit_insn): Likewise.
3203 (thumb_process_displaced_insn): Likewise.
3204 (arm_process_displaced_insn): Likewise.
3205 (arm_displaced_init_closure): Likewise.
3206 (arm_displaced_step_fixup): Add cast for closure.
3207 * arm-tdep.h: Include infrun.h.
3208 (displaced_step_closure): Rename to ...
3209 (arm_displaced_step_closure): ... this, extend
3210 displaced_step_closure.
3211 <u::svc::copy_svc_os>: Change type of parameter DSC.
3212 <cleanup>: Likewise.
3213 (arm_process_displaced_insn): Likewise.
3214 (arm_displaced_init_closure): Likewise.
3215 (displaced_read_reg): Likewise.
3216 (displaced_write_reg): Likewise.
3217 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3218 Adjust.
3219 * i386-tdep.h: Include infrun.h.
3220 (i386_displaced_step_closure): New typedef.
3221 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3222 i386_displaced_step_closure.
3223 (i386_displaced_step_fixup): Adjust.
3224 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3225 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3226 and unique_ptr.
3227 (ppc_displaced_step_fixup): Adjust.
3228 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3229 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3230 and unique_ptr.
3231 (s390_displaced_step_fixup): Adjust.
3232
b392b304
SM
32332017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3234
3235 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3236 Remove declarations.
3237
d5833c62
TT
32382017-10-20 Tom Tromey <tom@tromey.com>
3239
3240 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3241 std::vector.
3242 (gdb_bfd_record_inclusion): Update.
3243 (bfdp): Remove typedef.
3244
06d5bbc8
TT
32452017-10-20 Tom Tromey <tom@tromey.com>
3246
3247 * gdb_bfd.c (gdb_bfd_ref): Use new.
3248 (struct gdb_bfd_data): Add constructor, destructor, and member
3249 initializers.
3250 (gdb_bfd_unref): Use delete.
3251
2712ce2e
TT
32522017-10-20 Tom Tromey <tom@tromey.com>
3253
3254 * exec.c (exec_file_attach): Use new_bfd_ref.
3255 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3256 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3257 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3258 new_bfd_ref.
3259 * gdb_bfd.h (new_bfd_ref): New function.
3260
fcc8fb2f
PA
32612017-10-20 Pedro Alves <palves@redhat.com>
3262
3263 * main.c (captured_command_loop): Add attribute noinline.
3264
4c2287b0
SM
32652017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3266
3267 * interps.c (struct interp_factory): Add constructor.
3268 (interp_factory_p): Remove typedef.
3269 (DEF_VEC_P(interp_factory_p)): Remove.
3270 (interpreter_factories): Change type to std::vector.
3271 (interp_factory_register): Adjust.
3272 (interp_lookup): Adjust.
3273 (interpreter_completer): Adjust.
3274
3d415c26
TT
32752017-10-19 Tom Tromey <tom@tromey.com>
3276
3277 * break-catch-syscall.c (catch_syscall_completer): Use
3278 std::string, gdb::unique_xmalloc_ptr.
3279
395423c4
TT
32802017-10-19 Tom Tromey <tom@tromey.com>
3281
3282 * infcall.c (call_function_by_hand_dummy): Use std::string.
3283
54f70bc1
TT
32842017-10-19 Tom Tromey <tom@tromey.com>
3285
3286 * mi/mi-main.c (mi_cmd_execute): Update.
3287 * top.h (prepare_execute_command): Return scoped_value_mark.
3288 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3289 Add move constructor.
3290 * top.c (prepare_execute_command): Return scoped_value_mark.
3291 (execute_command): Update.
3292
63929e84
PA
32932017-10-19 Pedro Alves <palves@redhat.com>
3294
3295 * xml-support.c (xml_fetch_content_from_file): Check fread's
3296 return.
3297
a75868f5
PA
32982017-10-19 Pedro Alves <palves@redhat.com>
3299
3300 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3301 async.
3302 (handle_error_fd): New function.
3303 (ser_base_async): Add/delete an event loop file handler for
3304 error_fd.
3305
2edf834e
PA
33062017-10-19 Pedro Alves <palves@redhat.com>
3307
3308 * xml-support.c (xml_fetch_content_from_file): Don't read in
3309 chunks. Instead use fseek to determine the file's size, and read
3310 it in one go.
3311
c8ba13ad
KS
33122017-11-18 Keith Seitz <keiths@redhat.com>
3313
3314 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3315 types.
3316 Add whitespace to front of type name.
3317
37534686
KS
33182017-10-18 Keith Seitz <keiths@redhat.com>
3319
3320 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3321 DW_AT_accessibility.
3322
28c7c158
YQ
33232017-10-18 Yao Qi <yao.qi@linaro.org>
3324
3325 * features/tic6x-c62x-linux.c: Remove.
3326
30f0b101
TT
33272017-10-17 Tom Tromey <tom@tromey.com>
3328
3329 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3330 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3331 (do_mixed_source_and_assembly): Likewise.
3332
57e12da9
TT
33332017-10-17 Tom Tromey <tom@tromey.com>
3334
3335 * regcache.c (regcache::xfer_part): Remove assertion.
3336
7b700999
PA
33372017-10-17 Pedro Alves <palves@redhat.com>
3338
3339 * xml-support.c (xml_fetch_content_from_file): Call
3340 unique_ptr::release() instead unique_ptr::get() when passing
3341 through xrealloc.
3342
d3037ba6
YQ
33432017-10-17 Yao Qi <yao.qi@linaro.org>
3344
3345 * regcache.c (regcache::xfer_part): Remove parameters read and
3346 write, add parameter is_raw. All callers are updated.
3347
83d5a34d
KS
33482017-10-16 Keith Seitz <keiths@redhat.com>
3349
3350 * c-typeprint.c (enum access_specifier): Moved here from
3351 c_type_print_base.
3352 (output_access_specifier): New function.
3353 (c_type_print_base): Consider typedefs when assessing
3354 whether access labels are needed.
3355 Use output_access_specifier as needed.
3356 Output access specifier for typedefs, if needed.
3357 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3358 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3359 fields.
3360 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3361 accessor macros.
3362
87028b87
TT
33632017-10-16 Tom Tromey <tom@tromey.com>
3364
3365 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3366 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3367 * target.c (target_fileio_read_stralloc): Update.
3368 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3369 * target.h (target_fileio_read_stralloc): Return
3370 unique_xmalloc_ptr.
3371
b7b030ad
TT
33722017-10-16 Tom Tromey <tom@tromey.com>
3373
3374 * xml-syscall.c (xml_init_syscalls_info): Update.
3375 * xml-support.c (xinclude_start_include): Update.
3376 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3377 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3378 (xml_fetch_content_from_file): Likewise.
3379 * osdata.c (get_osdata): Update.
3380 * target.h (target_read_stralloc, target_get_osdata): Return
3381 unique_xmalloc_ptr.
3382 * solib-aix.c (solib_aix_get_library_list): Update.
3383 * solib-target.c (solib_target_current_sos): Update.
3384 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3385 * xml-tdesc.c (fetch_available_features_from_target): Update.
3386 (target_fetch_description_xml): Update.
3387 (file_read_description_xml): Update.
3388 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3389 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3390 (remote_pid_to_exec_file): Update.
3391 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3392 (target_get_osdata): Likewise.
3393
b80406ac
TT
33942017-10-16 Tom Tromey <tom@tromey.com>
3395
3396 * remote.c (remote_register_number_and_offset): Use std::vector.
3397 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3398 (putpkt_binary): Use gdb::def_vector.
3399 (compare_sections_command): Use gdb::byte_vector.
3400
a90ecff8
TT
34012017-10-16 Tom Tromey <tom@tromey.com>
3402
3403 * ppc-linux-nat.c (hwdebug_insert_point): Use
3404 gdb::unique_xmalloc_ptr, XDUP.
3405
2dc0e219
TT
34062017-10-16 Tom Tromey <tom@tromey.com>
3407
3408 * probe.c (parse_probes): Use std::string.
3409 (info_probes_for_ops, enable_probes_command)
3410 (disable_probes_command): Remove cleanups.
3411
b05628f0
TT
34122017-10-16 Tom Tromey <tom@tromey.com>
3413
3414 * buildsym.c (block_compar): Remove.
3415 (end_symtab_get_static_block): Use std::vector.
3416
a79b1bc6
SM
34172017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3418
3419 * memrange.h (struct mem_range): Define operator< and operator==.
3420 (mem_range_s): Remove.
3421 (DEF_VEC_O (mem_range_s)): Remove.
3422 (normalize_mem_ranges): Change parameter type to std::vector.
3423 * memrange.c (compare_mem_ranges): Remove.
3424 (normalize_mem_ranges): Change parameter type to std::vector,
3425 adjust to vector change.
3426 * exec.c (section_table_available_memory): Return vector, remove
3427 parameter.
3428 (section_table_read_available_memory): Adjust to std::vector
3429 change.
3430 * remote.c (remote_read_bytes): Adjust to std::vector
3431 change.
3432 * tracepoint.h (traceframe_available_memory): Change parameter
3433 type to std::vector.
3434 * tracepoint.c (traceframe_available_memory): Change parameter
3435 type to std::vector, adjust.
3436 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3437 std::vector change.
3438 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3439 unittests/memrange-selftests.c.
3440 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3441 * gdb/unittests/memrange-selftests.c: New file.
3442
63f0e930
PA
34432017-10-16 Pedro Alves <palves@redhat.com>
3444
3445 * elfread.c (probe_key_free): Rename range-for variable.
3446 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3447 (find_probe_by_pc, collect_probes): Rename range-for variable.
3448
c40c7bfc
YQ
34492017-10-16 Yao Qi <yao.qi@linaro.org>
3450
3451 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3452 * features/tic6x-c62x.c: Remove.
3453 * features/tic6x-c64x-linux.c: Remove.
3454 * features/tic6x-c64x.c: Remove.
3455 * features/tic6x-c64xp-linux.c: Remove.
3456 * features/tic6x-c64xp.c: Remove.
3457 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3458 initialize_tdesc_tic6x_*_linux functions.
3459 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3460 initialize_tdesc_tic6x_* functions.
3461
df27ae6a
YQ
34622017-10-16 Yao Qi <yao.qi@linaro.org>
3463
3464 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3465 tic6x-c62x.
3466 * regformats/tic6x-c62x.dat: Remove.
3467 * regformats/tic6x-c64x.dat: Remove.
3468 * regformats/tic6x-c64xp.dat: Remove.
3469
86766165
SM
34702017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3471
3472 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3473 (the !HAVE_LIBEXPAT version).
3474
824dfcc3
SM
34752017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3476
3477 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3478 const.
3479
2098b393
SM
34802017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3481
3482 * target.h: Include tracepoint.h.
3483 (enum trace_find_type): Move to tracepoint.h.
3484 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3485 * tracepoint.h: Don't include target.h
3486 (enum trace_find_type): Move from target.h.
3487 (parse_traceframe_info): Return a unique ptr.
3488 * tracepoint.c (current_traceframe_info): Change type to unique
3489 ptr.
3490 (free_traceframe_info): Remove.
3491 (clear_traceframe_info): Don't manually free
3492 current_traceframe_info.
3493 (free_result): Remove.
3494 (parse_traceframe_info): Return a unique ptr.
3495 (get_traceframe_info): Adjust to unique ptr.
3496 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3497 * remote.c (remote_traceframe_info): Return a unique ptr.
3498 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3499 ptr.
3500 * target-debug.h (target_debug_print_traceframe_info_up): New
3501 macro.
3502 * target-delegates.c: Regenerate.
3503
4cdd21a8
SM
35042017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3505
3506 * memrange.h (struct mem_range): Add constructors.
3507 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3508 std::vector<mem_range>.
3509 * tracepoint.c (free_traceframe_info): Don't manually free
3510 vector.
3511 (traceframe_info_start_memory): Adjust to vector change.
3512 (traceframe_available_memory): Likewise.
3513 * tracefile-tfile.c (build_traceframe_info): Likewise.
3514 * ctf.c (ctf_traceframe_info): Likewise.
3515
d0d292a2
SM
35162017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3517
3518 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3519 std::vector<int>.
3520 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3521 (traceframe_info_start_tvar): Adjust to vector change.
3522 (parse_traceframe_info): Allocate with new.
3523 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3524 vector change.
3525 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3526 change.
3527 tfile_traceframe_info): Allocate with new.
3528 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3529 change.
3530
8d3c73ef
SM
35312017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3532
3533 * tracepoint.c (traceframe_info): Rename to...
3534 (current_traceframe_info): ...this.
3535 (clear_traceframe_info): Adjust.
3536 (get_traceframe_info): Adjust.
3537
b129dcac
SM
35382017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3539
3540 * nat/linux-osdata.c: Include algorithm.
3541 (compare_processes): Remove.
3542 (struct pid_pgid_entry): New struct.
3543 (linux_xfer_osdata_processgroups): Use std::vector instead of
3544 XNEWVEC.
3545
af5bf4ad
SM
35462017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3547
3548 * objfiles.h: Don't include symfile.h.
3549 (struct partial_symbol): Remove forward-declaration.
3550 (struct objfile) <global_psymbols, static_psymbols>: Change type
3551 to std::vector<partial_symbol *>.
3552 * objfiles.c (objfile::objfile): Don't memset those fields.
3553 (objfile::~objfile): Don't free those fields.
3554 * psympriv.h (struct psymbol_allocation_list): Remove
3555 forward-declaration.
3556 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3557 to std::vector.
3558 (start_psymtab_common): Change parameters to std::vector.
3559 * psymtab.c: Include algorithm.
3560 (require_partial_symbols): Call shrink_to_fit.
3561 (find_pc_sect_psymbol): Adjust to vector change.
3562 (match_partial_symbol): Likewise.
3563 (lookup_partial_symbol): Likewise.
3564 (psym_relocate): Likewise.
3565 (dump_psymtab): Likewise.
3566 (recursively_search_psymtabs): Likewise.
3567 (compare_psymbols): Remove.
3568 (sort_pst_symbols): Adjust to vector change.
3569 (start_psymtab_common): Likewise.
3570 (end_psymtab_common): Likewise.
3571 (psymbol_bcache_full): De-constify return value.
3572 (add_psymbol_to_bcache): Likewise.
3573 (extend_psymbol_list): Remove.
3574 (append_psymbol_to_list): Adjust to vector change.
3575 (add_psymbol_to_list): Likewise.
3576 (init_psymbol_list): Likewise.
3577 (maintenance_info_psymtabs): Likewise.
3578 (maintenance_check_psymtabs): Likewise.
3579 * symfile.h (struct psymbol_allocation_list): Remove.
3580 * symfile.c (reread_symbols): Adjust to vector change.
3581 * dbxread.c (start_psymtab): Change type of parameters.
3582 (dbx_symfile_read): Adjust to vector change.
3583 (read_dbx_symtab): Likewise.
3584 (start_psymtab): Change type of parameters.
3585 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3586 (create_partial_symtab): Likewise.
3587 (add_partial_symbol): Likewise.
3588 (write_one_signatured_type): Likewise.
3589 (recursively_write_psymbols): Likewise.
3590 * mdebugread.c (parse_partial_symbols): Likewise.
3591 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3592 (scan_xcoff_symtab): Adjust to vector change.
3593 (xcoff_initial_scan): Likewise.
3594
3ec5942f
SM
35952017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3596
3597 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3598
2399fe6a
YQ
35992017-10-13 Yao Qi <yao.qi@linaro.org>
3600
3601 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3602 Remove s390x-*-expedite, add s390x-expedite.
3603
4bf3f4a8
YQ
36042017-10-13 Yao Qi <yao.qi@linaro.org>
3605
3606 * features/s390-gs-linux64.c: Regenerated.
3607 * features/s390x-gs-linux64.c: Regenerated.
3608
9e86da07
TT
36092017-10-13 Tom Tromey <tom@tromey.com>
3610
3611 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3612 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3613 delete.
3614 * symfile.c (symbol_file_add_with_addrs): Use new.
3615 (symbol_file_add_separate): Update comment.
3616 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3617 * jit.c (jit_object_close_impl): Use new.
3618 (jit_unregister_code): Use delete.
3619 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3620 (~objfile): Rename from free_objfile.
3621 (free_objfile_separate_debug, do_free_objfile_cleanup)
3622 (free_all_objfiles, objfile_purge_solibs): Use delete.
3623 * objfiles.h (struct objfile): Add constructor and destructor.
3624 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3625 (allocate_objfile, free_objfile): Don't declare.
3626 (struct objstats): Add initializers.
3627
c2508e90
SM
36282017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3629
3630 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3631 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3632 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3633 * gdbarch.h: Regenerate.
3634 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3635 Adjust comment.
3636 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3637 (i386_displaced_step_fixup): Adjust comment.
3638 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3639
a900ff72
TT
36402017-10-12 Tom Tromey <tom@tromey.com>
3641
3642 * prologue-value.h (pv_area::store_would_trash): Return bool.
3643 (pv_area::find_reg): Likewise.
3644 * prologue-value.c (pv_area::store_would_trash): Return bool.
3645 (pv_area::find_reg): Likewise.
3646
f7b7ed97
TT
36472017-10-12 Tom Tromey <tom@tromey.com>
3648
3649 * s390-linux-tdep.c (s390_store, s390_load)
3650 (s390_check_for_saved, s390_analyze_prologue): Update.
3651 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3652 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3653 * prologue-value.h (class pv_area): Move from prologue-value.c.
3654 Change names of members. Add constructor, destructor, member
3655 functions.
3656 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3657 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3658 (pv_area_fetch, pv_area_scan): Don't declare.
3659 * prologue-value.c (struct pv_area::area_entry): Now member of
3660 pv_area.
3661 (struct pv_area): Move to prologue-value.h.
3662 (pv_area::pv_area): Rename from make_pv_area.
3663 (pv_area::~pv_area): Rename from free_pv_area.
3664 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3665 (clear_entries, find_entry, overlaps, store_would_trash, store)
3666 (fetch, find_reg, scan): Now member of pv_area.
3667 Remove "area" argument. Update.
3668 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3669 Update.
3670 * mn10300-tdep.c (push_reg, check_for_saved)
3671 (mn10300_analyze_prologue): Update.
3672 * mep-tdep.c (is_arg_spill, check_for_saved)
3673 (mep_analyze_prologue): Update.
3674 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3675 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3676 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3677 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3678 Update.
3679 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3680 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3681
466eecee
SM
36822017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3683
3684 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3685 * linux-nat.c (linux_nat_delete_thread): New variable.
3686 (lwp_free): Invoke linux_nat_delete_thread if set.
3687 (linux_nat_set_delete_thread): New function.
3688 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3689 thread delete callback.
3690 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3691 (_initialize_arm_linux_nat): Assign thread delete callback.
3692 * s390-linux-nat.c (s390_delete_thread): New function.
3693 (_initialize_s390_nat): Assign thread delete callback.
3694 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3695 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3696 function.
3697 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3698 declaration.
3699 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3700 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3701
f71c8822
TT
37022017-10-09 Tom Tromey <tom@tromey.com>
3703
3704 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3705 std::string.
3706 * tui/tui-layout.c (enum tui_status): Use std::string.
3707
981a3fb3
TT
37082017-10-11 Tom Tromey <tom@tromey.com>
3709
3710 * gdbthread.h (thread_command): Constify.
3711 * inferior.h (detach_command): Constify.
3712 * top.h (set_history, show_history): Constify.
3713 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3714 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3715 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3716 * printcmd.c (set_command): Constify.
3717 (non_const_set_command): New function.
3718 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3719 * breakpoint.c (enable_command, disable_command, delete_command)
3720 (catch_command, tcatch_command, set_breakpoint_cmd)
3721 (show_breakpoint_cmd): Constify.
3722 * macrocmd.c (macro_command): Constify.
3723 * infcmd.c (unset_command, kill_command, detach_command)
3724 (info_proc_cmd): Constify.
3725 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3726 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3727 (info_auto_load_cmd): Constify.
3728 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3729 (unset_tdesc_cmd): Constify.
3730 * ada-lang.c (set_ada_command, show_ada_command)
3731 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3732 * guile/guile.c (set_guile_command, show_guile_command)
3733 (info_guile_command): Constify.
3734 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3735 Constify.
3736 * skip.c (skip_command): Constify.
3737 * compile/compile.c (_initialize_compile): Constify.
3738 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3739 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3740 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3741 (maint_btrace_pt_show_cmd): Constify.
3742 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3743 Constify.
3744 * python/python.c (user_show_python, user_set_python): Constify.
3745 * mips-tdep.c (set_mips_command, show_mips_command)
3746 (set_mipsfpu_command): Constify.
3747 * record-btrace.c (cmd_record_btrace_start)
3748 (cmd_set_record_btrace, cmd_show_record_btrace)
3749 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3750 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3751 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3752 Constify.
3753 * symfile.c (overlay_command): Constify.
3754 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3755 * cli/cli-logging.c (set_logging_command, show_logging_command):
3756 Constify.
3757 * cli/cli-dump.c (dump_command, append_command)
3758 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3759 (tekhex_dump_command, binary_dump_command)
3760 (binary_append_command): Constify.
3761 * cli/cli-decode.c (struct cmd_list_element): Change type of
3762 "fun".
3763 * cli/cli-cmds.c (info_command, show_command, set_debug)
3764 (show_debug): Constify.
3765 (show_command): Add non-const overload.
3766 * top.c (set_history, show_history): Constify.
3767 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3768 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3769 * target.c (target_command): Constify.
3770 * sparc64-tdep.c (info_adi_command): Constify.
3771 * record-full.c (cmd_record_full_start): Constify.
3772 (set_record_full_command): Constify. Fix typo.
3773 (show_record_full_command): Constify.
3774 * thread.c (thread_command, thread_apply_command): Constify.
3775 * memattr.c (dummy_cmd): Constify.
3776 * value.c (function_command): Constify.
3777 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3778 * probe.c (info_probes_command): Constify.
3779 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3780 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3781 (show_thread_cmd, set_thread_default_cmd)
3782 (show_thread_default_cmd): Constify.
3783 (check_empty): Constify.
3784 * tracepoint.c (tfind_command): Constify.
3785 * cp-support.c (maint_cplus_command): Constify.
3786 * windows-tdep.c (info_w32_command): Constify.
3787 * record.c (cmd_record_start, set_record_command)
3788 (show_record_command, info_record_command, cmd_record_goto):
3789 Constify.
3790 * ravenscar-thread.c (set_ravenscar_command)
3791 (show_ravenscar_command): Constify.
3792 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3793 Constify.
3794 (add_internal_problem_command): Remove casts.
3795 * arc-tdep.c (maintenance_print_arc_command): Constify.
3796 * valprint.c (set_print, show_print, set_print_raw)
3797 (show_print_raw): Constify.
3798 * maint.c (maintenance_command, maintenance_info_command)
3799 (maintenance_print_command, maintenance_set_cmd)
3800 (maintenance_show_cmd, set_per_command_cmd)
3801 (show_per_command_cmd, maintenance_check_command): Constify.
3802 * language.c (set_check, show_check): Constify.
3803 * typeprint.c (show_print_type, set_print_type): Constify.
3804 * go32-nat.c (go32_info_dos_command): Constify.
3805
fdf44873
TT
38062017-10-11 Tom Tromey <tom@tromey.com>
3807
3808 * breakpoint.c (prepare_re_set_context): Remove.
3809 (breakpoint_re_set_one): Update. Don't use cleanups.
3810 (breakpoint_re_set): Use scoped_restore, std::string, and
3811 scoped_restore_current_language.
3812
81b1e71c
TT
38132017-10-11 Tom Tromey <tom@tromey.com>
3814
3815 * breakpoint.c (commands_command_1): Use std::string.
3816 (cleanup_executing_breakpoints): Remove.
3817 (bpstat_do_actions_1): Use scoped_restore.
3818 (bpstat_check_watchpoint): Use std::string.
3819 (decode_static_tracepoint_spec): Likewise.
3820 (break_range_command): Likewise.
3821 (watch_command_1): Likewise.
3822 (compare_breakpoints): Change argument types.
3823 (clear_command): Use std::vector.
3824 (cleanup_executing_breakpoints): Remove.
3825 (update_global_location_list): Use unique_xmalloc_ptr.
3826 (strace_command): Remove unused declaration.
3827
4f9d9906
JB
38282017-10-11 John Baldwin <jhb@FreeBSD.org>
3829
3830 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3831 * NEWS: Mention new FreeBSD/arm native configuration.
3832 * configure.host: Add arm*-*-freebsd*.
3833 * configure.nat: Likewise.
3834 * arm-fbsd-nat.c: New file.
3835
7176dfd2
JB
38362017-10-11 John Baldwin <jhb@FreeBSD.org>
3837
3838 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3839 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3840 * NEWS: Mention new FreeBSD/arm target.
3841 * configure.tgt: Add arm*-*-freebsd*.
3842 * arm-fbsd-tdep.c: New file.
3843 * arm-fbsd-tdep.h: New file.
3844
fe220226
MR
38452017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3846
3847 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3848 `gdbarch_elfcore_write_linux_prpsinfo'.
3849 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3850 method.
3851 (elf_internal_linux_prpsinfo): Remove declaration.
3852 * gdbarch.h: Regenerate.
3853 * gdbarch.c: Regenerate.
3854
a2f63b2e
MR
38552017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3856
3857 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3858 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3859
458ca1d0
PA
38602017-10-11 Pedro Alves <palves@redhat.com>
3861
3862 * breakpoint.c (reattach_breakpoints): Delete.
3863 * breakpoint.h (reattach_breakpoints): Delete.
3864
905014d7
SM
38652017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3866
3867 * symfile.c (registered_sym_fns): Make struct, not typedef.
3868 (DEF_VEC_O (registered_sym_fns)): Remove.
3869 (symtab_fns): Change type to std::vector.
3870 (add_symtab_fns): Adjust.
3871 (find_sym_fns): Adjust.
3872
56d704da
AK
38732017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3874
3875 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3876 * arc-tdep.h (arc_arch_is_em): New function.
3877 (arc_arch_is_hs): Likewise.
3878
7fa29be9
EB
38792017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3880
3881 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3882 parentheses in the declaration.
3883 (macro_lookup_inclusion): Likewise.
3884 (macro_lookup_definition): Likewise.
3885 * p-lang.h (pascal_builtin_types): Likewise.
3886 * tui/tui-data.c (tui_win_list): Likewise.
3887 * tui/tui-data.h (tui_win_list): Likewise.
3888 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3889
d9b477e3
KB
38902017-10-11 Mark Rages <markrages@gmail.com>
3891
3892 * target-memory.c (block_boundaries): Fix for block address not
3893 aligned on block size.
3894
65630365
PA
38952017-10-10 Pedro Alves <palves@redhat.com>
3896 Tom Tromey <tom@tromey.com>
3897
3898 * breakpoint.c (struct captured_breakpoint_query_args)
3899 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3900 (print_breakpoint): New.
3901 * breakpoint.h (print_breakpoint): Declare.
3902 * common/common-exceptions.h (enum return_reason): Remove
3903 references to catch_exceptions.
3904 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3905 Delete.
3906 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3907 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3908 * gdb.h: Delete.
3909 * gdbthread.h (thread_select): Declare.
3910 * mi/mi-cmd-break.c: Don't include gdb.h.
3911 (breakpoint_notify): Use print_breakpoint.
3912 * mi/mi-cmd-catch.c: Don't include gdb.h.
3913 * mi/mi-interp.c: Don't include gdb.h.
3914 (mi_print_breakpoint_for_event): New.
3915 (mi_breakpoint_created, mi_breakpoint_modified): Use
3916 mi_print_breakpoint_for_event.
3917 * mi/mi-main.c: Don't include gdb.h.
3918 (mi_cmd_thread_select): Parse the global thread ID here. Use
3919 thread_select instead of gdb_thread_select.
3920 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3921 of using gdb_list_thread_ids.
3922 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3923 FILEIO_ENOSYS here.
3924 (remote_fileio_request): Use TRY/CATCH instead of
3925 catch_exceptions.
3926 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3927 (symbol_file_add_from_memory_wrapper): Delete.
3928 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3929 * thread.c: Don't include gdb.h.
3930 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3931 (thread_alive): Use thread_select.
3932 (do_captured_thread_select): Delete, parts salvaged as ...
3933 (thread_select): ... this new function.
3934 (gdb_thread_select): Delete.
3935
bf469271
PA
39362017-10-10 Pedro Alves <palves@redhat.com>
3937 Tom Tromey <tom@tromey.com>
3938
3939 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3940 and reverse logic.
3941 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3942 No longer macros. Instead ...
3943 (enum wp_check_result): They're now values of this new
3944 enumeration.
3945 (watchpoint_check): Change return type to wp_check_result and
3946 parameter type to bpstat.
3947 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3948 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3949 catch_errors. Reverse logic of watchpoint_check call.
3950 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3951 pointer as parameter.
3952 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3953 * common/common-exceptions.c (throw_exception_sjlj): Update
3954 comments to avoid mentioning catch_errors.
3955 * exceptions.c (catch_errors): Delete.
3956 * exceptions.h: Update comments to avoid mentioning catch_errors.
3957 (catch_errors_ftype, catch_errors): Delete.
3958 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3959 (hook_stop_stub): Delete.
3960 (restore_selected_frame): Change return type to void, and
3961 parameter type to const frame_id &.
3962 (restore_infcall_control_state): Use TRY/CATCH instead of
3963 catch_errors.
3964 * main.c (captured_command_loop): Return void and remove
3965 parameter. Remove references to catch_errors.
3966 (captured_main): Use TRY/CATCH instead of catch_errors.
3967 * objc-lang.c (objc_submethod_helper_data)
3968 (find_objc_msgcall_submethod_helper): Delete.
3969 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3970 catch_errors.
3971 * record-full.c (record_full_message): Return void.
3972 (record_full_message_args, record_full_message_wrapper): Delete.
3973 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3974 instead of catch_errors.
3975 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3976 parameter type to int.
3977 * solib-darwin.c (open_symbol_file_object): Ditto.
3978 * solib-dsbt.c (open_symbol_file_object): Ditto.
3979 * solib-frv.c (open_symbol_file_object): Ditto.
3980 * solib-svr4.c (open_symbol_file_object): Ditto.
3981 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3982 * solib.c (update_solib_list): Use TRY/CATCH instead of
3983 catch_errors.
3984 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3985 Change type.
3986 * symmisc.c (struct print_symbol_args): Remove.
3987 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3988 (print_symbol): Change type.
3989 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3990 and remove parameters.
3991 (catch_errors): New.
3992 (get_windows_debug_event): Adjust.
3993
1a56bfa5
TT
39942017-10-09 Tom Tromey <tom@tromey.com>
3995
3996 * mi/mi-main.c (free_splay_tree): Remove.
3997 (list_available_thread_groups): Use splay_tree_up.
3998 * common/gdb_splay_tree.h: New file.
3999
0c478e2d
TT
40002017-10-09 Tom Tromey <tom@tromey.com>
4001
4002 * mi/mi-main.c (do_nothing): Remove.
4003 (list_available_thread_groups): Update.
4004
cbd2b4e3
PA
40052017-10-09 Pedro Alves <palves@redhat.com>
4006
4007 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4008 reading registers when switching context.
4009
a181c0bf
JB
40102017-10-09 John Baldwin <jhb@FreeBSD.org>
4011
4012 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4013 (fbsd_convert_siginfo): Likewise.
4014 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4015
6e66f753
SM
40162017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4017
4018 * configure.ac (try_guile_versions): Remove guile-2.2.
4019 * configure: Regenerate.
4020
890e9790
TT
40212017-10-09 Tom Tromey <tom@tromey.com>
4022
4023 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4024 (COMPILE.pre): Use $(CXX).
4025
109483d9
PA
40262017-10-09 Pedro Alves <palves@redhat.com>
4027
4028 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4029 Use bool.
4030 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4031 * cp-support.h (cp_remove_params): Now returns a
4032 gdb::unique_xmalloc_ptr.
4033 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4034 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4035 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4036 returning a gdb::unique_xmalloc_ptr.
4037 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4038 * stack.c (find_frame_funname): Adjust to cp_remove_params
4039 returning a gdb::unique_xmalloc_ptr.
4040
791afaa2
TT
40412017-10-08 Tom Tromey <tom@tromey.com>
4042
4043 * dwarf2read.c (dwarf2_get_dwz_file): Use
4044 gdb::unique_xmalloc_ptr.
4045 (find_slot_in_mapped_hash): Likewise.
4046 (dwarf2_physname): Likewise.
4047 (create_dwo_unit_in_dwp_v1): Use std::string.
4048 (create_dwo_unit_in_dwp_v2): Likewise.
4049 (lookup_dwo_cutu): Likewise.
4050 (inherit_abstract_dies): Use std::vector.
4051 (read_array_type): Likewise.
4052 (dwarf_decode_macros): Remove unused declaration.
4053 (unsigned_int_compar): Remove.
4054 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4055 (psymtabs_addrmap_cleanup): Remove.
4056
30a9c02f
TT
40572017-10-08 Tom Tromey <tom@tromey.com>
4058
4059 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4060 * frame.h (frame_cleanup_after_sniffer): Declare.
4061 (frame_prepare_for_sniffer): Return void.
4062 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4063 type of argument.
4064 (frame_prepare_for_sniffer): Return void.
4065
757325a3
TT
40662017-10-08 Tom Tromey <tom@tromey.com>
4067
4068 * utils.h (make_cleanup_value_free): Remove.
4069 * utils.c (do_value_free, struct cleanup): Remove.
4070 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4071 Use gdb_value_up.
4072 * value.h (struct value_deleter): New.
4073 (gdb_value_up): New typedef.
4074
b9c04fb2
TT
40752017-10-08 Tom Tromey <tom@tromey.com>
4076
4077 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4078 (make_cleanup_free_search_symbols): Remove.
4079 (search_symbols): Return std::vector.
4080 (symbol_search::compare_search_syms): Now member of
4081 symbol_search. Change arguments.
4082 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4083 (symtab_symbol_info, rbreak_command): Update.
4084 * symtab.h (struct symbol_search) <next>: Remove.
4085 Add constructors.
4086 (symbol_search::operator<): New function.
4087 (symbol_search::operator==): New function.
4088 (search_symbols): Remove std::vector.
4089 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4090 (symbol_search::compare_search_syms): Declare.
4091
0d28b0a5
YQ
40922017-10-06 Yao Qi <yao.qi@linaro.org>
4093
4094 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4095 arch/aarch64-insn.o.
4096 Remove one rule.
4097 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4098
71917808
YQ
40992017-10-06 Yao Qi <yao.qi@linaro.org>
4100
4101 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4102 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4103 arch/arm-linux.o respectively.
4104 * configure.tgt: Likewise.
4105
2081b2b2
YQ
41062017-10-06 Yao Qi <yao.qi@linaro.org>
4107
4108 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4109 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4110
a1b85d28
PA
41112017-10-06 Pedro Alves <palves@redhat.com>
4112
4113 * windows-nat.c: Include <algorithm>.
4114
d97987e2
YQ
41152017-10-06 Yao Qi <yao.qi@linaro.org>
4116
4117 * configure.tgt (i386_tobjs): New variable.
4118 (amd64_tobjs): New variable.
4119 Set $cpu_obs and $os_obs.
4120
f38307f5
YQ
41212017-10-06 Yao Qi <yao.qi@linaro.org>
4122
4123 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4124 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4125 (clean): Remove object files and dependency files.
4126 (distclean): Remove the directory.
4127 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4128 * configure: Re-generated.
4129 * configure.tgt: Replace amd64.o with arch/amd64.o.
4130
2f924de6
JM
41312017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4132
4133 PR build/22188
4134 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4135 and SETEND.
4136
2fd9d7ca
PA
41372017-10-05 Pedro Alves <palves@redhat.com>
4138
4139 * linux-nat.c (linux_child_follow_fork): When following the parent
4140 and detaching the child, consult the parent thread's architecture
4141 instead of the child's.
4142
d13b8493
UW
41432017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4144
4145 * ax.h: Do not include "doublest.h".
4146 (union agent_val): Remove.
4147
3b4b2f16
UW
41482017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4149
4150 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4151 (decimal_to_string): Return std::string object.
4152 (decimal_from_string): Accept std::string object. Return bool.
4153 (decimal_from_integral, decimal_from_doublest): Remove.
4154 (decimal_from_longest): Add prototype.
4155 (decimal_from_ulongest): Likewise.
4156 (decimal_to_longest): Likewise.
4157 (decimal_from_doublest): Likewise.
4158 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4159 (MAX_DECIMAL_STRING): Move here.
4160 (decimal_to_string): Return std::string object.
4161 (decimal_from_string): Accept std::string object. Return bool.
4162 (decimal_from_integral): Remove, replace by ...
4163 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4164 (decimal_to_longest): New function.
4165 (decimal_from_floating): Remove, replace by ...
4166 (decimal_from_doublest): ... this new function.
4167 (decimal_to_doublest): Update to new decimal_to_string interface.
4168
4169 * value.c (unpack_long): Use decimal_to_longest.
4170 * valops.c (value_cast): Use decimal_from_doublest instead of
4171 decimal_from_floating. Use decimal_from_[u]longest isntead of
4172 decimal_from_integral.
4173 * valarith.c (value_args_as_decimal): Likewise.
4174 * valprint.c (print_decimal_floating): Update to new
4175 decimal_to_string interface.
4176 * printcmd.c (printf_decfloat): Likewise.
4177 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4178
1841ee5d
UW
41792017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4180
4181 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4182 * gdbtypes.c: Include "floatformat.h".
4183 * value.c: Likewise.
4184 * m68k-tdep.c: Likewise.
4185
4186 * findvar.c: Do not include "floatformat.h".
4187 * amd64-darwin-tdep.c: Likewise.
4188 * arm-linux-tdep.c: Likewise.
4189 * i386-darwin-tdep.c: Likewise.
4190 * i387-tdep.c: Likewise.
4191 * m68k-linux-tdep.c: Likewise.
4192 * mep-tdep.c: Likewise.
4193 * mips-tdep.c: Likewise.
4194 * nios2-tdep.c: Likewise.
4195 * s390-linux-tdep.c: Likewise.
4196 * sparc-obsd-tdep.c: Likewise.
4197 * sparc-tdep.c: Likewise.
4198 * sparc64-tdep.c: Likewise.
4199 * spu-tdep.c: Likewise.
4200 * tic6x-tdep.c: Likewise.
4201 * tilegx-tdep.c: Likewise.
4202 * vax-tdep.c: Likewise.
4203 * xstormy16-tdep.c: Likewise.
4204 * xtensa-tdep.c: Likewise.
4205
4206 * top.c: Do not include "doublest.h".
4207 * aarch64-tdep.c: Likewise.
4208 * alpha-tdep.c: Likewise.
4209 * arm-linux-tdep.c: Likewise.
4210 * m68k-linux-tdep.c: Likewise.
4211 * tilegx-tdep.c: Likewise.
4212 * xstormy16-tdep.c: Likewise.
4213
a80a6471
JB
42142017-10-05 John Baldwin <jhb@FreeBSD.org>
4215
4216 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4217 (mipsn32_fbsd_sigframe): Define.
4218 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4219 for FreeBSD/mipsn32.
4220
12c4bd7f
JB
42212017-10-05 John Baldwin <jhb@FreeBSD.org>
4222
4223 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4224 AT_HWCAP.
4225
c91933e9
TG
42262017-10-05 Tristan Gingold <tgingold@free.fr>
4227
4228 * MAINTAINERS (Misc): Update my email address.
4229
5cd63fda
PA
42302017-10-04 Pedro Alves <palves@redhat.com>
4231
4232 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4233 it instead of target_gdbarch.
4234 (get_remote_state, get_remote_packet_size): Adjust
4235 get_remote_arch_state calls, passing down target_gdbarch
4236 explicitly.
4237 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4238 'gdbarch' and use it instead of target_gdbarch.
4239 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4240 passing down target_gdbarch explicitly.
4241 (struct stop_reply) <arch>: New field.
4242 (remote_parse_stop_reply): Use the stopped thread's architecture,
4243 not the current inferior's. Save the architecture in the
4244 stop_reply.
4245 (process_stop_reply): Use the stop reply's architecture.
4246 (process_g_packet, remote_fetch_registers)
4247 (remote_prepare_to_store, store_registers_using_G)
4248 (remote_store_registers): Adjust get_remote_arch_state calls,
4249 using the regcache's architecture.
4250 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4251 passing down target_gdbarch explicitly.
4252 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4253 beneath instead of calling target_gdbarch.
4254 * target.c (default_thread_architecture): Use the specified
4255 inferior's architecture, instead of the current inferior's
4256 architecture (via target_gdbarch).
4257
ed4227b7
PA
42582017-10-04 Pedro Alves <palves@redhat.com>
4259
4260 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4261 case.
4262 (regcache_print): Handle !target_has_registers here instead.
4263
55b11ddf
PA
42642017-10-04 Pedro Alves <palves@redhat.com>
4265
4266 * frame.c (create_test_frame): Delete.
4267 * frame.h (create_test_frame): Delete.
4268 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4269 (class regcache_test): Delete.
4270 (test_target_has_registers, test_target_has_stack)
4271 (test_target_has_memory, test_target_prepare_to_store)
4272 (test_target_store_registers): New functions.
4273 (test_target_ops): New class.
4274 (register_to_value_test): Error out if there's already a
4275 process_stratum (or higher) target pushed. Create a fuller mock
4276 environment, with mock target_ops, inferior, address space, thread
4277 and inferior_ptid.
4278 * progspace.c (struct address_space): Move to ...
4279 * progspace.h (struct address_space): ... here.
4280 * regcache.h (regcache::~regcache, regcache::raw_write)
4281 [GDB_SELF_TEST]: No longer virtual.
4282
4c71c105
SM
42832017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4284
4285 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4286
73dcd72d
PA
42872017-10-04 Pedro Alves <palves@redhat.com>
4288
4289 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4290 out of 'between TRY and CATCH'.
4291
44704526
PA
42922017-10-04 Pedro Alves <palves@redhat.com>
4293
4294 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4295 * common/common-exceptions.h (TRY): Open an outermost scope.
4296 Expand intro comment.
4297 (CATCH): Reindent.
4298 (END_CATCH): Close the outermost scope.
4299 * completer.c (complete_line_internal): Add missing END_CATCH.
4300
bc3b087d
SDJ
43012017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4302
4303 * NEWS (Changes since GDB 8.0): Add entry about new
4304 'set-cwd-on-gdbserver' feature.
4305 (New remote packets): Add entry for QSetWorkingDir.
4306 * common/common-inferior.h (set_inferior_cwd): New prototype.
4307 * infcmd.c (set_inferior_cwd): Remove "static".
4308 (show_cwd_command): Expand text to include remote debugging.
4309 * remote.c: Add PACKET_QSetWorkingDir.
4310 (remote_protocol_features) <QSetWorkingDir>: New entry for
4311 PACKET_QSetWorkingDir.
4312 (extended_remote_set_inferior_cwd): New function.
4313 (extended_remote_create_inferior): Call
4314 "extended_remote_set_inferior_cwd".
4315 (_initialize_remote): Call "add_packet_config_cmd" for
4316 QSetWorkingDir.
4317
d092c5a2
SDJ
43182017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4319
4320 * NEWS (New commands): Mention "set/show cwd".
4321 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4322 "cd" command's help text.
4323 * common/common-inferior.h (get_inferior_cwd): New prototype.
4324 * infcmd.c (inferior_cwd_scratch): New global variable.
4325 (set_inferior_cwd): New function.
4326 (get_inferior_cwd): Likewise.
4327 (set_cwd_command): Likewise.
4328 (show_cwd_command): Likewise.
4329 (_initialize_infcmd): Add "set/show cwd" commands.
4330 * inferior.h (class inferior) <cwd>: New field.
4331 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4332 (fork_inferior): Change inferior's cwd before its execution.
4333 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4334 to CreateProcess.
4335
7da0a886
SDJ
43362017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4337
4338 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4339 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4340 (COMMON_OBS): Add gdb_tilde_expand.o.
4341 * common/gdb_tilde_expand.c: New file.
4342 * common/gdb_tilde_expand.h: Likewise.
4343
db8dd160
MR
43442017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4345
4346 * gdbarch.sh (objfile): Remove duplicate declaration.
4347 * gdbarch.h: Regenerate.
4348
f8bfbf22
TT
43492017-10-03 Tom Tromey <tom@tromey.com>
4350
4351 * utils.c (internal_vproblem): Use string_vprintf.
4352
5178ed48
TT
43532017-10-03 Tom Tromey <tom@tromey.com>
4354
4355 * printcmd.c (info_symbol_command): Use std::string.
4356
8cff8730
TT
43572017-10-03 Tom Tromey <tom@tromey.com>
4358
4359 * top.c (gdb_safe_append_history): Use std::string.
4360
895b8f30
TT
43612017-10-03 Tom Tromey <tom@tromey.com>
4362
4363 * event-top.c (stdin_event_handler): Update.
4364 * main.c (captured_main_1): Update.
4365 * top.h (make_delete_ui_cleanup): Remove.
4366 (struct ui): Add constructor and destructor.
4367 (new_ui, delete_ui): Remove.
4368 * top.c (make_delete_ui_cleanup): Remove.
4369 (new_ui_command): Use std::unique_ptr.
4370 (delete_ui_cleanup): Remove.
4371 (ui::ui): Rename from new_ui. Update.
4372 (free_ui): Remove.
4373 (ui::~ui): Rename from delete_ui. Update.
4374
0efef640
TT
43752017-10-03 Tom Tromey <tom@tromey.com>
4376
4377 * symfile.c (load_progress): Use gdb::byte_vector.
4378
245ad7d3
TT
43792017-10-03 Tom Tromey <tom@tromey.com>
4380
4381 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4382 declaration.
4383 * printcmd.c (x_command): Remove unused declaration.
4384 * symfile.c (symbol_file_command): Remove unused declaration.
4385
e05550d7
TT
43862017-10-03 Tom Tromey <tom@tromey.com>
4387
4388 * utils.c (internal_vproblem): Use std::string.
4389 (defaulted_query): Likewise.
4390
b95de2b7
TT
43912017-10-03 Tom Tromey <tom@tromey.com>
4392
4393 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4394 * top.c (execute_command_to_string): Update.
4395 * utils.c (make_cleanup_restore_page_info): Remove.
4396 (do_restore_page_info_cleanup): Remove.
4397 (set_batch_flag_and_restore_page_info):
4398 New.
4399 (make_cleanup_restore_page_info): Remove.
4400 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4401 (~set_batch_flag_and_restore_page_info): New
4402 (make_cleanup_restore_uinteger): Remove.
4403 (make_cleanup_restore_integer): Remove.
4404 (struct restore_integer_closure): Remove.
4405 (restore_integer): Remove.
4406 * utils.h (struct set_batch_flag_and_restore_page_info): New
4407 class.
4408 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4409 (make_cleanup_restore_page_info): Remove.
4410 (make_cleanup_restore_uinteger) Remove.
4411 (make_cleanup_restore_integer) Remove.
4412
07036511
TT
44132017-10-03 Tom Tromey <tom@tromey.com>
4414
4415 * record-full.h (record_full_gdb_operation_disable_set): Return
4416 scoped_restore_tmpl<int>.
4417 * infrun.c (adjust_pc_after_break): Update.
4418 (handle_signal_stop): Update.
4419 * record-full.c (record_full_gdb_operation_disable_set): Return
4420 scoped_restore_tmpl<int>.
4421 (record_full_wait_1, record_full_insert_breakpoint)
4422 (record_full_remove_breakpoint, record_full_save)
4423 (record_full_goto_insn): Update.
4424
45320ffa
TT
44252017-10-02 Tom Tromey <tom@tromey.com>
4426
4427 PR rust/22236:
4428 * rust-lang.c (rust_val_print_str): New function.
4429 (val_print_struct): Call it.
4430 (rust_subscript): Preserve name of slice type.
4431
b3e3859b
TT
44322017-10-02 Tom Tromey <tom@tromey.com>
4433
4434 * rust-lang.c (rust_subscript): Handle slices in
4435 EVAL_AVOID_SIDE_EFFECTS case.
4436
01af5e0d
TT
44372017-10-02 Tom Tromey <tom@tromey.com>
4438
4439 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4440
888e3ddb
TT
44412017-10-02 Tom Tromey <tom@tromey.com>
4442
4443 * rust-lang.h (rust_slice_type): Add "extern".
4444
cc536b21
PA
44452017-10-02 Tom Tromey <tom@tromey.com>
4446 Pedro Alves <palves@redhat.com>
4447
4448 * ada-lang.h (ada_exc_info::operator<): Make const.
4449 (ada_exc_info::operator==): Make const.
4450 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4451 Make const.
4452
386c8614
TT
44532017-09-29 Tom Tromey <tom@tromey.com>
4454
4455 * target.c (read_whatever_is_readable): Change type of "result".
4456 Update.
4457 (free_memory_read_result_vector): Remove.
4458 (read_memory_robust): Change return type. Update.
4459 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4460 bin2hex, std::string.
4461 * target.h (memory_read_result_s): Remove typedef.
4462 (free_memory_read_result_vector): Remove.
4463 (read_memory_robust): Return std::vector.
4464
789c4b5e
TT
44652017-09-29 Tom Tromey <tom@tromey.com>
4466
4467 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4468
ab816a27
TT
44692017-09-29 Tom Tromey <tom@tromey.com>
4470
4471 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4472 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4473 operator< and operator==.
4474 (ada_exceptions_list): Return a std::vector.
4475 * ada-lang.c (ada_exc_info::operator<): Rename from
4476 compare_ada_exception_info.
4477 (ada_exc_info::operator==): New.
4478 (sort_remove_dups_ada_exceptions_list): Change type of
4479 "exceptions".
4480 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4481 (ada_add_global_exceptions): Likewise.
4482 (ada_exceptions_list_1): Return a std::vector.
4483 (ada_exceptions_list): Likewise.
4484
52f9abe4
TT
44852017-09-29 Tom Tromey <tom@tromey.com>
4486
4487 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4488 'std::set *'.
4489 (print_one_inferior): Update.
4490 (free_vector_of_ints): Remove.
4491 (list_available_thread_groups): Change "ids" to std::set.
4492 (mi_cmd_list_thread_groups): Update.
4493 (struct collect_cores_data) <core>: Now a std::set.
4494 (collect_cores): Update.
4495 (unique): Remove.
4496 (print_one_inferior): Update.
4497
dcd5ddcc
TT
44982017-09-29 Tom Tromey <tom@tromey.com>
4499
4500 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4501 (mi_execute_async_cli_command): Likewise.
4502 (mi_cmd_trace_frame_collected): Use field_fmt.
4503
45d288cc
TT
45042017-09-29 Tom Tromey <tom@tromey.com>
4505
4506 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4507 gdb::byte_vector.
4508
6afe2f4a
TT
45092017-09-29 Tom Tromey <tom@tromey.com>
4510
4511 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4512
9813429a
TT
45132017-09-29 Tom Tromey <tom@tromey.com>
4514
4515 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4516
2d6960b4
TT
45172017-09-29 Tom Tromey <tom@tromey.com>
4518
4519 * varobj.h (varobj_gen_name): Return std::string.
4520 * varobj.c (varobj_gen_name): Return std::string.
4521 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4522 (mi_cmd_var_delete): Don't copy "name".
4523
784c453a
TT
45242017-09-29 Tom Tromey <tom@tromey.com>
4525
4526 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4527 (mi_cmd_break_insert_1): Update.
4528
a9bc57b9
TT
45292017-09-29 Tom Tromey <tom@tromey.com>
4530
4531 * target.h (make_scoped_defer_target_commit_resume): Update.
4532 * target.c (make_scoped_defer_target_commit_resume): Rename from
4533 make_cleanup_defer_target_commit_resume. Return a
4534 scoped_restore.
4535 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4536
9754d8c4
TT
45372017-09-29 Tom Tromey <tom@tromey.com>
4538
4539 * main.c (captured_main_1): Remove unused declaration.
4540 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4541
99ef965c
TT
45422017-09-29 Tom Tromey <tom@tromey.com>
4543
4544 * symtab.c (search_symbols): Remove unused outer cleanup.
4545 (make_source_files_completion_list): Remove unused declaration.
4546
42518ba7
TT
45472017-09-29 Tom Tromey <tom@tromey.com>
4548
4549 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4550
726b2169
TT
45512017-09-29 Tom Tromey <tom@tromey.com>
4552
4553 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4554 gdb::byte_vector.
4555
55b06432
TT
45562017-09-29 Tom Tromey <tom@tromey.com>
4557
4558 * complaints.c (vcomplaint): Use std::string.
4559
8abcee91
TT
45602017-09-29 Tom Tromey <tom@tromey.com>
4561
4562 * tracepoint.c (trace_variable_command): Use std::string.
4563 (encode_actions_1): Remove unused declarations.
4564 (create_tsv_from_upload): Use std::string.
4565
6ad94bc7
TT
45662017-09-29 Tom Tromey <tom@tromey.com>
4567
4568 * cp-support.c (gdb_demangle): Use std::string.
4569
2003f3d8
TT
45702017-09-29 Tom Tromey <tom@tromey.com>
4571
4572 * stack.c (parse_frame_specification): Use std::string
4573 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4574
8f8accb5
TT
45752017-09-29 Tom Tromey <tom@tromey.com>
4576
4577 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4578
200aa7b1
TT
45792017-09-29 Tom Tromey <tom@tromey.com>
4580
4581 * utils.c (vfprintf_maybe_filtered): Use std::string.
4582 (vfprintf_unfiltered): Likewise.
4583
606aae8a
TT
45842017-09-29 Tom Tromey <tom@tromey.com>
4585
4586 * event-top.c (top_level_prompt): Return std::string.
4587 (display_gdb_prompt): Update.
4588
bd413795
TT
45892017-09-29 Tom Tromey <tom@tromey.com>
4590
4591 * unittests/common-utils-selftests.c (format): New function.
4592 (string_vprintf_tests): New function.
4593 (_initialize_common_utils_selftests): Register new tests.
4594 * common/common-utils.c (string_vprintf): New function.
4595 * common/common-utils.h (string_vprintf): Declare.
4596
256642e8
PA
45972017-09-29 Pedro Alves <palves@redhat.com>
4598
4599 * common/rsp-low.c (unpack_varlen_hex): Constify.
4600 * common/rsp-low.h (unpack_varlen_hex): Constify.
4601 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4602 Constify.
4603 * remote.c (remote_set_permissions, read_ptid)
4604 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4605 (remote_static_tracepoint_marker_at)
4606 (remote_static_tracepoint_markers_by_strid)
4607 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4608 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4609 (parse_tracepoint_definition, parse_tsv_definition)
4610 (parse_static_tracepoint_marker_definition): Constify.
4611 * tracepoint.h (parse_static_tracepoint_marker_definition)
4612 (parse_trace_status, parse_tracepoint_status)
4613 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4614
b6bb3468
PA
46152017-09-29 Pedro Alves <palves@redhat.com>
4616
4617 * remote.c (target_buf, target_buf_size): Delete.
4618 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4619 Use the connection's packet buffer instead.
4620 All callers adjusted.
4621 (_initialize_remote): Remove references to target_buf and
4622 target_buf_size.
4623
b2f8eb7a
PA
46242017-09-28 Pedro Alves <palves@redhat.com>
4625
4626 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4627 unittests/common-utils-selftests.c.
4628 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4629 (COMMON_OBS): Remove utils-selftests.o.
4630 * utils-selftests.c: Move to ...
4631 * unittests/common-utils-selftests.c: ... here and rename self
4632 test to "string_printf".
4633
08302ed2
DE
46342017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4635
4636 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4637 having NULL cus or tus.
4638
96a5a1d3
UW
46392017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4640
4641 * arm-tdep.c: (convert_from_extended): Remove.
4642 (convert_to_extended): Likewise.
4643 (arm_extract_return_value): Use convert_typed_floating.
4644 (arm_store_return_value): Likewise.
4645
4646 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4647 * sh-tdep.c: Do not include "floatformat.h".
4648 (sh_littlebyte_bigword_type): New function.
4649 (sh_register_convert_to_virtual): Use convert_typed_floating.
4650 (sh_register_convert_to_raw): Likewise.
4651 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4652 (sh64_littlebyte_bigword_type): New function.
4653 (sh64_extract_return_value): Use convert_typed_floating.
4654 (sh64_register_convert_to_virtual): Likewise.
4655 (sh64_register_convert_to_raw): Likewise.
4656
0db7851f
UW
46572017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4658
4659 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4660 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4661
4662 * gdbtypes.h (union type_specific): Make field floatformat hold
4663 just a single struct floatformat, not an array.
4664 (floatformat_from_type): Move here.
4665 * gdbtypes.c (floatformat_from_type): Move here. Update to
4666 changed TYPE_FLOATFORMAT definition.
4667 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4668 (recursive_dump_type): Likewise.
4669 (init_float_type): Install correct floatformat for byte order.
4670 (arch_float_type): Likewise.
4671
77b7c781
UW
46722017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4673
4674 * gdbtypes.c (init_type): Change incoming argument from
4675 length-in-bytes to length-in-bits. Assert length is a
4676 multiple of TARGET_CHAR_BITS.
4677 (arch_type, arch_flags_type): Likewise.
4678 (init_integer_type): Update call to init_type.
4679 (init_character_type): Likewise.
4680 (init_boolean_type): Likewise.
4681 (init_float_type): Likewise.
4682 (init_decfloat_type): Likewise.
4683 (init_complex_type): Likewise.
4684 (init_pointer_type): Likewise.
4685 (objfile_type): Likewise.
4686 (arch_integer_type): Update call to arch_type.
4687 (arch_character_type): Likewise.
4688 (arch_boolean_type): Likewise.
4689 (arch_float_type): Likewise.
4690 (arch_decfloat_type): Likewise.
4691 (arch_complex_type): Likewise.
4692 (arch_pointer_type): Likewise.
4693 (gdbtypes_post_init): Likewise.
4694
4695 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4696 (read_base_type): Likewise.
4697 * mdebugread.c (basic_type): Likewise.
4698 * stabsread.c (dbx_init_float_type): Likewise.
4699 (rs6000_builtin_type): Likewise.
4700 (read_range_type): Likewise. Also, fix call to init_integer_type
4701 with erroneous length argument.
4702
4703 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4704 * d-lang.c (build_d_types): Likewise.
4705 * f-lang.c (build_fortran_types): Likewise.
4706 * go-lang.c (build_go_types): Likewise.
4707 * opencl-lang.c (build_opencl_types): Likewise.
4708 * jit.c (finalize_symtab): Likewise.
4709 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4710 (build_std_type_info_type): Likewise.
4711 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4712 update call to arch_flags_type.
4713
4714 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4715 arch_type.
4716 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4717 * windows-tdep.c (windows_get_tlb_type): Likewise.
4718
4719 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4720 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4721 * m32c-tdep.c (make_types): Likewise.
4722 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4723 (rl78_psw_type): Update call to arch_flags_type.
4724 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4725 * rx-tdep.c (rx_psw_type): Likewise.
4726 (rx_fpsw_type): Likewise.
4727 * sparc-tdep.c (sparc_psr_type): Likewise.
4728 (sparc_fsr_type): Likewise.
4729 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4730 (sparc64_ccr_type): Likewise.
4731 (sparc64_fsr_type): Likewise.
4732 (sparc64_fprs_type): Likewise.
4733
f21b4d5c
TT
47342017-09-27 Tom Tromey <tom@tromey.com>
4735
4736 * findcmd.c (find_command): Constify.
4737
643c2ffa
TT
47382017-09-27 Tom Tromey <tom@tromey.com>
4739
4740 * ada-tasks.c (task_command_1, task_command): Constify.
4741
510e5e56
TT
47422017-09-27 Tom Tromey <tom@tromey.com>
4743
4744 * symtab.c (maintenance_print_symbol_cache)
4745 (maintenance_flush_symbol_cache)
4746 (maintenance_print_symbol_cache_statistics): Constify.
4747
e503b191
TT
47482017-09-27 Tom Tromey <tom@tromey.com>
4749
4750 * inferior.c (detach_inferior_command, kill_inferior_command)
4751 (inferior_command): Constify.
4752
4e001312
TT
47532017-09-27 Tom Tromey <tom@tromey.com>
4754
4755 * regcache.c (regcache_print, maintenance_print_registers)
4756 (maintenance_print_raw_registers)
4757 (maintenance_print_cooked_registers)
4758 (maintenance_print_register_groups)
4759 (maintenance_print_remote_registers): Constify.
4760
77763700
TT
47612017-09-27 Tom Tromey <tom@tromey.com>
4762
4763 * printcmd.c (map_display_numbers, undisplay_command)
4764 (enable_disable_display_command, enable_display_command)
4765 (disable_display_command): Constify.
4766
4495129a
TT
47672017-09-27 Tom Tromey <tom@tromey.com>
4768
4769 * breakpoint.h (delete_command): Don't declare.
4770 * breakpoint.c (delete_command, enable_once_command)
4771 (enable_count_command, enable_delete_command, breakpoint_1)
4772 (maintenance_info_breakpoints, stopin_command, stopat_command)
4773 (delete_command, delete_trace_command, save_breakpoints)
4774 (save_breakpoints_command, save_tracepoints_command): Constify.
4775
3088cf40
TT
47762017-09-27 Tom Tromey <tom@tromey.com>
4777
4778 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4779 (skip_ws, extract_identifier, macro_define_command)
4780 (macro_undef_command, macro_list_command): Constify.
4781
69f476a3
TT
47822017-09-27 Tom Tromey <tom@tromey.com>
4783
4784 * infcmd.c (environment_info, set_environment_command)
4785 (unset_environment_command, path_info, info_proc_cmd_1)
4786 (info_proc_cmd_mappings, info_proc_cmd_stat)
4787 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4788 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4789
c4a3e68e
TT
47902017-09-27 Tom Tromey <tom@tromey.com>
4791
4792 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4793 Constify.
4794
c9d31bd6
TT
47952017-09-27 Tom Tromey <tom@tromey.com>
4796
4797 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4798
1f3f85eb
TT
47992017-09-27 Tom Tromey <tom@tromey.com>
4800
4801 * demangle.c (demangle_command): Constify.
4802
9c504b5d
TT
48032017-09-27 Tom Tromey <tom@tromey.com>
4804
4805 * progspace.c (maintenance_info_program_spaces_command):
4806 Constify.
4807
6663cf91
TT
48082017-09-27 Tom Tromey <tom@tromey.com>
4809
4810 * compile/compile.c (check_raw_argument, compile_file_command)
4811 (compile_code_command, compile_print_command): Constify.
4812
34e5fa26
TT
48132017-09-27 Tom Tromey <tom@tromey.com>
4814
4815 * reggroups.c (maintenance_print_reggroups): Constify.
4816
8384c356
TT
48172017-09-27 Tom Tromey <tom@tromey.com>
4818
4819 * dwarf2read.c (save_gdb_index_command): Constify.
4820
884beb0c
TT
48212017-09-27 Tom Tromey <tom@tromey.com>
4822
4823 * stap-probe.c (info_probes_stap_command): Constify.
4824
e0b2930c
TT
48252017-09-27 Tom Tromey <tom@tromey.com>
4826
4827 * fork-child.c (unset_exec_wrapper_command): Constify.
4828
f938677d
TT
48292017-09-27 Tom Tromey <tom@tromey.com>
4830
4831 * btrace.c (get_uint, get_context_size, no_chunk)
4832 (maint_btrace_packet_history_cmd)
4833 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4834 (maint_info_btrace_cmd): Constify.
4835
8949cb87
TT
48362017-09-27 Tom Tromey <tom@tromey.com>
4837
4838 * reverse.c (delete_bookmark_command): Constify.
4839
ac88e2de
TT
48402017-09-27 Tom Tromey <tom@tromey.com>
4841
4842 * remote.c (set_memory_packet_size)
4843 (set_memory_write_packet_size, show_memory_write_packet_size)
4844 (set_memory_read_packet_size, show_memory_read_packet_size)
4845 (compare_sections_command, packet_command, remote_put_command)
4846 (remote_get_command, remote_delete_command): Constify.
4847
bd4c9dfe
TT
48482017-09-27 Tom Tromey <tom@tromey.com>
4849
4850 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4851 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4852 (set_mipsfpu_auto_command): Constify.
4853
5e93d4c6
TT
48542017-09-27 Tom Tromey <tom@tromey.com>
4855
4856 * cli/cli-cmds.h (cd_command): Constify.
4857 * cli/cli-cmds.c (cd_command): Constify.
4858
fc41a75b
TT
48592017-09-27 Tom Tromey <tom@tromey.com>
4860
4861 * thread.c (thread_name_command, thread_find_command): Constify.
4862
67810076
TT
48632017-09-27 Tom Tromey <tom@tromey.com>
4864
4865 * probe.c (enable_probes_command, disable_probes_command):
4866 Constify.
4867
1d8b34a7
TT
48682017-09-27 Tom Tromey <tom@tromey.com>
4869
4870 * symfile.c (symbol_file_command): Constify.
4871 * gdbcore.h (deprecated_file_changed_hook): Constify.
4872 * exec.c (deprecated_file_changed_hook, exec_file_command)
4873 (file_command): Constify.
4874 * defs.h (symbol_file_command): Constify.
4875
442019e1
TT
48762017-09-27 Tom Tromey <tom@tromey.com>
4877
4878 * remote-fileio.c (set_system_call_allowed)
4879 (show_system_call_allowed): Constify.
4880
2983f7cb
TT
48812017-09-27 Tom Tromey <tom@tromey.com>
4882
4883 * tracepoint.c (delete_trace_variable_command)
4884 (tfind_end_command, tfind_start_command, tfind_pc_command)
4885 (tfind_tracepoint_command, tfind_line_command)
4886 (tfind_range_command, tfind_outside_command): Constify.
4887
4fd41b24
TT
48882017-09-27 Tom Tromey <tom@tromey.com>
4889
4890 * ax-gdb.c (maint_agent_printf_command, agent_command)
4891 (agent_eval_command): Constify.
4892
f2fc3015
TT
48932017-09-27 Tom Tromey <tom@tromey.com>
4894
4895 * tracepoint.c (info_scope_command): Constify.
4896 * python/python.c (gdbpy_decode_line): Constify.
4897 * python/py-breakpoint.c (bppy_init): Constify.
4898 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4899 * location.h: (new_linespec_location)
4900 (string_to_event_location_basic, string_to_event_location):
4901 Constify.
4902 * location.c (new_linespec_location)
4903 (string_to_event_location_basic, string_to_event_location):
4904 Constify.
4905 * linespec.h (decode_line_with_current_source)
4906 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4907 * linespec.c (linespec_lex_to_end)
4908 (decode_line_with_current_source)
4909 (decode_line_with_last_displayed): Constify.
4910 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4911 Constify.
4912 * cli/cli-cmds.c (edit_command, list_command): Constify.
4913 * breakpoint.h (until_break_command, watch_command_wrapper)
4914 (awatch_command_wrapper, rwatch_command_wrapper)
4915 (init_ada_exception_breakpoint): Constify.
4916 * breakpoint.c (break_command_1, dprintf_command)
4917 (break_range_command, watch_command_wrapper)
4918 (rwatch_command_wrapper, awatch_command_wrapper)
4919 (until_break_command, init_ada_exception_breakpoint)
4920 (strace_marker_create_sals_from_location, trace_command)
4921 (ftrace_command, strace_command, struct tracepoint): Constify.
4922 * ax-gdb.c (agent_command_1): Constify.
4923 * ada-lang.c (ada_exception_sal): Constify.
4924
8c2f95f4
TT
49252017-09-27 Tom Tromey <tom@tromey.com>
4926
4927 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4928 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4929 (get_context_size, no_chunk, get_insn_history_modifiers)
4930 (cmd_record_insn_history, get_call_history_modifiers)
4931 (cmd_record_call_history): Constify.
4932
a0d65762
TT
49332017-09-27 Tom Tromey <tom@tromey.com>
4934
4935 * source.c (show_substitute_path_command)
4936 (unset_substitute_path_command, set_substitute_path_command):
4937 Constify.
4938
58971144
TT
49392017-09-27 Tom Tromey <tom@tromey.com>
4940
4941 * typeprint.c (maintenance_print_type): Constify.
4942 * maint.c (maintenance_dump_me, maintenance_demangle)
4943 (maintenance_time_display, maintenance_info_sections)
4944 (maintenance_print_statistics, maintenance_deprecate)
4945 (maintenance_undeprecate): Constify.
4946 (maintenance_do_deprecate): Constify. Use std::string.
4947 (maintenance_selftest): Constify.
4948 * gdbtypes.h (maintenance_print_type): Constify.
4949
c482f52c
TT
49502017-09-27 Tom Tromey <tom@tromey.com>
4951
4952 * hppa-tdep.c (unwind_command): Constify.
4953
e100df1a
TT
49542017-09-27 Tom Tromey <tom@tromey.com>
4955
4956 * target-descriptions.c (unset_tdesc_filename_cmd)
4957 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4958 Constify.
4959
31d56ade
TT
49602017-09-27 Tom Tromey <tom@tromey.com>
4961
4962 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4963
b961da0b
TT
49642017-09-27 Tom Tromey <tom@tromey.com>
4965
4966 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4967
e2d8ae16
TT
49682017-09-27 Tom Tromey <tom@tromey.com>
4969
4970 * tui/tui-regs.c (tui_reg_command): Constify.
4971
863779b0
TT
49722017-09-27 Tom Tromey <tom@tromey.com>
4973
4974 * skip.c (skip_file_command, skip_function_command)
4975 (skip_enable_command, skip_disable_command, skip_delete_command):
4976 Constify.
4977
cdb34d4a
TT
49782017-09-27 Tom Tromey <tom@tromey.com>
4979
4980 * record-btrace.c (cmd_record_btrace_bts_start)
4981 (cmd_record_btrace_pt_start): Constify.
4982
e99c83e7
TT
49832017-09-27 Tom Tromey <tom@tromey.com>
4984
4985 * symmisc.c (maintenance_print_symbols)
4986 (maintenance_print_msymbols, maintenance_print_objfiles)
4987 (maintenance_info_symtabs, maintenance_check_symtabs)
4988 (maintenance_expand_symtabs, maintenance_info_line_tables):
4989 Constify.
4990
32faf971
TT
49912017-09-27 Tom Tromey <tom@tromey.com>
4992
4993 * top.c (new_ui_command): Constify.
4994
2cf311eb
TT
49952017-09-27 Tom Tromey <tom@tromey.com>
4996
4997 * symfile.c (add_symbol_file_command)
4998 (remove_symbol_file_command, list_overlays_command)
4999 (map_overlay_command, unmap_overlay_command)
5000 (overlay_auto_command, overlay_manual_command)
5001 (overlay_off_command, overlay_load_command): Constify.
5002
e6738699
TT
50032017-09-27 Tom Tromey <tom@tromey.com>
5004
5005 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5006 (info_spu_mailbox_command, info_spu_dma_command)
5007 (info_spu_proxydma_command): Constify.
5008
aa360cd5
TT
50092017-09-27 Tom Tromey <tom@tromey.com>
5010
5011 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5012
898241a5
TT
50132017-09-27 Tom Tromey <tom@tromey.com>
5014
5015 * cli/cli-script.c (user_defined_command): Constify.
5016
2d0ac106
TT
50172017-09-27 Tom Tromey <tom@tromey.com>
5018
5019 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5020 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5021 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5022 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5023 (dump_binary_value, append_binary_memory, append_binary_value):
5024 Constify.
5025 (struct dump_context) <func>: Constify.
5026 (add_dump_command): Update.
5027
dede02ce
TT
50282017-09-27 Tom Tromey <tom@tromey.com>
5029
5030 * cli/cli-cmds.c (show_version, show_configuration)
5031 (source_command, show_user): Constify.
5032
d3cb6b99
TT
50332017-09-27 Tom Tromey <tom@tromey.com>
5034
5035 * target.c (maintenance_print_target_stack): Constify.
5036
1970a12f
TT
50372017-09-27 Tom Tromey <tom@tromey.com>
5038
5039 * interps.c (interpreter_exec_cmd): Constify.
5040
41243651
TT
50412017-09-27 Tom Tromey <tom@tromey.com>
5042
5043 * record-full.c (cmd_record_full_restore): Constify.
5044
4465d9db
TT
50452017-09-27 Tom Tromey <tom@tromey.com>
5046
5047 * memattr.c (enable_mem_command, disable_mem_command)
5048 (delete_mem_command): Constify.
5049
ad25e423
TT
50502017-09-27 Tom Tromey <tom@tromey.com>
5051
5052 * value.c (show_convenience): Constify.
5053
d64097b1
TT
50542017-09-27 Tom Tromey <tom@tromey.com>
5055
5056 * gdbcore.h (core_file_command): Update.
5057 * corefile.c (core_file_command): Constify.
5058
4d4589ef
TT
50592017-09-27 Tom Tromey <tom@tromey.com>
5060
5061 * user-regs.c (maintenance_print_user_registers): Constify.
5062
32a7bf17
TT
50632017-09-27 Tom Tromey <tom@tromey.com>
5064
5065 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5066
4a475551
TT
50672017-09-27 Tom Tromey <tom@tromey.com>
5068
5069 * cp-support.c (first_component_command): Constify.
5070
990b9f9f
TT
50712017-09-27 Tom Tromey <tom@tromey.com>
5072
5073 * psymtab.c (maintenance_print_psymbols)
5074 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5075 Constify.
5076
c281872e
TT
50772017-09-27 Tom Tromey <tom@tromey.com>
5078
5079 * windows-tdep.c (display_tib): Constify.
5080
5b64bf74
TT
50812017-09-27 Tom Tromey <tom@tromey.com>
5082
5083 * linux-fork.c (delete_checkpoint_command)
5084 (detach_checkpoint_command): Constify.
5085
4ada038f
TT
50862017-09-27 Tom Tromey <tom@tromey.com>
5087
5088 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5089
57f5a81b
TT
50902017-09-27 Tom Tromey <tom@tromey.com>
5091
5092 * arc-tdep.c (dump_arc_instruction_command): Constify.
5093
b0a8e6c4
TT
50942017-09-27 Tom Tromey <tom@tromey.com>
5095
5096 * valprint.c (set_radix, show_radix): Constify.
5097
8d97dc1c
TT
50982017-09-27 Tom Tromey <tom@tromey.com>
5099
5100 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5101
eb7c454d
TT
51022017-09-27 Tom Tromey <tom@tromey.com>
5103
5104 * command.h (not_just_help_class_command): Update.
5105 * cli/cli-decode.h (not_just_help_class_command): Update.
5106 * cli/cli-decode.c (not_just_help_class_command): Constify.
5107
e4e33335
TT
51082017-09-27 Tom Tromey <tom@tromey.com>
5109
5110 * gdb_bfd.c (maintenance_info_bfds): Constify.
5111
0450cc4c
TT
51122017-09-27 Tom Tromey <tom@tromey.com>
5113
5114 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5115 overloads.
5116 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5117 (do_const_cfunc): New function.
5118 (cmd_cfunc_eq): New overload.
5119 (cli_user_command_p): Check do_const_cfunc.
5120 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5121 const_cfunc.
5122 * command.h (add_cmd): Add const overload and no-function
5123 overload.
5124 (set_cmd_cfunc): Add const overload.
5125 (cmd_const_cfunc_ftype): Declare.
5126 (cmd_cfunc_eq): Add const overload.
5127 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5128 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5129 overload.
5130
a9bbfbd8
TT
51312017-09-27 Tom Tromey <tom@tromey.com>
5132
5133 * macroexp.c (get_next_token_for_substitution): New function.
5134 (substitute_args): Call it. Check for __VA_OPT__.
5135
5230b05a
WT
51362017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5137 Pedro Alves <palves@redhat.com>
5138
5139 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5140 producer_is_icc_lt_14.
5141 (producer_is_icc_lt_14): New function.
5142 (check_producer): Add code for checking version of ICC.
5143 (producer_is_icc): Move to producer.c.
5144 (read_structure_type): Restrict ICC workaround to ICC<14.
5145 * producer.c: Include selftest.h.
5146 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5147 New functions.
5148 * producer.h (producer_is_icc): New declaration.
5149
b32b108a
WT
51502017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5151
5152 * Makefile.in (SFILES): Add producer.c.
5153 (COMMON_OBS): Add producer.o
5154 * amd64-tdep.c (producer.h): Add new include.
5155 * dwarf2read.c (producer.h): Add new include.
5156 * producer.c: New file.
5157 * producer.h: New file.
5158 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5159 producer.c.
5160 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5161 producer.h.
5162
5007d765
MK
51632017-09-26 Matthias Klose <doko@ubuntu.com>
5164
5165 * configure.ac: Search ncursesw before ncurses.
5166 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5167 * gdb_curses.h: Include <ncursesw/ncurses.h>
5168 * config.in, configure: Regenerate.
5169
281c4447
RO
51702017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5171
5172 PR gdb/22185
5173 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5174 obsolete.
5175 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5176 Remove i386sol2 support.
5177 * configure.nat <i386sol2>: Remove.
5178 <sol2-64>: Fold into ...
5179 <sol2>: ... this.
5180 Move common settings to default section.
5181 Add sol-thread.o.
5182 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5183 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5184 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5185 <i[34567]86-*-solaris*>: Remove.
5186 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5187
5188 * configure.ac: Remove wctype in libw check.
5189 (_MSE_INT_H): Don't define on Solaris 7-9.
5190 <solaris*>: Remove libthread_db.so.1 check.
5191 * configure: Regenerate.
5192 * config.in: Regenerate.
5193
5194 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5195 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5196 (gdb_ps_size_t): Remove.
5197 Use base types in users.
5198 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5199
5200 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5201
39b06c20
RO
52022017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5203
5204 PR build/22206
5205 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5206 (adi_is_addr_mapped): Likewise.
5207 (PSR_ICC): Don't redefine.
5208 (PSR_IMPL): Likewise.
5209
6c3e20f1
TT
52102017-09-25 Tom Tromey <tom@tromey.com>
5211
5212 * regcache.c (regcache::dump): Use string_printf.
5213
b292235f
TT
52142017-09-25 Tom Tromey <tom@tromey.com>
5215
5216 * regcache.c (class regcache_invalidator): New.
5217 (struct register_to_invalidate): Remove.
5218 (make_cleanup_regcache_invalidate): Remove.
5219 (regcache::raw_write): Use regcache_invalidator.
5220
9ac86b52
TT
52212017-09-25 Tom Tromey <tom@tromey.com>
5222
5223 * spu-tdep.c (spu2ppu_sniffer): Update.
5224 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5225 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5226 Remove.
5227 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5228 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5229 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5230 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5231 (frame_pop): Update.
5232
c0e383c6
TT
52332017-09-25 Tom Tromey <tom@tromey.com>
5234
5235 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5236 * regcache.h (regcache_xfree): Don't declare.
5237 * regcache.c (regcache_xfree): Remove.
5238 (do_regcache_xfree): Use delete.
5239 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5240 * linux-fork.c (free_fork): Use delete.
5241 (fork_save_infrun_state): Likewise.
5242 * jit.c (jit_dealloc_cache): Use delete.
5243 * infrun.c (discard_infcall_suspend_state): Use delete.
5244
791199cc
TT
52452017-09-25 Tom Tromey <tom@tromey.com>
5246
5247 * regcache.h (regcache_xmalloc): Don't declare.
5248 (regcache_raw_set_cached_value): Update comment.
5249 * regcache.c (regcache_xmalloc): Remove.
5250 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5251 * jit.c (jit_frame_sniffer): Use new.
5252 * frame.c (frame_save_as_regcache): Use new.
5253
289e23aa
AA
52542017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5255
5256 * NEWS: Advertise support for guarded-storage registers on IBM z.
5257
1b63490c
AA
52582017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5259
5260 * s390-linux-nat.c (have_regset_gs): New static variable.
5261 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5262 control block and guarded-storage broadcast control regsets.
5263 (s390_read_description): Detect whether the target has
5264 guarded-storage support, return appropriate tdesc.
5265 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5266 (features/s390x-gs-linux64.c): Likewise.
5267 (struct gdbarch_tdep) <have_gs>: New field.
5268 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5269 (s390_gsbc_regset): New variables.
5270 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5271 and s390_gsbc_regset, if applicable.
5272 (s390_core_read_description): Check whether core file was from a
5273 target with guarded-storage support; include appropriate regsets.
5274 (s390_gdbarch_init): Add registers for guarded-storage support.
5275 (_initialize_s390_tdep): Initialize new target descriptions that
5276 include registers for guarded-storage support.
5277 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5278 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5279 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5280 (S390_NUM_REGS): Adjust macro definition.
5281 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5282 (tdesc_s390x_gs_linux64): New declarations.
5283
96235dc1
AA
52842017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5285
5286 * features/s390-gs-linux64.xml: New file.
5287 * features/s390-gs.xml: New file.
5288 * features/s390-gsbc.xml: New file.
5289 * features/s390x-gs-linux64.xml: New file.
5290 * features/Makefile (WHICH): Add s390-gs-linux64 and
5291 s390x-gs-linux64.
5292 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5293 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5294 * features/s390-gs-linux64.c: New generated file.
5295 * features/s390x-gs-linux64.c: New file.
5296 * regformats/s390-gs-linux64.dat: New file.
5297 * regformats/s390x-gs-linux64.dat: New file.
5298
b4a7c699
TT
52992017-09-23 Tom Tromey <tom@tromey.com>
5300
5301 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5302
c2f97536
TT
53032017-09-22 Tom Tromey <tom@tromey.com>
5304
5305 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5306 type to scoped_restore_tmpl.
5307 <scoped_input_handler>: Initialize m_quit_handler directly.
5308
43573013
SDJ
53092017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5310
5311 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5312 (cd_command): Likewise. Free "current_directory" before
5313 assigning to it.
5314 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5315 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5316 * top.c (gdb_dirbuf): Remove global declaration.
5317 * top.h (gdb_dirbuf): Likewise.
5318
6ec2e0f5
SDJ
53192017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5320
5321 * gnulib/aclocal.m4: Regenerate.
5322 * gnulib/config.in: Regenerate.
5323 * gnulib/configure: Regenerate.
5324 * gnulib/import/Makefile.am: Regenerate.
5325 * gnulib/import/Makefile.in: Regenerate.
5326 * gnulib/import/assure.h: New file.
5327 * gnulib/import/at-func.c: Likewise
5328 * gnulib/import/chdir-long.c: New file.
5329 * gnulib/import/chdir-long.h: New file.
5330 * gnulib/import/cloexec.c: New file.
5331 * gnulib/import/cloexec.h: New file.
5332 * gnulib/import/close.c: New file.
5333 * gnulib/import/closedir.c: New file.
5334 * gnulib/import/dirent-private.h: New file.
5335 * gnulib/import/dup-safer.c: New file.
5336 * gnulib/import/dup.c: New file.
5337 * gnulib/import/dup2.c: New file.
5338 * gnulib/import/error.c: New file.
5339 * gnulib/import/error.h: New file.
5340 * gnulib/import/exitfail.c: New file.
5341 * gnulib/import/exitfail.h: New file.
5342 * gnulib/import/fchdir.c: New file.
5343 * gnulib/import/fcntl.c: New file.
5344 * gnulib/import/fcntl.in.h: New file.
5345 * gnulib/import/fd-hook.c: New file.
5346 * gnulib/import/fd-hook.h: New file.
5347 * gnulib/import/fd-safer.c: New file.
5348 * gnulib/import/fdopendir.c: New file.
5349 * gnulib/import/filename.h: New file.
5350 * gnulib/import/filenamecat-lgpl.c: New file.
5351 * gnulib/import/filenamecat.h: New file.
5352 * gnulib/import/fstat.c: New file.
5353 * gnulib/import/fstatat.c: New file.
5354 * gnulib/import/getcwd-lgpl.c: New file.
5355 * gnulib/import/getcwd.c: New file.
5356 * gnulib/import/getdtablesize.c: New file.
5357 * gnulib/import/getlogin_r.c: New file.
5358 * gnulib/import/getprogname.c: New file.
5359 * gnulib/import/getprogname.h: New file.
5360 * gnulib/import/gettext.h: New file.
5361 * gnulib/import/glob-libc.h: New file.
5362 * gnulib/import/glob.c: New file.
5363 * gnulib/import/glob.in.h: New file.
5364 * gnulib/import/intprops.h: New file.
5365 * gnulib/import/m4/chdir-long.m4: New file.
5366 * gnulib/import/m4/close.m4: New file.
5367 * gnulib/import/m4/closedir.m4: New file.
5368 * gnulib/import/m4/d-ino.m4: New file.
5369 * gnulib/import/m4/d-type.m4: New file.
5370 * gnulib/import/m4/dup.m4: New file.
5371 * gnulib/import/m4/dup2.m4: New file.
5372 * gnulib/import/m4/error.m4: New file.
5373 * gnulib/import/m4/fchdir.m4: New file.
5374 * gnulib/import/m4/fcntl.m4: New file.
5375 * gnulib/import/m4/fcntl_h.m4: New file.
5376 * gnulib/import/m4/fdopendir.m4: New file.
5377 * gnulib/import/m4/filenamecat.m4: New file.
5378 * gnulib/import/m4/fstat.m4: New file.
5379 * gnulib/import/m4/fstatat.m4: New file.
5380 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5381 * gnulib/import/m4/getcwd-path-max.m4: New file.
5382 * gnulib/import/m4/getcwd.m4: New file.
5383 * gnulib/import/m4/getdtablesize.m4: New file.
5384 * gnulib/import/m4/getlogin_r.m4: New file.
5385 * gnulib/import/m4/getprogname.m4: New file.
5386 * gnulib/import/m4/glob.m4: New file.
5387 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5388 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5389 * gnulib/import/m4/mempcpy.m4: New file.
5390 * gnulib/import/m4/memrchr.m4: New file.
5391 * gnulib/import/m4/mode_t.m4: New file.
5392 * gnulib/import/m4/msvc-inval.m4: New file.
5393 * gnulib/import/m4/msvc-nothrow.m4: New file.
5394 * gnulib/import/m4/open.m4: New file.
5395 * gnulib/import/m4/openat.m4: New file.
5396 * gnulib/import/m4/opendir.m4: New file.
5397 * gnulib/import/m4/readdir.m4: New file.
5398 * gnulib/import/m4/realloc.m4: New file.
5399 * gnulib/import/m4/rewinddir.m4: New file.
5400 * gnulib/import/m4/save-cwd.m4: New file.
5401 * gnulib/import/m4/strdup.m4: New file.
5402 * gnulib/import/m4/strerror.m4: New file.
5403 * gnulib/import/m4/unistd-safer.m4: New file.
5404 * gnulib/import/mempcpy.c: New file.
5405 * gnulib/import/memrchr.c: New file.
5406 * gnulib/import/msvc-inval.c: New file.
5407 * gnulib/import/msvc-inval.h: New file.
5408 * gnulib/import/msvc-nothrow.c: New file.
5409 * gnulib/import/msvc-nothrow.h: New file.
5410 * gnulib/import/open.c: New file.
5411 * gnulib/import/openat-die.c: New file.
5412 * gnulib/import/openat-priv.h: New file.
5413 * gnulib/import/openat-proc.c: New file.
5414 * gnulib/import/openat.c: New file.
5415 * gnulib/import/openat.h: New file.
5416 * gnulib/import/opendir.c: New file.
5417 * gnulib/import/pipe-safer.c: New file.
5418 * gnulib/import/readdir.c: New file.
5419 * gnulib/import/realloc.c: New file.
5420 * gnulib/import/rewinddir.c: New file.
5421 * gnulib/import/save-cwd.c: New file.
5422 * gnulib/import/save-cwd.h: New file.
5423 * gnulib/import/strdup.c: New file.
5424 * gnulib/import/strerror-override.c: New file.
5425 * gnulib/import/strerror-override.h: New file.
5426 * gnulib/import/strerror.c: New file.
5427 * gnulib/import/unistd--.h: New file.
5428 * gnulib/import/unistd-safer.h: New file.
5429 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5430 "getcwd" and "glob".
5431 * ser-tcp.c: Undefine "close" before redefining it.
5432
432ae719
SM
54332017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5434
5435 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5436 get rid of res_val.
5437
4fa7574e
RO
54382017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5439
5440 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5441 <sol2,sparc>: Likewise.
5442 <sol2-64,i386>: Likewise.
5443
5444 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5445 -Wdeprecated-declarations on *-*-solaris*.
5446 * configure: Regenerate.
5447
5448 * procfs.c: Include "nat/inferior.h".
5449 (procfs_info_proc): Fix typo.
5450
f6327dcb
KB
54512017-09-21 Kevin Buettner <kevinb@redhat.com>
5452
5453 * remote.c (vector): Include.
5454 (struct private_thread_info): Add field, thread_handle.
5455 (free_private_thread_info): Deallocate storage associated with
5456 thread handle.
5457 (get_private_info_thread): Initialize `thread_handle' field.
5458 (struct thread_item): Add field, thread_handle.
5459 (clear_threads_listing_context): Deallocate storage associated
5460 with thread handle.
5461 (start_thread): Add support for "handle" attribute.
5462 (thread_attributes): Add "handle".
5463 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5464 field.
5465 (remote_update_thread_list): Update thread_handle.
5466 (remote_thread_handle_to_thread_info): New function.
5467 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5468
fbbe5337
KB
54692017-09-21 Kevin Buettner <kevinb@redhat.com>
5470
5471 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5472 function.
5473 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5474 * python/python-internal.h (thread_object_type): Declare.
5475
e04ee09e
KB
54762017-09-21 Kevin Buettner <kevinb@redhat.com>
5477
5478 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5479 (target_thread_handle_to_thread_info): Declare.
5480 * target.c (target_thread_handle_to_thread_info): New function.
5481 * target-delegates.c: Regenerate.
5482 * gdbthread.h (find_thread_by_handle): Declare.
5483 * thread.c (find_thread_by_handle): New function.
5484 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5485 function.
5486 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5487
1e5b66ed
SM
54882017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5489
5490 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5491
ebe48ba0
SM
54922017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5493
5494 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5495
0a0bf5dc
YQ
54962017-09-21 Yao Qi <yao.qi@linaro.org>
5497
5498 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5499 to gdb_target_obs.
5500
d1b0a7bf
TT
55012017-09-20 Tom Tromey <tom@tromey.com>
5502
5503 * breakpoint.c (struct counted_command_line): Remove.
5504 (breakpoint_commands): Update.
5505 (alloc_counted_command_line, incref_counted_command_line)
5506 (decref_counted_command_line, do_cleanup_counted_command_line)
5507 (make_cleanup_decref_counted_command_line): Remove.
5508 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5509 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5510 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5511 (save_breakpoints): Update.
5512 * breakpoint.h (counted_command_line): Now a typedef to
5513 shared_ptr.
5514 (struct breakpoint) <commands>: Now a counted_command_line.
5515 (struct bpstats) <command>: Likewise.
5516
48649e1b
TT
55172017-09-20 Tom Tromey <tom@tromey.com>
5518
5519 * breakpoint.c (struct commands_info, do_map_commands_command):
5520 Remove.
5521 (commands_command_1): Update.
5522 (iterate_over_related_breakpoints): Take a function_view.
5523 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5524 (delete_command): Update.
5525 (map_breakpoint_numbers): Take a function_view.
5526 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5527 (disable_command): Update.
5528 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5529 (enable_command): Update.
5530 (struct disp_data, do_enable_breakpoint_disp)
5531 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5532 (do_map_enable_delete_breakpoint): Remove.
5533 (enable_once_command, enable_count_command, enable_delete_command)
5534 (delete_trace_variable_command): Update.
5535
04afa70c
TT
55362017-09-20 Tom Tromey <tom@tromey.com>
5537
5538 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5539 (bpstat_clear): Use delete.
5540 (bpstats): New constructors.
5541 (bpstat_copy, bpstat_stop_status): Use new.
5542 (dprintf_after_condition_true): Update.
5543 * breakpoint.h (bpstats::bpstats): Add constructors.
5544 (bpstats::~bpstats): Add destructor.
5545
c83833f4
PA
55462017-09-20 Pedro Alves <palves@redhat.com>
5547
5548 * eval.c (make_params): Delete, refactored as ...
5549 (class fake_method): ... this new type's ctor.
5550 (fake_method::~fake_method): New.
5551 (evaluate_subexp_standard): Use 'fake_method'.
5552
223ffa71
TT
55532017-09-20 Tom Tromey <tom@tromey.com>
5554
5555 * windows-nat.c (get_windows_debug_event, windows_wait)
5556 (do_initial_windows_stuff, windows_attach): Update.
5557 * utils.c (vwarning, internal_vproblem): Update.
5558 (ui_unregister_input_event_handler_cleanup)
5559 (prepare_to_handle_input): Remove.
5560 (class scoped_input_handler): New.
5561 (defaulted_query, prompt_for_continue): Update.
5562 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5563 Update.
5564 * top.c (undo_terminal_modifications_before_exit): Update.
5565 * target/target.h (target_terminal_init, target_terminal_inferior)
5566 (target_terminal_ours): Don't declare.
5567 (class target_terminal): New.
5568 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5569 (target_terminal_ours_for_output)
5570 (make_cleanup_restore_target_terminal): Don't declare.
5571 (target_terminal_info): Remove.
5572 * target.c (enum terminal_state, terminal_state): Remove.
5573 (target_terminal::terminal_state): Define.
5574 (target_terminal::init): Rename from target_terminal_init.
5575 (target_terminal::inferior): Rename from
5576 target_terminal_inferior.
5577 (target_terminal::ours): Rename from target_terminal_ours.
5578 (target_terminal::ours_for_output): Rename from
5579 target_terminal_ours_for_output.
5580 (target_terminal::info): New method.
5581 (cleanup_restore_target_terminal)
5582 (make_cleanup_restore_target_terminal): Remove.
5583 * solib.c (handle_solib_event): Update.
5584 * remote.c (remote_serial_quit_handler): Update.
5585 (remote_terminal_inferior, remote_wait_as): Update.
5586 * record-full.c (record_full_wait_1): Update.
5587 * nto-procfs.c (procfs_create_inferior): Update.
5588 * nat/fork-inferior.c (startup_inferior): Update.
5589 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5590 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5591 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5592 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5593 (mi_breakpoint_created, mi_breakpoint_deleted)
5594 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5595 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5596 (mi_user_selected_context_changed, report_initial_inferior):
5597 Update.
5598 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5599 (linux_nat_terminal_inferior): Update.
5600 * infrun.c (follow_fork_inferior)
5601 (handle_vfork_child_exec_or_exit, do_target_resume)
5602 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5603 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5604 Update.
5605 * inflow.c (child_terminal_init, info_terminal_command): Update.
5606 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5607 (attach_command): Update.
5608 * infcall.c (call_thread_fsm_should_stop): Update.
5609 * gnu-nat.c (gnu_attach): Update.
5610 * extension.c (struct active_ext_lang_state)
5611 (restore_active_ext_lang): Update.
5612 * exceptions.c (print_flush): Update.
5613 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5614 (struct quit_handler_cleanup_data, restore_quit_handler)
5615 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5616 Remove.
5617 * cp-support.c (gdb_demangle): Update.
5618 * breakpoint.c (update_inserted_breakpoint_locations)
5619 (insert_breakpoint_locations, handle_jit_event)
5620 (disable_breakpoints_in_unloaded_shlib): Update.
5621 * annotate.c (annotate_breakpoints_invalid)
5622 (annotate_frames_invalid): Update.
5623
013af3fc
TT
56242017-09-20 Tom Tromey <tom@tromey.com>
5625
5626 * main.c (catch_command_errors): Rename from
5627 catch_command_errors_const.
5628 (captured_main_1): Update.
5629
06871ae8
PA
56302017-09-20 Pedro Alves <palves@redhat.com>
5631
5632 * cli/cli-cmds.c (list_command): Use print_sal_location.
5633 (print_sal_location): New function.
5634 (ambiguous_line_spec): Use print_sal_location.
5635 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5636 * symtab.c (find_function_start_sal): Likewise.
5637 * symtab.h (symtab_and_line::symbol): New field.
5638
e5f25bc5
PA
56392017-09-20 Pedro Alves <palves@redhat.com>
5640
5641 * linespec.c (minsym_found): Handle non-text minsyms.
5642 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5643
1b7fa39e
WT
56442017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5645
5646 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5647 backslash.
5648
37dd0825
WT
56492017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5650
5651 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5652 vmovups instead vmovaps.
5653 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5654
4e5a4f58
JB
56552017-09-19 John Baldwin <jhb@FreeBSD.org>
5656
5657 * NEWS (Changes since GDB 8.0): Add starti.
5658 * infcmd.c (enum run_break): New.
5659 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5660 case.
5661 (run_command): Use enum run_how.
5662 (start_command): Likewise.
5663 (starti_command): New function.
5664 (RUN_ARGS_HELP): New macro.
5665 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5666 commands. Add starti command.
5667
aa70c9f1
YQ
56682017-09-19 Yao Qi <yao.qi@linaro.org>
5669
5670 * Makefile.in (monitor.o): Remove the rule.
5671
d6541620
YQ
56722017-09-19 Yao Qi <yao.qi@linaro.org>
5673
5674 * annotate.h (struct annotate_arg_emitter): Use
5675 DISABLE_COPY_AND_ASSIGN.
5676 * common/refcounted-object.h (refcounted_object): Likewise.
5677 * completer.h (struct completion_result): Likewise.
5678 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5679 * filename-seen-cache.h (filename_seen_cache): Likewise.
5680 * gdbcore.h (thread_section_name): Likewise.
5681 * gdb_regex.h (compiled_regex): Likewise.
5682 * gdbthread.h (scoped_restore_current_thread): Likewise.
5683 * inferior.h (scoped_restore_current_inferior): Likewise.
5684 * jit.c (jit_reader): Likewise.
5685 * linespec.h (struct linespec_result): Likewise.
5686 * mi/mi-parse.h (struct mi_parse): Likewise.
5687 * nat/fork-inferior.c (execv_argv): Likewise.
5688 * progspace.h (scoped_restore_current_program_space): Likewise.
5689 * python/python-internal.h (class gdbpy_enter): Likewise.
5690 * regcache.h (regcache): Likewise.
5691 * target-descriptions.c (struct tdesc_reg): Likewise.
5692 (struct tdesc_type): Likewise.
5693 (struct tdesc_feature): Likewise.
5694 * ui-out.h (ui_out_emit_type): Likewise.
5695
0615127c
SM
56962017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5697
5698 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5699 label abort_expression.
5700
5e187554
SM
57012017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5702
5703 * common/buffer.c (buffer_xml_printf): Adjust.
5704 * common/xml-utils.c (xml_escape_text): Change return type to
5705 std::string, update code accordingly.
5706 * common/xml-utils.h (xml_escape_text): Change return type to
5707 std::string.
5708 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5709 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5710 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5711 Adjust.
5712
c3d7b541
SM
57132017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5714
5715 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5716 (SUBDIR_UNITTESTS_OBS): Add new object file.
5717 * unittests/xml-utils-selftests.c: New file.
5718
1526853e
SM
57192017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5720
5721 * common/selftest.h (selftest): New struct/interface.
5722 (register_test): Add name parameter, add new overload.
5723 (run_tests): Add filter parameter.
5724 (for_each_selftest_ftype): New typedef.
5725 (for_each_selftest): New declaration.
5726 * common/selftest.c (tests): Change type to
5727 map<string, unique_ptr<selftest>>.
5728 (simple_selftest): New struct.
5729 (register_test): New function.
5730 (register_test): Add name parameter and use it.
5731 (run_tests): Add filter parameter and use it. Add prints.
5732 Adjust to vector -> map change.
5733 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5734 registering selftests.
5735 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5736 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5737 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5738 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5739 * findvar.c (_initialize_findvar): Likewise.
5740 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5741 * maint.c (maintenance_selftest): Update call to run_tests.
5742 (maintenance_info_selftests): New function.
5743 (_initialize_maint_cmds): Register "maintenance info selftests"
5744 command. Update "maintenance selftest" doc.
5745 * regcache.c (_initialize_regcache): Add names when registering
5746 selftests.
5747 * rust-exp.y (_initialize_rust_exp): Likewise.
5748 * selftest-arch.c (gdbarch_selftest): New struct.
5749 (gdbarch_tests): Remove.
5750 (register_test_foreach_arch): Add name parameter. Call
5751 register_test.
5752 (tests_with_arch): Remove, move most content to
5753 gdbarch_selftest::operator().
5754 (_initialize_selftests_foreach_arch): Remove.
5755 * selftest-arch.h (register_test_foreach_arch): Add name
5756 parameter.
5757 (run_tests_with_arch): New declaration.
5758 * utils-selftests.c (_initialize_utils_selftests): Add names
5759 when registering selftests.
5760 * utils.c (_initialize_utils): Likewise.
5761 * unittests/array-view-selftests.c
5762 (_initialize_array_view_selftests): Likewise.
5763 * unittests/environ-selftests.c (_initialize_environ_selftests):
5764 Likewise.
5765 * unittests/function-view-selftests.c
5766 (_initialize_function_view_selftests): Likewise.
5767 * unittests/offset-type-selftests.c
5768 (_initialize_offset_type_selftests): Likewise.
5769 * unittests/optional-selftests.c
5770 (_initialize_optional_selftests): Likewise.
5771 * unittests/scoped_restore-selftests.c
5772 (_initialize_scoped_restore_selftests): Likewise.
5773 * NEWS: Document "maintenance selftest" and "maint info
5774 selftests".
5775
5846367a
SM
57762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5777
5778 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5779 scoped_restore.
5780
bd77e8ff
SM
57812017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5782
5783 * mi/mi-main.c (mi_load_progress): Make uiout variable
5784 a unique_ptr.
5785
26a67918
PA
57862017-09-15 Pedro Alves <palves@redhat.com>
5787
5788 * compile/compile-c-types.c (convert_enum, convert_int)
5789 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5790
3f8a7804
SM
57912017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5792
5793 * dwarf2read.c (copy_string): Remove.
5794 (parse_macro_definition): Replace copy_string with savestring.
5795
8d200706
YQ
57962017-09-15 Yao Qi <yao.qi@linaro.org>
5797
5798 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5799 gdb_target_obs.
5800 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5801 Likewise.
5802 (i[34567]86-*-linux*): Likewise.
5803
d185219d
SM
58042017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5805
5806 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5807 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5808 <stack>: Change type to std::vector.
5809 <stack_len, stack_allocated>: Remove.
5810 <grow_stack>: Remove.
5811 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5812 (dwarf_expr_context::~dwarf_expr_context): Remove.
5813 (dwarf_expr_context::grow_stack): Remove.
5814 (dwarf_expr_context::push): Adjust.
5815 (dwarf_expr_context::pop): Adjust.
5816 (dwarf_expr_context::fetch): Adjust.
5817 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5818 (dwarf_expr_context::stack_empty_p): Adjust.
5819 (dwarf_expr_context::execute_stack_op): Adjust.
5820
eccd80d6
SM
58212017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5822
5823 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5824 return type to bool.
5825 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5826
69009882
SM
58272017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5828
5829 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5830 Change type to bool.
5831 (dwarf_stack_value) <in_stack_memory>: Likewise.
5832 (dwarf_expr_context) <push_address>: Change parameter type to
5833 bool.
5834 <fetch_in_stack_memory>: Change return type to bool.
5835 <push>: Change parameter type to bool.
5836 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5837 to bool.
5838 (dwarf_expr_context::push_address): Likewise.
5839 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5840 to bool.
5841 (dwarf_expr_context::execute_stack_op): Adjust.
5842 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5843
1e467161
SM
58442017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5845
5846 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5847 (struct dwarf_expr_context) <n_pieces>: Remove.
5848 <pieces>: Change type to std::vector.
5849 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5850 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5851 pieces.
5852 (dwarf_expr_context::add_piece): Adjust.
5853 * dwarf2loc.c (struct piece_closure): Initialize fields.
5854 <n_pieces>: Remove.
5855 <pieces>: Change type to std::vector.
5856 (allocate_piece_closure): Adjust, change parameter to
5857 std::vector rvalue and std::move it to piece_closure.
5858 (rw_pieced_value): Adjust.
5859 (check_pieced_synthetic_pointer): Adjust.
5860 (indirect_synthetic_pointer): Adjust.
5861 (coerce_pieced_ref): Adjust.
5862 (free_pieced_value_closure): Adjust. Use delete to free
5863 piece_closure.
5864 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5865 to allocate_piece_closure.
5866 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5867
0782db84
SM
58682017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5869
5870 * probe.h (probe_ops_cp): Remove typedef.
5871 (DEF_VEC_P (probe_ops_cp)): Remove.
5872 (all_probe_ops): Change type to std::vector.
5873 * probe.c (info_probes_for_ops): Adjust to vector change.
5874 (probe_linespec_to_ops): Likewise.
5875 (all_probe_ops): Change type to std::vector.
5876 (_initialize_probe): Adjust to vector change.
5877 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5878 * elfread.c (elf_get_probes): Likewise.
5879 * stap-probe.c (_initialize_stap_probe): Likewise.
5880
1eac6bea
SM
58812017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5882
5883 * probe.h (struct bound_probe): Define constructors.
5884 * probe.c (bound_probe_s): Remove typedef.
5885 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5886 (collect_probes): Change return type to std::vector, remove
5887 cleanup.
5888 (compare_probes): Return bool, change parameter type. Change
5889 semantic to "less than".
5890 (gen_ui_out_table_header_info): Change parameter to std::vector
5891 and update.
5892 (exists_probe_with_pops): Likewise.
5893 (info_probes_for_ops): Update to std::vector change.
5894 (enable_probes_command): Likewise.
5895 (disable_probes_command): Likewise.
5896
aaa63a31
SM
58972017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5898
5899 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5900 vec to std::vector.
5901 * probe.c (parse_probes_in_pspace): Update.
5902 (find_probes_in_objfile): Update.
5903 (find_probe_by_pc): Update.
5904 (collect_probes): Update.
5905 (probe_any_get_probes): Update.
5906 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5907 return type to reference to std::vector.
5908 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5909 std::vector and update.
5910 (dtrace_process_dof): Likewise.
5911 (dtrace_get_probes): Likewise.
5912 * elfread.c (elf_get_probes): Change return type to std::vector,
5913 store an std::vector in bfd_data.
5914 (probe_key_free): Update to std::vector.
5915 * stap-probe.c (handle_stap_probe): Change parameter to
5916 std::vector and update.
5917 (stap_get_probes): Likewise.
5918 * symfile-debug.c (debug_sym_get_probes): Change return type to
5919 std::vector and update.
5920
cb85b21b
TT
59212017-09-11 Tom Tromey <tom@tromey.com>
5922
5923 * breakpoint.c (program_breakpoint_here_p): Update.
5924 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5925 from make_show_memory_breakpoints_cleanup. Return a
5926 scoped_restore_tmpl<int>.
5927 (restore_show_memory_breakpoints): Remove.
5928 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5929 * mem-break.c (memory_validate_breakpoint): Update.
5930 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5931 (ia64_memory_remove_breakpoint): Update.
5932 (ia64_breakpoint_from_pc): Update.
5933 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5934 from make_show_memory_breakpoints_cleanup.
5935
8fbc99ef
TT
59362017-09-11 Tom Tromey <tom@tromey.com>
5937
5938 * d-namespace.c (d_lookup_symbol): Use std::string.
5939 (find_symbol_in_baseclass): Likewise.
5940
50feb4bd
TT
59412017-09-11 Tom Tromey <tom@tromey.com>
5942
5943 * ctf.c (ctf_start): Use std::string.
5944
c6dc63a1
TT
59452017-09-11 Tom Tromey <tom@tromey.com>
5946
5947 * ada-lang.c (is_known_support_routine): Update.
5948 (ada_unhandled_exception_name_addr_from_raise): Update.
5949 * guile/scm-frame.c (gdbscm_frame_name): Update.
5950 * python/py-frame.c (frapy_name): Update.
5951 (frapy_function): Update.
5952 * stack.h (find_frame_funname): Update.
5953 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5954 (print_frame): Update.
5955
d6b9b80f
TT
59562017-09-11 Tom Tromey <tom@tromey.com>
5957
5958 * findcmd.c (put_bits): Take a gdb::byte_vector.
5959 (parse_find_args): Return gdb::byte_vector. "args" now const.
5960 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5961 cleanups.
5962 (find_command): Update.
5963
a9921622
TT
59642017-09-11 Tom Tromey <tom@tromey.com>
5965
5966 * cli/cli-script.c (class scoped_restore_hook_in): New.
5967 (clear_hook_in_cleanup): Remove.
5968 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5969 scoped_restore_hook_in.
5970
be0d7abb
TT
59712017-09-11 Tom Tromey <tom@tromey.com>
5972
5973 * cli/cli-script.c (restore_interp): Remove.
5974 (read_command_lines): Use scoped_restore_interp.
5975 * interps.c (scoped_restore_interp::set_temp): Rename from
5976 interp_set_temp.
5977 * interps.h (class scoped_restore_interp): New.
5978 (interp_set_temp): Remove.
5979
00f675ff
TT
59802017-09-11 Tom Tromey <tom@tromey.com>
5981
5982 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5983 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5984 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5985 scoped_restore.
5986 (mi_cmd_break_insert_1): Update.
5987 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5988 scoped_restore.
5989
cb791d59
TT
59902017-09-11 Tom Tromey <tom@tromey.com>
5991
5992 * demangle.c (demangle_command): Update.
5993 * breakpoint.c (disable_command): Update.
5994 (enable_command): Update.
5995 (find_location_by_number): Make "number" const. Use
5996 get_number_trailer.
5997 * cli/cli-utils.c (extract_arg): Return std::string.
5998 * probe.c (parse_probe_linespec): Update. Change types.
5999 (collect_probes): Take string arguments.
6000 (parse_probe_linespec): Likewise.
6001 (info_probes_for_ops): Update.
6002 (enable_probes_command): Update.
6003 (disable_probes_command): Update.
6004 * break-catch-sig.c (catch_signal_split_args): Update.
6005 * mi/mi-parse.c (mi_parse): Update.
6006
2039bd9f
TT
60072017-09-11 Tom Tromey <tom@tromey.com>
6008
6009 * language.h (language_enum): Make argument const.
6010 * language.c (language_enum): Make argument const.
6011
f1735a53
TT
60122017-09-11 Tom Tromey <tom@tromey.com>
6013
6014 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6015 as function.
6016 (skip_to_space): Rename from skip_to_space_const.
6017 * common/common-utils.c (skip_to_space): New function.
6018 (skip_to_space): Rename from skip_to_space_const.
6019 * cli/cli-utils.h (get_number): Rename from get_number_const.
6020 (extract_arg): Rename from extract_arg_const.
6021 * cli/cli-utils.c (get_number): Rename from get_number_const.
6022 (extract_arg): Rename from extract_arg_const.
6023 (number_or_range_parser::get_number): Use ::get_number.
6024 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6025 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6026 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6027 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6028 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6029 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6030 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6031 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6032
7d221d74
TT
60332017-09-11 Tom Tromey <tom@tromey.com>
6034
6035 * python/python.c (do_start_initialization): Use
6036 py-event-types.def to initialize types.
6037 Define all object type structures.
6038 * python/python-internal.h: Don't declare event initialization
6039 functions.
6040 * python/py-threadevent.c (thread_event_object_type): Don't
6041 define.
6042 * python/py-stopevent.c (stop_event_object_type): Don't define.
6043 * python/py-signalevent.c (signal_event_object_type): Don't
6044 declare or define.
6045 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6046 (clear_objfiles_event_object_type): Don't declare or define.
6047 * python/py-infevents.c (inferior_call_pre_event_object_type)
6048 (inferior_call_post_event_object_type)
6049 (register_changed_event_object_type)
6050 (memory_changed_event_object_type): Don't declare or define.
6051 * python/py-inferior.c (new_thread_event_object_type)
6052 (new_inferior_event_object_type)
6053 (inferior_deleted_event_object_type): Don't declare or define.
6054 * python/py-exitedevent.c (exited_event_object_type): Don't
6055 declare or define.
6056 * python/py-evts.c (gdbpy_initialize_py_events): Use
6057 py-all-events.def.
6058 * python/py-events.h (thread_event_object_type): Don't declare.
6059 (events_object): Use py-all-events.def.
6060 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6061 py-event-types.def.
6062 * python/py-event-types.def: New file.
6063 * python/py-continueevent.c (create_continue_event_object): Don't
6064 declare or define.
6065 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6066 declare or define.
6067 * python/py-all-events.def: New file.
6068
35c61a1d
TT
60692017-09-11 Tom Tromey <tom@tromey.com>
6070
6071 * python/py-threadevent.c (create_thread_event_object): Return
6072 gdbpy_ref.
6073 * python/py-stopevent.h (create_stop_event_object)
6074 (create_breakpoint_event_object, create_signal_event_object):
6075 Update.
6076 * python/py-stopevent.c (create_stop_event_object): Return
6077 gdbpy_ref.
6078 (emit_stop_event): Update.
6079 * python/py-signalevent.c (create_signal_event_object): Return
6080 gdbpy_ref.
6081 * python/py-infevents.c (create_inferior_call_event_object):
6082 Update.
6083 * python/py-event.h (create_event_object)
6084 (create_thread_event_object): Update.
6085 * python/py-event.c (create_event_object): Return gdbpy_ref.
6086 * python/py-continueevent.c: Return gdbpy_ref.
6087 * python/py-bpevent.c (create_breakpoint_event_object): Return
6088 gdbpy_ref.
6089
7c96f8c1
TT
60902017-09-11 Tom Tromey <tom@tromey.com>
6091
6092 PR python/15622:
6093 * NEWS: Add entry.
6094 * python/python.c (do_start_initialization): Initialize new event
6095 types.
6096 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6097 (gdbpy_initialize_inferior_deleted_event)
6098 (gdbpy_initialize_new_thread_event): Declare.
6099 * python/py-threadevent.c (create_thread_event_object): Add option
6100 "thread" parameter.
6101 * python/py-inferior.c (new_thread_event_object_type)
6102 (new_inferior_event_object_type)
6103 (inferior_deleted_event_object_type): Declare.
6104 (python_new_inferior, python_inferior_deleted): New functions.
6105 (add_thread_object): Emit new_thread event.
6106 (gdbpy_initialize_inferior): Attach new functions to corresponding
6107 observers.
6108 (new_thread, new_inferior, inferior_deleted): Define new event
6109 types.
6110 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6111 registries.
6112 * python/py-events.h (events_object) <new_inferior,
6113 inferior_deleted, new_thread>: New fields.
6114 * python/py-event.h (create_thread_event_breakpoint): Add optional
6115 "thread" parameter.
6116
72542b8e
AB
61172017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6118
6119 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6120 check current_ui instead.
6121 (internal_vproblem): Likewise.
6122
0d64823e
SM
61232017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6124
6125 * thread.c (print_thread_info_1): Remove unnecessary calls to
6126 uiout->is_mi_like_p.
6127
eb1e02fd
TT
61282017-09-09 Tom Tromey <tom@tromey.com>
6129
6130 * namespace.h (add_using_directive): Update.
6131 * namespace.c (add_using_directive): Change type of excludes to
6132 std::vector.
6133 * dwarf2read.c (read_import_statement): Use std::vector.
6134 (read_namespace): Update.
6135 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6136
0fc21fd8
TT
61372017-09-09 Tom Tromey <tom@tromey.com>
6138
6139 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6140
49663d05
TT
61412017-09-09 Tom Tromey <tom@tromey.com>
6142
6143 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6144
0b868b60
TT
61452017-09-09 Tom Tromey <tom@tromey.com>
6146
6147 * stack.c (func_command): Use gdb::def_vector.
6148
c0470d48
TT
61492017-09-09 Tom Tromey <tom@tromey.com>
6150
6151 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6152 ui_out_emit_list, ui_out_emit_tuple.
6153 (mi_cmd_var_update): Likewise.
6154
ca5909c7
TT
61552017-09-09 Tom Tromey <tom@tromey.com>
6156
6157 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6158 ui_out_redirect_pop.
6159 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6160 ui_out_redirect_pop.
6161 * utils.c (do_ui_out_redirect_pop)
6162 (make_cleanup_ui_out_redirect_pop): Remove.
6163 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6164 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6165 * ui-out.h (ui_out_redirect_pop): New class.
6166
e6a2252a
TT
61672017-09-09 Tom Tromey <tom@tromey.com>
6168
6169 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6170 (list_available_thread_groups, mi_cmd_list_thread_groups)
6171 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6172 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6173 Likewise.
6174
393702cd
TT
61752017-09-09 Tom Tromey <tom@tromey.com>
6176
6177 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6178 ui_out_emit_tuple.
6179
76f9c9cf
TT
61802017-09-09 Tom Tromey <tom@tromey.com>
6181
6182 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6183 * stack.c (print_frame): Use ui_out_emit_tuple.
6184 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6185 (info_spu_mailbox_command, info_spu_dma_command)
6186 (info_spu_proxydma_command): Likewise.
6187 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6188 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6189 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6190 ui_out_emit_tuple.
6191 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6192
dc9fe180
TT
61932017-09-09 Tom Tromey <tom@tromey.com>
6194
6195 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6196 (class ui_out_emit_table): Update comment.
6197 * ui-out.c (do_cleanup_table_end)
6198 (make_cleanup_ui_out_table_begin_end): Remove.
6199 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6200 (info_spu_dma_cmdlist): Likewise.
6201 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6202 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6203 ui_out_emit_table.
6204
f8cc3da6
TT
62052017-09-09 Tom Tromey <tom@tromey.com>
6206
6207 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6208 ui_out_emit_list, gdb::optional.
6209
481695ed
JB
62102017-09-09 John Baldwin <jhb@FreeBSD.org>
6211
6212 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6213 prototype.
6214 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6215 prototype.
6216 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6217 prototype.
6218 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6219 * ada-exp.y: Remove _initialize_ada_exp prototype.
6220 * ada-lang.c: Remove _initialize_ada_language prototype.
6221 * ada-tasks.c: Remove _initialize_tasks prototype.
6222 * addrmap.c: Remove _initialize_addrmap prototype.
6223 * agent.c: Remove _initialize_agent prototype.
6224 * aix-thread.c: Remove _initialize_aix_thread prototype.
6225 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6226 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6227 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6228 prototype.
6229 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6230 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6231 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6232 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6233 prototype.
6234 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6235 prototype.
6236 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6237 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6238 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6239 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6240 prototype.
6241 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6242 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6243 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6244 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6245 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6246 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6247 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6248 prototype.
6249 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6250 prototype.
6251 * annotate.c: Remove _initialize_annotate prototype.
6252 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6253 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6254 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6255 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6256 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6257 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6258 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6259 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6260 prototype.
6261 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6262 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6263 * auto-load.c: Remove _initialize_auto_load prototype.
6264 * auxv.c: Remove _initialize_auxv prototype.
6265 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6266 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6267 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6268 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6269 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6270 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6271 prototype.
6272 * break-catch-throw.c: Remove _initialize_break_catch_throw
6273 prototype.
6274 * breakpoint.c: Remove _initialize_breakpoint prototype.
6275 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6276 * btrace.c: Remove _initialize_btrace prototype.
6277 * charset.c: Remove _initialize_charset prototype.
6278 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6279 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6280 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6281 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6282 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6283 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6284 * coffread.c: Remove _initialize_coffread prototype.
6285 * compile/compile.c: Remove _initialize_compile prototype.
6286 * complaints.c: Remove _initialize_complaints prototype.
6287 * completer.c: Remove _initialize_completer prototype.
6288 * copying.awk: Remove _initialize_copying prototype.
6289 * copying.c: Regenerate.
6290 * core-regset.c: Remove _initialize_core_regset prototype.
6291 * corefile.c: Remove _initialize_core prototype.
6292 * corelow.c: Remove _initialize_corelow prototype.
6293 * cp-abi.c: Remove _initialize_cp_abi prototype.
6294 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6295 * cp-support.c: Remove _initialize_cp_support prototype.
6296 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6297 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6298 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6299 * ctf.c: Remove _initialize_ctf prototype.
6300 * d-lang.c: Remove _initialize_d_language prototype.
6301 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6302 prototype.
6303 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6304 * dbxread.c: Remove _initialize_dbxread prototype.
6305 * dcache.c: Remove _initialize_dcache prototype.
6306 * demangle.c: Remove _initialize_demangler prototype.
6307 * disasm-selftests.c: Remove _initialize_disasm_selftests
6308 prototype.
6309 * disasm.c: Remove _initialize_disasm prototype.
6310 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6311 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6312 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6313 prototype.
6314 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6315 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6316 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6317 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6318 * elfread.c: Remove _initialize_elfread prototype.
6319 * exec.c: Remove _initialize_exec prototype.
6320 * extension.c: Remove _initialize_extension prototype.
6321 * f-lang.c: Remove _initialize_f_language prototype.
6322 * f-valprint.c: Remove _initialize_f_valprint prototype.
6323 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6324 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6325 * filesystem.c: Remove _initialize_filesystem prototype.
6326 * findcmd.c: Remove _initialize_mem_search prototype.
6327 * fork-child.c: Remove _initialize_fork_child prototype.
6328 * frame-base.c: Remove _initialize_frame_base prototype.
6329 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6330 * frame.c: Remove _initialize_frame prototype.
6331 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6332 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6333 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6334 * gcore.c: Remove _initialize_gcore prototype.
6335 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6336 * gdbarch.c: Regenerate.
6337 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6338 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6339 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6340 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6341 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6342 * go-lang.c: Remove _initialize_go_language prototype.
6343 * go32-nat.c: Remove _initialize_go32_nat prototype.
6344 * guile/guile.c: Remove _initialize_guile prototype.
6345 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6346 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6347 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6348 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6349 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6350 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6351 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6352 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6353 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6354 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6355 prototype.
6356 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6357 prototype.
6358 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6359 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6360 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6361 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6362 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6363 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6364 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6365 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6366 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6367 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6368 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6369 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6370 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6371 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6372 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6373 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6374 prototype.
6375 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6376 prototype.
6377 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6378 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6379 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6380 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6381 * infcall.c: Remove _initialize_infcall prototype.
6382 * infcmd.c: Remove _initialize_infcmd prototype.
6383 * inferior.c: Remove _initialize_inferiors prototype.
6384 * inflow.c: Remove _initialize_inflow prototype.
6385 * infrun.c: Remove _initialize_infrun prototype.
6386 * interps.c: Remove _initialize_interpreter prototype.
6387 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6388 * jit.c: Remove _initialize_jit prototype.
6389 * language.c: Remove _initialize_language prototype.
6390 * linux-fork.c: Remove _initialize_linux_fork prototype.
6391 * linux-nat.c: Remove _initialize_linux_nat prototype.
6392 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6393 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6394 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6395 * m2-lang.c: Remove _initialize_m2_language prototype.
6396 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6397 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6398 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6399 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6400 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6401 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6402 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6403 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6404 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6405 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6406 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6407 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6408 * machoread.c: Remove _initialize_machoread prototype.
6409 * macrocmd.c: Remove _initialize_macrocmd prototype.
6410 * macroscope.c: Remove _initialize_macroscope prototype.
6411 * maint.c: Remove _initialize_maint_cmds prototype.
6412 * mdebugread.c: Remove _initialize_mdebugread prototype.
6413 * memattr.c: Remove _initialize_mem prototype.
6414 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6415 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6416 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6417 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6418 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6419 * microblaze-linux-tdep.c: Remove
6420 _initialize_microblaze_linux_tdep prototype.
6421 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6422 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6423 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6424 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6425 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6426 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6427 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6428 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6429 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6430 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6431 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6432 prototype.
6433 * mipsread.c: Remove _initialize_mipsread prototype.
6434 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6435 prototype.
6436 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6437 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6438 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6439 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6440 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6441 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6442 prototype.
6443 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6444 * nto-procfs.c: Remove _initialize_procfs prototype.
6445 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6446 * objc-lang.c: Remove _initialize_objc_language prototype.
6447 * objfiles.c: Remove _initialize_objfiles prototype.
6448 * observer.c: Remove observer_test_first_notification_function,
6449 observer_test_second_notification_function,
6450 observer_test_third_notification_function, and
6451 _initialize_observer prototypes.
6452 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6453 * osabi.c: Remove _initialize_gdb_osabi prototype.
6454 * osdata.c: Remove _initialize_osdata prototype.
6455 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6456 * parse.c: Remove _initialize_parse prototype.
6457 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6458 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6459 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6460 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6461 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6462 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6463 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6464 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6465 * printcmd.c: Remove _initialize_printcmd prototype.
6466 * probe.c: Remove _initialize_probe prototype.
6467 * proc-api.c: Remove _initialize_proc_api prototype.
6468 * proc-events.c: Remove _initialize_proc_events prototype.
6469 * proc-service.c: Remove _initialize_proc_service prototype.
6470 * procfs.c: Remove _initialize_procfs prototype.
6471 * psymtab.c: Remove _initialize_psymtab prototype.
6472 * python/python.c: Remove _initialize_python prototype.
6473 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6474 * record-btrace.c: Remove _initialize_record_btrace prototype.
6475 * record-full.c: Remove _initialize_record_full prototype.
6476 * record.c: Remove _initialize_record prototype.
6477 * regcache.c: Remove _initialize_regcache prototype.
6478 * reggroups.c: Remove _initialize_reggroup prototype.
6479 * remote-notif.c: Remove _initialize_notif prototype.
6480 * remote-sim.c: Remove _initialize_remote_sim prototype.
6481 * remote.c: Remove _initialize_remote prototype.
6482 * reverse.c: Remove _initialize_reverse prototype.
6483 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6484 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6485 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6486 prototype.
6487 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6488 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6489 * rust-exp.y: Remove _initialize_rust_exp prototype.
6490 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6491 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6492 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6493 * score-tdep.c: Remove _initialize_score_tdep prototype.
6494 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6495 prototype.
6496 * ser-go32.c: Remove _initialize_ser_dos prototype.
6497 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6498 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6499 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6500 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6501 * serial.c: Remove _initialize_serial prototype.
6502 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6503 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6504 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6505 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6506 * skip.c: Remove _initialize_step_skip prototype.
6507 * sol-thread.c: Remove _initialize_sol_thread prototype.
6508 * solib-aix.c: Remove _initialize_solib_aix prototype.
6509 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6510 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6511 * solib-frv.c: Remove _initialize_frv_solib prototype.
6512 * solib-spu.c: Remove _initialize_spu_solib prototype.
6513 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6514 * solib-target.c: Remove _initialize_solib_target prototype.
6515 * solib.c: Remove _initialize_solib prototype.
6516 * source.c: Remove _initialize_source prototype.
6517 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6518 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6519 prototype.
6520 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6521 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6522 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6523 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6524 prototype.
6525 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6526 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6527 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6528 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6529 prototype.
6530 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6531 prototype.
6532 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6533 prototype.
6534 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6535 prototype.
6536 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6537 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6538 prototype.
6539 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6540 prototype.
6541 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6542 prototype.
6543 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6544 prototype.
6545 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6546 prototype.
6547 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6548 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6549 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6550 * stabsread.c: Remove _initialize_stabsread prototype.
6551 * stack.c: Remove _initialize_stack prototype.
6552 * stap-probe.c: Remove _initialize_stap_probe prototype.
6553 * std-regs.c: Remove _initialize_frame_reg prototype.
6554 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6555 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6556 * symfile.c: Remove _initialize_symfile prototype.
6557 * symmisc.c: Remove _initialize_symmisc prototype.
6558 * symtab.c: Remove _initialize_symtab prototype.
6559 * target-dcache.c: Remove _initialize_target_dcache prototype.
6560 * target-descriptions.c: Remove _initialize_target_descriptions
6561 prototype.
6562 * thread.c: Remove _initialize_thread prototype.
6563 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6564 prototype.
6565 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6566 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6567 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6568 prototype.
6569 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6570 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6571 * tracefile.c: Remove _initialize_tracefile prototype.
6572 * tracepoint.c: Remove _initialize_tracepoint prototype.
6573 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6574 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6575 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6576 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6577 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6578 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6579 * tui/tui.c: Remove _initialize_tui prototype.
6580 * typeprint.c: Remove _initialize_typeprint prototype.
6581 * user-regs.c: Remove _initialize_user_regs prototype.
6582 * utils.c: Remove _initialize_utils prototype.
6583 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6584 * valarith.c: Remove _initialize_valarith prototype.
6585 * valops.c: Remove _initialize_valops prototype.
6586 * valprint.c: Remove _initialize_valprint prototype.
6587 * value.c: Remove _initialize_values prototype.
6588 * varobj.c: Remove _initialize_varobj prototype.
6589 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6590 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6591 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6592 * windows-nat.c: Remove _initialize_windows_nat,
6593 _initialize_check_for_gdb_ini, and _initialize_loadable
6594 prototypes.
6595 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6596 * xcoffread.c: Remove _initialize_xcoffread prototype.
6597 * xml-support.c: Remove _initialize_xml_support prototype.
6598 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6599 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6600 prototype.
6601 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6602 prototype.
6603 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6604
a611b5cb
KS
66052017-09-08 Keith Seitz <keiths@redhat.com>
6606
6607 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6608 field.
6609
469412dd
CW
66102017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6611
6612 * f-valprint.c (f_val_print): Remove check for one byte
6613 sized integers. Remove printing of character type.
6614
a5ad232b
FP
66152017-09-08 Frank Penczek <frank.penczek@intel.com>
6616 Christoph Weinmann <christoph.t.weinmann@intel.com>
6617 Bernhard Heckel <bernhard.heckel@intel.com>
6618
6619 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6620 to maintain proper indentation when printing pointers/refs.
6621
e5014227
JB
66222017-09-07 Joel Brobecker <brobecker@adacore.com>
6623
6624 GDB 8.0.1 released.
6625
63c99141
JB
66262017-09-07 Joel Brobecker <brobecker@adacore.com>
6627
6628 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6629
69c1e056
TT
66302017-09-05 Tom Tromey <tom@tromey.com>
6631
6632 * parse.c (funcall_chain): Now a std::vector.
6633 (start_arglist, end_arglist): Simplify.
6634 (free_funcalls): Remove.
6635 (parse_exp_in_context_1): Remove cleanup.
6636
fef704bf
TT
66372017-09-05 Tom Tromey <tom@tromey.com>
6638
6639 * go-exp.y (go_parse): Don't create a cleanup.
6640
5613c585
TT
66412017-09-05 Tom Tromey <tom@tromey.com>
6642
6643 * d-exp.y (PrimaryExpression): Use std::string.
6644 (d_parse): Don't create a cleanup.
6645
eae49211
TT
66462017-09-05 Tom Tromey <tom@tromey.com>
6647
6648 * utils.c (do_clear_parser_state): Remove.
6649 (make_cleanup_clear_parser_state): Remove.
6650 * p-exp.y (pascal_parse): Use scoped_restore.
6651 * m2-exp.y (m2_parse): Use scoped_restore.
6652 * f-exp.y (f_parse): Use scoped_restore.
6653 * d-exp.y (d_parse): Use scoped_restore.
6654 * c-exp.y (c_parse): Use scoped_restore.
6655 * ada-exp.y (ada_parse): Use scoped_restore.
6656 * utils.h (make_cleanup_clear_parser_state): Remove.
6657
73b9be8b
KS
66582017-09-06 Keith Seitz <keiths@redhat.com>
6659
6660 * dwarf2read.c (dw2_linkage_name_attr): New function.
6661 (dw2_linkage_name): New function.
6662 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6663 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6664 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6665
a102602b
KR
66662017-09-06 Kamil Rytarowski <n54@gmx.com>
6667
6668 * config/djgpp/djconfig.sh: Correct shell portability issue.
6669
28ad437d
KR
66702017-09-06 Kamil Rytarowski <n54@gmx.com>
6671
6672 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6673
351787dd
JB
66742017-09-06 John Baldwin <jhb@FreeBSD.org>
6675
6676 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6677 * NEWS: Mention new FreeBSD/mips native configuration.
6678 * configure.host: Add aarch64*-*-freebsd*.
6679 * configure.nat: Likewise.
6680 * aarch64-fbsd-nat.c: New file.
6681
c0f84956
JB
66822017-09-06 John Baldwin <jhb@FreeBSD.org>
6683
6684 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6685 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6686 * NEWS: Mention new FreeBSD/aarch64 target.
6687 * configure.tgt: Add aarch64*-*-freebsd*.
6688 * aarch64-fbsd-tdep.c: New file.
6689 * aarch64-fbsd-tdep.h: New file.
6690
7610297a
KR
66912017-09-06 Kamil Rytarowski <n54@gmx.com>
6692
6693 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6694
fbd1b771
JK
66952017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6696
6697 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6698 of TLS symbols.
6699
5ca79eae
PW
67002017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6701
6702 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6703 call.
6704
bf93d7ba
SM
67052017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6706
6707 * infrun.c (follow_exec): Call add_thread after
6708 target_find_description.
6709
1bb7c059
SM
67102017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6711
6712 * infrun.c (handle_inferior_event_1): When exec'ing, read
6713 stop_pc after follow_exec.
6714
fc809827
SM
67152017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6716
6717 * remote.c (process_g_packet): Update error message.
6718
d2fcdd85
YQ
67192017-09-05 Yao Qi <yao.qi@linaro.org>
6720
6721 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6722 targets.
6723
e69570ee
PA
67242017-09-05 Pedro Alves <palves@redhat.com>
6725
6726 * eval.c (eval_call, evaluate_funcall): New functions, factored
6727 out from ...
6728 (evaluate_subexp_standard): ... this.
6729
22916b07
YQ
67302017-09-05 Yao Qi <yao.qi@linaro.org>
6731
6732 * amd64-tdep.c (amd64_target_description): Create target
6733 descriptions.
6734 (_initialize_amd64_tdep): Don't call functions
6735 initialize_tdesc_amd64_*. Add self tests.
6736 * arch/amd64.c (amd64_create_target_description): Add parameter
6737 is_linux. Call set_tdesc_osabi if is_linux is true.
6738 * arch/amd64.h (amd64_create_target_description): Update the
6739 declaration.
6740 * arch/i386.c (i386_create_target_description): Add parameter
6741 is_linux. Call set_tdesc_osabi if is_linux is true.
6742 * arch/i386.h (i386_create_target_description): Update
6743 declaration.
6744 * configure.tgt: Add i386.o to gdb_target_obs.
6745 * features/Makefile (XMLTOC): Remove i386/*.xml.
6746 * features/i386/amd64-avx-avx512.c: Remove.
6747 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6748 * features/i386/amd64-avx-mpx.c: Remove.
6749 * features/i386/amd64-avx.c: Remove.
6750 * features/i386/amd64-mpx.c: Remove.
6751 * features/i386/amd64.c: Remove.
6752 * features/i386/i386-avx-avx512.c: Remove.
6753 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6754 * features/i386/i386-avx-mpx.c: Remove.
6755 * features/i386/i386-avx.c: Remove.
6756 * features/i386/i386-mmx.c: Remove.
6757 * features/i386/i386-mpx.c: Remove.
6758 * features/i386/i386.c: Remove.
6759 * i386-tdep.c: Don't include features/i386/i386*.c., include
6760 target-descriptions.h and arch/i386.h.
6761 (i386_target_description): Create target descriptions.
6762 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6763 functions. Do self tests.
6764
0854b7b1
YQ
67652017-09-05 Yao Qi <yao.qi@linaro.org>
6766
6767 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6768 * features/i386/amd64-avx-avx512-linux.c: Removed.
6769 * features/i386/amd64-avx-linux.c: Removed.
6770 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6771 * features/i386/amd64-avx-mpx-linux.c: Removed.
6772 * features/i386/amd64-linux.c: Removed.
6773 * features/i386/amd64-mpx-linux.c: Removed.
6774 * features/i386/x32-avx-avx512-linux.c: Removed.
6775 * features/i386/x32-avx-linux.c: Removed.
6776 * features/i386/x32-linux.c: Removed.
6777
b4570e4b
YQ
67782017-09-05 Yao Qi <yao.qi@linaro.org>
6779
6780 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6781 features/i386/*.c.
6782 (amd64_linux_read_description): Call
6783 amd64_create_target_description.
6784 * arch/amd64.c: New file.
6785 * arch/amd64.h: New file.
6786 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6787 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6788
6c73f67f
YQ
67892017-09-05 Yao Qi <yao.qi@linaro.org>
6790
6791 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6792 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6793 (amd64_linux_read_description): Create target descriptions.
6794 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6795 functions. Add unit tests.
6796 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6797 x32-core.xml.
6798 * features/i386/64bit-avx.c: Generated.
6799 * features/i386/64bit-avx512.c: Generated.
6800 * features/i386/64bit-core.c: Generated.
6801 * features/i386/64bit-linux.c: Generated.
6802 * features/i386/64bit-mpx.c: Generated.
6803 * features/i386/64bit-pkeys.c: Generated.
6804 * features/i386/64bit-segments.c: Generated.
6805 * features/i386/64bit-sse.c: Generated.
6806 * features/i386/x32-core.c: Generated.
6807 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6808 c files for amd64-linux and x32-linux.
6809
9d3d478b
YQ
68102017-09-05 Yao Qi <yao.qi@linaro.org>
6811
6812 * amd64-linux-tdep.c (amd64_linux_read_description): New
6813 function.
6814 (amd64_linux_core_read_description): Call
6815 amd64_linux_read_description.
6816 (amd64_linux_init_abi): Likewise.
6817 (amd64_x32_linux_init_abi): Likewise.
6818 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6819 * x86-linux-nat.c (x86_linux_read_description): Call
6820 amd64_linux_read_description.
6821
b9f1d50f
YQ
68222017-09-05 Yao Qi <yao.qi@linaro.org>
6823
6824 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6825 comments.
6826
188c9e6d
YQ
68272017-09-05 Yao Qi <yao.qi@linaro.org>
6828
6829 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6830 * features/i386/i386-avx-avx512-linux.c: Remove.
6831 * features/i386/i386-avx-linux.c: Remove.
6832 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6833 * features/i386/i386-avx-mpx-linux.c: Remove.
6834 * features/i386/i386-linux.c: Remove.
6835 * features/i386/i386-mmx-linux.c: Remove.
6836 * features/i386/i386-mpx-linux.c: Remove.
6837
5f035c07
YQ
68382017-09-05 Yao Qi <yao.qi@linaro.org>
6839
6840 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6841 (SFILES): Add arch/i386.c.
6842 (HFILES_NO_SRCDIR): Add arch/i386.h.
6843 * arch/i386.c: New file.
6844 * arch/i386.h: New file.
6845 * arch/tdesc.h (allocate_target_description): Declare.
6846 (set_tdesc_architecture): Declare.
6847 (set_tdesc_osabi): Declare.
6848 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6849 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6850 include arch/i386.h.
6851 (i386_linux_read_description): Remove code and call
6852 i386_create_target_description.
6853 (set_tdesc_architecture): New function.
6854 (set_tdesc_osabi): New function.
6855 * target-descriptions.h (allocate_target_description): Remove.
6856
0abe8a89
YQ
68572017-09-05 Yao Qi <yao.qi@linaro.org>
6858
6859 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6860 * target-descriptions.c (tdesc_create_feature): Likewise, and
6861 adjust code.
6862 * features/i386/32bit-avx.c: Re-generated.
6863 * features/i386/32bit-avx512.c: Re-generated.
6864 * features/i386/32bit-core.c: Re-generated.
6865 * features/i386/32bit-linux.c: Re-generated.
6866 * features/i386/32bit-mpx.c: Re-generated.
6867 * features/i386/32bit-pkeys.c: Re-generated.
6868 * features/i386/32bit-sse.c: Re-generated.
6869
0a188386
YQ
68702017-09-05 Yao Qi <yao.qi@linaro.org>
6871
6872 * regformats/regdef.h (struct reg): Override operator == and !=.
6873
f49ff000
YQ
68742017-09-05 Yao Qi <yao.qi@linaro.org>
6875
6876 * arch/tdesc.h: New file.
6877 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6878 * target-descriptions.c: Update comments.
6879 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6880 declarations.
6881 * features/i386/32bit-avx.c: Re-generated.
6882 * features/i386/32bit-avx512.c: Re-generated.
6883 * features/i386/32bit-core.c: Re-generated.
6884 * features/i386/32bit-linux.c: Re-generated.
6885 * features/i386/32bit-mpx.c: Re-generated.
6886 * features/i386/32bit-pkeys.c: Re-generated.
6887 * features/i386/32bit-sse.c: Re-generated.
6888
f7000548
YQ
68892017-09-05 Yao Qi <yao.qi@linaro.org>
6890
6891 * regformats/regdat.sh: Update generated code.
6892
c9a5e2a5
YQ
68932017-09-05 Yao Qi <yao.qi@linaro.org>
6894
6895 * regformats/regdat.sh: Adjust code order.
6896
d6b687ac
SM
68972017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6898
6899 * expprint.c (dump_subexp_body_standard): Use constant format
6900 string in fprintf_filtered call.
6901
a379bfd0
JB
69022017-09-04 John Baldwin <jhb@FreeBSD.org>
6903
6904 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6905 NetBSD/i386.
6906 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6907
f7efc967
JB
69082017-09-04 John Baldwin <jhb@FreeBSD.org>
6909
6910 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6911
c49fbc6c
JB
69122017-09-04 John Baldwin <jhb@FreeBSD.org>
6913
6914 * bsd-kvm.o: Define _KMEMUSER.
6915 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6916 * configure: Regenerate.
6917
26562e73
JB
69182017-09-04 John Baldwin <jhb@FreeBSD.org>
6919
6920 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6921 * i386-fbsd-nat.c: Likewise.
6922
31cf1487
JB
69232017-09-04 John Baldwin <jhb@FreeBSD.org>
6924
6925 * unittests/array-view-selftests.c: Add include of <array>.
6926
5b9f8a7c
JB
69272017-09-04 John Baldwin <jhb@FreeBSD.org>
6928
6929 * spu-tdep.c (flush_ea_cache): Add missing argument to
6930 call_function_by_hand.
6931
d69cf9b2
PA
69322017-09-04 Pedro Alves <palves@redhat.com>
6933
6934 * NEWS (Safer support for debugging with no debug info): New.
6935
3693fdb3
PA
69362017-09-04 Pedro Alves <palves@redhat.com>
6937
6938 * c-exp.y (function_method, function_method_void): Add current
6939 instance flags to TYPE_INSTANCE.
6940 * dwarf2read.c (check_modifier): New.
6941 (compute_delayed_physnames): Assert that only C++ adds delayed
6942 physnames. Mark fn_fields as const/volatile depending on
6943 physname.
6944 * eval.c (make_params): New type_instance_flags parameter. Use
6945 it as the new type's instance flags.
6946 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6947 flags element and pass it to make_params.
6948 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6949 instance flags element.
6950 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6951 * gdbtypes.h: Include "enum-flags.h".
6952 (type_instance_flags): New enum-flags type.
6953 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6954 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6955 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6956 (follow_type_instance_flags): New function.
6957 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6958 * parser-defs.h (follow_type_instance_flags): Declare.
6959 * valops.c (value_struct_elt_for_reference): const/volatile must
6960 match too.
6961
e68cb8e0
PA
69622017-09-04 Pedro Alves <palves@redhat.com>
6963
6964 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6965 function/method scopes; lookup the nested name as a function local
6966 static variable.
6967
858be34c
PA
69682017-09-04 Pedro Alves <palves@redhat.com>
6969
6970 (%type <voidval>): Add function_method.
6971 * c-exp.y (exp): New production for calls with no arguments.
6972 (function_method, function_method_void_or_typelist): New
6973 productions.
6974 (exp): New production for "method()::static_var".
6975 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6976 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6977 Handle OP_FUNC_STATIC_VAR.
6978 * parse.c (operator_length_standard):
6979 Handle OP_FUNC_STATIC_VAR.
6980
dd5901a6
PA
69812017-09-04 Pedro Alves <palves@redhat.com>
6982
6983 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6984 handling.
6985 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6986 Ditto.
6987 * parse.c (operator_length_standard, operator_check_standard):
6988 Ditto.
6989 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6990
46a4882b
PA
69912017-09-04 Pedro Alves <palves@redhat.com>
6992
6993 * ax-gdb.c: Include "typeprint.h".
6994 (gen_expr_for_cast): New function.
6995 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6996 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6997 type is unknown.
6998 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6999 nodebug_data_symbol.
7000 * eval.c: Include "typeprint.h".
7001 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7002 Error out if symbol has unknown type.
7003 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7004 evaluate_subexp_for_cast.
7005 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7006 OP_VAR_MSYM_VALUE.
7007 (evaluate_subexp_for_cast): New function.
7008 * gdbtypes.c (init_nodebug_var_type): New function.
7009 (objfile_type): Use it to initialize types of variables with no
7010 debug info.
7011 * typeprint.c (error_unknown_type): New.
7012 * typeprint.h (error_unknown_type): New declaration.
7013 * compile/compile-c-types.c (convert_type_basic): Handle
7014 TYPE_CODE_ERROR; warn and fallback to int for variables with
7015 unknown type.
7016
fe13dfec
PA
70172017-09-04 Pedro Alves <palves@redhat.com>
7018
7019 * eval.c (evaluate_var_value): New function, factored out from ...
7020 (evaluate_subexp_standard): ... here.
7021
d008ee21
PA
70222017-09-04 Pedro Alves <palves@redhat.com>
7023
7024 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7025 Remove useless assignments to 'op'.
7026
827d0c51
PA
70272017-09-04 Pedro Alves <palves@redhat.com>
7028
7029 * eval.c (eval_skip_value): New function.
7030 (evaluate_subexp_standard): Use it.
7031
2c5a2be1
PA
70322017-09-04 Pedro Alves <palves@redhat.com>
7033
7034 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7035 function name from symbol/minsym and pass it to
7036 error_call_unknown_return_type.
7037
74ea4be4
PA
70382017-09-04 Pedro Alves <palves@redhat.com>
7039
7040 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7041 * ax-gdb.c (gen_msym_var_ref): New function.
7042 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7043 * eval.c (evaluate_var_msym_value): New function.
7044 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7045 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7046 to call_function_by_hand.
7047 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7048 Handle OP_VAR_MSYM_VALUE.
7049 (union exp_element) <msymbol>: New field.
7050 * minsyms.h (struct type): Forward declare.
7051 (find_minsym_type_and_address): Declare.
7052 * parse.c (write_exp_elt_msym): New function.
7053 (write_exp_msymbol): Delete, refactored as ...
7054 (find_minsym_type_and_address): ... this new function.
7055 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7056 (operator_length_standard, operator_check_standard): Handle
7057 OP_VAR_MSYM_VALUE.
7058 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7059
7022349d
PA
70602017-09-04 Pedro Alves <palves@redhat.com>
7061
7062 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7063 TYPE_GNU_IFUNC specially here. Throw error if return type is
7064 unknown.
7065 * ada-typeprint.c (print_func_type): Handle functions with unknown
7066 return type.
7067 * c-typeprint.c (c_type_print_base): Handle functions and methods
7068 with unknown return type.
7069 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7070 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7071 * compile/compile-c-types.c: Include "objfiles.h".
7072 (convert_func): For functions with unknown return type, warn and
7073 default to int.
7074 * compile/compile-object-run.c (compile_object_run): Adjust call
7075 to call_function_by_hand_dummy.
7076 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7077 call_function_by_hand.
7078 * eval.c (evaluate_subexp_standard): Adjust calls to
7079 call_function_by_hand. Handle functions and methods with unknown
7080 return type. Pass expect_type to call_function_by_hand.
7081 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7082 return type.
7083 * gcore.c (call_target_sbrk): Adjust call to
7084 call_function_by_hand.
7085 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7086 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7087 an integer address type instead of nodebug.
7088 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7089 call_function_by_hand.
7090 * infcall.c (error_call_unknown_return_type): New function.
7091 (call_function_by_hand): New "default_return_type" parameter.
7092 Pass it down.
7093 (call_function_by_hand_dummy): New "default_return_type"
7094 parameter. Use it instead of defaulting to int. If there's no
7095 default and the return type is unknown, throw an error. If
7096 there's a default return type, and the called function has no
7097 debug info, then assume the function is prototyped.
7098 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7099 New "default_return_type" parameter.
7100 (error_call_unknown_return_type): New declaration.
7101 * linux-fork.c (call_lseek): Cast return type of lseek.
7102 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7103 call_function_by_hand.
7104 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7105 calls to call_function_by_hand.
7106 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7107 return type.
7108 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7109 (value_nsstring, print_object_command): Adjust calls to
7110 call_function_by_hand.
7111 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7112 functions with unknown return type.
7113 (pascal_type_print_func_varspec_suffix): New function.
7114 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7115 TYPE_CODE_METHOD>: Use it.
7116 * python/py-value.c (valpy_call): Adjust call to
7117 call_function_by_hand.
7118 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7119 call_function_by_hand.
7120 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7121 call_function_by_hand.
7122 * valops.c (value_allocate_space_in_inferior): Adjust call to
7123 call_function_by_hand.
7124 * typeprint.c (type_print_unknown_return_type): New function.
7125 * typeprint.h (type_print_unknown_return_type): New declaration.
7126
54990598
PA
71272017-09-04 Pedro Alves <palves@redhat.com>
7128
7129 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7130 types with more than one parameter as prototyped.
7131
9a24775b
PA
71322017-09-04 Pedro Alves <palves@redhat.com>
7133
7134 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7135 (disassemble_command): Use gdb_disassembly_flags instead of bare
7136 int.
7137 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7138 (dump_insns, do_mixed_source_and_assembly_deprecated)
7139 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7140 Use gdb_disassembly_flags instead of bare int.
7141 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7142 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7143 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7144 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7145 (enum gdb_disassembly_flag): ... values of this new enumeration.
7146 (gdb_disassembly_flags): Define.
7147 (gdb_disassembly)
7148 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7149 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7150 gdb_disassembly_flags instead of bare int.
7151 * record-btrace.c (btrace_insn_history)
7152 (record_btrace_insn_history, record_btrace_insn_history_range)
7153 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7154 instead of bare int.
7155 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7156 Use gdb_disassembly_flags instead of bare int.
7157 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7158 Define.
7159 * target-delegates.c: Regenerate.
7160 * target.c (target_insn_history, target_insn_history_from)
7161 (target_insn_history_range): Use gdb_disassembly_flags instead of
7162 bare int.
7163 * target.h: Include "disasm.h".
7164 (struct target_ops) <to_insn_history, to_insn_history_from,
7165 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7166 int.
7167 (target_insn_history, target_insn_history_from)
7168 (target_insn_history_range): Use gdb_disassembly_flags instead of
7169 bare int.
7170
80a65e9b
SM
71712017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7172
7173 * cli/cli-script.c (build_command_line): For if/while commands,
7174 check whether args is empty.
7175
6b66338c
SM
71762017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7177
7178 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7179 (enum command_control_type): Likewise.
7180 (struct command_line): Likewise.
7181 (free_command_lines): Likewise.
7182 (struct command_lines_deleter): Likewise.
7183 (command_line_up): Likewise.
7184 (read_command_lines): Likewise.
7185 (read_command_lines_1): Likewise.
7186 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7187 (enum command_control_type): Likewise.
7188 (struct command_line): Likewise.
7189 (free_command_lines): Likewise.
7190 (struct command_lines_deleter): Likewise.
7191 (command_line_up): Likewise.
7192 (read_command_lines): Likewise.
7193 (read_command_lines_1): Likewise.
7194 * breakpoint.h: Include cli/cli-script.h.
7195 * extension-priv.h: Likewise.
7196 * gdbcmd.h: Likewise.
7197
51abb421
PA
71982017-09-04 Pedro Alves <palves@redhat.com>
7199
7200 * ada-lang.c (is_known_support_routine): Move sal declaration to
7201 where it is initialized.
7202 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7203 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7204 (clear_command, update_static_tracepoint): Remove init_sal
7205 references. Move declarations closer to initializations.
7206 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7207 initializations.
7208 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7209 references. Move sal declarations closer to initializations.
7210 * frame.c (find_frame_sal): Return a symtab_and_line via function
7211 return instead of output parameter. Remove init_sal references.
7212 * frame.h (find_frame_sal): Return a symtab_and_line via function
7213 return instead of output parameter.
7214 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7215 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7216 instead of memset.
7217 (gdbscm_find_pc_line): Remove init_sal reference.
7218 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7219 references. Move declarations closer to initializations.
7220 * infcmd.c (set_step_frame): Update. Move declarations closer to
7221 initializations.
7222 (finish_backward): Remove init_sal references. Move declarations
7223 closer to initializations.
7224 * infrun.c (process_event_stop_test, handle_step_into_function)
7225 (insert_hp_step_resume_breakpoint_at_frame)
7226 (insert_step_resume_breakpoint_at_caller): Likewise.
7227 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7228 (symbol_to_sal): Likewise.
7229 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7230 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7231 to its initialization.
7232 * reverse.c (save_bookmark_command): Use new/delete. Remove
7233 init_sal references. Move declarations closer to initializations.
7234 * source.c (get_current_source_symtab_and_line): Remove brace
7235 initialization.
7236 (set_current_source_symtab_and_line): Now takes the sal by const
7237 reference. Remove brace initialization.
7238 (line_info): Remove init_sal reference.
7239 * source.h (set_current_source_symtab_and_line): Now takes a
7240 symtab_and_line via const reference.
7241 * stack.c (set_current_sal_from_frame): Adjust.
7242 (print_frame_info): Adjust.
7243 (get_last_displayed_sal): Return the sal via function return
7244 instead of via output parameter. Simplify.
7245 (frame_info): Adjust.
7246 * stack.h (get_last_displayed_sal): Return the sal via function
7247 return instead of via output parameter.
7248 * symtab.c (init_sal): Delete.
7249 (find_pc_sect_line): Remove init_sal references. Move
7250 declarations closer to initializations.
7251 (find_function_start_sal): Remove init_sal references. Move
7252 declarations closer to initializations.
7253 * symtab.h (struct symtab_and_line): In-class initialize all
7254 fields.
7255 * tracepoint.c (set_traceframe_context)
7256 (print_one_static_tracepoint_marker): Remove init_sal references.
7257 Move declarations closer to initializations.
7258 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7259 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7260 declarations closer to initializations.
7261 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7262 init_sal references. Adjust.
7263
6c5b2ebe
PA
72642017-09-04 Pedro Alves <palves@redhat.com>
7265
7266 * ax-gdb.c (agent_command_1): Use range-for.
7267 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7268 * breakpoint.c: Include "common/array-view.h".
7269 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7270 parameter from struct symtabs_and_lines to
7271 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7272 (breakpoint_sals_to_pc): Change sals parameter from struct
7273 symtabs_and_lines to std::vector reference.
7274 (check_fast_tracepoint_sals): Change sals parameter from struct
7275 symtabs_and_lines to std::array_view. Use range-for.
7276 (decode_static_tracepoint_spec): Return a std::vector instead of
7277 symtabs_and_lines. Update.
7278 (create_breakpoint): Update.
7279 (break_range_command, until_break_command, clear_command): Update.
7280 (base_breakpoint_decode_location, bkpt_decode_location)
7281 (bkpt_probe_create_sals_from_location)
7282 (bkpt_probe_decode_location, tracepoint_decode_location)
7283 (tracepoint_probe_decode_location)
7284 (strace_marker_create_sals_from_location): Return a std::vector
7285 instead of symtabs_and_lines.
7286 (strace_marker_create_breakpoints_sal): Update.
7287 (strace_marker_decode_location): Return a std::vector instead of
7288 symtabs_and_lines. Update.
7289 (update_breakpoint_locations): Change struct symtabs_and_lines
7290 parameters to gdb::array_view. Adjust.
7291 (location_to_sals): Return a std::vector instead of
7292 symtabs_and_lines. Update.
7293 (breakpoint_re_set_default): Use std::vector instead of struct
7294 symtabs_and_lines.
7295 (decode_location_default): Return a std::vector instead of
7296 symtabs_and_lines. Update.
7297 * breakpoint.h: Include "common/array-view.h".
7298 (struct breakpoint_ops) <decode_location>: Now returns a
7299 std::vector instead of returning a symtabs_and_lines via output
7300 parameter.
7301 (update_breakpoint_locations): Change sals parameters to use
7302 gdb::array_view.
7303 * cli/cli-cmds.c (edit_command, list_command): Update to use
7304 std::vector and gdb::array_view.
7305 (ambiguous_line_spec): Adjust to use gdb::array_view and
7306 range-for.
7307 (compare_symtabs): Rename to ...
7308 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7309 const reference and adjust.
7310 (filter_sals): Rewrite using std::vector and standard algorithms.
7311 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7312 (jump_command): Update to use std::vector.
7313 * linespec.c (struct linespec_state) <canonical_names>: Update
7314 comment.
7315 (add_sal_to_sals_basic): Delete.
7316 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7317 (decode_line_2, create_sals_line_offset)
7318 (convert_address_location_to_sals, convert_linespec_to_sals)
7319 (convert_explicit_location_to_sals, parse_linespec)
7320 (event_location_to_sals, decode_line_full, decode_line_1)
7321 (decode_line_with_current_source)
7322 (decode_line_with_last_displayed, decode_objc)
7323 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7324 (linespec_result::~linespec_result): Adjust to use std::vector
7325 instead of symtabs_and_lines.
7326 * linespec.h (linespec_sals::sals): Now a std::vector.
7327 (struct linespec_result): Use std::vector, bool, and in-class
7328 initialization.
7329 (decode_line_1, decode_line_with_current_source)
7330 (decode_line_with_last_displayed): Return std::vector.
7331 * macrocmd.c (info_macros_command): Use std::vector.
7332 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7333 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7334 std::vector.
7335 * probe.h (parse_probes): Return a std::vector.
7336 * python/python.c (gdbpy_decode_line): Use std::vector and
7337 gdb::array_view.
7338 * source.c (select_source_symtab, line_info): Use std::vector.
7339 * stack.c (func_command): Use std::vector.
7340 * symtab.h (struct symtabs_and_lines): Delete.
7341 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7342
7c44b49c
PA
73432017-09-04 Pedro Alves <palves@redhat.com>
7344
7345 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7346 unittests/array-view-selftests.c.
7347 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7348 * common/array-view.h: New file.
7349 * unittests/array-view-selftests.c: New file.
7350
e439fa14
PA
73512017-09-04 Pedro Alves <palves@redhat.com>
7352
7353 * cli/cli-cmds.c (edit_command): Pass message to
7354 ambiguous_line_spec.
7355 (list_command): Pass message to ambiguous_line_spec. Say
7356 "first"/"last" instead of "start" and "end" to be consistent with
7357 the manual.
7358 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7359 them to print formatted message.
7360
7525b645
PA
73612017-09-04 Pedro Alves <palves@redhat.com>
7362
7363 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7364 ftrace_update_insns by reference instead of pointer.
7365
badc0020
YQ
73662017-09-04 Yao Qi <yao.qi@linaro.org>
7367
7368 * i386-go32-tdep.c: Include x86-xstate.h.
7369 (i386_go32_init_abi): Call i386_target_description.
7370 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7371 if xcr0 is X86_XSTATE_X87_MASK.
7372 * i386-tdep.h (tdesc_i386): Remove the declaration.
7373 (tdesc_i386_mmx): Likewise.
7374
d78bdb54
YQ
73752017-09-04 Yao Qi <yao.qi@linaro.org>
7376
7377 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7378 X86_XSTATE_SSE_MASK instead of 0.
7379
ca1fa5ee
YQ
73802017-09-04 Yao Qi <yao.qi@linaro.org>
7381
7382 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7383 i386_target_description.
7384 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7385 i386_target_description.
7386 * i386-tdep.c (i386_gdbarch_init): Likewise.
7387
2434b019
YQ
73882017-09-04 Yao Qi <yao.qi@linaro.org>
7389
7390 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7391 (x86_darwin_init_abi_64): Call amd64_target_description.
7392 * amd64-dicos-tdep.c: Likewise.
7393 * amd64-fbsd-nat.c: Likewise.
7394 * amd64-fbsd-tdep.c: Likewise.
7395 * amd64-nbsd-tdep.c: Likewise.
7396 * amd64-obsd-tdep.c: Likewise.
7397 * amd64-sol2-tdep.c: Likewise.
7398 * amd64-windows-tdep.c: Likewise.
7399 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7400
0860c437
SM
74012017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7402
7403 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7404 (btrace_function) <insn>: Change type to use std::vector.
7405 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7406 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7407 ftrace_update_insns, ftrace_compute_global_level_offset,
7408 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7409 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7410 change to std::vector.
7411 (ftrace_update_insns): Adjust to change to std::vector, change
7412 type of INSN parameter.
7413 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7414 * record-btrace.c (btrace_call_history_insn_range,
7415 btrace_compute_src_line_range,
7416 record_btrace_frame_prev_register): Adjust to change to
7417 std::vector.
7418 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7419 to change to std::vector.
7420
0638b7f9
TT
74212017-09-03 Tom Tromey <tom@tromey.com>
7422
7423 * corefile.c (reopen_exec_file): Use std::string.
7424
8f84fb0e
TT
74252017-09-03 Tom Tromey <tom@tromey.com>
7426
7427 * compile/compile.c (compile_register_name_mangled): Return
7428 std::string.
7429 * compile/compile-loc2c.c (pushf_register_address): Update.
7430 (pushf_register): Update.
7431 * compile/compile-c-types.c (convert_array): Update.
7432 * compile/compile-c-symbols.c (generate_vla_size): Update.
7433 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7434 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7435 (convert_one_symbol): Update.
7436 (generate_c_for_for_one_variable): Update.
7437 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7438 std::string.
7439 (generate_register_struct): Update.
7440 * compile/compile-internal.h (c_get_range_decl_name): Return a
7441 std::string.
7442 (compile_register_name_mangled): Return std::string.
7443
18e9961f
TT
74442017-09-03 Tom Tromey <tom@tromey.com>
7445
7446 * utils.c (perror_string): Return a std::string.
7447 (throw_perror_with_name, perror_warning_with_name): Update.
7448
45343786
TT
74492017-09-03 Tom Tromey <tom@tromey.com>
7450
7451 * demangle.c (demangle_command): Use std::string,
7452 unique_xmalloc_ptr.
7453
b57af503
TT
74542017-09-03 Tom Tromey <tom@tromey.com>
7455
7456 * cli/cli-setshow.c (do_set_command): Use std::string.
7457
6eecf35f
TT
74582017-09-03 Tom Tromey <tom@tromey.com>
7459
7460 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7461
56496dd4
TT
74622017-09-03 Tom Tromey <tom@tromey.com>
7463
7464 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7465
e91a1fa7
TT
74662017-09-03 Tom Tromey <tom@tromey.com>
7467
7468 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7469 gdb::unique_xmalloc_ptr.
7470
7ffd83d7
TT
74712017-09-03 Tom Tromey <tom@tromey.com>
7472
7473 * thread.c (print_thread_info_1): Use string_printf.
7474 (thread_apply_command, thread_apply_all_command): Use
7475 std::string.
7476
1ccbe998
TT
74772017-09-03 Tom Tromey <tom@tromey.com>
7478
7479 * valprint.c (val_print_string): Update.
7480 * gdbcore.h (memory_error_message): Return std::string.
7481 * corefile.c (memory_error_message): Return std::string.
7482 (memory_error): Update.
7483 * breakpoint.c (insert_bp_location): Update.
7484
23fdd69e
SM
74852017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7486
7487 * target/waitstatus.h (target_waitstatus_to_string): Change
7488 return type to std::string.
7489 * target/waitstatus.c (target_waitstatus_to_string): Return
7490 std::string.
7491 * target.h (target_waitstatus_to_string): Remove declaration.
7492 * infrun.c (resume, clear_proceed_status_thread,
7493 print_target_wait_results, do_target_wait, save_waitstatus,
7494 stop_all_threads): Adjust.
7495 * record-btrace.c (record_btrace_wait): Adjust.
7496 * target-debug.h
7497 (target_debug_print_struct_target_waitstatus_p): Adjust.
7498
5c811d30
JK
74992017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7500
7501 PR gdb/22046
7502 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7503 detection.
7504
0a2dde4a
SDJ
75052017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7506
7507 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7508 for setting/unsetting environment variables on the remote target.
7509 (New remote packets): Add entries for QEnvironmentHexEncoded,
7510 QEnvironmentUnset and QEnvironmentReset.
7511 * common/environ.c (gdb_environ::operator=): Extend method to
7512 handle m_user_set_env_list and m_user_unset_env_list.
7513 (gdb_environ::clear): Likewise.
7514 (match_var_in_string): Change type of first parameter from 'char
7515 *' to 'const char *'.
7516 (gdb_environ::set): Extend method to handle
7517 m_user_set_env_list and m_user_unset_env_list.
7518 (gdb_environ::unset): Likewise.
7519 (gdb_environ::clear_user_set_env): New method.
7520 (gdb_environ::user_set_envp): Likewise.
7521 (gdb_environ::user_unset_envp): Likewise.
7522 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7523 m_user_unset_env_list on move constructor/assignment.
7524 (unset): Add new default parameter 'update_unset_list = true'.
7525 (clear_user_set_env): New method.
7526 (user_set_envp): Likewise.
7527 (user_unset_envp): Likewise.
7528 (m_user_set_env_list): New std::set.
7529 (m_user_unset_env_list): Likewise.
7530 * common/rsp-low.c (hex2str): New function.
7531 (bin2hex): New overload for bin2hex function.
7532 * common/rsp-low.c (hex2str): New prototype.
7533 (str2hex): New overload prototype.
7534 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7535 QEnvironmentUnset and QEnvironmentReset.
7536 (remote_protocol_features): Add QEnvironmentHexEncoded,
7537 QEnvironmentUnset and QEnvironmentReset packets.
7538 (send_environment_packet): New function.
7539 (extended_remote_environment_support): Likewise.
7540 (extended_remote_create_inferior): Call
7541 extended_remote_environment_support.
7542 (_initialize_remote): Add QEnvironmentHexEncoded,
7543 QEnvironmentUnset and QEnvironmentReset packet configs.
7544 * unittests/environ-selftests.c (gdb_selftest_env_var):
7545 New variable.
7546 (test_vector_initialization): New function.
7547 (test_init_from_host_environ): Likewise.
7548 (test_reinit_from_host_environ): Likewise.
7549 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7550 Likewise.
7551 (test_unset_set_empty_vector): Likewise.
7552 (test_vector_clear): Likewise.
7553 (test_std_move): Likewise.
7554 (test_move_constructor):
7555 (test_self_move): Likewise.
7556 (test_set_unset_reset): Likewise.
7557 (run_tests): Rewrite in terms of the functions above.
7558
654670a4
WP
75592017-08-31 Weimin Pan <weimin.pan@oracle.com>
7560
7561 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7562 (adi_available): Use a temp variable of type CORE_ADDR as argument
7563 3 when calling target_auxv_search.
7564 (adi_normalize_address): Use masks and xor operators to calculate
7565 normalized address.
7566 (adi_read_versions, adi_write_versions, adi_print_versions)
7567 (do_examine, do_assign): Use paddress.
7568
7755ddb7
JB
75692017-08-29 John Baldwin <jhb@FreeBSD.org>
7570
7571 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7572 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7573 out of loop and add supply of FIR.
7574 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7575 add collect of FIR.
7576
fd437cbc
SM
75772017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7578
3804a343 7579 PR gdb/21827
fd437cbc
SM
7580 * cli/cli-script.c (define_command): Don't convert command name
7581 to lower case.
7582
988f6b3d
JB
75832017-08-25 Joel Brobecker <brobecker@adacore.com>
7584
7585 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7586 Update all callers accordingly. Remove all code blocks handling
7587 the case where DISPP is not NULL.
7588
663c44ac
JK
75892017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7590
7591 PR symtab/22003
7592 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7593 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7594 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7595
f1902523
JK
75962017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7597
7598 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7599 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7600 (read_comp_units_from_section): New parameter abbrev_section, use
7601 read_and_check_comp_unit_head, allocate signatured_type if needed.
7602 (create_all_comp_units): Update read_comp_units_from_section caller.
7603
87215ad1
SDJ
76042017-08-23 Pedro Alves <palves@redhat.com>
7605
7606 PR remote/21852
7607 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7608 to null_ptid and switch to thread without reading the registers
7609 after adding the inferior.
7610
6e41ddec
JK
76112017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7612
7613 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7614 compile-gcc.
7615 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7616 (compile_to_object): Implement compile_gcc.
7617 (_initialize_compile): Install "set compile-gcc". Initialize
7618 compile_gcc.
7619
e68c32d5
JK
76202017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7621
7622 * compile/compile.c (compile_to_object): Conditionally call
7623 set_verbose. Conditionally call compile or compile_v0.
7624
58afddc6
WP
76252017-08-07 Weimin Pan <weimin.pan@oracle.com>
7626
7627 * sparc64-tdep.h: (adi_normalize_address): New export.
7628 * sparc-nat.h: (open_adi_tag_fd): New export.
7629 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7630 * sparc64-linux-tdep.c:
7631 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7632 (sparc64_linux_handle_segmentation_fault): New function.
7633 (sparc64_linux_init_abi): Register
7634 sparc64_linux_handle_segmentation_fault
7635 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7636 (sparc64_addr_bits_remove): New function.
7637 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7638 (MAX_PROC_NAME_SIZE): New macro.
7639 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7640 (sparc64adilist): New variable.
7641 (adi_proc_list): New variable.
7642 (find_adi_info): New function.
7643 (add_adi_info): New function.
7644 (get_adi_info_proc): New function.
7645 (get_adi_info): New function.
7646 (info_adi_command): New function.
7647 (read_maps_entry): New function.
7648 (adi_available): New function.
7649 (adi_normalize_address): New function.
7650 (adi_align_address): New function.
7651 (adi_convert_byte_count): New function.
7652 (adi_tag_fd): New function.
7653 (adi_is_addr_mapped): New function.
7654 (adi_read_versions): New function.
7655 (adi_write_versions): New function.
7656 (adi_print_versions): New function.
7657 (do_examine): New function.
7658 (do_assign): New function.
7659 (adi_examine_command): New function.
7660 (adi_assign_command): New function.
7661 (_initialize_sparc64_adi_tdep): New function.
7662
11db9430
SM
76632017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7664
7665 * breakpoint.c (breakpoints_info): Rename to ...
7666 (info_breakpoints_command): ... this.
7667 (watchpoints_info): Rename to ...
7668 (info_watchpoints_command): ... this.
7669 (tracepoints_info): Rename to ...
7670 (info_tracepoints_command): ... this.
7671 (_initialize_breakpoint): Adjust.
7672 * dcache.c (dcache_info): Rename to ...
7673 (info_display_command): ... this.
7674 (_initialize_dcache): Adjust.
7675 * frame.h (args_info): Rename to ...
7676 (info_args_command): ... this.
7677 (locals_info): Rename to ...
7678 (info_locals_command): ... this.
7679 * infcmd.c (nofp_registers_info): Rename to ...
7680 (info_registers_command): ... this.
7681 (float_info): Rename to ...
7682 (info_float_command): ... this.
7683 (program_info): Rename to ...
7684 (info_program_command): ... this.
7685 (all_registers_info): Rename to ...
7686 (info_all_registers_command): ... this.
7687 (vector_info): Rename to ...
7688 (info_vector_command): ... this.
7689 (float_info): Rename to ...
7690 (info_float_command): ... this.
7691 (_initialize_infcmd): Adjust.
7692 * inferior.h (term_info): Rename to ...
7693 (info_terminal_command): ... this.
7694 * inflow.c (term_info): Rename to ...
7695 (info_terminal_command): ... this.
7696 (_initialize_inflow): Adjust.
7697 * infrun.c (signals_info): Rename to ...
7698 (info_signals_command): ... this.
7699 (_initialize_infrun): Adjust.
7700 * objc-lang.c (classes_info): Rename to ...
7701 (info_classes_command): ... this.
7702 (selectors_info): Rename to ...
7703 (info_selectors_command): ... this.
7704 (_initialize_objc_language): Adjust.
7705 * printcmd.c (sym_info): Rename to ...
7706 (info_symbol_command): ... this.
7707 (address_info): Rename to ...
7708 (info_address_command): ... this.
7709 (display_info): Rename to ...
7710 (info_display_command): ... this.
7711 (_initialize_printcmd): Adjust.
7712 * reverse.c (bookmarks_info): Rename to ...
7713 (info_breakpoints_command): ... this.
7714 (_initialize_reverse): Adjust.
7715 * ser-go32.c (dos_info): Rename to ...
7716 (info_serial_command): ... this.
7717 (_initialize_ser_dos): Adjust.
7718 * skip.c (skip_info): Rename to ...
7719 (info_skip_command): ... this.
7720 (_initialize_step_skip): Adjust.
7721 * source.c (line_info): Rename to ...
7722 (info_line_command): ... this.
7723 (source_info): Rename to ...
7724 (info_source_command)
7725 * stack.c (frame_info): Rename to ...
7726 (info_frame_command): ... this.
7727 (locals_info): Rename to ...
7728 (info_locals_command): ... this.
7729 (args_info): Rename to ...
7730 (info_args_command): ... this.
7731 (_initialize_stack): Adjust.
7732 * symtab.c (sources_info): Rename to ...
7733 (info_sources_command): ... this.
7734 (variables_info): Rename to ...
7735 (info_variables_command): ... this.
7736 (functions_info): Rename to ...
7737 (info_functions_command): ... this.
7738 (types_info): Rename to ...
7739 (info_types_command): ... this.
7740 (_initialize_symtab): Adjust.
7741 * target.c (target_info): Rename to ...
7742 (info_target_command): ... this.
7743 (initialize_targets): Adjust.
7744 * tracepoint.c (tvariables_info): Rename to ...
7745 (info_tvariables_command): ... this.
7746 (scope_info): Rename to ...
7747 (info_scope_command): ... this.
7748 (trace_dump_actions): Adjust.
7749 (_initialize_tracepoint): Adjust.
7750
b270e6f9
TT
77512017-08-22 Tom Tromey <tom@tromey.com>
7752
7753 * breakpoint.h (install_breakpoint): Update.
7754 * breakpoint.c (add_solib_catchpoint): Update.
7755 (install_breakpoint): Change argument to a std::unique_ptr.
7756 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7757 (create_breakpoint_sal, create_breakpoint): Update.
7758 (watch_command_1, catch_exec_command_1)
7759 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7760 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7761 Return the breakpoint.
7762 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7763 (new_single_step_breakpoint): Update.
7764 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7765 std::unique_ptr.
7766 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7767 std::unique_ptr.
7768 * break-catch-sig.c (create_signal_catchpoint): Use
7769 std::unique_ptr.
7770 * ada-lang.c (create_ada_exception_catchpoint): Use
7771 std::unique_ptr.
7772
36bd8eaa
TT
77732017-08-22 Tom Tromey <tom@tromey.com>
7774
7775 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7776
56f37645
TT
77772017-08-22 Tom Tromey <tom@tromey.com>
7778
7779 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7780 (lookup_partial_symbol): Update.
7781
0b581c69
TT
77822017-08-22 Tom Tromey <tom@tromey.com>
7783
7784 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7785 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7786 (find_and_open_source, symtab_to_fullname): Update.
7787 * psymtab.c (psymtab_to_fullname): Update.
7788
14278e1f
TT
77892017-08-22 Tom Tromey <tom@tromey.com>
7790
7791 * exec.c (exec_file_attach): Update.
7792 * linux-thread-db.c (try_thread_db_load): Update.
7793 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7794 * utils.c (gdb_realpath): Change return type.
7795 (gdb_realpath_keepfile): Update.
7796 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7797 (_initialize_utils): Register the new self test.
7798 * source.c (openp): Update.
7799 (find_and_open_source): Update.
7800 * nto-tdep.c (nto_find_and_open_solib): Update.
7801 * main.c (set_gdb_data_directory): Update.
7802 (captured_main_1): Update.
7803 * dwarf2read.c (dwarf2_get_dwz_file): Update
7804 (dw2_map_symbol_filenames): Update.
7805 * auto-load.c (auto_load_safe_path_vec_update): Update.
7806 (filename_is_in_auto_load_safe_path_vec): Change type of
7807 "filename_realp".
7808 (auto_load_objfile_script): Update.
7809 (file_is_auto_load_safe): Update. Use std::string.
7810 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7811
4971c9a7
TT
78122017-08-22 Tom Tromey <tom@tromey.com>
7813
7814 * utils.c (gdb_realpath_keepfile): Return a
7815 gdb::unique_xmalloc_ptr.
7816 * exec.c (exec_file_attach): Update.
7817 * utils.h (gdb_realpath_keepfile): Return a
7818 gdb::unique_xmalloc_ptr.
7819
e3e41d58
TT
78202017-08-22 Tom Tromey <tom@tromey.com>
7821
7822 * compile/compile.c (compile_file_command): Use
7823 gdb::unique_xmalloc_ptr, std::string.
7824 * utils.c (gdb_abspath): Change return type.
7825 * source.c (openp): Update.
7826 * objfiles.c (allocate_objfile): Update.
7827 * main.c (set_gdb_data_directory): Update.
7828 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7829
0d999a6e
ZZ
78302017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7831
7832 * cli-cmds.c (list_commands): List actual code around more than
7833 one location.
7834
329d5e7e
JB
78352017-08-21 John Baldwin <jhb@FreeBSD.org>
7836
7837 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7838
bf223d3e
PA
78392017-08-21 Pedro Alves <palves@redhat.com>
7840
7841 PR gdb/19487
7842 * c-exp.y (variable production): Handle function aliases.
7843 * minsyms.c (msymbol_is_text): New function.
7844 * minsyms.h (msymbol_is_text): Declare.
7845 * symtab.c (find_function_alias_target): New function.
7846 * symtab.h (find_function_alias_target): Declare.
7847
c973d0aa
PA
78482017-08-21 Pedro Alves <palves@redhat.com>
7849
7850 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7851 typedefs.
7852 * typeprint.c (whatis_exp): If handling "whatis", and expression
7853 is OP_TYPE, strip one typedef level. Otherwise don't strip
7854 typedefs here.
7855 * valops.c (value_cast): Save "to" type before resolving
7856 stubs/typedefs. Use that type as resulting value's type.
7857
2989a365
TT
78582017-08-18 Tom Tromey <tom@tromey.com>
7859 Pedro Alves <palves@redhat.com>
7860
7861 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7862 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7863 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7864 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7865 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7866 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7867 (linux_get_siginfo_data): Add "thread" argument. Use
7868 scoped_restore.
7869 * linux-nat.c (linux_child_follow_fork)
7870 (check_stopped_by_watchpoint): Use scoped_restore.
7871 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7872 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7873 (restore_inferior_ptid, save_inferior_ptid): Remove.
7874 * btrace.c (btrace_fetch): Use scoped_restore.
7875 * bsd-uthread.c (bsd_uthread_fetch_registers)
7876 (bsd_uthread_store_registers): Use scoped_restore.
7877 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7878 scoped_restore.
7879 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7880 (aix_thread_xfer_partial): Use scoped_restore.
7881 * inferior.h (save_inferior_ptid): Remove.
7882
e60eb288
YQ
78832017-08-18 Yao Qi <yao.qi@linaro.org>
7884
7885 PR tdep/21818
7886 * arm-tdep.c (gdb_print_insn_arm): Mark
7887 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7888
6d580b63
YQ
78892017-08-18 Yao Qi <yao.qi@linaro.org>
7890
7891 * NEWS: Mention GDBserver's new option "--selftest".
7892 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7893 * selftest.c: Move it to common/selftest.c.
7894 * selftest.h: Move it to common/selftest.h.
7895 * selftest-arch.c (reset): New function.
7896 (tests_with_arch): Call reset.
7897
86dcbf50
YQ
78982017-08-18 Yao Qi <yao.qi@linaro.org>
7899
7900 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7901 instead of exception_fprintf and printf_filtered.
7902
7649770c
YQ
79032017-08-18 Yao Qi <yao.qi@linaro.org>
7904
7905 * selftest.c (register_self_test): Rename it to
7906 selftests::register_test.
7907 (run_self_tests): selftest::run_tests.
7908 * selftest.h: Update declarations.
7909 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7910 selftests::register_test_foreach_arch.
7911 * selftest-arch.h: Update declaration.
7912 * aarch64-tdep.c: Update.
7913 * arm-tdep.c: Likewise.
7914 * disasm-selftests.c: Likewise.
7915 * dwarf2loc.c: Likewise.
7916 * dwarf2-frame.c: Likewise.
7917 * findvar.c: Likewise.
7918 * gdbarch-selftests.c: Likewise.
7919 * maint.c (maintenance_selftest): Likewise.
7920 * regcache.c: Likewise.
7921 * rust-exp.y: Likewise.
7922 * selftest-arch.c: Likewise.
7923 * unittests/environ-selftests.c: Likewise.
7924 * unittests/function-view-selftests.c: Likewise.
7925 * unittests/offset-type-selftests.c: Likewise.
7926 * unittests/optional-selftests.c: Likewise.
7927 * unittests/scoped_restore-selftests.c: Likewise.
7928 * utils-selftests.c: Likewise.
7929
b0cba12e
PA
79302017-08-17 Pedro Alves <palves@redhat.com>
7931
7932 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7933 local.
7934
4c8aa72d
PA
79352017-08-17 Pedro Alves <palves@redhat.com>
7936
7937 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7938 field.
7939 (reset_die_in_process): Delete, replaced by ...
7940 (process_die_scope): ... this new class. Make it responsible for
7941 freeing cu->line_header too.
7942 (process_die): Use process_die_scope.
7943 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7944 cu->line_header_die_owner. Don't release the line header if it's
7945 owned by the CU.
7946 (setup_type_unit_groups): Make the CU/DIE own the line header.
7947 Don't release the line header here.
7948
ba713918
AL
79492017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7950
7951 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7952
44d0fb3a
RK
79532017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7954
7955 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7956 Single-Key mode
7957
a5afdb16
RK
79582017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7959
7960 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7961 mode command list.
7962
47613aeb
SH
79632017-08-15 Stafford Horne <shorne@gmail.com>
7964
7965 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7966
9c3cc999
SH
79672017-08-15 Stafford Horne <shorne@gmail.com>
7968
7969 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7970
206726fb
SDJ
79712017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7972
7973 PR gdb/21954
7974 * infcmd.c (unset_environment_command): Use the 'clear' method on
7975 the environment instead of resetting it.
7976
0335ac6d
JB
79772017-08-15 John Baldwin <jhb@FreeBSD.org>
7978
7979 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7980 platforms.
7981
d3abe1c8
TT
79822017-08-14 Tom Tromey <tom@tromey.com>
7983
7984 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7985 (print_binary_chars): Likewise.
7986 (BITS_IN_BYTES): Remove.
7987
d6382fff
TT
79882017-08-14 Tom Tromey <tom@tromey.com>
7989
7990 PR gdb/21675
7991 * valprint.c (LOW_ZERO): Change value to 034.
7992 (print_octal_chars): Add static_asserts for octal constants.
7993 * printcmd.c (print_scalar_formatted): Add 'd' case.
7994
f978cb06
TT
79952017-08-11 Tom Tromey <tom@tromey.com>
7996
7997 * symfile.c (add_symbol_file_command): Use std::vector.
7998
2f5404b3
TT
79992017-08-14 Tom Tromey <tom@tromey.com>
8000
8001 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8002 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8003 std::move.
8004 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8005
de7985c3
PA
80062017-08-11 Pedro Alves <palves@redhat.com>
8007
8008 * infrun.c (process_event_stop_test): Adjust
8009 function_name_is_marked_for_skip call.
8010 * skip.c: Include <list>.
8011 (skiplist_entry): Make it a class with private fields, and
8012 getters/setters.
8013 (skiplist_entry_chain): Delete.
8014 (skiplist_entries): New.
8015 (skiplist_entry_count): Delete.
8016 (highest_skiplist_entry_num): New.
8017 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8018 (add_skiplist_entry): Delete.
8019 (skiplist_entry::skiplist_entry): New.
8020 (skiplist_entry::add_entry): New.
8021 (skip_file_command, skip_function): Adjust.
8022 (compile_skip_regexp): Delete.
8023 (skip_command): Don't compile regexp here. Adjust to use
8024 skiplist_entry::add_entry.
8025 (skip_info): Adjust to use range-for and getters.
8026 (skip_enable_command, skip_disable_command): Adjust to use
8027 range-for and setters.
8028 (skip_delete_command): Adjust to use std::list.
8029 (add_skiplist_entry): Delete.
8030 (skip_file_p): Delete, refactored as ...
8031 (skiplist_entry::do_skip_file_p): ... this new method.
8032 (skip_gfile_p): Delete, refactored as ...
8033 (skiplist_entry::do_gskip_file_p): ... this new method.
8034 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8035 (skiplist_entry::skip_function_p): ... this new method.
8036 (function_name_is_marked_for_skip): Now returns bool, and takes
8037 the function sal by const reference. Adjust to use range-for and
8038 skiplist_entry methods.
8039 (_initialize_step_skip): Remove references to
8040 skiplist_entry_chain, skiplist_entry_count.
8041 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8042 takes the function sal by const reference.
8043
be7d3cd5
YQ
80442017-08-11 Yao Qi <yao.qi@linaro.org>
8045
8046 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8047 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8048 (dwarf2_frame_cache):
8049 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8050 RETURN_MASK_ALL and set *this_case to NULL.
8051 * frame-unwind.h: Update comments.
8052
1c90d9f0
YQ
80532017-08-11 Yao Qi <yao.qi@linaro.org>
8054
8055 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8056 (dwarf2_frame_state_copy_regs): Remove.
8057 (dwarf2_frame_state_free_regs): Remove.
8058 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8059 (dwarf2_restore_rule): Call method .alloc_regs instead of
8060 dwarf2_frame_state_alloc_regs.
8061 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8062 constructor. Call std::move.
8063 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8064 (dwarf2_frame_cache): Likewise.
8065
8066 [GDB_SELF_TEST]: Include selftest.h and
8067 selftest-arch.h.
8068 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8069 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8070 execute_cfa_program_test.
8071
8072 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8073 copy ctor, assignment operator, move assignment.
8074 <alloc_regs>: New method.
8075 <swap>: New method.
8076 (struct dwarf2_frame_state): Delete dtor.
8077 (dwarf2_frame_state_alloc_regs): Remove declaration.
8078 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8079 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8080
afe37d6b
YQ
80812017-08-11 Yao Qi <yao.qi@linaro.org>
8082
8083 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8084 (dwarf2_frame_state::dwarf2_frame_state): New.
8085 (dwarf2_frame_state::~dwarf2_frame_state): New.
8086 (dwarf2_fetch_cfa_info): Update.
8087 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8088 rather than a pointer. Update code.
8089 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8090 dtor.
8091 <data_align, code_align, retaddr_column>: Change them to const.
8092 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8093 to bool.
8094
b348037f
YQ
80952017-08-11 Yao Qi <yao.qi@linaro.org>
8096
8097 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8098 <loc.exp>: New field.
8099 * dwarf2-frame.c (execute_cfa_program): Update.
8100 (dwarf2_frame_prev_register): Update.
8101
e7c9de26
PA
81022017-08-10 Pedro Alves <palves@redhat.com>
8103
8104 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8105
e8c6b620
JB
81062017-08-09 John Baldwin <jhb@FreeBSD.org>
8107
8108 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8109 (fbsd_pending_children): Use std::list.
8110 (fbsd_remember_child): Likewise.
8111 (fbsd_is_child_pending): Likewise.
8112 (fbsd_pending_vfork_done): Use std::forward_list.
8113 (fbsd_add_vfork_done): Likewise.
8114 (fbsd_is_vfork_done_pending): Likewise.
8115 (fbsd_next_vfork_done): Likewise.
8116
e4a26669
JB
81172017-08-09 John Baldwin <jhb@FreeBSD.org>
8118
8119 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8120 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8121 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8122 for `mapfilename'.
8123 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8124 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8125
142311d3
JB
81262017-08-09 John Baldwin <jhb@FreeBSD.org>
8127
8128 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8129 "filestuff.h".
8130 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8131
42fa2e0e
TT
81322017-08-09 Tom Tromey <tom@tromey.com>
8133
8134 * skip.c (skiplist_entry): New constructor.
8135 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8136 (skiplist_entry::file_is_glob): Now bool.
8137 (skiplist_entry::file, skiplist_entry::function): Now
8138 std::string.
8139 (make_skip_entry): Return a unique_ptr. Use new.
8140 (free_skiplist_entry, free_skiplist_entry_cleanup)
8141 (make_free_skiplist_entry_cleanup): Remove.
8142 (skip_command, skip_disable_command, add_skiplist_entry)
8143 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8144 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8145 (function_name_is_marked_for_skip): Update.
8146 (skip_delete_command): Update. Use delete.
8147
cd3af38d
JW
81482017-08-09 Jiong Wang <jiong.wang@arm.com>
8149
8150 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8151 (aarch64_linux_core_read_description): New function.
8152 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8153
29592bde
PA
81542017-08-09 Pedro Alves <palves@redhat.com>
8155
8156 * cp-name-parser.y (cp_comp_to_string): Return a
8157 gdb::unique_xmalloc_ptr<char>.
8158 * cp-support.c (replace_typedefs_qualified_name)
8159 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8160 (cp_canonicalize_string_full): Use op= instead of explicit
8161 convertion.
8162 (cp_class_name_from_physname, method_name_from_physname)
8163 (cp_func_name, cp_remove_params): Adjust to use
8164 gdb::unique_xmalloc_ptr<char>.
8165 * cp-support.h (cp_comp_to_string): Return a
8166 gdb::unique_xmalloc_ptr<char>.
8167 * python/py-type.c (typy_lookup_type): Adjust to use
8168 gdb::unique_xmalloc_ptr<char>.
8169
b3340438
L
81702017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8171
8172 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8173
e88e8651
YQ
81742017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8175 Yao Qi <yao.qi@linaro.org>
8176
8177 * cp-support.c (cp_canonicalize_string_full): Use
8178 gdb::unique_xmalloc_ptr<char>.
8179 (cp_canonicalize_string): Likewise.
8180
f5a29eb0
YQ
81812017-08-09 Yao Qi <yao.qi@linaro.org>
8182
8183 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8184 * regformats/i386/amd64-avx-avx512.dat: Remove.
8185 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8186 * regformats/i386/amd64-avx-mpx.dat:Remove.
8187 * regformats/i386/amd64-avx.dat: Remove.
8188 * regformats/i386/amd64-mpx.dat: Remove.
8189 * regformats/i386/i386-avx-avx512.dat: Remove.
8190 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8191 * regformats/i386/i386-avx-mpx.dat: Remove.
8192 * regformats/i386/i386-mmx.dat: Remove.
8193 * regformats/i386/i386-mpx.dat: Remove.
8194
57757c2f
YQ
81952017-08-09 Yao Qi <yao.qi@linaro.org>
8196
8197 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8198 * amd64-tdep.c: Don't include features/i386/x32*.c.
8199 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8200 functions.
8201 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8202 and i386/x32-avx-avx512.
8203 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8204 and i386/x32.xml.
8205 * features/i386/x32-avx-avx512.c: Removed.
8206 * features/i386/x32-avx-avx512.xml: Removed.
8207 * features/i386/x32-avx.c: Removed.
8208 * features/i386/x32-avx.xml: Removed.
8209 * features/i386/x32.c: Removed.
8210 * features/i386/x32.xml: Removed.
8211 * regformats/i386/x32-avx-avx512.dat: Removed.
8212 * regformats/i386/x32-avx.dat: Removed.
8213 * regformats/i386/x32.dat: Removed.
8214
ba7b109b
MR
82152017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8216
8217 PR breakpoints/21886
8218 * mem-break.c (default_memory_insert_breakpoint): Use
8219 `->placed_address' rather than `->reqstd_address' for the
8220 breakpoint location.
8221
e347efc3
MR
82222017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8223
8224 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8225 assertions.
8226
0dba2a6c
MR
82272017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8228
8229 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8230 a union of `tdep_info', `tdesc_data' and `id'.
8231 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8232 rather than `info.tdep_info'.
8233 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8234 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8235 * i386-tdep.c (i386_gdbarch_init): Likewise.
8236 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8237 * mips-tdep.c (mips_gdbarch_init): Likewise.
8238 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8239 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8240 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8241 `info.tdep_info'.
8242 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8243 `info.tdep_info'.
8244 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8245 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8246 `info.tdep_info'.
8247 * spu-tdep.c (spu_gdbarch_init): Likewise.
8248 * gdbarch.h: Regenerate.
8249
16eb6b2d
LS
82502017-08-07 Leszek Swirski <leszeks@google.com>
8251
7b005726 8252 PR symtab/20899
16eb6b2d
LS
8253 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8254
74cbb09e
SM
82552017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8256
8257 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8258 (gdbsim_open): Rename gdb_argv args object to argv.
8259
ee0c3293
TT
82602017-08-05 Tom Tromey <tom@tromey.com>
8261
8262 * compile/compile-object-load.c (compile_object_load): Use
8263 gdb::unique_xmalloc_ptr.
8264 * cli/cli-dump.c (scan_filename): Rename from
8265 scan_filename_with_cleanup. Change return type.
8266 (scan_expression): Rename from scan_expression_with_cleanup.
8267 Change return type.
8268 (dump_memory_to_file, dump_value_to_file, restore_command):
8269 Use gdb::unique_xmalloc_ptr. Update.
8270 * cli/cli-cmds.c (find_and_open_script): Use
8271 gdb::unique_xmalloc_ptr.
8272 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8273 * symmisc.c (maintenance_print_symbols)
8274 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8275 * symfile.c (symfile_bfd_open, generic_load)
8276 (add_symbol_file_command, remove_symbol_file_command): Use
8277 gdb::unique_xmalloc_ptr.
8278 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8279 * psymtab.c (maintenance_print_psymbols): Use
8280 gdb::unique_xmalloc_ptr.
8281 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8282 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8283 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8284 (reload_shared_libraries_1): Likewise.
8285
3232fabd
TT
82862017-08-05 Tom Tromey <tom@tromey.com>
8287
8288 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8289 (rust_op_vector, rust_set_vector): New typedefs.
8290 (current_parser): New global.
8291 (work_obstack): Change to pointer type. Update all users.
8292 (rust_ast, pstate): Remove globals.
8293 (struct rust_parser): New.
8294 (%union) <params, field_inits>: Change type.
8295 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8296 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8297 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8298 (convert_params_to_types, convert_params_to_expression): Change
8299 type of "params".
8300 (ast_string): Change type of "fields".
8301 (rust_parse): Make a rust_parser. Remove cleanups.
8302 (rust_lex_tests): Make and install an auto_obstack.
8303
f02fd774
YQ
83042017-08-04 Yao Qi <yao.qi@linaro.org>
8305
8306 * configure.srv (ipa_x32_linux_regobj): New.
8307 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8308 instead of X86_TDESC_AVX512.
8309 (initialize_low_tracepoint): Call
8310 init_registers_x32_avx_avx512_linux.
8311
91975afd
YQ
83122017-08-04 Yao Qi <yao.qi@linaro.org>
8313
8314 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8315
2331fa3a
RK
83162017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8317
8318 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8319
744e4fe1
TT
83202017-08-03 Tom Tromey <tom@tromey.com>
8321
8322 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8323 Remove.
8324 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8325
1c034b67
TT
83262017-08-03 Tom Tromey <tom@tromey.com>
8327
8328 * python/py-param.c (compute_enum_values): Use gdb_argv.
8329
773a1edc
TT
83302017-08-03 Tom Tromey <tom@tromey.com>
8331
8332 * utils.h (struct gdb_argv_deleter): New.
8333 (gdb_argv): New class.
8334 * utils.c (gdb_argv::reset): New method.
8335 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8336 * tracefile.c (tsave_command): Use gdb_argv.
8337 * top.c (new_ui_command): Use gdb_argv.
8338 * symmisc.c (maintenance_print_symbols)
8339 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8340 * symfile.c (symbol_file_command, generic_load)
8341 (remove_symbol_file_command): Use gdb_argv.
8342 * stack.c (backtrace_command): Use gdb_argv.
8343 * source.c (add_path, show_substitute_path_command)
8344 (unset_substitute_path_command, set_substitute_path_command):
8345 Use gdb_argv.
8346 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8347 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8348 * remote.c (extended_remote_run, remote_put_command)
8349 (remote_get_command, remote_delete_command): Use gdb_argv.
8350 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8351 (gdbsim_open): Use gdb_argv.
8352 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8353 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8354 * procfs.c (procfs_info_proc): Use gdb_argv.
8355 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8356 * infrun.c (handle_command): Use gdb_argv.
8357 * inferior.c (add_inferior_command, clone_inferior_command):
8358 Use gdb_argv.
8359 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8360 * exec.c (exec_file_command): Use gdb_argv.
8361 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8362 * compile/compile.c (build_argc_argv): Use gdb_argv.
8363
0d50bde3
TT
83642017-08-03 Tom Tromey <tom@tromey.com>
8365
8366 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8367
7f968c89
TT
83682017-08-03 Tom Tromey <tom@tromey.com>
8369
8370 * python/python.c (compute_python_string): Return std::string.
8371 (gdbpy_eval_from_control_command): Update.
8372 (do_start_initialization): Use std::string.
8373 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8374 xstrprintf.
8375 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8376 xstrprintf.
8377
3c9ebddd
TT
83782017-08-03 Tom Tromey <tom@tromey.com>
8379
8380 * top.h (do_restore_instream_cleanup): Remove.
8381 * top.c (do_restore_instream_cleanup): Remove.
8382 (read_command_file): Use scoped_restore.
8383 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8384
b51b225e
TT
83852017-08-03 Tom Tromey <tom@tromey.com>
8386
8387 * cli/cli-script.c (execute_user_command)
8388 (execute_control_command): Use scoped_restore.
8389
ac991630
TT
83902017-08-03 Tom Tromey <tom@tromey.com>
8391
8392 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8393 (execute_user_command): Remove user_call_depth; use
8394 user_args_stack's size instead.
8395
898e0c8e
TT
83962017-08-03 Tom Tromey <tom@tromey.com>
8397
8398 * top.h (in_user_command): Remove.
8399 * top.c (in_user_command): Remove.
8400 * cli/cli-script.c (do_restore_user_call_depth)
8401 (execute_user_command): Update.
8402
26fcd5d7
TT
84032017-08-03 Tom Tromey <tom@tromey.com>
8404
8405 * valops.c (search_struct_method): Use gdb::byte_vector.
8406 * valarith.c (value_concat): Use std::vector.
8407 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8408 (simple_search_memory): Likewise.
8409 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8410 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8411 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8412 * elfread.c (elf_rel_plt_read): Use std::string.
8413 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8414 * cli/cli-dump.c (restore_section_callback): Use
8415 gdb::byte_vector.
8416
7c218e6c
TT
84172017-08-03 Tom Tromey <tom@tromey.com>
8418
8419 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8420
31b68d4a
TT
84212017-08-03 Tom Tromey <tom@tromey.com>
8422
8423 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8424 (tui_register_format): Use scoped_restore.
8425
2ec845e7
TT
84262017-08-03 Tom Tromey <tom@tromey.com>
8427
8428 * reverse.c (exec_direction_default): Remove.
8429 (exec_reverse_once): Use scoped_restore.
8430 * remote.c (restore_remote_timeout): Remove.
8431 (remote_flash_erase, remote_flash_write, remote_flash_done)
8432 (readchar, remote_serial_write): Use scoped_restore.
8433 * cli/cli-script.c (struct source_cleanup_lines_args)
8434 (source_cleanup_lines): Remove.
8435 (script_from_file): Use scoped_restore.
8436 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8437 (source_command): Use scoped_restore.
8438
b3bc8453
TT
84392017-08-03 Tom Tromey <tom@tromey.com>
8440
8441 * utils.h (make_cleanup_free_so): Remove.
8442 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8443 * solist.h (struct so_deleter): New.
8444 (so_list_up): New typedef.
8445 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8446
e3ad2841
TT
84472017-08-03 Tom Tromey <tom@tromey.com>
8448
8449 * utils.h (make_cleanup_restore_current_language): Remove.
8450 * utils.c (do_restore_current_language)
8451 (make_cleanup_restore_current_language): Remove.
8452 * parse.c (parse_exp_in_context_1)
8453 (parse_expression_with_language): Use
8454 scoped_restore_current_language.
8455 * mi/mi-main.c (mi_cmd_execute): Use
8456 scoped_restore_current_language.
8457 * language.h (scoped_restore_current_language): New class.
8458
b80cf838
TT
84592017-08-03 Tom Tromey <tom@tromey.com>
8460
8461 * compile/compile.c (cleanup_unlink_file): Remove.
8462 (compile_to_object): Use gdb::unlinker.
8463 (eval_compile_command): Likewise.
8464
fad0444a
TT
84652017-08-03 Tom Tromey <tom@tromey.com>
8466
8467 * utils.h (make_cleanup_fclose): Remove.
8468 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8469
6e7bc05c
TT
84702017-08-03 Tom Tromey <tom@tromey.com>
8471
8472 * top.c (open_terminal_stream): Return gdb_file_up.
8473 (new_ui_command): Update.
8474
4a45905b
TT
84752017-08-03 Tom Tromey <tom@tromey.com>
8476
8477 * source.c (print_source_lines_base, forward_search_command)
8478 (reverse_search_command): Use gdb_file_up.
8479
7cd06d6e
TT
84802017-08-03 Tom Tromey <tom@tromey.com>
8481
8482 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8483
ed166945
TT
84842017-08-03 Tom Tromey <tom@tromey.com>
8485
8486 * cli/cli-cmds.c (find_and_open_script): Change return type.
8487 Remove "streamp" and "full_path" parameters.
8488 (source_script_with_search): Update.
8489 * auto-load.c (source_script_file): Update.
8490 * cli/cli-cmds.h (find_and_open_script): Change type.
8491 (open_script): New struct.
8492
d419f42d
TT
84932017-08-03 Tom Tromey <tom@tromey.com>
8494
8495 * xml-support.c (xml_fetch_content_from_file): Update.
8496 * ui-file.c (stdio_file::open): Update.
8497 * tracefile-tfile.c (tfile_start): Update.
8498 * remote.c (remote_file_put, remote_file_get): Update.
8499 * nat/linux-procfs.c (linux_proc_get_int)
8500 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8501 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8502 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8503 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8504 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8505 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8506 * linux-nat.c (linux_proc_pending_signals): Update.
8507 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8508 (file_closer): Remove.
8509 * compile/compile.c (compile_to_object): Update.
8510 * common/filestuff.h (struct gdb_file_deleter): New.
8511 (gdb_file_up): New typedef.
8512 (gdb_fopen_cloexec): Change return type.
8513 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8514 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8515 (dump_binary_file, restore_binary_file): Update.
8516 * auto-load.c (auto_load_objfile_script_1): Update.
8517
4a2b031d
TT
85182017-08-03 Tom Tromey <tom@tromey.com>
8519
8520 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8521 (info_static_tracepoint_markers_command): Likewise.
8522 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8523 * skip.c (skip_info): Use ui_out_emit_table.
8524 * progspace.c (print_program_space): Use ui_out_emit_table.
8525 * osdata.c (info_osdata): Use ui_out_emit_table.
8526 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8527 ui_out_emit_table.
8528 * linux-thread-db.c (info_auto_load_libthread_db): Use
8529 ui_out_emit_table.
8530 * inferior.c (print_inferior): Use ui_out_emit_table.
8531 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8532 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8533 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8534 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8535 * ui-out.h (class ui_out_emit_table): New.
8536
a4f320fd
MR
85372017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8538
8539 * mips-tdep.c (mips_fpu_type_str): New function.
8540 (mips_dump_tdep): Call it.
8541
a2f1f308
MR
85422017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8543
8544 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8545 `->mips_fpu_type'.
8546
7e5ed83b
XR
85472017-07-31 Xavier Roirand <roirand@adacore.com>
8548
8549 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8550
4c9dc811
XR
85512017-07-27 Xavier Roirand <roirand@adacore.com>
8552
8553 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8554
27d41eac
YQ
85552017-07-26 Yao Qi <yao.qi@linaro.org>
8556
8557 * cli/cli-cmds.c (maintenancechecklist): New variable.
8558 * gdbcmd.h (maintenancechecklist): Declare it.
8559 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8560 Call i386_linux_read_description with different masks.
8561 * maint.c (maintenance_check_command): New function.
8562 (_initialize_maint_cmds): Call add_prefix_cmd.
8563 * target-descriptions.c (tdesc_reg): override operator != and ==.
8564 (tdesc_type): Likewise.
8565 (tdesc_feature): Likewise.
8566 (target_desc): Likewise.
8567 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8568 (maintenance_check_xml_descriptions): New function.
8569 (_initialize_target_descriptions) Add command "xml-descriptions".
8570 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8571
ea03d0d3
YQ
85722017-07-26 Yao Qi <yao.qi@linaro.org>
8573
8574 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8575 Include features/i386/32bit-*.c.
8576 (i386_linux_read_description): Generate target description if it
8577 doesn't exist.
8578 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8579 functions.
8580 * features/i386/32bit-linux.c: Re-generated.
8581 * features/i386/32bit-sse.c: Likewise.
8582 * target-descriptions.c (print_c_feature::visit): Print code to
8583 set register number if needed.
8584 (print_c_feature) <m_next_regnum>: New field.
8585
25aa13e5
YQ
85862017-07-26 Yao Qi <yao.qi@linaro.org>
8587
8588 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8589 (FEATURE_XMLFILES): New.
8590 (FEATURE_CFILES): New.
8591 New rules.
8592 (clean-cfiles): Remove generated c files.
8593 * features/i386/32bit-avx.c: Generated.
8594 * features/i386/32bit-avx512.c: Generated.
8595 * features/i386/32bit-core.c: Generated.
8596 * features/i386/32bit-linux.c: Generated.
8597 * features/i386/32bit-mpx.c: Generated.
8598 * features/i386/32bit-pkeys.c: Generated.
8599 * features/i386/32bit-sse.c: Generated.
8600 * target-descriptions.c: Include algorithm.
8601 (tdesc_element_visitor): Add method visit_end.
8602 (print_c_tdesc): Implement visit_end.
8603 (print_c_tdesc:: m_filename_after_features): Move it to
8604 protected.
8605 (print_c_feature): New class.
8606 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8607 name starts with "i386/32bit-".
8608
6eb1e6a8
YQ
86092017-07-26 Yao Qi <yao.qi@linaro.org>
8610
8611 * target-descriptions.c (tdesc_element_visitor): New class.
8612 (tdesc_element): New class.
8613 (tdesc_reg): Inherit from tdesc_element.
8614 (tdesc_reg::accept): New function.
8615 (tdesc_type): Inherit from tdesc_element.
8616 (tdesc_type::accept): New function.
8617 (tdesc_feature): Inherit from tdesc_element.
8618 (tdesc_feature::accept): New function.
8619 (target_desc): Inherit from tdesc_element.
8620 (target_desc::target_desc): New.
8621 (target_desc::~target_desc): New.
8622 (target_desc::accept): New.
8623 (allocate_target_description): Use new.
8624 (free_target_description): Use delete.
8625 (print_c_tdesc): New class.
8626 (maint_print_c_tdesc_cmd): Adjust.
8627
8628 * features/aarch64.c: Re-generated.
8629 * features/arc-arcompact.c: Re-generated.
8630 * features/arc-v2.c: Re-generated.
8631 * features/arm/arm-with-iwmmxt.c: Re-generated.
8632 * features/arm/arm-with-m.c: Re-generated.
8633 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8634 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8635 * features/arm/arm-with-neon.c: Re-generated.
8636 * features/arm/arm-with-vfpv2.c: Re-generated.
8637 * features/arm/arm-with-vfpv3.c: Re-generated.
8638 * features/i386/amd64-avx-avx512.c: Re-generated.
8639 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8640 * features/i386/amd64-avx.c: Re-generated.
8641 * features/i386/amd64-avx-linux.c: Re-generated.
8642 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8643 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8644 * features/i386/amd64-avx-mpx.c: Re-generated.
8645 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8646 * features/i386/amd64.c: Re-generated.
8647 * features/i386/amd64-linux.c: Re-generated.
8648 * features/i386/amd64-mpx.c: Re-generated.
8649 * features/i386/amd64-mpx-linux.c: Re-generated.
8650 * features/i386/i386-avx-avx512.c: Re-generated.
8651 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8652 * features/i386/i386-avx.c: Re-generated.
8653 * features/i386/i386-avx-linux.c: Re-generated.
8654 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8655 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8656 * features/i386/i386-avx-mpx.c: Re-generated.
8657 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8658 * features/i386/i386.c: Re-generated.
8659 * features/i386/i386-linux.c: Re-generated.
8660 * features/i386/i386-mmx.c: Re-generated.
8661 * features/i386/i386-mmx-linux.c: Re-generated.
8662 * features/i386/i386-mpx.c: Re-generated.
8663 * features/i386/i386-mpx-linux.c: Re-generated.
8664 * features/i386/x32-avx-avx512.c: Re-generated.
8665 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8666 * features/i386/x32-avx.c: Re-generated.
8667 * features/i386/x32-avx-linux.c: Re-generated.
8668 * features/i386/x32.c: Re-generated.
8669 * features/i386/x32-linux.c: Re-generated.
8670 * features/microblaze.c: Re-generated.
8671 * features/microblaze-with-stack-protect.c: Re-generated.
8672 * features/mips64-dsp-linux.c: Re-generated.
8673 * features/mips64-linux.c: Re-generated.
8674 * features/mips-dsp-linux.c: Re-generated.
8675 * features/mips-linux.c: Re-generated.
8676 * features/nds32.c: Re-generated.
8677 * features/nios2.c: Re-generated.
8678 * features/nios2-linux.c: Re-generated.
8679 * features/rs6000/powerpc-32.c: Re-generated.
8680 * features/rs6000/powerpc-32l.c: Re-generated.
8681 * features/rs6000/powerpc-403.c: Re-generated.
8682 * features/rs6000/powerpc-403gc.c : Re-generated.
8683 * features/rs6000/powerpc-405.c: Re-generated.
8684 * features/rs6000/powerpc-505.c: Re-generated.
8685 * features/rs6000/powerpc-601.c: Re-generated.
8686 * features/rs6000/powerpc-602.c: Re-generated.
8687 * features/rs6000/powerpc-603.c: Re-generated.
8688 * features/rs6000/powerpc-604.c: Re-generated.
8689 * features/rs6000/powerpc-64.c: Re-generated.
8690 * features/rs6000/powerpc-64l.c: Re-generated.
8691 * features/rs6000/powerpc-7400.c: Re-generated.
8692 * features/rs6000/powerpc-750.c: Re-generated.
8693 * features/rs6000/powerpc-860.c: Re-generated.
8694 * features/rs6000/powerpc-altivec32.c: Re-generated.
8695 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8696 * features/rs6000/powerpc-altivec64.c: Re-generated.
8697 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8698 * features/rs6000/powerpc-cell32l.c: Re-generated.
8699 * features/rs6000/powerpc-cell64l.c: Re-generated.
8700 * features/rs6000/powerpc-e500.c: Re-generated.
8701 * features/rs6000/powerpc-e500l.c: Re-generated.
8702 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8703 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8704 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8705 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8706 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8707 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8708 * features/rs6000/powerpc-vsx32.c: Re-generated.
8709 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8710 * features/rs6000/powerpc-vsx64.c: Re-generated.
8711 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8712 * features/rs6000/rs6000.c: Re-generated.
8713 * features/s390-linux32.c: Re-generated.
8714 * features/s390-linux32v1.c: Re-generated.
8715 * features/s390-linux32v2.c: Re-generated.
8716 * features/s390-linux64.c: Re-generated.
8717 * features/s390-linux64v1.c: Re-generated.
8718 * features/s390-linux64v2.c: Re-generated.
8719 * features/s390-te-linux64.c: Re-generated.
8720 * features/s390-tevx-linux64.c: Re-generated.
8721 * features/s390-vx-linux64.c: Re-generated.
8722 * features/s390x-linux64.c: Re-generated.
8723 * features/s390x-linux64v1.c: Re-generated.
8724 * features/s390x-linux64v2.c: Re-generated.
8725 * features/s390x-te-linux64.c: Re-generated.
8726 * features/s390x-tevx-linux64.c: Re-generated.
8727 * features/s390x-vx-linux64.c: Re-generated.
8728 * features/sparc/sparc32-solaris.c: Re-generated.
8729 * features/sparc/sparc64-solaris.c: Re-generated.
8730 * features/tic6x-c62x.c: Re-generated.
8731 * features/tic6x-c62x-linux.c: Re-generated.
8732 * features/tic6x-c64x.c: Re-generated.
8733 * features/tic6x-c64x-linux.c: Re-generated.
8734 * features/tic6x-c64xp.c: Re-generated.
8735 * features/tic6x-c64xp-linux.c: Re-generated.
8736
35b4818d
YQ
87372017-07-26 Yao Qi <yao.qi@linaro.org>
8738
8739 * i386-linux-tdep.c (i386_linux_read_description): New function.
8740 (i386_linux_core_read_description): Call
8741 i386_linux_read_description.
8742 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8743 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8744 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8745 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8746 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8747 * x86-linux-nat.c (x86_linux_read_description): Call
8748 i386_linux_read_description.
8749
8e2141c6
YQ
87502017-07-26 Yao Qi <yao.qi@linaro.org>
8751
8752 * NEWS: Mention it.
8753 * features/Makefile (%.c: %.xml): Pass the xml file name to
8754 command "maint print c-tdesc".
8755 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8756 name from 'arg'.
8757
b468ff4c
YQ
87582017-07-26 Yao Qi <yao.qi@linaro.org>
8759
8760 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8761 in-class initialization.
8762 (tdesc_create_feature): Call new instead of XCNEW.
8763 (free_target_description): Ue delete.
8764
b9c0e1b4
JB
87652017-07-25 John Baldwin <jhb@FreeBSD.org>
8766
8767 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8768
a04b5337
YQ
87692017-07-25 Yao Qi <yao.qi@linaro.org>
8770
8771 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8772 constant.
8773 (amd64_x32_init_abi): Likewise.
8774 * amd64-tdep.h (amd64_init_abi): Update declaration.
8775 (amd64_x32_init_abi): Likewise.
8776
02ad7fc2
YQ
87772017-07-25 Yao Qi <yao.qi@linaro.org>
8778
8779 PR tdep/21717
8780 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8781 condition for FPSCR.
8782 (arm_linux_store_inferior_registers): Likewise.
8783
b6f48cb0
TT
87842017-07-22 Tom Tromey <tom@tromey.com>
8785
8786 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8787 <syscalls_counts>: Now a std::vector.
8788 (get_catch_syscall_inferior_data): Use "new".
8789 (catch_syscall_inferior_data_cleanup): Use "delete".
8790 (insert_catch_syscall, remove_catch_syscall)
8791 (clear_syscall_counts): Update.
8792
e12c9b7a
TT
87932017-07-22 Tom Tromey <tom@tromey.com>
8794
8795 * break-catch-syscall.c (syscall_catchpoint)
8796 <syscalls_to_be_caught>: Now a std::vector<int>
8797 (~syscall_catchpoint): Remove.
8798 (insert_catch_syscall, remove_catch_syscall)
8799 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8800 (print_mention_catch_syscall, print_recreate_catch_syscall):
8801 Update.
8802 (create_syscall_event_catchpoint): Change type of "filter"
8803 parameter.
8804 (catch_syscall_split_args): Return a std::vector.
8805 (catch_syscall_command_1, catching_syscall_number_1): Update.
8806
4fa8aeac
TT
88072017-07-22 Tom Tromey <tom@tromey.com>
8808
8809 * break-catch-throw.c (struct exception_catchpoint)
8810 <exception_rx>: Now a std::string.
8811 (~exception_catchpoint): Remove.
8812 (print_one_detail_exception_catchpoint): Update.
8813 (handle_gnu_v3_exceptions): Change type of except_rx.
8814 (extract_exception_regexp): Return a std::string.
8815 (catch_exception_command_1): Update.
8816
f746a154
TT
88172017-07-22 Tom Tromey <tom@tromey.com>
8818
8819 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8820 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8821 std::vector.
8822 <catch_all>: Now a bool.
8823 (~signal_catchpoint): Remove.
8824 (signal_catchpoint_insert_location)
8825 (signal_catchpoint_remove_location)
8826 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8827 (signal_catchpoint_print_mention)
8828 (signal_catchpoint_print_recreate)
8829 (signal_catchpoint_explains_signal): Update.
8830 (create_signal_catchpoint): Change type of "filter" and
8831 "catch_all".
8832 (catch_signal_split_args): Return a std::vector. Change type of
8833 "catch_all".
8834 (catch_signal_command): Update.
8835
47e77640
PA
88362017-07-20 Pedro Alves <palves@redhat.com>
8837
8838 * ada-lang.c (ada_language_defn): Make extern.
8839 (_initialize_ada_language): Remove add_language call.
8840 * c-lang.c (c_language_defn, cplus_language_defn)
8841 (asm_language_defn, minimal_language_defn): Make extern.
8842 (_initialize_c_language): Delete.
8843 * completer.c (compare_cstrings): Delete, moved to utils.h.
8844 * d-lang.c (d_language_defn): Make extern.
8845 (_initialize_d_language): Remove add_language calls.
8846 * defs.h (enum language): Add comment.
8847 * f-lang.c (f_language_defn): Make extern.
8848 (_initialize_f_language): Remove add_language call.
8849 * go-lang.c (go_language_defn): Make extern.
8850 (_initialize_go_language): Remove add_language call.
8851 * language.c: Include <algorithm>.
8852 (languages): Redefine as const array.
8853 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8854 (set_language_command): Handle "local". Use for-range loop.
8855 (set_language): Remove loop.
8856 (language_enum): Rewrite.
8857 (language_def, language_str): Remove loops.
8858 (add_language): Delete.
8859 (add_set_language_command): New, based on add_languages.
8860 (skip_language_trampoline): Adjust.
8861 (local_language_defn): Delete.
8862 (language_gdbarch_post_init): Adjust.
8863 (_initialize_language): Remove add_language calls. Call
8864 add_set_language_command.
8865 * language.h (add_language): Delete.
8866 (auto_language_defn)
8867 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8868 (asm_language_defn, c_language_defn, cplus_language_defn)
8869 (d_language_defn, f_language_defn, go_language_defn)
8870 (m2_language_defn, objc_language_defn, opencl_language_defn)
8871 (pascal_language_defn, rust_language_defn): Declare.
8872 * m2-lang.c (m2_language_defn): Make extern.
8873 (_initialize_m2_language): Remove add_language call.
8874 * objc-lang.c (objc_language_defn): Make extern.
8875 (_initialize_objc_language): Remove add_language call.
8876 * opencl-lang.c (opencl_language_defn): Make extern.
8877 (_initialize_opencl_language): Remove add_language call.
8878 * p-lang.c (pascal_language_defn): Make extern.
8879 (_initialize_pascal_language): Delete.
8880 * rust-lang.c (rust_language_defn): Make extern.
8881 (_initialize_rust_language): Delete.
8882 * utils.h (compare_cstrings): New static inline function.
8883
edb0c9cb
PA
88842017-07-20 Pedro Alves <palves@redhat.com>
8885
8886 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8887 (get_var_value): Constify parameters.
8888 (get_int_var_value): Change prototype.
8889 (to_fixed_range_type): Adjust.
8890 * ada-lang.h (get_int_var_value): Change prototype.
8891
a778f165
PA
88922017-07-20 Pedro Alves <palves@redhat.com>
8893
8894 * dwarf2read.c (dw2_lookup_symbol): Use
8895 SYMBOL_MATCHES_SEARCH_NAME.
8896 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8897
42edd901
PA
88982017-07-20 Pedro Alves <palves@redhat.com>
8899
8900 * block.c (block_iter_name_step, block_iter_name_first)
8901 (block_iter_name_next): Delete.
8902 (block_lookup_symbol_primary): Adjust to use
8903 dict_iter_match_first/dict_iter_match_next.
8904 * block.h (block_iter_name_first, block_iter_name_next): Delete
8905 declarations.
8906 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8907 dict_iter_match_first/dict_iter_match_next.
8908
cf325299
PA
89092017-07-20 Pedro Alves <palves@redhat.com>
8910
8911 * cp-support.c (cp_find_first_component_aux): Add missing case for
8912 end of string.
8913
c5ed0576
DB
89142017-07-18 David Blaikie <dblaikie@gmail.com>
8915
8916 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8917 of dwo_cu's dwo_file.
8918
27841e76
YQ
89192017-07-18 Yao Qi <yao.qi@linaro.org>
8920
8921 * remote.c (store_registers_using_G): Remove one line comment.
8922
cfb7e58b
YQ
89232017-07-18 Yao Qi <yao.qi@linaro.org>
8924
8925 * regcache.c (regcache_cpy): Simplify it.
8926 (regcache::cpy_no_passthrough): Remove it.
8927 * regcache.h (cpy_no_passthrough): Remove it.
8928 (regcache_dup, regcache_cpy): Update comments.
8929
386535dd
PA
89302017-07-18 Pedro Alves <palves@redhat.com>
8931
8932 * remote-sim.c (sim_command_completer): Adjust to work with a
8933 completion_tracker instead of a VEC.
8934
c45ec17c
PA
89352017-07-17 Pedro Alves <palves@redhat.com>
8936
8937 * completer.c (complete_source_filenames): New function.
8938 (complete_address_and_linespec_locations): New function.
8939 (location_completer): Use complete_address_and_linespec_locations.
8940 (completion_tracker::build_completion_result): Honor the tracker's
8941 request to suppress append.
8942 * completer.h (completion_tracker::suppress_append_ws)
8943 (completion_tracker::set_suppress_append_ws): New methods.
8944 (completion_tracker::m_suppress_append_ws): New field.
8945 (complete_source_filenames): New declaration.
8946 * linespec.c (linespec_complete_what): New.
8947 (struct ls_parser) <complete_what, completion_word,
8948 completion_quote_char, completion_quote_end, completion_tracker>:
8949 New fields.
8950 (string_find_incomplete_keyword_at_end): New.
8951 (linespec_lexer_lex_string): Record quote char. If in completion
8952 mode, don't throw.
8953 (linespec_lexer_consume_token): Advance the completion word point.
8954 (linespec_lexer_peek_token): Save/restore completion info.
8955 (save_stream_and_consume_token): New.
8956 (set_completion_after_number): New.
8957 (linespec_parse_basic): Set what to complete next depending on
8958 token. Handle function and label completions specially.
8959 (parse_linespec): Disable objc shortcut in completion mode. Set
8960 what to complete next depending on token type. Skip keyword if in
8961 completion mode.
8962 (complete_linespec_component, linespec_complete): New.
8963 * linespec.h (linespec_complete): Declare.
8964
be966d42
PA
89652017-07-17 Pedro Alves <palves@redhat.com>
8966
8967 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8968 Handle 'operator<' / 'operator<<'.
8969
a2459270
PA
89702017-07-17 Pedro Alves <palves@redhat.com>
8971
8972 * completer.c (collect_explicit_location_matches): Handle
8973 MATCH_LABEL.
8974 (convert_explicit_location_to_linespec): New, factored out from
8975 ...
8976 (convert_explicit_location_to_sals): ... this.
8977 (complete_label): New.
8978 (linespec_complete_label, find_label_symbols_in_block): New.
8979 (find_label_symbols): Add completion_mode parameter and adjust to
8980 call find_label_symbols_in_block.
8981 * linespec.h (linespec_complete_label): Declare.
8982
c6756f62
PA
89832017-07-17 Pedro Alves <palves@redhat.com>
8984
8985 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8986 complete_symbol_mode parameter.
8987 * cli/cli-cmds.c (complete_command): Get the completion result out
8988 of the handle_brkchars tracker if used a custom word point.
8989 * completer.c: Include "linespec.h".
8990 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8991 (advance_to_expression_complete_word_point): New.
8992 (completion_tracker::completes_to_completion_word): New.
8993 (complete_files_symbols): Pass down
8994 complete_symbol_mode::EXPRESSION.
8995 (explicit_options, probe_options): New.
8996 (collect_explicit_location_matches): Complete on the
8997 explictit_loc->foo instead of word. Use
8998 linespec_complete_function. Handle MATCH_LINE. Handle offering
8999 keyword and options completions.
9000 (backup_text_ptr): Delete.
9001 (skip_keyword): New.
9002 (complete_explicit_location): Remove 'word' parameter. Add
9003 language, quoted_arg_start and quoted_arg_end parameters.
9004 Rewrite, parsing left to right.
9005 (location_completer): Rewrite.
9006 (location_completer_handle_brkchars): New function.
9007 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9008 (enum complete_line_internal_reason): Adjust comments.
9009 (completion_tracker::discard_completions): New.
9010 (completer_handle_brkchars_func_for_completer): Handle
9011 location_completer.
9012 (gdb_custom_word_point_brkchars)
9013 (gdb_org_rl_basic_quote_characters): New.
9014 (gdb_completion_word_break_characters_throw)
9015 (completion_find_completion_word): Handle trackers that use a
9016 custom word point.
9017 (completion_tracker::advance_custom_word_point_by): New.
9018 (completion_tracker::build_completion_result): Don't rely on
9019 readline appending the quote char.
9020 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9021 use a custom word point.
9022 (gdb_rl_attempted_completion_function): Restore
9023 rl_basic_quote_characters.
9024 * completer.h (class completion_tracker): Extend intro comment.
9025 (completion_tracker::set_quote_char)
9026 (completion_tracker::quote_char)
9027 (completion_tracker::set_use_custom_word_point)
9028 (completion_tracker::use_custom_word_point)
9029 (completion_tracker::custom_word_point)
9030 (completion_tracker::set_custom_word_point)
9031 (completion_tracker::advance_custom_word_point_by)
9032 (completion_tracker::completes_to_completion_word)
9033 (completion_tracker::discard_completions): New methods.
9034 (completion_tracker::m_quote_char)
9035 (completion_tracker::m_use_custom_word_point)
9036 (completion_tracker::m_custom_word_point): New fields.
9037 (advance_to_expression_complete_word_point): Declare.
9038 * f-lang.c (f_collect_symbol_completion_matches): Add
9039 complete_symbol_mode parameter.
9040 * language.h (struct language_defn)
9041 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9042 parameter.
9043 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9044 (linespec_complete_function): New function.
9045 (linespec_lexer_lex_keyword): Adjust.
9046 * linespec.h (linespec_keywords, linespec_complete_function): New
9047 declarations.
9048 * location.c (find_end_quote): New function.
9049 (explicit_location_lex_one): Add explicit_completion_info
9050 parameter. Save quoting info. Don't throw if being called for
9051 completion. Don't handle Ada operators here.
9052 (is_cp_operator, skip_op_false_positives, first_of)
9053 (explicit_location_lex_one_function): New function.
9054 (string_to_explicit_location): Replace 'dont_throw' parameter with
9055 an explicit_completion_info pointer parameter. Handle it. Don't
9056 use explicit_location_lex_one to lex function names. Use
9057 explicit_location_lex_one_function instead.
9058 * location.h (struct explicit_completion_info): New.
9059 (string_to_explicit_location): Replace 'dont_throw' parameter with
9060 an explicit_completion_info pointer parameter.
9061 * symtab.c (default_collect_symbol_completion_matches_break_on):
9062 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9063 (default_collect_symbol_completion_matches)
9064 (collect_symbol_completion_matches): Add complete_symbol_mode
9065 parameter.
9066 (collect_symbol_completion_matches_type): Pass down
9067 complete_symbol_mode::EXPRESSION.
9068 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9069 parameter. Handle LINESPEC mode.
9070 * symtab.h (complete_symbol_mode): New.
9071 (default_collect_symbol_completion_matches_break_on)
9072 (default_collect_symbol_completion_matches)
9073 (collect_symbol_completion_matches)
9074 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9075 parameter.
9076
1d550c82
PA
90772017-07-17 Pedro Alves <palves@redhat.com>
9078
9079 * utils.c (enum class strncmp_iw_mode): New.
9080 (strcmp_iw): Rename to ...
9081 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9082 parameters. Handle them.
9083 (strncmp_iw): New.
9084 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9085 * utils.h (strncmp_iw): Declare.
9086 (strcmp_iw): Move describing comments here.
9087
8090b426
PA
90882017-07-17 Pedro Alves <palves@redhat.com>
9089
9090 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9091 CP_OPERATOR_STR.
9092 * c-typeprint.c (is_type_conversion_operator): Use
9093 CP_OPERATOR_STR.
9094 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9095 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9096 CP_OPERATOR_LEN.
9097 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9098 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9099 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9100 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9101 CP_OPERATOR_STR.
9102 * location.c: Include "cp-support.h".
9103 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9104 CP_OPERATOR_STR.
9105 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9106 CP_OPERATOR_LEN.
9107
6a2c1b87
PA
91082017-07-17 Pedro Alves <palves@redhat.com>
9109
9110 * cli/cli-cmds.c (complete_command): Use a completion tracker
9111 along with completion_find_completion_word for handle_brkchars
9112 phase.
9113 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9114 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9115 (struct gdb_rl_completion_word_info): New.
9116 (gdb_rl_find_completion_word): New.
9117 (completion_find_completion_word): New.
9118 * completer.h (completion_find_completion_word): Declare.
9119
eb3ff9a5
PA
91202017-07-17 Pedro Alves <palves@redhat.com>
9121
9122 * ada-lang.c (symbol_completion_match): Adjust comments.
9123 (symbol_completion_add): Replace vector parameter with
9124 completion_tracker parameter. Use it.
9125 (ada_make_symbol_completion_list): Rename to...
9126 (ada_collect_symbol_completion_matches): ... this. Add
9127 completion_tracker parameter and use it.
9128 (ada_language_defn): Adjust.
9129 * break-catch-syscall.c (catch_syscall_completer): Adjust
9130 prototype and work with completion_tracker instead of VEC.
9131 * breakpoint.c (condition_completer): Adjust prototype and work
9132 with completion_tracker instead of VEC.
9133 * c-lang.c (c_language_defn, cplus_language_defn)
9134 (asm_language_defn, minimal_language_defn): Adjust to renames.
9135 * cli/cli-cmds.c (complete_command): Rework using
9136 completion_tracker. Catch exceptions when completing.
9137 * cli/cli-decode.c (integer_unlimited_completer)
9138 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9139 with completion_tracker instead of VEC.
9140 * command.h (struct completion_tracker): Forward declare.
9141 (completer_ftype, completer_handle_brkchars_ftype): Change
9142 types.
9143 (complete_on_cmdlist, complete_on_enum): Adjust.
9144 * completer.c: Include <algorithm>.
9145 (struct gdb_completer_state): New.
9146 (current_completion): New global.
9147 (readline_line_completion_function): Delete.
9148 (noop_completer, filename_completer)
9149 (filename_completer_handle_brkchars, complete_files_symbols)
9150 (linespec_location_completer): Adjust to work with a
9151 completion_tracker instead of a VEC.
9152 (string_or_empty): New.
9153 (collect_explicit_location_matches): Adjust to work with a
9154 completion_tracker instead of a VEC.
9155 (explicit_location_completer): Rename to ...
9156 (complete_explicit_location): ... this and adjust to work with a
9157 completion_tracker instead of a VEC.
9158 (location_completer): Adjust to work with a completion_tracker
9159 instead of a VEC.
9160 (add_struct_fields): Adjust to work with a completion_list instead
9161 of VEC.
9162 (expression_completer): Rename to ...
9163 (complete_expression): ... this and adjust to work with a
9164 completion_tracker instead of a VEC. Use complete_files_symbols.
9165 (expression_completer): Reimplement on top of complete_expression.
9166 (symbol_completer): Adjust to work with a completion_tracker
9167 instead of a VEC.
9168 (enum complete_line_internal_reason): Add describing comments.
9169 (complete_line_internal_normal_command): Adjust to work with a
9170 completion_tracker instead of a VEC.
9171 (complete_line_internal): Rename to ...
9172 (complete_line_internal_1): ... this and adjust to work with a
9173 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9174 handle_brkchars phase.
9175 (new_completion_tracker): Delete.
9176 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9177 complete_line_internal_1.
9178 (free_completion_tracker): Delete.
9179 (INITIAL_COMPLETION_HTAB_SIZE): New.
9180 (completion_tracker::completion_tracker)
9181 (completion_tracker::~completion_tracker): New.
9182 (maybe_add_completion): Delete.
9183 (completion_tracker::maybe_add_completion)
9184 (completion_tracker::add_completion)
9185 (completion_tracker::add_completions): New.
9186 (throw_max_completions_reached_error): Delete.
9187 (complete_line): Adjust to work with a completion_tracker instead
9188 of a VEC. Don't create a completion_tracker_t or check for max
9189 completions here.
9190 (command_completer, command_completer_handle_brkchars)
9191 (signal_completer, reg_or_group_completer_1)
9192 (reg_or_group_completer, default_completer_handle_brkchars):
9193 Adjust to work with a completion_tracker.
9194 (gdb_completion_word_break_characters_throw): New.
9195 (gdb_completion_word_break_characters): Reimplement.
9196 (line_completion_function): Delete.
9197 (completion_tracker::recompute_lowest_common_denominator)
9198 (expand_preserving_ws)
9199 (completion_tracker::build_completion_result)
9200 (completion_result::completion_result)
9201 (completion_result::completion_result)
9202 (completion_result::~completion_result)
9203 (completion_result::completion_result)
9204 (completion_result::release_match_list, compare_cstrings)
9205 (completion_result::sort_match_list)
9206 (completion_result::reset_match_list)
9207 (gdb_rl_attempted_completion_function_throw)
9208 (gdb_rl_attempted_completion_function): New.
9209 * completer.h (completion_list, struct completion_result)
9210 (class completion_tracker): New.
9211 (complete_line): Add completion_tracker parameter.
9212 (readline_line_completion_function): Delete.
9213 (gdb_rl_attempted_completion_function): New.
9214 (noop_completer, filename_completer, expression_completer)
9215 (location_completer, symbol_completer, command_completer)
9216 (signal_completer, reg_or_group_completer): Update prototypes.
9217 (completion_tracker_t, new_completion_tracker)
9218 (make_cleanup_free_completion_tracker): Delete.
9219 (enum maybe_add_completion_enum): Delete.
9220 (maybe_add_completion): Delete.
9221 (throw_max_completions_reached_error): Delete.
9222 * corefile.c (complete_set_gnutarget): Adjust to work with a
9223 completion_tracker instead of a VEC.
9224 * cp-abi.c (cp_abi_completer): Adjust to work with a
9225 completion_tracker instead of a VEC.
9226 * d-lang.c (d_language_defn): Adjust.
9227 * disasm.c (disassembler_options_completer): Adjust to work with a
9228 completion_tracker instead of a VEC.
9229 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9230 (f_collect_symbol_completion_matches): ... this. Adjust to work
9231 with a completion_tracker instead of a VEC.
9232 (f_language_defn): Adjust.
9233 * go-lang.c (go_language_defn): Adjust.
9234 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9235 Adjust to work with a completion_tracker instead of a VEC.
9236 * infrun.c (handle_completer): Likewise.
9237 * interps.c (interpreter_completer): Likewise.
9238 * interps.h (interpreter_completer): Likewise.
9239 * language.c (unknown_language_defn, auto_language_defn)
9240 (local_language_defn): Adjust.
9241 * language.h (language_defn::la_make_symbol_completion_list):
9242 Rename to ...
9243 (language_defn::la_collect_symbol_completion_matches): ... this
9244 and adjust to work with a completion_tracker instead of a VEC.
9245 * m2-lang.c (m2_language_defn): Adjust.
9246 * objc-lang.c (objc_language_defn): Adjust.
9247 * opencl-lang.c (opencl_language_defn): Adjust.
9248 * p-lang.c (pascal_language_defn): Adjust.
9249 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9250 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9251 with a completion_tracker.
9252 * rust-lang.c (rust_language_defn): Adjust.
9253 * symtab.c (free_completion_list, do_free_completion_list)
9254 (return_val, completion_tracker): Delete.
9255 (completion_list_add_name, completion_list_add_symbol)
9256 (completion_list_add_msymbol, completion_list_objc_symbol)
9257 (completion_list_add_fields, add_symtab_completions): Add
9258 completion_tracker parameter and use it.
9259 (default_make_symbol_completion_list_break_on_1): Rename to...
9260 (default_collect_symbol_completion_matches_break_on): ... this.
9261 Add completion_tracker parameter and use it instead of allocating
9262 a completion tracker here.
9263 (default_make_symbol_completion_list_break_on): Delete old
9264 implementation.
9265 (default_make_symbol_completion_list): Delete.
9266 (default_collect_symbol_completion_matches): New.
9267 (make_symbol_completion_list): Delete.
9268 (collect_symbol_completion_matches): New.
9269 (make_symbol_completion_type): Rename to ...
9270 (collect_symbol_completion_matches_type): ... this. Add
9271 completion_tracker parameter and use it instead of VEC.
9272 (make_file_symbol_completion_list_1): Rename to...
9273 (collect_file_symbol_completion_matches): ... this. Add
9274 completion_tracker parameter and use it instead of VEC.
9275 (make_file_symbol_completion_list): Delete.
9276 (add_filename_to_list): Use completion_list instead of a VEC.
9277 (add_partial_filename_data::list): Now a completion_list.
9278 (make_source_files_completion_list): Work with a completion_list
9279 instead of a VEC.
9280 * symtab.h: Include "completer.h".
9281 (default_make_symbol_completion_list_break_on)
9282 (default_make_symbol_completion_list, make_symbol_completion_list)
9283 (make_symbol_completion_type, make_file_symbol_completion_list)
9284 (make_source_files_completion_list): Delete.
9285 (default_collect_symbol_completion_matches_break_on)
9286 (default_collect_symbol_completion_matches)
9287 (collect_symbol_completion_matches)
9288 (collect_symbol_completion_matches_type)
9289 (collect_file_symbol_completion_matches)
9290 (make_source_files_completion_list): New.
9291 * top.c (init_main): Don't install a rl_completion_entry_function
9292 hook. Install a rl_attempted_completion_function hook instead.
9293 * tui/tui-layout.c (layout_completer): Adjust to work with a
9294 completion_tracker.
9295 * tui/tui-regs.c (tui_reggroup_completer):
9296 * tui/tui-win.c (window_name_completer, focus_completer)
9297 (winheight_completer): Adjust to work with a completion_tracker.
9298 * value.c: Include "completer.h".
9299 (complete_internalvar): Adjust to work with a completion_tracker.
9300 * value.h (complete_internalvar): Likewise.
9301
6e1dbf8c
PA
93022017-07-17 Pedro Alves <palves@redhat.com>
9303
9304 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9305 renames.
9306 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9307 comments to completer_ftype's declaration.
9308 <completer_handle_brkchars>: Change type to
9309 completer_handle_brkchars_ftype.
9310 * command.h (completer_ftype): Add describing comment and give
9311 names to parameters.
9312 (completer_ftype_void): Rename to ...
9313 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9314 (set_cmd_completer_handle_brkchars): Adjust.
9315 * completer.c (filename_completer_handle_brkchars): New function.
9316 (complete_line_internal_normal_command): New function, factored
9317 out from ...
9318 (complete_line_internal): ... here.
9319 (command_completer_handle_brkchars)
9320 (default_completer_handle_brkchars)
9321 (completer_handle_brkchars_func_for_completer): New functions.
9322 * completer.h (set_gdb_completion_word_break_characters): Delete
9323 declaration.
9324 (completer_handle_brkchars_func_for_completer): New declaration.
9325 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9326 completer_handle_brkchars_func_for_completer.
9327
78b13106
PA
93282017-07-17 Pedro Alves <palves@redhat.com>
9329
9330 * completer.c (symbol_completer): New function, based on
9331 make_symbol_completion_list_fn.
9332 * completer.h (symbol_completer): New declaration.
9333 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9334 * python/py-cmd.c (completers): Adjust.
9335 * symtab.c (make_symbol_completion_list_fn): Delete.
9336 * symtab.h (make_symbol_completion_list_fn): Delete.
9337 * cli/cli-decode.c (add_cmd): Adjust.
9338
bbf2f4df
PA
93392017-07-17 Pedro Alves <palves@redhat.com>
9340
9341 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9342 * dwarf2read.c: Include "filename-seen-cache.h".
9343 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9344 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9345 * filename-seen-cache.c: New file.
9346 * filename-seen-cache.h: New file.
9347 * symtab.c: Include "filename-seen-cache.h".
9348 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9349 (create_filename_seen_cache, clear_filename_seen_cache)
9350 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9351 to filename-seen-cache.h/filename-seen-cache.c.
9352 (output_source_filename, sources_info)
9353 (maybe_add_partial_symtab_filename)
9354 (make_source_files_completion_list): Adjust to use
9355 filename_seen_cache.
9356
330cdd98
PA
93572017-07-17 Pedro Alves <palves@redhat.com>
9358
9359 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9360 fields.
9361 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9362 dwarf2_debug_sections*)): New.
9363 (dwarf2_per_objfile::dwarf2_per_objfile(const
9364 dwarf2_per_objfile&)): Declare as deleted.
9365 (dwarf2_per_objfile::operator=): Declare as deleted.
9366 (dwarf2_per_objfile::dwarf2_per_objfile)
9367 (dwarf2_per_objfile::~dwarf2_per_objfile)
9368 (dwarf2_per_objfile::free_cached_comp_units): New.
9369 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9370 ctor. Call dwarf2_per_objfile's ctor manually.
9371 (dwarf2_locate_sections): Deleted/refactored as ...
9372 (dwarf2_per_objfile::locate_sections): ... this new method.
9373 (free_cached_comp_units): Defer to
9374 dwarf2_per_objfile::free_cached_comp_units.
9375 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9376
8880f2a9
TT
93772017-07-14 Tom Tromey <tom@tromey.com>
9378
9379 PR rust/21764:
9380 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9381 parameter.
9382 <UNOP_SIZEOF>: Split into separate case.
9383 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9384
65547233
TT
93852017-07-14 Tom Tromey <tom@tromey.com>
9386
9387 PR rust/21763:
9388 * symtab.c (symbol_matches_domain): Add language_rust to special
9389 case.
9390 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9391 treat LOC_TYPEDEF symbols as variables.
9392
8f14146e
PA
93932017-07-14 Pedro Alves <palves@redhat.com>
9394
9395 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9396 symtabs matching all symtabs with SRCFILE as file name instead of
9397 only considering the first hit, with lookup_symtab.
9398
2347965c
SM
93992017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9400
9401 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9402 operator_name parameters.
9403 (gen_expr): Update function call.
9404
40f4af28
SM
94052017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9406
9407 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9408 parameter.
9409 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9410 Likewise.
9411 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9412 parameter, use agent_expr::gdbarch instead, update function
9413 calls.
9414 (locexpr_tracepoint_var_ref): Likewise.
9415 (loclist_tracepoint_var_ref): Likewise.
9416 * ax-gdb.c (gen_trace_static_fields): Likewise.
9417 (gen_traced_pop): Likewise.
9418 (gen_frame_args_address): Likewise.
9419 (gen_frame_locals_address): Likewise.
9420 (gen_var_ref): Likewise.
9421 (gen_struct_ref_recursive): Likewise.
9422 (gen_static_field): Likewise.
9423 (gen_maybe_namespace_elt): Likewise.
9424 (gen_expr): Likewise.
9425 (gen_trace_for_var): Likewise.
9426 (gen_trace_for_expr): Likewise.
9427 (gen_trace_for_return_address): Likewise.
9428
053f8057
SM
94292017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9430
9431 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9432 parameter.
9433 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9434
6661ad48
SM
94352017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9436
9437 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9438 from ax, update calls.
9439 (gen_usual_arithmetic): Likewise.
9440 (gen_integral_promotions): Likewise.
9441 (gen_bitfield_ref): Likewise.
9442 (gen_primitive_field): Likewise.
9443 (gen_struct_ref_recursive): Likewise.
9444 (gen_struct_ref): Likewise.
9445 (gen_maybe_namespace_elt): Likewise.
9446 (gen_struct_elt_for_reference): Likewise.
9447 (gen_namespace_elt): Likewise.
9448 (gen_aggregate_elt_ref): Likewise.
9449 (gen_expr): Get gdbarch from ax, update calls.
9450 (gen_expr_binop_rest): Likewise.
9451
c55a47e7
PA
94522017-07-13 Pedro Alves <palves@redhat.com>
9453
9454 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9455 as default tdesc.
9456 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9457 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9458 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9459 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9460 tdep.
9461 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9462 Get final tdesc from the tdep.
9463 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9464 default tdesc.
9465 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9466 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9467 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9468 Use it as default tdesc.
9469 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9470 down to amd_init_abi. No longer handle fallback tdesc here.
9471 * amd64-tdep.h (tdesc_x32): Declare.
9472 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9473 parameter.
9474 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9475 as default tdesc.
9476
55efceab
AA
94772017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9478
9479 * s390-linux-tdep.c (s390_process_record): Add support for
9480 instructions new in arch12.
9481
0aa37b65
JB
94822017-07-11 John Baldwin <jhb@FreeBSD.org>
9483
9484 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9485 PT_GETFSBASE and PT_GETGSBASE.
9486 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9487 PT_SETGSBASE.
9488
48aeef91
JB
94892017-07-11 John Baldwin <jhb@FreeBSD.org>
9490
9491 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9492 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9493 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9494 those rules.
9495 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9496 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9497 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9498 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9499 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9500 * features/i386/amd64.xml: Add 64bit-segments.xml.
9501 * features/i386/amd64-avx-avx512.c: Regenerated.
9502 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9503 * features/i386/amd64-avx-mpx.c: Regenerated.
9504 * features/i386/amd64-avx.c: Regenerated.
9505 * features/i386/amd64-mpx.c: Regenerated.
9506 * features/i386/amd64.c: Regenerated.
9507 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9508 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9509 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9510 * regformats/i386/amd64-avx.dat: Regenerated.
9511 * regformats/i386/amd64-mpx.dat: Regenerated.
9512 * regformats/i386/amd64.dat: Regenerated.
9513
77c501bc
YQ
95142017-07-10 Yao Qi <yao.qi@linaro.org>
9515
9516 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9517 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9518
6dc8d757
AK
95192017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9520
9521 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9522 unsetenv.
9523 * gnulib/aclocal.m4: Regenerate.
9524 * gnulib/config.in: Regenerate.
9525 * gnulib/configure: Regenerate.
9526 * gnulib/import/Makefile.am: Regenerate.
9527 * gnulib/import/Makefile.in: Regenerate.
9528 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9529 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9530 * gnulib/import/m4/environ.m4: New file.
9531 * gnulib/import/m4/setenv.m4: New file.
9532 * gnulib/import/setenv.c: New file.
9533 * gnulib/import/unsetenv.c: New file.
9534
266934d1
SM
95352017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9536
9537 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9538 address when op is DW_OP_addr.
9539
03278692
TT
95402017-07-09 Tom Tromey <tom@tromey.com>
9541
9542 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9543 check and apply to outer type.
9544
4b654465
JB
95452017-07-07 John Baldwin <jhb@FreeBSD.org>
9546
9547 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9548 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9549 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9550 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9551
2af9fc44
JB
95522017-07-07 John Baldwin <jhb@FreeBSD.org>
9553
9554 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9555
382b69bb
JB
95562017-07-07 John Baldwin <jhb@FreeBSD.org>
9557
9558 * corelow.c (get_core_siginfo): Remove.
9559 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9560 instead of get_core_siginfo.
9561 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9562 * gdbarch.h: Re-generate.
9563 * gdbarch.c: Re-generate.
9564 * linux-tdep.c (linux_core_xfer_siginfo): New.
9565 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9566
6e5eab33
JB
95672017-07-07 John Baldwin <jhb@FreeBSD.org>
9568
9569 * corelow.c (thread_section_name): Move to ...
9570 * gdbcore.h (thread_section_name): ... here.
9571
929edea9
JB
95722017-07-07 John Baldwin <jhb@FreeBSD.org>
9573
9574 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9575 (struct siginfo32): New.
9576 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9577 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9578 via ptrace(PT_LWPINFO).
9579
762c974a
JB
95802017-07-07 John Baldwin <jhb@FreeBSD.org>
9581
9582 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9583 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9584 (fbsd_get_siginfo_type): New.
9585 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9586 (_initialize_fbsd_tdep): New.
9587
33c5cd75
DB
95882017-07-06 David Blaikie <dblaikie@gmail.com>
9589
9590 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9591 a singular dwo_unit*) to support multiple CUs in the same way that
9592 multiple TUs are supported.
9593 (create_cus_hash_table): Replace create_dwo_cu with a function for
9594 parsing multiple CUs from a DWO file.
9595 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9596 create_dwo_cu.
9597 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9598 htab_find, rather than comparing the signature to a singleton CU in
9599 the dwo_file.
9600
8455d262
PA
96012017-07-06 Pedro Alves <palves@redhat.com>
9602
9603 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9604
4da3eb35
PA
96052017-07-04 Pedro Alves <palves@redhat.com>
9606
9607 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9608 * gdbtypes.h (TYPE_STATIC): Delete.
9609 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9610 is_synchronized, is_native>: Delete.
9611 <dummy>: Bump.
9612 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9613 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9614 (TYPE_FN_FIELD_ABSTRACT): Delete.
9615
5bfd255c
SM
96162017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9617
9618 * buffer.h (buffer_finish): Fix spelling mistakes.
9619
25c54127
EZ
96202017-07-01 Eli Zaretskii <eliz@gnu.org>
9621
9622 * .dir-locals.el: Automatically switch to C-style comments in
9623 versions of Emacs that support the feature.
9624
dc4bde35
SDJ
96252017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9626 Pedro Alves <palves@redhat.com>
9627
9628 PR cli/21688
9629 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9630 (process_next_line): New variable 'inline_cmd'.
9631 Adjust 'if' clauses for "python", "compile" and "guile" to use
9632 'command_name_equals' and check for '!inline_cmd'.
9633
51ed89aa
SDJ
96342017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9635
9636 PR cli/21688
9637 * cli/cli-script.c (command_name_equals_not_inline): New function.
9638 (process_next_line): Adjust 'if' clauses for "python", "compile"
9639 and "guile" to use command_name_equals_not_inline.
9640
eb17d413
PA
96412017-06-29 Pedro Alves <palves@redhat.com>
9642
9643 * completer.c (expression_completer): Call
9644 linespec_location_completer instead of location_completer.
9645
195bcdd5
PA
96462017-06-29 Pedro Alves <palves@redhat.com>
9647
9648 * completer.c (expression_completer): Remove code that recomputes
9649 'text' from 'word'.
9650
adc764e7
YQ
96512017-06-29 Yao Qi <yao.qi@linaro.org>
9652
9653 * regformats/regdat.sh: Generate code with
9654 "ifndef IN_PROCESS_AGENT".
9655
6e75794e
PA
96562017-06-28 Pedro Alves <palves@redhat.com>
9657
9658 * command.h: Include "common/scoped_restore.h".
9659
bc491f2e
YQ
96602017-06-28 Yao Qi <yao.qi@linaro.org>
9661
9662 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9663 instead of obstack_grow.
9664
41664b45
DG
96652017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9666
9667 PR gdb/21337
9668 * symfile.c (reread_symbols): Call objfiles_changed just before
9669 read_symbols.
9670
6da67eb1
PA
96712017-06-27 Pedro Alves <palves@redhat.com>
9672
9673 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9674 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9675 (completion_list_add_symbol, completion_list_add_msymbol):
9676 ... these new functions.
9677 (add_symtab_completions)
9678 (default_make_symbol_completion_list_break_on_1): Adjust.
9679
23732b1e
PA
96802017-06-27 Pedro Alves <palves@redhat.com>
9681
9682 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9683 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9684 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9685 dtor.
9686 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9687 'storage_obstack' field an auto_obstack. In-class initialize all
9688 non-bitfield fields. Make minsyms_read bool.
9689 * symfile.c (read_symbols): Adjust.
9690
a4d1e79a
AH
96912017-06-27 Alan Hayward <alan.hayward@arm.com>
9692
9693 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9694 (gdbsim_store_register): Likewise.
9695
8268c778
PA
96962017-06-27 Pedro Alves <palves@redhat.com>
9697
9698 * c-exp.y (name_obstack): Now an auto_obstack.
9699 (yylex): Use auto_obstack::clear.
9700 (c_parse): Use auto_obstack::clear instead of reinitializing and
9701 freeing the obstack.
9702 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9703 * d-exp.y (name_obstack): Now an auto_obstack.
9704 (yylex): Use auto_obstack::clear.
9705 (d_parse): Use auto_obstack::clear instead of reinitializing and
9706 freeing the obstack.
9707 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9708 auto_obstack.
9709 * dwarf2read.c (create_addrmap_from_index)
9710 (dwarf2_build_psymtabs_hard)
9711 (update_enumeration_type_from_children): Likewise.
9712 * gdb_obstack.h (auto_obstack): New type.
9713 * go-exp.y (name_obstack): Now an auto_obstack.
9714 (build_packaged_name): Use auto_obstack::clear.
9715 (go_parse): Use auto_obstack::clear instead of reinitializing and
9716 freeing the obstack.
9717 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9718 auto_obstack.
9719 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9720 * rust-exp.y (work_obstack): Now an auto_obstack.
9721 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9722 reinitializing and freeing the obstack.
9723 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9724 (host_char_to_target): Use auto_obstack.
9725 * utils.h (make_cleanup_obstack_free): Delete declaration.
9726 * valprint.c (generic_emit_char, generic_printstr): Use
9727 auto_obstack.
9728
db665f42
SM
97292017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9730
9731 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9732 thread.
9733 (darwin_init_thread_list): Don't update dummy thread.
9734 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9735
873c0814
SM
97362017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9737
9738 * record-full.c (netorder16): Remove.
9739
8b5a7a6e
SM
97402017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9741
9742 * common/diagnostics.h: Define macros for GCC.
9743 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9744 * common/vec.h: Include diagnostics.h.
9745 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9746 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9747 warning.
9748
d1435379
SM
97492017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9750
9751 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9752 New macro.
9753 * ada-lex.l: Ignore deprecated register warnings.
9754
cc75e0fd
SM
97552017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9756
9757 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9758 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9759
07809eaf
SM
97602017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9761
9762 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9763 its own line.
9764
f076f034
SM
97652017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9766
9767 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9768
0dd5cbc5
AH
97692017-06-23 Alan Hayward <alan.hayward@arm.com>
9770
9771 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9772 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9773 (xtensa_register_read_masked): Likewise.
9774
d4c6ce5b
SDJ
97752017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9776
9777 * common/environ.c (gdb_environ::unset): Update comment.
9778
16892a03
AH
97792017-06-22 Alan Hayward <alan.hayward@arm.com>
9780
9781 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9782 registers.
9783
d7dcbefc
AH
97842017-06-22 Alan Hayward <alan.hayward@arm.com>
9785
9786 * record-full.c (record_full_exec_insn): Use byte_vector.
9787
b30ff123
YQ
97882017-06-22 Yao Qi <yao.qi@linaro.org>
9789
9790 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9791 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9792
4fa847d7
AH
97932017-06-22 Alan Hayward <alan.hayward@arm.com>
9794
9795 * remote.c (cached_reg): Move from here...
9796 * regcache.h (cached_reg): ...to here.
9797 * python/py-unwind.c (struct reg_info): Remove.
9798 (cached_frame_info): Use cached_reg_t.
9799 (pyuw_prev_register): Likewise.
9800 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9801 (pyuw_dealloc_cache): Free all registers.
9802
f4906a9a
PA
98032017-06-22 Pedro Alves <palves@redhat.com>
9804 Simon Marchi <simon.marchi@ericsson.com>
9805
9806 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9807 warning.
9808 * common/diagnostics.h: New file.
9809
b45a1208
PA
98102017-06-22 Pedro Alves <palves@redhat.com>
9811
9812 * common/agent.h: Add include guards.
9813
e4da2c61
SM
98142017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9815
9816 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9817 talk about addressable units instead of bytes.
9818
96160d60
SDJ
98192017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9820
9821 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9822 of '::const_iterator'.
9823
9a6c7d9c
SDJ
98242017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9825
9826 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9827 'unittests/environ-selftests.c'.
9828 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9829 * charset.c (find_charset_names): Declare object 'iconv_env'.
9830 Update code to use 'iconv_env' object. Remove call to
9831 'free_environ'.
9832 * common/environ.c: Include <utility>.
9833 (make_environ): Delete function.
9834 (free_environ): Delete function.
9835 (gdb_environ::clear): New function.
9836 (gdb_environ::operator=): New function.
9837 (gdb_environ::get): Likewise.
9838 (environ_vector): Delete function.
9839 (set_in_environ): Delete function.
9840 (gdb_environ::set): New function.
9841 (unset_in_environ): Delete function.
9842 (gdb_environ::unset): New function.
9843 (gdb_environ::envp): Likewise.
9844 * common/environ.h: Include <vector>.
9845 (struct gdb_environ): Delete; transform into...
9846 (class gdb_environ): ... this class.
9847 (free_environ): Delete prototype.
9848 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9849 environ_vector): Likewise.
9850 * infcmd.c (run_command_1): Update code to call
9851 'envp' from 'gdb_environ' class.
9852 (environment_info): Update code to call methods from 'gdb_environ'
9853 class.
9854 (unset_environment_command): Likewise.
9855 (path_info): Likewise.
9856 (path_command): Likewise.
9857 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9858 (inferior::inferior): Initialize 'environment' using the host's
9859 information.
9860 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9861 Include "environ.h".
9862 (class inferior) <environment>: Change type from 'struct
9863 gdb_environ' to 'gdb_environ'.
9864 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9865 methods from 'gdb_environ' class.
9866 * solib.c (solib_find_1): Likewise
9867 * unittests/environ-selftests.c: New file.
9868
75c554cf
YQ
98692017-06-20 Yao Qi <yao.qi@linaro.org>
9870
9871 * features/i386/i386-linux.xml: Exchange the order of including
9872 32bit-linux.xml and 32bit-sse.xml.
9873 * features/i386/i386-linux.c: Regenerated.
9874
72ddacb7
YQ
98752017-06-20 Yao Qi <yao.qi@linaro.org>
9876
9877 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9878 Delete copy ctor and assignment operator.
9879 (tdesc_type): Likewise.
9880 (tdesc_feature): Likewise.
9881 (tdesc_free_reg): Remove.
9882 (tdesc_create_reg): Use new.
9883 (tdesc_free_type): Remove.
9884 (tdesc_create_vector): Use new.
9885 (tdesc_create_union): Likewise.
9886 (tdesc_create_flags): Likewise.
9887 (tdesc_create_enum): Likewise.
9888 (tdesc_free_feature): Delete.
9889 (free_target_description): Use delete.
9890
325c9fd4
JB
98912017-06-19 John Baldwin <jhb@FreeBSD.org>
9892
9893 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9894 registers.
9895
16b7a719
PA
98962017-06-19 Pedro Alves <palves@redhat.com>
9897
9898 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9899 after gdb::unlinker.
9900
1c8e01c9
SDJ
99012017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9902
9903 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9904 gdb_environ to access an environment variable.
9905
ffce45d2
TP
99062017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9907
9908 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9909 gdb_byte*.
9910
1d4fbac9
SM
99112017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9912
9913 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9914
8465943a
SM
99152017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9916
9917 * configure: Re-generate.
9918 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9919
3e019bdc
SM
99202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9921
9922 * configure: Re-generate.
9923 * warning.m4: Pass -Werror to compiler when checking for
9924 supported warning flags.
9925
cf0dd6f0
SM
99262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9927
9928 * Makefile.in (COMPILE.pre): Add "-x c++".
9929
6f98355c
YQ
99302017-06-16 Alan Hayward <alan.hayward@arm.com>
9931 Pedro Alves <palves@redhat.com>
9932 Yao Qi <yao.qi@linaro.org>
9933
9934 * defs.h (RequireLongest): New.
9935 (extract_integer): Declare function template.
9936 (extract_signed_integer): Remove the declaration, but define it
9937 static inline.
9938 (extract_unsigned_integer): Likewise.
9939 (store_integer): Declare function template.
9940 (store_signed_integer): Remove the declaration, but define it
9941 static inline.
9942 (store_unsigned_integer): Likewise.
9943 * findvar.c (extract_integer): New function template.
9944 (extract_signed_integer): Remove.
9945 (extract_unsigned_integer): Remove.
9946 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9947 instantiations.
9948 (store_integer): New function template.
9949 (store_signed_integer): Remove.
9950 (store_unsigned_integer): Remove.
9951 (store_integer): Explicit instantiations.
9952 * regcache.c (regcache_raw_read_signed): Update.
9953 (regcache::raw_read): New function.
9954 (regcache::raw_read_signed): Remove.
9955 (regcache::raw_read_unsigned): Remove.
9956 (regcache_raw_read_unsigned): Update.
9957 (regcache_raw_write_unsigned): Update.
9958 (regcache::raw_write_signed): Remove.
9959 (regcache::raw_write): New function.
9960 (regcache_cooked_read_signed): Update.
9961 (regcache::raw_write_unsigned): Remove.
9962 (regcache::cooked_read_signed): Remove.
9963 (regcache_cooked_read_unsigned): Update.
9964 (regcache::cooked_read_unsigned): Remove.
9965 (regcache_cooked_write_signed): Update.
9966 (regcache_cooked_write_unsigned): Update.
9967 * regcache.h (regcache) <raw_read_signed>: Remove.
9968 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9969 <raw_read, raw_write>: New.
9970 <cooked_read_signed, cooked_write_signed>: Remove.
9971 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9972 <cooked_read, cooked_write>: New.
9973 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9974 (sh64_pseudo_register_write): Update.
9975
a87dc45a
AK
99762017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9977
9978 * arc-tdep.c (arc_disassembler_options): New variable.
9979 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9980 of default_print_insn.
9981 (arc_delayed_print_insn): Set info->section when needed,
9982 use default_print_insn to retrieve a disassembler.
9983
45159d6a
SDJ
99842017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9985
9986 PR gdb/21574
9987 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9988 to mention $SHELL and startup-with-shell.
9989
b46c4cf0
MF
99902017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9991
9992 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9993
6394c606
YQ
99942017-06-14 Yao Qi <yao.qi@linaro.org>
9995
9996 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9997 default_print_insn instead of print_insn_aarch64.
9998 * arm-tdep.c (gdb_print_insn_arm): Call
9999 default_print_insn instead of print_insn_big_arm
10000 and print_insn_little_arm.
10001 * i386-tdep.c (i386_print_insn): Call default_print_insn
10002 instead of print_insn_i386.
10003 * ia64-tdep.c (ia64_print_insn): Call
10004 default_print_insn instead of print_insn_ia64.
10005 * mips-tdep.c (gdb_print_insn_mips): Call
10006 default_print_insn instead of print_insn_big_mips
10007 and print_insn_little_mips.
10008 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10009 instead of print_insn_spu.
10010
d5722aa2
PA
100112017-06-14 Pedro Alves <palves@redhat.com>
10012
10013 * ada-lang.c: Include "common/byte-vector.h".
10014 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10015 * charset.c (wchar_iterator::iterate): Resize the vector instead
10016 of reserving it.
10017 * common/byte-vector.h: Include "common/def-vector.h".
10018 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10019 * cli/cli-dump.c: Include "common/byte-vector.h".
10020 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10021 * common/byte-vector.h: New file.
10022 * common/def-vector.h: New file.
10023 * common/default-init-alloc.h: New file.
10024 * dwarf2loc.c: Include "common/byte-vector.h".
10025 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10026 instead of reserving it.
10027 * dwarf2read.c: Include "common/byte-vector.h".
10028 (data_buf::m_vec): Now a gdb::byte_vector.
10029 * gdb_regex.c: Include "common/def-vector.h".
10030 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10031 * mi/mi-main.c: Include "common/byte-vector.h".
10032 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10033 * printcmd.c: Include "common/byte-vector.h".
10034 (print_scalar_formatted): Use gdb::byte_vector.
10035 * valprint.c: Include "common/byte-vector.h".
10036 (maybe_negate_by_bytes, print_decimal_chars): Use
10037 gdb::byte_vector.
10038
01ec7a27
SM
100392017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10040
10041 * darwin-nat.c: Include "nat/fork-inferior.h".
10042
848d9074
SM
100432017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10044
10045 * configure.nat: Factor out Darwin bits that are not
10046 architecture-specific. Add fork-inferior.o.
10047
3b912944
SM
100482017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10049
10050 * configure.nat: Factor out AIX bits that are not
10051 architecture-specific. Add fork-inferior.o.
10052
55acdf22
AA
100532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10054
10055 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10056 (read_pieced_value, write_pieced_value): ...here. Reduce to
10057 wrappers that just call rw_pieced_value.
10058
f65e2044
AA
100592017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10060
10061 * dwarf2loc.c (write_pieced_value): When writing the data for a
10062 memory piece, use write_memory_with_notification instead of
10063 write_memory.
10064
23f945bf
AA
100652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10066
10067 * valops.c (read_value_memory): Change embedded_offset to
10068 represent a bit offset instead of a byte offset.
10069 * value.h (read_value_memory): Adjust comment.
10070
f236533e
AA
100712017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10072
10073 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10074 dest_offset_bits and source_offset_bits.
10075 (write_pieced_value): Likewise.
10076
65d84b76
AA
100772017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10078
10079 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10080 given by DW_OP_bit_piece.
10081 (write_pieced_value): Likewise.
10082
242d31ab
AA
100832017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10084
10085 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10086 some other preparations to the places where sufficient information
10087 is available.
10088 (write_pieced_value): Likewise.
10089
03c8af18
AA
100902017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10091
10092 * dwarf2loc.c (bits_to_bytes): New function.
10093 (read_pieced_value): Fix offset calculations for register pieces
10094 on big-endian targets.
10095 (write_pieced_value): Likewise.
10096
840989c1
AA
100972017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10098
10099 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10100 (write_pieced_value): Likewise.
10101
359b19bb
AA
101022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10103
10104 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10105 transfer the source value's least significant bits, instead of its
10106 lowest-addressed ones. Rename type_len to max_offset.
10107 (read_pieced_value): Mirror above changes to write_pieced_value as
10108 applicable.
10109
07c9ca3b
AA
101102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10111
10112 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10113 truncate full bytes from dest_offset_bits before using it as an
10114 offset into the buffer.
10115
f1cc9874
AA
101162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10117
10118 * dwarf2loc.c (write_pieced_value): Include transfer size in
10119 byte-wise check.
10120
cdaac320
AA
101212017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10122
10123 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10124 calculation of this_size.
10125
af547a96
AA
101262017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10127
10128 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10129 when targeting a bit-field.
10130 (write_pieced_value): Likewise.
10131
ddd7882a
AA
101322017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10133
10134 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10135 (allocate_piece_closure): Drop addr_size parameter.
10136 (dwarf2_evaluate_loc_desc_full): Adjust call to
10137 allocate_piece_closure.
10138
e9352324
AA
101392017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10140
10141 PR gdb/21226
10142 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10143 the LSB end, independent of endianness.
10144
d5d1163e
AA
101452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10146
10147 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10148 size capping.
10149
032bb6ea
YQ
101502017-06-13 Yao Qi <yao.qi@linaro.org>
10151
10152 * mips-linux-nat.c: Move include features/mips*-linux.c to
10153 mips-linux-tdep.c.
10154 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10155 to mips-linux-tdep.c.
10156 * mips-linux-tdep.c: Include features/mips*-linux.c
10157 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10158 functions.
10159 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10160 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10161 (tdesc_mips64_dsp_linux): Declare.
10162
f12f6bad
TT
101632017-06-12 Tom Tromey <tom@tromey.com>
10164
10165 * valprint.h (val_print_type_code_int): Remove.
10166 * valprint.c (generic_val_print_int): Always call
10167 val_print_scalar_formatted.
10168 (val_print_type_code_int): Remove.
10169 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10170 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10171 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10172 * ada-valprint.c (ada_val_print_num): Use
10173 val_print_scalar_formatted.
10174
d9109c80
TT
101752017-06-12 Tom Tromey <tom@tromey.com>
10176
10177 * printcmd.c (print_scalar_formatted): Unify the two switches.
10178 Don't convert scalars to LONGEST.
10179
4ac0cb1c
TT
101802017-06-12 Tom Tromey <tom@tromey.com>
10181
10182 PR exp/16225:
10183 * valprint.h (print_decimal_chars): Update.
10184 * valprint.c (maybe_negate_by_bytes): New function.
10185 (print_decimal_chars): Add "is_signed" argument.
10186 * printcmd.c (print_scalar_formatted): Update.
10187
30a25466
TT
101882017-06-12 Tom Tromey <tom@tromey.com>
10189
10190 PR exp/16225:
10191 * valprint.h (print_binary_chars, print_hex_chars): Update.
10192 * valprint.c (val_print_type_code_int): Update.
10193 (print_binary_chars): Add "zero_pad" argument.
10194 (emit_octal_digit): New function.
10195 (print_octal_chars): Don't zero-pad.
10196 (print_decimal_chars): Likewise.
10197 (print_hex_chars): Add "zero_pad" argument.
10198 * sh64-tdep.c (sh64_do_fp_register): Update.
10199 * regcache.c (regcache::dump): Update.
10200 * printcmd.c (print_scalar_formatted): Update.
10201 * infcmd.c (default_print_one_register_info): Update.
10202
b3464d03
PA
102032017-06-12 Pedro Alves <palves@redhat.com>
10204 Alan Hayward <alan.hayward@arm.com>
10205
10206 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10207 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10208 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10209 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10210 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10211
4b76cda9
PA
102122017-06-12 Pedro Alves <palves@redhat.com>
10213
10214 * dwarf2read.c (mapped_symtab::data): Now a vector of
10215 symtab_index_entry instead of vector of
10216 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10217 whether an element's name is NULL instead of checking whether the
10218 element itself is NULL.
10219 (find_slot): Change return type. Adjust.
10220 (hash_expand, , add_index_entry, uniquify_cu_indices)
10221 (write_hash_table): Adjust.
10222
e8f8bcb3
PA
102232017-06-12 Pedro Alves <palves@redhat.com>
10224
10225 * dwarf2read.c (recursively_count_psymbols): New function.
10226 (write_psymtabs_to_index): Call it to compute number of psyms and
10227 pass estimate size of psyms_seen to unordered_set's ctor.
10228
70a1152b
PA
102292017-06-12 Pedro Alves <palves@redhat.com>
10230
10231 * dwarf2read.c (write_hash_table): Check if key already exists
10232 before emplacing.
10233
c2f134ac
PA
102342017-06-12 Pedro Alves <palves@redhat.com>
10235
10236 * dwarf2read.c (data_buf::append_space): Rename to...
10237 (data_buf::grow): ... this, and make private. Adjust all callers.
10238 (data_buf::append_uint): New method.
10239 (add_address_entry, write_one_signatured_type)
10240 (write_psymtabs_to_index): Use it.
10241
a81e6d4d
PA
102422017-06-12 Pedro Alves <palves@redhat.com>
10243
10244 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10245 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10246 (data_buf::file_write): Call ::fwrite directly.
10247
6fd931f2
PA
102482017-06-12 Pedro Alves <palves@redhat.com>
10249
10250 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10251 std::vector::erase.
10252
bc8f2430
JK
102532017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10254
10255 Code cleanup: C++ify .gdb_index producer.
10256 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10257 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10258 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10259 (create_strtab, add_string): Remove.
10260 (file_write, data_buf): New.
10261 (struct symtab_index_entry): Use std::vector for cu_indices.
10262 (struct mapped_symtab): Use std::vector for data.
10263 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10264 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10265 Remove.
10266 (find_slot): Change return type. Update it to the new data structures.
10267 (hash_expand, add_index_entry): Update it to the new data structures.
10268 (offset_type_compare): Remove.
10269 (uniquify_cu_indices): Update it to the new data structures.
10270 (c_str_view, c_str_view_hasher, vector_hasher): New.
10271 (add_indices_to_cpool): Remove.
10272 (write_hash_table): Update it to the new data structures.
10273 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10274 (eq_psymtab_cu_index): Remove.
10275 (psym_index_map): New typedef.
10276 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10277 reference and std::unordered_map for cu_index_htab.
10278 (add_address_entry, add_address_entry_worker, write_address_map)
10279 (write_psymbols): Update it to the new data structures.
10280 (write_obstack): Remove.
10281 (struct signatured_type_index_data): Change types_list to a data_buf
10282 reference and psyms_seen to a std::unordered_set reference.
10283 (write_one_signatured_type, recursively_write_psymbols)
10284 (write_psymtabs_to_index): Update it to the new data structures.
10285
c4dcb155
SM
102862017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10287
10288 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10289 separate-debug-file commands.
10290 * symfile.h (separate_debug_file_debug): New global.
10291 * symfile.c (separate_debug_file_debug): New global.
10292 (separate_debug_file_exists, find_separate_debug_file): Add
10293 debug output.
10294 (_initialize_symfile): Add "set debug separate-debug-file"
10295 command.
10296 * build-id.c (build_id_to_debug_bfd,
10297 find_separate_debug_file_by_buildid): Add debug output.
10298
6d45d4b4
SM
102992017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10300
10301 * gdbarch.sh (displaced_step_free_closure): Remove.
10302 * gdbarch.h, gdbarch.c: Re-generate.
10303 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10304 displaced_step_free_closure.
10305 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10306 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10307 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10308 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10309 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10310 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10311 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10312 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10313 * infrun.c (displaced_step_clear): Call xfree instead of
10314 gdbarch_displaced_step_free_closure.
10315
2f91880f
SDJ
103162017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10317
10318 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10319 NULL".
10320
b8b6e72f
AH
103212017-06-08 Alan Hayward <alan.hayward@arm.com>
10322
10323 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10324 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10325 (mn10300_push_dummy_call): Likewise.
10326
5369082e
AH
103272017-06-08 Alan Hayward <alan.hayward@arm.com>
10328
10329 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10330
ff4ca5ac
AH
103312017-06-08 Alan Hayward <alan.hayward@arm.com>
10332
10333 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10334
aefd8b33
SDJ
103352017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10336
10337 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10338 able to start inferiors using a shell.
10339 (New remote packets): Announce new packet "QStartupWithShell".
10340 * remote.c: Add PACKET_QStartupWithShell.
10341 (extended_remote_create_inferior): Handle new
10342 PACKET_QStartupWithShell.
10343 (remote_protocol_features) <QStartupWithShell>: New entry for
10344 PACKET_QStartupWithShell.
10345 (_initialize_remote): Call "add_packet_config_cmd" for
10346 QStartupShell.
10347
2090129c
SDJ
103482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10349 Pedro Alves <palves@redhat.com>
10350
10351 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10352 and "nat/fork-inferior.h".
10353 * common/common-inferior.h: New file, with contents from
10354 "gdb/inferior.h".
10355 * commom/common-utils.c: Include "common-utils.h".
10356 (stringify_argv): New function.
10357 * common/common-utils.h (stringify_argv): New prototype.
10358 * configure.nat: Add "fork-inferior.o" as a dependency for
10359 "*linux*", "fbsd*" and "nbsd*" hosts.
10360 * corefile.c (get_exec_file): Update comment.
10361 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10362 instead of "startup_inferior".
10363 (darwin_create_inferior): Call "add_thread_silent" after
10364 "fork_inferior".
10365 * fork-child.c: Cleanup unnecessary includes.
10366 (SHELL_FILE): Move to "common/common-fork-child.c".
10367 (environ): Likewise.
10368 (exec_wrapper): Initialize.
10369 (get_exec_wrapper): New function.
10370 (breakup_args): Move to "common/common-fork-child.c"; rename to
10371 "breakup_args_for_exec".
10372 (escape_bang_in_quoted_argument): Move to
10373 "common/common-fork-child.c".
10374 (saved_ui): New variable.
10375 (prefork_hook): New function.
10376 (postfork_hook): Likewise.
10377 (postfork_child_hook): Likewise.
10378 (gdb_startup_inferior): Likewise.
10379 (fork_inferior): Move to "common/common-fork-child.c". Update
10380 function to support gdbserver.
10381 (startup_inferior): Likewise.
10382 * gdbcore.h (get_exec_file): Remove declaration.
10383 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10384 instead of "startup_inferior". Call "add_thread_silent" after
10385 "fork_inferior".
10386 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10387 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10388 instead of "startup_inferior". Call "add_thread_silent" after
10389 "fork_inferior".
10390 * inferior.h: Include "common-inferior.h".
10391 (trace_start_error): Move to "common/common-utils.h".
10392 (trace_start_error_with_name): Likewise.
10393 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10394 (startup_inferior): Likewise.
10395 (gdb_startup_inferior): New prototype.
10396 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10397 * nat/fork-inferior.h: New file.
10398 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10399 instead of "startup_inferior". Call "add_thread_silent" after
10400 "fork_inferior".
10401 * target.h (target_terminal_init): Move prototype to
10402 "target/target.h".
10403 (target_terminal_inferior): Likewise.
10404 (target_terminal_ours): Likewise.
10405 * target/target.h (target_terminal_init): New prototype, moved
10406 from "target.h".
10407 (target_terminal_inferior): Likewise.
10408 (target_terminal_ours): Likewise.
10409 * utils.c (gdb_flush_out_err): New function.
10410
043a4934
SDJ
104112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10412
10413 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10414 * common/common-gdbthread.h: New file, with parts from
10415 "gdb/gdbthread.h".
10416 * gdbthread.h: Include "common-gdbthread.h".
10417 (switch_to_thread): Moved to "common/common-gdbthread.h".
10418
15652511
SDJ
104192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10420
10421 * Makefile.in (SFILES): Add "common/job-control.c".
10422 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10423 (COMMON_OBS): Add "job-control.o".
10424 * common/job-control.c: New file, with contents from
10425 "gdb/inflow.c".
10426 * common/job-control.h: New file, with contents from "terminal.h".
10427 * fork-child.c: Include "job-control.h".
10428 * inflow.c: Include "job-control.h".
10429 (gdb_setpgid): Move to "common/common-inflow.c".
10430 (_initialize_inflow): Move setting of "job_control" to
10431 "handle_job_control".
10432 * terminal.h (job_control): Moved to "common/common-terminal.h".
10433 (gdb_setpgid): Likewise.
10434 * top.c: Include "job_control.h".
10435 * utils.c: Likewise.
10436 (job_control): Moved to "job-control.c".
10437
2d7cc5c7
PA
104382017-06-07 Pedro Alves <palves@redhat.com>
10439
10440 * Makefile.in (SFILES): Add gdb_regex.c.
10441 (COMMON_OBS): Add gdb_regex.o.
10442 * ada-lang.c (ada_add_standard_exceptions)
10443 (ada_add_exceptions_from_frame, name_matches_regex)
10444 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10445 parameter type to compiled_regex. Adjust.
10446 (ada_exceptions_list): Use compiled_regex.
10447 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10448 std::unique_ptr<compiled_regex>.
10449 (exception_catchpoint::~exception_catchpoint): Remove regfree
10450 call.
10451 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10452 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10453 * breakpoint.c (solib_catchpoint::compiled): Now a
10454 std::unique_ptr<compiled_regex>.
10455 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10456 (check_status_catch_solib): Adjust to use compiled_regex.
10457 (add_solib_catchpoint): Adjust to use compiled_regex.
10458 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10459 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10460 compiled_regex reference. Adjust to use it.
10461 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10462 declaration. Include "gdb_regex.h".
10463 (apropos_cmd): Change regex parameter to compiled_regex reference.
10464 * gdb_regex.c: New file.
10465 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10466 declarations.
10467 (class compiled_regex): New.
10468 * linux-tdep.c: Include "common/gdb_optional.h".
10469 (struct mapping_regexes): New, factored out from
10470 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10471 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10472 gdb::optional and remove cleanups. Adjust to compiled_regex.
10473 * probe.c: Include "common/gdb_optional.h".
10474 (collect_probes): Use compiled_regex and gdb::optional and remove
10475 cleanups.
10476 * skip.c: Include "common/gdb_optional.h".
10477 (skiplist_entry::compiled_function_regexp): Now a
10478 gdb::optional<compiled_regex>.
10479 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10480 (free_skiplist_entry): Remove regfree call.
10481 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10482 compiled_regex and gdb::optional.
10483 * symtab.c: Include "common/gdb_optional.h".
10484 (search_symbols): Use compiled_regex and gdb::optional.
10485 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10486 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10487 to gdb_regex.c.
10488
50d6adef
AH
104892017-06-07 Alan Hayward <alan.hayward@arm.com>
10490
10491 * regcache.c (regcache::save): Avoid buffer use.
10492 (regcache::dump): Likewise.
10493
4a8a33c8
AH
104942017-06-07 Alan Hayward <alan.hayward@arm.com>
10495
10496 * sh-tdep.c (sh_pseudo_register_read): Remove
10497 MAX_REGISTER_SIZE.
10498 (sh_pseudo_register_write): Likewise.
10499 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10500 (sh64_pseudo_register_write): Likewise
10501
d1be909e
AH
105022017-06-07 Alan Hayward <alan.hayward@arm.com>
10503
10504 * aarch64-tdep.c (aarch64_store_return_value): Use
10505 V_REGISTER_SIZE.
10506 (aarch64_pseudo_read_value): Likewise.
10507 (aarch64_pseudo_write): Likewise.
10508
f4a65042
YQ
105092017-06-06 Yao Qi <yao.qi@linaro.org>
10510
10511 * regformats/regdef.h (set_register_cache): Remove the
10512 declaration.
10513
9f7fb0aa
AH
105142017-06-06 Alan Hayward <alan.hayward@arm.com>
10515
10516 * frame.c (frame_unwind_register_signed): Use
10517 frame_unwind_register_value.
10518
e1e01040
PA
105192017-06-06 Pedro Alves <palves@redhat.com>
10520
10521 PR breakpoints/21553
10522 * breakpoint.c (create_breakpoints_sal_default)
10523 (init_breakpoint_sal, create_breakpoint_sal): Use
10524 gdb::unique_xmalloc_ptr for string parameters.
10525 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10526 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10527 (base_breakpoint_create_breakpoints_sal)
10528 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10529 (strace_marker_create_breakpoints_sal)
10530 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10531 string parameters.
10532 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10533 gdb::unique_xmalloc_ptr for string parameters.
10534 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10535 parameters.
10536
fbe654c8
AH
105372017-06-06 Alan Hayward <alan.hayward@arm.com>
10538
10539 * alpha-tdep.c (alpha_register_to_value): Use
10540 get_frame_register_value.
10541 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10542
ae0d01d6
AH
105432017-06-06 Alan Hayward <alan.hayward@arm.com>
10544
10545 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10546 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10547 (ia64_value_to_register): Likewise.
10548 (ia64_extract_return_value): Likewise.
10549 (ia64_store_return_value): Likewise.
10550 (ia64_push_dummy_call): Likewise.
10551
49cf576c
JB
105522017-06-04 Joel Brobecker <brobecker@adacore.com>
10553
10554 GDB 8.0 released.
10555
26b6a6ab
SM
105562017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10557
10558 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10559
22827c51
SM
105602017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10561
10562 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10563 parameter.
10564 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10565
0e05cf3a
SM
105662017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10567
10568 * event-loop.c (poll_timers): Unallocate timer using delete
10569 instead of xfree.
10570
c1fc2657
SM
105712017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10572
10573 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10574 (struct breakpoint) <~breakpoint>: New.
10575 (struct watchpoint): Inherit from breakpoint.
10576 <~watchpoint>: New.
10577 <base>: Remove.
10578 (struct tracepoint): Inherit from breakpoint.
10579 <base>: Remove.
10580 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10581 (struct longjmp_breakpoint): Inherit from breakpoint.
10582 <~longjmp_breakpoint>: New.
10583 <base>: Remove.
10584 (new_breakpoint_from_type): Remove casts.
10585 (watchpoint_in_thread_scope): Remove reference to base field.
10586 (watchpoint_del_at_next_stop): Likewise.
10587 (update_watchpoint): Likewise.
10588 (watchpoint_check): Likewise.
10589 (bpstat_check_watchpoint): Likewise.
10590 (set_longjmp_breakpoint): Likewise.
10591 (struct fork_catchpoint): Inherit from breakpoint.
10592 <base>: Remove.
10593 (struct solib_catchpoint): Inherit from breakpoint.
10594 <~solib_catchpoint>: New.
10595 <base>: Remove.
10596 (dtor_catch_solib): Change to ...
10597 (solib_catchpoint::~solib_catchpoint): ... this.
10598 (breakpoint_hit_catch_solib): Remove reference to base field.
10599 (add_solib_catchpoint): Likewise.
10600 (create_fork_vfork_event_catchpoint): Likewise.
10601 (struct exec_catchpoint): Inherit from breakpoint.
10602 <~exec_catchpoint>: New.
10603 <base>: Remove.
10604 (dtor_catch_exec): Change to ...
10605 (exec_catchpoint::~exec_catchpoint): ... this.
10606 (dtor_watchpoint): Change to ...
10607 (watchpoint::~watchpoint): ... this.
10608 (watch_command_1): Remove reference to base field.
10609 (catch_exec_command_1): Likewise.
10610 (base_breakpoint_dtor): Change to ...
10611 (breakpoint::~breakpoint): ... this.
10612 (base_breakpoint_ops): Remove dtor field value.
10613 (longjmp_bkpt_dtor): Change to ...
10614 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10615 (strace_marker_create_breakpoints_sal): Remove reference to base
10616 field.
10617 (delete_breakpoint): Don't manually call breakpoint destructor.
10618 (create_tracepoint_from_upload): Remove reference to base field.
10619 (trace_pass_set_count): Likewise.
10620 (initialize_breakpoint_ops): Don't initialize
10621 momentary_breakpoint_ops, don't set dtors.
10622 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10623 <~ada_catchpoint>: New.
10624 <base>: Remove.
10625 (create_excep_cond_exprs): Remove reference to base field.
10626 (dtor_exception): Change to ...
10627 (ada_catchpoint::~ada_catchpoint): ... this.
10628 (dtor_catch_exception): Remove.
10629 (dtor_catch_exception_unhandled): Remove.
10630 (dtor_catch_assert): Remove.
10631 (create_ada_exception_catchpoint): Remove reference to base
10632 field.
10633 (initialize_ada_catchpoint_ops): Don't set dtors.
10634 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10635 breakpoint.
10636 <~signal_catchpoint>: New.
10637 <base>: Remove.
10638 (signal_catchpoint_dtor): Change to ...
10639 (signal_catchpoint::~signal_catchpoint): ... this.
10640 (create_signal_catchpoint): Remove reference to base field.
10641 (initialize_signal_catchpoint_ops): Don't set dtor.
10642 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10643 from breakpoint.
10644 <~syscall_catchpoint>: New.
10645 <base>: Remove.
10646 (dtor_catch_syscall): Change to ...
10647 (syscall_catchpoint::~syscall_catchpoint): ... this.
10648 (create_syscall_event_catchpoint): Remove reference to base
10649 field.
10650 (initialize_syscall_catchpoint_ops): Don't set dtor.
10651 * break-catch-throw.c (struct exception_catchpoint): Inherit
10652 from breakpoint.
10653 <~exception_catchpoint>: New.
10654 <base>: Remove.
10655 (dtor_exception_catchpoint): Change to ...
10656 (exception_catchpoint::~exception_catchpoint): ... this.
10657 (handle_gnu_v3_exceptions): Remove reference to base field.
10658 (initialize_throw_catchpoint_ops): Don't set dtor.
10659 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10660 field.
10661 * remote.c (remote_get_tracepoint_status): Likewise.
10662 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10663 * tracefile.c (tracefile_fetch_registers): Likewise.
10664 * tracepoint.c (actions_command): Likewise.
10665 (validate_actionline): Likewise.
10666 (tfind_1): Likewise.
10667 (get_traceframe_location): Likewise.
10668 (find_matching_tracepoint_location): Likewise.
10669 (parse_tracepoint_status): Likewise.
10670 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10671
3b0871f4
SM
106722017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10673
10674 * breakpoint.c (struct longjmp_breakpoint): New struct.
10675 (is_tracepoint_type): Change return type to bool.
10676 (is_longjmp_type): New function.
10677 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10678 (set_raw_breakpoint_without_location): Use
10679 new_breakpoint_from_type.
10680 (set_raw_breakpoint): Likewise.
10681
a5e364af
SM
106822017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10683
10684 * breakpoint.c (new_breakpoint_from_type): New function.
10685 (create_breakpoint_sal): Use new_breakpoint_from_type and
10686 unique_ptr.
10687 (create_breakpoint): Likewise.
10688
ae3b3f34
SM
106892017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10690
10691 * memattr.c (mem_info_command): Rename to ...
10692 (info_mem_command): ... this.
10693 (mem_enable_command): Rename to ...
10694 (enable_mem_command): ... this.
10695 (mem_disable_command): Rename to ...
10696 (disable_mem_command): ... this.
10697 (mem_delete_command): Rename to ...
10698 (delete_mem_command): ... this.
10699 (_initialize_mem): Adjust function names.
10700
13ace077
MM
107012017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10702
10703 * btrace.c (handle_pt_insn_events): New.
10704 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10705 STATUS. Split into this and ...
10706 (handle_pt_insn_event_flags): ... this.
10707
c56ccc05
MM
107082017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10709
10710 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10711 and struct pt_insn.resynced.
10712 * configure: Regenerated.
10713 * config.in: Regenerated.
10714
08c3f6d2
TW
107152017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10716
10717 * btrace.c (ftrace_find_call_by_number): New function.
10718 (ftrace_new_function): Store objects, not pointers.
10719 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10720 ftrace_new_gap, ftrace_update_function,
10721 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10722 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10723 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10724 btrace_ends_with_single_insn, btrace_call_get): Account for
10725 btrace_thread_info::functions now storing objects.
10726 * btrace.h (struct btrace_thread_info): Add constructor.
10727 (struct btrace_thread_info) <functions>: Make std::vector.
10728 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10729 Initialize with default values.
10730 * record-btrace.c (record_btrace_frame_sniffer): Account for
10731 btrace_thread_info::functions now storing objects.
10732
8ffd39f2
TW
107332017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10734
10735 * btrace.c: Remove typedef bfun_s.
10736 (ftrace_new_gap): Directly add gaps to the list of gaps.
10737 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10738 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10739 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10740 instead of gdb VEC.
10741
4aeb0dfc
TW
107422017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10743
10744 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10745 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10746 with btrace_thread_info::next_segment and
10747 btrace_thread_info::prev_segment.
10748 * btrace.h: Remove struct btrace_func_link.
10749 (struct btrace_function): Replace pair of function segment pointers
10750 with pair of indices.
10751 * python/py-record-btrace.c (btpy_call_prev_sibling,
10752 btpy_call_next_sibling): Replace references to
10753 btrace_thread_info::segment with btrace_thread_info::next_segment and
10754 btrace_thread_info::prev_segment.
10755 * record-btrace.c (record_btrace_frame_this_id): Use
10756 btrace_find_call_by_number.
10757
eb8f2b9c
TW
107582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10759
10760 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10761 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10762 btrace_insn_next, btrace_insn_prev): Remove references to
10763 btrace_thread_info::flow.
10764 * btrace.h (struct btrace_function): Remove FLOW.
10765
42bfe59e
TW
107662017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10767
10768 * btrace.c (ftrace_find_call_by_number): New function.
10769 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10770 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10771 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10772 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10773 index.
10774 * btrace.h (struct btrace_function): Turn UP into an index.
10775 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10776 as an index.
10777 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10778 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10779 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10780
b54b03bd
TW
107812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10782
10783 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10784 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10785 ftrace_update_function, ftrace_compute_global_level_offset,
10786 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10787 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10788 btrace_insn_end, btrace_is_empty): Remove references to
10789 btrace_thread_info::begin and btrace_thread_info::end.
10790 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10791 (struct btrace_thread_info) <functions>: Adjust comment.
10792 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10793 btrace_thread_info::begin.
10794
8286623c
TW
107952017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10796
10797 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10798 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10799 ftrace_update_function): Remove arguments that implicitly were always
10800 BTINFO->END.
10801 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10802 Don't pass BTINFO->END.
10803
a0f1b963
TW
108042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10805
10806 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10807 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10808 btrace_find_insn_by_number): Replace function segment pointer with
10809 index.
10810 (btrace_insn_cmp): Simplify.
10811 * btrace.h: (struct btrace_insn_iterator) Rename index to
10812 insn_index. Replace function segment pointer with index into function
10813 segment vector.
10814 * record-btrace.c (record_btrace_call_history): Replace function
10815 segment pointer use with index.
10816 (record_btrace_frame_sniffer): Retrieve function call segment through
10817 vector.
10818 (record_btrace_set_replay): Remove defunc't safety check.
10819
f158f208
TW
108202017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10821
10822 * btrace.c (btrace_ends_with_single_insn): New function.
10823 (btrace_call_get, btrace_call_number, btrace_call_begin,
10824 btrace_call_end, btrace_call_next, btrace_call_prev,
10825 btrace_find_call_by_number): Use index into call segment vector
10826 instead of pointer.
10827 (btrace_call_cmp): Simplify.
10828 * btrace.h (struct btrace_call_iterator): Replace function call segment
10829 pointer with index into vector.
10830 * record-btrace.c (record_btrace_call_history): Use index instead of
10831 pointer.
10832
521103fd
TW
108332017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10834
10835 * btrace.c (btrace_insn_begin, btrace_insn_end,
10836 btrace_find_insn_by_number): Add btinfo to iterator.
10837 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10838
17b89b34
TW
108392017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10840
10841 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10842 and save pointers directly.
10843 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10844 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10845 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10846 changed signature of functions.
10847 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10848 (btrace_fetch): Remove code that adds btrace_function pointers to
10849 vector of btrace_functions.
10850 (btrace_clear): Simplify freeing vector of btrace_functions.
10851
2b51eddc
TW
108522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10853
10854 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10855 Replace VEC_* with std::vector functions.
10856 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10857 (struct btrace_thread_info)<functions>: Change type to std::vector.
10858
db6be0d5
SM
108592017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10860
10861 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10862 "Removed targets and native configurations" up. Merge duplicate
10863 "New commands" sub-sections. Add "New options" sub-sections.
10864
b057297a
AH
108652017-05-26 Alan Hayward <alan.hayward@arm.com>
10866
10867 * defs.h (copy_integer_to_size): New declaration.
10868 * findvar.c (copy_integer_to_size): New function.
10869 (do_cint_test): New selftest function.
10870 (copy_integer_to_size_test): Likewise.
10871 (_initialize_findvar): Likewise.
10872 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10873 (mips_fbsd_collect_reg): Use raw_collect_integer.
10874 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10875 (mips64_fill_gregset): Use raw_collect_integer
10876 (mips64_fill_fpregset): Use raw_supply_integer.
10877 * regcache.c (regcache::raw_supply_integer): New function.
10878 (regcache::raw_collect_integer): Likewise.
10879 * regcache.h: (regcache::raw_supply_integer): New declaration.
10880 (regcache::raw_collect_integer): Likewise.
10881
b77b02a5
YQ
108822017-05-24 Yao Qi <yao.qi@linaro.org>
10883
10884 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10885 (COMMON_OBS): Add gdbarch-selftests.o.
10886 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10887 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10888 * gdbarch-selftests.c: New file.
10889 * regcache.h (regcache) <~regcache>: Mark it virtual if
10890 GDB_SELF_TEST.
10891 <raw_write>: Likewise.
10892
e521e87e
YQ
108932017-05-24 Yao Qi <yao.qi@linaro.org>
10894
10895 * regcache.c (current_regcache): Change it to
10896 regcache::current_regcache.
10897 (regcache_observer_target_changed): Update.
10898 (regcache_thread_ptid_changed): Make it a regcache static
10899 method.
10900 (regcache_thread_ptid_changed): Update.
10901 (class regcache_access): New.
10902 (current_regcache_test): Update.
10903 (_initialize_regcache): Update.
10904 * regcache.h: Include forward_list.
10905 (regcache): Declare regcache_thread_ptid_changed and declare
10906 registers_changed_ptid as friend.
10907
d8e07dda
YQ
109082017-05-24 Yao Qi <yao.qi@linaro.org>
10909
10910 * i387-tdep.c (i387_register_to_value): Use register_size
10911 instead of TYPE_LENGTH.
10912 * m68k-tdep.c (m68k_register_to_value): Likewise.
10913
8c8f9122
YQ
109142017-05-24 Yao Qi <yao.qi@linaro.org>
10915
10916 * i387-tdep.c (i387_convert_register_p): Return false if type
10917 code isn't TYPE_CODE_FLT.
10918
68fce50f
YQ
109192017-05-24 Yao Qi <yao.qi@linaro.org>
10920
10921 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10922 length is 4.
10923 (alpha_register_to_value): Remove type length check.
10924 (alpha_value_to_register): Likewise.
10925
88954b49
YQ
109262017-05-24 Yao Qi <yao.qi@linaro.org>
10927
10928 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10929 TYPE_CODE_FLT.
10930
e3ec9b69
YQ
109312017-05-24 Yao Qi <yao.qi@linaro.org>
10932
10933 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10934 TYPE_CODE_FLT or not.
10935
cdd238da
YQ
109362017-05-24 Yao Qi <yao.qi@linaro.org>
10937
10938 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10939 * avr-tdep.c (avr_gdbarch_init): Likewise.
10940 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10941 * cris-tdep.c (cris_gdbarch_init): Likewise.
10942 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10943 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10944 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10945 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10946 * mep-tdep.c (mep_gdbarch_init): Likewise.
10947 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10948 * mips-tdep.c (mips_gdbarch_init): Likewise.
10949 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10950 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10951 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10952 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10953 * v850-tdep.c (v850_gdbarch_init): Likewise.
10954
7a3929c4
YQ
109552017-05-24 Yao Qi <yao.qi@linaro.org>
10956
10957 * selftest-arch.c (tests_with_arch): Call registers_changed
10958 and reinit_frame_cache.
10959 * selftest.c (run_self_tests): Likewise.
10960
f4985dba
YQ
109612017-05-24 Yao Qi <yao.qi@linaro.org>
10962
10963 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10964 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10965
ab20fa4a
YQ
109662017-05-24 Yao Qi <yao.qi@linaro.org>
10967
10968 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10969 set_gdbarch_print_insn.
10970
f532ab94
YQ
109712017-05-24 Yao Qi <yao.qi@linaro.org>
10972
10973 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10974 set_gdbarch_print_insn.
10975
39503f82
YQ
109762017-05-24 Yao Qi <yao.qi@linaro.org>
10977
10978 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10979 set_gdbarch_print_insn.
10980 * arc-tdep.c (arc_gdbarch_init): Likewise.
10981 * arch-utils.c: include dis-asm.h.
10982 (default_print_insn): New function.
10983 * arch-utils.h (default_print_insn): Declare.
10984 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10985 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10986 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10987 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10988 * frv-tdep.c (frv_gdbarch_init): Likewise.
10989 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10990 * gdbarch.sh (print_insn): Use default_print_insn.
10991 * gdbarch.c: Regenerated.
10992 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10993 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10994 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10995 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10996 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10997 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10998 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10999 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11000 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11001 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11002 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11003 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11004 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11005 * mt-tdep.c (mt_gdbarch_init): Likewise.
11006 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11007 * nios2-tdep.c (nios2_print_insn): Remove.
11008 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11009 * rx-tdep.c (rx_gdbarch_init): Likewise.
11010 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11011 * score-tdep.c (score_print_insn): Remove.
11012 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11013 * sh-tdep.c (sh_gdbarch_init): Likewise.
11014 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11015 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11016 * tic6x-tdep.c (tic6x_print_insn): Remove.
11017 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11018 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11019 * v850-tdep.c (v850_gdbarch_init): Likewise.
11020 * vax-tdep.c (vax_gdbarch_init): Likewise.
11021 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11022 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11023
f7241d4f
JB
110242017-05-23 John Baldwin <jhb@FreeBSD.org>
11025
11026 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11027 (MIPS_FP0_REGNUM): Remove.
11028 (MIPS_FSR_REGNUM): Remove.
11029 (mips_fbsd_supply_fpregs): Use mips_regnum.
11030 (mips_fbsd_supply_gregs): Likewise.
11031 (mips_fbsd_collect_fpregs): Likewise.
11032 (mips_fbsd_collect_gregs): Likewise.
11033
d489d81d
JB
110342017-05-23 John Baldwin <jhb@FreeBSD.org>
11035
11036 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11037 (getpfpregs_supplies): New function.
11038 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11039 getfpregs_supplies.
11040 (mips_fbsd_store_inferior_registers): Likewise.
11041
e11b3cdc
PA
110422017-05-22 Pedro Alves <palves@redhat.com>
11043
11044 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11045 maintainer.
11046
0f068fb5
AH
110472017-05-22 Alan Hayward <alan.hayward@arm.com>
11048
11049 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11050 (store_register): Likewise.
11051 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11052 (get_decimal_float_return_value): Likewise.
11053 (do_ppc_sysv_return_value): Likewise.
11054 (ppc64_sysv_abi_push_integer): Likewise.
11055 (ppc64_sysv_abi_push_freg): Likewise.
11056 (ppc64_sysv_abi_return_value_base): Likewise.
11057 (ppc64_sysv_abi_return_value): Likewise.
11058 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11059 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11060 * rs6000-nat.c: Likewise.
11061 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11062 (rs6000_value_to_register): Likewise.
11063 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11064
e6cf65f2
TT
110652017-05-21 Tom Tromey <tom@tromey.com>
11066
11067 PR rust/21466:
11068 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11069 arrays as "[T]", not "[T; ]".
11070
43cc5389
TT
110712017-05-19 Tom Tromey <tom@tromey.com>
11072
11073 PR rust/21484:
11074 * rust-lang.c (exp_descriptor_rust): New function.
11075 (rust_language_defn): Use it.
11076 * p-lang.c (pascal_language_defn): Update.
11077 * opencl-lang.c (opencl_language_defn): Update.
11078 * objc-lang.c (objc_language_defn): Update.
11079 * m2-lang.c (m2_language_defn): Update.
11080 * language.h (struct language_defn)
11081 <la_watch_location_expression>: New member.
11082 * language.c (unknown_language_defn, auto_language_defn)
11083 (local_language_defn): Update.
11084 * go-lang.c (go_language_defn): Update.
11085 * f-lang.c (f_language_defn): Update.
11086 * d-lang.c (d_language_defn): Update.
11087 * c-lang.h (c_watch_location_expression): Declare.
11088 * c-lang.c (c_watch_location_expression): New function.
11089 (c_language_defn, cplus_language_defn, asm_language_defn)
11090 (minimal_language_defn): Use it.
11091 * breakpoint.c (watch_command_1): Call
11092 la_watch_location_expression.
11093 * ada-lang.c (ada_language_defn): Update.
11094
7a6e7fcc
RO
110952017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11096
6e7e1744
RO
11097 PR tui/21482
11098 * gdb_curses.h (NOMACROS): Define.
11099 (NCURSES_NOMACROS): Define.
11100
111012017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11102
11103 PR tui/21482
7a6e7fcc
RO
11104 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11105 arg to char *.
11106 * tui/tui-wingeneral.c (box_win): Likewise.
11107 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11108 (tui_show_source_line): Likewise.
11109 (tui_show_exec_info_content): Likewise.
11110
1933fd8e
VM
111112017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11112
11113 * sparc-tdep.c (sparc_structure_return_p)
11114 (sparc_arg_on_registers_p): New functions.
11115 (sparc32_store_arguments): Use them.
11116 * sparc64-tdep.c (sparc64_16_byte_align_p)
11117 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11118 Handle TYPE_CODE_ARRAY.
11119
21873064
YQ
111202017-05-17 Yao Qi <yao.qi@linaro.org>
11121
11122 * cli/cli-decode.c (add_alias_cmd): New function.
11123 * command.h (add_alias_cmd): Declare.
11124 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11125 instead call add_alias_cmd.
11126
2b351b19
PA
111272017-05-17 Pedro Alves <palves@redhat.com>
11128
11129 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11130 (nat_makefile_frag): ... this. All references updated.
11131 * configure.ac: Likewise.
11132 * configure.nat: Likewise. Enhance comments.
11133 * configure: Regenerate.
11134
5f2ad7a3
RO
111352017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11136
11137 * procfs.c (procfs_create_inferior): Change prototype to match
11138 definition.
11139
adf3dde5
EZ
111402017-05-13 Eli Zaretskii <eliz@gnu.org>
11141
11142 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11143 C++ compiler warning.
11144
6830f270
TT
111452017-05-12 Tom Tromey <tom@tromey.com>
11146
11147 PR rust/21483:
11148 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11149 recurse, just call value_struct_elt directly.
11150
68f2f2e3
TT
111512017-05-12 Tom Tromey <tom@tromey.com>
11152
11153 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11154 OP_RUST_ARRAY>: Fix.
11155
256afbc2
TT
111562017-05-12 Tom Tromey <tom@tromey.com>
11157
11158 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11159
94bb8dfe
YQ
111602017-05-09 Yao Qi <yao.qi@linaro.org>
11161
11162 * regcache.c: Include <forward_list>.
11163 (struct regcache_list): Remove.
11164 (current_regcache): Update.
11165 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11166 (regcache_thread_ptid_changed): Likewise.
11167 (registers_changed_ptid): Likewise.
11168 (current_regcache_size): Likewise.
11169
8248946c
YQ
111702017-05-09 Yao Qi <yao.qi@linaro.org>
11171
11172 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11173 (current_regcache_size): New function.
11174 (current_regcache_test): New function.
11175 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11176
313c5961
AH
111772017-05-08 Alan Hayward <alan.hayward@arm.com>
11178
11179 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11180 (print_gp_register_row): Use get_frame_register_value.
11181
27bfc1d1
AH
111822017-05-08 Alan Hayward <alan.hayward@arm.com>
11183
11184 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11185 (mips_supply_fpregset): Likewise.
11186 (mips64_supply_gregset): Likewise.
11187
146e6c5c
AH
111882017-05-08 Alan Hayward <alan.hayward@arm.com>
11189
11190 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11191 regcache->raw_supply_zeroed.
11192
e50f25ec
SDJ
111932017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11194
11195 * configure.nat: Rearrange 'case' statements to match
11196 host before cpu.
11197
21ea5acd
SDJ
111982017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11199
11200 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11201 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11202 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11203 "@nat_extra_makefile_frag@".
11204 (Makefile): Remove dependency on "@frags@".
11205 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11206 (data-directory/Makefile): Likewise.
11207 * config/aarch64/linux.mh: Deleted; moved contents to
11208 "gdb/configure.nat".
11209 * config/alpha/alpha-linux.mh: Likewise.
11210 * config/alpha/nbsd.mh: Likewise.
11211 * config/arm/linux.mh: Likewise.
11212 * config/arm/nbsdelf.mh: Likewise.
11213 * config/i386/cygwin.mh: Likewise.
11214 * config/i386/cygwin64.mh: Likewise.
11215 * config/i386/darwin.mh: Likewise.
11216 * config/i386/fbsd.mh: Likewise.
11217 * config/i386/fbsd64.mh: Likewise.
11218 * config/i386/go32.mh: Likewise.
11219 * config/i386/i386gnu.mh: Likewise.
11220 * config/i386/i386sol2.mh: Likewise.
11221 * config/i386/linux.mh: Likewise.
11222 * config/i386/linux64.mh: Likewise.
11223 * config/i386/mingw.mh: Likewise.
11224 * config/i386/mingw64.mh: Likewise.
11225 * config/i386/nbsd64.mh: Likewise.
11226 * config/i386/nbsdelf.mh: Likewise.
11227 * config/i386/nto.mh: Likewise.
11228 * config/i386/obsd.mh: Likewise.
11229 * config/i386/obsd64.mh: Likewise.
11230 * config/i386/sol2-64.mh: Likewise.
11231 * config/ia64/linux.mh: Likewise.
11232 * config/m32r/linux.mh: Likewise.
11233 * config/m68k/linux.mh: Likewise.
11234 * config/m68k/nbsdelf.mh: Likewise.
11235 * config/m68k/obsd.mh: Likewise.
11236 * config/m88k/obsd.mh: Likewise.
11237 * config/mips/fbsd.mh: Likewise.
11238 * config/mips/linux.mh: Likewise.
11239 * config/mips/nbsd.mh: Likewise.
11240 * config/mips/obsd64.mh: Likewise.
11241 * config/pa/linux.mh: Likewise.
11242 * config/pa/nbsd.mh: Likewise.
11243 * config/pa/obsd.mh: Likewise.
11244 * config/powerpc/aix.mh: Likewise.
11245 * config/powerpc/fbsd.mh: Likewise.
11246 * config/powerpc/linux.mh: Likewise.
11247 * config/powerpc/nbsd.mh: Likewise.
11248 * config/powerpc/obsd.mh: Likewise.
11249 * config/powerpc/ppc64-linux.mh: Likewise.
11250 * config/powerpc/spu-linux.mh: Likewise.
11251 * config/s390/linux.mh: Likewise.
11252 * config/sh/nbsd.mh: Likewise.
11253 * config/sparc/fbsd.mh: Likewise.
11254 * config/sparc/linux.mh: Likewise.
11255 * config/sparc/linux64.mh: Likewise.
11256 * config/sparc/nbsd64.mh: Likewise.
11257 * config/sparc/nbsdelf.mh: Likewise.
11258 * config/sparc/obsd64.mh: Likewise.
11259 * config/sparc/sol2.mh: Likewise.
11260 * config/tilegx/linux.mh: Likewise.
11261 * config/vax/nbsdelf.mh: Likewise.
11262 * config/vax/obsd.mh: Likewise.
11263 * config/xtensa/linux.mh: Likewise.
11264 * config/i386/i386gnu.mn: New file, with excerpts from
11265 "config/i386/i386gnu.mh".
11266 * configure: Regenerate.
11267 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11268 *.mh files under "gdb/config".
11269 * configure.nat: New file, with contents from the
11270 "gdb/config/*/*.mh" files.
11271
7ed1acaf
TW
112722017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11273
11274 * btrace.c (btrace_clear): Free insn vector.
11275
e13cb306
PA
112762017-05-05 Pedro Alves <palves@redhat.com>
11277
11278 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11279 * configure: Regenerate.
11280
5ed8105e
PA
112812017-05-04 Pedro Alves <palves@redhat.com>
11282
11283 * Makefile.in (SFILES): Add progspace-and-thread.c.
11284 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11285 (COMMON_OBS): Add progspace-and-thread.o.
11286 * breakpoint.c: Include "progspace-and-thread.h".
11287 (update_inserted_breakpoint_locations)
11288 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11289 Use scoped_restore_current_pspace_and_thread.
11290 (create_std_terminate_master_breakpoint): Use
11291 scoped_restore_current_program_space.
11292 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11293 (print_breakpoint_location): Use
11294 scoped_restore_current_program_space.
11295 (bp_loc_is_permanent): Use
11296 scoped_restore_current_pspace_and_thread.
11297 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11298 (download_tracepoint_locations): Use
11299 scoped_restore_current_pspace_and_thread.
11300 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11301 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11302 (enum step_over_calls_kind): Moved from inferior.h.
11303 (class scoped_restore_current_thread): New class.
11304 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11305 declaration.
11306 (scoped_restore_current_thread): New class.
11307 * infcmd.c: Include "common/gdb_optional.h".
11308 (continue_1, proceed_after_attach): Use
11309 scoped_restore_current_thread.
11310 (notice_new_inferior): Use scoped_restore_current_thread.
11311 * inferior.c: Include "progspace-and-thread.h".
11312 (restore_inferior, save_current_inferior): Delete.
11313 (add_inferior_command, clone_inferior_command): Use
11314 scoped_restore_current_pspace_and_thread.
11315 * inferior.h (scoped_restore_current_inferior): New class.
11316 * infrun.c: Include "progspace-and-thread.h" and
11317 "common/gdb_optional.h".
11318 (follow_fork_inferior): Use
11319 scoped_restore_current_pspace_and_thread.
11320 (scoped_restore_exited_inferior): New class.
11321 (handle_vfork_child_exec_or_exit): Use
11322 scoped_restore_exited_inferior,
11323 scoped_restore_current_pspace_and_thread,
11324 scoped_restore_current_thread and scoped_restore.
11325 (fetch_inferior_event): Use scoped_restore_current_thread.
11326 * linespec.c (decode_line_full, decode_line_1): Use
11327 scoped_restore_current_program_space.
11328 * mi/mi-main.c: Include "progspace-and-thread.h".
11329 (exec_continue): Use scoped_restore_current_thread.
11330 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11331 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11332 * proc-service.c (ps_pglobal_lookup): Use
11333 scoped_restore_current_program_space.
11334 * progspace-and-thread.c: New file.
11335 * progspace-and-thread.h: New file.
11336 * progspace.c (release_program_space, clone_program_space): Use
11337 scoped_restore_current_program_space.
11338 (restore_program_space, save_current_program_space)
11339 (save_current_space_and_thread): Delete.
11340 (switch_to_program_space_and_thread): Moved to
11341 progspace-and-thread.c.
11342 * progspace.h (save_current_program_space)
11343 (save_current_space_and_thread): Delete declarations.
11344 (scoped_restore_current_program_space): New class.
11345 * remote.c (remote_btrace_maybe_reopen): Use
11346 scoped_restore_current_thread.
11347 * symtab.c: Include "progspace-and-thread.h".
11348 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11349 * thread.c (print_thread_info_1): Use
11350 scoped_restore_current_thread.
11351 (struct current_thread_cleanup): Delete.
11352 (do_restore_current_thread_cleanup)
11353 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11354 (scoped_restore_current_thread::~scoped_restore_current_thread):
11355 ... this new dtor.
11356 (make_cleanup_restore_current_thread): Rename/convert to ...
11357 (scoped_restore_current_thread::scoped_restore_current_thread):
11358 ... this new ctor.
11359 (thread_apply_all_command): Use scoped_restore_current_thread.
11360 (thread_apply_command): Use scoped_restore_current_thread.
11361 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11362 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11363
f6223dbb
PA
113642017-05-04 Pedro Alves <palves@redhat.com>
11365
11366 * thread.c (make_cleanup_restore_current_thread): Move
11367 find_thread_ptid call before the is_stopped call. Assert that the
11368 thread is found. Replace is_stopped call by checking the thread's
11369 state directly. Remove unnecessary NULL-thread check.
11370
3c3ae77e
PA
113712017-05-04 Pedro Alves <palves@redhat.com>
11372
11373 * corelow.c (thread_section_name): New class.
11374 (get_core_register_section, get_core_siginfo): Use it.
11375
45eba0ab
AA
113762017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11377
11378 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11379 (get_core_register_section): Remove xfree of NULL pointer.
11380
f81fdd35
AH
113812017-05-03 Alan Hayward <alan.hayward@arm.com>
11382
11383 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11384 * regcache.c (regcache::raw_supply_zeroed): New function.
11385 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11386
35837774
SM
113872017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11388
11389 * gdbarch.sh: Remove commented out definition of
11390 TARGET_CHAR_BIT.
11391 * gdbarch.h: Re-generate.
11392
c94fee56
SDJ
113932017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11394
11395 * configure: Regenerate.
11396
d17f7b36
SM
113972017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11398
11399 * solib-target.c (solib_target_relocate_section_addresses):
11400 Remove num_section_bases, num_bases, segment_bases variables.
11401
b560ebd6
SM
114022017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11403
11404 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11405
f2f46dfc
SM
114062017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11407
11408 * solib-target.c: Include <vector>
11409 (struct lm_info_target) <~lm_info_target>: Remove.
11410 <segment_bases, section_bases>: Change type to
11411 std::vector<CORE_ADDR>.
11412 (library_list_start_segment, library_list_start_section,
11413 library_list_end_library,
11414 solib_target_relocate_section_addresses): Adjust.
11415
a0ff9e1a
SM
114162017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11417
11418 * gdbarch.sh (software_single_step): Change return type to
11419 std::vector<CORE_ADDR>.
11420 * gdbarch.c, gdbarch.h: Re-generate.
11421 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11422 Adjust.
11423 (arm_deal_with_atomic_sequence_raw): Adjust.
11424 (thumb_get_next_pcs_raw): Adjust.
11425 (arm_get_next_pcs_raw): Adjust.
11426 (arm_get_next_pcs): Adjust.
11427 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11428 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11429 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11430 (alpha_software_single_step): Adjust.
11431 * alpha-tdep.h (alpha_software_single_step): Adjust.
11432 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11433 * arm-tdep.c (arm_software_single_step): Adjust.
11434 (arm_breakpoint_kind_from_current_state): Adjust.
11435 * arm-tdep.h (arm_software_single_step): Adjust.
11436 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11437 * cris-tdep.c (cris_software_single_step): Adjust.
11438 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11439 (micromips_deal_with_atomic_sequence): Adjust.
11440 (deal_with_atomic_sequence): Adjust.
11441 (mips_software_single_step): Adjust.
11442 * mips-tdep.h (mips_software_single_step): Adjust.
11443 * moxie-tdep.c (moxie_software_single_step): Adjust.
11444 * nios2-tdep.c (nios2_software_single_step): Adjust.
11445 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11446 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11447 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11448 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11449 * sparc-tdep.c (sparc_software_single_step): Adjust.
11450 * spu-tdep.c (spu_software_single_step): Adjust.
11451 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11452
ea480a30
SM
114532017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11454
11455 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11456 * gdbarch.h: Re-generate.
11457
d050f7d7
TW
114582017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11459
11460 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11461 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11462 * python/py-instruction.c, python/py-instruction.h: New file.
11463 * python/py-record.c: Add py-instruction.h include.
11464 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11465 gdb.RecordInstruction.
11466 * python/python-internal.h: Add gdbpy_initialize_instruction
11467 declaration.
11468 * python/python.c (do_start_initialization): Add
11469 gdbpy_initialize_instruction.
11470
14f819c8
TW
114712017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11472
11473 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11474 Remove.
11475 (btrace_func_from_recpy_func): New function.
11476 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11477 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11478 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11479 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11480 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11481 Also, use new helper functions.
11482 (btpy_list_item): Use new helper functions.
11483 (recpy_bt_function_call_history): Use new type name.
11484 (btpy_call_getset): Remove.
11485 (gdbpy_initialize_btrace): Remove code to initialize
11486 gdb.BtraceFunctionCall.
11487 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11488 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11489 recpy_bt_func_prev, recpy_bt_func_next): New export.
11490 * python/py-record.c (recpy_func_type): New static object.
11491 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11492 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11493 recpy_func_next): New function.
11494 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11495 (recpy_func_getset): New static object.
11496 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11497 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11498
0ed5da75
TW
114992017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11500
11501 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11502 (btpy_object, btpy_insn_type, btpy_new): Remove.
11503 (btpy_list_object): Use gdb.RecordInstruction type instead of
11504 gdb.BtraceInstruction type.
11505 (btrace_insn_from_recpy_insn): New function.
11506 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11507 btpy_new.
11508 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11509 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11510 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11511 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11512 instead of btpy_object.
11513 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11514 btpy_insn_data, btpy_insn_decode): Rename to ...
11515 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11516 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11517 recpy_bt_insn_decode): This. Also, use new helper functions.
11518 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11519 recpy_insn_type.
11520 (btpy_insn_getset): Remove.
11521 (gdbpy_initialize_btrace): Remove code to initialize
11522 gdb.BtraceInstruction. Use recpy_element_object.
11523 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11524 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11525 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11526 * python/py-record.c (recpy_insn_type): New static object.
11527 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11528 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11529 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11530 New function.
11531 (recpy_insn_getset): New static object.
11532 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11533 * python/py-record.h (recpy_element_object): New typedef.
11534 (recpy_insn_type, recpy_insn_new): New export.
11535
913aeadd
TW
115362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11537
11538 * py-record-btrace.c (btpy_insn_new): Removed.
11539 (btpy_insn_or_gap_new): New function.
11540 (btpy_insn_error): Removed.
11541 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11542 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11543 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11544 btpy_insn_or_gap_new instead of btpy_insn_new.
11545 (btpy_insn_getset): Remove btpy_insn_error.
11546 * py-record.c (recpy_gap_type): New static object.
11547 (recpy_gap_object): New typedef.
11548 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11549 recpy_gap_reason_string): New function.
11550 (recpy_gap_getset): New static object.
11551 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11552 * py-record.h (recpy_gap_new): New export.
11553
a3be24ad
TW
115542017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11555
11556 * python/py-record.c (recpy_ptid): Remove.
11557 (recpy_record_getset): Remove recpy_ptid.
11558
ae20e79a
TW
115592017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11560
11561 * btrace.c (btrace_fetch): Set inferior_ptid.
11562 * python/py-record-btrace.c: Add "py-record.h" include.
11563 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11564 recpy_bt_end, recpy_bt_instruction_history,
11565 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11566 in gdb.Record object instead of current ptid.
11567 * python/py-record.c: Include new "py-record.h" file.
11568 (recpy_record_object): Moved to py-record.h.
11569 * python/py-record.h: New file.
11570
8d0050ea
TW
115712017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11572
11573 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11574 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11575 indentation.
11576
3f380b50
JB
115772017-05-01 Joel Brobecker <brobecker@adacore.com>
11578
11579 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11580 the past maintainers section.
11581
07495424
YQ
115822017-04-28 Yao Qi <yao.qi@linaro.org>
11583
11584 * infcmd.c (get_return_value): Use regcache ctor, and remove
11585 cleanup.
11586
deb1fa3e
YQ
115872017-04-28 Yao Qi <yao.qi@linaro.org>
11588 Pedro Alves <palves@redhat.com>
11589
11590 * regcache.c (regcache::regcache): New tag dispatch ctor.
11591 (do_cooked_read): Moved above.
11592 (regcache_dup): Use the tag dispatch ctor..
11593 * regcache.h (regcache): Declare ctor, delete copy ctor and
11594 assignment operator, remove friend regcache_dup.
11595
b421c83c
YQ
115962017-04-28 Yao Qi <yao.qi@linaro.org>
11597
11598 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11599 call method save instead of regcache_cpy.
11600 * regcache.h (struct regcache): Make regcache_dup a friend.
11601
ef79d9a3
YQ
116022017-04-28 Yao Qi <yao.qi@linaro.org>
11603
11604 * regcache.c (struct regcache): Move to regcache.h
11605 (regcache::arch): New method.
11606 (regcache_get_ptid): Update.
11607 (get_regcache_arch): Call arch method.
11608 (get_regcache_aspace): Call method aspace.
11609 (register_buffer): Change it to method.
11610 (regcache_save): Change it to regcache::save.
11611 (regcache_restore): Likewise.
11612 (regcache_cpy_no_passthrough): Remove the declaration.
11613 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11614 (regcache_cpy_no_passthrough): Change it to method
11615 cpy_no_passthrough.
11616 (regcache_register_status): Change it to method
11617 get_register_status.
11618 (regcache_invalidate): Change it to method invalidate.
11619 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11620 (regcache_raw_update): Change it to method raw_update.
11621 (regcache_raw_read): Likewise.
11622 (regcache_raw_read_signed): Likewise.
11623 (regcache_raw_read_unsigned): Likewise.
11624 (regcache_raw_write_signed): Likewise.
11625 (regcache_raw_write_unsigned): Likewise.
11626 (regcache_cooked_read): Likewise.
11627 (regcache_cooked_read_value): Likewise.
11628 (regcache_cooked_read_signed): Likewise.
11629 (regcache_cooked_read_unsigned): Likewise.
11630 (regcache_cooked_write_signed): Likewise.
11631 (regcache_cooked_write_unsigned): Likewise.
11632 (regcache_raw_set_cached_value): Likewise.
11633 (regcache_raw_write): Likewise.
11634 (regcache_cooked_write): Likewise.
11635 (regcache_xfer_part): Likewise.
11636 (regcache_raw_read_part): Likewise.
11637 (regcache_raw_write_part): Likewise.
11638 (regcache_cooked_read_part): Likewise.
11639 (regcache_cooked_write_part): Likewise.
11640 (regcache_raw_supply): Likewise.
11641 (regcache_raw_collect): Likewise.
11642 (regcache_transfer_regset): Likewise.
11643 (regcache_supply_regset): Likewise.
11644 (regcache_collect_regset): Likewise.
11645 (regcache_debug_print_register): Likewise.
11646 (enum regcache_dump_what): Move it to regcache.h.
11647 (regcache_dump): Change it to method dump.
11648 * regcache.h (enum regcache_dump_what): New.
11649 (class regcache): New.
11650 * target.c (target_fetch_registers): Call method
11651 debug_print_register.
11652 (target_store_registers): Likewise.
11653
f8fdb78e
SM
116542017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11655
11656 * windows-nat.c (struct lm_info_windows): Initialize field.
11657 (windows_make_so): Allocate lm_info_windows with new.
11658 (windows_free_so): Free lm_info_windows with delete.
11659
9ccbfd7b
SM
116602017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11661
11662 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11663 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11664 cleanup.
11665 (darwin_free_so): Free lm_info_darwin with delete.
11666
76e75227
SM
116672017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11668
11669 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11670 <l_addr_p>: Change type to bool.
11671 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11672 (svr4_free_so): Free lm_info_svr4 with delete.
11673 (svr4_copy_library_list): Replace memcpy with call to copy
11674 constructor.
11675 (library_list_start_library, svr4_default_sos): Allocate
11676 lm_info_svr4 with new.
11677
51046d9e
SM
116782017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11679
11680 * solib-target.c (struct lm_info_target): Add destructor,
11681 initialize fields.
11682 <name>: Change type to std::string.
11683 (library_list_start_library): Allocate lm_info_target with new.
11684 (solib_target_free_library_list): Free lm_info_target with
11685 delete.
11686 (solib_target_current_sos): Adapt to std::string.
11687 (solib_target_free_so): Free lm_info_target with delete.
11688
4023ae76
SM
116892017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11690
11691 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11692 fields.
11693 (frv_current_sos): Allocate lm_info_frv with new.
11694 (frv_relocate_main_executable): Free lm_info_frv with delete,
11695 allocate with new.
11696 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11697
af43057b
SM
116982017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11699
11700 * solib-frv.c (struct lm_info_frv): Fix indentation.
11701
b0911207
SM
117022017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11703
11704 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11705 map field.
11706 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11707 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11708 and allocate with new.
11709 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11710
6c401f72
SM
117112017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11712
11713 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11714 <filename, member_name>: Change type to std::string.
11715 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11716 (library_list_start_library): Allocate lm_info_aix with new.
11717 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11718 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11719 with copy constructor.
11720
d0e449a1
SM
117212017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11722
11723 * solist.h (struct lm_info): Remove.
11724 (struct lm_info_base): New class.
11725 (struct so_list) <lm_info>: Change type to lm_info_base *.
11726 * nto-tdep.c (struct lm_info): Remove.
11727 (lm_addr): Adjust.
11728 * solib-aix.c (struct lm_info): Rename to ...
11729 (struct lm_info_aix): ... this. Extend lm_info_base.
11730 (lm_info_p): Rename to ...
11731 (lm_info_aix_p): ... this, and adjust.
11732 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11733 solib_aix_parse_libraries, library_list_start_library,
11734 solib_aix_free_library_list, solib_aix_parse_libraries,
11735 solib_aix_get_library_list,
11736 solib_aix_relocate_section_addresses, solib_aix_free_so,
11737 solib_aix_get_section_offsets,
11738 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11739 Adjust.
11740 (struct solib_aix_inferior_data) <library_list>: Adjust.
11741 * solib-darwin.c (struct lm_info): Rename to ...
11742 (struct lm_info_darwin): ... this. Extend lm_info_base.
11743 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11744 * solib-dsbt.c (struct lm_info): Rename to ...
11745 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11746 (struct dsbt_info) <main_executable_lm_info): Adjust.
11747 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11748 dsbt_relocate_section_addresses): Adjust.
11749 * solib-frv.c (struct lm_info): Rename to ...
11750 (struct lm_info_frv): ... this. Extend lm_info_base.
11751 (main_executable_lm_info): Adjust.
11752 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11753 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11754 find_canonical_descriptor_in_load_object,
11755 frv_fdpic_find_canonical_descriptor): Adjust.
11756 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11757 to lm_info_svr4.
11758 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11759 svr4_clear_so, svr4_copy_library_list,
11760 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11761 svr4_current_sos, svr4_fetch_objfile_link_map,
11762 solist_update_incremental): Adjust.
11763 * solib-svr4.h (struct lm_info_svr4): Move here from
11764 solib-svr4.c.
11765 * solib-target.c (struct lm_info): Rename to ...
11766 (struct lm_info_target): ... this. Extend lm_info_base.
11767 (lm_info_p): Rename to ...
11768 (lm_info_target_p): ... this.
11769 (solib_target_parse_libraries, library_list_start_segment,
11770 library_list_start_section, library_list_start_library,
11771 library_list_end_library, solib_target_free_library_list,
11772 solib_target_current_sos, solib_target_free_so,
11773 solib_target_relocate_section_addresses): Adjust.
11774 * windows-nat.c (struct lm_info): Rename to ...
11775 (struct lm_info_windows): ... this. Extend lm_info_base.
11776 (windows_make_so, handle_load_dll, handle_unload_dll,
11777 windows_xfer_shared_libraries): Adjust.
11778
434a4023
SM
117792017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11780
11781 * solib-darwin.c (struct darwin_so_list): Remove.
11782 (darwin_current_sos): Allocate an so_list object instead of a
11783 darwin_so_list, separately allocate an lm_info object.
11784 (darwin_free_so): Free lm_info.
11785
428544e8
JB
117862017-04-28 John Baldwin <jhb@FreeBSD.org>
11787
11788 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11789 with fprintf_filtered.
11790
4621115f
YQ
117912017-04-28 Yao Qi <yao.qi@linaro.org>
11792
11793 * regcache.c (regcache::regcache): New function.
11794 (regcache::~regcache): New function.
11795 (regcache_xmalloc_1): Remove.
11796 (regcache_xmalloc): Call new regcache.
11797 (regcache_xfree): Call delete regcache.
11798 (get_thread_arch_aspace_regcache): Call new regcache.
11799
339053c2
YQ
118002017-04-28 Yao Qi <yao.qi@linaro.org>
11801
11802 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11803 lwp instead of ptid_get_lwp.
11804
7974a605
YQ
118052017-04-28 Yao Qi <yao.qi@linaro.org>
11806
11807 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11808 lwp_info instead of getting from inferior_ptid.
11809
e15c3eb4
KS
118102017-04-27 Keith Seitz <keiths@redhat.com>
11811
11812 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11813 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11814 (CV_CONVERSION_BADNESS): Define.
11815 (rank_one_type): Remove overly restrictive rvalue reference
11816 rank checks.
11817 Add cv-qualifier checks and subranks for type equality.
11818 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11819 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11820 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11821
72bc1d24
SM
118222017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11823
11824 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11825 count when creating the object.
11826
55bcecda
UW
118272017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11828 Ulrich Weigand <uweigand@de.ibm.com>
11829
11830 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11831 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11832 is used in AIX.
11833 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11834 (process_xcoff_symbol): Likewise.
11835 (scan_xcoff_symtab): Likewise.
11836
5c99fcf8
AH
118372017-04-26 Alan Hayward <alan.hayward@arm.com>
11838
11839 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11840 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11841 (ia64_access_reg): Use get_frame_register_unsigned.
11842 (ia64_access_rse_reg): Likewise.
11843 (ia64_libunwind_frame_prev_register): Likewise.
11844
b41c5a85
JW
118452017-04-26 Jiong Wang <jiong.wang@arm.com>
11846
11847 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11848 * gdbarch.c: Regenerated.
11849 * gdbarch.h: Regenerated.
11850 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11851 visibility external.
11852 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11853 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11854 (enum cfa_how_kind): Move to ...
11855 (struct dwarf2_frame_state_reg_info): Likewise.
11856 (struct dwarf2_frame_state): Likewise.
11857 * dwarf2-frame.h: ... here.
11858 (dwarf2_frame_state_alloc_regs): New declaration.
11859 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11860 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11861
c185f580
AH
118622017-04-26 Alan Hayward <alan.hayward@arm.com>
11863
11864 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11865 regcache_raw_read_unsigned.
11866 (xtensa_pseudo_register_write): Likewise.
11867
19c45594
AH
118682017-04-26 Alan Hayward <alan.hayward@arm.com>
11869
11870 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11871 (nds32_pseudo_register_write): Likewise.
11872
4658f12e
YQ
118732017-04-25 Yao Qi <yao.qi@linaro.org>
11874
11875 * regcache.c (struct regcache) <readonly_p>: Change its type
11876 to bool.
11877 (regcache_xmalloc_1): Update parameter type and callers update.
11878
d581dda8
YQ
118792017-04-25 Yao Qi <yao.qi@linaro.org>
11880
11881 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11882 set_gdbarch_wchar_bit.
11883 * arm-tdep.c (arm_gdbarch_init): Likewise.
11884
debed3db
PA
118852017-04-25 Pedro Alves <palves@redhat.com>
11886
11887 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11888 (BothAreRelocatable, memcopy, memmove): Don't define.
11889 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11890 macros.
11891
b0b92aeb
PA
118922017-04-25 Pedro Alves <palves@redhat.com>
11893
11894 * common/common-defs.h: Include "common/poison.h".
11895 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11896 and adjust.
11897 * common/poison.h: New file.
11898 * common/traits.h: Include <type_traits>.
11899 (Not, Or, Requires): New, moved from common/function-view.h.
11900
16c4d54a
PA
119012017-04-25 Pedro Alves <palves@redhat.com>
11902
11903 * breakpoint.h (struct breakpoint): In-class initialize all
11904 fields. Make boolean fields "bool".
11905 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11906 memset call and initializations no longer necessary.
11907
b5c36682
PA
119082017-04-25 Pedro Alves <palves@redhat.com>
11909
11910 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11911 reference.
11912 (pt_btrace_insn): New function.
11913 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11914
5625a286
PA
119152017-04-25 Pedro Alves <palves@redhat.com>
11916
11917 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11918 "base" field and inherit from "bp_location" instead. Add
11919 non-default ctor.
11920 (allocate_location_exception): Use new non-default ctor.
11921 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11922 (init_bp_location): Convert to ...
11923 (bp_location::bp_location): ... this new ctor, and remove memset
11924 call.
11925 (base_breakpoint_allocate_location): Use the new non-default ctor.
11926 * breakpoint.h (bp_location): Now a class. Declare default and
11927 non-default ctors. In-class initialize all members.
11928 (init_bp_location): Remove declaration.
11929
23bcc18f
PA
119302017-04-25 Pedro Alves <palves@redhat.com>
11931
11932 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11933 assignment operator.
11934
e1ba3053
YQ
119352017-04-24 Yao Qi <yao.qi@linaro.org>
11936
11937 * doublest.c (convert_doublest_to_floatformat): Call
11938 floatformat_totalsize_bytes.
11939
10f489e5
TT
119402017-04-22 Tom Tromey <tom@tromey.com>
11941
11942 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11943 ui_out_emit_list.
11944 * stack.c (print_frame): Use ui_out_emit_list.
11945 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11946 ui_out_emit_list.
11947 * mi/mi-main.c (print_one_inferior)
11948 (mi_cmd_data_list_register_names)
11949 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11950 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11951 ui_out_emit_list.
11952 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11953 (mi_output_solib_attribs): Use ui_out_emit_list,
11954 ui_out_emit_tuple.
11955 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11956 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11957 (mi_cmd_stack_list_args, list_args_or_locals): Use
11958 ui_out_emit_list.
11959 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11960 * breakpoint.c (print_solib_event, output_thread_groups): Use
11961 ui_out_emit_list.
11962
0092b74d
TT
119632017-04-22 Tom Tromey <tom@tromey.com>
11964
11965 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11966 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11967 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11968
a14a62dd
TT
119692017-04-22 Tom Tromey <tom@tromey.com>
11970
11971 * tracepoint.c (tvariables_info_1)
11972 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11973
46b9c129
TT
119742017-04-22 Tom Tromey <tom@tromey.com>
11975
11976 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11977 annotate_arg_emitter.
11978 * breakpoint.c (print_mention_watchpoint)
11979 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11980 * annotate.h (struct annotate_arg_emitter): New.
11981
2e783024
TT
119822017-04-22 Tom Tromey <tom@tromey.com>
11983
11984 * record-btrace.c (record_btrace_insn_history)
11985 (record_btrace_insn_history_range, record_btrace_call_history)
11986 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11987 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11988 ui_out_emit_tuple.
11989 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11990 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11991 * skip.c (skip_info): Use ui_out_emit_tuple.
11992 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11993 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11994 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11995 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11996 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11997 ui_out_emit_tuple.
11998 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11999 (output_register, mi_cmd_data_read_memory)
12000 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12001 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12002 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12003 Use ui_out_emit_tuple.
12004 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12005 ui_out_emit_tuple.
12006 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12007 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12008 * linux-thread-db.c (info_auto_load_libthread_db): Use
12009 ui_out_emit_tuple.
12010 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12011 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12012 * disasm.c (do_mixed_source_and_assembly_deprecated)
12013 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12014 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12015 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12016 * breakpoint.c (print_one_breakpoint_location)
12017 (print_one_breakpoint): Use ui_out_emit_tuple.
12018 * auto-load.c (print_script, info_auto_load_cmd): Use
12019 ui_out_emit_tuple.
12020 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12021
9be21bb4
SM
120222017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12023
12024 * thread.c (print_thread_info_1): Remove dead code.
12025
0d4c07af
JK
120262017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12027
12028 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12029 GDB_SELF_TEST.
12030 * arm-tdep.c (selftests::arm_record_test): Likewise.
12031
4daf993d
YQ
120322017-04-21 Yao Qi <yao.qi@linaro.org>
12033
12034 * regcache.c (regcache_restore): Remove argument 2. Replace
12035 argument 3 with regcache. Get register status from
12036 src->register_status and get register contents from
12037 register_buffer (src, regnum).
12038 (regcache_cpy): Update.
12039
a6c21d4a
PA
120402017-04-19 Pedro Alves <palves@redhat.com>
12041
12042 * gdbthread.h (thread): Add missing closing parenthesis in
12043 comment.
12044
3a3fd0fd
PA
120452017-04-19 Pedro Alves <palves@redhat.com>
12046
12047 * common/refcounted-object.h: New file.
12048 * gdbthread.h: Include "common/refcounted-object.h".
12049 (thread_info): Inherit from refcounted_object and add comments.
12050 (thread_info::incref, thread_info::decref)
12051 (thread_info::m_refcount): Delete.
12052 (thread_info::deletable): Use the refcounted_object::refcount()
12053 method.
12054 * inferior.c (current_inferior_): Add comment.
12055 (set_current_inferior): Increment/decrement refcounts.
12056 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12057 not-deletable instead of comparing with the current inferior.
12058 (initialize_inferiors): Increment the initial inferior's refcount.
12059 * inferior.h (struct inferior): Forward declare.
12060 Include "common/refcounted-object.h".
12061 (current_inferior, set_current_inferior): Move declaration to
12062 before struct inferior's definition, and fix comment.
12063 (inferior): Inherit from refcounted_object. Add comments.
12064 * thread.c (switch_to_thread_no_regs): Reference the thread's
12065 inferior pointer directly instead of doing a ptid lookup.
12066 (switch_to_no_thread): New function.
12067 (switch_to_thread(thread_info *)): New function, factored out
12068 from ...
12069 (switch_to_thread(ptid_t)): ... this.
12070 (restore_current_thread): Delete.
12071 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12072 fields, and add 'inf' field.
12073 (do_restore_current_thread_cleanup): Check whether old->inf is
12074 alive instead of looking up an inferior by ptid. Use
12075 switch_to_thread and switch_to_no_thread.
12076 (restore_current_thread_cleanup_dtor): Use old->inf directly
12077 instead of lookup up an inferior by id. Decref the inferior.
12078 Don't restore 'removable'.
12079 (make_cleanup_restore_current_thread): Same the inferior pointer
12080 in old, instead of the inferior number. Incref the inferior.
12081 Don't save/clear 'removable'.
12082
9bcb1f16
PA
120832017-04-19 Pedro Alves <palves@redhat.com>
12084
12085 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12086 unittests/scoped_restore-selftests.c.
12087 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12088 * common/scoped_restore.h (scoped_restore_base): Make "class".
12089 (scoped_restore_base::release): New public method.
12090 (scoped_restore_base::scoped_restore_base): New protected ctor.
12091 (scoped_restore_base::m_saved_var): New protected field.
12092 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12093 scoped_restore_base base class instead of m_saved_var directly.
12094 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12095 (scoped_restore_tmpl::scoped_restore_tmpl(const
12096 scoped_restore_tmpl<T>&)): Likewise.
12097 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12098 method.
12099 (scoped_restore_tmpl::saved_var): New method.
12100 (scoped_restore_tmpl::m_saved_var): Delete.
12101 * inferior.h (inferior::detaching): Now a bool.
12102 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12103 cleanup.
12104 * unittests/scoped_restore-selftests.c: New file.
12105
26fcd539
PA
121062017-04-19 Pedro Alves <palves@redhat.com>
12107
12108 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12109 Re-sort in alphabetic order.
12110
fdd243b0
PA
121112017-04-18 Pedro Alves <palves@redhat.com>
12112
12113 * xml-support.c (obstack_xml_printf): Delete.
12114 * xml-support.h (obstack_xml_printf): Delete.
12115
4895cde2
PA
121162017-04-18 Pedro Alves <palves@redhat.com>
12117
12118 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12119 vdebug, verror, body_text, start_element, end_element, name,
12120 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12121 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12122 is_xinclude>: Make private and add m_ prefix.
12123 (gdb_xml_parser::body_text): New method, based on ...
12124 (gdb_xml_body_text): ... this. Adjust.
12125 (gdb_xml_parser::vdebug): New method, based on ...
12126 (gdb_xml_debug): ... this. Adjust.
12127 (gdb_xml_parser::verror): New method, based on ...
12128 (gdb_xml_error): ... this. Adjust.
12129 (gdb_xml_parser::start_element): New method, based on ...
12130 (gdb_xml_start_element): ... this. Adjust.
12131 (gdb_xml_start_element_wrapper): Defer to
12132 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12133 (gdb_xml_parser::end_element): New method, based on ...
12134 (gdb_xml_end_element_wrapper): ... this. Adjust.
12135 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12136 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12137 (gdb_xml_parser::use_dtd): New method, based on ...
12138 (gdb_xml_use_dtd): ... this. Adjust.
12139 (gdb_xml_parser::parse): New method, based on ...
12140 (gdb_xml_parse): ... this. Adjust.
12141 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12142 (xinclude_start_include): Adjust to call the parser's name method.
12143 (xml_xinclude_default, xml_xinclude_start_doctype)
12144 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12145 method.
12146 (xml_process_xincludes): Adjust to call parser methods.
12147 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12148 declarations.
12149
bd8a901f
PA
121502017-04-18 Pedro Alves <palves@redhat.com>
12151
12152 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12153 gdb::optional<std::string>.
12154 * xml-support.c: Include <string>.
12155 (scope_level::scope_level(scope_level &&))
12156 (scope_level::~scope_level): Delete.
12157 (scope_level::body): Now a std::string.
12158 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12159 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12160 parameter.
12161 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12162 (xinclude_parsing_data::output): Now a std::string reference.
12163 (xinclude_start_include): Adjust.
12164 (xml_xinclude_default): Adjust.
12165 (xml_process_xincludes): Add 'output' parameter, and return bool.
12166 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12167 and return bool.
12168 * xml-tdesc.c: Include <unordered_map> and <string>.
12169 (tdesc_xml_cache): Delete.
12170 (tdesc_xml_cache_s): Delete.
12171 (xml_cache): Now an std::unordered_map.
12172 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12173 (target_fetch_description_xml): Change return type to
12174 gdb::optional<std::string>, and adjust.
12175 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12176 (target_fetch_description_xml): Change return type to
12177 gdb::optional<std::string>.
12178
d35d1958
PA
121792017-04-18 Pedro Alves <palves@redhat.com>
12180
12181 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12182 unittests/optional-selftests.c.
12183 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12184 * unittests/optional-selftests.c: New file.
12185 * unittests/optional/assignment/1.cc: New file.
12186 * unittests/optional/assignment/2.cc: New file.
12187 * unittests/optional/assignment/3.cc: New file.
12188 * unittests/optional/assignment/4.cc: New file.
12189 * unittests/optional/assignment/5.cc: New file.
12190 * unittests/optional/assignment/6.cc: New file.
12191 * unittests/optional/assignment/7.cc: New file.
12192 * unittests/optional/cons/copy.cc: New file.
12193 * unittests/optional/cons/default.cc: New file.
12194 * unittests/optional/cons/move.cc: New file.
12195 * unittests/optional/cons/value.cc: New file.
12196 * unittests/optional/in_place.cc: New file.
12197 * unittests/optional/observers/1.cc: New file.
12198 * unittests/optional/observers/2.cc: New file.
12199
22796e97
PA
122002017-04-18 Pedro Alves <palves@redhat.com>
12201
12202 * common/gdb_optional.h: Include common/traits.h.
12203 (in_place_t): New type.
12204 (in_place): New constexpr variable.
12205 (optional::optional): Remove member initialization of
12206 m_instantiated.
12207 (optional::optional(in_place_t...)): New constructor.
12208 (optional::~optional): Use reset.
12209 (optional::optional(const optional&)): New.
12210 (optional::optional(const optional&&)): New.
12211 (optional::optional(T &)): New.
12212 (optional::optional(T &&)): New.
12213 (operator::operator=(const optional &)): New.
12214 (operator::operator=(optional &&)): New.
12215 (operator::operator= (const T &))
12216 (operator::operator= (T &&))
12217 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12218 (operator::reset): New.
12219 (operator::m_instantiated):: Add in-class initializer.
12220 * common/traits.h: Include <type_traits>.
12221 (struct And): New types.
12222
a7fc9b61
PA
122232017-04-18 Pedro Alves <palves@redhat.com>
12224
12225 * xml-support.c: Include <vector>.
12226 (scope_level::scope_level(const gdb_xml_element *))
12227 (scope_level::scope_level(scope_level&&)): New.
12228 (scope_level::~scope_level): New.
12229 (scope_level_s): Delete.
12230 (gdb_xml_parser::scopes): Now a std::vector.
12231 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12232 Use std::vector.
12233 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12234 scope cleanup code.
12235 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12236 of the scopes member. Use std::vector::emplace_back.
12237
010151c9
PA
122382017-04-18 Pedro Alves <palves@redhat.com>
12239
12240 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12241 a bool.
12242 (gdb_xml_end_element): Change type of first parameter.
12243 (gdb_xml_cleanup): Rename to ...
12244 (gdb_xml_parser::~gdb_xml_parser): ... this.
12245 (gdb_xml_create_parser_and_cleanup): Delete with ...
12246 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12247 to this new ctor.
12248 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12249 using gdb_xml_create_parser_and_cleanup.
12250 (xinclude_parsing_data): Add ctor/dtor.
12251 (xml_xinclude_cleanup): Delete.
12252 (xml_process_xincludes): Create a local xinclude_parsing_data
12253 instead of heap-allocating one. Create a local gdb_xml_parser
12254 instead of heap-allocating one with
12255 gdb_xml_create_parser_and_cleanup.
12256
d56060f0
JB
122572017-04-18 John Baldwin <jhb@FreeBSD.org>
12258
12259 PR threads/20743
12260 * fbsd-nat.c (resume_one_thread_cb): Remove.
12261 (resume_all_threads_cb): Remove.
12262 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12263 iterate_over_threads.
12264
305d16a9
JB
122652017-04-17 Joel Brobecker <brobecker@adacore.com>
12266
12267 * NEWS: Create a new section for the next release branch.
12268 Rename the section of the current branch, now that it has
12269 been cut.
12270
8bb57231
JB
122712017-04-17 Joel Brobecker <brobecker@adacore.com>
12272
12273 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12274 * version.in: Bump version to 8.0.50.DATE-git.
12275
096c92dd
SDJ
122762017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12277
12278 PR gdb/21385
12279 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12280 independently of the host, and fix build breakage on Cygwin.
12281
0550c955
PA
122822017-04-13 Pedro Alves <palves@redhat.com>
12283
12284 * inferior.c (free_inferior): Convert to ...
12285 (inferior::~inferior): ... this dtor.
12286 (inferior::inferior): New ctor, factored out from ...
12287 (add_inferior_silent): ... here. Allocate the inferior with a new
12288 expression.
12289 (delete_inferior): Call delete instead of free_inferior.
12290 * inferior.h (gdb_environ, continuation): Forward declare.
12291 (inferior): Now a class. Add in-class initialization to all
12292 members. Make boolean fields bool, except 'detaching'.
12293 (inferior::inferior): New explicit ctor.
12294 (inferior::~inferior): New.
12295
e3d60dfc
PA
122962017-04-13 Pedro Alves <palves@redhat.com>
12297
12298 * inferior.c (init_inferior_list): Delete.
12299 * inferior.h (init_inferior_list): Delete.
12300
5fd69d0a
PA
123012017-04-13 Pedro Alves <palves@redhat.com>
12302
12303 PR threads/13217
12304 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12305 (top level): Call it twice, with different thread sets.
12306
c6609450
PA
123072017-04-13 Pedro Alves <palves@redhat.com>
12308
12309 * thread.c: Include <algorithm>.
12310 (thread_array_cleanup): Delete.
12311 (scoped_inc_dec_ref): New class.
12312 (live_threads_count): New function.
12313 (set_thread_refcount): Delete.
12314 (tp_array_compar_ascending): Now a bool.
12315 (tp_array_compar): Convert to a std::sort comparison function.
12316 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12317 and live_threads_count.
12318
2a00d7ce
PA
123192017-04-13 Pedro Alves <palves@redhat.com>
12320
12321 * infrun.c (follow_fork_inferior): Also switch the current
12322 inferior.
12323
441d7c93
PA
123242017-04-13 Pedro Alves <palves@redhat.com>
12325
12326 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12327 before calling create_internal_breakpoint.
12328
808480f6
PA
123292017-04-13 Pedro Alves <palves@redhat.com>
12330
12331 * fork-child.c (execv_argv): New class.
12332 (breakup_args): Refactored as ...
12333 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12334 Copy arguments to storage and replace separators with NULL
12335 terminators in place.
12336 (escape_bang_in_quoted_argument): Adjust to return bool.
12337 (execv_argv::execv_argv): New ctor.
12338 (execv_argv::init_for_shell): New method, factored out from
12339 fork_inferior. Don't strdup strings into the vector.
12340 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12341 Remove free_vector_argv call.
12342
ad3d022a
YQ
123432017-04-13 Yao Qi <yao.qi@linaro.org>
12344
12345 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12346 tdep->rx_psw_type.
12347
e6ddc3bf
YQ
123482017-04-13 Yao Qi <yao.qi@linaro.org>
12349
12350 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12351 * rx-tdep.c (rx_gdbarch_init): Likewise.
12352
bfb8cf90
PA
123532017-04-13 Pedro Alves <palves@redhat.com>
12354
12355 * breakpoint.h (struct breakpoint): Reindent.
12356
f5336ca5
PA
123572017-04-13 Pedro Alves <palves@redhat.com>
12358
12359 * breakpoint.c (bp_location): Rename to ...
12360 (bp_locations): ... this. All references updated.
12361 (bp_location_count): Rename to ...
12362 (bp_locations_count): ... this. All references updated.
12363 (bp_location_placed_address_before_address_max): Rename to ...
12364 (bp_locations_placed_address_before_address_max): ... this. All
12365 references updated.
12366 (bp_location_shadow_len_after_address_max): Rename to ...
12367 (bp_locations_shadow_len_after_address_max): ... this. All
12368 references updated.
12369 (bp_location_compare_addrs): Rename to ...
12370 (bp_locations_compare_addrs): ... this. All references updated.
12371 (bp_location_compare):Rename to ...
12372 (bp_locations_compare): ... this. All references updated.
12373 (bp_location_target_extensions_update): Rename to ...
12374 (bp_locations_target_extensions_update): ... this. All references
12375 updated.
12376
be628ab8
SDJ
123772017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12378
12379 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12380 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12381 'sgtty.h'.
12382 * common/gdb_termios.h: New file, with parts of "terminal.h".
12383 * inflow.c: Include "gdb_termios.h".
12384 * ser-unix.c: Include "gdb_termios.h".
12385 * terminal.h: Move terminal-related defines to
12386 "common/gdb_termios.h".
12387
8e9e35b1
TT
123882017-04-12 Tom Tromey <tom@tromey.com>
12389
12390 * probe.c (parse_probes): Update.
12391 * location.h (delete_event_location): Don't declare.
12392 (event_location_deleter::operator()): Update.
12393 * location.c (event_location_deleter::operator()): Rename from
12394 delete_event_location.
12395 * linespec.h (linespec_result) <location>: Change type to
12396 event_location_up.
12397 * linespec.c (canonicalize_linespec, event_location_to_sals)
12398 (decode_objc): Update.
12399 (linespec_result): Don't call delete_event_location.
12400 * breakpoint.c (create_breakpoints_sal)
12401 (bkpt_probe_create_sals_from_location)
12402 (strace_marker_create_sals_from_location): Update.
12403
16e802b9
TT
124042017-04-12 Tom Tromey <tom@tromey.com>
12405
12406 * linespec.h (struct linespec_result): Add constructor and
12407 destructor.
12408 (init_linespec_result, destroy_linespec_result)
12409 (make_cleanup_destroy_linespec_result): Don't declare.
12410 * linespec.c (init_linespec_result): Remove.
12411 (linespec_result::~linespec_result): Rename from
12412 destroy_linespec_result. Update.
12413 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12414 Remove.
12415 * breakpoint.c (create_breakpoint, break_range_command)
12416 (decode_location_default): Update.
12417 * ax-gdb.c (agent_command_1): Update.
12418
d28cd78a
TT
124192017-04-12 Tom Tromey <tom@tromey.com>
12420
12421 * remote.c (remote_download_tracepoint): Update.
12422 * python/py-breakpoint.c (bppy_get_location): Update.
12423 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12424 (gdbscm_breakpoint_location): Update.
12425 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12426 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12427 Change type to event_location_up.
12428 * breakpoint.c (create_overlay_event_breakpoint)
12429 (create_longjmp_master_breakpoint)
12430 (create_std_terminate_master_breakpoint)
12431 (create_exception_master_breakpoint)
12432 (breakpoint_event_location_empty_p, print_breakpoint_location)
12433 (print_one_breakpoint_location, create_thread_event_breakpoint)
12434 (init_breakpoint_sal, create_breakpoint)
12435 (print_recreate_ranged_breakpoint, break_range_command)
12436 (init_ada_exception_breakpoint, say_where): Update.
12437 (base_breakpoint_dtor): Don't call delete_event_location.
12438 (bkpt_print_recreate, tracepoint_print_recreate)
12439 (dprintf_print_recreate, update_static_tracepoint)
12440 (breakpoint_re_set_default): Update.
12441
711799d5
TT
124422017-04-12 Tom Tromey <tom@tromey.com>
12443
12444 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12445 type of "to_do". Update.
12446 (compute_stack_depth): Use std::vector.
12447
52d214d3
TT
124482017-04-12 Tom Tromey <tom@tromey.com>
12449
12450 * printcmd.c (find_instruction_backward): Use std::vector.
12451
4c404b8b
TT
124522017-04-12 Tom Tromey <tom@tromey.com>
12453
12454 * symfile.c (objfilep): Remove typedef.
12455 (reread_symbols): Use a std::vector.
12456
156d9eab
TT
124572017-04-12 Tom Tromey <tom@tromey.com>
12458
12459 * mi/mi-main.c (exec_direction_forward): Remove.
12460 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12461 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12462 scoped_restore.
12463 * guile/guile.c (guile_repl_command, guile_command)
12464 (gdbscm_execute_gdb_command): Use scoped_restore.
12465 * go-exp.y (go_parse): Use scoped_restore.
12466 * d-exp.y (d_parse): Use scoped_restore.
12467 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12468 * c-exp.y (c_parse): Use scoped_restore.
12469
4d89769a
TT
124702017-04-12 Tom Tromey <tom@tromey.com>
12471
12472 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12473 (mi_parse): Update return type.
12474 (mi_parse_free): Remove.
12475 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12476 (mi_parse::~mi_parse): Rename from mi_parse_free.
12477 (mi_parse_cleanup): Remove.
12478 (mi_parse): Return a unique_ptr. Use new.
12479 * mi/mi-main.c (mi_execute_command): Update.
12480
4b217cc7
TT
124812017-04-12 Tom Tromey <tom@tromey.com>
12482
12483 * location.c (explicit_location_lex_one): Return a
12484 unique_xmalloc_ptr.
12485 (string_to_explicit_location): Update. Remove cleanups.
12486
59d3651b
TT
124872017-04-12 Tom Tromey <tom@tromey.com>
12488
12489 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12490 (compare_value_and_voffset): Change type. Update.
12491 (compute_vtable_size): Change type of "offset_vec".
12492 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12493 (gnuv3_get_typeid): Remove extraneous declaration.
12494
b24b0d6c
TT
124952017-04-12 Tom Tromey <tom@tromey.com>
12496
12497 * charset.h (wchar_iterator): Fix comment.
12498
80a3b8c5
TT
124992017-04-12 Tom Tromey <tom@tromey.com>
12500
12501 * charset.c (iconv_wrapper): New class.
12502 (cleanup_iconv): Remove.
12503 (convert_between_encodings): Use it.
12504
c83dd867
TT
125052017-04-12 Tom Tromey <tom@tromey.com>
12506
12507 * symfile.h (increment_reading_symtab): Update type.
12508 * symfile.c (decrement_reading_symtab): Remove.
12509 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12510 * psymtab.c (psymtab_to_symtab): Update.
12511 * dwarf2read.c (dw2_instantiate_symtab): Update.
12512
0e8621a0
TT
125132017-04-12 Tom Tromey <tom@tromey.com>
12514
12515 * jit.c (struct jit_reader): Declare separately. Add constructor
12516 and destructor. Change type of "handle".
12517 (loaded_jit_reader): Define separately.
12518 (jit_reader_load): Update. New "new".
12519 (jit_reader_unload_command): Use "delete".
12520 * gdb-dlfcn.h (struct dlclose_deleter): New.
12521 (gdb_dlhandle_up): New typedef.
12522 (gdb_dlopen, gdb_dlsym): Update types.
12523 (gdb_dlclose): Remove.
12524 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12525 (gdb_dlsym): Change type of "handle".
12526 (make_cleanup_dlclose): Remove.
12527 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12528 * compile/compile-c-support.c (load_libcc): Update.
12529
67d89901
TT
125302017-04-12 Tom Tromey <tom@tromey.com>
12531
12532 * symtab.h (find_pcs_for_symtab_line): Change return type.
12533 * symtab.c (find_pcs_for_symtab_line): Change return type.
12534 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12535 type of "vec". Update.
12536 (ltpy_get_pcs_for_line): Update.
12537 * linespec.c (decode_digits_ordinary): Update.
12538
93921405
TT
125392017-04-12 Tom Tromey <tom@tromey.com>
12540
12541 * tracepoint.c (actions_command): Update.
12542 * python/python.c (python_command, python_interactive_command):
12543 Update.
12544 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12545 * guile/guile.c (guile_command): Update.
12546 * defs.h (read_command_lines, read_command_lines_1): Return
12547 command_line_up.
12548 (command_lines_deleter): New struct.
12549 (command_line_up): New typedef.
12550 * compile/compile.c (compile_code_command)
12551 (compile_print_command): Update.
12552 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12553 command_line_up.
12554 (make_cleanup_free_command_lines): Remove.
12555 * cli/cli-script.c (get_command_line, read_command_lines_1)
12556 (copy_command_lines): Return command_line_up.
12557 (while_command, if_command, read_command_lines, define_command)
12558 (document_command): Update.
12559 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12560 Remove.
12561 * breakpoint.h (breakpoint_set_commands): Change type of
12562 "commands".
12563 * breakpoint.c (breakpoint_set_commands): Change type of
12564 "commands". Update.
12565 (do_map_commands_command, update_dprintf_command_list)
12566 (create_tracepoint_from_upload): Update.
12567
ffc2605c
TT
125682017-04-12 Tom Tromey <tom@tromey.com>
12569
12570 * tracepoint.c (scope_info): Update.
12571 * spu-tdep.c (spu_catch_start): Update.
12572 * python/python.c (gdbpy_decode_line): Update.
12573 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12574 * python/py-breakpoint.c (bppy_init): Update.
12575 * probe.c (parse_probes): Update.
12576 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12577 * location.h (event_location_deleter): New struct.
12578 (event_location_up): New typedef.
12579 (new_linespec_location, new_address_location, new_probe_location)
12580 (new_explicit_location, copy_event_location)
12581 (string_to_event_location, string_to_event_location_basic)
12582 (string_to_explicit_location): Update return type.
12583 (make_cleanup_delete_event_location): Remove.
12584 * location.c (new_linespec_location, new_address_location)
12585 (new_probe_location, new_explicit_location, copy_event_location):
12586 Return event_location_up.
12587 (delete_event_location_cleanup)
12588 (make_cleanup_delete_event_location): Remove.
12589 (string_to_explicit_location, string_to_event_location_basic)
12590 (string_to_event_location): Return event_location_up.
12591 * linespec.c (canonicalize_linespec, event_location_to_sals)
12592 (decode_line_with_current_source)
12593 (decode_line_with_last_displayed, decode_objc): Update.
12594 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12595 * completer.c (location_completer): Update.
12596 * cli/cli-cmds.c (edit_command, list_command): Update.
12597 * breakpoint.c (create_overlay_event_breakpoint)
12598 (create_longjmp_master_breakpoint)
12599 (create_std_terminate_master_breakpoint)
12600 (create_exception_master_breakpoint)
12601 (create_thread_event_breakpoint): Update.
12602 (init_breakpoint_sal): Update. Remove some dead code.
12603 (create_breakpoint_sal): Change type of "location". Update.
12604 (create_breakpoints_sal, create_breakpoint, break_command_1)
12605 (dprintf_command, break_range_command, until_break_command)
12606 (init_ada_exception_breakpoint)
12607 (strace_marker_create_sals_from_location)
12608 (update_static_tracepoint, trace_command, ftrace_command)
12609 (strace_command, create_tracepoint_from_upload): Update.
12610 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12611 * ax-gdb.c (agent_command_1): Update.
12612
8f10c932
PA
126132017-04-12 Pedro Alves <palves@redhat.com>
12614
12615 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12616 * configure.tgt: Handle i[34567]86-*-go32* and
12617 i[34567]86-*-msdosdjgpp*.
12618 * i386-tdep.c (i386_svr4_reg_to_regnum):
12619 Make extern.
12620 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12621 i386-go32-tdep.c.
12622 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12623 * i386-go32-tdep.c: New file.
12624 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12625 declarations.
12626
0a31ccfb
SM
126272017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12628
12629 * aix-thread.c (pd_status2str): Change return type to const char *.
12630
e9bb3fbb
PA
126312017-04-12 Pedro Alves <palves@redhat.com>
12632
12633 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12634 calls to set_gdbarch_gnu_triplet_regexp.
12635
53375380
PA
126362017-04-12 Pedro Alves <palves@redhat.com>
12637
12638 PR gdb/21323
12639 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12640 New enum value.
12641 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12642 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12643 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12644 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12645 * gdbarch.h, gdbarch.c: Regenerate.
12646 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12647 gdbarch_wchar_bit and gdbarch_wchar_signed.
12648 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12649 * arm-tdep.c (arm_gdbarch_init): Likewise.
12650 * avr-tdep.c (avr_gdbarch_init): Likewise.
12651 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12652 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12653 * i386-tdep.c (i386_go32_init_abi): Likewise.
12654 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12655 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12656 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12657 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12658 * sh-tdep.c (sh_gdbarch_init): Likewise.
12659 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12660 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12661 * windows-tdep.c (windows_init_abi): Likewise.
12662 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12663
53e710ac
PA
126642017-04-12 Pedro Alves <palves@redhat.com>
12665
12666 PR c++/21323
12667 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12668 cplus_primitive_type_char32_t>: New enum values.
12669 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12670 and cplus_primitive_type_char32_t.
12671 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12672 32, use the archtecture's built-in type for char16_t and char32_t,
12673 respectively. Otherwise, fallback to init_integer_type as before,
12674 but make the type unsigned, and issue a complaint.
12675 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12676
ab0538b8
AH
126772017-04-12 Alan Hayward <alan.hayward@arm.com>
12678
5e0e0422 12679 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12680 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12681
5430098f
SDJ
126822017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12683
12684 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12685 'const char *'.
12686
7c5ded6a
SDJ
126872017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12688
12689 * common/common-utils.c (free_vector_argv): New function.
12690 * common/common-utils.h: Include <vector>.
12691 (free_vector_argv): New prototype.
12692 * darwin-nat.c (darwin_create_inferior): Rewrite function
12693 prototype in order to constify "exec_file" and accept a
12694 "std::string" for "allargs".
12695 * fork-child.c: Include <vector>.
12696 (breakup_args): Rewrite function, using C++.
12697 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12698 and accept "std::string" for "allargs". Update the code to
12699 calculate "argv" based on "allargs". Update calls to "exec_fun"
12700 and "execvp".
12701 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12702 order to constify "exec_file" and accept a "std::string" for
12703 "allargs".
12704 * go32-nat.c (go32_create_inferior): Likewise.
12705 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12706 * infcmd.c (run_command_1): Constify "exec_file". Use
12707 "std::string" for inferior arguments.
12708 * inferior.h (fork_inferior): Update prototype.
12709 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12710 prototype in order to constify "exec_file" and accept a
12711 "std::string" for "allargs".
12712 * nto-procfs.c (procfs_create_inferior): Likewise.
12713 * procfs.c (procfs_create_inferior): Likewise.
12714 * remote-sim.c (gdbsim_create_inferior): Likewise.
12715 * remote.c (extended_remote_run): Update code to accept
12716 "std::string" as argument.
12717 (extended_remote_create_inferior): Rewrite function prototype in
12718 order to constify "exec_file" and accept a "std::string" for
12719 "allargs".
12720 * rs6000-nat.c (super_create_inferior): Likewise.
12721 (rs6000_create_inferior): Likewise.
12722 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12723 * windows-nat.c (windows_create_inferior): Likewise.
12724
ae0eee42
PA
127252017-04-11 Pedro Alves <palves@redhat.com>
12726
12727 * thread.c: Fix whitespace throughout.
12728
a6acac06
PR
127292017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12730
12731 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12732
64403bd1
AH
127332017-04-11 Alan Hayward <alan.hayward@arm.com>
12734
12735 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12736
a5bef50f
SDJ
127372017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12738
12739 PR gdb/21364
12740 * osdata.c (info_osdata): Check if 'type' is an empty string
12741 instead of NULL.
12742
9295a5a9
PA
127432017-04-10 Pedro Alves <palves@redhat.com>
12744
12745 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12746 (ptid_to_global_thread_id, in_thread_list)
12747 (do_captured_list_thread_ids, set_resumed, set_running)
12748 (set_executing, set_stop_requested, finish_thread_state)
12749 (validate_registers_access, can_access_registers_ptid)
12750 (print_thread_info_1, switch_to_thread)
12751 (do_restore_current_thread_cleanup)
12752 (make_cleanup_restore_current_thread, thread_command)
12753 (thread_name_command): Use operator== instead of ptid_equal.
12754
996812e3
PA
127552017-04-10 Pedro Alves <palves@redhat.com>
12756
12757 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12758 (current_thread_cleanup_chain): Delete.
12759 (restore_current_thread_cleanup_dtor)
12760 (make_cleanup_restore_current_thread): Remove references to
12761 current_thread_cleanup_chain.
12762
845b344f
AH
127632017-04-10 Alan Hayward <alan.hayward@arm.com>
12764
12765 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12766 REG_UNKNOWN.
12767
803bdfe4
YQ
127682017-04-10 Yao Qi <yao.qi@linaro.org>
12769
12770 PR gdb/19942
12771 * gdbthread.h (thread_info::deletable): New method.
12772 (thread_info::incref): New method.
12773 (thread_info::decref): New method.
12774 (thread_info::refcount): Move it to private.
12775 * infrun.c (save_stop_context): Call inc_refcount.
12776 (release_stop_context_cleanup): Likewise.
12777 * thread.c (set_thread_exited): New function.
12778 (init_thread_list): Delete "tp" only it is deletable, otherwise
12779 call set_thread_exited.
12780 (delete_thread_1): Call set_thread_exited.
12781 (current_thread_cleanup) <inferior_pid>: Remove.
12782 <thread>: New field.
12783 (restore_current_thread_ptid_changed): Removed.
12784 (do_restore_current_thread_cleanup): Adjust.
12785 (restore_current_thread_cleanup_dtor): Don't call
12786 find_thread_ptid.
12787 (set_thread_refcount): Use dec_refcount.
12788 (make_cleanup_restore_current_thread): Adjust.
12789 (thread_apply_all_command): Call inc_refcount.
12790 (_initialize_thread): Don't call
12791 observer_attach_thread_ptid_changed.
12792
8c25b497
YQ
127932017-04-10 Yao Qi <yao.qi@linaro.org>
12794
12795 * thread.c (delete_thread_1): Hoist code on marking thread as
12796 exited.
12797
8473b447
SM
127982017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12799
12800 * windows-nat.c (windows_detach): Initialize ptid with
12801 minus_one_ptid.
12802
6670ec13
SM
128032017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12804
12805 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12806
ba2f91bb
AH
128072017-04-07 Alan Hayward <alan.hayward@arm.com>
12808
12809 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12810 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12811 (bfin_pseudo_register_write): Likewise
12812
436252de
SM
128132017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12814
12815 * common/ptid.h (struct ptid): Change to...
12816 (class ptid_t): ... this.
12817 <ptid_t>: New constructors.
12818 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12819 matches>: New methods.
12820 <make_null, make_minus_one>: New static methods.
12821 <pid>: Rename to...
12822 <m_pid>: ...this.
12823 <lwp>: Rename to...
12824 <m_lwp>: ...this.
12825 <tid>: Rename to...
12826 <m_tid>: ...this.
12827 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12828 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12829 as references, move comment to class ptid_t.
12830 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12831 ptid_t static methods.
12832 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12833 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12834 Take ptid arguments as references, implement using ptid_t methods.
12835 * unittests/ptid-selftests.c: New file.
12836 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12837 unittests/ptid-selftests.c.
12838 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12839
0dedf377
TP
128402017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12841
12842 * python/python.c (python_run_simple_file): Cast mode literal to
12843 non-const char pointer as expected by PyFile_FromString.
12844
4e9868d4
SM
128452017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12846
12847 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12848 minus_one_ptid and null_ptid.
12849
9bf2a700
PA
128502017-04-05 Pedro Alves <palves@redhat.com>
12851
12852 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12853 * configure: Regenerate.
12854
a121b7c1
PA
128552017-04-05 Pedro Alves <palves@redhat.com>
12856
12857 * ada-exp.y (yyerror): Constify.
12858 * ada-lang.c (bound_name, get_selections)
12859 (ada_variant_discrim_type)
12860 (ada_variant_discrim_name, ada_value_struct_elt)
12861 (ada_lookup_struct_elt_type, is_unchecked_variant)
12862 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12863 (catch_ada_exception_command_split)
12864 (catch_ada_assert_command_split, catch_assert_command)
12865 (ada_op_name): Constify.
12866 * ada-lang.h (ada_yyerror, get_selections)
12867 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12868 * arc-tdep.c (arc_print_frame_cache): Constify.
12869 * arm-tdep.c (arm_skip_stub): Constify.
12870 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12871 (gen_aggregate_elt_ref): Constify.
12872 * bcache.c (print_bcache_statistics): Constify.
12873 * bcache.h (print_bcache_statistics): Constify.
12874 * break-catch-throw.c (catch_exception_command_1):
12875 * breakpoint.c (struct ep_type_description::description):
12876 Constify.
12877 (add_solib_catchpoint): Constify.
12878 (catch_fork_command_1): Add cast.
12879 (add_catch_command): Constify.
12880 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12881 Constify.
12882 * bsd-uthread.c (bsd_uthread_state): Constify.
12883 * buildsym.c (patch_subfile_names): Constify.
12884 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12885 Constify.
12886 * c-exp.y (yyerror): Constify.
12887 (token::oper): Constify.
12888 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12889 * c-varobj.c (cplus_describe_child): Constify.
12890 * charset.c (find_charset_names): Add cast.
12891 (find_charset_names): Constify array and add const_cast.
12892 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12893 (edit_command): Constify.
12894 * cli/cli-decode.c (lookup_cmd): Constify.
12895 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12896 Constify.
12897 (struct dump_context): Constify.
12898 (add_dump_command, restore_command): Constify.
12899 * cli/cli-script.c (get_command_line): Constify.
12900 * cli/cli-script.h (get_command_line): Constify.
12901 * cli/cli-utils.c (check_for_argument): Constify.
12902 * cli/cli-utils.h (check_for_argument): Constify.
12903 * coff-pe-read.c (struct read_pe_section_data): Constify.
12904 * command.h (lookup_cmd): Constify.
12905 * common/print-utils.c (decimal2str): Constify.
12906 * completer.c (gdb_print_filename): Constify.
12907 * corefile.c (set_gnutarget): Constify.
12908 * cp-name-parser.y (yyerror): Constify.
12909 * cp-valprint.c (cp_print_class_member): Constify.
12910 * cris-tdep.c (cris_register_name, crisv32_register_name):
12911 Constify.
12912 * d-exp.y (yyerror): Constify.
12913 (struct token::oper): Constify.
12914 * d-lang.h (d_yyerror): Constify.
12915 * dbxread.c (struct header_file_location::name): Constify.
12916 (add_old_header_file, add_new_header_file, last_function_name)
12917 (dbx_next_symbol_text, add_bincl_to_list)
12918 (find_corresponding_bincl_psymtab, set_namestring)
12919 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12920 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12921 * defs.h (command_line_input, print_address_symbolic)
12922 (deprecated_readline_begin_hook): Constify.
12923 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12924 Constify.
12925 * event-top.c (handle_line_of_input): Constify and add cast.
12926 * exceptions.c (catch_errors): Constify.
12927 * exceptions.h (catch_errors): Constify.
12928 * expprint.c (print_subexp_standard, op_string, op_name)
12929 (op_name_standard, dump_raw_expression, dump_raw_expression):
12930 * expression.h (op_name, op_string, dump_raw_expression):
12931 Constify.
12932 * f-exp.y (yyerror): Constify.
12933 (struct token::oper): Constify.
12934 (struct f77_boolean_val::name): Constify.
12935 * f-lang.c (f_word_break_characters): Constify.
12936 * f-lang.h (f_yyerror): Constify.
12937 * fork-child.c (fork_inferior): Add cast.
12938 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12939 (new_variant): Constify.
12940 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12941 * gdbarch.c: Regenerate.
12942 * gdbcore.h (set_gnutarget): Constify.
12943 * go-exp.y (yyerror): Constify.
12944 (token::oper): Constify.
12945 * go-lang.h (go_yyerror): Constify.
12946 * go32-nat.c (go32_sysinfo): Constify.
12947 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12948 * guile/scm-cmd.c (cmdscm_function): Constify.
12949 * guile/scm-param.c (pascm_param_value): Constify.
12950 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12951 (h8300sx_register_name): Constify.
12952 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12953 Constify.
12954 * ia64-tdep.c (ia64_register_names): Constify.
12955 * infcmd.c (construct_inferior_arguments): Constify.
12956 (path_command, attach_post_wait): Constify.
12957 * language.c (show_range_command, show_case_command)
12958 (unk_lang_error): Constify.
12959 * language.h (language_defn::la_error)
12960 (language_defn::la_name_of_this): Constify.
12961 * linespec.c (decode_line_2): Constify.
12962 * linux-thread-db.c (thread_db_err_str): Constify.
12963 * lm32-tdep.c (lm32_register_name): Constify.
12964 * m2-exp.y (yyerror): Constify.
12965 * m2-lang.h (m2_yyerror): Constify.
12966 * m32r-tdep.c (m32r_register_names): Constify and make static.
12967 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12968 * m88k-tdep.c (m88k_register_name): Constify.
12969 * macroexp.c (appendmem): Constify.
12970 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12971 (upgrade_type, parse_external, parse_partial_symbols)
12972 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12973 (new_symbol): Constify.
12974 * memattr.c (mem_info_command): Constify.
12975 * mep-tdep.c (register_name_from_keyword): Constify.
12976 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12977 Constify.
12978 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12979 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12980 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12981 cast.
12982 (mi_execute_async_cli_command): Constify.
12983 * mips-tdep.c (mips_register_name): Constify.
12984 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12985 (am33_register_name, am33_2_register_name)
12986 * moxie-tdep.c (moxie_register_names): Constify.
12987 * nat/linux-osdata.c (osdata_type): Constify fields.
12988 * nto-tdep.c (nto_parse_redirection): Constify.
12989 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12990 (lookup_child_selector): Constify.
12991 (objc_methcall::name): Constify.
12992 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12993 (lookup_struct_typedef): Constify.
12994 * objfiles.c (pc_in_section): Constify.
12995 * objfiles.h (pc_in_section): Constify.
12996 * p-exp.y (struct token::oper): Constify.
12997 (yyerror): Constify.
12998 * p-lang.h (pascal_yyerror): Constify.
12999 * parser-defs.h (op_name_standard): Constify.
13000 (op_print::string): Constify.
13001 (exp_descriptor::op_name): Constify.
13002 * printcmd.c (print_address_symbolic): Constify.
13003 * psymtab.c (print_partial_symbols): Constify.
13004 * python/py-breakpoint.c (stop_func): Constify.
13005 (bppy_get_expression): Constify.
13006 * python/py-cmd.c (cmdpy_completer::name): Constify.
13007 (cmdpy_function): Constify.
13008 * python/py-event.c (evpy_add_attribute)
13009 (gdbpy_initialize_event_generic): Constify.
13010 * python/py-event.h (evpy_add_attribute)
13011 (gdbpy_initialize_event_generic): Constify.
13012 * python/py-evts.c (add_new_registry): Constify.
13013 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13014 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13015 * python/py-inferior.c (get_buffer): Add cast.
13016 * python/py-param.c (parm_constant::name): Constify.
13017 * python/py-unwind.c (fprint_frame_id): Constify.
13018 * python/python.c (gdbpy_parameter_value): Constify.
13019 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13020 * remote.c (memory_packet_config::name): Constify.
13021 (show_packet_config_cmd, remote_write_bytes)
13022 (remote_buffer_add_string):
13023 * reverse.c (exec_reverse_once): Constify.
13024 * rs6000-tdep.c (variant::name, variant::description): Constify.
13025 * rust-exp.y (rustyyerror): Constify.
13026 * rust-lang.c (rust_op_name): Constify.
13027 * rust-lang.h (rustyyerror): Constify.
13028 * serial.h (serial_ops::name): Constify.
13029 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13030 (sh_sh3e_register_name, sh_sh2e_register_name)
13031 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13032 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13033 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13034 (sh_sh4al_dsp_register_name): Constify.
13035 * sh64-tdep.c (sh64_register_name): Constify.
13036 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13037 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13038 * stabsread.c (patch_block_stabs, read_type_number)
13039 (ref_map::stabs, ref_add, process_reference)
13040 (symbol_reference_defined, define_symbol, define_symbol)
13041 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13042 (read_one_struct_field, read_struct_fields, read_baseclasses)
13043 (read_tilde_fields, read_struct_type, read_array_type)
13044 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13045 (read_huge_number, read_range_type, read_args, common_block_start)
13046 (find_name_end): Constify.
13047 * stabsread.h (common_block_start, define_symbol)
13048 (process_one_symbol, symbol_reference_defined, ref_add):
13049 * symfile.c (get_section_index, add_symbol_file_command):
13050 * symfile.h (get_section_index): Constify.
13051 * target-descriptions.c (tdesc_type::name): Constify.
13052 (tdesc_free_type): Add cast.
13053 * target.c (find_default_run_target):
13054 (add_deprecated_target_alias, find_default_run_target)
13055 (target_announce_detach): Constify.
13056 (do_option): Constify.
13057 * target.h (add_deprecated_target_alias): Constify.
13058 * thread.c (print_thread_info_1): Constify.
13059 * top.c (deprecated_readline_begin_hook, command_line_input):
13060 Constify.
13061 (init_main): Add casts.
13062 * top.h (handle_line_of_input): Constify.
13063 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13064 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13065 (tfind_command): Rename to ...
13066 (tfind_command_1): ... this and constify.
13067 (tfind_command): New function.
13068 (tfind_end_command, tfind_start_command): Adjust.
13069 (encode_source_string): Constify.
13070 * tracepoint.h (encode_source_string): Constify.
13071 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13072 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13073 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13074 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13075 * tui/tui-win.c (parse_scrolling_args): Constify.
13076 * tui/tui-windata.c (tui_erase_data_content): Constify.
13077 * tui/tui-windata.h (tui_erase_data_content): Constify.
13078 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13079 * tui/tui.c (tui_enable): Add cast.
13080 * utils.c (defaulted_query): Constify.
13081 (init_page_info): Add cast.
13082 (puts_debug, subset_compare): Constify.
13083 * utils.h (subset_compare): Constify.
13084 * varobj.c (varobj_format_string): Constify.
13085 * varobj.h (varobj_format_string): Constify.
13086 * vax-tdep.c (vax_register_name): Constify.
13087 * windows-nat.c (windows_detach): Constify.
13088 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13089 * xml-support.c (gdb_xml_end_element): Constify.
13090 * xml-tdesc.c (tdesc_start_reg): Constify.
13091 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13092 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13093 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13094
995816ba
PA
130952017-04-05 Pedro Alves <palves@redhat.com>
13096
13097 * proc-api.c (struct trans): Constify.
13098 (procfs_note): Constify.
13099 * proc-events.c (struct trans, syscall_table):
13100 * proc-flags.c (struct trans): Constify.
13101 * proc-utils.h (procfs_note): Constify.
13102 * proc-why.c (struct trans): Constify.
13103 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13104 (procfs_detach): Constify.
13105 * sol-thread.c (struct string_map): Constify.
13106 (td_err_string, td_state_string): Constify.
13107
3e83a920
PA
131082017-04-05 Pedro Alves <palves@redhat.com>
13109
13110 * proc-api.c (procfs_filename): Don't initialize
13111 procfs_filename.
13112 (prepare_to_trace): Assume procfs_filename is non-NULL.
13113 (_initialize_proc_api): Give procfs_filename a default value here.
13114
63160a43
PA
131152017-04-05 Pedro Alves <palves@redhat.com>
13116
13117 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13118 'cond_string' parameter.
13119 (extract_exception_regexp): Constify 'string' parameter.
13120 (catch_exception_command_1): Constify.
13121 * breakpoint.c (init_catchpoint)
13122 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13123 parameter.
13124 (ep_parse_optional_if_clause, catch_fork_command_1)
13125 (catch_exec_command_1): Constify.
13126 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13127 parameter.
13128 (ep_parse_optional_if_clause): Constify.
13129 * cli/cli-utils.c (remove_trailing_whitespace)
13130 (check_for_argument): Constify.
13131 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13132 non-const overload.
13133 (check_for_argument): Likewise.
13134
9b2eba3d
PA
131352017-04-05 Pedro Alves <palves@redhat.com>
13136
13137 * event-top.c (command_line_handler): Add cast to execute_command
13138 call.
13139 * record-btrace.c (cmd_record_btrace_bts_start)
13140 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13141 (cmd_record_btrace_start): Add cast to execute_command call.
13142 * record-full.c (record_full_goto_insn):
13143 * record.c (record_start, record_stop): Add cast to
13144 execute_command_to_string calls.
13145 (cmd_record_start): Add cast to execute_command calls.
13146
2adadf51
PA
131472017-04-05 Pedro Alves <palves@redhat.com>
13148
13149 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13150 static inline function.
13151 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13152 array and use gdb_PyArg_ParseTupleAndKeywords.
13153 * python/py-cmd.c (cmdpy_init): Likewise.
13154 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13155 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13156 (infpy_search_memory): Likewise.
13157 * python/py-objfile.c (objfpy_add_separate_debug_file)
13158 (gdbpy_lookup_objfile): Likewise.
13159 * python/py-symbol.c (gdbpy_lookup_symbol)
13160 (gdbpy_lookup_global_symbol): Likewise.
13161 * python/py-type.c (gdbpy_lookup_type): Likewise.
13162 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13163 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13164 Likewise.
13165
0d1f4ceb
PA
131662017-04-05 Pedro Alves <palves@redhat.com>
13167
13168 * python/python-internal.h (gdb_PyGetSetDef): New type.
13169 * python/py-block.c (block_object_getset)
13170 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13171 * python/py-event.c (event_object_getset)
13172 (finish_breakpoint_object_getset): Likewise.
13173 * python/py-inferior.c (inferior_object_getset): Likewise.
13174 * python/py-infthread.c (thread_object_getset): Likewise.
13175 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13176 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13177 * python/py-objfile.c (objfile_getset): Likewise.
13178 * python/py-progspace.c (pspace_getset): Likewise.
13179 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13180 Likewise.
13181 * python/py-record.c (recpy_record_getset): Likewise.
13182 * python/py-symbol.c (symbol_object_getset): Likewise.
13183 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13184 Likewise.
13185 * python/py-type.c (type_object_getset, field_object_getset):
13186 Likewise.
13187 * python/py-value.c (value_object_getset): Likewise.
13188
4d759979
PA
131892017-04-05 Pedro Alves <palves@redhat.com>
13190
13191 * python/python-internal.h (gdb_PyObject_CallMethod)
13192 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13193 New functions.
13194 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13195 (PySys_GetObject, PySys_SetPath): New macros.
13196
fdf9e36f
PA
131972017-04-05 Pedro Alves <palves@redhat.com>
13198
13199 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13200 info_osdata_command.
13201 * osdata.c (info_osdata_command): Rename to ...
13202 (info_osdata): ... this. Constify 'type' parameter, and remove
13203 the 'from_tty' parameter. Accept NULL TYPE.
13204 (info_osdata_command): New function.
13205 * osdata.h (info_osdata_command): Remove declaration.
13206 (info_osdata): New declaration.
13207
9f33b8b7
PA
132082017-04-05 Pedro Alves <palves@redhat.com>
13209
13210 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13211 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13212 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13213 parameter.
13214 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13215 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13216 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13217 parameter.
13218 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13219 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13220 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13221 (mi_cmd_file_list_exec_source_files)
13222 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13223 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13224 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13225 parameter.
13226 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13227 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13228 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13229 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13230 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13231 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13232 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13233 'command' parameter.
13234 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13235 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13236 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13237 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13238 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13239 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13240 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13241 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13242 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13243 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13244 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13245 parameter.
13246 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13247 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13248 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13249 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13250 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13251 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13252 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13253 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13254 (mi_cmd_data_list_changed_registers)
13255 (mi_cmd_data_write_register_values)
13256 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13257 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13258 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13259 (mi_cmd_list_features, mi_cmd_list_target_features)
13260 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13261 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13262 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13263 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13264 (mi_cmd_trace_frame_collected): Constify 'command'
13265 parameter.
13266 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13267 'command' parameter.
13268
67cb5b2d
PA
132692017-04-05 Pedro Alves <palves@redhat.com>
13270
13271 * ada-lang.c (ada_completer_word_break_characters): Now a const
13272 array.
13273 (ada_get_gdb_completer_word_break_characters): Constify.
13274 * completer.c (gdb_completer_command_word_break_characters)
13275 (gdb_completer_file_name_break_characters)
13276 (gdb_completer_quote_characters): Now const arrays.
13277 (get_gdb_completer_quote_characters): Constify.
13278 (set_rl_completer_word_break_characters): New function.
13279 (set_gdb_completion_word_break_characters)
13280 (complete_line_internal): Use it.
13281 * completer.h (get_gdb_completer_quote_characters): Constify.
13282 (set_rl_completer_word_break_characters): Declare.
13283 * f-lang.c (f_word_break_characters): Constify.
13284 * language.c (default_word_break_characters): Constify.
13285 * language.h (language_defn::la_word_break_characters): Constify.
13286 (default_word_break_characters): Constify.
13287 * top.c (init_main): Use set_rl_completer_word_break_characters.
13288
7a114964
PA
132892017-04-05 Pedro Alves <palves@redhat.com>
13290
13291 * aix-thread.c (aix_thread_pid_to_str)
13292 (aix_thread_extra_thread_info): Constify.
13293 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13294 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13295 (bsd_uthread_pid_to_str): Constify.
13296 * corelow.c (core_pid_to_str): Constify.
13297 * darwin-nat.c (darwin_pid_to_str): Constify.
13298 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13299 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13300 Constify.
13301 * gnu-nat.c (gnu_pid_to_str): Constify.
13302 * go32-nat.c (go32_pid_to_str): Constify.
13303 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13304 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13305 * inferior.c (inferior_pid_to_str): Constify.
13306 * linux-nat.c (linux_nat_pid_to_str): Constify.
13307 * linux-tdep.c (linux_core_pid_to_str): Constify.
13308 * linux-thread-db.c (thread_db_pid_to_str)
13309 (thread_db_extra_thread_info): Constify.
13310 * nto-tdep.c (nto_extra_thread_info): Constify.
13311 * nto-tdep.h (nto_extra_thread_info): Constify.
13312 * obsd-nat.c (obsd_pid_to_str): Constify.
13313 * procfs.c (procfs_pid_to_str): Constify.
13314 * ravenscar-thread.c (ravenscar_extra_thread_info)
13315 (ravenscar_pid_to_str): Constify.
13316 * remote-sim.c (gdbsim_pid_to_str): Constify.
13317 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13318 Constify.
13319 * sol-thread.c (solaris_pid_to_str): Constify.
13320 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13321 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13322 * target.c (default_pid_to_str, target_pid_to_str)
13323 (normal_pid_to_str, default_pid_to_str): Constify.
13324 * target.h (target_ops::to_pid_to_str)
13325 (target_ops::to_extra_thread_info): Constify.
13326 (target_pid_to_str, normal_pid_to_str): Constify.
13327 * windows-nat.c (windows_pid_to_str): Constify.
13328 * gdbarch.sh (core_pid_to_str): Constify.
13329 * target-delegates.c: Regenerate.
13330 * gdbarch.h, gdbarch.c: Regenerate.
13331
69bbf465
PA
133322017-04-05 Pedro Alves <palves@redhat.com>
13333
13334 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13335 the memory of the temporary warning_pre_print override.
13336 * utils.c (warning_pre_print): Constify.
13337 * utils.h (warning_pre_print): Constify.
13338
be47f9e8
PA
133392017-04-05 Pedro Alves <palves@redhat.com>
13340
13341 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13342 (shell_command): New function.
13343 (make_command): Use std::string.
13344 (init_cli_cmds): Register shell_command instead of shell_escape.
13345
bde6261a
PA
133462017-04-05 Pedro Alves <palves@redhat.com>
13347
13348 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13349 * tracepoint.c (default_collect): Don't initialize.
13350
b38ef47f
PA
133512017-04-05 Pedro Alves <palves@redhat.com>
13352
13353 * macroexp.c (macro_buffer::shared): Now a bool.
13354 (init_buffer): Update.
13355 (init_shared_buffer): Constify 'addr' parameter.
13356 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13357 casts.
13358
f995bbe8
PA
133592017-04-05 Pedro Alves <palves@redhat.com>
13360
13361 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13362 * disasm.c (set_disassembler_options): Constify local.
13363 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13364
4a596fe2
SDJ
133652017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13366
13367 PR gdb/21352
13368 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13369 option.
13370
2cad08ea
YQ
133712017-04-05 Yao Qi <yao.qi@linaro.org>
13372
13373 * frame.c (frame_unwind_register_unsigned): Call
13374 frame_unwind_register_value.
13375
55a98976
YQ
133762017-04-05 Yao Qi <yao.qi@linaro.org>
13377
13378 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13379 Use gdb_test_multiple, and don't match anchor.
13380
4ac40124
PA
133812017-04-05 Pedro Alves <palves@redhat.com>
13382
13383 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13384 (Write After Approval): Remove Simon Marchi.
13385
c053b654
PA
133862017-04-05 Pedro Alves <palves@redhat.com>
13387
13388 * common/gdb_optional.h (optional::optional): Make constexpr and
13389 initialize m_dummy.
13390
4c7bf4f9
JB
133912017-04-04 John Baldwin <jhb@FreeBSD.org>
13392
13393 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13394 (amd64fbsd_jmp_buf_reg_offset): Remove.
13395 (amd64fbsd_supply_uthread): Remove function.
13396 (amd64fbsd_collect_uthread): Remove function.
13397 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13398 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13399 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13400 (fbsd-nat.c): Update comment.
13401 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13402 (i386fbsd_jmp_buf_reg_offset): Remove.
13403 (i386fbsd_supply_uthread): Remove function.
13404 (i386fbsd_collect_uthread): Remove function.
13405 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13406
1e1a8bef
JB
134072017-04-04 John Baldwin <jhb@FreeBSD.org>
13408
13409 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13410 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13411 * NEWS: Mention that support for FreeBSD/alpha was removed.
13412 * alpha-fbsd-tdep.c: Delete file.
13413 * config/alpha/fbsd.mh: Delete file.
13414 * configure.host: Delete alpha*-*-freebsd* and
13415 alpha*-*-kfreebsd*-gnu.
13416 * configure.tgt: Delete alpha*-*-freebsd* and
13417 alpha*-*-kfreebsd*-gnu.
13418
49907934
JB
134192017-04-04 John Baldwin <jhb@FreeBSD.org>
13420
13421 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13422 amd64bsd_store_inferior_registers): Use ptid from regcache.
13423
6f77053d
PA
134242017-04-04 Pedro Alves <palves@redhat.com>
13425
13426 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13427 data fields, make them private and add "m_" prefixes.
13428 (lnp_state_machine::lnp_state_machine): New ctor.
13429 (record_line, check_line_address, handle_set_discriminator)
13430 (handle_set_address, handle_advance_pc, handle_special_opcode)
13431 (handle_advance_line, handle_set_file, handle_negate_stmt)
13432 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13433 (end_sequence, advance_line): New methods.
13434 (m_gdbarch, m_record_lines_p): New fields.
13435 (lnp_reader_state): Delete.
13436 (dwarf_record_line): Rename to ...
13437 (lnp_state_machine::record_line): ... adjust.
13438 (init_lnp_state_machine): Delete.
13439 (lnp_state_machine::lnp_state_machine): New.
13440 (check_line_address): Rename to ...
13441 (lnp_state_machine::check_line_address): This.
13442 (dwarf_decode_lines_1): Remove reference to "reader_state".
13443 Adjust lnp_state_machine having a non-default ctor. Use bool.
13444 State machine internal state manipulation moved to
13445 lnp_state_machine methods.
13446
9c541725
PA
134472017-04-04 Pedro Alves <palves@redhat.com>
13448
13449 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13450 unittests/offset-type-selftests.c.
13451 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13452 * common/offset-type.h: New file.
13453 * common/preprocessor.h: New file.
13454 * common/traits.h: New file.
13455 * common/valid-expr.h: New file.
13456 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13457 sect_offset and cu_offset strong typedefs throughout.
13458 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13459 typedefs throughout.
13460 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13461 sect_offset and cu_offset strong typedefs throughout.
13462 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13463 typedefs throughout.
13464 * gdbtypes.h: Include "common/offset-type.h".
13465 (cu_offset): Now an offset type (strong typedef) instead of a
13466 struct.
13467 (sect_offset): Likewise.
13468 (union call_site_parameter_u): Rename "param_offset" field to
13469 "param_cu_off".
13470 * unittests/offset-type-selftests.c: New file.
13471
ecfb656c
PA
134722017-04-04 Pedro Alves <palves@redhat.com>
13473
13474 * common/underlying.h: New file.
13475 * dwarf2read.c: Include "common/gdb_optional.h" and
13476 "common/underlying.h".
13477 (dir_index, file_name_index): New types.
13478 (file_entry): Use them.
13479 (file_entry::include): Use to_underlying.
13480 (line_header::add_file_name): Use dir_index.
13481 (read_formatted_entries): Use gdb::optional. Read form before
13482 writting to file_entry.
13483 (dwarf_decode_line_header): Use dir_index.
13484 (lnp_state_machine::current_file): Use to_underlying.
13485 (lnp_state_machine::file): Change type to file_name_index.
13486 (dwarf_record_line): Use to_underlying.
13487 (init_lnp_state_machine): Use file_name_index.
13488 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13489
d194f1fe
PA
134902017-04-04 Pedro Alves <palves@redhat.com>
13491
13492 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13493 operator bool, has_value and get methods.
13494
fff8551c
PA
134952017-04-04 Pedro Alves <palves@redhat.com>
13496
13497 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13498 fields.
13499 (line_header): Initialize all data fields. Change type of
13500 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13501 Change type of include_dirs to std::vector<const char *>. Remove
13502 num_include_dirs, include_dirs_size. Change type of file_names to
13503 std::vector<file_entry>. Remove num_file_names, file_names_size.
13504 (line_header::line_header): New.
13505 (line_header::add_include_dir, line_header::add_file_name): New
13506 methods.
13507 (line_header::include_dir_at): Remove NULL check.
13508 (line_header::file_name_at): Add const overload.
13509 (line_header_up): New unique_ptr typedef.
13510 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13511 std::vector. Remove free_line_header call.
13512 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13513 free_line_header call.
13514 (free_cu_line_header): Delete.
13515 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13516 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13517 Adjust to use std::vector.
13518 (free_line_header): Delete.
13519 (free_line_header_voidp): Use delete.
13520 (add_include_dir): Replace with ...
13521 (line_header::add_include_dir): ... this method. Use std::vector.
13522 (add_file_name): Replace with ...
13523 (line_header::add_file_name): ... this method. Use std::vector.
13524 (add_include_dir_stub): Delete.
13525 (read_formatted_entries): Remove memset.
13526 (dwarf_decode_line_header): Return a line_header_up instead of a
13527 raw pointer. Remove cleanup handling. Pass lambdas to
13528 read_formatted_entries. Adjust to use line_header methods.
13529 (dwarf_decode_lines_1): Adjust to use line_header methods.
13530 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13531 use std::vector.
13532
d62a8ae2
SM
135332017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13534
13535 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13536 instead of struct ptid.
13537
db3a1dc7
AH
135382017-05-04 Alan Hayward <alan.hayward@arm.com>
13539
13540 * frame.c (get_frame_register_bytes): Unwind using value.
13541 (put_frame_register_bytes): Likewise.
13542
b1b45502
IB
135432017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13544
13545 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13546 aggregate-like.
13547
ec13808e
JK
135482017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13549
13550 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13551
12316564
YQ
135522017-03-29 Yao Qi <yao.qi@linaro.org>
13553
13554 * gdbthread.h (struct thread_info): Declare constructor and
13555 destructor. Add some in-class member initializers.
13556 * thread.c (free_thread): Remove.
13557 (init_thread_list): Call delete instead of free_thread.
13558 (new_thread): Call thread_info constructor.
13559 (thread_info::thread_info): New function.
13560 (thread_info::~thread_info): New function.
13561 (delete_thread_1): Call delete instead of free_thread.
13562 (make_cleanup_restore_current_thread): Move tp and frame to
13563 inner block.
13564
fe5f7374
AK
135652017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13566
13567 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13568 (arc_skip_prologue): Likewise.
13569 (arc_make_frame_cache): Likewise.
13570 (arc_pv_get_operand): New function.
13571 (arc_is_in_prologue): Likewise.
13572 (arc_analyze_prologue): Likewise.
13573 (arc_print_frame_cache): Likewise.
13574 (MAX_PROLOGUE_LENGTH): New constant.
13575
eea78757
AK
135762017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13577
13578 * configure.tgt: Add arc-insn.o.
13579 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13580 (dump_arc_instruction_command): New function.
13581 (arc_fprintf_disasm): Likewise.
13582 (arc_disassemble_info): Likewise.
13583 (arc_insn_get_operand_value): Likewise.
13584 (arc_insn_get_operand_value_signed): Likewise.
13585 (arc_insn_get_memory_base_reg): Likewise.
13586 (arc_insn_get_memory_offset): Likewise.
13587 (arc_insn_get_branch_target): Likewise.
13588 (arc_insn_dump): Likewise.
13589 (arc_insn_get_linear_next_pc): Likewise.
13590 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13591 (arc_disassemble_info): Likewise.
13592 (arc_insn_get_branch_target): Likewise.
13593 (arc_insn_get_linear_next_pc): Likewise.
13594 * NEWS: Mention new "maint print arc arc-instruction".
13595
3be78afd
AK
135962017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13597
13598 * arc-tdep (maintenance_print_arc_list): New variable.
13599 (maintenance_print_arc_command): New function.
13600
296ec4fa
AK
136012017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13602
13603 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13604 Add "limm" and "reserved".
13605 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13606 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13607 * arc-tdep.h (arc_regnum): Likewise.
13608
f74f865e
MF
136092017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13610
13611 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13612 for THREADPTR register.
13613 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13614 register.
13615 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13616 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13617 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13618
0d0bf81a
MF
136192017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13620
13621 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13622 registers above gdbarch_num_regs (gdbarch) as privileged in
13623 call0 ABI.
13624
0ce4291e
MF
136252017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13626
13627 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13628 for a single specified register or for all registers in
13629 a0_base..a0_base + C0_NREGS range.
13630 (supply_gregset_reg): Call regcache_raw_supply for a single
13631 specified register or for all registers in a0_base..a0_base +
13632 C0_NREGS range.
13633
c56054f9
MF
136342017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13635
13636 * arch/xtensa.h (C0_NREGS): Add definition.
13637 * xtensa-tdep.c (C0_NREGS): Remove definition.
13638
a4398628
MF
136392017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13640
13641 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13642 Drop xtensa_default_isa initialization.
13643 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13644
8c43009f
PA
136452017-03-27 Pedro Alves <palves@redhat.com>
13646
13647 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13648 (file_entry::include_dir): New method.
13649 (line_header::include_dir_at, line_header::file_name_at): New
13650 methods.
13651 (setup_type_unit_groups, setup_type_unit_groups)
13652 (psymtab_include_file_name): Simplify using the new methods.
13653 (lnp_state_machine) <the_line_header>: New field.
13654 <file>: Add comment.
13655 (lnp_state_machine::current_file): New method.
13656 (dwarf_record_line): Simplify using the new methods.
13657 (init_lnp_state_machine): Initialize the "the_line_header" field.
13658 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13659 Simplify using the new methods.
13660
a7e80b9e
PA
136612017-03-27 Pedro Alves <palves@redhat.com>
13662
13663 * cp-name-parser.y (make_empty): Delete.
13664 (demangler_special, nested_name, ptr_operator, array_indicator)
13665 (direct_declarator, declarator_1): Use fill_comp instead of
13666 make_empty.
13667
21047726
PA
136682017-03-27 Pedro Alves <palves@redhat.com>
13669
13670 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13671 to ATTRIBUTE_PRINTF.
13672 * solib-target.c (library_list_start_list): Print "string" not
13673 "version".
13674 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13675 gdb_xml_error call.
13676
d721ba37
PA
136772017-03-27 Pedro Alves <palves@redhat.com>
13678
13679 * dwarf2read.c (struct file_and_directory): New.
13680 (dwarf2_get_dwz_file): Adjust to use std::string.
13681 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13682 (find_file_and_directory): Adjust to return a file_and_directory
13683 object.
13684 (read_file_scope): Adjust to use file_and_directory. Remove
13685 make_cleanup/do_cleanups calls.
13686 (open_and_init_dwp_file): Adjust to use std::string. Remove
13687 make_cleanup/do_cleanups calls.
13688 * python/python.c (do_start_initialization): Adjust to ldirname
13689 returning a std::string.
13690 * utils.c (ldirname): Now returns a std::string.
13691 * utils.h (ldirname): Change return type to std::string.
13692 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13693 returning a std::string.
13694 * xml-tdesc.c (file_read_description_xml): Likewise.
13695
ed771251
AH
136962017-03-24 Alan Hayward <alan.hayward@arm.com>
13697
13698 * regcache.c (regcache_debug_print_register): New function.
13699 * regcache.h (regcache_debug_print_register): New declaration.
13700 * target.c (debug_print_register): Remove.
13701 (target_fetch_registers): Call regcache_debug_print_register.
13702 (target_store_registers): Likewise.
13703
568c1b9f
PB
137042017-03-24 Pádraig Brady <pbrady@fb.com>
13705
13706 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13707 reference beyond the 'lh->include_dirs' array before accessing to
13708 it.
13709 (psymtab_include_file_name): Likewise.
13710 (dwarf_decode_lines_1): Likewise.
13711 (dwarf_decode_lines): Likewise.
13712 (file_file_name): Likewise.
13713
3e00d44f
SM
137142017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13715
13716 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13717 inferior_ptid.
13718 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13719 ps_lsetfpregs): Likewise.
13720 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13721 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13722 ps_lsetfpregs): Likewise.
13723 * target.c (target_fetch_registers, target_store_registers):
13724 Remove asserts.
13725
077ae656
AH
137262017-03-23 Alan Hayward <alan.hayward@arm.com>
13727
13728 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13729
1e2b521d
YQ
137302017-03-23 Yao Qi <yao.qi@linaro.org>
13731
13732 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13733 (_initialize_aarch64_tdep): Register it.
13734 (aarch64_record_load_store): Handle PRFM instruction.
13735 (aarch64_process_record_test): New function.
13736
33877125
YQ
137372017-03-23 Yao Qi <yao.qi@linaro.org>
13738
13739 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13740 indentation.
13741
a0eef940
YQ
137422017-03-23 Yao Qi <yao.qi@linaro.org>
13743
13744 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13745
3f2a3564
PR
137462017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13747
13748 python/python.c (do_start_initialization): Fix memory leak.
13749
b67aeab0
SM
137502017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13751
13752 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13753 using get_ptrace_pid.
13754 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13755 inferior_ptid.
13756 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13757 inferior_ptid instead of pid.
13758
ffdbe864
YQ
137592017-03-22 Yao Qi <yao.qi@linaro.org>
13760
13761 * aarch64-tdep.c: Wrap locally used classes in anonymous
13762 namespace.
13763 * arm-tdep.c: Likewise.
13764 * linespec.c: Likewise.
13765 * ui-out.c: Likewise.
13766
9d736fbf
JG
137672017-03-22 Jonah Graham <jonah@kichwacoders.com>
13768
13769 PR gdb/19637
13770 * python/lib/gdb/printer/bound_registers.py: Import sys.
13771
3de88e9a
SM
137722017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13773
13774 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13775 windows_thread_info parameter and use it instead of
13776 current_thread.
13777 (windows_fetch_inferior_registers): Don't set current_thread,
13778 pass the thread to do_windows_fetch_inferior_registers. Use
13779 ptid from regcache instead of inferior_ptid.
13780 (do_windows_store_inferior_registers): Add windows_thread_info
13781 parameter and use it instead of current_thread.
13782 (windows_store_inferior_registers): Don't set current_thread,
13783 pass the thread to do_windows_store_inferior_registers. Use
13784 ptid from regcache instead of inferior_ptid.
13785
0e7b8f61
SM
137862017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13787
13788 * ser-mingw.c (ser_windows_raw): Remove reference to
13789 struct serial::current_timeout.
13790
5badf10a
IR
137912017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13792
13793 PR tdep/20928
13794 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13795 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13796 (sparc64_fsr_type): Fix %fsr decoding.
13797
cee59b3f
TW
137982017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13799
13800 * python/py-record-btrace.c (btpy_insn_data): Change return type
13801 for Python 2.
13802
639a9038
SM
138032017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13804
13805 * spu-linux-nat.c (spu_fetch_inferior_registers,
13806 spu_store_inferior_registers): Use ptid from regcache, set and
13807 restore inferior_ptid.
13808 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13809 Likewise.
13810
bcc0c096
SM
138112017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13812
13813 * i386-linux-nat.c (fetch_register, store_register,
13814 i386_linux_fetch_inferior_registers,
13815 i386_linux_store_inferior_registers): Use ptid from regcache.
13816 * ia64-linux-nat.c (ia64_linux_fetch_register,
13817 ia64_linux_store_register): Likewise.
13818 * inf-ptrace.c (inf_ptrace_fetch_register,
13819 inf_ptrace_store_register): Likewise.
13820 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13821 m32r_linux_store_inferior_registers): Likewise.
13822 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13823 m68kbsd_store_inferior_registers): Likewise.
13824 * m68k-linux-nat.c (fetch_register, store_register,
13825 m68k_linux_fetch_inferior_registers,
13826 m68k_linux_store_inferior_registers): Likewise.
13827 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13828 m88kbsd_store_inferior_registers): Likewise.
13829 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13830 mips_fbsd_store_inferior_registers): Likewise.
13831 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13832 mips64_linux_regsets_store_registers): Likewise.
13833 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13834 mipsnbsd_store_inferior_registers): Likewise.
13835 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13836 mips64obsd_store_inferior_registers): Likewise.
13837 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13838 Likewise.
13839 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13840 ppcfbsd_store_inferior_registers): Likewise.
13841 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13842 ppc_linux_store_inferior_registers): Likewise.
13843 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13844 ppcnbsd_store_inferior_registers): Likewise.
13845 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13846 ppcobsd_store_registers): Likewise.
13847 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13848 Likewise.
13849 * ravenscar-thread.c (ravenscar_fetch_registers,
13850 ravenscar_store_registers, ravenscar_prepare_to_store):
13851 Likewise.
13852 * record-btrace.c (record_btrace_fetch_registers,
13853 record_btrace_store_registers, record_btrace_prepare_to_store):
13854 Likewise.
13855 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13856 Lookup inferior using ptid from regcache, instead of
13857 current_inferior.
13858 * remote.c (remote_fetch_registers, remote_store_registers): Use
13859 ptid from regcache.
13860 * rs6000-nat.c (fetch_register, store_register): Likewise.
13861 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13862 s390_linux_store_inferior_registers): Likewise.
13863 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13864 shnbsd_store_inferior_registers): Likewise.
13865 * sol-thread.c (sol_thread_fetch_registers,
13866 sol_thread_store_registers): Likewise.
13867 * sparc-nat.c (sparc_fetch_inferior_registers,
13868 sparc_store_inferior_registers): Likewise.
13869 * tilegx-linux-nat.c (fetch_inferior_registers,
13870 store_inferior_registers): Likewise.
13871 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13872 vaxbsd_store_inferior_registers): Likewise.
13873 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13874 store_xtregs): Likewise.
13875
c0f55cc6
AV
138762017-03-20 Artemiy Volkov <artemiyv@acm.org>
13877
13878 PR gdb/14441
13879 * NEWS: Mention support for rvalue references in GDB and python.
13880 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13881 supports both lvalue and rvalue references.
13882
15c0a2a9
AV
138832017-03-20 Artemiy Volkov <artemiyv@acm.org>
13884
13885 PR gdb/14441
13886 * gdbtypes.c (rank_one_type): Implement overloading
13887 resolution rules regarding rvalue references.
13888
aa006118
AV
138892017-03-20 Artemiy Volkov <artemiyv@acm.org>
13890
13891 PR gdb/14441
13892 * aarch64-tdep.c (aarch64_type_align)
13893 (aarch64_extract_return_value, aarch64_store_return_value): Change
13894 lvalue reference type checks to general reference type checks.
13895 * amd64-tdep.c (amd64_classify): Likewise.
13896 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13897 Likewise.
13898 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13899 (arm_store_return_value): Likewise.
13900 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13901 * c-typeprint.c (c_print_type): Likewise.
13902 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13903 (cplus_number_of_children, cplus_describe_child): Likewise.
13904 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13905 * completer.c (expression_completer): Likewise.
13906 * cp-support.c (make_symbol_overload_list_adl_namespace):
13907 Likewise.
13908 * darwin-nat-info.c (info_mach_region_command): Likewise.
13909 * dwarf2loc.c (entry_data_value_coerce_ref)
13910 (value_of_dwarf_reg_entry): Likewise.
13911 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13912 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13913 Likewise.
13914 * findvar.c (extract_typed_address, store_typed_address):
13915 Likewise.
13916 * gdbtypes.c (rank_one_type): Likewise.
13917 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13918 * infcall.c (value_arg_coerce): Likewise.
13919 * language.c (pointer_type): Likewise.
13920 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13921 Likewise.
13922 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13923 * mn10300-tdep.c (mn10300_type_align): Likewise.
13924 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13925 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13926 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13927 Likewise.
13928 * printcmd.c (print_formatted, x_command): Likewise.
13929 * python/py-type.c (typy_get_composite, typy_template_argument):
13930 Likewise.
13931 * python/py-value.c (valpy_referenced_value)
13932 (valpy_get_dynamic_type, value_has_field): Likewise.
13933 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13934 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13935 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13936 * spu-tdep.c (spu_scalar_value_p): Likewise.
13937 * symtab.c (lookup_symbol_aux): Likewise.
13938 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13939 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13940 Likewise.
13941 * valops.c (value_cast_pointers, value_cast)
13942 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13943 (value_struct_elt, value_struct_elt_bitpos)
13944 (value_find_oload_method_list, find_overload_match)
13945 (value_rtti_indirect_type): Likewise.
13946 * valprint.c (val_print_scalar_type_p, generic_val_print):
13947 Likewise.
13948 * value.c (value_actual_type, value_as_address, unpack_long)
13949 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13950 (coerce_ref): Likewise.
13951 * varobj.c (varobj_get_value_type): Likewise.
13952
3fcf899d
AV
139532017-03-20 Artemiy Volkov <artemiyv@acm.org>
13954
13955 PR gdb/14441
13956 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13957 table of constants.
13958 * python/lib/gdb/command/explore.py: Support exploring values
13959 of rvalue reference types.
13960 * python/lib/gdb/types.py: Implement get_basic_type() for
13961 rvalue reference types.
13962 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13963 constant.
13964 * python/py-value.c (valpy_getitem): Add an rvalue reference
13965 check.
13966 (valpy_reference_value): Add new parameter "refcode".
13967 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13968 New wrappers for valpy_reference_value().
13969 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13970 (gdbpy_invoke_xmethod): Likewise.
13971
4297a3f0
AV
139722017-03-20 Artemiy Volkov <artemiyv@acm.org>
13973
13974 PR gdb/14441
13975 * dwarf2read.c (process_die, read_type_die_1): Handle the
13976 DW_TAG_rvalue_reference_type DIE.
13977 (read_tag_reference_type): Add new parameter "refcode".
13978
e1cb3213
AV
139792017-03-20 Artemiy Volkov <artemiyv@acm.org>
13980
13981 PR gdb/14441
13982 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13983 (c_type_print_modifier, c_type_print_varspec_suffix)
13984 (c_type_print_base): Support printing rvalue reference types.
13985 * c-valprint.c (c_val_print, c_value_print): Support printing
13986 rvalue reference values.
13987
e4347c89
AV
139882017-03-20 Artemiy Volkov <artemiyv@acm.org>
13989
13990 PR gdb/14441
13991 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13992 typename.
13993 * cp-support.c (replace_typedefs): Handle
13994 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13995 * python/py-type.c (typy_lookup_type): Likewise.
13996
53cc15f5
AV
139972017-03-20 Artemiy Volkov <artemiyv@acm.org>
13998
13999 PR gdb/14441
14000 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14001 * parse.c (insert_type): Change assert statement.
14002 (follow_types): Handle rvalue reference types.
14003 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14004 constant.
14005
a65cfae5
AV
140062017-03-20 Artemiy Volkov <artemiyv@acm.org>
14007
14008 PR gdb/14441
14009 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14010 value_ref() interface.
14011 * c-valprint.c (c_value_print): Likewise.
14012 * infcall.c (value_arg_coerce): Likewise.
14013 * python/py-value.c (valpy_reference_value): Likewise.
14014 * valops.c (value_cast, value_reinterpret_cast)
14015 (value_dynamic_cast, typecmp): Likewise.
14016 (value_ref): Parameterize by kind of return value reference type.
14017 * value.h (value_ref): Add new parameter "refcode".
14018
3b224330
AV
140192017-03-20 Artemiy Volkov <artemiyv@acm.org>
14020
14021 PR gdb/14441
14022 * dwarf2read.c (read_tag_reference_type): Use
14023 lookup_lvalue_reference_type() instead of lookup_reference_type().
14024 * eval.c (evaluate_subexp_standard): Likewise.
14025 * f-exp.y: Likewise.
14026 * gdbtypes.c (make_reference_type, lookup_reference_type):
14027 Generalize with rvalue reference types.
14028 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14029 convenience wrappers for lookup_reference_type().
14030 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14031 reference kind parameter.
14032 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14033 wrappers for lookup_reference_type().
14034 * guile/scm-type.c (gdbscm_type_reference): Use
14035 lookup_lvalue_reference_type() instead of lookup_reference_type().
14036 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14037 * parse.c (follow_types): Likewise.
14038 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14039 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14040 Likewise.
14041 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14042 (gdbpy_invoke_xmethod): Likewise.
14043 * stabsread.c: Provide extra argument to make_reference_type()
14044 call.
14045 * valops.c (value_ref, value_rtti_indirect_type): Use
14046 lookup_lvalue_reference_type() instead of lookup_reference_type().
14047
f9aeb8d4
AV
140482017-03-20 Artemiy Volkov <artemiyv@acm.org>
14049
14050 PR gdb/14441
14051 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14052 (TYPE_IS_REFERENCE): New macro.
14053 (struct type): Add rvalue_reference_type field.
14054 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14055
51457a05
MAL
140562017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14057
14058 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14059 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14060 New function definition.
14061 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14062 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14063 New function declaration.
14064 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14065 * mi/mi-interp.h: New file.
14066 * solib.c (info_sharedlibrary_command): Replace for loop with
14067 ALL_SO_LIBS macro
14068 * solib.h (update_solib_list): New function declaration.
14069 (so_list_head): Move macro.
14070 * solist.h (ALL_SO_LIBS): New macro.
14071
e696b3ad
MAL
140722017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14073
14074 * infcmd.c (post_create_inferior): Remove unused argument in
14075 call to solib_add.
14076 * remote.c (remote_start_remote): Likewise.
14077 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14078 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14079 (enable_break): Likewise.
14080 * solib.c (update_solib_list): Remove unused target argument
14081 and its documentation.
14082 (solib_add): Remove unused target argument. Remove unused
14083 argument in call to update_solib_list.
14084 (info_sharedlibrary_command): Remove unused argument in call
14085 to update_solib_list.
14086 (sharedlibrary_command): Remove unused argument in call to
14087 solib_add.
14088 (handle_solib_event): Likewise.
14089 (reload_shared_libraries): Likewise.
14090 * solib.h (solib_add): Remove unused target argument.
14091
dcb84eda
AA
140922017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14093
14094 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14095 (s390_displaced_step_fixup): Cover relative branches with the
14096 default fixup handling. This fixes lack of support for some
14097 relative branch instructions.
14098
d9cb6cdc
SM
140992017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14100
14101 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14102 ptid from regcache.
14103
1afaf9f4
SM
141042017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14105
14106 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14107 i386_darwin_store_inferior_registers): Use ptid from regcache.
14108
aac12e24
SM
141092017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14110
14111 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14112 i386bsd_store_inferior_registers): Use ptid from regcache.
14113
bbe1eef1
SM
141142017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14115
14116 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14117 hppaobsd_store_registers): Use ptid from regcache.
14118
10799020
SM
141192017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14120
14121 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14122 hppanbsd_store_registers): Use ptid from regcache.
14123
00204cf7
SM
141242017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14125
14126 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14127 from regcache. Use get_ptrace_pid.
14128
11a33714
SM
141292017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14130
14131 * corelow.c (get_core_register_section): Use ptid from regcache,
14132 update doc.
14133
317cd492
SM
141342017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14135
14136 * bsd-uthread.c (bsd_uthread_fetch_registers,
14137 bsd_uthread_store_registers): Use ptid from regcache, set and
14138 restore inferior_ptid.
14139
9ac8a7c2
SM
141402017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14141
14142 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14143 fetch_fp_regs, store_register, store_regs, store_fp_register,
14144 store_fp_regs): Use ptid from regcache.
14145
4ac4bb6a
SM
141462017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14147
14148 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14149 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14150 store_vfp_regs): Use ptid from regcache.
14151
9bcbdca8
PA
141522017-03-17 Pedro Alves <palves@redhat.com>
14153
14154 PR remote/21188
14155 * ser-base.c (ser_base_wait_for): Add comment.
14156 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14157 version.
14158 * ser-unix.c (hardwire_raw): Remove reference to
14159 scb->current_timeout.
14160 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14161 (hardwire_ops): Install ser_base_readchar instead of
14162 hardwire_readchar.
14163 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14164 Remove fields.
14165
7503099f
JG
141662017-03-17 Jonah Graham <jonah@kichwacoders.com>
14167
14168 PR gdb/19637
14169 * python/lib/gdb/printer/bound_registers.py: Add support for
14170 Python 3.
14171
7942e96e
AA
141722017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14173
14174 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14175 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14176 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14177 byte_offset to subobj_byte_offset. Fix the handling of
14178 DWARF_VALUE_STACK on big-endian targets when coming via an
14179 implicit pointer.
14180 (dwarf2_evaluate_loc_desc): Adjust call to
14181 dwarf2_evaluate_loc_desc_full.
14182 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14183 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14184
ba14f379
YQ
141852017-03-16 Yao Qi <yao.qi@linaro.org>
14186
14187 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14188 and REVSH instructions.
14189
b121eeb9
YQ
141902017-03-16 Yao Qi <yao.qi@linaro.org>
14191
14192 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14193 (arm_record_test): Declare.
14194 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14195 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14196 align with the manual.
14197 (thumb_record_misc): Adjust the code order to align with the
14198 manual.
14199 (thumb2_record_decode_insn_handler): Fix instruction matching.
14200 (instruction_reader_thumb): New class.
14201 (arm_record_test): New function.
14202
728a7913
YQ
142032017-03-16 Yao Qi <yao.qi@linaro.org>
14204
14205 * arm-tdep.c (abstract_memory_reader): New class.
14206 (instruction_reader): New class.
14207 (extract_arm_insn): Add argument 'reader'. Callers updated.
14208 (decode_insn): Likewise.
14209
34b43320
DE
142102017-03-16 Doug Evans <dje@google.com>
14211
a7c0469f
DE
14212 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14213 member. Change type of TYPE member to SCM. All uses updated.
14214 (lsscm_make_lazy_string_smob): Add assert.
14215 (lsscm_make_lazy_string): Flag bad length values.
14216 (lsscm_elt_type): New function.
14217 (gdbscm_lazy_string_to_value): Rewrite to use
14218 lsscm_safe_lazy_string_to_value.
14219 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14220 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14221 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14222 in incoming type.
14223 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14224 * guile/scm-type.c (tyscm_scm_to_type): New function.
14225
142262017-03-15 Doug Evans <dje@google.com>
14227
34b43320
DE
14228 PR python/17728, python/18439, python/18779
14229 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14230 member. Change type of TYPE member to PyObject *. All uses updated.
14231 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14232 (gdbpy_create_lazy_string_object): Flag bad length values.
14233 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14234 Handle typedefs in incoming type.
14235 (stpy_lazy_string_elt_type): New function.
14236 (gdbpy_extract_lazy_string): Call it.
14237 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14238 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14239 typedefs in incoming type.
14240
a3a5fecc
DE
142412017-03-16 Doug Evans <dje@google.com>
14242
14243 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14244 * guile/scm-type.c (tyscm_scm_to_type): New function.
14245
28f1c605
JW
142462017-03-16 Jiong Wang <jiong.wang@arm.com>
14247
14248 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14249 "ULONGEST" for "skip".
14250
87c336f6
AA
142512017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14252
14253 PR gdb/21220
14254 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14255 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14256 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14257 over ptrace peek/poke until end of buffer or error.
14258
cf81cf60
SM
142592017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14260
14261 * parse.c (length_of_subexp): Make static.
14262 * parser-defs.h (length_of_subexp): Remove.
14263
a379284a
AA
142642017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14265
14266 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14267 as well.
14268
8a6200ba
PA
142692017-03-14 Pedro Alves <palves@redhat.com>
14270
14271 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14272 (main): Use std::unique_ptr. Remove calls to
14273 cp_demangled_name_parse_free.
14274
f79ec206
SM
142752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14276
14277 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14278 alphabsd_store_inferior_registers): Use regcache->ptid instead
14279 of inferior_ptid.
14280
edb5fb00
SM
142812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14282
14283 * aix-thread.c (aix_thread_fetch_registers,
14284 aix_thread_store_registers): Use regcache->ptid instead of
14285 inferior_ptid.
14286
55119686
SM
142872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14288
14289 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14290 store_gregs_to_thread, fetch_fpregs_from_thread,
14291 store_fpregs_to_thread): Use regcache->ptid instead of
14292 inferior_ptid.
14293
6a06fbb7
SM
142942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14295
14296 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14297 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14298 instead of inferior_ptid.
14299
c6386875
SM
143002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14301
14302 * target.c (target_fetch_registers, target_store_registers): Add
14303 assert.
14304
ddaaf0fb
SM
143052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14306
14307 * regcache.h (regcache_get_ptid): New function.
14308 * regcache.c (regcache_get_ptid): New function.
14309
b9da89d1 143102017-03-13 Mark Wielaard <mark@klomp.org>
14311
14312 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14313
5f4d1085
KS
143142017-03-10 Keith Seitz <keiths@redhat.com>
14315
14316 PR c++/8218
14317 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14318
c65d6b55
PA
143192017-03-08 Pedro Alves <palves@redhat.com>
14320
14321 PR gdb/18360
14322 * infrun.c (start_step_over, do_target_resume, resume)
14323 (restart_threads): Assert we're not resuming a thread that is
14324 meant to be stopped.
14325 (infrun_thread_stop_requested_callback): Delete.
14326 (infrun_thread_stop_requested): If the thread is internally
14327 stopped, queue a pending stop event and clear the thread's
14328 inline-frame state.
14329 (handle_stop_requested): New function.
14330 (handle_syscall_event, handle_inferior_event_1): Use
14331 handle_stop_requested.
14332 (handle_stop_requested): New function.
14333 (handle_signal_stop): Set the thread's stop_signal here instead of
14334 at caller.
14335 (finish_step_over): Clear step over info unconditionally.
14336 (handle_signal_stop): If the user had interrupted the event
14337 thread, consider the stop a random signal.
14338 (handle_signal_stop) <signal arrived while stepping over
14339 breakpoint>: Don't restart threads here.
14340 (stop_waiting): Don't clear step-over info here.
14341
15c22686
PA
143422017-03-08 Pedro Alves <palves@redhat.com>
14343
14344 PR 21206
14345 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14346 goes to argument 2, not 1.
14347
6e5d74e7
PA
143482017-03-08 Pedro Alves <palves@redhat.com>
14349
14350 PR cli/21218
14351 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14352 display_gdb_prompt.
14353 (command_line_input): Add comment.
14354
9753a2f6
PA
143552017-03-08 Pedro Alves <palves@redhat.com>
14356
14357 PR tui/21216
14358 * tui/tui-file.c (tui_file::write): New.
14359 * tui/tui-file.h (tui_file): Override "write".
14360 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14361 factored out from ...
14362 (tui_puts): ... here.
14363 (tui_putc): Use them.
14364 (tui_write): New function.
14365 * tui/tui-io.h (tui_write): Declare.
14366
1672e0d9
SDJ
143672017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14368
14369 * Makefile.in (SFILES): Replace "environ.c" with
14370 "common/environ.c".
14371 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14372 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14373 to...
14374 * common/environ.c: ... here.
14375 * environ.h: Moved to...
14376 * common/environ.h: ... here.
14377
f7bb4e3a
PB
143782017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14379
14380 * gdbarch.sh (pstring_ptr): New static function.
14381 (gdbarch_disassembler_options): Use it.
14382 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14383 not valid_disassembler_option->name.
14384 * gdbarch.c: Regenerate.
14385
e45ced6c
PB
143862017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14387
14388 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14389
5f6fd321
PA
143902017-03-07 Pedro Alves <palves@redhat.com>
14391
14392 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14393
6dbb839a 143942017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14395
14396 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14397 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14398 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14399 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14400
d274ecf4
SM
144012017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14402
14403 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14404
df97be55
SM
144052017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14406
14407 * remote.c (remote_add_target_side_commands): Use range-based
14408 for loop.
14409
7d45f3df
YQ
144102017-03-03 Yao Qi <yao.qi@linaro.org>
14411
14412 PR gdb/21165
14413 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14414 value is lazy.
14415 * valprint.c (common_val_print): Likewise.
14416
65b48a81
PB
144172017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14418
14419 * NEWS: Mention new set/show disassembler-options commands.
14420 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14421 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14422 (prospective_options): New static variable.
14423 (gdb_disassembler::gdb_disassembler): Initialize
14424 m_di.disassembler_options.
14425 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14426 (get_disassembler_options): New function.
14427 (set_disassembler_options): Likewise.
14428 (set_disassembler_options_sfunc): Likewise.
14429 (show_disassembler_options_sfunc): Likewise.
14430 (disassembler_options_completer): Likewise.
14431 (_initialize_disasm): Likewise.
14432 * disasm.h (get_disassembler_options): New prototype.
14433 (set_disassembler_options): Likewise.
14434 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14435 (gdbarch_verify_disassembler_options): Likewise.
14436 * gdbarch.c: Regenerate.
14437 * gdbarch.h: Likewise.
14438 * arm-tdep.c (num_disassembly_options): Delete.
14439 (set_disassembly_style): Likewise.
14440 (arm_disassembler_options): New static variable.
14441 (set_disassembly_style_sfunc): Convert short style name into long
14442 option name. Call set_disassembler_options.
14443 (show_disassembly_style_sfunc): New function.
14444 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14445 set_gdbarch_verify_disassembler_options.
14446 (_initialize_arm_tdep): Delete regnames variable and update callers.
14447 (arm_disassembler_options): Initialize.
14448 (disasm_options): New variable.
14449 (num_disassembly_options): Rename from this...
14450 (num_disassembly_styles): ...to this. Compute by scanning through
14451 disasm_options.
14452 (valid_disassembly_styles): Initialize using disasm_options.
14453 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14454 set_arm_regname_option.
14455 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14456 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14457 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14458 set_gdbarch_verify_disassembler_options.
14459 * s390-tdep.c (s390_disassembler_options): New static variable.
14460 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14461 set_gdbarch_verify_disassembler_options.
14462
d538e36d
SM
144632017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14464
14465 * remote.c (remote_add_target_side_condition): Remove "struct"
14466 keyword from range-based for loop.
14467
83621223
SM
144682017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14469
14470 * remote.c (remote_add_target_side_condition): Use range-based
14471 for loop. Update comment.
14472
2123df0e
YQ
144732017-02-27 Yao Qi <yao.qi@linaro.org>
14474
14475 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14476
8e368124
AH
144772017-02-26 Alan Hayward <alan.hayward@arm.com>
14478
14479 * regcache.c (regcache_raw_update): New function.
14480 (regcache_raw_read): Move code to regcache_raw_update.
14481 * regcache.h (regcache_raw_update): New declaration.
14482 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14483
a49dd8dd
JK
144842017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14485
14486 * dwarf2read.c (create_debug_type_hash_table): Initialize
14487 header.signature and header.type_offset_in_tu.
14488
34e4bae9
PA
144892017-02-24 Pedro Alves <palves@redhat.com>
14490
14491 * symtab.c (make_file_symbol_completion_list_1): Use
14492 add_symtab_completions.
14493
b0e4b369
AH
144942017-02-24 Alan Hayward <alan.hayward@arm.com>
14495
14496 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14497
975c21ab
AH
144982017-02-24 Alan Hayward <alan.hayward@arm.com>
14499
14500 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14501 I386_MAX_REGISTER_SIZE.
14502 (i386_pseudo_register_write): Likewise.
14503 (i386_process_record): Likewise.
14504 * i387-tdep.c (i387_supply_xsave): Likewise.
14505 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14506 (store_register): Likewise.
14507
14bc53a8
PA
145082017-02-23 Pedro Alves <palves@redhat.com>
14509
14510 * ada-lang.c: Include "common/function-view.h".
14511 (ada_iterate_over_symbols): Adjust to use function_view as
14512 callback type.
14513 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14514 (ada_make_symbol_completion_list): Use a lambda.
14515 (ada_exc_search_name_matches): Delete.
14516 (name_matches_regex): New.
14517 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14518 * compile/compile-c-support.c: Include "common/function-view.h".
14519 (print_one_macro): Change prototype to accept a ui_file pointer.
14520 (write_macro_definitions): Use a lambda.
14521 * dwarf2read.c: Include "common/function-view.h".
14522 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14523 (dw2_expand_symtabs_matching): Adjust to use function_view as
14524 callback type.
14525 * language.h: Include "common/function-view.h".
14526 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14527 function_view as callback type.
14528 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14529 * linespec.c: Include "common/function-view.h".
14530 (collect_info::add_symbol): New method.
14531 (struct symbol_and_data_callback, iterate_inline_only, struct
14532 symbol_matcher_data, iterate_name_matcher): Delete.
14533 (iterate_over_all_matching_symtabs): Adjust to use function_view
14534 as callback type and lambdas.
14535 (iterate_over_file_blocks): Adjust to use function_view as
14536 callback type.
14537 (decode_compound_collector): Now a class with private fields.
14538 (decode_compound_collector::release_symbols): New method.
14539 (collect_one_symbol): Rename to...
14540 (decode_compound_collector::operator()): ... this and adjust.
14541 (lookup_prefix_sym): decode_compound_collector construction bits
14542 move to decode_compound_collector ctor. Pass the
14543 decode_compound_collector object directly as callback. Remove
14544 cleanups and use decode_compound_collector::release_symbols
14545 instead.
14546 (symtab_collector): Now a class with private fields.
14547 (symtab_collector::release_symtabs): New method.
14548 (add_symtabs_to_list): Rename to...
14549 (symtab_collector::operator()): ... this and adjust.
14550 (collect_symtabs_from_filename): symtab_collector construction
14551 bits move to symtab_collector ctor. Pass the symtab_collector
14552 object directly as callback. Remove cleanups and use
14553 symtab_collector::release_symtabs instead.
14554 (collect_symbols): Delete.
14555 (add_matching_symbols_to_info): Use lambdas.
14556 * macrocmd.c (print_macro_callback): Delete.
14557 (info_macro_command): Use a lambda.
14558 (info_macros_command): Pass print_macro_definition as callable
14559 directly.
14560 (print_one_macro): Remove 'ignore' parameter.
14561 (macro_list_command): Adjust.
14562 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14563 (macro_for_each_data::user_data): Delete field.
14564 (foreach_macro): Adjust to call the function_view.
14565 (macro_for_each): Adjust to use function_view as callback type.
14566 (foreach_macro_in_scope): Adjust to call the function_view.
14567 (macro_for_each_in_scope): Adjust to use function_view as callback
14568 type.
14569 * macrotab.h: Include "common/function-view.h".
14570 (macro_callback_fn): Declare a prototype instead of a pointer.
14571 Remove "user_data" parameter.
14572 (macro_for_each, macro_for_each_in_scope): Adjust to use
14573 function_view as callback type.
14574 * psymtab.c (partial_map_expand_apply)
14575 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14576 Adjust to use function_view as callback type and to return bool.
14577 (psym_expand_symtabs_matching): Adjust to use function_view as
14578 callback types.
14579 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14580 to use function_view as callback type and to return bool.
14581 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14582 callback types.
14583 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14584 as callback types.
14585 * symfile.h: Include "common/function-view.h".
14586 (expand_symtabs_file_matcher_ftype)
14587 (expand_symtabs_symbol_matcher_ftype)
14588 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14589 return bool.
14590 (quick_symbol_functions::map_symtabs_matching_filename)
14591 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14592 function_view as callback type and return bool.
14593 (expand_symtabs_matching): Adjust to use function_view as callback
14594 type.
14595 (maintenance_expand_name_matcher)
14596 (maintenance_expand_file_matcher): Delete.
14597 (maintenance_expand_symtabs): Use lambdas.
14598 * symtab.c (iterate_over_some_symtabs): Adjust to use
14599 function_view as callback types and return bool.
14600 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14601 of a cleanup.
14602 (lookup_symtab_callback): Delete.
14603 (lookup_symtab): Use a lambda.
14604 (iterate_over_symbols): Adjust to use function_view as callback
14605 type.
14606 (struct search_symbols_data, search_symbols_file_matches)
14607 (search_symbols_name_matches): Delete.
14608 (search_symbols): Use a pair of lambdas.
14609 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14610 (symtab_expansion_callback): Delete.
14611 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14612 * symtab.h: Include "common/function-view.h".
14613 (iterate_over_some_symtabs): Adjust to use function_view as
14614 callback type and return bool.
14615 (iterate_over_symtabs): Adjust to use function_view as callback
14616 type.
14617 (symbol_found_callback_ftype): Remove 'data' parameter and return
14618 bool.
14619 (iterate_over_symbols): Adjust to use function_view as callback
14620 type.
14621
07e253aa
PA
146222017-02-23 Pedro Alves <palves@redhat.com>
14623
14624 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14625 (%.o) <unittests/%.c>: New pattern.
14626 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14627 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14628 * common/function-view.h: New file.
14629 * unittests/function-view-selftests.c: New file.
14630 * configure: Regenerate.
14631
8eaf5320
SM
146322017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14633
14634 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14635 inferior_ptid.
14636 * go32-nat.c (go32_thread_alive): Likewise.
14637
38768751
YQ
146382017-02-23 Yao Qi <yao.qi@linaro.org>
14639
14640 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14641 delete.
14642
0a8beaba
YQ
146432017-02-23 Yao Qi <yao.qi@linaro.org>
14644
14645 * varobj.c (varobj_clear_saved_item): Use delete instead of
14646 xfree.
14647 (update_dynamic_varobj_children): Likewise.
14648
58fdfd2c
JK
146492017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14650
14651 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14652
1b90b139
SM
146532017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14654
14655 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14656 m_enum_value to 0 in default constructor.
14657
2039d74e
EBM
146582017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14659
14660 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14661 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14662 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14663 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14664 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14665 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14666 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14667 IS_STORE_CONDITIONAL_INSN.
14668
7814882a
JK
146692017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14670
14671 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14672
0ae60b63
JK
146732017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14674
14675 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14676
0224619f
JK
146772017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14678
14679 * dwarf2read.c (skip_one_die, read_attribute_value)
14680 (dwarf2_const_value_attr, dump_die_shallow)
14681 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14682 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14683
0af92d60
JK
146842017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14685
14686 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14687 (dwarf_parse_macro_header): Accept DWARF version 5.
14688 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14689
216f72a1
JK
146902017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14691
14692 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14693 DW_AT_GNU_*.
14694 * common/common-exceptions.h (enum errors): Likewise.
14695 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14696 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14697 (dwarf_expr_context::execute_stack_op): Likewise.
14698 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14699 Likewise.
14700 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14701 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14702 (show_entry_values_debug, call_site_to_target_addr)
14703 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14704 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14705 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14706 (value_of_dwarf_block_entry, indirect_pieced_value)
14707 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14708 (disassemble_dwarf_expression): Likewise.
14709 * dwarf2read.c (process_die, inherit_abstract_dies)
14710 (read_call_site_scope): Likewise.
14711 * gdbtypes.h (struct func_type, struct call_site_parameter)
14712 (struct call_site): Likewise.
14713 * stack.c (read_frame_arg): Likewise.
14714 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14715
43988095
JK
147162017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14717
14718 * defs.h (read_unsigned_leb128): New declaration.
14719 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14720 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14721 (dwarf2_find_location_expression): Call also
14722 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14723 * dwarf2loc.h (dwarf2_version): New declaration.
14724 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14725 rnglists.
14726 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14727 .debug_rnglists.
14728 (struct dwop_section_names): Add loclists_dwo.
14729 (dwop_section_names): Add .debug_loclists.dwo.
14730 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14731 (struct dwarf2_per_cu_data): Add dwarf_version.
14732 (struct dwo_sections): Add loclists.
14733 (struct attr_abbrev): Add implicit_const.
14734 (read_indirect_line_string): New declaration.
14735 (read_unsigned_leb128): Delete declaration.
14736 (rcuh_kind): New definition.
14737 (read_and_check_comp_unit_head): Change parameter
14738 is_debug_types_section to section_kind.
14739 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14740 (read_comp_unit_head): Change parameter abfd to section, add parameter
14741 section_kind. Handle DWARF-5.
14742 (error_check_comp_unit_head): Accept also DWARF version 5.
14743 (read_and_check_comp_unit_head): Change parameter
14744 is_debug_types_section to section_kind.
14745 (read_and_check_type_unit_head): Delete function.
14746 (read_abbrev_offset): Handle DWARF-5.
14747 (create_debug_type_hash_table): Add parameter section_kind. Process
14748 only DW_UT_type. Use signature and type_offset_in_tu from struct
14749 comp_unit_head.
14750 (create_debug_types_hash_table): Update create_debug_type_hash_table
14751 caller.
14752 (create_all_type_units): Call create_debug_type_hash_table.
14753 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14754 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14755 caller.
14756 (skip_one_die): Handle DW_FORM_implicit_const.
14757 (dwarf2_rnglists_process): New function.
14758 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14759 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14760 (read_attribute_value): Handle DW_FORM_implicit_const,
14761 DW_FORM_line_strp.
14762 (read_attribute): Handle DW_FORM_implicit_const.
14763 (read_indirect_string_at_offset_from): New function from
14764 read_indirect_string_at_offset.
14765 (read_indirect_string_at_offset): Call
14766 read_indirect_string_at_offset_from.
14767 (read_indirect_line_string_at_offset): New function.
14768 (read_indirect_string): New function comment.
14769 (read_indirect_line_string): New function.
14770 (read_unsigned_leb128): Make it global.
14771 (dwarf2_string_attr): Handle DWARF-5.
14772 (add_include_dir_stub, read_formatted_entries): New functions.
14773 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14774 Handle DWARF-5.
14775 (per_cu_header_read_in): Update read_comp_unit_head caller.
14776 (dwarf2_version): New function.
14777 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14778 rnglists.
14779 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14780 fields.
14781
22d2f3ab
JK
147822017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14783
14784 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14785
5f46c5a5
JK
147862017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14787
14788 * dwarf2read.c (dwarf2_ranges_process): New function from
14789 dwarf2_ranges_read.
14790 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14791 dwarf2_ranges_process.
14792
78d4d2c5
JK
147932017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14794
14795 * dwarf2read.c (create_debug_type_hash_table): New function from
14796 create_debug_types_hash_table.
14797 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14798 (create_all_type_units, open_and_init_dwo_file): Update
14799 create_debug_types_hash_table callers.
14800
1b076f25
SDJ
148012017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14802
14803 PR gdb/16188
14804 * fork-child.c (trace_start_error): Fix thinko. va_end should
14805 refer to 'ap', not 'args'.
14806
0db8980c
SDJ
148072017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14808 Pedro Alves <palves@redhat.com>
14809
14810 PR gdb/16188
14811 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14812 calls succeeded.
14813 * fork-child.c (trace_start_error): New function.
14814 (trace_start_error_with_name): Likewise.
14815 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14816 * inf-ptrace.c (inf_ptrace_me): Likewise.
14817 * inferior.h (trace_start_error): New prototype.
14818 (trace_start_error_with_name): Likewise.
14819
99e8a4f9
SDJ
148202017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14821
14822 PR gdb/21164
14823 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14824 NULL before using it.
14825 * symmisc.c (maintenance_print_symbols): Likewise.
14826 (maintenance_print_msymbols): Likewise.
14827
4e746bb6
TW
148282017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14829
14830 * NEWS: Add record Python bindings entry.
14831
148322017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14833
14834 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14835 py-record-full.o.
14836 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14837 * python/py-record-btrace.c, python/py-record-btrace.h,
14838 python/py-record-full.c, python/py-record-full.h: New file.
14839 * python/py-record.c: Add include for py-record-btrace.h and
14840 py-record-full.h.
14841 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14842 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14843 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14844 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14845 New definition.
14846 (gdbpy_initialize_btrace): New export.
14847 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14848
148492017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14850
14851 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14852 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14853 * python/py-record.c: New file.
14854 * python/python-internal.h (gdbpy_start_recording,
14855 gdbpy_current_recording, gdpy_stop_recording,
14856 gdbpy_initialize_record): New export.
14857 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14858 (python_GdbMethods): Add gdbpy_start_recording,
14859 gdbpy_current_recording and gdbpy_stop_recording.
14860
148612017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14862
14863 * record-btrace.c (record_btrace_record_method): New function.
14864 (init_record_btrace_ops): Initialize to_record_method.
14865 * record-full.c (record_full_record_method): New function.
14866 (init_record_full_ops, init_record_full_core_ops): Add
14867 record_full_record_method.
14868 * record.h (enum record_method): New enum.
14869 * target-debug.h (target_debug_print_enum_record_method: New define.
14870 * target-delegates.c: Regenerate.
14871 * target.c (target_record_method): New function.
14872 * target.h: Include record.h.
14873 (struct target_ops) <to_record_method>: New field.
14874 (target_record_method): New export.
14875
148762017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14877
14878 * record.h (record_start, record_stop): New export.
14879 * record.c (record_start, record_stop): New function.
14880
148812017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14882
14883 * btrace.c (btrace_fetch): Copy function call segments pointer
14884 into a vector.
14885 (btrace_clear): Clear the vector.
14886 (btrace_find_insn_by_number): Use binary search to find the correct
14887 function call segment.
14888 * btrace.h (brace_fun_p): New typedef.
14889 (struct btrace_thread_info) <functions>: New field.
14890
148912017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14892
14893 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14894 * btrace.c (btrace_decode_error): ... here. New function.
14895 * btrace.h (btrace_decode_error): New export.
14896
148972017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14898
14899 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14900 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14901 btrace_find_insn_by_number): Remove special case for gaps.
14902 * btrace.h (btrace_insn_get_error): New export.
14903 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14904 * record-btrace.c (btrace_insn_history): Print number for gaps.
14905 (record_btrace_info, record_btrace_goto): Handle gaps.
14906
3f77c769
TT
149072017-02-14 Tom Tromey <tom@tromey.com>
14908
14909 PR python/13598:
14910 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14911 event.
14912 * python/py-evts.c (gdbpy_initialize_py_events): Add
14913 before_prompt registry.
14914 * python/py-events.h (events_object) <before_prompt>: New field.
14915
4c2c7ac6
MM
149162017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14917
14918 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14919
5cf30ebf
LM
149202017-02-13 Luis Machado <lgustavo@codesourcery.com>
14921
14922 * symfile (_initialize_symfile): Add usage text to the load command's
14923 help text.
14924
26a06916
SM
149252017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14926
14927 * utils.c (defaulted_query): Don't query on secondary UIs.
14928
0b145e37
TT
149292017-02-10 Tom Tromey <tom@tromey.com>
14930
14931 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14932
2d8365c4
TT
149332017-02-10 Tom Tromey <tom@tromey.com>
14934
14935 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14936 "cleanup" local.
14937 * python/py-type.c (typy_legacy_template_argument): Remove
14938 unnecessary "cleanup" local.
14939
2bb8f231
TT
149402017-02-10 Tom Tromey <tom@tromey.com>
14941
14942 * python/python.c (do_start_initialization): New function, from
14943 _initialize_python.
14944 (_initialize_python): Call do_start_initialization.
14945 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14946 goto.
14947
1bdfaf42
TT
149482017-02-10 Tom Tromey <tom@tromey.com>
14949
14950 * python/py-prettyprint.c (pretty_print_one_value): Use
14951 gdbpy_ref.
14952
88b6faea
TT
149532017-02-10 Tom Tromey <tom@tromey.com>
14954
14955 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14956 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14957 gdbpy_ref.
14958 * python/py-type.c (field_new): Use gdbpy_ref.
14959 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14960 gdbpy_ref.
14961 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14962 (py_free_pspace): Likewise.
14963 (pspace_to_pspace_object): Likewise.
14964 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14965 (py_free_objfile): Likewise.
14966 (objfile_to_objfile_object): Likewise.
14967 * python/py-inferior.c (delete_thread_object): Use
14968 gdbpy_ref.
14969 (infpy_read_memory): Likewise.
14970 (py_free_inferior): Likewise.
14971 * python/py-evtregistry.c (create_eventregistry_object): Use
14972 gdbpy_ref.
14973 * python/py-event.c (create_event_object): Use gdbpy_ref.
14974
7780f186
TT
149752017-02-10 Tom Tromey <tom@tromey.com>
14976
14977 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14978 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14979 used.
14980 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14981 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14982 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14983 python/py-framefilter.c, python/py-function.c,
14984 python/py-inferior.c, python/py-infevents.c,
14985 python/py-linetable.c, python/py-newobjfileevent.c,
14986 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14987 python/py-signalevent.c, python/py-stopevent.c,
14988 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14989 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14990 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14991 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14992
d4b0bb18
TT
149932017-02-10 Tom Tromey <tom@tromey.com>
14994
14995 * ui-out.h (ui_out_emit_type): New class.
14996 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14997 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14998 and ui_out_emit_tuple.
14999 (enumerate_locals): Likewise.
15000 (py_mi_print_variables, py_print_locals, py_print_args): Use
15001 ui_out_emit_list.
15002 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15003 ui_out_emit_list.
15004 * common/gdb_optional.h: New file.
15005
f67f945c
MG
150062017-02-10 Martin Galvan <martingalvan@sourceware.org>
15007
15008 * MAINTAINERS (Write After Approval): Update my e-mail address.
15009
18da0c51
MG
150102017-02-10 Martin Galvan <martingalvan@sourceware.org>
15011
15012 PR gdb/21122
15013 * breakpoint.c (_initialize_breakpoint): Update the help description
15014 of the 'commands' command to indicate that it takes a list argument.
15015
62c14536
SM
150162017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15017
15018 * interps.c (current_interp_set_logging): Remove "return".
15019
ff6fa247
GB
150202017-02-09 Gary Benson <gbenson@redhat.com>
15021
15022 * symtab.c (add_symtab_completions): Prevent NULL pointer
15023 dereference.
15024
a474bd8e
PA
150252017-02-08 Pedro Alves <palves@redhat.com>
15026
15027 * interps.c (interp::interp): Remove reference to quiet_p.
15028 (interp_set): Make static. Remove dead "Switching to" output
15029 code.
15030 (interp_quiet_p, interp_set_quiet): Delete.
15031 (interpreter_exec_cmd): Don't set the interpreter quiet.
15032 * interps.h (interp_quiet_p): Make static.
15033 (class interp) <quiet_p>: Remove field
15034
3d7b173c
JG
150352017-02-08 Jerome Guitton <guitton@adacore.com>
15036
604c4576
JG
15037 * cli/cli-decode.c (find_command_name_length): Make it extern.
15038 * cli/cli-decode.h (find_command_name_length): Declare.
15039 * cli/cli-script.c (command_name_equals, line_first_arg):
15040 New functions.
15041 (process_next_line): Use cli-decode to parse command names.
15042 (build_command_line): Make args a constant pointer.
15043
150442017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15045
3d7b173c
JG
15046 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15047 Remove case-insensitive search.
15048
1291063d
JM
150492017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15050
15051 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15052 at the end of the line. Avoids an ARI warning.
15053
20b477a7
LM
150542017-02-06 Luis Machado <lgustavo@codesourcery.com>
15055
15056 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15057 rdseed instructions.
15058 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15059
3f7b46f2
IR
150602017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15061
15062 PR tdep/20936
15063 Provide and use sparc32 and sparc64 target description XML files.
15064 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15065 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15066 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15067 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15068 * features/sparc/sparc32-solaris.xml: New file.
15069 * features/sparc/sparc64-solaris.xml: New file.
15070 * features/sparc/sparc32-solaris.c: Generated.
15071 * features/sparc/sparc64-solaris.c: Generated.
15072 * sparc-tdep.h: Account for differences in target descriptions.
15073 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15074 (sparc32_register_type): Use target provided registers.
15075 (validate_tdesc_registers): New function.
15076 (sparc32_gdbarch_init): Use tdesc_has_registers.
15077 Set pseudoregister functions.
15078 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15079 (sparc64_register_type): Use target provided registers.
15080 (sparc64_init_abi): Set pseudoregister functions.
15081
f0fd41c1
TT
150822017-02-03 Tom Tromey <tom@tromey.com>
15083
15084 PR rust/21097:
15085 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15086 with a single member.
15087
d6f9b0fb
PA
150882017-02-03 Pedro Alves <palves@redhat.com>
15089
15090 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15091 (cli_interp_base::~cli_interp_base): New.
15092 (cli_interp): New struct.
15093 (as_cli_interp): Cast the interp itself to cli_interp.
15094 (cli_interpreter_pre_command_loop): Rename to ...
15095 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15096 parameter.
15097 (cli_interpreter_init): Rename to ...
15098 (cli_interp::init): ... this. Remove 'self' parameter. Use
15099 boolean. Make extern.
15100 (cli_interpreter_resume): Rename to ...
15101 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15102 extern.
15103 (cli_interpreter_suspend): Rename to ...
15104 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15105 extern.
15106 (cli_interpreter_exec): Rename to ...
15107 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15108 extern.
15109 (cli_interpreter_supports_command_editing): Rename to ...
15110 (cli_interp_base::supports_command_editing): ... this. Remove
15111 'interp' parameter. Make extern.
15112 (cli_ui_out): Rename to ...
15113 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15114 Make extern.
15115 (cli_set_logging): Rename to ...
15116 (cli_interp_base::set_logging): ... this. Remove 'interp'
15117 parameter. Make extern.
15118 (cli_interp_procs): Delete.
15119 (cli_interp_factory): Adjust to use "new".
15120 * cli/cli-interp.h: Include "interps.h".
15121 (struct cli_interp_base): New struct.
15122 * interps.c (struct interp): Delete. Fields moved to interps.h.
15123 (interp_new): Delete.
15124 (interp::interp, interp::~interp): New.
15125 (interp_set): Use bool, and return void. Assume the interpreter
15126 has suspend, init and resume methods, and that the all return
15127 void.
15128 (set_top_level_interpreter): interp_set returns void.
15129 (interp_ui_out): Adapt.
15130 (current_interp_set_logging): Adapt.
15131 (interp_data): Delete.
15132 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15133 (interp_exec): Adapt.
15134 (top_level_interpreter_data): Delete.
15135 * interps.h (interp_init_ftype, interp_resume_ftype)
15136 (interp_suspend_ftype, interp_exec_ftype)
15137 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15138 (class interp): New.
15139 (interp_new): Delete.
15140 (interp_set): Now returns void. Use bool.
15141 (interp_data, top_level_interpreter_data): Delete.
15142 * mi/mi-common.h: Include interps.h.
15143 (class mi_interp): Inherit from interp. Define a ctor. Declare
15144 init, resume, suspect, exec, interp_ui_out, set_logging and
15145 pre_command_loop methods.
15146 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15147 (mi_interpreter_init): Rename to ...
15148 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15149 bool, return void and make extern. Adjust.
15150 (mi_interpreter_resume): ... Rename to ...
15151 (mi_interp::resume): ... this. Remove the 'data' parameter,
15152 return void and make extern. Adjust.
15153 (mi_interpreter_suspend): ... Rename to ...
15154 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15155 return void and make extern. Adjust.
15156 (mi_interpreter_exec): ... Rename to ...
15157 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15158 extern. Adjust.
15159 (mi_interpreter_pre_command_loop): ... Rename to ...
15160 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15161 parameter and make extern.
15162 (mi_on_normal_stop_1): Adjust.
15163 (mi_ui_out): Rename to ...
15164 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15165 parameter and make extern. Adjust.
15166 (mi_set_logging): Rename to ...
15167 (mi_interp::set_logging): ... this. Remove the 'interp'
15168 parameter and make extern. Adjust.
15169 (mi_interp_procs): Delete.
15170 (mi_interp_factory): Adjust to use 'new'.
15171 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15172 (mi_print_exception, mi_execute_command, mi_load_progress):
15173 Adjust.
15174 * tui/tui-interp.c (tui_interp): New class.
15175 (as_tui_interp): Return a tui_interp pointer.
15176 (tui_on_normal_stop, tui_on_signal_received)
15177 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15178 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15179 to use interp::interp_ui_out.
15180 (tui_init): Rename to ...
15181 (tui_interp::init): ... this. Remove the 'self' parameter, use
15182 bool, return void and make extern. Adjust.
15183 (tui_resume): Rename to ...
15184 (tui_interp::resume): ... this. Remove the 'data' parameter,
15185 return void and make extern. Adjust.
15186 (tui_suspend): Rename to ...
15187 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15188 return void and make extern. Adjust.
15189 (tui_ui_out): Rename to ...
15190 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15191 parameter, and make extern. Adjust.
15192 (tui_exec): Rename to ...
15193 (tui_interp::exec): ... this. Remove the 'data' parameter and
15194 make extern.
15195 (tui_interp_procs): Delete.
15196 (tui_interp_factory): Use "new".
15197
65c40c95
TT
151982017-02-02 Tom Tromey <tom@tromey.com>
15199
15200 * rust-exp.y (ends_raw_string, space_then_number)
15201 (rust_identifier_start_p): Return bool.
15202 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15203 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15204 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15205 (rust_chartype_p): Return bool.
15206 (val_print_struct, rust_print_struct_def, rust_print_type):
15207 Update.
15208 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15209 Return bool.
15210
b50f188d
TT
152112017-02-02 Tom Tromey <tom@tromey.com>
15212
15213 * rust-lang.c: Reindent.
15214
03c85b11
TT
152152017-02-02 Tom Tromey <tom@tromey.com>
15216
15217 * rust-lang.h (rust_crate_for_block): Update.
15218 * rust-lang.c (rust_crate_for_block): Return std::string.
15219 (rust_get_disr_info): Use std:;string, not
15220 gdb::unique_xmalloc_ptr.
15221 * rust-exp.y (crate_name): Update.
15222
9b6da501
PA
152232017-02-02 Pedro Alves <palves@redhat.com>
15224
15225 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15226 field out of gdb_disassembler_test and make it static.
15227
ec4cb20b
PA
152282017-02-02 Pedro Alves <palves@redhat.com>
15229
15230 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15231 mi1_interp and mi_interp fields.
15232
5be5dbf0
PA
152332017-02-02 Pedro Alves <palves@redhat.com>
15234
616268b6
PA
15235 * cli/cli-interp.c (struct saved_output_files, saved_output):
15236 Moved from cli/cli-logging.c.
15237 (cli_set_logging): New function.
15238 (cli_interp_procs): Install cli_set_logging.
15239 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15240 Declare.
15241 * cli/cli-logging.c (struct saved_output_files, saved_output):
15242 Moved to cli/cli-interp.c.
15243 (pop_output_files): Don't save outputs here.
15244 (make_logging_output): New function.
15245 (handle_redirections): Don't build tee nor save previous outputs
15246 here.
15247 * interps.c (current_interp_set_logging): Change prototype.
15248 Assume there's always a set_logging_proc method installed.
15249 * interps.h (interp_set_logging_ftype): Change prototype.
15250 (current_interp_set_logging): Change prototype and adjust comment.
15251 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15252 use make_logging_output.
15253 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
152542017-02-02 Pedro Alves <palves@redhat.com>
15255
5be5dbf0
PA
15256 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15257 from ...
15258 (set_logging_overwrite): ... here.
15259 (logging_no_redirect_file): Delete.
15260 (set_logging_redirect): Don't handle redirection on the fly.
15261 Instead warn that "logging off" / "logging on" is necessary.
15262 (pop_output_files): Delete references to logging_no_redirect_file.
15263 (show_logging_command): Always speak in terms of what will happen
15264 once logging is reenabled.
15265
c99cc448
PA
152662017-02-02 Pedro Alves <palves@redhat.com>
15267
15268 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15269
8b172ce7
PA
152702017-02-02 Pedro Alves <palves@redhat.com>
15271
15272 * disasm.c (gdb_pretty_print_insn): Rename to ...
15273 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15274 Remove gdbarch parameter. Adapt to clear the object's buffers
15275 instead of allocating new buffers, and to print using the object's
15276 gdb_disassembler instead of calling gdb_print_insn.
15277 (dump_insns): Use gdb_pretty_print_disassembler.
15278 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15279 (gdb_pretty_print_disassembler): New class.
15280 * record-btrace.c (btrace_insn_history): Use
15281 gdb_pretty_print_disassembler.
15282
d7e74731
PA
152832017-02-02 Pedro Alves <palves@redhat.com>
15284
15285 * ada-lang.c (type_as_string): Use string_file.
15286 * ada-valprint.c (ada_print_floating): Use string_file.
15287 * ada-varobj.c (ada_varobj_scalar_image)
15288 (ada_varobj_get_value_image): Use string_file.
15289 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15290 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15291 * breakpoint.c (update_inserted_breakpoint_locations)
15292 (insert_breakpoint_locations, reattach_breakpoints)
15293 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15294 (print_it_watchpoint): Use string_file.
15295 (save_breakpoints): Use stdio_file.
15296 * c-exp.y (oper): Use string_file.
15297 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15298 tee_file.
15299 (pop_output_files): Use delete.
15300 (handle_redirections): Use stdio_file and tee_file.
15301 * cli/cli-setshow.c (do_show_command): Use string_file.
15302 * compile/compile-c-support.c (c_compute_program): Use
15303 string_file.
15304 * compile/compile-c-symbols.c (generate_vla_size): Take a
15305 'string_file &' instead of a 'ui_file *'.
15306 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15307 of a 'ui_file *'. Use string_file.
15308 (generate_c_for_variable_locations): Take a 'string_file &'
15309 instead of a 'ui_file *'.
15310 * compile/compile-internal.h (generate_c_for_for_one_variable):
15311 Take a 'string_file &' instead of a 'ui_file *'.
15312 * compile/compile-loc2c.c (push, pushf, unary, binary)
15313 (print_label, pushf_register_address, pushf_register)
15314 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15315 'ui_file *'. Adjust.
15316 * compile/compile.c (compile_to_object): Use string_file.
15317 * compile/compile.h (compile_dwarf_expr_to_c)
15318 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15319 'ui_file *'.
15320 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15321 (replace_typedefs_qualified_name): Use string_file and
15322 obstack_copy0.
15323 * disasm.c (gdb_pretty_print_insn): Use string_file.
15324 (gdb_disassembly): Adjust reference the null_stream global.
15325 (do_ui_file_delete): Delete.
15326 (gdb_insn_length): Use null_stream.
15327 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15328 * dwarf2loc.c (dwarf2_compile_property_to_c)
15329 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15330 'string_file &' instead of a 'ui_file *'.
15331 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15332 * dwarf2read.c (do_ui_file_peek_last): Delete.
15333 (dwarf2_compute_name): Use string_file.
15334 * event-top.c (gdb_setup_readline): Use stdio_file.
15335 * gdbarch.sh (verify_gdbarch): Use string_file.
15336 * gdbtypes.c (safe_parse_type): Use null_stream.
15337 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15338 string_file.
15339 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15340 'string_file *' instead of a 'ui_file *'.
15341 (gdbscm_arch_disassemble): Use string_file.
15342 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15343 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15344 inherits from ui_file.
15345 (ioscm_file_port_delete, ioscm_file_port_rewind)
15346 (ioscm_file_port_put): Delete.
15347 (ioscm_file_port_write): Rename to ...
15348 (ioscm_file_port::write): ... this. Remove file_port_magic
15349 checks.
15350 (ioscm_file_port_new): Delete.
15351 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15352 ui_file_up.
15353 * guile/scm-type.c (tyscm_type_name): Use string_file.
15354 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15355 Use string_file.
15356 * infcmd.c (print_return_value_1): Use string_file.
15357 * infrun.c (print_target_wait_results): Use string_file.
15358 * language.c (add_language): Use string_file.
15359 * location.c (explicit_to_string_internal): Use string_file.
15360 * main.c (captured_main_1): Use null_file.
15361 * maint.c (maintenance_print_architecture): Use stdio_file.
15362 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15363 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15364 event_channel>: Change type to mi_console_file pointer.
15365 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15366 (mi_console_file_delete): Delete.
15367 (struct mi_console_file): Delete.
15368 (mi_console_file_magic): Delete.
15369 (mi_console_file_new): Delete.
15370 (mi_console_file::mi_console_file): New.
15371 (mi_console_file_delete): Delete.
15372 (mi_console_file_fputs): Delete.
15373 (mi_console_file::write): New.
15374 (mi_console_raw_packet): Delete.
15375 (mi_console_file::flush): New.
15376 (mi_console_file_flush): Delete.
15377 (mi_console_set_raw): Rename to ...
15378 (mi_console_file::set_raw): ... this.
15379 * mi/mi-console.h (class mi_console_file): New class.
15380 (mi_console_file_new, mi_console_set_raw): Delete.
15381 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15382 (mi_set_logging): Use delete and tee_file. Adjust.
15383 * mi/mi-main.c (output_register): Use string_file.
15384 (mi_cmd_data_evaluate_expression): Use string_file.
15385 (mi_cmd_data_read_memory): Use string_file.
15386 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15387 * mi/mi-out.c (mi_ui_out::main_stream): New.
15388 (mi_ui_out::rewind): Use main_stream and
15389 string_file.
15390 (mi_ui_out::put): Use main_stream and string_file.
15391 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15392 Allocate a 'string_file' instead.
15393 (mi_out_new): Don't allocate a mem_fileopen stream here.
15394 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15395 (mi_ui_out::main_stream): Declare method.
15396 * printcmd.c (eval_command): Use string_file.
15397 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15398 * python/py-arch.c (archpy_disassemble): Use string_file.
15399 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15400 * python/py-frame.c (frapy_str): Use string_file.
15401 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15402 Use string_file.
15403 * python/py-type.c (typy_str): Use string_file.
15404 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15405 * python/py-value.c (valpy_str): Use string_file.
15406 * record-btrace.c (btrace_insn_history): Use string_file.
15407 * regcache.c (regcache_print): Use stdio_file.
15408 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15409 * remote.c (escape_buffer): Use string_file.
15410 * rust-lang.c (rust_get_disr_info): Use string_file.
15411 * serial.c (serial_open_ops_1): Use stdio_file.
15412 (do_serial_close): Use delete.
15413 * stack.c (print_frame_arg): Use string_file.
15414 (print_frame_args): Remove local mem_fileopen stream, not used.
15415 (print_frame): Use string_file.
15416 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15417 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15418 Take a 'string_file *' instead of a 'ui_file *'.
15419 * top.c (new_ui): Use stdio_file and stderr_file.
15420 (free_ui): Use delete.
15421 (execute_command_to_string): Use string_file.
15422 (quit_confirm): Use string_file.
15423 * tracepoint.c (collection_list::append_exp): Use string_file.
15424 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15425 * tui/tui-file.c: Don't include "ui-file.h".
15426 (enum streamtype, struct tui_stream): Delete.
15427 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15428 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15429 (tui_file::tui_file): New method.
15430 (tui_file_fputs): Delete.
15431 (tui_file_get_strbuf): Delete.
15432 (tui_file::puts): New method.
15433 (tui_file_adjust_strbuf): Delete.
15434 (tui_file_flush): Delete.
15435 (tui_file::flush): New method.
15436 * tui/tui-file.h: Tweak intro comment.
15437 Include ui-file.h.
15438 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15439 (tui_file_adjust_strbuf): Delete declarations.
15440 (class tui_file): New class.
15441 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15442 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15443 (tui_register_format): Use string_stream.
15444 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15445 (tui_get_function_from_frame): Use string_file.
15446 * typeprint.c (type_to_string): Use string_file.
15447 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15448 (null_stream): New global.
15449 (ui_file_delete): Delete.
15450 (ui_file::ui_file): New.
15451 (null_file_isatty): Delete.
15452 (ui_file::~ui_file): New.
15453 (null_file_rewind): Delete.
15454 (ui_file::printf): New.
15455 (null_file_put): Delete.
15456 (null_file_flush): Delete.
15457 (ui_file::putstr): New.
15458 (null_file_write): Delete.
15459 (ui_file::putstrn): New.
15460 (null_file_read): Delete.
15461 (ui_file::putc): New.
15462 (null_file_fputs): Delete.
15463 (null_file_write_async_safe): Delete.
15464 (ui_file::vprintf): New.
15465 (null_file_delete): Delete.
15466 (null_file::write): New.
15467 (null_file_fseek): Delete.
15468 (null_file::puts): New.
15469 (ui_file_data): Delete.
15470 (null_file::write_async_safe): New.
15471 (gdb_flush, ui_file_isatty): Adjust.
15472 (ui_file_put, ui_file_rewind): Delete.
15473 (ui_file_write): Adjust.
15474 (ui_file_write_for_put): Delete.
15475 (ui_file_write_async_safe, ui_file_read): Adjust.
15476 (ui_file_fseek): Delete.
15477 (fputs_unfiltered): Adjust.
15478 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15479 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15480 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15481 (set_ui_file_data): Delete.
15482 (string_file::~string_file, string_file::write)
15483 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15484 (do_ui_file_as_string, ui_file_as_string): Delete.
15485 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15486 (struct mem_file): Delete.
15487 (mem_file_new): Delete.
15488 (stdio_file::stdio_file): New.
15489 (mem_file_delete): Delete.
15490 (stdio_file::stdio_file): New.
15491 (mem_fileopen): Delete.
15492 (stdio_file::~stdio_file): New.
15493 (mem_file_rewind): Delete.
15494 (stdio_file::set_stream): New.
15495 (mem_file_put): Delete.
15496 (stdio_file::open): New.
15497 (mem_file_write): Delete.
15498 (stdio_file_magic, struct stdio_file): Delete.
15499 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15500 (stdio_file::flush): New.
15501 (stdio_file_read): Rename to ...
15502 (stdio_file::read): ... this. Adjust.
15503 (stdio_file_write): Rename to ...
15504 (stdio_file::write): ... this. Adjust.
15505 (stdio_file_write_async_safe): Rename to ...
15506 (stdio_file::write_async_safe) ... this. Adjust.
15507 (stdio_file_fputs): Rename to ...
15508 (stdio_file::puts) ... this. Adjust.
15509 (stdio_file_isatty): Delete.
15510 (stdio_file_fseek): Delete.
15511 (stdio_file::isatty): New.
15512 (stderr_file_write): Rename to ...
15513 (stderr_file::write) ... this. Adjust.
15514 (stderr_file_fputs): Rename to ...
15515 (stderr_file::puts) ... this. Adjust.
15516 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15517 (stderr_file::stderr_file): New.
15518 (tee_file_magic): Delete.
15519 (struct tee_file): Delete.
15520 (tee_file::tee_file): New.
15521 (tee_file_new): Delete.
15522 (tee_file::~tee_file): New.
15523 (tee_file_delete): Delete.
15524 (tee_file_flush): Rename to ...
15525 (tee_file::flush): ... this. Adjust.
15526 (tee_file_write): Rename to ...
15527 (tee_file::write): ... this. Adjust.
15528 (tee_file::write_async_safe): New.
15529 (tee_file_fputs): Rename to ...
15530 (tee_file::puts): ... this. Adjust.
15531 (tee_file_isatty): Rename to ...
15532 (tee_file::isatty): ... this. Adjust.
15533 * ui-file.h (struct obstack, struct ui_file): Don't
15534 forward-declare.
15535 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15536 (ui_file_write_ftype)
15537 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15538 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15539 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15540 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15541 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15542 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15543 (set_ui_file_fseek): Delete.
15544 (ui_file_data, ui_file_delete, ui_file_rewind)
15545 (struct ui_file): New.
15546 (ui_file_up): New.
15547 (class null_file): New.
15548 (null_stream): Declare.
15549 (ui_file_write_for_put, ui_file_put): Delete.
15550 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15551 Delete.
15552 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15553 (gdb_fopen, tee_file_new): Delete.
15554 (struct string_file): New.
15555 (struct stdio_file): New.
15556 (stdio_file_up): New.
15557 (struct stderr_file): New.
15558 (class tee_file): New.
15559 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15560 of a 'ui_file *'. Adjust.
15561 * ui-out.h (class ui_out) <field_stream>: Likewise.
15562 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15563 (null_stream): Delete.
15564 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15565 Adjust.
15566 * utils.h (struct ui_file): Delete forward declaration..
15567 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15568 (error_stream): Take a 'string_file &' instead of a
15569 'ui_file *'.
15570 * varobj.c (varobj_value_get_print_value): Use string_file.
15571 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15572 * gdbarch.c: Regenerate.
15573
187808b0
PA
155742017-02-02 Pedro Alves <palves@redhat.com>
15575
15576 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15577 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15578 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15579 Adjust to call gdb_print_insn instead of
15580 gdb_disassembler::print_insn.
15581 (dump_insns, do_mixed_source_and_assembly_deprecated)
15582 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15583 'gdbarch' parameter. Remove gdb_disassembler parameter.
15584 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15585 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15586 declaration.
15587 (gdb_pretty_print_insn): Re-add declaration.
15588 * record-btrace.c (btrace_insn_history): Don't allocate a
15589 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15590
7a8eb317
SM
155912017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15592
15593 * disasm.h (gdb_disassembly): Remove file_string parameter.
15594 * disasm.c (gdb_disassembly): Likewise.
15595 * cli/cli-cmds.c (print_disassembly): Adapt.
15596 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15597 * stack.c (do_gdb_disassembly): Likewise.
15598
7346ef59
AA
155992017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15600
15601 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15602 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15603 targets. And if the implicit value is longer than needed, extract
15604 the first bytes instead of the "least significant" ones.
15605
cd4007e4
MM
156062017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15607
15608 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15609 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15610 (btrace_fetch): Assert can_access_registers_ptid.
15611 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15612 validate_registers_access.
15613
cf77c34e
MM
156142017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15615
15616 * gdbthread.h (can_access_registers_ptid): New.
15617 * thread.c (can_access_registers_ptid): New.
15618
be85ce7d
PA
156192017-02-01 Pedro Alves <palves@redhat.com>
15620
15621 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15622
29b0b251
PA
156232017-01-31 Pedro Alves <palves@redhat.com>
15624
15625 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15626 Fix typos.
15627
289b5b24
PA
156282017-01-31 Pedro Alves <palves@redhat.com>
15629
15630 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15631 not used.
15632
b47413b4
PA
156332017-01-31 Pedro Alves <palves@redhat.com>
15634
15635 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15636
60adb36c
PA
156372017-01-31 Pedro Alves <palves@redhat.com>
15638
15639 * common/scoped_restore.h
15640 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15641 change the value's parameter type to T2.
15642 (make_scoped_restore): Likewise.
15643
2735833d
WT
156442017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15645 Richard Henderson <rth@redhat.com>
15646
15647 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15648 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15649 GS_BASE for older kernels.
15650 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15651 GS_BASE for older kernels.
15652 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15653 and GS_BASE to the offset table.
15654 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15655 system register group.
15656 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15657 for older kernels.
15658 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15659 amd64 ABI.
15660 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15661 AMD64_GSBASE_REGNUM.
15662 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15663 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15664 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15665 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15666 i386/64bit-segments.xml in those rules.
15667 * features/i386/64bit-segments.xml: New file.
15668 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15669 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15670 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15671 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15672 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15673 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15674 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15675 * features/i386/amd64-avx-linux.c: Regenerated.
15676 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15677 * features/i386/amd64-avx-mpx.c: Regenerated.
15678 * features/i386/amd64-avx512-linux.c: Regenerated.
15679 * features/i386/amd64-linux.c: Regenerated.
15680 * features/i386/amd64-mpx-linux.c: Regenerated.
15681 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15682 * features/i386/i386-avx-mpx.c: Regenerated.
15683 * features/i386/x32-avx-linux.c: Regenerated.
15684 * features/i386/x32-avx512-linux.c: Regenerated.
15685 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15686 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15687 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15688 * regformats/i386/amd64-linux.dat: Regenerated.
15689 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15690 * regformats/i386/x32-avx-linux.dat: Regenerated.
15691 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15692 * regformats/i386/x32-linux.dat: Regenerated.
15693
8884e97e
WT
156942017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15695
15696 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15697 Set to AMD64_NUM_REGS.
15698
7005d26a
WT
156992017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15700
15701 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15702 that checks validity of a register number.
15703
4bd2e1b2
KC
157042017-01-27 Kees Cook <keescook@google.com>
15705
15706 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15707 fetch_fpregs if target has fpa registers.
15708 (arm_linux_store_inferior_registers): Call store_fpregs if target
15709 has fpa registers.
15710
7cf1de6c
AA
157112017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15712
15713 * cris-tdep.c (cris_gdbarch_init): Remove check for
15714 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15715
874a1c8c
AT
157162017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15717
15718 * corelow.c (get_core_register_section): Check for regset
15719 existence before checking for REGSET_VARIABLE_SIZE.
15720
d8b49cf0
YQ
157212017-01-26 Yao Qi <yao.qi@linaro.org>
15722 Pedro Alves <palves@redhat.com>
15723
15724 PR gdb/20939
15725 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15726 call memory_error, save memaddr instead.
15727 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15728 negative, cal memory_error.
15729 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15730
658ca58c
YQ
157312017-01-26 Yao Qi <yao.qi@linaro.org>
15732
15733 * disasm-selftests.c (memory_error_test): New function.
15734 (_initialize_disasm_selftests): Register memory_error_test.
15735
79843d45
YQ
157362017-01-26 Yao Qi <yao.qi@linaro.org>
15737
15738 * Makefile.in (SFILES): Add disasm-selftests.c and
15739 selftest-arch.c.
15740 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15741 * disasm-selftests.c: New file.
15742 * selftest-arch.c: New file.
15743 * selftest-arch.h: New file.
15744
8cafda32
YQ
157452017-01-26 Yao Qi <yao.qi@linaro.org>
15746
15747 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15748 to bfd_arch_mep. Don't return 0 if section is not
15749 found. Call print_insn_mep.
15750
e47ad6c0
YQ
157512017-01-26 Pedro Alves <palves@redhat.com>
15752 Yao Qi <yao.qi@linaro.org>
15753
15754 * arm-tdep.c: Include "disasm.h".
15755 (gdb_print_insn_arm): Update code to get gdbarch.
15756 * disasm.c (dis_asm_read_memory): Change it to
15757 gdb_disassembler::dis_asm_read_memory.
15758 (dis_asm_memory_error): Likewise.
15759 (dis_asm_print_address): Likewise.
15760 (gdb_pretty_print_insn): Change it to
15761 gdb_disassembler::pretty_print_insn.
15762 (dump_insns): Add one argument gdb_disassemlber. All
15763 callers updated.
15764 (do_mixed_source_and_assembly_deprecated): Likewise.
15765 (do_mixed_source_and_assembly): Likewise.
15766 (do_assembly_only): Likewise.
15767 (gdb_disassembler::gdb_disassembler): New.
15768 (gdb_disassembler::print_insn): New.
15769 * disasm.h (class gdb_disassembler): New.
15770 (gdb_pretty_print_insn): Remove declaration.
15771 (gdb_disassemble_info): Likewise.
15772 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15773 (gdbscm_disasm_read_memory_worker): Update.
15774 (gdbscm_disasm_read_memory): Update.
15775 (gdbscm_disasm_memory_error): Remove.
15776 (gdbscm_disasm_print_address): Remove.
15777 (gdbscm_disassembler::gdbscm_disassembler): New.
15778 (gdbscm_print_insn_from_port): Update.
15779 * mips-tdep.c: Include disasm.h.
15780 (gdb_print_insn_mips): Update code to get gdbarch.
15781 * record-btrace.c (btrace_insn_history): Update.
15782 * spu-tdep.c: Include disasm.h.
15783 (struct spu_dis_asm_data): Remove.
15784 (struct spu_dis_asm_info): New.
15785 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15786 SPU id.
15787 (gdb_print_insn_spu): Cast disassemble_info to
15788 spu_dis_asm_info.
15789
80d75874
YQ
157902017-01-26 Yao Qi <yao.qi@linaro.org>
15791
15792 * disasm.c (do_ui_file_delete): Delete.
15793 (gdb_insn_length): Move code creating stream to ...
15794 * utils.c (null_stream): ... here. New function.
15795 * utils.h (null_stream): Declare.
15796
60685cd0
SM
157972017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15798
15799 * python/py-inferior.c (find_thread_object): Return directly
15800 from the loop. Remove "found" variable.
15801
eb1cdb62
JB
158022017-01-21 Joel Brobecker <brobecker@adacore.com>
15803
15804 GDB 7.12.1 released.
15805
b1ce6568
SM
158062017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15807
15808 * python/py-function.c (fnpy_call): Reorder declarations to have
15809 the gdbpy_enter object declared first.
15810 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15811
6f8b0407
SM
158122017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15813
fec93fb1 15814 PR python/21068
6f8b0407
SM
15815 * python/python-internal.h (PyMem_RawMalloc): Define for
15816 Python < 3.4.
15817 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15818 PyMem_RawMalloc instead of PyMem_Malloc.
15819
78cbbba8
LM
158202017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15821 Luis Machado <lgustavo@codesourcery.com>
15822
15823 * NEWS (New commands): Mention flash-erase.
15824 (New MI commands): Mention target-flash-erase.
15825 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15826 command.
15827 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15828 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15829 * target.c (flash_erase_command): New function.
15830 (initialize_targets): Add new flash-erase command.
15831 * target.h (flash_erase_command): New declaration.
15832
2132fe85
JB
158332017-01-20 Joel Brobecker <brobecker@adacore.com>
15834
15835 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15836 HAVE_SYS_PROCFS_H is defined.
15837
d1dff226
AH
158382017-01-18 Alan Hayward <alan.hayward@arm.com>
15839
15840 * remote.c (struct cached_reg): Change data into a pointer.
15841 * (stop_reply_dtr): Free data pointers before deleting vector.
15842 (process_stop_reply): Likewise.
15843 (remote_parse_stop_reply): Allocate space for data
15844
9890e433
AH
158452017-01-18 Alan Hayward <alan.hayward@arm.com>
15846
15847 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15848 MAX_REGISTER_SIZE.
15849 (amd64_pseudo_register_read_value): Likewise.
15850 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15851 (store_register_using_P): Likewise.
15852 * regcache.c (regcache_xfer_part): Likewise.
15853
7a36499a
IR
158542017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15855
15856 Split real and pseudo registers.
15857 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15858 (sparc32_pseudo_regnum): New enum.
15859 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15860 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15861 (SPARC32_CP0_REGISTERS): New macro.
15862 (sparc32_pseudo_register_name): New function.
15863 (sparc32_register_name): Use sparc32_pseudo_register_name.
15864 (sparc32_pseudo_register_type): New function.
15865 (sparc32_register_type): Use sparc32_pseudo_register_type.
15866 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15867 pseudo register numbers.
15868 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15869 (SPARC64_CP0_REGISTERS): New macro.
15870 (sparc64_pseudo_register_name): New function.
15871 (sparc64_register_name): Use sparc64_pseudo_register_name.
15872 (sparc64_pseudo_register_type): New function.
15873 (sparc64_register_type): Use sparc64_pseudo_register_type.
15874 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15875 pseudo register numbers.
15876 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15877 sparc64_store_arguments): Handle pseudo register numbers.
15878
6f8976bf
YQ
158792017-01-13 Yao Qi <yao.qi@linaro.org>
15880
15881 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15882 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15883 output.
15884 (getpkt_or_notif_sane_1): Likewise.
15885
e4241ace
YQ
158862017-01-13 Yao Qi <yao.qi@linaro.org>
15887
15888 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15889 of CC. Pass "-x c++-header" instead of "-x c".
15890
3015c064
SM
158912017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15892
15893 * remote.c (remote_can_async_p): Update comment.
15894
fde1b17d
SM
158952017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15896
15897 * linux-nat.c (linux_nat_can_async_p): Update comment.
15898
ca1ca08b
SM
158992017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15900
15901 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15902
4ad2da73
SM
159032017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15904
15905 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15906
c8b23b3f
TT
159072017-01-10 Tom Tromey <tom@tromey.com>
15908
15909 * python/py-type.c (typy_legacy_template_argument): Update.
15910 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15911 ~demangle_parse_info): Declare new members.
15912 (cp_demangled_name_to_comp): Return unique_ptr.
15913 (cp_demangled_name_parse_free)
15914 (make_cleanup_cp_demangled_name_parse_free)
15915 (cp_new_demangle_parse_info): Remove.
15916 * cp-support.c (do_demangled_name_parse_free_cleanup)
15917 (make_cleanup_cp_demangled_name_parse_free): Remove.
15918 (inspect_type, cp_canonicalize_string_full)
15919 (cp_canonicalize_string): Update.
15920 (mangled_name_to_comp): Change return type.
15921 (cp_class_name_from_physname, method_name_from_physname)
15922 (cp_func_name, cp_remove_params): Update.
15923 * cp-name-parser.y (demangle_parse_info): New constructor, from
15924 cp_new_demangle_parse_info.
15925 (~demangle_parse_info): New destructor, from
15926 cp_demangled_name_parse_free.
15927 (cp_merge_demangle_parse_infos): Update.
15928 (cp_demangled_name_to_comp): Change return type.
15929
1ac32117
TT
159302017-01-10 Tom Tromey <tom@tromey.com>
15931
15932 * top.c (prevent_dont_repeat): Change return type.
15933 * python/python.c (execute_gdb_command): Use std::string.
15934 Update.
15935 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15936 * command.h (prevent_dont_repeat): Change return type.
15937 * breakpoint.c (bpstat_do_actions_1): Update.
15938
0cf08227
TT
159392017-01-10 Tom Tromey <tom@tromey.com>
15940
15941 * value.h (scoped_value_mark::~scoped_value_mark): Call
15942 free_to_mark.
15943 (scoped_value_mark::free_to_mark): New method.
15944 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15945 scoped_value_mark.
15946
eb115069
TT
159472017-01-10 Tom Tromey <tom@tromey.com>
15948
15949 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15950 (valpy_reference_value, valpy_const_value, valpy_get_address)
15951 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15952 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15953 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15954 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15955 scoped_value_mark.
15956 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15957 * value.h (scoped_value_mark): New class.
15958
906768f9
TT
159592017-01-10 Tom Tromey <tom@tromey.com>
15960
15961 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15962 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15963 * psymtab.c (discard_psymtabs_upto): Remove.
15964 (make_cleanup_discard_psymtabs): Remove.
15965 (struct psymtab_state): Remove.
15966
bef155c3
TT
159672017-01-10 Tom Tromey <tom@tromey.com>
15968
15969 * record-full.c (record_full_save_cleanups): Remove.
15970 (record_full_save): Use gdb::unlinker.
15971 * gcore.c (do_bfd_delete_cleanup): Remove.
15972 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15973 cleanups.
15974 * dwarf2read.c (unlink_if_set): Remove.
15975 (write_psymtabs_to_index): Use gdb::unlinker.
15976 * common/gdb_unlinker.h: New file.
15977
192b62ce
TT
159782017-01-10 Tom Tromey <tom@tromey.com>
15979
15980 * windows-tdep.c (windows_xfer_shared_library): Update.
15981 * windows-nat.c (windows_make_so): Update.
15982 * utils.h (make_cleanup_bfd_unref): Remove.
15983 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15984 * symfile.h (symfile_bfd_open)
15985 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15986 * symfile.c (read_symbols, symbol_file_add)
15987 (separate_debug_file_exists): Update.
15988 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15989 (generic_load, reread_symbols): Update.
15990 * symfile-mem.c (symbol_file_add_from_memory): Update.
15991 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15992 (spu_symbol_file_add_from_memory): Update.
15993 * solist.h (struct target_so_ops) <bfd_open>: Return
15994 gdb_bfd_ref_ptr.
15995 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15996 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15997 gdb_bfd_ref_ptr.
15998 (solib_map_sections, reload_shared_libraries_1): Update.
15999 * solib-svr4.c (enable_break): Update.
16000 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16001 * solib-frv.c (enable_break2): Update.
16002 * solib-dsbt.c (enable_break): Update.
16003 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16004 gdb_bfd_ref_ptr.
16005 (darwin_solib_get_all_image_info_addr_at_init): Update.
16006 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16007 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16008 * record-full.c (record_full_save): Update.
16009 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16010 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16011 * minidebug.c (find_separate_debug_file_in_section): Return
16012 gdb_bfd_ref_ptr.
16013 * machoread.c (macho_add_oso_symfile): Change abfd to
16014 gdb_bfd_ref_ptr.
16015 (macho_symfile_read_all_oso): Update.
16016 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16017 (macho_symfile_read): Update.
16018 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16019 (jit_bfd_try_read_symtab): Update.
16020 * gdb_bfd.h (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 (gdb_bfd_ref_policy): New struct.
16025 (gdb_bfd_ref_ptr): New typedef.
16026 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16027 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16028 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16029 gdb_bfd_ref_ptr.
16030 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16031 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16032 (gcore_command): Update.
16033 * exec.c (exec_file_attach): Update.
16034 * elfread.c (elf_symfile_read): Update.
16035 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16036 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16037 (open_and_init_dwo_file): Update.
16038 (open_dwp_file): Return gdb_bfd_ref_ptr.
16039 (open_and_init_dwp_file): Update.
16040 * corelow.c (core_open): Update.
16041 * compile/compile-object-load.c (compile_object_load): Update.
16042 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16043 * coffread.c (coff_symfile_read): Update.
16044 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16045 gdb_bfd_ref_ptr. Rename.
16046 (dump_bfd_file, restore_command): Update.
16047 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16048 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16049 (find_separate_debug_file_by_buildid): Update.
16050
50315b21
TT
160512017-01-10 Tom Tromey <tom@tromey.com>
16052
16053 * common/gdb_ref_ptr.h: New file.
16054 * python/py-ref.h (struct gdbpy_ref_policy): New.
16055 (gdbpy_ref): Now a typedef.
16056
fc4007c9
TT
160572017-01-10 Tom Tromey <tom@tromey.com>
16058
16059 * utils.h (make_cleanup_htab_delete): Don't declare.
16060 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16061 Remove.
16062 * linespec.c (decode_compound_collector): Add constructor,
16063 destructor.
16064 (lookup_prefix_sym): Remove cleanup.
16065 (symtab_collector): Add constructor, destructor.
16066 (collect_symtabs_from_filename): Remove cleanup.
16067 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16068 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16069 Use htab_up.
16070 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16071 * dwarf2read.c (dw2_expand_symtabs_matching)
16072 (dw2_map_symbol_filenames, dwarf_decode_macros)
16073 (write_psymtabs_to_index): Use htab_up.
16074 * dwarf2loc.c (func_verify_no_selftailcall)
16075 (call_site_find_chain_1, func_verify_no_selftailcall)
16076 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16077 std::vector, gdb::unique_xmalloc_ptr.
16078 (call_sitep): Remove typedef.
16079 (dwarf2_locexpr_baton_eval): Remove unused variable.
16080
8dbcee67
TT
160812017-01-10 Tom Tromey <tom@tromey.com>
16082
16083 * python/python-internal.h (make_cleanup_py_decref)
16084 (make_cleanup_py_xdecref): Don't declare.
16085 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16086 (py_xdecref, make_cleanup_py_xdecref): Remove.
16087
13df46cc
TT
160882017-01-10 Tom Tromey <tom@tromey.com>
16089
16090 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16091 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16092
06fc9bf7
TT
160932017-01-10 Tom Tromey <tom@tromey.com>
16094
16095 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16096
830a4934
TT
160972017-01-10 Tom Tromey <tom@tromey.com>
16098
16099 * python/py-utils.c (unicode_to_encoded_string)
16100 (python_string_to_target_string)
16101 (python_string_to_target_python_string)
16102 (python_string_to_host_string, gdbpy_obj_to_string)
16103 (get_addr_from_python): Use gdbpy_ref.
16104
4586d543
TT
161052017-01-10 Tom Tromey <tom@tromey.com>
16106
16107 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16108 gdbpy_ref.
16109
59876f8f
TT
161102017-01-10 Tom Tromey <tom@tromey.com>
16111
16112 * python/python.c (eval_python_command, gdbpy_decode_line)
16113 (gdbpy_run_events, gdbpy_start_type_printers)
16114 (gdbpy_apply_type_printers): Use gdbpy_ref.
16115
97d83487
TT
161162017-01-10 Tom Tromey <tom@tromey.com>
16117
16118 * python/py-param.c (get_doc_string, compute_enum_values): Use
16119 gdbpy_ref.
16120
9205649a
TT
161212017-01-10 Tom Tromey <tom@tromey.com>
16122
16123 * python/py-inferior.c (find_thread_object, build_inferior_list):
16124 Use gdbpy_ref.
16125
74c49d45
TT
161262017-01-10 Tom Tromey <tom@tromey.com>
16127
16128 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16129
16361ffb
TT
161302017-01-10 Tom Tromey <tom@tromey.com>
16131
16132 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16133 gdbpy_ref.
16134
905f2cca
TT
161352017-01-10 Tom Tromey <tom@tromey.com>
16136
16137 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16138 extra incref.
16139 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16140 Use gdbpy_ref.
16141
64081434
TT
161422017-01-10 Tom Tromey <tom@tromey.com>
16143
16144 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16145 gdbpy_ref.
16146
59e9e831
TT
161472017-01-10 Tom Tromey <tom@tromey.com>
16148
16149 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16150 decref results of PyArg_ParseTupleAndKeywords.
16151
9de10f6d
TT
161522017-01-10 Tom Tromey <tom@tromey.com>
16153
16154 * python/python.c (python_run_simple_file): Use
16155 unique_xmalloc_ptr, gdbpy_ref.
16156
2bd5759d
TT
161572017-01-10 Tom Tromey <tom@tromey.com>
16158
16159 * python/py-prettyprint.c (print_stack_unless_memory_error)
16160 (print_string_repr, print_children): Use gdbpy_ref.
16161 (dummy_python_frame): New class.
16162 (dummy_python_frame::dummy_python_frame): Rename from
16163 push_dummy_python_frame.
16164 (py_restore_tstate): Remove.
16165
3b4e0e01
TT
161662017-01-10 Tom Tromey <tom@tromey.com>
16167
16168 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16169
17a22718
TT
161702017-01-10 Tom Tromey <tom@tromey.com>
16171
16172 * python/python.c (ensure_python_env, restore_python_env):
16173 Remove.
16174 * python/python-internal.h (ensure_python_env): Don't declare.
16175 * varobj.h (varobj_ensure_python_env): Don't declare.
16176 * varobj.c (varobj_ensure_python_env): Remove.
16177
68cdc557
TT
161782017-01-10 Tom Tromey <tom@tromey.com>
16179
16180 * varobj.c (varobj_value_get_print_value): Use
16181 gdbpy_enter_varobj.
16182
1eba6383
TT
161832017-01-10 Tom Tromey <tom@tromey.com>
16184
16185 * python/py-prettyprint.c (print_string_repr, print_children):
16186 Update.
16187 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16188 of "encoding".
16189 * varobj.c (varobj_value_get_print_value): Update.
16190 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16191
bde7b3e3
TT
161922017-01-10 Tom Tromey <tom@tromey.com>
16193
16194 * varobj.c (varobj_get_display_hint)
16195 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16196 (varobj_set_visualizer, free_variable): Use
16197 gdbpy_enter_varobj.
16198
a7785f8c
TT
161992017-01-10 Tom Tromey <tom@tromey.com>
16200
16201 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16202 (do_finish_initialization): New function. Use gdbpy_ref.
16203 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16204 do_finish_initialization.
16205
2865bfce
TT
162062017-01-10 Tom Tromey <tom@tromey.com>
16207
16208 * python/py-param.c (get_set_value, get_show_value): Use
16209 gdbpy_enter, gdbpy_ref.
16210
0e9dcc75
TT
162112017-01-10 Tom Tromey <tom@tromey.com>
16212
16213 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16214
12a5cedd
TT
162152017-01-10 Tom Tromey <tom@tromey.com>
16216
16217 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16218
788f2586
TT
162192017-01-10 Tom Tromey <tom@tromey.com>
16220
16221 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16222 Use gdbpy_enter_varobj.
16223
6cd67bea
TT
162242017-01-10 Tom Tromey <tom@tromey.com>
16225
16226 * varobj.c (gdbpy_enter_varobj): New constructor.
16227 * python/python-internal.h (gdbpy_enter_varobj): New class.
16228 * python/py-varobj.c (py_varobj_get_iterator): Use
16229 gdbpy_enter_varobj.
16230
14b122bf
TT
162312017-01-10 Tom Tromey <tom@tromey.com>
16232
16233 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16234 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16235 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16236 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16237 unique_xmalloc_ptr.
16238 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16239
bf1ca3b9
TT
162402017-01-10 Tom Tromey <tom@tromey.com>
16241
16242 * python/py-xmethods.c (invoke_match_method): Use
16243 gdbpy_ref.
16244
572a5524
TT
162452017-01-10 Tom Tromey <tom@tromey.com>
16246
16247 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16248 gdbpy_enter, gdbpy_ref.
16249
396a78b6
TT
162502017-01-10 Tom Tromey <tom@tromey.com>
16251
16252 * python/python.c (python_interactive_command): Use gdbpy_enter.
16253
a88b13c7
TT
162542017-01-10 Tom Tromey <tom@tromey.com>
16255
16256 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16257 gdbpy_ref.
16258
e9f0c363
TT
162592017-01-10 Tom Tromey <tom@tromey.com>
16260
16261 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16262 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16263
6349f452
TT
162642017-01-10 Tom Tromey <tom@tromey.com>
16265
16266 * utils.h (htab_deleter): New struct.
16267 (htab_up): New typedef.
16268 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16269 gdbpy_enter, gdbpy_ref, htab_up.
16270
c0171de6
TT
162712017-01-10 Tom Tromey <tom@tromey.com>
16272
16273 * python/py-unwind.c (pending_frame_invalidate): Remove.
16274 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16275
f18e226f
TT
162762017-01-10 Tom Tromey <tom@tromey.com>
16277
16278 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16279 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16280
c57af3f1
TT
162812017-01-10 Tom Tromey <tom@tromey.com>
16282
16283 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16284
60e600ec
TT
162852017-01-10 Tom Tromey <tom@tromey.com>
16286
16287 * python/python.c (gdbpy_eval_from_control_command)
16288 (gdbpy_source_script, gdbpy_run_events)
16289 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16290 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16291 gdbpy_enter.
16292
bf7da5b0
TT
162932017-01-10 Tom Tromey <tom@tromey.com>
16294
16295 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16296
2d38bced
TT
162972017-01-10 Tom Tromey <tom@tromey.com>
16298
16299 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16300
07bc7329
TT
163012017-01-10 Tom Tromey <tom@tromey.com>
16302
16303 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16304 (python_on_inferior_call_pre, python_on_inferior_call_post)
16305 (python_on_memory_change, python_on_register_change)
16306 (python_inferior_exit, python_new_objfile, add_thread_object)
16307 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16308
6e7c365e
TT
163092017-01-10 Tom Tromey <tom@tromey.com>
16310
16311 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16312 (bpfinishpy_handle_exit): Use gdbpy_enter.
16313
6ba0cd40
TT
163142017-01-10 Tom Tromey <tom@tromey.com>
16315
16316 * python/py-cmd.c (cmdpy_destroyer)
16317 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16318 gdbpy_enter.
16319
de2dc875
TT
163202017-01-10 Tom Tromey <tom@tromey.com>
16321
16322 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16323 gdbpy_enter.
16324 (gdbpy_breakpoint_has_cond): Likewise.
16325
4ecee2c4
TT
163262017-01-10 Tom Tromey <tom@tromey.com>
16327
16328 * python/python.c (gdbpy_enter): New constructor.
16329 (~gdbpy_enter): New destructor.
16330 (restore_python_env, ensure_python_env): Rewrite.
16331 * python/python-internal.h (gdbpy_enter): New class.
16332
37fce74f
TT
163332017-01-10 Tom Tromey <tom@tromey.com>
16334
16335 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16336
53a0cca3
TT
163372017-01-10 Tom Tromey <tom@tromey.com>
16338
16339 * python/py-value.c (value_has_field, get_field_flag)
16340 (get_field_type, valpy_getitem, convert_value_from_python): Use
16341 gdbpy_ref.
16342
ff3724f5
TT
163432017-01-10 Tom Tromey <tom@tromey.com>
16344
16345 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16346 gdbpy_ref.
16347
0700aea5
TT
163482017-01-10 Tom Tromey <tom@tromey.com>
16349
16350 * python/py-prettyprint.c (search_pp_list)
16351 (find_pretty_printer_from_objfiles)
16352 (find_pretty_printer_from_progspace)
16353 (find_pretty_printer_from_gdb, find_pretty_printer)
16354 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16355 gdbpy_ref.
16356
1bb44c9f
TT
163572017-01-10 Tom Tromey <tom@tromey.com>
16358
16359 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16360
87ce03fd
TT
163612017-01-10 Tom Tromey <tom@tromey.com>
16362
16363 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16364 (ltpy_get_all_source_lines): Use gdbpy_ref.
16365
ee0a3fb8
TT
163662017-01-10 Tom Tromey <tom@tromey.com>
16367
16368 * python/py-framefilter.c (extract_sym, extract_value)
16369 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16370 gdbpy_ref.
16371
bf2a52fa
TT
163722017-01-10 Tom Tromey <tom@tromey.com>
16373
16374 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16375
f59fe7f8
TT
163762017-01-10 Tom Tromey <tom@tromey.com>
16377
16378 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16379
80bd970a
TT
163802017-01-10 Tom Tromey <tom@tromey.com>
16381
16382 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16383 gdbpy_ref.
16384
d1b3de2e
TT
163852017-01-10 Tom Tromey <tom@tromey.com>
16386
16387 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16388
3bb43384
TT
163892017-01-10 Tom Tromey <tom@tromey.com>
16390
16391 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16392 (typy_range): Use gdbpy_ref.
16393
abf5651e
TT
163942017-01-10 Tom Tromey <tom@tromey.com>
16395
16396 * python/py-threadevent.c (create_thread_event_object): Use
16397 gdbpy_ref.
16398 * python/py-stopevent.c (create_stop_event_object): Simplify.
16399 (emit_stop_event): Use gdbpy_ref.
16400 * python/py-signalevent.c (create_signal_event_object): Use
16401 gdbpy_ref.
16402 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16403 (emit_new_objfile_event, create_clear_objfiles_event_object)
16404 (emit_clear_objfiles_event): Use gdbpy_ref.
16405 * python/py-infevents.c (create_inferior_call_event_object)
16406 (create_register_changed_event_object)
16407 (create_memory_changed_event_object, emit_inferior_call_event)
16408 (emit_memory_changed_event, emit_register_changed_event): Use
16409 gdbpy_ref.
16410 * python/py-exitedevent.c (create_exited_event_object)
16411 (emit_exited_event): Use gdbpy_ref.
16412 * python/py-event.h (evpy_emit_event): Remove
16413 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16414 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16415 * python/py-continueevent.c (emit_continue_event): Use
16416 gdbpy_ref.
16417 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16418 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16419 gdbpy_ref.
16420 * python/py-bpevent.c (create_breakpoint_event_object): Use
16421 gdbpy_ref.
16422
a68ff33e
TT
164232017-01-10 Tom Tromey <tom@tromey.com>
16424
16425 * python/py-ref.h: New file.
16426
7becfd03
SM
164272017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16428
16429 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16430 void.
16431 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16432 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16433 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16434 * ui-out.c (ui_out::redirect): Likewise.
16435 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16436 * cli/cli-logging.c (set_logging_redirect): Update call site of
16437 ui_out::redirect.
16438 (handle_redirections): Likewise.
16439 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16440 * top.c (execute_command_to_string): Likewise.
16441 * utils.c (do_ui_out_redirect_pop): Likewise.
16442
df294654
SM
164432017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16444
16445 * stack.c (_initialize_stack): Update "frame" command help message.
16446
f5e6296e
IB
164472017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16448
16449 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16450
0e2d6fa6
YQ
164512017-01-06 Yao Qi <yao.qi@linaro.org>
16452
16453 * x86-linux-nat.h: Include gdb_proc_service.h.
16454
44d6d3f9
YQ
164552017-01-06 Yao Qi <yao.qi@linaro.org>
16456
16457 * ser-base.h: Include serial.h.
16458
656731fe
YQ
164592017-01-06 Yao Qi <yao.qi@linaro.org>
16460
16461 * ppc-linux-tdep.h: Include ppc-tdep.h.
16462
1ca8f924
YQ
164632017-01-06 Yao Qi <yao.qi@linaro.org>
16464
16465 * nat/amd64-linux-siginfo.h: Include signal.h.
16466
bc3008c4
YQ
164672017-01-06 Yao Qi <yao.qi@linaro.org>
16468
16469 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16470
66c80d03
YQ
164712017-01-06 Yao Qi <yao.qi@linaro.org>
16472
16473 * mi/mi-parse.h: Include mi-cmds.h.
16474
051d2dda
YQ
164752017-01-06 Yao Qi <yao.qi@linaro.org>
16476
16477 * inf-loop.c: Don't include "target.h".
16478 * inf-loop.h: Include it here.
16479
8018d34f
YQ
164802017-01-06 Yao Qi <yao.qi@linaro.org>
16481
16482 * dfp.h: Include "dboulest.h" and "expression.h".
16483
c0b8369c
YQ
164842017-01-06 Yao Qi <yao.qi@linaro.org>
16485
16486 * ax-gdb.h: Include "ax.h".
16487
ad5cba2a
YQ
164882017-01-06 Yao Qi <yao.qi@linaro.org>
16489
16490 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16491 with nat/gdb_ptrace.h.
16492
1c33cd7f
YQ
164932017-01-05 Yao Qi <yao.qi@linaro.org>
16494
16495 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16496 new line.
16497 (mips64_fbsd_sigframe_init): Likewise.
16498
c988ac1d
JB
164992017-01-04 John Baldwin <jhb@FreeBSD.org>
16500
16501 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16502 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16503
b268007c
JB
165042017-01-04 John Baldwin <jhb@FreeBSD.org>
16505
16506 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16507 * NEWS: Mention new FreeBSD/mips native configuration.
16508 * config/mips/fbsd.mh: New file.
16509 * configure.host: Add mips*-*-freebsd*.
16510 * mips-fbsd-nat.c: New file.
16511
387360da
JB
165122017-01-04 John Baldwin <jhb@FreeBSD.org>
16513
16514 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16515 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16516 * NEWS: Mention new FreeBSD/mips target.
16517 * configure.tgt: Add mips*-*-freebsd*.
16518 * mips-fbsd-tdep.c: New file.
16519 * mips-fbsd-tdep.h: New file.
16520
2aaaf250
YQ
165212017-01-04 Yao Qi <yao.qi@linaro.org>
16522
16523 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16524 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16525
61baf725
JB
165262017-01-01 Joel Brobecker <brobecker@adacore.com>
16527
6dbb839a 16528 Update copyright year range in all GDB files.
61baf725 16529
c113e7ff 165302017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16531
c113e7ff 16532 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16533
c113e7ff 16534For older changes see ChangeLog-2016.
c906108c
SS
16535\f
16536Local Variables:
16537mode: change-log
16538left-margin: 8
16539fill-column: 74
16540version-control: never
57da7796 16541coding: utf-8
c906108c 16542End: