Change int -> bool where applicable throughout varobj
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
4c37490d
SM
12017-11-23 Simon Marchi <simon.marchi@ericsson.com>
2
3 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
4 (ada_value_has_mutated): Likewise.
5 * c-varobj.c (varobj_is_anonymous_child): Likewise.
6 (c_is_path_expr_parent): Likewise.
7 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
8 (mi_cmd_var_set_frozen): Likewise.
9 (mi_cmd_var_update_iter): Likewise.
10 (mi_cmd_var_update): Likewise.
11 * varobj.c (pretty_printing): Likewise.
12 (varobj_enable_pretty_printing): Likewise.
13 (struct varobj_root) <floating, is_valid>: Likewise.
14 (struct varobj_dynamic) <children_requested>: Likewise.
15 (delete_variable): Likewise.
16 (delete_variable_1): Likewise.
17 (install_variable): Likewise.
18 (update_type_if_necessary): Likewise.
19 (install_new_value): Likewise.
20 (value_of_root): Likewise.
21 (is_root_p): Likewise.
22 (varobj_create): Likewise.
23 (varobj_delete): Likewise.
24 (varobj_has_more): Likewise.
25 (varobj_set_frozen): Likewise.
26 (varobj_get_frozen): Likewise.
27 (install_dynamic_child): Likewise.
28 (dynamic_varobj_has_child_method): Likewise.
29 (update_dynamic_varobj_children): Likewise.
30 (varobj_get_num_children): Likewise.
31 (varobj_list_children): Likewise.
32 (is_path_expr_parent): Likewise.
33 (varobj_default_is_path_expr_parent): Likewise.
34 (varobj_is_dynamic_p): Likewise.
35 (varobj_set_value): Likewise.
36 (varobj_value_has_mutated): Likewise.
37 (varobj_update): Likewise.
38 (check_scope): Likewise.
39 (value_of_root_1): Likewise.
40 (varobj_value_get_print_value): Likewise.
41 (varobj_editable_p): Likewise.
42 (varobj_value_is_changeable_p): Likewise.
43 (varobj_floating_p): Likewise.
44 (varobj_default_value_is_changeable_p): Likewise.
45 (varobj_invalidate_iter): Likewise.
46 * varobj.h (struct varobj_update_result) <type_changed,
47 children_changed, changed, value_installed>: Likewise.
48 (struct varobj) <updated, frozen, not_fetched>: Likewise.
49 (struct lang_varobj_ops) <value_is_changeable_p,
50 value_has_mutated, is_path_expr_parent>: Likewise.
51 (varobj_delete): Likewise.
52 (varobj_set_frozen): Likewise.
53 (varobj_get_frozen): Likewise.
54 (varobj_set_value): Likewise.
55 (varobj_update): Likewise.
56 (varobj_editable_p): Likewise.
57 (varobj_floating_p): Likewise.
58 (varobj_has_more): Likewise.
59 (varobj_is_dynamic_p): Likewise.
60 (varobj_default_value_is_changeable_p): Likewise.
61 (varobj_value_is_changeable_p): Likewise.
62 (varobj_is_anonymous_child): Likewise.
63 (varobj_default_is_path_expr_parent): Likewise.
64
9c23b42f
SDJ
652017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
66
67 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
68 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
69 <type_str>: Convert to 'std::string'.
70 <expr>: Convert to 'expression_up'.
71 (dtrace_probe_arg_s): Delete type and VEC.
72 (dtrace_probe_enabler_s): Likewise.
73 (struct dtrace_probe): Replace by...
74 (class dtrace_static_probe_ops): ...this and...
75 (class dtrace_probe): ...this.
76 (dtrace_probe_is_linespec): Rename to...
77 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
78 to reflect change.
79 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
80 Adjust code. Create new instance of 'dtrace_probe'.
81 (dtrace_build_arg_exprs): Rename to...
82 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
83 reflect change.
84 (dtrace_get_probes): Rename to...
85 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
86 to reflect change.
87 (dtrace_get_arg): Rename to...
88 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
89 reflect change.
90 (dtrace_probe_is_enabled): Rename to...
91 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
92 change.
93 (dtrace_get_probe_address): Rename to...
94 (dtrace_probe::get_relocated_address): ...this. Adjust code
95 to reflect change.
96 (dtrace_get_probe_argument_count): Rename to...
97 (dtrace_probe::get_argument_count): ...this. Adjust code to
98 reflect change.
99 (dtrace_can_evaluate_probe_arguments): Rename to...
100 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
101 to reflect change.
102 (dtrace_evaluate_probe_argument): Rename to...
103 (dtrace_probe::evaluate_argument): ...this. Adjust code to
104 reflect change.
105 (dtrace_compile_to_ax): Rename to...
106 (dtrace_probe::compile_to_ax): ...this. Adjust code to
107 reflect change.
108 (dtrace_probe_destroy): Delete.
109 (dtrace_type_name): Rename to...
110 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
111 reflect change.
112 (dtrace_probe::get_static_ops): New method.
113 (dtrace_gen_info_probes_table_header): Rename to...
114 (dtrace_static_probe_ops::gen_info_probes_table_header):
115 ...this. Adjust code to reflect change.
116 (dtrace_gen_info_probes_table_values): Rename to...
117 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
118 code to reflect change.
119 (dtrace_enable_probe): Rename to...
120 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
121 change.
122 (dtrace_disable_probe): Rename to...
123 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
124 change.
125 (struct probe_ops dtrace_probe_ops): Delete.
126 (info_probes_dtrace_command): Call 'info_probes_for_spops'
127 instead of 'info_probes_for_ops'.
128 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
129 of 'all_probe_ops'.
130
0e9ae10f
SDJ
1312017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
132 Simon Marchi <simark@simark.ca>
133
134 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
135 variable.
136 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
137 <aexpr>: Change type to 'expression_up'.
138 (stap_probe_arg_s): Delete type and VEC.
139 (struct stap_probe): Delete. Replace by...
140 (class stap_static_probe_ops): ...this and...
141 (class stap_probe): ...this. Rename variables to add 'm_'
142 prefix. Do not use 'union' for arguments anymore.
143 (stap_get_expected_argument_type): Receive probe name instead
144 of 'struct stap_probe'. Adjust code.
145 (stap_parse_probe_arguments): Rename to...
146 (stap_probe::parse_arguments): ...this. Adjust code to
147 reflect change.
148 (stap_get_probe_address): Rename to...
149 (stap_probe::get_relocated_address): ...this. Adjust code
150 to reflect change.
151 (stap_get_probe_argument_count): Rename to...
152 (stap_probe::get_argument_count): ...this. Adjust code
153 to reflect change.
154 (stap_get_arg): Rename to...
155 (stap_probe::get_arg_by_number'): ...this. Adjust code to
156 reflect change.
157 (can_evaluate_probe_arguments): Rename to...
158 (stap_probe::can_evaluate_arguments): ...this. Adjust code
159 to reflect change.
160 (stap_evaluate_probe_argument): Rename to...
161 (stap_probe::evaluate_argument): ...this. Adjust code
162 to reflect change.
163 (stap_compile_to_ax): Rename to...
164 (stap_probe::compile_to_ax): ...this. Adjust code to
165 reflect change.
166 (stap_probe_destroy): Delete.
167 (stap_modify_semaphore): Adjust comment.
168 (stap_set_semaphore): Rename to...
169 (stap_probe::set_semaphore): ...this. Adjust code to reflect
170 change.
171 (stap_clear_semaphore): Rename to...
172 (stap_probe::clear_semaphore): ...this. Adjust code to
173 reflect change.
174 (stap_probe::get_static_ops): New method.
175 (handle_stap_probe): Adjust code to create instance of
176 'stap_probe'.
177 (stap_get_probes): Rename to...
178 (stap_static_probe_ops::get_probes): ...this. Adjust code to
179 reflect change.
180 (stap_probe_is_linespec): Rename to...
181 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
182 reflect change.
183 (stap_type_name): Rename to...
184 (stap_static_probe_ops::type_name): ...this. Adjust code to
185 reflect change.
186 (stap_gen_info_probes_table_header): Rename to...
187 (stap_static_probe_ops::gen_info_probes_table_header):
188 ...this. Adjust code to reflect change.
189 (stap_gen_info_probes_table_values): Rename to...
190 (stap_probe::gen_info_probes_table_values): ...this. Adjust
191 code to reflect change.
192 (struct probe_ops stap_probe_ops): Delete.
193 (info_probes_stap_command): Use 'info_probes_for_spops'
194 instead of 'info_probes_for_ops'.
195 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
196 of 'all_probe_ops'.
197
935676c9
SDJ
1982017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
199
200 * break-catch-throw.c (fetch_probe_arguments): Use
201 'probe.prob' instead of 'probe.probe'.
202 * breakpoint.c (create_longjmp_master_breakpoint): Call
203 'can_evaluate_arguments' and 'get_relocated_address' methods
204 from probe.
205 (create_exception_master_breakpoint): Likewise.
206 (add_location_to_breakpoint): Use 'sal->prob' instead of
207 'sal->probe'.
208 (bkpt_probe_insert_location): Call 'set_semaphore' method from
209 probe.
210 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
211 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
212 of 'probe_ops'.
213 (probe_key_free): Call 'delete' on probe.
214 (check_exception_resume): Use 'probe.prob' instead of
215 'probe.probe'.
216 * location.c (string_to_event_location_basic): Call
217 'probe_linespec_to_static_ops'.
218 * probe.c (class any_static_probe_ops): New class.
219 (any_static_probe_ops any_static_probe_ops): New variable.
220 (parse_probes_in_pspace): Receive 'static_probe_ops' as
221 argument. Adjust code to reflect change.
222 (parse_probes): Use 'static_probe_ops' instead of
223 'probe_ops'. Adjust code to reflect change.
224 (find_probes_in_objfile): Call methods to get name and
225 provider from probe.
226 (find_probe_by_pc): Use 'result.prob' instead of
227 'result.probe'. Call 'get_relocated_address' method from
228 probe.
229 (collect_probes): Adjust comment and argument list to receive
230 'static_probe_ops' instead of 'probe_ops'. Adjust code to
231 reflect change. Call necessary methods from probe.
232 (compare_probes): Call methods to get name and provider from
233 probes.
234 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
235 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
236 adjust code accordingly.
237 (print_ui_out_not_applicables): Likewise.
238 (info_probes_for_ops): Rename to...
239 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
240 as argument instead of 'probe_ops'. Adjust code. Call
241 necessary methods from probe.
242 (info_probes_command): Use 'info_probes_for_spops'.
243 (enable_probes_command): Pass correct argument to
244 'collect_probes'. Call methods from probe.
245 (disable_probes_command): Likewise.
246 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
247 (get_probe_argument_count): Move to
248 'any_static_probe_ops::get_argument_count'.
249 (can_evaluate_probe_arguments): Move to
250 'any_static_probe_ops::can_evaluate_arguments'.
251 (evaluate_probe_argument): Move to
252 'any_static_probe_ops::evaluate_argument'.
253 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
254 'probe.probe'.
255 (probe_linespec_to_ops): Rename to...
256 (probe_linespec_to_static_ops): ...this. Adjust code.
257 (probe_any_is_linespec): Rename to...
258 (any_static_probe_ops::is_linespec): ...this.
259 (probe_any_get_probes): Rename to...
260 (any_static_probe_ops::get_probes): ...this.
261 (any_static_probe_ops::type_name): New method.
262 (any_static_probe_ops::gen_info_probes_table_header): New
263 method.
264 (compute_probe_arg): Use 'pc_probe.prob' instead of
265 'pc_probe.probe'. Call methods from probe.
266 (compile_probe_arg): Likewise.
267 (std::vector<const probe_ops *> all_probe_ops): Delete.
268 (std::vector<const static_probe_ops *> all_static_probe_ops):
269 New variable.
270 (_initialize_probe): Use 'all_static_probe_ops' instead of
271 'all_probe_ops'.
272 * probe.h (struct info_probe_column) <field_name>: Delete
273 extraneous newline
274 (info_probe_column_s): Delete type and VEC.
275 (struct probe_ops): Delete. Replace with...
276 (class static_probe_ops): ...this and...
277 (clas probe): ...this.
278 (struct bound_probe) <bound_probe>: Delete extraneous
279 newline. Adjust constructor to receive 'probe' instead of
280 'struct probe'.
281 <probe>: Rename to...
282 <prob>: ...this. Delete extraneous newline.
283 <objfile>: Delete extraneous newline.
284 (register_probe_ops): Delete unused prototype.
285 (info_probes_for_ops): Rename to...
286 (info_probes_for_spops): ...this. Adjust comment.
287 (get_probe_address): Move to 'probe::get_address'.
288 (get_probe_argument_count): Move to
289 'probe::get_argument_count'.
290 (can_evaluate_probe_arguments): Move to
291 'probe::can_evaluate_arguments'.
292 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
293 * solib-svr4.c (struct svr4_info): Adjust comment.
294 (struct probe_and_action) <probe>: Rename to...
295 <prob>: ...this.
296 (register_solib_event_probe): Receive 'probe' instead of
297 'struct probe' as argument. Use 'prob' instead of 'probe'
298 when applicable.
299 (solib_event_probe_action): Call 'get_argument_count' method
300 from probe. Adjust comment.
301 (svr4_handle_solib_event): Adjust comment. Call
302 'evaluate_argument' method from probe.
303 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
304 from probe.
305 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
306 'struct probe'. Call 'can_evaluate_arguments' from probe.
307 * symfile.h: Forward declare 'class probe' instead of 'struct
308 probe'.
309 * symtab.h: Likewise.
310 (struct symtab_and_line) <probe>: Rename to...
311 <prob>: ...this.
312 * tracepoint.c (start_tracing): Use 'prob' when applicable.
313 Call probe methods.
314 (stop_tracing): Likewise.
315
8f6cb6c3
JB
3162017-11-22 Joel Brobecker <brobecker@adacore.com>
317
318 * ravenscar-thread.c (ravenscar_inferior_created): Remove
319 trailing newline at end of string in call to warning.
320
479f8de1
SM
3212017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
322
323 * osdata.h: Include vector isntead of vec.h.
324 (osdata_column_s): Remove typedef.
325 (struct osdata_column): Add constructor.
326 <name, value>: Change type to std::string.
327 (DEF_VEC_O (osdata_column_s)): Remove.
328 (osdata_item_s): Remove typedef.
329 (struct osdata_item) <columns>: Change type to std::vector.
330 (DEF_VEC_O (osdata_item_s)): Remove.
331 (struct osdata): Add constructor.
332 <type>: Change type to std::string.
333 <items>: Change type to std::vector.
334 (osdata_p): Remove typedef.
335 (DEF_VEC_P (osdata_p)): Remove.
336 (osdata_parse): Return a unique_ptr.
337 (osdata_free): Remove.
338 (make_cleanup_osdata_free): Remove.
339 (get_osdata): Return a unique_ptr.
340 (get_osdata_column): Return pointer to std::string, take a
341 reference to osdata_item as parameter.
342 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
343 unique_ptr.
344 <property_name>: Change type to std::string.
345 (osdata_start_osdata): Allocate osdata with new and adjust.
346 (osdata_start_item): Adjust.
347 (osdata_start_column): Adjust.
348 (osdata_end_column): Adjust.
349 (clear_parsing_data): Remove.
350 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
351 (osdata_item_clear): Remove.
352 (get_osdata): return a unique_ptr and adjust.
353 (get_osdata_column): Return a pointer to std::string and adjust.
354 (info_osdata): Adjust.
355 * mi/mi-main.c: Include <map>.
356 (free_vector_of_osdata_items): Remove.
357 (list_available_thread_groups): Adjust, use std::map instead of
358 splay tree.
359
41bd68f5
SM
3602017-11-22 Simon Marchi <simon.marchi@ericsson.com>
361
362 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
363 case in switch.
364
7e2fd2f4
SM
3652017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
366
367 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
368
0604393c
SM
3692017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
370
371 * varobj.h (struct varobj_update_result): Add constructor, add
372 move constructor, disable copy and assign, initialize fields.
373 <newobj>: Change type to std::vector.
374 (varobj_update): Return std::vector.
375 * varobj.c (install_dynamic_child): Change VEC parameters to
376 std::vector and adjust.
377 (update_dynamic_varobj_children): Likewise.
378 (varobj_update): Return std::vector and adjust.
379 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
380
ddf0ea08
SM
3812017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
382
383 * varobj.h (struct varobj) <parent>: Remove const.
384 <children>: Change type to std::vector.
385 (varobj_list_children): Return std::vector const reference.
386 (varobj_restrict_range): Change parameter type to std::vector
387 const reference.
388 * varobj.c (varobj_has_more): Adjust.
389 (varobj_restrict_range): Change parameter type to std::vector
390 const reference and adjust.
391 (install_dynamic_child): Adjust.
392 (update_dynamic_varobj_children): Adjust.
393 (varobj_list_children): Return std::vector const reference and
394 adjust.
395 (varobj_add_child): Adjust.
396 (update_type_if_necessary): Adjust.
397 (varobj_update): Adjust.
398 (delete_variable_1): Adjust.
399 * ada-varobj.c (ada_value_has_mutated): Adjust.
400 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
401
9e5b9d2b
SM
4022017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
403
404 * varobj.h (struct varobj): Add constructor and destructor,
405 initialize fields.
406 * varobj.c (struct varobj_root): Initialize fields.
407 (struct varobj_dynamic): Initialize fields.
408 (varobj_create): Use unique_ptr instead of cleanup. Create
409 varobj with new instead of new_root_variable.
410 (delete_variable_1): Free variable with delete instead of
411 free_variable.
412 (create_child_with_value): Create variable with new instead of
413 new_variable.
414 (varobj::varobj): New.
415 (varobj::~varobj): New (body mostly coming from free_variable).
416 (new_variable): Remove.
417 (free_variable): Remove.
418 (do_free_variable_cleanup): Remove.
419 (make_cleanup_free_variable): Remove.
420
fc35dab1
UW
4212017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
422
423 * core-regset.c: Remove file.
424 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
425
2400729e
UW
4262017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
427
428 * NEWS: Document use of GNU MPFR.
429 * README: Likewise.
430
431 * Makefile.in (LIBMPFR): Add define.
432 (CLIBS): Add $(LIBMPFR).
433 * configure.ac: Add --with-mpfr configure option.
434 * configure: Regenerate.
435 * config.in: Regenerate.
436
437 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
438 (class mpfr_float_ops): New type.
439 (mpfr_float_ops::from_target): Two new overloaded functions.
440 (mpfr_float_ops::to_target): Likewise.
441 (mpfr_float_ops::to_string): New function.
442 (mpfr_float_ops::from_string): Likewise.
443 (mpfr_float_ops::to_longest): Likewise.
444 (mpfr_float_ops::from_longest): Likewise.
445 (mpfr_float_ops::from_ulongest): Likewise.
446 (mpfr_float_ops::to_host_double): Likewise.
447 (mpfr_float_ops::from_host_double): Likewise.
448 (mpfr_float_ops::convert): Likewise.
449 (mpfr_float_ops::binop): Likewise.
450 (mpfr_float_ops::compare): Likewise.
451 (get_target_float_ops): Use mpfr_float_ops if available.
452
7a26362d
UW
4532017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
454
455 * target-float.c: Do not include <math.h>.
456 Include <cmath> and <limits>.
457 (DOUBLEST): Do not define.
458 (class target_float_ops): New type.
459 (class host_float_ops): New templated type.
460 (class decimal_float_ops): New type.
461
462 (floatformat_to_doublest): Rename to ...
463 (host_float_ops<T>::from_target): ... this. Use template type T
464 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
465 (host_float_ops<T>::from_target): New overload using a type argument.
466 (floatformat_from_doublest): Rename to ...
467 (host_float_ops<T>::to_target): ... this. Use template type T
468 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
469 (host_float_ops<T>::to_target): New overload using a type argument.
470 (floatformat_printf_format): New function.
471 (struct printf_length_modifier): New templated type.
472 (floatformat_to_string): Rename to ...
473 (host_float_ops<T>::to_string): ... this. Use type instead of
474 floatformat argument. Use floatformat_printf_format and
475 printf_length_modifier. Remove special handling of invalid numbers,
476 infinities and NaN (moved to target_float_to_string).
477 (struct scanf_length_modifier): New templated type.
478 (floatformat_from_string): Rename to ...
479 (host_float_ops<T>::from_string): ... this. Use type instead of
480 floatformat argument. Use scanf_length_modifier.
481 (floatformat_to_longest): Rename to ...
482 (host_float_ops<T>::to_longest): ... this. Use type instead of
483 floatformat argument. Handle out-of-range values deterministically.
484 (floatformat_from_longest): Rename to ...
485 (host_float_ops<T>::from_longest): ... this. Use type instead of
486 floatformat argument.
487 (floatformat_from_ulongest): Rename to ...
488 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
489 floatformat argument.
490 (floatformat_to_host_double): Rename to ...
491 (host_float_ops<T>::to_host_double): ... this. Use type instead of
492 floatformat argument.
493 (floatformat_from_host_double): Rename to ...
494 (host_float_ops<T>::from_host_double): ... this. Use type instead of
495 floatformat argument.
496 (floatformat_convert): Rename to ...
497 (host_float_ops<T>::convert): ... this. Use type instead of
498 floatformat arguments. Remove handling of no-op conversions.
499 (floatformat_binop): Rename to ...
500 (host_float_ops<T>::binop): ... this. Use type instead of
501 floatformat arguments.
502 (floatformat_compare): Rename to ...
503 (host_float_ops<T>::compare): ... this. Use type instead of
504 floatformat arguments.
505
506 (match_endianness): Use type instead of length/byte_order arguments.
507 (set_decnumber_context): Likewise.
508 (decimal_from_number): Likewise. Update calls.
509 (decimal_to_number): Likewise.
510 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
511 (decimal_float_ops::to_host_double): New dummy function.
512 (decimal_float_ops::from_host_double): Likewise.
513 (decimal_to_string): Rename to ...
514 (decimal_float_ops::to_string): ... this. Use type instead of
515 length/byte_order arguments. Update calls.
516 (decimal_from_string): Rename to ...
517 (decimal_float_ops::from_string): ... this. Use type instead of
518 length/byte_order arguments. Update calls.
519 (decimal_from_longest): Rename to ...
520 (decimal_float_ops::from_longest): ... this. Use type instead of
521 length/byte_order arguments. Update calls.
522 (decimal_from_ulongest): Rename to ...
523 (decimal_float_ops::from_ulongest): ... this. Use type instead of
524 length/byte_order arguments. Update calls.
525 (decimal_to_longest): Rename to ...
526 (decimal_float_ops::to_longest): ... this. Use type instead of
527 length/byte_order arguments. Update calls.
528 (decimal_binop): Rename to ...
529 (decimal_float_ops::binop): ... this. Use type instead of
530 length/byte_order arguments. Update calls.
531 (decimal_compare): Rename to ...
532 (decimal_float_ops::compare): ... this. Use type instead of
533 length/byte_order arguments. Update calls.
534 (decimal_convert): Rename to ...
535 (decimal_float_ops::convert): ... this. Use type instead of
536 length/byte_order arguments. Update calls.
537
538 (target_float_same_category_p): New function.
539 (target_float_same_format_p): Likewise.
540 (target_float_format_length): Likewise.
541 (enum target_float_ops_kind): New type.
542 (get_target_float_ops_kind): New function.
543 (get_target_float_ops): Three new overloaded functions.
544
545 (target_float_is_zero): Update call.
546 (target_float_to_string): Add special handling of invalid numbers,
547 infinities and NaN (moved from floatformat_to_string). Use
548 target_float_ops callback.
549 (target_float_from_string): Use target_float_ops callback.
550 (target_float_to_longest): Likewise.
551 (target_float_from_longest): Likewise.
552 (target_float_from_ulongest): Likewise.
553 (target_float_to_host_double): Likewise.
554 (target_float_from_host_double): Likewise.
555 (target_float_convert): Add special case for no-op conversions.
556 Use target_float_ops callback.
557 (target_float_binop): Use target_float_ops callback.
558 (target_float_compare): Likewise.
559
a9f26f60
YQ
5602017-11-22 Yao Qi <yao.qi@linaro.org>
561
562 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
563
29f9a567
YQ
5642017-11-22 Yao Qi <yao.qi@linaro.org>
565
566 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
567 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
568
3b1b69bf
JG
5692017-11-21 Jerome Guitton <guitton@adacore.com>
570
571 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
572 with event ptid from the lower layer before doing the
573 ravenscar-specific update.
574
54aa6c67
JB
5752017-11-21 Joel Brobecker <brobecker@adacore.com>
576
577 * ravenscar-thread.c (is_ravenscar_task): Also verify that
578 the ptid's TID is nonzero.
579
cf3fbed4
JB
5802017-11-21 Joel Brobecker <brobecker@adacore.com>
581
582 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
583 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
584 Make non-static. Change return type to char *. Adjust code
585 accordingly. Rewrite the function's documentation.
586 (read_atcb): Adjust call to get_tcb_types_info accordingly.
587 * ravenscar-thread.c (ravenscar_inferior_created): Check that
588 we have enough debugging information in the runtime to support
589 Ada task debugging before we enable the ravenscar-thread layer.
590
9edcc12f
JB
5912017-11-21 Joel Brobecker <brobecker@adacore.com>
592
593 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
594 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
595 * ravenscar-thread.c: Add into comment.
596 (base_magic_null_ptid): Delete.
597 (base_ptid): Change documentation.
598 (ravenscar_active_task): Renames ravenscar_running_thread.
599 All callers updated throughout.
600 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
601 (ravenscar_task_is_currently_active): Likewise.
602 (get_base_thread_from_ravenscar_task): Ditto.
603 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
604 (ravenscar_runtime_initialized): Likewise.
605 (get_running_thread_id): Add new parameter "cpu". Adjust
606 implementation to handle this new parameter.
607 (ravenscar_fetch_registers): Small adjustment to use
608 is_ravenscar_task and ravenscar_task_is_currently_active in
609 order to decide whether to use the target beneath or this
610 module's arch_ops.
611 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
612 (ravenscar_stopped_by_sw_breakpoint): Use
613 get_base_thread_from_ravenscar_task to get the underlying
614 thread, rather than using base_ptid.
615 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
616 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
617 Likewise.
618 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
619
65d40437
JB
6202017-11-21 Joel Brobecker <brobecker@adacore.com>
621
622 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
623 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
624 (get_tcb_types_info): Set fieldnos.base_cpu.
625 (read_atcb): Set task_info->base_cpu.
626 (info_task): Print "Base CPU" info if set by runtime.
627
e02544b2
JB
6282017-11-21 Joel Brobecker <brobecker@adacore.com>
629
630 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
631 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
632 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
633 New functions.
634 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
635 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
636 to_stopped_data_address and to_core_of_thread fields of
637 ravenscar_ops.
638
ed0f4273
UW
6392017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
640
641 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
642 (struct gdbarch_tdep): New member long_double_abi.
643 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
644 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
645 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
646 format depending on long_double_abi tdep member.
647 (ppc_floatformat_for_type): Handle __ibm128 type.
648
0fc76421
SM
6492017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
650
651 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
652
e6b2f5ef
PA
6532017-11-21 Pedro Alves <palves@redhat.com>
654
655 * dwarf2read.c (mapped_index::find_name_components_bounds)
656 <completion mode, upper bound>: Use std::lower_bound instead of
657 std::upper_bound.
658 (test_mapped_index_find_name_component_bounds): Remove incorrect
659 "t1_fund" from expected symbols.
660
5c58de74
PA
6612017-11-21 Pedro Alves <palves@redhat.com>
662
663 * dwarf2read.c (mapped_index::name_components_casing): New field.
664 (mapped_index) <build_name_components,
665 find_name_components_bounds): Declare new methods.
666 (mapped_index::find_name_components_bounds)
667 (mapped_index::build_name_components): New methods, factored out
668 from dw2_expand_symtabs_matching_symbol.
669 (check_find_bounds_finds)
670 (test_mapped_index_find_name_component_bounds): New.
671 (run_test): Rename to ...
672 (test_dw2_expand_symtabs_matching_symbol): ... this.
673 (run_test): Reimplement.
674
e1ef7d7a
PA
6752017-11-21 Pedro Alves <palves@redhat.com>
676
677 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
678 (symbol_end): Use cp_ident_is_alnum.
679 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
680 * dwarf2read.c (make_sort_after_prefix_name): New function.
681 (dw2_expand_symtabs_matching_symbol): Use it.
682 (test_symbols): Add more symbols.
683 (run_test): Add tests.
684
cf724bc9
TT
6852017-11-17 Tom Tromey <tom@tromey.com>
686
687 * symtab.h (enum symbol_subclass_kind): New.
688 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
689 Remove.
690 <subclass>: New member.
691 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
692 * rust-lang.c (rust_get_trait_object_pointer): Update.
693 * dwarf2read.c (read_func_scope): Update.
694 (read_variable): Update.
695
68e745e3
TT
6962017-11-17 Tom Tromey <tom@tromey.com>
697
698 * dwarf2read.c (read_func_scope): Update.
699 * symtab.h (struct template_symbol): Derive from symbol.
700 <base>: Remove.
701
71a3c369
TT
7022017-11-17 Tom Tromey <tom@tromey.com>
703
704 * symtab.h (struct symbol) <is_rust_vtable>: New member.
705 (struct rust_vtable_symbol): New.
706 (find_symbol_at_address): Declare.
707 * symtab.c (find_symbol_at_address): New function.
708 * symfile.h (struct quick_symbol_functions)
709 <find_compunit_symtab_by_address>: New member.
710 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
711 function.
712 (debug_sym_quick_functions): Link to
713 debug_qf_find_compunit_symtab_by_address.
714 * rust-lang.c (rust_get_trait_object_pointer): New function.
715 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
716 rust_get_trait_object_pointer.
717 * psymtab.c (psym_relocate): Clear psymbol_map.
718 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
719 functions.
720 (psym_functions): Link to psym_find_compunit_symtab_by_address.
721 * objfiles.h (struct objfile) <psymbol_map>: New member.
722 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
723 (process_die) <DW_TAG_variable>: New case. Call read_variable.
724 (rust_containing_type, read_variable): New functions.
725
7468702d
SM
7262017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
727
728 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
729
37269bc9
SM
7302017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
731
732 * common/filestuff.c: Include <algorithm>.
733 (open_fds): Change type to std::vector<int>.
734 (do_mark_open_fd): Adjust.
735 (unmark_fd_no_cloexec): Adjust.
736 (do_close): Adjust.
737
5c632425
SM
7382017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
739
740 * breakpoint.c (output_thread_groups): Take an std::vector.
741 (print_one_breakpoint_location): Adjust.
742
ced9779b
JB
7432017-11-17 Joel Brobecker <brobecker@adacore.com>
744
745 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
746 (ada_evaluate_subexp_for_cast): New function.
747 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
748 ada_evaluate_subexp_for_cast.
749 (ada_evaluate_subexp) <nosideret>: Replace code by call to
750 eval_skip_value.
751 * eval.c (evaluate_var_value): Make non-static.
752 (evaluate_var_msym_value, eval_skip_value): Likewise.
753 * value.h (evaluate_var_value, evaluate_var_msym_value)
754 (eval_skip_value): Declare.
755
b7e22850
JB
7562017-11-16 Joel Brobecker <brobecker@adacore.com>
757
758 * ada-lang.c (ada_value_cast): Remove parameter "noside".
759 Update all callers.
760
9ccabccd
PA
7612017-11-16 Pedro Alves <palves@redhat.com>
762
763 * python/py-unwind.c (pyuw_sniffer): Translate
764 PyExc_KeyboardInterrupt to a GDB Quit exception.
765
d930703d
PA
7662017-11-16 Pedro Alves <palves@redhat.com>
767
768 * infrun.c (resume_cleanups): Delete.
769 (resume): No longer install a resume_cleanups cleanup nor call
770 QUIT.
771 (proceed): Pass the terminal to the inferior.
772 (keep_going_pass_signal): No longer install a resume_cleanups
773 cleanup.
774
38dc2859
PA
7752017-11-16 Pedro Alves <palves@redhat.com>
776
777 * inf-loop.c (inferior_event_handler): Don't swallow the exception
778 if the prompt is blocked.
779
688fca4f
PA
7802017-11-16 Pedro Alves <palves@redhat.com>
781
782 * breakpoint.c (insert_bp_location): Replace bp_err and
783 bp_err_message locals by a gdb_exception local.
784
e2c33ac7
PA
7852017-11-16 Pedro Alves <palves@redhat.com>
786
787 * inflow.c (scoped_ignore_sigttou): New class.
788 (child_terminal_ours_1, new_tty): Use it.
789
d7236961
UW
7902017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
791
792 * target-float.c (decimal_from_number): Add byte_order argument and
793 call match_endianness. Error if unknown floating-point type.
794 (decimal_to_number): Add byte_order argument and call match_endianness.
795 (decimal_from_longest): Update call. Do not call match_endianness.
796 (decimal_from_ulongest): Likewise.
797 (decimal_binop): Likewise.
798 (decimal_is_zero): Likewise.
799 (decimal_compare): Likewise.
800 (decimal_convert): Likewise.
801
d8ae99a7
PM
8022017-11-16 Phil Muldoon <pmuldoon@redhat.com>
803
804 * python/python.c (gdbpy_rbreak): New function.
805 * NEWS: Document Python rbreak feature.
806
c632b645
YQ
8072017-11-16 Yao Qi <yao.qi@linaro.org>
808
809 * features/tic6x-c62x.xml: Remove.
810 * features/tic6x-c64x.xml: Remove.
811 * features/tic6x-c64xp.xml: Remove.
812
a014b87a
JB
8132017-11-15 John Baldwin <jhb@FreeBSD.org>
814
815 * symtab.h: Include <array>.
816
94765011
JB
8172017-11-15 John Baldwin <jhb@FreeBSD.org>
818
819 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
820 (bsd_kvm_proc_cmd): Likewise.
821
625ad440
SM
8222017-11-15 Simon Marchi <simon.marchi@ericsson.com>
823
824 * tui/tui-win.c (window_name_completer): Replace VEC with
825 std::vector.
826
c0c11fa9
AC
8272017-11-15 Andrew Cagney <cagney@gnu.org>
828
829 * MAINTAINERS: Remove no-longer applicable entries.
830
34a7ebaf
AC
8312017-11-15 Andrew Cagney <cagney@gnu.org>
832
833 * MAINTAINERS: Move self to Past Maintainers.
834
5334ef39
YQ
8352017-11-15 Yao Qi <yao.qi@linaro.org>
836
837 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
838 * features/nios2-linux.c: Remove.
839 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
840 initialize_tdesc_nios2_linux.
841
a714b0d6
YQ
8422017-11-15 Yao Qi <yao.qi@linaro.org>
843
844 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
845 M68HC11_LAST_HARD_REG + 1.
846
92ffd475
PC
8472017-11-14 Paul Carroll <pcarroll@codesourcery.com>
848
849 PR gdb/22388
850 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
851 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
852 Return TARGET_XFER_EOF if size of returned data is 0.
853
07431908
SM
8542017-11-14 Simon Marchi <simon.marchi@ericsson.com>
855
856 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
857 memory-map-selftests.c.
858 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
859 * memory-map.c (memory_map_start_memory): Fix computation of hi
860 address.
861 * unittests/memory-map-selftests.c: New file.
862
31432a67
JB
8632017-11-09 Joel Brobecker <brobecker@adacore.com>
864
865 * ada-lang.c: Fix some typos in the general command documenting
866 how Ada expressions are being evaluated and how their result
867 is printed.
868
e793c052
TT
8692017-11-09 Tom Tromey <tom@tromey.com>
870
871 * psymtab.c (psymbol_hash): Do not hash string contents.
872 (psymbol_compare): Add comment.
873
7e8835c5
TT
8742017-11-09 Tom Tromey <tom@tromey.com>
875
876 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
877
286acbb5
JB
8782017-11-08 Joel Brobecker <brobecker@adacore.com>
879
880 * ada-exp.y (write_var_from_sym): Remove parameter
881 "orig_left_context". Update all callers.
882
b44ec619
SM
8832017-11-08 Simon Marchi <simon.marchi@ericsson.com>
884
885 * tracepoint.h (class collection_list) <stringify>: Return
886 std::vector<std::string>.
887 (encode_actions_rsp): Change parameters to
888 std::vector<std::string> *.
889 * tracepoint.c (collection_list::stringify): Return
890 std::vector<std::string> and adjust accordingly.
891 (encode_actions_rsp): Changee parameters to
892 std::vector<std::string> and adjust accordingly.
893 * remote.c (free_actions_list),
894 free_actions_list_cleanup_wrapper): Remove.
895 (remote_download_tracepoint): Adjust to std::vector.
896
2f4732b0
TT
8972017-11-08 Tom Tromey <tom@tromey.com>
898
899 * dwarf2read.c (symbolp): Remove typedef.
900 (read_func_scope): Use std::vector.
901 (process_structure_scope): Use std::vector.
902
f9d67a22
PA
9032017-11-08 Pedro Alves <palves@redhat.com>
904
905 * ada-lang.c (ada_make_symbol_completion_list): Use
906 completion_skip_symbol.
907 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
908 (symbol_is_function_or_method(symbol*)): New.
909 (add_symtab_completions): Add complete_symbol_mode parameter. Use
910 completion_skip_symbol.
911 (default_collect_symbol_completion_matches_break_on): Use
912 completion_skip_symbol. Pass down mode.
913 (collect_file_symbol_completion_matches): Pass down mode.
914 * symtab.h (symbol_is_function_or_method): New declarations.
915 (completion_skip_symbol): New template function.
916
56d87ef7
PA
9172017-11-08 Pedro Alves <palves@redhat.com>
918
919 * linespec.c (iterate_over_all_matching_symtabs): Add
920 search_domain parameter. Pass it down to expand_symtabs_matching.
921 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
922 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
923 search_domain.
924 (add_all_symbol_names_from_pspace): Add search_domain parameter.
925 Pass it down.
926 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
927 symbols.
928 (add_matching_symbols_to_info): Add search_domain parameter. Pass
929 it down.
930
1b026119
PA
9312017-11-08 Pedro Alves <palves@redhat.com>
932
933 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
934 text_len locals and don't pass them down.
935 * symtab.c (completion_list_add_name): Remove
936 sym_text/sym_text_len parameters and adjust.
937 (completion_list_add_symbol, completion_list_add_msymbol)
938 (completion_list_objc_symbol, completion_list_add_fields)
939 (add_symtab_completions): Likewise.
940 (default_collect_symbol_completion_matches_break_on)
941 (collect_file_symbol_completion_matches): Remove sym_text_len
942 local and don't pass it down.
943 * symtab.h (completion_list_add_name): Remove
944 sym_text/sym_text_len parameters.
945
c62446b1
PA
9462017-11-08 Pedro Alves <palves@redhat.com>
947
948 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
949 unittests/lookup_name_info-selftests.c.
950 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
951 * cp-support.c: Include "selftest.h".
952 (cp_remove_params_1): Rename from cp_remove_params. Add
953 'require_param' parameter, and handle it.
954 (cp_remove_params): Reimplement.
955 (cp_remove_params_if_any): New.
956 (selftests::quote): New.
957 (selftests::check_remove_params): New.
958 (selftests::test_cp_remove_params): New.
959 (_initialize_cp_support): Install
960 selftests::test_cp_remove_params.
961 * cp-support.h (cp_remove_params_if_any): Declare.
962 * dwarf2read.c :Include "selftest.h".
963 (dw2_expand_symtabs_matching_symbol): Use
964 lookup_name_info::make_ignore_params.
965 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
966 (selftests::dw2_expand_symtabs_matching::string_or_null)
967 (selftests::dw2_expand_symtabs_matching::check_match)
968 (selftests::dw2_expand_symtabs_matching::test_symbols)
969 (selftests::dw2_expand_symtabs_matching::run_test): New.
970 (_initialize_dwarf2_read): Register
971 selftests::dw2_expand_symtabs_matching::run_test.
972 * psymtab.c (psym_expand_symtabs_matching): Use
973 lookup_name_info::make_ignore_params.
974 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
975 If the lookup name wants to ignore parameters, strip them.
976 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
977 code handling '('.
978 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
979 (default_collect_symbol_completion_matches_break_on): Don't try to
980 strip parameters.
981 * symtab.h (lookup_name_info::lookup_name_info): Add
982 'ignore_parameters' parameter.
983 (lookup_name_info::ignore_parameters)
984 (lookup_name_info::make_ignore_params): New methods.
985 (lookup_name_info::m_ignore_parameters): New field.
986 * unittests/lookup_name_info-selftests.c: New file.
987
61920122
PA
9882017-11-08 Pedro Alves <palves@redhat.com>
989
990 * dwarf2read.c (dw2_expand_marked_cus)
991 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
992 (dw2_expand_symtabs_matching): Move further below.
993 (dw2_expand_marked_cus): Reindent.
994
3f563c84
PA
9952017-11-08 Pedro Alves <palves@redhat.com>
996
997 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
998 (struct name_component): New.
999 (mapped_index::name_components): New field.
1000 (mapped_index::symbol_name_at): New method.
1001 (dwarf2_read_index): Call mapped_index ctor.
1002 (dw2_map_matching_symbols): Add comment about name_components
1003 table.
1004 (dw2_expand_symtabs_matching): Factor part to...
1005 (dw2_expand_symtabs_matching_symbol): ... this new function.
1006 Build name components table, and lookup symbols in it before
1007 calling the name matcher.
1008 (dw2_expand_marked_cus): New, factored out from
1009 dw2_expand_symtabs_matching.
1010 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1011
b5ec771e
PA
10122017-11-08 Pedro Alves <palves@redhat.com>
1013
1014 * ada-lang.c (ada_encode): Rename to ..
1015 (ada_encode_1): ... this. Add throw_errors parameter and handle
1016 it.
1017 (ada_encode): Reimplement.
1018 (match_name): Delete, folded into full_name.
1019 (resolve_subexp): No longer pass the encoded name to
1020 ada_lookup_symbol_list.
1021 (should_use_wild_match): Delete.
1022 (name_match_type_from_name): New.
1023 (ada_lookup_simple_minsym): Use lookup_name_info and the
1024 language's symbol_name_matcher_ftype.
1025 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1026 (ada_add_block_renamings): Adjust to use lookup_name_info.
1027 (ada_lookup_name): New.
1028 (add_nonlocal_symbols, ada_add_all_symbols)
1029 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1030 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1031 (ada_name_for_lookup): Delete.
1032 (ada_lookup_encoded_symbol): Construct a verbatim name.
1033 (wild_match): Reverse sense of return type. Use bool.
1034 (full_match): Reverse sense of return type. Inline bits of old
1035 match_name here.
1036 (ada_add_block_symbols): Adjust to use lookup_name_info.
1037 (symbol_completion_match): Delete, folded into...
1038 (ada_lookup_name_info::matches): ... .this new method.
1039 (symbol_completion_add): Delete.
1040 (ada_collect_symbol_completion_matches): Add name_match_type
1041 parameter. Adjust to use lookup_name_info and
1042 completion_list_add_name.
1043 (get_var_value, ada_add_global_exceptions): Adjust to use
1044 lookup_name_info.
1045 (ada_get_symbol_name_cmp): Delete.
1046 (do_wild_match, do_full_match): New functions.
1047 (ada_lookup_name_info::ada_lookup_name_info): New method.
1048 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1049 functions.
1050 (ada_language_defn): Install ada_get_symbol_name_matcher.
1051 * ada-lex.l (processId): If name starts with '<', copy it
1052 verbatim.
1053 * block.c (block_iter_match_step, block_iter_match_first)
1054 (block_iter_match_next, block_lookup_symbol)
1055 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1056 lookup_name_info.
1057 * block.h (block_iter_match_first, block_iter_match_next)
1058 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1059 * c-lang.c (c_language_defn, cplus_language_defn)
1060 (asm_language_defn, minimal_language_defn): Adjust comments to
1061 refer to la_get_symbol_name_matcher.
1062 * completer.c (complete_files_symbols)
1063 (collect_explicit_location_matches, symbol_completer): Pass a
1064 symbol_name_match_type down.
1065 * completer.h (class completion_match, completion_match_result):
1066 New classes.
1067 (completion_tracker::reset_completion_match_result): New method.
1068 (completion_tracker::m_completion_match_result): New field.
1069 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1070 lookup_name_info.
1071 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1072 functions.
1073 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1074 * d-lang.c: Adjust comments to refer to
1075 la_get_symbol_name_matcher.
1076 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1077 Adjust to use lookup_name_info.
1078 (dict_iter_match_first, dict_iter_match_next)
1079 (iter_match_first_hashed, iter_match_next_hashed)
1080 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1081 with a lookup_name_info.
1082 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1083 Likewise.
1084 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1085 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1086 (gdb_index_symbol_name_matcher): New class.
1087 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1088 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1089 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1090 with a symbol_name_match_type.
1091 (f_language_defn): Adjust comments to refer to
1092 la_get_symbol_name_matcher.
1093 * go-lang.c (go_language_defn): Adjust comments to refer to
1094 la_get_symbol_name_matcher.
1095 * language.c (default_symbol_name_matcher)
1096 (language_get_symbol_name_matcher): New functions.
1097 (unknown_language_defn, auto_language_defn): Adjust comments to
1098 refer to la_get_symbol_name_matcher.
1099 * language.h (symbol_name_cmp_ftype): Delete.
1100 (language_defn) <la_collect_symbol_completion_matches>: Add match
1101 type parameter.
1102 <la_get_symbol_name_cmp>: Delete field.
1103 <la_get_symbol_name_matcher>: New field.
1104 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1105 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1106 Declare.
1107 * linespec.c (iterate_over_all_matching_symtabs)
1108 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1109 (find_methods): Add language parameter, and use lookup_name_info
1110 and the language's symbol_name_matcher_ftype.
1111 (linespec_complete_function): Adjust.
1112 (lookup_prefix_sym): Use lookup_name_info.
1113 (add_all_symbol_names_from_pspace): Adjust.
1114 (find_superclass_methods): Add language parameter and pass it
1115 down.
1116 (find_method): Pass symbol language down.
1117 (find_linespec_symbols): Don't demangle or Ada encode here.
1118 (search_minsyms_for_name): Add lookup_name_info parameter.
1119 (add_matching_symbols_to_info): Add name_match_type parameter.
1120 Use lookup_name_info.
1121 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1122 la_get_symbol_name_matcher.
1123 * minsyms.c: Include <algorithm>.
1124 (add_minsym_to_demangled_hash_table): Remove table parameter and
1125 add objfile parameter. Use search_name_hash, and add language to
1126 demangled languages vector.
1127 (struct found_minimal_symbols): New struct.
1128 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1129 New functions.
1130 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1131 input names here. Use lookup_name_info instead. Lookup up
1132 demangled names once for each language in the demangled names
1133 vector.
1134 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1135 demangled names once for each language in the demangled names
1136 vector.
1137 (build_minimal_symbol_hash_tables): Adjust.
1138 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1139 lookup_name_info.
1140 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1141 la_get_symbol_name_matcher.
1142 * objfiles.h: Include <vector>.
1143 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1144 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1145 la_get_symbol_name_matcher.
1146 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1147 la_get_symbol_name_matcher.
1148 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1149 (match_partial_symbol): Use symbol_name_match_type,
1150 lookup_name_info and psymbol_name_matches.
1151 (lookup_partial_symbol): Use lookup_name_info.
1152 (map_block): Use symbol_name_match_type and lookup_name_info.
1153 (psym_map_matching_symbols): Use symbol_name_match_type.
1154 (psymbol_name_matches): New.
1155 (recursively_search_psymtabs): Use lookup_name_info and
1156 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1157 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1158 'kind' parameter to 'domain'.
1159 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1160 la_get_symbol_name_matcher.
1161 * symfile-debug.c (debug_qf_map_matching_symbols)
1162 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1163 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1164 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1165 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1166 Adjust to use symbol_name_match_type.
1167 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1168 (expand_symtabs_matching): Adjust to use lookup_name_info.
1169 * symmisc.c (maintenance_expand_symtabs): Use
1170 lookup_name_info::match_any ().
1171 * symtab.c (symbol_matches_search_name): New.
1172 (eq_symbol_entry): Adjust to use lookup_name_info and the
1173 language's matcher.
1174 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1175 (lookup_name_info::match_any): New.
1176 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1177 (compare_symbol_name): Add language, lookup_name_info and
1178 completion_match_result parameters, and use them.
1179 (completion_list_add_name): Make extern. Add language and
1180 lookup_name_info parameters. Use them.
1181 (completion_list_add_symbol, completion_list_add_msymbol)
1182 (completion_list_objc_symbol): Add lookup_name_info parameters and
1183 adjust. Pass down language.
1184 (completion_list_add_fields): Add lookup_name_info parameters and
1185 adjust. Pass down language.
1186 (add_symtab_completions): Add lookup_name_info parameters and
1187 adjust.
1188 (default_collect_symbol_completion_matches_break_on): Add
1189 name_match_type parameter, and use it. Use lookup_name_info.
1190 (default_collect_symbol_completion_matches)
1191 (collect_symbol_completion_matches): Add name_match_type
1192 parameter, and pass it down.
1193 (collect_symbol_completion_matches_type): Adjust.
1194 (collect_file_symbol_completion_matches): Add name_match_type
1195 parameter, and use lookup_name_info.
1196 * symtab.h: Include <string> and "common/gdb_optional.h".
1197 (enum class symbol_name_match_type): New.
1198 (class ada_lookup_name_info): New.
1199 (struct demangle_for_lookup_info): New.
1200 (class lookup_name_info): New.
1201 (symbol_name_matcher_ftype): New.
1202 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1203 (symbol_matches_search_name): Declare.
1204 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1205 (default_collect_symbol_completion_matches)
1206 (collect_symbol_completion_matches)
1207 (collect_file_symbol_completion_matches): Add name_match_type
1208 parameter.
1209 (iterate_over_symbols): Use lookup_name_info.
1210 (completion_list_add_name): Declare.
1211 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1212 (strncmp_iw_with_mode): Now extern.
1213 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1214 (strncmp_iw_with_mode): Declare.
1215
5ffa0793
PA
12162017-11-08 Keith Seitz <keiths@redhat.com>
1217 Pedro Alves <palves@redhat.com>
1218
1219 * ada-lang.c (ada_language_defn): Install
1220 default_search_name_hash.
1221 * buildsym.c (struct buildsym_compunit): <language>: New field.
1222 (finish_block_internal): Pass language when creating dictionaries.
1223 (start_buildsym_compunit, start_symtab): New language parameters.
1224 Use them.
1225 (restart_symtab): Pass down compilation unit's language.
1226 * buildsym.h (enum language): Forward declare.
1227 (start_symtab): New 'language' parameter.
1228 * c-lang.c (c_language_defn, cplus_language_defn)
1229 (asm_language_defn, minimal_language_defn): Install
1230 default_search_name_hash.
1231 * coffread.c (coff_start_symtab): Adjust.
1232 * d-lang.c (d_language_defn): Install default_search_name_hash.
1233 * dbxread.c (struct symloc): Add 'pst_language' field.
1234 (PST_LANGUAGE): Define.
1235 (start_psymtab, read_ofile_symtab): Use it.
1236 (process_one_symbol): New 'language' parameter. Pass it down.
1237 * dictionary.c (struct dictionary) <language>: New field.
1238 (DICT_LANGUAGE): Define.
1239 (dict_create_hashed, dict_create_hashed_expandable)
1240 (dict_create_linear, dict_create_linear_expandable): New parameter
1241 'language'. Set the dictionary's language.
1242 (iter_match_first_hashed): Adjust to rename.
1243 (insert_symbol_hashed): Assert we don't see mismatching
1244 languages. Adjust to rename.
1245 (dict_hash): Rename to ...
1246 (default_search_name_hash): ... this and make extern.
1247 * dictionary.h (struct language_defn): Forward declare.
1248 (dict_create_hashed): New parameter 'language'.
1249 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1250 * f-lang.c (f_language_defn): Install default_search_name_hash.
1251 * go-lang.c (go_language_defn): Install default_search_name_hash.
1252 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1253 creation.
1254 * language.c (unknown_language_defn, auto_language_defn):
1255 * language.h (language_defn::la_search_name_hash): New field.
1256 (default_search_name_hash): Declare.
1257 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1258 * mdebugread.c (new_block): New parameter 'language'.
1259 * mdebugread.c (parse_symbol): Pass symbol language to block
1260 allocation.
1261 (psymtab_to_symtab_1): Pass down language.
1262 (new_symtab): Pass compunit's language to block allocation.
1263 * objc-lang.c (objc_language_defn): Install
1264 default_search_name_hash.
1265 * opencl-lang.c (opencl_language_defn):
1266 * p-lang.c (pascal_language_defn): Install
1267 default_search_name_hash.
1268 * rust-lang.c (rust_language_defn): Install
1269 default_search_name_hash.
1270 * stabsread.h (enum language): Forward declare.
1271 (process_one_symbol): Add 'language' parameter.
1272 * symtab.c (search_name_hash): New function.
1273 * symtab.h (search_name_hash): Declare.
1274 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1275
2a1dde5d
PA
12762017-11-08 Pedro Alves <palves@redhat.com>
1277
1278 * cp-name-parser.y (main): Don't initialize extra_chars.
1279
95a6b0a1
TT
12802017-11-07 Tom Tromey <tom@tromey.com>
1281
1282 * event-top.h (command_handler): Constify.
1283 * record-full.c (cmd_record_full_start): Update.
1284 * thread.c (thread_apply_all_command): Update.
1285 * printcmd.c (eval_command): Update.
1286 * mi/mi-main.c (mi_execute_cli_command): Update.
1287 (mi_execute_async_cli_command): Update.
1288 * tui/tui-stack.c (tui_update_command): Update.
1289 * cli/cli-interp.c (safe_execute_command): Constify.
1290 * record.c (record_start): Update.
1291 (record_start, record_stop, cmd_record_start): Update.
1292 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1293 (cmd_record_btrace_pt_start): Update.
1294 (cmd_record_btrace_start): Update.
1295 (cmd_record_btrace_start): Update.
1296 * reverse.c (exec_reverse_once): Update.
1297 * python/python.c (execute_gdb_command): Don't copy the command.
1298 * event-top.c (command_line_handler): Update.
1299 (command_handler): Constify.
1300 * defs.h (deprecated_call_command_hook): Constify.
1301 * cli/cli-script.h (execute_user_command): Constify.
1302 * cli/cli-script.c (execute_user_command): Constify.
1303 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1304 (enum command_control_type): Update.
1305 * main.c (catch_command_errors): Remove non-const overload.
1306 (catch_command_errors_ftype): Remove.
1307 * python/py-cmd.c (cmdpy_function): Constify.
1308 * guile/scm-cmd.c (cmdscm_function): Constify.
1309 * cli/cli-dump.c (call_dump_func): Constify.
1310 * cli/cli-decode.c (do_const_cfunc): Constify.
1311 (do_sfunc): Constify.
1312 (cmd_func): Constify.
1313 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1314 * top.h (execute_command): Constify.
1315 * top.c (execute_command): Constify.
1316 (execute_command_to_string): Constify.
1317 (deprecated_call_command_hook): Constify.
1318 * command.h (cmd_func): Constify.
1319 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1320
eb4c3f4a
TT
13212017-11-07 Tom Tromey <tom@tromey.com>
1322
1323 * ada-lang.c (catch_ada_exception_command): Constify.
1324 (catch_assert_command): Constify.
1325 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1326 (catch_rethrow_command): Constify.
1327 (catch_exception_command_1): Constify.
1328 * breakpoint.h (add_catch_command): Constify.
1329 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1330 (catch_syscall_split_args): Constify.
1331 * break-catch-sig.c (catch_signal_command): Constify.
1332 (catch_signal_split_args): Constify.
1333 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1334 cmd_const_sfunc_ftype.
1335 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1336 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1337 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1338 (add_setshow_string_cmd, struct cmd_list_element)
1339 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1340 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1341 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1342 Constify.
1343 (set_cmd_sfunc): Constify.
1344 (empty_sfunc): Constify.
1345 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1346 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1347 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1348 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1349 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1350 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1351 Constify.
1352 (set_cmd_sfunc): Constify.
1353 (cmd_sfunc_ftype): Remove.
1354 * compile/compile.c (set_compile_args): Constify.
1355 * infrun.c (set_disable_randomization): Constify.
1356 * infcmd.c (set_args_command, set_cwd_command): Constify.
1357 * breakpoint.c (set_condition_evaluation_mode): Constify.
1358 (add_catch_command): Constify.
1359 (catch_fork_command_1, catch_exec_command_1)
1360 (catch_load_command_1, catch_unload_command_1): Constify.
1361 (catch_load_or_unload): Constify.
1362 * guile/scm-param.c (pascm_set_func): Constify.
1363 (add_setshow_generic): Constify.
1364 * python/py-param.c (get_set_value): Constify.
1365 * top.h (set_verbose): Constify.
1366 * tui/tui-win.c (tui_set_var_cmd): Constify.
1367 * mi/mi-main.c (set_mi_async_command): Constify.
1368 * cli/cli-logging.c (set_logging_overwrite)
1369 (set_logging_redirect): Constify.
1370 * value.c (set_max_value_size): Constify.
1371 * valprint.c (set_input_radix, set_output_radix): Constify.
1372 * utils.c (set_width_command, set_height_command): Constify.
1373 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1374 * tracepoint.c (set_disconnected_tracing)
1375 (set_circular_trace_buffer, set_trace_buffer_size)
1376 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1377 * top.c (set_history_size_command, set_verbose, set_editing)
1378 (set_gdb_datadir, set_history_filename): Constify.
1379 * target.c (set_targetdebug, maint_set_target_async_command)
1380 (maint_set_target_non_stop_command, set_target_permissions)
1381 (set_write_memory_permission): Constify.
1382 (open_target): Constify.
1383 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1384 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1385 * symtab.c (set_symbol_cache_size_handler): Constify.
1386 * symfile.c (set_ext_lang_command): Constify.
1387 * symfile-debug.c (set_debug_symfile): Constify.
1388 * source.c (set_directories_command): Constify.
1389 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1390 * serial.c (set_parity): Constify.
1391 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1392 * remote.c (set_remote_exec_file, set_remotebreak)
1393 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1394 * record.c (set_record_insn_history_size)
1395 (set_record_call_history_size): Constify.
1396 * record-full.c (set_record_full_insn_max_num): Constify.
1397 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1398 * osabi.c (set_osabi): Constify.
1399 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1400 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1401 * maint.c (maintenance_set_profile_cmd): Constify.
1402 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1403 * language.c (set_language_command, set_range_command)
1404 (set_case_command): Constify.
1405 * infrun.c (set_non_stop, set_observer_mode)
1406 (set_stop_on_solib_events, set_schedlock_func)
1407 (set_exec_direction_func): Constify.
1408 * infcmd.c (set_inferior_tty_command): Constify.
1409 * disasm.c (set_disassembler_options_sfunc): Constify.
1410 * demangle.c (set_demangling_command): Constify.
1411 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1412 * cris-tdep.c (set_cris_version, set_cris_mode)
1413 (set_cris_dwarf2_cfi): Constify.
1414 * corefile.c (set_gnutarget_command): Constify.
1415 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1416 (set_target_wide_charset_sfunc): Constify.
1417 * breakpoint.c (update_dprintf_commands): Constify.
1418 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1419 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1420 (set_disassembly_style_sfunc): Constify.
1421 * arch-utils.c (set_endian, set_architecture): Constify.
1422 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1423 * agent.c (set_can_use_agent): Constify.
1424
5fed81ff
TT
14252017-11-07 Tom Tromey <tom@tromey.com>
1426
1427 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1428 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1429 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1430 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1431 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1432 (parse_int_arg, show_thread_default_detach_sc_cmd)
1433 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1434 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1435 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1436 (show_task_pause_cmd, set_task_detach_sc_cmd)
1437 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1438 (set_noninvasive_cmd, set_thread_pause_cmd)
1439 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1440 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1441 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1442 * windows-nat.c (display_selectors): Constify.
1443 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1444 non-const "cfunc".
1445 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1446 (cmd_cfunc_eq): Likewise.
1447 (struct cmd_list_element): Likewise.
1448 (do_cfunc): Remove.
1449 (cli_user_command_p): Update.
1450 * command.h (add_cmd): Remove non-const overload.
1451 (cmd_cfunc_ftype): Remove typedef.
1452 (cmd_cfunc_eq): Remove non-const overload.
1453 * value.c (show_values): Constify.
1454 * thread.c (thread_apply_all_command): Constify.
1455 * symfile.c (load_command): Constify.
1456 * source.c (directory_command): Constify.
1457 * maint.c (maintenance_internal_error)
1458 (maintenance_demangler_warning, maintenance_space_display)
1459 (maintenance_print_architecture, maintenance_translate_address)
1460 (maintenance_info_selftests, maintenance_internal_warning):
1461 Constify.
1462 * breakpoint.c (disable_trace_command, enable_trace_command):
1463 Constify.
1464 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1465 Constify.
1466 (add_auto_load_safe_path): Constify.
1467 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1468 * top.h (show_commands): Constify.
1469 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1470 * sparc64-tdep.c (adi_examine_command): Constify.
1471 (adi_assign_command): Constify.
1472
1d12d88f
TT
14732017-11-07 Tom Tromey <tom@tromey.com>
1474
1475 * frame.h (info_locals_command, info_args_command): Constify.
1476 * auto-load.h (auto_load_info_scripts): Constify.
1477 * inferior.h (registers_info): Constify.
1478 * copying.c: Rebuild.
1479 * copying.awk: Constify generated commands.
1480 * auto-load.c (auto_load_info_scripts)
1481 (info_auto_load_gdb_scripts): Constify.
1482 * cli/cli-decode.c (struct cmd_list_element): Take a
1483 cmd_const_cfunc_ftype.
1484 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1485 * tui/tui-win.c (tui_all_windows_info): Constify.
1486 * python/py-auto-load.c (info_auto_load_python_scripts):
1487 Constify.
1488 * cli/cli-cmds.c (show_command): Remove non-const overload.
1489 * tracepoint.c (info_tvariables_command, info_scope_command):
1490 Constify.
1491 (info_static_tracepoint_markers_command): Constify.
1492 * thread.c (info_threads_command): Constify.
1493 (print_thread_info_1): Constify.
1494 * target.c (info_target_command): Constify.
1495 * symtab.c (info_sources_command, info_functions_command)
1496 (info_types_command): Constify.
1497 (info_variables_command): Remove non-const overload.
1498 * symfile.c (info_ext_lang_command): Constify.
1499 * stack.c (info_frame_command, info_locals_command)
1500 (info_args_command): Constify.
1501 (backtrace_command): Remove non-const overload.
1502 * source.c (info_source_command, info_line_command): Constify.
1503 * solib.c (info_sharedlibrary_command): Constify.
1504 * skip.c (info_skip_command): Constify.
1505 * ser-go32.c (info_serial_command): Constify.
1506 * reverse.c (info_bookmarks_command): Constify.
1507 * printcmd.c (info_symbol_command, info_address_command)
1508 (info_display_command): Constify.
1509 * osdata.c (info_osdata_command): Constify.
1510 * objc-lang.c (info_selectors_command, info_classes_command):
1511 Constify.
1512 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1513 * memattr.c (info_mem_command): Constify.
1514 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1515 * linux-fork.c (info_checkpoints_command): Constify.
1516 * infrun.c (info_signals_command): Constify.
1517 * inflow.c (info_terminal_command): Constify.
1518 * inferior.c (info_inferiors_command): Constify.
1519 (print_inferior): Constify.
1520 * infcmd.c (info_program_command, info_all_registers_command)
1521 (info_registers_command, info_vector_command)
1522 (info_float_command): Constify.
1523 (registers_info): Constify.
1524 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1525 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1526 Constify.
1527 * f-valprint.c (info_common_command): Constify.
1528 * dcache.c (info_dcache_command): Constify.
1529 (dcache_info_1): Constify.
1530 * darwin-nat-info.c (info_mach_tasks_command)
1531 (info_mach_task_command, info_mach_ports_command)
1532 (info_mach_port_command, info_mach_threads_command)
1533 (info_mach_thread_command, info_mach_regions_command)
1534 (info_mach_regions_recurse_command, info_mach_region_command)
1535 (info_mach_exceptions_command): Constify.
1536 (get_task_from_args): Constify.
1537 * cp-support.c (info_vtbl_command): Constify.
1538 * breakpoint.c (info_watchpoints_command)
1539 (info_tracepoints_command): Constify.
1540 (info_breakpoints_command): Remove non-const overload.
1541 * avr-tdep.c (avr_io_reg_read_command): Constify.
1542 * auxv.c (info_auxv_command): Constify.
1543 * ada-tasks.c (info_tasks_command): Constify.
1544 (info_task): Constify.
1545 * ada-lang.c (info_exceptions_command): Constify.
1546
0b39b52e
TT
15472017-11-07 Tom Tromey <tom@tromey.com>
1548
1549 * solib.h (no_shared_libraries): Constify.
1550 * frame.h (return_command): Constify.
1551 * cli/cli-cmds.h (quit_command): Constify.
1552 * top.h (quit_command, execute_command): Constify.
1553 * target.h (flash_erase_command): Constify.
1554 * inferior.h (set_inferior_args, attach_command): Constify.
1555 * tracepoint.h (start_tracing, stop_tracing): Constify.
1556 * breakpoint.h (break_command, tbreak_command)
1557 (hbreak_command_wrapper, thbreak_command_wrapper)
1558 (rbreak_command_wrapper, watch_command_wrapper)
1559 (awatch_command_wrapper, rwatch_command_wrapper)
1560 (get_tracepoint_by_number): Constify.
1561 * symtab.c (info_variables_command, rbreak_command)
1562 (symtab_symbol_info): Constify.
1563 (info_variables_command): Add non-const overload.
1564 * top.c (dont_repeat_command): Constify.
1565 * breakpoint.c (ignore_command, commands_command)
1566 (condition_command, tbreak_command, hbreak_command)
1567 (thbreak_command, clear_command, break_command)
1568 (info_breakpoints_command, watch_command, rwatch_command)
1569 (awatch_command, trace_command, ftrace_command, strace_command)
1570 (trace_pass_command, break_range_command, dprintf_command)
1571 (agent_printf_command, get_tracepoint_by_number)
1572 (watch_maybe_just_location, trace_pass_command): Constify.
1573 (info_breakpoints_command): Add non-const overload.
1574 * tracefile.c (tsave_command): Constify.
1575 * infcmd.c (attach_command, disconnect_command, signal_command)
1576 (queue_signal_command, stepi_command, nexti_command)
1577 (finish_command, next_command, step_command, until_command)
1578 (advance_command, jump_command, continue_command, run_command)
1579 (start_command, starti_command, interrupt_command)
1580 (run_command_1, set_inferior_args, step_1): Constify.
1581 * inferior.c (add_inferior_command, remove_inferior_command)
1582 (clone_inferior_command): Constify.
1583 * linux-fork.c (checkpoint_command, restart_command): Constify.
1584 * windows-nat.c (signal_event_command): Constify.
1585 * guile/guile.c (guile_repl_command, guile_command): Constify.
1586 * printcmd.c (x_command, display_command, printf_command)
1587 (output_command, set_command, call_command, print_command)
1588 (eval_command): Constify.
1589 (non_const_set_command): Remove.
1590 (_initialize_printcmd): Update.
1591 * source.c (forward_search_command, reverse_search_command):
1592 Constify.
1593 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1594 Constify.
1595 * infrun.c (handle_command): Constify.
1596 * memattr.c (mem_command): Constify.
1597 * stack.c (return_command, up_command, up_silently_command)
1598 (down_command, down_silently_command, frame_command)
1599 (backtrace_command, func_command, backtrace_command_1): Constify.
1600 (backtrace_command): Add non-const overload.
1601 * remote-sim.c (simulator_command): Constify.
1602 * exec.c (set_section_command): Constify.
1603 * tracepoint.c (tdump_command, trace_variable_command)
1604 (tstatus_command, tstop_command, tstart_command)
1605 (end_actions_pseudocommand, while_stepping_pseudocommand)
1606 (collect_pseudocommand, teval_pseudocommand, actions_command)
1607 (start_tracing, stop_tracing): Constify.
1608 * value.c (init_if_undefined_command): Constify.
1609 * tui/tui-stack.c (tui_update_command): Constify.
1610 * tui/tui-win.c (tui_refresh_all_command)
1611 (tui_set_tab_width_command, tui_set_win_height_command)
1612 (tui_set_focus_command, tui_scroll_forward_command)
1613 (tui_scroll_backward_command, tui_scroll_left_command)
1614 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1615 (tui_set_win_height): Constify.
1616 * tui/tui-layout.c (tui_layout_command): Constify.
1617 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1618 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1619 (proc_untrace_sysexit_cmd): Constify.
1620 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1621 (threadset_test_cmd, threadlist_update_test_cmd)
1622 (threadalive_test): Constify.
1623 * objc-lang.c (print_object_command): Constify.
1624 * command.h (add_com): Constify.
1625 * cli/cli-dump.c (restore_command): Constify.
1626 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1627 (help_command, complete_command, shell_command, edit_command)
1628 (list_command, disassemble_command, make_command)
1629 (apropos_command, alias_command): Constify.
1630 * cli/cli-script.c (document_command, define_command)
1631 (while_command, if_command, validate_comname): Constify.
1632 * cli/cli-decode.c (struct cmd_list_element): Change type of
1633 "fun".
1634 * target.c (do_monitor_command, flash_erase_command): Constify.
1635 * regcache.c (reg_flush_command): Constify.
1636 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1637 (reverse_nexti, reverse_continue, reverse_finish)
1638 (save_bookmark_command, goto_bookmark_command)
1639 (exec_reverse_once): Constify.
1640 * python/python.c (python_interactive_command, python_command):
1641 Constify.
1642 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1643 Constify.
1644 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1645 * gcore.c (gcore_command): Constify.
1646
85c4be7c
TT
16472017-11-07 Tom Tromey <tom@tromey.com>
1648
1649 * printcmd.c (x_command): Call set_repeat_arguments.
1650 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1651 * top.c (repeat_arguments): New global.
1652 (set_repeat_arguments): New function.
1653 (execute_command): Handle repeat_arguments.
1654 (show_commands): Calls set_repeat_arguments.
1655 * command.h (set_repeat_arguments): Declare.
1656
022643b4
TT
16572017-11-07 Tom Tromey <tom@tromey.com>
1658
1659 * stack.c (backtrace_command): Use std::string.
1660 (backtrace_command_1): Make "count_exp" const.
1661
5614fb77
TT
16622017-11-07 Tom Tromey <tom@tromey.com>
1663
1664 * source.c (directory_switch, mod_path, add_path): Constify.
1665 * defs.h (add_path, mod_path, directory_switch): Constify.
1666 * mi/mi-cmd-env.c (env_mod_path): Constify.
1667
6be9a197
TT
16682017-11-07 Tom Tromey <tom@tromey.com>
1669
1670 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1671 (run_command_1, continue_command, step_1, jump_command)
1672 (signal_command, until_command, advance_command, finish_command)
1673 (attach_command): Update.
1674
c2252c0d
TT
16752017-11-07 Tom Tromey <tom@tromey.com>
1676
1677 * command.h (set_cmd_cfunc): Don't declare.
1678 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1679
1ee870c5
TT
16802017-11-07 Tom Tromey <tom@tromey.com>
1681
1682 * stack.c (select_frame_command): Constify.
1683 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1684 * command.h (add_com_suppress_notification): Constify.
1685
ee7ddd71
TT
16862017-11-07 Tom Tromey <tom@tromey.com>
1687
1688 * breakpoint.c (stop_command): Constify.
1689 * cli/cli-decode.c (struct cmd_list_element): Constify.
1690 * command.h (add_abbrev_prefix_cmd): Constify.
1691
95e95a6d
PA
16922017-11-07 Pedro Alves <palves@redhat.com>
1693
1694 * breakpoint.c (extract_bp_kind): New enum.
1695 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1696 factored out from ...
1697 (extract_bp_number_and_location): ... here.
1698 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1699
cc638e86
PA
17002017-11-07 Pedro Alves <palves@redhat.com>
1701
1702 * breakpoint.c (extract_bp_number_and_location): Change return
1703 type to void. Throw error instead of warning.
1704 (enable_disable_command): Adjust.
1705
d0fe4701
XR
17062017-11-07 Xavier Roirand <roirand@adacore.com>
1707 Pedro Alves <palves@redhat.com>
1708
1709 * breakpoint.c (map_breakpoint_number_range): New, factored out
1710 from ...
1711 (map_breakpoint_numbers): ... here.
1712 (find_location_by_number): Change parameters from string to
1713 breakpoint number and location.
1714 (extract_bp_number_and_location): New function.
1715 (enable_disable_bp_num_loc)
1716 (enable_disable_breakpoint_location_range)
1717 (enable_disable_command): New functions, factored out ...
1718 (enable_command, disable_command): ... these functions, and
1719 adjusted to support ranges.
1720 * NEWS: Document enable/disable breakpoint location range feature.
1721
635dc5b2
LM
17222017-11-06 Luis Machado <luis.machado@linaro.org>
1723
1724 * MAINTAINERS (Write After Approval): Update my e-mail address.
1725
556e5da5
PA
17262017-11-06 Pedro Alves <palves@redhat.com>
1727
1728 * gnu-nat.c (gnu_terminal_init): Delete.
1729 (gnu_target): Don't install gnu_terminal_init.
1730 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1731 (child_terminal_init): ... this function.
1732
d1928160
PA
17332017-11-06 Pedro Alves <palves@redhat.com>
1734
1735 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1736 sgtty.h.
1737 * config.in, configure: Regenerate.
1738
6aa899ce
PA
17392017-11-06 Pedro Alves <palves@redhat.com>
1740
1741 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1742 (async_init_signals): Adjust.
1743 (handle_stop_sig): Rename to ...
1744 (handle_sigtstp): ... this.
1745 (async_stop_sig): Rename to ...
1746 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1747 SIGTSTP path.
1748 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1749 instead of STOP_SIGNAL thoughout.
1750 (handle_stop_sig): Rename to ...
1751 (handle_sigtstp): ... this.
1752 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1753
a94799ac
PA
17542017-11-06 Pedro Alves <palves@redhat.com>
1755
1756 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1757 longer set flags twice in row.
1758
726e1356
PA
17592017-11-06 Pedro Alves <palves@redhat.com>
1760
1761 * Makefile.in (SER_HARDWIRE): Update comment.
1762 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1763 * common/gdb_termios.h: Delete file.
1764 * common/job-control.c: Include termios.h and unistd.h instead of
1765 gdb_termios.h.
1766 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1767 check.
1768 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1769 Remove sgtty code.
1770 * configure.ac: No longer check for termio.h and sgtty.h.
1771 * configure: Regenerate.
1772 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1773 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1774 Replace PROCESS_GROUP_TYPE references with pid_t references
1775 throughout.
1776 (gdb_getpgrp): Delete.
1777 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1778 (child_terminal_inferior): Remove comment. Remove sgtty code.
1779 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1780 gdb_getpgrp. Use serial_set_tty_state instead aof
1781 serial_noflush_set_tty_state. Remove sgtty code.
1782 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1783 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1784 (inferior_process_group): Now returns pid_t.
1785 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1786 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1787 * ser-event.c (serial_event_ops): Update.
1788 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1789 (dos_ops): Update.
1790 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1791 * ser-pipe.c (pipe_ops): Update.
1792 * ser-tcp.c (tcp_ops): Update.
1793 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1794 HAVE_TERMIOS checks.
1795 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1796 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1797 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1798 assume termios.
1799 (hardwire_noflush_set_tty_state): Delete.
1800 (hardwire_print_tty_state, hardwire_drain_output)
1801 (hardwire_flush_output, hardwire_flush_input)
1802 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1803 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1804 code, and assume termios.
1805 (hardwire_ops): Update.
1806 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1807 * serial.c (serial_noflush_set_tty_state): Delete.
1808 * serial.h (serial_noflush_set_tty_state): Delete.
1809 (serial_ops::noflush_set_tty_state): Delete.
1810
1cfb73db
UW
18112017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1812
1813 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1814 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1815 (COMMON_OBS): Remove doublest.o and dfp.o.
1816 Do not build target-float.c (instead of doublest.c)
1817 with -Wformat-nonliteral.
1818
1819 * doublest.c: Remove file.
1820 * doublest.h: Remove file.
1821 * dfp.c: Remove file.
1822 * dfp.h: Remove file.
1823
1824 * target-float.c: Do not include "doublest.h" and "dfp.h".
1825 (DOUBLEST): Move here from doublest.h.
1826 (enum float_kind): Likewise.
1827 (FLOATFORMAT_CHAR_BIT): Likewise.
1828 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1829 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1830 (floatformat_precision): Likewise.
1831 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1832 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1833 Likewise.
1834 (host_float_format, host_double_format, host_long_double_format):
1835 Likewise.
1836 (floatformat_to_string, floatformat_from_string): Likewise.
1837 (floatformat_to_doublest): Likewise. Also, inline the original
1838 convert_floatformat_to_doublest.
1839 (floatformat_from_doublest): Likewise. Also, inline the original
1840 convert_floatformat_from_doublest.
1841
1842 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1843 (MAX_DECIMAL_STRING): Move here from dfp.c.
1844 (match_endianness): Likewise.
1845 (set_decnumber_context, decimal_check_errors): Likewise.
1846 (decimal_from_number, decimal_to_number): Likewise.
1847 (decimal_to_string, decimal_from_string): Likewise. Make static.
1848 (decimal_from_longest, decimal_from_ulongest): Likewise.
1849 (decimal_to_longest): Likewise.
1850 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1851 (decimal_convert): Likewise.
1852
b07e9c46
UW
18532017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1854
1855 * doublest.c: Do not include "gdbtypes.h".
1856 (extract_typed_floating): Remove.
1857 (store_typed_floating): Remove.
1858 (convert_typed_floating): Remove.
1859 * doublest.h (struct type): Remove.
1860 (DOUBLEST_PRINT_FORMAT): Remove.
1861 (DOUBLEST_SCAN_FORMAT): Remove.
1862 (extract_typed_floating): Remove.
1863 (store_typed_floating): Remove.
1864 (convert_typed_floating): Remove.
1865
1866 * dfp.c (decimal_from_doublest): Remove.
1867 (decimal_to_doublest): Remove.
1868 * dfp.h: Do not include "doublest.h".
1869 (decimal_from_doublest): Remove.
1870 (decimal_to_doublest): Remove.
1871
1872 * value.c: Do not include "doublest.h" and "dfp.h".
1873 (value_as_double): Remove.
1874 (unpack_double): Remove.
1875 (value_from_double): Remove.
1876 (value_from_decfloat): Remove.
1877 * value.h: Do not include "doublest.h".
1878 (value_as_double): Remove.
1879 (unpack_double): Remove.
1880 (value_from_double): Remove.
1881 (value_from_decfloat): Remove.
1882
3b2ca824
UW
18832017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1884
1885 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1886 (i386_extract_return_value): Use target_float_convert.
1887 (i386_store_return_value): Likewise.
1888 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1889 (i387_value_to_register): Likewise.
1890 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1891 (ia64_register_to_value): Use target_float_convert.
1892 (ia64_value_to_register): Likewise.
1893 (ia64_extract_return_value): Likewise.
1894 (ia64_store_return_value): Likewise.
1895 (ia64_push_dummy_call): Likewise.
1896 * m68k-tdep.c: Include "target-float.h".
1897 (m68k_register_to_value): Use target_float_convert.
1898 (m68k_value_to_register): Likewise.
1899 (m68k_svr4_extract_return_value): Likewise.
1900 (m68k_svr4_store_return_value): Likewise.
1901 * ppc-sysv-tdep.c: Include "target-float.h".
1902 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1903 (do_ppc_sysv_return_value): Likewise.
1904 (ppc64_sysv_abi_push_freg): Likewise.
1905 (ppc64_sysv_abi_return_value_base): Likewise.
1906 * rs6000-aix-tdep.c: Include "target-float.h".
1907 (rs6000_push_dummy_call): Use target_float_convert.
1908 (rs6000_return_value): Likewise.
1909 * rs6000-lynx178-tdep.c: Include "target-float.h".
1910 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1911 (rs6000_lynx178_return_value): Likewise.
1912 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1913 (rs6000_register_to_value): Use target_float_convert.
1914 (rs6000_value_to_register): Likewise.
1915 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1916 (arm_extract_return_value): Use target_float_convert.
1917 (arm_store_return_value): Likewise.
1918 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1919 (sh_register_convert_to_virtual): Use target_float_convert.
1920 (sh_register_convert_to_raw): Likewise.
1921 * sh64-tdep.c: Include "target-float.h".
1922 (sh64_extract_return_value): Use target_float_convert.
1923 (sh64_register_convert_to_virtual): Likewise.
1924 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1925
14ad9311
UW
19262017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1927
1928 * target-float.c (floatformat_to_host_double): New function.
1929 (floatformat_from_host_double): Likewise.
1930 (target_float_to_host_double): Likewise.
1931 (target_float_from_host_double): Likewise.
1932 * target-float.h (target_float_to_host_double): Add prototype.
1933 (target_float_from_host_double): Likewise.
1934
1935 * guile/scm-value.c: Include "target-float.h".
1936 (gdbscm_value_to_real): Use target_float_to_host_double.
1937 Handle integer source values via value_as_long.
1938 * guile/scm-math.c: Include "target-float.h". Do not include
1939 "doublest.h", "dfp.h", and "expression.h".
1940 (vlscm_convert_typed_number): Use target_float_from_host_double.
1941 (vlscm_convert_number): Likewise.
1942
1943 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1944 (convert_value_from_python): Use target_float_from_host_double.
1945
50eff16b
UW
19462017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1947
1948 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1949 (cast_from_fixed): Likewise.
1950 (ada_scaling_type): New function.
1951 (ada_delta): Return value instead of DOUBLEST. Perform target
1952 arithmetic instead of host arithmetic.
1953 (scaling_factor): Rename to ...
1954 (ada_scaling_factor) ... this. Make non-static. Return value instead
1955 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1956 (ada_fixed_to_float): Remove.
1957 (ada_float_to_fixed): Remove.
1958 * ada-lang.h (ada_fixed_to_float): Remove.
1959 (ada_float_to_fixed): Remove.
1960 (ada_delta): Return value instead of DOUBLEST.
1961 (ada_scaling_factor): Add prototype.
1962
1963 * ada-typeprint.c: Include "target-float.h".
1964 (print_fixed_point_type): Perform target arithmetic instead of
1965 host arithmetic.
1966 * ada-valprint.c: Include "target-float.h".
1967 (ada_val_print_num): Perform target arithmetic instead of
1968 host arithmetic for fixed-point types.
1969
66c02b9e
UW
19702017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1971
1972 * target-float.c: Include <math.h>.
1973 (floatformat_binop): New function.
1974 (floatformat_compare): Likewise.
1975 (target_float_binop): Likewise.
1976 (target_float_compare): Likewise.
1977 * target-float.h: Include "expression.h".
1978 (target_float_binop): Add prototype.
1979 (target_float_compare): Likewise.
1980
1981 * valarith.c: Do not include "doublest.h" and "dfp.h".
1982 Include "common/byte-vector.h".
1983 (value_args_as_decimal): Remove, replace by ...
1984 (value_args_as_target_float): ... this function. Handle both
1985 binary and decimal target floating-point formats.
1986 (scalar_binop): Handle both binary and decimal FP using
1987 value_args_as_target_float and target_float_binop.
1988 (value_equal): Handle both binary and decimal FP using
1989 value_args_as_target_float and target_float_compare.
1990 (value_less): Likewise.
1991 (value_pos): Handle all scalar types as simple copy.
1992 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1993 * dfp.c (decimal_binop): Throw error instead of internal_error
1994 when called with an unsupported operation code.
1995
f69fdf9b
UW
19962017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1997
1998 * target-float.c (target_float_to_string): New function.
1999 (target_float_from_string): New function.
2000 * target-float.h (target_float_to_string): Add prototype.
2001 (target_float_from_string): Add prototype.
2002
2003 * valprint.c: Include "target-float.h". Do not include
2004 "doublest.h" and "dfp.h".
2005 (print_floating): Use target_float_to_string.
2006 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2007 (printf_floating): Use target_float_to_string.
2008 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2009 (print_i387_value): Use target_float_to_string.
2010 * mips-tdep.c: Include "target-float.h".
2011 (mips_print_fp_register): Use target_float_to_string.
2012 * sh64-tdep.c: Include "target-float.h".
2013 (sh64_do_fp_register): Use target_float_to_string.
2014
2015 * parse.c: Include "target-float.h". Do not include
2016 "doublest.h" and "dfp.h".
2017 (parse_float): Use target_float_from_string.
2018 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2019 (define_symbol): Use target_float_from_string.
2020 * gdbarch-selftests.c: Include "target-float.h".
2021 (register_to_value_test): Use target_float_from_string.
2022
70100014
UW
20232017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2024
2025 * Makefile.c (SFILES): Add target-float.c.
2026 (HFILES_NO_SRCDIR): Add target-float.h.
2027 (COMMON_OBS): Add target-float.o.
2028 * target-float.h: New file.
2029 * target-float.c: New file.
2030
2031 * doublest.c (floatformat_classify): Fix detection of float_zero.
2032
2033 * gdbtypes.c (is_floating_type): New function.
2034 * gdbtypes.h (is_floating_type): Add prototype.
2035
2036 * value.c: Do not include "floatformat.h".
2037 (unpack_double): Use target_float_is_valid.
2038 (is_floating_value): New function.
2039 * value.h (is_floating_value): Add prototype-
2040
2041 * valarith.c: Include "target-float.h".
2042 (value_logical_not): Use target_float_is_zero.
2043
2044 * python/py-value.c: Include "target-float.h".
2045 (valpy_nonzero): Use target_float_is_zero.
2046
ab4b1c46
TT
20472017-11-04 Tom Tromey <tom@tromey.com>
2048
2049 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2050
454dafbd
TT
20512017-11-04 Tom Tromey <tom@tromey.com>
2052
2053 * breakpoint.c (set_momentary_breakpoint): Return
2054 breakpoint_up.
2055 (until_break_command): Update.
2056 (new_until_break_fsm): Change argument types to
2057 breakpoint_up.
2058 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2059 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2060 Remove.
2061 * infcmd.c (finish_forward): Update.
2062 * breakpoint.h (set_momentary_breakpoint)
2063 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2064 (make_cleanup_delete_breakpoint): Remove.
2065 (struct breakpoint_deleter): New.
2066 (breakpoint_up): New typedef.
2067 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2068 (insert_exception_resume_breakpoint): Update.
2069 (insert_exception_resume_from_probe): Update.
2070 (insert_longjmp_resume_breakpoint): Update.
2071 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2072 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2073 * infcall.c (call_function_by_hand_dummy): Update
2074
331b71e5
TT
20752017-11-04 Tom Tromey <tom@tromey.com>
2076
2077 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2078
9f584b37
TT
20792017-11-04 Tom Tromey <tom@tromey.com>
2080
2081 * linux-tdep.c (linux_core_info_proc_mappings): Use
2082 gdb::def_vector.
2083 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2084 "size" argument.
2085 (linux_corefile_thread): Update.
2086 (linux_make_corefile_notes): Remove unused variable.
2087
779bc38e
TT
20882017-11-04 Tom Tromey <tom@tromey.com>
2089
2090 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2091 gdb::byte_vector.
2092
ed2b3126
TT
20932017-11-04 Tom Tromey <tom@tromey.com>
2094
2095 * objfiles.c (do_free_objfile_cleanup): Remove.
2096 * compile/compile-object-load.c (compile_object_load): Update.
2097 * objfiles.h (make_cleanup_free_objfile): Remove.
2098
7f6743fd
TT
20992017-11-04 Tom Tromey <tom@tromey.com>
2100
2101 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2102 (adi_read_versions): Change "tags" to "gdb_byte *".
2103 (adi_print_versions): Likewise.
2104
c80049d3
TT
21052017-11-04 Tom Tromey <tom@tromey.com>
2106
2107 * breakpoint.c
2108 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2109 from start_rbreak_breakpoints.
2110 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2111 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2112 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2113 * symtab.c (do_end_rbreak_breakpoints): Remove.
2114 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2115
167b0be1
TT
21162017-11-04 Tom Tromey <tom@tromey.com>
2117
2118 * cp-namespace.c (reset_directive_searched): Remove.
2119 (cp_lookup_symbol_via_imports): Use scoped_restore.
2120 * cp-support.c (reset_directive_searched): Remove.
2121 (make_symbol_overload_list_using): Use scoped_restore.
2122 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2123 (reset_directive_searched): Remove.
2124
5eae7aea
TT
21252017-11-04 Tom Tromey <tom@tromey.com>
2126
2127 * symfile.c (find_separate_debug_file_by_debuglink): Use
2128 unique_xmalloc_ptr.
2129
c6bcad5f
TT
21302017-11-04 Tom Tromey <tom@tromey.com>
2131
2132 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2133 type of "info".
2134 (compute_stack_depth): Likewise.
2135 (do_compile_dwarf_expr_to_c): Use std::vector.
2136
20dcd8ca
TT
21372017-11-04 Tom Tromey <tom@tromey.com>
2138
2139 * compile/compile-object-load.c (link_callbacks_einfo): Use
2140 std::string.
2141
33c7c59d
TT
21422017-11-04 Tom Tromey <tom@tromey.com>
2143
2144 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2145 Use scoped_free_pendings.
2146 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2147 scoped_free_pendings.
2148 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2149 (xcoff_initial_scan): Likewise.
2150 * buildsym.c (reset_symtab_globals): Update comment.
2151 (scoped_free_pendings): Rename from really_free_pendings.
2152 (prepare_for_building): Update comment.
2153 (buildsym_init): Likewise.
2154 * buildsym.h (class scoped_free_pendings): New class.
2155 (really_free_pendings): Don't declare.
2156
67fa57cf
UW
21572017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2158
2159 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2160 output when converting a zero value to a special byteorder format.
2161
f26ae15b
YQ
21622017-11-02 Yao Qi <yao.qi@linaro.org>
2163
2164 * frame.c (do_frame_register_read): Remove aspace.
2165 * jit.c (jit_frame_sniffer): Likwise.
2166 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2167 * regcache.c (regcache::regcache): Pass nullptr.
2168 (regcache_print): Caller updated.
2169 * regcache.h (regcache::regcache): Remove one constructor
2170 parameter aspace.
2171
6c6e9412
YQ
21722017-11-02 Yao Qi <yao.qi@linaro.org>
2173
2174 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2175
8b86c959
YQ
21762017-11-02 Yao Qi <yao.qi@linaro.org>
2177
2178 * breakpoint.c (insert_single_step_breakpoints): Update.
2179 * frame.c (struct frame_info) <aspace>: Add const.
2180 (frame_save_as_regcache): Add const.
2181 (get_frame_address_space): Return const address_space *.
2182 * frame.h (get_frame_address_space): Update declaration.
2183 * infrun.c (struct step_over_info) <aspace>: Add const.
2184 (set_step_over_info): Make aspace const.
2185 (displaced_step_prepare_throw): Change variable const.
2186 (resume): Likewise.
2187 (proceed): Likewise.
2188 (adjust_pc_after_break): Likewise.
2189 (save_waitstatus): Likewise.
2190 (handle_signal_stop): Likewise.
2191 (keep_going_pass_signal): Likewise.
2192 * jit.c (jit_frame_sniffer): Add const.
2193 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2194 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2195 * record-full.c (record_full_wait_1): Likewise.
2196 * regcache.c (regcache::regcache): Change parameter to const.
2197 * regcache.h (regcache::regcache): Likewise.
2198 (regcache::aspace): Return const address_space *.
2199 (regcache) <m_aspace>: Add const.
2200
a01bda52
YQ
22012017-11-02 Yao Qi <yao.qi@linaro.org>
2202
2203 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2204 * frame.c (create_sentinel_frame): Likewise.
2205 * infrun.c (displaced_step_prepare_throw): Likewise.
2206 (resume): Likewise.
2207 (thread_still_needs_step_over_bp): Likewise.
2208 (proceed): Likewise.
2209 (do_target_wait): Likewise.
2210 (adjust_pc_after_break): Likewise.
2211 (handle_syscall_event): Likewise.
2212 (save_waitstatus): Likewise.
2213 (handle_inferior_event_1): Likewise.
2214 (handle_signal_stop): Likewise.
2215 (keep_going_pass_signal): Likewise.
2216 * linux-nat.c (status_callback): Likewise.
2217 (save_stop_reason): Likewise.
2218 (resume_stopped_resumed_lwps): Likewise.
2219 * record-full.c (record_full_exec_insn): Likewise.
2220 (record_full_wait_1): Likewise.
2221 * regcache.c (get_regcache_aspace): Remove.
2222 * regcache.h (get_regcache_aspace): Remove.
2223
d999647b
YQ
22242017-11-02 Yao Qi <yao.qi@linaro.org>
2225
2226 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2227 (init_regcache_descr): Use gdbarch_num_regs.
2228 (regcache::regcache): Likewise.
2229 (regcache::get_register_status): Likewise.
2230 (regcache::assert_raw_regnum): Likewise.
2231 (regcache::cooked_read): Likewise.
2232 (regcache::cooked_read_value): Likewise.
2233 (regcache::cooked_write): Likewise.
2234 (regcache::dump): Likewise.
2235 (regcache::num_raw_registers): New method.
2236 * regcache.h (class regcache) <num_raw_registers>: New.
2237
4e888c28
YQ
22382017-11-02 Yao Qi <yao.qi@linaro.org>
2239
2240 * regcache.c (regcache::assert_regnum): New method.
2241 (regcache::invalidate): Call assert_regnum.
2242 (regcache::raw_update): Likewise.
2243 (regcache::raw_write): Likewise.
2244 (regcache::raw_read_part): Likewise.
2245 (regcache::raw_write_part): Likewise.
2246 (regcache::raw_supply): Likewise.
2247 (regcache::raw_supply_integer): Likewise.
2248 (regcache::raw_supply_zeroed): Likewise.
2249 (regcache::raw_collect): Likewise.
2250 (regcache::raw_collect_integer): Likewise.
2251 * regcache.h (regcache::assert_regnum): Declare.
2252
2e1b49b3
YQ
22532017-11-02 Yao Qi <yao.qi@linaro.org>
2254
2255 * regcache.c (regcache::dump): Remove code.
2256
6c5218df
YQ
22572017-11-02 Yao Qi <yao.qi@linaro.org>
2258
2259 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2260 Remove.
2261 <sizeof_cooked_register_status>: Remove.
2262 (init_regcache_descr): Update.
2263 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2264 (regcache::save): Likewise.
2265 (regcache::dump): Likewise.
2266
dcc31d28
JB
22672017-11-01 James Bowman <james.bowman@ftdichip.com>
2268
2269 * ft32-tdep.c (ft32_fetch_instruction): New function.
2270 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2271
3a87ae65
SM
22722017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2273
2274 * cli/cli-script.c (execute_control_command): Rename to ...
2275 (execute_control_command_1): ... this.
2276 (execute_control_command): New function.
2277
09b847f3
SM
22782017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2279
2280 * tracepoint.c (tfind_command): Remove const_cast.
2281
f871c485
MG
22822017-10-30 Mike Gulick <mgulick@mathworks.com>
2283
2284 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2285
b020ff80
SM
22862017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2287
2288 * common/common-utils.h (in_inclusive_range): New function.
2289 * arm-tdep.c (arm_record_extension_space): Use
2290 in_inclusive_range.
2291 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2292 * cris-tdep.c (cris_spec_reg_applicable): Use
2293 in_inclusive_range.
2294
1b81856f
PA
22952017-10-30 Pedro Alves <palves@redhat.com>
2296 Simon Marchi <simon.marchi@ericsson.com>
2297
2298 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2299 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2300
31b833b3
PA
23012017-10-30 Pedro Alves <palves@redhat.com>
2302
2303 * common/common-utils.c (string_appendf, string_vappendf): New
2304 functions.
2305 * common/common-utils.h (string_appendf, string_vappendf): New
2306 declarations.
2307 * unittests/common-utils-selftests.c (string_appendf_func)
2308 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2309 (string_vappendf_tests): New functions.
2310 (_initialize_common_utils_selftests): Register "string_appendf" and
2311 "string_vappendf tests".
2312
4a250334
PA
23132017-10-30 Pedro Alves <palves@redhat.com>
2314
2315 * unittests/common-utils-selftests.c (format_func): New typedef.
2316 (string_printf_tests, string_vprintf_tests): Tests factored out
2317 and merged to ...
2318 (test_format_func): ... this new function.
2319 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2320 test_format_func.
2321
16c5c17e
SM
23222017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2323
2324 * darwin-nat.c: Remove include of gdb.h.
2325
7ca51576
SM
23262017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2327
2328 * xtensa-xtregs.c: Fix formatting issues.
2329
c1342859
SM
23302017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2331
2332 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2333
484d8d36
MD
23342017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2335
2336 PR python/21213
2337 * python/py-infthread.c (thpy_get_inferior): Increment reference
2338 of inferior before returning it.
2339
b5540b5f
SM
23402017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2341
2342 * unittests/common-utils-selftests.c (format): Add
2343 ATTRIBUTE_PRINTF.
2344
5a9dcda1
SM
23452017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2346
2347 * xml-syscall.c (struct syscall_desc): Add constructor.
2348 <name>: Change type to std::string.
2349 (syscall_desc_up): New typedef.
2350 (syscall_desc_p): Remove typeder.
2351 (DEF_VEC_P(syscall_desc_p)): Remove.
2352 (struct syscall_group_desc): Add constructor.
2353 <name>: Change type to std::string.
2354 <syscalls>: Change type to std::vector.
2355 (syscall_group_desc_up): New typedef.
2356 (syscall_group_desc_p): Remove typedef.
2357 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2358 (struct syscalls_info) <syscalls>: Change type to std::vector of
2359 unique_ptr.
2360 <groups>: Likewise.
2361 <my_gdb_datadir>: Change type to std::string.
2362 (syscalls_info_up): New typedef.
2363 (allocate_syscalls_info): Remove.
2364 (syscalls_info_free_syscalls_desc): Remove.
2365 (syscalls_info_free_syscall_group_desc): Remove.
2366 (free_syscalls_info): Remove.
2367 (make_cleanup_free_syscalls_info): Remove.
2368 (syscall_group_create_syscall_group_desc): Adjust.
2369 (syscall_group_add_syscall): Adjust.
2370 (syscall_create_syscall_desc): Adjust.
2371 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2372 (init_syscalls_info): Adjust.
2373 (syscall_group_get_group_by_name): Adjust.
2374 (xml_get_syscall_number): Adjust.
2375 (xml_get_syscall_name): Adjust.
2376 (xml_list_of_syscalls): Adjust.
2377 (xml_list_syscalls_by_group): Adjust.
2378 (xml_list_of_groups): Adjust.
2379
45461e0d
SM
23802017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2381
2382 * probe.h: Don't include gdb_vecs.h.
2383 (DEF_VEC_P (probe_p)): Remove.
2384 (find_probes_in_objfile): Return an std::vector.
2385 * probe.c (find_probes_in_objfile): Likewise.
2386 * breakpoint.c (breakpoint_objfile_data)
2387 <longjmp_probes>: Change type to std::vector.
2388 <exception_probes>: Likewise.
2389 (free_breakpoint_probes): Don't manually free vectors.
2390 (create_longjmp_master_breakpoint): Adjust.
2391 (create_exception_master_breakpoint): Adjust.
2392 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2393 parameter type, adjust.
2394 (svr4_create_solib_event_breakpoints): Adjust.
2395
43dce439
SM
23962017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2397
2398 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2399 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2400 with new.
2401 (free_breakpoint_probes): Rename to ...
2402 (free_breakpoint_objfile_data): ... this, and call delete on
2403 bp_objfile_data..
2404
6a1b9516
SM
24052017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2406
2407 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2408 (loaded_script_ptr): Remove typedef.
2409 (DEF_VEC_P (loaded_script_ptr)): Remove.
2410 (struct collect_matching_scripts_data): Add constructor.
2411 <scripts_p>: Change type to (pointer to) std::vector.
2412 (collect_matching_scripts_data): Adjust.
2413 (sort_scripts_by_name): Make suitable for std::sort.
2414 (print_scripts): Don't sort vector, adjust to std::vector.
2415 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2416
593e3209
SM
24172017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2418
2419 * symfile.c (filename_language): Make struct, not typedef. Add
2420 constructor.
2421 <ext>: Change type to std::string.
2422 (DEF_VEC_O (filename_language)): Remove.
2423 (filename_language_table): Change type to std::vector.
2424 (add_filename_language): Adjust.
2425 (set_ext_lang_command): Adjust.
2426 (info_ext_lang_command): Adjust.
2427 (deduce_language_from_filename): Adjust.
2428 (class scoped_restore_filename_language_table): Remove.
2429 (test_filename_language): Use scoped_restore.
2430 (test_set_ext_lang_command): Use scoped_restore, adjust to
2431 std::vector change.
2432
32fa66eb
SM
24332017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2434
2435 * symfile.c: Include selftest.h.
2436 (class scoped_restore_filename_language_table): New.
2437 (test_filename_language): New test.
2438 (test_set_ext_lang_command): New test.
2439 (_initialize_symfile): Register tests.
2440
4a27f119
KS
24412017-10-27 Keith Seitz <keiths@redhat.com>
2442
2443 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2444 in the bp_location, falling back to find_pc_sect_function when
2445 needed.
2446 (add_location_to_breakpoint): Save sal->symbol.
2447 * breakpoint.h (struct bp_location) <symbol>: New field.
2448 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2449 * symtab.h (struct symtab_and_line) <symbol>: New field.
2450
a43f3893
PF
24512017-10-26 Patrick Frants <osscontribute@gmail.com>
2452
7453e6b2 2453 PR gdb/13669
a43f3893
PF
2454 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2455 to rewind obstack.
2456
23cc4e1b
PA
24572017-10-26 Pedro Alves <palves@redhat.com>
2458
2459 * remote.c (remote_async_terminal_ours_p): Delete.
2460 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2461 Remove references to 'remote_async_terminal_ours_p'.
2462
6abc18bb
YQ
24632017-10-26 Yao Qi <yao.qi@linaro.org>
2464
2465 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2466
bd522513
YQ
24672017-10-26 Yao Qi <yao.qi@linaro.org>
2468
2469 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2470 aspace const.
2471 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2472 Likewise.
2473 * breakpoint.c (bpstat_check_location): Remove cast.
2474 (breakpoint_hit_catch_fork): Make aspce const.
2475 (breakpoint_hit_catch_solib): Likewise.
2476 (breakpoint_hit_catch_exec): Likewise.
2477 (breakpoint_hit_ranged_breakpoint): Likewise.
2478 (breakpoint_hit_watchpoint): Likewise.
2479 (base_breakpoint_breakpoint_hit): Likewise.
2480 (bkpt_breakpoint_hit): Likewise.
2481 (dprintf_breakpoint_hit): Likewise.
2482 (tracepoint_breakpoint_hit): Likewise.
2483 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2484
accd0bcd
YQ
24852017-10-26 Yao Qi <yao.qi@linaro.org>
2486
2487 * breakpoint.c (breakpoint_location_address_match): Change
2488 "struct address_space *" to "const address_space".
2489 (breakpoint_location_address_range_overlap): Likewise.
2490 (breakpoint_here_p): Likewise.
2491 (breakpoint_in_range_p): Likewise.
2492 (moribund_breakpoint_here_p): Likewise.
2493 (bp_location_inserted_here_p): Likewise.
2494 (software_breakpoint_inserted_here_p): Likewise.
2495 (hardware_breakpoint_inserted_here_p): Likewise.
2496 (hardware_watchpoint_inserted_in_range): Likewise.
2497 (bpstat_check_location): Likewise.
2498 (bpstat_stop_status): Likewise.
2499 (breakpoint_address_match): Likewise.
2500 (breakpoint_address_match_range): Likewise.
2501 (breakpoint_location_address_match): Likewise.
2502 (breakpoint_location_address_range_overlap): Likewise.
2503 (insert_single_step_breakpoint): Likewise.
2504 (breakpoint_has_location_inserted_here): Likewise.
2505 (single_step_breakpoint_inserted_here_p): Likewise.
2506 (pc_at_non_inline_function): Likewise.
2507 * breakpoint.h (bpstat_stop_status): Update declaration.
2508 (breakpoint_here_p): Likewise.
2509 (breakpoint_in_range_p): Likewise.
2510 (moribund_breakpoint_here_p): Likewise.
2511 (breakpoint_inserted_here_p): Likewise.
2512 (software_breakpoint_inserted_here_p): Likewise.
2513 (hardware_breakpoint_inserted_here_p): Likewise.
2514 (breakpoint_has_location_inserted_here): Likewise.
2515 (single_step_breakpoint_inserted_here_p): Likewise.
2516 (hardware_watchpoint_inserted_in_range): Likewise.
2517 (breakpoint_address_match): Likewise.
2518 (insert_single_step_breakpoint): Likewise.
2519 (pc_at_non_inline_function): Likewise.
2520 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2521 * record.c (record_check_stopped_by_breakpoint): Likewise.
2522 * record.h (record_check_stopped_by_breakpoint): Likewise.
2523 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2524
ac7936df
YQ
25252017-10-25 Yao Qi <yao.qi@linaro.org>
2526
2527 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2528 regcache->arch () instead get_regcache_arch.
2529 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2530 Likewise.
2531 (aarch64_fbsd_store_inferior_registers): Likewise.
2532 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2533 (store_gregs_to_thread): Likewise.
2534 (fetch_fpregs_from_thread): Likewise.
2535 (store_fpregs_to_thread): Likewise.
2536 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2537 (aarch64_store_return_value): Likewise.
2538 (aarch64_software_single_step): Likewise.
2539 * aix-thread.c (aix_thread_wait): Likewise.
2540 (supply_reg32): Likewise.
2541 (supply_sprs64): Likewise.
2542 (supply_sprs32): Likewise.
2543 (fill_gprs64): Likewise.
2544 (fill_gprs32): Likewise.
2545 (fill_sprs64): Likewise.
2546 (fill_sprs32): Likewise.
2547 (store_regs_user_thread): Likewise.
2548 (store_regs_kernel_thread): Likewise.
2549 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2550 (alphabsd_store_inferior_registers): Likewise.
2551 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2552 (alpha_store_return_value): Likewise.
2553 (alpha_deal_with_atomic_sequence): Likewise.
2554 (alpha_next_pc): Likewise.
2555 (alpha_software_single_step): Likewise.
2556 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2557 (amd64bsd_store_inferior_registers): Likewise.
2558 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2559 Likewise.
2560 (amd64_linux_store_inferior_registers): Likewise.
2561 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2562 (amd64_collect_native_gregset): Likewise.
2563 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2564 (amd64obsd_collect_uthread): Likewise.
2565 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2566 (amd64_collect_fpregset): Likewise.
2567 (amd64_supply_fxsave): Likewise.
2568 (amd64_supply_xsave): Likewise.
2569 (amd64_collect_fxsave): Likewise.
2570 (amd64_collect_xsave): Likewise.
2571 * arc-tdep.c (arc_write_pc): Likewise.
2572 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2573 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2574 (arm_fbsd_store_inferior_registers): Likewise.
2575 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2576 (store_vfp_regs): Likewise.
2577 (arm_linux_fetch_inferior_registers): Likewise.
2578 (arm_linux_store_inferior_registers): Likewise.
2579 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2580 (arm_linux_sigreturn_next_pc): Likewise.
2581 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2582 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2583 (fetch_register): Likewise.
2584 (store_register): Likewise.
2585 * arm-tdep.c (arm_is_thumb): Likewise.
2586 (displaced_in_arm_mode): Likewise.
2587 (bx_write_pc): Likewise.
2588 (arm_get_next_pcs_addr_bits_remove): Likewise.
2589 (arm_software_single_step): Likewise.
2590 (arm_extract_return_value): Likewise.
2591 (arm_store_return_value): Likewise.
2592 (arm_write_pc): Likewise.
2593 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2594 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2595 (bsd_uthread_store_registers): Likewise.
2596 * core-regset.c (fetch_core_registers): Likewise.
2597 * corelow.c (get_core_registers): Likewise.
2598 * cris-tdep.c (cris_store_return_value): Likewise.
2599 (cris_extract_return_value): Likewise.
2600 (find_step_target): Likewise.
2601 (find_step_target): Likewise.
2602 (cris_software_single_step): Likewise.
2603 * ctf.c (ctf_fetch_registers): Likewise.
2604 * darwin-nat.c (cancel_breakpoint): Likewise.
2605 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2606 * frv-tdep.c (frv_extract_return_value): Likewise.
2607 * ft32-tdep.c (ft32_store_return_value): Likewise.
2608 (ft32_extract_return_value): Likewise.
2609 * go32-nat.c (fetch_register): Likewise.
2610 (go32_fetch_registers): Likewise.
2611 (go32_store_registers): Likewise.
2612 (store_register): Likewise.
2613 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2614 (h8300_store_return_value): Likewise.
2615 * hppa-linux-nat.c (fetch_register): Likewise.
2616 (store_register): Likewise.
2617 (hppa_linux_fetch_inferior_registers): Likewise.
2618 (hppa_linux_store_inferior_registers): Likewise.
2619 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2620 (i386_darwin_store_inferior_registers): Likewise.
2621 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2622 (gnu_store_registers): Likewise.
2623 * i386-linux-nat.c (fetch_register): Likewise.
2624 (store_register): Likewise.
2625 (supply_gregset): Likewise.
2626 (fill_gregset): Likewise.
2627 (i386_linux_fetch_inferior_registers): Likewise.
2628 (i386_linux_store_inferior_registers): Likewise.
2629 (i386_linux_resume): Likewise.
2630 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2631 Likewise.
2632 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2633 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2634 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2635 (i386obsd_collect_uthread): Likewise.
2636 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2637 (i386_supply_gregset): Likewise.
2638 (i386_collect_gregset): Likewise.
2639 (i386_supply_fpregset): Likewise.
2640 (i386_collect_fpregset): Likewise.
2641 (i386_mpx_bd_base): Likewise.
2642 * i386-v4-nat.c (supply_fpregset): Likewise.
2643 (fill_fpregset): Likewise.
2644 * i387-tdep.c (i387_supply_fsave): Likewise.
2645 (i387_collect_fsave): Likewise.
2646 (i387_supply_fxsave): Likewise.
2647 (i387_collect_fxsave): Likewise.
2648 (i387_supply_xsave): Likewise.
2649 (i387_collect_xsave): Likewise.
2650 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2651 (ia64_linux_store_registers): Likewise.
2652 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2653 (ia64_extract_return_value): Likewise.
2654 (ia64_store_return_value): Likewise.
2655 (find_func_descr): Likewise.
2656 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2657 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2658 (inf_ptrace_store_registers): Likewise.
2659 * infrun.c (use_displaced_stepping): Likewise.
2660 (displaced_step_prepare_throw): Likewise.
2661 (resume): Likewise.
2662 (proceed): Likewise.
2663 (do_target_wait): Likewise.
2664 (adjust_pc_after_break): Likewise.
2665 (handle_inferior_event_1): Likewise.
2666 (handle_signal_stop): Likewise.
2667 (save_infcall_suspend_state): Likewise.
2668 (restore_infcall_suspend_state): Likewise.
2669 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2670 * jit.c (jit_frame_prev_register): Likewise.
2671 * linux-nat.c (save_stop_reason): Likewise.
2672 (linux_nat_wait_1): Likewise.
2673 (resume_stopped_resumed_lwps): Likewise.
2674 * linux-record.c (record_linux_sockaddr): Likewise.
2675 (record_linux_msghdr): Likewise.
2676 (record_linux_system_call): Likewise.
2677 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2678 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2679 (lm32_store_return_value): Likewise.
2680 * m32c-tdep.c (m32c_read_flg): Likewise.
2681 (m32c_pseudo_register_read): Likewise.
2682 (m32c_pseudo_register_write): Likewise.
2683 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2684 (m32r_linux_collect_gregset): Likewise.
2685 * m32r-tdep.c (m32r_store_return_value): Likewise.
2686 (m32r_extract_return_value): Likewise.
2687 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2688 (m68kbsd_collect_fpregset): Likewise.
2689 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2690 * m68k-linux-nat.c (fetch_register): Likewise.
2691 (old_fetch_inferior_registers): Likewise.
2692 (old_store_inferior_registers): Likewise.
2693 (store_regs): Likewise.
2694 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2695 (m68k_svr4_store_return_value): Likewise.
2696 * m88k-tdep.c (m88k_store_arguments): Likewise.
2697 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2698 (mi_cmd_data_write_register_values): Likewise.
2699 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2700 (mips_fbsd_store_inferior_registers): Likewise.
2701 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2702 (mips_fbsd_supply_gregs): Likewise.
2703 (mips_fbsd_collect_fpregs): Likewise.
2704 (mips_fbsd_collect_gregs): Likewise.
2705 (mips_fbsd_supply_fpregset): Likewise.
2706 (mips_fbsd_collect_fpregset): Likewise.
2707 (mips_fbsd_supply_gregset): Likewise.
2708 (mips_fbsd_collect_gregset): Likewise.
2709 * mips-linux-nat.c (supply_gregset): Likewise.
2710 (fill_gregset): Likewise.
2711 (supply_fpregset): Likewise.
2712 (fill_fpregset): Likewise.
2713 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2714 (mips_fill_gregset): Likewise.
2715 (mips_supply_fpregset): Likewise.
2716 (mips_fill_fpregset): Likewise.
2717 (mips64_supply_gregset): Likewise.
2718 (micromips_linux_sigframe_validate): Likewise.
2719 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2720 (mipsnbsd_fetch_inferior_registers): Likewise.
2721 (mipsnbsd_store_inferior_registers): Likewise.
2722 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2723 (mipsnbsd_supply_gregset): Likewise.
2724 (mipsnbsd_iterate_over_regset_sections): Likewise.
2725 (mipsnbsd_supply_reg): Likewise.
2726 (mipsnbsd_supply_fpreg): Likewise.
2727 * mips-tdep.c (mips_in_frame_stub): Likewise.
2728 (mips_dummy_id): Likewise.
2729 (is_octeon_bbit_op): Likewise.
2730 (micromips_bc1_pc): Likewise.
2731 (extended_mips16_next_pc): Likewise.
2732 (mips16_next_pc): Likewise.
2733 (deal_with_atomic_sequence): Likewise.
2734 * moxie-tdep.c (moxie_process_readu): Likewise.
2735 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2736 * nto-procfs.c (procfs_store_registers): Likewise.
2737 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2738 (ppcfbsd_store_inferior_registers): Likewise.
2739 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2740 (fetch_altivec_register): Likewise.
2741 (get_spe_registers): Likewise.
2742 (fetch_spe_register): Likewise.
2743 (fetch_altivec_registers): Likewise.
2744 (fetch_all_gp_regs): Likewise.
2745 (fetch_all_fp_regs): Likewise.
2746 (store_vsx_register): Likewise.
2747 (store_altivec_register): Likewise.
2748 (set_spe_registers): Likewise.
2749 (store_spe_register): Likewise.
2750 (store_altivec_registers): Likewise.
2751 (store_all_gp_regs): Likewise.
2752 (store_all_fp_regs): Likewise.
2753 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2754 (ppc_linux_collect_gregset): Likewise.
2755 (ppc_canonicalize_syscall): Likewise.
2756 (ppc_linux_record_signal): Likewise.
2757 (ppu2spu_prev_register): Likewise.
2758 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2759 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2760 (ppcobsd_store_registers): Likewise.
2761 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2762 Likewise.
2763 (ppc_ravenscar_generic_store_registers): Likewise.
2764 * procfs.c (procfs_fetch_registers): Likewise.
2765 (procfs_store_registers): Likewise.
2766 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2767 (ravenscar_store_registers): Likewise.
2768 (ravenscar_prepare_to_store): Likewise.
2769 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2770 * record-full.c (record_full_wait_1): Likewise.
2771 (record_full_registers_change): Likewise.
2772 (record_full_store_registers): Likewise.
2773 (record_full_core_fetch_registers): Likewise.
2774 (record_full_save): Likewise.
2775 (record_full_goto_insn): Likewise.
2776 * regcache.c (regcache_register_size): Likewise.
2777 (get_regcache_arch): Remove.
2778 (regcache_read_pc): Likewise.
2779 * regcache.h (get_regcache_arch): Remove.
2780 * remote-sim.c (gdbsim_fetch_register): Likewise.
2781 (gdbsim_store_register): Likewise.
2782 * remote.c (fetch_register_using_p): Likewise.
2783 (send_g_packet): Likewise.
2784 (remote_prepare_to_store): Likewise.
2785 (store_registers_using_G): Likewise.
2786 * reverse.c (save_bookmark_command): Likewise.
2787 (goto_bookmark_command): Likewise.
2788 * rs6000-aix-tdep.c (branch_dest): Likewise.
2789 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2790 (fetch_register): Likewise.
2791 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2792 (ppc_collect_reg): Likewise.
2793 (ppc_collect_gregset): Likewise.
2794 (ppc_collect_fpregset): Likewise.
2795 (ppc_collect_vsxregset): Likewise.
2796 (ppc_collect_vrregset): Likewise.
2797 (ppc_displaced_step_hw_singlestep): Likewise.
2798 (rs6000_pseudo_register_read): Likewise.
2799 (rs6000_pseudo_register_write): Likewise.
2800 * s390-linux-nat.c (supply_gregset): Likewise.
2801 (fill_gregset): Likewise.
2802 (s390_linux_fetch_inferior_registers): Likewise.
2803 * s390-linux-tdep.c (s390_write_pc): Likewise.
2804 (s390_software_single_step): Likewise.
2805 (s390_all_but_pc_registers_record): Likewise.
2806 (s390_linux_syscall_record): Likewise.
2807 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2808 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2809 (shnbsd_store_inferior_registers): Likewise.
2810 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2811 (sh_extract_return_value_fpu): Likewise.
2812 (sh_store_return_value_nofpu): Likewise.
2813 (sh_corefile_supply_regset): Likewise.
2814 (sh_corefile_collect_regset): Likewise.
2815 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2816 (sh64_store_return_value): Likewise.
2817 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2818 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2819 (sparc_store_inferior_registers): Likewise.
2820 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2821 (sparc_ravenscar_prepare_to_store): Likewise.
2822 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2823 (sparc_analyze_control_transfer): Likewise.
2824 (sparc_step_trap): Likewise.
2825 (sparc_software_single_step): Likewise.
2826 (sparc32_gdbarch_init): Likewise.
2827 (sparc_supply_rwindow): Likewise.
2828 (sparc_collect_rwindow): Likewise.
2829 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2830 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2831 (sparc64nbsd_collect_gregset): Likewise.
2832 (sparc64nbsd_supply_fpregset): Likewise.
2833 (sparc64nbsd_collect_fpregset): Likewise.
2834 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2835 (sparc64_supply_gregset): Likewise.
2836 (sparc64_collect_gregset): Likewise.
2837 (sparc64_supply_fpregset): Likewise.
2838 (sparc64_collect_fpregset): Likewise.
2839 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2840 * spu-tdep.c (spu_unwind_sp): Likewise.
2841 (spu2ppu_prev_register): Likewise.
2842 (spu_memory_remove_breakpoint): Likewise.
2843 * stack.c (return_command): Likewise.
2844 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2845 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2846 * tracefile.c (trace_save_ctf): Likewise.
2847 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2848 (do_windows_store_inferior_registers): Likewise.
2849 (windows_resume): Likewise.
2850 * xtensa-linux-nat.c (fill_gregset): Likewise.
2851 (supply_gregset_reg): Likewise.
2852 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2853 (xtensa_register_read_masked): Likewise.
2854 (xtensa_supply_gregset): Likewise.
2855 (xtensa_extract_return_value): Likewise.
2856 (xtensa_store_return_value): Likewise.
2857
edd079d9
UW
28582017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2859
2860 * doublest.c (floatformat_from_string): New function.
2861 * doublest.h (floatformat_from_string): Add prototype.
2862
2863 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2864 (OP_FLOAT): ... this.
2865 * expression.h: Do not include "doublest.h".
2866 (union exp_element): Replace doubleconst and decfloatconst by
2867 new element floatconst.
2868 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2869 (ada_evaluate_subexp): Likewise.
2870 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2871 OP_DOUBLE and OP_DECFLOAT.
2872 * expprint.c (print_subexp_standard): Likewise.
2873 (dump_subexp_body_standard): Likewise.
2874 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2875
2876 * parse.c: Include "dfp.h".
2877 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2878 (write_exp_elt_floatcst): New function.
2879 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2880 and OP_DECFLOAT.
2881 (operator_check_standard): Likewise.
2882 (parse_float): Do not accept suffix. Take type as input. Return bool.
2883 Return target format buffer instead of host DOUBLEST.
2884 Use floatformat_from_string and decimal_from_string to parse
2885 either binary or decimal floating-point types.
2886 (parse_c_float): Remove.
2887 * parser-defs.h: Do not include "doublest.h".
2888 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2889 (write_exp_elt_floatcst): Add prototype.
2890 (parse_float): Update prototype.
2891 (parse_c_float): Remove.
2892
2893 * c-exp.y: Do not include "dfp.h".
2894 (typed_val_float): Use byte buffer instead of DOUBLEST.
2895 (typed_val_decfloat): Remove.
2896 (DECFLOAT): Remove.
2897 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2898 (parse_number): Update to new parse_float interface.
2899 Parse suffixes and determine type before calling parse_float.
2900 Handle decimal and binary FP types the same way.
2901
2902 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2903 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2904 (parse_number): Update to new parse_float interface.
2905 Parse suffixes and determine type before calling parse_float.
2906
2907 * f-exp.y: Replace dval by typed_val_float.
2908 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2909 (parse_number): Use parse_float instead of atof.
2910
2911 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2912 (parse_go_float): Remove.
2913 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2914 (parse_number): Call parse_float instead of parse_go_float.
2915 Parse suffixes and determine type before calling parse_float.
2916
2917 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2918 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2919 (parse_number): Update to new parse_float interface.
2920 Parse suffixes and determine type before calling parse_float.
2921
2922 * m2-exp.y: Replace dval by byte buffer val.
2923 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2924 (parse_number): Call parse_float instead of atof.
2925
2926 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2927 (lex_number): Call parse_float instead of strtod.
2928 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2929 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2930 Use write_exp_elt_floatcst.
2931 (unit_testing): Remove static variable.
2932 (rust_type): Do not check unit_testing.
2933 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2934
2935 * ada-exp.y (type_float, type_double): Remove.
2936 (typed_val_float): Use byte buffer instead of DOUBLEST.
2937 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2938 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2939
cc628f3d
AH
29402017-10-25 Alan Hayward <alan.hayward@arm.com>
2941
2942 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2943 * arch/aarch64.h: New file.
2944
09a7c6aa
UW
29452017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2946
2947 * dfp.h (decimal_from_string): Use const reference for argument.
2948 * dfp.c (decimal_from_string): Likewise.
2949
8ba0dd51
UW
29502017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2951
2952 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2953 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2954 * mips-tdep.c (mips_print_fp_register): Likewise.
2955
16e812b2
UW
29562017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2957
2958 * common/format.h (enum argclass): Replace decfloat_arg by
2959 dec32float_arg, dec64float_arg, and dec128float_arg.
2960 * common/format.c (parse_format_string): Update to return
2961 new decimal float argument classes.
2962
2963 * printcmd.c (printf_decfloat): Rename to ...
2964 (printf_floating): ... this. Add argclass argument, and use it
2965 instead of parsing the format string again. Add support for
2966 binary floating-point values, using floatformat_to_string.
2967 Convert value to the target format if it doesn't already match.
2968 (ui_printf): Call printf_floating instead of printf_decfloat,
2969 also for double_arg / long_double_arg. Pass argclass.
2970
2971 * dfp.c (decimal_to_string): Add format string argument.
2972 * dfp.h (decimal_to_string): Likewise.
2973
2974 * doublest.c (floatformat_to_string): Add format string argument.
2975 * doublest.h (floatformat_to_string): Likewise.
2976
fdf0cbc2
UW
29772017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2978
2979 * doublest.c (floatformat_precision): New routine.
2980 (floatformat_to_string): Likewise.
2981 * doublest.c (floatformat_to_string): Add prototype.
2982
2983 * printcmd.c (print_scalar_formatted): Only call print_floating
2984 on floating-point types.
2985 * valprint.c: Do not include "floatformat.h".
2986 (generic_val_print_decfloat): Remove.
2987 (generic_val_print): Call generic_val_print_float for both
2988 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2989 (print_floating): Use floatformat_to_string. Handle decimal float.
2990 (print_decimal_floating): Remove, merge into floatformat_to_string.
2991 * value.h (print_decimal_floating): Remove.
2992
2993 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2994
5033013f
UW
29952017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2996
2997 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2998
a664f67e
SM
29992017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3000
3001 * memattr.h: Don't include vec.h.
3002 (struct mem_attrib): Initialize fields.
3003 <unknown>: New static method.
3004 (struct mem_region): Add constructors, operator<, initialize
3005 fields.
3006 * memattr.c: Include algorithm.
3007 (default_mem_attrib, unknown_mem_attrib): Remove.
3008 (user_mem_region_list): New global.
3009 (target_mem_region_list, mem_region_list): Change type to
3010 std::vector<mem_region>.
3011 (mem_use_target): Now a function.
3012 (target_mem_regions_valid): Change type to bool.
3013 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3014 (require_user_regions): Adjust.
3015 (require_target_regions): Adjust.
3016 (create_mem_region): Adjust.
3017 (lookup_mem_region): Adjust.
3018 (invalidate_target_mem_regions): Adjust.
3019 (mem_clear): Rename to...
3020 (user_mem_clear): ... this, and adjust.
3021 (mem_command): Adjust.
3022 (info_mem_command): Adjust.
3023 (mem_enable, enable_mem_command, mem_disable,
3024 disable_mem_command): Adjust.
3025 (mem_delete): Adjust.
3026 (delete_mem_command): Adjust.
3027 * memory-map.h (parse_memory_map): Return an std::vector.
3028 * memory-map.c (parse_memory_map): Likewise.
3029 (struct memory_map_parsing_data): Add constructor.
3030 <memory_map>: Point to std::vector.
3031 (memory_map_start_memory): Adjust.
3032 (memory_map_end_memory): Adjust.
3033 (memory_map_end_property): Adjust.
3034 (clear_result): Remove.
3035 * remote.c (remote_memory_map): Return an std::vector.
3036 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3037 Remove.
3038 (target_debug_print_mem_region_vector): New.
3039 * target-delegates.c: Regenerate.
3040 * target.h (mem_region_vector): New typedef.
3041 (to_memory_map): Return mem_region_vector.
3042 (target_memory_map): Return an std::vector.
3043 * target.c (target_memory_map): Return an std::vector.
3044 (flash_erase_command): Adjust.
3045
6e17c565
SM
30462017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3047
3048 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3049 Change type to std::string.
3050 (memory_map_start_property): Adjust.
3051 (memory_map_end_property): Adjust.
3052
cfba9872
SM
30532017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3054
3055 * infrun.h: Include common/byte-vector.h.
3056 (struct displaced_step_closure): New struct.
3057 (struct buf_displaced_step_closure): New struct.
3058 * infrun.c (displaced_step_closure::~displaced_step_closure):
3059 Provide default implementation.
3060 (displaced_step_clear): Deallocate step closure with delete.
3061 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3062 (aarch64_displaced_step_closure): ... this, extend
3063 displaced_step_closure.
3064 (aarch64_displaced_step_data) <dsc>: Change type to
3065 aarch64_displaced_step_closure.
3066 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3067 unique_ptr.
3068 (aarch64_displaced_step_fixup): Add cast for displaced step
3069 closure.
3070 * amd64-tdep.c (displaced_step_closure): Rename to ...
3071 (amd64_displaced_step_closure): ... this, extend
3072 displaced_step_closure.
3073 <insn_buf>: Change type to std::vector<gdb_byte>.
3074 <max_len>: Remove.
3075 (fixup_riprel): Change type of DSC parameter, adjust to type
3076 change of insn_buf.
3077 (fixup_displaced_copy): Change type of DSC parameter.
3078 (amd64_displaced_step_copy_insn): Instantiate
3079 amd64_displaced_step_closure.
3080 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3081 to type change of insn_buf.
3082 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3083 parameter DSC.
3084 (arm_linux_copy_svc): Likewise.
3085 (cleanup_kernel_helper_return): Likewise.
3086 (arm_catch_kernel_helper_return): Likewise.
3087 (arm_linux_displaced_step_copy_insn): Instantiate
3088 arm_displaced_step_closure.
3089 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3090 (displaced_read_reg): Change type of parameter DSC.
3091 (branch_write_pc): Likewise.
3092 (load_write_pc): Likewise.
3093 (alu_write_pc): Likewise.
3094 (displaced_write_reg): Likewise.
3095 (arm_copy_unmodified): Likewise.
3096 (thumb_copy_unmodified_32bit): Likewise.
3097 (thumb_copy_unmodified_16bit): Likewise.
3098 (cleanup_preload): Likewise.
3099 (install_preload): Likewise.
3100 (arm_copy_preload): Likewise.
3101 (thumb2_copy_preload): Likewise.
3102 (install_preload_reg): Likewise.
3103 (arm_copy_preload_reg): Likewise.
3104 (cleanup_copro_load_store): Likewise.
3105 (install_copro_load_store): Likewise.
3106 (arm_copy_copro_load_store) Likewise.
3107 (thumb2_copy_copro_load_store): Likewise.
3108 (cleanup_branch): Likewise.
3109 (install_b_bl_blx): Likewise.
3110 (arm_copy_b_bl_blx): Likewise.
3111 (thumb2_copy_b_bl_blx): Likewise.
3112 (thumb_copy_b): Likewise.
3113 (install_bx_blx_reg): Likewise.
3114 (arm_copy_bx_blx_reg): Likewise.
3115 (thumb_copy_bx_blx_reg): Likewise.
3116 (cleanup_alu_imm): Likewise.
3117 (arm_copy_alu_imm): Likewise.
3118 (thumb2_copy_alu_imm): Likewise.
3119 (cleanup_alu_reg): Likewise.
3120 (install_alu_reg): Likewise.
3121 (arm_copy_alu_reg): Likewise.
3122 (thumb_copy_alu_reg): Likewise.
3123 (cleanup_alu_shifted_reg): Likewise.
3124 (install_alu_shifted_reg): Likewise.
3125 (arm_copy_alu_shifted_reg): Likewise.
3126 (cleanup_load): Likewise.
3127 (cleanup_store): Likewise.
3128 (arm_copy_extra_ld_st): Likewise.
3129 (install_load_store): Likewise.
3130 (thumb2_copy_load_literal): Likewise.
3131 (thumb2_copy_load_reg_imm): Likewise.
3132 (arm_copy_ldr_str_ldrb_strb): Likewise.
3133 (cleanup_block_load_all): Likewise.
3134 (cleanup_block_store_pc): Likewise.
3135 (cleanup_block_load_pc): Likewise.
3136 (arm_copy_block_xfer): Likewise.
3137 (thumb2_copy_block_xfer): Likewise.
3138 (cleanup_svc): Likewise.
3139 (install_svc): Likewise.
3140 (arm_copy_svc): Likewise.
3141 (thumb_copy_svc): Likewise.
3142 (arm_copy_undef): Likewise.
3143 (thumb_32bit_copy_undef): Likewise.
3144 (arm_copy_unpred): Likewise.
3145 (arm_decode_misc_memhint_neon): Likewise.
3146 (arm_decode_unconditional): Likewise.
3147 (arm_decode_miscellaneous): Likewise.
3148 (arm_decode_dp_misc): Likewise.
3149 (arm_decode_ld_st_word_ubyte): Likewise.
3150 (arm_decode_media): Likewise.
3151 (arm_decode_b_bl_ldmstm): Likewise.
3152 (arm_decode_ext_reg_ld_st): Likewise.
3153 (thumb2_decode_dp_shift_reg): Likewise.
3154 (thumb2_decode_ext_reg_ld_st): Likewise.
3155 (arm_decode_svc_copro): Likewise.
3156 (thumb2_decode_svc_copro): Likewise.
3157 (install_pc_relative): Likewise.
3158 (thumb_copy_pc_relative_16bit): Likewise.
3159 (thumb_decode_pc_relative_16bit): Likewise.
3160 (thumb_copy_pc_relative_32bit): Likewise.
3161 (thumb_copy_16bit_ldr_literal): Likewise.
3162 (thumb_copy_cbnz_cbz): Likewise.
3163 (thumb2_copy_table_branch): Likewise.
3164 (cleanup_pop_pc_16bit_all): Likewise.
3165 (thumb_copy_pop_pc_16bit): Likewise.
3166 (thumb_process_displaced_16bit_insn): Likewise.
3167 (decode_thumb_32bit_ld_mem_hints): Likewise.
3168 (thumb_process_displaced_32bit_insn): Likewise.
3169 (thumb_process_displaced_insn): Likewise.
3170 (arm_process_displaced_insn): Likewise.
3171 (arm_displaced_init_closure): Likewise.
3172 (arm_displaced_step_fixup): Add cast for closure.
3173 * arm-tdep.h: Include infrun.h.
3174 (displaced_step_closure): Rename to ...
3175 (arm_displaced_step_closure): ... this, extend
3176 displaced_step_closure.
3177 <u::svc::copy_svc_os>: Change type of parameter DSC.
3178 <cleanup>: Likewise.
3179 (arm_process_displaced_insn): Likewise.
3180 (arm_displaced_init_closure): Likewise.
3181 (displaced_read_reg): Likewise.
3182 (displaced_write_reg): Likewise.
3183 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3184 Adjust.
3185 * i386-tdep.h: Include infrun.h.
3186 (i386_displaced_step_closure): New typedef.
3187 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3188 i386_displaced_step_closure.
3189 (i386_displaced_step_fixup): Adjust.
3190 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3191 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3192 and unique_ptr.
3193 (ppc_displaced_step_fixup): Adjust.
3194 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3195 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3196 and unique_ptr.
3197 (s390_displaced_step_fixup): Adjust.
3198
b392b304
SM
31992017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3200
3201 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3202 Remove declarations.
3203
d5833c62
TT
32042017-10-20 Tom Tromey <tom@tromey.com>
3205
3206 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3207 std::vector.
3208 (gdb_bfd_record_inclusion): Update.
3209 (bfdp): Remove typedef.
3210
06d5bbc8
TT
32112017-10-20 Tom Tromey <tom@tromey.com>
3212
3213 * gdb_bfd.c (gdb_bfd_ref): Use new.
3214 (struct gdb_bfd_data): Add constructor, destructor, and member
3215 initializers.
3216 (gdb_bfd_unref): Use delete.
3217
2712ce2e
TT
32182017-10-20 Tom Tromey <tom@tromey.com>
3219
3220 * exec.c (exec_file_attach): Use new_bfd_ref.
3221 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3222 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3223 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3224 new_bfd_ref.
3225 * gdb_bfd.h (new_bfd_ref): New function.
3226
fcc8fb2f
PA
32272017-10-20 Pedro Alves <palves@redhat.com>
3228
3229 * main.c (captured_command_loop): Add attribute noinline.
3230
4c2287b0
SM
32312017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3232
3233 * interps.c (struct interp_factory): Add constructor.
3234 (interp_factory_p): Remove typedef.
3235 (DEF_VEC_P(interp_factory_p)): Remove.
3236 (interpreter_factories): Change type to std::vector.
3237 (interp_factory_register): Adjust.
3238 (interp_lookup): Adjust.
3239 (interpreter_completer): Adjust.
3240
3d415c26
TT
32412017-10-19 Tom Tromey <tom@tromey.com>
3242
3243 * break-catch-syscall.c (catch_syscall_completer): Use
3244 std::string, gdb::unique_xmalloc_ptr.
3245
395423c4
TT
32462017-10-19 Tom Tromey <tom@tromey.com>
3247
3248 * infcall.c (call_function_by_hand_dummy): Use std::string.
3249
54f70bc1
TT
32502017-10-19 Tom Tromey <tom@tromey.com>
3251
3252 * mi/mi-main.c (mi_cmd_execute): Update.
3253 * top.h (prepare_execute_command): Return scoped_value_mark.
3254 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3255 Add move constructor.
3256 * top.c (prepare_execute_command): Return scoped_value_mark.
3257 (execute_command): Update.
3258
63929e84
PA
32592017-10-19 Pedro Alves <palves@redhat.com>
3260
3261 * xml-support.c (xml_fetch_content_from_file): Check fread's
3262 return.
3263
a75868f5
PA
32642017-10-19 Pedro Alves <palves@redhat.com>
3265
3266 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3267 async.
3268 (handle_error_fd): New function.
3269 (ser_base_async): Add/delete an event loop file handler for
3270 error_fd.
3271
2edf834e
PA
32722017-10-19 Pedro Alves <palves@redhat.com>
3273
3274 * xml-support.c (xml_fetch_content_from_file): Don't read in
3275 chunks. Instead use fseek to determine the file's size, and read
3276 it in one go.
3277
c8ba13ad
KS
32782017-11-18 Keith Seitz <keiths@redhat.com>
3279
3280 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3281 types.
3282 Add whitespace to front of type name.
3283
37534686
KS
32842017-10-18 Keith Seitz <keiths@redhat.com>
3285
3286 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3287 DW_AT_accessibility.
3288
28c7c158
YQ
32892017-10-18 Yao Qi <yao.qi@linaro.org>
3290
3291 * features/tic6x-c62x-linux.c: Remove.
3292
30f0b101
TT
32932017-10-17 Tom Tromey <tom@tromey.com>
3294
3295 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3296 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3297 (do_mixed_source_and_assembly): Likewise.
3298
57e12da9
TT
32992017-10-17 Tom Tromey <tom@tromey.com>
3300
3301 * regcache.c (regcache::xfer_part): Remove assertion.
3302
7b700999
PA
33032017-10-17 Pedro Alves <palves@redhat.com>
3304
3305 * xml-support.c (xml_fetch_content_from_file): Call
3306 unique_ptr::release() instead unique_ptr::get() when passing
3307 through xrealloc.
3308
d3037ba6
YQ
33092017-10-17 Yao Qi <yao.qi@linaro.org>
3310
3311 * regcache.c (regcache::xfer_part): Remove parameters read and
3312 write, add parameter is_raw. All callers are updated.
3313
83d5a34d
KS
33142017-10-16 Keith Seitz <keiths@redhat.com>
3315
3316 * c-typeprint.c (enum access_specifier): Moved here from
3317 c_type_print_base.
3318 (output_access_specifier): New function.
3319 (c_type_print_base): Consider typedefs when assessing
3320 whether access labels are needed.
3321 Use output_access_specifier as needed.
3322 Output access specifier for typedefs, if needed.
3323 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3324 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3325 fields.
3326 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3327 accessor macros.
3328
87028b87
TT
33292017-10-16 Tom Tromey <tom@tromey.com>
3330
3331 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3332 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3333 * target.c (target_fileio_read_stralloc): Update.
3334 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3335 * target.h (target_fileio_read_stralloc): Return
3336 unique_xmalloc_ptr.
3337
b7b030ad
TT
33382017-10-16 Tom Tromey <tom@tromey.com>
3339
3340 * xml-syscall.c (xml_init_syscalls_info): Update.
3341 * xml-support.c (xinclude_start_include): Update.
3342 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3343 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3344 (xml_fetch_content_from_file): Likewise.
3345 * osdata.c (get_osdata): Update.
3346 * target.h (target_read_stralloc, target_get_osdata): Return
3347 unique_xmalloc_ptr.
3348 * solib-aix.c (solib_aix_get_library_list): Update.
3349 * solib-target.c (solib_target_current_sos): Update.
3350 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3351 * xml-tdesc.c (fetch_available_features_from_target): Update.
3352 (target_fetch_description_xml): Update.
3353 (file_read_description_xml): Update.
3354 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3355 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3356 (remote_pid_to_exec_file): Update.
3357 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3358 (target_get_osdata): Likewise.
3359
b80406ac
TT
33602017-10-16 Tom Tromey <tom@tromey.com>
3361
3362 * remote.c (remote_register_number_and_offset): Use std::vector.
3363 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3364 (putpkt_binary): Use gdb::def_vector.
3365 (compare_sections_command): Use gdb::byte_vector.
3366
a90ecff8
TT
33672017-10-16 Tom Tromey <tom@tromey.com>
3368
3369 * ppc-linux-nat.c (hwdebug_insert_point): Use
3370 gdb::unique_xmalloc_ptr, XDUP.
3371
2dc0e219
TT
33722017-10-16 Tom Tromey <tom@tromey.com>
3373
3374 * probe.c (parse_probes): Use std::string.
3375 (info_probes_for_ops, enable_probes_command)
3376 (disable_probes_command): Remove cleanups.
3377
b05628f0
TT
33782017-10-16 Tom Tromey <tom@tromey.com>
3379
3380 * buildsym.c (block_compar): Remove.
3381 (end_symtab_get_static_block): Use std::vector.
3382
a79b1bc6
SM
33832017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3384
3385 * memrange.h (struct mem_range): Define operator< and operator==.
3386 (mem_range_s): Remove.
3387 (DEF_VEC_O (mem_range_s)): Remove.
3388 (normalize_mem_ranges): Change parameter type to std::vector.
3389 * memrange.c (compare_mem_ranges): Remove.
3390 (normalize_mem_ranges): Change parameter type to std::vector,
3391 adjust to vector change.
3392 * exec.c (section_table_available_memory): Return vector, remove
3393 parameter.
3394 (section_table_read_available_memory): Adjust to std::vector
3395 change.
3396 * remote.c (remote_read_bytes): Adjust to std::vector
3397 change.
3398 * tracepoint.h (traceframe_available_memory): Change parameter
3399 type to std::vector.
3400 * tracepoint.c (traceframe_available_memory): Change parameter
3401 type to std::vector, adjust.
3402 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3403 std::vector change.
3404 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3405 unittests/memrange-selftests.c.
3406 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3407 * gdb/unittests/memrange-selftests.c: New file.
3408
63f0e930
PA
34092017-10-16 Pedro Alves <palves@redhat.com>
3410
3411 * elfread.c (probe_key_free): Rename range-for variable.
3412 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3413 (find_probe_by_pc, collect_probes): Rename range-for variable.
3414
c40c7bfc
YQ
34152017-10-16 Yao Qi <yao.qi@linaro.org>
3416
3417 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3418 * features/tic6x-c62x.c: Remove.
3419 * features/tic6x-c64x-linux.c: Remove.
3420 * features/tic6x-c64x.c: Remove.
3421 * features/tic6x-c64xp-linux.c: Remove.
3422 * features/tic6x-c64xp.c: Remove.
3423 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3424 initialize_tdesc_tic6x_*_linux functions.
3425 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3426 initialize_tdesc_tic6x_* functions.
3427
df27ae6a
YQ
34282017-10-16 Yao Qi <yao.qi@linaro.org>
3429
3430 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3431 tic6x-c62x.
3432 * regformats/tic6x-c62x.dat: Remove.
3433 * regformats/tic6x-c64x.dat: Remove.
3434 * regformats/tic6x-c64xp.dat: Remove.
3435
86766165
SM
34362017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3437
3438 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3439 (the !HAVE_LIBEXPAT version).
3440
824dfcc3
SM
34412017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3442
3443 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3444 const.
3445
2098b393
SM
34462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3447
3448 * target.h: Include tracepoint.h.
3449 (enum trace_find_type): Move to tracepoint.h.
3450 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3451 * tracepoint.h: Don't include target.h
3452 (enum trace_find_type): Move from target.h.
3453 (parse_traceframe_info): Return a unique ptr.
3454 * tracepoint.c (current_traceframe_info): Change type to unique
3455 ptr.
3456 (free_traceframe_info): Remove.
3457 (clear_traceframe_info): Don't manually free
3458 current_traceframe_info.
3459 (free_result): Remove.
3460 (parse_traceframe_info): Return a unique ptr.
3461 (get_traceframe_info): Adjust to unique ptr.
3462 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3463 * remote.c (remote_traceframe_info): Return a unique ptr.
3464 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3465 ptr.
3466 * target-debug.h (target_debug_print_traceframe_info_up): New
3467 macro.
3468 * target-delegates.c: Regenerate.
3469
4cdd21a8
SM
34702017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3471
3472 * memrange.h (struct mem_range): Add constructors.
3473 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3474 std::vector<mem_range>.
3475 * tracepoint.c (free_traceframe_info): Don't manually free
3476 vector.
3477 (traceframe_info_start_memory): Adjust to vector change.
3478 (traceframe_available_memory): Likewise.
3479 * tracefile-tfile.c (build_traceframe_info): Likewise.
3480 * ctf.c (ctf_traceframe_info): Likewise.
3481
d0d292a2
SM
34822017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3483
3484 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3485 std::vector<int>.
3486 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3487 (traceframe_info_start_tvar): Adjust to vector change.
3488 (parse_traceframe_info): Allocate with new.
3489 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3490 vector change.
3491 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3492 change.
3493 tfile_traceframe_info): Allocate with new.
3494 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3495 change.
3496
8d3c73ef
SM
34972017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3498
3499 * tracepoint.c (traceframe_info): Rename to...
3500 (current_traceframe_info): ...this.
3501 (clear_traceframe_info): Adjust.
3502 (get_traceframe_info): Adjust.
3503
b129dcac
SM
35042017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3505
3506 * nat/linux-osdata.c: Include algorithm.
3507 (compare_processes): Remove.
3508 (struct pid_pgid_entry): New struct.
3509 (linux_xfer_osdata_processgroups): Use std::vector instead of
3510 XNEWVEC.
3511
af5bf4ad
SM
35122017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3513
3514 * objfiles.h: Don't include symfile.h.
3515 (struct partial_symbol): Remove forward-declaration.
3516 (struct objfile) <global_psymbols, static_psymbols>: Change type
3517 to std::vector<partial_symbol *>.
3518 * objfiles.c (objfile::objfile): Don't memset those fields.
3519 (objfile::~objfile): Don't free those fields.
3520 * psympriv.h (struct psymbol_allocation_list): Remove
3521 forward-declaration.
3522 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3523 to std::vector.
3524 (start_psymtab_common): Change parameters to std::vector.
3525 * psymtab.c: Include algorithm.
3526 (require_partial_symbols): Call shrink_to_fit.
3527 (find_pc_sect_psymbol): Adjust to vector change.
3528 (match_partial_symbol): Likewise.
3529 (lookup_partial_symbol): Likewise.
3530 (psym_relocate): Likewise.
3531 (dump_psymtab): Likewise.
3532 (recursively_search_psymtabs): Likewise.
3533 (compare_psymbols): Remove.
3534 (sort_pst_symbols): Adjust to vector change.
3535 (start_psymtab_common): Likewise.
3536 (end_psymtab_common): Likewise.
3537 (psymbol_bcache_full): De-constify return value.
3538 (add_psymbol_to_bcache): Likewise.
3539 (extend_psymbol_list): Remove.
3540 (append_psymbol_to_list): Adjust to vector change.
3541 (add_psymbol_to_list): Likewise.
3542 (init_psymbol_list): Likewise.
3543 (maintenance_info_psymtabs): Likewise.
3544 (maintenance_check_psymtabs): Likewise.
3545 * symfile.h (struct psymbol_allocation_list): Remove.
3546 * symfile.c (reread_symbols): Adjust to vector change.
3547 * dbxread.c (start_psymtab): Change type of parameters.
3548 (dbx_symfile_read): Adjust to vector change.
3549 (read_dbx_symtab): Likewise.
3550 (start_psymtab): Change type of parameters.
3551 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3552 (create_partial_symtab): Likewise.
3553 (add_partial_symbol): Likewise.
3554 (write_one_signatured_type): Likewise.
3555 (recursively_write_psymbols): Likewise.
3556 * mdebugread.c (parse_partial_symbols): Likewise.
3557 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3558 (scan_xcoff_symtab): Adjust to vector change.
3559 (xcoff_initial_scan): Likewise.
3560
3ec5942f
SM
35612017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3562
3563 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3564
2399fe6a
YQ
35652017-10-13 Yao Qi <yao.qi@linaro.org>
3566
3567 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3568 Remove s390x-*-expedite, add s390x-expedite.
3569
4bf3f4a8
YQ
35702017-10-13 Yao Qi <yao.qi@linaro.org>
3571
3572 * features/s390-gs-linux64.c: Regenerated.
3573 * features/s390x-gs-linux64.c: Regenerated.
3574
9e86da07
TT
35752017-10-13 Tom Tromey <tom@tromey.com>
3576
3577 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3578 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3579 delete.
3580 * symfile.c (symbol_file_add_with_addrs): Use new.
3581 (symbol_file_add_separate): Update comment.
3582 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3583 * jit.c (jit_object_close_impl): Use new.
3584 (jit_unregister_code): Use delete.
3585 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3586 (~objfile): Rename from free_objfile.
3587 (free_objfile_separate_debug, do_free_objfile_cleanup)
3588 (free_all_objfiles, objfile_purge_solibs): Use delete.
3589 * objfiles.h (struct objfile): Add constructor and destructor.
3590 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3591 (allocate_objfile, free_objfile): Don't declare.
3592 (struct objstats): Add initializers.
3593
c2508e90
SM
35942017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3595
3596 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3597 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3598 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3599 * gdbarch.h: Regenerate.
3600 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3601 Adjust comment.
3602 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3603 (i386_displaced_step_fixup): Adjust comment.
3604 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3605
a900ff72
TT
36062017-10-12 Tom Tromey <tom@tromey.com>
3607
3608 * prologue-value.h (pv_area::store_would_trash): Return bool.
3609 (pv_area::find_reg): Likewise.
3610 * prologue-value.c (pv_area::store_would_trash): Return bool.
3611 (pv_area::find_reg): Likewise.
3612
f7b7ed97
TT
36132017-10-12 Tom Tromey <tom@tromey.com>
3614
3615 * s390-linux-tdep.c (s390_store, s390_load)
3616 (s390_check_for_saved, s390_analyze_prologue): Update.
3617 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3618 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3619 * prologue-value.h (class pv_area): Move from prologue-value.c.
3620 Change names of members. Add constructor, destructor, member
3621 functions.
3622 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3623 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3624 (pv_area_fetch, pv_area_scan): Don't declare.
3625 * prologue-value.c (struct pv_area::area_entry): Now member of
3626 pv_area.
3627 (struct pv_area): Move to prologue-value.h.
3628 (pv_area::pv_area): Rename from make_pv_area.
3629 (pv_area::~pv_area): Rename from free_pv_area.
3630 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3631 (clear_entries, find_entry, overlaps, store_would_trash, store)
3632 (fetch, find_reg, scan): Now member of pv_area.
3633 Remove "area" argument. Update.
3634 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3635 Update.
3636 * mn10300-tdep.c (push_reg, check_for_saved)
3637 (mn10300_analyze_prologue): Update.
3638 * mep-tdep.c (is_arg_spill, check_for_saved)
3639 (mep_analyze_prologue): Update.
3640 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3641 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3642 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3643 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3644 Update.
3645 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3646 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3647
466eecee
SM
36482017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3649
3650 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3651 * linux-nat.c (linux_nat_delete_thread): New variable.
3652 (lwp_free): Invoke linux_nat_delete_thread if set.
3653 (linux_nat_set_delete_thread): New function.
3654 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3655 thread delete callback.
3656 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3657 (_initialize_arm_linux_nat): Assign thread delete callback.
3658 * s390-linux-nat.c (s390_delete_thread): New function.
3659 (_initialize_s390_nat): Assign thread delete callback.
3660 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3661 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3662 function.
3663 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3664 declaration.
3665 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3666 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3667
f71c8822
TT
36682017-10-09 Tom Tromey <tom@tromey.com>
3669
3670 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3671 std::string.
3672 * tui/tui-layout.c (enum tui_status): Use std::string.
3673
981a3fb3
TT
36742017-10-11 Tom Tromey <tom@tromey.com>
3675
3676 * gdbthread.h (thread_command): Constify.
3677 * inferior.h (detach_command): Constify.
3678 * top.h (set_history, show_history): Constify.
3679 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3680 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3681 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3682 * printcmd.c (set_command): Constify.
3683 (non_const_set_command): New function.
3684 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3685 * breakpoint.c (enable_command, disable_command, delete_command)
3686 (catch_command, tcatch_command, set_breakpoint_cmd)
3687 (show_breakpoint_cmd): Constify.
3688 * macrocmd.c (macro_command): Constify.
3689 * infcmd.c (unset_command, kill_command, detach_command)
3690 (info_proc_cmd): Constify.
3691 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3692 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3693 (info_auto_load_cmd): Constify.
3694 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3695 (unset_tdesc_cmd): Constify.
3696 * ada-lang.c (set_ada_command, show_ada_command)
3697 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3698 * guile/guile.c (set_guile_command, show_guile_command)
3699 (info_guile_command): Constify.
3700 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3701 Constify.
3702 * skip.c (skip_command): Constify.
3703 * compile/compile.c (_initialize_compile): Constify.
3704 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3705 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3706 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3707 (maint_btrace_pt_show_cmd): Constify.
3708 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3709 Constify.
3710 * python/python.c (user_show_python, user_set_python): Constify.
3711 * mips-tdep.c (set_mips_command, show_mips_command)
3712 (set_mipsfpu_command): Constify.
3713 * record-btrace.c (cmd_record_btrace_start)
3714 (cmd_set_record_btrace, cmd_show_record_btrace)
3715 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3716 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3717 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3718 Constify.
3719 * symfile.c (overlay_command): Constify.
3720 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3721 * cli/cli-logging.c (set_logging_command, show_logging_command):
3722 Constify.
3723 * cli/cli-dump.c (dump_command, append_command)
3724 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3725 (tekhex_dump_command, binary_dump_command)
3726 (binary_append_command): Constify.
3727 * cli/cli-decode.c (struct cmd_list_element): Change type of
3728 "fun".
3729 * cli/cli-cmds.c (info_command, show_command, set_debug)
3730 (show_debug): Constify.
3731 (show_command): Add non-const overload.
3732 * top.c (set_history, show_history): Constify.
3733 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3734 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3735 * target.c (target_command): Constify.
3736 * sparc64-tdep.c (info_adi_command): Constify.
3737 * record-full.c (cmd_record_full_start): Constify.
3738 (set_record_full_command): Constify. Fix typo.
3739 (show_record_full_command): Constify.
3740 * thread.c (thread_command, thread_apply_command): Constify.
3741 * memattr.c (dummy_cmd): Constify.
3742 * value.c (function_command): Constify.
3743 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3744 * probe.c (info_probes_command): Constify.
3745 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3746 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3747 (show_thread_cmd, set_thread_default_cmd)
3748 (show_thread_default_cmd): Constify.
3749 (check_empty): Constify.
3750 * tracepoint.c (tfind_command): Constify.
3751 * cp-support.c (maint_cplus_command): Constify.
3752 * windows-tdep.c (info_w32_command): Constify.
3753 * record.c (cmd_record_start, set_record_command)
3754 (show_record_command, info_record_command, cmd_record_goto):
3755 Constify.
3756 * ravenscar-thread.c (set_ravenscar_command)
3757 (show_ravenscar_command): Constify.
3758 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3759 Constify.
3760 (add_internal_problem_command): Remove casts.
3761 * arc-tdep.c (maintenance_print_arc_command): Constify.
3762 * valprint.c (set_print, show_print, set_print_raw)
3763 (show_print_raw): Constify.
3764 * maint.c (maintenance_command, maintenance_info_command)
3765 (maintenance_print_command, maintenance_set_cmd)
3766 (maintenance_show_cmd, set_per_command_cmd)
3767 (show_per_command_cmd, maintenance_check_command): Constify.
3768 * language.c (set_check, show_check): Constify.
3769 * typeprint.c (show_print_type, set_print_type): Constify.
3770 * go32-nat.c (go32_info_dos_command): Constify.
3771
fdf44873
TT
37722017-10-11 Tom Tromey <tom@tromey.com>
3773
3774 * breakpoint.c (prepare_re_set_context): Remove.
3775 (breakpoint_re_set_one): Update. Don't use cleanups.
3776 (breakpoint_re_set): Use scoped_restore, std::string, and
3777 scoped_restore_current_language.
3778
81b1e71c
TT
37792017-10-11 Tom Tromey <tom@tromey.com>
3780
3781 * breakpoint.c (commands_command_1): Use std::string.
3782 (cleanup_executing_breakpoints): Remove.
3783 (bpstat_do_actions_1): Use scoped_restore.
3784 (bpstat_check_watchpoint): Use std::string.
3785 (decode_static_tracepoint_spec): Likewise.
3786 (break_range_command): Likewise.
3787 (watch_command_1): Likewise.
3788 (compare_breakpoints): Change argument types.
3789 (clear_command): Use std::vector.
3790 (cleanup_executing_breakpoints): Remove.
3791 (update_global_location_list): Use unique_xmalloc_ptr.
3792 (strace_command): Remove unused declaration.
3793
4f9d9906
JB
37942017-10-11 John Baldwin <jhb@FreeBSD.org>
3795
3796 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3797 * NEWS: Mention new FreeBSD/arm native configuration.
3798 * configure.host: Add arm*-*-freebsd*.
3799 * configure.nat: Likewise.
3800 * arm-fbsd-nat.c: New file.
3801
7176dfd2
JB
38022017-10-11 John Baldwin <jhb@FreeBSD.org>
3803
3804 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3805 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3806 * NEWS: Mention new FreeBSD/arm target.
3807 * configure.tgt: Add arm*-*-freebsd*.
3808 * arm-fbsd-tdep.c: New file.
3809 * arm-fbsd-tdep.h: New file.
3810
fe220226
MR
38112017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3812
3813 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3814 `gdbarch_elfcore_write_linux_prpsinfo'.
3815 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3816 method.
3817 (elf_internal_linux_prpsinfo): Remove declaration.
3818 * gdbarch.h: Regenerate.
3819 * gdbarch.c: Regenerate.
3820
a2f63b2e
MR
38212017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3822
3823 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3824 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3825
458ca1d0
PA
38262017-10-11 Pedro Alves <palves@redhat.com>
3827
3828 * breakpoint.c (reattach_breakpoints): Delete.
3829 * breakpoint.h (reattach_breakpoints): Delete.
3830
905014d7
SM
38312017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3832
3833 * symfile.c (registered_sym_fns): Make struct, not typedef.
3834 (DEF_VEC_O (registered_sym_fns)): Remove.
3835 (symtab_fns): Change type to std::vector.
3836 (add_symtab_fns): Adjust.
3837 (find_sym_fns): Adjust.
3838
56d704da
AK
38392017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3840
3841 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3842 * arc-tdep.h (arc_arch_is_em): New function.
3843 (arc_arch_is_hs): Likewise.
3844
7fa29be9
EB
38452017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3846
3847 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3848 parentheses in the declaration.
3849 (macro_lookup_inclusion): Likewise.
3850 (macro_lookup_definition): Likewise.
3851 * p-lang.h (pascal_builtin_types): Likewise.
3852 * tui/tui-data.c (tui_win_list): Likewise.
3853 * tui/tui-data.h (tui_win_list): Likewise.
3854 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3855
d9b477e3
KB
38562017-10-11 Mark Rages <markrages@gmail.com>
3857
3858 * target-memory.c (block_boundaries): Fix for block address not
3859 aligned on block size.
3860
65630365
PA
38612017-10-10 Pedro Alves <palves@redhat.com>
3862 Tom Tromey <tom@tromey.com>
3863
3864 * breakpoint.c (struct captured_breakpoint_query_args)
3865 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3866 (print_breakpoint): New.
3867 * breakpoint.h (print_breakpoint): Declare.
3868 * common/common-exceptions.h (enum return_reason): Remove
3869 references to catch_exceptions.
3870 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3871 Delete.
3872 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3873 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3874 * gdb.h: Delete.
3875 * gdbthread.h (thread_select): Declare.
3876 * mi/mi-cmd-break.c: Don't include gdb.h.
3877 (breakpoint_notify): Use print_breakpoint.
3878 * mi/mi-cmd-catch.c: Don't include gdb.h.
3879 * mi/mi-interp.c: Don't include gdb.h.
3880 (mi_print_breakpoint_for_event): New.
3881 (mi_breakpoint_created, mi_breakpoint_modified): Use
3882 mi_print_breakpoint_for_event.
3883 * mi/mi-main.c: Don't include gdb.h.
3884 (mi_cmd_thread_select): Parse the global thread ID here. Use
3885 thread_select instead of gdb_thread_select.
3886 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3887 of using gdb_list_thread_ids.
3888 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3889 FILEIO_ENOSYS here.
3890 (remote_fileio_request): Use TRY/CATCH instead of
3891 catch_exceptions.
3892 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3893 (symbol_file_add_from_memory_wrapper): Delete.
3894 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3895 * thread.c: Don't include gdb.h.
3896 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3897 (thread_alive): Use thread_select.
3898 (do_captured_thread_select): Delete, parts salvaged as ...
3899 (thread_select): ... this new function.
3900 (gdb_thread_select): Delete.
3901
bf469271
PA
39022017-10-10 Pedro Alves <palves@redhat.com>
3903 Tom Tromey <tom@tromey.com>
3904
3905 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3906 and reverse logic.
3907 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3908 No longer macros. Instead ...
3909 (enum wp_check_result): They're now values of this new
3910 enumeration.
3911 (watchpoint_check): Change return type to wp_check_result and
3912 parameter type to bpstat.
3913 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3914 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3915 catch_errors. Reverse logic of watchpoint_check call.
3916 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3917 pointer as parameter.
3918 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3919 * common/common-exceptions.c (throw_exception_sjlj): Update
3920 comments to avoid mentioning catch_errors.
3921 * exceptions.c (catch_errors): Delete.
3922 * exceptions.h: Update comments to avoid mentioning catch_errors.
3923 (catch_errors_ftype, catch_errors): Delete.
3924 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3925 (hook_stop_stub): Delete.
3926 (restore_selected_frame): Change return type to void, and
3927 parameter type to const frame_id &.
3928 (restore_infcall_control_state): Use TRY/CATCH instead of
3929 catch_errors.
3930 * main.c (captured_command_loop): Return void and remove
3931 parameter. Remove references to catch_errors.
3932 (captured_main): Use TRY/CATCH instead of catch_errors.
3933 * objc-lang.c (objc_submethod_helper_data)
3934 (find_objc_msgcall_submethod_helper): Delete.
3935 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3936 catch_errors.
3937 * record-full.c (record_full_message): Return void.
3938 (record_full_message_args, record_full_message_wrapper): Delete.
3939 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3940 instead of catch_errors.
3941 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3942 parameter type to int.
3943 * solib-darwin.c (open_symbol_file_object): Ditto.
3944 * solib-dsbt.c (open_symbol_file_object): Ditto.
3945 * solib-frv.c (open_symbol_file_object): Ditto.
3946 * solib-svr4.c (open_symbol_file_object): Ditto.
3947 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3948 * solib.c (update_solib_list): Use TRY/CATCH instead of
3949 catch_errors.
3950 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3951 Change type.
3952 * symmisc.c (struct print_symbol_args): Remove.
3953 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3954 (print_symbol): Change type.
3955 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3956 and remove parameters.
3957 (catch_errors): New.
3958 (get_windows_debug_event): Adjust.
3959
1a56bfa5
TT
39602017-10-09 Tom Tromey <tom@tromey.com>
3961
3962 * mi/mi-main.c (free_splay_tree): Remove.
3963 (list_available_thread_groups): Use splay_tree_up.
3964 * common/gdb_splay_tree.h: New file.
3965
0c478e2d
TT
39662017-10-09 Tom Tromey <tom@tromey.com>
3967
3968 * mi/mi-main.c (do_nothing): Remove.
3969 (list_available_thread_groups): Update.
3970
cbd2b4e3
PA
39712017-10-09 Pedro Alves <palves@redhat.com>
3972
3973 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3974 reading registers when switching context.
3975
a181c0bf
JB
39762017-10-09 John Baldwin <jhb@FreeBSD.org>
3977
3978 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3979 (fbsd_convert_siginfo): Likewise.
3980 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3981
6e66f753
SM
39822017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3983
3984 * configure.ac (try_guile_versions): Remove guile-2.2.
3985 * configure: Regenerate.
3986
890e9790
TT
39872017-10-09 Tom Tromey <tom@tromey.com>
3988
3989 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3990 (COMPILE.pre): Use $(CXX).
3991
109483d9
PA
39922017-10-09 Pedro Alves <palves@redhat.com>
3993
3994 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3995 Use bool.
3996 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3997 * cp-support.h (cp_remove_params): Now returns a
3998 gdb::unique_xmalloc_ptr.
3999 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4000 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4001 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4002 returning a gdb::unique_xmalloc_ptr.
4003 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4004 * stack.c (find_frame_funname): Adjust to cp_remove_params
4005 returning a gdb::unique_xmalloc_ptr.
4006
791afaa2
TT
40072017-10-08 Tom Tromey <tom@tromey.com>
4008
4009 * dwarf2read.c (dwarf2_get_dwz_file): Use
4010 gdb::unique_xmalloc_ptr.
4011 (find_slot_in_mapped_hash): Likewise.
4012 (dwarf2_physname): Likewise.
4013 (create_dwo_unit_in_dwp_v1): Use std::string.
4014 (create_dwo_unit_in_dwp_v2): Likewise.
4015 (lookup_dwo_cutu): Likewise.
4016 (inherit_abstract_dies): Use std::vector.
4017 (read_array_type): Likewise.
4018 (dwarf_decode_macros): Remove unused declaration.
4019 (unsigned_int_compar): Remove.
4020 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4021 (psymtabs_addrmap_cleanup): Remove.
4022
30a9c02f
TT
40232017-10-08 Tom Tromey <tom@tromey.com>
4024
4025 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4026 * frame.h (frame_cleanup_after_sniffer): Declare.
4027 (frame_prepare_for_sniffer): Return void.
4028 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4029 type of argument.
4030 (frame_prepare_for_sniffer): Return void.
4031
757325a3
TT
40322017-10-08 Tom Tromey <tom@tromey.com>
4033
4034 * utils.h (make_cleanup_value_free): Remove.
4035 * utils.c (do_value_free, struct cleanup): Remove.
4036 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4037 Use gdb_value_up.
4038 * value.h (struct value_deleter): New.
4039 (gdb_value_up): New typedef.
4040
b9c04fb2
TT
40412017-10-08 Tom Tromey <tom@tromey.com>
4042
4043 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4044 (make_cleanup_free_search_symbols): Remove.
4045 (search_symbols): Return std::vector.
4046 (symbol_search::compare_search_syms): Now member of
4047 symbol_search. Change arguments.
4048 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4049 (symtab_symbol_info, rbreak_command): Update.
4050 * symtab.h (struct symbol_search) <next>: Remove.
4051 Add constructors.
4052 (symbol_search::operator<): New function.
4053 (symbol_search::operator==): New function.
4054 (search_symbols): Remove std::vector.
4055 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4056 (symbol_search::compare_search_syms): Declare.
4057
0d28b0a5
YQ
40582017-10-06 Yao Qi <yao.qi@linaro.org>
4059
4060 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4061 arch/aarch64-insn.o.
4062 Remove one rule.
4063 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4064
71917808
YQ
40652017-10-06 Yao Qi <yao.qi@linaro.org>
4066
4067 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4068 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4069 arch/arm-linux.o respectively.
4070 * configure.tgt: Likewise.
4071
2081b2b2
YQ
40722017-10-06 Yao Qi <yao.qi@linaro.org>
4073
4074 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4075 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4076
a1b85d28
PA
40772017-10-06 Pedro Alves <palves@redhat.com>
4078
4079 * windows-nat.c: Include <algorithm>.
4080
d97987e2
YQ
40812017-10-06 Yao Qi <yao.qi@linaro.org>
4082
4083 * configure.tgt (i386_tobjs): New variable.
4084 (amd64_tobjs): New variable.
4085 Set $cpu_obs and $os_obs.
4086
f38307f5
YQ
40872017-10-06 Yao Qi <yao.qi@linaro.org>
4088
4089 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4090 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4091 (clean): Remove object files and dependency files.
4092 (distclean): Remove the directory.
4093 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4094 * configure: Re-generated.
4095 * configure.tgt: Replace amd64.o with arch/amd64.o.
4096
2f924de6
JM
40972017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4098
4099 PR build/22188
4100 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4101 and SETEND.
4102
2fd9d7ca
PA
41032017-10-05 Pedro Alves <palves@redhat.com>
4104
4105 * linux-nat.c (linux_child_follow_fork): When following the parent
4106 and detaching the child, consult the parent thread's architecture
4107 instead of the child's.
4108
d13b8493
UW
41092017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4110
4111 * ax.h: Do not include "doublest.h".
4112 (union agent_val): Remove.
4113
3b4b2f16
UW
41142017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4115
4116 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4117 (decimal_to_string): Return std::string object.
4118 (decimal_from_string): Accept std::string object. Return bool.
4119 (decimal_from_integral, decimal_from_doublest): Remove.
4120 (decimal_from_longest): Add prototype.
4121 (decimal_from_ulongest): Likewise.
4122 (decimal_to_longest): Likewise.
4123 (decimal_from_doublest): Likewise.
4124 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4125 (MAX_DECIMAL_STRING): Move here.
4126 (decimal_to_string): Return std::string object.
4127 (decimal_from_string): Accept std::string object. Return bool.
4128 (decimal_from_integral): Remove, replace by ...
4129 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4130 (decimal_to_longest): New function.
4131 (decimal_from_floating): Remove, replace by ...
4132 (decimal_from_doublest): ... this new function.
4133 (decimal_to_doublest): Update to new decimal_to_string interface.
4134
4135 * value.c (unpack_long): Use decimal_to_longest.
4136 * valops.c (value_cast): Use decimal_from_doublest instead of
4137 decimal_from_floating. Use decimal_from_[u]longest isntead of
4138 decimal_from_integral.
4139 * valarith.c (value_args_as_decimal): Likewise.
4140 * valprint.c (print_decimal_floating): Update to new
4141 decimal_to_string interface.
4142 * printcmd.c (printf_decfloat): Likewise.
4143 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4144
1841ee5d
UW
41452017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4146
4147 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4148 * gdbtypes.c: Include "floatformat.h".
4149 * value.c: Likewise.
4150 * m68k-tdep.c: Likewise.
4151
4152 * findvar.c: Do not include "floatformat.h".
4153 * amd64-darwin-tdep.c: Likewise.
4154 * arm-linux-tdep.c: Likewise.
4155 * i386-darwin-tdep.c: Likewise.
4156 * i387-tdep.c: Likewise.
4157 * m68k-linux-tdep.c: Likewise.
4158 * mep-tdep.c: Likewise.
4159 * mips-tdep.c: Likewise.
4160 * nios2-tdep.c: Likewise.
4161 * s390-linux-tdep.c: Likewise.
4162 * sparc-obsd-tdep.c: Likewise.
4163 * sparc-tdep.c: Likewise.
4164 * sparc64-tdep.c: Likewise.
4165 * spu-tdep.c: Likewise.
4166 * tic6x-tdep.c: Likewise.
4167 * tilegx-tdep.c: Likewise.
4168 * vax-tdep.c: Likewise.
4169 * xstormy16-tdep.c: Likewise.
4170 * xtensa-tdep.c: Likewise.
4171
4172 * top.c: Do not include "doublest.h".
4173 * aarch64-tdep.c: Likewise.
4174 * alpha-tdep.c: Likewise.
4175 * arm-linux-tdep.c: Likewise.
4176 * m68k-linux-tdep.c: Likewise.
4177 * tilegx-tdep.c: Likewise.
4178 * xstormy16-tdep.c: Likewise.
4179
a80a6471
JB
41802017-10-05 John Baldwin <jhb@FreeBSD.org>
4181
4182 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4183 (mipsn32_fbsd_sigframe): Define.
4184 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4185 for FreeBSD/mipsn32.
4186
12c4bd7f
JB
41872017-10-05 John Baldwin <jhb@FreeBSD.org>
4188
4189 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4190 AT_HWCAP.
4191
c91933e9
TG
41922017-10-05 Tristan Gingold <tgingold@free.fr>
4193
4194 * MAINTAINERS (Misc): Update my email address.
4195
5cd63fda
PA
41962017-10-04 Pedro Alves <palves@redhat.com>
4197
4198 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4199 it instead of target_gdbarch.
4200 (get_remote_state, get_remote_packet_size): Adjust
4201 get_remote_arch_state calls, passing down target_gdbarch
4202 explicitly.
4203 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4204 'gdbarch' and use it instead of target_gdbarch.
4205 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4206 passing down target_gdbarch explicitly.
4207 (struct stop_reply) <arch>: New field.
4208 (remote_parse_stop_reply): Use the stopped thread's architecture,
4209 not the current inferior's. Save the architecture in the
4210 stop_reply.
4211 (process_stop_reply): Use the stop reply's architecture.
4212 (process_g_packet, remote_fetch_registers)
4213 (remote_prepare_to_store, store_registers_using_G)
4214 (remote_store_registers): Adjust get_remote_arch_state calls,
4215 using the regcache's architecture.
4216 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4217 passing down target_gdbarch explicitly.
4218 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4219 beneath instead of calling target_gdbarch.
4220 * target.c (default_thread_architecture): Use the specified
4221 inferior's architecture, instead of the current inferior's
4222 architecture (via target_gdbarch).
4223
ed4227b7
PA
42242017-10-04 Pedro Alves <palves@redhat.com>
4225
4226 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4227 case.
4228 (regcache_print): Handle !target_has_registers here instead.
4229
55b11ddf
PA
42302017-10-04 Pedro Alves <palves@redhat.com>
4231
4232 * frame.c (create_test_frame): Delete.
4233 * frame.h (create_test_frame): Delete.
4234 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4235 (class regcache_test): Delete.
4236 (test_target_has_registers, test_target_has_stack)
4237 (test_target_has_memory, test_target_prepare_to_store)
4238 (test_target_store_registers): New functions.
4239 (test_target_ops): New class.
4240 (register_to_value_test): Error out if there's already a
4241 process_stratum (or higher) target pushed. Create a fuller mock
4242 environment, with mock target_ops, inferior, address space, thread
4243 and inferior_ptid.
4244 * progspace.c (struct address_space): Move to ...
4245 * progspace.h (struct address_space): ... here.
4246 * regcache.h (regcache::~regcache, regcache::raw_write)
4247 [GDB_SELF_TEST]: No longer virtual.
4248
4c71c105
SM
42492017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4250
4251 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4252
73dcd72d
PA
42532017-10-04 Pedro Alves <palves@redhat.com>
4254
4255 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4256 out of 'between TRY and CATCH'.
4257
44704526
PA
42582017-10-04 Pedro Alves <palves@redhat.com>
4259
4260 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4261 * common/common-exceptions.h (TRY): Open an outermost scope.
4262 Expand intro comment.
4263 (CATCH): Reindent.
4264 (END_CATCH): Close the outermost scope.
4265 * completer.c (complete_line_internal): Add missing END_CATCH.
4266
bc3b087d
SDJ
42672017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4268
4269 * NEWS (Changes since GDB 8.0): Add entry about new
4270 'set-cwd-on-gdbserver' feature.
4271 (New remote packets): Add entry for QSetWorkingDir.
4272 * common/common-inferior.h (set_inferior_cwd): New prototype.
4273 * infcmd.c (set_inferior_cwd): Remove "static".
4274 (show_cwd_command): Expand text to include remote debugging.
4275 * remote.c: Add PACKET_QSetWorkingDir.
4276 (remote_protocol_features) <QSetWorkingDir>: New entry for
4277 PACKET_QSetWorkingDir.
4278 (extended_remote_set_inferior_cwd): New function.
4279 (extended_remote_create_inferior): Call
4280 "extended_remote_set_inferior_cwd".
4281 (_initialize_remote): Call "add_packet_config_cmd" for
4282 QSetWorkingDir.
4283
d092c5a2
SDJ
42842017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4285
4286 * NEWS (New commands): Mention "set/show cwd".
4287 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4288 "cd" command's help text.
4289 * common/common-inferior.h (get_inferior_cwd): New prototype.
4290 * infcmd.c (inferior_cwd_scratch): New global variable.
4291 (set_inferior_cwd): New function.
4292 (get_inferior_cwd): Likewise.
4293 (set_cwd_command): Likewise.
4294 (show_cwd_command): Likewise.
4295 (_initialize_infcmd): Add "set/show cwd" commands.
4296 * inferior.h (class inferior) <cwd>: New field.
4297 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4298 (fork_inferior): Change inferior's cwd before its execution.
4299 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4300 to CreateProcess.
4301
7da0a886
SDJ
43022017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4303
4304 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4305 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4306 (COMMON_OBS): Add gdb_tilde_expand.o.
4307 * common/gdb_tilde_expand.c: New file.
4308 * common/gdb_tilde_expand.h: Likewise.
4309
db8dd160
MR
43102017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4311
4312 * gdbarch.sh (objfile): Remove duplicate declaration.
4313 * gdbarch.h: Regenerate.
4314
f8bfbf22
TT
43152017-10-03 Tom Tromey <tom@tromey.com>
4316
4317 * utils.c (internal_vproblem): Use string_vprintf.
4318
5178ed48
TT
43192017-10-03 Tom Tromey <tom@tromey.com>
4320
4321 * printcmd.c (info_symbol_command): Use std::string.
4322
8cff8730
TT
43232017-10-03 Tom Tromey <tom@tromey.com>
4324
4325 * top.c (gdb_safe_append_history): Use std::string.
4326
895b8f30
TT
43272017-10-03 Tom Tromey <tom@tromey.com>
4328
4329 * event-top.c (stdin_event_handler): Update.
4330 * main.c (captured_main_1): Update.
4331 * top.h (make_delete_ui_cleanup): Remove.
4332 (struct ui): Add constructor and destructor.
4333 (new_ui, delete_ui): Remove.
4334 * top.c (make_delete_ui_cleanup): Remove.
4335 (new_ui_command): Use std::unique_ptr.
4336 (delete_ui_cleanup): Remove.
4337 (ui::ui): Rename from new_ui. Update.
4338 (free_ui): Remove.
4339 (ui::~ui): Rename from delete_ui. Update.
4340
0efef640
TT
43412017-10-03 Tom Tromey <tom@tromey.com>
4342
4343 * symfile.c (load_progress): Use gdb::byte_vector.
4344
245ad7d3
TT
43452017-10-03 Tom Tromey <tom@tromey.com>
4346
4347 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4348 declaration.
4349 * printcmd.c (x_command): Remove unused declaration.
4350 * symfile.c (symbol_file_command): Remove unused declaration.
4351
e05550d7
TT
43522017-10-03 Tom Tromey <tom@tromey.com>
4353
4354 * utils.c (internal_vproblem): Use std::string.
4355 (defaulted_query): Likewise.
4356
b95de2b7
TT
43572017-10-03 Tom Tromey <tom@tromey.com>
4358
4359 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4360 * top.c (execute_command_to_string): Update.
4361 * utils.c (make_cleanup_restore_page_info): Remove.
4362 (do_restore_page_info_cleanup): Remove.
4363 (set_batch_flag_and_restore_page_info):
4364 New.
4365 (make_cleanup_restore_page_info): Remove.
4366 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4367 (~set_batch_flag_and_restore_page_info): New
4368 (make_cleanup_restore_uinteger): Remove.
4369 (make_cleanup_restore_integer): Remove.
4370 (struct restore_integer_closure): Remove.
4371 (restore_integer): Remove.
4372 * utils.h (struct set_batch_flag_and_restore_page_info): New
4373 class.
4374 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4375 (make_cleanup_restore_page_info): Remove.
4376 (make_cleanup_restore_uinteger) Remove.
4377 (make_cleanup_restore_integer) Remove.
4378
07036511
TT
43792017-10-03 Tom Tromey <tom@tromey.com>
4380
4381 * record-full.h (record_full_gdb_operation_disable_set): Return
4382 scoped_restore_tmpl<int>.
4383 * infrun.c (adjust_pc_after_break): Update.
4384 (handle_signal_stop): Update.
4385 * record-full.c (record_full_gdb_operation_disable_set): Return
4386 scoped_restore_tmpl<int>.
4387 (record_full_wait_1, record_full_insert_breakpoint)
4388 (record_full_remove_breakpoint, record_full_save)
4389 (record_full_goto_insn): Update.
4390
45320ffa
TT
43912017-10-02 Tom Tromey <tom@tromey.com>
4392
4393 PR rust/22236:
4394 * rust-lang.c (rust_val_print_str): New function.
4395 (val_print_struct): Call it.
4396 (rust_subscript): Preserve name of slice type.
4397
b3e3859b
TT
43982017-10-02 Tom Tromey <tom@tromey.com>
4399
4400 * rust-lang.c (rust_subscript): Handle slices in
4401 EVAL_AVOID_SIDE_EFFECTS case.
4402
01af5e0d
TT
44032017-10-02 Tom Tromey <tom@tromey.com>
4404
4405 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4406
888e3ddb
TT
44072017-10-02 Tom Tromey <tom@tromey.com>
4408
4409 * rust-lang.h (rust_slice_type): Add "extern".
4410
cc536b21
PA
44112017-10-02 Tom Tromey <tom@tromey.com>
4412 Pedro Alves <palves@redhat.com>
4413
4414 * ada-lang.h (ada_exc_info::operator<): Make const.
4415 (ada_exc_info::operator==): Make const.
4416 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4417 Make const.
4418
386c8614
TT
44192017-09-29 Tom Tromey <tom@tromey.com>
4420
4421 * target.c (read_whatever_is_readable): Change type of "result".
4422 Update.
4423 (free_memory_read_result_vector): Remove.
4424 (read_memory_robust): Change return type. Update.
4425 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4426 bin2hex, std::string.
4427 * target.h (memory_read_result_s): Remove typedef.
4428 (free_memory_read_result_vector): Remove.
4429 (read_memory_robust): Return std::vector.
4430
789c4b5e
TT
44312017-09-29 Tom Tromey <tom@tromey.com>
4432
4433 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4434
ab816a27
TT
44352017-09-29 Tom Tromey <tom@tromey.com>
4436
4437 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4438 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4439 operator< and operator==.
4440 (ada_exceptions_list): Return a std::vector.
4441 * ada-lang.c (ada_exc_info::operator<): Rename from
4442 compare_ada_exception_info.
4443 (ada_exc_info::operator==): New.
4444 (sort_remove_dups_ada_exceptions_list): Change type of
4445 "exceptions".
4446 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4447 (ada_add_global_exceptions): Likewise.
4448 (ada_exceptions_list_1): Return a std::vector.
4449 (ada_exceptions_list): Likewise.
4450
52f9abe4
TT
44512017-09-29 Tom Tromey <tom@tromey.com>
4452
4453 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4454 'std::set *'.
4455 (print_one_inferior): Update.
4456 (free_vector_of_ints): Remove.
4457 (list_available_thread_groups): Change "ids" to std::set.
4458 (mi_cmd_list_thread_groups): Update.
4459 (struct collect_cores_data) <core>: Now a std::set.
4460 (collect_cores): Update.
4461 (unique): Remove.
4462 (print_one_inferior): Update.
4463
dcd5ddcc
TT
44642017-09-29 Tom Tromey <tom@tromey.com>
4465
4466 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4467 (mi_execute_async_cli_command): Likewise.
4468 (mi_cmd_trace_frame_collected): Use field_fmt.
4469
45d288cc
TT
44702017-09-29 Tom Tromey <tom@tromey.com>
4471
4472 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4473 gdb::byte_vector.
4474
6afe2f4a
TT
44752017-09-29 Tom Tromey <tom@tromey.com>
4476
4477 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4478
9813429a
TT
44792017-09-29 Tom Tromey <tom@tromey.com>
4480
4481 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4482
2d6960b4
TT
44832017-09-29 Tom Tromey <tom@tromey.com>
4484
4485 * varobj.h (varobj_gen_name): Return std::string.
4486 * varobj.c (varobj_gen_name): Return std::string.
4487 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4488 (mi_cmd_var_delete): Don't copy "name".
4489
784c453a
TT
44902017-09-29 Tom Tromey <tom@tromey.com>
4491
4492 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4493 (mi_cmd_break_insert_1): Update.
4494
a9bc57b9
TT
44952017-09-29 Tom Tromey <tom@tromey.com>
4496
4497 * target.h (make_scoped_defer_target_commit_resume): Update.
4498 * target.c (make_scoped_defer_target_commit_resume): Rename from
4499 make_cleanup_defer_target_commit_resume. Return a
4500 scoped_restore.
4501 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4502
9754d8c4
TT
45032017-09-29 Tom Tromey <tom@tromey.com>
4504
4505 * main.c (captured_main_1): Remove unused declaration.
4506 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4507
99ef965c
TT
45082017-09-29 Tom Tromey <tom@tromey.com>
4509
4510 * symtab.c (search_symbols): Remove unused outer cleanup.
4511 (make_source_files_completion_list): Remove unused declaration.
4512
42518ba7
TT
45132017-09-29 Tom Tromey <tom@tromey.com>
4514
4515 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4516
726b2169
TT
45172017-09-29 Tom Tromey <tom@tromey.com>
4518
4519 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4520 gdb::byte_vector.
4521
55b06432
TT
45222017-09-29 Tom Tromey <tom@tromey.com>
4523
4524 * complaints.c (vcomplaint): Use std::string.
4525
8abcee91
TT
45262017-09-29 Tom Tromey <tom@tromey.com>
4527
4528 * tracepoint.c (trace_variable_command): Use std::string.
4529 (encode_actions_1): Remove unused declarations.
4530 (create_tsv_from_upload): Use std::string.
4531
6ad94bc7
TT
45322017-09-29 Tom Tromey <tom@tromey.com>
4533
4534 * cp-support.c (gdb_demangle): Use std::string.
4535
2003f3d8
TT
45362017-09-29 Tom Tromey <tom@tromey.com>
4537
4538 * stack.c (parse_frame_specification): Use std::string
4539 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4540
8f8accb5
TT
45412017-09-29 Tom Tromey <tom@tromey.com>
4542
4543 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4544
200aa7b1
TT
45452017-09-29 Tom Tromey <tom@tromey.com>
4546
4547 * utils.c (vfprintf_maybe_filtered): Use std::string.
4548 (vfprintf_unfiltered): Likewise.
4549
606aae8a
TT
45502017-09-29 Tom Tromey <tom@tromey.com>
4551
4552 * event-top.c (top_level_prompt): Return std::string.
4553 (display_gdb_prompt): Update.
4554
bd413795
TT
45552017-09-29 Tom Tromey <tom@tromey.com>
4556
4557 * unittests/common-utils-selftests.c (format): New function.
4558 (string_vprintf_tests): New function.
4559 (_initialize_common_utils_selftests): Register new tests.
4560 * common/common-utils.c (string_vprintf): New function.
4561 * common/common-utils.h (string_vprintf): Declare.
4562
256642e8
PA
45632017-09-29 Pedro Alves <palves@redhat.com>
4564
4565 * common/rsp-low.c (unpack_varlen_hex): Constify.
4566 * common/rsp-low.h (unpack_varlen_hex): Constify.
4567 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4568 Constify.
4569 * remote.c (remote_set_permissions, read_ptid)
4570 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4571 (remote_static_tracepoint_marker_at)
4572 (remote_static_tracepoint_markers_by_strid)
4573 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4574 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4575 (parse_tracepoint_definition, parse_tsv_definition)
4576 (parse_static_tracepoint_marker_definition): Constify.
4577 * tracepoint.h (parse_static_tracepoint_marker_definition)
4578 (parse_trace_status, parse_tracepoint_status)
4579 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4580
b6bb3468
PA
45812017-09-29 Pedro Alves <palves@redhat.com>
4582
4583 * remote.c (target_buf, target_buf_size): Delete.
4584 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4585 Use the connection's packet buffer instead.
4586 All callers adjusted.
4587 (_initialize_remote): Remove references to target_buf and
4588 target_buf_size.
4589
b2f8eb7a
PA
45902017-09-28 Pedro Alves <palves@redhat.com>
4591
4592 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4593 unittests/common-utils-selftests.c.
4594 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4595 (COMMON_OBS): Remove utils-selftests.o.
4596 * utils-selftests.c: Move to ...
4597 * unittests/common-utils-selftests.c: ... here and rename self
4598 test to "string_printf".
4599
08302ed2
DE
46002017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4601
4602 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4603 having NULL cus or tus.
4604
96a5a1d3
UW
46052017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4606
4607 * arm-tdep.c: (convert_from_extended): Remove.
4608 (convert_to_extended): Likewise.
4609 (arm_extract_return_value): Use convert_typed_floating.
4610 (arm_store_return_value): Likewise.
4611
4612 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4613 * sh-tdep.c: Do not include "floatformat.h".
4614 (sh_littlebyte_bigword_type): New function.
4615 (sh_register_convert_to_virtual): Use convert_typed_floating.
4616 (sh_register_convert_to_raw): Likewise.
4617 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4618 (sh64_littlebyte_bigword_type): New function.
4619 (sh64_extract_return_value): Use convert_typed_floating.
4620 (sh64_register_convert_to_virtual): Likewise.
4621 (sh64_register_convert_to_raw): Likewise.
4622
0db7851f
UW
46232017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4624
4625 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4626 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4627
4628 * gdbtypes.h (union type_specific): Make field floatformat hold
4629 just a single struct floatformat, not an array.
4630 (floatformat_from_type): Move here.
4631 * gdbtypes.c (floatformat_from_type): Move here. Update to
4632 changed TYPE_FLOATFORMAT definition.
4633 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4634 (recursive_dump_type): Likewise.
4635 (init_float_type): Install correct floatformat for byte order.
4636 (arch_float_type): Likewise.
4637
77b7c781
UW
46382017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4639
4640 * gdbtypes.c (init_type): Change incoming argument from
4641 length-in-bytes to length-in-bits. Assert length is a
4642 multiple of TARGET_CHAR_BITS.
4643 (arch_type, arch_flags_type): Likewise.
4644 (init_integer_type): Update call to init_type.
4645 (init_character_type): Likewise.
4646 (init_boolean_type): Likewise.
4647 (init_float_type): Likewise.
4648 (init_decfloat_type): Likewise.
4649 (init_complex_type): Likewise.
4650 (init_pointer_type): Likewise.
4651 (objfile_type): Likewise.
4652 (arch_integer_type): Update call to arch_type.
4653 (arch_character_type): Likewise.
4654 (arch_boolean_type): Likewise.
4655 (arch_float_type): Likewise.
4656 (arch_decfloat_type): Likewise.
4657 (arch_complex_type): Likewise.
4658 (arch_pointer_type): Likewise.
4659 (gdbtypes_post_init): Likewise.
4660
4661 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4662 (read_base_type): Likewise.
4663 * mdebugread.c (basic_type): Likewise.
4664 * stabsread.c (dbx_init_float_type): Likewise.
4665 (rs6000_builtin_type): Likewise.
4666 (read_range_type): Likewise. Also, fix call to init_integer_type
4667 with erroneous length argument.
4668
4669 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4670 * d-lang.c (build_d_types): Likewise.
4671 * f-lang.c (build_fortran_types): Likewise.
4672 * go-lang.c (build_go_types): Likewise.
4673 * opencl-lang.c (build_opencl_types): Likewise.
4674 * jit.c (finalize_symtab): Likewise.
4675 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4676 (build_std_type_info_type): Likewise.
4677 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4678 update call to arch_flags_type.
4679
4680 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4681 arch_type.
4682 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4683 * windows-tdep.c (windows_get_tlb_type): Likewise.
4684
4685 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4686 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4687 * m32c-tdep.c (make_types): Likewise.
4688 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4689 (rl78_psw_type): Update call to arch_flags_type.
4690 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4691 * rx-tdep.c (rx_psw_type): Likewise.
4692 (rx_fpsw_type): Likewise.
4693 * sparc-tdep.c (sparc_psr_type): Likewise.
4694 (sparc_fsr_type): Likewise.
4695 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4696 (sparc64_ccr_type): Likewise.
4697 (sparc64_fsr_type): Likewise.
4698 (sparc64_fprs_type): Likewise.
4699
f21b4d5c
TT
47002017-09-27 Tom Tromey <tom@tromey.com>
4701
4702 * findcmd.c (find_command): Constify.
4703
643c2ffa
TT
47042017-09-27 Tom Tromey <tom@tromey.com>
4705
4706 * ada-tasks.c (task_command_1, task_command): Constify.
4707
510e5e56
TT
47082017-09-27 Tom Tromey <tom@tromey.com>
4709
4710 * symtab.c (maintenance_print_symbol_cache)
4711 (maintenance_flush_symbol_cache)
4712 (maintenance_print_symbol_cache_statistics): Constify.
4713
e503b191
TT
47142017-09-27 Tom Tromey <tom@tromey.com>
4715
4716 * inferior.c (detach_inferior_command, kill_inferior_command)
4717 (inferior_command): Constify.
4718
4e001312
TT
47192017-09-27 Tom Tromey <tom@tromey.com>
4720
4721 * regcache.c (regcache_print, maintenance_print_registers)
4722 (maintenance_print_raw_registers)
4723 (maintenance_print_cooked_registers)
4724 (maintenance_print_register_groups)
4725 (maintenance_print_remote_registers): Constify.
4726
77763700
TT
47272017-09-27 Tom Tromey <tom@tromey.com>
4728
4729 * printcmd.c (map_display_numbers, undisplay_command)
4730 (enable_disable_display_command, enable_display_command)
4731 (disable_display_command): Constify.
4732
4495129a
TT
47332017-09-27 Tom Tromey <tom@tromey.com>
4734
4735 * breakpoint.h (delete_command): Don't declare.
4736 * breakpoint.c (delete_command, enable_once_command)
4737 (enable_count_command, enable_delete_command, breakpoint_1)
4738 (maintenance_info_breakpoints, stopin_command, stopat_command)
4739 (delete_command, delete_trace_command, save_breakpoints)
4740 (save_breakpoints_command, save_tracepoints_command): Constify.
4741
3088cf40
TT
47422017-09-27 Tom Tromey <tom@tromey.com>
4743
4744 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4745 (skip_ws, extract_identifier, macro_define_command)
4746 (macro_undef_command, macro_list_command): Constify.
4747
69f476a3
TT
47482017-09-27 Tom Tromey <tom@tromey.com>
4749
4750 * infcmd.c (environment_info, set_environment_command)
4751 (unset_environment_command, path_info, info_proc_cmd_1)
4752 (info_proc_cmd_mappings, info_proc_cmd_stat)
4753 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4754 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4755
c4a3e68e
TT
47562017-09-27 Tom Tromey <tom@tromey.com>
4757
4758 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4759 Constify.
4760
c9d31bd6
TT
47612017-09-27 Tom Tromey <tom@tromey.com>
4762
4763 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4764
1f3f85eb
TT
47652017-09-27 Tom Tromey <tom@tromey.com>
4766
4767 * demangle.c (demangle_command): Constify.
4768
9c504b5d
TT
47692017-09-27 Tom Tromey <tom@tromey.com>
4770
4771 * progspace.c (maintenance_info_program_spaces_command):
4772 Constify.
4773
6663cf91
TT
47742017-09-27 Tom Tromey <tom@tromey.com>
4775
4776 * compile/compile.c (check_raw_argument, compile_file_command)
4777 (compile_code_command, compile_print_command): Constify.
4778
34e5fa26
TT
47792017-09-27 Tom Tromey <tom@tromey.com>
4780
4781 * reggroups.c (maintenance_print_reggroups): Constify.
4782
8384c356
TT
47832017-09-27 Tom Tromey <tom@tromey.com>
4784
4785 * dwarf2read.c (save_gdb_index_command): Constify.
4786
884beb0c
TT
47872017-09-27 Tom Tromey <tom@tromey.com>
4788
4789 * stap-probe.c (info_probes_stap_command): Constify.
4790
e0b2930c
TT
47912017-09-27 Tom Tromey <tom@tromey.com>
4792
4793 * fork-child.c (unset_exec_wrapper_command): Constify.
4794
f938677d
TT
47952017-09-27 Tom Tromey <tom@tromey.com>
4796
4797 * btrace.c (get_uint, get_context_size, no_chunk)
4798 (maint_btrace_packet_history_cmd)
4799 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4800 (maint_info_btrace_cmd): Constify.
4801
8949cb87
TT
48022017-09-27 Tom Tromey <tom@tromey.com>
4803
4804 * reverse.c (delete_bookmark_command): Constify.
4805
ac88e2de
TT
48062017-09-27 Tom Tromey <tom@tromey.com>
4807
4808 * remote.c (set_memory_packet_size)
4809 (set_memory_write_packet_size, show_memory_write_packet_size)
4810 (set_memory_read_packet_size, show_memory_read_packet_size)
4811 (compare_sections_command, packet_command, remote_put_command)
4812 (remote_get_command, remote_delete_command): Constify.
4813
bd4c9dfe
TT
48142017-09-27 Tom Tromey <tom@tromey.com>
4815
4816 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4817 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4818 (set_mipsfpu_auto_command): Constify.
4819
5e93d4c6
TT
48202017-09-27 Tom Tromey <tom@tromey.com>
4821
4822 * cli/cli-cmds.h (cd_command): Constify.
4823 * cli/cli-cmds.c (cd_command): Constify.
4824
fc41a75b
TT
48252017-09-27 Tom Tromey <tom@tromey.com>
4826
4827 * thread.c (thread_name_command, thread_find_command): Constify.
4828
67810076
TT
48292017-09-27 Tom Tromey <tom@tromey.com>
4830
4831 * probe.c (enable_probes_command, disable_probes_command):
4832 Constify.
4833
1d8b34a7
TT
48342017-09-27 Tom Tromey <tom@tromey.com>
4835
4836 * symfile.c (symbol_file_command): Constify.
4837 * gdbcore.h (deprecated_file_changed_hook): Constify.
4838 * exec.c (deprecated_file_changed_hook, exec_file_command)
4839 (file_command): Constify.
4840 * defs.h (symbol_file_command): Constify.
4841
442019e1
TT
48422017-09-27 Tom Tromey <tom@tromey.com>
4843
4844 * remote-fileio.c (set_system_call_allowed)
4845 (show_system_call_allowed): Constify.
4846
2983f7cb
TT
48472017-09-27 Tom Tromey <tom@tromey.com>
4848
4849 * tracepoint.c (delete_trace_variable_command)
4850 (tfind_end_command, tfind_start_command, tfind_pc_command)
4851 (tfind_tracepoint_command, tfind_line_command)
4852 (tfind_range_command, tfind_outside_command): Constify.
4853
4fd41b24
TT
48542017-09-27 Tom Tromey <tom@tromey.com>
4855
4856 * ax-gdb.c (maint_agent_printf_command, agent_command)
4857 (agent_eval_command): Constify.
4858
f2fc3015
TT
48592017-09-27 Tom Tromey <tom@tromey.com>
4860
4861 * tracepoint.c (info_scope_command): Constify.
4862 * python/python.c (gdbpy_decode_line): Constify.
4863 * python/py-breakpoint.c (bppy_init): Constify.
4864 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4865 * location.h: (new_linespec_location)
4866 (string_to_event_location_basic, string_to_event_location):
4867 Constify.
4868 * location.c (new_linespec_location)
4869 (string_to_event_location_basic, string_to_event_location):
4870 Constify.
4871 * linespec.h (decode_line_with_current_source)
4872 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4873 * linespec.c (linespec_lex_to_end)
4874 (decode_line_with_current_source)
4875 (decode_line_with_last_displayed): Constify.
4876 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4877 Constify.
4878 * cli/cli-cmds.c (edit_command, list_command): Constify.
4879 * breakpoint.h (until_break_command, watch_command_wrapper)
4880 (awatch_command_wrapper, rwatch_command_wrapper)
4881 (init_ada_exception_breakpoint): Constify.
4882 * breakpoint.c (break_command_1, dprintf_command)
4883 (break_range_command, watch_command_wrapper)
4884 (rwatch_command_wrapper, awatch_command_wrapper)
4885 (until_break_command, init_ada_exception_breakpoint)
4886 (strace_marker_create_sals_from_location, trace_command)
4887 (ftrace_command, strace_command, struct tracepoint): Constify.
4888 * ax-gdb.c (agent_command_1): Constify.
4889 * ada-lang.c (ada_exception_sal): Constify.
4890
8c2f95f4
TT
48912017-09-27 Tom Tromey <tom@tromey.com>
4892
4893 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4894 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4895 (get_context_size, no_chunk, get_insn_history_modifiers)
4896 (cmd_record_insn_history, get_call_history_modifiers)
4897 (cmd_record_call_history): Constify.
4898
a0d65762
TT
48992017-09-27 Tom Tromey <tom@tromey.com>
4900
4901 * source.c (show_substitute_path_command)
4902 (unset_substitute_path_command, set_substitute_path_command):
4903 Constify.
4904
58971144
TT
49052017-09-27 Tom Tromey <tom@tromey.com>
4906
4907 * typeprint.c (maintenance_print_type): Constify.
4908 * maint.c (maintenance_dump_me, maintenance_demangle)
4909 (maintenance_time_display, maintenance_info_sections)
4910 (maintenance_print_statistics, maintenance_deprecate)
4911 (maintenance_undeprecate): Constify.
4912 (maintenance_do_deprecate): Constify. Use std::string.
4913 (maintenance_selftest): Constify.
4914 * gdbtypes.h (maintenance_print_type): Constify.
4915
c482f52c
TT
49162017-09-27 Tom Tromey <tom@tromey.com>
4917
4918 * hppa-tdep.c (unwind_command): Constify.
4919
e100df1a
TT
49202017-09-27 Tom Tromey <tom@tromey.com>
4921
4922 * target-descriptions.c (unset_tdesc_filename_cmd)
4923 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4924 Constify.
4925
31d56ade
TT
49262017-09-27 Tom Tromey <tom@tromey.com>
4927
4928 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4929
b961da0b
TT
49302017-09-27 Tom Tromey <tom@tromey.com>
4931
4932 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4933
e2d8ae16
TT
49342017-09-27 Tom Tromey <tom@tromey.com>
4935
4936 * tui/tui-regs.c (tui_reg_command): Constify.
4937
863779b0
TT
49382017-09-27 Tom Tromey <tom@tromey.com>
4939
4940 * skip.c (skip_file_command, skip_function_command)
4941 (skip_enable_command, skip_disable_command, skip_delete_command):
4942 Constify.
4943
cdb34d4a
TT
49442017-09-27 Tom Tromey <tom@tromey.com>
4945
4946 * record-btrace.c (cmd_record_btrace_bts_start)
4947 (cmd_record_btrace_pt_start): Constify.
4948
e99c83e7
TT
49492017-09-27 Tom Tromey <tom@tromey.com>
4950
4951 * symmisc.c (maintenance_print_symbols)
4952 (maintenance_print_msymbols, maintenance_print_objfiles)
4953 (maintenance_info_symtabs, maintenance_check_symtabs)
4954 (maintenance_expand_symtabs, maintenance_info_line_tables):
4955 Constify.
4956
32faf971
TT
49572017-09-27 Tom Tromey <tom@tromey.com>
4958
4959 * top.c (new_ui_command): Constify.
4960
2cf311eb
TT
49612017-09-27 Tom Tromey <tom@tromey.com>
4962
4963 * symfile.c (add_symbol_file_command)
4964 (remove_symbol_file_command, list_overlays_command)
4965 (map_overlay_command, unmap_overlay_command)
4966 (overlay_auto_command, overlay_manual_command)
4967 (overlay_off_command, overlay_load_command): Constify.
4968
e6738699
TT
49692017-09-27 Tom Tromey <tom@tromey.com>
4970
4971 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4972 (info_spu_mailbox_command, info_spu_dma_command)
4973 (info_spu_proxydma_command): Constify.
4974
aa360cd5
TT
49752017-09-27 Tom Tromey <tom@tromey.com>
4976
4977 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4978
898241a5
TT
49792017-09-27 Tom Tromey <tom@tromey.com>
4980
4981 * cli/cli-script.c (user_defined_command): Constify.
4982
2d0ac106
TT
49832017-09-27 Tom Tromey <tom@tromey.com>
4984
4985 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4986 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4987 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4988 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4989 (dump_binary_value, append_binary_memory, append_binary_value):
4990 Constify.
4991 (struct dump_context) <func>: Constify.
4992 (add_dump_command): Update.
4993
dede02ce
TT
49942017-09-27 Tom Tromey <tom@tromey.com>
4995
4996 * cli/cli-cmds.c (show_version, show_configuration)
4997 (source_command, show_user): Constify.
4998
d3cb6b99
TT
49992017-09-27 Tom Tromey <tom@tromey.com>
5000
5001 * target.c (maintenance_print_target_stack): Constify.
5002
1970a12f
TT
50032017-09-27 Tom Tromey <tom@tromey.com>
5004
5005 * interps.c (interpreter_exec_cmd): Constify.
5006
41243651
TT
50072017-09-27 Tom Tromey <tom@tromey.com>
5008
5009 * record-full.c (cmd_record_full_restore): Constify.
5010
4465d9db
TT
50112017-09-27 Tom Tromey <tom@tromey.com>
5012
5013 * memattr.c (enable_mem_command, disable_mem_command)
5014 (delete_mem_command): Constify.
5015
ad25e423
TT
50162017-09-27 Tom Tromey <tom@tromey.com>
5017
5018 * value.c (show_convenience): Constify.
5019
d64097b1
TT
50202017-09-27 Tom Tromey <tom@tromey.com>
5021
5022 * gdbcore.h (core_file_command): Update.
5023 * corefile.c (core_file_command): Constify.
5024
4d4589ef
TT
50252017-09-27 Tom Tromey <tom@tromey.com>
5026
5027 * user-regs.c (maintenance_print_user_registers): Constify.
5028
32a7bf17
TT
50292017-09-27 Tom Tromey <tom@tromey.com>
5030
5031 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5032
4a475551
TT
50332017-09-27 Tom Tromey <tom@tromey.com>
5034
5035 * cp-support.c (first_component_command): Constify.
5036
990b9f9f
TT
50372017-09-27 Tom Tromey <tom@tromey.com>
5038
5039 * psymtab.c (maintenance_print_psymbols)
5040 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5041 Constify.
5042
c281872e
TT
50432017-09-27 Tom Tromey <tom@tromey.com>
5044
5045 * windows-tdep.c (display_tib): Constify.
5046
5b64bf74
TT
50472017-09-27 Tom Tromey <tom@tromey.com>
5048
5049 * linux-fork.c (delete_checkpoint_command)
5050 (detach_checkpoint_command): Constify.
5051
4ada038f
TT
50522017-09-27 Tom Tromey <tom@tromey.com>
5053
5054 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5055
57f5a81b
TT
50562017-09-27 Tom Tromey <tom@tromey.com>
5057
5058 * arc-tdep.c (dump_arc_instruction_command): Constify.
5059
b0a8e6c4
TT
50602017-09-27 Tom Tromey <tom@tromey.com>
5061
5062 * valprint.c (set_radix, show_radix): Constify.
5063
8d97dc1c
TT
50642017-09-27 Tom Tromey <tom@tromey.com>
5065
5066 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5067
eb7c454d
TT
50682017-09-27 Tom Tromey <tom@tromey.com>
5069
5070 * command.h (not_just_help_class_command): Update.
5071 * cli/cli-decode.h (not_just_help_class_command): Update.
5072 * cli/cli-decode.c (not_just_help_class_command): Constify.
5073
e4e33335
TT
50742017-09-27 Tom Tromey <tom@tromey.com>
5075
5076 * gdb_bfd.c (maintenance_info_bfds): Constify.
5077
0450cc4c
TT
50782017-09-27 Tom Tromey <tom@tromey.com>
5079
5080 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5081 overloads.
5082 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5083 (do_const_cfunc): New function.
5084 (cmd_cfunc_eq): New overload.
5085 (cli_user_command_p): Check do_const_cfunc.
5086 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5087 const_cfunc.
5088 * command.h (add_cmd): Add const overload and no-function
5089 overload.
5090 (set_cmd_cfunc): Add const overload.
5091 (cmd_const_cfunc_ftype): Declare.
5092 (cmd_cfunc_eq): Add const overload.
5093 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5094 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5095 overload.
5096
a9bbfbd8
TT
50972017-09-27 Tom Tromey <tom@tromey.com>
5098
5099 * macroexp.c (get_next_token_for_substitution): New function.
5100 (substitute_args): Call it. Check for __VA_OPT__.
5101
5230b05a
WT
51022017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5103 Pedro Alves <palves@redhat.com>
5104
5105 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5106 producer_is_icc_lt_14.
5107 (producer_is_icc_lt_14): New function.
5108 (check_producer): Add code for checking version of ICC.
5109 (producer_is_icc): Move to producer.c.
5110 (read_structure_type): Restrict ICC workaround to ICC<14.
5111 * producer.c: Include selftest.h.
5112 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5113 New functions.
5114 * producer.h (producer_is_icc): New declaration.
5115
b32b108a
WT
51162017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5117
5118 * Makefile.in (SFILES): Add producer.c.
5119 (COMMON_OBS): Add producer.o
5120 * amd64-tdep.c (producer.h): Add new include.
5121 * dwarf2read.c (producer.h): Add new include.
5122 * producer.c: New file.
5123 * producer.h: New file.
5124 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5125 producer.c.
5126 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5127 producer.h.
5128
5007d765
MK
51292017-09-26 Matthias Klose <doko@ubuntu.com>
5130
5131 * configure.ac: Search ncursesw before ncurses.
5132 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5133 * gdb_curses.h: Include <ncursesw/ncurses.h>
5134 * config.in, configure: Regenerate.
5135
281c4447
RO
51362017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5137
5138 PR gdb/22185
5139 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5140 obsolete.
5141 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5142 Remove i386sol2 support.
5143 * configure.nat <i386sol2>: Remove.
5144 <sol2-64>: Fold into ...
5145 <sol2>: ... this.
5146 Move common settings to default section.
5147 Add sol-thread.o.
5148 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5149 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5150 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5151 <i[34567]86-*-solaris*>: Remove.
5152 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5153
5154 * configure.ac: Remove wctype in libw check.
5155 (_MSE_INT_H): Don't define on Solaris 7-9.
5156 <solaris*>: Remove libthread_db.so.1 check.
5157 * configure: Regenerate.
5158 * config.in: Regenerate.
5159
5160 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5161 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5162 (gdb_ps_size_t): Remove.
5163 Use base types in users.
5164 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5165
5166 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5167
39b06c20
RO
51682017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5169
5170 PR build/22206
5171 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5172 (adi_is_addr_mapped): Likewise.
5173 (PSR_ICC): Don't redefine.
5174 (PSR_IMPL): Likewise.
5175
6c3e20f1
TT
51762017-09-25 Tom Tromey <tom@tromey.com>
5177
5178 * regcache.c (regcache::dump): Use string_printf.
5179
b292235f
TT
51802017-09-25 Tom Tromey <tom@tromey.com>
5181
5182 * regcache.c (class regcache_invalidator): New.
5183 (struct register_to_invalidate): Remove.
5184 (make_cleanup_regcache_invalidate): Remove.
5185 (regcache::raw_write): Use regcache_invalidator.
5186
9ac86b52
TT
51872017-09-25 Tom Tromey <tom@tromey.com>
5188
5189 * spu-tdep.c (spu2ppu_sniffer): Update.
5190 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5191 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5192 Remove.
5193 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5194 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5195 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5196 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5197 (frame_pop): Update.
5198
c0e383c6
TT
51992017-09-25 Tom Tromey <tom@tromey.com>
5200
5201 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5202 * regcache.h (regcache_xfree): Don't declare.
5203 * regcache.c (regcache_xfree): Remove.
5204 (do_regcache_xfree): Use delete.
5205 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5206 * linux-fork.c (free_fork): Use delete.
5207 (fork_save_infrun_state): Likewise.
5208 * jit.c (jit_dealloc_cache): Use delete.
5209 * infrun.c (discard_infcall_suspend_state): Use delete.
5210
791199cc
TT
52112017-09-25 Tom Tromey <tom@tromey.com>
5212
5213 * regcache.h (regcache_xmalloc): Don't declare.
5214 (regcache_raw_set_cached_value): Update comment.
5215 * regcache.c (regcache_xmalloc): Remove.
5216 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5217 * jit.c (jit_frame_sniffer): Use new.
5218 * frame.c (frame_save_as_regcache): Use new.
5219
289e23aa
AA
52202017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5221
5222 * NEWS: Advertise support for guarded-storage registers on IBM z.
5223
1b63490c
AA
52242017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5225
5226 * s390-linux-nat.c (have_regset_gs): New static variable.
5227 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5228 control block and guarded-storage broadcast control regsets.
5229 (s390_read_description): Detect whether the target has
5230 guarded-storage support, return appropriate tdesc.
5231 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5232 (features/s390x-gs-linux64.c): Likewise.
5233 (struct gdbarch_tdep) <have_gs>: New field.
5234 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5235 (s390_gsbc_regset): New variables.
5236 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5237 and s390_gsbc_regset, if applicable.
5238 (s390_core_read_description): Check whether core file was from a
5239 target with guarded-storage support; include appropriate regsets.
5240 (s390_gdbarch_init): Add registers for guarded-storage support.
5241 (_initialize_s390_tdep): Initialize new target descriptions that
5242 include registers for guarded-storage support.
5243 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5244 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5245 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5246 (S390_NUM_REGS): Adjust macro definition.
5247 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5248 (tdesc_s390x_gs_linux64): New declarations.
5249
96235dc1
AA
52502017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5251
5252 * features/s390-gs-linux64.xml: New file.
5253 * features/s390-gs.xml: New file.
5254 * features/s390-gsbc.xml: New file.
5255 * features/s390x-gs-linux64.xml: New file.
5256 * features/Makefile (WHICH): Add s390-gs-linux64 and
5257 s390x-gs-linux64.
5258 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5259 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5260 * features/s390-gs-linux64.c: New generated file.
5261 * features/s390x-gs-linux64.c: New file.
5262 * regformats/s390-gs-linux64.dat: New file.
5263 * regformats/s390x-gs-linux64.dat: New file.
5264
b4a7c699
TT
52652017-09-23 Tom Tromey <tom@tromey.com>
5266
5267 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5268
c2f97536
TT
52692017-09-22 Tom Tromey <tom@tromey.com>
5270
5271 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5272 type to scoped_restore_tmpl.
5273 <scoped_input_handler>: Initialize m_quit_handler directly.
5274
43573013
SDJ
52752017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5276
5277 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5278 (cd_command): Likewise. Free "current_directory" before
5279 assigning to it.
5280 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5281 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5282 * top.c (gdb_dirbuf): Remove global declaration.
5283 * top.h (gdb_dirbuf): Likewise.
5284
6ec2e0f5
SDJ
52852017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5286
5287 * gnulib/aclocal.m4: Regenerate.
5288 * gnulib/config.in: Regenerate.
5289 * gnulib/configure: Regenerate.
5290 * gnulib/import/Makefile.am: Regenerate.
5291 * gnulib/import/Makefile.in: Regenerate.
5292 * gnulib/import/assure.h: New file.
5293 * gnulib/import/at-func.c: Likewise
5294 * gnulib/import/chdir-long.c: New file.
5295 * gnulib/import/chdir-long.h: New file.
5296 * gnulib/import/cloexec.c: New file.
5297 * gnulib/import/cloexec.h: New file.
5298 * gnulib/import/close.c: New file.
5299 * gnulib/import/closedir.c: New file.
5300 * gnulib/import/dirent-private.h: New file.
5301 * gnulib/import/dup-safer.c: New file.
5302 * gnulib/import/dup.c: New file.
5303 * gnulib/import/dup2.c: New file.
5304 * gnulib/import/error.c: New file.
5305 * gnulib/import/error.h: New file.
5306 * gnulib/import/exitfail.c: New file.
5307 * gnulib/import/exitfail.h: New file.
5308 * gnulib/import/fchdir.c: New file.
5309 * gnulib/import/fcntl.c: New file.
5310 * gnulib/import/fcntl.in.h: New file.
5311 * gnulib/import/fd-hook.c: New file.
5312 * gnulib/import/fd-hook.h: New file.
5313 * gnulib/import/fd-safer.c: New file.
5314 * gnulib/import/fdopendir.c: New file.
5315 * gnulib/import/filename.h: New file.
5316 * gnulib/import/filenamecat-lgpl.c: New file.
5317 * gnulib/import/filenamecat.h: New file.
5318 * gnulib/import/fstat.c: New file.
5319 * gnulib/import/fstatat.c: New file.
5320 * gnulib/import/getcwd-lgpl.c: New file.
5321 * gnulib/import/getcwd.c: New file.
5322 * gnulib/import/getdtablesize.c: New file.
5323 * gnulib/import/getlogin_r.c: New file.
5324 * gnulib/import/getprogname.c: New file.
5325 * gnulib/import/getprogname.h: New file.
5326 * gnulib/import/gettext.h: New file.
5327 * gnulib/import/glob-libc.h: New file.
5328 * gnulib/import/glob.c: New file.
5329 * gnulib/import/glob.in.h: New file.
5330 * gnulib/import/intprops.h: New file.
5331 * gnulib/import/m4/chdir-long.m4: New file.
5332 * gnulib/import/m4/close.m4: New file.
5333 * gnulib/import/m4/closedir.m4: New file.
5334 * gnulib/import/m4/d-ino.m4: New file.
5335 * gnulib/import/m4/d-type.m4: New file.
5336 * gnulib/import/m4/dup.m4: New file.
5337 * gnulib/import/m4/dup2.m4: New file.
5338 * gnulib/import/m4/error.m4: New file.
5339 * gnulib/import/m4/fchdir.m4: New file.
5340 * gnulib/import/m4/fcntl.m4: New file.
5341 * gnulib/import/m4/fcntl_h.m4: New file.
5342 * gnulib/import/m4/fdopendir.m4: New file.
5343 * gnulib/import/m4/filenamecat.m4: New file.
5344 * gnulib/import/m4/fstat.m4: New file.
5345 * gnulib/import/m4/fstatat.m4: New file.
5346 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5347 * gnulib/import/m4/getcwd-path-max.m4: New file.
5348 * gnulib/import/m4/getcwd.m4: New file.
5349 * gnulib/import/m4/getdtablesize.m4: New file.
5350 * gnulib/import/m4/getlogin_r.m4: New file.
5351 * gnulib/import/m4/getprogname.m4: New file.
5352 * gnulib/import/m4/glob.m4: New file.
5353 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5354 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5355 * gnulib/import/m4/mempcpy.m4: New file.
5356 * gnulib/import/m4/memrchr.m4: New file.
5357 * gnulib/import/m4/mode_t.m4: New file.
5358 * gnulib/import/m4/msvc-inval.m4: New file.
5359 * gnulib/import/m4/msvc-nothrow.m4: New file.
5360 * gnulib/import/m4/open.m4: New file.
5361 * gnulib/import/m4/openat.m4: New file.
5362 * gnulib/import/m4/opendir.m4: New file.
5363 * gnulib/import/m4/readdir.m4: New file.
5364 * gnulib/import/m4/realloc.m4: New file.
5365 * gnulib/import/m4/rewinddir.m4: New file.
5366 * gnulib/import/m4/save-cwd.m4: New file.
5367 * gnulib/import/m4/strdup.m4: New file.
5368 * gnulib/import/m4/strerror.m4: New file.
5369 * gnulib/import/m4/unistd-safer.m4: New file.
5370 * gnulib/import/mempcpy.c: New file.
5371 * gnulib/import/memrchr.c: New file.
5372 * gnulib/import/msvc-inval.c: New file.
5373 * gnulib/import/msvc-inval.h: New file.
5374 * gnulib/import/msvc-nothrow.c: New file.
5375 * gnulib/import/msvc-nothrow.h: New file.
5376 * gnulib/import/open.c: New file.
5377 * gnulib/import/openat-die.c: New file.
5378 * gnulib/import/openat-priv.h: New file.
5379 * gnulib/import/openat-proc.c: New file.
5380 * gnulib/import/openat.c: New file.
5381 * gnulib/import/openat.h: New file.
5382 * gnulib/import/opendir.c: New file.
5383 * gnulib/import/pipe-safer.c: New file.
5384 * gnulib/import/readdir.c: New file.
5385 * gnulib/import/realloc.c: New file.
5386 * gnulib/import/rewinddir.c: New file.
5387 * gnulib/import/save-cwd.c: New file.
5388 * gnulib/import/save-cwd.h: New file.
5389 * gnulib/import/strdup.c: New file.
5390 * gnulib/import/strerror-override.c: New file.
5391 * gnulib/import/strerror-override.h: New file.
5392 * gnulib/import/strerror.c: New file.
5393 * gnulib/import/unistd--.h: New file.
5394 * gnulib/import/unistd-safer.h: New file.
5395 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5396 "getcwd" and "glob".
5397 * ser-tcp.c: Undefine "close" before redefining it.
5398
432ae719
SM
53992017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5400
5401 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5402 get rid of res_val.
5403
4fa7574e
RO
54042017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5405
5406 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5407 <sol2,sparc>: Likewise.
5408 <sol2-64,i386>: Likewise.
5409
5410 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5411 -Wdeprecated-declarations on *-*-solaris*.
5412 * configure: Regenerate.
5413
5414 * procfs.c: Include "nat/inferior.h".
5415 (procfs_info_proc): Fix typo.
5416
f6327dcb
KB
54172017-09-21 Kevin Buettner <kevinb@redhat.com>
5418
5419 * remote.c (vector): Include.
5420 (struct private_thread_info): Add field, thread_handle.
5421 (free_private_thread_info): Deallocate storage associated with
5422 thread handle.
5423 (get_private_info_thread): Initialize `thread_handle' field.
5424 (struct thread_item): Add field, thread_handle.
5425 (clear_threads_listing_context): Deallocate storage associated
5426 with thread handle.
5427 (start_thread): Add support for "handle" attribute.
5428 (thread_attributes): Add "handle".
5429 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5430 field.
5431 (remote_update_thread_list): Update thread_handle.
5432 (remote_thread_handle_to_thread_info): New function.
5433 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5434
fbbe5337
KB
54352017-09-21 Kevin Buettner <kevinb@redhat.com>
5436
5437 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5438 function.
5439 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5440 * python/python-internal.h (thread_object_type): Declare.
5441
e04ee09e
KB
54422017-09-21 Kevin Buettner <kevinb@redhat.com>
5443
5444 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5445 (target_thread_handle_to_thread_info): Declare.
5446 * target.c (target_thread_handle_to_thread_info): New function.
5447 * target-delegates.c: Regenerate.
5448 * gdbthread.h (find_thread_by_handle): Declare.
5449 * thread.c (find_thread_by_handle): New function.
5450 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5451 function.
5452 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5453
1e5b66ed
SM
54542017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5455
5456 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5457
ebe48ba0
SM
54582017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5459
5460 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5461
0a0bf5dc
YQ
54622017-09-21 Yao Qi <yao.qi@linaro.org>
5463
5464 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5465 to gdb_target_obs.
5466
d1b0a7bf
TT
54672017-09-20 Tom Tromey <tom@tromey.com>
5468
5469 * breakpoint.c (struct counted_command_line): Remove.
5470 (breakpoint_commands): Update.
5471 (alloc_counted_command_line, incref_counted_command_line)
5472 (decref_counted_command_line, do_cleanup_counted_command_line)
5473 (make_cleanup_decref_counted_command_line): Remove.
5474 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5475 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5476 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5477 (save_breakpoints): Update.
5478 * breakpoint.h (counted_command_line): Now a typedef to
5479 shared_ptr.
5480 (struct breakpoint) <commands>: Now a counted_command_line.
5481 (struct bpstats) <command>: Likewise.
5482
48649e1b
TT
54832017-09-20 Tom Tromey <tom@tromey.com>
5484
5485 * breakpoint.c (struct commands_info, do_map_commands_command):
5486 Remove.
5487 (commands_command_1): Update.
5488 (iterate_over_related_breakpoints): Take a function_view.
5489 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5490 (delete_command): Update.
5491 (map_breakpoint_numbers): Take a function_view.
5492 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5493 (disable_command): Update.
5494 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5495 (enable_command): Update.
5496 (struct disp_data, do_enable_breakpoint_disp)
5497 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5498 (do_map_enable_delete_breakpoint): Remove.
5499 (enable_once_command, enable_count_command, enable_delete_command)
5500 (delete_trace_variable_command): Update.
5501
04afa70c
TT
55022017-09-20 Tom Tromey <tom@tromey.com>
5503
5504 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5505 (bpstat_clear): Use delete.
5506 (bpstats): New constructors.
5507 (bpstat_copy, bpstat_stop_status): Use new.
5508 (dprintf_after_condition_true): Update.
5509 * breakpoint.h (bpstats::bpstats): Add constructors.
5510 (bpstats::~bpstats): Add destructor.
5511
c83833f4
PA
55122017-09-20 Pedro Alves <palves@redhat.com>
5513
5514 * eval.c (make_params): Delete, refactored as ...
5515 (class fake_method): ... this new type's ctor.
5516 (fake_method::~fake_method): New.
5517 (evaluate_subexp_standard): Use 'fake_method'.
5518
223ffa71
TT
55192017-09-20 Tom Tromey <tom@tromey.com>
5520
5521 * windows-nat.c (get_windows_debug_event, windows_wait)
5522 (do_initial_windows_stuff, windows_attach): Update.
5523 * utils.c (vwarning, internal_vproblem): Update.
5524 (ui_unregister_input_event_handler_cleanup)
5525 (prepare_to_handle_input): Remove.
5526 (class scoped_input_handler): New.
5527 (defaulted_query, prompt_for_continue): Update.
5528 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5529 Update.
5530 * top.c (undo_terminal_modifications_before_exit): Update.
5531 * target/target.h (target_terminal_init, target_terminal_inferior)
5532 (target_terminal_ours): Don't declare.
5533 (class target_terminal): New.
5534 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5535 (target_terminal_ours_for_output)
5536 (make_cleanup_restore_target_terminal): Don't declare.
5537 (target_terminal_info): Remove.
5538 * target.c (enum terminal_state, terminal_state): Remove.
5539 (target_terminal::terminal_state): Define.
5540 (target_terminal::init): Rename from target_terminal_init.
5541 (target_terminal::inferior): Rename from
5542 target_terminal_inferior.
5543 (target_terminal::ours): Rename from target_terminal_ours.
5544 (target_terminal::ours_for_output): Rename from
5545 target_terminal_ours_for_output.
5546 (target_terminal::info): New method.
5547 (cleanup_restore_target_terminal)
5548 (make_cleanup_restore_target_terminal): Remove.
5549 * solib.c (handle_solib_event): Update.
5550 * remote.c (remote_serial_quit_handler): Update.
5551 (remote_terminal_inferior, remote_wait_as): Update.
5552 * record-full.c (record_full_wait_1): Update.
5553 * nto-procfs.c (procfs_create_inferior): Update.
5554 * nat/fork-inferior.c (startup_inferior): Update.
5555 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5556 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5557 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5558 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5559 (mi_breakpoint_created, mi_breakpoint_deleted)
5560 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5561 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5562 (mi_user_selected_context_changed, report_initial_inferior):
5563 Update.
5564 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5565 (linux_nat_terminal_inferior): Update.
5566 * infrun.c (follow_fork_inferior)
5567 (handle_vfork_child_exec_or_exit, do_target_resume)
5568 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5569 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5570 Update.
5571 * inflow.c (child_terminal_init, info_terminal_command): Update.
5572 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5573 (attach_command): Update.
5574 * infcall.c (call_thread_fsm_should_stop): Update.
5575 * gnu-nat.c (gnu_attach): Update.
5576 * extension.c (struct active_ext_lang_state)
5577 (restore_active_ext_lang): Update.
5578 * exceptions.c (print_flush): Update.
5579 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5580 (struct quit_handler_cleanup_data, restore_quit_handler)
5581 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5582 Remove.
5583 * cp-support.c (gdb_demangle): Update.
5584 * breakpoint.c (update_inserted_breakpoint_locations)
5585 (insert_breakpoint_locations, handle_jit_event)
5586 (disable_breakpoints_in_unloaded_shlib): Update.
5587 * annotate.c (annotate_breakpoints_invalid)
5588 (annotate_frames_invalid): Update.
5589
013af3fc
TT
55902017-09-20 Tom Tromey <tom@tromey.com>
5591
5592 * main.c (catch_command_errors): Rename from
5593 catch_command_errors_const.
5594 (captured_main_1): Update.
5595
06871ae8
PA
55962017-09-20 Pedro Alves <palves@redhat.com>
5597
5598 * cli/cli-cmds.c (list_command): Use print_sal_location.
5599 (print_sal_location): New function.
5600 (ambiguous_line_spec): Use print_sal_location.
5601 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5602 * symtab.c (find_function_start_sal): Likewise.
5603 * symtab.h (symtab_and_line::symbol): New field.
5604
e5f25bc5
PA
56052017-09-20 Pedro Alves <palves@redhat.com>
5606
5607 * linespec.c (minsym_found): Handle non-text minsyms.
5608 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5609
1b7fa39e
WT
56102017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5611
5612 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5613 backslash.
5614
37dd0825
WT
56152017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5616
5617 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5618 vmovups instead vmovaps.
5619 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5620
4e5a4f58
JB
56212017-09-19 John Baldwin <jhb@FreeBSD.org>
5622
5623 * NEWS (Changes since GDB 8.0): Add starti.
5624 * infcmd.c (enum run_break): New.
5625 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5626 case.
5627 (run_command): Use enum run_how.
5628 (start_command): Likewise.
5629 (starti_command): New function.
5630 (RUN_ARGS_HELP): New macro.
5631 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5632 commands. Add starti command.
5633
aa70c9f1
YQ
56342017-09-19 Yao Qi <yao.qi@linaro.org>
5635
5636 * Makefile.in (monitor.o): Remove the rule.
5637
d6541620
YQ
56382017-09-19 Yao Qi <yao.qi@linaro.org>
5639
5640 * annotate.h (struct annotate_arg_emitter): Use
5641 DISABLE_COPY_AND_ASSIGN.
5642 * common/refcounted-object.h (refcounted_object): Likewise.
5643 * completer.h (struct completion_result): Likewise.
5644 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5645 * filename-seen-cache.h (filename_seen_cache): Likewise.
5646 * gdbcore.h (thread_section_name): Likewise.
5647 * gdb_regex.h (compiled_regex): Likewise.
5648 * gdbthread.h (scoped_restore_current_thread): Likewise.
5649 * inferior.h (scoped_restore_current_inferior): Likewise.
5650 * jit.c (jit_reader): Likewise.
5651 * linespec.h (struct linespec_result): Likewise.
5652 * mi/mi-parse.h (struct mi_parse): Likewise.
5653 * nat/fork-inferior.c (execv_argv): Likewise.
5654 * progspace.h (scoped_restore_current_program_space): Likewise.
5655 * python/python-internal.h (class gdbpy_enter): Likewise.
5656 * regcache.h (regcache): Likewise.
5657 * target-descriptions.c (struct tdesc_reg): Likewise.
5658 (struct tdesc_type): Likewise.
5659 (struct tdesc_feature): Likewise.
5660 * ui-out.h (ui_out_emit_type): Likewise.
5661
0615127c
SM
56622017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5663
5664 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5665 label abort_expression.
5666
5e187554
SM
56672017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5668
5669 * common/buffer.c (buffer_xml_printf): Adjust.
5670 * common/xml-utils.c (xml_escape_text): Change return type to
5671 std::string, update code accordingly.
5672 * common/xml-utils.h (xml_escape_text): Change return type to
5673 std::string.
5674 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5675 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5676 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5677 Adjust.
5678
c3d7b541
SM
56792017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5680
5681 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5682 (SUBDIR_UNITTESTS_OBS): Add new object file.
5683 * unittests/xml-utils-selftests.c: New file.
5684
1526853e
SM
56852017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5686
5687 * common/selftest.h (selftest): New struct/interface.
5688 (register_test): Add name parameter, add new overload.
5689 (run_tests): Add filter parameter.
5690 (for_each_selftest_ftype): New typedef.
5691 (for_each_selftest): New declaration.
5692 * common/selftest.c (tests): Change type to
5693 map<string, unique_ptr<selftest>>.
5694 (simple_selftest): New struct.
5695 (register_test): New function.
5696 (register_test): Add name parameter and use it.
5697 (run_tests): Add filter parameter and use it. Add prints.
5698 Adjust to vector -> map change.
5699 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5700 registering selftests.
5701 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5702 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5703 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5704 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5705 * findvar.c (_initialize_findvar): Likewise.
5706 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5707 * maint.c (maintenance_selftest): Update call to run_tests.
5708 (maintenance_info_selftests): New function.
5709 (_initialize_maint_cmds): Register "maintenance info selftests"
5710 command. Update "maintenance selftest" doc.
5711 * regcache.c (_initialize_regcache): Add names when registering
5712 selftests.
5713 * rust-exp.y (_initialize_rust_exp): Likewise.
5714 * selftest-arch.c (gdbarch_selftest): New struct.
5715 (gdbarch_tests): Remove.
5716 (register_test_foreach_arch): Add name parameter. Call
5717 register_test.
5718 (tests_with_arch): Remove, move most content to
5719 gdbarch_selftest::operator().
5720 (_initialize_selftests_foreach_arch): Remove.
5721 * selftest-arch.h (register_test_foreach_arch): Add name
5722 parameter.
5723 (run_tests_with_arch): New declaration.
5724 * utils-selftests.c (_initialize_utils_selftests): Add names
5725 when registering selftests.
5726 * utils.c (_initialize_utils): Likewise.
5727 * unittests/array-view-selftests.c
5728 (_initialize_array_view_selftests): Likewise.
5729 * unittests/environ-selftests.c (_initialize_environ_selftests):
5730 Likewise.
5731 * unittests/function-view-selftests.c
5732 (_initialize_function_view_selftests): Likewise.
5733 * unittests/offset-type-selftests.c
5734 (_initialize_offset_type_selftests): Likewise.
5735 * unittests/optional-selftests.c
5736 (_initialize_optional_selftests): Likewise.
5737 * unittests/scoped_restore-selftests.c
5738 (_initialize_scoped_restore_selftests): Likewise.
5739 * NEWS: Document "maintenance selftest" and "maint info
5740 selftests".
5741
5846367a
SM
57422017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5743
5744 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5745 scoped_restore.
5746
bd77e8ff
SM
57472017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5748
5749 * mi/mi-main.c (mi_load_progress): Make uiout variable
5750 a unique_ptr.
5751
26a67918
PA
57522017-09-15 Pedro Alves <palves@redhat.com>
5753
5754 * compile/compile-c-types.c (convert_enum, convert_int)
5755 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5756
3f8a7804
SM
57572017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5758
5759 * dwarf2read.c (copy_string): Remove.
5760 (parse_macro_definition): Replace copy_string with savestring.
5761
8d200706
YQ
57622017-09-15 Yao Qi <yao.qi@linaro.org>
5763
5764 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5765 gdb_target_obs.
5766 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5767 Likewise.
5768 (i[34567]86-*-linux*): Likewise.
5769
d185219d
SM
57702017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5771
5772 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5773 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5774 <stack>: Change type to std::vector.
5775 <stack_len, stack_allocated>: Remove.
5776 <grow_stack>: Remove.
5777 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5778 (dwarf_expr_context::~dwarf_expr_context): Remove.
5779 (dwarf_expr_context::grow_stack): Remove.
5780 (dwarf_expr_context::push): Adjust.
5781 (dwarf_expr_context::pop): Adjust.
5782 (dwarf_expr_context::fetch): Adjust.
5783 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5784 (dwarf_expr_context::stack_empty_p): Adjust.
5785 (dwarf_expr_context::execute_stack_op): Adjust.
5786
eccd80d6
SM
57872017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5788
5789 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5790 return type to bool.
5791 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5792
69009882
SM
57932017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5794
5795 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5796 Change type to bool.
5797 (dwarf_stack_value) <in_stack_memory>: Likewise.
5798 (dwarf_expr_context) <push_address>: Change parameter type to
5799 bool.
5800 <fetch_in_stack_memory>: Change return type to bool.
5801 <push>: Change parameter type to bool.
5802 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5803 to bool.
5804 (dwarf_expr_context::push_address): Likewise.
5805 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5806 to bool.
5807 (dwarf_expr_context::execute_stack_op): Adjust.
5808 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5809
1e467161
SM
58102017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5811
5812 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5813 (struct dwarf_expr_context) <n_pieces>: Remove.
5814 <pieces>: Change type to std::vector.
5815 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5816 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5817 pieces.
5818 (dwarf_expr_context::add_piece): Adjust.
5819 * dwarf2loc.c (struct piece_closure): Initialize fields.
5820 <n_pieces>: Remove.
5821 <pieces>: Change type to std::vector.
5822 (allocate_piece_closure): Adjust, change parameter to
5823 std::vector rvalue and std::move it to piece_closure.
5824 (rw_pieced_value): Adjust.
5825 (check_pieced_synthetic_pointer): Adjust.
5826 (indirect_synthetic_pointer): Adjust.
5827 (coerce_pieced_ref): Adjust.
5828 (free_pieced_value_closure): Adjust. Use delete to free
5829 piece_closure.
5830 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5831 to allocate_piece_closure.
5832 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5833
0782db84
SM
58342017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5835
5836 * probe.h (probe_ops_cp): Remove typedef.
5837 (DEF_VEC_P (probe_ops_cp)): Remove.
5838 (all_probe_ops): Change type to std::vector.
5839 * probe.c (info_probes_for_ops): Adjust to vector change.
5840 (probe_linespec_to_ops): Likewise.
5841 (all_probe_ops): Change type to std::vector.
5842 (_initialize_probe): Adjust to vector change.
5843 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5844 * elfread.c (elf_get_probes): Likewise.
5845 * stap-probe.c (_initialize_stap_probe): Likewise.
5846
1eac6bea
SM
58472017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5848
5849 * probe.h (struct bound_probe): Define constructors.
5850 * probe.c (bound_probe_s): Remove typedef.
5851 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5852 (collect_probes): Change return type to std::vector, remove
5853 cleanup.
5854 (compare_probes): Return bool, change parameter type. Change
5855 semantic to "less than".
5856 (gen_ui_out_table_header_info): Change parameter to std::vector
5857 and update.
5858 (exists_probe_with_pops): Likewise.
5859 (info_probes_for_ops): Update to std::vector change.
5860 (enable_probes_command): Likewise.
5861 (disable_probes_command): Likewise.
5862
aaa63a31
SM
58632017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5864
5865 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5866 vec to std::vector.
5867 * probe.c (parse_probes_in_pspace): Update.
5868 (find_probes_in_objfile): Update.
5869 (find_probe_by_pc): Update.
5870 (collect_probes): Update.
5871 (probe_any_get_probes): Update.
5872 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5873 return type to reference to std::vector.
5874 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5875 std::vector and update.
5876 (dtrace_process_dof): Likewise.
5877 (dtrace_get_probes): Likewise.
5878 * elfread.c (elf_get_probes): Change return type to std::vector,
5879 store an std::vector in bfd_data.
5880 (probe_key_free): Update to std::vector.
5881 * stap-probe.c (handle_stap_probe): Change parameter to
5882 std::vector and update.
5883 (stap_get_probes): Likewise.
5884 * symfile-debug.c (debug_sym_get_probes): Change return type to
5885 std::vector and update.
5886
cb85b21b
TT
58872017-09-11 Tom Tromey <tom@tromey.com>
5888
5889 * breakpoint.c (program_breakpoint_here_p): Update.
5890 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5891 from make_show_memory_breakpoints_cleanup. Return a
5892 scoped_restore_tmpl<int>.
5893 (restore_show_memory_breakpoints): Remove.
5894 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5895 * mem-break.c (memory_validate_breakpoint): Update.
5896 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5897 (ia64_memory_remove_breakpoint): Update.
5898 (ia64_breakpoint_from_pc): Update.
5899 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5900 from make_show_memory_breakpoints_cleanup.
5901
8fbc99ef
TT
59022017-09-11 Tom Tromey <tom@tromey.com>
5903
5904 * d-namespace.c (d_lookup_symbol): Use std::string.
5905 (find_symbol_in_baseclass): Likewise.
5906
50feb4bd
TT
59072017-09-11 Tom Tromey <tom@tromey.com>
5908
5909 * ctf.c (ctf_start): Use std::string.
5910
c6dc63a1
TT
59112017-09-11 Tom Tromey <tom@tromey.com>
5912
5913 * ada-lang.c (is_known_support_routine): Update.
5914 (ada_unhandled_exception_name_addr_from_raise): Update.
5915 * guile/scm-frame.c (gdbscm_frame_name): Update.
5916 * python/py-frame.c (frapy_name): Update.
5917 (frapy_function): Update.
5918 * stack.h (find_frame_funname): Update.
5919 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5920 (print_frame): Update.
5921
d6b9b80f
TT
59222017-09-11 Tom Tromey <tom@tromey.com>
5923
5924 * findcmd.c (put_bits): Take a gdb::byte_vector.
5925 (parse_find_args): Return gdb::byte_vector. "args" now const.
5926 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5927 cleanups.
5928 (find_command): Update.
5929
a9921622
TT
59302017-09-11 Tom Tromey <tom@tromey.com>
5931
5932 * cli/cli-script.c (class scoped_restore_hook_in): New.
5933 (clear_hook_in_cleanup): Remove.
5934 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5935 scoped_restore_hook_in.
5936
be0d7abb
TT
59372017-09-11 Tom Tromey <tom@tromey.com>
5938
5939 * cli/cli-script.c (restore_interp): Remove.
5940 (read_command_lines): Use scoped_restore_interp.
5941 * interps.c (scoped_restore_interp::set_temp): Rename from
5942 interp_set_temp.
5943 * interps.h (class scoped_restore_interp): New.
5944 (interp_set_temp): Remove.
5945
00f675ff
TT
59462017-09-11 Tom Tromey <tom@tromey.com>
5947
5948 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5949 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5950 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5951 scoped_restore.
5952 (mi_cmd_break_insert_1): Update.
5953 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5954 scoped_restore.
5955
cb791d59
TT
59562017-09-11 Tom Tromey <tom@tromey.com>
5957
5958 * demangle.c (demangle_command): Update.
5959 * breakpoint.c (disable_command): Update.
5960 (enable_command): Update.
5961 (find_location_by_number): Make "number" const. Use
5962 get_number_trailer.
5963 * cli/cli-utils.c (extract_arg): Return std::string.
5964 * probe.c (parse_probe_linespec): Update. Change types.
5965 (collect_probes): Take string arguments.
5966 (parse_probe_linespec): Likewise.
5967 (info_probes_for_ops): Update.
5968 (enable_probes_command): Update.
5969 (disable_probes_command): Update.
5970 * break-catch-sig.c (catch_signal_split_args): Update.
5971 * mi/mi-parse.c (mi_parse): Update.
5972
2039bd9f
TT
59732017-09-11 Tom Tromey <tom@tromey.com>
5974
5975 * language.h (language_enum): Make argument const.
5976 * language.c (language_enum): Make argument const.
5977
f1735a53
TT
59782017-09-11 Tom Tromey <tom@tromey.com>
5979
5980 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5981 as function.
5982 (skip_to_space): Rename from skip_to_space_const.
5983 * common/common-utils.c (skip_to_space): New function.
5984 (skip_to_space): Rename from skip_to_space_const.
5985 * cli/cli-utils.h (get_number): Rename from get_number_const.
5986 (extract_arg): Rename from extract_arg_const.
5987 * cli/cli-utils.c (get_number): Rename from get_number_const.
5988 (extract_arg): Rename from extract_arg_const.
5989 (number_or_range_parser::get_number): Use ::get_number.
5990 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5991 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5992 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5993 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5994 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5995 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5996 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5997 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5998
7d221d74
TT
59992017-09-11 Tom Tromey <tom@tromey.com>
6000
6001 * python/python.c (do_start_initialization): Use
6002 py-event-types.def to initialize types.
6003 Define all object type structures.
6004 * python/python-internal.h: Don't declare event initialization
6005 functions.
6006 * python/py-threadevent.c (thread_event_object_type): Don't
6007 define.
6008 * python/py-stopevent.c (stop_event_object_type): Don't define.
6009 * python/py-signalevent.c (signal_event_object_type): Don't
6010 declare or define.
6011 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6012 (clear_objfiles_event_object_type): Don't declare or define.
6013 * python/py-infevents.c (inferior_call_pre_event_object_type)
6014 (inferior_call_post_event_object_type)
6015 (register_changed_event_object_type)
6016 (memory_changed_event_object_type): Don't declare or define.
6017 * python/py-inferior.c (new_thread_event_object_type)
6018 (new_inferior_event_object_type)
6019 (inferior_deleted_event_object_type): Don't declare or define.
6020 * python/py-exitedevent.c (exited_event_object_type): Don't
6021 declare or define.
6022 * python/py-evts.c (gdbpy_initialize_py_events): Use
6023 py-all-events.def.
6024 * python/py-events.h (thread_event_object_type): Don't declare.
6025 (events_object): Use py-all-events.def.
6026 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6027 py-event-types.def.
6028 * python/py-event-types.def: New file.
6029 * python/py-continueevent.c (create_continue_event_object): Don't
6030 declare or define.
6031 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6032 declare or define.
6033 * python/py-all-events.def: New file.
6034
35c61a1d
TT
60352017-09-11 Tom Tromey <tom@tromey.com>
6036
6037 * python/py-threadevent.c (create_thread_event_object): Return
6038 gdbpy_ref.
6039 * python/py-stopevent.h (create_stop_event_object)
6040 (create_breakpoint_event_object, create_signal_event_object):
6041 Update.
6042 * python/py-stopevent.c (create_stop_event_object): Return
6043 gdbpy_ref.
6044 (emit_stop_event): Update.
6045 * python/py-signalevent.c (create_signal_event_object): Return
6046 gdbpy_ref.
6047 * python/py-infevents.c (create_inferior_call_event_object):
6048 Update.
6049 * python/py-event.h (create_event_object)
6050 (create_thread_event_object): Update.
6051 * python/py-event.c (create_event_object): Return gdbpy_ref.
6052 * python/py-continueevent.c: Return gdbpy_ref.
6053 * python/py-bpevent.c (create_breakpoint_event_object): Return
6054 gdbpy_ref.
6055
7c96f8c1
TT
60562017-09-11 Tom Tromey <tom@tromey.com>
6057
6058 PR python/15622:
6059 * NEWS: Add entry.
6060 * python/python.c (do_start_initialization): Initialize new event
6061 types.
6062 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6063 (gdbpy_initialize_inferior_deleted_event)
6064 (gdbpy_initialize_new_thread_event): Declare.
6065 * python/py-threadevent.c (create_thread_event_object): Add option
6066 "thread" parameter.
6067 * python/py-inferior.c (new_thread_event_object_type)
6068 (new_inferior_event_object_type)
6069 (inferior_deleted_event_object_type): Declare.
6070 (python_new_inferior, python_inferior_deleted): New functions.
6071 (add_thread_object): Emit new_thread event.
6072 (gdbpy_initialize_inferior): Attach new functions to corresponding
6073 observers.
6074 (new_thread, new_inferior, inferior_deleted): Define new event
6075 types.
6076 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6077 registries.
6078 * python/py-events.h (events_object) <new_inferior,
6079 inferior_deleted, new_thread>: New fields.
6080 * python/py-event.h (create_thread_event_breakpoint): Add optional
6081 "thread" parameter.
6082
72542b8e
AB
60832017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6084
6085 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6086 check current_ui instead.
6087 (internal_vproblem): Likewise.
6088
0d64823e
SM
60892017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6090
6091 * thread.c (print_thread_info_1): Remove unnecessary calls to
6092 uiout->is_mi_like_p.
6093
eb1e02fd
TT
60942017-09-09 Tom Tromey <tom@tromey.com>
6095
6096 * namespace.h (add_using_directive): Update.
6097 * namespace.c (add_using_directive): Change type of excludes to
6098 std::vector.
6099 * dwarf2read.c (read_import_statement): Use std::vector.
6100 (read_namespace): Update.
6101 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6102
0fc21fd8
TT
61032017-09-09 Tom Tromey <tom@tromey.com>
6104
6105 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6106
49663d05
TT
61072017-09-09 Tom Tromey <tom@tromey.com>
6108
6109 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6110
0b868b60
TT
61112017-09-09 Tom Tromey <tom@tromey.com>
6112
6113 * stack.c (func_command): Use gdb::def_vector.
6114
c0470d48
TT
61152017-09-09 Tom Tromey <tom@tromey.com>
6116
6117 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6118 ui_out_emit_list, ui_out_emit_tuple.
6119 (mi_cmd_var_update): Likewise.
6120
ca5909c7
TT
61212017-09-09 Tom Tromey <tom@tromey.com>
6122
6123 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6124 ui_out_redirect_pop.
6125 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6126 ui_out_redirect_pop.
6127 * utils.c (do_ui_out_redirect_pop)
6128 (make_cleanup_ui_out_redirect_pop): Remove.
6129 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6130 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6131 * ui-out.h (ui_out_redirect_pop): New class.
6132
e6a2252a
TT
61332017-09-09 Tom Tromey <tom@tromey.com>
6134
6135 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6136 (list_available_thread_groups, mi_cmd_list_thread_groups)
6137 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6138 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6139 Likewise.
6140
393702cd
TT
61412017-09-09 Tom Tromey <tom@tromey.com>
6142
6143 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6144 ui_out_emit_tuple.
6145
76f9c9cf
TT
61462017-09-09 Tom Tromey <tom@tromey.com>
6147
6148 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6149 * stack.c (print_frame): Use ui_out_emit_tuple.
6150 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6151 (info_spu_mailbox_command, info_spu_dma_command)
6152 (info_spu_proxydma_command): Likewise.
6153 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6154 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6155 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6156 ui_out_emit_tuple.
6157 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6158
dc9fe180
TT
61592017-09-09 Tom Tromey <tom@tromey.com>
6160
6161 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6162 (class ui_out_emit_table): Update comment.
6163 * ui-out.c (do_cleanup_table_end)
6164 (make_cleanup_ui_out_table_begin_end): Remove.
6165 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6166 (info_spu_dma_cmdlist): Likewise.
6167 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6168 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6169 ui_out_emit_table.
6170
f8cc3da6
TT
61712017-09-09 Tom Tromey <tom@tromey.com>
6172
6173 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6174 ui_out_emit_list, gdb::optional.
6175
481695ed
JB
61762017-09-09 John Baldwin <jhb@FreeBSD.org>
6177
6178 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6179 prototype.
6180 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6181 prototype.
6182 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6183 prototype.
6184 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6185 * ada-exp.y: Remove _initialize_ada_exp prototype.
6186 * ada-lang.c: Remove _initialize_ada_language prototype.
6187 * ada-tasks.c: Remove _initialize_tasks prototype.
6188 * addrmap.c: Remove _initialize_addrmap prototype.
6189 * agent.c: Remove _initialize_agent prototype.
6190 * aix-thread.c: Remove _initialize_aix_thread prototype.
6191 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6192 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6193 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6194 prototype.
6195 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6196 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6197 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6198 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6199 prototype.
6200 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6201 prototype.
6202 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6203 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6204 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6205 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6206 prototype.
6207 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6208 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6209 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6210 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6211 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6212 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6213 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6214 prototype.
6215 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6216 prototype.
6217 * annotate.c: Remove _initialize_annotate prototype.
6218 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6219 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6220 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6221 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6222 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6223 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6224 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6225 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6226 prototype.
6227 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6228 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6229 * auto-load.c: Remove _initialize_auto_load prototype.
6230 * auxv.c: Remove _initialize_auxv prototype.
6231 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6232 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6233 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6234 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6235 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6236 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6237 prototype.
6238 * break-catch-throw.c: Remove _initialize_break_catch_throw
6239 prototype.
6240 * breakpoint.c: Remove _initialize_breakpoint prototype.
6241 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6242 * btrace.c: Remove _initialize_btrace prototype.
6243 * charset.c: Remove _initialize_charset prototype.
6244 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6245 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6246 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6247 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6248 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6249 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6250 * coffread.c: Remove _initialize_coffread prototype.
6251 * compile/compile.c: Remove _initialize_compile prototype.
6252 * complaints.c: Remove _initialize_complaints prototype.
6253 * completer.c: Remove _initialize_completer prototype.
6254 * copying.awk: Remove _initialize_copying prototype.
6255 * copying.c: Regenerate.
6256 * core-regset.c: Remove _initialize_core_regset prototype.
6257 * corefile.c: Remove _initialize_core prototype.
6258 * corelow.c: Remove _initialize_corelow prototype.
6259 * cp-abi.c: Remove _initialize_cp_abi prototype.
6260 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6261 * cp-support.c: Remove _initialize_cp_support prototype.
6262 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6263 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6264 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6265 * ctf.c: Remove _initialize_ctf prototype.
6266 * d-lang.c: Remove _initialize_d_language prototype.
6267 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6268 prototype.
6269 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6270 * dbxread.c: Remove _initialize_dbxread prototype.
6271 * dcache.c: Remove _initialize_dcache prototype.
6272 * demangle.c: Remove _initialize_demangler prototype.
6273 * disasm-selftests.c: Remove _initialize_disasm_selftests
6274 prototype.
6275 * disasm.c: Remove _initialize_disasm prototype.
6276 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6277 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6278 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6279 prototype.
6280 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6281 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6282 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6283 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6284 * elfread.c: Remove _initialize_elfread prototype.
6285 * exec.c: Remove _initialize_exec prototype.
6286 * extension.c: Remove _initialize_extension prototype.
6287 * f-lang.c: Remove _initialize_f_language prototype.
6288 * f-valprint.c: Remove _initialize_f_valprint prototype.
6289 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6290 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6291 * filesystem.c: Remove _initialize_filesystem prototype.
6292 * findcmd.c: Remove _initialize_mem_search prototype.
6293 * fork-child.c: Remove _initialize_fork_child prototype.
6294 * frame-base.c: Remove _initialize_frame_base prototype.
6295 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6296 * frame.c: Remove _initialize_frame prototype.
6297 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6298 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6299 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6300 * gcore.c: Remove _initialize_gcore prototype.
6301 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6302 * gdbarch.c: Regenerate.
6303 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6304 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6305 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6306 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6307 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6308 * go-lang.c: Remove _initialize_go_language prototype.
6309 * go32-nat.c: Remove _initialize_go32_nat prototype.
6310 * guile/guile.c: Remove _initialize_guile prototype.
6311 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6312 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6313 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6314 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6315 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6316 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6317 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6318 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6319 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6320 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6321 prototype.
6322 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6323 prototype.
6324 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6325 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6326 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6327 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6328 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6329 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6330 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6331 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6332 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6333 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6334 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6335 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6336 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6337 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6338 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6339 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6340 prototype.
6341 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6342 prototype.
6343 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6344 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6345 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6346 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6347 * infcall.c: Remove _initialize_infcall prototype.
6348 * infcmd.c: Remove _initialize_infcmd prototype.
6349 * inferior.c: Remove _initialize_inferiors prototype.
6350 * inflow.c: Remove _initialize_inflow prototype.
6351 * infrun.c: Remove _initialize_infrun prototype.
6352 * interps.c: Remove _initialize_interpreter prototype.
6353 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6354 * jit.c: Remove _initialize_jit prototype.
6355 * language.c: Remove _initialize_language prototype.
6356 * linux-fork.c: Remove _initialize_linux_fork prototype.
6357 * linux-nat.c: Remove _initialize_linux_nat prototype.
6358 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6359 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6360 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6361 * m2-lang.c: Remove _initialize_m2_language prototype.
6362 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6363 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6364 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6365 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6366 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6367 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6368 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6369 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6370 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6371 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6372 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6373 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6374 * machoread.c: Remove _initialize_machoread prototype.
6375 * macrocmd.c: Remove _initialize_macrocmd prototype.
6376 * macroscope.c: Remove _initialize_macroscope prototype.
6377 * maint.c: Remove _initialize_maint_cmds prototype.
6378 * mdebugread.c: Remove _initialize_mdebugread prototype.
6379 * memattr.c: Remove _initialize_mem prototype.
6380 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6381 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6382 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6383 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6384 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6385 * microblaze-linux-tdep.c: Remove
6386 _initialize_microblaze_linux_tdep prototype.
6387 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6388 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6389 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6390 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6391 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6392 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6393 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6394 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6395 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6396 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6397 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6398 prototype.
6399 * mipsread.c: Remove _initialize_mipsread prototype.
6400 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6401 prototype.
6402 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6403 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6404 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6405 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6406 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6407 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6408 prototype.
6409 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6410 * nto-procfs.c: Remove _initialize_procfs prototype.
6411 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6412 * objc-lang.c: Remove _initialize_objc_language prototype.
6413 * objfiles.c: Remove _initialize_objfiles prototype.
6414 * observer.c: Remove observer_test_first_notification_function,
6415 observer_test_second_notification_function,
6416 observer_test_third_notification_function, and
6417 _initialize_observer prototypes.
6418 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6419 * osabi.c: Remove _initialize_gdb_osabi prototype.
6420 * osdata.c: Remove _initialize_osdata prototype.
6421 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6422 * parse.c: Remove _initialize_parse prototype.
6423 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6424 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6425 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6426 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6427 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6428 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6429 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6430 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6431 * printcmd.c: Remove _initialize_printcmd prototype.
6432 * probe.c: Remove _initialize_probe prototype.
6433 * proc-api.c: Remove _initialize_proc_api prototype.
6434 * proc-events.c: Remove _initialize_proc_events prototype.
6435 * proc-service.c: Remove _initialize_proc_service prototype.
6436 * procfs.c: Remove _initialize_procfs prototype.
6437 * psymtab.c: Remove _initialize_psymtab prototype.
6438 * python/python.c: Remove _initialize_python prototype.
6439 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6440 * record-btrace.c: Remove _initialize_record_btrace prototype.
6441 * record-full.c: Remove _initialize_record_full prototype.
6442 * record.c: Remove _initialize_record prototype.
6443 * regcache.c: Remove _initialize_regcache prototype.
6444 * reggroups.c: Remove _initialize_reggroup prototype.
6445 * remote-notif.c: Remove _initialize_notif prototype.
6446 * remote-sim.c: Remove _initialize_remote_sim prototype.
6447 * remote.c: Remove _initialize_remote prototype.
6448 * reverse.c: Remove _initialize_reverse prototype.
6449 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6450 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6451 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6452 prototype.
6453 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6454 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6455 * rust-exp.y: Remove _initialize_rust_exp prototype.
6456 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6457 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6458 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6459 * score-tdep.c: Remove _initialize_score_tdep prototype.
6460 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6461 prototype.
6462 * ser-go32.c: Remove _initialize_ser_dos prototype.
6463 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6464 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6465 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6466 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6467 * serial.c: Remove _initialize_serial prototype.
6468 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6469 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6470 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6471 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6472 * skip.c: Remove _initialize_step_skip prototype.
6473 * sol-thread.c: Remove _initialize_sol_thread prototype.
6474 * solib-aix.c: Remove _initialize_solib_aix prototype.
6475 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6476 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6477 * solib-frv.c: Remove _initialize_frv_solib prototype.
6478 * solib-spu.c: Remove _initialize_spu_solib prototype.
6479 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6480 * solib-target.c: Remove _initialize_solib_target prototype.
6481 * solib.c: Remove _initialize_solib prototype.
6482 * source.c: Remove _initialize_source prototype.
6483 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6484 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6485 prototype.
6486 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6487 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6488 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6489 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6490 prototype.
6491 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6492 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6493 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6494 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6495 prototype.
6496 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6497 prototype.
6498 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6499 prototype.
6500 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6501 prototype.
6502 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6503 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6504 prototype.
6505 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6506 prototype.
6507 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6508 prototype.
6509 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6510 prototype.
6511 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6512 prototype.
6513 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6514 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6515 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6516 * stabsread.c: Remove _initialize_stabsread prototype.
6517 * stack.c: Remove _initialize_stack prototype.
6518 * stap-probe.c: Remove _initialize_stap_probe prototype.
6519 * std-regs.c: Remove _initialize_frame_reg prototype.
6520 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6521 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6522 * symfile.c: Remove _initialize_symfile prototype.
6523 * symmisc.c: Remove _initialize_symmisc prototype.
6524 * symtab.c: Remove _initialize_symtab prototype.
6525 * target-dcache.c: Remove _initialize_target_dcache prototype.
6526 * target-descriptions.c: Remove _initialize_target_descriptions
6527 prototype.
6528 * thread.c: Remove _initialize_thread prototype.
6529 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6530 prototype.
6531 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6532 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6533 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6534 prototype.
6535 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6536 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6537 * tracefile.c: Remove _initialize_tracefile prototype.
6538 * tracepoint.c: Remove _initialize_tracepoint prototype.
6539 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6540 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6541 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6542 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6543 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6544 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6545 * tui/tui.c: Remove _initialize_tui prototype.
6546 * typeprint.c: Remove _initialize_typeprint prototype.
6547 * user-regs.c: Remove _initialize_user_regs prototype.
6548 * utils.c: Remove _initialize_utils prototype.
6549 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6550 * valarith.c: Remove _initialize_valarith prototype.
6551 * valops.c: Remove _initialize_valops prototype.
6552 * valprint.c: Remove _initialize_valprint prototype.
6553 * value.c: Remove _initialize_values prototype.
6554 * varobj.c: Remove _initialize_varobj prototype.
6555 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6556 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6557 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6558 * windows-nat.c: Remove _initialize_windows_nat,
6559 _initialize_check_for_gdb_ini, and _initialize_loadable
6560 prototypes.
6561 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6562 * xcoffread.c: Remove _initialize_xcoffread prototype.
6563 * xml-support.c: Remove _initialize_xml_support prototype.
6564 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6565 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6566 prototype.
6567 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6568 prototype.
6569 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6570
a611b5cb
KS
65712017-09-08 Keith Seitz <keiths@redhat.com>
6572
6573 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6574 field.
6575
469412dd
CW
65762017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6577
6578 * f-valprint.c (f_val_print): Remove check for one byte
6579 sized integers. Remove printing of character type.
6580
a5ad232b
FP
65812017-09-08 Frank Penczek <frank.penczek@intel.com>
6582 Christoph Weinmann <christoph.t.weinmann@intel.com>
6583 Bernhard Heckel <bernhard.heckel@intel.com>
6584
6585 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6586 to maintain proper indentation when printing pointers/refs.
6587
e5014227
JB
65882017-09-07 Joel Brobecker <brobecker@adacore.com>
6589
6590 GDB 8.0.1 released.
6591
63c99141
JB
65922017-09-07 Joel Brobecker <brobecker@adacore.com>
6593
6594 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6595
69c1e056
TT
65962017-09-05 Tom Tromey <tom@tromey.com>
6597
6598 * parse.c (funcall_chain): Now a std::vector.
6599 (start_arglist, end_arglist): Simplify.
6600 (free_funcalls): Remove.
6601 (parse_exp_in_context_1): Remove cleanup.
6602
fef704bf
TT
66032017-09-05 Tom Tromey <tom@tromey.com>
6604
6605 * go-exp.y (go_parse): Don't create a cleanup.
6606
5613c585
TT
66072017-09-05 Tom Tromey <tom@tromey.com>
6608
6609 * d-exp.y (PrimaryExpression): Use std::string.
6610 (d_parse): Don't create a cleanup.
6611
eae49211
TT
66122017-09-05 Tom Tromey <tom@tromey.com>
6613
6614 * utils.c (do_clear_parser_state): Remove.
6615 (make_cleanup_clear_parser_state): Remove.
6616 * p-exp.y (pascal_parse): Use scoped_restore.
6617 * m2-exp.y (m2_parse): Use scoped_restore.
6618 * f-exp.y (f_parse): Use scoped_restore.
6619 * d-exp.y (d_parse): Use scoped_restore.
6620 * c-exp.y (c_parse): Use scoped_restore.
6621 * ada-exp.y (ada_parse): Use scoped_restore.
6622 * utils.h (make_cleanup_clear_parser_state): Remove.
6623
73b9be8b
KS
66242017-09-06 Keith Seitz <keiths@redhat.com>
6625
6626 * dwarf2read.c (dw2_linkage_name_attr): New function.
6627 (dw2_linkage_name): New function.
6628 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6629 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6630 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6631
a102602b
KR
66322017-09-06 Kamil Rytarowski <n54@gmx.com>
6633
6634 * config/djgpp/djconfig.sh: Correct shell portability issue.
6635
28ad437d
KR
66362017-09-06 Kamil Rytarowski <n54@gmx.com>
6637
6638 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6639
351787dd
JB
66402017-09-06 John Baldwin <jhb@FreeBSD.org>
6641
6642 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6643 * NEWS: Mention new FreeBSD/mips native configuration.
6644 * configure.host: Add aarch64*-*-freebsd*.
6645 * configure.nat: Likewise.
6646 * aarch64-fbsd-nat.c: New file.
6647
c0f84956
JB
66482017-09-06 John Baldwin <jhb@FreeBSD.org>
6649
6650 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6651 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6652 * NEWS: Mention new FreeBSD/aarch64 target.
6653 * configure.tgt: Add aarch64*-*-freebsd*.
6654 * aarch64-fbsd-tdep.c: New file.
6655 * aarch64-fbsd-tdep.h: New file.
6656
7610297a
KR
66572017-09-06 Kamil Rytarowski <n54@gmx.com>
6658
6659 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6660
fbd1b771
JK
66612017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6662
6663 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6664 of TLS symbols.
6665
5ca79eae
PW
66662017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6667
6668 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6669 call.
6670
bf93d7ba
SM
66712017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6672
6673 * infrun.c (follow_exec): Call add_thread after
6674 target_find_description.
6675
1bb7c059
SM
66762017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6677
6678 * infrun.c (handle_inferior_event_1): When exec'ing, read
6679 stop_pc after follow_exec.
6680
fc809827
SM
66812017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6682
6683 * remote.c (process_g_packet): Update error message.
6684
d2fcdd85
YQ
66852017-09-05 Yao Qi <yao.qi@linaro.org>
6686
6687 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6688 targets.
6689
e69570ee
PA
66902017-09-05 Pedro Alves <palves@redhat.com>
6691
6692 * eval.c (eval_call, evaluate_funcall): New functions, factored
6693 out from ...
6694 (evaluate_subexp_standard): ... this.
6695
22916b07
YQ
66962017-09-05 Yao Qi <yao.qi@linaro.org>
6697
6698 * amd64-tdep.c (amd64_target_description): Create target
6699 descriptions.
6700 (_initialize_amd64_tdep): Don't call functions
6701 initialize_tdesc_amd64_*. Add self tests.
6702 * arch/amd64.c (amd64_create_target_description): Add parameter
6703 is_linux. Call set_tdesc_osabi if is_linux is true.
6704 * arch/amd64.h (amd64_create_target_description): Update the
6705 declaration.
6706 * arch/i386.c (i386_create_target_description): Add parameter
6707 is_linux. Call set_tdesc_osabi if is_linux is true.
6708 * arch/i386.h (i386_create_target_description): Update
6709 declaration.
6710 * configure.tgt: Add i386.o to gdb_target_obs.
6711 * features/Makefile (XMLTOC): Remove i386/*.xml.
6712 * features/i386/amd64-avx-avx512.c: Remove.
6713 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6714 * features/i386/amd64-avx-mpx.c: Remove.
6715 * features/i386/amd64-avx.c: Remove.
6716 * features/i386/amd64-mpx.c: Remove.
6717 * features/i386/amd64.c: Remove.
6718 * features/i386/i386-avx-avx512.c: Remove.
6719 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6720 * features/i386/i386-avx-mpx.c: Remove.
6721 * features/i386/i386-avx.c: Remove.
6722 * features/i386/i386-mmx.c: Remove.
6723 * features/i386/i386-mpx.c: Remove.
6724 * features/i386/i386.c: Remove.
6725 * i386-tdep.c: Don't include features/i386/i386*.c., include
6726 target-descriptions.h and arch/i386.h.
6727 (i386_target_description): Create target descriptions.
6728 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6729 functions. Do self tests.
6730
0854b7b1
YQ
67312017-09-05 Yao Qi <yao.qi@linaro.org>
6732
6733 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6734 * features/i386/amd64-avx-avx512-linux.c: Removed.
6735 * features/i386/amd64-avx-linux.c: Removed.
6736 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6737 * features/i386/amd64-avx-mpx-linux.c: Removed.
6738 * features/i386/amd64-linux.c: Removed.
6739 * features/i386/amd64-mpx-linux.c: Removed.
6740 * features/i386/x32-avx-avx512-linux.c: Removed.
6741 * features/i386/x32-avx-linux.c: Removed.
6742 * features/i386/x32-linux.c: Removed.
6743
b4570e4b
YQ
67442017-09-05 Yao Qi <yao.qi@linaro.org>
6745
6746 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6747 features/i386/*.c.
6748 (amd64_linux_read_description): Call
6749 amd64_create_target_description.
6750 * arch/amd64.c: New file.
6751 * arch/amd64.h: New file.
6752 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6753 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6754
6c73f67f
YQ
67552017-09-05 Yao Qi <yao.qi@linaro.org>
6756
6757 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6758 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6759 (amd64_linux_read_description): Create target descriptions.
6760 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6761 functions. Add unit tests.
6762 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6763 x32-core.xml.
6764 * features/i386/64bit-avx.c: Generated.
6765 * features/i386/64bit-avx512.c: Generated.
6766 * features/i386/64bit-core.c: Generated.
6767 * features/i386/64bit-linux.c: Generated.
6768 * features/i386/64bit-mpx.c: Generated.
6769 * features/i386/64bit-pkeys.c: Generated.
6770 * features/i386/64bit-segments.c: Generated.
6771 * features/i386/64bit-sse.c: Generated.
6772 * features/i386/x32-core.c: Generated.
6773 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6774 c files for amd64-linux and x32-linux.
6775
9d3d478b
YQ
67762017-09-05 Yao Qi <yao.qi@linaro.org>
6777
6778 * amd64-linux-tdep.c (amd64_linux_read_description): New
6779 function.
6780 (amd64_linux_core_read_description): Call
6781 amd64_linux_read_description.
6782 (amd64_linux_init_abi): Likewise.
6783 (amd64_x32_linux_init_abi): Likewise.
6784 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6785 * x86-linux-nat.c (x86_linux_read_description): Call
6786 amd64_linux_read_description.
6787
b9f1d50f
YQ
67882017-09-05 Yao Qi <yao.qi@linaro.org>
6789
6790 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6791 comments.
6792
188c9e6d
YQ
67932017-09-05 Yao Qi <yao.qi@linaro.org>
6794
6795 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6796 * features/i386/i386-avx-avx512-linux.c: Remove.
6797 * features/i386/i386-avx-linux.c: Remove.
6798 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6799 * features/i386/i386-avx-mpx-linux.c: Remove.
6800 * features/i386/i386-linux.c: Remove.
6801 * features/i386/i386-mmx-linux.c: Remove.
6802 * features/i386/i386-mpx-linux.c: Remove.
6803
5f035c07
YQ
68042017-09-05 Yao Qi <yao.qi@linaro.org>
6805
6806 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6807 (SFILES): Add arch/i386.c.
6808 (HFILES_NO_SRCDIR): Add arch/i386.h.
6809 * arch/i386.c: New file.
6810 * arch/i386.h: New file.
6811 * arch/tdesc.h (allocate_target_description): Declare.
6812 (set_tdesc_architecture): Declare.
6813 (set_tdesc_osabi): Declare.
6814 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6815 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6816 include arch/i386.h.
6817 (i386_linux_read_description): Remove code and call
6818 i386_create_target_description.
6819 (set_tdesc_architecture): New function.
6820 (set_tdesc_osabi): New function.
6821 * target-descriptions.h (allocate_target_description): Remove.
6822
0abe8a89
YQ
68232017-09-05 Yao Qi <yao.qi@linaro.org>
6824
6825 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6826 * target-descriptions.c (tdesc_create_feature): Likewise, and
6827 adjust code.
6828 * features/i386/32bit-avx.c: Re-generated.
6829 * features/i386/32bit-avx512.c: Re-generated.
6830 * features/i386/32bit-core.c: Re-generated.
6831 * features/i386/32bit-linux.c: Re-generated.
6832 * features/i386/32bit-mpx.c: Re-generated.
6833 * features/i386/32bit-pkeys.c: Re-generated.
6834 * features/i386/32bit-sse.c: Re-generated.
6835
0a188386
YQ
68362017-09-05 Yao Qi <yao.qi@linaro.org>
6837
6838 * regformats/regdef.h (struct reg): Override operator == and !=.
6839
f49ff000
YQ
68402017-09-05 Yao Qi <yao.qi@linaro.org>
6841
6842 * arch/tdesc.h: New file.
6843 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6844 * target-descriptions.c: Update comments.
6845 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6846 declarations.
6847 * features/i386/32bit-avx.c: Re-generated.
6848 * features/i386/32bit-avx512.c: Re-generated.
6849 * features/i386/32bit-core.c: Re-generated.
6850 * features/i386/32bit-linux.c: Re-generated.
6851 * features/i386/32bit-mpx.c: Re-generated.
6852 * features/i386/32bit-pkeys.c: Re-generated.
6853 * features/i386/32bit-sse.c: Re-generated.
6854
f7000548
YQ
68552017-09-05 Yao Qi <yao.qi@linaro.org>
6856
6857 * regformats/regdat.sh: Update generated code.
6858
c9a5e2a5
YQ
68592017-09-05 Yao Qi <yao.qi@linaro.org>
6860
6861 * regformats/regdat.sh: Adjust code order.
6862
d6b687ac
SM
68632017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6864
6865 * expprint.c (dump_subexp_body_standard): Use constant format
6866 string in fprintf_filtered call.
6867
a379bfd0
JB
68682017-09-04 John Baldwin <jhb@FreeBSD.org>
6869
6870 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6871 NetBSD/i386.
6872 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6873
f7efc967
JB
68742017-09-04 John Baldwin <jhb@FreeBSD.org>
6875
6876 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6877
c49fbc6c
JB
68782017-09-04 John Baldwin <jhb@FreeBSD.org>
6879
6880 * bsd-kvm.o: Define _KMEMUSER.
6881 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6882 * configure: Regenerate.
6883
26562e73
JB
68842017-09-04 John Baldwin <jhb@FreeBSD.org>
6885
6886 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6887 * i386-fbsd-nat.c: Likewise.
6888
31cf1487
JB
68892017-09-04 John Baldwin <jhb@FreeBSD.org>
6890
6891 * unittests/array-view-selftests.c: Add include of <array>.
6892
5b9f8a7c
JB
68932017-09-04 John Baldwin <jhb@FreeBSD.org>
6894
6895 * spu-tdep.c (flush_ea_cache): Add missing argument to
6896 call_function_by_hand.
6897
d69cf9b2
PA
68982017-09-04 Pedro Alves <palves@redhat.com>
6899
6900 * NEWS (Safer support for debugging with no debug info): New.
6901
3693fdb3
PA
69022017-09-04 Pedro Alves <palves@redhat.com>
6903
6904 * c-exp.y (function_method, function_method_void): Add current
6905 instance flags to TYPE_INSTANCE.
6906 * dwarf2read.c (check_modifier): New.
6907 (compute_delayed_physnames): Assert that only C++ adds delayed
6908 physnames. Mark fn_fields as const/volatile depending on
6909 physname.
6910 * eval.c (make_params): New type_instance_flags parameter. Use
6911 it as the new type's instance flags.
6912 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6913 flags element and pass it to make_params.
6914 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6915 instance flags element.
6916 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6917 * gdbtypes.h: Include "enum-flags.h".
6918 (type_instance_flags): New enum-flags type.
6919 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6920 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6921 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6922 (follow_type_instance_flags): New function.
6923 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6924 * parser-defs.h (follow_type_instance_flags): Declare.
6925 * valops.c (value_struct_elt_for_reference): const/volatile must
6926 match too.
6927
e68cb8e0
PA
69282017-09-04 Pedro Alves <palves@redhat.com>
6929
6930 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6931 function/method scopes; lookup the nested name as a function local
6932 static variable.
6933
858be34c
PA
69342017-09-04 Pedro Alves <palves@redhat.com>
6935
6936 (%type <voidval>): Add function_method.
6937 * c-exp.y (exp): New production for calls with no arguments.
6938 (function_method, function_method_void_or_typelist): New
6939 productions.
6940 (exp): New production for "method()::static_var".
6941 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6942 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6943 Handle OP_FUNC_STATIC_VAR.
6944 * parse.c (operator_length_standard):
6945 Handle OP_FUNC_STATIC_VAR.
6946
dd5901a6
PA
69472017-09-04 Pedro Alves <palves@redhat.com>
6948
6949 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6950 handling.
6951 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6952 Ditto.
6953 * parse.c (operator_length_standard, operator_check_standard):
6954 Ditto.
6955 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6956
46a4882b
PA
69572017-09-04 Pedro Alves <palves@redhat.com>
6958
6959 * ax-gdb.c: Include "typeprint.h".
6960 (gen_expr_for_cast): New function.
6961 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6962 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6963 type is unknown.
6964 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6965 nodebug_data_symbol.
6966 * eval.c: Include "typeprint.h".
6967 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6968 Error out if symbol has unknown type.
6969 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6970 evaluate_subexp_for_cast.
6971 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6972 OP_VAR_MSYM_VALUE.
6973 (evaluate_subexp_for_cast): New function.
6974 * gdbtypes.c (init_nodebug_var_type): New function.
6975 (objfile_type): Use it to initialize types of variables with no
6976 debug info.
6977 * typeprint.c (error_unknown_type): New.
6978 * typeprint.h (error_unknown_type): New declaration.
6979 * compile/compile-c-types.c (convert_type_basic): Handle
6980 TYPE_CODE_ERROR; warn and fallback to int for variables with
6981 unknown type.
6982
fe13dfec
PA
69832017-09-04 Pedro Alves <palves@redhat.com>
6984
6985 * eval.c (evaluate_var_value): New function, factored out from ...
6986 (evaluate_subexp_standard): ... here.
6987
d008ee21
PA
69882017-09-04 Pedro Alves <palves@redhat.com>
6989
6990 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6991 Remove useless assignments to 'op'.
6992
827d0c51
PA
69932017-09-04 Pedro Alves <palves@redhat.com>
6994
6995 * eval.c (eval_skip_value): New function.
6996 (evaluate_subexp_standard): Use it.
6997
2c5a2be1
PA
69982017-09-04 Pedro Alves <palves@redhat.com>
6999
7000 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7001 function name from symbol/minsym and pass it to
7002 error_call_unknown_return_type.
7003
74ea4be4
PA
70042017-09-04 Pedro Alves <palves@redhat.com>
7005
7006 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7007 * ax-gdb.c (gen_msym_var_ref): New function.
7008 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7009 * eval.c (evaluate_var_msym_value): New function.
7010 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7011 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7012 to call_function_by_hand.
7013 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7014 Handle OP_VAR_MSYM_VALUE.
7015 (union exp_element) <msymbol>: New field.
7016 * minsyms.h (struct type): Forward declare.
7017 (find_minsym_type_and_address): Declare.
7018 * parse.c (write_exp_elt_msym): New function.
7019 (write_exp_msymbol): Delete, refactored as ...
7020 (find_minsym_type_and_address): ... this new function.
7021 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7022 (operator_length_standard, operator_check_standard): Handle
7023 OP_VAR_MSYM_VALUE.
7024 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7025
7022349d
PA
70262017-09-04 Pedro Alves <palves@redhat.com>
7027
7028 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7029 TYPE_GNU_IFUNC specially here. Throw error if return type is
7030 unknown.
7031 * ada-typeprint.c (print_func_type): Handle functions with unknown
7032 return type.
7033 * c-typeprint.c (c_type_print_base): Handle functions and methods
7034 with unknown return type.
7035 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7036 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7037 * compile/compile-c-types.c: Include "objfiles.h".
7038 (convert_func): For functions with unknown return type, warn and
7039 default to int.
7040 * compile/compile-object-run.c (compile_object_run): Adjust call
7041 to call_function_by_hand_dummy.
7042 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7043 call_function_by_hand.
7044 * eval.c (evaluate_subexp_standard): Adjust calls to
7045 call_function_by_hand. Handle functions and methods with unknown
7046 return type. Pass expect_type to call_function_by_hand.
7047 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7048 return type.
7049 * gcore.c (call_target_sbrk): Adjust call to
7050 call_function_by_hand.
7051 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7052 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7053 an integer address type instead of nodebug.
7054 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7055 call_function_by_hand.
7056 * infcall.c (error_call_unknown_return_type): New function.
7057 (call_function_by_hand): New "default_return_type" parameter.
7058 Pass it down.
7059 (call_function_by_hand_dummy): New "default_return_type"
7060 parameter. Use it instead of defaulting to int. If there's no
7061 default and the return type is unknown, throw an error. If
7062 there's a default return type, and the called function has no
7063 debug info, then assume the function is prototyped.
7064 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7065 New "default_return_type" parameter.
7066 (error_call_unknown_return_type): New declaration.
7067 * linux-fork.c (call_lseek): Cast return type of lseek.
7068 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7069 call_function_by_hand.
7070 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7071 calls to call_function_by_hand.
7072 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7073 return type.
7074 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7075 (value_nsstring, print_object_command): Adjust calls to
7076 call_function_by_hand.
7077 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7078 functions with unknown return type.
7079 (pascal_type_print_func_varspec_suffix): New function.
7080 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7081 TYPE_CODE_METHOD>: Use it.
7082 * python/py-value.c (valpy_call): Adjust call to
7083 call_function_by_hand.
7084 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7085 call_function_by_hand.
7086 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7087 call_function_by_hand.
7088 * valops.c (value_allocate_space_in_inferior): Adjust call to
7089 call_function_by_hand.
7090 * typeprint.c (type_print_unknown_return_type): New function.
7091 * typeprint.h (type_print_unknown_return_type): New declaration.
7092
54990598
PA
70932017-09-04 Pedro Alves <palves@redhat.com>
7094
7095 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7096 types with more than one parameter as prototyped.
7097
9a24775b
PA
70982017-09-04 Pedro Alves <palves@redhat.com>
7099
7100 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7101 (disassemble_command): Use gdb_disassembly_flags instead of bare
7102 int.
7103 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7104 (dump_insns, do_mixed_source_and_assembly_deprecated)
7105 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7106 Use gdb_disassembly_flags instead of bare int.
7107 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7108 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7109 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7110 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7111 (enum gdb_disassembly_flag): ... values of this new enumeration.
7112 (gdb_disassembly_flags): Define.
7113 (gdb_disassembly)
7114 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7115 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7116 gdb_disassembly_flags instead of bare int.
7117 * record-btrace.c (btrace_insn_history)
7118 (record_btrace_insn_history, record_btrace_insn_history_range)
7119 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7120 instead of bare int.
7121 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7122 Use gdb_disassembly_flags instead of bare int.
7123 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7124 Define.
7125 * target-delegates.c: Regenerate.
7126 * target.c (target_insn_history, target_insn_history_from)
7127 (target_insn_history_range): Use gdb_disassembly_flags instead of
7128 bare int.
7129 * target.h: Include "disasm.h".
7130 (struct target_ops) <to_insn_history, to_insn_history_from,
7131 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7132 int.
7133 (target_insn_history, target_insn_history_from)
7134 (target_insn_history_range): Use gdb_disassembly_flags instead of
7135 bare int.
7136
80a65e9b
SM
71372017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7138
7139 * cli/cli-script.c (build_command_line): For if/while commands,
7140 check whether args is empty.
7141
6b66338c
SM
71422017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7143
7144 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7145 (enum command_control_type): Likewise.
7146 (struct command_line): Likewise.
7147 (free_command_lines): Likewise.
7148 (struct command_lines_deleter): Likewise.
7149 (command_line_up): Likewise.
7150 (read_command_lines): Likewise.
7151 (read_command_lines_1): Likewise.
7152 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7153 (enum command_control_type): Likewise.
7154 (struct command_line): Likewise.
7155 (free_command_lines): Likewise.
7156 (struct command_lines_deleter): Likewise.
7157 (command_line_up): Likewise.
7158 (read_command_lines): Likewise.
7159 (read_command_lines_1): Likewise.
7160 * breakpoint.h: Include cli/cli-script.h.
7161 * extension-priv.h: Likewise.
7162 * gdbcmd.h: Likewise.
7163
51abb421
PA
71642017-09-04 Pedro Alves <palves@redhat.com>
7165
7166 * ada-lang.c (is_known_support_routine): Move sal declaration to
7167 where it is initialized.
7168 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7169 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7170 (clear_command, update_static_tracepoint): Remove init_sal
7171 references. Move declarations closer to initializations.
7172 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7173 initializations.
7174 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7175 references. Move sal declarations closer to initializations.
7176 * frame.c (find_frame_sal): Return a symtab_and_line via function
7177 return instead of output parameter. Remove init_sal references.
7178 * frame.h (find_frame_sal): Return a symtab_and_line via function
7179 return instead of output parameter.
7180 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7181 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7182 instead of memset.
7183 (gdbscm_find_pc_line): Remove init_sal reference.
7184 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7185 references. Move declarations closer to initializations.
7186 * infcmd.c (set_step_frame): Update. Move declarations closer to
7187 initializations.
7188 (finish_backward): Remove init_sal references. Move declarations
7189 closer to initializations.
7190 * infrun.c (process_event_stop_test, handle_step_into_function)
7191 (insert_hp_step_resume_breakpoint_at_frame)
7192 (insert_step_resume_breakpoint_at_caller): Likewise.
7193 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7194 (symbol_to_sal): Likewise.
7195 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7196 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7197 to its initialization.
7198 * reverse.c (save_bookmark_command): Use new/delete. Remove
7199 init_sal references. Move declarations closer to initializations.
7200 * source.c (get_current_source_symtab_and_line): Remove brace
7201 initialization.
7202 (set_current_source_symtab_and_line): Now takes the sal by const
7203 reference. Remove brace initialization.
7204 (line_info): Remove init_sal reference.
7205 * source.h (set_current_source_symtab_and_line): Now takes a
7206 symtab_and_line via const reference.
7207 * stack.c (set_current_sal_from_frame): Adjust.
7208 (print_frame_info): Adjust.
7209 (get_last_displayed_sal): Return the sal via function return
7210 instead of via output parameter. Simplify.
7211 (frame_info): Adjust.
7212 * stack.h (get_last_displayed_sal): Return the sal via function
7213 return instead of via output parameter.
7214 * symtab.c (init_sal): Delete.
7215 (find_pc_sect_line): Remove init_sal references. Move
7216 declarations closer to initializations.
7217 (find_function_start_sal): Remove init_sal references. Move
7218 declarations closer to initializations.
7219 * symtab.h (struct symtab_and_line): In-class initialize all
7220 fields.
7221 * tracepoint.c (set_traceframe_context)
7222 (print_one_static_tracepoint_marker): Remove init_sal references.
7223 Move declarations closer to initializations.
7224 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7225 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7226 declarations closer to initializations.
7227 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7228 init_sal references. Adjust.
7229
6c5b2ebe
PA
72302017-09-04 Pedro Alves <palves@redhat.com>
7231
7232 * ax-gdb.c (agent_command_1): Use range-for.
7233 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7234 * breakpoint.c: Include "common/array-view.h".
7235 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7236 parameter from struct symtabs_and_lines to
7237 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7238 (breakpoint_sals_to_pc): Change sals parameter from struct
7239 symtabs_and_lines to std::vector reference.
7240 (check_fast_tracepoint_sals): Change sals parameter from struct
7241 symtabs_and_lines to std::array_view. Use range-for.
7242 (decode_static_tracepoint_spec): Return a std::vector instead of
7243 symtabs_and_lines. Update.
7244 (create_breakpoint): Update.
7245 (break_range_command, until_break_command, clear_command): Update.
7246 (base_breakpoint_decode_location, bkpt_decode_location)
7247 (bkpt_probe_create_sals_from_location)
7248 (bkpt_probe_decode_location, tracepoint_decode_location)
7249 (tracepoint_probe_decode_location)
7250 (strace_marker_create_sals_from_location): Return a std::vector
7251 instead of symtabs_and_lines.
7252 (strace_marker_create_breakpoints_sal): Update.
7253 (strace_marker_decode_location): Return a std::vector instead of
7254 symtabs_and_lines. Update.
7255 (update_breakpoint_locations): Change struct symtabs_and_lines
7256 parameters to gdb::array_view. Adjust.
7257 (location_to_sals): Return a std::vector instead of
7258 symtabs_and_lines. Update.
7259 (breakpoint_re_set_default): Use std::vector instead of struct
7260 symtabs_and_lines.
7261 (decode_location_default): Return a std::vector instead of
7262 symtabs_and_lines. Update.
7263 * breakpoint.h: Include "common/array-view.h".
7264 (struct breakpoint_ops) <decode_location>: Now returns a
7265 std::vector instead of returning a symtabs_and_lines via output
7266 parameter.
7267 (update_breakpoint_locations): Change sals parameters to use
7268 gdb::array_view.
7269 * cli/cli-cmds.c (edit_command, list_command): Update to use
7270 std::vector and gdb::array_view.
7271 (ambiguous_line_spec): Adjust to use gdb::array_view and
7272 range-for.
7273 (compare_symtabs): Rename to ...
7274 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7275 const reference and adjust.
7276 (filter_sals): Rewrite using std::vector and standard algorithms.
7277 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7278 (jump_command): Update to use std::vector.
7279 * linespec.c (struct linespec_state) <canonical_names>: Update
7280 comment.
7281 (add_sal_to_sals_basic): Delete.
7282 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7283 (decode_line_2, create_sals_line_offset)
7284 (convert_address_location_to_sals, convert_linespec_to_sals)
7285 (convert_explicit_location_to_sals, parse_linespec)
7286 (event_location_to_sals, decode_line_full, decode_line_1)
7287 (decode_line_with_current_source)
7288 (decode_line_with_last_displayed, decode_objc)
7289 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7290 (linespec_result::~linespec_result): Adjust to use std::vector
7291 instead of symtabs_and_lines.
7292 * linespec.h (linespec_sals::sals): Now a std::vector.
7293 (struct linespec_result): Use std::vector, bool, and in-class
7294 initialization.
7295 (decode_line_1, decode_line_with_current_source)
7296 (decode_line_with_last_displayed): Return std::vector.
7297 * macrocmd.c (info_macros_command): Use std::vector.
7298 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7299 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7300 std::vector.
7301 * probe.h (parse_probes): Return a std::vector.
7302 * python/python.c (gdbpy_decode_line): Use std::vector and
7303 gdb::array_view.
7304 * source.c (select_source_symtab, line_info): Use std::vector.
7305 * stack.c (func_command): Use std::vector.
7306 * symtab.h (struct symtabs_and_lines): Delete.
7307 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7308
7c44b49c
PA
73092017-09-04 Pedro Alves <palves@redhat.com>
7310
7311 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7312 unittests/array-view-selftests.c.
7313 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7314 * common/array-view.h: New file.
7315 * unittests/array-view-selftests.c: New file.
7316
e439fa14
PA
73172017-09-04 Pedro Alves <palves@redhat.com>
7318
7319 * cli/cli-cmds.c (edit_command): Pass message to
7320 ambiguous_line_spec.
7321 (list_command): Pass message to ambiguous_line_spec. Say
7322 "first"/"last" instead of "start" and "end" to be consistent with
7323 the manual.
7324 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7325 them to print formatted message.
7326
7525b645
PA
73272017-09-04 Pedro Alves <palves@redhat.com>
7328
7329 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7330 ftrace_update_insns by reference instead of pointer.
7331
badc0020
YQ
73322017-09-04 Yao Qi <yao.qi@linaro.org>
7333
7334 * i386-go32-tdep.c: Include x86-xstate.h.
7335 (i386_go32_init_abi): Call i386_target_description.
7336 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7337 if xcr0 is X86_XSTATE_X87_MASK.
7338 * i386-tdep.h (tdesc_i386): Remove the declaration.
7339 (tdesc_i386_mmx): Likewise.
7340
d78bdb54
YQ
73412017-09-04 Yao Qi <yao.qi@linaro.org>
7342
7343 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7344 X86_XSTATE_SSE_MASK instead of 0.
7345
ca1fa5ee
YQ
73462017-09-04 Yao Qi <yao.qi@linaro.org>
7347
7348 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7349 i386_target_description.
7350 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7351 i386_target_description.
7352 * i386-tdep.c (i386_gdbarch_init): Likewise.
7353
2434b019
YQ
73542017-09-04 Yao Qi <yao.qi@linaro.org>
7355
7356 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7357 (x86_darwin_init_abi_64): Call amd64_target_description.
7358 * amd64-dicos-tdep.c: Likewise.
7359 * amd64-fbsd-nat.c: Likewise.
7360 * amd64-fbsd-tdep.c: Likewise.
7361 * amd64-nbsd-tdep.c: Likewise.
7362 * amd64-obsd-tdep.c: Likewise.
7363 * amd64-sol2-tdep.c: Likewise.
7364 * amd64-windows-tdep.c: Likewise.
7365 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7366
0860c437
SM
73672017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7368
7369 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7370 (btrace_function) <insn>: Change type to use std::vector.
7371 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7372 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7373 ftrace_update_insns, ftrace_compute_global_level_offset,
7374 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7375 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7376 change to std::vector.
7377 (ftrace_update_insns): Adjust to change to std::vector, change
7378 type of INSN parameter.
7379 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7380 * record-btrace.c (btrace_call_history_insn_range,
7381 btrace_compute_src_line_range,
7382 record_btrace_frame_prev_register): Adjust to change to
7383 std::vector.
7384 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7385 to change to std::vector.
7386
0638b7f9
TT
73872017-09-03 Tom Tromey <tom@tromey.com>
7388
7389 * corefile.c (reopen_exec_file): Use std::string.
7390
8f84fb0e
TT
73912017-09-03 Tom Tromey <tom@tromey.com>
7392
7393 * compile/compile.c (compile_register_name_mangled): Return
7394 std::string.
7395 * compile/compile-loc2c.c (pushf_register_address): Update.
7396 (pushf_register): Update.
7397 * compile/compile-c-types.c (convert_array): Update.
7398 * compile/compile-c-symbols.c (generate_vla_size): Update.
7399 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7400 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7401 (convert_one_symbol): Update.
7402 (generate_c_for_for_one_variable): Update.
7403 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7404 std::string.
7405 (generate_register_struct): Update.
7406 * compile/compile-internal.h (c_get_range_decl_name): Return a
7407 std::string.
7408 (compile_register_name_mangled): Return std::string.
7409
18e9961f
TT
74102017-09-03 Tom Tromey <tom@tromey.com>
7411
7412 * utils.c (perror_string): Return a std::string.
7413 (throw_perror_with_name, perror_warning_with_name): Update.
7414
45343786
TT
74152017-09-03 Tom Tromey <tom@tromey.com>
7416
7417 * demangle.c (demangle_command): Use std::string,
7418 unique_xmalloc_ptr.
7419
b57af503
TT
74202017-09-03 Tom Tromey <tom@tromey.com>
7421
7422 * cli/cli-setshow.c (do_set_command): Use std::string.
7423
6eecf35f
TT
74242017-09-03 Tom Tromey <tom@tromey.com>
7425
7426 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7427
56496dd4
TT
74282017-09-03 Tom Tromey <tom@tromey.com>
7429
7430 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7431
e91a1fa7
TT
74322017-09-03 Tom Tromey <tom@tromey.com>
7433
7434 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7435 gdb::unique_xmalloc_ptr.
7436
7ffd83d7
TT
74372017-09-03 Tom Tromey <tom@tromey.com>
7438
7439 * thread.c (print_thread_info_1): Use string_printf.
7440 (thread_apply_command, thread_apply_all_command): Use
7441 std::string.
7442
1ccbe998
TT
74432017-09-03 Tom Tromey <tom@tromey.com>
7444
7445 * valprint.c (val_print_string): Update.
7446 * gdbcore.h (memory_error_message): Return std::string.
7447 * corefile.c (memory_error_message): Return std::string.
7448 (memory_error): Update.
7449 * breakpoint.c (insert_bp_location): Update.
7450
23fdd69e
SM
74512017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7452
7453 * target/waitstatus.h (target_waitstatus_to_string): Change
7454 return type to std::string.
7455 * target/waitstatus.c (target_waitstatus_to_string): Return
7456 std::string.
7457 * target.h (target_waitstatus_to_string): Remove declaration.
7458 * infrun.c (resume, clear_proceed_status_thread,
7459 print_target_wait_results, do_target_wait, save_waitstatus,
7460 stop_all_threads): Adjust.
7461 * record-btrace.c (record_btrace_wait): Adjust.
7462 * target-debug.h
7463 (target_debug_print_struct_target_waitstatus_p): Adjust.
7464
5c811d30
JK
74652017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7466
7467 PR gdb/22046
7468 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7469 detection.
7470
0a2dde4a
SDJ
74712017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7472
7473 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7474 for setting/unsetting environment variables on the remote target.
7475 (New remote packets): Add entries for QEnvironmentHexEncoded,
7476 QEnvironmentUnset and QEnvironmentReset.
7477 * common/environ.c (gdb_environ::operator=): Extend method to
7478 handle m_user_set_env_list and m_user_unset_env_list.
7479 (gdb_environ::clear): Likewise.
7480 (match_var_in_string): Change type of first parameter from 'char
7481 *' to 'const char *'.
7482 (gdb_environ::set): Extend method to handle
7483 m_user_set_env_list and m_user_unset_env_list.
7484 (gdb_environ::unset): Likewise.
7485 (gdb_environ::clear_user_set_env): New method.
7486 (gdb_environ::user_set_envp): Likewise.
7487 (gdb_environ::user_unset_envp): Likewise.
7488 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7489 m_user_unset_env_list on move constructor/assignment.
7490 (unset): Add new default parameter 'update_unset_list = true'.
7491 (clear_user_set_env): New method.
7492 (user_set_envp): Likewise.
7493 (user_unset_envp): Likewise.
7494 (m_user_set_env_list): New std::set.
7495 (m_user_unset_env_list): Likewise.
7496 * common/rsp-low.c (hex2str): New function.
7497 (bin2hex): New overload for bin2hex function.
7498 * common/rsp-low.c (hex2str): New prototype.
7499 (str2hex): New overload prototype.
7500 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7501 QEnvironmentUnset and QEnvironmentReset.
7502 (remote_protocol_features): Add QEnvironmentHexEncoded,
7503 QEnvironmentUnset and QEnvironmentReset packets.
7504 (send_environment_packet): New function.
7505 (extended_remote_environment_support): Likewise.
7506 (extended_remote_create_inferior): Call
7507 extended_remote_environment_support.
7508 (_initialize_remote): Add QEnvironmentHexEncoded,
7509 QEnvironmentUnset and QEnvironmentReset packet configs.
7510 * unittests/environ-selftests.c (gdb_selftest_env_var):
7511 New variable.
7512 (test_vector_initialization): New function.
7513 (test_init_from_host_environ): Likewise.
7514 (test_reinit_from_host_environ): Likewise.
7515 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7516 Likewise.
7517 (test_unset_set_empty_vector): Likewise.
7518 (test_vector_clear): Likewise.
7519 (test_std_move): Likewise.
7520 (test_move_constructor):
7521 (test_self_move): Likewise.
7522 (test_set_unset_reset): Likewise.
7523 (run_tests): Rewrite in terms of the functions above.
7524
654670a4
WP
75252017-08-31 Weimin Pan <weimin.pan@oracle.com>
7526
7527 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7528 (adi_available): Use a temp variable of type CORE_ADDR as argument
7529 3 when calling target_auxv_search.
7530 (adi_normalize_address): Use masks and xor operators to calculate
7531 normalized address.
7532 (adi_read_versions, adi_write_versions, adi_print_versions)
7533 (do_examine, do_assign): Use paddress.
7534
7755ddb7
JB
75352017-08-29 John Baldwin <jhb@FreeBSD.org>
7536
7537 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7538 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7539 out of loop and add supply of FIR.
7540 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7541 add collect of FIR.
7542
fd437cbc
SM
75432017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7544
3804a343 7545 PR gdb/21827
fd437cbc
SM
7546 * cli/cli-script.c (define_command): Don't convert command name
7547 to lower case.
7548
988f6b3d
JB
75492017-08-25 Joel Brobecker <brobecker@adacore.com>
7550
7551 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7552 Update all callers accordingly. Remove all code blocks handling
7553 the case where DISPP is not NULL.
7554
663c44ac
JK
75552017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7556
7557 PR symtab/22003
7558 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7559 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7560 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7561
f1902523
JK
75622017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7563
7564 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7565 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7566 (read_comp_units_from_section): New parameter abbrev_section, use
7567 read_and_check_comp_unit_head, allocate signatured_type if needed.
7568 (create_all_comp_units): Update read_comp_units_from_section caller.
7569
87215ad1
SDJ
75702017-08-23 Pedro Alves <palves@redhat.com>
7571
7572 PR remote/21852
7573 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7574 to null_ptid and switch to thread without reading the registers
7575 after adding the inferior.
7576
6e41ddec
JK
75772017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7578
7579 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7580 compile-gcc.
7581 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7582 (compile_to_object): Implement compile_gcc.
7583 (_initialize_compile): Install "set compile-gcc". Initialize
7584 compile_gcc.
7585
e68c32d5
JK
75862017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7587
7588 * compile/compile.c (compile_to_object): Conditionally call
7589 set_verbose. Conditionally call compile or compile_v0.
7590
58afddc6
WP
75912017-08-07 Weimin Pan <weimin.pan@oracle.com>
7592
7593 * sparc64-tdep.h: (adi_normalize_address): New export.
7594 * sparc-nat.h: (open_adi_tag_fd): New export.
7595 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7596 * sparc64-linux-tdep.c:
7597 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7598 (sparc64_linux_handle_segmentation_fault): New function.
7599 (sparc64_linux_init_abi): Register
7600 sparc64_linux_handle_segmentation_fault
7601 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7602 (sparc64_addr_bits_remove): New function.
7603 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7604 (MAX_PROC_NAME_SIZE): New macro.
7605 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7606 (sparc64adilist): New variable.
7607 (adi_proc_list): New variable.
7608 (find_adi_info): New function.
7609 (add_adi_info): New function.
7610 (get_adi_info_proc): New function.
7611 (get_adi_info): New function.
7612 (info_adi_command): New function.
7613 (read_maps_entry): New function.
7614 (adi_available): New function.
7615 (adi_normalize_address): New function.
7616 (adi_align_address): New function.
7617 (adi_convert_byte_count): New function.
7618 (adi_tag_fd): New function.
7619 (adi_is_addr_mapped): New function.
7620 (adi_read_versions): New function.
7621 (adi_write_versions): New function.
7622 (adi_print_versions): New function.
7623 (do_examine): New function.
7624 (do_assign): New function.
7625 (adi_examine_command): New function.
7626 (adi_assign_command): New function.
7627 (_initialize_sparc64_adi_tdep): New function.
7628
11db9430
SM
76292017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7630
7631 * breakpoint.c (breakpoints_info): Rename to ...
7632 (info_breakpoints_command): ... this.
7633 (watchpoints_info): Rename to ...
7634 (info_watchpoints_command): ... this.
7635 (tracepoints_info): Rename to ...
7636 (info_tracepoints_command): ... this.
7637 (_initialize_breakpoint): Adjust.
7638 * dcache.c (dcache_info): Rename to ...
7639 (info_display_command): ... this.
7640 (_initialize_dcache): Adjust.
7641 * frame.h (args_info): Rename to ...
7642 (info_args_command): ... this.
7643 (locals_info): Rename to ...
7644 (info_locals_command): ... this.
7645 * infcmd.c (nofp_registers_info): Rename to ...
7646 (info_registers_command): ... this.
7647 (float_info): Rename to ...
7648 (info_float_command): ... this.
7649 (program_info): Rename to ...
7650 (info_program_command): ... this.
7651 (all_registers_info): Rename to ...
7652 (info_all_registers_command): ... this.
7653 (vector_info): Rename to ...
7654 (info_vector_command): ... this.
7655 (float_info): Rename to ...
7656 (info_float_command): ... this.
7657 (_initialize_infcmd): Adjust.
7658 * inferior.h (term_info): Rename to ...
7659 (info_terminal_command): ... this.
7660 * inflow.c (term_info): Rename to ...
7661 (info_terminal_command): ... this.
7662 (_initialize_inflow): Adjust.
7663 * infrun.c (signals_info): Rename to ...
7664 (info_signals_command): ... this.
7665 (_initialize_infrun): Adjust.
7666 * objc-lang.c (classes_info): Rename to ...
7667 (info_classes_command): ... this.
7668 (selectors_info): Rename to ...
7669 (info_selectors_command): ... this.
7670 (_initialize_objc_language): Adjust.
7671 * printcmd.c (sym_info): Rename to ...
7672 (info_symbol_command): ... this.
7673 (address_info): Rename to ...
7674 (info_address_command): ... this.
7675 (display_info): Rename to ...
7676 (info_display_command): ... this.
7677 (_initialize_printcmd): Adjust.
7678 * reverse.c (bookmarks_info): Rename to ...
7679 (info_breakpoints_command): ... this.
7680 (_initialize_reverse): Adjust.
7681 * ser-go32.c (dos_info): Rename to ...
7682 (info_serial_command): ... this.
7683 (_initialize_ser_dos): Adjust.
7684 * skip.c (skip_info): Rename to ...
7685 (info_skip_command): ... this.
7686 (_initialize_step_skip): Adjust.
7687 * source.c (line_info): Rename to ...
7688 (info_line_command): ... this.
7689 (source_info): Rename to ...
7690 (info_source_command)
7691 * stack.c (frame_info): Rename to ...
7692 (info_frame_command): ... this.
7693 (locals_info): Rename to ...
7694 (info_locals_command): ... this.
7695 (args_info): Rename to ...
7696 (info_args_command): ... this.
7697 (_initialize_stack): Adjust.
7698 * symtab.c (sources_info): Rename to ...
7699 (info_sources_command): ... this.
7700 (variables_info): Rename to ...
7701 (info_variables_command): ... this.
7702 (functions_info): Rename to ...
7703 (info_functions_command): ... this.
7704 (types_info): Rename to ...
7705 (info_types_command): ... this.
7706 (_initialize_symtab): Adjust.
7707 * target.c (target_info): Rename to ...
7708 (info_target_command): ... this.
7709 (initialize_targets): Adjust.
7710 * tracepoint.c (tvariables_info): Rename to ...
7711 (info_tvariables_command): ... this.
7712 (scope_info): Rename to ...
7713 (info_scope_command): ... this.
7714 (trace_dump_actions): Adjust.
7715 (_initialize_tracepoint): Adjust.
7716
b270e6f9
TT
77172017-08-22 Tom Tromey <tom@tromey.com>
7718
7719 * breakpoint.h (install_breakpoint): Update.
7720 * breakpoint.c (add_solib_catchpoint): Update.
7721 (install_breakpoint): Change argument to a std::unique_ptr.
7722 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7723 (create_breakpoint_sal, create_breakpoint): Update.
7724 (watch_command_1, catch_exec_command_1)
7725 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7726 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7727 Return the breakpoint.
7728 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7729 (new_single_step_breakpoint): Update.
7730 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7731 std::unique_ptr.
7732 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7733 std::unique_ptr.
7734 * break-catch-sig.c (create_signal_catchpoint): Use
7735 std::unique_ptr.
7736 * ada-lang.c (create_ada_exception_catchpoint): Use
7737 std::unique_ptr.
7738
36bd8eaa
TT
77392017-08-22 Tom Tromey <tom@tromey.com>
7740
7741 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7742
56f37645
TT
77432017-08-22 Tom Tromey <tom@tromey.com>
7744
7745 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7746 (lookup_partial_symbol): Update.
7747
0b581c69
TT
77482017-08-22 Tom Tromey <tom@tromey.com>
7749
7750 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7751 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7752 (find_and_open_source, symtab_to_fullname): Update.
7753 * psymtab.c (psymtab_to_fullname): Update.
7754
14278e1f
TT
77552017-08-22 Tom Tromey <tom@tromey.com>
7756
7757 * exec.c (exec_file_attach): Update.
7758 * linux-thread-db.c (try_thread_db_load): Update.
7759 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7760 * utils.c (gdb_realpath): Change return type.
7761 (gdb_realpath_keepfile): Update.
7762 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7763 (_initialize_utils): Register the new self test.
7764 * source.c (openp): Update.
7765 (find_and_open_source): Update.
7766 * nto-tdep.c (nto_find_and_open_solib): Update.
7767 * main.c (set_gdb_data_directory): Update.
7768 (captured_main_1): Update.
7769 * dwarf2read.c (dwarf2_get_dwz_file): Update
7770 (dw2_map_symbol_filenames): Update.
7771 * auto-load.c (auto_load_safe_path_vec_update): Update.
7772 (filename_is_in_auto_load_safe_path_vec): Change type of
7773 "filename_realp".
7774 (auto_load_objfile_script): Update.
7775 (file_is_auto_load_safe): Update. Use std::string.
7776 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7777
4971c9a7
TT
77782017-08-22 Tom Tromey <tom@tromey.com>
7779
7780 * utils.c (gdb_realpath_keepfile): Return a
7781 gdb::unique_xmalloc_ptr.
7782 * exec.c (exec_file_attach): Update.
7783 * utils.h (gdb_realpath_keepfile): Return a
7784 gdb::unique_xmalloc_ptr.
7785
e3e41d58
TT
77862017-08-22 Tom Tromey <tom@tromey.com>
7787
7788 * compile/compile.c (compile_file_command): Use
7789 gdb::unique_xmalloc_ptr, std::string.
7790 * utils.c (gdb_abspath): Change return type.
7791 * source.c (openp): Update.
7792 * objfiles.c (allocate_objfile): Update.
7793 * main.c (set_gdb_data_directory): Update.
7794 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7795
0d999a6e
ZZ
77962017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7797
7798 * cli-cmds.c (list_commands): List actual code around more than
7799 one location.
7800
329d5e7e
JB
78012017-08-21 John Baldwin <jhb@FreeBSD.org>
7802
7803 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7804
bf223d3e
PA
78052017-08-21 Pedro Alves <palves@redhat.com>
7806
7807 PR gdb/19487
7808 * c-exp.y (variable production): Handle function aliases.
7809 * minsyms.c (msymbol_is_text): New function.
7810 * minsyms.h (msymbol_is_text): Declare.
7811 * symtab.c (find_function_alias_target): New function.
7812 * symtab.h (find_function_alias_target): Declare.
7813
c973d0aa
PA
78142017-08-21 Pedro Alves <palves@redhat.com>
7815
7816 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7817 typedefs.
7818 * typeprint.c (whatis_exp): If handling "whatis", and expression
7819 is OP_TYPE, strip one typedef level. Otherwise don't strip
7820 typedefs here.
7821 * valops.c (value_cast): Save "to" type before resolving
7822 stubs/typedefs. Use that type as resulting value's type.
7823
2989a365
TT
78242017-08-18 Tom Tromey <tom@tromey.com>
7825 Pedro Alves <palves@redhat.com>
7826
7827 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7828 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7829 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7830 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7831 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7832 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7833 (linux_get_siginfo_data): Add "thread" argument. Use
7834 scoped_restore.
7835 * linux-nat.c (linux_child_follow_fork)
7836 (check_stopped_by_watchpoint): Use scoped_restore.
7837 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7838 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7839 (restore_inferior_ptid, save_inferior_ptid): Remove.
7840 * btrace.c (btrace_fetch): Use scoped_restore.
7841 * bsd-uthread.c (bsd_uthread_fetch_registers)
7842 (bsd_uthread_store_registers): Use scoped_restore.
7843 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7844 scoped_restore.
7845 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7846 (aix_thread_xfer_partial): Use scoped_restore.
7847 * inferior.h (save_inferior_ptid): Remove.
7848
e60eb288
YQ
78492017-08-18 Yao Qi <yao.qi@linaro.org>
7850
7851 PR tdep/21818
7852 * arm-tdep.c (gdb_print_insn_arm): Mark
7853 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7854
6d580b63
YQ
78552017-08-18 Yao Qi <yao.qi@linaro.org>
7856
7857 * NEWS: Mention GDBserver's new option "--selftest".
7858 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7859 * selftest.c: Move it to common/selftest.c.
7860 * selftest.h: Move it to common/selftest.h.
7861 * selftest-arch.c (reset): New function.
7862 (tests_with_arch): Call reset.
7863
86dcbf50
YQ
78642017-08-18 Yao Qi <yao.qi@linaro.org>
7865
7866 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7867 instead of exception_fprintf and printf_filtered.
7868
7649770c
YQ
78692017-08-18 Yao Qi <yao.qi@linaro.org>
7870
7871 * selftest.c (register_self_test): Rename it to
7872 selftests::register_test.
7873 (run_self_tests): selftest::run_tests.
7874 * selftest.h: Update declarations.
7875 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7876 selftests::register_test_foreach_arch.
7877 * selftest-arch.h: Update declaration.
7878 * aarch64-tdep.c: Update.
7879 * arm-tdep.c: Likewise.
7880 * disasm-selftests.c: Likewise.
7881 * dwarf2loc.c: Likewise.
7882 * dwarf2-frame.c: Likewise.
7883 * findvar.c: Likewise.
7884 * gdbarch-selftests.c: Likewise.
7885 * maint.c (maintenance_selftest): Likewise.
7886 * regcache.c: Likewise.
7887 * rust-exp.y: Likewise.
7888 * selftest-arch.c: Likewise.
7889 * unittests/environ-selftests.c: Likewise.
7890 * unittests/function-view-selftests.c: Likewise.
7891 * unittests/offset-type-selftests.c: Likewise.
7892 * unittests/optional-selftests.c: Likewise.
7893 * unittests/scoped_restore-selftests.c: Likewise.
7894 * utils-selftests.c: Likewise.
7895
b0cba12e
PA
78962017-08-17 Pedro Alves <palves@redhat.com>
7897
7898 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7899 local.
7900
4c8aa72d
PA
79012017-08-17 Pedro Alves <palves@redhat.com>
7902
7903 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7904 field.
7905 (reset_die_in_process): Delete, replaced by ...
7906 (process_die_scope): ... this new class. Make it responsible for
7907 freeing cu->line_header too.
7908 (process_die): Use process_die_scope.
7909 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7910 cu->line_header_die_owner. Don't release the line header if it's
7911 owned by the CU.
7912 (setup_type_unit_groups): Make the CU/DIE own the line header.
7913 Don't release the line header here.
7914
ba713918
AL
79152017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7916
7917 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7918
44d0fb3a
RK
79192017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7920
7921 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7922 Single-Key mode
7923
a5afdb16
RK
79242017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7925
7926 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7927 mode command list.
7928
47613aeb
SH
79292017-08-15 Stafford Horne <shorne@gmail.com>
7930
7931 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7932
9c3cc999
SH
79332017-08-15 Stafford Horne <shorne@gmail.com>
7934
7935 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7936
206726fb
SDJ
79372017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7938
7939 PR gdb/21954
7940 * infcmd.c (unset_environment_command): Use the 'clear' method on
7941 the environment instead of resetting it.
7942
0335ac6d
JB
79432017-08-15 John Baldwin <jhb@FreeBSD.org>
7944
7945 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7946 platforms.
7947
d3abe1c8
TT
79482017-08-14 Tom Tromey <tom@tromey.com>
7949
7950 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7951 (print_binary_chars): Likewise.
7952 (BITS_IN_BYTES): Remove.
7953
d6382fff
TT
79542017-08-14 Tom Tromey <tom@tromey.com>
7955
7956 PR gdb/21675
7957 * valprint.c (LOW_ZERO): Change value to 034.
7958 (print_octal_chars): Add static_asserts for octal constants.
7959 * printcmd.c (print_scalar_formatted): Add 'd' case.
7960
f978cb06
TT
79612017-08-11 Tom Tromey <tom@tromey.com>
7962
7963 * symfile.c (add_symbol_file_command): Use std::vector.
7964
2f5404b3
TT
79652017-08-14 Tom Tromey <tom@tromey.com>
7966
7967 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7968 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7969 std::move.
7970 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7971
de7985c3
PA
79722017-08-11 Pedro Alves <palves@redhat.com>
7973
7974 * infrun.c (process_event_stop_test): Adjust
7975 function_name_is_marked_for_skip call.
7976 * skip.c: Include <list>.
7977 (skiplist_entry): Make it a class with private fields, and
7978 getters/setters.
7979 (skiplist_entry_chain): Delete.
7980 (skiplist_entries): New.
7981 (skiplist_entry_count): Delete.
7982 (highest_skiplist_entry_num): New.
7983 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7984 (add_skiplist_entry): Delete.
7985 (skiplist_entry::skiplist_entry): New.
7986 (skiplist_entry::add_entry): New.
7987 (skip_file_command, skip_function): Adjust.
7988 (compile_skip_regexp): Delete.
7989 (skip_command): Don't compile regexp here. Adjust to use
7990 skiplist_entry::add_entry.
7991 (skip_info): Adjust to use range-for and getters.
7992 (skip_enable_command, skip_disable_command): Adjust to use
7993 range-for and setters.
7994 (skip_delete_command): Adjust to use std::list.
7995 (add_skiplist_entry): Delete.
7996 (skip_file_p): Delete, refactored as ...
7997 (skiplist_entry::do_skip_file_p): ... this new method.
7998 (skip_gfile_p): Delete, refactored as ...
7999 (skiplist_entry::do_gskip_file_p): ... this new method.
8000 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8001 (skiplist_entry::skip_function_p): ... this new method.
8002 (function_name_is_marked_for_skip): Now returns bool, and takes
8003 the function sal by const reference. Adjust to use range-for and
8004 skiplist_entry methods.
8005 (_initialize_step_skip): Remove references to
8006 skiplist_entry_chain, skiplist_entry_count.
8007 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8008 takes the function sal by const reference.
8009
be7d3cd5
YQ
80102017-08-11 Yao Qi <yao.qi@linaro.org>
8011
8012 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8013 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8014 (dwarf2_frame_cache):
8015 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8016 RETURN_MASK_ALL and set *this_case to NULL.
8017 * frame-unwind.h: Update comments.
8018
1c90d9f0
YQ
80192017-08-11 Yao Qi <yao.qi@linaro.org>
8020
8021 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8022 (dwarf2_frame_state_copy_regs): Remove.
8023 (dwarf2_frame_state_free_regs): Remove.
8024 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8025 (dwarf2_restore_rule): Call method .alloc_regs instead of
8026 dwarf2_frame_state_alloc_regs.
8027 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8028 constructor. Call std::move.
8029 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8030 (dwarf2_frame_cache): Likewise.
8031
8032 [GDB_SELF_TEST]: Include selftest.h and
8033 selftest-arch.h.
8034 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8035 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8036 execute_cfa_program_test.
8037
8038 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8039 copy ctor, assignment operator, move assignment.
8040 <alloc_regs>: New method.
8041 <swap>: New method.
8042 (struct dwarf2_frame_state): Delete dtor.
8043 (dwarf2_frame_state_alloc_regs): Remove declaration.
8044 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8045 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8046
afe37d6b
YQ
80472017-08-11 Yao Qi <yao.qi@linaro.org>
8048
8049 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8050 (dwarf2_frame_state::dwarf2_frame_state): New.
8051 (dwarf2_frame_state::~dwarf2_frame_state): New.
8052 (dwarf2_fetch_cfa_info): Update.
8053 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8054 rather than a pointer. Update code.
8055 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8056 dtor.
8057 <data_align, code_align, retaddr_column>: Change them to const.
8058 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8059 to bool.
8060
b348037f
YQ
80612017-08-11 Yao Qi <yao.qi@linaro.org>
8062
8063 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8064 <loc.exp>: New field.
8065 * dwarf2-frame.c (execute_cfa_program): Update.
8066 (dwarf2_frame_prev_register): Update.
8067
e7c9de26
PA
80682017-08-10 Pedro Alves <palves@redhat.com>
8069
8070 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8071
e8c6b620
JB
80722017-08-09 John Baldwin <jhb@FreeBSD.org>
8073
8074 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8075 (fbsd_pending_children): Use std::list.
8076 (fbsd_remember_child): Likewise.
8077 (fbsd_is_child_pending): Likewise.
8078 (fbsd_pending_vfork_done): Use std::forward_list.
8079 (fbsd_add_vfork_done): Likewise.
8080 (fbsd_is_vfork_done_pending): Likewise.
8081 (fbsd_next_vfork_done): Likewise.
8082
e4a26669
JB
80832017-08-09 John Baldwin <jhb@FreeBSD.org>
8084
8085 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8086 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8087 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8088 for `mapfilename'.
8089 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8090 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8091
142311d3
JB
80922017-08-09 John Baldwin <jhb@FreeBSD.org>
8093
8094 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8095 "filestuff.h".
8096 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8097
42fa2e0e
TT
80982017-08-09 Tom Tromey <tom@tromey.com>
8099
8100 * skip.c (skiplist_entry): New constructor.
8101 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8102 (skiplist_entry::file_is_glob): Now bool.
8103 (skiplist_entry::file, skiplist_entry::function): Now
8104 std::string.
8105 (make_skip_entry): Return a unique_ptr. Use new.
8106 (free_skiplist_entry, free_skiplist_entry_cleanup)
8107 (make_free_skiplist_entry_cleanup): Remove.
8108 (skip_command, skip_disable_command, add_skiplist_entry)
8109 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8110 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8111 (function_name_is_marked_for_skip): Update.
8112 (skip_delete_command): Update. Use delete.
8113
cd3af38d
JW
81142017-08-09 Jiong Wang <jiong.wang@arm.com>
8115
8116 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8117 (aarch64_linux_core_read_description): New function.
8118 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8119
29592bde
PA
81202017-08-09 Pedro Alves <palves@redhat.com>
8121
8122 * cp-name-parser.y (cp_comp_to_string): Return a
8123 gdb::unique_xmalloc_ptr<char>.
8124 * cp-support.c (replace_typedefs_qualified_name)
8125 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8126 (cp_canonicalize_string_full): Use op= instead of explicit
8127 convertion.
8128 (cp_class_name_from_physname, method_name_from_physname)
8129 (cp_func_name, cp_remove_params): Adjust to use
8130 gdb::unique_xmalloc_ptr<char>.
8131 * cp-support.h (cp_comp_to_string): Return a
8132 gdb::unique_xmalloc_ptr<char>.
8133 * python/py-type.c (typy_lookup_type): Adjust to use
8134 gdb::unique_xmalloc_ptr<char>.
8135
b3340438
L
81362017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8137
8138 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8139
e88e8651
YQ
81402017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8141 Yao Qi <yao.qi@linaro.org>
8142
8143 * cp-support.c (cp_canonicalize_string_full): Use
8144 gdb::unique_xmalloc_ptr<char>.
8145 (cp_canonicalize_string): Likewise.
8146
f5a29eb0
YQ
81472017-08-09 Yao Qi <yao.qi@linaro.org>
8148
8149 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8150 * regformats/i386/amd64-avx-avx512.dat: Remove.
8151 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8152 * regformats/i386/amd64-avx-mpx.dat:Remove.
8153 * regformats/i386/amd64-avx.dat: Remove.
8154 * regformats/i386/amd64-mpx.dat: Remove.
8155 * regformats/i386/i386-avx-avx512.dat: Remove.
8156 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8157 * regformats/i386/i386-avx-mpx.dat: Remove.
8158 * regformats/i386/i386-mmx.dat: Remove.
8159 * regformats/i386/i386-mpx.dat: Remove.
8160
57757c2f
YQ
81612017-08-09 Yao Qi <yao.qi@linaro.org>
8162
8163 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8164 * amd64-tdep.c: Don't include features/i386/x32*.c.
8165 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8166 functions.
8167 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8168 and i386/x32-avx-avx512.
8169 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8170 and i386/x32.xml.
8171 * features/i386/x32-avx-avx512.c: Removed.
8172 * features/i386/x32-avx-avx512.xml: Removed.
8173 * features/i386/x32-avx.c: Removed.
8174 * features/i386/x32-avx.xml: Removed.
8175 * features/i386/x32.c: Removed.
8176 * features/i386/x32.xml: Removed.
8177 * regformats/i386/x32-avx-avx512.dat: Removed.
8178 * regformats/i386/x32-avx.dat: Removed.
8179 * regformats/i386/x32.dat: Removed.
8180
ba7b109b
MR
81812017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8182
8183 PR breakpoints/21886
8184 * mem-break.c (default_memory_insert_breakpoint): Use
8185 `->placed_address' rather than `->reqstd_address' for the
8186 breakpoint location.
8187
e347efc3
MR
81882017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8189
8190 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8191 assertions.
8192
0dba2a6c
MR
81932017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8194
8195 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8196 a union of `tdep_info', `tdesc_data' and `id'.
8197 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8198 rather than `info.tdep_info'.
8199 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8200 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8201 * i386-tdep.c (i386_gdbarch_init): Likewise.
8202 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8203 * mips-tdep.c (mips_gdbarch_init): Likewise.
8204 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8205 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8206 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8207 `info.tdep_info'.
8208 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8209 `info.tdep_info'.
8210 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8211 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8212 `info.tdep_info'.
8213 * spu-tdep.c (spu_gdbarch_init): Likewise.
8214 * gdbarch.h: Regenerate.
8215
16eb6b2d
LS
82162017-08-07 Leszek Swirski <leszeks@google.com>
8217
7b005726 8218 PR symtab/20899
16eb6b2d
LS
8219 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8220
74cbb09e
SM
82212017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8222
8223 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8224 (gdbsim_open): Rename gdb_argv args object to argv.
8225
ee0c3293
TT
82262017-08-05 Tom Tromey <tom@tromey.com>
8227
8228 * compile/compile-object-load.c (compile_object_load): Use
8229 gdb::unique_xmalloc_ptr.
8230 * cli/cli-dump.c (scan_filename): Rename from
8231 scan_filename_with_cleanup. Change return type.
8232 (scan_expression): Rename from scan_expression_with_cleanup.
8233 Change return type.
8234 (dump_memory_to_file, dump_value_to_file, restore_command):
8235 Use gdb::unique_xmalloc_ptr. Update.
8236 * cli/cli-cmds.c (find_and_open_script): Use
8237 gdb::unique_xmalloc_ptr.
8238 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8239 * symmisc.c (maintenance_print_symbols)
8240 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8241 * symfile.c (symfile_bfd_open, generic_load)
8242 (add_symbol_file_command, remove_symbol_file_command): Use
8243 gdb::unique_xmalloc_ptr.
8244 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8245 * psymtab.c (maintenance_print_psymbols): Use
8246 gdb::unique_xmalloc_ptr.
8247 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8248 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8249 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8250 (reload_shared_libraries_1): Likewise.
8251
3232fabd
TT
82522017-08-05 Tom Tromey <tom@tromey.com>
8253
8254 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8255 (rust_op_vector, rust_set_vector): New typedefs.
8256 (current_parser): New global.
8257 (work_obstack): Change to pointer type. Update all users.
8258 (rust_ast, pstate): Remove globals.
8259 (struct rust_parser): New.
8260 (%union) <params, field_inits>: Change type.
8261 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8262 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8263 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8264 (convert_params_to_types, convert_params_to_expression): Change
8265 type of "params".
8266 (ast_string): Change type of "fields".
8267 (rust_parse): Make a rust_parser. Remove cleanups.
8268 (rust_lex_tests): Make and install an auto_obstack.
8269
f02fd774
YQ
82702017-08-04 Yao Qi <yao.qi@linaro.org>
8271
8272 * configure.srv (ipa_x32_linux_regobj): New.
8273 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8274 instead of X86_TDESC_AVX512.
8275 (initialize_low_tracepoint): Call
8276 init_registers_x32_avx_avx512_linux.
8277
91975afd
YQ
82782017-08-04 Yao Qi <yao.qi@linaro.org>
8279
8280 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8281
2331fa3a
RK
82822017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8283
8284 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8285
744e4fe1
TT
82862017-08-03 Tom Tromey <tom@tromey.com>
8287
8288 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8289 Remove.
8290 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8291
1c034b67
TT
82922017-08-03 Tom Tromey <tom@tromey.com>
8293
8294 * python/py-param.c (compute_enum_values): Use gdb_argv.
8295
773a1edc
TT
82962017-08-03 Tom Tromey <tom@tromey.com>
8297
8298 * utils.h (struct gdb_argv_deleter): New.
8299 (gdb_argv): New class.
8300 * utils.c (gdb_argv::reset): New method.
8301 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8302 * tracefile.c (tsave_command): Use gdb_argv.
8303 * top.c (new_ui_command): Use gdb_argv.
8304 * symmisc.c (maintenance_print_symbols)
8305 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8306 * symfile.c (symbol_file_command, generic_load)
8307 (remove_symbol_file_command): Use gdb_argv.
8308 * stack.c (backtrace_command): Use gdb_argv.
8309 * source.c (add_path, show_substitute_path_command)
8310 (unset_substitute_path_command, set_substitute_path_command):
8311 Use gdb_argv.
8312 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8313 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8314 * remote.c (extended_remote_run, remote_put_command)
8315 (remote_get_command, remote_delete_command): Use gdb_argv.
8316 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8317 (gdbsim_open): Use gdb_argv.
8318 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8319 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8320 * procfs.c (procfs_info_proc): Use gdb_argv.
8321 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8322 * infrun.c (handle_command): Use gdb_argv.
8323 * inferior.c (add_inferior_command, clone_inferior_command):
8324 Use gdb_argv.
8325 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8326 * exec.c (exec_file_command): Use gdb_argv.
8327 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8328 * compile/compile.c (build_argc_argv): Use gdb_argv.
8329
0d50bde3
TT
83302017-08-03 Tom Tromey <tom@tromey.com>
8331
8332 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8333
7f968c89
TT
83342017-08-03 Tom Tromey <tom@tromey.com>
8335
8336 * python/python.c (compute_python_string): Return std::string.
8337 (gdbpy_eval_from_control_command): Update.
8338 (do_start_initialization): Use std::string.
8339 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8340 xstrprintf.
8341 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8342 xstrprintf.
8343
3c9ebddd
TT
83442017-08-03 Tom Tromey <tom@tromey.com>
8345
8346 * top.h (do_restore_instream_cleanup): Remove.
8347 * top.c (do_restore_instream_cleanup): Remove.
8348 (read_command_file): Use scoped_restore.
8349 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8350
b51b225e
TT
83512017-08-03 Tom Tromey <tom@tromey.com>
8352
8353 * cli/cli-script.c (execute_user_command)
8354 (execute_control_command): Use scoped_restore.
8355
ac991630
TT
83562017-08-03 Tom Tromey <tom@tromey.com>
8357
8358 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8359 (execute_user_command): Remove user_call_depth; use
8360 user_args_stack's size instead.
8361
898e0c8e
TT
83622017-08-03 Tom Tromey <tom@tromey.com>
8363
8364 * top.h (in_user_command): Remove.
8365 * top.c (in_user_command): Remove.
8366 * cli/cli-script.c (do_restore_user_call_depth)
8367 (execute_user_command): Update.
8368
26fcd5d7
TT
83692017-08-03 Tom Tromey <tom@tromey.com>
8370
8371 * valops.c (search_struct_method): Use gdb::byte_vector.
8372 * valarith.c (value_concat): Use std::vector.
8373 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8374 (simple_search_memory): Likewise.
8375 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8376 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8377 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8378 * elfread.c (elf_rel_plt_read): Use std::string.
8379 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8380 * cli/cli-dump.c (restore_section_callback): Use
8381 gdb::byte_vector.
8382
7c218e6c
TT
83832017-08-03 Tom Tromey <tom@tromey.com>
8384
8385 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8386
31b68d4a
TT
83872017-08-03 Tom Tromey <tom@tromey.com>
8388
8389 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8390 (tui_register_format): Use scoped_restore.
8391
2ec845e7
TT
83922017-08-03 Tom Tromey <tom@tromey.com>
8393
8394 * reverse.c (exec_direction_default): Remove.
8395 (exec_reverse_once): Use scoped_restore.
8396 * remote.c (restore_remote_timeout): Remove.
8397 (remote_flash_erase, remote_flash_write, remote_flash_done)
8398 (readchar, remote_serial_write): Use scoped_restore.
8399 * cli/cli-script.c (struct source_cleanup_lines_args)
8400 (source_cleanup_lines): Remove.
8401 (script_from_file): Use scoped_restore.
8402 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8403 (source_command): Use scoped_restore.
8404
b3bc8453
TT
84052017-08-03 Tom Tromey <tom@tromey.com>
8406
8407 * utils.h (make_cleanup_free_so): Remove.
8408 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8409 * solist.h (struct so_deleter): New.
8410 (so_list_up): New typedef.
8411 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8412
e3ad2841
TT
84132017-08-03 Tom Tromey <tom@tromey.com>
8414
8415 * utils.h (make_cleanup_restore_current_language): Remove.
8416 * utils.c (do_restore_current_language)
8417 (make_cleanup_restore_current_language): Remove.
8418 * parse.c (parse_exp_in_context_1)
8419 (parse_expression_with_language): Use
8420 scoped_restore_current_language.
8421 * mi/mi-main.c (mi_cmd_execute): Use
8422 scoped_restore_current_language.
8423 * language.h (scoped_restore_current_language): New class.
8424
b80cf838
TT
84252017-08-03 Tom Tromey <tom@tromey.com>
8426
8427 * compile/compile.c (cleanup_unlink_file): Remove.
8428 (compile_to_object): Use gdb::unlinker.
8429 (eval_compile_command): Likewise.
8430
fad0444a
TT
84312017-08-03 Tom Tromey <tom@tromey.com>
8432
8433 * utils.h (make_cleanup_fclose): Remove.
8434 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8435
6e7bc05c
TT
84362017-08-03 Tom Tromey <tom@tromey.com>
8437
8438 * top.c (open_terminal_stream): Return gdb_file_up.
8439 (new_ui_command): Update.
8440
4a45905b
TT
84412017-08-03 Tom Tromey <tom@tromey.com>
8442
8443 * source.c (print_source_lines_base, forward_search_command)
8444 (reverse_search_command): Use gdb_file_up.
8445
7cd06d6e
TT
84462017-08-03 Tom Tromey <tom@tromey.com>
8447
8448 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8449
ed166945
TT
84502017-08-03 Tom Tromey <tom@tromey.com>
8451
8452 * cli/cli-cmds.c (find_and_open_script): Change return type.
8453 Remove "streamp" and "full_path" parameters.
8454 (source_script_with_search): Update.
8455 * auto-load.c (source_script_file): Update.
8456 * cli/cli-cmds.h (find_and_open_script): Change type.
8457 (open_script): New struct.
8458
d419f42d
TT
84592017-08-03 Tom Tromey <tom@tromey.com>
8460
8461 * xml-support.c (xml_fetch_content_from_file): Update.
8462 * ui-file.c (stdio_file::open): Update.
8463 * tracefile-tfile.c (tfile_start): Update.
8464 * remote.c (remote_file_put, remote_file_get): Update.
8465 * nat/linux-procfs.c (linux_proc_get_int)
8466 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8467 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8468 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8469 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8470 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8471 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8472 * linux-nat.c (linux_proc_pending_signals): Update.
8473 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8474 (file_closer): Remove.
8475 * compile/compile.c (compile_to_object): Update.
8476 * common/filestuff.h (struct gdb_file_deleter): New.
8477 (gdb_file_up): New typedef.
8478 (gdb_fopen_cloexec): Change return type.
8479 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8480 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8481 (dump_binary_file, restore_binary_file): Update.
8482 * auto-load.c (auto_load_objfile_script_1): Update.
8483
4a2b031d
TT
84842017-08-03 Tom Tromey <tom@tromey.com>
8485
8486 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8487 (info_static_tracepoint_markers_command): Likewise.
8488 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8489 * skip.c (skip_info): Use ui_out_emit_table.
8490 * progspace.c (print_program_space): Use ui_out_emit_table.
8491 * osdata.c (info_osdata): Use ui_out_emit_table.
8492 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8493 ui_out_emit_table.
8494 * linux-thread-db.c (info_auto_load_libthread_db): Use
8495 ui_out_emit_table.
8496 * inferior.c (print_inferior): Use ui_out_emit_table.
8497 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8498 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8499 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8500 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8501 * ui-out.h (class ui_out_emit_table): New.
8502
a4f320fd
MR
85032017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8504
8505 * mips-tdep.c (mips_fpu_type_str): New function.
8506 (mips_dump_tdep): Call it.
8507
a2f1f308
MR
85082017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8509
8510 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8511 `->mips_fpu_type'.
8512
7e5ed83b
XR
85132017-07-31 Xavier Roirand <roirand@adacore.com>
8514
8515 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8516
4c9dc811
XR
85172017-07-27 Xavier Roirand <roirand@adacore.com>
8518
8519 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8520
27d41eac
YQ
85212017-07-26 Yao Qi <yao.qi@linaro.org>
8522
8523 * cli/cli-cmds.c (maintenancechecklist): New variable.
8524 * gdbcmd.h (maintenancechecklist): Declare it.
8525 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8526 Call i386_linux_read_description with different masks.
8527 * maint.c (maintenance_check_command): New function.
8528 (_initialize_maint_cmds): Call add_prefix_cmd.
8529 * target-descriptions.c (tdesc_reg): override operator != and ==.
8530 (tdesc_type): Likewise.
8531 (tdesc_feature): Likewise.
8532 (target_desc): Likewise.
8533 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8534 (maintenance_check_xml_descriptions): New function.
8535 (_initialize_target_descriptions) Add command "xml-descriptions".
8536 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8537
ea03d0d3
YQ
85382017-07-26 Yao Qi <yao.qi@linaro.org>
8539
8540 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8541 Include features/i386/32bit-*.c.
8542 (i386_linux_read_description): Generate target description if it
8543 doesn't exist.
8544 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8545 functions.
8546 * features/i386/32bit-linux.c: Re-generated.
8547 * features/i386/32bit-sse.c: Likewise.
8548 * target-descriptions.c (print_c_feature::visit): Print code to
8549 set register number if needed.
8550 (print_c_feature) <m_next_regnum>: New field.
8551
25aa13e5
YQ
85522017-07-26 Yao Qi <yao.qi@linaro.org>
8553
8554 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8555 (FEATURE_XMLFILES): New.
8556 (FEATURE_CFILES): New.
8557 New rules.
8558 (clean-cfiles): Remove generated c files.
8559 * features/i386/32bit-avx.c: Generated.
8560 * features/i386/32bit-avx512.c: Generated.
8561 * features/i386/32bit-core.c: Generated.
8562 * features/i386/32bit-linux.c: Generated.
8563 * features/i386/32bit-mpx.c: Generated.
8564 * features/i386/32bit-pkeys.c: Generated.
8565 * features/i386/32bit-sse.c: Generated.
8566 * target-descriptions.c: Include algorithm.
8567 (tdesc_element_visitor): Add method visit_end.
8568 (print_c_tdesc): Implement visit_end.
8569 (print_c_tdesc:: m_filename_after_features): Move it to
8570 protected.
8571 (print_c_feature): New class.
8572 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8573 name starts with "i386/32bit-".
8574
6eb1e6a8
YQ
85752017-07-26 Yao Qi <yao.qi@linaro.org>
8576
8577 * target-descriptions.c (tdesc_element_visitor): New class.
8578 (tdesc_element): New class.
8579 (tdesc_reg): Inherit from tdesc_element.
8580 (tdesc_reg::accept): New function.
8581 (tdesc_type): Inherit from tdesc_element.
8582 (tdesc_type::accept): New function.
8583 (tdesc_feature): Inherit from tdesc_element.
8584 (tdesc_feature::accept): New function.
8585 (target_desc): Inherit from tdesc_element.
8586 (target_desc::target_desc): New.
8587 (target_desc::~target_desc): New.
8588 (target_desc::accept): New.
8589 (allocate_target_description): Use new.
8590 (free_target_description): Use delete.
8591 (print_c_tdesc): New class.
8592 (maint_print_c_tdesc_cmd): Adjust.
8593
8594 * features/aarch64.c: Re-generated.
8595 * features/arc-arcompact.c: Re-generated.
8596 * features/arc-v2.c: Re-generated.
8597 * features/arm/arm-with-iwmmxt.c: Re-generated.
8598 * features/arm/arm-with-m.c: Re-generated.
8599 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8600 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8601 * features/arm/arm-with-neon.c: Re-generated.
8602 * features/arm/arm-with-vfpv2.c: Re-generated.
8603 * features/arm/arm-with-vfpv3.c: Re-generated.
8604 * features/i386/amd64-avx-avx512.c: Re-generated.
8605 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8606 * features/i386/amd64-avx.c: Re-generated.
8607 * features/i386/amd64-avx-linux.c: Re-generated.
8608 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8609 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8610 * features/i386/amd64-avx-mpx.c: Re-generated.
8611 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8612 * features/i386/amd64.c: Re-generated.
8613 * features/i386/amd64-linux.c: Re-generated.
8614 * features/i386/amd64-mpx.c: Re-generated.
8615 * features/i386/amd64-mpx-linux.c: Re-generated.
8616 * features/i386/i386-avx-avx512.c: Re-generated.
8617 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8618 * features/i386/i386-avx.c: Re-generated.
8619 * features/i386/i386-avx-linux.c: Re-generated.
8620 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8621 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8622 * features/i386/i386-avx-mpx.c: Re-generated.
8623 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8624 * features/i386/i386.c: Re-generated.
8625 * features/i386/i386-linux.c: Re-generated.
8626 * features/i386/i386-mmx.c: Re-generated.
8627 * features/i386/i386-mmx-linux.c: Re-generated.
8628 * features/i386/i386-mpx.c: Re-generated.
8629 * features/i386/i386-mpx-linux.c: Re-generated.
8630 * features/i386/x32-avx-avx512.c: Re-generated.
8631 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8632 * features/i386/x32-avx.c: Re-generated.
8633 * features/i386/x32-avx-linux.c: Re-generated.
8634 * features/i386/x32.c: Re-generated.
8635 * features/i386/x32-linux.c: Re-generated.
8636 * features/microblaze.c: Re-generated.
8637 * features/microblaze-with-stack-protect.c: Re-generated.
8638 * features/mips64-dsp-linux.c: Re-generated.
8639 * features/mips64-linux.c: Re-generated.
8640 * features/mips-dsp-linux.c: Re-generated.
8641 * features/mips-linux.c: Re-generated.
8642 * features/nds32.c: Re-generated.
8643 * features/nios2.c: Re-generated.
8644 * features/nios2-linux.c: Re-generated.
8645 * features/rs6000/powerpc-32.c: Re-generated.
8646 * features/rs6000/powerpc-32l.c: Re-generated.
8647 * features/rs6000/powerpc-403.c: Re-generated.
8648 * features/rs6000/powerpc-403gc.c : Re-generated.
8649 * features/rs6000/powerpc-405.c: Re-generated.
8650 * features/rs6000/powerpc-505.c: Re-generated.
8651 * features/rs6000/powerpc-601.c: Re-generated.
8652 * features/rs6000/powerpc-602.c: Re-generated.
8653 * features/rs6000/powerpc-603.c: Re-generated.
8654 * features/rs6000/powerpc-604.c: Re-generated.
8655 * features/rs6000/powerpc-64.c: Re-generated.
8656 * features/rs6000/powerpc-64l.c: Re-generated.
8657 * features/rs6000/powerpc-7400.c: Re-generated.
8658 * features/rs6000/powerpc-750.c: Re-generated.
8659 * features/rs6000/powerpc-860.c: Re-generated.
8660 * features/rs6000/powerpc-altivec32.c: Re-generated.
8661 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8662 * features/rs6000/powerpc-altivec64.c: Re-generated.
8663 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8664 * features/rs6000/powerpc-cell32l.c: Re-generated.
8665 * features/rs6000/powerpc-cell64l.c: Re-generated.
8666 * features/rs6000/powerpc-e500.c: Re-generated.
8667 * features/rs6000/powerpc-e500l.c: Re-generated.
8668 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8669 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8670 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8671 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8672 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8673 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8674 * features/rs6000/powerpc-vsx32.c: Re-generated.
8675 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8676 * features/rs6000/powerpc-vsx64.c: Re-generated.
8677 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8678 * features/rs6000/rs6000.c: Re-generated.
8679 * features/s390-linux32.c: Re-generated.
8680 * features/s390-linux32v1.c: Re-generated.
8681 * features/s390-linux32v2.c: Re-generated.
8682 * features/s390-linux64.c: Re-generated.
8683 * features/s390-linux64v1.c: Re-generated.
8684 * features/s390-linux64v2.c: Re-generated.
8685 * features/s390-te-linux64.c: Re-generated.
8686 * features/s390-tevx-linux64.c: Re-generated.
8687 * features/s390-vx-linux64.c: Re-generated.
8688 * features/s390x-linux64.c: Re-generated.
8689 * features/s390x-linux64v1.c: Re-generated.
8690 * features/s390x-linux64v2.c: Re-generated.
8691 * features/s390x-te-linux64.c: Re-generated.
8692 * features/s390x-tevx-linux64.c: Re-generated.
8693 * features/s390x-vx-linux64.c: Re-generated.
8694 * features/sparc/sparc32-solaris.c: Re-generated.
8695 * features/sparc/sparc64-solaris.c: Re-generated.
8696 * features/tic6x-c62x.c: Re-generated.
8697 * features/tic6x-c62x-linux.c: Re-generated.
8698 * features/tic6x-c64x.c: Re-generated.
8699 * features/tic6x-c64x-linux.c: Re-generated.
8700 * features/tic6x-c64xp.c: Re-generated.
8701 * features/tic6x-c64xp-linux.c: Re-generated.
8702
35b4818d
YQ
87032017-07-26 Yao Qi <yao.qi@linaro.org>
8704
8705 * i386-linux-tdep.c (i386_linux_read_description): New function.
8706 (i386_linux_core_read_description): Call
8707 i386_linux_read_description.
8708 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8709 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8710 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8711 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8712 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8713 * x86-linux-nat.c (x86_linux_read_description): Call
8714 i386_linux_read_description.
8715
8e2141c6
YQ
87162017-07-26 Yao Qi <yao.qi@linaro.org>
8717
8718 * NEWS: Mention it.
8719 * features/Makefile (%.c: %.xml): Pass the xml file name to
8720 command "maint print c-tdesc".
8721 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8722 name from 'arg'.
8723
b468ff4c
YQ
87242017-07-26 Yao Qi <yao.qi@linaro.org>
8725
8726 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8727 in-class initialization.
8728 (tdesc_create_feature): Call new instead of XCNEW.
8729 (free_target_description): Ue delete.
8730
b9c0e1b4
JB
87312017-07-25 John Baldwin <jhb@FreeBSD.org>
8732
8733 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8734
a04b5337
YQ
87352017-07-25 Yao Qi <yao.qi@linaro.org>
8736
8737 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8738 constant.
8739 (amd64_x32_init_abi): Likewise.
8740 * amd64-tdep.h (amd64_init_abi): Update declaration.
8741 (amd64_x32_init_abi): Likewise.
8742
02ad7fc2
YQ
87432017-07-25 Yao Qi <yao.qi@linaro.org>
8744
8745 PR tdep/21717
8746 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8747 condition for FPSCR.
8748 (arm_linux_store_inferior_registers): Likewise.
8749
b6f48cb0
TT
87502017-07-22 Tom Tromey <tom@tromey.com>
8751
8752 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8753 <syscalls_counts>: Now a std::vector.
8754 (get_catch_syscall_inferior_data): Use "new".
8755 (catch_syscall_inferior_data_cleanup): Use "delete".
8756 (insert_catch_syscall, remove_catch_syscall)
8757 (clear_syscall_counts): Update.
8758
e12c9b7a
TT
87592017-07-22 Tom Tromey <tom@tromey.com>
8760
8761 * break-catch-syscall.c (syscall_catchpoint)
8762 <syscalls_to_be_caught>: Now a std::vector<int>
8763 (~syscall_catchpoint): Remove.
8764 (insert_catch_syscall, remove_catch_syscall)
8765 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8766 (print_mention_catch_syscall, print_recreate_catch_syscall):
8767 Update.
8768 (create_syscall_event_catchpoint): Change type of "filter"
8769 parameter.
8770 (catch_syscall_split_args): Return a std::vector.
8771 (catch_syscall_command_1, catching_syscall_number_1): Update.
8772
4fa8aeac
TT
87732017-07-22 Tom Tromey <tom@tromey.com>
8774
8775 * break-catch-throw.c (struct exception_catchpoint)
8776 <exception_rx>: Now a std::string.
8777 (~exception_catchpoint): Remove.
8778 (print_one_detail_exception_catchpoint): Update.
8779 (handle_gnu_v3_exceptions): Change type of except_rx.
8780 (extract_exception_regexp): Return a std::string.
8781 (catch_exception_command_1): Update.
8782
f746a154
TT
87832017-07-22 Tom Tromey <tom@tromey.com>
8784
8785 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8786 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8787 std::vector.
8788 <catch_all>: Now a bool.
8789 (~signal_catchpoint): Remove.
8790 (signal_catchpoint_insert_location)
8791 (signal_catchpoint_remove_location)
8792 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8793 (signal_catchpoint_print_mention)
8794 (signal_catchpoint_print_recreate)
8795 (signal_catchpoint_explains_signal): Update.
8796 (create_signal_catchpoint): Change type of "filter" and
8797 "catch_all".
8798 (catch_signal_split_args): Return a std::vector. Change type of
8799 "catch_all".
8800 (catch_signal_command): Update.
8801
47e77640
PA
88022017-07-20 Pedro Alves <palves@redhat.com>
8803
8804 * ada-lang.c (ada_language_defn): Make extern.
8805 (_initialize_ada_language): Remove add_language call.
8806 * c-lang.c (c_language_defn, cplus_language_defn)
8807 (asm_language_defn, minimal_language_defn): Make extern.
8808 (_initialize_c_language): Delete.
8809 * completer.c (compare_cstrings): Delete, moved to utils.h.
8810 * d-lang.c (d_language_defn): Make extern.
8811 (_initialize_d_language): Remove add_language calls.
8812 * defs.h (enum language): Add comment.
8813 * f-lang.c (f_language_defn): Make extern.
8814 (_initialize_f_language): Remove add_language call.
8815 * go-lang.c (go_language_defn): Make extern.
8816 (_initialize_go_language): Remove add_language call.
8817 * language.c: Include <algorithm>.
8818 (languages): Redefine as const array.
8819 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8820 (set_language_command): Handle "local". Use for-range loop.
8821 (set_language): Remove loop.
8822 (language_enum): Rewrite.
8823 (language_def, language_str): Remove loops.
8824 (add_language): Delete.
8825 (add_set_language_command): New, based on add_languages.
8826 (skip_language_trampoline): Adjust.
8827 (local_language_defn): Delete.
8828 (language_gdbarch_post_init): Adjust.
8829 (_initialize_language): Remove add_language calls. Call
8830 add_set_language_command.
8831 * language.h (add_language): Delete.
8832 (auto_language_defn)
8833 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8834 (asm_language_defn, c_language_defn, cplus_language_defn)
8835 (d_language_defn, f_language_defn, go_language_defn)
8836 (m2_language_defn, objc_language_defn, opencl_language_defn)
8837 (pascal_language_defn, rust_language_defn): Declare.
8838 * m2-lang.c (m2_language_defn): Make extern.
8839 (_initialize_m2_language): Remove add_language call.
8840 * objc-lang.c (objc_language_defn): Make extern.
8841 (_initialize_objc_language): Remove add_language call.
8842 * opencl-lang.c (opencl_language_defn): Make extern.
8843 (_initialize_opencl_language): Remove add_language call.
8844 * p-lang.c (pascal_language_defn): Make extern.
8845 (_initialize_pascal_language): Delete.
8846 * rust-lang.c (rust_language_defn): Make extern.
8847 (_initialize_rust_language): Delete.
8848 * utils.h (compare_cstrings): New static inline function.
8849
edb0c9cb
PA
88502017-07-20 Pedro Alves <palves@redhat.com>
8851
8852 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8853 (get_var_value): Constify parameters.
8854 (get_int_var_value): Change prototype.
8855 (to_fixed_range_type): Adjust.
8856 * ada-lang.h (get_int_var_value): Change prototype.
8857
a778f165
PA
88582017-07-20 Pedro Alves <palves@redhat.com>
8859
8860 * dwarf2read.c (dw2_lookup_symbol): Use
8861 SYMBOL_MATCHES_SEARCH_NAME.
8862 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8863
42edd901
PA
88642017-07-20 Pedro Alves <palves@redhat.com>
8865
8866 * block.c (block_iter_name_step, block_iter_name_first)
8867 (block_iter_name_next): Delete.
8868 (block_lookup_symbol_primary): Adjust to use
8869 dict_iter_match_first/dict_iter_match_next.
8870 * block.h (block_iter_name_first, block_iter_name_next): Delete
8871 declarations.
8872 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8873 dict_iter_match_first/dict_iter_match_next.
8874
cf325299
PA
88752017-07-20 Pedro Alves <palves@redhat.com>
8876
8877 * cp-support.c (cp_find_first_component_aux): Add missing case for
8878 end of string.
8879
c5ed0576
DB
88802017-07-18 David Blaikie <dblaikie@gmail.com>
8881
8882 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8883 of dwo_cu's dwo_file.
8884
27841e76
YQ
88852017-07-18 Yao Qi <yao.qi@linaro.org>
8886
8887 * remote.c (store_registers_using_G): Remove one line comment.
8888
cfb7e58b
YQ
88892017-07-18 Yao Qi <yao.qi@linaro.org>
8890
8891 * regcache.c (regcache_cpy): Simplify it.
8892 (regcache::cpy_no_passthrough): Remove it.
8893 * regcache.h (cpy_no_passthrough): Remove it.
8894 (regcache_dup, regcache_cpy): Update comments.
8895
386535dd
PA
88962017-07-18 Pedro Alves <palves@redhat.com>
8897
8898 * remote-sim.c (sim_command_completer): Adjust to work with a
8899 completion_tracker instead of a VEC.
8900
c45ec17c
PA
89012017-07-17 Pedro Alves <palves@redhat.com>
8902
8903 * completer.c (complete_source_filenames): New function.
8904 (complete_address_and_linespec_locations): New function.
8905 (location_completer): Use complete_address_and_linespec_locations.
8906 (completion_tracker::build_completion_result): Honor the tracker's
8907 request to suppress append.
8908 * completer.h (completion_tracker::suppress_append_ws)
8909 (completion_tracker::set_suppress_append_ws): New methods.
8910 (completion_tracker::m_suppress_append_ws): New field.
8911 (complete_source_filenames): New declaration.
8912 * linespec.c (linespec_complete_what): New.
8913 (struct ls_parser) <complete_what, completion_word,
8914 completion_quote_char, completion_quote_end, completion_tracker>:
8915 New fields.
8916 (string_find_incomplete_keyword_at_end): New.
8917 (linespec_lexer_lex_string): Record quote char. If in completion
8918 mode, don't throw.
8919 (linespec_lexer_consume_token): Advance the completion word point.
8920 (linespec_lexer_peek_token): Save/restore completion info.
8921 (save_stream_and_consume_token): New.
8922 (set_completion_after_number): New.
8923 (linespec_parse_basic): Set what to complete next depending on
8924 token. Handle function and label completions specially.
8925 (parse_linespec): Disable objc shortcut in completion mode. Set
8926 what to complete next depending on token type. Skip keyword if in
8927 completion mode.
8928 (complete_linespec_component, linespec_complete): New.
8929 * linespec.h (linespec_complete): Declare.
8930
be966d42
PA
89312017-07-17 Pedro Alves <palves@redhat.com>
8932
8933 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8934 Handle 'operator<' / 'operator<<'.
8935
a2459270
PA
89362017-07-17 Pedro Alves <palves@redhat.com>
8937
8938 * completer.c (collect_explicit_location_matches): Handle
8939 MATCH_LABEL.
8940 (convert_explicit_location_to_linespec): New, factored out from
8941 ...
8942 (convert_explicit_location_to_sals): ... this.
8943 (complete_label): New.
8944 (linespec_complete_label, find_label_symbols_in_block): New.
8945 (find_label_symbols): Add completion_mode parameter and adjust to
8946 call find_label_symbols_in_block.
8947 * linespec.h (linespec_complete_label): Declare.
8948
c6756f62
PA
89492017-07-17 Pedro Alves <palves@redhat.com>
8950
8951 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8952 complete_symbol_mode parameter.
8953 * cli/cli-cmds.c (complete_command): Get the completion result out
8954 of the handle_brkchars tracker if used a custom word point.
8955 * completer.c: Include "linespec.h".
8956 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8957 (advance_to_expression_complete_word_point): New.
8958 (completion_tracker::completes_to_completion_word): New.
8959 (complete_files_symbols): Pass down
8960 complete_symbol_mode::EXPRESSION.
8961 (explicit_options, probe_options): New.
8962 (collect_explicit_location_matches): Complete on the
8963 explictit_loc->foo instead of word. Use
8964 linespec_complete_function. Handle MATCH_LINE. Handle offering
8965 keyword and options completions.
8966 (backup_text_ptr): Delete.
8967 (skip_keyword): New.
8968 (complete_explicit_location): Remove 'word' parameter. Add
8969 language, quoted_arg_start and quoted_arg_end parameters.
8970 Rewrite, parsing left to right.
8971 (location_completer): Rewrite.
8972 (location_completer_handle_brkchars): New function.
8973 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8974 (enum complete_line_internal_reason): Adjust comments.
8975 (completion_tracker::discard_completions): New.
8976 (completer_handle_brkchars_func_for_completer): Handle
8977 location_completer.
8978 (gdb_custom_word_point_brkchars)
8979 (gdb_org_rl_basic_quote_characters): New.
8980 (gdb_completion_word_break_characters_throw)
8981 (completion_find_completion_word): Handle trackers that use a
8982 custom word point.
8983 (completion_tracker::advance_custom_word_point_by): New.
8984 (completion_tracker::build_completion_result): Don't rely on
8985 readline appending the quote char.
8986 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8987 use a custom word point.
8988 (gdb_rl_attempted_completion_function): Restore
8989 rl_basic_quote_characters.
8990 * completer.h (class completion_tracker): Extend intro comment.
8991 (completion_tracker::set_quote_char)
8992 (completion_tracker::quote_char)
8993 (completion_tracker::set_use_custom_word_point)
8994 (completion_tracker::use_custom_word_point)
8995 (completion_tracker::custom_word_point)
8996 (completion_tracker::set_custom_word_point)
8997 (completion_tracker::advance_custom_word_point_by)
8998 (completion_tracker::completes_to_completion_word)
8999 (completion_tracker::discard_completions): New methods.
9000 (completion_tracker::m_quote_char)
9001 (completion_tracker::m_use_custom_word_point)
9002 (completion_tracker::m_custom_word_point): New fields.
9003 (advance_to_expression_complete_word_point): Declare.
9004 * f-lang.c (f_collect_symbol_completion_matches): Add
9005 complete_symbol_mode parameter.
9006 * language.h (struct language_defn)
9007 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9008 parameter.
9009 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9010 (linespec_complete_function): New function.
9011 (linespec_lexer_lex_keyword): Adjust.
9012 * linespec.h (linespec_keywords, linespec_complete_function): New
9013 declarations.
9014 * location.c (find_end_quote): New function.
9015 (explicit_location_lex_one): Add explicit_completion_info
9016 parameter. Save quoting info. Don't throw if being called for
9017 completion. Don't handle Ada operators here.
9018 (is_cp_operator, skip_op_false_positives, first_of)
9019 (explicit_location_lex_one_function): New function.
9020 (string_to_explicit_location): Replace 'dont_throw' parameter with
9021 an explicit_completion_info pointer parameter. Handle it. Don't
9022 use explicit_location_lex_one to lex function names. Use
9023 explicit_location_lex_one_function instead.
9024 * location.h (struct explicit_completion_info): New.
9025 (string_to_explicit_location): Replace 'dont_throw' parameter with
9026 an explicit_completion_info pointer parameter.
9027 * symtab.c (default_collect_symbol_completion_matches_break_on):
9028 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9029 (default_collect_symbol_completion_matches)
9030 (collect_symbol_completion_matches): Add complete_symbol_mode
9031 parameter.
9032 (collect_symbol_completion_matches_type): Pass down
9033 complete_symbol_mode::EXPRESSION.
9034 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9035 parameter. Handle LINESPEC mode.
9036 * symtab.h (complete_symbol_mode): New.
9037 (default_collect_symbol_completion_matches_break_on)
9038 (default_collect_symbol_completion_matches)
9039 (collect_symbol_completion_matches)
9040 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9041 parameter.
9042
1d550c82
PA
90432017-07-17 Pedro Alves <palves@redhat.com>
9044
9045 * utils.c (enum class strncmp_iw_mode): New.
9046 (strcmp_iw): Rename to ...
9047 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9048 parameters. Handle them.
9049 (strncmp_iw): New.
9050 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9051 * utils.h (strncmp_iw): Declare.
9052 (strcmp_iw): Move describing comments here.
9053
8090b426
PA
90542017-07-17 Pedro Alves <palves@redhat.com>
9055
9056 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9057 CP_OPERATOR_STR.
9058 * c-typeprint.c (is_type_conversion_operator): Use
9059 CP_OPERATOR_STR.
9060 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9061 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9062 CP_OPERATOR_LEN.
9063 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9064 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9065 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9066 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9067 CP_OPERATOR_STR.
9068 * location.c: Include "cp-support.h".
9069 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9070 CP_OPERATOR_STR.
9071 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9072 CP_OPERATOR_LEN.
9073
6a2c1b87
PA
90742017-07-17 Pedro Alves <palves@redhat.com>
9075
9076 * cli/cli-cmds.c (complete_command): Use a completion tracker
9077 along with completion_find_completion_word for handle_brkchars
9078 phase.
9079 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9080 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9081 (struct gdb_rl_completion_word_info): New.
9082 (gdb_rl_find_completion_word): New.
9083 (completion_find_completion_word): New.
9084 * completer.h (completion_find_completion_word): Declare.
9085
eb3ff9a5
PA
90862017-07-17 Pedro Alves <palves@redhat.com>
9087
9088 * ada-lang.c (symbol_completion_match): Adjust comments.
9089 (symbol_completion_add): Replace vector parameter with
9090 completion_tracker parameter. Use it.
9091 (ada_make_symbol_completion_list): Rename to...
9092 (ada_collect_symbol_completion_matches): ... this. Add
9093 completion_tracker parameter and use it.
9094 (ada_language_defn): Adjust.
9095 * break-catch-syscall.c (catch_syscall_completer): Adjust
9096 prototype and work with completion_tracker instead of VEC.
9097 * breakpoint.c (condition_completer): Adjust prototype and work
9098 with completion_tracker instead of VEC.
9099 * c-lang.c (c_language_defn, cplus_language_defn)
9100 (asm_language_defn, minimal_language_defn): Adjust to renames.
9101 * cli/cli-cmds.c (complete_command): Rework using
9102 completion_tracker. Catch exceptions when completing.
9103 * cli/cli-decode.c (integer_unlimited_completer)
9104 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9105 with completion_tracker instead of VEC.
9106 * command.h (struct completion_tracker): Forward declare.
9107 (completer_ftype, completer_handle_brkchars_ftype): Change
9108 types.
9109 (complete_on_cmdlist, complete_on_enum): Adjust.
9110 * completer.c: Include <algorithm>.
9111 (struct gdb_completer_state): New.
9112 (current_completion): New global.
9113 (readline_line_completion_function): Delete.
9114 (noop_completer, filename_completer)
9115 (filename_completer_handle_brkchars, complete_files_symbols)
9116 (linespec_location_completer): Adjust to work with a
9117 completion_tracker instead of a VEC.
9118 (string_or_empty): New.
9119 (collect_explicit_location_matches): Adjust to work with a
9120 completion_tracker instead of a VEC.
9121 (explicit_location_completer): Rename to ...
9122 (complete_explicit_location): ... this and adjust to work with a
9123 completion_tracker instead of a VEC.
9124 (location_completer): Adjust to work with a completion_tracker
9125 instead of a VEC.
9126 (add_struct_fields): Adjust to work with a completion_list instead
9127 of VEC.
9128 (expression_completer): Rename to ...
9129 (complete_expression): ... this and adjust to work with a
9130 completion_tracker instead of a VEC. Use complete_files_symbols.
9131 (expression_completer): Reimplement on top of complete_expression.
9132 (symbol_completer): Adjust to work with a completion_tracker
9133 instead of a VEC.
9134 (enum complete_line_internal_reason): Add describing comments.
9135 (complete_line_internal_normal_command): Adjust to work with a
9136 completion_tracker instead of a VEC.
9137 (complete_line_internal): Rename to ...
9138 (complete_line_internal_1): ... this and adjust to work with a
9139 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9140 handle_brkchars phase.
9141 (new_completion_tracker): Delete.
9142 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9143 complete_line_internal_1.
9144 (free_completion_tracker): Delete.
9145 (INITIAL_COMPLETION_HTAB_SIZE): New.
9146 (completion_tracker::completion_tracker)
9147 (completion_tracker::~completion_tracker): New.
9148 (maybe_add_completion): Delete.
9149 (completion_tracker::maybe_add_completion)
9150 (completion_tracker::add_completion)
9151 (completion_tracker::add_completions): New.
9152 (throw_max_completions_reached_error): Delete.
9153 (complete_line): Adjust to work with a completion_tracker instead
9154 of a VEC. Don't create a completion_tracker_t or check for max
9155 completions here.
9156 (command_completer, command_completer_handle_brkchars)
9157 (signal_completer, reg_or_group_completer_1)
9158 (reg_or_group_completer, default_completer_handle_brkchars):
9159 Adjust to work with a completion_tracker.
9160 (gdb_completion_word_break_characters_throw): New.
9161 (gdb_completion_word_break_characters): Reimplement.
9162 (line_completion_function): Delete.
9163 (completion_tracker::recompute_lowest_common_denominator)
9164 (expand_preserving_ws)
9165 (completion_tracker::build_completion_result)
9166 (completion_result::completion_result)
9167 (completion_result::completion_result)
9168 (completion_result::~completion_result)
9169 (completion_result::completion_result)
9170 (completion_result::release_match_list, compare_cstrings)
9171 (completion_result::sort_match_list)
9172 (completion_result::reset_match_list)
9173 (gdb_rl_attempted_completion_function_throw)
9174 (gdb_rl_attempted_completion_function): New.
9175 * completer.h (completion_list, struct completion_result)
9176 (class completion_tracker): New.
9177 (complete_line): Add completion_tracker parameter.
9178 (readline_line_completion_function): Delete.
9179 (gdb_rl_attempted_completion_function): New.
9180 (noop_completer, filename_completer, expression_completer)
9181 (location_completer, symbol_completer, command_completer)
9182 (signal_completer, reg_or_group_completer): Update prototypes.
9183 (completion_tracker_t, new_completion_tracker)
9184 (make_cleanup_free_completion_tracker): Delete.
9185 (enum maybe_add_completion_enum): Delete.
9186 (maybe_add_completion): Delete.
9187 (throw_max_completions_reached_error): Delete.
9188 * corefile.c (complete_set_gnutarget): Adjust to work with a
9189 completion_tracker instead of a VEC.
9190 * cp-abi.c (cp_abi_completer): Adjust to work with a
9191 completion_tracker instead of a VEC.
9192 * d-lang.c (d_language_defn): Adjust.
9193 * disasm.c (disassembler_options_completer): Adjust to work with a
9194 completion_tracker instead of a VEC.
9195 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9196 (f_collect_symbol_completion_matches): ... this. Adjust to work
9197 with a completion_tracker instead of a VEC.
9198 (f_language_defn): Adjust.
9199 * go-lang.c (go_language_defn): Adjust.
9200 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9201 Adjust to work with a completion_tracker instead of a VEC.
9202 * infrun.c (handle_completer): Likewise.
9203 * interps.c (interpreter_completer): Likewise.
9204 * interps.h (interpreter_completer): Likewise.
9205 * language.c (unknown_language_defn, auto_language_defn)
9206 (local_language_defn): Adjust.
9207 * language.h (language_defn::la_make_symbol_completion_list):
9208 Rename to ...
9209 (language_defn::la_collect_symbol_completion_matches): ... this
9210 and adjust to work with a completion_tracker instead of a VEC.
9211 * m2-lang.c (m2_language_defn): Adjust.
9212 * objc-lang.c (objc_language_defn): Adjust.
9213 * opencl-lang.c (opencl_language_defn): Adjust.
9214 * p-lang.c (pascal_language_defn): Adjust.
9215 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9216 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9217 with a completion_tracker.
9218 * rust-lang.c (rust_language_defn): Adjust.
9219 * symtab.c (free_completion_list, do_free_completion_list)
9220 (return_val, completion_tracker): Delete.
9221 (completion_list_add_name, completion_list_add_symbol)
9222 (completion_list_add_msymbol, completion_list_objc_symbol)
9223 (completion_list_add_fields, add_symtab_completions): Add
9224 completion_tracker parameter and use it.
9225 (default_make_symbol_completion_list_break_on_1): Rename to...
9226 (default_collect_symbol_completion_matches_break_on): ... this.
9227 Add completion_tracker parameter and use it instead of allocating
9228 a completion tracker here.
9229 (default_make_symbol_completion_list_break_on): Delete old
9230 implementation.
9231 (default_make_symbol_completion_list): Delete.
9232 (default_collect_symbol_completion_matches): New.
9233 (make_symbol_completion_list): Delete.
9234 (collect_symbol_completion_matches): New.
9235 (make_symbol_completion_type): Rename to ...
9236 (collect_symbol_completion_matches_type): ... this. Add
9237 completion_tracker parameter and use it instead of VEC.
9238 (make_file_symbol_completion_list_1): Rename to...
9239 (collect_file_symbol_completion_matches): ... this. Add
9240 completion_tracker parameter and use it instead of VEC.
9241 (make_file_symbol_completion_list): Delete.
9242 (add_filename_to_list): Use completion_list instead of a VEC.
9243 (add_partial_filename_data::list): Now a completion_list.
9244 (make_source_files_completion_list): Work with a completion_list
9245 instead of a VEC.
9246 * symtab.h: Include "completer.h".
9247 (default_make_symbol_completion_list_break_on)
9248 (default_make_symbol_completion_list, make_symbol_completion_list)
9249 (make_symbol_completion_type, make_file_symbol_completion_list)
9250 (make_source_files_completion_list): Delete.
9251 (default_collect_symbol_completion_matches_break_on)
9252 (default_collect_symbol_completion_matches)
9253 (collect_symbol_completion_matches)
9254 (collect_symbol_completion_matches_type)
9255 (collect_file_symbol_completion_matches)
9256 (make_source_files_completion_list): New.
9257 * top.c (init_main): Don't install a rl_completion_entry_function
9258 hook. Install a rl_attempted_completion_function hook instead.
9259 * tui/tui-layout.c (layout_completer): Adjust to work with a
9260 completion_tracker.
9261 * tui/tui-regs.c (tui_reggroup_completer):
9262 * tui/tui-win.c (window_name_completer, focus_completer)
9263 (winheight_completer): Adjust to work with a completion_tracker.
9264 * value.c: Include "completer.h".
9265 (complete_internalvar): Adjust to work with a completion_tracker.
9266 * value.h (complete_internalvar): Likewise.
9267
6e1dbf8c
PA
92682017-07-17 Pedro Alves <palves@redhat.com>
9269
9270 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9271 renames.
9272 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9273 comments to completer_ftype's declaration.
9274 <completer_handle_brkchars>: Change type to
9275 completer_handle_brkchars_ftype.
9276 * command.h (completer_ftype): Add describing comment and give
9277 names to parameters.
9278 (completer_ftype_void): Rename to ...
9279 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9280 (set_cmd_completer_handle_brkchars): Adjust.
9281 * completer.c (filename_completer_handle_brkchars): New function.
9282 (complete_line_internal_normal_command): New function, factored
9283 out from ...
9284 (complete_line_internal): ... here.
9285 (command_completer_handle_brkchars)
9286 (default_completer_handle_brkchars)
9287 (completer_handle_brkchars_func_for_completer): New functions.
9288 * completer.h (set_gdb_completion_word_break_characters): Delete
9289 declaration.
9290 (completer_handle_brkchars_func_for_completer): New declaration.
9291 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9292 completer_handle_brkchars_func_for_completer.
9293
78b13106
PA
92942017-07-17 Pedro Alves <palves@redhat.com>
9295
9296 * completer.c (symbol_completer): New function, based on
9297 make_symbol_completion_list_fn.
9298 * completer.h (symbol_completer): New declaration.
9299 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9300 * python/py-cmd.c (completers): Adjust.
9301 * symtab.c (make_symbol_completion_list_fn): Delete.
9302 * symtab.h (make_symbol_completion_list_fn): Delete.
9303 * cli/cli-decode.c (add_cmd): Adjust.
9304
bbf2f4df
PA
93052017-07-17 Pedro Alves <palves@redhat.com>
9306
9307 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9308 * dwarf2read.c: Include "filename-seen-cache.h".
9309 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9310 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9311 * filename-seen-cache.c: New file.
9312 * filename-seen-cache.h: New file.
9313 * symtab.c: Include "filename-seen-cache.h".
9314 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9315 (create_filename_seen_cache, clear_filename_seen_cache)
9316 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9317 to filename-seen-cache.h/filename-seen-cache.c.
9318 (output_source_filename, sources_info)
9319 (maybe_add_partial_symtab_filename)
9320 (make_source_files_completion_list): Adjust to use
9321 filename_seen_cache.
9322
330cdd98
PA
93232017-07-17 Pedro Alves <palves@redhat.com>
9324
9325 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9326 fields.
9327 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9328 dwarf2_debug_sections*)): New.
9329 (dwarf2_per_objfile::dwarf2_per_objfile(const
9330 dwarf2_per_objfile&)): Declare as deleted.
9331 (dwarf2_per_objfile::operator=): Declare as deleted.
9332 (dwarf2_per_objfile::dwarf2_per_objfile)
9333 (dwarf2_per_objfile::~dwarf2_per_objfile)
9334 (dwarf2_per_objfile::free_cached_comp_units): New.
9335 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9336 ctor. Call dwarf2_per_objfile's ctor manually.
9337 (dwarf2_locate_sections): Deleted/refactored as ...
9338 (dwarf2_per_objfile::locate_sections): ... this new method.
9339 (free_cached_comp_units): Defer to
9340 dwarf2_per_objfile::free_cached_comp_units.
9341 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9342
8880f2a9
TT
93432017-07-14 Tom Tromey <tom@tromey.com>
9344
9345 PR rust/21764:
9346 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9347 parameter.
9348 <UNOP_SIZEOF>: Split into separate case.
9349 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9350
65547233
TT
93512017-07-14 Tom Tromey <tom@tromey.com>
9352
9353 PR rust/21763:
9354 * symtab.c (symbol_matches_domain): Add language_rust to special
9355 case.
9356 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9357 treat LOC_TYPEDEF symbols as variables.
9358
8f14146e
PA
93592017-07-14 Pedro Alves <palves@redhat.com>
9360
9361 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9362 symtabs matching all symtabs with SRCFILE as file name instead of
9363 only considering the first hit, with lookup_symtab.
9364
2347965c
SM
93652017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9366
9367 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9368 operator_name parameters.
9369 (gen_expr): Update function call.
9370
40f4af28
SM
93712017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9372
9373 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9374 parameter.
9375 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9376 Likewise.
9377 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9378 parameter, use agent_expr::gdbarch instead, update function
9379 calls.
9380 (locexpr_tracepoint_var_ref): Likewise.
9381 (loclist_tracepoint_var_ref): Likewise.
9382 * ax-gdb.c (gen_trace_static_fields): Likewise.
9383 (gen_traced_pop): Likewise.
9384 (gen_frame_args_address): Likewise.
9385 (gen_frame_locals_address): Likewise.
9386 (gen_var_ref): Likewise.
9387 (gen_struct_ref_recursive): Likewise.
9388 (gen_static_field): Likewise.
9389 (gen_maybe_namespace_elt): Likewise.
9390 (gen_expr): Likewise.
9391 (gen_trace_for_var): Likewise.
9392 (gen_trace_for_expr): Likewise.
9393 (gen_trace_for_return_address): Likewise.
9394
053f8057
SM
93952017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9396
9397 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9398 parameter.
9399 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9400
6661ad48
SM
94012017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9402
9403 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9404 from ax, update calls.
9405 (gen_usual_arithmetic): Likewise.
9406 (gen_integral_promotions): Likewise.
9407 (gen_bitfield_ref): Likewise.
9408 (gen_primitive_field): Likewise.
9409 (gen_struct_ref_recursive): Likewise.
9410 (gen_struct_ref): Likewise.
9411 (gen_maybe_namespace_elt): Likewise.
9412 (gen_struct_elt_for_reference): Likewise.
9413 (gen_namespace_elt): Likewise.
9414 (gen_aggregate_elt_ref): Likewise.
9415 (gen_expr): Get gdbarch from ax, update calls.
9416 (gen_expr_binop_rest): Likewise.
9417
c55a47e7
PA
94182017-07-13 Pedro Alves <palves@redhat.com>
9419
9420 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9421 as default tdesc.
9422 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9423 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9424 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9425 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9426 tdep.
9427 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9428 Get final tdesc from the tdep.
9429 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9430 default tdesc.
9431 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9432 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9433 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9434 Use it as default tdesc.
9435 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9436 down to amd_init_abi. No longer handle fallback tdesc here.
9437 * amd64-tdep.h (tdesc_x32): Declare.
9438 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9439 parameter.
9440 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9441 as default tdesc.
9442
55efceab
AA
94432017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9444
9445 * s390-linux-tdep.c (s390_process_record): Add support for
9446 instructions new in arch12.
9447
0aa37b65
JB
94482017-07-11 John Baldwin <jhb@FreeBSD.org>
9449
9450 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9451 PT_GETFSBASE and PT_GETGSBASE.
9452 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9453 PT_SETGSBASE.
9454
48aeef91
JB
94552017-07-11 John Baldwin <jhb@FreeBSD.org>
9456
9457 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9458 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9459 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9460 those rules.
9461 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9462 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9463 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9464 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9465 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9466 * features/i386/amd64.xml: Add 64bit-segments.xml.
9467 * features/i386/amd64-avx-avx512.c: Regenerated.
9468 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9469 * features/i386/amd64-avx-mpx.c: Regenerated.
9470 * features/i386/amd64-avx.c: Regenerated.
9471 * features/i386/amd64-mpx.c: Regenerated.
9472 * features/i386/amd64.c: Regenerated.
9473 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9474 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9475 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9476 * regformats/i386/amd64-avx.dat: Regenerated.
9477 * regformats/i386/amd64-mpx.dat: Regenerated.
9478 * regformats/i386/amd64.dat: Regenerated.
9479
77c501bc
YQ
94802017-07-10 Yao Qi <yao.qi@linaro.org>
9481
9482 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9483 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9484
6dc8d757
AK
94852017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9486
9487 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9488 unsetenv.
9489 * gnulib/aclocal.m4: Regenerate.
9490 * gnulib/config.in: Regenerate.
9491 * gnulib/configure: Regenerate.
9492 * gnulib/import/Makefile.am: Regenerate.
9493 * gnulib/import/Makefile.in: Regenerate.
9494 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9495 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9496 * gnulib/import/m4/environ.m4: New file.
9497 * gnulib/import/m4/setenv.m4: New file.
9498 * gnulib/import/setenv.c: New file.
9499 * gnulib/import/unsetenv.c: New file.
9500
266934d1
SM
95012017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9502
9503 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9504 address when op is DW_OP_addr.
9505
03278692
TT
95062017-07-09 Tom Tromey <tom@tromey.com>
9507
9508 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9509 check and apply to outer type.
9510
4b654465
JB
95112017-07-07 John Baldwin <jhb@FreeBSD.org>
9512
9513 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9514 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9515 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9516 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9517
2af9fc44
JB
95182017-07-07 John Baldwin <jhb@FreeBSD.org>
9519
9520 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9521
382b69bb
JB
95222017-07-07 John Baldwin <jhb@FreeBSD.org>
9523
9524 * corelow.c (get_core_siginfo): Remove.
9525 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9526 instead of get_core_siginfo.
9527 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9528 * gdbarch.h: Re-generate.
9529 * gdbarch.c: Re-generate.
9530 * linux-tdep.c (linux_core_xfer_siginfo): New.
9531 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9532
6e5eab33
JB
95332017-07-07 John Baldwin <jhb@FreeBSD.org>
9534
9535 * corelow.c (thread_section_name): Move to ...
9536 * gdbcore.h (thread_section_name): ... here.
9537
929edea9
JB
95382017-07-07 John Baldwin <jhb@FreeBSD.org>
9539
9540 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9541 (struct siginfo32): New.
9542 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9543 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9544 via ptrace(PT_LWPINFO).
9545
762c974a
JB
95462017-07-07 John Baldwin <jhb@FreeBSD.org>
9547
9548 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9549 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9550 (fbsd_get_siginfo_type): New.
9551 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9552 (_initialize_fbsd_tdep): New.
9553
33c5cd75
DB
95542017-07-06 David Blaikie <dblaikie@gmail.com>
9555
9556 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9557 a singular dwo_unit*) to support multiple CUs in the same way that
9558 multiple TUs are supported.
9559 (create_cus_hash_table): Replace create_dwo_cu with a function for
9560 parsing multiple CUs from a DWO file.
9561 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9562 create_dwo_cu.
9563 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9564 htab_find, rather than comparing the signature to a singleton CU in
9565 the dwo_file.
9566
8455d262
PA
95672017-07-06 Pedro Alves <palves@redhat.com>
9568
9569 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9570
4da3eb35
PA
95712017-07-04 Pedro Alves <palves@redhat.com>
9572
9573 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9574 * gdbtypes.h (TYPE_STATIC): Delete.
9575 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9576 is_synchronized, is_native>: Delete.
9577 <dummy>: Bump.
9578 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9579 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9580 (TYPE_FN_FIELD_ABSTRACT): Delete.
9581
5bfd255c
SM
95822017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9583
9584 * buffer.h (buffer_finish): Fix spelling mistakes.
9585
25c54127
EZ
95862017-07-01 Eli Zaretskii <eliz@gnu.org>
9587
9588 * .dir-locals.el: Automatically switch to C-style comments in
9589 versions of Emacs that support the feature.
9590
dc4bde35
SDJ
95912017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9592 Pedro Alves <palves@redhat.com>
9593
9594 PR cli/21688
9595 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9596 (process_next_line): New variable 'inline_cmd'.
9597 Adjust 'if' clauses for "python", "compile" and "guile" to use
9598 'command_name_equals' and check for '!inline_cmd'.
9599
51ed89aa
SDJ
96002017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9601
9602 PR cli/21688
9603 * cli/cli-script.c (command_name_equals_not_inline): New function.
9604 (process_next_line): Adjust 'if' clauses for "python", "compile"
9605 and "guile" to use command_name_equals_not_inline.
9606
eb17d413
PA
96072017-06-29 Pedro Alves <palves@redhat.com>
9608
9609 * completer.c (expression_completer): Call
9610 linespec_location_completer instead of location_completer.
9611
195bcdd5
PA
96122017-06-29 Pedro Alves <palves@redhat.com>
9613
9614 * completer.c (expression_completer): Remove code that recomputes
9615 'text' from 'word'.
9616
adc764e7
YQ
96172017-06-29 Yao Qi <yao.qi@linaro.org>
9618
9619 * regformats/regdat.sh: Generate code with
9620 "ifndef IN_PROCESS_AGENT".
9621
6e75794e
PA
96222017-06-28 Pedro Alves <palves@redhat.com>
9623
9624 * command.h: Include "common/scoped_restore.h".
9625
bc491f2e
YQ
96262017-06-28 Yao Qi <yao.qi@linaro.org>
9627
9628 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9629 instead of obstack_grow.
9630
41664b45
DG
96312017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9632
9633 PR gdb/21337
9634 * symfile.c (reread_symbols): Call objfiles_changed just before
9635 read_symbols.
9636
6da67eb1
PA
96372017-06-27 Pedro Alves <palves@redhat.com>
9638
9639 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9640 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9641 (completion_list_add_symbol, completion_list_add_msymbol):
9642 ... these new functions.
9643 (add_symtab_completions)
9644 (default_make_symbol_completion_list_break_on_1): Adjust.
9645
23732b1e
PA
96462017-06-27 Pedro Alves <palves@redhat.com>
9647
9648 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9649 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9650 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9651 dtor.
9652 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9653 'storage_obstack' field an auto_obstack. In-class initialize all
9654 non-bitfield fields. Make minsyms_read bool.
9655 * symfile.c (read_symbols): Adjust.
9656
a4d1e79a
AH
96572017-06-27 Alan Hayward <alan.hayward@arm.com>
9658
9659 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9660 (gdbsim_store_register): Likewise.
9661
8268c778
PA
96622017-06-27 Pedro Alves <palves@redhat.com>
9663
9664 * c-exp.y (name_obstack): Now an auto_obstack.
9665 (yylex): Use auto_obstack::clear.
9666 (c_parse): Use auto_obstack::clear instead of reinitializing and
9667 freeing the obstack.
9668 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9669 * d-exp.y (name_obstack): Now an auto_obstack.
9670 (yylex): Use auto_obstack::clear.
9671 (d_parse): Use auto_obstack::clear instead of reinitializing and
9672 freeing the obstack.
9673 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9674 auto_obstack.
9675 * dwarf2read.c (create_addrmap_from_index)
9676 (dwarf2_build_psymtabs_hard)
9677 (update_enumeration_type_from_children): Likewise.
9678 * gdb_obstack.h (auto_obstack): New type.
9679 * go-exp.y (name_obstack): Now an auto_obstack.
9680 (build_packaged_name): Use auto_obstack::clear.
9681 (go_parse): Use auto_obstack::clear instead of reinitializing and
9682 freeing the obstack.
9683 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9684 auto_obstack.
9685 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9686 * rust-exp.y (work_obstack): Now an auto_obstack.
9687 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9688 reinitializing and freeing the obstack.
9689 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9690 (host_char_to_target): Use auto_obstack.
9691 * utils.h (make_cleanup_obstack_free): Delete declaration.
9692 * valprint.c (generic_emit_char, generic_printstr): Use
9693 auto_obstack.
9694
db665f42
SM
96952017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9696
9697 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9698 thread.
9699 (darwin_init_thread_list): Don't update dummy thread.
9700 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9701
873c0814
SM
97022017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9703
9704 * record-full.c (netorder16): Remove.
9705
8b5a7a6e
SM
97062017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9707
9708 * common/diagnostics.h: Define macros for GCC.
9709 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9710 * common/vec.h: Include diagnostics.h.
9711 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9712 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9713 warning.
9714
d1435379
SM
97152017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9716
9717 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9718 New macro.
9719 * ada-lex.l: Ignore deprecated register warnings.
9720
cc75e0fd
SM
97212017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9722
9723 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9724 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9725
07809eaf
SM
97262017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9727
9728 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9729 its own line.
9730
f076f034
SM
97312017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9732
9733 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9734
0dd5cbc5
AH
97352017-06-23 Alan Hayward <alan.hayward@arm.com>
9736
9737 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9738 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9739 (xtensa_register_read_masked): Likewise.
9740
d4c6ce5b
SDJ
97412017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9742
9743 * common/environ.c (gdb_environ::unset): Update comment.
9744
16892a03
AH
97452017-06-22 Alan Hayward <alan.hayward@arm.com>
9746
9747 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9748 registers.
9749
d7dcbefc
AH
97502017-06-22 Alan Hayward <alan.hayward@arm.com>
9751
9752 * record-full.c (record_full_exec_insn): Use byte_vector.
9753
b30ff123
YQ
97542017-06-22 Yao Qi <yao.qi@linaro.org>
9755
9756 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9757 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9758
4fa847d7
AH
97592017-06-22 Alan Hayward <alan.hayward@arm.com>
9760
9761 * remote.c (cached_reg): Move from here...
9762 * regcache.h (cached_reg): ...to here.
9763 * python/py-unwind.c (struct reg_info): Remove.
9764 (cached_frame_info): Use cached_reg_t.
9765 (pyuw_prev_register): Likewise.
9766 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9767 (pyuw_dealloc_cache): Free all registers.
9768
f4906a9a
PA
97692017-06-22 Pedro Alves <palves@redhat.com>
9770 Simon Marchi <simon.marchi@ericsson.com>
9771
9772 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9773 warning.
9774 * common/diagnostics.h: New file.
9775
b45a1208
PA
97762017-06-22 Pedro Alves <palves@redhat.com>
9777
9778 * common/agent.h: Add include guards.
9779
e4da2c61
SM
97802017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9781
9782 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9783 talk about addressable units instead of bytes.
9784
96160d60
SDJ
97852017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9786
9787 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9788 of '::const_iterator'.
9789
9a6c7d9c
SDJ
97902017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9791
9792 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9793 'unittests/environ-selftests.c'.
9794 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9795 * charset.c (find_charset_names): Declare object 'iconv_env'.
9796 Update code to use 'iconv_env' object. Remove call to
9797 'free_environ'.
9798 * common/environ.c: Include <utility>.
9799 (make_environ): Delete function.
9800 (free_environ): Delete function.
9801 (gdb_environ::clear): New function.
9802 (gdb_environ::operator=): New function.
9803 (gdb_environ::get): Likewise.
9804 (environ_vector): Delete function.
9805 (set_in_environ): Delete function.
9806 (gdb_environ::set): New function.
9807 (unset_in_environ): Delete function.
9808 (gdb_environ::unset): New function.
9809 (gdb_environ::envp): Likewise.
9810 * common/environ.h: Include <vector>.
9811 (struct gdb_environ): Delete; transform into...
9812 (class gdb_environ): ... this class.
9813 (free_environ): Delete prototype.
9814 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9815 environ_vector): Likewise.
9816 * infcmd.c (run_command_1): Update code to call
9817 'envp' from 'gdb_environ' class.
9818 (environment_info): Update code to call methods from 'gdb_environ'
9819 class.
9820 (unset_environment_command): Likewise.
9821 (path_info): Likewise.
9822 (path_command): Likewise.
9823 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9824 (inferior::inferior): Initialize 'environment' using the host's
9825 information.
9826 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9827 Include "environ.h".
9828 (class inferior) <environment>: Change type from 'struct
9829 gdb_environ' to 'gdb_environ'.
9830 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9831 methods from 'gdb_environ' class.
9832 * solib.c (solib_find_1): Likewise
9833 * unittests/environ-selftests.c: New file.
9834
75c554cf
YQ
98352017-06-20 Yao Qi <yao.qi@linaro.org>
9836
9837 * features/i386/i386-linux.xml: Exchange the order of including
9838 32bit-linux.xml and 32bit-sse.xml.
9839 * features/i386/i386-linux.c: Regenerated.
9840
72ddacb7
YQ
98412017-06-20 Yao Qi <yao.qi@linaro.org>
9842
9843 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9844 Delete copy ctor and assignment operator.
9845 (tdesc_type): Likewise.
9846 (tdesc_feature): Likewise.
9847 (tdesc_free_reg): Remove.
9848 (tdesc_create_reg): Use new.
9849 (tdesc_free_type): Remove.
9850 (tdesc_create_vector): Use new.
9851 (tdesc_create_union): Likewise.
9852 (tdesc_create_flags): Likewise.
9853 (tdesc_create_enum): Likewise.
9854 (tdesc_free_feature): Delete.
9855 (free_target_description): Use delete.
9856
325c9fd4
JB
98572017-06-19 John Baldwin <jhb@FreeBSD.org>
9858
9859 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9860 registers.
9861
16b7a719
PA
98622017-06-19 Pedro Alves <palves@redhat.com>
9863
9864 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9865 after gdb::unlinker.
9866
1c8e01c9
SDJ
98672017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9868
9869 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9870 gdb_environ to access an environment variable.
9871
ffce45d2
TP
98722017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9873
9874 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9875 gdb_byte*.
9876
1d4fbac9
SM
98772017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9878
9879 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9880
8465943a
SM
98812017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9882
9883 * configure: Re-generate.
9884 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9885
3e019bdc
SM
98862017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9887
9888 * configure: Re-generate.
9889 * warning.m4: Pass -Werror to compiler when checking for
9890 supported warning flags.
9891
cf0dd6f0
SM
98922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9893
9894 * Makefile.in (COMPILE.pre): Add "-x c++".
9895
6f98355c
YQ
98962017-06-16 Alan Hayward <alan.hayward@arm.com>
9897 Pedro Alves <palves@redhat.com>
9898 Yao Qi <yao.qi@linaro.org>
9899
9900 * defs.h (RequireLongest): New.
9901 (extract_integer): Declare function template.
9902 (extract_signed_integer): Remove the declaration, but define it
9903 static inline.
9904 (extract_unsigned_integer): Likewise.
9905 (store_integer): Declare function template.
9906 (store_signed_integer): Remove the declaration, but define it
9907 static inline.
9908 (store_unsigned_integer): Likewise.
9909 * findvar.c (extract_integer): New function template.
9910 (extract_signed_integer): Remove.
9911 (extract_unsigned_integer): Remove.
9912 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9913 instantiations.
9914 (store_integer): New function template.
9915 (store_signed_integer): Remove.
9916 (store_unsigned_integer): Remove.
9917 (store_integer): Explicit instantiations.
9918 * regcache.c (regcache_raw_read_signed): Update.
9919 (regcache::raw_read): New function.
9920 (regcache::raw_read_signed): Remove.
9921 (regcache::raw_read_unsigned): Remove.
9922 (regcache_raw_read_unsigned): Update.
9923 (regcache_raw_write_unsigned): Update.
9924 (regcache::raw_write_signed): Remove.
9925 (regcache::raw_write): New function.
9926 (regcache_cooked_read_signed): Update.
9927 (regcache::raw_write_unsigned): Remove.
9928 (regcache::cooked_read_signed): Remove.
9929 (regcache_cooked_read_unsigned): Update.
9930 (regcache::cooked_read_unsigned): Remove.
9931 (regcache_cooked_write_signed): Update.
9932 (regcache_cooked_write_unsigned): Update.
9933 * regcache.h (regcache) <raw_read_signed>: Remove.
9934 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9935 <raw_read, raw_write>: New.
9936 <cooked_read_signed, cooked_write_signed>: Remove.
9937 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9938 <cooked_read, cooked_write>: New.
9939 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9940 (sh64_pseudo_register_write): Update.
9941
a87dc45a
AK
99422017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9943
9944 * arc-tdep.c (arc_disassembler_options): New variable.
9945 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9946 of default_print_insn.
9947 (arc_delayed_print_insn): Set info->section when needed,
9948 use default_print_insn to retrieve a disassembler.
9949
45159d6a
SDJ
99502017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9951
9952 PR gdb/21574
9953 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9954 to mention $SHELL and startup-with-shell.
9955
b46c4cf0
MF
99562017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9957
9958 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9959
6394c606
YQ
99602017-06-14 Yao Qi <yao.qi@linaro.org>
9961
9962 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9963 default_print_insn instead of print_insn_aarch64.
9964 * arm-tdep.c (gdb_print_insn_arm): Call
9965 default_print_insn instead of print_insn_big_arm
9966 and print_insn_little_arm.
9967 * i386-tdep.c (i386_print_insn): Call default_print_insn
9968 instead of print_insn_i386.
9969 * ia64-tdep.c (ia64_print_insn): Call
9970 default_print_insn instead of print_insn_ia64.
9971 * mips-tdep.c (gdb_print_insn_mips): Call
9972 default_print_insn instead of print_insn_big_mips
9973 and print_insn_little_mips.
9974 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9975 instead of print_insn_spu.
9976
d5722aa2
PA
99772017-06-14 Pedro Alves <palves@redhat.com>
9978
9979 * ada-lang.c: Include "common/byte-vector.h".
9980 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9981 * charset.c (wchar_iterator::iterate): Resize the vector instead
9982 of reserving it.
9983 * common/byte-vector.h: Include "common/def-vector.h".
9984 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9985 * cli/cli-dump.c: Include "common/byte-vector.h".
9986 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9987 * common/byte-vector.h: New file.
9988 * common/def-vector.h: New file.
9989 * common/default-init-alloc.h: New file.
9990 * dwarf2loc.c: Include "common/byte-vector.h".
9991 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9992 instead of reserving it.
9993 * dwarf2read.c: Include "common/byte-vector.h".
9994 (data_buf::m_vec): Now a gdb::byte_vector.
9995 * gdb_regex.c: Include "common/def-vector.h".
9996 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9997 * mi/mi-main.c: Include "common/byte-vector.h".
9998 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9999 * printcmd.c: Include "common/byte-vector.h".
10000 (print_scalar_formatted): Use gdb::byte_vector.
10001 * valprint.c: Include "common/byte-vector.h".
10002 (maybe_negate_by_bytes, print_decimal_chars): Use
10003 gdb::byte_vector.
10004
01ec7a27
SM
100052017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10006
10007 * darwin-nat.c: Include "nat/fork-inferior.h".
10008
848d9074
SM
100092017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10010
10011 * configure.nat: Factor out Darwin bits that are not
10012 architecture-specific. Add fork-inferior.o.
10013
3b912944
SM
100142017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10015
10016 * configure.nat: Factor out AIX bits that are not
10017 architecture-specific. Add fork-inferior.o.
10018
55acdf22
AA
100192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10020
10021 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10022 (read_pieced_value, write_pieced_value): ...here. Reduce to
10023 wrappers that just call rw_pieced_value.
10024
f65e2044
AA
100252017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10026
10027 * dwarf2loc.c (write_pieced_value): When writing the data for a
10028 memory piece, use write_memory_with_notification instead of
10029 write_memory.
10030
23f945bf
AA
100312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10032
10033 * valops.c (read_value_memory): Change embedded_offset to
10034 represent a bit offset instead of a byte offset.
10035 * value.h (read_value_memory): Adjust comment.
10036
f236533e
AA
100372017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10038
10039 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10040 dest_offset_bits and source_offset_bits.
10041 (write_pieced_value): Likewise.
10042
65d84b76
AA
100432017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10044
10045 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10046 given by DW_OP_bit_piece.
10047 (write_pieced_value): Likewise.
10048
242d31ab
AA
100492017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10050
10051 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10052 some other preparations to the places where sufficient information
10053 is available.
10054 (write_pieced_value): Likewise.
10055
03c8af18
AA
100562017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10057
10058 * dwarf2loc.c (bits_to_bytes): New function.
10059 (read_pieced_value): Fix offset calculations for register pieces
10060 on big-endian targets.
10061 (write_pieced_value): Likewise.
10062
840989c1
AA
100632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10064
10065 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10066 (write_pieced_value): Likewise.
10067
359b19bb
AA
100682017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10069
10070 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10071 transfer the source value's least significant bits, instead of its
10072 lowest-addressed ones. Rename type_len to max_offset.
10073 (read_pieced_value): Mirror above changes to write_pieced_value as
10074 applicable.
10075
07c9ca3b
AA
100762017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10077
10078 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10079 truncate full bytes from dest_offset_bits before using it as an
10080 offset into the buffer.
10081
f1cc9874
AA
100822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10083
10084 * dwarf2loc.c (write_pieced_value): Include transfer size in
10085 byte-wise check.
10086
cdaac320
AA
100872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10088
10089 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10090 calculation of this_size.
10091
af547a96
AA
100922017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10093
10094 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10095 when targeting a bit-field.
10096 (write_pieced_value): Likewise.
10097
ddd7882a
AA
100982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10099
10100 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10101 (allocate_piece_closure): Drop addr_size parameter.
10102 (dwarf2_evaluate_loc_desc_full): Adjust call to
10103 allocate_piece_closure.
10104
e9352324
AA
101052017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10106
10107 PR gdb/21226
10108 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10109 the LSB end, independent of endianness.
10110
d5d1163e
AA
101112017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10112
10113 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10114 size capping.
10115
032bb6ea
YQ
101162017-06-13 Yao Qi <yao.qi@linaro.org>
10117
10118 * mips-linux-nat.c: Move include features/mips*-linux.c to
10119 mips-linux-tdep.c.
10120 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10121 to mips-linux-tdep.c.
10122 * mips-linux-tdep.c: Include features/mips*-linux.c
10123 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10124 functions.
10125 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10126 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10127 (tdesc_mips64_dsp_linux): Declare.
10128
f12f6bad
TT
101292017-06-12 Tom Tromey <tom@tromey.com>
10130
10131 * valprint.h (val_print_type_code_int): Remove.
10132 * valprint.c (generic_val_print_int): Always call
10133 val_print_scalar_formatted.
10134 (val_print_type_code_int): Remove.
10135 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10136 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10137 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10138 * ada-valprint.c (ada_val_print_num): Use
10139 val_print_scalar_formatted.
10140
d9109c80
TT
101412017-06-12 Tom Tromey <tom@tromey.com>
10142
10143 * printcmd.c (print_scalar_formatted): Unify the two switches.
10144 Don't convert scalars to LONGEST.
10145
4ac0cb1c
TT
101462017-06-12 Tom Tromey <tom@tromey.com>
10147
10148 PR exp/16225:
10149 * valprint.h (print_decimal_chars): Update.
10150 * valprint.c (maybe_negate_by_bytes): New function.
10151 (print_decimal_chars): Add "is_signed" argument.
10152 * printcmd.c (print_scalar_formatted): Update.
10153
30a25466
TT
101542017-06-12 Tom Tromey <tom@tromey.com>
10155
10156 PR exp/16225:
10157 * valprint.h (print_binary_chars, print_hex_chars): Update.
10158 * valprint.c (val_print_type_code_int): Update.
10159 (print_binary_chars): Add "zero_pad" argument.
10160 (emit_octal_digit): New function.
10161 (print_octal_chars): Don't zero-pad.
10162 (print_decimal_chars): Likewise.
10163 (print_hex_chars): Add "zero_pad" argument.
10164 * sh64-tdep.c (sh64_do_fp_register): Update.
10165 * regcache.c (regcache::dump): Update.
10166 * printcmd.c (print_scalar_formatted): Update.
10167 * infcmd.c (default_print_one_register_info): Update.
10168
b3464d03
PA
101692017-06-12 Pedro Alves <palves@redhat.com>
10170 Alan Hayward <alan.hayward@arm.com>
10171
10172 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10173 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10174 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10175 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10176 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10177
4b76cda9
PA
101782017-06-12 Pedro Alves <palves@redhat.com>
10179
10180 * dwarf2read.c (mapped_symtab::data): Now a vector of
10181 symtab_index_entry instead of vector of
10182 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10183 whether an element's name is NULL instead of checking whether the
10184 element itself is NULL.
10185 (find_slot): Change return type. Adjust.
10186 (hash_expand, , add_index_entry, uniquify_cu_indices)
10187 (write_hash_table): Adjust.
10188
e8f8bcb3
PA
101892017-06-12 Pedro Alves <palves@redhat.com>
10190
10191 * dwarf2read.c (recursively_count_psymbols): New function.
10192 (write_psymtabs_to_index): Call it to compute number of psyms and
10193 pass estimate size of psyms_seen to unordered_set's ctor.
10194
70a1152b
PA
101952017-06-12 Pedro Alves <palves@redhat.com>
10196
10197 * dwarf2read.c (write_hash_table): Check if key already exists
10198 before emplacing.
10199
c2f134ac
PA
102002017-06-12 Pedro Alves <palves@redhat.com>
10201
10202 * dwarf2read.c (data_buf::append_space): Rename to...
10203 (data_buf::grow): ... this, and make private. Adjust all callers.
10204 (data_buf::append_uint): New method.
10205 (add_address_entry, write_one_signatured_type)
10206 (write_psymtabs_to_index): Use it.
10207
a81e6d4d
PA
102082017-06-12 Pedro Alves <palves@redhat.com>
10209
10210 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10211 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10212 (data_buf::file_write): Call ::fwrite directly.
10213
6fd931f2
PA
102142017-06-12 Pedro Alves <palves@redhat.com>
10215
10216 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10217 std::vector::erase.
10218
bc8f2430
JK
102192017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10220
10221 Code cleanup: C++ify .gdb_index producer.
10222 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10223 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10224 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10225 (create_strtab, add_string): Remove.
10226 (file_write, data_buf): New.
10227 (struct symtab_index_entry): Use std::vector for cu_indices.
10228 (struct mapped_symtab): Use std::vector for data.
10229 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10230 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10231 Remove.
10232 (find_slot): Change return type. Update it to the new data structures.
10233 (hash_expand, add_index_entry): Update it to the new data structures.
10234 (offset_type_compare): Remove.
10235 (uniquify_cu_indices): Update it to the new data structures.
10236 (c_str_view, c_str_view_hasher, vector_hasher): New.
10237 (add_indices_to_cpool): Remove.
10238 (write_hash_table): Update it to the new data structures.
10239 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10240 (eq_psymtab_cu_index): Remove.
10241 (psym_index_map): New typedef.
10242 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10243 reference and std::unordered_map for cu_index_htab.
10244 (add_address_entry, add_address_entry_worker, write_address_map)
10245 (write_psymbols): Update it to the new data structures.
10246 (write_obstack): Remove.
10247 (struct signatured_type_index_data): Change types_list to a data_buf
10248 reference and psyms_seen to a std::unordered_set reference.
10249 (write_one_signatured_type, recursively_write_psymbols)
10250 (write_psymtabs_to_index): Update it to the new data structures.
10251
c4dcb155
SM
102522017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10253
10254 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10255 separate-debug-file commands.
10256 * symfile.h (separate_debug_file_debug): New global.
10257 * symfile.c (separate_debug_file_debug): New global.
10258 (separate_debug_file_exists, find_separate_debug_file): Add
10259 debug output.
10260 (_initialize_symfile): Add "set debug separate-debug-file"
10261 command.
10262 * build-id.c (build_id_to_debug_bfd,
10263 find_separate_debug_file_by_buildid): Add debug output.
10264
6d45d4b4
SM
102652017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10266
10267 * gdbarch.sh (displaced_step_free_closure): Remove.
10268 * gdbarch.h, gdbarch.c: Re-generate.
10269 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10270 displaced_step_free_closure.
10271 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10272 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10273 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10274 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10275 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10276 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10277 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10278 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10279 * infrun.c (displaced_step_clear): Call xfree instead of
10280 gdbarch_displaced_step_free_closure.
10281
2f91880f
SDJ
102822017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10283
10284 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10285 NULL".
10286
b8b6e72f
AH
102872017-06-08 Alan Hayward <alan.hayward@arm.com>
10288
10289 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10290 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10291 (mn10300_push_dummy_call): Likewise.
10292
5369082e
AH
102932017-06-08 Alan Hayward <alan.hayward@arm.com>
10294
10295 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10296
ff4ca5ac
AH
102972017-06-08 Alan Hayward <alan.hayward@arm.com>
10298
10299 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10300
aefd8b33
SDJ
103012017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10302
10303 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10304 able to start inferiors using a shell.
10305 (New remote packets): Announce new packet "QStartupWithShell".
10306 * remote.c: Add PACKET_QStartupWithShell.
10307 (extended_remote_create_inferior): Handle new
10308 PACKET_QStartupWithShell.
10309 (remote_protocol_features) <QStartupWithShell>: New entry for
10310 PACKET_QStartupWithShell.
10311 (_initialize_remote): Call "add_packet_config_cmd" for
10312 QStartupShell.
10313
2090129c
SDJ
103142017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10315 Pedro Alves <palves@redhat.com>
10316
10317 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10318 and "nat/fork-inferior.h".
10319 * common/common-inferior.h: New file, with contents from
10320 "gdb/inferior.h".
10321 * commom/common-utils.c: Include "common-utils.h".
10322 (stringify_argv): New function.
10323 * common/common-utils.h (stringify_argv): New prototype.
10324 * configure.nat: Add "fork-inferior.o" as a dependency for
10325 "*linux*", "fbsd*" and "nbsd*" hosts.
10326 * corefile.c (get_exec_file): Update comment.
10327 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10328 instead of "startup_inferior".
10329 (darwin_create_inferior): Call "add_thread_silent" after
10330 "fork_inferior".
10331 * fork-child.c: Cleanup unnecessary includes.
10332 (SHELL_FILE): Move to "common/common-fork-child.c".
10333 (environ): Likewise.
10334 (exec_wrapper): Initialize.
10335 (get_exec_wrapper): New function.
10336 (breakup_args): Move to "common/common-fork-child.c"; rename to
10337 "breakup_args_for_exec".
10338 (escape_bang_in_quoted_argument): Move to
10339 "common/common-fork-child.c".
10340 (saved_ui): New variable.
10341 (prefork_hook): New function.
10342 (postfork_hook): Likewise.
10343 (postfork_child_hook): Likewise.
10344 (gdb_startup_inferior): Likewise.
10345 (fork_inferior): Move to "common/common-fork-child.c". Update
10346 function to support gdbserver.
10347 (startup_inferior): Likewise.
10348 * gdbcore.h (get_exec_file): Remove declaration.
10349 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10350 instead of "startup_inferior". Call "add_thread_silent" after
10351 "fork_inferior".
10352 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10353 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10354 instead of "startup_inferior". Call "add_thread_silent" after
10355 "fork_inferior".
10356 * inferior.h: Include "common-inferior.h".
10357 (trace_start_error): Move to "common/common-utils.h".
10358 (trace_start_error_with_name): Likewise.
10359 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10360 (startup_inferior): Likewise.
10361 (gdb_startup_inferior): New prototype.
10362 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10363 * nat/fork-inferior.h: New file.
10364 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10365 instead of "startup_inferior". Call "add_thread_silent" after
10366 "fork_inferior".
10367 * target.h (target_terminal_init): Move prototype to
10368 "target/target.h".
10369 (target_terminal_inferior): Likewise.
10370 (target_terminal_ours): Likewise.
10371 * target/target.h (target_terminal_init): New prototype, moved
10372 from "target.h".
10373 (target_terminal_inferior): Likewise.
10374 (target_terminal_ours): Likewise.
10375 * utils.c (gdb_flush_out_err): New function.
10376
043a4934
SDJ
103772017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10378
10379 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10380 * common/common-gdbthread.h: New file, with parts from
10381 "gdb/gdbthread.h".
10382 * gdbthread.h: Include "common-gdbthread.h".
10383 (switch_to_thread): Moved to "common/common-gdbthread.h".
10384
15652511
SDJ
103852017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10386
10387 * Makefile.in (SFILES): Add "common/job-control.c".
10388 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10389 (COMMON_OBS): Add "job-control.o".
10390 * common/job-control.c: New file, with contents from
10391 "gdb/inflow.c".
10392 * common/job-control.h: New file, with contents from "terminal.h".
10393 * fork-child.c: Include "job-control.h".
10394 * inflow.c: Include "job-control.h".
10395 (gdb_setpgid): Move to "common/common-inflow.c".
10396 (_initialize_inflow): Move setting of "job_control" to
10397 "handle_job_control".
10398 * terminal.h (job_control): Moved to "common/common-terminal.h".
10399 (gdb_setpgid): Likewise.
10400 * top.c: Include "job_control.h".
10401 * utils.c: Likewise.
10402 (job_control): Moved to "job-control.c".
10403
2d7cc5c7
PA
104042017-06-07 Pedro Alves <palves@redhat.com>
10405
10406 * Makefile.in (SFILES): Add gdb_regex.c.
10407 (COMMON_OBS): Add gdb_regex.o.
10408 * ada-lang.c (ada_add_standard_exceptions)
10409 (ada_add_exceptions_from_frame, name_matches_regex)
10410 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10411 parameter type to compiled_regex. Adjust.
10412 (ada_exceptions_list): Use compiled_regex.
10413 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10414 std::unique_ptr<compiled_regex>.
10415 (exception_catchpoint::~exception_catchpoint): Remove regfree
10416 call.
10417 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10418 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10419 * breakpoint.c (solib_catchpoint::compiled): Now a
10420 std::unique_ptr<compiled_regex>.
10421 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10422 (check_status_catch_solib): Adjust to use compiled_regex.
10423 (add_solib_catchpoint): Adjust to use compiled_regex.
10424 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10425 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10426 compiled_regex reference. Adjust to use it.
10427 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10428 declaration. Include "gdb_regex.h".
10429 (apropos_cmd): Change regex parameter to compiled_regex reference.
10430 * gdb_regex.c: New file.
10431 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10432 declarations.
10433 (class compiled_regex): New.
10434 * linux-tdep.c: Include "common/gdb_optional.h".
10435 (struct mapping_regexes): New, factored out from
10436 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10437 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10438 gdb::optional and remove cleanups. Adjust to compiled_regex.
10439 * probe.c: Include "common/gdb_optional.h".
10440 (collect_probes): Use compiled_regex and gdb::optional and remove
10441 cleanups.
10442 * skip.c: Include "common/gdb_optional.h".
10443 (skiplist_entry::compiled_function_regexp): Now a
10444 gdb::optional<compiled_regex>.
10445 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10446 (free_skiplist_entry): Remove regfree call.
10447 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10448 compiled_regex and gdb::optional.
10449 * symtab.c: Include "common/gdb_optional.h".
10450 (search_symbols): Use compiled_regex and gdb::optional.
10451 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10452 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10453 to gdb_regex.c.
10454
50d6adef
AH
104552017-06-07 Alan Hayward <alan.hayward@arm.com>
10456
10457 * regcache.c (regcache::save): Avoid buffer use.
10458 (regcache::dump): Likewise.
10459
4a8a33c8
AH
104602017-06-07 Alan Hayward <alan.hayward@arm.com>
10461
10462 * sh-tdep.c (sh_pseudo_register_read): Remove
10463 MAX_REGISTER_SIZE.
10464 (sh_pseudo_register_write): Likewise.
10465 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10466 (sh64_pseudo_register_write): Likewise
10467
d1be909e
AH
104682017-06-07 Alan Hayward <alan.hayward@arm.com>
10469
10470 * aarch64-tdep.c (aarch64_store_return_value): Use
10471 V_REGISTER_SIZE.
10472 (aarch64_pseudo_read_value): Likewise.
10473 (aarch64_pseudo_write): Likewise.
10474
f4a65042
YQ
104752017-06-06 Yao Qi <yao.qi@linaro.org>
10476
10477 * regformats/regdef.h (set_register_cache): Remove the
10478 declaration.
10479
9f7fb0aa
AH
104802017-06-06 Alan Hayward <alan.hayward@arm.com>
10481
10482 * frame.c (frame_unwind_register_signed): Use
10483 frame_unwind_register_value.
10484
e1e01040
PA
104852017-06-06 Pedro Alves <palves@redhat.com>
10486
10487 PR breakpoints/21553
10488 * breakpoint.c (create_breakpoints_sal_default)
10489 (init_breakpoint_sal, create_breakpoint_sal): Use
10490 gdb::unique_xmalloc_ptr for string parameters.
10491 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10492 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10493 (base_breakpoint_create_breakpoints_sal)
10494 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10495 (strace_marker_create_breakpoints_sal)
10496 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10497 string parameters.
10498 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10499 gdb::unique_xmalloc_ptr for string parameters.
10500 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10501 parameters.
10502
fbe654c8
AH
105032017-06-06 Alan Hayward <alan.hayward@arm.com>
10504
10505 * alpha-tdep.c (alpha_register_to_value): Use
10506 get_frame_register_value.
10507 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10508
ae0d01d6
AH
105092017-06-06 Alan Hayward <alan.hayward@arm.com>
10510
10511 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10512 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10513 (ia64_value_to_register): Likewise.
10514 (ia64_extract_return_value): Likewise.
10515 (ia64_store_return_value): Likewise.
10516 (ia64_push_dummy_call): Likewise.
10517
49cf576c
JB
105182017-06-04 Joel Brobecker <brobecker@adacore.com>
10519
10520 GDB 8.0 released.
10521
26b6a6ab
SM
105222017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10523
10524 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10525
22827c51
SM
105262017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10527
10528 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10529 parameter.
10530 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10531
0e05cf3a
SM
105322017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10533
10534 * event-loop.c (poll_timers): Unallocate timer using delete
10535 instead of xfree.
10536
c1fc2657
SM
105372017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10538
10539 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10540 (struct breakpoint) <~breakpoint>: New.
10541 (struct watchpoint): Inherit from breakpoint.
10542 <~watchpoint>: New.
10543 <base>: Remove.
10544 (struct tracepoint): Inherit from breakpoint.
10545 <base>: Remove.
10546 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10547 (struct longjmp_breakpoint): Inherit from breakpoint.
10548 <~longjmp_breakpoint>: New.
10549 <base>: Remove.
10550 (new_breakpoint_from_type): Remove casts.
10551 (watchpoint_in_thread_scope): Remove reference to base field.
10552 (watchpoint_del_at_next_stop): Likewise.
10553 (update_watchpoint): Likewise.
10554 (watchpoint_check): Likewise.
10555 (bpstat_check_watchpoint): Likewise.
10556 (set_longjmp_breakpoint): Likewise.
10557 (struct fork_catchpoint): Inherit from breakpoint.
10558 <base>: Remove.
10559 (struct solib_catchpoint): Inherit from breakpoint.
10560 <~solib_catchpoint>: New.
10561 <base>: Remove.
10562 (dtor_catch_solib): Change to ...
10563 (solib_catchpoint::~solib_catchpoint): ... this.
10564 (breakpoint_hit_catch_solib): Remove reference to base field.
10565 (add_solib_catchpoint): Likewise.
10566 (create_fork_vfork_event_catchpoint): Likewise.
10567 (struct exec_catchpoint): Inherit from breakpoint.
10568 <~exec_catchpoint>: New.
10569 <base>: Remove.
10570 (dtor_catch_exec): Change to ...
10571 (exec_catchpoint::~exec_catchpoint): ... this.
10572 (dtor_watchpoint): Change to ...
10573 (watchpoint::~watchpoint): ... this.
10574 (watch_command_1): Remove reference to base field.
10575 (catch_exec_command_1): Likewise.
10576 (base_breakpoint_dtor): Change to ...
10577 (breakpoint::~breakpoint): ... this.
10578 (base_breakpoint_ops): Remove dtor field value.
10579 (longjmp_bkpt_dtor): Change to ...
10580 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10581 (strace_marker_create_breakpoints_sal): Remove reference to base
10582 field.
10583 (delete_breakpoint): Don't manually call breakpoint destructor.
10584 (create_tracepoint_from_upload): Remove reference to base field.
10585 (trace_pass_set_count): Likewise.
10586 (initialize_breakpoint_ops): Don't initialize
10587 momentary_breakpoint_ops, don't set dtors.
10588 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10589 <~ada_catchpoint>: New.
10590 <base>: Remove.
10591 (create_excep_cond_exprs): Remove reference to base field.
10592 (dtor_exception): Change to ...
10593 (ada_catchpoint::~ada_catchpoint): ... this.
10594 (dtor_catch_exception): Remove.
10595 (dtor_catch_exception_unhandled): Remove.
10596 (dtor_catch_assert): Remove.
10597 (create_ada_exception_catchpoint): Remove reference to base
10598 field.
10599 (initialize_ada_catchpoint_ops): Don't set dtors.
10600 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10601 breakpoint.
10602 <~signal_catchpoint>: New.
10603 <base>: Remove.
10604 (signal_catchpoint_dtor): Change to ...
10605 (signal_catchpoint::~signal_catchpoint): ... this.
10606 (create_signal_catchpoint): Remove reference to base field.
10607 (initialize_signal_catchpoint_ops): Don't set dtor.
10608 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10609 from breakpoint.
10610 <~syscall_catchpoint>: New.
10611 <base>: Remove.
10612 (dtor_catch_syscall): Change to ...
10613 (syscall_catchpoint::~syscall_catchpoint): ... this.
10614 (create_syscall_event_catchpoint): Remove reference to base
10615 field.
10616 (initialize_syscall_catchpoint_ops): Don't set dtor.
10617 * break-catch-throw.c (struct exception_catchpoint): Inherit
10618 from breakpoint.
10619 <~exception_catchpoint>: New.
10620 <base>: Remove.
10621 (dtor_exception_catchpoint): Change to ...
10622 (exception_catchpoint::~exception_catchpoint): ... this.
10623 (handle_gnu_v3_exceptions): Remove reference to base field.
10624 (initialize_throw_catchpoint_ops): Don't set dtor.
10625 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10626 field.
10627 * remote.c (remote_get_tracepoint_status): Likewise.
10628 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10629 * tracefile.c (tracefile_fetch_registers): Likewise.
10630 * tracepoint.c (actions_command): Likewise.
10631 (validate_actionline): Likewise.
10632 (tfind_1): Likewise.
10633 (get_traceframe_location): Likewise.
10634 (find_matching_tracepoint_location): Likewise.
10635 (parse_tracepoint_status): Likewise.
10636 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10637
3b0871f4
SM
106382017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10639
10640 * breakpoint.c (struct longjmp_breakpoint): New struct.
10641 (is_tracepoint_type): Change return type to bool.
10642 (is_longjmp_type): New function.
10643 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10644 (set_raw_breakpoint_without_location): Use
10645 new_breakpoint_from_type.
10646 (set_raw_breakpoint): Likewise.
10647
a5e364af
SM
106482017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10649
10650 * breakpoint.c (new_breakpoint_from_type): New function.
10651 (create_breakpoint_sal): Use new_breakpoint_from_type and
10652 unique_ptr.
10653 (create_breakpoint): Likewise.
10654
ae3b3f34
SM
106552017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10656
10657 * memattr.c (mem_info_command): Rename to ...
10658 (info_mem_command): ... this.
10659 (mem_enable_command): Rename to ...
10660 (enable_mem_command): ... this.
10661 (mem_disable_command): Rename to ...
10662 (disable_mem_command): ... this.
10663 (mem_delete_command): Rename to ...
10664 (delete_mem_command): ... this.
10665 (_initialize_mem): Adjust function names.
10666
13ace077
MM
106672017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10668
10669 * btrace.c (handle_pt_insn_events): New.
10670 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10671 STATUS. Split into this and ...
10672 (handle_pt_insn_event_flags): ... this.
10673
c56ccc05
MM
106742017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10675
10676 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10677 and struct pt_insn.resynced.
10678 * configure: Regenerated.
10679 * config.in: Regenerated.
10680
08c3f6d2
TW
106812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10682
10683 * btrace.c (ftrace_find_call_by_number): New function.
10684 (ftrace_new_function): Store objects, not pointers.
10685 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10686 ftrace_new_gap, ftrace_update_function,
10687 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10688 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10689 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10690 btrace_ends_with_single_insn, btrace_call_get): Account for
10691 btrace_thread_info::functions now storing objects.
10692 * btrace.h (struct btrace_thread_info): Add constructor.
10693 (struct btrace_thread_info) <functions>: Make std::vector.
10694 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10695 Initialize with default values.
10696 * record-btrace.c (record_btrace_frame_sniffer): Account for
10697 btrace_thread_info::functions now storing objects.
10698
8ffd39f2
TW
106992017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10700
10701 * btrace.c: Remove typedef bfun_s.
10702 (ftrace_new_gap): Directly add gaps to the list of gaps.
10703 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10704 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10705 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10706 instead of gdb VEC.
10707
4aeb0dfc
TW
107082017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10709
10710 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10711 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10712 with btrace_thread_info::next_segment and
10713 btrace_thread_info::prev_segment.
10714 * btrace.h: Remove struct btrace_func_link.
10715 (struct btrace_function): Replace pair of function segment pointers
10716 with pair of indices.
10717 * python/py-record-btrace.c (btpy_call_prev_sibling,
10718 btpy_call_next_sibling): Replace references to
10719 btrace_thread_info::segment with btrace_thread_info::next_segment and
10720 btrace_thread_info::prev_segment.
10721 * record-btrace.c (record_btrace_frame_this_id): Use
10722 btrace_find_call_by_number.
10723
eb8f2b9c
TW
107242017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10725
10726 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10727 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10728 btrace_insn_next, btrace_insn_prev): Remove references to
10729 btrace_thread_info::flow.
10730 * btrace.h (struct btrace_function): Remove FLOW.
10731
42bfe59e
TW
107322017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10733
10734 * btrace.c (ftrace_find_call_by_number): New function.
10735 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10736 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10737 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10738 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10739 index.
10740 * btrace.h (struct btrace_function): Turn UP into an index.
10741 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10742 as an index.
10743 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10744 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10745 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10746
b54b03bd
TW
107472017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10748
10749 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10750 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10751 ftrace_update_function, ftrace_compute_global_level_offset,
10752 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10753 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10754 btrace_insn_end, btrace_is_empty): Remove references to
10755 btrace_thread_info::begin and btrace_thread_info::end.
10756 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10757 (struct btrace_thread_info) <functions>: Adjust comment.
10758 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10759 btrace_thread_info::begin.
10760
8286623c
TW
107612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10762
10763 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10764 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10765 ftrace_update_function): Remove arguments that implicitly were always
10766 BTINFO->END.
10767 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10768 Don't pass BTINFO->END.
10769
a0f1b963
TW
107702017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10771
10772 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10773 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10774 btrace_find_insn_by_number): Replace function segment pointer with
10775 index.
10776 (btrace_insn_cmp): Simplify.
10777 * btrace.h: (struct btrace_insn_iterator) Rename index to
10778 insn_index. Replace function segment pointer with index into function
10779 segment vector.
10780 * record-btrace.c (record_btrace_call_history): Replace function
10781 segment pointer use with index.
10782 (record_btrace_frame_sniffer): Retrieve function call segment through
10783 vector.
10784 (record_btrace_set_replay): Remove defunc't safety check.
10785
f158f208
TW
107862017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10787
10788 * btrace.c (btrace_ends_with_single_insn): New function.
10789 (btrace_call_get, btrace_call_number, btrace_call_begin,
10790 btrace_call_end, btrace_call_next, btrace_call_prev,
10791 btrace_find_call_by_number): Use index into call segment vector
10792 instead of pointer.
10793 (btrace_call_cmp): Simplify.
10794 * btrace.h (struct btrace_call_iterator): Replace function call segment
10795 pointer with index into vector.
10796 * record-btrace.c (record_btrace_call_history): Use index instead of
10797 pointer.
10798
521103fd
TW
107992017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10800
10801 * btrace.c (btrace_insn_begin, btrace_insn_end,
10802 btrace_find_insn_by_number): Add btinfo to iterator.
10803 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10804
17b89b34
TW
108052017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10806
10807 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10808 and save pointers directly.
10809 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10810 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10811 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10812 changed signature of functions.
10813 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10814 (btrace_fetch): Remove code that adds btrace_function pointers to
10815 vector of btrace_functions.
10816 (btrace_clear): Simplify freeing vector of btrace_functions.
10817
2b51eddc
TW
108182017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10819
10820 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10821 Replace VEC_* with std::vector functions.
10822 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10823 (struct btrace_thread_info)<functions>: Change type to std::vector.
10824
db6be0d5
SM
108252017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10826
10827 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10828 "Removed targets and native configurations" up. Merge duplicate
10829 "New commands" sub-sections. Add "New options" sub-sections.
10830
b057297a
AH
108312017-05-26 Alan Hayward <alan.hayward@arm.com>
10832
10833 * defs.h (copy_integer_to_size): New declaration.
10834 * findvar.c (copy_integer_to_size): New function.
10835 (do_cint_test): New selftest function.
10836 (copy_integer_to_size_test): Likewise.
10837 (_initialize_findvar): Likewise.
10838 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10839 (mips_fbsd_collect_reg): Use raw_collect_integer.
10840 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10841 (mips64_fill_gregset): Use raw_collect_integer
10842 (mips64_fill_fpregset): Use raw_supply_integer.
10843 * regcache.c (regcache::raw_supply_integer): New function.
10844 (regcache::raw_collect_integer): Likewise.
10845 * regcache.h: (regcache::raw_supply_integer): New declaration.
10846 (regcache::raw_collect_integer): Likewise.
10847
b77b02a5
YQ
108482017-05-24 Yao Qi <yao.qi@linaro.org>
10849
10850 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10851 (COMMON_OBS): Add gdbarch-selftests.o.
10852 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10853 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10854 * gdbarch-selftests.c: New file.
10855 * regcache.h (regcache) <~regcache>: Mark it virtual if
10856 GDB_SELF_TEST.
10857 <raw_write>: Likewise.
10858
e521e87e
YQ
108592017-05-24 Yao Qi <yao.qi@linaro.org>
10860
10861 * regcache.c (current_regcache): Change it to
10862 regcache::current_regcache.
10863 (regcache_observer_target_changed): Update.
10864 (regcache_thread_ptid_changed): Make it a regcache static
10865 method.
10866 (regcache_thread_ptid_changed): Update.
10867 (class regcache_access): New.
10868 (current_regcache_test): Update.
10869 (_initialize_regcache): Update.
10870 * regcache.h: Include forward_list.
10871 (regcache): Declare regcache_thread_ptid_changed and declare
10872 registers_changed_ptid as friend.
10873
d8e07dda
YQ
108742017-05-24 Yao Qi <yao.qi@linaro.org>
10875
10876 * i387-tdep.c (i387_register_to_value): Use register_size
10877 instead of TYPE_LENGTH.
10878 * m68k-tdep.c (m68k_register_to_value): Likewise.
10879
8c8f9122
YQ
108802017-05-24 Yao Qi <yao.qi@linaro.org>
10881
10882 * i387-tdep.c (i387_convert_register_p): Return false if type
10883 code isn't TYPE_CODE_FLT.
10884
68fce50f
YQ
108852017-05-24 Yao Qi <yao.qi@linaro.org>
10886
10887 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10888 length is 4.
10889 (alpha_register_to_value): Remove type length check.
10890 (alpha_value_to_register): Likewise.
10891
88954b49
YQ
108922017-05-24 Yao Qi <yao.qi@linaro.org>
10893
10894 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10895 TYPE_CODE_FLT.
10896
e3ec9b69
YQ
108972017-05-24 Yao Qi <yao.qi@linaro.org>
10898
10899 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10900 TYPE_CODE_FLT or not.
10901
cdd238da
YQ
109022017-05-24 Yao Qi <yao.qi@linaro.org>
10903
10904 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10905 * avr-tdep.c (avr_gdbarch_init): Likewise.
10906 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10907 * cris-tdep.c (cris_gdbarch_init): Likewise.
10908 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10909 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10910 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10911 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10912 * mep-tdep.c (mep_gdbarch_init): Likewise.
10913 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10914 * mips-tdep.c (mips_gdbarch_init): Likewise.
10915 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10916 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10917 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10918 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10919 * v850-tdep.c (v850_gdbarch_init): Likewise.
10920
7a3929c4
YQ
109212017-05-24 Yao Qi <yao.qi@linaro.org>
10922
10923 * selftest-arch.c (tests_with_arch): Call registers_changed
10924 and reinit_frame_cache.
10925 * selftest.c (run_self_tests): Likewise.
10926
f4985dba
YQ
109272017-05-24 Yao Qi <yao.qi@linaro.org>
10928
10929 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10930 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10931
ab20fa4a
YQ
109322017-05-24 Yao Qi <yao.qi@linaro.org>
10933
10934 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10935 set_gdbarch_print_insn.
10936
f532ab94
YQ
109372017-05-24 Yao Qi <yao.qi@linaro.org>
10938
10939 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10940 set_gdbarch_print_insn.
10941
39503f82
YQ
109422017-05-24 Yao Qi <yao.qi@linaro.org>
10943
10944 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10945 set_gdbarch_print_insn.
10946 * arc-tdep.c (arc_gdbarch_init): Likewise.
10947 * arch-utils.c: include dis-asm.h.
10948 (default_print_insn): New function.
10949 * arch-utils.h (default_print_insn): Declare.
10950 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10951 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10952 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10953 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10954 * frv-tdep.c (frv_gdbarch_init): Likewise.
10955 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10956 * gdbarch.sh (print_insn): Use default_print_insn.
10957 * gdbarch.c: Regenerated.
10958 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10959 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10960 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10961 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10962 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10963 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10964 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10965 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10966 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10967 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10968 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10969 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10970 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10971 * mt-tdep.c (mt_gdbarch_init): Likewise.
10972 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10973 * nios2-tdep.c (nios2_print_insn): Remove.
10974 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10975 * rx-tdep.c (rx_gdbarch_init): Likewise.
10976 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10977 * score-tdep.c (score_print_insn): Remove.
10978 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10979 * sh-tdep.c (sh_gdbarch_init): Likewise.
10980 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10981 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10982 * tic6x-tdep.c (tic6x_print_insn): Remove.
10983 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10984 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10985 * v850-tdep.c (v850_gdbarch_init): Likewise.
10986 * vax-tdep.c (vax_gdbarch_init): Likewise.
10987 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10988 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10989
f7241d4f
JB
109902017-05-23 John Baldwin <jhb@FreeBSD.org>
10991
10992 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10993 (MIPS_FP0_REGNUM): Remove.
10994 (MIPS_FSR_REGNUM): Remove.
10995 (mips_fbsd_supply_fpregs): Use mips_regnum.
10996 (mips_fbsd_supply_gregs): Likewise.
10997 (mips_fbsd_collect_fpregs): Likewise.
10998 (mips_fbsd_collect_gregs): Likewise.
10999
d489d81d
JB
110002017-05-23 John Baldwin <jhb@FreeBSD.org>
11001
11002 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11003 (getpfpregs_supplies): New function.
11004 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11005 getfpregs_supplies.
11006 (mips_fbsd_store_inferior_registers): Likewise.
11007
e11b3cdc
PA
110082017-05-22 Pedro Alves <palves@redhat.com>
11009
11010 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11011 maintainer.
11012
0f068fb5
AH
110132017-05-22 Alan Hayward <alan.hayward@arm.com>
11014
11015 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11016 (store_register): Likewise.
11017 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11018 (get_decimal_float_return_value): Likewise.
11019 (do_ppc_sysv_return_value): Likewise.
11020 (ppc64_sysv_abi_push_integer): Likewise.
11021 (ppc64_sysv_abi_push_freg): Likewise.
11022 (ppc64_sysv_abi_return_value_base): Likewise.
11023 (ppc64_sysv_abi_return_value): Likewise.
11024 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11025 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11026 * rs6000-nat.c: Likewise.
11027 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11028 (rs6000_value_to_register): Likewise.
11029 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11030
e6cf65f2
TT
110312017-05-21 Tom Tromey <tom@tromey.com>
11032
11033 PR rust/21466:
11034 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11035 arrays as "[T]", not "[T; ]".
11036
43cc5389
TT
110372017-05-19 Tom Tromey <tom@tromey.com>
11038
11039 PR rust/21484:
11040 * rust-lang.c (exp_descriptor_rust): New function.
11041 (rust_language_defn): Use it.
11042 * p-lang.c (pascal_language_defn): Update.
11043 * opencl-lang.c (opencl_language_defn): Update.
11044 * objc-lang.c (objc_language_defn): Update.
11045 * m2-lang.c (m2_language_defn): Update.
11046 * language.h (struct language_defn)
11047 <la_watch_location_expression>: New member.
11048 * language.c (unknown_language_defn, auto_language_defn)
11049 (local_language_defn): Update.
11050 * go-lang.c (go_language_defn): Update.
11051 * f-lang.c (f_language_defn): Update.
11052 * d-lang.c (d_language_defn): Update.
11053 * c-lang.h (c_watch_location_expression): Declare.
11054 * c-lang.c (c_watch_location_expression): New function.
11055 (c_language_defn, cplus_language_defn, asm_language_defn)
11056 (minimal_language_defn): Use it.
11057 * breakpoint.c (watch_command_1): Call
11058 la_watch_location_expression.
11059 * ada-lang.c (ada_language_defn): Update.
11060
7a6e7fcc
RO
110612017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11062
6e7e1744
RO
11063 PR tui/21482
11064 * gdb_curses.h (NOMACROS): Define.
11065 (NCURSES_NOMACROS): Define.
11066
110672017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11068
11069 PR tui/21482
7a6e7fcc
RO
11070 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11071 arg to char *.
11072 * tui/tui-wingeneral.c (box_win): Likewise.
11073 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11074 (tui_show_source_line): Likewise.
11075 (tui_show_exec_info_content): Likewise.
11076
1933fd8e
VM
110772017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11078
11079 * sparc-tdep.c (sparc_structure_return_p)
11080 (sparc_arg_on_registers_p): New functions.
11081 (sparc32_store_arguments): Use them.
11082 * sparc64-tdep.c (sparc64_16_byte_align_p)
11083 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11084 Handle TYPE_CODE_ARRAY.
11085
21873064
YQ
110862017-05-17 Yao Qi <yao.qi@linaro.org>
11087
11088 * cli/cli-decode.c (add_alias_cmd): New function.
11089 * command.h (add_alias_cmd): Declare.
11090 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11091 instead call add_alias_cmd.
11092
2b351b19
PA
110932017-05-17 Pedro Alves <palves@redhat.com>
11094
11095 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11096 (nat_makefile_frag): ... this. All references updated.
11097 * configure.ac: Likewise.
11098 * configure.nat: Likewise. Enhance comments.
11099 * configure: Regenerate.
11100
5f2ad7a3
RO
111012017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11102
11103 * procfs.c (procfs_create_inferior): Change prototype to match
11104 definition.
11105
adf3dde5
EZ
111062017-05-13 Eli Zaretskii <eliz@gnu.org>
11107
11108 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11109 C++ compiler warning.
11110
6830f270
TT
111112017-05-12 Tom Tromey <tom@tromey.com>
11112
11113 PR rust/21483:
11114 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11115 recurse, just call value_struct_elt directly.
11116
68f2f2e3
TT
111172017-05-12 Tom Tromey <tom@tromey.com>
11118
11119 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11120 OP_RUST_ARRAY>: Fix.
11121
256afbc2
TT
111222017-05-12 Tom Tromey <tom@tromey.com>
11123
11124 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11125
94bb8dfe
YQ
111262017-05-09 Yao Qi <yao.qi@linaro.org>
11127
11128 * regcache.c: Include <forward_list>.
11129 (struct regcache_list): Remove.
11130 (current_regcache): Update.
11131 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11132 (regcache_thread_ptid_changed): Likewise.
11133 (registers_changed_ptid): Likewise.
11134 (current_regcache_size): Likewise.
11135
8248946c
YQ
111362017-05-09 Yao Qi <yao.qi@linaro.org>
11137
11138 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11139 (current_regcache_size): New function.
11140 (current_regcache_test): New function.
11141 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11142
313c5961
AH
111432017-05-08 Alan Hayward <alan.hayward@arm.com>
11144
11145 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11146 (print_gp_register_row): Use get_frame_register_value.
11147
27bfc1d1
AH
111482017-05-08 Alan Hayward <alan.hayward@arm.com>
11149
11150 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11151 (mips_supply_fpregset): Likewise.
11152 (mips64_supply_gregset): Likewise.
11153
146e6c5c
AH
111542017-05-08 Alan Hayward <alan.hayward@arm.com>
11155
11156 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11157 regcache->raw_supply_zeroed.
11158
e50f25ec
SDJ
111592017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11160
11161 * configure.nat: Rearrange 'case' statements to match
11162 host before cpu.
11163
21ea5acd
SDJ
111642017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11165
11166 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11167 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11168 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11169 "@nat_extra_makefile_frag@".
11170 (Makefile): Remove dependency on "@frags@".
11171 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11172 (data-directory/Makefile): Likewise.
11173 * config/aarch64/linux.mh: Deleted; moved contents to
11174 "gdb/configure.nat".
11175 * config/alpha/alpha-linux.mh: Likewise.
11176 * config/alpha/nbsd.mh: Likewise.
11177 * config/arm/linux.mh: Likewise.
11178 * config/arm/nbsdelf.mh: Likewise.
11179 * config/i386/cygwin.mh: Likewise.
11180 * config/i386/cygwin64.mh: Likewise.
11181 * config/i386/darwin.mh: Likewise.
11182 * config/i386/fbsd.mh: Likewise.
11183 * config/i386/fbsd64.mh: Likewise.
11184 * config/i386/go32.mh: Likewise.
11185 * config/i386/i386gnu.mh: Likewise.
11186 * config/i386/i386sol2.mh: Likewise.
11187 * config/i386/linux.mh: Likewise.
11188 * config/i386/linux64.mh: Likewise.
11189 * config/i386/mingw.mh: Likewise.
11190 * config/i386/mingw64.mh: Likewise.
11191 * config/i386/nbsd64.mh: Likewise.
11192 * config/i386/nbsdelf.mh: Likewise.
11193 * config/i386/nto.mh: Likewise.
11194 * config/i386/obsd.mh: Likewise.
11195 * config/i386/obsd64.mh: Likewise.
11196 * config/i386/sol2-64.mh: Likewise.
11197 * config/ia64/linux.mh: Likewise.
11198 * config/m32r/linux.mh: Likewise.
11199 * config/m68k/linux.mh: Likewise.
11200 * config/m68k/nbsdelf.mh: Likewise.
11201 * config/m68k/obsd.mh: Likewise.
11202 * config/m88k/obsd.mh: Likewise.
11203 * config/mips/fbsd.mh: Likewise.
11204 * config/mips/linux.mh: Likewise.
11205 * config/mips/nbsd.mh: Likewise.
11206 * config/mips/obsd64.mh: Likewise.
11207 * config/pa/linux.mh: Likewise.
11208 * config/pa/nbsd.mh: Likewise.
11209 * config/pa/obsd.mh: Likewise.
11210 * config/powerpc/aix.mh: Likewise.
11211 * config/powerpc/fbsd.mh: Likewise.
11212 * config/powerpc/linux.mh: Likewise.
11213 * config/powerpc/nbsd.mh: Likewise.
11214 * config/powerpc/obsd.mh: Likewise.
11215 * config/powerpc/ppc64-linux.mh: Likewise.
11216 * config/powerpc/spu-linux.mh: Likewise.
11217 * config/s390/linux.mh: Likewise.
11218 * config/sh/nbsd.mh: Likewise.
11219 * config/sparc/fbsd.mh: Likewise.
11220 * config/sparc/linux.mh: Likewise.
11221 * config/sparc/linux64.mh: Likewise.
11222 * config/sparc/nbsd64.mh: Likewise.
11223 * config/sparc/nbsdelf.mh: Likewise.
11224 * config/sparc/obsd64.mh: Likewise.
11225 * config/sparc/sol2.mh: Likewise.
11226 * config/tilegx/linux.mh: Likewise.
11227 * config/vax/nbsdelf.mh: Likewise.
11228 * config/vax/obsd.mh: Likewise.
11229 * config/xtensa/linux.mh: Likewise.
11230 * config/i386/i386gnu.mn: New file, with excerpts from
11231 "config/i386/i386gnu.mh".
11232 * configure: Regenerate.
11233 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11234 *.mh files under "gdb/config".
11235 * configure.nat: New file, with contents from the
11236 "gdb/config/*/*.mh" files.
11237
7ed1acaf
TW
112382017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11239
11240 * btrace.c (btrace_clear): Free insn vector.
11241
e13cb306
PA
112422017-05-05 Pedro Alves <palves@redhat.com>
11243
11244 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11245 * configure: Regenerate.
11246
5ed8105e
PA
112472017-05-04 Pedro Alves <palves@redhat.com>
11248
11249 * Makefile.in (SFILES): Add progspace-and-thread.c.
11250 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11251 (COMMON_OBS): Add progspace-and-thread.o.
11252 * breakpoint.c: Include "progspace-and-thread.h".
11253 (update_inserted_breakpoint_locations)
11254 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11255 Use scoped_restore_current_pspace_and_thread.
11256 (create_std_terminate_master_breakpoint): Use
11257 scoped_restore_current_program_space.
11258 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11259 (print_breakpoint_location): Use
11260 scoped_restore_current_program_space.
11261 (bp_loc_is_permanent): Use
11262 scoped_restore_current_pspace_and_thread.
11263 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11264 (download_tracepoint_locations): Use
11265 scoped_restore_current_pspace_and_thread.
11266 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11267 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11268 (enum step_over_calls_kind): Moved from inferior.h.
11269 (class scoped_restore_current_thread): New class.
11270 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11271 declaration.
11272 (scoped_restore_current_thread): New class.
11273 * infcmd.c: Include "common/gdb_optional.h".
11274 (continue_1, proceed_after_attach): Use
11275 scoped_restore_current_thread.
11276 (notice_new_inferior): Use scoped_restore_current_thread.
11277 * inferior.c: Include "progspace-and-thread.h".
11278 (restore_inferior, save_current_inferior): Delete.
11279 (add_inferior_command, clone_inferior_command): Use
11280 scoped_restore_current_pspace_and_thread.
11281 * inferior.h (scoped_restore_current_inferior): New class.
11282 * infrun.c: Include "progspace-and-thread.h" and
11283 "common/gdb_optional.h".
11284 (follow_fork_inferior): Use
11285 scoped_restore_current_pspace_and_thread.
11286 (scoped_restore_exited_inferior): New class.
11287 (handle_vfork_child_exec_or_exit): Use
11288 scoped_restore_exited_inferior,
11289 scoped_restore_current_pspace_and_thread,
11290 scoped_restore_current_thread and scoped_restore.
11291 (fetch_inferior_event): Use scoped_restore_current_thread.
11292 * linespec.c (decode_line_full, decode_line_1): Use
11293 scoped_restore_current_program_space.
11294 * mi/mi-main.c: Include "progspace-and-thread.h".
11295 (exec_continue): Use scoped_restore_current_thread.
11296 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11297 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11298 * proc-service.c (ps_pglobal_lookup): Use
11299 scoped_restore_current_program_space.
11300 * progspace-and-thread.c: New file.
11301 * progspace-and-thread.h: New file.
11302 * progspace.c (release_program_space, clone_program_space): Use
11303 scoped_restore_current_program_space.
11304 (restore_program_space, save_current_program_space)
11305 (save_current_space_and_thread): Delete.
11306 (switch_to_program_space_and_thread): Moved to
11307 progspace-and-thread.c.
11308 * progspace.h (save_current_program_space)
11309 (save_current_space_and_thread): Delete declarations.
11310 (scoped_restore_current_program_space): New class.
11311 * remote.c (remote_btrace_maybe_reopen): Use
11312 scoped_restore_current_thread.
11313 * symtab.c: Include "progspace-and-thread.h".
11314 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11315 * thread.c (print_thread_info_1): Use
11316 scoped_restore_current_thread.
11317 (struct current_thread_cleanup): Delete.
11318 (do_restore_current_thread_cleanup)
11319 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11320 (scoped_restore_current_thread::~scoped_restore_current_thread):
11321 ... this new dtor.
11322 (make_cleanup_restore_current_thread): Rename/convert to ...
11323 (scoped_restore_current_thread::scoped_restore_current_thread):
11324 ... this new ctor.
11325 (thread_apply_all_command): Use scoped_restore_current_thread.
11326 (thread_apply_command): Use scoped_restore_current_thread.
11327 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11328 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11329
f6223dbb
PA
113302017-05-04 Pedro Alves <palves@redhat.com>
11331
11332 * thread.c (make_cleanup_restore_current_thread): Move
11333 find_thread_ptid call before the is_stopped call. Assert that the
11334 thread is found. Replace is_stopped call by checking the thread's
11335 state directly. Remove unnecessary NULL-thread check.
11336
3c3ae77e
PA
113372017-05-04 Pedro Alves <palves@redhat.com>
11338
11339 * corelow.c (thread_section_name): New class.
11340 (get_core_register_section, get_core_siginfo): Use it.
11341
45eba0ab
AA
113422017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11343
11344 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11345 (get_core_register_section): Remove xfree of NULL pointer.
11346
f81fdd35
AH
113472017-05-03 Alan Hayward <alan.hayward@arm.com>
11348
11349 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11350 * regcache.c (regcache::raw_supply_zeroed): New function.
11351 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11352
35837774
SM
113532017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11354
11355 * gdbarch.sh: Remove commented out definition of
11356 TARGET_CHAR_BIT.
11357 * gdbarch.h: Re-generate.
11358
c94fee56
SDJ
113592017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11360
11361 * configure: Regenerate.
11362
d17f7b36
SM
113632017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11364
11365 * solib-target.c (solib_target_relocate_section_addresses):
11366 Remove num_section_bases, num_bases, segment_bases variables.
11367
b560ebd6
SM
113682017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11369
11370 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11371
f2f46dfc
SM
113722017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11373
11374 * solib-target.c: Include <vector>
11375 (struct lm_info_target) <~lm_info_target>: Remove.
11376 <segment_bases, section_bases>: Change type to
11377 std::vector<CORE_ADDR>.
11378 (library_list_start_segment, library_list_start_section,
11379 library_list_end_library,
11380 solib_target_relocate_section_addresses): Adjust.
11381
a0ff9e1a
SM
113822017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11383
11384 * gdbarch.sh (software_single_step): Change return type to
11385 std::vector<CORE_ADDR>.
11386 * gdbarch.c, gdbarch.h: Re-generate.
11387 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11388 Adjust.
11389 (arm_deal_with_atomic_sequence_raw): Adjust.
11390 (thumb_get_next_pcs_raw): Adjust.
11391 (arm_get_next_pcs_raw): Adjust.
11392 (arm_get_next_pcs): Adjust.
11393 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11394 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11395 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11396 (alpha_software_single_step): Adjust.
11397 * alpha-tdep.h (alpha_software_single_step): Adjust.
11398 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11399 * arm-tdep.c (arm_software_single_step): Adjust.
11400 (arm_breakpoint_kind_from_current_state): Adjust.
11401 * arm-tdep.h (arm_software_single_step): Adjust.
11402 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11403 * cris-tdep.c (cris_software_single_step): Adjust.
11404 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11405 (micromips_deal_with_atomic_sequence): Adjust.
11406 (deal_with_atomic_sequence): Adjust.
11407 (mips_software_single_step): Adjust.
11408 * mips-tdep.h (mips_software_single_step): Adjust.
11409 * moxie-tdep.c (moxie_software_single_step): Adjust.
11410 * nios2-tdep.c (nios2_software_single_step): Adjust.
11411 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11412 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11413 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11414 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11415 * sparc-tdep.c (sparc_software_single_step): Adjust.
11416 * spu-tdep.c (spu_software_single_step): Adjust.
11417 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11418
ea480a30
SM
114192017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11420
11421 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11422 * gdbarch.h: Re-generate.
11423
d050f7d7
TW
114242017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11425
11426 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11427 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11428 * python/py-instruction.c, python/py-instruction.h: New file.
11429 * python/py-record.c: Add py-instruction.h include.
11430 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11431 gdb.RecordInstruction.
11432 * python/python-internal.h: Add gdbpy_initialize_instruction
11433 declaration.
11434 * python/python.c (do_start_initialization): Add
11435 gdbpy_initialize_instruction.
11436
14f819c8
TW
114372017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11438
11439 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11440 Remove.
11441 (btrace_func_from_recpy_func): New function.
11442 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11443 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11444 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11445 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11446 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11447 Also, use new helper functions.
11448 (btpy_list_item): Use new helper functions.
11449 (recpy_bt_function_call_history): Use new type name.
11450 (btpy_call_getset): Remove.
11451 (gdbpy_initialize_btrace): Remove code to initialize
11452 gdb.BtraceFunctionCall.
11453 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11454 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11455 recpy_bt_func_prev, recpy_bt_func_next): New export.
11456 * python/py-record.c (recpy_func_type): New static object.
11457 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11458 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11459 recpy_func_next): New function.
11460 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11461 (recpy_func_getset): New static object.
11462 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11463 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11464
0ed5da75
TW
114652017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11466
11467 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11468 (btpy_object, btpy_insn_type, btpy_new): Remove.
11469 (btpy_list_object): Use gdb.RecordInstruction type instead of
11470 gdb.BtraceInstruction type.
11471 (btrace_insn_from_recpy_insn): New function.
11472 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11473 btpy_new.
11474 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11475 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11476 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11477 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11478 instead of btpy_object.
11479 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11480 btpy_insn_data, btpy_insn_decode): Rename to ...
11481 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11482 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11483 recpy_bt_insn_decode): This. Also, use new helper functions.
11484 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11485 recpy_insn_type.
11486 (btpy_insn_getset): Remove.
11487 (gdbpy_initialize_btrace): Remove code to initialize
11488 gdb.BtraceInstruction. Use recpy_element_object.
11489 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11490 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11491 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11492 * python/py-record.c (recpy_insn_type): New static object.
11493 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11494 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11495 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11496 New function.
11497 (recpy_insn_getset): New static object.
11498 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11499 * python/py-record.h (recpy_element_object): New typedef.
11500 (recpy_insn_type, recpy_insn_new): New export.
11501
913aeadd
TW
115022017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11503
11504 * py-record-btrace.c (btpy_insn_new): Removed.
11505 (btpy_insn_or_gap_new): New function.
11506 (btpy_insn_error): Removed.
11507 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11508 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11509 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11510 btpy_insn_or_gap_new instead of btpy_insn_new.
11511 (btpy_insn_getset): Remove btpy_insn_error.
11512 * py-record.c (recpy_gap_type): New static object.
11513 (recpy_gap_object): New typedef.
11514 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11515 recpy_gap_reason_string): New function.
11516 (recpy_gap_getset): New static object.
11517 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11518 * py-record.h (recpy_gap_new): New export.
11519
a3be24ad
TW
115202017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11521
11522 * python/py-record.c (recpy_ptid): Remove.
11523 (recpy_record_getset): Remove recpy_ptid.
11524
ae20e79a
TW
115252017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11526
11527 * btrace.c (btrace_fetch): Set inferior_ptid.
11528 * python/py-record-btrace.c: Add "py-record.h" include.
11529 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11530 recpy_bt_end, recpy_bt_instruction_history,
11531 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11532 in gdb.Record object instead of current ptid.
11533 * python/py-record.c: Include new "py-record.h" file.
11534 (recpy_record_object): Moved to py-record.h.
11535 * python/py-record.h: New file.
11536
8d0050ea
TW
115372017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11538
11539 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11540 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11541 indentation.
11542
3f380b50
JB
115432017-05-01 Joel Brobecker <brobecker@adacore.com>
11544
11545 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11546 the past maintainers section.
11547
07495424
YQ
115482017-04-28 Yao Qi <yao.qi@linaro.org>
11549
11550 * infcmd.c (get_return_value): Use regcache ctor, and remove
11551 cleanup.
11552
deb1fa3e
YQ
115532017-04-28 Yao Qi <yao.qi@linaro.org>
11554 Pedro Alves <palves@redhat.com>
11555
11556 * regcache.c (regcache::regcache): New tag dispatch ctor.
11557 (do_cooked_read): Moved above.
11558 (regcache_dup): Use the tag dispatch ctor..
11559 * regcache.h (regcache): Declare ctor, delete copy ctor and
11560 assignment operator, remove friend regcache_dup.
11561
b421c83c
YQ
115622017-04-28 Yao Qi <yao.qi@linaro.org>
11563
11564 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11565 call method save instead of regcache_cpy.
11566 * regcache.h (struct regcache): Make regcache_dup a friend.
11567
ef79d9a3
YQ
115682017-04-28 Yao Qi <yao.qi@linaro.org>
11569
11570 * regcache.c (struct regcache): Move to regcache.h
11571 (regcache::arch): New method.
11572 (regcache_get_ptid): Update.
11573 (get_regcache_arch): Call arch method.
11574 (get_regcache_aspace): Call method aspace.
11575 (register_buffer): Change it to method.
11576 (regcache_save): Change it to regcache::save.
11577 (regcache_restore): Likewise.
11578 (regcache_cpy_no_passthrough): Remove the declaration.
11579 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11580 (regcache_cpy_no_passthrough): Change it to method
11581 cpy_no_passthrough.
11582 (regcache_register_status): Change it to method
11583 get_register_status.
11584 (regcache_invalidate): Change it to method invalidate.
11585 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11586 (regcache_raw_update): Change it to method raw_update.
11587 (regcache_raw_read): Likewise.
11588 (regcache_raw_read_signed): Likewise.
11589 (regcache_raw_read_unsigned): Likewise.
11590 (regcache_raw_write_signed): Likewise.
11591 (regcache_raw_write_unsigned): Likewise.
11592 (regcache_cooked_read): Likewise.
11593 (regcache_cooked_read_value): Likewise.
11594 (regcache_cooked_read_signed): Likewise.
11595 (regcache_cooked_read_unsigned): Likewise.
11596 (regcache_cooked_write_signed): Likewise.
11597 (regcache_cooked_write_unsigned): Likewise.
11598 (regcache_raw_set_cached_value): Likewise.
11599 (regcache_raw_write): Likewise.
11600 (regcache_cooked_write): Likewise.
11601 (regcache_xfer_part): Likewise.
11602 (regcache_raw_read_part): Likewise.
11603 (regcache_raw_write_part): Likewise.
11604 (regcache_cooked_read_part): Likewise.
11605 (regcache_cooked_write_part): Likewise.
11606 (regcache_raw_supply): Likewise.
11607 (regcache_raw_collect): Likewise.
11608 (regcache_transfer_regset): Likewise.
11609 (regcache_supply_regset): Likewise.
11610 (regcache_collect_regset): Likewise.
11611 (regcache_debug_print_register): Likewise.
11612 (enum regcache_dump_what): Move it to regcache.h.
11613 (regcache_dump): Change it to method dump.
11614 * regcache.h (enum regcache_dump_what): New.
11615 (class regcache): New.
11616 * target.c (target_fetch_registers): Call method
11617 debug_print_register.
11618 (target_store_registers): Likewise.
11619
f8fdb78e
SM
116202017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11621
11622 * windows-nat.c (struct lm_info_windows): Initialize field.
11623 (windows_make_so): Allocate lm_info_windows with new.
11624 (windows_free_so): Free lm_info_windows with delete.
11625
9ccbfd7b
SM
116262017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11627
11628 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11629 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11630 cleanup.
11631 (darwin_free_so): Free lm_info_darwin with delete.
11632
76e75227
SM
116332017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11634
11635 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11636 <l_addr_p>: Change type to bool.
11637 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11638 (svr4_free_so): Free lm_info_svr4 with delete.
11639 (svr4_copy_library_list): Replace memcpy with call to copy
11640 constructor.
11641 (library_list_start_library, svr4_default_sos): Allocate
11642 lm_info_svr4 with new.
11643
51046d9e
SM
116442017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11645
11646 * solib-target.c (struct lm_info_target): Add destructor,
11647 initialize fields.
11648 <name>: Change type to std::string.
11649 (library_list_start_library): Allocate lm_info_target with new.
11650 (solib_target_free_library_list): Free lm_info_target with
11651 delete.
11652 (solib_target_current_sos): Adapt to std::string.
11653 (solib_target_free_so): Free lm_info_target with delete.
11654
4023ae76
SM
116552017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11656
11657 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11658 fields.
11659 (frv_current_sos): Allocate lm_info_frv with new.
11660 (frv_relocate_main_executable): Free lm_info_frv with delete,
11661 allocate with new.
11662 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11663
af43057b
SM
116642017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11665
11666 * solib-frv.c (struct lm_info_frv): Fix indentation.
11667
b0911207
SM
116682017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11669
11670 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11671 map field.
11672 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11673 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11674 and allocate with new.
11675 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11676
6c401f72
SM
116772017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11678
11679 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11680 <filename, member_name>: Change type to std::string.
11681 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11682 (library_list_start_library): Allocate lm_info_aix with new.
11683 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11684 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11685 with copy constructor.
11686
d0e449a1
SM
116872017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11688
11689 * solist.h (struct lm_info): Remove.
11690 (struct lm_info_base): New class.
11691 (struct so_list) <lm_info>: Change type to lm_info_base *.
11692 * nto-tdep.c (struct lm_info): Remove.
11693 (lm_addr): Adjust.
11694 * solib-aix.c (struct lm_info): Rename to ...
11695 (struct lm_info_aix): ... this. Extend lm_info_base.
11696 (lm_info_p): Rename to ...
11697 (lm_info_aix_p): ... this, and adjust.
11698 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11699 solib_aix_parse_libraries, library_list_start_library,
11700 solib_aix_free_library_list, solib_aix_parse_libraries,
11701 solib_aix_get_library_list,
11702 solib_aix_relocate_section_addresses, solib_aix_free_so,
11703 solib_aix_get_section_offsets,
11704 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11705 Adjust.
11706 (struct solib_aix_inferior_data) <library_list>: Adjust.
11707 * solib-darwin.c (struct lm_info): Rename to ...
11708 (struct lm_info_darwin): ... this. Extend lm_info_base.
11709 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11710 * solib-dsbt.c (struct lm_info): Rename to ...
11711 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11712 (struct dsbt_info) <main_executable_lm_info): Adjust.
11713 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11714 dsbt_relocate_section_addresses): Adjust.
11715 * solib-frv.c (struct lm_info): Rename to ...
11716 (struct lm_info_frv): ... this. Extend lm_info_base.
11717 (main_executable_lm_info): Adjust.
11718 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11719 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11720 find_canonical_descriptor_in_load_object,
11721 frv_fdpic_find_canonical_descriptor): Adjust.
11722 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11723 to lm_info_svr4.
11724 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11725 svr4_clear_so, svr4_copy_library_list,
11726 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11727 svr4_current_sos, svr4_fetch_objfile_link_map,
11728 solist_update_incremental): Adjust.
11729 * solib-svr4.h (struct lm_info_svr4): Move here from
11730 solib-svr4.c.
11731 * solib-target.c (struct lm_info): Rename to ...
11732 (struct lm_info_target): ... this. Extend lm_info_base.
11733 (lm_info_p): Rename to ...
11734 (lm_info_target_p): ... this.
11735 (solib_target_parse_libraries, library_list_start_segment,
11736 library_list_start_section, library_list_start_library,
11737 library_list_end_library, solib_target_free_library_list,
11738 solib_target_current_sos, solib_target_free_so,
11739 solib_target_relocate_section_addresses): Adjust.
11740 * windows-nat.c (struct lm_info): Rename to ...
11741 (struct lm_info_windows): ... this. Extend lm_info_base.
11742 (windows_make_so, handle_load_dll, handle_unload_dll,
11743 windows_xfer_shared_libraries): Adjust.
11744
434a4023
SM
117452017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11746
11747 * solib-darwin.c (struct darwin_so_list): Remove.
11748 (darwin_current_sos): Allocate an so_list object instead of a
11749 darwin_so_list, separately allocate an lm_info object.
11750 (darwin_free_so): Free lm_info.
11751
428544e8
JB
117522017-04-28 John Baldwin <jhb@FreeBSD.org>
11753
11754 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11755 with fprintf_filtered.
11756
4621115f
YQ
117572017-04-28 Yao Qi <yao.qi@linaro.org>
11758
11759 * regcache.c (regcache::regcache): New function.
11760 (regcache::~regcache): New function.
11761 (regcache_xmalloc_1): Remove.
11762 (regcache_xmalloc): Call new regcache.
11763 (regcache_xfree): Call delete regcache.
11764 (get_thread_arch_aspace_regcache): Call new regcache.
11765
339053c2
YQ
117662017-04-28 Yao Qi <yao.qi@linaro.org>
11767
11768 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11769 lwp instead of ptid_get_lwp.
11770
7974a605
YQ
117712017-04-28 Yao Qi <yao.qi@linaro.org>
11772
11773 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11774 lwp_info instead of getting from inferior_ptid.
11775
e15c3eb4
KS
117762017-04-27 Keith Seitz <keiths@redhat.com>
11777
11778 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11779 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11780 (CV_CONVERSION_BADNESS): Define.
11781 (rank_one_type): Remove overly restrictive rvalue reference
11782 rank checks.
11783 Add cv-qualifier checks and subranks for type equality.
11784 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11785 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11786 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11787
72bc1d24
SM
117882017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11789
11790 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11791 count when creating the object.
11792
55bcecda
UW
117932017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11794 Ulrich Weigand <uweigand@de.ibm.com>
11795
11796 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11797 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11798 is used in AIX.
11799 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11800 (process_xcoff_symbol): Likewise.
11801 (scan_xcoff_symtab): Likewise.
11802
5c99fcf8
AH
118032017-04-26 Alan Hayward <alan.hayward@arm.com>
11804
11805 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11806 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11807 (ia64_access_reg): Use get_frame_register_unsigned.
11808 (ia64_access_rse_reg): Likewise.
11809 (ia64_libunwind_frame_prev_register): Likewise.
11810
b41c5a85
JW
118112017-04-26 Jiong Wang <jiong.wang@arm.com>
11812
11813 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11814 * gdbarch.c: Regenerated.
11815 * gdbarch.h: Regenerated.
11816 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11817 visibility external.
11818 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11819 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11820 (enum cfa_how_kind): Move to ...
11821 (struct dwarf2_frame_state_reg_info): Likewise.
11822 (struct dwarf2_frame_state): Likewise.
11823 * dwarf2-frame.h: ... here.
11824 (dwarf2_frame_state_alloc_regs): New declaration.
11825 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11826 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11827
c185f580
AH
118282017-04-26 Alan Hayward <alan.hayward@arm.com>
11829
11830 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11831 regcache_raw_read_unsigned.
11832 (xtensa_pseudo_register_write): Likewise.
11833
19c45594
AH
118342017-04-26 Alan Hayward <alan.hayward@arm.com>
11835
11836 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11837 (nds32_pseudo_register_write): Likewise.
11838
4658f12e
YQ
118392017-04-25 Yao Qi <yao.qi@linaro.org>
11840
11841 * regcache.c (struct regcache) <readonly_p>: Change its type
11842 to bool.
11843 (regcache_xmalloc_1): Update parameter type and callers update.
11844
d581dda8
YQ
118452017-04-25 Yao Qi <yao.qi@linaro.org>
11846
11847 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11848 set_gdbarch_wchar_bit.
11849 * arm-tdep.c (arm_gdbarch_init): Likewise.
11850
debed3db
PA
118512017-04-25 Pedro Alves <palves@redhat.com>
11852
11853 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11854 (BothAreRelocatable, memcopy, memmove): Don't define.
11855 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11856 macros.
11857
b0b92aeb
PA
118582017-04-25 Pedro Alves <palves@redhat.com>
11859
11860 * common/common-defs.h: Include "common/poison.h".
11861 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11862 and adjust.
11863 * common/poison.h: New file.
11864 * common/traits.h: Include <type_traits>.
11865 (Not, Or, Requires): New, moved from common/function-view.h.
11866
16c4d54a
PA
118672017-04-25 Pedro Alves <palves@redhat.com>
11868
11869 * breakpoint.h (struct breakpoint): In-class initialize all
11870 fields. Make boolean fields "bool".
11871 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11872 memset call and initializations no longer necessary.
11873
b5c36682
PA
118742017-04-25 Pedro Alves <palves@redhat.com>
11875
11876 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11877 reference.
11878 (pt_btrace_insn): New function.
11879 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11880
5625a286
PA
118812017-04-25 Pedro Alves <palves@redhat.com>
11882
11883 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11884 "base" field and inherit from "bp_location" instead. Add
11885 non-default ctor.
11886 (allocate_location_exception): Use new non-default ctor.
11887 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11888 (init_bp_location): Convert to ...
11889 (bp_location::bp_location): ... this new ctor, and remove memset
11890 call.
11891 (base_breakpoint_allocate_location): Use the new non-default ctor.
11892 * breakpoint.h (bp_location): Now a class. Declare default and
11893 non-default ctors. In-class initialize all members.
11894 (init_bp_location): Remove declaration.
11895
23bcc18f
PA
118962017-04-25 Pedro Alves <palves@redhat.com>
11897
11898 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11899 assignment operator.
11900
e1ba3053
YQ
119012017-04-24 Yao Qi <yao.qi@linaro.org>
11902
11903 * doublest.c (convert_doublest_to_floatformat): Call
11904 floatformat_totalsize_bytes.
11905
10f489e5
TT
119062017-04-22 Tom Tromey <tom@tromey.com>
11907
11908 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11909 ui_out_emit_list.
11910 * stack.c (print_frame): Use ui_out_emit_list.
11911 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11912 ui_out_emit_list.
11913 * mi/mi-main.c (print_one_inferior)
11914 (mi_cmd_data_list_register_names)
11915 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11916 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11917 ui_out_emit_list.
11918 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11919 (mi_output_solib_attribs): Use ui_out_emit_list,
11920 ui_out_emit_tuple.
11921 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11922 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11923 (mi_cmd_stack_list_args, list_args_or_locals): Use
11924 ui_out_emit_list.
11925 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11926 * breakpoint.c (print_solib_event, output_thread_groups): Use
11927 ui_out_emit_list.
11928
0092b74d
TT
119292017-04-22 Tom Tromey <tom@tromey.com>
11930
11931 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11932 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11933 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11934
a14a62dd
TT
119352017-04-22 Tom Tromey <tom@tromey.com>
11936
11937 * tracepoint.c (tvariables_info_1)
11938 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11939
46b9c129
TT
119402017-04-22 Tom Tromey <tom@tromey.com>
11941
11942 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11943 annotate_arg_emitter.
11944 * breakpoint.c (print_mention_watchpoint)
11945 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11946 * annotate.h (struct annotate_arg_emitter): New.
11947
2e783024
TT
119482017-04-22 Tom Tromey <tom@tromey.com>
11949
11950 * record-btrace.c (record_btrace_insn_history)
11951 (record_btrace_insn_history_range, record_btrace_call_history)
11952 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11953 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11954 ui_out_emit_tuple.
11955 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11956 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11957 * skip.c (skip_info): Use ui_out_emit_tuple.
11958 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11959 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11960 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11961 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11962 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11963 ui_out_emit_tuple.
11964 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11965 (output_register, mi_cmd_data_read_memory)
11966 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11967 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11968 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11969 Use ui_out_emit_tuple.
11970 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11971 ui_out_emit_tuple.
11972 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11973 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11974 * linux-thread-db.c (info_auto_load_libthread_db): Use
11975 ui_out_emit_tuple.
11976 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11977 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11978 * disasm.c (do_mixed_source_and_assembly_deprecated)
11979 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11980 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11981 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11982 * breakpoint.c (print_one_breakpoint_location)
11983 (print_one_breakpoint): Use ui_out_emit_tuple.
11984 * auto-load.c (print_script, info_auto_load_cmd): Use
11985 ui_out_emit_tuple.
11986 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11987
9be21bb4
SM
119882017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11989
11990 * thread.c (print_thread_info_1): Remove dead code.
11991
0d4c07af
JK
119922017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11993
11994 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11995 GDB_SELF_TEST.
11996 * arm-tdep.c (selftests::arm_record_test): Likewise.
11997
4daf993d
YQ
119982017-04-21 Yao Qi <yao.qi@linaro.org>
11999
12000 * regcache.c (regcache_restore): Remove argument 2. Replace
12001 argument 3 with regcache. Get register status from
12002 src->register_status and get register contents from
12003 register_buffer (src, regnum).
12004 (regcache_cpy): Update.
12005
a6c21d4a
PA
120062017-04-19 Pedro Alves <palves@redhat.com>
12007
12008 * gdbthread.h (thread): Add missing closing parenthesis in
12009 comment.
12010
3a3fd0fd
PA
120112017-04-19 Pedro Alves <palves@redhat.com>
12012
12013 * common/refcounted-object.h: New file.
12014 * gdbthread.h: Include "common/refcounted-object.h".
12015 (thread_info): Inherit from refcounted_object and add comments.
12016 (thread_info::incref, thread_info::decref)
12017 (thread_info::m_refcount): Delete.
12018 (thread_info::deletable): Use the refcounted_object::refcount()
12019 method.
12020 * inferior.c (current_inferior_): Add comment.
12021 (set_current_inferior): Increment/decrement refcounts.
12022 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12023 not-deletable instead of comparing with the current inferior.
12024 (initialize_inferiors): Increment the initial inferior's refcount.
12025 * inferior.h (struct inferior): Forward declare.
12026 Include "common/refcounted-object.h".
12027 (current_inferior, set_current_inferior): Move declaration to
12028 before struct inferior's definition, and fix comment.
12029 (inferior): Inherit from refcounted_object. Add comments.
12030 * thread.c (switch_to_thread_no_regs): Reference the thread's
12031 inferior pointer directly instead of doing a ptid lookup.
12032 (switch_to_no_thread): New function.
12033 (switch_to_thread(thread_info *)): New function, factored out
12034 from ...
12035 (switch_to_thread(ptid_t)): ... this.
12036 (restore_current_thread): Delete.
12037 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12038 fields, and add 'inf' field.
12039 (do_restore_current_thread_cleanup): Check whether old->inf is
12040 alive instead of looking up an inferior by ptid. Use
12041 switch_to_thread and switch_to_no_thread.
12042 (restore_current_thread_cleanup_dtor): Use old->inf directly
12043 instead of lookup up an inferior by id. Decref the inferior.
12044 Don't restore 'removable'.
12045 (make_cleanup_restore_current_thread): Same the inferior pointer
12046 in old, instead of the inferior number. Incref the inferior.
12047 Don't save/clear 'removable'.
12048
9bcb1f16
PA
120492017-04-19 Pedro Alves <palves@redhat.com>
12050
12051 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12052 unittests/scoped_restore-selftests.c.
12053 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12054 * common/scoped_restore.h (scoped_restore_base): Make "class".
12055 (scoped_restore_base::release): New public method.
12056 (scoped_restore_base::scoped_restore_base): New protected ctor.
12057 (scoped_restore_base::m_saved_var): New protected field.
12058 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12059 scoped_restore_base base class instead of m_saved_var directly.
12060 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12061 (scoped_restore_tmpl::scoped_restore_tmpl(const
12062 scoped_restore_tmpl<T>&)): Likewise.
12063 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12064 method.
12065 (scoped_restore_tmpl::saved_var): New method.
12066 (scoped_restore_tmpl::m_saved_var): Delete.
12067 * inferior.h (inferior::detaching): Now a bool.
12068 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12069 cleanup.
12070 * unittests/scoped_restore-selftests.c: New file.
12071
26fcd539
PA
120722017-04-19 Pedro Alves <palves@redhat.com>
12073
12074 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12075 Re-sort in alphabetic order.
12076
fdd243b0
PA
120772017-04-18 Pedro Alves <palves@redhat.com>
12078
12079 * xml-support.c (obstack_xml_printf): Delete.
12080 * xml-support.h (obstack_xml_printf): Delete.
12081
4895cde2
PA
120822017-04-18 Pedro Alves <palves@redhat.com>
12083
12084 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12085 vdebug, verror, body_text, start_element, end_element, name,
12086 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12087 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12088 is_xinclude>: Make private and add m_ prefix.
12089 (gdb_xml_parser::body_text): New method, based on ...
12090 (gdb_xml_body_text): ... this. Adjust.
12091 (gdb_xml_parser::vdebug): New method, based on ...
12092 (gdb_xml_debug): ... this. Adjust.
12093 (gdb_xml_parser::verror): New method, based on ...
12094 (gdb_xml_error): ... this. Adjust.
12095 (gdb_xml_parser::start_element): New method, based on ...
12096 (gdb_xml_start_element): ... this. Adjust.
12097 (gdb_xml_start_element_wrapper): Defer to
12098 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12099 (gdb_xml_parser::end_element): New method, based on ...
12100 (gdb_xml_end_element_wrapper): ... this. Adjust.
12101 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12102 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12103 (gdb_xml_parser::use_dtd): New method, based on ...
12104 (gdb_xml_use_dtd): ... this. Adjust.
12105 (gdb_xml_parser::parse): New method, based on ...
12106 (gdb_xml_parse): ... this. Adjust.
12107 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12108 (xinclude_start_include): Adjust to call the parser's name method.
12109 (xml_xinclude_default, xml_xinclude_start_doctype)
12110 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12111 method.
12112 (xml_process_xincludes): Adjust to call parser methods.
12113 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12114 declarations.
12115
bd8a901f
PA
121162017-04-18 Pedro Alves <palves@redhat.com>
12117
12118 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12119 gdb::optional<std::string>.
12120 * xml-support.c: Include <string>.
12121 (scope_level::scope_level(scope_level &&))
12122 (scope_level::~scope_level): Delete.
12123 (scope_level::body): Now a std::string.
12124 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12125 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12126 parameter.
12127 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12128 (xinclude_parsing_data::output): Now a std::string reference.
12129 (xinclude_start_include): Adjust.
12130 (xml_xinclude_default): Adjust.
12131 (xml_process_xincludes): Add 'output' parameter, and return bool.
12132 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12133 and return bool.
12134 * xml-tdesc.c: Include <unordered_map> and <string>.
12135 (tdesc_xml_cache): Delete.
12136 (tdesc_xml_cache_s): Delete.
12137 (xml_cache): Now an std::unordered_map.
12138 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12139 (target_fetch_description_xml): Change return type to
12140 gdb::optional<std::string>, and adjust.
12141 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12142 (target_fetch_description_xml): Change return type to
12143 gdb::optional<std::string>.
12144
d35d1958
PA
121452017-04-18 Pedro Alves <palves@redhat.com>
12146
12147 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12148 unittests/optional-selftests.c.
12149 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12150 * unittests/optional-selftests.c: New file.
12151 * unittests/optional/assignment/1.cc: New file.
12152 * unittests/optional/assignment/2.cc: New file.
12153 * unittests/optional/assignment/3.cc: New file.
12154 * unittests/optional/assignment/4.cc: New file.
12155 * unittests/optional/assignment/5.cc: New file.
12156 * unittests/optional/assignment/6.cc: New file.
12157 * unittests/optional/assignment/7.cc: New file.
12158 * unittests/optional/cons/copy.cc: New file.
12159 * unittests/optional/cons/default.cc: New file.
12160 * unittests/optional/cons/move.cc: New file.
12161 * unittests/optional/cons/value.cc: New file.
12162 * unittests/optional/in_place.cc: New file.
12163 * unittests/optional/observers/1.cc: New file.
12164 * unittests/optional/observers/2.cc: New file.
12165
22796e97
PA
121662017-04-18 Pedro Alves <palves@redhat.com>
12167
12168 * common/gdb_optional.h: Include common/traits.h.
12169 (in_place_t): New type.
12170 (in_place): New constexpr variable.
12171 (optional::optional): Remove member initialization of
12172 m_instantiated.
12173 (optional::optional(in_place_t...)): New constructor.
12174 (optional::~optional): Use reset.
12175 (optional::optional(const optional&)): New.
12176 (optional::optional(const optional&&)): New.
12177 (optional::optional(T &)): New.
12178 (optional::optional(T &&)): New.
12179 (operator::operator=(const optional &)): New.
12180 (operator::operator=(optional &&)): New.
12181 (operator::operator= (const T &))
12182 (operator::operator= (T &&))
12183 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12184 (operator::reset): New.
12185 (operator::m_instantiated):: Add in-class initializer.
12186 * common/traits.h: Include <type_traits>.
12187 (struct And): New types.
12188
a7fc9b61
PA
121892017-04-18 Pedro Alves <palves@redhat.com>
12190
12191 * xml-support.c: Include <vector>.
12192 (scope_level::scope_level(const gdb_xml_element *))
12193 (scope_level::scope_level(scope_level&&)): New.
12194 (scope_level::~scope_level): New.
12195 (scope_level_s): Delete.
12196 (gdb_xml_parser::scopes): Now a std::vector.
12197 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12198 Use std::vector.
12199 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12200 scope cleanup code.
12201 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12202 of the scopes member. Use std::vector::emplace_back.
12203
010151c9
PA
122042017-04-18 Pedro Alves <palves@redhat.com>
12205
12206 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12207 a bool.
12208 (gdb_xml_end_element): Change type of first parameter.
12209 (gdb_xml_cleanup): Rename to ...
12210 (gdb_xml_parser::~gdb_xml_parser): ... this.
12211 (gdb_xml_create_parser_and_cleanup): Delete with ...
12212 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12213 to this new ctor.
12214 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12215 using gdb_xml_create_parser_and_cleanup.
12216 (xinclude_parsing_data): Add ctor/dtor.
12217 (xml_xinclude_cleanup): Delete.
12218 (xml_process_xincludes): Create a local xinclude_parsing_data
12219 instead of heap-allocating one. Create a local gdb_xml_parser
12220 instead of heap-allocating one with
12221 gdb_xml_create_parser_and_cleanup.
12222
d56060f0
JB
122232017-04-18 John Baldwin <jhb@FreeBSD.org>
12224
12225 PR threads/20743
12226 * fbsd-nat.c (resume_one_thread_cb): Remove.
12227 (resume_all_threads_cb): Remove.
12228 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12229 iterate_over_threads.
12230
305d16a9
JB
122312017-04-17 Joel Brobecker <brobecker@adacore.com>
12232
12233 * NEWS: Create a new section for the next release branch.
12234 Rename the section of the current branch, now that it has
12235 been cut.
12236
8bb57231
JB
122372017-04-17 Joel Brobecker <brobecker@adacore.com>
12238
12239 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12240 * version.in: Bump version to 8.0.50.DATE-git.
12241
096c92dd
SDJ
122422017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12243
12244 PR gdb/21385
12245 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12246 independently of the host, and fix build breakage on Cygwin.
12247
0550c955
PA
122482017-04-13 Pedro Alves <palves@redhat.com>
12249
12250 * inferior.c (free_inferior): Convert to ...
12251 (inferior::~inferior): ... this dtor.
12252 (inferior::inferior): New ctor, factored out from ...
12253 (add_inferior_silent): ... here. Allocate the inferior with a new
12254 expression.
12255 (delete_inferior): Call delete instead of free_inferior.
12256 * inferior.h (gdb_environ, continuation): Forward declare.
12257 (inferior): Now a class. Add in-class initialization to all
12258 members. Make boolean fields bool, except 'detaching'.
12259 (inferior::inferior): New explicit ctor.
12260 (inferior::~inferior): New.
12261
e3d60dfc
PA
122622017-04-13 Pedro Alves <palves@redhat.com>
12263
12264 * inferior.c (init_inferior_list): Delete.
12265 * inferior.h (init_inferior_list): Delete.
12266
5fd69d0a
PA
122672017-04-13 Pedro Alves <palves@redhat.com>
12268
12269 PR threads/13217
12270 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12271 (top level): Call it twice, with different thread sets.
12272
c6609450
PA
122732017-04-13 Pedro Alves <palves@redhat.com>
12274
12275 * thread.c: Include <algorithm>.
12276 (thread_array_cleanup): Delete.
12277 (scoped_inc_dec_ref): New class.
12278 (live_threads_count): New function.
12279 (set_thread_refcount): Delete.
12280 (tp_array_compar_ascending): Now a bool.
12281 (tp_array_compar): Convert to a std::sort comparison function.
12282 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12283 and live_threads_count.
12284
2a00d7ce
PA
122852017-04-13 Pedro Alves <palves@redhat.com>
12286
12287 * infrun.c (follow_fork_inferior): Also switch the current
12288 inferior.
12289
441d7c93
PA
122902017-04-13 Pedro Alves <palves@redhat.com>
12291
12292 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12293 before calling create_internal_breakpoint.
12294
808480f6
PA
122952017-04-13 Pedro Alves <palves@redhat.com>
12296
12297 * fork-child.c (execv_argv): New class.
12298 (breakup_args): Refactored as ...
12299 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12300 Copy arguments to storage and replace separators with NULL
12301 terminators in place.
12302 (escape_bang_in_quoted_argument): Adjust to return bool.
12303 (execv_argv::execv_argv): New ctor.
12304 (execv_argv::init_for_shell): New method, factored out from
12305 fork_inferior. Don't strdup strings into the vector.
12306 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12307 Remove free_vector_argv call.
12308
ad3d022a
YQ
123092017-04-13 Yao Qi <yao.qi@linaro.org>
12310
12311 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12312 tdep->rx_psw_type.
12313
e6ddc3bf
YQ
123142017-04-13 Yao Qi <yao.qi@linaro.org>
12315
12316 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12317 * rx-tdep.c (rx_gdbarch_init): Likewise.
12318
bfb8cf90
PA
123192017-04-13 Pedro Alves <palves@redhat.com>
12320
12321 * breakpoint.h (struct breakpoint): Reindent.
12322
f5336ca5
PA
123232017-04-13 Pedro Alves <palves@redhat.com>
12324
12325 * breakpoint.c (bp_location): Rename to ...
12326 (bp_locations): ... this. All references updated.
12327 (bp_location_count): Rename to ...
12328 (bp_locations_count): ... this. All references updated.
12329 (bp_location_placed_address_before_address_max): Rename to ...
12330 (bp_locations_placed_address_before_address_max): ... this. All
12331 references updated.
12332 (bp_location_shadow_len_after_address_max): Rename to ...
12333 (bp_locations_shadow_len_after_address_max): ... this. All
12334 references updated.
12335 (bp_location_compare_addrs): Rename to ...
12336 (bp_locations_compare_addrs): ... this. All references updated.
12337 (bp_location_compare):Rename to ...
12338 (bp_locations_compare): ... this. All references updated.
12339 (bp_location_target_extensions_update): Rename to ...
12340 (bp_locations_target_extensions_update): ... this. All references
12341 updated.
12342
be628ab8
SDJ
123432017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12344
12345 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12346 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12347 'sgtty.h'.
12348 * common/gdb_termios.h: New file, with parts of "terminal.h".
12349 * inflow.c: Include "gdb_termios.h".
12350 * ser-unix.c: Include "gdb_termios.h".
12351 * terminal.h: Move terminal-related defines to
12352 "common/gdb_termios.h".
12353
8e9e35b1
TT
123542017-04-12 Tom Tromey <tom@tromey.com>
12355
12356 * probe.c (parse_probes): Update.
12357 * location.h (delete_event_location): Don't declare.
12358 (event_location_deleter::operator()): Update.
12359 * location.c (event_location_deleter::operator()): Rename from
12360 delete_event_location.
12361 * linespec.h (linespec_result) <location>: Change type to
12362 event_location_up.
12363 * linespec.c (canonicalize_linespec, event_location_to_sals)
12364 (decode_objc): Update.
12365 (linespec_result): Don't call delete_event_location.
12366 * breakpoint.c (create_breakpoints_sal)
12367 (bkpt_probe_create_sals_from_location)
12368 (strace_marker_create_sals_from_location): Update.
12369
16e802b9
TT
123702017-04-12 Tom Tromey <tom@tromey.com>
12371
12372 * linespec.h (struct linespec_result): Add constructor and
12373 destructor.
12374 (init_linespec_result, destroy_linespec_result)
12375 (make_cleanup_destroy_linespec_result): Don't declare.
12376 * linespec.c (init_linespec_result): Remove.
12377 (linespec_result::~linespec_result): Rename from
12378 destroy_linespec_result. Update.
12379 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12380 Remove.
12381 * breakpoint.c (create_breakpoint, break_range_command)
12382 (decode_location_default): Update.
12383 * ax-gdb.c (agent_command_1): Update.
12384
d28cd78a
TT
123852017-04-12 Tom Tromey <tom@tromey.com>
12386
12387 * remote.c (remote_download_tracepoint): Update.
12388 * python/py-breakpoint.c (bppy_get_location): Update.
12389 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12390 (gdbscm_breakpoint_location): Update.
12391 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12392 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12393 Change type to event_location_up.
12394 * breakpoint.c (create_overlay_event_breakpoint)
12395 (create_longjmp_master_breakpoint)
12396 (create_std_terminate_master_breakpoint)
12397 (create_exception_master_breakpoint)
12398 (breakpoint_event_location_empty_p, print_breakpoint_location)
12399 (print_one_breakpoint_location, create_thread_event_breakpoint)
12400 (init_breakpoint_sal, create_breakpoint)
12401 (print_recreate_ranged_breakpoint, break_range_command)
12402 (init_ada_exception_breakpoint, say_where): Update.
12403 (base_breakpoint_dtor): Don't call delete_event_location.
12404 (bkpt_print_recreate, tracepoint_print_recreate)
12405 (dprintf_print_recreate, update_static_tracepoint)
12406 (breakpoint_re_set_default): Update.
12407
711799d5
TT
124082017-04-12 Tom Tromey <tom@tromey.com>
12409
12410 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12411 type of "to_do". Update.
12412 (compute_stack_depth): Use std::vector.
12413
52d214d3
TT
124142017-04-12 Tom Tromey <tom@tromey.com>
12415
12416 * printcmd.c (find_instruction_backward): Use std::vector.
12417
4c404b8b
TT
124182017-04-12 Tom Tromey <tom@tromey.com>
12419
12420 * symfile.c (objfilep): Remove typedef.
12421 (reread_symbols): Use a std::vector.
12422
156d9eab
TT
124232017-04-12 Tom Tromey <tom@tromey.com>
12424
12425 * mi/mi-main.c (exec_direction_forward): Remove.
12426 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12427 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12428 scoped_restore.
12429 * guile/guile.c (guile_repl_command, guile_command)
12430 (gdbscm_execute_gdb_command): Use scoped_restore.
12431 * go-exp.y (go_parse): Use scoped_restore.
12432 * d-exp.y (d_parse): Use scoped_restore.
12433 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12434 * c-exp.y (c_parse): Use scoped_restore.
12435
4d89769a
TT
124362017-04-12 Tom Tromey <tom@tromey.com>
12437
12438 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12439 (mi_parse): Update return type.
12440 (mi_parse_free): Remove.
12441 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12442 (mi_parse::~mi_parse): Rename from mi_parse_free.
12443 (mi_parse_cleanup): Remove.
12444 (mi_parse): Return a unique_ptr. Use new.
12445 * mi/mi-main.c (mi_execute_command): Update.
12446
4b217cc7
TT
124472017-04-12 Tom Tromey <tom@tromey.com>
12448
12449 * location.c (explicit_location_lex_one): Return a
12450 unique_xmalloc_ptr.
12451 (string_to_explicit_location): Update. Remove cleanups.
12452
59d3651b
TT
124532017-04-12 Tom Tromey <tom@tromey.com>
12454
12455 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12456 (compare_value_and_voffset): Change type. Update.
12457 (compute_vtable_size): Change type of "offset_vec".
12458 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12459 (gnuv3_get_typeid): Remove extraneous declaration.
12460
b24b0d6c
TT
124612017-04-12 Tom Tromey <tom@tromey.com>
12462
12463 * charset.h (wchar_iterator): Fix comment.
12464
80a3b8c5
TT
124652017-04-12 Tom Tromey <tom@tromey.com>
12466
12467 * charset.c (iconv_wrapper): New class.
12468 (cleanup_iconv): Remove.
12469 (convert_between_encodings): Use it.
12470
c83dd867
TT
124712017-04-12 Tom Tromey <tom@tromey.com>
12472
12473 * symfile.h (increment_reading_symtab): Update type.
12474 * symfile.c (decrement_reading_symtab): Remove.
12475 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12476 * psymtab.c (psymtab_to_symtab): Update.
12477 * dwarf2read.c (dw2_instantiate_symtab): Update.
12478
0e8621a0
TT
124792017-04-12 Tom Tromey <tom@tromey.com>
12480
12481 * jit.c (struct jit_reader): Declare separately. Add constructor
12482 and destructor. Change type of "handle".
12483 (loaded_jit_reader): Define separately.
12484 (jit_reader_load): Update. New "new".
12485 (jit_reader_unload_command): Use "delete".
12486 * gdb-dlfcn.h (struct dlclose_deleter): New.
12487 (gdb_dlhandle_up): New typedef.
12488 (gdb_dlopen, gdb_dlsym): Update types.
12489 (gdb_dlclose): Remove.
12490 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12491 (gdb_dlsym): Change type of "handle".
12492 (make_cleanup_dlclose): Remove.
12493 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12494 * compile/compile-c-support.c (load_libcc): Update.
12495
67d89901
TT
124962017-04-12 Tom Tromey <tom@tromey.com>
12497
12498 * symtab.h (find_pcs_for_symtab_line): Change return type.
12499 * symtab.c (find_pcs_for_symtab_line): Change return type.
12500 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12501 type of "vec". Update.
12502 (ltpy_get_pcs_for_line): Update.
12503 * linespec.c (decode_digits_ordinary): Update.
12504
93921405
TT
125052017-04-12 Tom Tromey <tom@tromey.com>
12506
12507 * tracepoint.c (actions_command): Update.
12508 * python/python.c (python_command, python_interactive_command):
12509 Update.
12510 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12511 * guile/guile.c (guile_command): Update.
12512 * defs.h (read_command_lines, read_command_lines_1): Return
12513 command_line_up.
12514 (command_lines_deleter): New struct.
12515 (command_line_up): New typedef.
12516 * compile/compile.c (compile_code_command)
12517 (compile_print_command): Update.
12518 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12519 command_line_up.
12520 (make_cleanup_free_command_lines): Remove.
12521 * cli/cli-script.c (get_command_line, read_command_lines_1)
12522 (copy_command_lines): Return command_line_up.
12523 (while_command, if_command, read_command_lines, define_command)
12524 (document_command): Update.
12525 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12526 Remove.
12527 * breakpoint.h (breakpoint_set_commands): Change type of
12528 "commands".
12529 * breakpoint.c (breakpoint_set_commands): Change type of
12530 "commands". Update.
12531 (do_map_commands_command, update_dprintf_command_list)
12532 (create_tracepoint_from_upload): Update.
12533
ffc2605c
TT
125342017-04-12 Tom Tromey <tom@tromey.com>
12535
12536 * tracepoint.c (scope_info): Update.
12537 * spu-tdep.c (spu_catch_start): Update.
12538 * python/python.c (gdbpy_decode_line): Update.
12539 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12540 * python/py-breakpoint.c (bppy_init): Update.
12541 * probe.c (parse_probes): Update.
12542 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12543 * location.h (event_location_deleter): New struct.
12544 (event_location_up): New typedef.
12545 (new_linespec_location, new_address_location, new_probe_location)
12546 (new_explicit_location, copy_event_location)
12547 (string_to_event_location, string_to_event_location_basic)
12548 (string_to_explicit_location): Update return type.
12549 (make_cleanup_delete_event_location): Remove.
12550 * location.c (new_linespec_location, new_address_location)
12551 (new_probe_location, new_explicit_location, copy_event_location):
12552 Return event_location_up.
12553 (delete_event_location_cleanup)
12554 (make_cleanup_delete_event_location): Remove.
12555 (string_to_explicit_location, string_to_event_location_basic)
12556 (string_to_event_location): Return event_location_up.
12557 * linespec.c (canonicalize_linespec, event_location_to_sals)
12558 (decode_line_with_current_source)
12559 (decode_line_with_last_displayed, decode_objc): Update.
12560 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12561 * completer.c (location_completer): Update.
12562 * cli/cli-cmds.c (edit_command, list_command): Update.
12563 * breakpoint.c (create_overlay_event_breakpoint)
12564 (create_longjmp_master_breakpoint)
12565 (create_std_terminate_master_breakpoint)
12566 (create_exception_master_breakpoint)
12567 (create_thread_event_breakpoint): Update.
12568 (init_breakpoint_sal): Update. Remove some dead code.
12569 (create_breakpoint_sal): Change type of "location". Update.
12570 (create_breakpoints_sal, create_breakpoint, break_command_1)
12571 (dprintf_command, break_range_command, until_break_command)
12572 (init_ada_exception_breakpoint)
12573 (strace_marker_create_sals_from_location)
12574 (update_static_tracepoint, trace_command, ftrace_command)
12575 (strace_command, create_tracepoint_from_upload): Update.
12576 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12577 * ax-gdb.c (agent_command_1): Update.
12578
8f10c932
PA
125792017-04-12 Pedro Alves <palves@redhat.com>
12580
12581 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12582 * configure.tgt: Handle i[34567]86-*-go32* and
12583 i[34567]86-*-msdosdjgpp*.
12584 * i386-tdep.c (i386_svr4_reg_to_regnum):
12585 Make extern.
12586 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12587 i386-go32-tdep.c.
12588 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12589 * i386-go32-tdep.c: New file.
12590 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12591 declarations.
12592
0a31ccfb
SM
125932017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12594
12595 * aix-thread.c (pd_status2str): Change return type to const char *.
12596
e9bb3fbb
PA
125972017-04-12 Pedro Alves <palves@redhat.com>
12598
12599 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12600 calls to set_gdbarch_gnu_triplet_regexp.
12601
53375380
PA
126022017-04-12 Pedro Alves <palves@redhat.com>
12603
12604 PR gdb/21323
12605 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12606 New enum value.
12607 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12608 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12609 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12610 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12611 * gdbarch.h, gdbarch.c: Regenerate.
12612 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12613 gdbarch_wchar_bit and gdbarch_wchar_signed.
12614 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12615 * arm-tdep.c (arm_gdbarch_init): Likewise.
12616 * avr-tdep.c (avr_gdbarch_init): Likewise.
12617 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12618 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12619 * i386-tdep.c (i386_go32_init_abi): Likewise.
12620 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12621 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12622 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12623 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12624 * sh-tdep.c (sh_gdbarch_init): Likewise.
12625 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12626 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12627 * windows-tdep.c (windows_init_abi): Likewise.
12628 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12629
53e710ac
PA
126302017-04-12 Pedro Alves <palves@redhat.com>
12631
12632 PR c++/21323
12633 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12634 cplus_primitive_type_char32_t>: New enum values.
12635 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12636 and cplus_primitive_type_char32_t.
12637 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12638 32, use the archtecture's built-in type for char16_t and char32_t,
12639 respectively. Otherwise, fallback to init_integer_type as before,
12640 but make the type unsigned, and issue a complaint.
12641 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12642
ab0538b8
AH
126432017-04-12 Alan Hayward <alan.hayward@arm.com>
12644
5e0e0422 12645 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12646 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12647
5430098f
SDJ
126482017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12649
12650 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12651 'const char *'.
12652
7c5ded6a
SDJ
126532017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12654
12655 * common/common-utils.c (free_vector_argv): New function.
12656 * common/common-utils.h: Include <vector>.
12657 (free_vector_argv): New prototype.
12658 * darwin-nat.c (darwin_create_inferior): Rewrite function
12659 prototype in order to constify "exec_file" and accept a
12660 "std::string" for "allargs".
12661 * fork-child.c: Include <vector>.
12662 (breakup_args): Rewrite function, using C++.
12663 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12664 and accept "std::string" for "allargs". Update the code to
12665 calculate "argv" based on "allargs". Update calls to "exec_fun"
12666 and "execvp".
12667 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12668 order to constify "exec_file" and accept a "std::string" for
12669 "allargs".
12670 * go32-nat.c (go32_create_inferior): Likewise.
12671 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12672 * infcmd.c (run_command_1): Constify "exec_file". Use
12673 "std::string" for inferior arguments.
12674 * inferior.h (fork_inferior): Update prototype.
12675 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12676 prototype in order to constify "exec_file" and accept a
12677 "std::string" for "allargs".
12678 * nto-procfs.c (procfs_create_inferior): Likewise.
12679 * procfs.c (procfs_create_inferior): Likewise.
12680 * remote-sim.c (gdbsim_create_inferior): Likewise.
12681 * remote.c (extended_remote_run): Update code to accept
12682 "std::string" as argument.
12683 (extended_remote_create_inferior): Rewrite function prototype in
12684 order to constify "exec_file" and accept a "std::string" for
12685 "allargs".
12686 * rs6000-nat.c (super_create_inferior): Likewise.
12687 (rs6000_create_inferior): Likewise.
12688 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12689 * windows-nat.c (windows_create_inferior): Likewise.
12690
ae0eee42
PA
126912017-04-11 Pedro Alves <palves@redhat.com>
12692
12693 * thread.c: Fix whitespace throughout.
12694
a6acac06
PR
126952017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12696
12697 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12698
64403bd1
AH
126992017-04-11 Alan Hayward <alan.hayward@arm.com>
12700
12701 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12702
a5bef50f
SDJ
127032017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12704
12705 PR gdb/21364
12706 * osdata.c (info_osdata): Check if 'type' is an empty string
12707 instead of NULL.
12708
9295a5a9
PA
127092017-04-10 Pedro Alves <palves@redhat.com>
12710
12711 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12712 (ptid_to_global_thread_id, in_thread_list)
12713 (do_captured_list_thread_ids, set_resumed, set_running)
12714 (set_executing, set_stop_requested, finish_thread_state)
12715 (validate_registers_access, can_access_registers_ptid)
12716 (print_thread_info_1, switch_to_thread)
12717 (do_restore_current_thread_cleanup)
12718 (make_cleanup_restore_current_thread, thread_command)
12719 (thread_name_command): Use operator== instead of ptid_equal.
12720
996812e3
PA
127212017-04-10 Pedro Alves <palves@redhat.com>
12722
12723 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12724 (current_thread_cleanup_chain): Delete.
12725 (restore_current_thread_cleanup_dtor)
12726 (make_cleanup_restore_current_thread): Remove references to
12727 current_thread_cleanup_chain.
12728
845b344f
AH
127292017-04-10 Alan Hayward <alan.hayward@arm.com>
12730
12731 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12732 REG_UNKNOWN.
12733
803bdfe4
YQ
127342017-04-10 Yao Qi <yao.qi@linaro.org>
12735
12736 PR gdb/19942
12737 * gdbthread.h (thread_info::deletable): New method.
12738 (thread_info::incref): New method.
12739 (thread_info::decref): New method.
12740 (thread_info::refcount): Move it to private.
12741 * infrun.c (save_stop_context): Call inc_refcount.
12742 (release_stop_context_cleanup): Likewise.
12743 * thread.c (set_thread_exited): New function.
12744 (init_thread_list): Delete "tp" only it is deletable, otherwise
12745 call set_thread_exited.
12746 (delete_thread_1): Call set_thread_exited.
12747 (current_thread_cleanup) <inferior_pid>: Remove.
12748 <thread>: New field.
12749 (restore_current_thread_ptid_changed): Removed.
12750 (do_restore_current_thread_cleanup): Adjust.
12751 (restore_current_thread_cleanup_dtor): Don't call
12752 find_thread_ptid.
12753 (set_thread_refcount): Use dec_refcount.
12754 (make_cleanup_restore_current_thread): Adjust.
12755 (thread_apply_all_command): Call inc_refcount.
12756 (_initialize_thread): Don't call
12757 observer_attach_thread_ptid_changed.
12758
8c25b497
YQ
127592017-04-10 Yao Qi <yao.qi@linaro.org>
12760
12761 * thread.c (delete_thread_1): Hoist code on marking thread as
12762 exited.
12763
8473b447
SM
127642017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12765
12766 * windows-nat.c (windows_detach): Initialize ptid with
12767 minus_one_ptid.
12768
6670ec13
SM
127692017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12770
12771 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12772
ba2f91bb
AH
127732017-04-07 Alan Hayward <alan.hayward@arm.com>
12774
12775 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12776 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12777 (bfin_pseudo_register_write): Likewise
12778
436252de
SM
127792017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12780
12781 * common/ptid.h (struct ptid): Change to...
12782 (class ptid_t): ... this.
12783 <ptid_t>: New constructors.
12784 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12785 matches>: New methods.
12786 <make_null, make_minus_one>: New static methods.
12787 <pid>: Rename to...
12788 <m_pid>: ...this.
12789 <lwp>: Rename to...
12790 <m_lwp>: ...this.
12791 <tid>: Rename to...
12792 <m_tid>: ...this.
12793 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12794 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12795 as references, move comment to class ptid_t.
12796 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12797 ptid_t static methods.
12798 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12799 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12800 Take ptid arguments as references, implement using ptid_t methods.
12801 * unittests/ptid-selftests.c: New file.
12802 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12803 unittests/ptid-selftests.c.
12804 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12805
0dedf377
TP
128062017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12807
12808 * python/python.c (python_run_simple_file): Cast mode literal to
12809 non-const char pointer as expected by PyFile_FromString.
12810
4e9868d4
SM
128112017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12812
12813 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12814 minus_one_ptid and null_ptid.
12815
9bf2a700
PA
128162017-04-05 Pedro Alves <palves@redhat.com>
12817
12818 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12819 * configure: Regenerate.
12820
a121b7c1
PA
128212017-04-05 Pedro Alves <palves@redhat.com>
12822
12823 * ada-exp.y (yyerror): Constify.
12824 * ada-lang.c (bound_name, get_selections)
12825 (ada_variant_discrim_type)
12826 (ada_variant_discrim_name, ada_value_struct_elt)
12827 (ada_lookup_struct_elt_type, is_unchecked_variant)
12828 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12829 (catch_ada_exception_command_split)
12830 (catch_ada_assert_command_split, catch_assert_command)
12831 (ada_op_name): Constify.
12832 * ada-lang.h (ada_yyerror, get_selections)
12833 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12834 * arc-tdep.c (arc_print_frame_cache): Constify.
12835 * arm-tdep.c (arm_skip_stub): Constify.
12836 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12837 (gen_aggregate_elt_ref): Constify.
12838 * bcache.c (print_bcache_statistics): Constify.
12839 * bcache.h (print_bcache_statistics): Constify.
12840 * break-catch-throw.c (catch_exception_command_1):
12841 * breakpoint.c (struct ep_type_description::description):
12842 Constify.
12843 (add_solib_catchpoint): Constify.
12844 (catch_fork_command_1): Add cast.
12845 (add_catch_command): Constify.
12846 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12847 Constify.
12848 * bsd-uthread.c (bsd_uthread_state): Constify.
12849 * buildsym.c (patch_subfile_names): Constify.
12850 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12851 Constify.
12852 * c-exp.y (yyerror): Constify.
12853 (token::oper): Constify.
12854 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12855 * c-varobj.c (cplus_describe_child): Constify.
12856 * charset.c (find_charset_names): Add cast.
12857 (find_charset_names): Constify array and add const_cast.
12858 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12859 (edit_command): Constify.
12860 * cli/cli-decode.c (lookup_cmd): Constify.
12861 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12862 Constify.
12863 (struct dump_context): Constify.
12864 (add_dump_command, restore_command): Constify.
12865 * cli/cli-script.c (get_command_line): Constify.
12866 * cli/cli-script.h (get_command_line): Constify.
12867 * cli/cli-utils.c (check_for_argument): Constify.
12868 * cli/cli-utils.h (check_for_argument): Constify.
12869 * coff-pe-read.c (struct read_pe_section_data): Constify.
12870 * command.h (lookup_cmd): Constify.
12871 * common/print-utils.c (decimal2str): Constify.
12872 * completer.c (gdb_print_filename): Constify.
12873 * corefile.c (set_gnutarget): Constify.
12874 * cp-name-parser.y (yyerror): Constify.
12875 * cp-valprint.c (cp_print_class_member): Constify.
12876 * cris-tdep.c (cris_register_name, crisv32_register_name):
12877 Constify.
12878 * d-exp.y (yyerror): Constify.
12879 (struct token::oper): Constify.
12880 * d-lang.h (d_yyerror): Constify.
12881 * dbxread.c (struct header_file_location::name): Constify.
12882 (add_old_header_file, add_new_header_file, last_function_name)
12883 (dbx_next_symbol_text, add_bincl_to_list)
12884 (find_corresponding_bincl_psymtab, set_namestring)
12885 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12886 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12887 * defs.h (command_line_input, print_address_symbolic)
12888 (deprecated_readline_begin_hook): Constify.
12889 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12890 Constify.
12891 * event-top.c (handle_line_of_input): Constify and add cast.
12892 * exceptions.c (catch_errors): Constify.
12893 * exceptions.h (catch_errors): Constify.
12894 * expprint.c (print_subexp_standard, op_string, op_name)
12895 (op_name_standard, dump_raw_expression, dump_raw_expression):
12896 * expression.h (op_name, op_string, dump_raw_expression):
12897 Constify.
12898 * f-exp.y (yyerror): Constify.
12899 (struct token::oper): Constify.
12900 (struct f77_boolean_val::name): Constify.
12901 * f-lang.c (f_word_break_characters): Constify.
12902 * f-lang.h (f_yyerror): Constify.
12903 * fork-child.c (fork_inferior): Add cast.
12904 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12905 (new_variant): Constify.
12906 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12907 * gdbarch.c: Regenerate.
12908 * gdbcore.h (set_gnutarget): Constify.
12909 * go-exp.y (yyerror): Constify.
12910 (token::oper): Constify.
12911 * go-lang.h (go_yyerror): Constify.
12912 * go32-nat.c (go32_sysinfo): Constify.
12913 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12914 * guile/scm-cmd.c (cmdscm_function): Constify.
12915 * guile/scm-param.c (pascm_param_value): Constify.
12916 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12917 (h8300sx_register_name): Constify.
12918 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12919 Constify.
12920 * ia64-tdep.c (ia64_register_names): Constify.
12921 * infcmd.c (construct_inferior_arguments): Constify.
12922 (path_command, attach_post_wait): Constify.
12923 * language.c (show_range_command, show_case_command)
12924 (unk_lang_error): Constify.
12925 * language.h (language_defn::la_error)
12926 (language_defn::la_name_of_this): Constify.
12927 * linespec.c (decode_line_2): Constify.
12928 * linux-thread-db.c (thread_db_err_str): Constify.
12929 * lm32-tdep.c (lm32_register_name): Constify.
12930 * m2-exp.y (yyerror): Constify.
12931 * m2-lang.h (m2_yyerror): Constify.
12932 * m32r-tdep.c (m32r_register_names): Constify and make static.
12933 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12934 * m88k-tdep.c (m88k_register_name): Constify.
12935 * macroexp.c (appendmem): Constify.
12936 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12937 (upgrade_type, parse_external, parse_partial_symbols)
12938 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12939 (new_symbol): Constify.
12940 * memattr.c (mem_info_command): Constify.
12941 * mep-tdep.c (register_name_from_keyword): Constify.
12942 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12943 Constify.
12944 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12945 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12946 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12947 cast.
12948 (mi_execute_async_cli_command): Constify.
12949 * mips-tdep.c (mips_register_name): Constify.
12950 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12951 (am33_register_name, am33_2_register_name)
12952 * moxie-tdep.c (moxie_register_names): Constify.
12953 * nat/linux-osdata.c (osdata_type): Constify fields.
12954 * nto-tdep.c (nto_parse_redirection): Constify.
12955 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12956 (lookup_child_selector): Constify.
12957 (objc_methcall::name): Constify.
12958 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12959 (lookup_struct_typedef): Constify.
12960 * objfiles.c (pc_in_section): Constify.
12961 * objfiles.h (pc_in_section): Constify.
12962 * p-exp.y (struct token::oper): Constify.
12963 (yyerror): Constify.
12964 * p-lang.h (pascal_yyerror): Constify.
12965 * parser-defs.h (op_name_standard): Constify.
12966 (op_print::string): Constify.
12967 (exp_descriptor::op_name): Constify.
12968 * printcmd.c (print_address_symbolic): Constify.
12969 * psymtab.c (print_partial_symbols): Constify.
12970 * python/py-breakpoint.c (stop_func): Constify.
12971 (bppy_get_expression): Constify.
12972 * python/py-cmd.c (cmdpy_completer::name): Constify.
12973 (cmdpy_function): Constify.
12974 * python/py-event.c (evpy_add_attribute)
12975 (gdbpy_initialize_event_generic): Constify.
12976 * python/py-event.h (evpy_add_attribute)
12977 (gdbpy_initialize_event_generic): Constify.
12978 * python/py-evts.c (add_new_registry): Constify.
12979 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12980 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12981 * python/py-inferior.c (get_buffer): Add cast.
12982 * python/py-param.c (parm_constant::name): Constify.
12983 * python/py-unwind.c (fprint_frame_id): Constify.
12984 * python/python.c (gdbpy_parameter_value): Constify.
12985 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12986 * remote.c (memory_packet_config::name): Constify.
12987 (show_packet_config_cmd, remote_write_bytes)
12988 (remote_buffer_add_string):
12989 * reverse.c (exec_reverse_once): Constify.
12990 * rs6000-tdep.c (variant::name, variant::description): Constify.
12991 * rust-exp.y (rustyyerror): Constify.
12992 * rust-lang.c (rust_op_name): Constify.
12993 * rust-lang.h (rustyyerror): Constify.
12994 * serial.h (serial_ops::name): Constify.
12995 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12996 (sh_sh3e_register_name, sh_sh2e_register_name)
12997 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12998 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12999 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13000 (sh_sh4al_dsp_register_name): Constify.
13001 * sh64-tdep.c (sh64_register_name): Constify.
13002 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13003 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13004 * stabsread.c (patch_block_stabs, read_type_number)
13005 (ref_map::stabs, ref_add, process_reference)
13006 (symbol_reference_defined, define_symbol, define_symbol)
13007 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13008 (read_one_struct_field, read_struct_fields, read_baseclasses)
13009 (read_tilde_fields, read_struct_type, read_array_type)
13010 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13011 (read_huge_number, read_range_type, read_args, common_block_start)
13012 (find_name_end): Constify.
13013 * stabsread.h (common_block_start, define_symbol)
13014 (process_one_symbol, symbol_reference_defined, ref_add):
13015 * symfile.c (get_section_index, add_symbol_file_command):
13016 * symfile.h (get_section_index): Constify.
13017 * target-descriptions.c (tdesc_type::name): Constify.
13018 (tdesc_free_type): Add cast.
13019 * target.c (find_default_run_target):
13020 (add_deprecated_target_alias, find_default_run_target)
13021 (target_announce_detach): Constify.
13022 (do_option): Constify.
13023 * target.h (add_deprecated_target_alias): Constify.
13024 * thread.c (print_thread_info_1): Constify.
13025 * top.c (deprecated_readline_begin_hook, command_line_input):
13026 Constify.
13027 (init_main): Add casts.
13028 * top.h (handle_line_of_input): Constify.
13029 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13030 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13031 (tfind_command): Rename to ...
13032 (tfind_command_1): ... this and constify.
13033 (tfind_command): New function.
13034 (tfind_end_command, tfind_start_command): Adjust.
13035 (encode_source_string): Constify.
13036 * tracepoint.h (encode_source_string): Constify.
13037 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13038 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13039 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13040 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13041 * tui/tui-win.c (parse_scrolling_args): Constify.
13042 * tui/tui-windata.c (tui_erase_data_content): Constify.
13043 * tui/tui-windata.h (tui_erase_data_content): Constify.
13044 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13045 * tui/tui.c (tui_enable): Add cast.
13046 * utils.c (defaulted_query): Constify.
13047 (init_page_info): Add cast.
13048 (puts_debug, subset_compare): Constify.
13049 * utils.h (subset_compare): Constify.
13050 * varobj.c (varobj_format_string): Constify.
13051 * varobj.h (varobj_format_string): Constify.
13052 * vax-tdep.c (vax_register_name): Constify.
13053 * windows-nat.c (windows_detach): Constify.
13054 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13055 * xml-support.c (gdb_xml_end_element): Constify.
13056 * xml-tdesc.c (tdesc_start_reg): Constify.
13057 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13058 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13059 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13060
995816ba
PA
130612017-04-05 Pedro Alves <palves@redhat.com>
13062
13063 * proc-api.c (struct trans): Constify.
13064 (procfs_note): Constify.
13065 * proc-events.c (struct trans, syscall_table):
13066 * proc-flags.c (struct trans): Constify.
13067 * proc-utils.h (procfs_note): Constify.
13068 * proc-why.c (struct trans): Constify.
13069 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13070 (procfs_detach): Constify.
13071 * sol-thread.c (struct string_map): Constify.
13072 (td_err_string, td_state_string): Constify.
13073
3e83a920
PA
130742017-04-05 Pedro Alves <palves@redhat.com>
13075
13076 * proc-api.c (procfs_filename): Don't initialize
13077 procfs_filename.
13078 (prepare_to_trace): Assume procfs_filename is non-NULL.
13079 (_initialize_proc_api): Give procfs_filename a default value here.
13080
63160a43
PA
130812017-04-05 Pedro Alves <palves@redhat.com>
13082
13083 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13084 'cond_string' parameter.
13085 (extract_exception_regexp): Constify 'string' parameter.
13086 (catch_exception_command_1): Constify.
13087 * breakpoint.c (init_catchpoint)
13088 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13089 parameter.
13090 (ep_parse_optional_if_clause, catch_fork_command_1)
13091 (catch_exec_command_1): Constify.
13092 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13093 parameter.
13094 (ep_parse_optional_if_clause): Constify.
13095 * cli/cli-utils.c (remove_trailing_whitespace)
13096 (check_for_argument): Constify.
13097 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13098 non-const overload.
13099 (check_for_argument): Likewise.
13100
9b2eba3d
PA
131012017-04-05 Pedro Alves <palves@redhat.com>
13102
13103 * event-top.c (command_line_handler): Add cast to execute_command
13104 call.
13105 * record-btrace.c (cmd_record_btrace_bts_start)
13106 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13107 (cmd_record_btrace_start): Add cast to execute_command call.
13108 * record-full.c (record_full_goto_insn):
13109 * record.c (record_start, record_stop): Add cast to
13110 execute_command_to_string calls.
13111 (cmd_record_start): Add cast to execute_command calls.
13112
2adadf51
PA
131132017-04-05 Pedro Alves <palves@redhat.com>
13114
13115 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13116 static inline function.
13117 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13118 array and use gdb_PyArg_ParseTupleAndKeywords.
13119 * python/py-cmd.c (cmdpy_init): Likewise.
13120 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13121 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13122 (infpy_search_memory): Likewise.
13123 * python/py-objfile.c (objfpy_add_separate_debug_file)
13124 (gdbpy_lookup_objfile): Likewise.
13125 * python/py-symbol.c (gdbpy_lookup_symbol)
13126 (gdbpy_lookup_global_symbol): Likewise.
13127 * python/py-type.c (gdbpy_lookup_type): Likewise.
13128 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13129 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13130 Likewise.
13131
0d1f4ceb
PA
131322017-04-05 Pedro Alves <palves@redhat.com>
13133
13134 * python/python-internal.h (gdb_PyGetSetDef): New type.
13135 * python/py-block.c (block_object_getset)
13136 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13137 * python/py-event.c (event_object_getset)
13138 (finish_breakpoint_object_getset): Likewise.
13139 * python/py-inferior.c (inferior_object_getset): Likewise.
13140 * python/py-infthread.c (thread_object_getset): Likewise.
13141 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13142 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13143 * python/py-objfile.c (objfile_getset): Likewise.
13144 * python/py-progspace.c (pspace_getset): Likewise.
13145 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13146 Likewise.
13147 * python/py-record.c (recpy_record_getset): Likewise.
13148 * python/py-symbol.c (symbol_object_getset): Likewise.
13149 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13150 Likewise.
13151 * python/py-type.c (type_object_getset, field_object_getset):
13152 Likewise.
13153 * python/py-value.c (value_object_getset): Likewise.
13154
4d759979
PA
131552017-04-05 Pedro Alves <palves@redhat.com>
13156
13157 * python/python-internal.h (gdb_PyObject_CallMethod)
13158 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13159 New functions.
13160 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13161 (PySys_GetObject, PySys_SetPath): New macros.
13162
fdf9e36f
PA
131632017-04-05 Pedro Alves <palves@redhat.com>
13164
13165 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13166 info_osdata_command.
13167 * osdata.c (info_osdata_command): Rename to ...
13168 (info_osdata): ... this. Constify 'type' parameter, and remove
13169 the 'from_tty' parameter. Accept NULL TYPE.
13170 (info_osdata_command): New function.
13171 * osdata.h (info_osdata_command): Remove declaration.
13172 (info_osdata): New declaration.
13173
9f33b8b7
PA
131742017-04-05 Pedro Alves <palves@redhat.com>
13175
13176 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13177 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13178 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13179 parameter.
13180 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13181 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13182 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13183 parameter.
13184 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13185 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13186 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13187 (mi_cmd_file_list_exec_source_files)
13188 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13189 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13190 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13191 parameter.
13192 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13193 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13194 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13195 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13196 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13197 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13198 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13199 'command' parameter.
13200 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13201 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13202 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13203 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13204 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13205 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13206 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13207 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13208 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13209 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13210 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13211 parameter.
13212 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13213 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13214 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13215 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13216 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13217 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13218 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13219 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13220 (mi_cmd_data_list_changed_registers)
13221 (mi_cmd_data_write_register_values)
13222 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13223 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13224 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13225 (mi_cmd_list_features, mi_cmd_list_target_features)
13226 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13227 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13228 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13229 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13230 (mi_cmd_trace_frame_collected): Constify 'command'
13231 parameter.
13232 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13233 'command' parameter.
13234
67cb5b2d
PA
132352017-04-05 Pedro Alves <palves@redhat.com>
13236
13237 * ada-lang.c (ada_completer_word_break_characters): Now a const
13238 array.
13239 (ada_get_gdb_completer_word_break_characters): Constify.
13240 * completer.c (gdb_completer_command_word_break_characters)
13241 (gdb_completer_file_name_break_characters)
13242 (gdb_completer_quote_characters): Now const arrays.
13243 (get_gdb_completer_quote_characters): Constify.
13244 (set_rl_completer_word_break_characters): New function.
13245 (set_gdb_completion_word_break_characters)
13246 (complete_line_internal): Use it.
13247 * completer.h (get_gdb_completer_quote_characters): Constify.
13248 (set_rl_completer_word_break_characters): Declare.
13249 * f-lang.c (f_word_break_characters): Constify.
13250 * language.c (default_word_break_characters): Constify.
13251 * language.h (language_defn::la_word_break_characters): Constify.
13252 (default_word_break_characters): Constify.
13253 * top.c (init_main): Use set_rl_completer_word_break_characters.
13254
7a114964
PA
132552017-04-05 Pedro Alves <palves@redhat.com>
13256
13257 * aix-thread.c (aix_thread_pid_to_str)
13258 (aix_thread_extra_thread_info): Constify.
13259 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13260 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13261 (bsd_uthread_pid_to_str): Constify.
13262 * corelow.c (core_pid_to_str): Constify.
13263 * darwin-nat.c (darwin_pid_to_str): Constify.
13264 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13265 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13266 Constify.
13267 * gnu-nat.c (gnu_pid_to_str): Constify.
13268 * go32-nat.c (go32_pid_to_str): Constify.
13269 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13270 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13271 * inferior.c (inferior_pid_to_str): Constify.
13272 * linux-nat.c (linux_nat_pid_to_str): Constify.
13273 * linux-tdep.c (linux_core_pid_to_str): Constify.
13274 * linux-thread-db.c (thread_db_pid_to_str)
13275 (thread_db_extra_thread_info): Constify.
13276 * nto-tdep.c (nto_extra_thread_info): Constify.
13277 * nto-tdep.h (nto_extra_thread_info): Constify.
13278 * obsd-nat.c (obsd_pid_to_str): Constify.
13279 * procfs.c (procfs_pid_to_str): Constify.
13280 * ravenscar-thread.c (ravenscar_extra_thread_info)
13281 (ravenscar_pid_to_str): Constify.
13282 * remote-sim.c (gdbsim_pid_to_str): Constify.
13283 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13284 Constify.
13285 * sol-thread.c (solaris_pid_to_str): Constify.
13286 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13287 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13288 * target.c (default_pid_to_str, target_pid_to_str)
13289 (normal_pid_to_str, default_pid_to_str): Constify.
13290 * target.h (target_ops::to_pid_to_str)
13291 (target_ops::to_extra_thread_info): Constify.
13292 (target_pid_to_str, normal_pid_to_str): Constify.
13293 * windows-nat.c (windows_pid_to_str): Constify.
13294 * gdbarch.sh (core_pid_to_str): Constify.
13295 * target-delegates.c: Regenerate.
13296 * gdbarch.h, gdbarch.c: Regenerate.
13297
69bbf465
PA
132982017-04-05 Pedro Alves <palves@redhat.com>
13299
13300 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13301 the memory of the temporary warning_pre_print override.
13302 * utils.c (warning_pre_print): Constify.
13303 * utils.h (warning_pre_print): Constify.
13304
be47f9e8
PA
133052017-04-05 Pedro Alves <palves@redhat.com>
13306
13307 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13308 (shell_command): New function.
13309 (make_command): Use std::string.
13310 (init_cli_cmds): Register shell_command instead of shell_escape.
13311
bde6261a
PA
133122017-04-05 Pedro Alves <palves@redhat.com>
13313
13314 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13315 * tracepoint.c (default_collect): Don't initialize.
13316
b38ef47f
PA
133172017-04-05 Pedro Alves <palves@redhat.com>
13318
13319 * macroexp.c (macro_buffer::shared): Now a bool.
13320 (init_buffer): Update.
13321 (init_shared_buffer): Constify 'addr' parameter.
13322 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13323 casts.
13324
f995bbe8
PA
133252017-04-05 Pedro Alves <palves@redhat.com>
13326
13327 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13328 * disasm.c (set_disassembler_options): Constify local.
13329 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13330
4a596fe2
SDJ
133312017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13332
13333 PR gdb/21352
13334 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13335 option.
13336
2cad08ea
YQ
133372017-04-05 Yao Qi <yao.qi@linaro.org>
13338
13339 * frame.c (frame_unwind_register_unsigned): Call
13340 frame_unwind_register_value.
13341
55a98976
YQ
133422017-04-05 Yao Qi <yao.qi@linaro.org>
13343
13344 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13345 Use gdb_test_multiple, and don't match anchor.
13346
4ac40124
PA
133472017-04-05 Pedro Alves <palves@redhat.com>
13348
13349 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13350 (Write After Approval): Remove Simon Marchi.
13351
c053b654
PA
133522017-04-05 Pedro Alves <palves@redhat.com>
13353
13354 * common/gdb_optional.h (optional::optional): Make constexpr and
13355 initialize m_dummy.
13356
4c7bf4f9
JB
133572017-04-04 John Baldwin <jhb@FreeBSD.org>
13358
13359 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13360 (amd64fbsd_jmp_buf_reg_offset): Remove.
13361 (amd64fbsd_supply_uthread): Remove function.
13362 (amd64fbsd_collect_uthread): Remove function.
13363 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13364 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13365 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13366 (fbsd-nat.c): Update comment.
13367 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13368 (i386fbsd_jmp_buf_reg_offset): Remove.
13369 (i386fbsd_supply_uthread): Remove function.
13370 (i386fbsd_collect_uthread): Remove function.
13371 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13372
1e1a8bef
JB
133732017-04-04 John Baldwin <jhb@FreeBSD.org>
13374
13375 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13376 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13377 * NEWS: Mention that support for FreeBSD/alpha was removed.
13378 * alpha-fbsd-tdep.c: Delete file.
13379 * config/alpha/fbsd.mh: Delete file.
13380 * configure.host: Delete alpha*-*-freebsd* and
13381 alpha*-*-kfreebsd*-gnu.
13382 * configure.tgt: Delete alpha*-*-freebsd* and
13383 alpha*-*-kfreebsd*-gnu.
13384
49907934
JB
133852017-04-04 John Baldwin <jhb@FreeBSD.org>
13386
13387 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13388 amd64bsd_store_inferior_registers): Use ptid from regcache.
13389
6f77053d
PA
133902017-04-04 Pedro Alves <palves@redhat.com>
13391
13392 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13393 data fields, make them private and add "m_" prefixes.
13394 (lnp_state_machine::lnp_state_machine): New ctor.
13395 (record_line, check_line_address, handle_set_discriminator)
13396 (handle_set_address, handle_advance_pc, handle_special_opcode)
13397 (handle_advance_line, handle_set_file, handle_negate_stmt)
13398 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13399 (end_sequence, advance_line): New methods.
13400 (m_gdbarch, m_record_lines_p): New fields.
13401 (lnp_reader_state): Delete.
13402 (dwarf_record_line): Rename to ...
13403 (lnp_state_machine::record_line): ... adjust.
13404 (init_lnp_state_machine): Delete.
13405 (lnp_state_machine::lnp_state_machine): New.
13406 (check_line_address): Rename to ...
13407 (lnp_state_machine::check_line_address): This.
13408 (dwarf_decode_lines_1): Remove reference to "reader_state".
13409 Adjust lnp_state_machine having a non-default ctor. Use bool.
13410 State machine internal state manipulation moved to
13411 lnp_state_machine methods.
13412
9c541725
PA
134132017-04-04 Pedro Alves <palves@redhat.com>
13414
13415 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13416 unittests/offset-type-selftests.c.
13417 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13418 * common/offset-type.h: New file.
13419 * common/preprocessor.h: New file.
13420 * common/traits.h: New file.
13421 * common/valid-expr.h: New file.
13422 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13423 sect_offset and cu_offset strong typedefs throughout.
13424 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13425 typedefs throughout.
13426 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13427 sect_offset and cu_offset strong typedefs throughout.
13428 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13429 typedefs throughout.
13430 * gdbtypes.h: Include "common/offset-type.h".
13431 (cu_offset): Now an offset type (strong typedef) instead of a
13432 struct.
13433 (sect_offset): Likewise.
13434 (union call_site_parameter_u): Rename "param_offset" field to
13435 "param_cu_off".
13436 * unittests/offset-type-selftests.c: New file.
13437
ecfb656c
PA
134382017-04-04 Pedro Alves <palves@redhat.com>
13439
13440 * common/underlying.h: New file.
13441 * dwarf2read.c: Include "common/gdb_optional.h" and
13442 "common/underlying.h".
13443 (dir_index, file_name_index): New types.
13444 (file_entry): Use them.
13445 (file_entry::include): Use to_underlying.
13446 (line_header::add_file_name): Use dir_index.
13447 (read_formatted_entries): Use gdb::optional. Read form before
13448 writting to file_entry.
13449 (dwarf_decode_line_header): Use dir_index.
13450 (lnp_state_machine::current_file): Use to_underlying.
13451 (lnp_state_machine::file): Change type to file_name_index.
13452 (dwarf_record_line): Use to_underlying.
13453 (init_lnp_state_machine): Use file_name_index.
13454 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13455
d194f1fe
PA
134562017-04-04 Pedro Alves <palves@redhat.com>
13457
13458 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13459 operator bool, has_value and get methods.
13460
fff8551c
PA
134612017-04-04 Pedro Alves <palves@redhat.com>
13462
13463 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13464 fields.
13465 (line_header): Initialize all data fields. Change type of
13466 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13467 Change type of include_dirs to std::vector<const char *>. Remove
13468 num_include_dirs, include_dirs_size. Change type of file_names to
13469 std::vector<file_entry>. Remove num_file_names, file_names_size.
13470 (line_header::line_header): New.
13471 (line_header::add_include_dir, line_header::add_file_name): New
13472 methods.
13473 (line_header::include_dir_at): Remove NULL check.
13474 (line_header::file_name_at): Add const overload.
13475 (line_header_up): New unique_ptr typedef.
13476 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13477 std::vector. Remove free_line_header call.
13478 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13479 free_line_header call.
13480 (free_cu_line_header): Delete.
13481 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13482 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13483 Adjust to use std::vector.
13484 (free_line_header): Delete.
13485 (free_line_header_voidp): Use delete.
13486 (add_include_dir): Replace with ...
13487 (line_header::add_include_dir): ... this method. Use std::vector.
13488 (add_file_name): Replace with ...
13489 (line_header::add_file_name): ... this method. Use std::vector.
13490 (add_include_dir_stub): Delete.
13491 (read_formatted_entries): Remove memset.
13492 (dwarf_decode_line_header): Return a line_header_up instead of a
13493 raw pointer. Remove cleanup handling. Pass lambdas to
13494 read_formatted_entries. Adjust to use line_header methods.
13495 (dwarf_decode_lines_1): Adjust to use line_header methods.
13496 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13497 use std::vector.
13498
d62a8ae2
SM
134992017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13500
13501 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13502 instead of struct ptid.
13503
db3a1dc7
AH
135042017-05-04 Alan Hayward <alan.hayward@arm.com>
13505
13506 * frame.c (get_frame_register_bytes): Unwind using value.
13507 (put_frame_register_bytes): Likewise.
13508
b1b45502
IB
135092017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13510
13511 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13512 aggregate-like.
13513
ec13808e
JK
135142017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13515
13516 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13517
12316564
YQ
135182017-03-29 Yao Qi <yao.qi@linaro.org>
13519
13520 * gdbthread.h (struct thread_info): Declare constructor and
13521 destructor. Add some in-class member initializers.
13522 * thread.c (free_thread): Remove.
13523 (init_thread_list): Call delete instead of free_thread.
13524 (new_thread): Call thread_info constructor.
13525 (thread_info::thread_info): New function.
13526 (thread_info::~thread_info): New function.
13527 (delete_thread_1): Call delete instead of free_thread.
13528 (make_cleanup_restore_current_thread): Move tp and frame to
13529 inner block.
13530
fe5f7374
AK
135312017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13532
13533 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13534 (arc_skip_prologue): Likewise.
13535 (arc_make_frame_cache): Likewise.
13536 (arc_pv_get_operand): New function.
13537 (arc_is_in_prologue): Likewise.
13538 (arc_analyze_prologue): Likewise.
13539 (arc_print_frame_cache): Likewise.
13540 (MAX_PROLOGUE_LENGTH): New constant.
13541
eea78757
AK
135422017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13543
13544 * configure.tgt: Add arc-insn.o.
13545 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13546 (dump_arc_instruction_command): New function.
13547 (arc_fprintf_disasm): Likewise.
13548 (arc_disassemble_info): Likewise.
13549 (arc_insn_get_operand_value): Likewise.
13550 (arc_insn_get_operand_value_signed): Likewise.
13551 (arc_insn_get_memory_base_reg): Likewise.
13552 (arc_insn_get_memory_offset): Likewise.
13553 (arc_insn_get_branch_target): Likewise.
13554 (arc_insn_dump): Likewise.
13555 (arc_insn_get_linear_next_pc): Likewise.
13556 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13557 (arc_disassemble_info): Likewise.
13558 (arc_insn_get_branch_target): Likewise.
13559 (arc_insn_get_linear_next_pc): Likewise.
13560 * NEWS: Mention new "maint print arc arc-instruction".
13561
3be78afd
AK
135622017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13563
13564 * arc-tdep (maintenance_print_arc_list): New variable.
13565 (maintenance_print_arc_command): New function.
13566
296ec4fa
AK
135672017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13568
13569 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13570 Add "limm" and "reserved".
13571 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13572 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13573 * arc-tdep.h (arc_regnum): Likewise.
13574
f74f865e
MF
135752017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13576
13577 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13578 for THREADPTR register.
13579 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13580 register.
13581 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13582 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13583 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13584
0d0bf81a
MF
135852017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13586
13587 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13588 registers above gdbarch_num_regs (gdbarch) as privileged in
13589 call0 ABI.
13590
0ce4291e
MF
135912017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13592
13593 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13594 for a single specified register or for all registers in
13595 a0_base..a0_base + C0_NREGS range.
13596 (supply_gregset_reg): Call regcache_raw_supply for a single
13597 specified register or for all registers in a0_base..a0_base +
13598 C0_NREGS range.
13599
c56054f9
MF
136002017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13601
13602 * arch/xtensa.h (C0_NREGS): Add definition.
13603 * xtensa-tdep.c (C0_NREGS): Remove definition.
13604
a4398628
MF
136052017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13606
13607 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13608 Drop xtensa_default_isa initialization.
13609 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13610
8c43009f
PA
136112017-03-27 Pedro Alves <palves@redhat.com>
13612
13613 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13614 (file_entry::include_dir): New method.
13615 (line_header::include_dir_at, line_header::file_name_at): New
13616 methods.
13617 (setup_type_unit_groups, setup_type_unit_groups)
13618 (psymtab_include_file_name): Simplify using the new methods.
13619 (lnp_state_machine) <the_line_header>: New field.
13620 <file>: Add comment.
13621 (lnp_state_machine::current_file): New method.
13622 (dwarf_record_line): Simplify using the new methods.
13623 (init_lnp_state_machine): Initialize the "the_line_header" field.
13624 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13625 Simplify using the new methods.
13626
a7e80b9e
PA
136272017-03-27 Pedro Alves <palves@redhat.com>
13628
13629 * cp-name-parser.y (make_empty): Delete.
13630 (demangler_special, nested_name, ptr_operator, array_indicator)
13631 (direct_declarator, declarator_1): Use fill_comp instead of
13632 make_empty.
13633
21047726
PA
136342017-03-27 Pedro Alves <palves@redhat.com>
13635
13636 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13637 to ATTRIBUTE_PRINTF.
13638 * solib-target.c (library_list_start_list): Print "string" not
13639 "version".
13640 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13641 gdb_xml_error call.
13642
d721ba37
PA
136432017-03-27 Pedro Alves <palves@redhat.com>
13644
13645 * dwarf2read.c (struct file_and_directory): New.
13646 (dwarf2_get_dwz_file): Adjust to use std::string.
13647 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13648 (find_file_and_directory): Adjust to return a file_and_directory
13649 object.
13650 (read_file_scope): Adjust to use file_and_directory. Remove
13651 make_cleanup/do_cleanups calls.
13652 (open_and_init_dwp_file): Adjust to use std::string. Remove
13653 make_cleanup/do_cleanups calls.
13654 * python/python.c (do_start_initialization): Adjust to ldirname
13655 returning a std::string.
13656 * utils.c (ldirname): Now returns a std::string.
13657 * utils.h (ldirname): Change return type to std::string.
13658 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13659 returning a std::string.
13660 * xml-tdesc.c (file_read_description_xml): Likewise.
13661
ed771251
AH
136622017-03-24 Alan Hayward <alan.hayward@arm.com>
13663
13664 * regcache.c (regcache_debug_print_register): New function.
13665 * regcache.h (regcache_debug_print_register): New declaration.
13666 * target.c (debug_print_register): Remove.
13667 (target_fetch_registers): Call regcache_debug_print_register.
13668 (target_store_registers): Likewise.
13669
568c1b9f
PB
136702017-03-24 Pádraig Brady <pbrady@fb.com>
13671
13672 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13673 reference beyond the 'lh->include_dirs' array before accessing to
13674 it.
13675 (psymtab_include_file_name): Likewise.
13676 (dwarf_decode_lines_1): Likewise.
13677 (dwarf_decode_lines): Likewise.
13678 (file_file_name): Likewise.
13679
3e00d44f
SM
136802017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13681
13682 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13683 inferior_ptid.
13684 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13685 ps_lsetfpregs): Likewise.
13686 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13687 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13688 ps_lsetfpregs): Likewise.
13689 * target.c (target_fetch_registers, target_store_registers):
13690 Remove asserts.
13691
077ae656
AH
136922017-03-23 Alan Hayward <alan.hayward@arm.com>
13693
13694 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13695
1e2b521d
YQ
136962017-03-23 Yao Qi <yao.qi@linaro.org>
13697
13698 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13699 (_initialize_aarch64_tdep): Register it.
13700 (aarch64_record_load_store): Handle PRFM instruction.
13701 (aarch64_process_record_test): New function.
13702
33877125
YQ
137032017-03-23 Yao Qi <yao.qi@linaro.org>
13704
13705 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13706 indentation.
13707
a0eef940
YQ
137082017-03-23 Yao Qi <yao.qi@linaro.org>
13709
13710 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13711
3f2a3564
PR
137122017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13713
13714 python/python.c (do_start_initialization): Fix memory leak.
13715
b67aeab0
SM
137162017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13717
13718 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13719 using get_ptrace_pid.
13720 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13721 inferior_ptid.
13722 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13723 inferior_ptid instead of pid.
13724
ffdbe864
YQ
137252017-03-22 Yao Qi <yao.qi@linaro.org>
13726
13727 * aarch64-tdep.c: Wrap locally used classes in anonymous
13728 namespace.
13729 * arm-tdep.c: Likewise.
13730 * linespec.c: Likewise.
13731 * ui-out.c: Likewise.
13732
9d736fbf
JG
137332017-03-22 Jonah Graham <jonah@kichwacoders.com>
13734
13735 PR gdb/19637
13736 * python/lib/gdb/printer/bound_registers.py: Import sys.
13737
3de88e9a
SM
137382017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13739
13740 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13741 windows_thread_info parameter and use it instead of
13742 current_thread.
13743 (windows_fetch_inferior_registers): Don't set current_thread,
13744 pass the thread to do_windows_fetch_inferior_registers. Use
13745 ptid from regcache instead of inferior_ptid.
13746 (do_windows_store_inferior_registers): Add windows_thread_info
13747 parameter and use it instead of current_thread.
13748 (windows_store_inferior_registers): Don't set current_thread,
13749 pass the thread to do_windows_store_inferior_registers. Use
13750 ptid from regcache instead of inferior_ptid.
13751
0e7b8f61
SM
137522017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13753
13754 * ser-mingw.c (ser_windows_raw): Remove reference to
13755 struct serial::current_timeout.
13756
5badf10a
IR
137572017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13758
13759 PR tdep/20928
13760 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13761 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13762 (sparc64_fsr_type): Fix %fsr decoding.
13763
cee59b3f
TW
137642017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13765
13766 * python/py-record-btrace.c (btpy_insn_data): Change return type
13767 for Python 2.
13768
639a9038
SM
137692017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13770
13771 * spu-linux-nat.c (spu_fetch_inferior_registers,
13772 spu_store_inferior_registers): Use ptid from regcache, set and
13773 restore inferior_ptid.
13774 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13775 Likewise.
13776
bcc0c096
SM
137772017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13778
13779 * i386-linux-nat.c (fetch_register, store_register,
13780 i386_linux_fetch_inferior_registers,
13781 i386_linux_store_inferior_registers): Use ptid from regcache.
13782 * ia64-linux-nat.c (ia64_linux_fetch_register,
13783 ia64_linux_store_register): Likewise.
13784 * inf-ptrace.c (inf_ptrace_fetch_register,
13785 inf_ptrace_store_register): Likewise.
13786 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13787 m32r_linux_store_inferior_registers): Likewise.
13788 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13789 m68kbsd_store_inferior_registers): Likewise.
13790 * m68k-linux-nat.c (fetch_register, store_register,
13791 m68k_linux_fetch_inferior_registers,
13792 m68k_linux_store_inferior_registers): Likewise.
13793 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13794 m88kbsd_store_inferior_registers): Likewise.
13795 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13796 mips_fbsd_store_inferior_registers): Likewise.
13797 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13798 mips64_linux_regsets_store_registers): Likewise.
13799 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13800 mipsnbsd_store_inferior_registers): Likewise.
13801 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13802 mips64obsd_store_inferior_registers): Likewise.
13803 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13804 Likewise.
13805 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13806 ppcfbsd_store_inferior_registers): Likewise.
13807 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13808 ppc_linux_store_inferior_registers): Likewise.
13809 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13810 ppcnbsd_store_inferior_registers): Likewise.
13811 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13812 ppcobsd_store_registers): Likewise.
13813 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13814 Likewise.
13815 * ravenscar-thread.c (ravenscar_fetch_registers,
13816 ravenscar_store_registers, ravenscar_prepare_to_store):
13817 Likewise.
13818 * record-btrace.c (record_btrace_fetch_registers,
13819 record_btrace_store_registers, record_btrace_prepare_to_store):
13820 Likewise.
13821 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13822 Lookup inferior using ptid from regcache, instead of
13823 current_inferior.
13824 * remote.c (remote_fetch_registers, remote_store_registers): Use
13825 ptid from regcache.
13826 * rs6000-nat.c (fetch_register, store_register): Likewise.
13827 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13828 s390_linux_store_inferior_registers): Likewise.
13829 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13830 shnbsd_store_inferior_registers): Likewise.
13831 * sol-thread.c (sol_thread_fetch_registers,
13832 sol_thread_store_registers): Likewise.
13833 * sparc-nat.c (sparc_fetch_inferior_registers,
13834 sparc_store_inferior_registers): Likewise.
13835 * tilegx-linux-nat.c (fetch_inferior_registers,
13836 store_inferior_registers): Likewise.
13837 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13838 vaxbsd_store_inferior_registers): Likewise.
13839 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13840 store_xtregs): Likewise.
13841
c0f55cc6
AV
138422017-03-20 Artemiy Volkov <artemiyv@acm.org>
13843
13844 PR gdb/14441
13845 * NEWS: Mention support for rvalue references in GDB and python.
13846 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13847 supports both lvalue and rvalue references.
13848
15c0a2a9
AV
138492017-03-20 Artemiy Volkov <artemiyv@acm.org>
13850
13851 PR gdb/14441
13852 * gdbtypes.c (rank_one_type): Implement overloading
13853 resolution rules regarding rvalue references.
13854
aa006118
AV
138552017-03-20 Artemiy Volkov <artemiyv@acm.org>
13856
13857 PR gdb/14441
13858 * aarch64-tdep.c (aarch64_type_align)
13859 (aarch64_extract_return_value, aarch64_store_return_value): Change
13860 lvalue reference type checks to general reference type checks.
13861 * amd64-tdep.c (amd64_classify): Likewise.
13862 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13863 Likewise.
13864 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13865 (arm_store_return_value): Likewise.
13866 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13867 * c-typeprint.c (c_print_type): Likewise.
13868 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13869 (cplus_number_of_children, cplus_describe_child): Likewise.
13870 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13871 * completer.c (expression_completer): Likewise.
13872 * cp-support.c (make_symbol_overload_list_adl_namespace):
13873 Likewise.
13874 * darwin-nat-info.c (info_mach_region_command): Likewise.
13875 * dwarf2loc.c (entry_data_value_coerce_ref)
13876 (value_of_dwarf_reg_entry): Likewise.
13877 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13878 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13879 Likewise.
13880 * findvar.c (extract_typed_address, store_typed_address):
13881 Likewise.
13882 * gdbtypes.c (rank_one_type): Likewise.
13883 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13884 * infcall.c (value_arg_coerce): Likewise.
13885 * language.c (pointer_type): Likewise.
13886 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13887 Likewise.
13888 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13889 * mn10300-tdep.c (mn10300_type_align): Likewise.
13890 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13891 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13892 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13893 Likewise.
13894 * printcmd.c (print_formatted, x_command): Likewise.
13895 * python/py-type.c (typy_get_composite, typy_template_argument):
13896 Likewise.
13897 * python/py-value.c (valpy_referenced_value)
13898 (valpy_get_dynamic_type, value_has_field): Likewise.
13899 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13900 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13901 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13902 * spu-tdep.c (spu_scalar_value_p): Likewise.
13903 * symtab.c (lookup_symbol_aux): Likewise.
13904 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13905 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13906 Likewise.
13907 * valops.c (value_cast_pointers, value_cast)
13908 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13909 (value_struct_elt, value_struct_elt_bitpos)
13910 (value_find_oload_method_list, find_overload_match)
13911 (value_rtti_indirect_type): Likewise.
13912 * valprint.c (val_print_scalar_type_p, generic_val_print):
13913 Likewise.
13914 * value.c (value_actual_type, value_as_address, unpack_long)
13915 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13916 (coerce_ref): Likewise.
13917 * varobj.c (varobj_get_value_type): Likewise.
13918
3fcf899d
AV
139192017-03-20 Artemiy Volkov <artemiyv@acm.org>
13920
13921 PR gdb/14441
13922 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13923 table of constants.
13924 * python/lib/gdb/command/explore.py: Support exploring values
13925 of rvalue reference types.
13926 * python/lib/gdb/types.py: Implement get_basic_type() for
13927 rvalue reference types.
13928 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13929 constant.
13930 * python/py-value.c (valpy_getitem): Add an rvalue reference
13931 check.
13932 (valpy_reference_value): Add new parameter "refcode".
13933 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13934 New wrappers for valpy_reference_value().
13935 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13936 (gdbpy_invoke_xmethod): Likewise.
13937
4297a3f0
AV
139382017-03-20 Artemiy Volkov <artemiyv@acm.org>
13939
13940 PR gdb/14441
13941 * dwarf2read.c (process_die, read_type_die_1): Handle the
13942 DW_TAG_rvalue_reference_type DIE.
13943 (read_tag_reference_type): Add new parameter "refcode".
13944
e1cb3213
AV
139452017-03-20 Artemiy Volkov <artemiyv@acm.org>
13946
13947 PR gdb/14441
13948 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13949 (c_type_print_modifier, c_type_print_varspec_suffix)
13950 (c_type_print_base): Support printing rvalue reference types.
13951 * c-valprint.c (c_val_print, c_value_print): Support printing
13952 rvalue reference values.
13953
e4347c89
AV
139542017-03-20 Artemiy Volkov <artemiyv@acm.org>
13955
13956 PR gdb/14441
13957 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13958 typename.
13959 * cp-support.c (replace_typedefs): Handle
13960 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13961 * python/py-type.c (typy_lookup_type): Likewise.
13962
53cc15f5
AV
139632017-03-20 Artemiy Volkov <artemiyv@acm.org>
13964
13965 PR gdb/14441
13966 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13967 * parse.c (insert_type): Change assert statement.
13968 (follow_types): Handle rvalue reference types.
13969 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13970 constant.
13971
a65cfae5
AV
139722017-03-20 Artemiy Volkov <artemiyv@acm.org>
13973
13974 PR gdb/14441
13975 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13976 value_ref() interface.
13977 * c-valprint.c (c_value_print): Likewise.
13978 * infcall.c (value_arg_coerce): Likewise.
13979 * python/py-value.c (valpy_reference_value): Likewise.
13980 * valops.c (value_cast, value_reinterpret_cast)
13981 (value_dynamic_cast, typecmp): Likewise.
13982 (value_ref): Parameterize by kind of return value reference type.
13983 * value.h (value_ref): Add new parameter "refcode".
13984
3b224330
AV
139852017-03-20 Artemiy Volkov <artemiyv@acm.org>
13986
13987 PR gdb/14441
13988 * dwarf2read.c (read_tag_reference_type): Use
13989 lookup_lvalue_reference_type() instead of lookup_reference_type().
13990 * eval.c (evaluate_subexp_standard): Likewise.
13991 * f-exp.y: Likewise.
13992 * gdbtypes.c (make_reference_type, lookup_reference_type):
13993 Generalize with rvalue reference types.
13994 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13995 convenience wrappers for lookup_reference_type().
13996 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13997 reference kind parameter.
13998 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13999 wrappers for lookup_reference_type().
14000 * guile/scm-type.c (gdbscm_type_reference): Use
14001 lookup_lvalue_reference_type() instead of lookup_reference_type().
14002 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14003 * parse.c (follow_types): Likewise.
14004 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14005 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14006 Likewise.
14007 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14008 (gdbpy_invoke_xmethod): Likewise.
14009 * stabsread.c: Provide extra argument to make_reference_type()
14010 call.
14011 * valops.c (value_ref, value_rtti_indirect_type): Use
14012 lookup_lvalue_reference_type() instead of lookup_reference_type().
14013
f9aeb8d4
AV
140142017-03-20 Artemiy Volkov <artemiyv@acm.org>
14015
14016 PR gdb/14441
14017 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14018 (TYPE_IS_REFERENCE): New macro.
14019 (struct type): Add rvalue_reference_type field.
14020 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14021
51457a05
MAL
140222017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14023
14024 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14025 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14026 New function definition.
14027 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14028 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14029 New function declaration.
14030 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14031 * mi/mi-interp.h: New file.
14032 * solib.c (info_sharedlibrary_command): Replace for loop with
14033 ALL_SO_LIBS macro
14034 * solib.h (update_solib_list): New function declaration.
14035 (so_list_head): Move macro.
14036 * solist.h (ALL_SO_LIBS): New macro.
14037
e696b3ad
MAL
140382017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14039
14040 * infcmd.c (post_create_inferior): Remove unused argument in
14041 call to solib_add.
14042 * remote.c (remote_start_remote): Likewise.
14043 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14044 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14045 (enable_break): Likewise.
14046 * solib.c (update_solib_list): Remove unused target argument
14047 and its documentation.
14048 (solib_add): Remove unused target argument. Remove unused
14049 argument in call to update_solib_list.
14050 (info_sharedlibrary_command): Remove unused argument in call
14051 to update_solib_list.
14052 (sharedlibrary_command): Remove unused argument in call to
14053 solib_add.
14054 (handle_solib_event): Likewise.
14055 (reload_shared_libraries): Likewise.
14056 * solib.h (solib_add): Remove unused target argument.
14057
dcb84eda
AA
140582017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14059
14060 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14061 (s390_displaced_step_fixup): Cover relative branches with the
14062 default fixup handling. This fixes lack of support for some
14063 relative branch instructions.
14064
d9cb6cdc
SM
140652017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14066
14067 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14068 ptid from regcache.
14069
1afaf9f4
SM
140702017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14071
14072 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14073 i386_darwin_store_inferior_registers): Use ptid from regcache.
14074
aac12e24
SM
140752017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14076
14077 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14078 i386bsd_store_inferior_registers): Use ptid from regcache.
14079
bbe1eef1
SM
140802017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14081
14082 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14083 hppaobsd_store_registers): Use ptid from regcache.
14084
10799020
SM
140852017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14086
14087 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14088 hppanbsd_store_registers): Use ptid from regcache.
14089
00204cf7
SM
140902017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14091
14092 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14093 from regcache. Use get_ptrace_pid.
14094
11a33714
SM
140952017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14096
14097 * corelow.c (get_core_register_section): Use ptid from regcache,
14098 update doc.
14099
317cd492
SM
141002017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14101
14102 * bsd-uthread.c (bsd_uthread_fetch_registers,
14103 bsd_uthread_store_registers): Use ptid from regcache, set and
14104 restore inferior_ptid.
14105
9ac8a7c2
SM
141062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14107
14108 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14109 fetch_fp_regs, store_register, store_regs, store_fp_register,
14110 store_fp_regs): Use ptid from regcache.
14111
4ac4bb6a
SM
141122017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14113
14114 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14115 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14116 store_vfp_regs): Use ptid from regcache.
14117
9bcbdca8
PA
141182017-03-17 Pedro Alves <palves@redhat.com>
14119
14120 PR remote/21188
14121 * ser-base.c (ser_base_wait_for): Add comment.
14122 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14123 version.
14124 * ser-unix.c (hardwire_raw): Remove reference to
14125 scb->current_timeout.
14126 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14127 (hardwire_ops): Install ser_base_readchar instead of
14128 hardwire_readchar.
14129 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14130 Remove fields.
14131
7503099f
JG
141322017-03-17 Jonah Graham <jonah@kichwacoders.com>
14133
14134 PR gdb/19637
14135 * python/lib/gdb/printer/bound_registers.py: Add support for
14136 Python 3.
14137
7942e96e
AA
141382017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14139
14140 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14141 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14142 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14143 byte_offset to subobj_byte_offset. Fix the handling of
14144 DWARF_VALUE_STACK on big-endian targets when coming via an
14145 implicit pointer.
14146 (dwarf2_evaluate_loc_desc): Adjust call to
14147 dwarf2_evaluate_loc_desc_full.
14148 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14149 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14150
ba14f379
YQ
141512017-03-16 Yao Qi <yao.qi@linaro.org>
14152
14153 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14154 and REVSH instructions.
14155
b121eeb9
YQ
141562017-03-16 Yao Qi <yao.qi@linaro.org>
14157
14158 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14159 (arm_record_test): Declare.
14160 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14161 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14162 align with the manual.
14163 (thumb_record_misc): Adjust the code order to align with the
14164 manual.
14165 (thumb2_record_decode_insn_handler): Fix instruction matching.
14166 (instruction_reader_thumb): New class.
14167 (arm_record_test): New function.
14168
728a7913
YQ
141692017-03-16 Yao Qi <yao.qi@linaro.org>
14170
14171 * arm-tdep.c (abstract_memory_reader): New class.
14172 (instruction_reader): New class.
14173 (extract_arm_insn): Add argument 'reader'. Callers updated.
14174 (decode_insn): Likewise.
14175
34b43320
DE
141762017-03-16 Doug Evans <dje@google.com>
14177
a7c0469f
DE
14178 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14179 member. Change type of TYPE member to SCM. All uses updated.
14180 (lsscm_make_lazy_string_smob): Add assert.
14181 (lsscm_make_lazy_string): Flag bad length values.
14182 (lsscm_elt_type): New function.
14183 (gdbscm_lazy_string_to_value): Rewrite to use
14184 lsscm_safe_lazy_string_to_value.
14185 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14186 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14187 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14188 in incoming type.
14189 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14190 * guile/scm-type.c (tyscm_scm_to_type): New function.
14191
141922017-03-15 Doug Evans <dje@google.com>
14193
34b43320
DE
14194 PR python/17728, python/18439, python/18779
14195 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14196 member. Change type of TYPE member to PyObject *. All uses updated.
14197 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14198 (gdbpy_create_lazy_string_object): Flag bad length values.
14199 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14200 Handle typedefs in incoming type.
14201 (stpy_lazy_string_elt_type): New function.
14202 (gdbpy_extract_lazy_string): Call it.
14203 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14204 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14205 typedefs in incoming type.
14206
a3a5fecc
DE
142072017-03-16 Doug Evans <dje@google.com>
14208
14209 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14210 * guile/scm-type.c (tyscm_scm_to_type): New function.
14211
28f1c605
JW
142122017-03-16 Jiong Wang <jiong.wang@arm.com>
14213
14214 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14215 "ULONGEST" for "skip".
14216
87c336f6
AA
142172017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14218
14219 PR gdb/21220
14220 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14221 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14222 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14223 over ptrace peek/poke until end of buffer or error.
14224
cf81cf60
SM
142252017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14226
14227 * parse.c (length_of_subexp): Make static.
14228 * parser-defs.h (length_of_subexp): Remove.
14229
a379284a
AA
142302017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14231
14232 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14233 as well.
14234
8a6200ba
PA
142352017-03-14 Pedro Alves <palves@redhat.com>
14236
14237 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14238 (main): Use std::unique_ptr. Remove calls to
14239 cp_demangled_name_parse_free.
14240
f79ec206
SM
142412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14242
14243 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14244 alphabsd_store_inferior_registers): Use regcache->ptid instead
14245 of inferior_ptid.
14246
edb5fb00
SM
142472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14248
14249 * aix-thread.c (aix_thread_fetch_registers,
14250 aix_thread_store_registers): Use regcache->ptid instead of
14251 inferior_ptid.
14252
55119686
SM
142532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14254
14255 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14256 store_gregs_to_thread, fetch_fpregs_from_thread,
14257 store_fpregs_to_thread): Use regcache->ptid instead of
14258 inferior_ptid.
14259
6a06fbb7
SM
142602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14261
14262 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14263 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14264 instead of inferior_ptid.
14265
c6386875
SM
142662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14267
14268 * target.c (target_fetch_registers, target_store_registers): Add
14269 assert.
14270
ddaaf0fb
SM
142712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14272
14273 * regcache.h (regcache_get_ptid): New function.
14274 * regcache.c (regcache_get_ptid): New function.
14275
b9da89d1 142762017-03-13 Mark Wielaard <mark@klomp.org>
14277
14278 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14279
5f4d1085
KS
142802017-03-10 Keith Seitz <keiths@redhat.com>
14281
14282 PR c++/8218
14283 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14284
c65d6b55
PA
142852017-03-08 Pedro Alves <palves@redhat.com>
14286
14287 PR gdb/18360
14288 * infrun.c (start_step_over, do_target_resume, resume)
14289 (restart_threads): Assert we're not resuming a thread that is
14290 meant to be stopped.
14291 (infrun_thread_stop_requested_callback): Delete.
14292 (infrun_thread_stop_requested): If the thread is internally
14293 stopped, queue a pending stop event and clear the thread's
14294 inline-frame state.
14295 (handle_stop_requested): New function.
14296 (handle_syscall_event, handle_inferior_event_1): Use
14297 handle_stop_requested.
14298 (handle_stop_requested): New function.
14299 (handle_signal_stop): Set the thread's stop_signal here instead of
14300 at caller.
14301 (finish_step_over): Clear step over info unconditionally.
14302 (handle_signal_stop): If the user had interrupted the event
14303 thread, consider the stop a random signal.
14304 (handle_signal_stop) <signal arrived while stepping over
14305 breakpoint>: Don't restart threads here.
14306 (stop_waiting): Don't clear step-over info here.
14307
15c22686
PA
143082017-03-08 Pedro Alves <palves@redhat.com>
14309
14310 PR 21206
14311 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14312 goes to argument 2, not 1.
14313
6e5d74e7
PA
143142017-03-08 Pedro Alves <palves@redhat.com>
14315
14316 PR cli/21218
14317 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14318 display_gdb_prompt.
14319 (command_line_input): Add comment.
14320
9753a2f6
PA
143212017-03-08 Pedro Alves <palves@redhat.com>
14322
14323 PR tui/21216
14324 * tui/tui-file.c (tui_file::write): New.
14325 * tui/tui-file.h (tui_file): Override "write".
14326 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14327 factored out from ...
14328 (tui_puts): ... here.
14329 (tui_putc): Use them.
14330 (tui_write): New function.
14331 * tui/tui-io.h (tui_write): Declare.
14332
1672e0d9
SDJ
143332017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14334
14335 * Makefile.in (SFILES): Replace "environ.c" with
14336 "common/environ.c".
14337 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14338 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14339 to...
14340 * common/environ.c: ... here.
14341 * environ.h: Moved to...
14342 * common/environ.h: ... here.
14343
f7bb4e3a
PB
143442017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14345
14346 * gdbarch.sh (pstring_ptr): New static function.
14347 (gdbarch_disassembler_options): Use it.
14348 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14349 not valid_disassembler_option->name.
14350 * gdbarch.c: Regenerate.
14351
e45ced6c
PB
143522017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14353
14354 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14355
5f6fd321
PA
143562017-03-07 Pedro Alves <palves@redhat.com>
14357
14358 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14359
6dbb839a 143602017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14361
14362 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14363 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14364 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14365 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14366
d274ecf4
SM
143672017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14368
14369 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14370
df97be55
SM
143712017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14372
14373 * remote.c (remote_add_target_side_commands): Use range-based
14374 for loop.
14375
7d45f3df
YQ
143762017-03-03 Yao Qi <yao.qi@linaro.org>
14377
14378 PR gdb/21165
14379 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14380 value is lazy.
14381 * valprint.c (common_val_print): Likewise.
14382
65b48a81
PB
143832017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14384
14385 * NEWS: Mention new set/show disassembler-options commands.
14386 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14387 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14388 (prospective_options): New static variable.
14389 (gdb_disassembler::gdb_disassembler): Initialize
14390 m_di.disassembler_options.
14391 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14392 (get_disassembler_options): New function.
14393 (set_disassembler_options): Likewise.
14394 (set_disassembler_options_sfunc): Likewise.
14395 (show_disassembler_options_sfunc): Likewise.
14396 (disassembler_options_completer): Likewise.
14397 (_initialize_disasm): Likewise.
14398 * disasm.h (get_disassembler_options): New prototype.
14399 (set_disassembler_options): Likewise.
14400 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14401 (gdbarch_verify_disassembler_options): Likewise.
14402 * gdbarch.c: Regenerate.
14403 * gdbarch.h: Likewise.
14404 * arm-tdep.c (num_disassembly_options): Delete.
14405 (set_disassembly_style): Likewise.
14406 (arm_disassembler_options): New static variable.
14407 (set_disassembly_style_sfunc): Convert short style name into long
14408 option name. Call set_disassembler_options.
14409 (show_disassembly_style_sfunc): New function.
14410 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14411 set_gdbarch_verify_disassembler_options.
14412 (_initialize_arm_tdep): Delete regnames variable and update callers.
14413 (arm_disassembler_options): Initialize.
14414 (disasm_options): New variable.
14415 (num_disassembly_options): Rename from this...
14416 (num_disassembly_styles): ...to this. Compute by scanning through
14417 disasm_options.
14418 (valid_disassembly_styles): Initialize using disasm_options.
14419 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14420 set_arm_regname_option.
14421 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14422 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14423 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14424 set_gdbarch_verify_disassembler_options.
14425 * s390-tdep.c (s390_disassembler_options): New static variable.
14426 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14427 set_gdbarch_verify_disassembler_options.
14428
d538e36d
SM
144292017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14430
14431 * remote.c (remote_add_target_side_condition): Remove "struct"
14432 keyword from range-based for loop.
14433
83621223
SM
144342017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14435
14436 * remote.c (remote_add_target_side_condition): Use range-based
14437 for loop. Update comment.
14438
2123df0e
YQ
144392017-02-27 Yao Qi <yao.qi@linaro.org>
14440
14441 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14442
8e368124
AH
144432017-02-26 Alan Hayward <alan.hayward@arm.com>
14444
14445 * regcache.c (regcache_raw_update): New function.
14446 (regcache_raw_read): Move code to regcache_raw_update.
14447 * regcache.h (regcache_raw_update): New declaration.
14448 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14449
a49dd8dd
JK
144502017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14451
14452 * dwarf2read.c (create_debug_type_hash_table): Initialize
14453 header.signature and header.type_offset_in_tu.
14454
34e4bae9
PA
144552017-02-24 Pedro Alves <palves@redhat.com>
14456
14457 * symtab.c (make_file_symbol_completion_list_1): Use
14458 add_symtab_completions.
14459
b0e4b369
AH
144602017-02-24 Alan Hayward <alan.hayward@arm.com>
14461
14462 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14463
975c21ab
AH
144642017-02-24 Alan Hayward <alan.hayward@arm.com>
14465
14466 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14467 I386_MAX_REGISTER_SIZE.
14468 (i386_pseudo_register_write): Likewise.
14469 (i386_process_record): Likewise.
14470 * i387-tdep.c (i387_supply_xsave): Likewise.
14471 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14472 (store_register): Likewise.
14473
14bc53a8
PA
144742017-02-23 Pedro Alves <palves@redhat.com>
14475
14476 * ada-lang.c: Include "common/function-view.h".
14477 (ada_iterate_over_symbols): Adjust to use function_view as
14478 callback type.
14479 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14480 (ada_make_symbol_completion_list): Use a lambda.
14481 (ada_exc_search_name_matches): Delete.
14482 (name_matches_regex): New.
14483 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14484 * compile/compile-c-support.c: Include "common/function-view.h".
14485 (print_one_macro): Change prototype to accept a ui_file pointer.
14486 (write_macro_definitions): Use a lambda.
14487 * dwarf2read.c: Include "common/function-view.h".
14488 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14489 (dw2_expand_symtabs_matching): Adjust to use function_view as
14490 callback type.
14491 * language.h: Include "common/function-view.h".
14492 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14493 function_view as callback type.
14494 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14495 * linespec.c: Include "common/function-view.h".
14496 (collect_info::add_symbol): New method.
14497 (struct symbol_and_data_callback, iterate_inline_only, struct
14498 symbol_matcher_data, iterate_name_matcher): Delete.
14499 (iterate_over_all_matching_symtabs): Adjust to use function_view
14500 as callback type and lambdas.
14501 (iterate_over_file_blocks): Adjust to use function_view as
14502 callback type.
14503 (decode_compound_collector): Now a class with private fields.
14504 (decode_compound_collector::release_symbols): New method.
14505 (collect_one_symbol): Rename to...
14506 (decode_compound_collector::operator()): ... this and adjust.
14507 (lookup_prefix_sym): decode_compound_collector construction bits
14508 move to decode_compound_collector ctor. Pass the
14509 decode_compound_collector object directly as callback. Remove
14510 cleanups and use decode_compound_collector::release_symbols
14511 instead.
14512 (symtab_collector): Now a class with private fields.
14513 (symtab_collector::release_symtabs): New method.
14514 (add_symtabs_to_list): Rename to...
14515 (symtab_collector::operator()): ... this and adjust.
14516 (collect_symtabs_from_filename): symtab_collector construction
14517 bits move to symtab_collector ctor. Pass the symtab_collector
14518 object directly as callback. Remove cleanups and use
14519 symtab_collector::release_symtabs instead.
14520 (collect_symbols): Delete.
14521 (add_matching_symbols_to_info): Use lambdas.
14522 * macrocmd.c (print_macro_callback): Delete.
14523 (info_macro_command): Use a lambda.
14524 (info_macros_command): Pass print_macro_definition as callable
14525 directly.
14526 (print_one_macro): Remove 'ignore' parameter.
14527 (macro_list_command): Adjust.
14528 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14529 (macro_for_each_data::user_data): Delete field.
14530 (foreach_macro): Adjust to call the function_view.
14531 (macro_for_each): Adjust to use function_view as callback type.
14532 (foreach_macro_in_scope): Adjust to call the function_view.
14533 (macro_for_each_in_scope): Adjust to use function_view as callback
14534 type.
14535 * macrotab.h: Include "common/function-view.h".
14536 (macro_callback_fn): Declare a prototype instead of a pointer.
14537 Remove "user_data" parameter.
14538 (macro_for_each, macro_for_each_in_scope): Adjust to use
14539 function_view as callback type.
14540 * psymtab.c (partial_map_expand_apply)
14541 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14542 Adjust to use function_view as callback type and to return bool.
14543 (psym_expand_symtabs_matching): Adjust to use function_view as
14544 callback types.
14545 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14546 to use function_view as callback type and to return bool.
14547 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14548 callback types.
14549 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14550 as callback types.
14551 * symfile.h: Include "common/function-view.h".
14552 (expand_symtabs_file_matcher_ftype)
14553 (expand_symtabs_symbol_matcher_ftype)
14554 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14555 return bool.
14556 (quick_symbol_functions::map_symtabs_matching_filename)
14557 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14558 function_view as callback type and return bool.
14559 (expand_symtabs_matching): Adjust to use function_view as callback
14560 type.
14561 (maintenance_expand_name_matcher)
14562 (maintenance_expand_file_matcher): Delete.
14563 (maintenance_expand_symtabs): Use lambdas.
14564 * symtab.c (iterate_over_some_symtabs): Adjust to use
14565 function_view as callback types and return bool.
14566 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14567 of a cleanup.
14568 (lookup_symtab_callback): Delete.
14569 (lookup_symtab): Use a lambda.
14570 (iterate_over_symbols): Adjust to use function_view as callback
14571 type.
14572 (struct search_symbols_data, search_symbols_file_matches)
14573 (search_symbols_name_matches): Delete.
14574 (search_symbols): Use a pair of lambdas.
14575 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14576 (symtab_expansion_callback): Delete.
14577 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14578 * symtab.h: Include "common/function-view.h".
14579 (iterate_over_some_symtabs): Adjust to use function_view as
14580 callback type and return bool.
14581 (iterate_over_symtabs): Adjust to use function_view as callback
14582 type.
14583 (symbol_found_callback_ftype): Remove 'data' parameter and return
14584 bool.
14585 (iterate_over_symbols): Adjust to use function_view as callback
14586 type.
14587
07e253aa
PA
145882017-02-23 Pedro Alves <palves@redhat.com>
14589
14590 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14591 (%.o) <unittests/%.c>: New pattern.
14592 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14593 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14594 * common/function-view.h: New file.
14595 * unittests/function-view-selftests.c: New file.
14596 * configure: Regenerate.
14597
8eaf5320
SM
145982017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14599
14600 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14601 inferior_ptid.
14602 * go32-nat.c (go32_thread_alive): Likewise.
14603
38768751
YQ
146042017-02-23 Yao Qi <yao.qi@linaro.org>
14605
14606 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14607 delete.
14608
0a8beaba
YQ
146092017-02-23 Yao Qi <yao.qi@linaro.org>
14610
14611 * varobj.c (varobj_clear_saved_item): Use delete instead of
14612 xfree.
14613 (update_dynamic_varobj_children): Likewise.
14614
58fdfd2c
JK
146152017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14616
14617 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14618
1b90b139
SM
146192017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14620
14621 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14622 m_enum_value to 0 in default constructor.
14623
2039d74e
EBM
146242017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14625
14626 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14627 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14628 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14629 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14630 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14631 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14632 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14633 IS_STORE_CONDITIONAL_INSN.
14634
7814882a
JK
146352017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14636
14637 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14638
0ae60b63
JK
146392017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14640
14641 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14642
0224619f
JK
146432017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14644
14645 * dwarf2read.c (skip_one_die, read_attribute_value)
14646 (dwarf2_const_value_attr, dump_die_shallow)
14647 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14648 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14649
0af92d60
JK
146502017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14651
14652 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14653 (dwarf_parse_macro_header): Accept DWARF version 5.
14654 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14655
216f72a1
JK
146562017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14657
14658 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14659 DW_AT_GNU_*.
14660 * common/common-exceptions.h (enum errors): Likewise.
14661 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14662 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14663 (dwarf_expr_context::execute_stack_op): Likewise.
14664 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14665 Likewise.
14666 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14667 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14668 (show_entry_values_debug, call_site_to_target_addr)
14669 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14670 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14671 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14672 (value_of_dwarf_block_entry, indirect_pieced_value)
14673 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14674 (disassemble_dwarf_expression): Likewise.
14675 * dwarf2read.c (process_die, inherit_abstract_dies)
14676 (read_call_site_scope): Likewise.
14677 * gdbtypes.h (struct func_type, struct call_site_parameter)
14678 (struct call_site): Likewise.
14679 * stack.c (read_frame_arg): Likewise.
14680 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14681
43988095
JK
146822017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14683
14684 * defs.h (read_unsigned_leb128): New declaration.
14685 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14686 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14687 (dwarf2_find_location_expression): Call also
14688 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14689 * dwarf2loc.h (dwarf2_version): New declaration.
14690 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14691 rnglists.
14692 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14693 .debug_rnglists.
14694 (struct dwop_section_names): Add loclists_dwo.
14695 (dwop_section_names): Add .debug_loclists.dwo.
14696 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14697 (struct dwarf2_per_cu_data): Add dwarf_version.
14698 (struct dwo_sections): Add loclists.
14699 (struct attr_abbrev): Add implicit_const.
14700 (read_indirect_line_string): New declaration.
14701 (read_unsigned_leb128): Delete declaration.
14702 (rcuh_kind): New definition.
14703 (read_and_check_comp_unit_head): Change parameter
14704 is_debug_types_section to section_kind.
14705 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14706 (read_comp_unit_head): Change parameter abfd to section, add parameter
14707 section_kind. Handle DWARF-5.
14708 (error_check_comp_unit_head): Accept also DWARF version 5.
14709 (read_and_check_comp_unit_head): Change parameter
14710 is_debug_types_section to section_kind.
14711 (read_and_check_type_unit_head): Delete function.
14712 (read_abbrev_offset): Handle DWARF-5.
14713 (create_debug_type_hash_table): Add parameter section_kind. Process
14714 only DW_UT_type. Use signature and type_offset_in_tu from struct
14715 comp_unit_head.
14716 (create_debug_types_hash_table): Update create_debug_type_hash_table
14717 caller.
14718 (create_all_type_units): Call create_debug_type_hash_table.
14719 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14720 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14721 caller.
14722 (skip_one_die): Handle DW_FORM_implicit_const.
14723 (dwarf2_rnglists_process): New function.
14724 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14725 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14726 (read_attribute_value): Handle DW_FORM_implicit_const,
14727 DW_FORM_line_strp.
14728 (read_attribute): Handle DW_FORM_implicit_const.
14729 (read_indirect_string_at_offset_from): New function from
14730 read_indirect_string_at_offset.
14731 (read_indirect_string_at_offset): Call
14732 read_indirect_string_at_offset_from.
14733 (read_indirect_line_string_at_offset): New function.
14734 (read_indirect_string): New function comment.
14735 (read_indirect_line_string): New function.
14736 (read_unsigned_leb128): Make it global.
14737 (dwarf2_string_attr): Handle DWARF-5.
14738 (add_include_dir_stub, read_formatted_entries): New functions.
14739 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14740 Handle DWARF-5.
14741 (per_cu_header_read_in): Update read_comp_unit_head caller.
14742 (dwarf2_version): New function.
14743 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14744 rnglists.
14745 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14746 fields.
14747
22d2f3ab
JK
147482017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14749
14750 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14751
5f46c5a5
JK
147522017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14753
14754 * dwarf2read.c (dwarf2_ranges_process): New function from
14755 dwarf2_ranges_read.
14756 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14757 dwarf2_ranges_process.
14758
78d4d2c5
JK
147592017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14760
14761 * dwarf2read.c (create_debug_type_hash_table): New function from
14762 create_debug_types_hash_table.
14763 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14764 (create_all_type_units, open_and_init_dwo_file): Update
14765 create_debug_types_hash_table callers.
14766
1b076f25
SDJ
147672017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14768
14769 PR gdb/16188
14770 * fork-child.c (trace_start_error): Fix thinko. va_end should
14771 refer to 'ap', not 'args'.
14772
0db8980c
SDJ
147732017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14774 Pedro Alves <palves@redhat.com>
14775
14776 PR gdb/16188
14777 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14778 calls succeeded.
14779 * fork-child.c (trace_start_error): New function.
14780 (trace_start_error_with_name): Likewise.
14781 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14782 * inf-ptrace.c (inf_ptrace_me): Likewise.
14783 * inferior.h (trace_start_error): New prototype.
14784 (trace_start_error_with_name): Likewise.
14785
99e8a4f9
SDJ
147862017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14787
14788 PR gdb/21164
14789 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14790 NULL before using it.
14791 * symmisc.c (maintenance_print_symbols): Likewise.
14792 (maintenance_print_msymbols): Likewise.
14793
4e746bb6
TW
147942017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14795
14796 * NEWS: Add record Python bindings entry.
14797
147982017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14799
14800 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14801 py-record-full.o.
14802 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14803 * python/py-record-btrace.c, python/py-record-btrace.h,
14804 python/py-record-full.c, python/py-record-full.h: New file.
14805 * python/py-record.c: Add include for py-record-btrace.h and
14806 py-record-full.h.
14807 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14808 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14809 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14810 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14811 New definition.
14812 (gdbpy_initialize_btrace): New export.
14813 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14814
148152017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14816
14817 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14818 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14819 * python/py-record.c: New file.
14820 * python/python-internal.h (gdbpy_start_recording,
14821 gdbpy_current_recording, gdpy_stop_recording,
14822 gdbpy_initialize_record): New export.
14823 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14824 (python_GdbMethods): Add gdbpy_start_recording,
14825 gdbpy_current_recording and gdbpy_stop_recording.
14826
148272017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14828
14829 * record-btrace.c (record_btrace_record_method): New function.
14830 (init_record_btrace_ops): Initialize to_record_method.
14831 * record-full.c (record_full_record_method): New function.
14832 (init_record_full_ops, init_record_full_core_ops): Add
14833 record_full_record_method.
14834 * record.h (enum record_method): New enum.
14835 * target-debug.h (target_debug_print_enum_record_method: New define.
14836 * target-delegates.c: Regenerate.
14837 * target.c (target_record_method): New function.
14838 * target.h: Include record.h.
14839 (struct target_ops) <to_record_method>: New field.
14840 (target_record_method): New export.
14841
148422017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14843
14844 * record.h (record_start, record_stop): New export.
14845 * record.c (record_start, record_stop): New function.
14846
148472017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14848
14849 * btrace.c (btrace_fetch): Copy function call segments pointer
14850 into a vector.
14851 (btrace_clear): Clear the vector.
14852 (btrace_find_insn_by_number): Use binary search to find the correct
14853 function call segment.
14854 * btrace.h (brace_fun_p): New typedef.
14855 (struct btrace_thread_info) <functions>: New field.
14856
148572017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14858
14859 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14860 * btrace.c (btrace_decode_error): ... here. New function.
14861 * btrace.h (btrace_decode_error): New export.
14862
148632017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14864
14865 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14866 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14867 btrace_find_insn_by_number): Remove special case for gaps.
14868 * btrace.h (btrace_insn_get_error): New export.
14869 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14870 * record-btrace.c (btrace_insn_history): Print number for gaps.
14871 (record_btrace_info, record_btrace_goto): Handle gaps.
14872
3f77c769
TT
148732017-02-14 Tom Tromey <tom@tromey.com>
14874
14875 PR python/13598:
14876 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14877 event.
14878 * python/py-evts.c (gdbpy_initialize_py_events): Add
14879 before_prompt registry.
14880 * python/py-events.h (events_object) <before_prompt>: New field.
14881
4c2c7ac6
MM
148822017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14883
14884 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14885
5cf30ebf
LM
148862017-02-13 Luis Machado <lgustavo@codesourcery.com>
14887
14888 * symfile (_initialize_symfile): Add usage text to the load command's
14889 help text.
14890
26a06916
SM
148912017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14892
14893 * utils.c (defaulted_query): Don't query on secondary UIs.
14894
0b145e37
TT
148952017-02-10 Tom Tromey <tom@tromey.com>
14896
14897 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14898
2d8365c4
TT
148992017-02-10 Tom Tromey <tom@tromey.com>
14900
14901 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14902 "cleanup" local.
14903 * python/py-type.c (typy_legacy_template_argument): Remove
14904 unnecessary "cleanup" local.
14905
2bb8f231
TT
149062017-02-10 Tom Tromey <tom@tromey.com>
14907
14908 * python/python.c (do_start_initialization): New function, from
14909 _initialize_python.
14910 (_initialize_python): Call do_start_initialization.
14911 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14912 goto.
14913
1bdfaf42
TT
149142017-02-10 Tom Tromey <tom@tromey.com>
14915
14916 * python/py-prettyprint.c (pretty_print_one_value): Use
14917 gdbpy_ref.
14918
88b6faea
TT
149192017-02-10 Tom Tromey <tom@tromey.com>
14920
14921 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14922 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14923 gdbpy_ref.
14924 * python/py-type.c (field_new): Use gdbpy_ref.
14925 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14926 gdbpy_ref.
14927 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14928 (py_free_pspace): Likewise.
14929 (pspace_to_pspace_object): Likewise.
14930 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14931 (py_free_objfile): Likewise.
14932 (objfile_to_objfile_object): Likewise.
14933 * python/py-inferior.c (delete_thread_object): Use
14934 gdbpy_ref.
14935 (infpy_read_memory): Likewise.
14936 (py_free_inferior): Likewise.
14937 * python/py-evtregistry.c (create_eventregistry_object): Use
14938 gdbpy_ref.
14939 * python/py-event.c (create_event_object): Use gdbpy_ref.
14940
7780f186
TT
149412017-02-10 Tom Tromey <tom@tromey.com>
14942
14943 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14944 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14945 used.
14946 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14947 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14948 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14949 python/py-framefilter.c, python/py-function.c,
14950 python/py-inferior.c, python/py-infevents.c,
14951 python/py-linetable.c, python/py-newobjfileevent.c,
14952 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14953 python/py-signalevent.c, python/py-stopevent.c,
14954 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14955 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14956 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14957 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14958
d4b0bb18
TT
149592017-02-10 Tom Tromey <tom@tromey.com>
14960
14961 * ui-out.h (ui_out_emit_type): New class.
14962 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14963 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14964 and ui_out_emit_tuple.
14965 (enumerate_locals): Likewise.
14966 (py_mi_print_variables, py_print_locals, py_print_args): Use
14967 ui_out_emit_list.
14968 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14969 ui_out_emit_list.
14970 * common/gdb_optional.h: New file.
14971
f67f945c
MG
149722017-02-10 Martin Galvan <martingalvan@sourceware.org>
14973
14974 * MAINTAINERS (Write After Approval): Update my e-mail address.
14975
18da0c51
MG
149762017-02-10 Martin Galvan <martingalvan@sourceware.org>
14977
14978 PR gdb/21122
14979 * breakpoint.c (_initialize_breakpoint): Update the help description
14980 of the 'commands' command to indicate that it takes a list argument.
14981
62c14536
SM
149822017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14983
14984 * interps.c (current_interp_set_logging): Remove "return".
14985
ff6fa247
GB
149862017-02-09 Gary Benson <gbenson@redhat.com>
14987
14988 * symtab.c (add_symtab_completions): Prevent NULL pointer
14989 dereference.
14990
a474bd8e
PA
149912017-02-08 Pedro Alves <palves@redhat.com>
14992
14993 * interps.c (interp::interp): Remove reference to quiet_p.
14994 (interp_set): Make static. Remove dead "Switching to" output
14995 code.
14996 (interp_quiet_p, interp_set_quiet): Delete.
14997 (interpreter_exec_cmd): Don't set the interpreter quiet.
14998 * interps.h (interp_quiet_p): Make static.
14999 (class interp) <quiet_p>: Remove field
15000
3d7b173c
JG
150012017-02-08 Jerome Guitton <guitton@adacore.com>
15002
604c4576
JG
15003 * cli/cli-decode.c (find_command_name_length): Make it extern.
15004 * cli/cli-decode.h (find_command_name_length): Declare.
15005 * cli/cli-script.c (command_name_equals, line_first_arg):
15006 New functions.
15007 (process_next_line): Use cli-decode to parse command names.
15008 (build_command_line): Make args a constant pointer.
15009
150102017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15011
3d7b173c
JG
15012 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15013 Remove case-insensitive search.
15014
1291063d
JM
150152017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15016
15017 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15018 at the end of the line. Avoids an ARI warning.
15019
20b477a7
LM
150202017-02-06 Luis Machado <lgustavo@codesourcery.com>
15021
15022 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15023 rdseed instructions.
15024 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15025
3f7b46f2
IR
150262017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15027
15028 PR tdep/20936
15029 Provide and use sparc32 and sparc64 target description XML files.
15030 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15031 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15032 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15033 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15034 * features/sparc/sparc32-solaris.xml: New file.
15035 * features/sparc/sparc64-solaris.xml: New file.
15036 * features/sparc/sparc32-solaris.c: Generated.
15037 * features/sparc/sparc64-solaris.c: Generated.
15038 * sparc-tdep.h: Account for differences in target descriptions.
15039 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15040 (sparc32_register_type): Use target provided registers.
15041 (validate_tdesc_registers): New function.
15042 (sparc32_gdbarch_init): Use tdesc_has_registers.
15043 Set pseudoregister functions.
15044 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15045 (sparc64_register_type): Use target provided registers.
15046 (sparc64_init_abi): Set pseudoregister functions.
15047
f0fd41c1
TT
150482017-02-03 Tom Tromey <tom@tromey.com>
15049
15050 PR rust/21097:
15051 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15052 with a single member.
15053
d6f9b0fb
PA
150542017-02-03 Pedro Alves <palves@redhat.com>
15055
15056 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15057 (cli_interp_base::~cli_interp_base): New.
15058 (cli_interp): New struct.
15059 (as_cli_interp): Cast the interp itself to cli_interp.
15060 (cli_interpreter_pre_command_loop): Rename to ...
15061 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15062 parameter.
15063 (cli_interpreter_init): Rename to ...
15064 (cli_interp::init): ... this. Remove 'self' parameter. Use
15065 boolean. Make extern.
15066 (cli_interpreter_resume): Rename to ...
15067 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15068 extern.
15069 (cli_interpreter_suspend): Rename to ...
15070 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15071 extern.
15072 (cli_interpreter_exec): Rename to ...
15073 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15074 extern.
15075 (cli_interpreter_supports_command_editing): Rename to ...
15076 (cli_interp_base::supports_command_editing): ... this. Remove
15077 'interp' parameter. Make extern.
15078 (cli_ui_out): Rename to ...
15079 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15080 Make extern.
15081 (cli_set_logging): Rename to ...
15082 (cli_interp_base::set_logging): ... this. Remove 'interp'
15083 parameter. Make extern.
15084 (cli_interp_procs): Delete.
15085 (cli_interp_factory): Adjust to use "new".
15086 * cli/cli-interp.h: Include "interps.h".
15087 (struct cli_interp_base): New struct.
15088 * interps.c (struct interp): Delete. Fields moved to interps.h.
15089 (interp_new): Delete.
15090 (interp::interp, interp::~interp): New.
15091 (interp_set): Use bool, and return void. Assume the interpreter
15092 has suspend, init and resume methods, and that the all return
15093 void.
15094 (set_top_level_interpreter): interp_set returns void.
15095 (interp_ui_out): Adapt.
15096 (current_interp_set_logging): Adapt.
15097 (interp_data): Delete.
15098 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15099 (interp_exec): Adapt.
15100 (top_level_interpreter_data): Delete.
15101 * interps.h (interp_init_ftype, interp_resume_ftype)
15102 (interp_suspend_ftype, interp_exec_ftype)
15103 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15104 (class interp): New.
15105 (interp_new): Delete.
15106 (interp_set): Now returns void. Use bool.
15107 (interp_data, top_level_interpreter_data): Delete.
15108 * mi/mi-common.h: Include interps.h.
15109 (class mi_interp): Inherit from interp. Define a ctor. Declare
15110 init, resume, suspect, exec, interp_ui_out, set_logging and
15111 pre_command_loop methods.
15112 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15113 (mi_interpreter_init): Rename to ...
15114 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15115 bool, return void and make extern. Adjust.
15116 (mi_interpreter_resume): ... Rename to ...
15117 (mi_interp::resume): ... this. Remove the 'data' parameter,
15118 return void and make extern. Adjust.
15119 (mi_interpreter_suspend): ... Rename to ...
15120 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15121 return void and make extern. Adjust.
15122 (mi_interpreter_exec): ... Rename to ...
15123 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15124 extern. Adjust.
15125 (mi_interpreter_pre_command_loop): ... Rename to ...
15126 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15127 parameter and make extern.
15128 (mi_on_normal_stop_1): Adjust.
15129 (mi_ui_out): Rename to ...
15130 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15131 parameter and make extern. Adjust.
15132 (mi_set_logging): Rename to ...
15133 (mi_interp::set_logging): ... this. Remove the 'interp'
15134 parameter and make extern. Adjust.
15135 (mi_interp_procs): Delete.
15136 (mi_interp_factory): Adjust to use 'new'.
15137 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15138 (mi_print_exception, mi_execute_command, mi_load_progress):
15139 Adjust.
15140 * tui/tui-interp.c (tui_interp): New class.
15141 (as_tui_interp): Return a tui_interp pointer.
15142 (tui_on_normal_stop, tui_on_signal_received)
15143 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15144 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15145 to use interp::interp_ui_out.
15146 (tui_init): Rename to ...
15147 (tui_interp::init): ... this. Remove the 'self' parameter, use
15148 bool, return void and make extern. Adjust.
15149 (tui_resume): Rename to ...
15150 (tui_interp::resume): ... this. Remove the 'data' parameter,
15151 return void and make extern. Adjust.
15152 (tui_suspend): Rename to ...
15153 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15154 return void and make extern. Adjust.
15155 (tui_ui_out): Rename to ...
15156 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15157 parameter, and make extern. Adjust.
15158 (tui_exec): Rename to ...
15159 (tui_interp::exec): ... this. Remove the 'data' parameter and
15160 make extern.
15161 (tui_interp_procs): Delete.
15162 (tui_interp_factory): Use "new".
15163
65c40c95
TT
151642017-02-02 Tom Tromey <tom@tromey.com>
15165
15166 * rust-exp.y (ends_raw_string, space_then_number)
15167 (rust_identifier_start_p): Return bool.
15168 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15169 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15170 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15171 (rust_chartype_p): Return bool.
15172 (val_print_struct, rust_print_struct_def, rust_print_type):
15173 Update.
15174 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15175 Return bool.
15176
b50f188d
TT
151772017-02-02 Tom Tromey <tom@tromey.com>
15178
15179 * rust-lang.c: Reindent.
15180
03c85b11
TT
151812017-02-02 Tom Tromey <tom@tromey.com>
15182
15183 * rust-lang.h (rust_crate_for_block): Update.
15184 * rust-lang.c (rust_crate_for_block): Return std::string.
15185 (rust_get_disr_info): Use std:;string, not
15186 gdb::unique_xmalloc_ptr.
15187 * rust-exp.y (crate_name): Update.
15188
9b6da501
PA
151892017-02-02 Pedro Alves <palves@redhat.com>
15190
15191 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15192 field out of gdb_disassembler_test and make it static.
15193
ec4cb20b
PA
151942017-02-02 Pedro Alves <palves@redhat.com>
15195
15196 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15197 mi1_interp and mi_interp fields.
15198
5be5dbf0
PA
151992017-02-02 Pedro Alves <palves@redhat.com>
15200
616268b6
PA
15201 * cli/cli-interp.c (struct saved_output_files, saved_output):
15202 Moved from cli/cli-logging.c.
15203 (cli_set_logging): New function.
15204 (cli_interp_procs): Install cli_set_logging.
15205 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15206 Declare.
15207 * cli/cli-logging.c (struct saved_output_files, saved_output):
15208 Moved to cli/cli-interp.c.
15209 (pop_output_files): Don't save outputs here.
15210 (make_logging_output): New function.
15211 (handle_redirections): Don't build tee nor save previous outputs
15212 here.
15213 * interps.c (current_interp_set_logging): Change prototype.
15214 Assume there's always a set_logging_proc method installed.
15215 * interps.h (interp_set_logging_ftype): Change prototype.
15216 (current_interp_set_logging): Change prototype and adjust comment.
15217 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15218 use make_logging_output.
15219 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
152202017-02-02 Pedro Alves <palves@redhat.com>
15221
5be5dbf0
PA
15222 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15223 from ...
15224 (set_logging_overwrite): ... here.
15225 (logging_no_redirect_file): Delete.
15226 (set_logging_redirect): Don't handle redirection on the fly.
15227 Instead warn that "logging off" / "logging on" is necessary.
15228 (pop_output_files): Delete references to logging_no_redirect_file.
15229 (show_logging_command): Always speak in terms of what will happen
15230 once logging is reenabled.
15231
c99cc448
PA
152322017-02-02 Pedro Alves <palves@redhat.com>
15233
15234 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15235
8b172ce7
PA
152362017-02-02 Pedro Alves <palves@redhat.com>
15237
15238 * disasm.c (gdb_pretty_print_insn): Rename to ...
15239 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15240 Remove gdbarch parameter. Adapt to clear the object's buffers
15241 instead of allocating new buffers, and to print using the object's
15242 gdb_disassembler instead of calling gdb_print_insn.
15243 (dump_insns): Use gdb_pretty_print_disassembler.
15244 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15245 (gdb_pretty_print_disassembler): New class.
15246 * record-btrace.c (btrace_insn_history): Use
15247 gdb_pretty_print_disassembler.
15248
d7e74731
PA
152492017-02-02 Pedro Alves <palves@redhat.com>
15250
15251 * ada-lang.c (type_as_string): Use string_file.
15252 * ada-valprint.c (ada_print_floating): Use string_file.
15253 * ada-varobj.c (ada_varobj_scalar_image)
15254 (ada_varobj_get_value_image): Use string_file.
15255 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15256 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15257 * breakpoint.c (update_inserted_breakpoint_locations)
15258 (insert_breakpoint_locations, reattach_breakpoints)
15259 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15260 (print_it_watchpoint): Use string_file.
15261 (save_breakpoints): Use stdio_file.
15262 * c-exp.y (oper): Use string_file.
15263 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15264 tee_file.
15265 (pop_output_files): Use delete.
15266 (handle_redirections): Use stdio_file and tee_file.
15267 * cli/cli-setshow.c (do_show_command): Use string_file.
15268 * compile/compile-c-support.c (c_compute_program): Use
15269 string_file.
15270 * compile/compile-c-symbols.c (generate_vla_size): Take a
15271 'string_file &' instead of a 'ui_file *'.
15272 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15273 of a 'ui_file *'. Use string_file.
15274 (generate_c_for_variable_locations): Take a 'string_file &'
15275 instead of a 'ui_file *'.
15276 * compile/compile-internal.h (generate_c_for_for_one_variable):
15277 Take a 'string_file &' instead of a 'ui_file *'.
15278 * compile/compile-loc2c.c (push, pushf, unary, binary)
15279 (print_label, pushf_register_address, pushf_register)
15280 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15281 'ui_file *'. Adjust.
15282 * compile/compile.c (compile_to_object): Use string_file.
15283 * compile/compile.h (compile_dwarf_expr_to_c)
15284 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15285 'ui_file *'.
15286 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15287 (replace_typedefs_qualified_name): Use string_file and
15288 obstack_copy0.
15289 * disasm.c (gdb_pretty_print_insn): Use string_file.
15290 (gdb_disassembly): Adjust reference the null_stream global.
15291 (do_ui_file_delete): Delete.
15292 (gdb_insn_length): Use null_stream.
15293 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15294 * dwarf2loc.c (dwarf2_compile_property_to_c)
15295 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15296 'string_file &' instead of a 'ui_file *'.
15297 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15298 * dwarf2read.c (do_ui_file_peek_last): Delete.
15299 (dwarf2_compute_name): Use string_file.
15300 * event-top.c (gdb_setup_readline): Use stdio_file.
15301 * gdbarch.sh (verify_gdbarch): Use string_file.
15302 * gdbtypes.c (safe_parse_type): Use null_stream.
15303 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15304 string_file.
15305 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15306 'string_file *' instead of a 'ui_file *'.
15307 (gdbscm_arch_disassemble): Use string_file.
15308 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15309 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15310 inherits from ui_file.
15311 (ioscm_file_port_delete, ioscm_file_port_rewind)
15312 (ioscm_file_port_put): Delete.
15313 (ioscm_file_port_write): Rename to ...
15314 (ioscm_file_port::write): ... this. Remove file_port_magic
15315 checks.
15316 (ioscm_file_port_new): Delete.
15317 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15318 ui_file_up.
15319 * guile/scm-type.c (tyscm_type_name): Use string_file.
15320 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15321 Use string_file.
15322 * infcmd.c (print_return_value_1): Use string_file.
15323 * infrun.c (print_target_wait_results): Use string_file.
15324 * language.c (add_language): Use string_file.
15325 * location.c (explicit_to_string_internal): Use string_file.
15326 * main.c (captured_main_1): Use null_file.
15327 * maint.c (maintenance_print_architecture): Use stdio_file.
15328 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15329 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15330 event_channel>: Change type to mi_console_file pointer.
15331 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15332 (mi_console_file_delete): Delete.
15333 (struct mi_console_file): Delete.
15334 (mi_console_file_magic): Delete.
15335 (mi_console_file_new): Delete.
15336 (mi_console_file::mi_console_file): New.
15337 (mi_console_file_delete): Delete.
15338 (mi_console_file_fputs): Delete.
15339 (mi_console_file::write): New.
15340 (mi_console_raw_packet): Delete.
15341 (mi_console_file::flush): New.
15342 (mi_console_file_flush): Delete.
15343 (mi_console_set_raw): Rename to ...
15344 (mi_console_file::set_raw): ... this.
15345 * mi/mi-console.h (class mi_console_file): New class.
15346 (mi_console_file_new, mi_console_set_raw): Delete.
15347 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15348 (mi_set_logging): Use delete and tee_file. Adjust.
15349 * mi/mi-main.c (output_register): Use string_file.
15350 (mi_cmd_data_evaluate_expression): Use string_file.
15351 (mi_cmd_data_read_memory): Use string_file.
15352 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15353 * mi/mi-out.c (mi_ui_out::main_stream): New.
15354 (mi_ui_out::rewind): Use main_stream and
15355 string_file.
15356 (mi_ui_out::put): Use main_stream and string_file.
15357 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15358 Allocate a 'string_file' instead.
15359 (mi_out_new): Don't allocate a mem_fileopen stream here.
15360 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15361 (mi_ui_out::main_stream): Declare method.
15362 * printcmd.c (eval_command): Use string_file.
15363 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15364 * python/py-arch.c (archpy_disassemble): Use string_file.
15365 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15366 * python/py-frame.c (frapy_str): Use string_file.
15367 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15368 Use string_file.
15369 * python/py-type.c (typy_str): Use string_file.
15370 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15371 * python/py-value.c (valpy_str): Use string_file.
15372 * record-btrace.c (btrace_insn_history): Use string_file.
15373 * regcache.c (regcache_print): Use stdio_file.
15374 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15375 * remote.c (escape_buffer): Use string_file.
15376 * rust-lang.c (rust_get_disr_info): Use string_file.
15377 * serial.c (serial_open_ops_1): Use stdio_file.
15378 (do_serial_close): Use delete.
15379 * stack.c (print_frame_arg): Use string_file.
15380 (print_frame_args): Remove local mem_fileopen stream, not used.
15381 (print_frame): Use string_file.
15382 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15383 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15384 Take a 'string_file *' instead of a 'ui_file *'.
15385 * top.c (new_ui): Use stdio_file and stderr_file.
15386 (free_ui): Use delete.
15387 (execute_command_to_string): Use string_file.
15388 (quit_confirm): Use string_file.
15389 * tracepoint.c (collection_list::append_exp): Use string_file.
15390 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15391 * tui/tui-file.c: Don't include "ui-file.h".
15392 (enum streamtype, struct tui_stream): Delete.
15393 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15394 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15395 (tui_file::tui_file): New method.
15396 (tui_file_fputs): Delete.
15397 (tui_file_get_strbuf): Delete.
15398 (tui_file::puts): New method.
15399 (tui_file_adjust_strbuf): Delete.
15400 (tui_file_flush): Delete.
15401 (tui_file::flush): New method.
15402 * tui/tui-file.h: Tweak intro comment.
15403 Include ui-file.h.
15404 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15405 (tui_file_adjust_strbuf): Delete declarations.
15406 (class tui_file): New class.
15407 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15408 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15409 (tui_register_format): Use string_stream.
15410 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15411 (tui_get_function_from_frame): Use string_file.
15412 * typeprint.c (type_to_string): Use string_file.
15413 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15414 (null_stream): New global.
15415 (ui_file_delete): Delete.
15416 (ui_file::ui_file): New.
15417 (null_file_isatty): Delete.
15418 (ui_file::~ui_file): New.
15419 (null_file_rewind): Delete.
15420 (ui_file::printf): New.
15421 (null_file_put): Delete.
15422 (null_file_flush): Delete.
15423 (ui_file::putstr): New.
15424 (null_file_write): Delete.
15425 (ui_file::putstrn): New.
15426 (null_file_read): Delete.
15427 (ui_file::putc): New.
15428 (null_file_fputs): Delete.
15429 (null_file_write_async_safe): Delete.
15430 (ui_file::vprintf): New.
15431 (null_file_delete): Delete.
15432 (null_file::write): New.
15433 (null_file_fseek): Delete.
15434 (null_file::puts): New.
15435 (ui_file_data): Delete.
15436 (null_file::write_async_safe): New.
15437 (gdb_flush, ui_file_isatty): Adjust.
15438 (ui_file_put, ui_file_rewind): Delete.
15439 (ui_file_write): Adjust.
15440 (ui_file_write_for_put): Delete.
15441 (ui_file_write_async_safe, ui_file_read): Adjust.
15442 (ui_file_fseek): Delete.
15443 (fputs_unfiltered): Adjust.
15444 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15445 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15446 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15447 (set_ui_file_data): Delete.
15448 (string_file::~string_file, string_file::write)
15449 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15450 (do_ui_file_as_string, ui_file_as_string): Delete.
15451 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15452 (struct mem_file): Delete.
15453 (mem_file_new): Delete.
15454 (stdio_file::stdio_file): New.
15455 (mem_file_delete): Delete.
15456 (stdio_file::stdio_file): New.
15457 (mem_fileopen): Delete.
15458 (stdio_file::~stdio_file): New.
15459 (mem_file_rewind): Delete.
15460 (stdio_file::set_stream): New.
15461 (mem_file_put): Delete.
15462 (stdio_file::open): New.
15463 (mem_file_write): Delete.
15464 (stdio_file_magic, struct stdio_file): Delete.
15465 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15466 (stdio_file::flush): New.
15467 (stdio_file_read): Rename to ...
15468 (stdio_file::read): ... this. Adjust.
15469 (stdio_file_write): Rename to ...
15470 (stdio_file::write): ... this. Adjust.
15471 (stdio_file_write_async_safe): Rename to ...
15472 (stdio_file::write_async_safe) ... this. Adjust.
15473 (stdio_file_fputs): Rename to ...
15474 (stdio_file::puts) ... this. Adjust.
15475 (stdio_file_isatty): Delete.
15476 (stdio_file_fseek): Delete.
15477 (stdio_file::isatty): New.
15478 (stderr_file_write): Rename to ...
15479 (stderr_file::write) ... this. Adjust.
15480 (stderr_file_fputs): Rename to ...
15481 (stderr_file::puts) ... this. Adjust.
15482 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15483 (stderr_file::stderr_file): New.
15484 (tee_file_magic): Delete.
15485 (struct tee_file): Delete.
15486 (tee_file::tee_file): New.
15487 (tee_file_new): Delete.
15488 (tee_file::~tee_file): New.
15489 (tee_file_delete): Delete.
15490 (tee_file_flush): Rename to ...
15491 (tee_file::flush): ... this. Adjust.
15492 (tee_file_write): Rename to ...
15493 (tee_file::write): ... this. Adjust.
15494 (tee_file::write_async_safe): New.
15495 (tee_file_fputs): Rename to ...
15496 (tee_file::puts): ... this. Adjust.
15497 (tee_file_isatty): Rename to ...
15498 (tee_file::isatty): ... this. Adjust.
15499 * ui-file.h (struct obstack, struct ui_file): Don't
15500 forward-declare.
15501 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15502 (ui_file_write_ftype)
15503 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15504 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15505 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15506 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15507 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15508 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15509 (set_ui_file_fseek): Delete.
15510 (ui_file_data, ui_file_delete, ui_file_rewind)
15511 (struct ui_file): New.
15512 (ui_file_up): New.
15513 (class null_file): New.
15514 (null_stream): Declare.
15515 (ui_file_write_for_put, ui_file_put): Delete.
15516 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15517 Delete.
15518 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15519 (gdb_fopen, tee_file_new): Delete.
15520 (struct string_file): New.
15521 (struct stdio_file): New.
15522 (stdio_file_up): New.
15523 (struct stderr_file): New.
15524 (class tee_file): New.
15525 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15526 of a 'ui_file *'. Adjust.
15527 * ui-out.h (class ui_out) <field_stream>: Likewise.
15528 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15529 (null_stream): Delete.
15530 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15531 Adjust.
15532 * utils.h (struct ui_file): Delete forward declaration..
15533 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15534 (error_stream): Take a 'string_file &' instead of a
15535 'ui_file *'.
15536 * varobj.c (varobj_value_get_print_value): Use string_file.
15537 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15538 * gdbarch.c: Regenerate.
15539
187808b0
PA
155402017-02-02 Pedro Alves <palves@redhat.com>
15541
15542 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15543 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15544 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15545 Adjust to call gdb_print_insn instead of
15546 gdb_disassembler::print_insn.
15547 (dump_insns, do_mixed_source_and_assembly_deprecated)
15548 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15549 'gdbarch' parameter. Remove gdb_disassembler parameter.
15550 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15551 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15552 declaration.
15553 (gdb_pretty_print_insn): Re-add declaration.
15554 * record-btrace.c (btrace_insn_history): Don't allocate a
15555 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15556
7a8eb317
SM
155572017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15558
15559 * disasm.h (gdb_disassembly): Remove file_string parameter.
15560 * disasm.c (gdb_disassembly): Likewise.
15561 * cli/cli-cmds.c (print_disassembly): Adapt.
15562 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15563 * stack.c (do_gdb_disassembly): Likewise.
15564
7346ef59
AA
155652017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15566
15567 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15568 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15569 targets. And if the implicit value is longer than needed, extract
15570 the first bytes instead of the "least significant" ones.
15571
cd4007e4
MM
155722017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15573
15574 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15575 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15576 (btrace_fetch): Assert can_access_registers_ptid.
15577 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15578 validate_registers_access.
15579
cf77c34e
MM
155802017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15581
15582 * gdbthread.h (can_access_registers_ptid): New.
15583 * thread.c (can_access_registers_ptid): New.
15584
be85ce7d
PA
155852017-02-01 Pedro Alves <palves@redhat.com>
15586
15587 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15588
29b0b251
PA
155892017-01-31 Pedro Alves <palves@redhat.com>
15590
15591 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15592 Fix typos.
15593
289b5b24
PA
155942017-01-31 Pedro Alves <palves@redhat.com>
15595
15596 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15597 not used.
15598
b47413b4
PA
155992017-01-31 Pedro Alves <palves@redhat.com>
15600
15601 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15602
60adb36c
PA
156032017-01-31 Pedro Alves <palves@redhat.com>
15604
15605 * common/scoped_restore.h
15606 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15607 change the value's parameter type to T2.
15608 (make_scoped_restore): Likewise.
15609
2735833d
WT
156102017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15611 Richard Henderson <rth@redhat.com>
15612
15613 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15614 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15615 GS_BASE for older kernels.
15616 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15617 GS_BASE for older kernels.
15618 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15619 and GS_BASE to the offset table.
15620 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15621 system register group.
15622 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15623 for older kernels.
15624 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15625 amd64 ABI.
15626 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15627 AMD64_GSBASE_REGNUM.
15628 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15629 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15630 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15631 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15632 i386/64bit-segments.xml in those rules.
15633 * features/i386/64bit-segments.xml: New file.
15634 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15635 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15636 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15637 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15638 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15639 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15640 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15641 * features/i386/amd64-avx-linux.c: Regenerated.
15642 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15643 * features/i386/amd64-avx-mpx.c: Regenerated.
15644 * features/i386/amd64-avx512-linux.c: Regenerated.
15645 * features/i386/amd64-linux.c: Regenerated.
15646 * features/i386/amd64-mpx-linux.c: Regenerated.
15647 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15648 * features/i386/i386-avx-mpx.c: Regenerated.
15649 * features/i386/x32-avx-linux.c: Regenerated.
15650 * features/i386/x32-avx512-linux.c: Regenerated.
15651 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15652 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15653 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15654 * regformats/i386/amd64-linux.dat: Regenerated.
15655 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15656 * regformats/i386/x32-avx-linux.dat: Regenerated.
15657 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15658 * regformats/i386/x32-linux.dat: Regenerated.
15659
8884e97e
WT
156602017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15661
15662 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15663 Set to AMD64_NUM_REGS.
15664
7005d26a
WT
156652017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15666
15667 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15668 that checks validity of a register number.
15669
4bd2e1b2
KC
156702017-01-27 Kees Cook <keescook@google.com>
15671
15672 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15673 fetch_fpregs if target has fpa registers.
15674 (arm_linux_store_inferior_registers): Call store_fpregs if target
15675 has fpa registers.
15676
7cf1de6c
AA
156772017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15678
15679 * cris-tdep.c (cris_gdbarch_init): Remove check for
15680 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15681
874a1c8c
AT
156822017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15683
15684 * corelow.c (get_core_register_section): Check for regset
15685 existence before checking for REGSET_VARIABLE_SIZE.
15686
d8b49cf0
YQ
156872017-01-26 Yao Qi <yao.qi@linaro.org>
15688 Pedro Alves <palves@redhat.com>
15689
15690 PR gdb/20939
15691 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15692 call memory_error, save memaddr instead.
15693 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15694 negative, cal memory_error.
15695 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15696
658ca58c
YQ
156972017-01-26 Yao Qi <yao.qi@linaro.org>
15698
15699 * disasm-selftests.c (memory_error_test): New function.
15700 (_initialize_disasm_selftests): Register memory_error_test.
15701
79843d45
YQ
157022017-01-26 Yao Qi <yao.qi@linaro.org>
15703
15704 * Makefile.in (SFILES): Add disasm-selftests.c and
15705 selftest-arch.c.
15706 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15707 * disasm-selftests.c: New file.
15708 * selftest-arch.c: New file.
15709 * selftest-arch.h: New file.
15710
8cafda32
YQ
157112017-01-26 Yao Qi <yao.qi@linaro.org>
15712
15713 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15714 to bfd_arch_mep. Don't return 0 if section is not
15715 found. Call print_insn_mep.
15716
e47ad6c0
YQ
157172017-01-26 Pedro Alves <palves@redhat.com>
15718 Yao Qi <yao.qi@linaro.org>
15719
15720 * arm-tdep.c: Include "disasm.h".
15721 (gdb_print_insn_arm): Update code to get gdbarch.
15722 * disasm.c (dis_asm_read_memory): Change it to
15723 gdb_disassembler::dis_asm_read_memory.
15724 (dis_asm_memory_error): Likewise.
15725 (dis_asm_print_address): Likewise.
15726 (gdb_pretty_print_insn): Change it to
15727 gdb_disassembler::pretty_print_insn.
15728 (dump_insns): Add one argument gdb_disassemlber. All
15729 callers updated.
15730 (do_mixed_source_and_assembly_deprecated): Likewise.
15731 (do_mixed_source_and_assembly): Likewise.
15732 (do_assembly_only): Likewise.
15733 (gdb_disassembler::gdb_disassembler): New.
15734 (gdb_disassembler::print_insn): New.
15735 * disasm.h (class gdb_disassembler): New.
15736 (gdb_pretty_print_insn): Remove declaration.
15737 (gdb_disassemble_info): Likewise.
15738 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15739 (gdbscm_disasm_read_memory_worker): Update.
15740 (gdbscm_disasm_read_memory): Update.
15741 (gdbscm_disasm_memory_error): Remove.
15742 (gdbscm_disasm_print_address): Remove.
15743 (gdbscm_disassembler::gdbscm_disassembler): New.
15744 (gdbscm_print_insn_from_port): Update.
15745 * mips-tdep.c: Include disasm.h.
15746 (gdb_print_insn_mips): Update code to get gdbarch.
15747 * record-btrace.c (btrace_insn_history): Update.
15748 * spu-tdep.c: Include disasm.h.
15749 (struct spu_dis_asm_data): Remove.
15750 (struct spu_dis_asm_info): New.
15751 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15752 SPU id.
15753 (gdb_print_insn_spu): Cast disassemble_info to
15754 spu_dis_asm_info.
15755
80d75874
YQ
157562017-01-26 Yao Qi <yao.qi@linaro.org>
15757
15758 * disasm.c (do_ui_file_delete): Delete.
15759 (gdb_insn_length): Move code creating stream to ...
15760 * utils.c (null_stream): ... here. New function.
15761 * utils.h (null_stream): Declare.
15762
60685cd0
SM
157632017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15764
15765 * python/py-inferior.c (find_thread_object): Return directly
15766 from the loop. Remove "found" variable.
15767
eb1cdb62
JB
157682017-01-21 Joel Brobecker <brobecker@adacore.com>
15769
15770 GDB 7.12.1 released.
15771
b1ce6568
SM
157722017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15773
15774 * python/py-function.c (fnpy_call): Reorder declarations to have
15775 the gdbpy_enter object declared first.
15776 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15777
6f8b0407
SM
157782017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15779
fec93fb1 15780 PR python/21068
6f8b0407
SM
15781 * python/python-internal.h (PyMem_RawMalloc): Define for
15782 Python < 3.4.
15783 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15784 PyMem_RawMalloc instead of PyMem_Malloc.
15785
78cbbba8
LM
157862017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15787 Luis Machado <lgustavo@codesourcery.com>
15788
15789 * NEWS (New commands): Mention flash-erase.
15790 (New MI commands): Mention target-flash-erase.
15791 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15792 command.
15793 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15794 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15795 * target.c (flash_erase_command): New function.
15796 (initialize_targets): Add new flash-erase command.
15797 * target.h (flash_erase_command): New declaration.
15798
2132fe85
JB
157992017-01-20 Joel Brobecker <brobecker@adacore.com>
15800
15801 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15802 HAVE_SYS_PROCFS_H is defined.
15803
d1dff226
AH
158042017-01-18 Alan Hayward <alan.hayward@arm.com>
15805
15806 * remote.c (struct cached_reg): Change data into a pointer.
15807 * (stop_reply_dtr): Free data pointers before deleting vector.
15808 (process_stop_reply): Likewise.
15809 (remote_parse_stop_reply): Allocate space for data
15810
9890e433
AH
158112017-01-18 Alan Hayward <alan.hayward@arm.com>
15812
15813 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15814 MAX_REGISTER_SIZE.
15815 (amd64_pseudo_register_read_value): Likewise.
15816 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15817 (store_register_using_P): Likewise.
15818 * regcache.c (regcache_xfer_part): Likewise.
15819
7a36499a
IR
158202017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15821
15822 Split real and pseudo registers.
15823 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15824 (sparc32_pseudo_regnum): New enum.
15825 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15826 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15827 (SPARC32_CP0_REGISTERS): New macro.
15828 (sparc32_pseudo_register_name): New function.
15829 (sparc32_register_name): Use sparc32_pseudo_register_name.
15830 (sparc32_pseudo_register_type): New function.
15831 (sparc32_register_type): Use sparc32_pseudo_register_type.
15832 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15833 pseudo register numbers.
15834 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15835 (SPARC64_CP0_REGISTERS): New macro.
15836 (sparc64_pseudo_register_name): New function.
15837 (sparc64_register_name): Use sparc64_pseudo_register_name.
15838 (sparc64_pseudo_register_type): New function.
15839 (sparc64_register_type): Use sparc64_pseudo_register_type.
15840 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15841 pseudo register numbers.
15842 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15843 sparc64_store_arguments): Handle pseudo register numbers.
15844
6f8976bf
YQ
158452017-01-13 Yao Qi <yao.qi@linaro.org>
15846
15847 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15848 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15849 output.
15850 (getpkt_or_notif_sane_1): Likewise.
15851
e4241ace
YQ
158522017-01-13 Yao Qi <yao.qi@linaro.org>
15853
15854 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15855 of CC. Pass "-x c++-header" instead of "-x c".
15856
3015c064
SM
158572017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15858
15859 * remote.c (remote_can_async_p): Update comment.
15860
fde1b17d
SM
158612017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15862
15863 * linux-nat.c (linux_nat_can_async_p): Update comment.
15864
ca1ca08b
SM
158652017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15866
15867 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15868
4ad2da73
SM
158692017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15870
15871 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15872
c8b23b3f
TT
158732017-01-10 Tom Tromey <tom@tromey.com>
15874
15875 * python/py-type.c (typy_legacy_template_argument): Update.
15876 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15877 ~demangle_parse_info): Declare new members.
15878 (cp_demangled_name_to_comp): Return unique_ptr.
15879 (cp_demangled_name_parse_free)
15880 (make_cleanup_cp_demangled_name_parse_free)
15881 (cp_new_demangle_parse_info): Remove.
15882 * cp-support.c (do_demangled_name_parse_free_cleanup)
15883 (make_cleanup_cp_demangled_name_parse_free): Remove.
15884 (inspect_type, cp_canonicalize_string_full)
15885 (cp_canonicalize_string): Update.
15886 (mangled_name_to_comp): Change return type.
15887 (cp_class_name_from_physname, method_name_from_physname)
15888 (cp_func_name, cp_remove_params): Update.
15889 * cp-name-parser.y (demangle_parse_info): New constructor, from
15890 cp_new_demangle_parse_info.
15891 (~demangle_parse_info): New destructor, from
15892 cp_demangled_name_parse_free.
15893 (cp_merge_demangle_parse_infos): Update.
15894 (cp_demangled_name_to_comp): Change return type.
15895
1ac32117
TT
158962017-01-10 Tom Tromey <tom@tromey.com>
15897
15898 * top.c (prevent_dont_repeat): Change return type.
15899 * python/python.c (execute_gdb_command): Use std::string.
15900 Update.
15901 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15902 * command.h (prevent_dont_repeat): Change return type.
15903 * breakpoint.c (bpstat_do_actions_1): Update.
15904
0cf08227
TT
159052017-01-10 Tom Tromey <tom@tromey.com>
15906
15907 * value.h (scoped_value_mark::~scoped_value_mark): Call
15908 free_to_mark.
15909 (scoped_value_mark::free_to_mark): New method.
15910 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15911 scoped_value_mark.
15912
eb115069
TT
159132017-01-10 Tom Tromey <tom@tromey.com>
15914
15915 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15916 (valpy_reference_value, valpy_const_value, valpy_get_address)
15917 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15918 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15919 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15920 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15921 scoped_value_mark.
15922 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15923 * value.h (scoped_value_mark): New class.
15924
906768f9
TT
159252017-01-10 Tom Tromey <tom@tromey.com>
15926
15927 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15928 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15929 * psymtab.c (discard_psymtabs_upto): Remove.
15930 (make_cleanup_discard_psymtabs): Remove.
15931 (struct psymtab_state): Remove.
15932
bef155c3
TT
159332017-01-10 Tom Tromey <tom@tromey.com>
15934
15935 * record-full.c (record_full_save_cleanups): Remove.
15936 (record_full_save): Use gdb::unlinker.
15937 * gcore.c (do_bfd_delete_cleanup): Remove.
15938 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15939 cleanups.
15940 * dwarf2read.c (unlink_if_set): Remove.
15941 (write_psymtabs_to_index): Use gdb::unlinker.
15942 * common/gdb_unlinker.h: New file.
15943
192b62ce
TT
159442017-01-10 Tom Tromey <tom@tromey.com>
15945
15946 * windows-tdep.c (windows_xfer_shared_library): Update.
15947 * windows-nat.c (windows_make_so): Update.
15948 * utils.h (make_cleanup_bfd_unref): Remove.
15949 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15950 * symfile.h (symfile_bfd_open)
15951 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15952 * symfile.c (read_symbols, symbol_file_add)
15953 (separate_debug_file_exists): Update.
15954 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15955 (generic_load, reread_symbols): Update.
15956 * symfile-mem.c (symbol_file_add_from_memory): Update.
15957 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15958 (spu_symbol_file_add_from_memory): Update.
15959 * solist.h (struct target_so_ops) <bfd_open>: Return
15960 gdb_bfd_ref_ptr.
15961 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15962 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15963 gdb_bfd_ref_ptr.
15964 (solib_map_sections, reload_shared_libraries_1): Update.
15965 * solib-svr4.c (enable_break): Update.
15966 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15967 * solib-frv.c (enable_break2): Update.
15968 * solib-dsbt.c (enable_break): Update.
15969 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15970 gdb_bfd_ref_ptr.
15971 (darwin_solib_get_all_image_info_addr_at_init): Update.
15972 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15973 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15974 * record-full.c (record_full_save): Update.
15975 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15976 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15977 * minidebug.c (find_separate_debug_file_in_section): Return
15978 gdb_bfd_ref_ptr.
15979 * machoread.c (macho_add_oso_symfile): Change abfd to
15980 gdb_bfd_ref_ptr.
15981 (macho_symfile_read_all_oso): Update.
15982 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15983 (macho_symfile_read): Update.
15984 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15985 (jit_bfd_try_read_symtab): Update.
15986 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15987 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15988 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15989 gdb_bfd_ref_ptr.
15990 (gdb_bfd_ref_policy): New struct.
15991 (gdb_bfd_ref_ptr): New typedef.
15992 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15993 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15994 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15995 gdb_bfd_ref_ptr.
15996 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15997 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15998 (gcore_command): Update.
15999 * exec.c (exec_file_attach): Update.
16000 * elfread.c (elf_symfile_read): Update.
16001 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16002 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16003 (open_and_init_dwo_file): Update.
16004 (open_dwp_file): Return gdb_bfd_ref_ptr.
16005 (open_and_init_dwp_file): Update.
16006 * corelow.c (core_open): Update.
16007 * compile/compile-object-load.c (compile_object_load): Update.
16008 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16009 * coffread.c (coff_symfile_read): Update.
16010 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16011 gdb_bfd_ref_ptr. Rename.
16012 (dump_bfd_file, restore_command): Update.
16013 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16014 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16015 (find_separate_debug_file_by_buildid): Update.
16016
50315b21
TT
160172017-01-10 Tom Tromey <tom@tromey.com>
16018
16019 * common/gdb_ref_ptr.h: New file.
16020 * python/py-ref.h (struct gdbpy_ref_policy): New.
16021 (gdbpy_ref): Now a typedef.
16022
fc4007c9
TT
160232017-01-10 Tom Tromey <tom@tromey.com>
16024
16025 * utils.h (make_cleanup_htab_delete): Don't declare.
16026 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16027 Remove.
16028 * linespec.c (decode_compound_collector): Add constructor,
16029 destructor.
16030 (lookup_prefix_sym): Remove cleanup.
16031 (symtab_collector): Add constructor, destructor.
16032 (collect_symtabs_from_filename): Remove cleanup.
16033 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16034 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16035 Use htab_up.
16036 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16037 * dwarf2read.c (dw2_expand_symtabs_matching)
16038 (dw2_map_symbol_filenames, dwarf_decode_macros)
16039 (write_psymtabs_to_index): Use htab_up.
16040 * dwarf2loc.c (func_verify_no_selftailcall)
16041 (call_site_find_chain_1, func_verify_no_selftailcall)
16042 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16043 std::vector, gdb::unique_xmalloc_ptr.
16044 (call_sitep): Remove typedef.
16045 (dwarf2_locexpr_baton_eval): Remove unused variable.
16046
8dbcee67
TT
160472017-01-10 Tom Tromey <tom@tromey.com>
16048
16049 * python/python-internal.h (make_cleanup_py_decref)
16050 (make_cleanup_py_xdecref): Don't declare.
16051 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16052 (py_xdecref, make_cleanup_py_xdecref): Remove.
16053
13df46cc
TT
160542017-01-10 Tom Tromey <tom@tromey.com>
16055
16056 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16057 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16058
06fc9bf7
TT
160592017-01-10 Tom Tromey <tom@tromey.com>
16060
16061 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16062
830a4934
TT
160632017-01-10 Tom Tromey <tom@tromey.com>
16064
16065 * python/py-utils.c (unicode_to_encoded_string)
16066 (python_string_to_target_string)
16067 (python_string_to_target_python_string)
16068 (python_string_to_host_string, gdbpy_obj_to_string)
16069 (get_addr_from_python): Use gdbpy_ref.
16070
4586d543
TT
160712017-01-10 Tom Tromey <tom@tromey.com>
16072
16073 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16074 gdbpy_ref.
16075
59876f8f
TT
160762017-01-10 Tom Tromey <tom@tromey.com>
16077
16078 * python/python.c (eval_python_command, gdbpy_decode_line)
16079 (gdbpy_run_events, gdbpy_start_type_printers)
16080 (gdbpy_apply_type_printers): Use gdbpy_ref.
16081
97d83487
TT
160822017-01-10 Tom Tromey <tom@tromey.com>
16083
16084 * python/py-param.c (get_doc_string, compute_enum_values): Use
16085 gdbpy_ref.
16086
9205649a
TT
160872017-01-10 Tom Tromey <tom@tromey.com>
16088
16089 * python/py-inferior.c (find_thread_object, build_inferior_list):
16090 Use gdbpy_ref.
16091
74c49d45
TT
160922017-01-10 Tom Tromey <tom@tromey.com>
16093
16094 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16095
16361ffb
TT
160962017-01-10 Tom Tromey <tom@tromey.com>
16097
16098 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16099 gdbpy_ref.
16100
905f2cca
TT
161012017-01-10 Tom Tromey <tom@tromey.com>
16102
16103 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16104 extra incref.
16105 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16106 Use gdbpy_ref.
16107
64081434
TT
161082017-01-10 Tom Tromey <tom@tromey.com>
16109
16110 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16111 gdbpy_ref.
16112
59e9e831
TT
161132017-01-10 Tom Tromey <tom@tromey.com>
16114
16115 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16116 decref results of PyArg_ParseTupleAndKeywords.
16117
9de10f6d
TT
161182017-01-10 Tom Tromey <tom@tromey.com>
16119
16120 * python/python.c (python_run_simple_file): Use
16121 unique_xmalloc_ptr, gdbpy_ref.
16122
2bd5759d
TT
161232017-01-10 Tom Tromey <tom@tromey.com>
16124
16125 * python/py-prettyprint.c (print_stack_unless_memory_error)
16126 (print_string_repr, print_children): Use gdbpy_ref.
16127 (dummy_python_frame): New class.
16128 (dummy_python_frame::dummy_python_frame): Rename from
16129 push_dummy_python_frame.
16130 (py_restore_tstate): Remove.
16131
3b4e0e01
TT
161322017-01-10 Tom Tromey <tom@tromey.com>
16133
16134 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16135
17a22718
TT
161362017-01-10 Tom Tromey <tom@tromey.com>
16137
16138 * python/python.c (ensure_python_env, restore_python_env):
16139 Remove.
16140 * python/python-internal.h (ensure_python_env): Don't declare.
16141 * varobj.h (varobj_ensure_python_env): Don't declare.
16142 * varobj.c (varobj_ensure_python_env): Remove.
16143
68cdc557
TT
161442017-01-10 Tom Tromey <tom@tromey.com>
16145
16146 * varobj.c (varobj_value_get_print_value): Use
16147 gdbpy_enter_varobj.
16148
1eba6383
TT
161492017-01-10 Tom Tromey <tom@tromey.com>
16150
16151 * python/py-prettyprint.c (print_string_repr, print_children):
16152 Update.
16153 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16154 of "encoding".
16155 * varobj.c (varobj_value_get_print_value): Update.
16156 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16157
bde7b3e3
TT
161582017-01-10 Tom Tromey <tom@tromey.com>
16159
16160 * varobj.c (varobj_get_display_hint)
16161 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16162 (varobj_set_visualizer, free_variable): Use
16163 gdbpy_enter_varobj.
16164
a7785f8c
TT
161652017-01-10 Tom Tromey <tom@tromey.com>
16166
16167 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16168 (do_finish_initialization): New function. Use gdbpy_ref.
16169 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16170 do_finish_initialization.
16171
2865bfce
TT
161722017-01-10 Tom Tromey <tom@tromey.com>
16173
16174 * python/py-param.c (get_set_value, get_show_value): Use
16175 gdbpy_enter, gdbpy_ref.
16176
0e9dcc75
TT
161772017-01-10 Tom Tromey <tom@tromey.com>
16178
16179 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16180
12a5cedd
TT
161812017-01-10 Tom Tromey <tom@tromey.com>
16182
16183 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16184
788f2586
TT
161852017-01-10 Tom Tromey <tom@tromey.com>
16186
16187 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16188 Use gdbpy_enter_varobj.
16189
6cd67bea
TT
161902017-01-10 Tom Tromey <tom@tromey.com>
16191
16192 * varobj.c (gdbpy_enter_varobj): New constructor.
16193 * python/python-internal.h (gdbpy_enter_varobj): New class.
16194 * python/py-varobj.c (py_varobj_get_iterator): Use
16195 gdbpy_enter_varobj.
16196
14b122bf
TT
161972017-01-10 Tom Tromey <tom@tromey.com>
16198
16199 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16200 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16201 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16202 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16203 unique_xmalloc_ptr.
16204 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16205
bf1ca3b9
TT
162062017-01-10 Tom Tromey <tom@tromey.com>
16207
16208 * python/py-xmethods.c (invoke_match_method): Use
16209 gdbpy_ref.
16210
572a5524
TT
162112017-01-10 Tom Tromey <tom@tromey.com>
16212
16213 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16214 gdbpy_enter, gdbpy_ref.
16215
396a78b6
TT
162162017-01-10 Tom Tromey <tom@tromey.com>
16217
16218 * python/python.c (python_interactive_command): Use gdbpy_enter.
16219
a88b13c7
TT
162202017-01-10 Tom Tromey <tom@tromey.com>
16221
16222 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16223 gdbpy_ref.
16224
e9f0c363
TT
162252017-01-10 Tom Tromey <tom@tromey.com>
16226
16227 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16228 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16229
6349f452
TT
162302017-01-10 Tom Tromey <tom@tromey.com>
16231
16232 * utils.h (htab_deleter): New struct.
16233 (htab_up): New typedef.
16234 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16235 gdbpy_enter, gdbpy_ref, htab_up.
16236
c0171de6
TT
162372017-01-10 Tom Tromey <tom@tromey.com>
16238
16239 * python/py-unwind.c (pending_frame_invalidate): Remove.
16240 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16241
f18e226f
TT
162422017-01-10 Tom Tromey <tom@tromey.com>
16243
16244 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16245 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16246
c57af3f1
TT
162472017-01-10 Tom Tromey <tom@tromey.com>
16248
16249 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16250
60e600ec
TT
162512017-01-10 Tom Tromey <tom@tromey.com>
16252
16253 * python/python.c (gdbpy_eval_from_control_command)
16254 (gdbpy_source_script, gdbpy_run_events)
16255 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16256 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16257 gdbpy_enter.
16258
bf7da5b0
TT
162592017-01-10 Tom Tromey <tom@tromey.com>
16260
16261 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16262
2d38bced
TT
162632017-01-10 Tom Tromey <tom@tromey.com>
16264
16265 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16266
07bc7329
TT
162672017-01-10 Tom Tromey <tom@tromey.com>
16268
16269 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16270 (python_on_inferior_call_pre, python_on_inferior_call_post)
16271 (python_on_memory_change, python_on_register_change)
16272 (python_inferior_exit, python_new_objfile, add_thread_object)
16273 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16274
6e7c365e
TT
162752017-01-10 Tom Tromey <tom@tromey.com>
16276
16277 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16278 (bpfinishpy_handle_exit): Use gdbpy_enter.
16279
6ba0cd40
TT
162802017-01-10 Tom Tromey <tom@tromey.com>
16281
16282 * python/py-cmd.c (cmdpy_destroyer)
16283 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16284 gdbpy_enter.
16285
de2dc875
TT
162862017-01-10 Tom Tromey <tom@tromey.com>
16287
16288 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16289 gdbpy_enter.
16290 (gdbpy_breakpoint_has_cond): Likewise.
16291
4ecee2c4
TT
162922017-01-10 Tom Tromey <tom@tromey.com>
16293
16294 * python/python.c (gdbpy_enter): New constructor.
16295 (~gdbpy_enter): New destructor.
16296 (restore_python_env, ensure_python_env): Rewrite.
16297 * python/python-internal.h (gdbpy_enter): New class.
16298
37fce74f
TT
162992017-01-10 Tom Tromey <tom@tromey.com>
16300
16301 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16302
53a0cca3
TT
163032017-01-10 Tom Tromey <tom@tromey.com>
16304
16305 * python/py-value.c (value_has_field, get_field_flag)
16306 (get_field_type, valpy_getitem, convert_value_from_python): Use
16307 gdbpy_ref.
16308
ff3724f5
TT
163092017-01-10 Tom Tromey <tom@tromey.com>
16310
16311 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16312 gdbpy_ref.
16313
0700aea5
TT
163142017-01-10 Tom Tromey <tom@tromey.com>
16315
16316 * python/py-prettyprint.c (search_pp_list)
16317 (find_pretty_printer_from_objfiles)
16318 (find_pretty_printer_from_progspace)
16319 (find_pretty_printer_from_gdb, find_pretty_printer)
16320 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16321 gdbpy_ref.
16322
1bb44c9f
TT
163232017-01-10 Tom Tromey <tom@tromey.com>
16324
16325 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16326
87ce03fd
TT
163272017-01-10 Tom Tromey <tom@tromey.com>
16328
16329 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16330 (ltpy_get_all_source_lines): Use gdbpy_ref.
16331
ee0a3fb8
TT
163322017-01-10 Tom Tromey <tom@tromey.com>
16333
16334 * python/py-framefilter.c (extract_sym, extract_value)
16335 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16336 gdbpy_ref.
16337
bf2a52fa
TT
163382017-01-10 Tom Tromey <tom@tromey.com>
16339
16340 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16341
f59fe7f8
TT
163422017-01-10 Tom Tromey <tom@tromey.com>
16343
16344 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16345
80bd970a
TT
163462017-01-10 Tom Tromey <tom@tromey.com>
16347
16348 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16349 gdbpy_ref.
16350
d1b3de2e
TT
163512017-01-10 Tom Tromey <tom@tromey.com>
16352
16353 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16354
3bb43384
TT
163552017-01-10 Tom Tromey <tom@tromey.com>
16356
16357 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16358 (typy_range): Use gdbpy_ref.
16359
abf5651e
TT
163602017-01-10 Tom Tromey <tom@tromey.com>
16361
16362 * python/py-threadevent.c (create_thread_event_object): Use
16363 gdbpy_ref.
16364 * python/py-stopevent.c (create_stop_event_object): Simplify.
16365 (emit_stop_event): Use gdbpy_ref.
16366 * python/py-signalevent.c (create_signal_event_object): Use
16367 gdbpy_ref.
16368 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16369 (emit_new_objfile_event, create_clear_objfiles_event_object)
16370 (emit_clear_objfiles_event): Use gdbpy_ref.
16371 * python/py-infevents.c (create_inferior_call_event_object)
16372 (create_register_changed_event_object)
16373 (create_memory_changed_event_object, emit_inferior_call_event)
16374 (emit_memory_changed_event, emit_register_changed_event): Use
16375 gdbpy_ref.
16376 * python/py-exitedevent.c (create_exited_event_object)
16377 (emit_exited_event): Use gdbpy_ref.
16378 * python/py-event.h (evpy_emit_event): Remove
16379 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16380 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16381 * python/py-continueevent.c (emit_continue_event): Use
16382 gdbpy_ref.
16383 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16384 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16385 gdbpy_ref.
16386 * python/py-bpevent.c (create_breakpoint_event_object): Use
16387 gdbpy_ref.
16388
a68ff33e
TT
163892017-01-10 Tom Tromey <tom@tromey.com>
16390
16391 * python/py-ref.h: New file.
16392
7becfd03
SM
163932017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16394
16395 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16396 void.
16397 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16398 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16399 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16400 * ui-out.c (ui_out::redirect): Likewise.
16401 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16402 * cli/cli-logging.c (set_logging_redirect): Update call site of
16403 ui_out::redirect.
16404 (handle_redirections): Likewise.
16405 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16406 * top.c (execute_command_to_string): Likewise.
16407 * utils.c (do_ui_out_redirect_pop): Likewise.
16408
df294654
SM
164092017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16410
16411 * stack.c (_initialize_stack): Update "frame" command help message.
16412
f5e6296e
IB
164132017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16414
16415 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16416
0e2d6fa6
YQ
164172017-01-06 Yao Qi <yao.qi@linaro.org>
16418
16419 * x86-linux-nat.h: Include gdb_proc_service.h.
16420
44d6d3f9
YQ
164212017-01-06 Yao Qi <yao.qi@linaro.org>
16422
16423 * ser-base.h: Include serial.h.
16424
656731fe
YQ
164252017-01-06 Yao Qi <yao.qi@linaro.org>
16426
16427 * ppc-linux-tdep.h: Include ppc-tdep.h.
16428
1ca8f924
YQ
164292017-01-06 Yao Qi <yao.qi@linaro.org>
16430
16431 * nat/amd64-linux-siginfo.h: Include signal.h.
16432
bc3008c4
YQ
164332017-01-06 Yao Qi <yao.qi@linaro.org>
16434
16435 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16436
66c80d03
YQ
164372017-01-06 Yao Qi <yao.qi@linaro.org>
16438
16439 * mi/mi-parse.h: Include mi-cmds.h.
16440
051d2dda
YQ
164412017-01-06 Yao Qi <yao.qi@linaro.org>
16442
16443 * inf-loop.c: Don't include "target.h".
16444 * inf-loop.h: Include it here.
16445
8018d34f
YQ
164462017-01-06 Yao Qi <yao.qi@linaro.org>
16447
16448 * dfp.h: Include "dboulest.h" and "expression.h".
16449
c0b8369c
YQ
164502017-01-06 Yao Qi <yao.qi@linaro.org>
16451
16452 * ax-gdb.h: Include "ax.h".
16453
ad5cba2a
YQ
164542017-01-06 Yao Qi <yao.qi@linaro.org>
16455
16456 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16457 with nat/gdb_ptrace.h.
16458
1c33cd7f
YQ
164592017-01-05 Yao Qi <yao.qi@linaro.org>
16460
16461 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16462 new line.
16463 (mips64_fbsd_sigframe_init): Likewise.
16464
c988ac1d
JB
164652017-01-04 John Baldwin <jhb@FreeBSD.org>
16466
16467 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16468 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16469
b268007c
JB
164702017-01-04 John Baldwin <jhb@FreeBSD.org>
16471
16472 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16473 * NEWS: Mention new FreeBSD/mips native configuration.
16474 * config/mips/fbsd.mh: New file.
16475 * configure.host: Add mips*-*-freebsd*.
16476 * mips-fbsd-nat.c: New file.
16477
387360da
JB
164782017-01-04 John Baldwin <jhb@FreeBSD.org>
16479
16480 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16481 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16482 * NEWS: Mention new FreeBSD/mips target.
16483 * configure.tgt: Add mips*-*-freebsd*.
16484 * mips-fbsd-tdep.c: New file.
16485 * mips-fbsd-tdep.h: New file.
16486
2aaaf250
YQ
164872017-01-04 Yao Qi <yao.qi@linaro.org>
16488
16489 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16490 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16491
61baf725
JB
164922017-01-01 Joel Brobecker <brobecker@adacore.com>
16493
6dbb839a 16494 Update copyright year range in all GDB files.
61baf725 16495
c113e7ff 164962017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16497
c113e7ff 16498 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16499
c113e7ff 16500For older changes see ChangeLog-2016.
c906108c
SS
16501\f
16502Local Variables:
16503mode: change-log
16504left-margin: 8
16505fill-column: 74
16506version-control: never
57da7796 16507coding: utf-8
c906108c 16508End:
This page took 2.763695 seconds and 4 git commands to generate.