Revert unexpected rename in previous patch
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
2
3 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
4 back to...
5 <children_requested>: ... this.
6 (varobj_get_num_children, varobj_update): Adjust.
7
8 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
9
10 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
11 (ada_value_has_mutated): Likewise.
12 * c-varobj.c (varobj_is_anonymous_child): Likewise.
13 (c_is_path_expr_parent): Likewise.
14 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
15 (mi_cmd_var_set_frozen): Likewise.
16 (mi_cmd_var_update_iter): Likewise.
17 (mi_cmd_var_update): Likewise.
18 * varobj.c (pretty_printing): Likewise.
19 (varobj_enable_pretty_printing): Likewise.
20 (struct varobj_root) <floating, is_valid>: Likewise.
21 (struct varobj_dynamic) <children_requested>: Likewise.
22 (delete_variable): Likewise.
23 (delete_variable_1): Likewise.
24 (install_variable): Likewise.
25 (update_type_if_necessary): Likewise.
26 (install_new_value): Likewise.
27 (value_of_root): Likewise.
28 (is_root_p): Likewise.
29 (varobj_create): Likewise.
30 (varobj_delete): Likewise.
31 (varobj_has_more): Likewise.
32 (varobj_set_frozen): Likewise.
33 (varobj_get_frozen): Likewise.
34 (install_dynamic_child): Likewise.
35 (dynamic_varobj_has_child_method): Likewise.
36 (update_dynamic_varobj_children): Likewise.
37 (varobj_get_num_children): Likewise.
38 (varobj_list_children): Likewise.
39 (is_path_expr_parent): Likewise.
40 (varobj_default_is_path_expr_parent): Likewise.
41 (varobj_is_dynamic_p): Likewise.
42 (varobj_set_value): Likewise.
43 (varobj_value_has_mutated): Likewise.
44 (varobj_update): Likewise.
45 (check_scope): Likewise.
46 (value_of_root_1): Likewise.
47 (varobj_value_get_print_value): Likewise.
48 (varobj_editable_p): Likewise.
49 (varobj_value_is_changeable_p): Likewise.
50 (varobj_floating_p): Likewise.
51 (varobj_default_value_is_changeable_p): Likewise.
52 (varobj_invalidate_iter): Likewise.
53 * varobj.h (struct varobj_update_result) <type_changed,
54 children_changed, changed, value_installed>: Likewise.
55 (struct varobj) <updated, frozen, not_fetched>: Likewise.
56 (struct lang_varobj_ops) <value_is_changeable_p,
57 value_has_mutated, is_path_expr_parent>: Likewise.
58 (varobj_delete): Likewise.
59 (varobj_set_frozen): Likewise.
60 (varobj_get_frozen): Likewise.
61 (varobj_set_value): Likewise.
62 (varobj_update): Likewise.
63 (varobj_editable_p): Likewise.
64 (varobj_floating_p): Likewise.
65 (varobj_has_more): Likewise.
66 (varobj_is_dynamic_p): Likewise.
67 (varobj_default_value_is_changeable_p): Likewise.
68 (varobj_value_is_changeable_p): Likewise.
69 (varobj_is_anonymous_child): Likewise.
70 (varobj_default_is_path_expr_parent): Likewise.
71
72 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
73
74 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
75 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
76 <type_str>: Convert to 'std::string'.
77 <expr>: Convert to 'expression_up'.
78 (dtrace_probe_arg_s): Delete type and VEC.
79 (dtrace_probe_enabler_s): Likewise.
80 (struct dtrace_probe): Replace by...
81 (class dtrace_static_probe_ops): ...this and...
82 (class dtrace_probe): ...this.
83 (dtrace_probe_is_linespec): Rename to...
84 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
85 to reflect change.
86 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
87 Adjust code. Create new instance of 'dtrace_probe'.
88 (dtrace_build_arg_exprs): Rename to...
89 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
90 reflect change.
91 (dtrace_get_probes): Rename to...
92 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
93 to reflect change.
94 (dtrace_get_arg): Rename to...
95 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
96 reflect change.
97 (dtrace_probe_is_enabled): Rename to...
98 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
99 change.
100 (dtrace_get_probe_address): Rename to...
101 (dtrace_probe::get_relocated_address): ...this. Adjust code
102 to reflect change.
103 (dtrace_get_probe_argument_count): Rename to...
104 (dtrace_probe::get_argument_count): ...this. Adjust code to
105 reflect change.
106 (dtrace_can_evaluate_probe_arguments): Rename to...
107 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
108 to reflect change.
109 (dtrace_evaluate_probe_argument): Rename to...
110 (dtrace_probe::evaluate_argument): ...this. Adjust code to
111 reflect change.
112 (dtrace_compile_to_ax): Rename to...
113 (dtrace_probe::compile_to_ax): ...this. Adjust code to
114 reflect change.
115 (dtrace_probe_destroy): Delete.
116 (dtrace_type_name): Rename to...
117 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
118 reflect change.
119 (dtrace_probe::get_static_ops): New method.
120 (dtrace_gen_info_probes_table_header): Rename to...
121 (dtrace_static_probe_ops::gen_info_probes_table_header):
122 ...this. Adjust code to reflect change.
123 (dtrace_gen_info_probes_table_values): Rename to...
124 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
125 code to reflect change.
126 (dtrace_enable_probe): Rename to...
127 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
128 change.
129 (dtrace_disable_probe): Rename to...
130 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
131 change.
132 (struct probe_ops dtrace_probe_ops): Delete.
133 (info_probes_dtrace_command): Call 'info_probes_for_spops'
134 instead of 'info_probes_for_ops'.
135 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
136 of 'all_probe_ops'.
137
138 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
139 Simon Marchi <simark@simark.ca>
140
141 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
142 variable.
143 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
144 <aexpr>: Change type to 'expression_up'.
145 (stap_probe_arg_s): Delete type and VEC.
146 (struct stap_probe): Delete. Replace by...
147 (class stap_static_probe_ops): ...this and...
148 (class stap_probe): ...this. Rename variables to add 'm_'
149 prefix. Do not use 'union' for arguments anymore.
150 (stap_get_expected_argument_type): Receive probe name instead
151 of 'struct stap_probe'. Adjust code.
152 (stap_parse_probe_arguments): Rename to...
153 (stap_probe::parse_arguments): ...this. Adjust code to
154 reflect change.
155 (stap_get_probe_address): Rename to...
156 (stap_probe::get_relocated_address): ...this. Adjust code
157 to reflect change.
158 (stap_get_probe_argument_count): Rename to...
159 (stap_probe::get_argument_count): ...this. Adjust code
160 to reflect change.
161 (stap_get_arg): Rename to...
162 (stap_probe::get_arg_by_number'): ...this. Adjust code to
163 reflect change.
164 (can_evaluate_probe_arguments): Rename to...
165 (stap_probe::can_evaluate_arguments): ...this. Adjust code
166 to reflect change.
167 (stap_evaluate_probe_argument): Rename to...
168 (stap_probe::evaluate_argument): ...this. Adjust code
169 to reflect change.
170 (stap_compile_to_ax): Rename to...
171 (stap_probe::compile_to_ax): ...this. Adjust code to
172 reflect change.
173 (stap_probe_destroy): Delete.
174 (stap_modify_semaphore): Adjust comment.
175 (stap_set_semaphore): Rename to...
176 (stap_probe::set_semaphore): ...this. Adjust code to reflect
177 change.
178 (stap_clear_semaphore): Rename to...
179 (stap_probe::clear_semaphore): ...this. Adjust code to
180 reflect change.
181 (stap_probe::get_static_ops): New method.
182 (handle_stap_probe): Adjust code to create instance of
183 'stap_probe'.
184 (stap_get_probes): Rename to...
185 (stap_static_probe_ops::get_probes): ...this. Adjust code to
186 reflect change.
187 (stap_probe_is_linespec): Rename to...
188 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
189 reflect change.
190 (stap_type_name): Rename to...
191 (stap_static_probe_ops::type_name): ...this. Adjust code to
192 reflect change.
193 (stap_gen_info_probes_table_header): Rename to...
194 (stap_static_probe_ops::gen_info_probes_table_header):
195 ...this. Adjust code to reflect change.
196 (stap_gen_info_probes_table_values): Rename to...
197 (stap_probe::gen_info_probes_table_values): ...this. Adjust
198 code to reflect change.
199 (struct probe_ops stap_probe_ops): Delete.
200 (info_probes_stap_command): Use 'info_probes_for_spops'
201 instead of 'info_probes_for_ops'.
202 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
203 of 'all_probe_ops'.
204
205 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
206
207 * break-catch-throw.c (fetch_probe_arguments): Use
208 'probe.prob' instead of 'probe.probe'.
209 * breakpoint.c (create_longjmp_master_breakpoint): Call
210 'can_evaluate_arguments' and 'get_relocated_address' methods
211 from probe.
212 (create_exception_master_breakpoint): Likewise.
213 (add_location_to_breakpoint): Use 'sal->prob' instead of
214 'sal->probe'.
215 (bkpt_probe_insert_location): Call 'set_semaphore' method from
216 probe.
217 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
218 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
219 of 'probe_ops'.
220 (probe_key_free): Call 'delete' on probe.
221 (check_exception_resume): Use 'probe.prob' instead of
222 'probe.probe'.
223 * location.c (string_to_event_location_basic): Call
224 'probe_linespec_to_static_ops'.
225 * probe.c (class any_static_probe_ops): New class.
226 (any_static_probe_ops any_static_probe_ops): New variable.
227 (parse_probes_in_pspace): Receive 'static_probe_ops' as
228 argument. Adjust code to reflect change.
229 (parse_probes): Use 'static_probe_ops' instead of
230 'probe_ops'. Adjust code to reflect change.
231 (find_probes_in_objfile): Call methods to get name and
232 provider from probe.
233 (find_probe_by_pc): Use 'result.prob' instead of
234 'result.probe'. Call 'get_relocated_address' method from
235 probe.
236 (collect_probes): Adjust comment and argument list to receive
237 'static_probe_ops' instead of 'probe_ops'. Adjust code to
238 reflect change. Call necessary methods from probe.
239 (compare_probes): Call methods to get name and provider from
240 probes.
241 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
242 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
243 adjust code accordingly.
244 (print_ui_out_not_applicables): Likewise.
245 (info_probes_for_ops): Rename to...
246 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
247 as argument instead of 'probe_ops'. Adjust code. Call
248 necessary methods from probe.
249 (info_probes_command): Use 'info_probes_for_spops'.
250 (enable_probes_command): Pass correct argument to
251 'collect_probes'. Call methods from probe.
252 (disable_probes_command): Likewise.
253 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
254 (get_probe_argument_count): Move to
255 'any_static_probe_ops::get_argument_count'.
256 (can_evaluate_probe_arguments): Move to
257 'any_static_probe_ops::can_evaluate_arguments'.
258 (evaluate_probe_argument): Move to
259 'any_static_probe_ops::evaluate_argument'.
260 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
261 'probe.probe'.
262 (probe_linespec_to_ops): Rename to...
263 (probe_linespec_to_static_ops): ...this. Adjust code.
264 (probe_any_is_linespec): Rename to...
265 (any_static_probe_ops::is_linespec): ...this.
266 (probe_any_get_probes): Rename to...
267 (any_static_probe_ops::get_probes): ...this.
268 (any_static_probe_ops::type_name): New method.
269 (any_static_probe_ops::gen_info_probes_table_header): New
270 method.
271 (compute_probe_arg): Use 'pc_probe.prob' instead of
272 'pc_probe.probe'. Call methods from probe.
273 (compile_probe_arg): Likewise.
274 (std::vector<const probe_ops *> all_probe_ops): Delete.
275 (std::vector<const static_probe_ops *> all_static_probe_ops):
276 New variable.
277 (_initialize_probe): Use 'all_static_probe_ops' instead of
278 'all_probe_ops'.
279 * probe.h (struct info_probe_column) <field_name>: Delete
280 extraneous newline
281 (info_probe_column_s): Delete type and VEC.
282 (struct probe_ops): Delete. Replace with...
283 (class static_probe_ops): ...this and...
284 (clas probe): ...this.
285 (struct bound_probe) <bound_probe>: Delete extraneous
286 newline. Adjust constructor to receive 'probe' instead of
287 'struct probe'.
288 <probe>: Rename to...
289 <prob>: ...this. Delete extraneous newline.
290 <objfile>: Delete extraneous newline.
291 (register_probe_ops): Delete unused prototype.
292 (info_probes_for_ops): Rename to...
293 (info_probes_for_spops): ...this. Adjust comment.
294 (get_probe_address): Move to 'probe::get_address'.
295 (get_probe_argument_count): Move to
296 'probe::get_argument_count'.
297 (can_evaluate_probe_arguments): Move to
298 'probe::can_evaluate_arguments'.
299 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
300 * solib-svr4.c (struct svr4_info): Adjust comment.
301 (struct probe_and_action) <probe>: Rename to...
302 <prob>: ...this.
303 (register_solib_event_probe): Receive 'probe' instead of
304 'struct probe' as argument. Use 'prob' instead of 'probe'
305 when applicable.
306 (solib_event_probe_action): Call 'get_argument_count' method
307 from probe. Adjust comment.
308 (svr4_handle_solib_event): Adjust comment. Call
309 'evaluate_argument' method from probe.
310 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
311 from probe.
312 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
313 'struct probe'. Call 'can_evaluate_arguments' from probe.
314 * symfile.h: Forward declare 'class probe' instead of 'struct
315 probe'.
316 * symtab.h: Likewise.
317 (struct symtab_and_line) <probe>: Rename to...
318 <prob>: ...this.
319 * tracepoint.c (start_tracing): Use 'prob' when applicable.
320 Call probe methods.
321 (stop_tracing): Likewise.
322
323 2017-11-22 Joel Brobecker <brobecker@adacore.com>
324
325 * ravenscar-thread.c (ravenscar_inferior_created): Remove
326 trailing newline at end of string in call to warning.
327
328 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
329
330 * osdata.h: Include vector isntead of vec.h.
331 (osdata_column_s): Remove typedef.
332 (struct osdata_column): Add constructor.
333 <name, value>: Change type to std::string.
334 (DEF_VEC_O (osdata_column_s)): Remove.
335 (osdata_item_s): Remove typedef.
336 (struct osdata_item) <columns>: Change type to std::vector.
337 (DEF_VEC_O (osdata_item_s)): Remove.
338 (struct osdata): Add constructor.
339 <type>: Change type to std::string.
340 <items>: Change type to std::vector.
341 (osdata_p): Remove typedef.
342 (DEF_VEC_P (osdata_p)): Remove.
343 (osdata_parse): Return a unique_ptr.
344 (osdata_free): Remove.
345 (make_cleanup_osdata_free): Remove.
346 (get_osdata): Return a unique_ptr.
347 (get_osdata_column): Return pointer to std::string, take a
348 reference to osdata_item as parameter.
349 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
350 unique_ptr.
351 <property_name>: Change type to std::string.
352 (osdata_start_osdata): Allocate osdata with new and adjust.
353 (osdata_start_item): Adjust.
354 (osdata_start_column): Adjust.
355 (osdata_end_column): Adjust.
356 (clear_parsing_data): Remove.
357 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
358 (osdata_item_clear): Remove.
359 (get_osdata): return a unique_ptr and adjust.
360 (get_osdata_column): Return a pointer to std::string and adjust.
361 (info_osdata): Adjust.
362 * mi/mi-main.c: Include <map>.
363 (free_vector_of_osdata_items): Remove.
364 (list_available_thread_groups): Adjust, use std::map instead of
365 splay tree.
366
367 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
368
369 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
370 case in switch.
371
372 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
373
374 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
375
376 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
377
378 * varobj.h (struct varobj_update_result): Add constructor, add
379 move constructor, disable copy and assign, initialize fields.
380 <newobj>: Change type to std::vector.
381 (varobj_update): Return std::vector.
382 * varobj.c (install_dynamic_child): Change VEC parameters to
383 std::vector and adjust.
384 (update_dynamic_varobj_children): Likewise.
385 (varobj_update): Return std::vector and adjust.
386 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
387
388 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
389
390 * varobj.h (struct varobj) <parent>: Remove const.
391 <children>: Change type to std::vector.
392 (varobj_list_children): Return std::vector const reference.
393 (varobj_restrict_range): Change parameter type to std::vector
394 const reference.
395 * varobj.c (varobj_has_more): Adjust.
396 (varobj_restrict_range): Change parameter type to std::vector
397 const reference and adjust.
398 (install_dynamic_child): Adjust.
399 (update_dynamic_varobj_children): Adjust.
400 (varobj_list_children): Return std::vector const reference and
401 adjust.
402 (varobj_add_child): Adjust.
403 (update_type_if_necessary): Adjust.
404 (varobj_update): Adjust.
405 (delete_variable_1): Adjust.
406 * ada-varobj.c (ada_value_has_mutated): Adjust.
407 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
408
409 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
410
411 * varobj.h (struct varobj): Add constructor and destructor,
412 initialize fields.
413 * varobj.c (struct varobj_root): Initialize fields.
414 (struct varobj_dynamic): Initialize fields.
415 (varobj_create): Use unique_ptr instead of cleanup. Create
416 varobj with new instead of new_root_variable.
417 (delete_variable_1): Free variable with delete instead of
418 free_variable.
419 (create_child_with_value): Create variable with new instead of
420 new_variable.
421 (varobj::varobj): New.
422 (varobj::~varobj): New (body mostly coming from free_variable).
423 (new_variable): Remove.
424 (free_variable): Remove.
425 (do_free_variable_cleanup): Remove.
426 (make_cleanup_free_variable): Remove.
427
428 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
429
430 * core-regset.c: Remove file.
431 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
432
433 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
434
435 * NEWS: Document use of GNU MPFR.
436 * README: Likewise.
437
438 * Makefile.in (LIBMPFR): Add define.
439 (CLIBS): Add $(LIBMPFR).
440 * configure.ac: Add --with-mpfr configure option.
441 * configure: Regenerate.
442 * config.in: Regenerate.
443
444 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
445 (class mpfr_float_ops): New type.
446 (mpfr_float_ops::from_target): Two new overloaded functions.
447 (mpfr_float_ops::to_target): Likewise.
448 (mpfr_float_ops::to_string): New function.
449 (mpfr_float_ops::from_string): Likewise.
450 (mpfr_float_ops::to_longest): Likewise.
451 (mpfr_float_ops::from_longest): Likewise.
452 (mpfr_float_ops::from_ulongest): Likewise.
453 (mpfr_float_ops::to_host_double): Likewise.
454 (mpfr_float_ops::from_host_double): Likewise.
455 (mpfr_float_ops::convert): Likewise.
456 (mpfr_float_ops::binop): Likewise.
457 (mpfr_float_ops::compare): Likewise.
458 (get_target_float_ops): Use mpfr_float_ops if available.
459
460 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
461
462 * target-float.c: Do not include <math.h>.
463 Include <cmath> and <limits>.
464 (DOUBLEST): Do not define.
465 (class target_float_ops): New type.
466 (class host_float_ops): New templated type.
467 (class decimal_float_ops): New type.
468
469 (floatformat_to_doublest): Rename to ...
470 (host_float_ops<T>::from_target): ... this. Use template type T
471 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
472 (host_float_ops<T>::from_target): New overload using a type argument.
473 (floatformat_from_doublest): Rename to ...
474 (host_float_ops<T>::to_target): ... this. Use template type T
475 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
476 (host_float_ops<T>::to_target): New overload using a type argument.
477 (floatformat_printf_format): New function.
478 (struct printf_length_modifier): New templated type.
479 (floatformat_to_string): Rename to ...
480 (host_float_ops<T>::to_string): ... this. Use type instead of
481 floatformat argument. Use floatformat_printf_format and
482 printf_length_modifier. Remove special handling of invalid numbers,
483 infinities and NaN (moved to target_float_to_string).
484 (struct scanf_length_modifier): New templated type.
485 (floatformat_from_string): Rename to ...
486 (host_float_ops<T>::from_string): ... this. Use type instead of
487 floatformat argument. Use scanf_length_modifier.
488 (floatformat_to_longest): Rename to ...
489 (host_float_ops<T>::to_longest): ... this. Use type instead of
490 floatformat argument. Handle out-of-range values deterministically.
491 (floatformat_from_longest): Rename to ...
492 (host_float_ops<T>::from_longest): ... this. Use type instead of
493 floatformat argument.
494 (floatformat_from_ulongest): Rename to ...
495 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
496 floatformat argument.
497 (floatformat_to_host_double): Rename to ...
498 (host_float_ops<T>::to_host_double): ... this. Use type instead of
499 floatformat argument.
500 (floatformat_from_host_double): Rename to ...
501 (host_float_ops<T>::from_host_double): ... this. Use type instead of
502 floatformat argument.
503 (floatformat_convert): Rename to ...
504 (host_float_ops<T>::convert): ... this. Use type instead of
505 floatformat arguments. Remove handling of no-op conversions.
506 (floatformat_binop): Rename to ...
507 (host_float_ops<T>::binop): ... this. Use type instead of
508 floatformat arguments.
509 (floatformat_compare): Rename to ...
510 (host_float_ops<T>::compare): ... this. Use type instead of
511 floatformat arguments.
512
513 (match_endianness): Use type instead of length/byte_order arguments.
514 (set_decnumber_context): Likewise.
515 (decimal_from_number): Likewise. Update calls.
516 (decimal_to_number): Likewise.
517 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
518 (decimal_float_ops::to_host_double): New dummy function.
519 (decimal_float_ops::from_host_double): Likewise.
520 (decimal_to_string): Rename to ...
521 (decimal_float_ops::to_string): ... this. Use type instead of
522 length/byte_order arguments. Update calls.
523 (decimal_from_string): Rename to ...
524 (decimal_float_ops::from_string): ... this. Use type instead of
525 length/byte_order arguments. Update calls.
526 (decimal_from_longest): Rename to ...
527 (decimal_float_ops::from_longest): ... this. Use type instead of
528 length/byte_order arguments. Update calls.
529 (decimal_from_ulongest): Rename to ...
530 (decimal_float_ops::from_ulongest): ... this. Use type instead of
531 length/byte_order arguments. Update calls.
532 (decimal_to_longest): Rename to ...
533 (decimal_float_ops::to_longest): ... this. Use type instead of
534 length/byte_order arguments. Update calls.
535 (decimal_binop): Rename to ...
536 (decimal_float_ops::binop): ... this. Use type instead of
537 length/byte_order arguments. Update calls.
538 (decimal_compare): Rename to ...
539 (decimal_float_ops::compare): ... this. Use type instead of
540 length/byte_order arguments. Update calls.
541 (decimal_convert): Rename to ...
542 (decimal_float_ops::convert): ... this. Use type instead of
543 length/byte_order arguments. Update calls.
544
545 (target_float_same_category_p): New function.
546 (target_float_same_format_p): Likewise.
547 (target_float_format_length): Likewise.
548 (enum target_float_ops_kind): New type.
549 (get_target_float_ops_kind): New function.
550 (get_target_float_ops): Three new overloaded functions.
551
552 (target_float_is_zero): Update call.
553 (target_float_to_string): Add special handling of invalid numbers,
554 infinities and NaN (moved from floatformat_to_string). Use
555 target_float_ops callback.
556 (target_float_from_string): Use target_float_ops callback.
557 (target_float_to_longest): Likewise.
558 (target_float_from_longest): Likewise.
559 (target_float_from_ulongest): Likewise.
560 (target_float_to_host_double): Likewise.
561 (target_float_from_host_double): Likewise.
562 (target_float_convert): Add special case for no-op conversions.
563 Use target_float_ops callback.
564 (target_float_binop): Use target_float_ops callback.
565 (target_float_compare): Likewise.
566
567 2017-11-22 Yao Qi <yao.qi@linaro.org>
568
569 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
570
571 2017-11-22 Yao Qi <yao.qi@linaro.org>
572
573 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
574 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
575
576 2017-11-21 Jerome Guitton <guitton@adacore.com>
577
578 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
579 with event ptid from the lower layer before doing the
580 ravenscar-specific update.
581
582 2017-11-21 Joel Brobecker <brobecker@adacore.com>
583
584 * ravenscar-thread.c (is_ravenscar_task): Also verify that
585 the ptid's TID is nonzero.
586
587 2017-11-21 Joel Brobecker <brobecker@adacore.com>
588
589 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
590 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
591 Make non-static. Change return type to char *. Adjust code
592 accordingly. Rewrite the function's documentation.
593 (read_atcb): Adjust call to get_tcb_types_info accordingly.
594 * ravenscar-thread.c (ravenscar_inferior_created): Check that
595 we have enough debugging information in the runtime to support
596 Ada task debugging before we enable the ravenscar-thread layer.
597
598 2017-11-21 Joel Brobecker <brobecker@adacore.com>
599
600 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
601 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
602 * ravenscar-thread.c: Add into comment.
603 (base_magic_null_ptid): Delete.
604 (base_ptid): Change documentation.
605 (ravenscar_active_task): Renames ravenscar_running_thread.
606 All callers updated throughout.
607 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
608 (ravenscar_task_is_currently_active): Likewise.
609 (get_base_thread_from_ravenscar_task): Ditto.
610 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
611 (ravenscar_runtime_initialized): Likewise.
612 (get_running_thread_id): Add new parameter "cpu". Adjust
613 implementation to handle this new parameter.
614 (ravenscar_fetch_registers): Small adjustment to use
615 is_ravenscar_task and ravenscar_task_is_currently_active in
616 order to decide whether to use the target beneath or this
617 module's arch_ops.
618 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
619 (ravenscar_stopped_by_sw_breakpoint): Use
620 get_base_thread_from_ravenscar_task to get the underlying
621 thread, rather than using base_ptid.
622 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
623 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
624 Likewise.
625 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
626
627 2017-11-21 Joel Brobecker <brobecker@adacore.com>
628
629 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
630 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
631 (get_tcb_types_info): Set fieldnos.base_cpu.
632 (read_atcb): Set task_info->base_cpu.
633 (info_task): Print "Base CPU" info if set by runtime.
634
635 2017-11-21 Joel Brobecker <brobecker@adacore.com>
636
637 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
638 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
639 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
640 New functions.
641 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
642 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
643 to_stopped_data_address and to_core_of_thread fields of
644 ravenscar_ops.
645
646 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
647
648 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
649 (struct gdbarch_tdep): New member long_double_abi.
650 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
651 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
652 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
653 format depending on long_double_abi tdep member.
654 (ppc_floatformat_for_type): Handle __ibm128 type.
655
656 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
657
658 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
659
660 2017-11-21 Pedro Alves <palves@redhat.com>
661
662 * dwarf2read.c (mapped_index::find_name_components_bounds)
663 <completion mode, upper bound>: Use std::lower_bound instead of
664 std::upper_bound.
665 (test_mapped_index_find_name_component_bounds): Remove incorrect
666 "t1_fund" from expected symbols.
667
668 2017-11-21 Pedro Alves <palves@redhat.com>
669
670 * dwarf2read.c (mapped_index::name_components_casing): New field.
671 (mapped_index) <build_name_components,
672 find_name_components_bounds): Declare new methods.
673 (mapped_index::find_name_components_bounds)
674 (mapped_index::build_name_components): New methods, factored out
675 from dw2_expand_symtabs_matching_symbol.
676 (check_find_bounds_finds)
677 (test_mapped_index_find_name_component_bounds): New.
678 (run_test): Rename to ...
679 (test_dw2_expand_symtabs_matching_symbol): ... this.
680 (run_test): Reimplement.
681
682 2017-11-21 Pedro Alves <palves@redhat.com>
683
684 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
685 (symbol_end): Use cp_ident_is_alnum.
686 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
687 * dwarf2read.c (make_sort_after_prefix_name): New function.
688 (dw2_expand_symtabs_matching_symbol): Use it.
689 (test_symbols): Add more symbols.
690 (run_test): Add tests.
691
692 2017-11-17 Tom Tromey <tom@tromey.com>
693
694 * symtab.h (enum symbol_subclass_kind): New.
695 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
696 Remove.
697 <subclass>: New member.
698 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
699 * rust-lang.c (rust_get_trait_object_pointer): Update.
700 * dwarf2read.c (read_func_scope): Update.
701 (read_variable): Update.
702
703 2017-11-17 Tom Tromey <tom@tromey.com>
704
705 * dwarf2read.c (read_func_scope): Update.
706 * symtab.h (struct template_symbol): Derive from symbol.
707 <base>: Remove.
708
709 2017-11-17 Tom Tromey <tom@tromey.com>
710
711 * symtab.h (struct symbol) <is_rust_vtable>: New member.
712 (struct rust_vtable_symbol): New.
713 (find_symbol_at_address): Declare.
714 * symtab.c (find_symbol_at_address): New function.
715 * symfile.h (struct quick_symbol_functions)
716 <find_compunit_symtab_by_address>: New member.
717 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
718 function.
719 (debug_sym_quick_functions): Link to
720 debug_qf_find_compunit_symtab_by_address.
721 * rust-lang.c (rust_get_trait_object_pointer): New function.
722 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
723 rust_get_trait_object_pointer.
724 * psymtab.c (psym_relocate): Clear psymbol_map.
725 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
726 functions.
727 (psym_functions): Link to psym_find_compunit_symtab_by_address.
728 * objfiles.h (struct objfile) <psymbol_map>: New member.
729 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
730 (process_die) <DW_TAG_variable>: New case. Call read_variable.
731 (rust_containing_type, read_variable): New functions.
732
733 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
734
735 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
736
737 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
738
739 * common/filestuff.c: Include <algorithm>.
740 (open_fds): Change type to std::vector<int>.
741 (do_mark_open_fd): Adjust.
742 (unmark_fd_no_cloexec): Adjust.
743 (do_close): Adjust.
744
745 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
746
747 * breakpoint.c (output_thread_groups): Take an std::vector.
748 (print_one_breakpoint_location): Adjust.
749
750 2017-11-17 Joel Brobecker <brobecker@adacore.com>
751
752 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
753 (ada_evaluate_subexp_for_cast): New function.
754 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
755 ada_evaluate_subexp_for_cast.
756 (ada_evaluate_subexp) <nosideret>: Replace code by call to
757 eval_skip_value.
758 * eval.c (evaluate_var_value): Make non-static.
759 (evaluate_var_msym_value, eval_skip_value): Likewise.
760 * value.h (evaluate_var_value, evaluate_var_msym_value)
761 (eval_skip_value): Declare.
762
763 2017-11-16 Joel Brobecker <brobecker@adacore.com>
764
765 * ada-lang.c (ada_value_cast): Remove parameter "noside".
766 Update all callers.
767
768 2017-11-16 Pedro Alves <palves@redhat.com>
769
770 * python/py-unwind.c (pyuw_sniffer): Translate
771 PyExc_KeyboardInterrupt to a GDB Quit exception.
772
773 2017-11-16 Pedro Alves <palves@redhat.com>
774
775 * infrun.c (resume_cleanups): Delete.
776 (resume): No longer install a resume_cleanups cleanup nor call
777 QUIT.
778 (proceed): Pass the terminal to the inferior.
779 (keep_going_pass_signal): No longer install a resume_cleanups
780 cleanup.
781
782 2017-11-16 Pedro Alves <palves@redhat.com>
783
784 * inf-loop.c (inferior_event_handler): Don't swallow the exception
785 if the prompt is blocked.
786
787 2017-11-16 Pedro Alves <palves@redhat.com>
788
789 * breakpoint.c (insert_bp_location): Replace bp_err and
790 bp_err_message locals by a gdb_exception local.
791
792 2017-11-16 Pedro Alves <palves@redhat.com>
793
794 * inflow.c (scoped_ignore_sigttou): New class.
795 (child_terminal_ours_1, new_tty): Use it.
796
797 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
798
799 * target-float.c (decimal_from_number): Add byte_order argument and
800 call match_endianness. Error if unknown floating-point type.
801 (decimal_to_number): Add byte_order argument and call match_endianness.
802 (decimal_from_longest): Update call. Do not call match_endianness.
803 (decimal_from_ulongest): Likewise.
804 (decimal_binop): Likewise.
805 (decimal_is_zero): Likewise.
806 (decimal_compare): Likewise.
807 (decimal_convert): Likewise.
808
809 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
810
811 * python/python.c (gdbpy_rbreak): New function.
812 * NEWS: Document Python rbreak feature.
813
814 2017-11-16 Yao Qi <yao.qi@linaro.org>
815
816 * features/tic6x-c62x.xml: Remove.
817 * features/tic6x-c64x.xml: Remove.
818 * features/tic6x-c64xp.xml: Remove.
819
820 2017-11-15 John Baldwin <jhb@FreeBSD.org>
821
822 * symtab.h: Include <array>.
823
824 2017-11-15 John Baldwin <jhb@FreeBSD.org>
825
826 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
827 (bsd_kvm_proc_cmd): Likewise.
828
829 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
830
831 * tui/tui-win.c (window_name_completer): Replace VEC with
832 std::vector.
833
834 2017-11-15 Andrew Cagney <cagney@gnu.org>
835
836 * MAINTAINERS: Remove no-longer applicable entries.
837
838 2017-11-15 Andrew Cagney <cagney@gnu.org>
839
840 * MAINTAINERS: Move self to Past Maintainers.
841
842 2017-11-15 Yao Qi <yao.qi@linaro.org>
843
844 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
845 * features/nios2-linux.c: Remove.
846 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
847 initialize_tdesc_nios2_linux.
848
849 2017-11-15 Yao Qi <yao.qi@linaro.org>
850
851 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
852 M68HC11_LAST_HARD_REG + 1.
853
854 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
855
856 PR gdb/22388
857 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
858 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
859 Return TARGET_XFER_EOF if size of returned data is 0.
860
861 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
862
863 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
864 memory-map-selftests.c.
865 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
866 * memory-map.c (memory_map_start_memory): Fix computation of hi
867 address.
868 * unittests/memory-map-selftests.c: New file.
869
870 2017-11-09 Joel Brobecker <brobecker@adacore.com>
871
872 * ada-lang.c: Fix some typos in the general command documenting
873 how Ada expressions are being evaluated and how their result
874 is printed.
875
876 2017-11-09 Tom Tromey <tom@tromey.com>
877
878 * psymtab.c (psymbol_hash): Do not hash string contents.
879 (psymbol_compare): Add comment.
880
881 2017-11-09 Tom Tromey <tom@tromey.com>
882
883 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
884
885 2017-11-08 Joel Brobecker <brobecker@adacore.com>
886
887 * ada-exp.y (write_var_from_sym): Remove parameter
888 "orig_left_context". Update all callers.
889
890 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
891
892 * tracepoint.h (class collection_list) <stringify>: Return
893 std::vector<std::string>.
894 (encode_actions_rsp): Change parameters to
895 std::vector<std::string> *.
896 * tracepoint.c (collection_list::stringify): Return
897 std::vector<std::string> and adjust accordingly.
898 (encode_actions_rsp): Changee parameters to
899 std::vector<std::string> and adjust accordingly.
900 * remote.c (free_actions_list),
901 free_actions_list_cleanup_wrapper): Remove.
902 (remote_download_tracepoint): Adjust to std::vector.
903
904 2017-11-08 Tom Tromey <tom@tromey.com>
905
906 * dwarf2read.c (symbolp): Remove typedef.
907 (read_func_scope): Use std::vector.
908 (process_structure_scope): Use std::vector.
909
910 2017-11-08 Pedro Alves <palves@redhat.com>
911
912 * ada-lang.c (ada_make_symbol_completion_list): Use
913 completion_skip_symbol.
914 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
915 (symbol_is_function_or_method(symbol*)): New.
916 (add_symtab_completions): Add complete_symbol_mode parameter. Use
917 completion_skip_symbol.
918 (default_collect_symbol_completion_matches_break_on): Use
919 completion_skip_symbol. Pass down mode.
920 (collect_file_symbol_completion_matches): Pass down mode.
921 * symtab.h (symbol_is_function_or_method): New declarations.
922 (completion_skip_symbol): New template function.
923
924 2017-11-08 Pedro Alves <palves@redhat.com>
925
926 * linespec.c (iterate_over_all_matching_symtabs): Add
927 search_domain parameter. Pass it down to expand_symtabs_matching.
928 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
929 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
930 search_domain.
931 (add_all_symbol_names_from_pspace): Add search_domain parameter.
932 Pass it down.
933 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
934 symbols.
935 (add_matching_symbols_to_info): Add search_domain parameter. Pass
936 it down.
937
938 2017-11-08 Pedro Alves <palves@redhat.com>
939
940 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
941 text_len locals and don't pass them down.
942 * symtab.c (completion_list_add_name): Remove
943 sym_text/sym_text_len parameters and adjust.
944 (completion_list_add_symbol, completion_list_add_msymbol)
945 (completion_list_objc_symbol, completion_list_add_fields)
946 (add_symtab_completions): Likewise.
947 (default_collect_symbol_completion_matches_break_on)
948 (collect_file_symbol_completion_matches): Remove sym_text_len
949 local and don't pass it down.
950 * symtab.h (completion_list_add_name): Remove
951 sym_text/sym_text_len parameters.
952
953 2017-11-08 Pedro Alves <palves@redhat.com>
954
955 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
956 unittests/lookup_name_info-selftests.c.
957 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
958 * cp-support.c: Include "selftest.h".
959 (cp_remove_params_1): Rename from cp_remove_params. Add
960 'require_param' parameter, and handle it.
961 (cp_remove_params): Reimplement.
962 (cp_remove_params_if_any): New.
963 (selftests::quote): New.
964 (selftests::check_remove_params): New.
965 (selftests::test_cp_remove_params): New.
966 (_initialize_cp_support): Install
967 selftests::test_cp_remove_params.
968 * cp-support.h (cp_remove_params_if_any): Declare.
969 * dwarf2read.c :Include "selftest.h".
970 (dw2_expand_symtabs_matching_symbol): Use
971 lookup_name_info::make_ignore_params.
972 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
973 (selftests::dw2_expand_symtabs_matching::string_or_null)
974 (selftests::dw2_expand_symtabs_matching::check_match)
975 (selftests::dw2_expand_symtabs_matching::test_symbols)
976 (selftests::dw2_expand_symtabs_matching::run_test): New.
977 (_initialize_dwarf2_read): Register
978 selftests::dw2_expand_symtabs_matching::run_test.
979 * psymtab.c (psym_expand_symtabs_matching): Use
980 lookup_name_info::make_ignore_params.
981 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
982 If the lookup name wants to ignore parameters, strip them.
983 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
984 code handling '('.
985 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
986 (default_collect_symbol_completion_matches_break_on): Don't try to
987 strip parameters.
988 * symtab.h (lookup_name_info::lookup_name_info): Add
989 'ignore_parameters' parameter.
990 (lookup_name_info::ignore_parameters)
991 (lookup_name_info::make_ignore_params): New methods.
992 (lookup_name_info::m_ignore_parameters): New field.
993 * unittests/lookup_name_info-selftests.c: New file.
994
995 2017-11-08 Pedro Alves <palves@redhat.com>
996
997 * dwarf2read.c (dw2_expand_marked_cus)
998 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
999 (dw2_expand_symtabs_matching): Move further below.
1000 (dw2_expand_marked_cus): Reindent.
1001
1002 2017-11-08 Pedro Alves <palves@redhat.com>
1003
1004 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1005 (struct name_component): New.
1006 (mapped_index::name_components): New field.
1007 (mapped_index::symbol_name_at): New method.
1008 (dwarf2_read_index): Call mapped_index ctor.
1009 (dw2_map_matching_symbols): Add comment about name_components
1010 table.
1011 (dw2_expand_symtabs_matching): Factor part to...
1012 (dw2_expand_symtabs_matching_symbol): ... this new function.
1013 Build name components table, and lookup symbols in it before
1014 calling the name matcher.
1015 (dw2_expand_marked_cus): New, factored out from
1016 dw2_expand_symtabs_matching.
1017 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1018
1019 2017-11-08 Pedro Alves <palves@redhat.com>
1020
1021 * ada-lang.c (ada_encode): Rename to ..
1022 (ada_encode_1): ... this. Add throw_errors parameter and handle
1023 it.
1024 (ada_encode): Reimplement.
1025 (match_name): Delete, folded into full_name.
1026 (resolve_subexp): No longer pass the encoded name to
1027 ada_lookup_symbol_list.
1028 (should_use_wild_match): Delete.
1029 (name_match_type_from_name): New.
1030 (ada_lookup_simple_minsym): Use lookup_name_info and the
1031 language's symbol_name_matcher_ftype.
1032 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1033 (ada_add_block_renamings): Adjust to use lookup_name_info.
1034 (ada_lookup_name): New.
1035 (add_nonlocal_symbols, ada_add_all_symbols)
1036 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1037 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1038 (ada_name_for_lookup): Delete.
1039 (ada_lookup_encoded_symbol): Construct a verbatim name.
1040 (wild_match): Reverse sense of return type. Use bool.
1041 (full_match): Reverse sense of return type. Inline bits of old
1042 match_name here.
1043 (ada_add_block_symbols): Adjust to use lookup_name_info.
1044 (symbol_completion_match): Delete, folded into...
1045 (ada_lookup_name_info::matches): ... .this new method.
1046 (symbol_completion_add): Delete.
1047 (ada_collect_symbol_completion_matches): Add name_match_type
1048 parameter. Adjust to use lookup_name_info and
1049 completion_list_add_name.
1050 (get_var_value, ada_add_global_exceptions): Adjust to use
1051 lookup_name_info.
1052 (ada_get_symbol_name_cmp): Delete.
1053 (do_wild_match, do_full_match): New functions.
1054 (ada_lookup_name_info::ada_lookup_name_info): New method.
1055 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1056 functions.
1057 (ada_language_defn): Install ada_get_symbol_name_matcher.
1058 * ada-lex.l (processId): If name starts with '<', copy it
1059 verbatim.
1060 * block.c (block_iter_match_step, block_iter_match_first)
1061 (block_iter_match_next, block_lookup_symbol)
1062 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1063 lookup_name_info.
1064 * block.h (block_iter_match_first, block_iter_match_next)
1065 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1066 * c-lang.c (c_language_defn, cplus_language_defn)
1067 (asm_language_defn, minimal_language_defn): Adjust comments to
1068 refer to la_get_symbol_name_matcher.
1069 * completer.c (complete_files_symbols)
1070 (collect_explicit_location_matches, symbol_completer): Pass a
1071 symbol_name_match_type down.
1072 * completer.h (class completion_match, completion_match_result):
1073 New classes.
1074 (completion_tracker::reset_completion_match_result): New method.
1075 (completion_tracker::m_completion_match_result): New field.
1076 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1077 lookup_name_info.
1078 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1079 functions.
1080 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1081 * d-lang.c: Adjust comments to refer to
1082 la_get_symbol_name_matcher.
1083 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1084 Adjust to use lookup_name_info.
1085 (dict_iter_match_first, dict_iter_match_next)
1086 (iter_match_first_hashed, iter_match_next_hashed)
1087 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1088 with a lookup_name_info.
1089 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1090 Likewise.
1091 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1092 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1093 (gdb_index_symbol_name_matcher): New class.
1094 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1095 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1096 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1097 with a symbol_name_match_type.
1098 (f_language_defn): Adjust comments to refer to
1099 la_get_symbol_name_matcher.
1100 * go-lang.c (go_language_defn): Adjust comments to refer to
1101 la_get_symbol_name_matcher.
1102 * language.c (default_symbol_name_matcher)
1103 (language_get_symbol_name_matcher): New functions.
1104 (unknown_language_defn, auto_language_defn): Adjust comments to
1105 refer to la_get_symbol_name_matcher.
1106 * language.h (symbol_name_cmp_ftype): Delete.
1107 (language_defn) <la_collect_symbol_completion_matches>: Add match
1108 type parameter.
1109 <la_get_symbol_name_cmp>: Delete field.
1110 <la_get_symbol_name_matcher>: New field.
1111 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1112 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1113 Declare.
1114 * linespec.c (iterate_over_all_matching_symtabs)
1115 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1116 (find_methods): Add language parameter, and use lookup_name_info
1117 and the language's symbol_name_matcher_ftype.
1118 (linespec_complete_function): Adjust.
1119 (lookup_prefix_sym): Use lookup_name_info.
1120 (add_all_symbol_names_from_pspace): Adjust.
1121 (find_superclass_methods): Add language parameter and pass it
1122 down.
1123 (find_method): Pass symbol language down.
1124 (find_linespec_symbols): Don't demangle or Ada encode here.
1125 (search_minsyms_for_name): Add lookup_name_info parameter.
1126 (add_matching_symbols_to_info): Add name_match_type parameter.
1127 Use lookup_name_info.
1128 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1129 la_get_symbol_name_matcher.
1130 * minsyms.c: Include <algorithm>.
1131 (add_minsym_to_demangled_hash_table): Remove table parameter and
1132 add objfile parameter. Use search_name_hash, and add language to
1133 demangled languages vector.
1134 (struct found_minimal_symbols): New struct.
1135 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1136 New functions.
1137 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1138 input names here. Use lookup_name_info instead. Lookup up
1139 demangled names once for each language in the demangled names
1140 vector.
1141 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1142 demangled names once for each language in the demangled names
1143 vector.
1144 (build_minimal_symbol_hash_tables): Adjust.
1145 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1146 lookup_name_info.
1147 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1148 la_get_symbol_name_matcher.
1149 * objfiles.h: Include <vector>.
1150 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1151 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1152 la_get_symbol_name_matcher.
1153 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1154 la_get_symbol_name_matcher.
1155 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1156 (match_partial_symbol): Use symbol_name_match_type,
1157 lookup_name_info and psymbol_name_matches.
1158 (lookup_partial_symbol): Use lookup_name_info.
1159 (map_block): Use symbol_name_match_type and lookup_name_info.
1160 (psym_map_matching_symbols): Use symbol_name_match_type.
1161 (psymbol_name_matches): New.
1162 (recursively_search_psymtabs): Use lookup_name_info and
1163 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1164 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1165 'kind' parameter to 'domain'.
1166 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1167 la_get_symbol_name_matcher.
1168 * symfile-debug.c (debug_qf_map_matching_symbols)
1169 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1170 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1171 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1172 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1173 Adjust to use symbol_name_match_type.
1174 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1175 (expand_symtabs_matching): Adjust to use lookup_name_info.
1176 * symmisc.c (maintenance_expand_symtabs): Use
1177 lookup_name_info::match_any ().
1178 * symtab.c (symbol_matches_search_name): New.
1179 (eq_symbol_entry): Adjust to use lookup_name_info and the
1180 language's matcher.
1181 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1182 (lookup_name_info::match_any): New.
1183 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1184 (compare_symbol_name): Add language, lookup_name_info and
1185 completion_match_result parameters, and use them.
1186 (completion_list_add_name): Make extern. Add language and
1187 lookup_name_info parameters. Use them.
1188 (completion_list_add_symbol, completion_list_add_msymbol)
1189 (completion_list_objc_symbol): Add lookup_name_info parameters and
1190 adjust. Pass down language.
1191 (completion_list_add_fields): Add lookup_name_info parameters and
1192 adjust. Pass down language.
1193 (add_symtab_completions): Add lookup_name_info parameters and
1194 adjust.
1195 (default_collect_symbol_completion_matches_break_on): Add
1196 name_match_type parameter, and use it. Use lookup_name_info.
1197 (default_collect_symbol_completion_matches)
1198 (collect_symbol_completion_matches): Add name_match_type
1199 parameter, and pass it down.
1200 (collect_symbol_completion_matches_type): Adjust.
1201 (collect_file_symbol_completion_matches): Add name_match_type
1202 parameter, and use lookup_name_info.
1203 * symtab.h: Include <string> and "common/gdb_optional.h".
1204 (enum class symbol_name_match_type): New.
1205 (class ada_lookup_name_info): New.
1206 (struct demangle_for_lookup_info): New.
1207 (class lookup_name_info): New.
1208 (symbol_name_matcher_ftype): New.
1209 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1210 (symbol_matches_search_name): Declare.
1211 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1212 (default_collect_symbol_completion_matches)
1213 (collect_symbol_completion_matches)
1214 (collect_file_symbol_completion_matches): Add name_match_type
1215 parameter.
1216 (iterate_over_symbols): Use lookup_name_info.
1217 (completion_list_add_name): Declare.
1218 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1219 (strncmp_iw_with_mode): Now extern.
1220 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1221 (strncmp_iw_with_mode): Declare.
1222
1223 2017-11-08 Keith Seitz <keiths@redhat.com>
1224 Pedro Alves <palves@redhat.com>
1225
1226 * ada-lang.c (ada_language_defn): Install
1227 default_search_name_hash.
1228 * buildsym.c (struct buildsym_compunit): <language>: New field.
1229 (finish_block_internal): Pass language when creating dictionaries.
1230 (start_buildsym_compunit, start_symtab): New language parameters.
1231 Use them.
1232 (restart_symtab): Pass down compilation unit's language.
1233 * buildsym.h (enum language): Forward declare.
1234 (start_symtab): New 'language' parameter.
1235 * c-lang.c (c_language_defn, cplus_language_defn)
1236 (asm_language_defn, minimal_language_defn): Install
1237 default_search_name_hash.
1238 * coffread.c (coff_start_symtab): Adjust.
1239 * d-lang.c (d_language_defn): Install default_search_name_hash.
1240 * dbxread.c (struct symloc): Add 'pst_language' field.
1241 (PST_LANGUAGE): Define.
1242 (start_psymtab, read_ofile_symtab): Use it.
1243 (process_one_symbol): New 'language' parameter. Pass it down.
1244 * dictionary.c (struct dictionary) <language>: New field.
1245 (DICT_LANGUAGE): Define.
1246 (dict_create_hashed, dict_create_hashed_expandable)
1247 (dict_create_linear, dict_create_linear_expandable): New parameter
1248 'language'. Set the dictionary's language.
1249 (iter_match_first_hashed): Adjust to rename.
1250 (insert_symbol_hashed): Assert we don't see mismatching
1251 languages. Adjust to rename.
1252 (dict_hash): Rename to ...
1253 (default_search_name_hash): ... this and make extern.
1254 * dictionary.h (struct language_defn): Forward declare.
1255 (dict_create_hashed): New parameter 'language'.
1256 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1257 * f-lang.c (f_language_defn): Install default_search_name_hash.
1258 * go-lang.c (go_language_defn): Install default_search_name_hash.
1259 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1260 creation.
1261 * language.c (unknown_language_defn, auto_language_defn):
1262 * language.h (language_defn::la_search_name_hash): New field.
1263 (default_search_name_hash): Declare.
1264 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1265 * mdebugread.c (new_block): New parameter 'language'.
1266 * mdebugread.c (parse_symbol): Pass symbol language to block
1267 allocation.
1268 (psymtab_to_symtab_1): Pass down language.
1269 (new_symtab): Pass compunit's language to block allocation.
1270 * objc-lang.c (objc_language_defn): Install
1271 default_search_name_hash.
1272 * opencl-lang.c (opencl_language_defn):
1273 * p-lang.c (pascal_language_defn): Install
1274 default_search_name_hash.
1275 * rust-lang.c (rust_language_defn): Install
1276 default_search_name_hash.
1277 * stabsread.h (enum language): Forward declare.
1278 (process_one_symbol): Add 'language' parameter.
1279 * symtab.c (search_name_hash): New function.
1280 * symtab.h (search_name_hash): Declare.
1281 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1282
1283 2017-11-08 Pedro Alves <palves@redhat.com>
1284
1285 * cp-name-parser.y (main): Don't initialize extra_chars.
1286
1287 2017-11-07 Tom Tromey <tom@tromey.com>
1288
1289 * event-top.h (command_handler): Constify.
1290 * record-full.c (cmd_record_full_start): Update.
1291 * thread.c (thread_apply_all_command): Update.
1292 * printcmd.c (eval_command): Update.
1293 * mi/mi-main.c (mi_execute_cli_command): Update.
1294 (mi_execute_async_cli_command): Update.
1295 * tui/tui-stack.c (tui_update_command): Update.
1296 * cli/cli-interp.c (safe_execute_command): Constify.
1297 * record.c (record_start): Update.
1298 (record_start, record_stop, cmd_record_start): Update.
1299 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1300 (cmd_record_btrace_pt_start): Update.
1301 (cmd_record_btrace_start): Update.
1302 (cmd_record_btrace_start): Update.
1303 * reverse.c (exec_reverse_once): Update.
1304 * python/python.c (execute_gdb_command): Don't copy the command.
1305 * event-top.c (command_line_handler): Update.
1306 (command_handler): Constify.
1307 * defs.h (deprecated_call_command_hook): Constify.
1308 * cli/cli-script.h (execute_user_command): Constify.
1309 * cli/cli-script.c (execute_user_command): Constify.
1310 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1311 (enum command_control_type): Update.
1312 * main.c (catch_command_errors): Remove non-const overload.
1313 (catch_command_errors_ftype): Remove.
1314 * python/py-cmd.c (cmdpy_function): Constify.
1315 * guile/scm-cmd.c (cmdscm_function): Constify.
1316 * cli/cli-dump.c (call_dump_func): Constify.
1317 * cli/cli-decode.c (do_const_cfunc): Constify.
1318 (do_sfunc): Constify.
1319 (cmd_func): Constify.
1320 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1321 * top.h (execute_command): Constify.
1322 * top.c (execute_command): Constify.
1323 (execute_command_to_string): Constify.
1324 (deprecated_call_command_hook): Constify.
1325 * command.h (cmd_func): Constify.
1326 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1327
1328 2017-11-07 Tom Tromey <tom@tromey.com>
1329
1330 * ada-lang.c (catch_ada_exception_command): Constify.
1331 (catch_assert_command): Constify.
1332 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1333 (catch_rethrow_command): Constify.
1334 (catch_exception_command_1): Constify.
1335 * breakpoint.h (add_catch_command): Constify.
1336 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1337 (catch_syscall_split_args): Constify.
1338 * break-catch-sig.c (catch_signal_command): Constify.
1339 (catch_signal_split_args): Constify.
1340 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1341 cmd_const_sfunc_ftype.
1342 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1343 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1344 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1345 (add_setshow_string_cmd, struct cmd_list_element)
1346 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1347 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1348 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1349 Constify.
1350 (set_cmd_sfunc): Constify.
1351 (empty_sfunc): Constify.
1352 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1353 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1354 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1355 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1356 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1357 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1358 Constify.
1359 (set_cmd_sfunc): Constify.
1360 (cmd_sfunc_ftype): Remove.
1361 * compile/compile.c (set_compile_args): Constify.
1362 * infrun.c (set_disable_randomization): Constify.
1363 * infcmd.c (set_args_command, set_cwd_command): Constify.
1364 * breakpoint.c (set_condition_evaluation_mode): Constify.
1365 (add_catch_command): Constify.
1366 (catch_fork_command_1, catch_exec_command_1)
1367 (catch_load_command_1, catch_unload_command_1): Constify.
1368 (catch_load_or_unload): Constify.
1369 * guile/scm-param.c (pascm_set_func): Constify.
1370 (add_setshow_generic): Constify.
1371 * python/py-param.c (get_set_value): Constify.
1372 * top.h (set_verbose): Constify.
1373 * tui/tui-win.c (tui_set_var_cmd): Constify.
1374 * mi/mi-main.c (set_mi_async_command): Constify.
1375 * cli/cli-logging.c (set_logging_overwrite)
1376 (set_logging_redirect): Constify.
1377 * value.c (set_max_value_size): Constify.
1378 * valprint.c (set_input_radix, set_output_radix): Constify.
1379 * utils.c (set_width_command, set_height_command): Constify.
1380 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1381 * tracepoint.c (set_disconnected_tracing)
1382 (set_circular_trace_buffer, set_trace_buffer_size)
1383 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1384 * top.c (set_history_size_command, set_verbose, set_editing)
1385 (set_gdb_datadir, set_history_filename): Constify.
1386 * target.c (set_targetdebug, maint_set_target_async_command)
1387 (maint_set_target_non_stop_command, set_target_permissions)
1388 (set_write_memory_permission): Constify.
1389 (open_target): Constify.
1390 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1391 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1392 * symtab.c (set_symbol_cache_size_handler): Constify.
1393 * symfile.c (set_ext_lang_command): Constify.
1394 * symfile-debug.c (set_debug_symfile): Constify.
1395 * source.c (set_directories_command): Constify.
1396 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1397 * serial.c (set_parity): Constify.
1398 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1399 * remote.c (set_remote_exec_file, set_remotebreak)
1400 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1401 * record.c (set_record_insn_history_size)
1402 (set_record_call_history_size): Constify.
1403 * record-full.c (set_record_full_insn_max_num): Constify.
1404 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1405 * osabi.c (set_osabi): Constify.
1406 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1407 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1408 * maint.c (maintenance_set_profile_cmd): Constify.
1409 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1410 * language.c (set_language_command, set_range_command)
1411 (set_case_command): Constify.
1412 * infrun.c (set_non_stop, set_observer_mode)
1413 (set_stop_on_solib_events, set_schedlock_func)
1414 (set_exec_direction_func): Constify.
1415 * infcmd.c (set_inferior_tty_command): Constify.
1416 * disasm.c (set_disassembler_options_sfunc): Constify.
1417 * demangle.c (set_demangling_command): Constify.
1418 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1419 * cris-tdep.c (set_cris_version, set_cris_mode)
1420 (set_cris_dwarf2_cfi): Constify.
1421 * corefile.c (set_gnutarget_command): Constify.
1422 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1423 (set_target_wide_charset_sfunc): Constify.
1424 * breakpoint.c (update_dprintf_commands): Constify.
1425 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1426 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1427 (set_disassembly_style_sfunc): Constify.
1428 * arch-utils.c (set_endian, set_architecture): Constify.
1429 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1430 * agent.c (set_can_use_agent): Constify.
1431
1432 2017-11-07 Tom Tromey <tom@tromey.com>
1433
1434 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1435 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1436 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1437 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1438 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1439 (parse_int_arg, show_thread_default_detach_sc_cmd)
1440 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1441 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1442 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1443 (show_task_pause_cmd, set_task_detach_sc_cmd)
1444 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1445 (set_noninvasive_cmd, set_thread_pause_cmd)
1446 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1447 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1448 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1449 * windows-nat.c (display_selectors): Constify.
1450 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1451 non-const "cfunc".
1452 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1453 (cmd_cfunc_eq): Likewise.
1454 (struct cmd_list_element): Likewise.
1455 (do_cfunc): Remove.
1456 (cli_user_command_p): Update.
1457 * command.h (add_cmd): Remove non-const overload.
1458 (cmd_cfunc_ftype): Remove typedef.
1459 (cmd_cfunc_eq): Remove non-const overload.
1460 * value.c (show_values): Constify.
1461 * thread.c (thread_apply_all_command): Constify.
1462 * symfile.c (load_command): Constify.
1463 * source.c (directory_command): Constify.
1464 * maint.c (maintenance_internal_error)
1465 (maintenance_demangler_warning, maintenance_space_display)
1466 (maintenance_print_architecture, maintenance_translate_address)
1467 (maintenance_info_selftests, maintenance_internal_warning):
1468 Constify.
1469 * breakpoint.c (disable_trace_command, enable_trace_command):
1470 Constify.
1471 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1472 Constify.
1473 (add_auto_load_safe_path): Constify.
1474 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1475 * top.h (show_commands): Constify.
1476 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1477 * sparc64-tdep.c (adi_examine_command): Constify.
1478 (adi_assign_command): Constify.
1479
1480 2017-11-07 Tom Tromey <tom@tromey.com>
1481
1482 * frame.h (info_locals_command, info_args_command): Constify.
1483 * auto-load.h (auto_load_info_scripts): Constify.
1484 * inferior.h (registers_info): Constify.
1485 * copying.c: Rebuild.
1486 * copying.awk: Constify generated commands.
1487 * auto-load.c (auto_load_info_scripts)
1488 (info_auto_load_gdb_scripts): Constify.
1489 * cli/cli-decode.c (struct cmd_list_element): Take a
1490 cmd_const_cfunc_ftype.
1491 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1492 * tui/tui-win.c (tui_all_windows_info): Constify.
1493 * python/py-auto-load.c (info_auto_load_python_scripts):
1494 Constify.
1495 * cli/cli-cmds.c (show_command): Remove non-const overload.
1496 * tracepoint.c (info_tvariables_command, info_scope_command):
1497 Constify.
1498 (info_static_tracepoint_markers_command): Constify.
1499 * thread.c (info_threads_command): Constify.
1500 (print_thread_info_1): Constify.
1501 * target.c (info_target_command): Constify.
1502 * symtab.c (info_sources_command, info_functions_command)
1503 (info_types_command): Constify.
1504 (info_variables_command): Remove non-const overload.
1505 * symfile.c (info_ext_lang_command): Constify.
1506 * stack.c (info_frame_command, info_locals_command)
1507 (info_args_command): Constify.
1508 (backtrace_command): Remove non-const overload.
1509 * source.c (info_source_command, info_line_command): Constify.
1510 * solib.c (info_sharedlibrary_command): Constify.
1511 * skip.c (info_skip_command): Constify.
1512 * ser-go32.c (info_serial_command): Constify.
1513 * reverse.c (info_bookmarks_command): Constify.
1514 * printcmd.c (info_symbol_command, info_address_command)
1515 (info_display_command): Constify.
1516 * osdata.c (info_osdata_command): Constify.
1517 * objc-lang.c (info_selectors_command, info_classes_command):
1518 Constify.
1519 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1520 * memattr.c (info_mem_command): Constify.
1521 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1522 * linux-fork.c (info_checkpoints_command): Constify.
1523 * infrun.c (info_signals_command): Constify.
1524 * inflow.c (info_terminal_command): Constify.
1525 * inferior.c (info_inferiors_command): Constify.
1526 (print_inferior): Constify.
1527 * infcmd.c (info_program_command, info_all_registers_command)
1528 (info_registers_command, info_vector_command)
1529 (info_float_command): Constify.
1530 (registers_info): Constify.
1531 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1532 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1533 Constify.
1534 * f-valprint.c (info_common_command): Constify.
1535 * dcache.c (info_dcache_command): Constify.
1536 (dcache_info_1): Constify.
1537 * darwin-nat-info.c (info_mach_tasks_command)
1538 (info_mach_task_command, info_mach_ports_command)
1539 (info_mach_port_command, info_mach_threads_command)
1540 (info_mach_thread_command, info_mach_regions_command)
1541 (info_mach_regions_recurse_command, info_mach_region_command)
1542 (info_mach_exceptions_command): Constify.
1543 (get_task_from_args): Constify.
1544 * cp-support.c (info_vtbl_command): Constify.
1545 * breakpoint.c (info_watchpoints_command)
1546 (info_tracepoints_command): Constify.
1547 (info_breakpoints_command): Remove non-const overload.
1548 * avr-tdep.c (avr_io_reg_read_command): Constify.
1549 * auxv.c (info_auxv_command): Constify.
1550 * ada-tasks.c (info_tasks_command): Constify.
1551 (info_task): Constify.
1552 * ada-lang.c (info_exceptions_command): Constify.
1553
1554 2017-11-07 Tom Tromey <tom@tromey.com>
1555
1556 * solib.h (no_shared_libraries): Constify.
1557 * frame.h (return_command): Constify.
1558 * cli/cli-cmds.h (quit_command): Constify.
1559 * top.h (quit_command, execute_command): Constify.
1560 * target.h (flash_erase_command): Constify.
1561 * inferior.h (set_inferior_args, attach_command): Constify.
1562 * tracepoint.h (start_tracing, stop_tracing): Constify.
1563 * breakpoint.h (break_command, tbreak_command)
1564 (hbreak_command_wrapper, thbreak_command_wrapper)
1565 (rbreak_command_wrapper, watch_command_wrapper)
1566 (awatch_command_wrapper, rwatch_command_wrapper)
1567 (get_tracepoint_by_number): Constify.
1568 * symtab.c (info_variables_command, rbreak_command)
1569 (symtab_symbol_info): Constify.
1570 (info_variables_command): Add non-const overload.
1571 * top.c (dont_repeat_command): Constify.
1572 * breakpoint.c (ignore_command, commands_command)
1573 (condition_command, tbreak_command, hbreak_command)
1574 (thbreak_command, clear_command, break_command)
1575 (info_breakpoints_command, watch_command, rwatch_command)
1576 (awatch_command, trace_command, ftrace_command, strace_command)
1577 (trace_pass_command, break_range_command, dprintf_command)
1578 (agent_printf_command, get_tracepoint_by_number)
1579 (watch_maybe_just_location, trace_pass_command): Constify.
1580 (info_breakpoints_command): Add non-const overload.
1581 * tracefile.c (tsave_command): Constify.
1582 * infcmd.c (attach_command, disconnect_command, signal_command)
1583 (queue_signal_command, stepi_command, nexti_command)
1584 (finish_command, next_command, step_command, until_command)
1585 (advance_command, jump_command, continue_command, run_command)
1586 (start_command, starti_command, interrupt_command)
1587 (run_command_1, set_inferior_args, step_1): Constify.
1588 * inferior.c (add_inferior_command, remove_inferior_command)
1589 (clone_inferior_command): Constify.
1590 * linux-fork.c (checkpoint_command, restart_command): Constify.
1591 * windows-nat.c (signal_event_command): Constify.
1592 * guile/guile.c (guile_repl_command, guile_command): Constify.
1593 * printcmd.c (x_command, display_command, printf_command)
1594 (output_command, set_command, call_command, print_command)
1595 (eval_command): Constify.
1596 (non_const_set_command): Remove.
1597 (_initialize_printcmd): Update.
1598 * source.c (forward_search_command, reverse_search_command):
1599 Constify.
1600 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1601 Constify.
1602 * infrun.c (handle_command): Constify.
1603 * memattr.c (mem_command): Constify.
1604 * stack.c (return_command, up_command, up_silently_command)
1605 (down_command, down_silently_command, frame_command)
1606 (backtrace_command, func_command, backtrace_command_1): Constify.
1607 (backtrace_command): Add non-const overload.
1608 * remote-sim.c (simulator_command): Constify.
1609 * exec.c (set_section_command): Constify.
1610 * tracepoint.c (tdump_command, trace_variable_command)
1611 (tstatus_command, tstop_command, tstart_command)
1612 (end_actions_pseudocommand, while_stepping_pseudocommand)
1613 (collect_pseudocommand, teval_pseudocommand, actions_command)
1614 (start_tracing, stop_tracing): Constify.
1615 * value.c (init_if_undefined_command): Constify.
1616 * tui/tui-stack.c (tui_update_command): Constify.
1617 * tui/tui-win.c (tui_refresh_all_command)
1618 (tui_set_tab_width_command, tui_set_win_height_command)
1619 (tui_set_focus_command, tui_scroll_forward_command)
1620 (tui_scroll_backward_command, tui_scroll_left_command)
1621 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1622 (tui_set_win_height): Constify.
1623 * tui/tui-layout.c (tui_layout_command): Constify.
1624 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1625 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1626 (proc_untrace_sysexit_cmd): Constify.
1627 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1628 (threadset_test_cmd, threadlist_update_test_cmd)
1629 (threadalive_test): Constify.
1630 * objc-lang.c (print_object_command): Constify.
1631 * command.h (add_com): Constify.
1632 * cli/cli-dump.c (restore_command): Constify.
1633 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1634 (help_command, complete_command, shell_command, edit_command)
1635 (list_command, disassemble_command, make_command)
1636 (apropos_command, alias_command): Constify.
1637 * cli/cli-script.c (document_command, define_command)
1638 (while_command, if_command, validate_comname): Constify.
1639 * cli/cli-decode.c (struct cmd_list_element): Change type of
1640 "fun".
1641 * target.c (do_monitor_command, flash_erase_command): Constify.
1642 * regcache.c (reg_flush_command): Constify.
1643 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1644 (reverse_nexti, reverse_continue, reverse_finish)
1645 (save_bookmark_command, goto_bookmark_command)
1646 (exec_reverse_once): Constify.
1647 * python/python.c (python_interactive_command, python_command):
1648 Constify.
1649 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1650 Constify.
1651 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1652 * gcore.c (gcore_command): Constify.
1653
1654 2017-11-07 Tom Tromey <tom@tromey.com>
1655
1656 * printcmd.c (x_command): Call set_repeat_arguments.
1657 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1658 * top.c (repeat_arguments): New global.
1659 (set_repeat_arguments): New function.
1660 (execute_command): Handle repeat_arguments.
1661 (show_commands): Calls set_repeat_arguments.
1662 * command.h (set_repeat_arguments): Declare.
1663
1664 2017-11-07 Tom Tromey <tom@tromey.com>
1665
1666 * stack.c (backtrace_command): Use std::string.
1667 (backtrace_command_1): Make "count_exp" const.
1668
1669 2017-11-07 Tom Tromey <tom@tromey.com>
1670
1671 * source.c (directory_switch, mod_path, add_path): Constify.
1672 * defs.h (add_path, mod_path, directory_switch): Constify.
1673 * mi/mi-cmd-env.c (env_mod_path): Constify.
1674
1675 2017-11-07 Tom Tromey <tom@tromey.com>
1676
1677 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1678 (run_command_1, continue_command, step_1, jump_command)
1679 (signal_command, until_command, advance_command, finish_command)
1680 (attach_command): Update.
1681
1682 2017-11-07 Tom Tromey <tom@tromey.com>
1683
1684 * command.h (set_cmd_cfunc): Don't declare.
1685 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1686
1687 2017-11-07 Tom Tromey <tom@tromey.com>
1688
1689 * stack.c (select_frame_command): Constify.
1690 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1691 * command.h (add_com_suppress_notification): Constify.
1692
1693 2017-11-07 Tom Tromey <tom@tromey.com>
1694
1695 * breakpoint.c (stop_command): Constify.
1696 * cli/cli-decode.c (struct cmd_list_element): Constify.
1697 * command.h (add_abbrev_prefix_cmd): Constify.
1698
1699 2017-11-07 Pedro Alves <palves@redhat.com>
1700
1701 * breakpoint.c (extract_bp_kind): New enum.
1702 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1703 factored out from ...
1704 (extract_bp_number_and_location): ... here.
1705 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1706
1707 2017-11-07 Pedro Alves <palves@redhat.com>
1708
1709 * breakpoint.c (extract_bp_number_and_location): Change return
1710 type to void. Throw error instead of warning.
1711 (enable_disable_command): Adjust.
1712
1713 2017-11-07 Xavier Roirand <roirand@adacore.com>
1714 Pedro Alves <palves@redhat.com>
1715
1716 * breakpoint.c (map_breakpoint_number_range): New, factored out
1717 from ...
1718 (map_breakpoint_numbers): ... here.
1719 (find_location_by_number): Change parameters from string to
1720 breakpoint number and location.
1721 (extract_bp_number_and_location): New function.
1722 (enable_disable_bp_num_loc)
1723 (enable_disable_breakpoint_location_range)
1724 (enable_disable_command): New functions, factored out ...
1725 (enable_command, disable_command): ... these functions, and
1726 adjusted to support ranges.
1727 * NEWS: Document enable/disable breakpoint location range feature.
1728
1729 2017-11-06 Luis Machado <luis.machado@linaro.org>
1730
1731 * MAINTAINERS (Write After Approval): Update my e-mail address.
1732
1733 2017-11-06 Pedro Alves <palves@redhat.com>
1734
1735 * gnu-nat.c (gnu_terminal_init): Delete.
1736 (gnu_target): Don't install gnu_terminal_init.
1737 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1738 (child_terminal_init): ... this function.
1739
1740 2017-11-06 Pedro Alves <palves@redhat.com>
1741
1742 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1743 sgtty.h.
1744 * config.in, configure: Regenerate.
1745
1746 2017-11-06 Pedro Alves <palves@redhat.com>
1747
1748 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1749 (async_init_signals): Adjust.
1750 (handle_stop_sig): Rename to ...
1751 (handle_sigtstp): ... this.
1752 (async_stop_sig): Rename to ...
1753 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1754 SIGTSTP path.
1755 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1756 instead of STOP_SIGNAL thoughout.
1757 (handle_stop_sig): Rename to ...
1758 (handle_sigtstp): ... this.
1759 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1760
1761 2017-11-06 Pedro Alves <palves@redhat.com>
1762
1763 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1764 longer set flags twice in row.
1765
1766 2017-11-06 Pedro Alves <palves@redhat.com>
1767
1768 * Makefile.in (SER_HARDWIRE): Update comment.
1769 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1770 * common/gdb_termios.h: Delete file.
1771 * common/job-control.c: Include termios.h and unistd.h instead of
1772 gdb_termios.h.
1773 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1774 check.
1775 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1776 Remove sgtty code.
1777 * configure.ac: No longer check for termio.h and sgtty.h.
1778 * configure: Regenerate.
1779 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1780 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1781 Replace PROCESS_GROUP_TYPE references with pid_t references
1782 throughout.
1783 (gdb_getpgrp): Delete.
1784 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1785 (child_terminal_inferior): Remove comment. Remove sgtty code.
1786 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1787 gdb_getpgrp. Use serial_set_tty_state instead aof
1788 serial_noflush_set_tty_state. Remove sgtty code.
1789 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1790 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1791 (inferior_process_group): Now returns pid_t.
1792 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1793 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1794 * ser-event.c (serial_event_ops): Update.
1795 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1796 (dos_ops): Update.
1797 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1798 * ser-pipe.c (pipe_ops): Update.
1799 * ser-tcp.c (tcp_ops): Update.
1800 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1801 HAVE_TERMIOS checks.
1802 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1803 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1804 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1805 assume termios.
1806 (hardwire_noflush_set_tty_state): Delete.
1807 (hardwire_print_tty_state, hardwire_drain_output)
1808 (hardwire_flush_output, hardwire_flush_input)
1809 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1810 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1811 code, and assume termios.
1812 (hardwire_ops): Update.
1813 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1814 * serial.c (serial_noflush_set_tty_state): Delete.
1815 * serial.h (serial_noflush_set_tty_state): Delete.
1816 (serial_ops::noflush_set_tty_state): Delete.
1817
1818 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1819
1820 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1821 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1822 (COMMON_OBS): Remove doublest.o and dfp.o.
1823 Do not build target-float.c (instead of doublest.c)
1824 with -Wformat-nonliteral.
1825
1826 * doublest.c: Remove file.
1827 * doublest.h: Remove file.
1828 * dfp.c: Remove file.
1829 * dfp.h: Remove file.
1830
1831 * target-float.c: Do not include "doublest.h" and "dfp.h".
1832 (DOUBLEST): Move here from doublest.h.
1833 (enum float_kind): Likewise.
1834 (FLOATFORMAT_CHAR_BIT): Likewise.
1835 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1836 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1837 (floatformat_precision): Likewise.
1838 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1839 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1840 Likewise.
1841 (host_float_format, host_double_format, host_long_double_format):
1842 Likewise.
1843 (floatformat_to_string, floatformat_from_string): Likewise.
1844 (floatformat_to_doublest): Likewise. Also, inline the original
1845 convert_floatformat_to_doublest.
1846 (floatformat_from_doublest): Likewise. Also, inline the original
1847 convert_floatformat_from_doublest.
1848
1849 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1850 (MAX_DECIMAL_STRING): Move here from dfp.c.
1851 (match_endianness): Likewise.
1852 (set_decnumber_context, decimal_check_errors): Likewise.
1853 (decimal_from_number, decimal_to_number): Likewise.
1854 (decimal_to_string, decimal_from_string): Likewise. Make static.
1855 (decimal_from_longest, decimal_from_ulongest): Likewise.
1856 (decimal_to_longest): Likewise.
1857 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1858 (decimal_convert): Likewise.
1859
1860 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1861
1862 * doublest.c: Do not include "gdbtypes.h".
1863 (extract_typed_floating): Remove.
1864 (store_typed_floating): Remove.
1865 (convert_typed_floating): Remove.
1866 * doublest.h (struct type): Remove.
1867 (DOUBLEST_PRINT_FORMAT): Remove.
1868 (DOUBLEST_SCAN_FORMAT): Remove.
1869 (extract_typed_floating): Remove.
1870 (store_typed_floating): Remove.
1871 (convert_typed_floating): Remove.
1872
1873 * dfp.c (decimal_from_doublest): Remove.
1874 (decimal_to_doublest): Remove.
1875 * dfp.h: Do not include "doublest.h".
1876 (decimal_from_doublest): Remove.
1877 (decimal_to_doublest): Remove.
1878
1879 * value.c: Do not include "doublest.h" and "dfp.h".
1880 (value_as_double): Remove.
1881 (unpack_double): Remove.
1882 (value_from_double): Remove.
1883 (value_from_decfloat): Remove.
1884 * value.h: Do not include "doublest.h".
1885 (value_as_double): Remove.
1886 (unpack_double): Remove.
1887 (value_from_double): Remove.
1888 (value_from_decfloat): Remove.
1889
1890 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1891
1892 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1893 (i386_extract_return_value): Use target_float_convert.
1894 (i386_store_return_value): Likewise.
1895 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1896 (i387_value_to_register): Likewise.
1897 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1898 (ia64_register_to_value): Use target_float_convert.
1899 (ia64_value_to_register): Likewise.
1900 (ia64_extract_return_value): Likewise.
1901 (ia64_store_return_value): Likewise.
1902 (ia64_push_dummy_call): Likewise.
1903 * m68k-tdep.c: Include "target-float.h".
1904 (m68k_register_to_value): Use target_float_convert.
1905 (m68k_value_to_register): Likewise.
1906 (m68k_svr4_extract_return_value): Likewise.
1907 (m68k_svr4_store_return_value): Likewise.
1908 * ppc-sysv-tdep.c: Include "target-float.h".
1909 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1910 (do_ppc_sysv_return_value): Likewise.
1911 (ppc64_sysv_abi_push_freg): Likewise.
1912 (ppc64_sysv_abi_return_value_base): Likewise.
1913 * rs6000-aix-tdep.c: Include "target-float.h".
1914 (rs6000_push_dummy_call): Use target_float_convert.
1915 (rs6000_return_value): Likewise.
1916 * rs6000-lynx178-tdep.c: Include "target-float.h".
1917 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1918 (rs6000_lynx178_return_value): Likewise.
1919 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1920 (rs6000_register_to_value): Use target_float_convert.
1921 (rs6000_value_to_register): Likewise.
1922 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1923 (arm_extract_return_value): Use target_float_convert.
1924 (arm_store_return_value): Likewise.
1925 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1926 (sh_register_convert_to_virtual): Use target_float_convert.
1927 (sh_register_convert_to_raw): Likewise.
1928 * sh64-tdep.c: Include "target-float.h".
1929 (sh64_extract_return_value): Use target_float_convert.
1930 (sh64_register_convert_to_virtual): Likewise.
1931 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1932
1933 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1934
1935 * target-float.c (floatformat_to_host_double): New function.
1936 (floatformat_from_host_double): Likewise.
1937 (target_float_to_host_double): Likewise.
1938 (target_float_from_host_double): Likewise.
1939 * target-float.h (target_float_to_host_double): Add prototype.
1940 (target_float_from_host_double): Likewise.
1941
1942 * guile/scm-value.c: Include "target-float.h".
1943 (gdbscm_value_to_real): Use target_float_to_host_double.
1944 Handle integer source values via value_as_long.
1945 * guile/scm-math.c: Include "target-float.h". Do not include
1946 "doublest.h", "dfp.h", and "expression.h".
1947 (vlscm_convert_typed_number): Use target_float_from_host_double.
1948 (vlscm_convert_number): Likewise.
1949
1950 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1951 (convert_value_from_python): Use target_float_from_host_double.
1952
1953 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1954
1955 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1956 (cast_from_fixed): Likewise.
1957 (ada_scaling_type): New function.
1958 (ada_delta): Return value instead of DOUBLEST. Perform target
1959 arithmetic instead of host arithmetic.
1960 (scaling_factor): Rename to ...
1961 (ada_scaling_factor) ... this. Make non-static. Return value instead
1962 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1963 (ada_fixed_to_float): Remove.
1964 (ada_float_to_fixed): Remove.
1965 * ada-lang.h (ada_fixed_to_float): Remove.
1966 (ada_float_to_fixed): Remove.
1967 (ada_delta): Return value instead of DOUBLEST.
1968 (ada_scaling_factor): Add prototype.
1969
1970 * ada-typeprint.c: Include "target-float.h".
1971 (print_fixed_point_type): Perform target arithmetic instead of
1972 host arithmetic.
1973 * ada-valprint.c: Include "target-float.h".
1974 (ada_val_print_num): Perform target arithmetic instead of
1975 host arithmetic for fixed-point types.
1976
1977 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1978
1979 * target-float.c: Include <math.h>.
1980 (floatformat_binop): New function.
1981 (floatformat_compare): Likewise.
1982 (target_float_binop): Likewise.
1983 (target_float_compare): Likewise.
1984 * target-float.h: Include "expression.h".
1985 (target_float_binop): Add prototype.
1986 (target_float_compare): Likewise.
1987
1988 * valarith.c: Do not include "doublest.h" and "dfp.h".
1989 Include "common/byte-vector.h".
1990 (value_args_as_decimal): Remove, replace by ...
1991 (value_args_as_target_float): ... this function. Handle both
1992 binary and decimal target floating-point formats.
1993 (scalar_binop): Handle both binary and decimal FP using
1994 value_args_as_target_float and target_float_binop.
1995 (value_equal): Handle both binary and decimal FP using
1996 value_args_as_target_float and target_float_compare.
1997 (value_less): Likewise.
1998 (value_pos): Handle all scalar types as simple copy.
1999 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2000 * dfp.c (decimal_binop): Throw error instead of internal_error
2001 when called with an unsupported operation code.
2002
2003 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2004
2005 * target-float.c (target_float_to_string): New function.
2006 (target_float_from_string): New function.
2007 * target-float.h (target_float_to_string): Add prototype.
2008 (target_float_from_string): Add prototype.
2009
2010 * valprint.c: Include "target-float.h". Do not include
2011 "doublest.h" and "dfp.h".
2012 (print_floating): Use target_float_to_string.
2013 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2014 (printf_floating): Use target_float_to_string.
2015 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2016 (print_i387_value): Use target_float_to_string.
2017 * mips-tdep.c: Include "target-float.h".
2018 (mips_print_fp_register): Use target_float_to_string.
2019 * sh64-tdep.c: Include "target-float.h".
2020 (sh64_do_fp_register): Use target_float_to_string.
2021
2022 * parse.c: Include "target-float.h". Do not include
2023 "doublest.h" and "dfp.h".
2024 (parse_float): Use target_float_from_string.
2025 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2026 (define_symbol): Use target_float_from_string.
2027 * gdbarch-selftests.c: Include "target-float.h".
2028 (register_to_value_test): Use target_float_from_string.
2029
2030 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2031
2032 * Makefile.c (SFILES): Add target-float.c.
2033 (HFILES_NO_SRCDIR): Add target-float.h.
2034 (COMMON_OBS): Add target-float.o.
2035 * target-float.h: New file.
2036 * target-float.c: New file.
2037
2038 * doublest.c (floatformat_classify): Fix detection of float_zero.
2039
2040 * gdbtypes.c (is_floating_type): New function.
2041 * gdbtypes.h (is_floating_type): Add prototype.
2042
2043 * value.c: Do not include "floatformat.h".
2044 (unpack_double): Use target_float_is_valid.
2045 (is_floating_value): New function.
2046 * value.h (is_floating_value): Add prototype-
2047
2048 * valarith.c: Include "target-float.h".
2049 (value_logical_not): Use target_float_is_zero.
2050
2051 * python/py-value.c: Include "target-float.h".
2052 (valpy_nonzero): Use target_float_is_zero.
2053
2054 2017-11-04 Tom Tromey <tom@tromey.com>
2055
2056 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2057
2058 2017-11-04 Tom Tromey <tom@tromey.com>
2059
2060 * breakpoint.c (set_momentary_breakpoint): Return
2061 breakpoint_up.
2062 (until_break_command): Update.
2063 (new_until_break_fsm): Change argument types to
2064 breakpoint_up.
2065 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2066 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2067 Remove.
2068 * infcmd.c (finish_forward): Update.
2069 * breakpoint.h (set_momentary_breakpoint)
2070 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2071 (make_cleanup_delete_breakpoint): Remove.
2072 (struct breakpoint_deleter): New.
2073 (breakpoint_up): New typedef.
2074 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2075 (insert_exception_resume_breakpoint): Update.
2076 (insert_exception_resume_from_probe): Update.
2077 (insert_longjmp_resume_breakpoint): Update.
2078 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2079 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2080 * infcall.c (call_function_by_hand_dummy): Update
2081
2082 2017-11-04 Tom Tromey <tom@tromey.com>
2083
2084 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2085
2086 2017-11-04 Tom Tromey <tom@tromey.com>
2087
2088 * linux-tdep.c (linux_core_info_proc_mappings): Use
2089 gdb::def_vector.
2090 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2091 "size" argument.
2092 (linux_corefile_thread): Update.
2093 (linux_make_corefile_notes): Remove unused variable.
2094
2095 2017-11-04 Tom Tromey <tom@tromey.com>
2096
2097 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2098 gdb::byte_vector.
2099
2100 2017-11-04 Tom Tromey <tom@tromey.com>
2101
2102 * objfiles.c (do_free_objfile_cleanup): Remove.
2103 * compile/compile-object-load.c (compile_object_load): Update.
2104 * objfiles.h (make_cleanup_free_objfile): Remove.
2105
2106 2017-11-04 Tom Tromey <tom@tromey.com>
2107
2108 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2109 (adi_read_versions): Change "tags" to "gdb_byte *".
2110 (adi_print_versions): Likewise.
2111
2112 2017-11-04 Tom Tromey <tom@tromey.com>
2113
2114 * breakpoint.c
2115 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2116 from start_rbreak_breakpoints.
2117 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2118 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2119 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2120 * symtab.c (do_end_rbreak_breakpoints): Remove.
2121 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2122
2123 2017-11-04 Tom Tromey <tom@tromey.com>
2124
2125 * cp-namespace.c (reset_directive_searched): Remove.
2126 (cp_lookup_symbol_via_imports): Use scoped_restore.
2127 * cp-support.c (reset_directive_searched): Remove.
2128 (make_symbol_overload_list_using): Use scoped_restore.
2129 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2130 (reset_directive_searched): Remove.
2131
2132 2017-11-04 Tom Tromey <tom@tromey.com>
2133
2134 * symfile.c (find_separate_debug_file_by_debuglink): Use
2135 unique_xmalloc_ptr.
2136
2137 2017-11-04 Tom Tromey <tom@tromey.com>
2138
2139 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2140 type of "info".
2141 (compute_stack_depth): Likewise.
2142 (do_compile_dwarf_expr_to_c): Use std::vector.
2143
2144 2017-11-04 Tom Tromey <tom@tromey.com>
2145
2146 * compile/compile-object-load.c (link_callbacks_einfo): Use
2147 std::string.
2148
2149 2017-11-04 Tom Tromey <tom@tromey.com>
2150
2151 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2152 Use scoped_free_pendings.
2153 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2154 scoped_free_pendings.
2155 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2156 (xcoff_initial_scan): Likewise.
2157 * buildsym.c (reset_symtab_globals): Update comment.
2158 (scoped_free_pendings): Rename from really_free_pendings.
2159 (prepare_for_building): Update comment.
2160 (buildsym_init): Likewise.
2161 * buildsym.h (class scoped_free_pendings): New class.
2162 (really_free_pendings): Don't declare.
2163
2164 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2165
2166 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2167 output when converting a zero value to a special byteorder format.
2168
2169 2017-11-02 Yao Qi <yao.qi@linaro.org>
2170
2171 * frame.c (do_frame_register_read): Remove aspace.
2172 * jit.c (jit_frame_sniffer): Likwise.
2173 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2174 * regcache.c (regcache::regcache): Pass nullptr.
2175 (regcache_print): Caller updated.
2176 * regcache.h (regcache::regcache): Remove one constructor
2177 parameter aspace.
2178
2179 2017-11-02 Yao Qi <yao.qi@linaro.org>
2180
2181 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2182
2183 2017-11-02 Yao Qi <yao.qi@linaro.org>
2184
2185 * breakpoint.c (insert_single_step_breakpoints): Update.
2186 * frame.c (struct frame_info) <aspace>: Add const.
2187 (frame_save_as_regcache): Add const.
2188 (get_frame_address_space): Return const address_space *.
2189 * frame.h (get_frame_address_space): Update declaration.
2190 * infrun.c (struct step_over_info) <aspace>: Add const.
2191 (set_step_over_info): Make aspace const.
2192 (displaced_step_prepare_throw): Change variable const.
2193 (resume): Likewise.
2194 (proceed): Likewise.
2195 (adjust_pc_after_break): Likewise.
2196 (save_waitstatus): Likewise.
2197 (handle_signal_stop): Likewise.
2198 (keep_going_pass_signal): Likewise.
2199 * jit.c (jit_frame_sniffer): Add const.
2200 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2201 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2202 * record-full.c (record_full_wait_1): Likewise.
2203 * regcache.c (regcache::regcache): Change parameter to const.
2204 * regcache.h (regcache::regcache): Likewise.
2205 (regcache::aspace): Return const address_space *.
2206 (regcache) <m_aspace>: Add const.
2207
2208 2017-11-02 Yao Qi <yao.qi@linaro.org>
2209
2210 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2211 * frame.c (create_sentinel_frame): Likewise.
2212 * infrun.c (displaced_step_prepare_throw): Likewise.
2213 (resume): Likewise.
2214 (thread_still_needs_step_over_bp): Likewise.
2215 (proceed): Likewise.
2216 (do_target_wait): Likewise.
2217 (adjust_pc_after_break): Likewise.
2218 (handle_syscall_event): Likewise.
2219 (save_waitstatus): Likewise.
2220 (handle_inferior_event_1): Likewise.
2221 (handle_signal_stop): Likewise.
2222 (keep_going_pass_signal): Likewise.
2223 * linux-nat.c (status_callback): Likewise.
2224 (save_stop_reason): Likewise.
2225 (resume_stopped_resumed_lwps): Likewise.
2226 * record-full.c (record_full_exec_insn): Likewise.
2227 (record_full_wait_1): Likewise.
2228 * regcache.c (get_regcache_aspace): Remove.
2229 * regcache.h (get_regcache_aspace): Remove.
2230
2231 2017-11-02 Yao Qi <yao.qi@linaro.org>
2232
2233 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2234 (init_regcache_descr): Use gdbarch_num_regs.
2235 (regcache::regcache): Likewise.
2236 (regcache::get_register_status): Likewise.
2237 (regcache::assert_raw_regnum): Likewise.
2238 (regcache::cooked_read): Likewise.
2239 (regcache::cooked_read_value): Likewise.
2240 (regcache::cooked_write): Likewise.
2241 (regcache::dump): Likewise.
2242 (regcache::num_raw_registers): New method.
2243 * regcache.h (class regcache) <num_raw_registers>: New.
2244
2245 2017-11-02 Yao Qi <yao.qi@linaro.org>
2246
2247 * regcache.c (regcache::assert_regnum): New method.
2248 (regcache::invalidate): Call assert_regnum.
2249 (regcache::raw_update): Likewise.
2250 (regcache::raw_write): Likewise.
2251 (regcache::raw_read_part): Likewise.
2252 (regcache::raw_write_part): Likewise.
2253 (regcache::raw_supply): Likewise.
2254 (regcache::raw_supply_integer): Likewise.
2255 (regcache::raw_supply_zeroed): Likewise.
2256 (regcache::raw_collect): Likewise.
2257 (regcache::raw_collect_integer): Likewise.
2258 * regcache.h (regcache::assert_regnum): Declare.
2259
2260 2017-11-02 Yao Qi <yao.qi@linaro.org>
2261
2262 * regcache.c (regcache::dump): Remove code.
2263
2264 2017-11-02 Yao Qi <yao.qi@linaro.org>
2265
2266 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2267 Remove.
2268 <sizeof_cooked_register_status>: Remove.
2269 (init_regcache_descr): Update.
2270 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2271 (regcache::save): Likewise.
2272 (regcache::dump): Likewise.
2273
2274 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2275
2276 * ft32-tdep.c (ft32_fetch_instruction): New function.
2277 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2278
2279 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2280
2281 * cli/cli-script.c (execute_control_command): Rename to ...
2282 (execute_control_command_1): ... this.
2283 (execute_control_command): New function.
2284
2285 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2286
2287 * tracepoint.c (tfind_command): Remove const_cast.
2288
2289 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2290
2291 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2292
2293 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2294
2295 * common/common-utils.h (in_inclusive_range): New function.
2296 * arm-tdep.c (arm_record_extension_space): Use
2297 in_inclusive_range.
2298 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2299 * cris-tdep.c (cris_spec_reg_applicable): Use
2300 in_inclusive_range.
2301
2302 2017-10-30 Pedro Alves <palves@redhat.com>
2303 Simon Marchi <simon.marchi@ericsson.com>
2304
2305 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2306 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2307
2308 2017-10-30 Pedro Alves <palves@redhat.com>
2309
2310 * common/common-utils.c (string_appendf, string_vappendf): New
2311 functions.
2312 * common/common-utils.h (string_appendf, string_vappendf): New
2313 declarations.
2314 * unittests/common-utils-selftests.c (string_appendf_func)
2315 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2316 (string_vappendf_tests): New functions.
2317 (_initialize_common_utils_selftests): Register "string_appendf" and
2318 "string_vappendf tests".
2319
2320 2017-10-30 Pedro Alves <palves@redhat.com>
2321
2322 * unittests/common-utils-selftests.c (format_func): New typedef.
2323 (string_printf_tests, string_vprintf_tests): Tests factored out
2324 and merged to ...
2325 (test_format_func): ... this new function.
2326 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2327 test_format_func.
2328
2329 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2330
2331 * darwin-nat.c: Remove include of gdb.h.
2332
2333 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2334
2335 * xtensa-xtregs.c: Fix formatting issues.
2336
2337 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2338
2339 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2340
2341 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2342
2343 PR python/21213
2344 * python/py-infthread.c (thpy_get_inferior): Increment reference
2345 of inferior before returning it.
2346
2347 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2348
2349 * unittests/common-utils-selftests.c (format): Add
2350 ATTRIBUTE_PRINTF.
2351
2352 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2353
2354 * xml-syscall.c (struct syscall_desc): Add constructor.
2355 <name>: Change type to std::string.
2356 (syscall_desc_up): New typedef.
2357 (syscall_desc_p): Remove typeder.
2358 (DEF_VEC_P(syscall_desc_p)): Remove.
2359 (struct syscall_group_desc): Add constructor.
2360 <name>: Change type to std::string.
2361 <syscalls>: Change type to std::vector.
2362 (syscall_group_desc_up): New typedef.
2363 (syscall_group_desc_p): Remove typedef.
2364 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2365 (struct syscalls_info) <syscalls>: Change type to std::vector of
2366 unique_ptr.
2367 <groups>: Likewise.
2368 <my_gdb_datadir>: Change type to std::string.
2369 (syscalls_info_up): New typedef.
2370 (allocate_syscalls_info): Remove.
2371 (syscalls_info_free_syscalls_desc): Remove.
2372 (syscalls_info_free_syscall_group_desc): Remove.
2373 (free_syscalls_info): Remove.
2374 (make_cleanup_free_syscalls_info): Remove.
2375 (syscall_group_create_syscall_group_desc): Adjust.
2376 (syscall_group_add_syscall): Adjust.
2377 (syscall_create_syscall_desc): Adjust.
2378 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2379 (init_syscalls_info): Adjust.
2380 (syscall_group_get_group_by_name): Adjust.
2381 (xml_get_syscall_number): Adjust.
2382 (xml_get_syscall_name): Adjust.
2383 (xml_list_of_syscalls): Adjust.
2384 (xml_list_syscalls_by_group): Adjust.
2385 (xml_list_of_groups): Adjust.
2386
2387 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2388
2389 * probe.h: Don't include gdb_vecs.h.
2390 (DEF_VEC_P (probe_p)): Remove.
2391 (find_probes_in_objfile): Return an std::vector.
2392 * probe.c (find_probes_in_objfile): Likewise.
2393 * breakpoint.c (breakpoint_objfile_data)
2394 <longjmp_probes>: Change type to std::vector.
2395 <exception_probes>: Likewise.
2396 (free_breakpoint_probes): Don't manually free vectors.
2397 (create_longjmp_master_breakpoint): Adjust.
2398 (create_exception_master_breakpoint): Adjust.
2399 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2400 parameter type, adjust.
2401 (svr4_create_solib_event_breakpoints): Adjust.
2402
2403 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2404
2405 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2406 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2407 with new.
2408 (free_breakpoint_probes): Rename to ...
2409 (free_breakpoint_objfile_data): ... this, and call delete on
2410 bp_objfile_data..
2411
2412 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2413
2414 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2415 (loaded_script_ptr): Remove typedef.
2416 (DEF_VEC_P (loaded_script_ptr)): Remove.
2417 (struct collect_matching_scripts_data): Add constructor.
2418 <scripts_p>: Change type to (pointer to) std::vector.
2419 (collect_matching_scripts_data): Adjust.
2420 (sort_scripts_by_name): Make suitable for std::sort.
2421 (print_scripts): Don't sort vector, adjust to std::vector.
2422 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2423
2424 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2425
2426 * symfile.c (filename_language): Make struct, not typedef. Add
2427 constructor.
2428 <ext>: Change type to std::string.
2429 (DEF_VEC_O (filename_language)): Remove.
2430 (filename_language_table): Change type to std::vector.
2431 (add_filename_language): Adjust.
2432 (set_ext_lang_command): Adjust.
2433 (info_ext_lang_command): Adjust.
2434 (deduce_language_from_filename): Adjust.
2435 (class scoped_restore_filename_language_table): Remove.
2436 (test_filename_language): Use scoped_restore.
2437 (test_set_ext_lang_command): Use scoped_restore, adjust to
2438 std::vector change.
2439
2440 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2441
2442 * symfile.c: Include selftest.h.
2443 (class scoped_restore_filename_language_table): New.
2444 (test_filename_language): New test.
2445 (test_set_ext_lang_command): New test.
2446 (_initialize_symfile): Register tests.
2447
2448 2017-10-27 Keith Seitz <keiths@redhat.com>
2449
2450 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2451 in the bp_location, falling back to find_pc_sect_function when
2452 needed.
2453 (add_location_to_breakpoint): Save sal->symbol.
2454 * breakpoint.h (struct bp_location) <symbol>: New field.
2455 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2456 * symtab.h (struct symtab_and_line) <symbol>: New field.
2457
2458 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2459
2460 PR gdb/13669
2461 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2462 to rewind obstack.
2463
2464 2017-10-26 Pedro Alves <palves@redhat.com>
2465
2466 * remote.c (remote_async_terminal_ours_p): Delete.
2467 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2468 Remove references to 'remote_async_terminal_ours_p'.
2469
2470 2017-10-26 Yao Qi <yao.qi@linaro.org>
2471
2472 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2473
2474 2017-10-26 Yao Qi <yao.qi@linaro.org>
2475
2476 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2477 aspace const.
2478 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2479 Likewise.
2480 * breakpoint.c (bpstat_check_location): Remove cast.
2481 (breakpoint_hit_catch_fork): Make aspce const.
2482 (breakpoint_hit_catch_solib): Likewise.
2483 (breakpoint_hit_catch_exec): Likewise.
2484 (breakpoint_hit_ranged_breakpoint): Likewise.
2485 (breakpoint_hit_watchpoint): Likewise.
2486 (base_breakpoint_breakpoint_hit): Likewise.
2487 (bkpt_breakpoint_hit): Likewise.
2488 (dprintf_breakpoint_hit): Likewise.
2489 (tracepoint_breakpoint_hit): Likewise.
2490 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2491
2492 2017-10-26 Yao Qi <yao.qi@linaro.org>
2493
2494 * breakpoint.c (breakpoint_location_address_match): Change
2495 "struct address_space *" to "const address_space".
2496 (breakpoint_location_address_range_overlap): Likewise.
2497 (breakpoint_here_p): Likewise.
2498 (breakpoint_in_range_p): Likewise.
2499 (moribund_breakpoint_here_p): Likewise.
2500 (bp_location_inserted_here_p): Likewise.
2501 (software_breakpoint_inserted_here_p): Likewise.
2502 (hardware_breakpoint_inserted_here_p): Likewise.
2503 (hardware_watchpoint_inserted_in_range): Likewise.
2504 (bpstat_check_location): Likewise.
2505 (bpstat_stop_status): Likewise.
2506 (breakpoint_address_match): Likewise.
2507 (breakpoint_address_match_range): Likewise.
2508 (breakpoint_location_address_match): Likewise.
2509 (breakpoint_location_address_range_overlap): Likewise.
2510 (insert_single_step_breakpoint): Likewise.
2511 (breakpoint_has_location_inserted_here): Likewise.
2512 (single_step_breakpoint_inserted_here_p): Likewise.
2513 (pc_at_non_inline_function): Likewise.
2514 * breakpoint.h (bpstat_stop_status): Update declaration.
2515 (breakpoint_here_p): Likewise.
2516 (breakpoint_in_range_p): Likewise.
2517 (moribund_breakpoint_here_p): Likewise.
2518 (breakpoint_inserted_here_p): Likewise.
2519 (software_breakpoint_inserted_here_p): Likewise.
2520 (hardware_breakpoint_inserted_here_p): Likewise.
2521 (breakpoint_has_location_inserted_here): Likewise.
2522 (single_step_breakpoint_inserted_here_p): Likewise.
2523 (hardware_watchpoint_inserted_in_range): Likewise.
2524 (breakpoint_address_match): Likewise.
2525 (insert_single_step_breakpoint): Likewise.
2526 (pc_at_non_inline_function): Likewise.
2527 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2528 * record.c (record_check_stopped_by_breakpoint): Likewise.
2529 * record.h (record_check_stopped_by_breakpoint): Likewise.
2530 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2531
2532 2017-10-25 Yao Qi <yao.qi@linaro.org>
2533
2534 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2535 regcache->arch () instead get_regcache_arch.
2536 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2537 Likewise.
2538 (aarch64_fbsd_store_inferior_registers): Likewise.
2539 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2540 (store_gregs_to_thread): Likewise.
2541 (fetch_fpregs_from_thread): Likewise.
2542 (store_fpregs_to_thread): Likewise.
2543 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2544 (aarch64_store_return_value): Likewise.
2545 (aarch64_software_single_step): Likewise.
2546 * aix-thread.c (aix_thread_wait): Likewise.
2547 (supply_reg32): Likewise.
2548 (supply_sprs64): Likewise.
2549 (supply_sprs32): Likewise.
2550 (fill_gprs64): Likewise.
2551 (fill_gprs32): Likewise.
2552 (fill_sprs64): Likewise.
2553 (fill_sprs32): Likewise.
2554 (store_regs_user_thread): Likewise.
2555 (store_regs_kernel_thread): Likewise.
2556 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2557 (alphabsd_store_inferior_registers): Likewise.
2558 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2559 (alpha_store_return_value): Likewise.
2560 (alpha_deal_with_atomic_sequence): Likewise.
2561 (alpha_next_pc): Likewise.
2562 (alpha_software_single_step): Likewise.
2563 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2564 (amd64bsd_store_inferior_registers): Likewise.
2565 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2566 Likewise.
2567 (amd64_linux_store_inferior_registers): Likewise.
2568 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2569 (amd64_collect_native_gregset): Likewise.
2570 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2571 (amd64obsd_collect_uthread): Likewise.
2572 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2573 (amd64_collect_fpregset): Likewise.
2574 (amd64_supply_fxsave): Likewise.
2575 (amd64_supply_xsave): Likewise.
2576 (amd64_collect_fxsave): Likewise.
2577 (amd64_collect_xsave): Likewise.
2578 * arc-tdep.c (arc_write_pc): Likewise.
2579 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2580 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2581 (arm_fbsd_store_inferior_registers): Likewise.
2582 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2583 (store_vfp_regs): Likewise.
2584 (arm_linux_fetch_inferior_registers): Likewise.
2585 (arm_linux_store_inferior_registers): Likewise.
2586 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2587 (arm_linux_sigreturn_next_pc): Likewise.
2588 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2589 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2590 (fetch_register): Likewise.
2591 (store_register): Likewise.
2592 * arm-tdep.c (arm_is_thumb): Likewise.
2593 (displaced_in_arm_mode): Likewise.
2594 (bx_write_pc): Likewise.
2595 (arm_get_next_pcs_addr_bits_remove): Likewise.
2596 (arm_software_single_step): Likewise.
2597 (arm_extract_return_value): Likewise.
2598 (arm_store_return_value): Likewise.
2599 (arm_write_pc): Likewise.
2600 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2601 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2602 (bsd_uthread_store_registers): Likewise.
2603 * core-regset.c (fetch_core_registers): Likewise.
2604 * corelow.c (get_core_registers): Likewise.
2605 * cris-tdep.c (cris_store_return_value): Likewise.
2606 (cris_extract_return_value): Likewise.
2607 (find_step_target): Likewise.
2608 (find_step_target): Likewise.
2609 (cris_software_single_step): Likewise.
2610 * ctf.c (ctf_fetch_registers): Likewise.
2611 * darwin-nat.c (cancel_breakpoint): Likewise.
2612 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2613 * frv-tdep.c (frv_extract_return_value): Likewise.
2614 * ft32-tdep.c (ft32_store_return_value): Likewise.
2615 (ft32_extract_return_value): Likewise.
2616 * go32-nat.c (fetch_register): Likewise.
2617 (go32_fetch_registers): Likewise.
2618 (go32_store_registers): Likewise.
2619 (store_register): Likewise.
2620 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2621 (h8300_store_return_value): Likewise.
2622 * hppa-linux-nat.c (fetch_register): Likewise.
2623 (store_register): Likewise.
2624 (hppa_linux_fetch_inferior_registers): Likewise.
2625 (hppa_linux_store_inferior_registers): Likewise.
2626 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2627 (i386_darwin_store_inferior_registers): Likewise.
2628 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2629 (gnu_store_registers): Likewise.
2630 * i386-linux-nat.c (fetch_register): Likewise.
2631 (store_register): Likewise.
2632 (supply_gregset): Likewise.
2633 (fill_gregset): Likewise.
2634 (i386_linux_fetch_inferior_registers): Likewise.
2635 (i386_linux_store_inferior_registers): Likewise.
2636 (i386_linux_resume): Likewise.
2637 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2638 Likewise.
2639 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2640 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2641 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2642 (i386obsd_collect_uthread): Likewise.
2643 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2644 (i386_supply_gregset): Likewise.
2645 (i386_collect_gregset): Likewise.
2646 (i386_supply_fpregset): Likewise.
2647 (i386_collect_fpregset): Likewise.
2648 (i386_mpx_bd_base): Likewise.
2649 * i386-v4-nat.c (supply_fpregset): Likewise.
2650 (fill_fpregset): Likewise.
2651 * i387-tdep.c (i387_supply_fsave): Likewise.
2652 (i387_collect_fsave): Likewise.
2653 (i387_supply_fxsave): Likewise.
2654 (i387_collect_fxsave): Likewise.
2655 (i387_supply_xsave): Likewise.
2656 (i387_collect_xsave): Likewise.
2657 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2658 (ia64_linux_store_registers): Likewise.
2659 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2660 (ia64_extract_return_value): Likewise.
2661 (ia64_store_return_value): Likewise.
2662 (find_func_descr): Likewise.
2663 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2664 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2665 (inf_ptrace_store_registers): Likewise.
2666 * infrun.c (use_displaced_stepping): Likewise.
2667 (displaced_step_prepare_throw): Likewise.
2668 (resume): Likewise.
2669 (proceed): Likewise.
2670 (do_target_wait): Likewise.
2671 (adjust_pc_after_break): Likewise.
2672 (handle_inferior_event_1): Likewise.
2673 (handle_signal_stop): Likewise.
2674 (save_infcall_suspend_state): Likewise.
2675 (restore_infcall_suspend_state): Likewise.
2676 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2677 * jit.c (jit_frame_prev_register): Likewise.
2678 * linux-nat.c (save_stop_reason): Likewise.
2679 (linux_nat_wait_1): Likewise.
2680 (resume_stopped_resumed_lwps): Likewise.
2681 * linux-record.c (record_linux_sockaddr): Likewise.
2682 (record_linux_msghdr): Likewise.
2683 (record_linux_system_call): Likewise.
2684 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2685 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2686 (lm32_store_return_value): Likewise.
2687 * m32c-tdep.c (m32c_read_flg): Likewise.
2688 (m32c_pseudo_register_read): Likewise.
2689 (m32c_pseudo_register_write): Likewise.
2690 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2691 (m32r_linux_collect_gregset): Likewise.
2692 * m32r-tdep.c (m32r_store_return_value): Likewise.
2693 (m32r_extract_return_value): Likewise.
2694 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2695 (m68kbsd_collect_fpregset): Likewise.
2696 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2697 * m68k-linux-nat.c (fetch_register): Likewise.
2698 (old_fetch_inferior_registers): Likewise.
2699 (old_store_inferior_registers): Likewise.
2700 (store_regs): Likewise.
2701 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2702 (m68k_svr4_store_return_value): Likewise.
2703 * m88k-tdep.c (m88k_store_arguments): Likewise.
2704 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2705 (mi_cmd_data_write_register_values): Likewise.
2706 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2707 (mips_fbsd_store_inferior_registers): Likewise.
2708 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2709 (mips_fbsd_supply_gregs): Likewise.
2710 (mips_fbsd_collect_fpregs): Likewise.
2711 (mips_fbsd_collect_gregs): Likewise.
2712 (mips_fbsd_supply_fpregset): Likewise.
2713 (mips_fbsd_collect_fpregset): Likewise.
2714 (mips_fbsd_supply_gregset): Likewise.
2715 (mips_fbsd_collect_gregset): Likewise.
2716 * mips-linux-nat.c (supply_gregset): Likewise.
2717 (fill_gregset): Likewise.
2718 (supply_fpregset): Likewise.
2719 (fill_fpregset): Likewise.
2720 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2721 (mips_fill_gregset): Likewise.
2722 (mips_supply_fpregset): Likewise.
2723 (mips_fill_fpregset): Likewise.
2724 (mips64_supply_gregset): Likewise.
2725 (micromips_linux_sigframe_validate): Likewise.
2726 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2727 (mipsnbsd_fetch_inferior_registers): Likewise.
2728 (mipsnbsd_store_inferior_registers): Likewise.
2729 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2730 (mipsnbsd_supply_gregset): Likewise.
2731 (mipsnbsd_iterate_over_regset_sections): Likewise.
2732 (mipsnbsd_supply_reg): Likewise.
2733 (mipsnbsd_supply_fpreg): Likewise.
2734 * mips-tdep.c (mips_in_frame_stub): Likewise.
2735 (mips_dummy_id): Likewise.
2736 (is_octeon_bbit_op): Likewise.
2737 (micromips_bc1_pc): Likewise.
2738 (extended_mips16_next_pc): Likewise.
2739 (mips16_next_pc): Likewise.
2740 (deal_with_atomic_sequence): Likewise.
2741 * moxie-tdep.c (moxie_process_readu): Likewise.
2742 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2743 * nto-procfs.c (procfs_store_registers): Likewise.
2744 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2745 (ppcfbsd_store_inferior_registers): Likewise.
2746 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2747 (fetch_altivec_register): Likewise.
2748 (get_spe_registers): Likewise.
2749 (fetch_spe_register): Likewise.
2750 (fetch_altivec_registers): Likewise.
2751 (fetch_all_gp_regs): Likewise.
2752 (fetch_all_fp_regs): Likewise.
2753 (store_vsx_register): Likewise.
2754 (store_altivec_register): Likewise.
2755 (set_spe_registers): Likewise.
2756 (store_spe_register): Likewise.
2757 (store_altivec_registers): Likewise.
2758 (store_all_gp_regs): Likewise.
2759 (store_all_fp_regs): Likewise.
2760 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2761 (ppc_linux_collect_gregset): Likewise.
2762 (ppc_canonicalize_syscall): Likewise.
2763 (ppc_linux_record_signal): Likewise.
2764 (ppu2spu_prev_register): Likewise.
2765 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2766 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2767 (ppcobsd_store_registers): Likewise.
2768 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2769 Likewise.
2770 (ppc_ravenscar_generic_store_registers): Likewise.
2771 * procfs.c (procfs_fetch_registers): Likewise.
2772 (procfs_store_registers): Likewise.
2773 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2774 (ravenscar_store_registers): Likewise.
2775 (ravenscar_prepare_to_store): Likewise.
2776 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2777 * record-full.c (record_full_wait_1): Likewise.
2778 (record_full_registers_change): Likewise.
2779 (record_full_store_registers): Likewise.
2780 (record_full_core_fetch_registers): Likewise.
2781 (record_full_save): Likewise.
2782 (record_full_goto_insn): Likewise.
2783 * regcache.c (regcache_register_size): Likewise.
2784 (get_regcache_arch): Remove.
2785 (regcache_read_pc): Likewise.
2786 * regcache.h (get_regcache_arch): Remove.
2787 * remote-sim.c (gdbsim_fetch_register): Likewise.
2788 (gdbsim_store_register): Likewise.
2789 * remote.c (fetch_register_using_p): Likewise.
2790 (send_g_packet): Likewise.
2791 (remote_prepare_to_store): Likewise.
2792 (store_registers_using_G): Likewise.
2793 * reverse.c (save_bookmark_command): Likewise.
2794 (goto_bookmark_command): Likewise.
2795 * rs6000-aix-tdep.c (branch_dest): Likewise.
2796 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2797 (fetch_register): Likewise.
2798 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2799 (ppc_collect_reg): Likewise.
2800 (ppc_collect_gregset): Likewise.
2801 (ppc_collect_fpregset): Likewise.
2802 (ppc_collect_vsxregset): Likewise.
2803 (ppc_collect_vrregset): Likewise.
2804 (ppc_displaced_step_hw_singlestep): Likewise.
2805 (rs6000_pseudo_register_read): Likewise.
2806 (rs6000_pseudo_register_write): Likewise.
2807 * s390-linux-nat.c (supply_gregset): Likewise.
2808 (fill_gregset): Likewise.
2809 (s390_linux_fetch_inferior_registers): Likewise.
2810 * s390-linux-tdep.c (s390_write_pc): Likewise.
2811 (s390_software_single_step): Likewise.
2812 (s390_all_but_pc_registers_record): Likewise.
2813 (s390_linux_syscall_record): Likewise.
2814 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2815 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2816 (shnbsd_store_inferior_registers): Likewise.
2817 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2818 (sh_extract_return_value_fpu): Likewise.
2819 (sh_store_return_value_nofpu): Likewise.
2820 (sh_corefile_supply_regset): Likewise.
2821 (sh_corefile_collect_regset): Likewise.
2822 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2823 (sh64_store_return_value): Likewise.
2824 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2825 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2826 (sparc_store_inferior_registers): Likewise.
2827 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2828 (sparc_ravenscar_prepare_to_store): Likewise.
2829 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2830 (sparc_analyze_control_transfer): Likewise.
2831 (sparc_step_trap): Likewise.
2832 (sparc_software_single_step): Likewise.
2833 (sparc32_gdbarch_init): Likewise.
2834 (sparc_supply_rwindow): Likewise.
2835 (sparc_collect_rwindow): Likewise.
2836 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2837 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2838 (sparc64nbsd_collect_gregset): Likewise.
2839 (sparc64nbsd_supply_fpregset): Likewise.
2840 (sparc64nbsd_collect_fpregset): Likewise.
2841 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2842 (sparc64_supply_gregset): Likewise.
2843 (sparc64_collect_gregset): Likewise.
2844 (sparc64_supply_fpregset): Likewise.
2845 (sparc64_collect_fpregset): Likewise.
2846 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2847 * spu-tdep.c (spu_unwind_sp): Likewise.
2848 (spu2ppu_prev_register): Likewise.
2849 (spu_memory_remove_breakpoint): Likewise.
2850 * stack.c (return_command): Likewise.
2851 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2852 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2853 * tracefile.c (trace_save_ctf): Likewise.
2854 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2855 (do_windows_store_inferior_registers): Likewise.
2856 (windows_resume): Likewise.
2857 * xtensa-linux-nat.c (fill_gregset): Likewise.
2858 (supply_gregset_reg): Likewise.
2859 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2860 (xtensa_register_read_masked): Likewise.
2861 (xtensa_supply_gregset): Likewise.
2862 (xtensa_extract_return_value): Likewise.
2863 (xtensa_store_return_value): Likewise.
2864
2865 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2866
2867 * doublest.c (floatformat_from_string): New function.
2868 * doublest.h (floatformat_from_string): Add prototype.
2869
2870 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2871 (OP_FLOAT): ... this.
2872 * expression.h: Do not include "doublest.h".
2873 (union exp_element): Replace doubleconst and decfloatconst by
2874 new element floatconst.
2875 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2876 (ada_evaluate_subexp): Likewise.
2877 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2878 OP_DOUBLE and OP_DECFLOAT.
2879 * expprint.c (print_subexp_standard): Likewise.
2880 (dump_subexp_body_standard): Likewise.
2881 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2882
2883 * parse.c: Include "dfp.h".
2884 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2885 (write_exp_elt_floatcst): New function.
2886 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2887 and OP_DECFLOAT.
2888 (operator_check_standard): Likewise.
2889 (parse_float): Do not accept suffix. Take type as input. Return bool.
2890 Return target format buffer instead of host DOUBLEST.
2891 Use floatformat_from_string and decimal_from_string to parse
2892 either binary or decimal floating-point types.
2893 (parse_c_float): Remove.
2894 * parser-defs.h: Do not include "doublest.h".
2895 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2896 (write_exp_elt_floatcst): Add prototype.
2897 (parse_float): Update prototype.
2898 (parse_c_float): Remove.
2899
2900 * c-exp.y: Do not include "dfp.h".
2901 (typed_val_float): Use byte buffer instead of DOUBLEST.
2902 (typed_val_decfloat): Remove.
2903 (DECFLOAT): Remove.
2904 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2905 (parse_number): Update to new parse_float interface.
2906 Parse suffixes and determine type before calling parse_float.
2907 Handle decimal and binary FP types the same way.
2908
2909 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2910 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2911 (parse_number): Update to new parse_float interface.
2912 Parse suffixes and determine type before calling parse_float.
2913
2914 * f-exp.y: Replace dval by typed_val_float.
2915 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2916 (parse_number): Use parse_float instead of atof.
2917
2918 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2919 (parse_go_float): Remove.
2920 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2921 (parse_number): Call parse_float instead of parse_go_float.
2922 Parse suffixes and determine type before calling parse_float.
2923
2924 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2925 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2926 (parse_number): Update to new parse_float interface.
2927 Parse suffixes and determine type before calling parse_float.
2928
2929 * m2-exp.y: Replace dval by byte buffer val.
2930 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2931 (parse_number): Call parse_float instead of atof.
2932
2933 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2934 (lex_number): Call parse_float instead of strtod.
2935 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2936 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2937 Use write_exp_elt_floatcst.
2938 (unit_testing): Remove static variable.
2939 (rust_type): Do not check unit_testing.
2940 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2941
2942 * ada-exp.y (type_float, type_double): Remove.
2943 (typed_val_float): Use byte buffer instead of DOUBLEST.
2944 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2945 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2946
2947 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2948
2949 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2950 * arch/aarch64.h: New file.
2951
2952 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2953
2954 * dfp.h (decimal_from_string): Use const reference for argument.
2955 * dfp.c (decimal_from_string): Likewise.
2956
2957 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2958
2959 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2960 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2961 * mips-tdep.c (mips_print_fp_register): Likewise.
2962
2963 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2964
2965 * common/format.h (enum argclass): Replace decfloat_arg by
2966 dec32float_arg, dec64float_arg, and dec128float_arg.
2967 * common/format.c (parse_format_string): Update to return
2968 new decimal float argument classes.
2969
2970 * printcmd.c (printf_decfloat): Rename to ...
2971 (printf_floating): ... this. Add argclass argument, and use it
2972 instead of parsing the format string again. Add support for
2973 binary floating-point values, using floatformat_to_string.
2974 Convert value to the target format if it doesn't already match.
2975 (ui_printf): Call printf_floating instead of printf_decfloat,
2976 also for double_arg / long_double_arg. Pass argclass.
2977
2978 * dfp.c (decimal_to_string): Add format string argument.
2979 * dfp.h (decimal_to_string): Likewise.
2980
2981 * doublest.c (floatformat_to_string): Add format string argument.
2982 * doublest.h (floatformat_to_string): Likewise.
2983
2984 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2985
2986 * doublest.c (floatformat_precision): New routine.
2987 (floatformat_to_string): Likewise.
2988 * doublest.c (floatformat_to_string): Add prototype.
2989
2990 * printcmd.c (print_scalar_formatted): Only call print_floating
2991 on floating-point types.
2992 * valprint.c: Do not include "floatformat.h".
2993 (generic_val_print_decfloat): Remove.
2994 (generic_val_print): Call generic_val_print_float for both
2995 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2996 (print_floating): Use floatformat_to_string. Handle decimal float.
2997 (print_decimal_floating): Remove, merge into floatformat_to_string.
2998 * value.h (print_decimal_floating): Remove.
2999
3000 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3001
3002 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3003
3004 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3005
3006 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3007
3008 * memattr.h: Don't include vec.h.
3009 (struct mem_attrib): Initialize fields.
3010 <unknown>: New static method.
3011 (struct mem_region): Add constructors, operator<, initialize
3012 fields.
3013 * memattr.c: Include algorithm.
3014 (default_mem_attrib, unknown_mem_attrib): Remove.
3015 (user_mem_region_list): New global.
3016 (target_mem_region_list, mem_region_list): Change type to
3017 std::vector<mem_region>.
3018 (mem_use_target): Now a function.
3019 (target_mem_regions_valid): Change type to bool.
3020 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3021 (require_user_regions): Adjust.
3022 (require_target_regions): Adjust.
3023 (create_mem_region): Adjust.
3024 (lookup_mem_region): Adjust.
3025 (invalidate_target_mem_regions): Adjust.
3026 (mem_clear): Rename to...
3027 (user_mem_clear): ... this, and adjust.
3028 (mem_command): Adjust.
3029 (info_mem_command): Adjust.
3030 (mem_enable, enable_mem_command, mem_disable,
3031 disable_mem_command): Adjust.
3032 (mem_delete): Adjust.
3033 (delete_mem_command): Adjust.
3034 * memory-map.h (parse_memory_map): Return an std::vector.
3035 * memory-map.c (parse_memory_map): Likewise.
3036 (struct memory_map_parsing_data): Add constructor.
3037 <memory_map>: Point to std::vector.
3038 (memory_map_start_memory): Adjust.
3039 (memory_map_end_memory): Adjust.
3040 (memory_map_end_property): Adjust.
3041 (clear_result): Remove.
3042 * remote.c (remote_memory_map): Return an std::vector.
3043 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3044 Remove.
3045 (target_debug_print_mem_region_vector): New.
3046 * target-delegates.c: Regenerate.
3047 * target.h (mem_region_vector): New typedef.
3048 (to_memory_map): Return mem_region_vector.
3049 (target_memory_map): Return an std::vector.
3050 * target.c (target_memory_map): Return an std::vector.
3051 (flash_erase_command): Adjust.
3052
3053 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3054
3055 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3056 Change type to std::string.
3057 (memory_map_start_property): Adjust.
3058 (memory_map_end_property): Adjust.
3059
3060 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3061
3062 * infrun.h: Include common/byte-vector.h.
3063 (struct displaced_step_closure): New struct.
3064 (struct buf_displaced_step_closure): New struct.
3065 * infrun.c (displaced_step_closure::~displaced_step_closure):
3066 Provide default implementation.
3067 (displaced_step_clear): Deallocate step closure with delete.
3068 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3069 (aarch64_displaced_step_closure): ... this, extend
3070 displaced_step_closure.
3071 (aarch64_displaced_step_data) <dsc>: Change type to
3072 aarch64_displaced_step_closure.
3073 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3074 unique_ptr.
3075 (aarch64_displaced_step_fixup): Add cast for displaced step
3076 closure.
3077 * amd64-tdep.c (displaced_step_closure): Rename to ...
3078 (amd64_displaced_step_closure): ... this, extend
3079 displaced_step_closure.
3080 <insn_buf>: Change type to std::vector<gdb_byte>.
3081 <max_len>: Remove.
3082 (fixup_riprel): Change type of DSC parameter, adjust to type
3083 change of insn_buf.
3084 (fixup_displaced_copy): Change type of DSC parameter.
3085 (amd64_displaced_step_copy_insn): Instantiate
3086 amd64_displaced_step_closure.
3087 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3088 to type change of insn_buf.
3089 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3090 parameter DSC.
3091 (arm_linux_copy_svc): Likewise.
3092 (cleanup_kernel_helper_return): Likewise.
3093 (arm_catch_kernel_helper_return): Likewise.
3094 (arm_linux_displaced_step_copy_insn): Instantiate
3095 arm_displaced_step_closure.
3096 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3097 (displaced_read_reg): Change type of parameter DSC.
3098 (branch_write_pc): Likewise.
3099 (load_write_pc): Likewise.
3100 (alu_write_pc): Likewise.
3101 (displaced_write_reg): Likewise.
3102 (arm_copy_unmodified): Likewise.
3103 (thumb_copy_unmodified_32bit): Likewise.
3104 (thumb_copy_unmodified_16bit): Likewise.
3105 (cleanup_preload): Likewise.
3106 (install_preload): Likewise.
3107 (arm_copy_preload): Likewise.
3108 (thumb2_copy_preload): Likewise.
3109 (install_preload_reg): Likewise.
3110 (arm_copy_preload_reg): Likewise.
3111 (cleanup_copro_load_store): Likewise.
3112 (install_copro_load_store): Likewise.
3113 (arm_copy_copro_load_store) Likewise.
3114 (thumb2_copy_copro_load_store): Likewise.
3115 (cleanup_branch): Likewise.
3116 (install_b_bl_blx): Likewise.
3117 (arm_copy_b_bl_blx): Likewise.
3118 (thumb2_copy_b_bl_blx): Likewise.
3119 (thumb_copy_b): Likewise.
3120 (install_bx_blx_reg): Likewise.
3121 (arm_copy_bx_blx_reg): Likewise.
3122 (thumb_copy_bx_blx_reg): Likewise.
3123 (cleanup_alu_imm): Likewise.
3124 (arm_copy_alu_imm): Likewise.
3125 (thumb2_copy_alu_imm): Likewise.
3126 (cleanup_alu_reg): Likewise.
3127 (install_alu_reg): Likewise.
3128 (arm_copy_alu_reg): Likewise.
3129 (thumb_copy_alu_reg): Likewise.
3130 (cleanup_alu_shifted_reg): Likewise.
3131 (install_alu_shifted_reg): Likewise.
3132 (arm_copy_alu_shifted_reg): Likewise.
3133 (cleanup_load): Likewise.
3134 (cleanup_store): Likewise.
3135 (arm_copy_extra_ld_st): Likewise.
3136 (install_load_store): Likewise.
3137 (thumb2_copy_load_literal): Likewise.
3138 (thumb2_copy_load_reg_imm): Likewise.
3139 (arm_copy_ldr_str_ldrb_strb): Likewise.
3140 (cleanup_block_load_all): Likewise.
3141 (cleanup_block_store_pc): Likewise.
3142 (cleanup_block_load_pc): Likewise.
3143 (arm_copy_block_xfer): Likewise.
3144 (thumb2_copy_block_xfer): Likewise.
3145 (cleanup_svc): Likewise.
3146 (install_svc): Likewise.
3147 (arm_copy_svc): Likewise.
3148 (thumb_copy_svc): Likewise.
3149 (arm_copy_undef): Likewise.
3150 (thumb_32bit_copy_undef): Likewise.
3151 (arm_copy_unpred): Likewise.
3152 (arm_decode_misc_memhint_neon): Likewise.
3153 (arm_decode_unconditional): Likewise.
3154 (arm_decode_miscellaneous): Likewise.
3155 (arm_decode_dp_misc): Likewise.
3156 (arm_decode_ld_st_word_ubyte): Likewise.
3157 (arm_decode_media): Likewise.
3158 (arm_decode_b_bl_ldmstm): Likewise.
3159 (arm_decode_ext_reg_ld_st): Likewise.
3160 (thumb2_decode_dp_shift_reg): Likewise.
3161 (thumb2_decode_ext_reg_ld_st): Likewise.
3162 (arm_decode_svc_copro): Likewise.
3163 (thumb2_decode_svc_copro): Likewise.
3164 (install_pc_relative): Likewise.
3165 (thumb_copy_pc_relative_16bit): Likewise.
3166 (thumb_decode_pc_relative_16bit): Likewise.
3167 (thumb_copy_pc_relative_32bit): Likewise.
3168 (thumb_copy_16bit_ldr_literal): Likewise.
3169 (thumb_copy_cbnz_cbz): Likewise.
3170 (thumb2_copy_table_branch): Likewise.
3171 (cleanup_pop_pc_16bit_all): Likewise.
3172 (thumb_copy_pop_pc_16bit): Likewise.
3173 (thumb_process_displaced_16bit_insn): Likewise.
3174 (decode_thumb_32bit_ld_mem_hints): Likewise.
3175 (thumb_process_displaced_32bit_insn): Likewise.
3176 (thumb_process_displaced_insn): Likewise.
3177 (arm_process_displaced_insn): Likewise.
3178 (arm_displaced_init_closure): Likewise.
3179 (arm_displaced_step_fixup): Add cast for closure.
3180 * arm-tdep.h: Include infrun.h.
3181 (displaced_step_closure): Rename to ...
3182 (arm_displaced_step_closure): ... this, extend
3183 displaced_step_closure.
3184 <u::svc::copy_svc_os>: Change type of parameter DSC.
3185 <cleanup>: Likewise.
3186 (arm_process_displaced_insn): Likewise.
3187 (arm_displaced_init_closure): Likewise.
3188 (displaced_read_reg): Likewise.
3189 (displaced_write_reg): Likewise.
3190 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3191 Adjust.
3192 * i386-tdep.h: Include infrun.h.
3193 (i386_displaced_step_closure): New typedef.
3194 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3195 i386_displaced_step_closure.
3196 (i386_displaced_step_fixup): Adjust.
3197 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3198 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3199 and unique_ptr.
3200 (ppc_displaced_step_fixup): Adjust.
3201 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3202 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3203 and unique_ptr.
3204 (s390_displaced_step_fixup): Adjust.
3205
3206 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3207
3208 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3209 Remove declarations.
3210
3211 2017-10-20 Tom Tromey <tom@tromey.com>
3212
3213 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3214 std::vector.
3215 (gdb_bfd_record_inclusion): Update.
3216 (bfdp): Remove typedef.
3217
3218 2017-10-20 Tom Tromey <tom@tromey.com>
3219
3220 * gdb_bfd.c (gdb_bfd_ref): Use new.
3221 (struct gdb_bfd_data): Add constructor, destructor, and member
3222 initializers.
3223 (gdb_bfd_unref): Use delete.
3224
3225 2017-10-20 Tom Tromey <tom@tromey.com>
3226
3227 * exec.c (exec_file_attach): Use new_bfd_ref.
3228 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3229 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3230 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3231 new_bfd_ref.
3232 * gdb_bfd.h (new_bfd_ref): New function.
3233
3234 2017-10-20 Pedro Alves <palves@redhat.com>
3235
3236 * main.c (captured_command_loop): Add attribute noinline.
3237
3238 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3239
3240 * interps.c (struct interp_factory): Add constructor.
3241 (interp_factory_p): Remove typedef.
3242 (DEF_VEC_P(interp_factory_p)): Remove.
3243 (interpreter_factories): Change type to std::vector.
3244 (interp_factory_register): Adjust.
3245 (interp_lookup): Adjust.
3246 (interpreter_completer): Adjust.
3247
3248 2017-10-19 Tom Tromey <tom@tromey.com>
3249
3250 * break-catch-syscall.c (catch_syscall_completer): Use
3251 std::string, gdb::unique_xmalloc_ptr.
3252
3253 2017-10-19 Tom Tromey <tom@tromey.com>
3254
3255 * infcall.c (call_function_by_hand_dummy): Use std::string.
3256
3257 2017-10-19 Tom Tromey <tom@tromey.com>
3258
3259 * mi/mi-main.c (mi_cmd_execute): Update.
3260 * top.h (prepare_execute_command): Return scoped_value_mark.
3261 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3262 Add move constructor.
3263 * top.c (prepare_execute_command): Return scoped_value_mark.
3264 (execute_command): Update.
3265
3266 2017-10-19 Pedro Alves <palves@redhat.com>
3267
3268 * xml-support.c (xml_fetch_content_from_file): Check fread's
3269 return.
3270
3271 2017-10-19 Pedro Alves <palves@redhat.com>
3272
3273 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3274 async.
3275 (handle_error_fd): New function.
3276 (ser_base_async): Add/delete an event loop file handler for
3277 error_fd.
3278
3279 2017-10-19 Pedro Alves <palves@redhat.com>
3280
3281 * xml-support.c (xml_fetch_content_from_file): Don't read in
3282 chunks. Instead use fseek to determine the file's size, and read
3283 it in one go.
3284
3285 2017-11-18 Keith Seitz <keiths@redhat.com>
3286
3287 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3288 types.
3289 Add whitespace to front of type name.
3290
3291 2017-10-18 Keith Seitz <keiths@redhat.com>
3292
3293 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3294 DW_AT_accessibility.
3295
3296 2017-10-18 Yao Qi <yao.qi@linaro.org>
3297
3298 * features/tic6x-c62x-linux.c: Remove.
3299
3300 2017-10-17 Tom Tromey <tom@tromey.com>
3301
3302 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3303 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3304 (do_mixed_source_and_assembly): Likewise.
3305
3306 2017-10-17 Tom Tromey <tom@tromey.com>
3307
3308 * regcache.c (regcache::xfer_part): Remove assertion.
3309
3310 2017-10-17 Pedro Alves <palves@redhat.com>
3311
3312 * xml-support.c (xml_fetch_content_from_file): Call
3313 unique_ptr::release() instead unique_ptr::get() when passing
3314 through xrealloc.
3315
3316 2017-10-17 Yao Qi <yao.qi@linaro.org>
3317
3318 * regcache.c (regcache::xfer_part): Remove parameters read and
3319 write, add parameter is_raw. All callers are updated.
3320
3321 2017-10-16 Keith Seitz <keiths@redhat.com>
3322
3323 * c-typeprint.c (enum access_specifier): Moved here from
3324 c_type_print_base.
3325 (output_access_specifier): New function.
3326 (c_type_print_base): Consider typedefs when assessing
3327 whether access labels are needed.
3328 Use output_access_specifier as needed.
3329 Output access specifier for typedefs, if needed.
3330 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3331 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3332 fields.
3333 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3334 accessor macros.
3335
3336 2017-10-16 Tom Tromey <tom@tromey.com>
3337
3338 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3339 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3340 * target.c (target_fileio_read_stralloc): Update.
3341 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3342 * target.h (target_fileio_read_stralloc): Return
3343 unique_xmalloc_ptr.
3344
3345 2017-10-16 Tom Tromey <tom@tromey.com>
3346
3347 * xml-syscall.c (xml_init_syscalls_info): Update.
3348 * xml-support.c (xinclude_start_include): Update.
3349 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3350 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3351 (xml_fetch_content_from_file): Likewise.
3352 * osdata.c (get_osdata): Update.
3353 * target.h (target_read_stralloc, target_get_osdata): Return
3354 unique_xmalloc_ptr.
3355 * solib-aix.c (solib_aix_get_library_list): Update.
3356 * solib-target.c (solib_target_current_sos): Update.
3357 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3358 * xml-tdesc.c (fetch_available_features_from_target): Update.
3359 (target_fetch_description_xml): Update.
3360 (file_read_description_xml): Update.
3361 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3362 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3363 (remote_pid_to_exec_file): Update.
3364 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3365 (target_get_osdata): Likewise.
3366
3367 2017-10-16 Tom Tromey <tom@tromey.com>
3368
3369 * remote.c (remote_register_number_and_offset): Use std::vector.
3370 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3371 (putpkt_binary): Use gdb::def_vector.
3372 (compare_sections_command): Use gdb::byte_vector.
3373
3374 2017-10-16 Tom Tromey <tom@tromey.com>
3375
3376 * ppc-linux-nat.c (hwdebug_insert_point): Use
3377 gdb::unique_xmalloc_ptr, XDUP.
3378
3379 2017-10-16 Tom Tromey <tom@tromey.com>
3380
3381 * probe.c (parse_probes): Use std::string.
3382 (info_probes_for_ops, enable_probes_command)
3383 (disable_probes_command): Remove cleanups.
3384
3385 2017-10-16 Tom Tromey <tom@tromey.com>
3386
3387 * buildsym.c (block_compar): Remove.
3388 (end_symtab_get_static_block): Use std::vector.
3389
3390 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3391
3392 * memrange.h (struct mem_range): Define operator< and operator==.
3393 (mem_range_s): Remove.
3394 (DEF_VEC_O (mem_range_s)): Remove.
3395 (normalize_mem_ranges): Change parameter type to std::vector.
3396 * memrange.c (compare_mem_ranges): Remove.
3397 (normalize_mem_ranges): Change parameter type to std::vector,
3398 adjust to vector change.
3399 * exec.c (section_table_available_memory): Return vector, remove
3400 parameter.
3401 (section_table_read_available_memory): Adjust to std::vector
3402 change.
3403 * remote.c (remote_read_bytes): Adjust to std::vector
3404 change.
3405 * tracepoint.h (traceframe_available_memory): Change parameter
3406 type to std::vector.
3407 * tracepoint.c (traceframe_available_memory): Change parameter
3408 type to std::vector, adjust.
3409 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3410 std::vector change.
3411 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3412 unittests/memrange-selftests.c.
3413 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3414 * gdb/unittests/memrange-selftests.c: New file.
3415
3416 2017-10-16 Pedro Alves <palves@redhat.com>
3417
3418 * elfread.c (probe_key_free): Rename range-for variable.
3419 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3420 (find_probe_by_pc, collect_probes): Rename range-for variable.
3421
3422 2017-10-16 Yao Qi <yao.qi@linaro.org>
3423
3424 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3425 * features/tic6x-c62x.c: Remove.
3426 * features/tic6x-c64x-linux.c: Remove.
3427 * features/tic6x-c64x.c: Remove.
3428 * features/tic6x-c64xp-linux.c: Remove.
3429 * features/tic6x-c64xp.c: Remove.
3430 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3431 initialize_tdesc_tic6x_*_linux functions.
3432 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3433 initialize_tdesc_tic6x_* functions.
3434
3435 2017-10-16 Yao Qi <yao.qi@linaro.org>
3436
3437 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3438 tic6x-c62x.
3439 * regformats/tic6x-c62x.dat: Remove.
3440 * regformats/tic6x-c64x.dat: Remove.
3441 * regformats/tic6x-c64xp.dat: Remove.
3442
3443 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3444
3445 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3446 (the !HAVE_LIBEXPAT version).
3447
3448 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3449
3450 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3451 const.
3452
3453 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3454
3455 * target.h: Include tracepoint.h.
3456 (enum trace_find_type): Move to tracepoint.h.
3457 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3458 * tracepoint.h: Don't include target.h
3459 (enum trace_find_type): Move from target.h.
3460 (parse_traceframe_info): Return a unique ptr.
3461 * tracepoint.c (current_traceframe_info): Change type to unique
3462 ptr.
3463 (free_traceframe_info): Remove.
3464 (clear_traceframe_info): Don't manually free
3465 current_traceframe_info.
3466 (free_result): Remove.
3467 (parse_traceframe_info): Return a unique ptr.
3468 (get_traceframe_info): Adjust to unique ptr.
3469 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3470 * remote.c (remote_traceframe_info): Return a unique ptr.
3471 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3472 ptr.
3473 * target-debug.h (target_debug_print_traceframe_info_up): New
3474 macro.
3475 * target-delegates.c: Regenerate.
3476
3477 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3478
3479 * memrange.h (struct mem_range): Add constructors.
3480 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3481 std::vector<mem_range>.
3482 * tracepoint.c (free_traceframe_info): Don't manually free
3483 vector.
3484 (traceframe_info_start_memory): Adjust to vector change.
3485 (traceframe_available_memory): Likewise.
3486 * tracefile-tfile.c (build_traceframe_info): Likewise.
3487 * ctf.c (ctf_traceframe_info): Likewise.
3488
3489 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3490
3491 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3492 std::vector<int>.
3493 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3494 (traceframe_info_start_tvar): Adjust to vector change.
3495 (parse_traceframe_info): Allocate with new.
3496 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3497 vector change.
3498 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3499 change.
3500 tfile_traceframe_info): Allocate with new.
3501 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3502 change.
3503
3504 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3505
3506 * tracepoint.c (traceframe_info): Rename to...
3507 (current_traceframe_info): ...this.
3508 (clear_traceframe_info): Adjust.
3509 (get_traceframe_info): Adjust.
3510
3511 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3512
3513 * nat/linux-osdata.c: Include algorithm.
3514 (compare_processes): Remove.
3515 (struct pid_pgid_entry): New struct.
3516 (linux_xfer_osdata_processgroups): Use std::vector instead of
3517 XNEWVEC.
3518
3519 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3520
3521 * objfiles.h: Don't include symfile.h.
3522 (struct partial_symbol): Remove forward-declaration.
3523 (struct objfile) <global_psymbols, static_psymbols>: Change type
3524 to std::vector<partial_symbol *>.
3525 * objfiles.c (objfile::objfile): Don't memset those fields.
3526 (objfile::~objfile): Don't free those fields.
3527 * psympriv.h (struct psymbol_allocation_list): Remove
3528 forward-declaration.
3529 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3530 to std::vector.
3531 (start_psymtab_common): Change parameters to std::vector.
3532 * psymtab.c: Include algorithm.
3533 (require_partial_symbols): Call shrink_to_fit.
3534 (find_pc_sect_psymbol): Adjust to vector change.
3535 (match_partial_symbol): Likewise.
3536 (lookup_partial_symbol): Likewise.
3537 (psym_relocate): Likewise.
3538 (dump_psymtab): Likewise.
3539 (recursively_search_psymtabs): Likewise.
3540 (compare_psymbols): Remove.
3541 (sort_pst_symbols): Adjust to vector change.
3542 (start_psymtab_common): Likewise.
3543 (end_psymtab_common): Likewise.
3544 (psymbol_bcache_full): De-constify return value.
3545 (add_psymbol_to_bcache): Likewise.
3546 (extend_psymbol_list): Remove.
3547 (append_psymbol_to_list): Adjust to vector change.
3548 (add_psymbol_to_list): Likewise.
3549 (init_psymbol_list): Likewise.
3550 (maintenance_info_psymtabs): Likewise.
3551 (maintenance_check_psymtabs): Likewise.
3552 * symfile.h (struct psymbol_allocation_list): Remove.
3553 * symfile.c (reread_symbols): Adjust to vector change.
3554 * dbxread.c (start_psymtab): Change type of parameters.
3555 (dbx_symfile_read): Adjust to vector change.
3556 (read_dbx_symtab): Likewise.
3557 (start_psymtab): Change type of parameters.
3558 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3559 (create_partial_symtab): Likewise.
3560 (add_partial_symbol): Likewise.
3561 (write_one_signatured_type): Likewise.
3562 (recursively_write_psymbols): Likewise.
3563 * mdebugread.c (parse_partial_symbols): Likewise.
3564 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3565 (scan_xcoff_symtab): Adjust to vector change.
3566 (xcoff_initial_scan): Likewise.
3567
3568 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3569
3570 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3571
3572 2017-10-13 Yao Qi <yao.qi@linaro.org>
3573
3574 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3575 Remove s390x-*-expedite, add s390x-expedite.
3576
3577 2017-10-13 Yao Qi <yao.qi@linaro.org>
3578
3579 * features/s390-gs-linux64.c: Regenerated.
3580 * features/s390x-gs-linux64.c: Regenerated.
3581
3582 2017-10-13 Tom Tromey <tom@tromey.com>
3583
3584 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3585 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3586 delete.
3587 * symfile.c (symbol_file_add_with_addrs): Use new.
3588 (symbol_file_add_separate): Update comment.
3589 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3590 * jit.c (jit_object_close_impl): Use new.
3591 (jit_unregister_code): Use delete.
3592 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3593 (~objfile): Rename from free_objfile.
3594 (free_objfile_separate_debug, do_free_objfile_cleanup)
3595 (free_all_objfiles, objfile_purge_solibs): Use delete.
3596 * objfiles.h (struct objfile): Add constructor and destructor.
3597 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3598 (allocate_objfile, free_objfile): Don't declare.
3599 (struct objstats): Add initializers.
3600
3601 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3602
3603 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3604 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3605 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3606 * gdbarch.h: Regenerate.
3607 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3608 Adjust comment.
3609 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3610 (i386_displaced_step_fixup): Adjust comment.
3611 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3612
3613 2017-10-12 Tom Tromey <tom@tromey.com>
3614
3615 * prologue-value.h (pv_area::store_would_trash): Return bool.
3616 (pv_area::find_reg): Likewise.
3617 * prologue-value.c (pv_area::store_would_trash): Return bool.
3618 (pv_area::find_reg): Likewise.
3619
3620 2017-10-12 Tom Tromey <tom@tromey.com>
3621
3622 * s390-linux-tdep.c (s390_store, s390_load)
3623 (s390_check_for_saved, s390_analyze_prologue): Update.
3624 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3625 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3626 * prologue-value.h (class pv_area): Move from prologue-value.c.
3627 Change names of members. Add constructor, destructor, member
3628 functions.
3629 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3630 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3631 (pv_area_fetch, pv_area_scan): Don't declare.
3632 * prologue-value.c (struct pv_area::area_entry): Now member of
3633 pv_area.
3634 (struct pv_area): Move to prologue-value.h.
3635 (pv_area::pv_area): Rename from make_pv_area.
3636 (pv_area::~pv_area): Rename from free_pv_area.
3637 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3638 (clear_entries, find_entry, overlaps, store_would_trash, store)
3639 (fetch, find_reg, scan): Now member of pv_area.
3640 Remove "area" argument. Update.
3641 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3642 Update.
3643 * mn10300-tdep.c (push_reg, check_for_saved)
3644 (mn10300_analyze_prologue): Update.
3645 * mep-tdep.c (is_arg_spill, check_for_saved)
3646 (mep_analyze_prologue): Update.
3647 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3648 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3649 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3650 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3651 Update.
3652 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3653 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3654
3655 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3656
3657 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3658 * linux-nat.c (linux_nat_delete_thread): New variable.
3659 (lwp_free): Invoke linux_nat_delete_thread if set.
3660 (linux_nat_set_delete_thread): New function.
3661 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3662 thread delete callback.
3663 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3664 (_initialize_arm_linux_nat): Assign thread delete callback.
3665 * s390-linux-nat.c (s390_delete_thread): New function.
3666 (_initialize_s390_nat): Assign thread delete callback.
3667 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3668 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3669 function.
3670 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3671 declaration.
3672 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3673 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3674
3675 2017-10-09 Tom Tromey <tom@tromey.com>
3676
3677 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3678 std::string.
3679 * tui/tui-layout.c (enum tui_status): Use std::string.
3680
3681 2017-10-11 Tom Tromey <tom@tromey.com>
3682
3683 * gdbthread.h (thread_command): Constify.
3684 * inferior.h (detach_command): Constify.
3685 * top.h (set_history, show_history): Constify.
3686 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3687 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3688 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3689 * printcmd.c (set_command): Constify.
3690 (non_const_set_command): New function.
3691 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3692 * breakpoint.c (enable_command, disable_command, delete_command)
3693 (catch_command, tcatch_command, set_breakpoint_cmd)
3694 (show_breakpoint_cmd): Constify.
3695 * macrocmd.c (macro_command): Constify.
3696 * infcmd.c (unset_command, kill_command, detach_command)
3697 (info_proc_cmd): Constify.
3698 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3699 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3700 (info_auto_load_cmd): Constify.
3701 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3702 (unset_tdesc_cmd): Constify.
3703 * ada-lang.c (set_ada_command, show_ada_command)
3704 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3705 * guile/guile.c (set_guile_command, show_guile_command)
3706 (info_guile_command): Constify.
3707 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3708 Constify.
3709 * skip.c (skip_command): Constify.
3710 * compile/compile.c (_initialize_compile): Constify.
3711 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3712 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3713 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3714 (maint_btrace_pt_show_cmd): Constify.
3715 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3716 Constify.
3717 * python/python.c (user_show_python, user_set_python): Constify.
3718 * mips-tdep.c (set_mips_command, show_mips_command)
3719 (set_mipsfpu_command): Constify.
3720 * record-btrace.c (cmd_record_btrace_start)
3721 (cmd_set_record_btrace, cmd_show_record_btrace)
3722 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3723 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3724 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3725 Constify.
3726 * symfile.c (overlay_command): Constify.
3727 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3728 * cli/cli-logging.c (set_logging_command, show_logging_command):
3729 Constify.
3730 * cli/cli-dump.c (dump_command, append_command)
3731 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3732 (tekhex_dump_command, binary_dump_command)
3733 (binary_append_command): Constify.
3734 * cli/cli-decode.c (struct cmd_list_element): Change type of
3735 "fun".
3736 * cli/cli-cmds.c (info_command, show_command, set_debug)
3737 (show_debug): Constify.
3738 (show_command): Add non-const overload.
3739 * top.c (set_history, show_history): Constify.
3740 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3741 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3742 * target.c (target_command): Constify.
3743 * sparc64-tdep.c (info_adi_command): Constify.
3744 * record-full.c (cmd_record_full_start): Constify.
3745 (set_record_full_command): Constify. Fix typo.
3746 (show_record_full_command): Constify.
3747 * thread.c (thread_command, thread_apply_command): Constify.
3748 * memattr.c (dummy_cmd): Constify.
3749 * value.c (function_command): Constify.
3750 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3751 * probe.c (info_probes_command): Constify.
3752 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3753 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3754 (show_thread_cmd, set_thread_default_cmd)
3755 (show_thread_default_cmd): Constify.
3756 (check_empty): Constify.
3757 * tracepoint.c (tfind_command): Constify.
3758 * cp-support.c (maint_cplus_command): Constify.
3759 * windows-tdep.c (info_w32_command): Constify.
3760 * record.c (cmd_record_start, set_record_command)
3761 (show_record_command, info_record_command, cmd_record_goto):
3762 Constify.
3763 * ravenscar-thread.c (set_ravenscar_command)
3764 (show_ravenscar_command): Constify.
3765 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3766 Constify.
3767 (add_internal_problem_command): Remove casts.
3768 * arc-tdep.c (maintenance_print_arc_command): Constify.
3769 * valprint.c (set_print, show_print, set_print_raw)
3770 (show_print_raw): Constify.
3771 * maint.c (maintenance_command, maintenance_info_command)
3772 (maintenance_print_command, maintenance_set_cmd)
3773 (maintenance_show_cmd, set_per_command_cmd)
3774 (show_per_command_cmd, maintenance_check_command): Constify.
3775 * language.c (set_check, show_check): Constify.
3776 * typeprint.c (show_print_type, set_print_type): Constify.
3777 * go32-nat.c (go32_info_dos_command): Constify.
3778
3779 2017-10-11 Tom Tromey <tom@tromey.com>
3780
3781 * breakpoint.c (prepare_re_set_context): Remove.
3782 (breakpoint_re_set_one): Update. Don't use cleanups.
3783 (breakpoint_re_set): Use scoped_restore, std::string, and
3784 scoped_restore_current_language.
3785
3786 2017-10-11 Tom Tromey <tom@tromey.com>
3787
3788 * breakpoint.c (commands_command_1): Use std::string.
3789 (cleanup_executing_breakpoints): Remove.
3790 (bpstat_do_actions_1): Use scoped_restore.
3791 (bpstat_check_watchpoint): Use std::string.
3792 (decode_static_tracepoint_spec): Likewise.
3793 (break_range_command): Likewise.
3794 (watch_command_1): Likewise.
3795 (compare_breakpoints): Change argument types.
3796 (clear_command): Use std::vector.
3797 (cleanup_executing_breakpoints): Remove.
3798 (update_global_location_list): Use unique_xmalloc_ptr.
3799 (strace_command): Remove unused declaration.
3800
3801 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3802
3803 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3804 * NEWS: Mention new FreeBSD/arm native configuration.
3805 * configure.host: Add arm*-*-freebsd*.
3806 * configure.nat: Likewise.
3807 * arm-fbsd-nat.c: New file.
3808
3809 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3810
3811 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3812 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3813 * NEWS: Mention new FreeBSD/arm target.
3814 * configure.tgt: Add arm*-*-freebsd*.
3815 * arm-fbsd-tdep.c: New file.
3816 * arm-fbsd-tdep.h: New file.
3817
3818 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3819
3820 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3821 `gdbarch_elfcore_write_linux_prpsinfo'.
3822 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3823 method.
3824 (elf_internal_linux_prpsinfo): Remove declaration.
3825 * gdbarch.h: Regenerate.
3826 * gdbarch.c: Regenerate.
3827
3828 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3829
3830 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3831 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3832
3833 2017-10-11 Pedro Alves <palves@redhat.com>
3834
3835 * breakpoint.c (reattach_breakpoints): Delete.
3836 * breakpoint.h (reattach_breakpoints): Delete.
3837
3838 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3839
3840 * symfile.c (registered_sym_fns): Make struct, not typedef.
3841 (DEF_VEC_O (registered_sym_fns)): Remove.
3842 (symtab_fns): Change type to std::vector.
3843 (add_symtab_fns): Adjust.
3844 (find_sym_fns): Adjust.
3845
3846 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3847
3848 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3849 * arc-tdep.h (arc_arch_is_em): New function.
3850 (arc_arch_is_hs): Likewise.
3851
3852 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3853
3854 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3855 parentheses in the declaration.
3856 (macro_lookup_inclusion): Likewise.
3857 (macro_lookup_definition): Likewise.
3858 * p-lang.h (pascal_builtin_types): Likewise.
3859 * tui/tui-data.c (tui_win_list): Likewise.
3860 * tui/tui-data.h (tui_win_list): Likewise.
3861 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3862
3863 2017-10-11 Mark Rages <markrages@gmail.com>
3864
3865 * target-memory.c (block_boundaries): Fix for block address not
3866 aligned on block size.
3867
3868 2017-10-10 Pedro Alves <palves@redhat.com>
3869 Tom Tromey <tom@tromey.com>
3870
3871 * breakpoint.c (struct captured_breakpoint_query_args)
3872 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3873 (print_breakpoint): New.
3874 * breakpoint.h (print_breakpoint): Declare.
3875 * common/common-exceptions.h (enum return_reason): Remove
3876 references to catch_exceptions.
3877 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3878 Delete.
3879 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3880 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3881 * gdb.h: Delete.
3882 * gdbthread.h (thread_select): Declare.
3883 * mi/mi-cmd-break.c: Don't include gdb.h.
3884 (breakpoint_notify): Use print_breakpoint.
3885 * mi/mi-cmd-catch.c: Don't include gdb.h.
3886 * mi/mi-interp.c: Don't include gdb.h.
3887 (mi_print_breakpoint_for_event): New.
3888 (mi_breakpoint_created, mi_breakpoint_modified): Use
3889 mi_print_breakpoint_for_event.
3890 * mi/mi-main.c: Don't include gdb.h.
3891 (mi_cmd_thread_select): Parse the global thread ID here. Use
3892 thread_select instead of gdb_thread_select.
3893 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3894 of using gdb_list_thread_ids.
3895 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3896 FILEIO_ENOSYS here.
3897 (remote_fileio_request): Use TRY/CATCH instead of
3898 catch_exceptions.
3899 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3900 (symbol_file_add_from_memory_wrapper): Delete.
3901 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3902 * thread.c: Don't include gdb.h.
3903 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3904 (thread_alive): Use thread_select.
3905 (do_captured_thread_select): Delete, parts salvaged as ...
3906 (thread_select): ... this new function.
3907 (gdb_thread_select): Delete.
3908
3909 2017-10-10 Pedro Alves <palves@redhat.com>
3910 Tom Tromey <tom@tromey.com>
3911
3912 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3913 and reverse logic.
3914 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3915 No longer macros. Instead ...
3916 (enum wp_check_result): They're now values of this new
3917 enumeration.
3918 (watchpoint_check): Change return type to wp_check_result and
3919 parameter type to bpstat.
3920 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3921 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3922 catch_errors. Reverse logic of watchpoint_check call.
3923 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3924 pointer as parameter.
3925 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3926 * common/common-exceptions.c (throw_exception_sjlj): Update
3927 comments to avoid mentioning catch_errors.
3928 * exceptions.c (catch_errors): Delete.
3929 * exceptions.h: Update comments to avoid mentioning catch_errors.
3930 (catch_errors_ftype, catch_errors): Delete.
3931 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3932 (hook_stop_stub): Delete.
3933 (restore_selected_frame): Change return type to void, and
3934 parameter type to const frame_id &.
3935 (restore_infcall_control_state): Use TRY/CATCH instead of
3936 catch_errors.
3937 * main.c (captured_command_loop): Return void and remove
3938 parameter. Remove references to catch_errors.
3939 (captured_main): Use TRY/CATCH instead of catch_errors.
3940 * objc-lang.c (objc_submethod_helper_data)
3941 (find_objc_msgcall_submethod_helper): Delete.
3942 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3943 catch_errors.
3944 * record-full.c (record_full_message): Return void.
3945 (record_full_message_args, record_full_message_wrapper): Delete.
3946 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3947 instead of catch_errors.
3948 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3949 parameter type to int.
3950 * solib-darwin.c (open_symbol_file_object): Ditto.
3951 * solib-dsbt.c (open_symbol_file_object): Ditto.
3952 * solib-frv.c (open_symbol_file_object): Ditto.
3953 * solib-svr4.c (open_symbol_file_object): Ditto.
3954 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3955 * solib.c (update_solib_list): Use TRY/CATCH instead of
3956 catch_errors.
3957 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3958 Change type.
3959 * symmisc.c (struct print_symbol_args): Remove.
3960 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3961 (print_symbol): Change type.
3962 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3963 and remove parameters.
3964 (catch_errors): New.
3965 (get_windows_debug_event): Adjust.
3966
3967 2017-10-09 Tom Tromey <tom@tromey.com>
3968
3969 * mi/mi-main.c (free_splay_tree): Remove.
3970 (list_available_thread_groups): Use splay_tree_up.
3971 * common/gdb_splay_tree.h: New file.
3972
3973 2017-10-09 Tom Tromey <tom@tromey.com>
3974
3975 * mi/mi-main.c (do_nothing): Remove.
3976 (list_available_thread_groups): Update.
3977
3978 2017-10-09 Pedro Alves <palves@redhat.com>
3979
3980 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3981 reading registers when switching context.
3982
3983 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3984
3985 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3986 (fbsd_convert_siginfo): Likewise.
3987 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3988
3989 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3990
3991 * configure.ac (try_guile_versions): Remove guile-2.2.
3992 * configure: Regenerate.
3993
3994 2017-10-09 Tom Tromey <tom@tromey.com>
3995
3996 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3997 (COMPILE.pre): Use $(CXX).
3998
3999 2017-10-09 Pedro Alves <palves@redhat.com>
4000
4001 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4002 Use bool.
4003 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4004 * cp-support.h (cp_remove_params): Now returns a
4005 gdb::unique_xmalloc_ptr.
4006 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4007 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4008 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4009 returning a gdb::unique_xmalloc_ptr.
4010 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4011 * stack.c (find_frame_funname): Adjust to cp_remove_params
4012 returning a gdb::unique_xmalloc_ptr.
4013
4014 2017-10-08 Tom Tromey <tom@tromey.com>
4015
4016 * dwarf2read.c (dwarf2_get_dwz_file): Use
4017 gdb::unique_xmalloc_ptr.
4018 (find_slot_in_mapped_hash): Likewise.
4019 (dwarf2_physname): Likewise.
4020 (create_dwo_unit_in_dwp_v1): Use std::string.
4021 (create_dwo_unit_in_dwp_v2): Likewise.
4022 (lookup_dwo_cutu): Likewise.
4023 (inherit_abstract_dies): Use std::vector.
4024 (read_array_type): Likewise.
4025 (dwarf_decode_macros): Remove unused declaration.
4026 (unsigned_int_compar): Remove.
4027 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4028 (psymtabs_addrmap_cleanup): Remove.
4029
4030 2017-10-08 Tom Tromey <tom@tromey.com>
4031
4032 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4033 * frame.h (frame_cleanup_after_sniffer): Declare.
4034 (frame_prepare_for_sniffer): Return void.
4035 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4036 type of argument.
4037 (frame_prepare_for_sniffer): Return void.
4038
4039 2017-10-08 Tom Tromey <tom@tromey.com>
4040
4041 * utils.h (make_cleanup_value_free): Remove.
4042 * utils.c (do_value_free, struct cleanup): Remove.
4043 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4044 Use gdb_value_up.
4045 * value.h (struct value_deleter): New.
4046 (gdb_value_up): New typedef.
4047
4048 2017-10-08 Tom Tromey <tom@tromey.com>
4049
4050 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4051 (make_cleanup_free_search_symbols): Remove.
4052 (search_symbols): Return std::vector.
4053 (symbol_search::compare_search_syms): Now member of
4054 symbol_search. Change arguments.
4055 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4056 (symtab_symbol_info, rbreak_command): Update.
4057 * symtab.h (struct symbol_search) <next>: Remove.
4058 Add constructors.
4059 (symbol_search::operator<): New function.
4060 (symbol_search::operator==): New function.
4061 (search_symbols): Remove std::vector.
4062 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4063 (symbol_search::compare_search_syms): Declare.
4064
4065 2017-10-06 Yao Qi <yao.qi@linaro.org>
4066
4067 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4068 arch/aarch64-insn.o.
4069 Remove one rule.
4070 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4071
4072 2017-10-06 Yao Qi <yao.qi@linaro.org>
4073
4074 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4075 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4076 arch/arm-linux.o respectively.
4077 * configure.tgt: Likewise.
4078
4079 2017-10-06 Yao Qi <yao.qi@linaro.org>
4080
4081 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4082 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4083
4084 2017-10-06 Pedro Alves <palves@redhat.com>
4085
4086 * windows-nat.c: Include <algorithm>.
4087
4088 2017-10-06 Yao Qi <yao.qi@linaro.org>
4089
4090 * configure.tgt (i386_tobjs): New variable.
4091 (amd64_tobjs): New variable.
4092 Set $cpu_obs and $os_obs.
4093
4094 2017-10-06 Yao Qi <yao.qi@linaro.org>
4095
4096 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4097 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4098 (clean): Remove object files and dependency files.
4099 (distclean): Remove the directory.
4100 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4101 * configure: Re-generated.
4102 * configure.tgt: Replace amd64.o with arch/amd64.o.
4103
4104 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4105
4106 PR build/22188
4107 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4108 and SETEND.
4109
4110 2017-10-05 Pedro Alves <palves@redhat.com>
4111
4112 * linux-nat.c (linux_child_follow_fork): When following the parent
4113 and detaching the child, consult the parent thread's architecture
4114 instead of the child's.
4115
4116 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4117
4118 * ax.h: Do not include "doublest.h".
4119 (union agent_val): Remove.
4120
4121 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4122
4123 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4124 (decimal_to_string): Return std::string object.
4125 (decimal_from_string): Accept std::string object. Return bool.
4126 (decimal_from_integral, decimal_from_doublest): Remove.
4127 (decimal_from_longest): Add prototype.
4128 (decimal_from_ulongest): Likewise.
4129 (decimal_to_longest): Likewise.
4130 (decimal_from_doublest): Likewise.
4131 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4132 (MAX_DECIMAL_STRING): Move here.
4133 (decimal_to_string): Return std::string object.
4134 (decimal_from_string): Accept std::string object. Return bool.
4135 (decimal_from_integral): Remove, replace by ...
4136 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4137 (decimal_to_longest): New function.
4138 (decimal_from_floating): Remove, replace by ...
4139 (decimal_from_doublest): ... this new function.
4140 (decimal_to_doublest): Update to new decimal_to_string interface.
4141
4142 * value.c (unpack_long): Use decimal_to_longest.
4143 * valops.c (value_cast): Use decimal_from_doublest instead of
4144 decimal_from_floating. Use decimal_from_[u]longest isntead of
4145 decimal_from_integral.
4146 * valarith.c (value_args_as_decimal): Likewise.
4147 * valprint.c (print_decimal_floating): Update to new
4148 decimal_to_string interface.
4149 * printcmd.c (printf_decfloat): Likewise.
4150 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4151
4152 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4153
4154 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4155 * gdbtypes.c: Include "floatformat.h".
4156 * value.c: Likewise.
4157 * m68k-tdep.c: Likewise.
4158
4159 * findvar.c: Do not include "floatformat.h".
4160 * amd64-darwin-tdep.c: Likewise.
4161 * arm-linux-tdep.c: Likewise.
4162 * i386-darwin-tdep.c: Likewise.
4163 * i387-tdep.c: Likewise.
4164 * m68k-linux-tdep.c: Likewise.
4165 * mep-tdep.c: Likewise.
4166 * mips-tdep.c: Likewise.
4167 * nios2-tdep.c: Likewise.
4168 * s390-linux-tdep.c: Likewise.
4169 * sparc-obsd-tdep.c: Likewise.
4170 * sparc-tdep.c: Likewise.
4171 * sparc64-tdep.c: Likewise.
4172 * spu-tdep.c: Likewise.
4173 * tic6x-tdep.c: Likewise.
4174 * tilegx-tdep.c: Likewise.
4175 * vax-tdep.c: Likewise.
4176 * xstormy16-tdep.c: Likewise.
4177 * xtensa-tdep.c: Likewise.
4178
4179 * top.c: Do not include "doublest.h".
4180 * aarch64-tdep.c: Likewise.
4181 * alpha-tdep.c: Likewise.
4182 * arm-linux-tdep.c: Likewise.
4183 * m68k-linux-tdep.c: Likewise.
4184 * tilegx-tdep.c: Likewise.
4185 * xstormy16-tdep.c: Likewise.
4186
4187 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4188
4189 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4190 (mipsn32_fbsd_sigframe): Define.
4191 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4192 for FreeBSD/mipsn32.
4193
4194 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4195
4196 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4197 AT_HWCAP.
4198
4199 2017-10-05 Tristan Gingold <tgingold@free.fr>
4200
4201 * MAINTAINERS (Misc): Update my email address.
4202
4203 2017-10-04 Pedro Alves <palves@redhat.com>
4204
4205 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4206 it instead of target_gdbarch.
4207 (get_remote_state, get_remote_packet_size): Adjust
4208 get_remote_arch_state calls, passing down target_gdbarch
4209 explicitly.
4210 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4211 'gdbarch' and use it instead of target_gdbarch.
4212 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4213 passing down target_gdbarch explicitly.
4214 (struct stop_reply) <arch>: New field.
4215 (remote_parse_stop_reply): Use the stopped thread's architecture,
4216 not the current inferior's. Save the architecture in the
4217 stop_reply.
4218 (process_stop_reply): Use the stop reply's architecture.
4219 (process_g_packet, remote_fetch_registers)
4220 (remote_prepare_to_store, store_registers_using_G)
4221 (remote_store_registers): Adjust get_remote_arch_state calls,
4222 using the regcache's architecture.
4223 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4224 passing down target_gdbarch explicitly.
4225 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4226 beneath instead of calling target_gdbarch.
4227 * target.c (default_thread_architecture): Use the specified
4228 inferior's architecture, instead of the current inferior's
4229 architecture (via target_gdbarch).
4230
4231 2017-10-04 Pedro Alves <palves@redhat.com>
4232
4233 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4234 case.
4235 (regcache_print): Handle !target_has_registers here instead.
4236
4237 2017-10-04 Pedro Alves <palves@redhat.com>
4238
4239 * frame.c (create_test_frame): Delete.
4240 * frame.h (create_test_frame): Delete.
4241 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4242 (class regcache_test): Delete.
4243 (test_target_has_registers, test_target_has_stack)
4244 (test_target_has_memory, test_target_prepare_to_store)
4245 (test_target_store_registers): New functions.
4246 (test_target_ops): New class.
4247 (register_to_value_test): Error out if there's already a
4248 process_stratum (or higher) target pushed. Create a fuller mock
4249 environment, with mock target_ops, inferior, address space, thread
4250 and inferior_ptid.
4251 * progspace.c (struct address_space): Move to ...
4252 * progspace.h (struct address_space): ... here.
4253 * regcache.h (regcache::~regcache, regcache::raw_write)
4254 [GDB_SELF_TEST]: No longer virtual.
4255
4256 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4257
4258 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4259
4260 2017-10-04 Pedro Alves <palves@redhat.com>
4261
4262 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4263 out of 'between TRY and CATCH'.
4264
4265 2017-10-04 Pedro Alves <palves@redhat.com>
4266
4267 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4268 * common/common-exceptions.h (TRY): Open an outermost scope.
4269 Expand intro comment.
4270 (CATCH): Reindent.
4271 (END_CATCH): Close the outermost scope.
4272 * completer.c (complete_line_internal): Add missing END_CATCH.
4273
4274 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4275
4276 * NEWS (Changes since GDB 8.0): Add entry about new
4277 'set-cwd-on-gdbserver' feature.
4278 (New remote packets): Add entry for QSetWorkingDir.
4279 * common/common-inferior.h (set_inferior_cwd): New prototype.
4280 * infcmd.c (set_inferior_cwd): Remove "static".
4281 (show_cwd_command): Expand text to include remote debugging.
4282 * remote.c: Add PACKET_QSetWorkingDir.
4283 (remote_protocol_features) <QSetWorkingDir>: New entry for
4284 PACKET_QSetWorkingDir.
4285 (extended_remote_set_inferior_cwd): New function.
4286 (extended_remote_create_inferior): Call
4287 "extended_remote_set_inferior_cwd".
4288 (_initialize_remote): Call "add_packet_config_cmd" for
4289 QSetWorkingDir.
4290
4291 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4292
4293 * NEWS (New commands): Mention "set/show cwd".
4294 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4295 "cd" command's help text.
4296 * common/common-inferior.h (get_inferior_cwd): New prototype.
4297 * infcmd.c (inferior_cwd_scratch): New global variable.
4298 (set_inferior_cwd): New function.
4299 (get_inferior_cwd): Likewise.
4300 (set_cwd_command): Likewise.
4301 (show_cwd_command): Likewise.
4302 (_initialize_infcmd): Add "set/show cwd" commands.
4303 * inferior.h (class inferior) <cwd>: New field.
4304 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4305 (fork_inferior): Change inferior's cwd before its execution.
4306 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4307 to CreateProcess.
4308
4309 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4310
4311 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4312 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4313 (COMMON_OBS): Add gdb_tilde_expand.o.
4314 * common/gdb_tilde_expand.c: New file.
4315 * common/gdb_tilde_expand.h: Likewise.
4316
4317 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4318
4319 * gdbarch.sh (objfile): Remove duplicate declaration.
4320 * gdbarch.h: Regenerate.
4321
4322 2017-10-03 Tom Tromey <tom@tromey.com>
4323
4324 * utils.c (internal_vproblem): Use string_vprintf.
4325
4326 2017-10-03 Tom Tromey <tom@tromey.com>
4327
4328 * printcmd.c (info_symbol_command): Use std::string.
4329
4330 2017-10-03 Tom Tromey <tom@tromey.com>
4331
4332 * top.c (gdb_safe_append_history): Use std::string.
4333
4334 2017-10-03 Tom Tromey <tom@tromey.com>
4335
4336 * event-top.c (stdin_event_handler): Update.
4337 * main.c (captured_main_1): Update.
4338 * top.h (make_delete_ui_cleanup): Remove.
4339 (struct ui): Add constructor and destructor.
4340 (new_ui, delete_ui): Remove.
4341 * top.c (make_delete_ui_cleanup): Remove.
4342 (new_ui_command): Use std::unique_ptr.
4343 (delete_ui_cleanup): Remove.
4344 (ui::ui): Rename from new_ui. Update.
4345 (free_ui): Remove.
4346 (ui::~ui): Rename from delete_ui. Update.
4347
4348 2017-10-03 Tom Tromey <tom@tromey.com>
4349
4350 * symfile.c (load_progress): Use gdb::byte_vector.
4351
4352 2017-10-03 Tom Tromey <tom@tromey.com>
4353
4354 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4355 declaration.
4356 * printcmd.c (x_command): Remove unused declaration.
4357 * symfile.c (symbol_file_command): Remove unused declaration.
4358
4359 2017-10-03 Tom Tromey <tom@tromey.com>
4360
4361 * utils.c (internal_vproblem): Use std::string.
4362 (defaulted_query): Likewise.
4363
4364 2017-10-03 Tom Tromey <tom@tromey.com>
4365
4366 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4367 * top.c (execute_command_to_string): Update.
4368 * utils.c (make_cleanup_restore_page_info): Remove.
4369 (do_restore_page_info_cleanup): Remove.
4370 (set_batch_flag_and_restore_page_info):
4371 New.
4372 (make_cleanup_restore_page_info): Remove.
4373 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4374 (~set_batch_flag_and_restore_page_info): New
4375 (make_cleanup_restore_uinteger): Remove.
4376 (make_cleanup_restore_integer): Remove.
4377 (struct restore_integer_closure): Remove.
4378 (restore_integer): Remove.
4379 * utils.h (struct set_batch_flag_and_restore_page_info): New
4380 class.
4381 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4382 (make_cleanup_restore_page_info): Remove.
4383 (make_cleanup_restore_uinteger) Remove.
4384 (make_cleanup_restore_integer) Remove.
4385
4386 2017-10-03 Tom Tromey <tom@tromey.com>
4387
4388 * record-full.h (record_full_gdb_operation_disable_set): Return
4389 scoped_restore_tmpl<int>.
4390 * infrun.c (adjust_pc_after_break): Update.
4391 (handle_signal_stop): Update.
4392 * record-full.c (record_full_gdb_operation_disable_set): Return
4393 scoped_restore_tmpl<int>.
4394 (record_full_wait_1, record_full_insert_breakpoint)
4395 (record_full_remove_breakpoint, record_full_save)
4396 (record_full_goto_insn): Update.
4397
4398 2017-10-02 Tom Tromey <tom@tromey.com>
4399
4400 PR rust/22236:
4401 * rust-lang.c (rust_val_print_str): New function.
4402 (val_print_struct): Call it.
4403 (rust_subscript): Preserve name of slice type.
4404
4405 2017-10-02 Tom Tromey <tom@tromey.com>
4406
4407 * rust-lang.c (rust_subscript): Handle slices in
4408 EVAL_AVOID_SIDE_EFFECTS case.
4409
4410 2017-10-02 Tom Tromey <tom@tromey.com>
4411
4412 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4413
4414 2017-10-02 Tom Tromey <tom@tromey.com>
4415
4416 * rust-lang.h (rust_slice_type): Add "extern".
4417
4418 2017-10-02 Tom Tromey <tom@tromey.com>
4419 Pedro Alves <palves@redhat.com>
4420
4421 * ada-lang.h (ada_exc_info::operator<): Make const.
4422 (ada_exc_info::operator==): Make const.
4423 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4424 Make const.
4425
4426 2017-09-29 Tom Tromey <tom@tromey.com>
4427
4428 * target.c (read_whatever_is_readable): Change type of "result".
4429 Update.
4430 (free_memory_read_result_vector): Remove.
4431 (read_memory_robust): Change return type. Update.
4432 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4433 bin2hex, std::string.
4434 * target.h (memory_read_result_s): Remove typedef.
4435 (free_memory_read_result_vector): Remove.
4436 (read_memory_robust): Return std::vector.
4437
4438 2017-09-29 Tom Tromey <tom@tromey.com>
4439
4440 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4441
4442 2017-09-29 Tom Tromey <tom@tromey.com>
4443
4444 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4445 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4446 operator< and operator==.
4447 (ada_exceptions_list): Return a std::vector.
4448 * ada-lang.c (ada_exc_info::operator<): Rename from
4449 compare_ada_exception_info.
4450 (ada_exc_info::operator==): New.
4451 (sort_remove_dups_ada_exceptions_list): Change type of
4452 "exceptions".
4453 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4454 (ada_add_global_exceptions): Likewise.
4455 (ada_exceptions_list_1): Return a std::vector.
4456 (ada_exceptions_list): Likewise.
4457
4458 2017-09-29 Tom Tromey <tom@tromey.com>
4459
4460 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4461 'std::set *'.
4462 (print_one_inferior): Update.
4463 (free_vector_of_ints): Remove.
4464 (list_available_thread_groups): Change "ids" to std::set.
4465 (mi_cmd_list_thread_groups): Update.
4466 (struct collect_cores_data) <core>: Now a std::set.
4467 (collect_cores): Update.
4468 (unique): Remove.
4469 (print_one_inferior): Update.
4470
4471 2017-09-29 Tom Tromey <tom@tromey.com>
4472
4473 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4474 (mi_execute_async_cli_command): Likewise.
4475 (mi_cmd_trace_frame_collected): Use field_fmt.
4476
4477 2017-09-29 Tom Tromey <tom@tromey.com>
4478
4479 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4480 gdb::byte_vector.
4481
4482 2017-09-29 Tom Tromey <tom@tromey.com>
4483
4484 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4485
4486 2017-09-29 Tom Tromey <tom@tromey.com>
4487
4488 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4489
4490 2017-09-29 Tom Tromey <tom@tromey.com>
4491
4492 * varobj.h (varobj_gen_name): Return std::string.
4493 * varobj.c (varobj_gen_name): Return std::string.
4494 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4495 (mi_cmd_var_delete): Don't copy "name".
4496
4497 2017-09-29 Tom Tromey <tom@tromey.com>
4498
4499 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4500 (mi_cmd_break_insert_1): Update.
4501
4502 2017-09-29 Tom Tromey <tom@tromey.com>
4503
4504 * target.h (make_scoped_defer_target_commit_resume): Update.
4505 * target.c (make_scoped_defer_target_commit_resume): Rename from
4506 make_cleanup_defer_target_commit_resume. Return a
4507 scoped_restore.
4508 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4509
4510 2017-09-29 Tom Tromey <tom@tromey.com>
4511
4512 * main.c (captured_main_1): Remove unused declaration.
4513 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4514
4515 2017-09-29 Tom Tromey <tom@tromey.com>
4516
4517 * symtab.c (search_symbols): Remove unused outer cleanup.
4518 (make_source_files_completion_list): Remove unused declaration.
4519
4520 2017-09-29 Tom Tromey <tom@tromey.com>
4521
4522 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4523
4524 2017-09-29 Tom Tromey <tom@tromey.com>
4525
4526 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4527 gdb::byte_vector.
4528
4529 2017-09-29 Tom Tromey <tom@tromey.com>
4530
4531 * complaints.c (vcomplaint): Use std::string.
4532
4533 2017-09-29 Tom Tromey <tom@tromey.com>
4534
4535 * tracepoint.c (trace_variable_command): Use std::string.
4536 (encode_actions_1): Remove unused declarations.
4537 (create_tsv_from_upload): Use std::string.
4538
4539 2017-09-29 Tom Tromey <tom@tromey.com>
4540
4541 * cp-support.c (gdb_demangle): Use std::string.
4542
4543 2017-09-29 Tom Tromey <tom@tromey.com>
4544
4545 * stack.c (parse_frame_specification): Use std::string
4546 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4547
4548 2017-09-29 Tom Tromey <tom@tromey.com>
4549
4550 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4551
4552 2017-09-29 Tom Tromey <tom@tromey.com>
4553
4554 * utils.c (vfprintf_maybe_filtered): Use std::string.
4555 (vfprintf_unfiltered): Likewise.
4556
4557 2017-09-29 Tom Tromey <tom@tromey.com>
4558
4559 * event-top.c (top_level_prompt): Return std::string.
4560 (display_gdb_prompt): Update.
4561
4562 2017-09-29 Tom Tromey <tom@tromey.com>
4563
4564 * unittests/common-utils-selftests.c (format): New function.
4565 (string_vprintf_tests): New function.
4566 (_initialize_common_utils_selftests): Register new tests.
4567 * common/common-utils.c (string_vprintf): New function.
4568 * common/common-utils.h (string_vprintf): Declare.
4569
4570 2017-09-29 Pedro Alves <palves@redhat.com>
4571
4572 * common/rsp-low.c (unpack_varlen_hex): Constify.
4573 * common/rsp-low.h (unpack_varlen_hex): Constify.
4574 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4575 Constify.
4576 * remote.c (remote_set_permissions, read_ptid)
4577 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4578 (remote_static_tracepoint_marker_at)
4579 (remote_static_tracepoint_markers_by_strid)
4580 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4581 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4582 (parse_tracepoint_definition, parse_tsv_definition)
4583 (parse_static_tracepoint_marker_definition): Constify.
4584 * tracepoint.h (parse_static_tracepoint_marker_definition)
4585 (parse_trace_status, parse_tracepoint_status)
4586 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4587
4588 2017-09-29 Pedro Alves <palves@redhat.com>
4589
4590 * remote.c (target_buf, target_buf_size): Delete.
4591 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4592 Use the connection's packet buffer instead.
4593 All callers adjusted.
4594 (_initialize_remote): Remove references to target_buf and
4595 target_buf_size.
4596
4597 2017-09-28 Pedro Alves <palves@redhat.com>
4598
4599 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4600 unittests/common-utils-selftests.c.
4601 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4602 (COMMON_OBS): Remove utils-selftests.o.
4603 * utils-selftests.c: Move to ...
4604 * unittests/common-utils-selftests.c: ... here and rename self
4605 test to "string_printf".
4606
4607 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4608
4609 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4610 having NULL cus or tus.
4611
4612 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4613
4614 * arm-tdep.c: (convert_from_extended): Remove.
4615 (convert_to_extended): Likewise.
4616 (arm_extract_return_value): Use convert_typed_floating.
4617 (arm_store_return_value): Likewise.
4618
4619 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4620 * sh-tdep.c: Do not include "floatformat.h".
4621 (sh_littlebyte_bigword_type): New function.
4622 (sh_register_convert_to_virtual): Use convert_typed_floating.
4623 (sh_register_convert_to_raw): Likewise.
4624 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4625 (sh64_littlebyte_bigword_type): New function.
4626 (sh64_extract_return_value): Use convert_typed_floating.
4627 (sh64_register_convert_to_virtual): Likewise.
4628 (sh64_register_convert_to_raw): Likewise.
4629
4630 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4631
4632 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4633 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4634
4635 * gdbtypes.h (union type_specific): Make field floatformat hold
4636 just a single struct floatformat, not an array.
4637 (floatformat_from_type): Move here.
4638 * gdbtypes.c (floatformat_from_type): Move here. Update to
4639 changed TYPE_FLOATFORMAT definition.
4640 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4641 (recursive_dump_type): Likewise.
4642 (init_float_type): Install correct floatformat for byte order.
4643 (arch_float_type): Likewise.
4644
4645 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4646
4647 * gdbtypes.c (init_type): Change incoming argument from
4648 length-in-bytes to length-in-bits. Assert length is a
4649 multiple of TARGET_CHAR_BITS.
4650 (arch_type, arch_flags_type): Likewise.
4651 (init_integer_type): Update call to init_type.
4652 (init_character_type): Likewise.
4653 (init_boolean_type): Likewise.
4654 (init_float_type): Likewise.
4655 (init_decfloat_type): Likewise.
4656 (init_complex_type): Likewise.
4657 (init_pointer_type): Likewise.
4658 (objfile_type): Likewise.
4659 (arch_integer_type): Update call to arch_type.
4660 (arch_character_type): Likewise.
4661 (arch_boolean_type): Likewise.
4662 (arch_float_type): Likewise.
4663 (arch_decfloat_type): Likewise.
4664 (arch_complex_type): Likewise.
4665 (arch_pointer_type): Likewise.
4666 (gdbtypes_post_init): Likewise.
4667
4668 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4669 (read_base_type): Likewise.
4670 * mdebugread.c (basic_type): Likewise.
4671 * stabsread.c (dbx_init_float_type): Likewise.
4672 (rs6000_builtin_type): Likewise.
4673 (read_range_type): Likewise. Also, fix call to init_integer_type
4674 with erroneous length argument.
4675
4676 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4677 * d-lang.c (build_d_types): Likewise.
4678 * f-lang.c (build_fortran_types): Likewise.
4679 * go-lang.c (build_go_types): Likewise.
4680 * opencl-lang.c (build_opencl_types): Likewise.
4681 * jit.c (finalize_symtab): Likewise.
4682 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4683 (build_std_type_info_type): Likewise.
4684 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4685 update call to arch_flags_type.
4686
4687 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4688 arch_type.
4689 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4690 * windows-tdep.c (windows_get_tlb_type): Likewise.
4691
4692 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4693 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4694 * m32c-tdep.c (make_types): Likewise.
4695 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4696 (rl78_psw_type): Update call to arch_flags_type.
4697 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4698 * rx-tdep.c (rx_psw_type): Likewise.
4699 (rx_fpsw_type): Likewise.
4700 * sparc-tdep.c (sparc_psr_type): Likewise.
4701 (sparc_fsr_type): Likewise.
4702 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4703 (sparc64_ccr_type): Likewise.
4704 (sparc64_fsr_type): Likewise.
4705 (sparc64_fprs_type): Likewise.
4706
4707 2017-09-27 Tom Tromey <tom@tromey.com>
4708
4709 * findcmd.c (find_command): Constify.
4710
4711 2017-09-27 Tom Tromey <tom@tromey.com>
4712
4713 * ada-tasks.c (task_command_1, task_command): Constify.
4714
4715 2017-09-27 Tom Tromey <tom@tromey.com>
4716
4717 * symtab.c (maintenance_print_symbol_cache)
4718 (maintenance_flush_symbol_cache)
4719 (maintenance_print_symbol_cache_statistics): Constify.
4720
4721 2017-09-27 Tom Tromey <tom@tromey.com>
4722
4723 * inferior.c (detach_inferior_command, kill_inferior_command)
4724 (inferior_command): Constify.
4725
4726 2017-09-27 Tom Tromey <tom@tromey.com>
4727
4728 * regcache.c (regcache_print, maintenance_print_registers)
4729 (maintenance_print_raw_registers)
4730 (maintenance_print_cooked_registers)
4731 (maintenance_print_register_groups)
4732 (maintenance_print_remote_registers): Constify.
4733
4734 2017-09-27 Tom Tromey <tom@tromey.com>
4735
4736 * printcmd.c (map_display_numbers, undisplay_command)
4737 (enable_disable_display_command, enable_display_command)
4738 (disable_display_command): Constify.
4739
4740 2017-09-27 Tom Tromey <tom@tromey.com>
4741
4742 * breakpoint.h (delete_command): Don't declare.
4743 * breakpoint.c (delete_command, enable_once_command)
4744 (enable_count_command, enable_delete_command, breakpoint_1)
4745 (maintenance_info_breakpoints, stopin_command, stopat_command)
4746 (delete_command, delete_trace_command, save_breakpoints)
4747 (save_breakpoints_command, save_tracepoints_command): Constify.
4748
4749 2017-09-27 Tom Tromey <tom@tromey.com>
4750
4751 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4752 (skip_ws, extract_identifier, macro_define_command)
4753 (macro_undef_command, macro_list_command): Constify.
4754
4755 2017-09-27 Tom Tromey <tom@tromey.com>
4756
4757 * infcmd.c (environment_info, set_environment_command)
4758 (unset_environment_command, path_info, info_proc_cmd_1)
4759 (info_proc_cmd_mappings, info_proc_cmd_stat)
4760 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4761 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4762
4763 2017-09-27 Tom Tromey <tom@tromey.com>
4764
4765 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4766 Constify.
4767
4768 2017-09-27 Tom Tromey <tom@tromey.com>
4769
4770 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4771
4772 2017-09-27 Tom Tromey <tom@tromey.com>
4773
4774 * demangle.c (demangle_command): Constify.
4775
4776 2017-09-27 Tom Tromey <tom@tromey.com>
4777
4778 * progspace.c (maintenance_info_program_spaces_command):
4779 Constify.
4780
4781 2017-09-27 Tom Tromey <tom@tromey.com>
4782
4783 * compile/compile.c (check_raw_argument, compile_file_command)
4784 (compile_code_command, compile_print_command): Constify.
4785
4786 2017-09-27 Tom Tromey <tom@tromey.com>
4787
4788 * reggroups.c (maintenance_print_reggroups): Constify.
4789
4790 2017-09-27 Tom Tromey <tom@tromey.com>
4791
4792 * dwarf2read.c (save_gdb_index_command): Constify.
4793
4794 2017-09-27 Tom Tromey <tom@tromey.com>
4795
4796 * stap-probe.c (info_probes_stap_command): Constify.
4797
4798 2017-09-27 Tom Tromey <tom@tromey.com>
4799
4800 * fork-child.c (unset_exec_wrapper_command): Constify.
4801
4802 2017-09-27 Tom Tromey <tom@tromey.com>
4803
4804 * btrace.c (get_uint, get_context_size, no_chunk)
4805 (maint_btrace_packet_history_cmd)
4806 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4807 (maint_info_btrace_cmd): Constify.
4808
4809 2017-09-27 Tom Tromey <tom@tromey.com>
4810
4811 * reverse.c (delete_bookmark_command): Constify.
4812
4813 2017-09-27 Tom Tromey <tom@tromey.com>
4814
4815 * remote.c (set_memory_packet_size)
4816 (set_memory_write_packet_size, show_memory_write_packet_size)
4817 (set_memory_read_packet_size, show_memory_read_packet_size)
4818 (compare_sections_command, packet_command, remote_put_command)
4819 (remote_get_command, remote_delete_command): Constify.
4820
4821 2017-09-27 Tom Tromey <tom@tromey.com>
4822
4823 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4824 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4825 (set_mipsfpu_auto_command): Constify.
4826
4827 2017-09-27 Tom Tromey <tom@tromey.com>
4828
4829 * cli/cli-cmds.h (cd_command): Constify.
4830 * cli/cli-cmds.c (cd_command): Constify.
4831
4832 2017-09-27 Tom Tromey <tom@tromey.com>
4833
4834 * thread.c (thread_name_command, thread_find_command): Constify.
4835
4836 2017-09-27 Tom Tromey <tom@tromey.com>
4837
4838 * probe.c (enable_probes_command, disable_probes_command):
4839 Constify.
4840
4841 2017-09-27 Tom Tromey <tom@tromey.com>
4842
4843 * symfile.c (symbol_file_command): Constify.
4844 * gdbcore.h (deprecated_file_changed_hook): Constify.
4845 * exec.c (deprecated_file_changed_hook, exec_file_command)
4846 (file_command): Constify.
4847 * defs.h (symbol_file_command): Constify.
4848
4849 2017-09-27 Tom Tromey <tom@tromey.com>
4850
4851 * remote-fileio.c (set_system_call_allowed)
4852 (show_system_call_allowed): Constify.
4853
4854 2017-09-27 Tom Tromey <tom@tromey.com>
4855
4856 * tracepoint.c (delete_trace_variable_command)
4857 (tfind_end_command, tfind_start_command, tfind_pc_command)
4858 (tfind_tracepoint_command, tfind_line_command)
4859 (tfind_range_command, tfind_outside_command): Constify.
4860
4861 2017-09-27 Tom Tromey <tom@tromey.com>
4862
4863 * ax-gdb.c (maint_agent_printf_command, agent_command)
4864 (agent_eval_command): Constify.
4865
4866 2017-09-27 Tom Tromey <tom@tromey.com>
4867
4868 * tracepoint.c (info_scope_command): Constify.
4869 * python/python.c (gdbpy_decode_line): Constify.
4870 * python/py-breakpoint.c (bppy_init): Constify.
4871 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4872 * location.h: (new_linespec_location)
4873 (string_to_event_location_basic, string_to_event_location):
4874 Constify.
4875 * location.c (new_linespec_location)
4876 (string_to_event_location_basic, string_to_event_location):
4877 Constify.
4878 * linespec.h (decode_line_with_current_source)
4879 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4880 * linespec.c (linespec_lex_to_end)
4881 (decode_line_with_current_source)
4882 (decode_line_with_last_displayed): Constify.
4883 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4884 Constify.
4885 * cli/cli-cmds.c (edit_command, list_command): Constify.
4886 * breakpoint.h (until_break_command, watch_command_wrapper)
4887 (awatch_command_wrapper, rwatch_command_wrapper)
4888 (init_ada_exception_breakpoint): Constify.
4889 * breakpoint.c (break_command_1, dprintf_command)
4890 (break_range_command, watch_command_wrapper)
4891 (rwatch_command_wrapper, awatch_command_wrapper)
4892 (until_break_command, init_ada_exception_breakpoint)
4893 (strace_marker_create_sals_from_location, trace_command)
4894 (ftrace_command, strace_command, struct tracepoint): Constify.
4895 * ax-gdb.c (agent_command_1): Constify.
4896 * ada-lang.c (ada_exception_sal): Constify.
4897
4898 2017-09-27 Tom Tromey <tom@tromey.com>
4899
4900 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4901 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4902 (get_context_size, no_chunk, get_insn_history_modifiers)
4903 (cmd_record_insn_history, get_call_history_modifiers)
4904 (cmd_record_call_history): Constify.
4905
4906 2017-09-27 Tom Tromey <tom@tromey.com>
4907
4908 * source.c (show_substitute_path_command)
4909 (unset_substitute_path_command, set_substitute_path_command):
4910 Constify.
4911
4912 2017-09-27 Tom Tromey <tom@tromey.com>
4913
4914 * typeprint.c (maintenance_print_type): Constify.
4915 * maint.c (maintenance_dump_me, maintenance_demangle)
4916 (maintenance_time_display, maintenance_info_sections)
4917 (maintenance_print_statistics, maintenance_deprecate)
4918 (maintenance_undeprecate): Constify.
4919 (maintenance_do_deprecate): Constify. Use std::string.
4920 (maintenance_selftest): Constify.
4921 * gdbtypes.h (maintenance_print_type): Constify.
4922
4923 2017-09-27 Tom Tromey <tom@tromey.com>
4924
4925 * hppa-tdep.c (unwind_command): Constify.
4926
4927 2017-09-27 Tom Tromey <tom@tromey.com>
4928
4929 * target-descriptions.c (unset_tdesc_filename_cmd)
4930 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4931 Constify.
4932
4933 2017-09-27 Tom Tromey <tom@tromey.com>
4934
4935 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4936
4937 2017-09-27 Tom Tromey <tom@tromey.com>
4938
4939 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4940
4941 2017-09-27 Tom Tromey <tom@tromey.com>
4942
4943 * tui/tui-regs.c (tui_reg_command): Constify.
4944
4945 2017-09-27 Tom Tromey <tom@tromey.com>
4946
4947 * skip.c (skip_file_command, skip_function_command)
4948 (skip_enable_command, skip_disable_command, skip_delete_command):
4949 Constify.
4950
4951 2017-09-27 Tom Tromey <tom@tromey.com>
4952
4953 * record-btrace.c (cmd_record_btrace_bts_start)
4954 (cmd_record_btrace_pt_start): Constify.
4955
4956 2017-09-27 Tom Tromey <tom@tromey.com>
4957
4958 * symmisc.c (maintenance_print_symbols)
4959 (maintenance_print_msymbols, maintenance_print_objfiles)
4960 (maintenance_info_symtabs, maintenance_check_symtabs)
4961 (maintenance_expand_symtabs, maintenance_info_line_tables):
4962 Constify.
4963
4964 2017-09-27 Tom Tromey <tom@tromey.com>
4965
4966 * top.c (new_ui_command): Constify.
4967
4968 2017-09-27 Tom Tromey <tom@tromey.com>
4969
4970 * symfile.c (add_symbol_file_command)
4971 (remove_symbol_file_command, list_overlays_command)
4972 (map_overlay_command, unmap_overlay_command)
4973 (overlay_auto_command, overlay_manual_command)
4974 (overlay_off_command, overlay_load_command): Constify.
4975
4976 2017-09-27 Tom Tromey <tom@tromey.com>
4977
4978 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4979 (info_spu_mailbox_command, info_spu_dma_command)
4980 (info_spu_proxydma_command): Constify.
4981
4982 2017-09-27 Tom Tromey <tom@tromey.com>
4983
4984 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4985
4986 2017-09-27 Tom Tromey <tom@tromey.com>
4987
4988 * cli/cli-script.c (user_defined_command): Constify.
4989
4990 2017-09-27 Tom Tromey <tom@tromey.com>
4991
4992 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4993 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4994 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4995 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4996 (dump_binary_value, append_binary_memory, append_binary_value):
4997 Constify.
4998 (struct dump_context) <func>: Constify.
4999 (add_dump_command): Update.
5000
5001 2017-09-27 Tom Tromey <tom@tromey.com>
5002
5003 * cli/cli-cmds.c (show_version, show_configuration)
5004 (source_command, show_user): Constify.
5005
5006 2017-09-27 Tom Tromey <tom@tromey.com>
5007
5008 * target.c (maintenance_print_target_stack): Constify.
5009
5010 2017-09-27 Tom Tromey <tom@tromey.com>
5011
5012 * interps.c (interpreter_exec_cmd): Constify.
5013
5014 2017-09-27 Tom Tromey <tom@tromey.com>
5015
5016 * record-full.c (cmd_record_full_restore): Constify.
5017
5018 2017-09-27 Tom Tromey <tom@tromey.com>
5019
5020 * memattr.c (enable_mem_command, disable_mem_command)
5021 (delete_mem_command): Constify.
5022
5023 2017-09-27 Tom Tromey <tom@tromey.com>
5024
5025 * value.c (show_convenience): Constify.
5026
5027 2017-09-27 Tom Tromey <tom@tromey.com>
5028
5029 * gdbcore.h (core_file_command): Update.
5030 * corefile.c (core_file_command): Constify.
5031
5032 2017-09-27 Tom Tromey <tom@tromey.com>
5033
5034 * user-regs.c (maintenance_print_user_registers): Constify.
5035
5036 2017-09-27 Tom Tromey <tom@tromey.com>
5037
5038 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5039
5040 2017-09-27 Tom Tromey <tom@tromey.com>
5041
5042 * cp-support.c (first_component_command): Constify.
5043
5044 2017-09-27 Tom Tromey <tom@tromey.com>
5045
5046 * psymtab.c (maintenance_print_psymbols)
5047 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5048 Constify.
5049
5050 2017-09-27 Tom Tromey <tom@tromey.com>
5051
5052 * windows-tdep.c (display_tib): Constify.
5053
5054 2017-09-27 Tom Tromey <tom@tromey.com>
5055
5056 * linux-fork.c (delete_checkpoint_command)
5057 (detach_checkpoint_command): Constify.
5058
5059 2017-09-27 Tom Tromey <tom@tromey.com>
5060
5061 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5062
5063 2017-09-27 Tom Tromey <tom@tromey.com>
5064
5065 * arc-tdep.c (dump_arc_instruction_command): Constify.
5066
5067 2017-09-27 Tom Tromey <tom@tromey.com>
5068
5069 * valprint.c (set_radix, show_radix): Constify.
5070
5071 2017-09-27 Tom Tromey <tom@tromey.com>
5072
5073 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5074
5075 2017-09-27 Tom Tromey <tom@tromey.com>
5076
5077 * command.h (not_just_help_class_command): Update.
5078 * cli/cli-decode.h (not_just_help_class_command): Update.
5079 * cli/cli-decode.c (not_just_help_class_command): Constify.
5080
5081 2017-09-27 Tom Tromey <tom@tromey.com>
5082
5083 * gdb_bfd.c (maintenance_info_bfds): Constify.
5084
5085 2017-09-27 Tom Tromey <tom@tromey.com>
5086
5087 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5088 overloads.
5089 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5090 (do_const_cfunc): New function.
5091 (cmd_cfunc_eq): New overload.
5092 (cli_user_command_p): Check do_const_cfunc.
5093 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5094 const_cfunc.
5095 * command.h (add_cmd): Add const overload and no-function
5096 overload.
5097 (set_cmd_cfunc): Add const overload.
5098 (cmd_const_cfunc_ftype): Declare.
5099 (cmd_cfunc_eq): Add const overload.
5100 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5101 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5102 overload.
5103
5104 2017-09-27 Tom Tromey <tom@tromey.com>
5105
5106 * macroexp.c (get_next_token_for_substitution): New function.
5107 (substitute_args): Call it. Check for __VA_OPT__.
5108
5109 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5110 Pedro Alves <palves@redhat.com>
5111
5112 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5113 producer_is_icc_lt_14.
5114 (producer_is_icc_lt_14): New function.
5115 (check_producer): Add code for checking version of ICC.
5116 (producer_is_icc): Move to producer.c.
5117 (read_structure_type): Restrict ICC workaround to ICC<14.
5118 * producer.c: Include selftest.h.
5119 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5120 New functions.
5121 * producer.h (producer_is_icc): New declaration.
5122
5123 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5124
5125 * Makefile.in (SFILES): Add producer.c.
5126 (COMMON_OBS): Add producer.o
5127 * amd64-tdep.c (producer.h): Add new include.
5128 * dwarf2read.c (producer.h): Add new include.
5129 * producer.c: New file.
5130 * producer.h: New file.
5131 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5132 producer.c.
5133 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5134 producer.h.
5135
5136 2017-09-26 Matthias Klose <doko@ubuntu.com>
5137
5138 * configure.ac: Search ncursesw before ncurses.
5139 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5140 * gdb_curses.h: Include <ncursesw/ncurses.h>
5141 * config.in, configure: Regenerate.
5142
5143 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5144
5145 PR gdb/22185
5146 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5147 obsolete.
5148 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5149 Remove i386sol2 support.
5150 * configure.nat <i386sol2>: Remove.
5151 <sol2-64>: Fold into ...
5152 <sol2>: ... this.
5153 Move common settings to default section.
5154 Add sol-thread.o.
5155 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5156 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5157 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5158 <i[34567]86-*-solaris*>: Remove.
5159 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5160
5161 * configure.ac: Remove wctype in libw check.
5162 (_MSE_INT_H): Don't define on Solaris 7-9.
5163 <solaris*>: Remove libthread_db.so.1 check.
5164 * configure: Regenerate.
5165 * config.in: Regenerate.
5166
5167 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5168 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5169 (gdb_ps_size_t): Remove.
5170 Use base types in users.
5171 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5172
5173 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5174
5175 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5176
5177 PR build/22206
5178 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5179 (adi_is_addr_mapped): Likewise.
5180 (PSR_ICC): Don't redefine.
5181 (PSR_IMPL): Likewise.
5182
5183 2017-09-25 Tom Tromey <tom@tromey.com>
5184
5185 * regcache.c (regcache::dump): Use string_printf.
5186
5187 2017-09-25 Tom Tromey <tom@tromey.com>
5188
5189 * regcache.c (class regcache_invalidator): New.
5190 (struct register_to_invalidate): Remove.
5191 (make_cleanup_regcache_invalidate): Remove.
5192 (regcache::raw_write): Use regcache_invalidator.
5193
5194 2017-09-25 Tom Tromey <tom@tromey.com>
5195
5196 * spu-tdep.c (spu2ppu_sniffer): Update.
5197 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5198 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5199 Remove.
5200 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5201 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5202 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5203 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5204 (frame_pop): Update.
5205
5206 2017-09-25 Tom Tromey <tom@tromey.com>
5207
5208 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5209 * regcache.h (regcache_xfree): Don't declare.
5210 * regcache.c (regcache_xfree): Remove.
5211 (do_regcache_xfree): Use delete.
5212 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5213 * linux-fork.c (free_fork): Use delete.
5214 (fork_save_infrun_state): Likewise.
5215 * jit.c (jit_dealloc_cache): Use delete.
5216 * infrun.c (discard_infcall_suspend_state): Use delete.
5217
5218 2017-09-25 Tom Tromey <tom@tromey.com>
5219
5220 * regcache.h (regcache_xmalloc): Don't declare.
5221 (regcache_raw_set_cached_value): Update comment.
5222 * regcache.c (regcache_xmalloc): Remove.
5223 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5224 * jit.c (jit_frame_sniffer): Use new.
5225 * frame.c (frame_save_as_regcache): Use new.
5226
5227 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5228
5229 * NEWS: Advertise support for guarded-storage registers on IBM z.
5230
5231 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5232
5233 * s390-linux-nat.c (have_regset_gs): New static variable.
5234 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5235 control block and guarded-storage broadcast control regsets.
5236 (s390_read_description): Detect whether the target has
5237 guarded-storage support, return appropriate tdesc.
5238 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5239 (features/s390x-gs-linux64.c): Likewise.
5240 (struct gdbarch_tdep) <have_gs>: New field.
5241 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5242 (s390_gsbc_regset): New variables.
5243 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5244 and s390_gsbc_regset, if applicable.
5245 (s390_core_read_description): Check whether core file was from a
5246 target with guarded-storage support; include appropriate regsets.
5247 (s390_gdbarch_init): Add registers for guarded-storage support.
5248 (_initialize_s390_tdep): Initialize new target descriptions that
5249 include registers for guarded-storage support.
5250 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5251 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5252 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5253 (S390_NUM_REGS): Adjust macro definition.
5254 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5255 (tdesc_s390x_gs_linux64): New declarations.
5256
5257 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5258
5259 * features/s390-gs-linux64.xml: New file.
5260 * features/s390-gs.xml: New file.
5261 * features/s390-gsbc.xml: New file.
5262 * features/s390x-gs-linux64.xml: New file.
5263 * features/Makefile (WHICH): Add s390-gs-linux64 and
5264 s390x-gs-linux64.
5265 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5266 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5267 * features/s390-gs-linux64.c: New generated file.
5268 * features/s390x-gs-linux64.c: New file.
5269 * regformats/s390-gs-linux64.dat: New file.
5270 * regformats/s390x-gs-linux64.dat: New file.
5271
5272 2017-09-23 Tom Tromey <tom@tromey.com>
5273
5274 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5275
5276 2017-09-22 Tom Tromey <tom@tromey.com>
5277
5278 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5279 type to scoped_restore_tmpl.
5280 <scoped_input_handler>: Initialize m_quit_handler directly.
5281
5282 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5283
5284 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5285 (cd_command): Likewise. Free "current_directory" before
5286 assigning to it.
5287 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5288 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5289 * top.c (gdb_dirbuf): Remove global declaration.
5290 * top.h (gdb_dirbuf): Likewise.
5291
5292 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5293
5294 * gnulib/aclocal.m4: Regenerate.
5295 * gnulib/config.in: Regenerate.
5296 * gnulib/configure: Regenerate.
5297 * gnulib/import/Makefile.am: Regenerate.
5298 * gnulib/import/Makefile.in: Regenerate.
5299 * gnulib/import/assure.h: New file.
5300 * gnulib/import/at-func.c: Likewise
5301 * gnulib/import/chdir-long.c: New file.
5302 * gnulib/import/chdir-long.h: New file.
5303 * gnulib/import/cloexec.c: New file.
5304 * gnulib/import/cloexec.h: New file.
5305 * gnulib/import/close.c: New file.
5306 * gnulib/import/closedir.c: New file.
5307 * gnulib/import/dirent-private.h: New file.
5308 * gnulib/import/dup-safer.c: New file.
5309 * gnulib/import/dup.c: New file.
5310 * gnulib/import/dup2.c: New file.
5311 * gnulib/import/error.c: New file.
5312 * gnulib/import/error.h: New file.
5313 * gnulib/import/exitfail.c: New file.
5314 * gnulib/import/exitfail.h: New file.
5315 * gnulib/import/fchdir.c: New file.
5316 * gnulib/import/fcntl.c: New file.
5317 * gnulib/import/fcntl.in.h: New file.
5318 * gnulib/import/fd-hook.c: New file.
5319 * gnulib/import/fd-hook.h: New file.
5320 * gnulib/import/fd-safer.c: New file.
5321 * gnulib/import/fdopendir.c: New file.
5322 * gnulib/import/filename.h: New file.
5323 * gnulib/import/filenamecat-lgpl.c: New file.
5324 * gnulib/import/filenamecat.h: New file.
5325 * gnulib/import/fstat.c: New file.
5326 * gnulib/import/fstatat.c: New file.
5327 * gnulib/import/getcwd-lgpl.c: New file.
5328 * gnulib/import/getcwd.c: New file.
5329 * gnulib/import/getdtablesize.c: New file.
5330 * gnulib/import/getlogin_r.c: New file.
5331 * gnulib/import/getprogname.c: New file.
5332 * gnulib/import/getprogname.h: New file.
5333 * gnulib/import/gettext.h: New file.
5334 * gnulib/import/glob-libc.h: New file.
5335 * gnulib/import/glob.c: New file.
5336 * gnulib/import/glob.in.h: New file.
5337 * gnulib/import/intprops.h: New file.
5338 * gnulib/import/m4/chdir-long.m4: New file.
5339 * gnulib/import/m4/close.m4: New file.
5340 * gnulib/import/m4/closedir.m4: New file.
5341 * gnulib/import/m4/d-ino.m4: New file.
5342 * gnulib/import/m4/d-type.m4: New file.
5343 * gnulib/import/m4/dup.m4: New file.
5344 * gnulib/import/m4/dup2.m4: New file.
5345 * gnulib/import/m4/error.m4: New file.
5346 * gnulib/import/m4/fchdir.m4: New file.
5347 * gnulib/import/m4/fcntl.m4: New file.
5348 * gnulib/import/m4/fcntl_h.m4: New file.
5349 * gnulib/import/m4/fdopendir.m4: New file.
5350 * gnulib/import/m4/filenamecat.m4: New file.
5351 * gnulib/import/m4/fstat.m4: New file.
5352 * gnulib/import/m4/fstatat.m4: New file.
5353 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5354 * gnulib/import/m4/getcwd-path-max.m4: New file.
5355 * gnulib/import/m4/getcwd.m4: New file.
5356 * gnulib/import/m4/getdtablesize.m4: New file.
5357 * gnulib/import/m4/getlogin_r.m4: New file.
5358 * gnulib/import/m4/getprogname.m4: New file.
5359 * gnulib/import/m4/glob.m4: New file.
5360 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5361 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5362 * gnulib/import/m4/mempcpy.m4: New file.
5363 * gnulib/import/m4/memrchr.m4: New file.
5364 * gnulib/import/m4/mode_t.m4: New file.
5365 * gnulib/import/m4/msvc-inval.m4: New file.
5366 * gnulib/import/m4/msvc-nothrow.m4: New file.
5367 * gnulib/import/m4/open.m4: New file.
5368 * gnulib/import/m4/openat.m4: New file.
5369 * gnulib/import/m4/opendir.m4: New file.
5370 * gnulib/import/m4/readdir.m4: New file.
5371 * gnulib/import/m4/realloc.m4: New file.
5372 * gnulib/import/m4/rewinddir.m4: New file.
5373 * gnulib/import/m4/save-cwd.m4: New file.
5374 * gnulib/import/m4/strdup.m4: New file.
5375 * gnulib/import/m4/strerror.m4: New file.
5376 * gnulib/import/m4/unistd-safer.m4: New file.
5377 * gnulib/import/mempcpy.c: New file.
5378 * gnulib/import/memrchr.c: New file.
5379 * gnulib/import/msvc-inval.c: New file.
5380 * gnulib/import/msvc-inval.h: New file.
5381 * gnulib/import/msvc-nothrow.c: New file.
5382 * gnulib/import/msvc-nothrow.h: New file.
5383 * gnulib/import/open.c: New file.
5384 * gnulib/import/openat-die.c: New file.
5385 * gnulib/import/openat-priv.h: New file.
5386 * gnulib/import/openat-proc.c: New file.
5387 * gnulib/import/openat.c: New file.
5388 * gnulib/import/openat.h: New file.
5389 * gnulib/import/opendir.c: New file.
5390 * gnulib/import/pipe-safer.c: New file.
5391 * gnulib/import/readdir.c: New file.
5392 * gnulib/import/realloc.c: New file.
5393 * gnulib/import/rewinddir.c: New file.
5394 * gnulib/import/save-cwd.c: New file.
5395 * gnulib/import/save-cwd.h: New file.
5396 * gnulib/import/strdup.c: New file.
5397 * gnulib/import/strerror-override.c: New file.
5398 * gnulib/import/strerror-override.h: New file.
5399 * gnulib/import/strerror.c: New file.
5400 * gnulib/import/unistd--.h: New file.
5401 * gnulib/import/unistd-safer.h: New file.
5402 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5403 "getcwd" and "glob".
5404 * ser-tcp.c: Undefine "close" before redefining it.
5405
5406 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5407
5408 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5409 get rid of res_val.
5410
5411 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5412
5413 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5414 <sol2,sparc>: Likewise.
5415 <sol2-64,i386>: Likewise.
5416
5417 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5418 -Wdeprecated-declarations on *-*-solaris*.
5419 * configure: Regenerate.
5420
5421 * procfs.c: Include "nat/inferior.h".
5422 (procfs_info_proc): Fix typo.
5423
5424 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5425
5426 * remote.c (vector): Include.
5427 (struct private_thread_info): Add field, thread_handle.
5428 (free_private_thread_info): Deallocate storage associated with
5429 thread handle.
5430 (get_private_info_thread): Initialize `thread_handle' field.
5431 (struct thread_item): Add field, thread_handle.
5432 (clear_threads_listing_context): Deallocate storage associated
5433 with thread handle.
5434 (start_thread): Add support for "handle" attribute.
5435 (thread_attributes): Add "handle".
5436 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5437 field.
5438 (remote_update_thread_list): Update thread_handle.
5439 (remote_thread_handle_to_thread_info): New function.
5440 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5441
5442 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5443
5444 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5445 function.
5446 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5447 * python/python-internal.h (thread_object_type): Declare.
5448
5449 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5450
5451 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5452 (target_thread_handle_to_thread_info): Declare.
5453 * target.c (target_thread_handle_to_thread_info): New function.
5454 * target-delegates.c: Regenerate.
5455 * gdbthread.h (find_thread_by_handle): Declare.
5456 * thread.c (find_thread_by_handle): New function.
5457 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5458 function.
5459 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5460
5461 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5462
5463 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5464
5465 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5466
5467 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5468
5469 2017-09-21 Yao Qi <yao.qi@linaro.org>
5470
5471 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5472 to gdb_target_obs.
5473
5474 2017-09-20 Tom Tromey <tom@tromey.com>
5475
5476 * breakpoint.c (struct counted_command_line): Remove.
5477 (breakpoint_commands): Update.
5478 (alloc_counted_command_line, incref_counted_command_line)
5479 (decref_counted_command_line, do_cleanup_counted_command_line)
5480 (make_cleanup_decref_counted_command_line): Remove.
5481 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5482 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5483 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5484 (save_breakpoints): Update.
5485 * breakpoint.h (counted_command_line): Now a typedef to
5486 shared_ptr.
5487 (struct breakpoint) <commands>: Now a counted_command_line.
5488 (struct bpstats) <command>: Likewise.
5489
5490 2017-09-20 Tom Tromey <tom@tromey.com>
5491
5492 * breakpoint.c (struct commands_info, do_map_commands_command):
5493 Remove.
5494 (commands_command_1): Update.
5495 (iterate_over_related_breakpoints): Take a function_view.
5496 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5497 (delete_command): Update.
5498 (map_breakpoint_numbers): Take a function_view.
5499 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5500 (disable_command): Update.
5501 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5502 (enable_command): Update.
5503 (struct disp_data, do_enable_breakpoint_disp)
5504 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5505 (do_map_enable_delete_breakpoint): Remove.
5506 (enable_once_command, enable_count_command, enable_delete_command)
5507 (delete_trace_variable_command): Update.
5508
5509 2017-09-20 Tom Tromey <tom@tromey.com>
5510
5511 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5512 (bpstat_clear): Use delete.
5513 (bpstats): New constructors.
5514 (bpstat_copy, bpstat_stop_status): Use new.
5515 (dprintf_after_condition_true): Update.
5516 * breakpoint.h (bpstats::bpstats): Add constructors.
5517 (bpstats::~bpstats): Add destructor.
5518
5519 2017-09-20 Pedro Alves <palves@redhat.com>
5520
5521 * eval.c (make_params): Delete, refactored as ...
5522 (class fake_method): ... this new type's ctor.
5523 (fake_method::~fake_method): New.
5524 (evaluate_subexp_standard): Use 'fake_method'.
5525
5526 2017-09-20 Tom Tromey <tom@tromey.com>
5527
5528 * windows-nat.c (get_windows_debug_event, windows_wait)
5529 (do_initial_windows_stuff, windows_attach): Update.
5530 * utils.c (vwarning, internal_vproblem): Update.
5531 (ui_unregister_input_event_handler_cleanup)
5532 (prepare_to_handle_input): Remove.
5533 (class scoped_input_handler): New.
5534 (defaulted_query, prompt_for_continue): Update.
5535 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5536 Update.
5537 * top.c (undo_terminal_modifications_before_exit): Update.
5538 * target/target.h (target_terminal_init, target_terminal_inferior)
5539 (target_terminal_ours): Don't declare.
5540 (class target_terminal): New.
5541 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5542 (target_terminal_ours_for_output)
5543 (make_cleanup_restore_target_terminal): Don't declare.
5544 (target_terminal_info): Remove.
5545 * target.c (enum terminal_state, terminal_state): Remove.
5546 (target_terminal::terminal_state): Define.
5547 (target_terminal::init): Rename from target_terminal_init.
5548 (target_terminal::inferior): Rename from
5549 target_terminal_inferior.
5550 (target_terminal::ours): Rename from target_terminal_ours.
5551 (target_terminal::ours_for_output): Rename from
5552 target_terminal_ours_for_output.
5553 (target_terminal::info): New method.
5554 (cleanup_restore_target_terminal)
5555 (make_cleanup_restore_target_terminal): Remove.
5556 * solib.c (handle_solib_event): Update.
5557 * remote.c (remote_serial_quit_handler): Update.
5558 (remote_terminal_inferior, remote_wait_as): Update.
5559 * record-full.c (record_full_wait_1): Update.
5560 * nto-procfs.c (procfs_create_inferior): Update.
5561 * nat/fork-inferior.c (startup_inferior): Update.
5562 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5563 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5564 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5565 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5566 (mi_breakpoint_created, mi_breakpoint_deleted)
5567 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5568 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5569 (mi_user_selected_context_changed, report_initial_inferior):
5570 Update.
5571 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5572 (linux_nat_terminal_inferior): Update.
5573 * infrun.c (follow_fork_inferior)
5574 (handle_vfork_child_exec_or_exit, do_target_resume)
5575 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5576 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5577 Update.
5578 * inflow.c (child_terminal_init, info_terminal_command): Update.
5579 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5580 (attach_command): Update.
5581 * infcall.c (call_thread_fsm_should_stop): Update.
5582 * gnu-nat.c (gnu_attach): Update.
5583 * extension.c (struct active_ext_lang_state)
5584 (restore_active_ext_lang): Update.
5585 * exceptions.c (print_flush): Update.
5586 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5587 (struct quit_handler_cleanup_data, restore_quit_handler)
5588 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5589 Remove.
5590 * cp-support.c (gdb_demangle): Update.
5591 * breakpoint.c (update_inserted_breakpoint_locations)
5592 (insert_breakpoint_locations, handle_jit_event)
5593 (disable_breakpoints_in_unloaded_shlib): Update.
5594 * annotate.c (annotate_breakpoints_invalid)
5595 (annotate_frames_invalid): Update.
5596
5597 2017-09-20 Tom Tromey <tom@tromey.com>
5598
5599 * main.c (catch_command_errors): Rename from
5600 catch_command_errors_const.
5601 (captured_main_1): Update.
5602
5603 2017-09-20 Pedro Alves <palves@redhat.com>
5604
5605 * cli/cli-cmds.c (list_command): Use print_sal_location.
5606 (print_sal_location): New function.
5607 (ambiguous_line_spec): Use print_sal_location.
5608 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5609 * symtab.c (find_function_start_sal): Likewise.
5610 * symtab.h (symtab_and_line::symbol): New field.
5611
5612 2017-09-20 Pedro Alves <palves@redhat.com>
5613
5614 * linespec.c (minsym_found): Handle non-text minsyms.
5615 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5616
5617 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5618
5619 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5620 backslash.
5621
5622 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5623
5624 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5625 vmovups instead vmovaps.
5626 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5627
5628 2017-09-19 John Baldwin <jhb@FreeBSD.org>
5629
5630 * NEWS (Changes since GDB 8.0): Add starti.
5631 * infcmd.c (enum run_break): New.
5632 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5633 case.
5634 (run_command): Use enum run_how.
5635 (start_command): Likewise.
5636 (starti_command): New function.
5637 (RUN_ARGS_HELP): New macro.
5638 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5639 commands. Add starti command.
5640
5641 2017-09-19 Yao Qi <yao.qi@linaro.org>
5642
5643 * Makefile.in (monitor.o): Remove the rule.
5644
5645 2017-09-19 Yao Qi <yao.qi@linaro.org>
5646
5647 * annotate.h (struct annotate_arg_emitter): Use
5648 DISABLE_COPY_AND_ASSIGN.
5649 * common/refcounted-object.h (refcounted_object): Likewise.
5650 * completer.h (struct completion_result): Likewise.
5651 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5652 * filename-seen-cache.h (filename_seen_cache): Likewise.
5653 * gdbcore.h (thread_section_name): Likewise.
5654 * gdb_regex.h (compiled_regex): Likewise.
5655 * gdbthread.h (scoped_restore_current_thread): Likewise.
5656 * inferior.h (scoped_restore_current_inferior): Likewise.
5657 * jit.c (jit_reader): Likewise.
5658 * linespec.h (struct linespec_result): Likewise.
5659 * mi/mi-parse.h (struct mi_parse): Likewise.
5660 * nat/fork-inferior.c (execv_argv): Likewise.
5661 * progspace.h (scoped_restore_current_program_space): Likewise.
5662 * python/python-internal.h (class gdbpy_enter): Likewise.
5663 * regcache.h (regcache): Likewise.
5664 * target-descriptions.c (struct tdesc_reg): Likewise.
5665 (struct tdesc_type): Likewise.
5666 (struct tdesc_feature): Likewise.
5667 * ui-out.h (ui_out_emit_type): Likewise.
5668
5669 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5670
5671 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5672 label abort_expression.
5673
5674 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5675
5676 * common/buffer.c (buffer_xml_printf): Adjust.
5677 * common/xml-utils.c (xml_escape_text): Change return type to
5678 std::string, update code accordingly.
5679 * common/xml-utils.h (xml_escape_text): Change return type to
5680 std::string.
5681 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5682 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5683 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5684 Adjust.
5685
5686 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5687
5688 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5689 (SUBDIR_UNITTESTS_OBS): Add new object file.
5690 * unittests/xml-utils-selftests.c: New file.
5691
5692 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5693
5694 * common/selftest.h (selftest): New struct/interface.
5695 (register_test): Add name parameter, add new overload.
5696 (run_tests): Add filter parameter.
5697 (for_each_selftest_ftype): New typedef.
5698 (for_each_selftest): New declaration.
5699 * common/selftest.c (tests): Change type to
5700 map<string, unique_ptr<selftest>>.
5701 (simple_selftest): New struct.
5702 (register_test): New function.
5703 (register_test): Add name parameter and use it.
5704 (run_tests): Add filter parameter and use it. Add prints.
5705 Adjust to vector -> map change.
5706 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5707 registering selftests.
5708 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5709 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5710 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5711 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5712 * findvar.c (_initialize_findvar): Likewise.
5713 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5714 * maint.c (maintenance_selftest): Update call to run_tests.
5715 (maintenance_info_selftests): New function.
5716 (_initialize_maint_cmds): Register "maintenance info selftests"
5717 command. Update "maintenance selftest" doc.
5718 * regcache.c (_initialize_regcache): Add names when registering
5719 selftests.
5720 * rust-exp.y (_initialize_rust_exp): Likewise.
5721 * selftest-arch.c (gdbarch_selftest): New struct.
5722 (gdbarch_tests): Remove.
5723 (register_test_foreach_arch): Add name parameter. Call
5724 register_test.
5725 (tests_with_arch): Remove, move most content to
5726 gdbarch_selftest::operator().
5727 (_initialize_selftests_foreach_arch): Remove.
5728 * selftest-arch.h (register_test_foreach_arch): Add name
5729 parameter.
5730 (run_tests_with_arch): New declaration.
5731 * utils-selftests.c (_initialize_utils_selftests): Add names
5732 when registering selftests.
5733 * utils.c (_initialize_utils): Likewise.
5734 * unittests/array-view-selftests.c
5735 (_initialize_array_view_selftests): Likewise.
5736 * unittests/environ-selftests.c (_initialize_environ_selftests):
5737 Likewise.
5738 * unittests/function-view-selftests.c
5739 (_initialize_function_view_selftests): Likewise.
5740 * unittests/offset-type-selftests.c
5741 (_initialize_offset_type_selftests): Likewise.
5742 * unittests/optional-selftests.c
5743 (_initialize_optional_selftests): Likewise.
5744 * unittests/scoped_restore-selftests.c
5745 (_initialize_scoped_restore_selftests): Likewise.
5746 * NEWS: Document "maintenance selftest" and "maint info
5747 selftests".
5748
5749 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5750
5751 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5752 scoped_restore.
5753
5754 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5755
5756 * mi/mi-main.c (mi_load_progress): Make uiout variable
5757 a unique_ptr.
5758
5759 2017-09-15 Pedro Alves <palves@redhat.com>
5760
5761 * compile/compile-c-types.c (convert_enum, convert_int)
5762 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5763
5764 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5765
5766 * dwarf2read.c (copy_string): Remove.
5767 (parse_macro_definition): Replace copy_string with savestring.
5768
5769 2017-09-15 Yao Qi <yao.qi@linaro.org>
5770
5771 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5772 gdb_target_obs.
5773 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5774 Likewise.
5775 (i[34567]86-*-linux*): Likewise.
5776
5777 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5778
5779 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5780 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5781 <stack>: Change type to std::vector.
5782 <stack_len, stack_allocated>: Remove.
5783 <grow_stack>: Remove.
5784 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5785 (dwarf_expr_context::~dwarf_expr_context): Remove.
5786 (dwarf_expr_context::grow_stack): Remove.
5787 (dwarf_expr_context::push): Adjust.
5788 (dwarf_expr_context::pop): Adjust.
5789 (dwarf_expr_context::fetch): Adjust.
5790 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5791 (dwarf_expr_context::stack_empty_p): Adjust.
5792 (dwarf_expr_context::execute_stack_op): Adjust.
5793
5794 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5795
5796 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5797 return type to bool.
5798 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5799
5800 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5801
5802 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5803 Change type to bool.
5804 (dwarf_stack_value) <in_stack_memory>: Likewise.
5805 (dwarf_expr_context) <push_address>: Change parameter type to
5806 bool.
5807 <fetch_in_stack_memory>: Change return type to bool.
5808 <push>: Change parameter type to bool.
5809 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5810 to bool.
5811 (dwarf_expr_context::push_address): Likewise.
5812 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5813 to bool.
5814 (dwarf_expr_context::execute_stack_op): Adjust.
5815 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5816
5817 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5818
5819 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5820 (struct dwarf_expr_context) <n_pieces>: Remove.
5821 <pieces>: Change type to std::vector.
5822 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5823 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5824 pieces.
5825 (dwarf_expr_context::add_piece): Adjust.
5826 * dwarf2loc.c (struct piece_closure): Initialize fields.
5827 <n_pieces>: Remove.
5828 <pieces>: Change type to std::vector.
5829 (allocate_piece_closure): Adjust, change parameter to
5830 std::vector rvalue and std::move it to piece_closure.
5831 (rw_pieced_value): Adjust.
5832 (check_pieced_synthetic_pointer): Adjust.
5833 (indirect_synthetic_pointer): Adjust.
5834 (coerce_pieced_ref): Adjust.
5835 (free_pieced_value_closure): Adjust. Use delete to free
5836 piece_closure.
5837 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5838 to allocate_piece_closure.
5839 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5840
5841 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5842
5843 * probe.h (probe_ops_cp): Remove typedef.
5844 (DEF_VEC_P (probe_ops_cp)): Remove.
5845 (all_probe_ops): Change type to std::vector.
5846 * probe.c (info_probes_for_ops): Adjust to vector change.
5847 (probe_linespec_to_ops): Likewise.
5848 (all_probe_ops): Change type to std::vector.
5849 (_initialize_probe): Adjust to vector change.
5850 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5851 * elfread.c (elf_get_probes): Likewise.
5852 * stap-probe.c (_initialize_stap_probe): Likewise.
5853
5854 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5855
5856 * probe.h (struct bound_probe): Define constructors.
5857 * probe.c (bound_probe_s): Remove typedef.
5858 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5859 (collect_probes): Change return type to std::vector, remove
5860 cleanup.
5861 (compare_probes): Return bool, change parameter type. Change
5862 semantic to "less than".
5863 (gen_ui_out_table_header_info): Change parameter to std::vector
5864 and update.
5865 (exists_probe_with_pops): Likewise.
5866 (info_probes_for_ops): Update to std::vector change.
5867 (enable_probes_command): Likewise.
5868 (disable_probes_command): Likewise.
5869
5870 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5871
5872 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5873 vec to std::vector.
5874 * probe.c (parse_probes_in_pspace): Update.
5875 (find_probes_in_objfile): Update.
5876 (find_probe_by_pc): Update.
5877 (collect_probes): Update.
5878 (probe_any_get_probes): Update.
5879 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5880 return type to reference to std::vector.
5881 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5882 std::vector and update.
5883 (dtrace_process_dof): Likewise.
5884 (dtrace_get_probes): Likewise.
5885 * elfread.c (elf_get_probes): Change return type to std::vector,
5886 store an std::vector in bfd_data.
5887 (probe_key_free): Update to std::vector.
5888 * stap-probe.c (handle_stap_probe): Change parameter to
5889 std::vector and update.
5890 (stap_get_probes): Likewise.
5891 * symfile-debug.c (debug_sym_get_probes): Change return type to
5892 std::vector and update.
5893
5894 2017-09-11 Tom Tromey <tom@tromey.com>
5895
5896 * breakpoint.c (program_breakpoint_here_p): Update.
5897 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5898 from make_show_memory_breakpoints_cleanup. Return a
5899 scoped_restore_tmpl<int>.
5900 (restore_show_memory_breakpoints): Remove.
5901 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5902 * mem-break.c (memory_validate_breakpoint): Update.
5903 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5904 (ia64_memory_remove_breakpoint): Update.
5905 (ia64_breakpoint_from_pc): Update.
5906 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5907 from make_show_memory_breakpoints_cleanup.
5908
5909 2017-09-11 Tom Tromey <tom@tromey.com>
5910
5911 * d-namespace.c (d_lookup_symbol): Use std::string.
5912 (find_symbol_in_baseclass): Likewise.
5913
5914 2017-09-11 Tom Tromey <tom@tromey.com>
5915
5916 * ctf.c (ctf_start): Use std::string.
5917
5918 2017-09-11 Tom Tromey <tom@tromey.com>
5919
5920 * ada-lang.c (is_known_support_routine): Update.
5921 (ada_unhandled_exception_name_addr_from_raise): Update.
5922 * guile/scm-frame.c (gdbscm_frame_name): Update.
5923 * python/py-frame.c (frapy_name): Update.
5924 (frapy_function): Update.
5925 * stack.h (find_frame_funname): Update.
5926 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5927 (print_frame): Update.
5928
5929 2017-09-11 Tom Tromey <tom@tromey.com>
5930
5931 * findcmd.c (put_bits): Take a gdb::byte_vector.
5932 (parse_find_args): Return gdb::byte_vector. "args" now const.
5933 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5934 cleanups.
5935 (find_command): Update.
5936
5937 2017-09-11 Tom Tromey <tom@tromey.com>
5938
5939 * cli/cli-script.c (class scoped_restore_hook_in): New.
5940 (clear_hook_in_cleanup): Remove.
5941 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5942 scoped_restore_hook_in.
5943
5944 2017-09-11 Tom Tromey <tom@tromey.com>
5945
5946 * cli/cli-script.c (restore_interp): Remove.
5947 (read_command_lines): Use scoped_restore_interp.
5948 * interps.c (scoped_restore_interp::set_temp): Rename from
5949 interp_set_temp.
5950 * interps.h (class scoped_restore_interp): New.
5951 (interp_set_temp): Remove.
5952
5953 2017-09-11 Tom Tromey <tom@tromey.com>
5954
5955 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5956 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5957 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5958 scoped_restore.
5959 (mi_cmd_break_insert_1): Update.
5960 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5961 scoped_restore.
5962
5963 2017-09-11 Tom Tromey <tom@tromey.com>
5964
5965 * demangle.c (demangle_command): Update.
5966 * breakpoint.c (disable_command): Update.
5967 (enable_command): Update.
5968 (find_location_by_number): Make "number" const. Use
5969 get_number_trailer.
5970 * cli/cli-utils.c (extract_arg): Return std::string.
5971 * probe.c (parse_probe_linespec): Update. Change types.
5972 (collect_probes): Take string arguments.
5973 (parse_probe_linespec): Likewise.
5974 (info_probes_for_ops): Update.
5975 (enable_probes_command): Update.
5976 (disable_probes_command): Update.
5977 * break-catch-sig.c (catch_signal_split_args): Update.
5978 * mi/mi-parse.c (mi_parse): Update.
5979
5980 2017-09-11 Tom Tromey <tom@tromey.com>
5981
5982 * language.h (language_enum): Make argument const.
5983 * language.c (language_enum): Make argument const.
5984
5985 2017-09-11 Tom Tromey <tom@tromey.com>
5986
5987 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5988 as function.
5989 (skip_to_space): Rename from skip_to_space_const.
5990 * common/common-utils.c (skip_to_space): New function.
5991 (skip_to_space): Rename from skip_to_space_const.
5992 * cli/cli-utils.h (get_number): Rename from get_number_const.
5993 (extract_arg): Rename from extract_arg_const.
5994 * cli/cli-utils.c (get_number): Rename from get_number_const.
5995 (extract_arg): Rename from extract_arg_const.
5996 (number_or_range_parser::get_number): Use ::get_number.
5997 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5998 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5999 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6000 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6001 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6002 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6003 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6004 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6005
6006 2017-09-11 Tom Tromey <tom@tromey.com>
6007
6008 * python/python.c (do_start_initialization): Use
6009 py-event-types.def to initialize types.
6010 Define all object type structures.
6011 * python/python-internal.h: Don't declare event initialization
6012 functions.
6013 * python/py-threadevent.c (thread_event_object_type): Don't
6014 define.
6015 * python/py-stopevent.c (stop_event_object_type): Don't define.
6016 * python/py-signalevent.c (signal_event_object_type): Don't
6017 declare or define.
6018 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6019 (clear_objfiles_event_object_type): Don't declare or define.
6020 * python/py-infevents.c (inferior_call_pre_event_object_type)
6021 (inferior_call_post_event_object_type)
6022 (register_changed_event_object_type)
6023 (memory_changed_event_object_type): Don't declare or define.
6024 * python/py-inferior.c (new_thread_event_object_type)
6025 (new_inferior_event_object_type)
6026 (inferior_deleted_event_object_type): Don't declare or define.
6027 * python/py-exitedevent.c (exited_event_object_type): Don't
6028 declare or define.
6029 * python/py-evts.c (gdbpy_initialize_py_events): Use
6030 py-all-events.def.
6031 * python/py-events.h (thread_event_object_type): Don't declare.
6032 (events_object): Use py-all-events.def.
6033 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6034 py-event-types.def.
6035 * python/py-event-types.def: New file.
6036 * python/py-continueevent.c (create_continue_event_object): Don't
6037 declare or define.
6038 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6039 declare or define.
6040 * python/py-all-events.def: New file.
6041
6042 2017-09-11 Tom Tromey <tom@tromey.com>
6043
6044 * python/py-threadevent.c (create_thread_event_object): Return
6045 gdbpy_ref.
6046 * python/py-stopevent.h (create_stop_event_object)
6047 (create_breakpoint_event_object, create_signal_event_object):
6048 Update.
6049 * python/py-stopevent.c (create_stop_event_object): Return
6050 gdbpy_ref.
6051 (emit_stop_event): Update.
6052 * python/py-signalevent.c (create_signal_event_object): Return
6053 gdbpy_ref.
6054 * python/py-infevents.c (create_inferior_call_event_object):
6055 Update.
6056 * python/py-event.h (create_event_object)
6057 (create_thread_event_object): Update.
6058 * python/py-event.c (create_event_object): Return gdbpy_ref.
6059 * python/py-continueevent.c: Return gdbpy_ref.
6060 * python/py-bpevent.c (create_breakpoint_event_object): Return
6061 gdbpy_ref.
6062
6063 2017-09-11 Tom Tromey <tom@tromey.com>
6064
6065 PR python/15622:
6066 * NEWS: Add entry.
6067 * python/python.c (do_start_initialization): Initialize new event
6068 types.
6069 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6070 (gdbpy_initialize_inferior_deleted_event)
6071 (gdbpy_initialize_new_thread_event): Declare.
6072 * python/py-threadevent.c (create_thread_event_object): Add option
6073 "thread" parameter.
6074 * python/py-inferior.c (new_thread_event_object_type)
6075 (new_inferior_event_object_type)
6076 (inferior_deleted_event_object_type): Declare.
6077 (python_new_inferior, python_inferior_deleted): New functions.
6078 (add_thread_object): Emit new_thread event.
6079 (gdbpy_initialize_inferior): Attach new functions to corresponding
6080 observers.
6081 (new_thread, new_inferior, inferior_deleted): Define new event
6082 types.
6083 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6084 registries.
6085 * python/py-events.h (events_object) <new_inferior,
6086 inferior_deleted, new_thread>: New fields.
6087 * python/py-event.h (create_thread_event_breakpoint): Add optional
6088 "thread" parameter.
6089
6090 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6091
6092 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6093 check current_ui instead.
6094 (internal_vproblem): Likewise.
6095
6096 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6097
6098 * thread.c (print_thread_info_1): Remove unnecessary calls to
6099 uiout->is_mi_like_p.
6100
6101 2017-09-09 Tom Tromey <tom@tromey.com>
6102
6103 * namespace.h (add_using_directive): Update.
6104 * namespace.c (add_using_directive): Change type of excludes to
6105 std::vector.
6106 * dwarf2read.c (read_import_statement): Use std::vector.
6107 (read_namespace): Update.
6108 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6109
6110 2017-09-09 Tom Tromey <tom@tromey.com>
6111
6112 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6113
6114 2017-09-09 Tom Tromey <tom@tromey.com>
6115
6116 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6117
6118 2017-09-09 Tom Tromey <tom@tromey.com>
6119
6120 * stack.c (func_command): Use gdb::def_vector.
6121
6122 2017-09-09 Tom Tromey <tom@tromey.com>
6123
6124 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6125 ui_out_emit_list, ui_out_emit_tuple.
6126 (mi_cmd_var_update): Likewise.
6127
6128 2017-09-09 Tom Tromey <tom@tromey.com>
6129
6130 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6131 ui_out_redirect_pop.
6132 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6133 ui_out_redirect_pop.
6134 * utils.c (do_ui_out_redirect_pop)
6135 (make_cleanup_ui_out_redirect_pop): Remove.
6136 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6137 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6138 * ui-out.h (ui_out_redirect_pop): New class.
6139
6140 2017-09-09 Tom Tromey <tom@tromey.com>
6141
6142 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6143 (list_available_thread_groups, mi_cmd_list_thread_groups)
6144 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6145 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6146 Likewise.
6147
6148 2017-09-09 Tom Tromey <tom@tromey.com>
6149
6150 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6151 ui_out_emit_tuple.
6152
6153 2017-09-09 Tom Tromey <tom@tromey.com>
6154
6155 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6156 * stack.c (print_frame): Use ui_out_emit_tuple.
6157 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6158 (info_spu_mailbox_command, info_spu_dma_command)
6159 (info_spu_proxydma_command): Likewise.
6160 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6161 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6162 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6163 ui_out_emit_tuple.
6164 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6165
6166 2017-09-09 Tom Tromey <tom@tromey.com>
6167
6168 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6169 (class ui_out_emit_table): Update comment.
6170 * ui-out.c (do_cleanup_table_end)
6171 (make_cleanup_ui_out_table_begin_end): Remove.
6172 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6173 (info_spu_dma_cmdlist): Likewise.
6174 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6175 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6176 ui_out_emit_table.
6177
6178 2017-09-09 Tom Tromey <tom@tromey.com>
6179
6180 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6181 ui_out_emit_list, gdb::optional.
6182
6183 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6184
6185 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6186 prototype.
6187 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6188 prototype.
6189 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6190 prototype.
6191 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6192 * ada-exp.y: Remove _initialize_ada_exp prototype.
6193 * ada-lang.c: Remove _initialize_ada_language prototype.
6194 * ada-tasks.c: Remove _initialize_tasks prototype.
6195 * addrmap.c: Remove _initialize_addrmap prototype.
6196 * agent.c: Remove _initialize_agent prototype.
6197 * aix-thread.c: Remove _initialize_aix_thread prototype.
6198 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6199 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6200 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6201 prototype.
6202 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6203 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6204 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6205 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6206 prototype.
6207 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6208 prototype.
6209 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6210 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6211 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6212 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6213 prototype.
6214 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6215 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6216 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6217 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6218 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6219 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6220 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6221 prototype.
6222 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6223 prototype.
6224 * annotate.c: Remove _initialize_annotate prototype.
6225 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6226 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6227 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6228 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6229 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6230 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6231 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6232 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6233 prototype.
6234 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6235 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6236 * auto-load.c: Remove _initialize_auto_load prototype.
6237 * auxv.c: Remove _initialize_auxv prototype.
6238 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6239 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6240 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6241 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6242 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6243 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6244 prototype.
6245 * break-catch-throw.c: Remove _initialize_break_catch_throw
6246 prototype.
6247 * breakpoint.c: Remove _initialize_breakpoint prototype.
6248 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6249 * btrace.c: Remove _initialize_btrace prototype.
6250 * charset.c: Remove _initialize_charset prototype.
6251 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6252 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6253 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6254 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6255 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6256 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6257 * coffread.c: Remove _initialize_coffread prototype.
6258 * compile/compile.c: Remove _initialize_compile prototype.
6259 * complaints.c: Remove _initialize_complaints prototype.
6260 * completer.c: Remove _initialize_completer prototype.
6261 * copying.awk: Remove _initialize_copying prototype.
6262 * copying.c: Regenerate.
6263 * core-regset.c: Remove _initialize_core_regset prototype.
6264 * corefile.c: Remove _initialize_core prototype.
6265 * corelow.c: Remove _initialize_corelow prototype.
6266 * cp-abi.c: Remove _initialize_cp_abi prototype.
6267 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6268 * cp-support.c: Remove _initialize_cp_support prototype.
6269 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6270 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6271 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6272 * ctf.c: Remove _initialize_ctf prototype.
6273 * d-lang.c: Remove _initialize_d_language prototype.
6274 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6275 prototype.
6276 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6277 * dbxread.c: Remove _initialize_dbxread prototype.
6278 * dcache.c: Remove _initialize_dcache prototype.
6279 * demangle.c: Remove _initialize_demangler prototype.
6280 * disasm-selftests.c: Remove _initialize_disasm_selftests
6281 prototype.
6282 * disasm.c: Remove _initialize_disasm prototype.
6283 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6284 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6285 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6286 prototype.
6287 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6288 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6289 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6290 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6291 * elfread.c: Remove _initialize_elfread prototype.
6292 * exec.c: Remove _initialize_exec prototype.
6293 * extension.c: Remove _initialize_extension prototype.
6294 * f-lang.c: Remove _initialize_f_language prototype.
6295 * f-valprint.c: Remove _initialize_f_valprint prototype.
6296 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6297 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6298 * filesystem.c: Remove _initialize_filesystem prototype.
6299 * findcmd.c: Remove _initialize_mem_search prototype.
6300 * fork-child.c: Remove _initialize_fork_child prototype.
6301 * frame-base.c: Remove _initialize_frame_base prototype.
6302 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6303 * frame.c: Remove _initialize_frame prototype.
6304 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6305 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6306 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6307 * gcore.c: Remove _initialize_gcore prototype.
6308 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6309 * gdbarch.c: Regenerate.
6310 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6311 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6312 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6313 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6314 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6315 * go-lang.c: Remove _initialize_go_language prototype.
6316 * go32-nat.c: Remove _initialize_go32_nat prototype.
6317 * guile/guile.c: Remove _initialize_guile prototype.
6318 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6319 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6320 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6321 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6322 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6323 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6324 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6325 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6326 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6327 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6328 prototype.
6329 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6330 prototype.
6331 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6332 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6333 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6334 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6335 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6336 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6337 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6338 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6339 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6340 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6341 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6342 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6343 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6344 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6345 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6346 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6347 prototype.
6348 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6349 prototype.
6350 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6351 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6352 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6353 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6354 * infcall.c: Remove _initialize_infcall prototype.
6355 * infcmd.c: Remove _initialize_infcmd prototype.
6356 * inferior.c: Remove _initialize_inferiors prototype.
6357 * inflow.c: Remove _initialize_inflow prototype.
6358 * infrun.c: Remove _initialize_infrun prototype.
6359 * interps.c: Remove _initialize_interpreter prototype.
6360 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6361 * jit.c: Remove _initialize_jit prototype.
6362 * language.c: Remove _initialize_language prototype.
6363 * linux-fork.c: Remove _initialize_linux_fork prototype.
6364 * linux-nat.c: Remove _initialize_linux_nat prototype.
6365 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6366 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6367 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6368 * m2-lang.c: Remove _initialize_m2_language prototype.
6369 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6370 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6371 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6372 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6373 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6374 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6375 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6376 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6377 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6378 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6379 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6380 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6381 * machoread.c: Remove _initialize_machoread prototype.
6382 * macrocmd.c: Remove _initialize_macrocmd prototype.
6383 * macroscope.c: Remove _initialize_macroscope prototype.
6384 * maint.c: Remove _initialize_maint_cmds prototype.
6385 * mdebugread.c: Remove _initialize_mdebugread prototype.
6386 * memattr.c: Remove _initialize_mem prototype.
6387 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6388 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6389 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6390 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6391 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6392 * microblaze-linux-tdep.c: Remove
6393 _initialize_microblaze_linux_tdep prototype.
6394 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6395 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6396 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6397 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6398 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6399 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6400 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6401 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6402 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6403 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6404 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6405 prototype.
6406 * mipsread.c: Remove _initialize_mipsread prototype.
6407 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6408 prototype.
6409 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6410 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6411 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6412 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6413 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6414 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6415 prototype.
6416 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6417 * nto-procfs.c: Remove _initialize_procfs prototype.
6418 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6419 * objc-lang.c: Remove _initialize_objc_language prototype.
6420 * objfiles.c: Remove _initialize_objfiles prototype.
6421 * observer.c: Remove observer_test_first_notification_function,
6422 observer_test_second_notification_function,
6423 observer_test_third_notification_function, and
6424 _initialize_observer prototypes.
6425 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6426 * osabi.c: Remove _initialize_gdb_osabi prototype.
6427 * osdata.c: Remove _initialize_osdata prototype.
6428 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6429 * parse.c: Remove _initialize_parse prototype.
6430 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6431 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6432 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6433 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6434 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6435 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6436 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6437 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6438 * printcmd.c: Remove _initialize_printcmd prototype.
6439 * probe.c: Remove _initialize_probe prototype.
6440 * proc-api.c: Remove _initialize_proc_api prototype.
6441 * proc-events.c: Remove _initialize_proc_events prototype.
6442 * proc-service.c: Remove _initialize_proc_service prototype.
6443 * procfs.c: Remove _initialize_procfs prototype.
6444 * psymtab.c: Remove _initialize_psymtab prototype.
6445 * python/python.c: Remove _initialize_python prototype.
6446 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6447 * record-btrace.c: Remove _initialize_record_btrace prototype.
6448 * record-full.c: Remove _initialize_record_full prototype.
6449 * record.c: Remove _initialize_record prototype.
6450 * regcache.c: Remove _initialize_regcache prototype.
6451 * reggroups.c: Remove _initialize_reggroup prototype.
6452 * remote-notif.c: Remove _initialize_notif prototype.
6453 * remote-sim.c: Remove _initialize_remote_sim prototype.
6454 * remote.c: Remove _initialize_remote prototype.
6455 * reverse.c: Remove _initialize_reverse prototype.
6456 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6457 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6458 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6459 prototype.
6460 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6461 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6462 * rust-exp.y: Remove _initialize_rust_exp prototype.
6463 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6464 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6465 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6466 * score-tdep.c: Remove _initialize_score_tdep prototype.
6467 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6468 prototype.
6469 * ser-go32.c: Remove _initialize_ser_dos prototype.
6470 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6471 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6472 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6473 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6474 * serial.c: Remove _initialize_serial prototype.
6475 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6476 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6477 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6478 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6479 * skip.c: Remove _initialize_step_skip prototype.
6480 * sol-thread.c: Remove _initialize_sol_thread prototype.
6481 * solib-aix.c: Remove _initialize_solib_aix prototype.
6482 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6483 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6484 * solib-frv.c: Remove _initialize_frv_solib prototype.
6485 * solib-spu.c: Remove _initialize_spu_solib prototype.
6486 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6487 * solib-target.c: Remove _initialize_solib_target prototype.
6488 * solib.c: Remove _initialize_solib prototype.
6489 * source.c: Remove _initialize_source prototype.
6490 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6491 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6492 prototype.
6493 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6494 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6495 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6496 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6497 prototype.
6498 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6499 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6500 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6501 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6502 prototype.
6503 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6504 prototype.
6505 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6506 prototype.
6507 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6508 prototype.
6509 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6510 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6511 prototype.
6512 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6513 prototype.
6514 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6515 prototype.
6516 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6517 prototype.
6518 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6519 prototype.
6520 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6521 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6522 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6523 * stabsread.c: Remove _initialize_stabsread prototype.
6524 * stack.c: Remove _initialize_stack prototype.
6525 * stap-probe.c: Remove _initialize_stap_probe prototype.
6526 * std-regs.c: Remove _initialize_frame_reg prototype.
6527 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6528 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6529 * symfile.c: Remove _initialize_symfile prototype.
6530 * symmisc.c: Remove _initialize_symmisc prototype.
6531 * symtab.c: Remove _initialize_symtab prototype.
6532 * target-dcache.c: Remove _initialize_target_dcache prototype.
6533 * target-descriptions.c: Remove _initialize_target_descriptions
6534 prototype.
6535 * thread.c: Remove _initialize_thread prototype.
6536 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6537 prototype.
6538 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6539 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6540 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6541 prototype.
6542 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6543 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6544 * tracefile.c: Remove _initialize_tracefile prototype.
6545 * tracepoint.c: Remove _initialize_tracepoint prototype.
6546 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6547 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6548 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6549 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6550 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6551 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6552 * tui/tui.c: Remove _initialize_tui prototype.
6553 * typeprint.c: Remove _initialize_typeprint prototype.
6554 * user-regs.c: Remove _initialize_user_regs prototype.
6555 * utils.c: Remove _initialize_utils prototype.
6556 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6557 * valarith.c: Remove _initialize_valarith prototype.
6558 * valops.c: Remove _initialize_valops prototype.
6559 * valprint.c: Remove _initialize_valprint prototype.
6560 * value.c: Remove _initialize_values prototype.
6561 * varobj.c: Remove _initialize_varobj prototype.
6562 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6563 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6564 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6565 * windows-nat.c: Remove _initialize_windows_nat,
6566 _initialize_check_for_gdb_ini, and _initialize_loadable
6567 prototypes.
6568 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6569 * xcoffread.c: Remove _initialize_xcoffread prototype.
6570 * xml-support.c: Remove _initialize_xml_support prototype.
6571 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6572 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6573 prototype.
6574 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6575 prototype.
6576 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6577
6578 2017-09-08 Keith Seitz <keiths@redhat.com>
6579
6580 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6581 field.
6582
6583 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6584
6585 * f-valprint.c (f_val_print): Remove check for one byte
6586 sized integers. Remove printing of character type.
6587
6588 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6589 Christoph Weinmann <christoph.t.weinmann@intel.com>
6590 Bernhard Heckel <bernhard.heckel@intel.com>
6591
6592 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6593 to maintain proper indentation when printing pointers/refs.
6594
6595 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6596
6597 GDB 8.0.1 released.
6598
6599 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6600
6601 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6602
6603 2017-09-05 Tom Tromey <tom@tromey.com>
6604
6605 * parse.c (funcall_chain): Now a std::vector.
6606 (start_arglist, end_arglist): Simplify.
6607 (free_funcalls): Remove.
6608 (parse_exp_in_context_1): Remove cleanup.
6609
6610 2017-09-05 Tom Tromey <tom@tromey.com>
6611
6612 * go-exp.y (go_parse): Don't create a cleanup.
6613
6614 2017-09-05 Tom Tromey <tom@tromey.com>
6615
6616 * d-exp.y (PrimaryExpression): Use std::string.
6617 (d_parse): Don't create a cleanup.
6618
6619 2017-09-05 Tom Tromey <tom@tromey.com>
6620
6621 * utils.c (do_clear_parser_state): Remove.
6622 (make_cleanup_clear_parser_state): Remove.
6623 * p-exp.y (pascal_parse): Use scoped_restore.
6624 * m2-exp.y (m2_parse): Use scoped_restore.
6625 * f-exp.y (f_parse): Use scoped_restore.
6626 * d-exp.y (d_parse): Use scoped_restore.
6627 * c-exp.y (c_parse): Use scoped_restore.
6628 * ada-exp.y (ada_parse): Use scoped_restore.
6629 * utils.h (make_cleanup_clear_parser_state): Remove.
6630
6631 2017-09-06 Keith Seitz <keiths@redhat.com>
6632
6633 * dwarf2read.c (dw2_linkage_name_attr): New function.
6634 (dw2_linkage_name): New function.
6635 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6636 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6637 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6638
6639 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6640
6641 * config/djgpp/djconfig.sh: Correct shell portability issue.
6642
6643 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6644
6645 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6646
6647 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6648
6649 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6650 * NEWS: Mention new FreeBSD/mips native configuration.
6651 * configure.host: Add aarch64*-*-freebsd*.
6652 * configure.nat: Likewise.
6653 * aarch64-fbsd-nat.c: New file.
6654
6655 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6656
6657 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6658 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6659 * NEWS: Mention new FreeBSD/aarch64 target.
6660 * configure.tgt: Add aarch64*-*-freebsd*.
6661 * aarch64-fbsd-tdep.c: New file.
6662 * aarch64-fbsd-tdep.h: New file.
6663
6664 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6665
6666 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6667
6668 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6669
6670 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6671 of TLS symbols.
6672
6673 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6674
6675 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6676 call.
6677
6678 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6679
6680 * infrun.c (follow_exec): Call add_thread after
6681 target_find_description.
6682
6683 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6684
6685 * infrun.c (handle_inferior_event_1): When exec'ing, read
6686 stop_pc after follow_exec.
6687
6688 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6689
6690 * remote.c (process_g_packet): Update error message.
6691
6692 2017-09-05 Yao Qi <yao.qi@linaro.org>
6693
6694 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6695 targets.
6696
6697 2017-09-05 Pedro Alves <palves@redhat.com>
6698
6699 * eval.c (eval_call, evaluate_funcall): New functions, factored
6700 out from ...
6701 (evaluate_subexp_standard): ... this.
6702
6703 2017-09-05 Yao Qi <yao.qi@linaro.org>
6704
6705 * amd64-tdep.c (amd64_target_description): Create target
6706 descriptions.
6707 (_initialize_amd64_tdep): Don't call functions
6708 initialize_tdesc_amd64_*. Add self tests.
6709 * arch/amd64.c (amd64_create_target_description): Add parameter
6710 is_linux. Call set_tdesc_osabi if is_linux is true.
6711 * arch/amd64.h (amd64_create_target_description): Update the
6712 declaration.
6713 * arch/i386.c (i386_create_target_description): Add parameter
6714 is_linux. Call set_tdesc_osabi if is_linux is true.
6715 * arch/i386.h (i386_create_target_description): Update
6716 declaration.
6717 * configure.tgt: Add i386.o to gdb_target_obs.
6718 * features/Makefile (XMLTOC): Remove i386/*.xml.
6719 * features/i386/amd64-avx-avx512.c: Remove.
6720 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6721 * features/i386/amd64-avx-mpx.c: Remove.
6722 * features/i386/amd64-avx.c: Remove.
6723 * features/i386/amd64-mpx.c: Remove.
6724 * features/i386/amd64.c: Remove.
6725 * features/i386/i386-avx-avx512.c: Remove.
6726 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6727 * features/i386/i386-avx-mpx.c: Remove.
6728 * features/i386/i386-avx.c: Remove.
6729 * features/i386/i386-mmx.c: Remove.
6730 * features/i386/i386-mpx.c: Remove.
6731 * features/i386/i386.c: Remove.
6732 * i386-tdep.c: Don't include features/i386/i386*.c., include
6733 target-descriptions.h and arch/i386.h.
6734 (i386_target_description): Create target descriptions.
6735 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6736 functions. Do self tests.
6737
6738 2017-09-05 Yao Qi <yao.qi@linaro.org>
6739
6740 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6741 * features/i386/amd64-avx-avx512-linux.c: Removed.
6742 * features/i386/amd64-avx-linux.c: Removed.
6743 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6744 * features/i386/amd64-avx-mpx-linux.c: Removed.
6745 * features/i386/amd64-linux.c: Removed.
6746 * features/i386/amd64-mpx-linux.c: Removed.
6747 * features/i386/x32-avx-avx512-linux.c: Removed.
6748 * features/i386/x32-avx-linux.c: Removed.
6749 * features/i386/x32-linux.c: Removed.
6750
6751 2017-09-05 Yao Qi <yao.qi@linaro.org>
6752
6753 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6754 features/i386/*.c.
6755 (amd64_linux_read_description): Call
6756 amd64_create_target_description.
6757 * arch/amd64.c: New file.
6758 * arch/amd64.h: New file.
6759 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6760 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6761
6762 2017-09-05 Yao Qi <yao.qi@linaro.org>
6763
6764 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6765 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6766 (amd64_linux_read_description): Create target descriptions.
6767 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6768 functions. Add unit tests.
6769 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6770 x32-core.xml.
6771 * features/i386/64bit-avx.c: Generated.
6772 * features/i386/64bit-avx512.c: Generated.
6773 * features/i386/64bit-core.c: Generated.
6774 * features/i386/64bit-linux.c: Generated.
6775 * features/i386/64bit-mpx.c: Generated.
6776 * features/i386/64bit-pkeys.c: Generated.
6777 * features/i386/64bit-segments.c: Generated.
6778 * features/i386/64bit-sse.c: Generated.
6779 * features/i386/x32-core.c: Generated.
6780 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6781 c files for amd64-linux and x32-linux.
6782
6783 2017-09-05 Yao Qi <yao.qi@linaro.org>
6784
6785 * amd64-linux-tdep.c (amd64_linux_read_description): New
6786 function.
6787 (amd64_linux_core_read_description): Call
6788 amd64_linux_read_description.
6789 (amd64_linux_init_abi): Likewise.
6790 (amd64_x32_linux_init_abi): Likewise.
6791 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6792 * x86-linux-nat.c (x86_linux_read_description): Call
6793 amd64_linux_read_description.
6794
6795 2017-09-05 Yao Qi <yao.qi@linaro.org>
6796
6797 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6798 comments.
6799
6800 2017-09-05 Yao Qi <yao.qi@linaro.org>
6801
6802 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6803 * features/i386/i386-avx-avx512-linux.c: Remove.
6804 * features/i386/i386-avx-linux.c: Remove.
6805 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6806 * features/i386/i386-avx-mpx-linux.c: Remove.
6807 * features/i386/i386-linux.c: Remove.
6808 * features/i386/i386-mmx-linux.c: Remove.
6809 * features/i386/i386-mpx-linux.c: Remove.
6810
6811 2017-09-05 Yao Qi <yao.qi@linaro.org>
6812
6813 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6814 (SFILES): Add arch/i386.c.
6815 (HFILES_NO_SRCDIR): Add arch/i386.h.
6816 * arch/i386.c: New file.
6817 * arch/i386.h: New file.
6818 * arch/tdesc.h (allocate_target_description): Declare.
6819 (set_tdesc_architecture): Declare.
6820 (set_tdesc_osabi): Declare.
6821 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6822 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6823 include arch/i386.h.
6824 (i386_linux_read_description): Remove code and call
6825 i386_create_target_description.
6826 (set_tdesc_architecture): New function.
6827 (set_tdesc_osabi): New function.
6828 * target-descriptions.h (allocate_target_description): Remove.
6829
6830 2017-09-05 Yao Qi <yao.qi@linaro.org>
6831
6832 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6833 * target-descriptions.c (tdesc_create_feature): Likewise, and
6834 adjust code.
6835 * features/i386/32bit-avx.c: Re-generated.
6836 * features/i386/32bit-avx512.c: Re-generated.
6837 * features/i386/32bit-core.c: Re-generated.
6838 * features/i386/32bit-linux.c: Re-generated.
6839 * features/i386/32bit-mpx.c: Re-generated.
6840 * features/i386/32bit-pkeys.c: Re-generated.
6841 * features/i386/32bit-sse.c: Re-generated.
6842
6843 2017-09-05 Yao Qi <yao.qi@linaro.org>
6844
6845 * regformats/regdef.h (struct reg): Override operator == and !=.
6846
6847 2017-09-05 Yao Qi <yao.qi@linaro.org>
6848
6849 * arch/tdesc.h: New file.
6850 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6851 * target-descriptions.c: Update comments.
6852 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6853 declarations.
6854 * features/i386/32bit-avx.c: Re-generated.
6855 * features/i386/32bit-avx512.c: Re-generated.
6856 * features/i386/32bit-core.c: Re-generated.
6857 * features/i386/32bit-linux.c: Re-generated.
6858 * features/i386/32bit-mpx.c: Re-generated.
6859 * features/i386/32bit-pkeys.c: Re-generated.
6860 * features/i386/32bit-sse.c: Re-generated.
6861
6862 2017-09-05 Yao Qi <yao.qi@linaro.org>
6863
6864 * regformats/regdat.sh: Update generated code.
6865
6866 2017-09-05 Yao Qi <yao.qi@linaro.org>
6867
6868 * regformats/regdat.sh: Adjust code order.
6869
6870 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6871
6872 * expprint.c (dump_subexp_body_standard): Use constant format
6873 string in fprintf_filtered call.
6874
6875 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6876
6877 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6878 NetBSD/i386.
6879 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6880
6881 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6882
6883 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6884
6885 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6886
6887 * bsd-kvm.o: Define _KMEMUSER.
6888 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6889 * configure: Regenerate.
6890
6891 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6892
6893 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6894 * i386-fbsd-nat.c: Likewise.
6895
6896 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6897
6898 * unittests/array-view-selftests.c: Add include of <array>.
6899
6900 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6901
6902 * spu-tdep.c (flush_ea_cache): Add missing argument to
6903 call_function_by_hand.
6904
6905 2017-09-04 Pedro Alves <palves@redhat.com>
6906
6907 * NEWS (Safer support for debugging with no debug info): New.
6908
6909 2017-09-04 Pedro Alves <palves@redhat.com>
6910
6911 * c-exp.y (function_method, function_method_void): Add current
6912 instance flags to TYPE_INSTANCE.
6913 * dwarf2read.c (check_modifier): New.
6914 (compute_delayed_physnames): Assert that only C++ adds delayed
6915 physnames. Mark fn_fields as const/volatile depending on
6916 physname.
6917 * eval.c (make_params): New type_instance_flags parameter. Use
6918 it as the new type's instance flags.
6919 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6920 flags element and pass it to make_params.
6921 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6922 instance flags element.
6923 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6924 * gdbtypes.h: Include "enum-flags.h".
6925 (type_instance_flags): New enum-flags type.
6926 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6927 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6928 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6929 (follow_type_instance_flags): New function.
6930 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6931 * parser-defs.h (follow_type_instance_flags): Declare.
6932 * valops.c (value_struct_elt_for_reference): const/volatile must
6933 match too.
6934
6935 2017-09-04 Pedro Alves <palves@redhat.com>
6936
6937 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6938 function/method scopes; lookup the nested name as a function local
6939 static variable.
6940
6941 2017-09-04 Pedro Alves <palves@redhat.com>
6942
6943 (%type <voidval>): Add function_method.
6944 * c-exp.y (exp): New production for calls with no arguments.
6945 (function_method, function_method_void_or_typelist): New
6946 productions.
6947 (exp): New production for "method()::static_var".
6948 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6949 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6950 Handle OP_FUNC_STATIC_VAR.
6951 * parse.c (operator_length_standard):
6952 Handle OP_FUNC_STATIC_VAR.
6953
6954 2017-09-04 Pedro Alves <palves@redhat.com>
6955
6956 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6957 handling.
6958 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6959 Ditto.
6960 * parse.c (operator_length_standard, operator_check_standard):
6961 Ditto.
6962 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6963
6964 2017-09-04 Pedro Alves <palves@redhat.com>
6965
6966 * ax-gdb.c: Include "typeprint.h".
6967 (gen_expr_for_cast): New function.
6968 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6969 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6970 type is unknown.
6971 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6972 nodebug_data_symbol.
6973 * eval.c: Include "typeprint.h".
6974 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6975 Error out if symbol has unknown type.
6976 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6977 evaluate_subexp_for_cast.
6978 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6979 OP_VAR_MSYM_VALUE.
6980 (evaluate_subexp_for_cast): New function.
6981 * gdbtypes.c (init_nodebug_var_type): New function.
6982 (objfile_type): Use it to initialize types of variables with no
6983 debug info.
6984 * typeprint.c (error_unknown_type): New.
6985 * typeprint.h (error_unknown_type): New declaration.
6986 * compile/compile-c-types.c (convert_type_basic): Handle
6987 TYPE_CODE_ERROR; warn and fallback to int for variables with
6988 unknown type.
6989
6990 2017-09-04 Pedro Alves <palves@redhat.com>
6991
6992 * eval.c (evaluate_var_value): New function, factored out from ...
6993 (evaluate_subexp_standard): ... here.
6994
6995 2017-09-04 Pedro Alves <palves@redhat.com>
6996
6997 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6998 Remove useless assignments to 'op'.
6999
7000 2017-09-04 Pedro Alves <palves@redhat.com>
7001
7002 * eval.c (eval_skip_value): New function.
7003 (evaluate_subexp_standard): Use it.
7004
7005 2017-09-04 Pedro Alves <palves@redhat.com>
7006
7007 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7008 function name from symbol/minsym and pass it to
7009 error_call_unknown_return_type.
7010
7011 2017-09-04 Pedro Alves <palves@redhat.com>
7012
7013 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7014 * ax-gdb.c (gen_msym_var_ref): New function.
7015 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7016 * eval.c (evaluate_var_msym_value): New function.
7017 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7018 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7019 to call_function_by_hand.
7020 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7021 Handle OP_VAR_MSYM_VALUE.
7022 (union exp_element) <msymbol>: New field.
7023 * minsyms.h (struct type): Forward declare.
7024 (find_minsym_type_and_address): Declare.
7025 * parse.c (write_exp_elt_msym): New function.
7026 (write_exp_msymbol): Delete, refactored as ...
7027 (find_minsym_type_and_address): ... this new function.
7028 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7029 (operator_length_standard, operator_check_standard): Handle
7030 OP_VAR_MSYM_VALUE.
7031 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7032
7033 2017-09-04 Pedro Alves <palves@redhat.com>
7034
7035 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7036 TYPE_GNU_IFUNC specially here. Throw error if return type is
7037 unknown.
7038 * ada-typeprint.c (print_func_type): Handle functions with unknown
7039 return type.
7040 * c-typeprint.c (c_type_print_base): Handle functions and methods
7041 with unknown return type.
7042 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7043 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7044 * compile/compile-c-types.c: Include "objfiles.h".
7045 (convert_func): For functions with unknown return type, warn and
7046 default to int.
7047 * compile/compile-object-run.c (compile_object_run): Adjust call
7048 to call_function_by_hand_dummy.
7049 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7050 call_function_by_hand.
7051 * eval.c (evaluate_subexp_standard): Adjust calls to
7052 call_function_by_hand. Handle functions and methods with unknown
7053 return type. Pass expect_type to call_function_by_hand.
7054 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7055 return type.
7056 * gcore.c (call_target_sbrk): Adjust call to
7057 call_function_by_hand.
7058 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7059 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7060 an integer address type instead of nodebug.
7061 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7062 call_function_by_hand.
7063 * infcall.c (error_call_unknown_return_type): New function.
7064 (call_function_by_hand): New "default_return_type" parameter.
7065 Pass it down.
7066 (call_function_by_hand_dummy): New "default_return_type"
7067 parameter. Use it instead of defaulting to int. If there's no
7068 default and the return type is unknown, throw an error. If
7069 there's a default return type, and the called function has no
7070 debug info, then assume the function is prototyped.
7071 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7072 New "default_return_type" parameter.
7073 (error_call_unknown_return_type): New declaration.
7074 * linux-fork.c (call_lseek): Cast return type of lseek.
7075 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7076 call_function_by_hand.
7077 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7078 calls to call_function_by_hand.
7079 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7080 return type.
7081 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7082 (value_nsstring, print_object_command): Adjust calls to
7083 call_function_by_hand.
7084 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7085 functions with unknown return type.
7086 (pascal_type_print_func_varspec_suffix): New function.
7087 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7088 TYPE_CODE_METHOD>: Use it.
7089 * python/py-value.c (valpy_call): Adjust call to
7090 call_function_by_hand.
7091 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7092 call_function_by_hand.
7093 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7094 call_function_by_hand.
7095 * valops.c (value_allocate_space_in_inferior): Adjust call to
7096 call_function_by_hand.
7097 * typeprint.c (type_print_unknown_return_type): New function.
7098 * typeprint.h (type_print_unknown_return_type): New declaration.
7099
7100 2017-09-04 Pedro Alves <palves@redhat.com>
7101
7102 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7103 types with more than one parameter as prototyped.
7104
7105 2017-09-04 Pedro Alves <palves@redhat.com>
7106
7107 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7108 (disassemble_command): Use gdb_disassembly_flags instead of bare
7109 int.
7110 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7111 (dump_insns, do_mixed_source_and_assembly_deprecated)
7112 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7113 Use gdb_disassembly_flags instead of bare int.
7114 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7115 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7116 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7117 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7118 (enum gdb_disassembly_flag): ... values of this new enumeration.
7119 (gdb_disassembly_flags): Define.
7120 (gdb_disassembly)
7121 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7122 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7123 gdb_disassembly_flags instead of bare int.
7124 * record-btrace.c (btrace_insn_history)
7125 (record_btrace_insn_history, record_btrace_insn_history_range)
7126 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7127 instead of bare int.
7128 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7129 Use gdb_disassembly_flags instead of bare int.
7130 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7131 Define.
7132 * target-delegates.c: Regenerate.
7133 * target.c (target_insn_history, target_insn_history_from)
7134 (target_insn_history_range): Use gdb_disassembly_flags instead of
7135 bare int.
7136 * target.h: Include "disasm.h".
7137 (struct target_ops) <to_insn_history, to_insn_history_from,
7138 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7139 int.
7140 (target_insn_history, target_insn_history_from)
7141 (target_insn_history_range): Use gdb_disassembly_flags instead of
7142 bare int.
7143
7144 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7145
7146 * cli/cli-script.c (build_command_line): For if/while commands,
7147 check whether args is empty.
7148
7149 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7150
7151 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7152 (enum command_control_type): Likewise.
7153 (struct command_line): Likewise.
7154 (free_command_lines): Likewise.
7155 (struct command_lines_deleter): Likewise.
7156 (command_line_up): Likewise.
7157 (read_command_lines): Likewise.
7158 (read_command_lines_1): Likewise.
7159 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7160 (enum command_control_type): Likewise.
7161 (struct command_line): Likewise.
7162 (free_command_lines): Likewise.
7163 (struct command_lines_deleter): Likewise.
7164 (command_line_up): Likewise.
7165 (read_command_lines): Likewise.
7166 (read_command_lines_1): Likewise.
7167 * breakpoint.h: Include cli/cli-script.h.
7168 * extension-priv.h: Likewise.
7169 * gdbcmd.h: Likewise.
7170
7171 2017-09-04 Pedro Alves <palves@redhat.com>
7172
7173 * ada-lang.c (is_known_support_routine): Move sal declaration to
7174 where it is initialized.
7175 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7176 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7177 (clear_command, update_static_tracepoint): Remove init_sal
7178 references. Move declarations closer to initializations.
7179 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7180 initializations.
7181 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7182 references. Move sal declarations closer to initializations.
7183 * frame.c (find_frame_sal): Return a symtab_and_line via function
7184 return instead of output parameter. Remove init_sal references.
7185 * frame.h (find_frame_sal): Return a symtab_and_line via function
7186 return instead of output parameter.
7187 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7188 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7189 instead of memset.
7190 (gdbscm_find_pc_line): Remove init_sal reference.
7191 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7192 references. Move declarations closer to initializations.
7193 * infcmd.c (set_step_frame): Update. Move declarations closer to
7194 initializations.
7195 (finish_backward): Remove init_sal references. Move declarations
7196 closer to initializations.
7197 * infrun.c (process_event_stop_test, handle_step_into_function)
7198 (insert_hp_step_resume_breakpoint_at_frame)
7199 (insert_step_resume_breakpoint_at_caller): Likewise.
7200 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7201 (symbol_to_sal): Likewise.
7202 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7203 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7204 to its initialization.
7205 * reverse.c (save_bookmark_command): Use new/delete. Remove
7206 init_sal references. Move declarations closer to initializations.
7207 * source.c (get_current_source_symtab_and_line): Remove brace
7208 initialization.
7209 (set_current_source_symtab_and_line): Now takes the sal by const
7210 reference. Remove brace initialization.
7211 (line_info): Remove init_sal reference.
7212 * source.h (set_current_source_symtab_and_line): Now takes a
7213 symtab_and_line via const reference.
7214 * stack.c (set_current_sal_from_frame): Adjust.
7215 (print_frame_info): Adjust.
7216 (get_last_displayed_sal): Return the sal via function return
7217 instead of via output parameter. Simplify.
7218 (frame_info): Adjust.
7219 * stack.h (get_last_displayed_sal): Return the sal via function
7220 return instead of via output parameter.
7221 * symtab.c (init_sal): Delete.
7222 (find_pc_sect_line): Remove init_sal references. Move
7223 declarations closer to initializations.
7224 (find_function_start_sal): Remove init_sal references. Move
7225 declarations closer to initializations.
7226 * symtab.h (struct symtab_and_line): In-class initialize all
7227 fields.
7228 * tracepoint.c (set_traceframe_context)
7229 (print_one_static_tracepoint_marker): Remove init_sal references.
7230 Move declarations closer to initializations.
7231 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7232 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7233 declarations closer to initializations.
7234 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7235 init_sal references. Adjust.
7236
7237 2017-09-04 Pedro Alves <palves@redhat.com>
7238
7239 * ax-gdb.c (agent_command_1): Use range-for.
7240 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7241 * breakpoint.c: Include "common/array-view.h".
7242 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7243 parameter from struct symtabs_and_lines to
7244 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7245 (breakpoint_sals_to_pc): Change sals parameter from struct
7246 symtabs_and_lines to std::vector reference.
7247 (check_fast_tracepoint_sals): Change sals parameter from struct
7248 symtabs_and_lines to std::array_view. Use range-for.
7249 (decode_static_tracepoint_spec): Return a std::vector instead of
7250 symtabs_and_lines. Update.
7251 (create_breakpoint): Update.
7252 (break_range_command, until_break_command, clear_command): Update.
7253 (base_breakpoint_decode_location, bkpt_decode_location)
7254 (bkpt_probe_create_sals_from_location)
7255 (bkpt_probe_decode_location, tracepoint_decode_location)
7256 (tracepoint_probe_decode_location)
7257 (strace_marker_create_sals_from_location): Return a std::vector
7258 instead of symtabs_and_lines.
7259 (strace_marker_create_breakpoints_sal): Update.
7260 (strace_marker_decode_location): Return a std::vector instead of
7261 symtabs_and_lines. Update.
7262 (update_breakpoint_locations): Change struct symtabs_and_lines
7263 parameters to gdb::array_view. Adjust.
7264 (location_to_sals): Return a std::vector instead of
7265 symtabs_and_lines. Update.
7266 (breakpoint_re_set_default): Use std::vector instead of struct
7267 symtabs_and_lines.
7268 (decode_location_default): Return a std::vector instead of
7269 symtabs_and_lines. Update.
7270 * breakpoint.h: Include "common/array-view.h".
7271 (struct breakpoint_ops) <decode_location>: Now returns a
7272 std::vector instead of returning a symtabs_and_lines via output
7273 parameter.
7274 (update_breakpoint_locations): Change sals parameters to use
7275 gdb::array_view.
7276 * cli/cli-cmds.c (edit_command, list_command): Update to use
7277 std::vector and gdb::array_view.
7278 (ambiguous_line_spec): Adjust to use gdb::array_view and
7279 range-for.
7280 (compare_symtabs): Rename to ...
7281 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7282 const reference and adjust.
7283 (filter_sals): Rewrite using std::vector and standard algorithms.
7284 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7285 (jump_command): Update to use std::vector.
7286 * linespec.c (struct linespec_state) <canonical_names>: Update
7287 comment.
7288 (add_sal_to_sals_basic): Delete.
7289 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7290 (decode_line_2, create_sals_line_offset)
7291 (convert_address_location_to_sals, convert_linespec_to_sals)
7292 (convert_explicit_location_to_sals, parse_linespec)
7293 (event_location_to_sals, decode_line_full, decode_line_1)
7294 (decode_line_with_current_source)
7295 (decode_line_with_last_displayed, decode_objc)
7296 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7297 (linespec_result::~linespec_result): Adjust to use std::vector
7298 instead of symtabs_and_lines.
7299 * linespec.h (linespec_sals::sals): Now a std::vector.
7300 (struct linespec_result): Use std::vector, bool, and in-class
7301 initialization.
7302 (decode_line_1, decode_line_with_current_source)
7303 (decode_line_with_last_displayed): Return std::vector.
7304 * macrocmd.c (info_macros_command): Use std::vector.
7305 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7306 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7307 std::vector.
7308 * probe.h (parse_probes): Return a std::vector.
7309 * python/python.c (gdbpy_decode_line): Use std::vector and
7310 gdb::array_view.
7311 * source.c (select_source_symtab, line_info): Use std::vector.
7312 * stack.c (func_command): Use std::vector.
7313 * symtab.h (struct symtabs_and_lines): Delete.
7314 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7315
7316 2017-09-04 Pedro Alves <palves@redhat.com>
7317
7318 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7319 unittests/array-view-selftests.c.
7320 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7321 * common/array-view.h: New file.
7322 * unittests/array-view-selftests.c: New file.
7323
7324 2017-09-04 Pedro Alves <palves@redhat.com>
7325
7326 * cli/cli-cmds.c (edit_command): Pass message to
7327 ambiguous_line_spec.
7328 (list_command): Pass message to ambiguous_line_spec. Say
7329 "first"/"last" instead of "start" and "end" to be consistent with
7330 the manual.
7331 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7332 them to print formatted message.
7333
7334 2017-09-04 Pedro Alves <palves@redhat.com>
7335
7336 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7337 ftrace_update_insns by reference instead of pointer.
7338
7339 2017-09-04 Yao Qi <yao.qi@linaro.org>
7340
7341 * i386-go32-tdep.c: Include x86-xstate.h.
7342 (i386_go32_init_abi): Call i386_target_description.
7343 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7344 if xcr0 is X86_XSTATE_X87_MASK.
7345 * i386-tdep.h (tdesc_i386): Remove the declaration.
7346 (tdesc_i386_mmx): Likewise.
7347
7348 2017-09-04 Yao Qi <yao.qi@linaro.org>
7349
7350 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7351 X86_XSTATE_SSE_MASK instead of 0.
7352
7353 2017-09-04 Yao Qi <yao.qi@linaro.org>
7354
7355 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7356 i386_target_description.
7357 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7358 i386_target_description.
7359 * i386-tdep.c (i386_gdbarch_init): Likewise.
7360
7361 2017-09-04 Yao Qi <yao.qi@linaro.org>
7362
7363 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7364 (x86_darwin_init_abi_64): Call amd64_target_description.
7365 * amd64-dicos-tdep.c: Likewise.
7366 * amd64-fbsd-nat.c: Likewise.
7367 * amd64-fbsd-tdep.c: Likewise.
7368 * amd64-nbsd-tdep.c: Likewise.
7369 * amd64-obsd-tdep.c: Likewise.
7370 * amd64-sol2-tdep.c: Likewise.
7371 * amd64-windows-tdep.c: Likewise.
7372 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7373
7374 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7375
7376 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7377 (btrace_function) <insn>: Change type to use std::vector.
7378 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7379 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7380 ftrace_update_insns, ftrace_compute_global_level_offset,
7381 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7382 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7383 change to std::vector.
7384 (ftrace_update_insns): Adjust to change to std::vector, change
7385 type of INSN parameter.
7386 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7387 * record-btrace.c (btrace_call_history_insn_range,
7388 btrace_compute_src_line_range,
7389 record_btrace_frame_prev_register): Adjust to change to
7390 std::vector.
7391 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7392 to change to std::vector.
7393
7394 2017-09-03 Tom Tromey <tom@tromey.com>
7395
7396 * corefile.c (reopen_exec_file): Use std::string.
7397
7398 2017-09-03 Tom Tromey <tom@tromey.com>
7399
7400 * compile/compile.c (compile_register_name_mangled): Return
7401 std::string.
7402 * compile/compile-loc2c.c (pushf_register_address): Update.
7403 (pushf_register): Update.
7404 * compile/compile-c-types.c (convert_array): Update.
7405 * compile/compile-c-symbols.c (generate_vla_size): Update.
7406 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7407 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7408 (convert_one_symbol): Update.
7409 (generate_c_for_for_one_variable): Update.
7410 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7411 std::string.
7412 (generate_register_struct): Update.
7413 * compile/compile-internal.h (c_get_range_decl_name): Return a
7414 std::string.
7415 (compile_register_name_mangled): Return std::string.
7416
7417 2017-09-03 Tom Tromey <tom@tromey.com>
7418
7419 * utils.c (perror_string): Return a std::string.
7420 (throw_perror_with_name, perror_warning_with_name): Update.
7421
7422 2017-09-03 Tom Tromey <tom@tromey.com>
7423
7424 * demangle.c (demangle_command): Use std::string,
7425 unique_xmalloc_ptr.
7426
7427 2017-09-03 Tom Tromey <tom@tromey.com>
7428
7429 * cli/cli-setshow.c (do_set_command): Use std::string.
7430
7431 2017-09-03 Tom Tromey <tom@tromey.com>
7432
7433 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7434
7435 2017-09-03 Tom Tromey <tom@tromey.com>
7436
7437 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7438
7439 2017-09-03 Tom Tromey <tom@tromey.com>
7440
7441 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7442 gdb::unique_xmalloc_ptr.
7443
7444 2017-09-03 Tom Tromey <tom@tromey.com>
7445
7446 * thread.c (print_thread_info_1): Use string_printf.
7447 (thread_apply_command, thread_apply_all_command): Use
7448 std::string.
7449
7450 2017-09-03 Tom Tromey <tom@tromey.com>
7451
7452 * valprint.c (val_print_string): Update.
7453 * gdbcore.h (memory_error_message): Return std::string.
7454 * corefile.c (memory_error_message): Return std::string.
7455 (memory_error): Update.
7456 * breakpoint.c (insert_bp_location): Update.
7457
7458 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7459
7460 * target/waitstatus.h (target_waitstatus_to_string): Change
7461 return type to std::string.
7462 * target/waitstatus.c (target_waitstatus_to_string): Return
7463 std::string.
7464 * target.h (target_waitstatus_to_string): Remove declaration.
7465 * infrun.c (resume, clear_proceed_status_thread,
7466 print_target_wait_results, do_target_wait, save_waitstatus,
7467 stop_all_threads): Adjust.
7468 * record-btrace.c (record_btrace_wait): Adjust.
7469 * target-debug.h
7470 (target_debug_print_struct_target_waitstatus_p): Adjust.
7471
7472 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7473
7474 PR gdb/22046
7475 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7476 detection.
7477
7478 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7479
7480 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7481 for setting/unsetting environment variables on the remote target.
7482 (New remote packets): Add entries for QEnvironmentHexEncoded,
7483 QEnvironmentUnset and QEnvironmentReset.
7484 * common/environ.c (gdb_environ::operator=): Extend method to
7485 handle m_user_set_env_list and m_user_unset_env_list.
7486 (gdb_environ::clear): Likewise.
7487 (match_var_in_string): Change type of first parameter from 'char
7488 *' to 'const char *'.
7489 (gdb_environ::set): Extend method to handle
7490 m_user_set_env_list and m_user_unset_env_list.
7491 (gdb_environ::unset): Likewise.
7492 (gdb_environ::clear_user_set_env): New method.
7493 (gdb_environ::user_set_envp): Likewise.
7494 (gdb_environ::user_unset_envp): Likewise.
7495 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7496 m_user_unset_env_list on move constructor/assignment.
7497 (unset): Add new default parameter 'update_unset_list = true'.
7498 (clear_user_set_env): New method.
7499 (user_set_envp): Likewise.
7500 (user_unset_envp): Likewise.
7501 (m_user_set_env_list): New std::set.
7502 (m_user_unset_env_list): Likewise.
7503 * common/rsp-low.c (hex2str): New function.
7504 (bin2hex): New overload for bin2hex function.
7505 * common/rsp-low.c (hex2str): New prototype.
7506 (str2hex): New overload prototype.
7507 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7508 QEnvironmentUnset and QEnvironmentReset.
7509 (remote_protocol_features): Add QEnvironmentHexEncoded,
7510 QEnvironmentUnset and QEnvironmentReset packets.
7511 (send_environment_packet): New function.
7512 (extended_remote_environment_support): Likewise.
7513 (extended_remote_create_inferior): Call
7514 extended_remote_environment_support.
7515 (_initialize_remote): Add QEnvironmentHexEncoded,
7516 QEnvironmentUnset and QEnvironmentReset packet configs.
7517 * unittests/environ-selftests.c (gdb_selftest_env_var):
7518 New variable.
7519 (test_vector_initialization): New function.
7520 (test_init_from_host_environ): Likewise.
7521 (test_reinit_from_host_environ): Likewise.
7522 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7523 Likewise.
7524 (test_unset_set_empty_vector): Likewise.
7525 (test_vector_clear): Likewise.
7526 (test_std_move): Likewise.
7527 (test_move_constructor):
7528 (test_self_move): Likewise.
7529 (test_set_unset_reset): Likewise.
7530 (run_tests): Rewrite in terms of the functions above.
7531
7532 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7533
7534 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7535 (adi_available): Use a temp variable of type CORE_ADDR as argument
7536 3 when calling target_auxv_search.
7537 (adi_normalize_address): Use masks and xor operators to calculate
7538 normalized address.
7539 (adi_read_versions, adi_write_versions, adi_print_versions)
7540 (do_examine, do_assign): Use paddress.
7541
7542 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7543
7544 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7545 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7546 out of loop and add supply of FIR.
7547 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7548 add collect of FIR.
7549
7550 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7551
7552 PR gdb/21827
7553 * cli/cli-script.c (define_command): Don't convert command name
7554 to lower case.
7555
7556 2017-08-25 Joel Brobecker <brobecker@adacore.com>
7557
7558 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7559 Update all callers accordingly. Remove all code blocks handling
7560 the case where DISPP is not NULL.
7561
7562 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7563
7564 PR symtab/22003
7565 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7566 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7567 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7568
7569 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7570
7571 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7572 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7573 (read_comp_units_from_section): New parameter abbrev_section, use
7574 read_and_check_comp_unit_head, allocate signatured_type if needed.
7575 (create_all_comp_units): Update read_comp_units_from_section caller.
7576
7577 2017-08-23 Pedro Alves <palves@redhat.com>
7578
7579 PR remote/21852
7580 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7581 to null_ptid and switch to thread without reading the registers
7582 after adding the inferior.
7583
7584 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7585
7586 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7587 compile-gcc.
7588 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7589 (compile_to_object): Implement compile_gcc.
7590 (_initialize_compile): Install "set compile-gcc". Initialize
7591 compile_gcc.
7592
7593 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7594
7595 * compile/compile.c (compile_to_object): Conditionally call
7596 set_verbose. Conditionally call compile or compile_v0.
7597
7598 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7599
7600 * sparc64-tdep.h: (adi_normalize_address): New export.
7601 * sparc-nat.h: (open_adi_tag_fd): New export.
7602 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7603 * sparc64-linux-tdep.c:
7604 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7605 (sparc64_linux_handle_segmentation_fault): New function.
7606 (sparc64_linux_init_abi): Register
7607 sparc64_linux_handle_segmentation_fault
7608 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7609 (sparc64_addr_bits_remove): New function.
7610 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7611 (MAX_PROC_NAME_SIZE): New macro.
7612 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7613 (sparc64adilist): New variable.
7614 (adi_proc_list): New variable.
7615 (find_adi_info): New function.
7616 (add_adi_info): New function.
7617 (get_adi_info_proc): New function.
7618 (get_adi_info): New function.
7619 (info_adi_command): New function.
7620 (read_maps_entry): New function.
7621 (adi_available): New function.
7622 (adi_normalize_address): New function.
7623 (adi_align_address): New function.
7624 (adi_convert_byte_count): New function.
7625 (adi_tag_fd): New function.
7626 (adi_is_addr_mapped): New function.
7627 (adi_read_versions): New function.
7628 (adi_write_versions): New function.
7629 (adi_print_versions): New function.
7630 (do_examine): New function.
7631 (do_assign): New function.
7632 (adi_examine_command): New function.
7633 (adi_assign_command): New function.
7634 (_initialize_sparc64_adi_tdep): New function.
7635
7636 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7637
7638 * breakpoint.c (breakpoints_info): Rename to ...
7639 (info_breakpoints_command): ... this.
7640 (watchpoints_info): Rename to ...
7641 (info_watchpoints_command): ... this.
7642 (tracepoints_info): Rename to ...
7643 (info_tracepoints_command): ... this.
7644 (_initialize_breakpoint): Adjust.
7645 * dcache.c (dcache_info): Rename to ...
7646 (info_display_command): ... this.
7647 (_initialize_dcache): Adjust.
7648 * frame.h (args_info): Rename to ...
7649 (info_args_command): ... this.
7650 (locals_info): Rename to ...
7651 (info_locals_command): ... this.
7652 * infcmd.c (nofp_registers_info): Rename to ...
7653 (info_registers_command): ... this.
7654 (float_info): Rename to ...
7655 (info_float_command): ... this.
7656 (program_info): Rename to ...
7657 (info_program_command): ... this.
7658 (all_registers_info): Rename to ...
7659 (info_all_registers_command): ... this.
7660 (vector_info): Rename to ...
7661 (info_vector_command): ... this.
7662 (float_info): Rename to ...
7663 (info_float_command): ... this.
7664 (_initialize_infcmd): Adjust.
7665 * inferior.h (term_info): Rename to ...
7666 (info_terminal_command): ... this.
7667 * inflow.c (term_info): Rename to ...
7668 (info_terminal_command): ... this.
7669 (_initialize_inflow): Adjust.
7670 * infrun.c (signals_info): Rename to ...
7671 (info_signals_command): ... this.
7672 (_initialize_infrun): Adjust.
7673 * objc-lang.c (classes_info): Rename to ...
7674 (info_classes_command): ... this.
7675 (selectors_info): Rename to ...
7676 (info_selectors_command): ... this.
7677 (_initialize_objc_language): Adjust.
7678 * printcmd.c (sym_info): Rename to ...
7679 (info_symbol_command): ... this.
7680 (address_info): Rename to ...
7681 (info_address_command): ... this.
7682 (display_info): Rename to ...
7683 (info_display_command): ... this.
7684 (_initialize_printcmd): Adjust.
7685 * reverse.c (bookmarks_info): Rename to ...
7686 (info_breakpoints_command): ... this.
7687 (_initialize_reverse): Adjust.
7688 * ser-go32.c (dos_info): Rename to ...
7689 (info_serial_command): ... this.
7690 (_initialize_ser_dos): Adjust.
7691 * skip.c (skip_info): Rename to ...
7692 (info_skip_command): ... this.
7693 (_initialize_step_skip): Adjust.
7694 * source.c (line_info): Rename to ...
7695 (info_line_command): ... this.
7696 (source_info): Rename to ...
7697 (info_source_command)
7698 * stack.c (frame_info): Rename to ...
7699 (info_frame_command): ... this.
7700 (locals_info): Rename to ...
7701 (info_locals_command): ... this.
7702 (args_info): Rename to ...
7703 (info_args_command): ... this.
7704 (_initialize_stack): Adjust.
7705 * symtab.c (sources_info): Rename to ...
7706 (info_sources_command): ... this.
7707 (variables_info): Rename to ...
7708 (info_variables_command): ... this.
7709 (functions_info): Rename to ...
7710 (info_functions_command): ... this.
7711 (types_info): Rename to ...
7712 (info_types_command): ... this.
7713 (_initialize_symtab): Adjust.
7714 * target.c (target_info): Rename to ...
7715 (info_target_command): ... this.
7716 (initialize_targets): Adjust.
7717 * tracepoint.c (tvariables_info): Rename to ...
7718 (info_tvariables_command): ... this.
7719 (scope_info): Rename to ...
7720 (info_scope_command): ... this.
7721 (trace_dump_actions): Adjust.
7722 (_initialize_tracepoint): Adjust.
7723
7724 2017-08-22 Tom Tromey <tom@tromey.com>
7725
7726 * breakpoint.h (install_breakpoint): Update.
7727 * breakpoint.c (add_solib_catchpoint): Update.
7728 (install_breakpoint): Change argument to a std::unique_ptr.
7729 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7730 (create_breakpoint_sal, create_breakpoint): Update.
7731 (watch_command_1, catch_exec_command_1)
7732 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7733 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7734 Return the breakpoint.
7735 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7736 (new_single_step_breakpoint): Update.
7737 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7738 std::unique_ptr.
7739 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7740 std::unique_ptr.
7741 * break-catch-sig.c (create_signal_catchpoint): Use
7742 std::unique_ptr.
7743 * ada-lang.c (create_ada_exception_catchpoint): Use
7744 std::unique_ptr.
7745
7746 2017-08-22 Tom Tromey <tom@tromey.com>
7747
7748 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7749
7750 2017-08-22 Tom Tromey <tom@tromey.com>
7751
7752 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7753 (lookup_partial_symbol): Update.
7754
7755 2017-08-22 Tom Tromey <tom@tromey.com>
7756
7757 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7758 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7759 (find_and_open_source, symtab_to_fullname): Update.
7760 * psymtab.c (psymtab_to_fullname): Update.
7761
7762 2017-08-22 Tom Tromey <tom@tromey.com>
7763
7764 * exec.c (exec_file_attach): Update.
7765 * linux-thread-db.c (try_thread_db_load): Update.
7766 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7767 * utils.c (gdb_realpath): Change return type.
7768 (gdb_realpath_keepfile): Update.
7769 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7770 (_initialize_utils): Register the new self test.
7771 * source.c (openp): Update.
7772 (find_and_open_source): Update.
7773 * nto-tdep.c (nto_find_and_open_solib): Update.
7774 * main.c (set_gdb_data_directory): Update.
7775 (captured_main_1): Update.
7776 * dwarf2read.c (dwarf2_get_dwz_file): Update
7777 (dw2_map_symbol_filenames): Update.
7778 * auto-load.c (auto_load_safe_path_vec_update): Update.
7779 (filename_is_in_auto_load_safe_path_vec): Change type of
7780 "filename_realp".
7781 (auto_load_objfile_script): Update.
7782 (file_is_auto_load_safe): Update. Use std::string.
7783 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7784
7785 2017-08-22 Tom Tromey <tom@tromey.com>
7786
7787 * utils.c (gdb_realpath_keepfile): Return a
7788 gdb::unique_xmalloc_ptr.
7789 * exec.c (exec_file_attach): Update.
7790 * utils.h (gdb_realpath_keepfile): Return a
7791 gdb::unique_xmalloc_ptr.
7792
7793 2017-08-22 Tom Tromey <tom@tromey.com>
7794
7795 * compile/compile.c (compile_file_command): Use
7796 gdb::unique_xmalloc_ptr, std::string.
7797 * utils.c (gdb_abspath): Change return type.
7798 * source.c (openp): Update.
7799 * objfiles.c (allocate_objfile): Update.
7800 * main.c (set_gdb_data_directory): Update.
7801 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7802
7803 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7804
7805 * cli-cmds.c (list_commands): List actual code around more than
7806 one location.
7807
7808 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7809
7810 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7811
7812 2017-08-21 Pedro Alves <palves@redhat.com>
7813
7814 PR gdb/19487
7815 * c-exp.y (variable production): Handle function aliases.
7816 * minsyms.c (msymbol_is_text): New function.
7817 * minsyms.h (msymbol_is_text): Declare.
7818 * symtab.c (find_function_alias_target): New function.
7819 * symtab.h (find_function_alias_target): Declare.
7820
7821 2017-08-21 Pedro Alves <palves@redhat.com>
7822
7823 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7824 typedefs.
7825 * typeprint.c (whatis_exp): If handling "whatis", and expression
7826 is OP_TYPE, strip one typedef level. Otherwise don't strip
7827 typedefs here.
7828 * valops.c (value_cast): Save "to" type before resolving
7829 stubs/typedefs. Use that type as resulting value's type.
7830
7831 2017-08-18 Tom Tromey <tom@tromey.com>
7832 Pedro Alves <palves@redhat.com>
7833
7834 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7835 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7836 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7837 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7838 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7839 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7840 (linux_get_siginfo_data): Add "thread" argument. Use
7841 scoped_restore.
7842 * linux-nat.c (linux_child_follow_fork)
7843 (check_stopped_by_watchpoint): Use scoped_restore.
7844 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7845 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7846 (restore_inferior_ptid, save_inferior_ptid): Remove.
7847 * btrace.c (btrace_fetch): Use scoped_restore.
7848 * bsd-uthread.c (bsd_uthread_fetch_registers)
7849 (bsd_uthread_store_registers): Use scoped_restore.
7850 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7851 scoped_restore.
7852 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7853 (aix_thread_xfer_partial): Use scoped_restore.
7854 * inferior.h (save_inferior_ptid): Remove.
7855
7856 2017-08-18 Yao Qi <yao.qi@linaro.org>
7857
7858 PR tdep/21818
7859 * arm-tdep.c (gdb_print_insn_arm): Mark
7860 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7861
7862 2017-08-18 Yao Qi <yao.qi@linaro.org>
7863
7864 * NEWS: Mention GDBserver's new option "--selftest".
7865 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7866 * selftest.c: Move it to common/selftest.c.
7867 * selftest.h: Move it to common/selftest.h.
7868 * selftest-arch.c (reset): New function.
7869 (tests_with_arch): Call reset.
7870
7871 2017-08-18 Yao Qi <yao.qi@linaro.org>
7872
7873 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7874 instead of exception_fprintf and printf_filtered.
7875
7876 2017-08-18 Yao Qi <yao.qi@linaro.org>
7877
7878 * selftest.c (register_self_test): Rename it to
7879 selftests::register_test.
7880 (run_self_tests): selftest::run_tests.
7881 * selftest.h: Update declarations.
7882 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7883 selftests::register_test_foreach_arch.
7884 * selftest-arch.h: Update declaration.
7885 * aarch64-tdep.c: Update.
7886 * arm-tdep.c: Likewise.
7887 * disasm-selftests.c: Likewise.
7888 * dwarf2loc.c: Likewise.
7889 * dwarf2-frame.c: Likewise.
7890 * findvar.c: Likewise.
7891 * gdbarch-selftests.c: Likewise.
7892 * maint.c (maintenance_selftest): Likewise.
7893 * regcache.c: Likewise.
7894 * rust-exp.y: Likewise.
7895 * selftest-arch.c: Likewise.
7896 * unittests/environ-selftests.c: Likewise.
7897 * unittests/function-view-selftests.c: Likewise.
7898 * unittests/offset-type-selftests.c: Likewise.
7899 * unittests/optional-selftests.c: Likewise.
7900 * unittests/scoped_restore-selftests.c: Likewise.
7901 * utils-selftests.c: Likewise.
7902
7903 2017-08-17 Pedro Alves <palves@redhat.com>
7904
7905 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7906 local.
7907
7908 2017-08-17 Pedro Alves <palves@redhat.com>
7909
7910 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7911 field.
7912 (reset_die_in_process): Delete, replaced by ...
7913 (process_die_scope): ... this new class. Make it responsible for
7914 freeing cu->line_header too.
7915 (process_die): Use process_die_scope.
7916 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7917 cu->line_header_die_owner. Don't release the line header if it's
7918 owned by the CU.
7919 (setup_type_unit_groups): Make the CU/DIE own the line header.
7920 Don't release the line header here.
7921
7922 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7923
7924 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7925
7926 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7927
7928 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7929 Single-Key mode
7930
7931 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7932
7933 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7934 mode command list.
7935
7936 2017-08-15 Stafford Horne <shorne@gmail.com>
7937
7938 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7939
7940 2017-08-15 Stafford Horne <shorne@gmail.com>
7941
7942 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7943
7944 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7945
7946 PR gdb/21954
7947 * infcmd.c (unset_environment_command): Use the 'clear' method on
7948 the environment instead of resetting it.
7949
7950 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7951
7952 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7953 platforms.
7954
7955 2017-08-14 Tom Tromey <tom@tromey.com>
7956
7957 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7958 (print_binary_chars): Likewise.
7959 (BITS_IN_BYTES): Remove.
7960
7961 2017-08-14 Tom Tromey <tom@tromey.com>
7962
7963 PR gdb/21675
7964 * valprint.c (LOW_ZERO): Change value to 034.
7965 (print_octal_chars): Add static_asserts for octal constants.
7966 * printcmd.c (print_scalar_formatted): Add 'd' case.
7967
7968 2017-08-11 Tom Tromey <tom@tromey.com>
7969
7970 * symfile.c (add_symbol_file_command): Use std::vector.
7971
7972 2017-08-14 Tom Tromey <tom@tromey.com>
7973
7974 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7975 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7976 std::move.
7977 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7978
7979 2017-08-11 Pedro Alves <palves@redhat.com>
7980
7981 * infrun.c (process_event_stop_test): Adjust
7982 function_name_is_marked_for_skip call.
7983 * skip.c: Include <list>.
7984 (skiplist_entry): Make it a class with private fields, and
7985 getters/setters.
7986 (skiplist_entry_chain): Delete.
7987 (skiplist_entries): New.
7988 (skiplist_entry_count): Delete.
7989 (highest_skiplist_entry_num): New.
7990 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7991 (add_skiplist_entry): Delete.
7992 (skiplist_entry::skiplist_entry): New.
7993 (skiplist_entry::add_entry): New.
7994 (skip_file_command, skip_function): Adjust.
7995 (compile_skip_regexp): Delete.
7996 (skip_command): Don't compile regexp here. Adjust to use
7997 skiplist_entry::add_entry.
7998 (skip_info): Adjust to use range-for and getters.
7999 (skip_enable_command, skip_disable_command): Adjust to use
8000 range-for and setters.
8001 (skip_delete_command): Adjust to use std::list.
8002 (add_skiplist_entry): Delete.
8003 (skip_file_p): Delete, refactored as ...
8004 (skiplist_entry::do_skip_file_p): ... this new method.
8005 (skip_gfile_p): Delete, refactored as ...
8006 (skiplist_entry::do_gskip_file_p): ... this new method.
8007 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8008 (skiplist_entry::skip_function_p): ... this new method.
8009 (function_name_is_marked_for_skip): Now returns bool, and takes
8010 the function sal by const reference. Adjust to use range-for and
8011 skiplist_entry methods.
8012 (_initialize_step_skip): Remove references to
8013 skiplist_entry_chain, skiplist_entry_count.
8014 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8015 takes the function sal by const reference.
8016
8017 2017-08-11 Yao Qi <yao.qi@linaro.org>
8018
8019 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8020 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8021 (dwarf2_frame_cache):
8022 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8023 RETURN_MASK_ALL and set *this_case to NULL.
8024 * frame-unwind.h: Update comments.
8025
8026 2017-08-11 Yao Qi <yao.qi@linaro.org>
8027
8028 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8029 (dwarf2_frame_state_copy_regs): Remove.
8030 (dwarf2_frame_state_free_regs): Remove.
8031 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8032 (dwarf2_restore_rule): Call method .alloc_regs instead of
8033 dwarf2_frame_state_alloc_regs.
8034 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8035 constructor. Call std::move.
8036 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8037 (dwarf2_frame_cache): Likewise.
8038
8039 [GDB_SELF_TEST]: Include selftest.h and
8040 selftest-arch.h.
8041 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8042 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8043 execute_cfa_program_test.
8044
8045 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8046 copy ctor, assignment operator, move assignment.
8047 <alloc_regs>: New method.
8048 <swap>: New method.
8049 (struct dwarf2_frame_state): Delete dtor.
8050 (dwarf2_frame_state_alloc_regs): Remove declaration.
8051 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8052 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8053
8054 2017-08-11 Yao Qi <yao.qi@linaro.org>
8055
8056 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8057 (dwarf2_frame_state::dwarf2_frame_state): New.
8058 (dwarf2_frame_state::~dwarf2_frame_state): New.
8059 (dwarf2_fetch_cfa_info): Update.
8060 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8061 rather than a pointer. Update code.
8062 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8063 dtor.
8064 <data_align, code_align, retaddr_column>: Change them to const.
8065 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8066 to bool.
8067
8068 2017-08-11 Yao Qi <yao.qi@linaro.org>
8069
8070 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8071 <loc.exp>: New field.
8072 * dwarf2-frame.c (execute_cfa_program): Update.
8073 (dwarf2_frame_prev_register): Update.
8074
8075 2017-08-10 Pedro Alves <palves@redhat.com>
8076
8077 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8078
8079 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8080
8081 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8082 (fbsd_pending_children): Use std::list.
8083 (fbsd_remember_child): Likewise.
8084 (fbsd_is_child_pending): Likewise.
8085 (fbsd_pending_vfork_done): Use std::forward_list.
8086 (fbsd_add_vfork_done): Likewise.
8087 (fbsd_is_vfork_done_pending): Likewise.
8088 (fbsd_next_vfork_done): Likewise.
8089
8090 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8091
8092 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8093 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8094 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8095 for `mapfilename'.
8096 (fbsd_xfer_partial): Use gdb::byte_vector.
8097 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8098
8099 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8100
8101 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8102 "filestuff.h".
8103 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8104
8105 2017-08-09 Tom Tromey <tom@tromey.com>
8106
8107 * skip.c (skiplist_entry): New constructor.
8108 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8109 (skiplist_entry::file_is_glob): Now bool.
8110 (skiplist_entry::file, skiplist_entry::function): Now
8111 std::string.
8112 (make_skip_entry): Return a unique_ptr. Use new.
8113 (free_skiplist_entry, free_skiplist_entry_cleanup)
8114 (make_free_skiplist_entry_cleanup): Remove.
8115 (skip_command, skip_disable_command, add_skiplist_entry)
8116 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8117 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8118 (function_name_is_marked_for_skip): Update.
8119 (skip_delete_command): Update. Use delete.
8120
8121 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8122
8123 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8124 (aarch64_linux_core_read_description): New function.
8125 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8126
8127 2017-08-09 Pedro Alves <palves@redhat.com>
8128
8129 * cp-name-parser.y (cp_comp_to_string): Return a
8130 gdb::unique_xmalloc_ptr<char>.
8131 * cp-support.c (replace_typedefs_qualified_name)
8132 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8133 (cp_canonicalize_string_full): Use op= instead of explicit
8134 convertion.
8135 (cp_class_name_from_physname, method_name_from_physname)
8136 (cp_func_name, cp_remove_params): Adjust to use
8137 gdb::unique_xmalloc_ptr<char>.
8138 * cp-support.h (cp_comp_to_string): Return a
8139 gdb::unique_xmalloc_ptr<char>.
8140 * python/py-type.c (typy_lookup_type): Adjust to use
8141 gdb::unique_xmalloc_ptr<char>.
8142
8143 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8144
8145 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8146
8147 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8148 Yao Qi <yao.qi@linaro.org>
8149
8150 * cp-support.c (cp_canonicalize_string_full): Use
8151 gdb::unique_xmalloc_ptr<char>.
8152 (cp_canonicalize_string): Likewise.
8153
8154 2017-08-09 Yao Qi <yao.qi@linaro.org>
8155
8156 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8157 * regformats/i386/amd64-avx-avx512.dat: Remove.
8158 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8159 * regformats/i386/amd64-avx-mpx.dat:Remove.
8160 * regformats/i386/amd64-avx.dat: Remove.
8161 * regformats/i386/amd64-mpx.dat: Remove.
8162 * regformats/i386/i386-avx-avx512.dat: Remove.
8163 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8164 * regformats/i386/i386-avx-mpx.dat: Remove.
8165 * regformats/i386/i386-mmx.dat: Remove.
8166 * regformats/i386/i386-mpx.dat: Remove.
8167
8168 2017-08-09 Yao Qi <yao.qi@linaro.org>
8169
8170 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8171 * amd64-tdep.c: Don't include features/i386/x32*.c.
8172 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8173 functions.
8174 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8175 and i386/x32-avx-avx512.
8176 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8177 and i386/x32.xml.
8178 * features/i386/x32-avx-avx512.c: Removed.
8179 * features/i386/x32-avx-avx512.xml: Removed.
8180 * features/i386/x32-avx.c: Removed.
8181 * features/i386/x32-avx.xml: Removed.
8182 * features/i386/x32.c: Removed.
8183 * features/i386/x32.xml: Removed.
8184 * regformats/i386/x32-avx-avx512.dat: Removed.
8185 * regformats/i386/x32-avx.dat: Removed.
8186 * regformats/i386/x32.dat: Removed.
8187
8188 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8189
8190 PR breakpoints/21886
8191 * mem-break.c (default_memory_insert_breakpoint): Use
8192 `->placed_address' rather than `->reqstd_address' for the
8193 breakpoint location.
8194
8195 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8196
8197 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8198 assertions.
8199
8200 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8201
8202 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8203 a union of `tdep_info', `tdesc_data' and `id'.
8204 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8205 rather than `info.tdep_info'.
8206 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8207 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8208 * i386-tdep.c (i386_gdbarch_init): Likewise.
8209 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8210 * mips-tdep.c (mips_gdbarch_init): Likewise.
8211 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8212 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8213 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8214 `info.tdep_info'.
8215 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8216 `info.tdep_info'.
8217 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8218 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8219 `info.tdep_info'.
8220 * spu-tdep.c (spu_gdbarch_init): Likewise.
8221 * gdbarch.h: Regenerate.
8222
8223 2017-08-07 Leszek Swirski <leszeks@google.com>
8224
8225 PR symtab/20899
8226 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8227
8228 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8229
8230 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8231 (gdbsim_open): Rename gdb_argv args object to argv.
8232
8233 2017-08-05 Tom Tromey <tom@tromey.com>
8234
8235 * compile/compile-object-load.c (compile_object_load): Use
8236 gdb::unique_xmalloc_ptr.
8237 * cli/cli-dump.c (scan_filename): Rename from
8238 scan_filename_with_cleanup. Change return type.
8239 (scan_expression): Rename from scan_expression_with_cleanup.
8240 Change return type.
8241 (dump_memory_to_file, dump_value_to_file, restore_command):
8242 Use gdb::unique_xmalloc_ptr. Update.
8243 * cli/cli-cmds.c (find_and_open_script): Use
8244 gdb::unique_xmalloc_ptr.
8245 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8246 * symmisc.c (maintenance_print_symbols)
8247 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8248 * symfile.c (symfile_bfd_open, generic_load)
8249 (add_symbol_file_command, remove_symbol_file_command): Use
8250 gdb::unique_xmalloc_ptr.
8251 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8252 * psymtab.c (maintenance_print_psymbols): Use
8253 gdb::unique_xmalloc_ptr.
8254 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8255 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8256 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8257 (reload_shared_libraries_1): Likewise.
8258
8259 2017-08-05 Tom Tromey <tom@tromey.com>
8260
8261 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8262 (rust_op_vector, rust_set_vector): New typedefs.
8263 (current_parser): New global.
8264 (work_obstack): Change to pointer type. Update all users.
8265 (rust_ast, pstate): Remove globals.
8266 (struct rust_parser): New.
8267 (%union) <params, field_inits>: Change type.
8268 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8269 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8270 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8271 (convert_params_to_types, convert_params_to_expression): Change
8272 type of "params".
8273 (ast_string): Change type of "fields".
8274 (rust_parse): Make a rust_parser. Remove cleanups.
8275 (rust_lex_tests): Make and install an auto_obstack.
8276
8277 2017-08-04 Yao Qi <yao.qi@linaro.org>
8278
8279 * configure.srv (ipa_x32_linux_regobj): New.
8280 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8281 instead of X86_TDESC_AVX512.
8282 (initialize_low_tracepoint): Call
8283 init_registers_x32_avx_avx512_linux.
8284
8285 2017-08-04 Yao Qi <yao.qi@linaro.org>
8286
8287 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8288
8289 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8290
8291 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8292
8293 2017-08-03 Tom Tromey <tom@tromey.com>
8294
8295 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8296 Remove.
8297 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8298
8299 2017-08-03 Tom Tromey <tom@tromey.com>
8300
8301 * python/py-param.c (compute_enum_values): Use gdb_argv.
8302
8303 2017-08-03 Tom Tromey <tom@tromey.com>
8304
8305 * utils.h (struct gdb_argv_deleter): New.
8306 (gdb_argv): New class.
8307 * utils.c (gdb_argv::reset): New method.
8308 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8309 * tracefile.c (tsave_command): Use gdb_argv.
8310 * top.c (new_ui_command): Use gdb_argv.
8311 * symmisc.c (maintenance_print_symbols)
8312 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8313 * symfile.c (symbol_file_command, generic_load)
8314 (remove_symbol_file_command): Use gdb_argv.
8315 * stack.c (backtrace_command): Use gdb_argv.
8316 * source.c (add_path, show_substitute_path_command)
8317 (unset_substitute_path_command, set_substitute_path_command):
8318 Use gdb_argv.
8319 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8320 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8321 * remote.c (extended_remote_run, remote_put_command)
8322 (remote_get_command, remote_delete_command): Use gdb_argv.
8323 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8324 (gdbsim_open): Use gdb_argv.
8325 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8326 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8327 * procfs.c (procfs_info_proc): Use gdb_argv.
8328 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8329 * infrun.c (handle_command): Use gdb_argv.
8330 * inferior.c (add_inferior_command, clone_inferior_command):
8331 Use gdb_argv.
8332 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8333 * exec.c (exec_file_command): Use gdb_argv.
8334 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8335 * compile/compile.c (build_argc_argv): Use gdb_argv.
8336
8337 2017-08-03 Tom Tromey <tom@tromey.com>
8338
8339 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8340
8341 2017-08-03 Tom Tromey <tom@tromey.com>
8342
8343 * python/python.c (compute_python_string): Return std::string.
8344 (gdbpy_eval_from_control_command): Update.
8345 (do_start_initialization): Use std::string.
8346 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8347 xstrprintf.
8348 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8349 xstrprintf.
8350
8351 2017-08-03 Tom Tromey <tom@tromey.com>
8352
8353 * top.h (do_restore_instream_cleanup): Remove.
8354 * top.c (do_restore_instream_cleanup): Remove.
8355 (read_command_file): Use scoped_restore.
8356 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8357
8358 2017-08-03 Tom Tromey <tom@tromey.com>
8359
8360 * cli/cli-script.c (execute_user_command)
8361 (execute_control_command): Use scoped_restore.
8362
8363 2017-08-03 Tom Tromey <tom@tromey.com>
8364
8365 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8366 (execute_user_command): Remove user_call_depth; use
8367 user_args_stack's size instead.
8368
8369 2017-08-03 Tom Tromey <tom@tromey.com>
8370
8371 * top.h (in_user_command): Remove.
8372 * top.c (in_user_command): Remove.
8373 * cli/cli-script.c (do_restore_user_call_depth)
8374 (execute_user_command): Update.
8375
8376 2017-08-03 Tom Tromey <tom@tromey.com>
8377
8378 * valops.c (search_struct_method): Use gdb::byte_vector.
8379 * valarith.c (value_concat): Use std::vector.
8380 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8381 (simple_search_memory): Likewise.
8382 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8383 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8384 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8385 * elfread.c (elf_rel_plt_read): Use std::string.
8386 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8387 * cli/cli-dump.c (restore_section_callback): Use
8388 gdb::byte_vector.
8389
8390 2017-08-03 Tom Tromey <tom@tromey.com>
8391
8392 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8393
8394 2017-08-03 Tom Tromey <tom@tromey.com>
8395
8396 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8397 (tui_register_format): Use scoped_restore.
8398
8399 2017-08-03 Tom Tromey <tom@tromey.com>
8400
8401 * reverse.c (exec_direction_default): Remove.
8402 (exec_reverse_once): Use scoped_restore.
8403 * remote.c (restore_remote_timeout): Remove.
8404 (remote_flash_erase, remote_flash_write, remote_flash_done)
8405 (readchar, remote_serial_write): Use scoped_restore.
8406 * cli/cli-script.c (struct source_cleanup_lines_args)
8407 (source_cleanup_lines): Remove.
8408 (script_from_file): Use scoped_restore.
8409 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8410 (source_command): Use scoped_restore.
8411
8412 2017-08-03 Tom Tromey <tom@tromey.com>
8413
8414 * utils.h (make_cleanup_free_so): Remove.
8415 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8416 * solist.h (struct so_deleter): New.
8417 (so_list_up): New typedef.
8418 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8419
8420 2017-08-03 Tom Tromey <tom@tromey.com>
8421
8422 * utils.h (make_cleanup_restore_current_language): Remove.
8423 * utils.c (do_restore_current_language)
8424 (make_cleanup_restore_current_language): Remove.
8425 * parse.c (parse_exp_in_context_1)
8426 (parse_expression_with_language): Use
8427 scoped_restore_current_language.
8428 * mi/mi-main.c (mi_cmd_execute): Use
8429 scoped_restore_current_language.
8430 * language.h (scoped_restore_current_language): New class.
8431
8432 2017-08-03 Tom Tromey <tom@tromey.com>
8433
8434 * compile/compile.c (cleanup_unlink_file): Remove.
8435 (compile_to_object): Use gdb::unlinker.
8436 (eval_compile_command): Likewise.
8437
8438 2017-08-03 Tom Tromey <tom@tromey.com>
8439
8440 * utils.h (make_cleanup_fclose): Remove.
8441 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8442
8443 2017-08-03 Tom Tromey <tom@tromey.com>
8444
8445 * top.c (open_terminal_stream): Return gdb_file_up.
8446 (new_ui_command): Update.
8447
8448 2017-08-03 Tom Tromey <tom@tromey.com>
8449
8450 * source.c (print_source_lines_base, forward_search_command)
8451 (reverse_search_command): Use gdb_file_up.
8452
8453 2017-08-03 Tom Tromey <tom@tromey.com>
8454
8455 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8456
8457 2017-08-03 Tom Tromey <tom@tromey.com>
8458
8459 * cli/cli-cmds.c (find_and_open_script): Change return type.
8460 Remove "streamp" and "full_path" parameters.
8461 (source_script_with_search): Update.
8462 * auto-load.c (source_script_file): Update.
8463 * cli/cli-cmds.h (find_and_open_script): Change type.
8464 (open_script): New struct.
8465
8466 2017-08-03 Tom Tromey <tom@tromey.com>
8467
8468 * xml-support.c (xml_fetch_content_from_file): Update.
8469 * ui-file.c (stdio_file::open): Update.
8470 * tracefile-tfile.c (tfile_start): Update.
8471 * remote.c (remote_file_put, remote_file_get): Update.
8472 * nat/linux-procfs.c (linux_proc_get_int)
8473 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8474 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8475 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8476 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8477 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8478 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8479 * linux-nat.c (linux_proc_pending_signals): Update.
8480 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8481 (file_closer): Remove.
8482 * compile/compile.c (compile_to_object): Update.
8483 * common/filestuff.h (struct gdb_file_deleter): New.
8484 (gdb_file_up): New typedef.
8485 (gdb_fopen_cloexec): Change return type.
8486 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8487 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8488 (dump_binary_file, restore_binary_file): Update.
8489 * auto-load.c (auto_load_objfile_script_1): Update.
8490
8491 2017-08-03 Tom Tromey <tom@tromey.com>
8492
8493 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8494 (info_static_tracepoint_markers_command): Likewise.
8495 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8496 * skip.c (skip_info): Use ui_out_emit_table.
8497 * progspace.c (print_program_space): Use ui_out_emit_table.
8498 * osdata.c (info_osdata): Use ui_out_emit_table.
8499 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8500 ui_out_emit_table.
8501 * linux-thread-db.c (info_auto_load_libthread_db): Use
8502 ui_out_emit_table.
8503 * inferior.c (print_inferior): Use ui_out_emit_table.
8504 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8505 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8506 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8507 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8508 * ui-out.h (class ui_out_emit_table): New.
8509
8510 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8511
8512 * mips-tdep.c (mips_fpu_type_str): New function.
8513 (mips_dump_tdep): Call it.
8514
8515 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8516
8517 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8518 `->mips_fpu_type'.
8519
8520 2017-07-31 Xavier Roirand <roirand@adacore.com>
8521
8522 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8523
8524 2017-07-27 Xavier Roirand <roirand@adacore.com>
8525
8526 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8527
8528 2017-07-26 Yao Qi <yao.qi@linaro.org>
8529
8530 * cli/cli-cmds.c (maintenancechecklist): New variable.
8531 * gdbcmd.h (maintenancechecklist): Declare it.
8532 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8533 Call i386_linux_read_description with different masks.
8534 * maint.c (maintenance_check_command): New function.
8535 (_initialize_maint_cmds): Call add_prefix_cmd.
8536 * target-descriptions.c (tdesc_reg): override operator != and ==.
8537 (tdesc_type): Likewise.
8538 (tdesc_feature): Likewise.
8539 (target_desc): Likewise.
8540 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8541 (maintenance_check_xml_descriptions): New function.
8542 (_initialize_target_descriptions) Add command "xml-descriptions".
8543 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8544
8545 2017-07-26 Yao Qi <yao.qi@linaro.org>
8546
8547 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8548 Include features/i386/32bit-*.c.
8549 (i386_linux_read_description): Generate target description if it
8550 doesn't exist.
8551 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8552 functions.
8553 * features/i386/32bit-linux.c: Re-generated.
8554 * features/i386/32bit-sse.c: Likewise.
8555 * target-descriptions.c (print_c_feature::visit): Print code to
8556 set register number if needed.
8557 (print_c_feature) <m_next_regnum>: New field.
8558
8559 2017-07-26 Yao Qi <yao.qi@linaro.org>
8560
8561 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8562 (FEATURE_XMLFILES): New.
8563 (FEATURE_CFILES): New.
8564 New rules.
8565 (clean-cfiles): Remove generated c files.
8566 * features/i386/32bit-avx.c: Generated.
8567 * features/i386/32bit-avx512.c: Generated.
8568 * features/i386/32bit-core.c: Generated.
8569 * features/i386/32bit-linux.c: Generated.
8570 * features/i386/32bit-mpx.c: Generated.
8571 * features/i386/32bit-pkeys.c: Generated.
8572 * features/i386/32bit-sse.c: Generated.
8573 * target-descriptions.c: Include algorithm.
8574 (tdesc_element_visitor): Add method visit_end.
8575 (print_c_tdesc): Implement visit_end.
8576 (print_c_tdesc:: m_filename_after_features): Move it to
8577 protected.
8578 (print_c_feature): New class.
8579 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8580 name starts with "i386/32bit-".
8581
8582 2017-07-26 Yao Qi <yao.qi@linaro.org>
8583
8584 * target-descriptions.c (tdesc_element_visitor): New class.
8585 (tdesc_element): New class.
8586 (tdesc_reg): Inherit from tdesc_element.
8587 (tdesc_reg::accept): New function.
8588 (tdesc_type): Inherit from tdesc_element.
8589 (tdesc_type::accept): New function.
8590 (tdesc_feature): Inherit from tdesc_element.
8591 (tdesc_feature::accept): New function.
8592 (target_desc): Inherit from tdesc_element.
8593 (target_desc::target_desc): New.
8594 (target_desc::~target_desc): New.
8595 (target_desc::accept): New.
8596 (allocate_target_description): Use new.
8597 (free_target_description): Use delete.
8598 (print_c_tdesc): New class.
8599 (maint_print_c_tdesc_cmd): Adjust.
8600
8601 * features/aarch64.c: Re-generated.
8602 * features/arc-arcompact.c: Re-generated.
8603 * features/arc-v2.c: Re-generated.
8604 * features/arm/arm-with-iwmmxt.c: Re-generated.
8605 * features/arm/arm-with-m.c: Re-generated.
8606 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8607 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8608 * features/arm/arm-with-neon.c: Re-generated.
8609 * features/arm/arm-with-vfpv2.c: Re-generated.
8610 * features/arm/arm-with-vfpv3.c: Re-generated.
8611 * features/i386/amd64-avx-avx512.c: Re-generated.
8612 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8613 * features/i386/amd64-avx.c: Re-generated.
8614 * features/i386/amd64-avx-linux.c: Re-generated.
8615 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8616 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8617 * features/i386/amd64-avx-mpx.c: Re-generated.
8618 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8619 * features/i386/amd64.c: Re-generated.
8620 * features/i386/amd64-linux.c: Re-generated.
8621 * features/i386/amd64-mpx.c: Re-generated.
8622 * features/i386/amd64-mpx-linux.c: Re-generated.
8623 * features/i386/i386-avx-avx512.c: Re-generated.
8624 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8625 * features/i386/i386-avx.c: Re-generated.
8626 * features/i386/i386-avx-linux.c: Re-generated.
8627 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8628 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8629 * features/i386/i386-avx-mpx.c: Re-generated.
8630 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8631 * features/i386/i386.c: Re-generated.
8632 * features/i386/i386-linux.c: Re-generated.
8633 * features/i386/i386-mmx.c: Re-generated.
8634 * features/i386/i386-mmx-linux.c: Re-generated.
8635 * features/i386/i386-mpx.c: Re-generated.
8636 * features/i386/i386-mpx-linux.c: Re-generated.
8637 * features/i386/x32-avx-avx512.c: Re-generated.
8638 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8639 * features/i386/x32-avx.c: Re-generated.
8640 * features/i386/x32-avx-linux.c: Re-generated.
8641 * features/i386/x32.c: Re-generated.
8642 * features/i386/x32-linux.c: Re-generated.
8643 * features/microblaze.c: Re-generated.
8644 * features/microblaze-with-stack-protect.c: Re-generated.
8645 * features/mips64-dsp-linux.c: Re-generated.
8646 * features/mips64-linux.c: Re-generated.
8647 * features/mips-dsp-linux.c: Re-generated.
8648 * features/mips-linux.c: Re-generated.
8649 * features/nds32.c: Re-generated.
8650 * features/nios2.c: Re-generated.
8651 * features/nios2-linux.c: Re-generated.
8652 * features/rs6000/powerpc-32.c: Re-generated.
8653 * features/rs6000/powerpc-32l.c: Re-generated.
8654 * features/rs6000/powerpc-403.c: Re-generated.
8655 * features/rs6000/powerpc-403gc.c : Re-generated.
8656 * features/rs6000/powerpc-405.c: Re-generated.
8657 * features/rs6000/powerpc-505.c: Re-generated.
8658 * features/rs6000/powerpc-601.c: Re-generated.
8659 * features/rs6000/powerpc-602.c: Re-generated.
8660 * features/rs6000/powerpc-603.c: Re-generated.
8661 * features/rs6000/powerpc-604.c: Re-generated.
8662 * features/rs6000/powerpc-64.c: Re-generated.
8663 * features/rs6000/powerpc-64l.c: Re-generated.
8664 * features/rs6000/powerpc-7400.c: Re-generated.
8665 * features/rs6000/powerpc-750.c: Re-generated.
8666 * features/rs6000/powerpc-860.c: Re-generated.
8667 * features/rs6000/powerpc-altivec32.c: Re-generated.
8668 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8669 * features/rs6000/powerpc-altivec64.c: Re-generated.
8670 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8671 * features/rs6000/powerpc-cell32l.c: Re-generated.
8672 * features/rs6000/powerpc-cell64l.c: Re-generated.
8673 * features/rs6000/powerpc-e500.c: Re-generated.
8674 * features/rs6000/powerpc-e500l.c: Re-generated.
8675 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8676 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8677 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8678 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8679 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8680 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8681 * features/rs6000/powerpc-vsx32.c: Re-generated.
8682 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8683 * features/rs6000/powerpc-vsx64.c: Re-generated.
8684 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8685 * features/rs6000/rs6000.c: Re-generated.
8686 * features/s390-linux32.c: Re-generated.
8687 * features/s390-linux32v1.c: Re-generated.
8688 * features/s390-linux32v2.c: Re-generated.
8689 * features/s390-linux64.c: Re-generated.
8690 * features/s390-linux64v1.c: Re-generated.
8691 * features/s390-linux64v2.c: Re-generated.
8692 * features/s390-te-linux64.c: Re-generated.
8693 * features/s390-tevx-linux64.c: Re-generated.
8694 * features/s390-vx-linux64.c: Re-generated.
8695 * features/s390x-linux64.c: Re-generated.
8696 * features/s390x-linux64v1.c: Re-generated.
8697 * features/s390x-linux64v2.c: Re-generated.
8698 * features/s390x-te-linux64.c: Re-generated.
8699 * features/s390x-tevx-linux64.c: Re-generated.
8700 * features/s390x-vx-linux64.c: Re-generated.
8701 * features/sparc/sparc32-solaris.c: Re-generated.
8702 * features/sparc/sparc64-solaris.c: Re-generated.
8703 * features/tic6x-c62x.c: Re-generated.
8704 * features/tic6x-c62x-linux.c: Re-generated.
8705 * features/tic6x-c64x.c: Re-generated.
8706 * features/tic6x-c64x-linux.c: Re-generated.
8707 * features/tic6x-c64xp.c: Re-generated.
8708 * features/tic6x-c64xp-linux.c: Re-generated.
8709
8710 2017-07-26 Yao Qi <yao.qi@linaro.org>
8711
8712 * i386-linux-tdep.c (i386_linux_read_description): New function.
8713 (i386_linux_core_read_description): Call
8714 i386_linux_read_description.
8715 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8716 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8717 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8718 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8719 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8720 * x86-linux-nat.c (x86_linux_read_description): Call
8721 i386_linux_read_description.
8722
8723 2017-07-26 Yao Qi <yao.qi@linaro.org>
8724
8725 * NEWS: Mention it.
8726 * features/Makefile (%.c: %.xml): Pass the xml file name to
8727 command "maint print c-tdesc".
8728 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8729 name from 'arg'.
8730
8731 2017-07-26 Yao Qi <yao.qi@linaro.org>
8732
8733 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8734 in-class initialization.
8735 (tdesc_create_feature): Call new instead of XCNEW.
8736 (free_target_description): Ue delete.
8737
8738 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8739
8740 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8741
8742 2017-07-25 Yao Qi <yao.qi@linaro.org>
8743
8744 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8745 constant.
8746 (amd64_x32_init_abi): Likewise.
8747 * amd64-tdep.h (amd64_init_abi): Update declaration.
8748 (amd64_x32_init_abi): Likewise.
8749
8750 2017-07-25 Yao Qi <yao.qi@linaro.org>
8751
8752 PR tdep/21717
8753 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8754 condition for FPSCR.
8755 (arm_linux_store_inferior_registers): Likewise.
8756
8757 2017-07-22 Tom Tromey <tom@tromey.com>
8758
8759 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8760 <syscalls_counts>: Now a std::vector.
8761 (get_catch_syscall_inferior_data): Use "new".
8762 (catch_syscall_inferior_data_cleanup): Use "delete".
8763 (insert_catch_syscall, remove_catch_syscall)
8764 (clear_syscall_counts): Update.
8765
8766 2017-07-22 Tom Tromey <tom@tromey.com>
8767
8768 * break-catch-syscall.c (syscall_catchpoint)
8769 <syscalls_to_be_caught>: Now a std::vector<int>
8770 (~syscall_catchpoint): Remove.
8771 (insert_catch_syscall, remove_catch_syscall)
8772 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8773 (print_mention_catch_syscall, print_recreate_catch_syscall):
8774 Update.
8775 (create_syscall_event_catchpoint): Change type of "filter"
8776 parameter.
8777 (catch_syscall_split_args): Return a std::vector.
8778 (catch_syscall_command_1, catching_syscall_number_1): Update.
8779
8780 2017-07-22 Tom Tromey <tom@tromey.com>
8781
8782 * break-catch-throw.c (struct exception_catchpoint)
8783 <exception_rx>: Now a std::string.
8784 (~exception_catchpoint): Remove.
8785 (print_one_detail_exception_catchpoint): Update.
8786 (handle_gnu_v3_exceptions): Change type of except_rx.
8787 (extract_exception_regexp): Return a std::string.
8788 (catch_exception_command_1): Update.
8789
8790 2017-07-22 Tom Tromey <tom@tromey.com>
8791
8792 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8793 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8794 std::vector.
8795 <catch_all>: Now a bool.
8796 (~signal_catchpoint): Remove.
8797 (signal_catchpoint_insert_location)
8798 (signal_catchpoint_remove_location)
8799 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8800 (signal_catchpoint_print_mention)
8801 (signal_catchpoint_print_recreate)
8802 (signal_catchpoint_explains_signal): Update.
8803 (create_signal_catchpoint): Change type of "filter" and
8804 "catch_all".
8805 (catch_signal_split_args): Return a std::vector. Change type of
8806 "catch_all".
8807 (catch_signal_command): Update.
8808
8809 2017-07-20 Pedro Alves <palves@redhat.com>
8810
8811 * ada-lang.c (ada_language_defn): Make extern.
8812 (_initialize_ada_language): Remove add_language call.
8813 * c-lang.c (c_language_defn, cplus_language_defn)
8814 (asm_language_defn, minimal_language_defn): Make extern.
8815 (_initialize_c_language): Delete.
8816 * completer.c (compare_cstrings): Delete, moved to utils.h.
8817 * d-lang.c (d_language_defn): Make extern.
8818 (_initialize_d_language): Remove add_language calls.
8819 * defs.h (enum language): Add comment.
8820 * f-lang.c (f_language_defn): Make extern.
8821 (_initialize_f_language): Remove add_language call.
8822 * go-lang.c (go_language_defn): Make extern.
8823 (_initialize_go_language): Remove add_language call.
8824 * language.c: Include <algorithm>.
8825 (languages): Redefine as const array.
8826 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8827 (set_language_command): Handle "local". Use for-range loop.
8828 (set_language): Remove loop.
8829 (language_enum): Rewrite.
8830 (language_def, language_str): Remove loops.
8831 (add_language): Delete.
8832 (add_set_language_command): New, based on add_languages.
8833 (skip_language_trampoline): Adjust.
8834 (local_language_defn): Delete.
8835 (language_gdbarch_post_init): Adjust.
8836 (_initialize_language): Remove add_language calls. Call
8837 add_set_language_command.
8838 * language.h (add_language): Delete.
8839 (auto_language_defn)
8840 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8841 (asm_language_defn, c_language_defn, cplus_language_defn)
8842 (d_language_defn, f_language_defn, go_language_defn)
8843 (m2_language_defn, objc_language_defn, opencl_language_defn)
8844 (pascal_language_defn, rust_language_defn): Declare.
8845 * m2-lang.c (m2_language_defn): Make extern.
8846 (_initialize_m2_language): Remove add_language call.
8847 * objc-lang.c (objc_language_defn): Make extern.
8848 (_initialize_objc_language): Remove add_language call.
8849 * opencl-lang.c (opencl_language_defn): Make extern.
8850 (_initialize_opencl_language): Remove add_language call.
8851 * p-lang.c (pascal_language_defn): Make extern.
8852 (_initialize_pascal_language): Delete.
8853 * rust-lang.c (rust_language_defn): Make extern.
8854 (_initialize_rust_language): Delete.
8855 * utils.h (compare_cstrings): New static inline function.
8856
8857 2017-07-20 Pedro Alves <palves@redhat.com>
8858
8859 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8860 (get_var_value): Constify parameters.
8861 (get_int_var_value): Change prototype.
8862 (to_fixed_range_type): Adjust.
8863 * ada-lang.h (get_int_var_value): Change prototype.
8864
8865 2017-07-20 Pedro Alves <palves@redhat.com>
8866
8867 * dwarf2read.c (dw2_lookup_symbol): Use
8868 SYMBOL_MATCHES_SEARCH_NAME.
8869 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8870
8871 2017-07-20 Pedro Alves <palves@redhat.com>
8872
8873 * block.c (block_iter_name_step, block_iter_name_first)
8874 (block_iter_name_next): Delete.
8875 (block_lookup_symbol_primary): Adjust to use
8876 dict_iter_match_first/dict_iter_match_next.
8877 * block.h (block_iter_name_first, block_iter_name_next): Delete
8878 declarations.
8879 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8880 dict_iter_match_first/dict_iter_match_next.
8881
8882 2017-07-20 Pedro Alves <palves@redhat.com>
8883
8884 * cp-support.c (cp_find_first_component_aux): Add missing case for
8885 end of string.
8886
8887 2017-07-18 David Blaikie <dblaikie@gmail.com>
8888
8889 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8890 of dwo_cu's dwo_file.
8891
8892 2017-07-18 Yao Qi <yao.qi@linaro.org>
8893
8894 * remote.c (store_registers_using_G): Remove one line comment.
8895
8896 2017-07-18 Yao Qi <yao.qi@linaro.org>
8897
8898 * regcache.c (regcache_cpy): Simplify it.
8899 (regcache::cpy_no_passthrough): Remove it.
8900 * regcache.h (cpy_no_passthrough): Remove it.
8901 (regcache_dup, regcache_cpy): Update comments.
8902
8903 2017-07-18 Pedro Alves <palves@redhat.com>
8904
8905 * remote-sim.c (sim_command_completer): Adjust to work with a
8906 completion_tracker instead of a VEC.
8907
8908 2017-07-17 Pedro Alves <palves@redhat.com>
8909
8910 * completer.c (complete_source_filenames): New function.
8911 (complete_address_and_linespec_locations): New function.
8912 (location_completer): Use complete_address_and_linespec_locations.
8913 (completion_tracker::build_completion_result): Honor the tracker's
8914 request to suppress append.
8915 * completer.h (completion_tracker::suppress_append_ws)
8916 (completion_tracker::set_suppress_append_ws): New methods.
8917 (completion_tracker::m_suppress_append_ws): New field.
8918 (complete_source_filenames): New declaration.
8919 * linespec.c (linespec_complete_what): New.
8920 (struct ls_parser) <complete_what, completion_word,
8921 completion_quote_char, completion_quote_end, completion_tracker>:
8922 New fields.
8923 (string_find_incomplete_keyword_at_end): New.
8924 (linespec_lexer_lex_string): Record quote char. If in completion
8925 mode, don't throw.
8926 (linespec_lexer_consume_token): Advance the completion word point.
8927 (linespec_lexer_peek_token): Save/restore completion info.
8928 (save_stream_and_consume_token): New.
8929 (set_completion_after_number): New.
8930 (linespec_parse_basic): Set what to complete next depending on
8931 token. Handle function and label completions specially.
8932 (parse_linespec): Disable objc shortcut in completion mode. Set
8933 what to complete next depending on token type. Skip keyword if in
8934 completion mode.
8935 (complete_linespec_component, linespec_complete): New.
8936 * linespec.h (linespec_complete): Declare.
8937
8938 2017-07-17 Pedro Alves <palves@redhat.com>
8939
8940 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8941 Handle 'operator<' / 'operator<<'.
8942
8943 2017-07-17 Pedro Alves <palves@redhat.com>
8944
8945 * completer.c (collect_explicit_location_matches): Handle
8946 MATCH_LABEL.
8947 (convert_explicit_location_to_linespec): New, factored out from
8948 ...
8949 (convert_explicit_location_to_sals): ... this.
8950 (complete_label): New.
8951 (linespec_complete_label, find_label_symbols_in_block): New.
8952 (find_label_symbols): Add completion_mode parameter and adjust to
8953 call find_label_symbols_in_block.
8954 * linespec.h (linespec_complete_label): Declare.
8955
8956 2017-07-17 Pedro Alves <palves@redhat.com>
8957
8958 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8959 complete_symbol_mode parameter.
8960 * cli/cli-cmds.c (complete_command): Get the completion result out
8961 of the handle_brkchars tracker if used a custom word point.
8962 * completer.c: Include "linespec.h".
8963 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8964 (advance_to_expression_complete_word_point): New.
8965 (completion_tracker::completes_to_completion_word): New.
8966 (complete_files_symbols): Pass down
8967 complete_symbol_mode::EXPRESSION.
8968 (explicit_options, probe_options): New.
8969 (collect_explicit_location_matches): Complete on the
8970 explictit_loc->foo instead of word. Use
8971 linespec_complete_function. Handle MATCH_LINE. Handle offering
8972 keyword and options completions.
8973 (backup_text_ptr): Delete.
8974 (skip_keyword): New.
8975 (complete_explicit_location): Remove 'word' parameter. Add
8976 language, quoted_arg_start and quoted_arg_end parameters.
8977 Rewrite, parsing left to right.
8978 (location_completer): Rewrite.
8979 (location_completer_handle_brkchars): New function.
8980 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8981 (enum complete_line_internal_reason): Adjust comments.
8982 (completion_tracker::discard_completions): New.
8983 (completer_handle_brkchars_func_for_completer): Handle
8984 location_completer.
8985 (gdb_custom_word_point_brkchars)
8986 (gdb_org_rl_basic_quote_characters): New.
8987 (gdb_completion_word_break_characters_throw)
8988 (completion_find_completion_word): Handle trackers that use a
8989 custom word point.
8990 (completion_tracker::advance_custom_word_point_by): New.
8991 (completion_tracker::build_completion_result): Don't rely on
8992 readline appending the quote char.
8993 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8994 use a custom word point.
8995 (gdb_rl_attempted_completion_function): Restore
8996 rl_basic_quote_characters.
8997 * completer.h (class completion_tracker): Extend intro comment.
8998 (completion_tracker::set_quote_char)
8999 (completion_tracker::quote_char)
9000 (completion_tracker::set_use_custom_word_point)
9001 (completion_tracker::use_custom_word_point)
9002 (completion_tracker::custom_word_point)
9003 (completion_tracker::set_custom_word_point)
9004 (completion_tracker::advance_custom_word_point_by)
9005 (completion_tracker::completes_to_completion_word)
9006 (completion_tracker::discard_completions): New methods.
9007 (completion_tracker::m_quote_char)
9008 (completion_tracker::m_use_custom_word_point)
9009 (completion_tracker::m_custom_word_point): New fields.
9010 (advance_to_expression_complete_word_point): Declare.
9011 * f-lang.c (f_collect_symbol_completion_matches): Add
9012 complete_symbol_mode parameter.
9013 * language.h (struct language_defn)
9014 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9015 parameter.
9016 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9017 (linespec_complete_function): New function.
9018 (linespec_lexer_lex_keyword): Adjust.
9019 * linespec.h (linespec_keywords, linespec_complete_function): New
9020 declarations.
9021 * location.c (find_end_quote): New function.
9022 (explicit_location_lex_one): Add explicit_completion_info
9023 parameter. Save quoting info. Don't throw if being called for
9024 completion. Don't handle Ada operators here.
9025 (is_cp_operator, skip_op_false_positives, first_of)
9026 (explicit_location_lex_one_function): New function.
9027 (string_to_explicit_location): Replace 'dont_throw' parameter with
9028 an explicit_completion_info pointer parameter. Handle it. Don't
9029 use explicit_location_lex_one to lex function names. Use
9030 explicit_location_lex_one_function instead.
9031 * location.h (struct explicit_completion_info): New.
9032 (string_to_explicit_location): Replace 'dont_throw' parameter with
9033 an explicit_completion_info pointer parameter.
9034 * symtab.c (default_collect_symbol_completion_matches_break_on):
9035 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9036 (default_collect_symbol_completion_matches)
9037 (collect_symbol_completion_matches): Add complete_symbol_mode
9038 parameter.
9039 (collect_symbol_completion_matches_type): Pass down
9040 complete_symbol_mode::EXPRESSION.
9041 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9042 parameter. Handle LINESPEC mode.
9043 * symtab.h (complete_symbol_mode): New.
9044 (default_collect_symbol_completion_matches_break_on)
9045 (default_collect_symbol_completion_matches)
9046 (collect_symbol_completion_matches)
9047 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9048 parameter.
9049
9050 2017-07-17 Pedro Alves <palves@redhat.com>
9051
9052 * utils.c (enum class strncmp_iw_mode): New.
9053 (strcmp_iw): Rename to ...
9054 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9055 parameters. Handle them.
9056 (strncmp_iw): New.
9057 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9058 * utils.h (strncmp_iw): Declare.
9059 (strcmp_iw): Move describing comments here.
9060
9061 2017-07-17 Pedro Alves <palves@redhat.com>
9062
9063 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9064 CP_OPERATOR_STR.
9065 * c-typeprint.c (is_type_conversion_operator): Use
9066 CP_OPERATOR_STR.
9067 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9068 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9069 CP_OPERATOR_LEN.
9070 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9071 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9072 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9073 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9074 CP_OPERATOR_STR.
9075 * location.c: Include "cp-support.h".
9076 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9077 CP_OPERATOR_STR.
9078 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9079 CP_OPERATOR_LEN.
9080
9081 2017-07-17 Pedro Alves <palves@redhat.com>
9082
9083 * cli/cli-cmds.c (complete_command): Use a completion tracker
9084 along with completion_find_completion_word for handle_brkchars
9085 phase.
9086 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9087 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9088 (struct gdb_rl_completion_word_info): New.
9089 (gdb_rl_find_completion_word): New.
9090 (completion_find_completion_word): New.
9091 * completer.h (completion_find_completion_word): Declare.
9092
9093 2017-07-17 Pedro Alves <palves@redhat.com>
9094
9095 * ada-lang.c (symbol_completion_match): Adjust comments.
9096 (symbol_completion_add): Replace vector parameter with
9097 completion_tracker parameter. Use it.
9098 (ada_make_symbol_completion_list): Rename to...
9099 (ada_collect_symbol_completion_matches): ... this. Add
9100 completion_tracker parameter and use it.
9101 (ada_language_defn): Adjust.
9102 * break-catch-syscall.c (catch_syscall_completer): Adjust
9103 prototype and work with completion_tracker instead of VEC.
9104 * breakpoint.c (condition_completer): Adjust prototype and work
9105 with completion_tracker instead of VEC.
9106 * c-lang.c (c_language_defn, cplus_language_defn)
9107 (asm_language_defn, minimal_language_defn): Adjust to renames.
9108 * cli/cli-cmds.c (complete_command): Rework using
9109 completion_tracker. Catch exceptions when completing.
9110 * cli/cli-decode.c (integer_unlimited_completer)
9111 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9112 with completion_tracker instead of VEC.
9113 * command.h (struct completion_tracker): Forward declare.
9114 (completer_ftype, completer_handle_brkchars_ftype): Change
9115 types.
9116 (complete_on_cmdlist, complete_on_enum): Adjust.
9117 * completer.c: Include <algorithm>.
9118 (struct gdb_completer_state): New.
9119 (current_completion): New global.
9120 (readline_line_completion_function): Delete.
9121 (noop_completer, filename_completer)
9122 (filename_completer_handle_brkchars, complete_files_symbols)
9123 (linespec_location_completer): Adjust to work with a
9124 completion_tracker instead of a VEC.
9125 (string_or_empty): New.
9126 (collect_explicit_location_matches): Adjust to work with a
9127 completion_tracker instead of a VEC.
9128 (explicit_location_completer): Rename to ...
9129 (complete_explicit_location): ... this and adjust to work with a
9130 completion_tracker instead of a VEC.
9131 (location_completer): Adjust to work with a completion_tracker
9132 instead of a VEC.
9133 (add_struct_fields): Adjust to work with a completion_list instead
9134 of VEC.
9135 (expression_completer): Rename to ...
9136 (complete_expression): ... this and adjust to work with a
9137 completion_tracker instead of a VEC. Use complete_files_symbols.
9138 (expression_completer): Reimplement on top of complete_expression.
9139 (symbol_completer): Adjust to work with a completion_tracker
9140 instead of a VEC.
9141 (enum complete_line_internal_reason): Add describing comments.
9142 (complete_line_internal_normal_command): Adjust to work with a
9143 completion_tracker instead of a VEC.
9144 (complete_line_internal): Rename to ...
9145 (complete_line_internal_1): ... this and adjust to work with a
9146 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9147 handle_brkchars phase.
9148 (new_completion_tracker): Delete.
9149 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9150 complete_line_internal_1.
9151 (free_completion_tracker): Delete.
9152 (INITIAL_COMPLETION_HTAB_SIZE): New.
9153 (completion_tracker::completion_tracker)
9154 (completion_tracker::~completion_tracker): New.
9155 (maybe_add_completion): Delete.
9156 (completion_tracker::maybe_add_completion)
9157 (completion_tracker::add_completion)
9158 (completion_tracker::add_completions): New.
9159 (throw_max_completions_reached_error): Delete.
9160 (complete_line): Adjust to work with a completion_tracker instead
9161 of a VEC. Don't create a completion_tracker_t or check for max
9162 completions here.
9163 (command_completer, command_completer_handle_brkchars)
9164 (signal_completer, reg_or_group_completer_1)
9165 (reg_or_group_completer, default_completer_handle_brkchars):
9166 Adjust to work with a completion_tracker.
9167 (gdb_completion_word_break_characters_throw): New.
9168 (gdb_completion_word_break_characters): Reimplement.
9169 (line_completion_function): Delete.
9170 (completion_tracker::recompute_lowest_common_denominator)
9171 (expand_preserving_ws)
9172 (completion_tracker::build_completion_result)
9173 (completion_result::completion_result)
9174 (completion_result::completion_result)
9175 (completion_result::~completion_result)
9176 (completion_result::completion_result)
9177 (completion_result::release_match_list, compare_cstrings)
9178 (completion_result::sort_match_list)
9179 (completion_result::reset_match_list)
9180 (gdb_rl_attempted_completion_function_throw)
9181 (gdb_rl_attempted_completion_function): New.
9182 * completer.h (completion_list, struct completion_result)
9183 (class completion_tracker): New.
9184 (complete_line): Add completion_tracker parameter.
9185 (readline_line_completion_function): Delete.
9186 (gdb_rl_attempted_completion_function): New.
9187 (noop_completer, filename_completer, expression_completer)
9188 (location_completer, symbol_completer, command_completer)
9189 (signal_completer, reg_or_group_completer): Update prototypes.
9190 (completion_tracker_t, new_completion_tracker)
9191 (make_cleanup_free_completion_tracker): Delete.
9192 (enum maybe_add_completion_enum): Delete.
9193 (maybe_add_completion): Delete.
9194 (throw_max_completions_reached_error): Delete.
9195 * corefile.c (complete_set_gnutarget): Adjust to work with a
9196 completion_tracker instead of a VEC.
9197 * cp-abi.c (cp_abi_completer): Adjust to work with a
9198 completion_tracker instead of a VEC.
9199 * d-lang.c (d_language_defn): Adjust.
9200 * disasm.c (disassembler_options_completer): Adjust to work with a
9201 completion_tracker instead of a VEC.
9202 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9203 (f_collect_symbol_completion_matches): ... this. Adjust to work
9204 with a completion_tracker instead of a VEC.
9205 (f_language_defn): Adjust.
9206 * go-lang.c (go_language_defn): Adjust.
9207 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9208 Adjust to work with a completion_tracker instead of a VEC.
9209 * infrun.c (handle_completer): Likewise.
9210 * interps.c (interpreter_completer): Likewise.
9211 * interps.h (interpreter_completer): Likewise.
9212 * language.c (unknown_language_defn, auto_language_defn)
9213 (local_language_defn): Adjust.
9214 * language.h (language_defn::la_make_symbol_completion_list):
9215 Rename to ...
9216 (language_defn::la_collect_symbol_completion_matches): ... this
9217 and adjust to work with a completion_tracker instead of a VEC.
9218 * m2-lang.c (m2_language_defn): Adjust.
9219 * objc-lang.c (objc_language_defn): Adjust.
9220 * opencl-lang.c (opencl_language_defn): Adjust.
9221 * p-lang.c (pascal_language_defn): Adjust.
9222 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9223 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9224 with a completion_tracker.
9225 * rust-lang.c (rust_language_defn): Adjust.
9226 * symtab.c (free_completion_list, do_free_completion_list)
9227 (return_val, completion_tracker): Delete.
9228 (completion_list_add_name, completion_list_add_symbol)
9229 (completion_list_add_msymbol, completion_list_objc_symbol)
9230 (completion_list_add_fields, add_symtab_completions): Add
9231 completion_tracker parameter and use it.
9232 (default_make_symbol_completion_list_break_on_1): Rename to...
9233 (default_collect_symbol_completion_matches_break_on): ... this.
9234 Add completion_tracker parameter and use it instead of allocating
9235 a completion tracker here.
9236 (default_make_symbol_completion_list_break_on): Delete old
9237 implementation.
9238 (default_make_symbol_completion_list): Delete.
9239 (default_collect_symbol_completion_matches): New.
9240 (make_symbol_completion_list): Delete.
9241 (collect_symbol_completion_matches): New.
9242 (make_symbol_completion_type): Rename to ...
9243 (collect_symbol_completion_matches_type): ... this. Add
9244 completion_tracker parameter and use it instead of VEC.
9245 (make_file_symbol_completion_list_1): Rename to...
9246 (collect_file_symbol_completion_matches): ... this. Add
9247 completion_tracker parameter and use it instead of VEC.
9248 (make_file_symbol_completion_list): Delete.
9249 (add_filename_to_list): Use completion_list instead of a VEC.
9250 (add_partial_filename_data::list): Now a completion_list.
9251 (make_source_files_completion_list): Work with a completion_list
9252 instead of a VEC.
9253 * symtab.h: Include "completer.h".
9254 (default_make_symbol_completion_list_break_on)
9255 (default_make_symbol_completion_list, make_symbol_completion_list)
9256 (make_symbol_completion_type, make_file_symbol_completion_list)
9257 (make_source_files_completion_list): Delete.
9258 (default_collect_symbol_completion_matches_break_on)
9259 (default_collect_symbol_completion_matches)
9260 (collect_symbol_completion_matches)
9261 (collect_symbol_completion_matches_type)
9262 (collect_file_symbol_completion_matches)
9263 (make_source_files_completion_list): New.
9264 * top.c (init_main): Don't install a rl_completion_entry_function
9265 hook. Install a rl_attempted_completion_function hook instead.
9266 * tui/tui-layout.c (layout_completer): Adjust to work with a
9267 completion_tracker.
9268 * tui/tui-regs.c (tui_reggroup_completer):
9269 * tui/tui-win.c (window_name_completer, focus_completer)
9270 (winheight_completer): Adjust to work with a completion_tracker.
9271 * value.c: Include "completer.h".
9272 (complete_internalvar): Adjust to work with a completion_tracker.
9273 * value.h (complete_internalvar): Likewise.
9274
9275 2017-07-17 Pedro Alves <palves@redhat.com>
9276
9277 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9278 renames.
9279 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9280 comments to completer_ftype's declaration.
9281 <completer_handle_brkchars>: Change type to
9282 completer_handle_brkchars_ftype.
9283 * command.h (completer_ftype): Add describing comment and give
9284 names to parameters.
9285 (completer_ftype_void): Rename to ...
9286 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9287 (set_cmd_completer_handle_brkchars): Adjust.
9288 * completer.c (filename_completer_handle_brkchars): New function.
9289 (complete_line_internal_normal_command): New function, factored
9290 out from ...
9291 (complete_line_internal): ... here.
9292 (command_completer_handle_brkchars)
9293 (default_completer_handle_brkchars)
9294 (completer_handle_brkchars_func_for_completer): New functions.
9295 * completer.h (set_gdb_completion_word_break_characters): Delete
9296 declaration.
9297 (completer_handle_brkchars_func_for_completer): New declaration.
9298 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9299 completer_handle_brkchars_func_for_completer.
9300
9301 2017-07-17 Pedro Alves <palves@redhat.com>
9302
9303 * completer.c (symbol_completer): New function, based on
9304 make_symbol_completion_list_fn.
9305 * completer.h (symbol_completer): New declaration.
9306 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9307 * python/py-cmd.c (completers): Adjust.
9308 * symtab.c (make_symbol_completion_list_fn): Delete.
9309 * symtab.h (make_symbol_completion_list_fn): Delete.
9310 * cli/cli-decode.c (add_cmd): Adjust.
9311
9312 2017-07-17 Pedro Alves <palves@redhat.com>
9313
9314 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9315 * dwarf2read.c: Include "filename-seen-cache.h".
9316 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9317 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9318 * filename-seen-cache.c: New file.
9319 * filename-seen-cache.h: New file.
9320 * symtab.c: Include "filename-seen-cache.h".
9321 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9322 (create_filename_seen_cache, clear_filename_seen_cache)
9323 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9324 to filename-seen-cache.h/filename-seen-cache.c.
9325 (output_source_filename, sources_info)
9326 (maybe_add_partial_symtab_filename)
9327 (make_source_files_completion_list): Adjust to use
9328 filename_seen_cache.
9329
9330 2017-07-17 Pedro Alves <palves@redhat.com>
9331
9332 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9333 fields.
9334 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9335 dwarf2_debug_sections*)): New.
9336 (dwarf2_per_objfile::dwarf2_per_objfile(const
9337 dwarf2_per_objfile&)): Declare as deleted.
9338 (dwarf2_per_objfile::operator=): Declare as deleted.
9339 (dwarf2_per_objfile::dwarf2_per_objfile)
9340 (dwarf2_per_objfile::~dwarf2_per_objfile)
9341 (dwarf2_per_objfile::free_cached_comp_units): New.
9342 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9343 ctor. Call dwarf2_per_objfile's ctor manually.
9344 (dwarf2_locate_sections): Deleted/refactored as ...
9345 (dwarf2_per_objfile::locate_sections): ... this new method.
9346 (free_cached_comp_units): Defer to
9347 dwarf2_per_objfile::free_cached_comp_units.
9348 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9349
9350 2017-07-14 Tom Tromey <tom@tromey.com>
9351
9352 PR rust/21764:
9353 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9354 parameter.
9355 <UNOP_SIZEOF>: Split into separate case.
9356 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9357
9358 2017-07-14 Tom Tromey <tom@tromey.com>
9359
9360 PR rust/21763:
9361 * symtab.c (symbol_matches_domain): Add language_rust to special
9362 case.
9363 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9364 treat LOC_TYPEDEF symbols as variables.
9365
9366 2017-07-14 Pedro Alves <palves@redhat.com>
9367
9368 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9369 symtabs matching all symtabs with SRCFILE as file name instead of
9370 only considering the first hit, with lookup_symtab.
9371
9372 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9373
9374 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9375 operator_name parameters.
9376 (gen_expr): Update function call.
9377
9378 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9379
9380 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9381 parameter.
9382 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9383 Likewise.
9384 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9385 parameter, use agent_expr::gdbarch instead, update function
9386 calls.
9387 (locexpr_tracepoint_var_ref): Likewise.
9388 (loclist_tracepoint_var_ref): Likewise.
9389 * ax-gdb.c (gen_trace_static_fields): Likewise.
9390 (gen_traced_pop): Likewise.
9391 (gen_frame_args_address): Likewise.
9392 (gen_frame_locals_address): Likewise.
9393 (gen_var_ref): Likewise.
9394 (gen_struct_ref_recursive): Likewise.
9395 (gen_static_field): Likewise.
9396 (gen_maybe_namespace_elt): Likewise.
9397 (gen_expr): Likewise.
9398 (gen_trace_for_var): Likewise.
9399 (gen_trace_for_expr): Likewise.
9400 (gen_trace_for_return_address): Likewise.
9401
9402 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9403
9404 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9405 parameter.
9406 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9407
9408 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9409
9410 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9411 from ax, update calls.
9412 (gen_usual_arithmetic): Likewise.
9413 (gen_integral_promotions): Likewise.
9414 (gen_bitfield_ref): Likewise.
9415 (gen_primitive_field): Likewise.
9416 (gen_struct_ref_recursive): Likewise.
9417 (gen_struct_ref): Likewise.
9418 (gen_maybe_namespace_elt): Likewise.
9419 (gen_struct_elt_for_reference): Likewise.
9420 (gen_namespace_elt): Likewise.
9421 (gen_aggregate_elt_ref): Likewise.
9422 (gen_expr): Get gdbarch from ax, update calls.
9423 (gen_expr_binop_rest): Likewise.
9424
9425 2017-07-13 Pedro Alves <palves@redhat.com>
9426
9427 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9428 as default tdesc.
9429 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9430 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9431 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9432 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9433 tdep.
9434 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9435 Get final tdesc from the tdep.
9436 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9437 default tdesc.
9438 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9439 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9440 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9441 Use it as default tdesc.
9442 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9443 down to amd_init_abi. No longer handle fallback tdesc here.
9444 * amd64-tdep.h (tdesc_x32): Declare.
9445 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9446 parameter.
9447 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9448 as default tdesc.
9449
9450 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9451
9452 * s390-linux-tdep.c (s390_process_record): Add support for
9453 instructions new in arch12.
9454
9455 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9456
9457 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9458 PT_GETFSBASE and PT_GETGSBASE.
9459 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9460 PT_SETGSBASE.
9461
9462 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9463
9464 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9465 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9466 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9467 those rules.
9468 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9469 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9470 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9471 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9472 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9473 * features/i386/amd64.xml: Add 64bit-segments.xml.
9474 * features/i386/amd64-avx-avx512.c: Regenerated.
9475 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9476 * features/i386/amd64-avx-mpx.c: Regenerated.
9477 * features/i386/amd64-avx.c: Regenerated.
9478 * features/i386/amd64-mpx.c: Regenerated.
9479 * features/i386/amd64.c: Regenerated.
9480 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9481 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9482 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9483 * regformats/i386/amd64-avx.dat: Regenerated.
9484 * regformats/i386/amd64-mpx.dat: Regenerated.
9485 * regformats/i386/amd64.dat: Regenerated.
9486
9487 2017-07-10 Yao Qi <yao.qi@linaro.org>
9488
9489 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9490 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9491
9492 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9493
9494 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9495 unsetenv.
9496 * gnulib/aclocal.m4: Regenerate.
9497 * gnulib/config.in: Regenerate.
9498 * gnulib/configure: Regenerate.
9499 * gnulib/import/Makefile.am: Regenerate.
9500 * gnulib/import/Makefile.in: Regenerate.
9501 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9502 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9503 * gnulib/import/m4/environ.m4: New file.
9504 * gnulib/import/m4/setenv.m4: New file.
9505 * gnulib/import/setenv.c: New file.
9506 * gnulib/import/unsetenv.c: New file.
9507
9508 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9509
9510 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9511 address when op is DW_OP_addr.
9512
9513 2017-07-09 Tom Tromey <tom@tromey.com>
9514
9515 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9516 check and apply to outer type.
9517
9518 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9519
9520 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9521 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9522 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9523 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9524
9525 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9526
9527 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9528
9529 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9530
9531 * corelow.c (get_core_siginfo): Remove.
9532 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9533 instead of get_core_siginfo.
9534 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9535 * gdbarch.h: Re-generate.
9536 * gdbarch.c: Re-generate.
9537 * linux-tdep.c (linux_core_xfer_siginfo): New.
9538 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9539
9540 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9541
9542 * corelow.c (thread_section_name): Move to ...
9543 * gdbcore.h (thread_section_name): ... here.
9544
9545 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9546
9547 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9548 (struct siginfo32): New.
9549 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9550 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9551 via ptrace(PT_LWPINFO).
9552
9553 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9554
9555 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9556 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9557 (fbsd_get_siginfo_type): New.
9558 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9559 (_initialize_fbsd_tdep): New.
9560
9561 2017-07-06 David Blaikie <dblaikie@gmail.com>
9562
9563 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9564 a singular dwo_unit*) to support multiple CUs in the same way that
9565 multiple TUs are supported.
9566 (create_cus_hash_table): Replace create_dwo_cu with a function for
9567 parsing multiple CUs from a DWO file.
9568 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9569 create_dwo_cu.
9570 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9571 htab_find, rather than comparing the signature to a singleton CU in
9572 the dwo_file.
9573
9574 2017-07-06 Pedro Alves <palves@redhat.com>
9575
9576 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9577
9578 2017-07-04 Pedro Alves <palves@redhat.com>
9579
9580 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9581 * gdbtypes.h (TYPE_STATIC): Delete.
9582 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9583 is_synchronized, is_native>: Delete.
9584 <dummy>: Bump.
9585 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9586 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9587 (TYPE_FN_FIELD_ABSTRACT): Delete.
9588
9589 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9590
9591 * buffer.h (buffer_finish): Fix spelling mistakes.
9592
9593 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9594
9595 * .dir-locals.el: Automatically switch to C-style comments in
9596 versions of Emacs that support the feature.
9597
9598 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9599 Pedro Alves <palves@redhat.com>
9600
9601 PR cli/21688
9602 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9603 (process_next_line): New variable 'inline_cmd'.
9604 Adjust 'if' clauses for "python", "compile" and "guile" to use
9605 'command_name_equals' and check for '!inline_cmd'.
9606
9607 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9608
9609 PR cli/21688
9610 * cli/cli-script.c (command_name_equals_not_inline): New function.
9611 (process_next_line): Adjust 'if' clauses for "python", "compile"
9612 and "guile" to use command_name_equals_not_inline.
9613
9614 2017-06-29 Pedro Alves <palves@redhat.com>
9615
9616 * completer.c (expression_completer): Call
9617 linespec_location_completer instead of location_completer.
9618
9619 2017-06-29 Pedro Alves <palves@redhat.com>
9620
9621 * completer.c (expression_completer): Remove code that recomputes
9622 'text' from 'word'.
9623
9624 2017-06-29 Yao Qi <yao.qi@linaro.org>
9625
9626 * regformats/regdat.sh: Generate code with
9627 "ifndef IN_PROCESS_AGENT".
9628
9629 2017-06-28 Pedro Alves <palves@redhat.com>
9630
9631 * command.h: Include "common/scoped_restore.h".
9632
9633 2017-06-28 Yao Qi <yao.qi@linaro.org>
9634
9635 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9636 instead of obstack_grow.
9637
9638 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9639
9640 PR gdb/21337
9641 * symfile.c (reread_symbols): Call objfiles_changed just before
9642 read_symbols.
9643
9644 2017-06-27 Pedro Alves <palves@redhat.com>
9645
9646 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9647 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9648 (completion_list_add_symbol, completion_list_add_msymbol):
9649 ... these new functions.
9650 (add_symtab_completions)
9651 (default_make_symbol_completion_list_break_on_1): Adjust.
9652
9653 2017-06-27 Pedro Alves <palves@redhat.com>
9654
9655 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9656 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9657 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9658 dtor.
9659 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9660 'storage_obstack' field an auto_obstack. In-class initialize all
9661 non-bitfield fields. Make minsyms_read bool.
9662 * symfile.c (read_symbols): Adjust.
9663
9664 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9665
9666 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9667 (gdbsim_store_register): Likewise.
9668
9669 2017-06-27 Pedro Alves <palves@redhat.com>
9670
9671 * c-exp.y (name_obstack): Now an auto_obstack.
9672 (yylex): Use auto_obstack::clear.
9673 (c_parse): Use auto_obstack::clear instead of reinitializing and
9674 freeing the obstack.
9675 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9676 * d-exp.y (name_obstack): Now an auto_obstack.
9677 (yylex): Use auto_obstack::clear.
9678 (d_parse): Use auto_obstack::clear instead of reinitializing and
9679 freeing the obstack.
9680 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9681 auto_obstack.
9682 * dwarf2read.c (create_addrmap_from_index)
9683 (dwarf2_build_psymtabs_hard)
9684 (update_enumeration_type_from_children): Likewise.
9685 * gdb_obstack.h (auto_obstack): New type.
9686 * go-exp.y (name_obstack): Now an auto_obstack.
9687 (build_packaged_name): Use auto_obstack::clear.
9688 (go_parse): Use auto_obstack::clear instead of reinitializing and
9689 freeing the obstack.
9690 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9691 auto_obstack.
9692 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9693 * rust-exp.y (work_obstack): Now an auto_obstack.
9694 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9695 reinitializing and freeing the obstack.
9696 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9697 (host_char_to_target): Use auto_obstack.
9698 * utils.h (make_cleanup_obstack_free): Delete declaration.
9699 * valprint.c (generic_emit_char, generic_printstr): Use
9700 auto_obstack.
9701
9702 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9703
9704 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9705 thread.
9706 (darwin_init_thread_list): Don't update dummy thread.
9707 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9708
9709 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9710
9711 * record-full.c (netorder16): Remove.
9712
9713 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9714
9715 * common/diagnostics.h: Define macros for GCC.
9716 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9717 * common/vec.h: Include diagnostics.h.
9718 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9719 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9720 warning.
9721
9722 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9723
9724 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9725 New macro.
9726 * ada-lex.l: Ignore deprecated register warnings.
9727
9728 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9729
9730 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9731 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9732
9733 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9734
9735 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9736 its own line.
9737
9738 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9739
9740 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9741
9742 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9743
9744 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9745 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9746 (xtensa_register_read_masked): Likewise.
9747
9748 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9749
9750 * common/environ.c (gdb_environ::unset): Update comment.
9751
9752 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9753
9754 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9755 registers.
9756
9757 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9758
9759 * record-full.c (record_full_exec_insn): Use byte_vector.
9760
9761 2017-06-22 Yao Qi <yao.qi@linaro.org>
9762
9763 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9764 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9765
9766 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9767
9768 * remote.c (cached_reg): Move from here...
9769 * regcache.h (cached_reg): ...to here.
9770 * python/py-unwind.c (struct reg_info): Remove.
9771 (cached_frame_info): Use cached_reg_t.
9772 (pyuw_prev_register): Likewise.
9773 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9774 (pyuw_dealloc_cache): Free all registers.
9775
9776 2017-06-22 Pedro Alves <palves@redhat.com>
9777 Simon Marchi <simon.marchi@ericsson.com>
9778
9779 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9780 warning.
9781 * common/diagnostics.h: New file.
9782
9783 2017-06-22 Pedro Alves <palves@redhat.com>
9784
9785 * common/agent.h: Add include guards.
9786
9787 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9788
9789 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9790 talk about addressable units instead of bytes.
9791
9792 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9793
9794 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9795 of '::const_iterator'.
9796
9797 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9798
9799 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9800 'unittests/environ-selftests.c'.
9801 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9802 * charset.c (find_charset_names): Declare object 'iconv_env'.
9803 Update code to use 'iconv_env' object. Remove call to
9804 'free_environ'.
9805 * common/environ.c: Include <utility>.
9806 (make_environ): Delete function.
9807 (free_environ): Delete function.
9808 (gdb_environ::clear): New function.
9809 (gdb_environ::operator=): New function.
9810 (gdb_environ::get): Likewise.
9811 (environ_vector): Delete function.
9812 (set_in_environ): Delete function.
9813 (gdb_environ::set): New function.
9814 (unset_in_environ): Delete function.
9815 (gdb_environ::unset): New function.
9816 (gdb_environ::envp): Likewise.
9817 * common/environ.h: Include <vector>.
9818 (struct gdb_environ): Delete; transform into...
9819 (class gdb_environ): ... this class.
9820 (free_environ): Delete prototype.
9821 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9822 environ_vector): Likewise.
9823 * infcmd.c (run_command_1): Update code to call
9824 'envp' from 'gdb_environ' class.
9825 (environment_info): Update code to call methods from 'gdb_environ'
9826 class.
9827 (unset_environment_command): Likewise.
9828 (path_info): Likewise.
9829 (path_command): Likewise.
9830 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9831 (inferior::inferior): Initialize 'environment' using the host's
9832 information.
9833 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9834 Include "environ.h".
9835 (class inferior) <environment>: Change type from 'struct
9836 gdb_environ' to 'gdb_environ'.
9837 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9838 methods from 'gdb_environ' class.
9839 * solib.c (solib_find_1): Likewise
9840 * unittests/environ-selftests.c: New file.
9841
9842 2017-06-20 Yao Qi <yao.qi@linaro.org>
9843
9844 * features/i386/i386-linux.xml: Exchange the order of including
9845 32bit-linux.xml and 32bit-sse.xml.
9846 * features/i386/i386-linux.c: Regenerated.
9847
9848 2017-06-20 Yao Qi <yao.qi@linaro.org>
9849
9850 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9851 Delete copy ctor and assignment operator.
9852 (tdesc_type): Likewise.
9853 (tdesc_feature): Likewise.
9854 (tdesc_free_reg): Remove.
9855 (tdesc_create_reg): Use new.
9856 (tdesc_free_type): Remove.
9857 (tdesc_create_vector): Use new.
9858 (tdesc_create_union): Likewise.
9859 (tdesc_create_flags): Likewise.
9860 (tdesc_create_enum): Likewise.
9861 (tdesc_free_feature): Delete.
9862 (free_target_description): Use delete.
9863
9864 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9865
9866 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9867 registers.
9868
9869 2017-06-19 Pedro Alves <palves@redhat.com>
9870
9871 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9872 after gdb::unlinker.
9873
9874 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9875
9876 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9877 gdb_environ to access an environment variable.
9878
9879 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9880
9881 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9882 gdb_byte*.
9883
9884 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9885
9886 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9887
9888 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9889
9890 * configure: Re-generate.
9891 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9892
9893 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9894
9895 * configure: Re-generate.
9896 * warning.m4: Pass -Werror to compiler when checking for
9897 supported warning flags.
9898
9899 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9900
9901 * Makefile.in (COMPILE.pre): Add "-x c++".
9902
9903 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9904 Pedro Alves <palves@redhat.com>
9905 Yao Qi <yao.qi@linaro.org>
9906
9907 * defs.h (RequireLongest): New.
9908 (extract_integer): Declare function template.
9909 (extract_signed_integer): Remove the declaration, but define it
9910 static inline.
9911 (extract_unsigned_integer): Likewise.
9912 (store_integer): Declare function template.
9913 (store_signed_integer): Remove the declaration, but define it
9914 static inline.
9915 (store_unsigned_integer): Likewise.
9916 * findvar.c (extract_integer): New function template.
9917 (extract_signed_integer): Remove.
9918 (extract_unsigned_integer): Remove.
9919 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9920 instantiations.
9921 (store_integer): New function template.
9922 (store_signed_integer): Remove.
9923 (store_unsigned_integer): Remove.
9924 (store_integer): Explicit instantiations.
9925 * regcache.c (regcache_raw_read_signed): Update.
9926 (regcache::raw_read): New function.
9927 (regcache::raw_read_signed): Remove.
9928 (regcache::raw_read_unsigned): Remove.
9929 (regcache_raw_read_unsigned): Update.
9930 (regcache_raw_write_unsigned): Update.
9931 (regcache::raw_write_signed): Remove.
9932 (regcache::raw_write): New function.
9933 (regcache_cooked_read_signed): Update.
9934 (regcache::raw_write_unsigned): Remove.
9935 (regcache::cooked_read_signed): Remove.
9936 (regcache_cooked_read_unsigned): Update.
9937 (regcache::cooked_read_unsigned): Remove.
9938 (regcache_cooked_write_signed): Update.
9939 (regcache_cooked_write_unsigned): Update.
9940 * regcache.h (regcache) <raw_read_signed>: Remove.
9941 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9942 <raw_read, raw_write>: New.
9943 <cooked_read_signed, cooked_write_signed>: Remove.
9944 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9945 <cooked_read, cooked_write>: New.
9946 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9947 (sh64_pseudo_register_write): Update.
9948
9949 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9950
9951 * arc-tdep.c (arc_disassembler_options): New variable.
9952 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9953 of default_print_insn.
9954 (arc_delayed_print_insn): Set info->section when needed,
9955 use default_print_insn to retrieve a disassembler.
9956
9957 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9958
9959 PR gdb/21574
9960 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9961 to mention $SHELL and startup-with-shell.
9962
9963 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9964
9965 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9966
9967 2017-06-14 Yao Qi <yao.qi@linaro.org>
9968
9969 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9970 default_print_insn instead of print_insn_aarch64.
9971 * arm-tdep.c (gdb_print_insn_arm): Call
9972 default_print_insn instead of print_insn_big_arm
9973 and print_insn_little_arm.
9974 * i386-tdep.c (i386_print_insn): Call default_print_insn
9975 instead of print_insn_i386.
9976 * ia64-tdep.c (ia64_print_insn): Call
9977 default_print_insn instead of print_insn_ia64.
9978 * mips-tdep.c (gdb_print_insn_mips): Call
9979 default_print_insn instead of print_insn_big_mips
9980 and print_insn_little_mips.
9981 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9982 instead of print_insn_spu.
9983
9984 2017-06-14 Pedro Alves <palves@redhat.com>
9985
9986 * ada-lang.c: Include "common/byte-vector.h".
9987 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9988 * charset.c (wchar_iterator::iterate): Resize the vector instead
9989 of reserving it.
9990 * common/byte-vector.h: Include "common/def-vector.h".
9991 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9992 * cli/cli-dump.c: Include "common/byte-vector.h".
9993 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9994 * common/byte-vector.h: New file.
9995 * common/def-vector.h: New file.
9996 * common/default-init-alloc.h: New file.
9997 * dwarf2loc.c: Include "common/byte-vector.h".
9998 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9999 instead of reserving it.
10000 * dwarf2read.c: Include "common/byte-vector.h".
10001 (data_buf::m_vec): Now a gdb::byte_vector.
10002 * gdb_regex.c: Include "common/def-vector.h".
10003 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10004 * mi/mi-main.c: Include "common/byte-vector.h".
10005 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10006 * printcmd.c: Include "common/byte-vector.h".
10007 (print_scalar_formatted): Use gdb::byte_vector.
10008 * valprint.c: Include "common/byte-vector.h".
10009 (maybe_negate_by_bytes, print_decimal_chars): Use
10010 gdb::byte_vector.
10011
10012 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10013
10014 * darwin-nat.c: Include "nat/fork-inferior.h".
10015
10016 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10017
10018 * configure.nat: Factor out Darwin bits that are not
10019 architecture-specific. Add fork-inferior.o.
10020
10021 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10022
10023 * configure.nat: Factor out AIX bits that are not
10024 architecture-specific. Add fork-inferior.o.
10025
10026 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10027
10028 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10029 (read_pieced_value, write_pieced_value): ...here. Reduce to
10030 wrappers that just call rw_pieced_value.
10031
10032 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10033
10034 * dwarf2loc.c (write_pieced_value): When writing the data for a
10035 memory piece, use write_memory_with_notification instead of
10036 write_memory.
10037
10038 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10039
10040 * valops.c (read_value_memory): Change embedded_offset to
10041 represent a bit offset instead of a byte offset.
10042 * value.h (read_value_memory): Adjust comment.
10043
10044 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10045
10046 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10047 dest_offset_bits and source_offset_bits.
10048 (write_pieced_value): Likewise.
10049
10050 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10051
10052 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10053 given by DW_OP_bit_piece.
10054 (write_pieced_value): Likewise.
10055
10056 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10057
10058 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10059 some other preparations to the places where sufficient information
10060 is available.
10061 (write_pieced_value): Likewise.
10062
10063 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10064
10065 * dwarf2loc.c (bits_to_bytes): New function.
10066 (read_pieced_value): Fix offset calculations for register pieces
10067 on big-endian targets.
10068 (write_pieced_value): Likewise.
10069
10070 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10071
10072 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10073 (write_pieced_value): Likewise.
10074
10075 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10076
10077 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10078 transfer the source value's least significant bits, instead of its
10079 lowest-addressed ones. Rename type_len to max_offset.
10080 (read_pieced_value): Mirror above changes to write_pieced_value as
10081 applicable.
10082
10083 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10084
10085 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10086 truncate full bytes from dest_offset_bits before using it as an
10087 offset into the buffer.
10088
10089 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10090
10091 * dwarf2loc.c (write_pieced_value): Include transfer size in
10092 byte-wise check.
10093
10094 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10095
10096 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10097 calculation of this_size.
10098
10099 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10100
10101 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10102 when targeting a bit-field.
10103 (write_pieced_value): Likewise.
10104
10105 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10106
10107 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10108 (allocate_piece_closure): Drop addr_size parameter.
10109 (dwarf2_evaluate_loc_desc_full): Adjust call to
10110 allocate_piece_closure.
10111
10112 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10113
10114 PR gdb/21226
10115 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10116 the LSB end, independent of endianness.
10117
10118 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10119
10120 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10121 size capping.
10122
10123 2017-06-13 Yao Qi <yao.qi@linaro.org>
10124
10125 * mips-linux-nat.c: Move include features/mips*-linux.c to
10126 mips-linux-tdep.c.
10127 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10128 to mips-linux-tdep.c.
10129 * mips-linux-tdep.c: Include features/mips*-linux.c
10130 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10131 functions.
10132 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10133 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10134 (tdesc_mips64_dsp_linux): Declare.
10135
10136 2017-06-12 Tom Tromey <tom@tromey.com>
10137
10138 * valprint.h (val_print_type_code_int): Remove.
10139 * valprint.c (generic_val_print_int): Always call
10140 val_print_scalar_formatted.
10141 (val_print_type_code_int): Remove.
10142 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10143 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10144 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10145 * ada-valprint.c (ada_val_print_num): Use
10146 val_print_scalar_formatted.
10147
10148 2017-06-12 Tom Tromey <tom@tromey.com>
10149
10150 * printcmd.c (print_scalar_formatted): Unify the two switches.
10151 Don't convert scalars to LONGEST.
10152
10153 2017-06-12 Tom Tromey <tom@tromey.com>
10154
10155 PR exp/16225:
10156 * valprint.h (print_decimal_chars): Update.
10157 * valprint.c (maybe_negate_by_bytes): New function.
10158 (print_decimal_chars): Add "is_signed" argument.
10159 * printcmd.c (print_scalar_formatted): Update.
10160
10161 2017-06-12 Tom Tromey <tom@tromey.com>
10162
10163 PR exp/16225:
10164 * valprint.h (print_binary_chars, print_hex_chars): Update.
10165 * valprint.c (val_print_type_code_int): Update.
10166 (print_binary_chars): Add "zero_pad" argument.
10167 (emit_octal_digit): New function.
10168 (print_octal_chars): Don't zero-pad.
10169 (print_decimal_chars): Likewise.
10170 (print_hex_chars): Add "zero_pad" argument.
10171 * sh64-tdep.c (sh64_do_fp_register): Update.
10172 * regcache.c (regcache::dump): Update.
10173 * printcmd.c (print_scalar_formatted): Update.
10174 * infcmd.c (default_print_one_register_info): Update.
10175
10176 2017-06-12 Pedro Alves <palves@redhat.com>
10177 Alan Hayward <alan.hayward@arm.com>
10178
10179 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10180 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10181 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10182 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10183 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10184
10185 2017-06-12 Pedro Alves <palves@redhat.com>
10186
10187 * dwarf2read.c (mapped_symtab::data): Now a vector of
10188 symtab_index_entry instead of vector of
10189 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10190 whether an element's name is NULL instead of checking whether the
10191 element itself is NULL.
10192 (find_slot): Change return type. Adjust.
10193 (hash_expand, , add_index_entry, uniquify_cu_indices)
10194 (write_hash_table): Adjust.
10195
10196 2017-06-12 Pedro Alves <palves@redhat.com>
10197
10198 * dwarf2read.c (recursively_count_psymbols): New function.
10199 (write_psymtabs_to_index): Call it to compute number of psyms and
10200 pass estimate size of psyms_seen to unordered_set's ctor.
10201
10202 2017-06-12 Pedro Alves <palves@redhat.com>
10203
10204 * dwarf2read.c (write_hash_table): Check if key already exists
10205 before emplacing.
10206
10207 2017-06-12 Pedro Alves <palves@redhat.com>
10208
10209 * dwarf2read.c (data_buf::append_space): Rename to...
10210 (data_buf::grow): ... this, and make private. Adjust all callers.
10211 (data_buf::append_uint): New method.
10212 (add_address_entry, write_one_signatured_type)
10213 (write_psymtabs_to_index): Use it.
10214
10215 2017-06-12 Pedro Alves <palves@redhat.com>
10216
10217 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10218 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10219 (data_buf::file_write): Call ::fwrite directly.
10220
10221 2017-06-12 Pedro Alves <palves@redhat.com>
10222
10223 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10224 std::vector::erase.
10225
10226 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10227
10228 Code cleanup: C++ify .gdb_index producer.
10229 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10230 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10231 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10232 (create_strtab, add_string): Remove.
10233 (file_write, data_buf): New.
10234 (struct symtab_index_entry): Use std::vector for cu_indices.
10235 (struct mapped_symtab): Use std::vector for data.
10236 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10237 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10238 Remove.
10239 (find_slot): Change return type. Update it to the new data structures.
10240 (hash_expand, add_index_entry): Update it to the new data structures.
10241 (offset_type_compare): Remove.
10242 (uniquify_cu_indices): Update it to the new data structures.
10243 (c_str_view, c_str_view_hasher, vector_hasher): New.
10244 (add_indices_to_cpool): Remove.
10245 (write_hash_table): Update it to the new data structures.
10246 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10247 (eq_psymtab_cu_index): Remove.
10248 (psym_index_map): New typedef.
10249 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10250 reference and std::unordered_map for cu_index_htab.
10251 (add_address_entry, add_address_entry_worker, write_address_map)
10252 (write_psymbols): Update it to the new data structures.
10253 (write_obstack): Remove.
10254 (struct signatured_type_index_data): Change types_list to a data_buf
10255 reference and psyms_seen to a std::unordered_set reference.
10256 (write_one_signatured_type, recursively_write_psymbols)
10257 (write_psymtabs_to_index): Update it to the new data structures.
10258
10259 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10260
10261 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10262 separate-debug-file commands.
10263 * symfile.h (separate_debug_file_debug): New global.
10264 * symfile.c (separate_debug_file_debug): New global.
10265 (separate_debug_file_exists, find_separate_debug_file): Add
10266 debug output.
10267 (_initialize_symfile): Add "set debug separate-debug-file"
10268 command.
10269 * build-id.c (build_id_to_debug_bfd,
10270 find_separate_debug_file_by_buildid): Add debug output.
10271
10272 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10273
10274 * gdbarch.sh (displaced_step_free_closure): Remove.
10275 * gdbarch.h, gdbarch.c: Re-generate.
10276 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10277 displaced_step_free_closure.
10278 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10279 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10280 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10281 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10282 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10283 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10284 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10285 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10286 * infrun.c (displaced_step_clear): Call xfree instead of
10287 gdbarch_displaced_step_free_closure.
10288
10289 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10290
10291 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10292 NULL".
10293
10294 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10295
10296 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10297 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10298 (mn10300_push_dummy_call): Likewise.
10299
10300 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10301
10302 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10303
10304 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10305
10306 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10307
10308 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10309
10310 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10311 able to start inferiors using a shell.
10312 (New remote packets): Announce new packet "QStartupWithShell".
10313 * remote.c: Add PACKET_QStartupWithShell.
10314 (extended_remote_create_inferior): Handle new
10315 PACKET_QStartupWithShell.
10316 (remote_protocol_features) <QStartupWithShell>: New entry for
10317 PACKET_QStartupWithShell.
10318 (_initialize_remote): Call "add_packet_config_cmd" for
10319 QStartupShell.
10320
10321 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10322 Pedro Alves <palves@redhat.com>
10323
10324 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10325 and "nat/fork-inferior.h".
10326 * common/common-inferior.h: New file, with contents from
10327 "gdb/inferior.h".
10328 * commom/common-utils.c: Include "common-utils.h".
10329 (stringify_argv): New function.
10330 * common/common-utils.h (stringify_argv): New prototype.
10331 * configure.nat: Add "fork-inferior.o" as a dependency for
10332 "*linux*", "fbsd*" and "nbsd*" hosts.
10333 * corefile.c (get_exec_file): Update comment.
10334 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10335 instead of "startup_inferior".
10336 (darwin_create_inferior): Call "add_thread_silent" after
10337 "fork_inferior".
10338 * fork-child.c: Cleanup unnecessary includes.
10339 (SHELL_FILE): Move to "common/common-fork-child.c".
10340 (environ): Likewise.
10341 (exec_wrapper): Initialize.
10342 (get_exec_wrapper): New function.
10343 (breakup_args): Move to "common/common-fork-child.c"; rename to
10344 "breakup_args_for_exec".
10345 (escape_bang_in_quoted_argument): Move to
10346 "common/common-fork-child.c".
10347 (saved_ui): New variable.
10348 (prefork_hook): New function.
10349 (postfork_hook): Likewise.
10350 (postfork_child_hook): Likewise.
10351 (gdb_startup_inferior): Likewise.
10352 (fork_inferior): Move to "common/common-fork-child.c". Update
10353 function to support gdbserver.
10354 (startup_inferior): Likewise.
10355 * gdbcore.h (get_exec_file): Remove declaration.
10356 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10357 instead of "startup_inferior". Call "add_thread_silent" after
10358 "fork_inferior".
10359 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10360 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10361 instead of "startup_inferior". Call "add_thread_silent" after
10362 "fork_inferior".
10363 * inferior.h: Include "common-inferior.h".
10364 (trace_start_error): Move to "common/common-utils.h".
10365 (trace_start_error_with_name): Likewise.
10366 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10367 (startup_inferior): Likewise.
10368 (gdb_startup_inferior): New prototype.
10369 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10370 * nat/fork-inferior.h: New file.
10371 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10372 instead of "startup_inferior". Call "add_thread_silent" after
10373 "fork_inferior".
10374 * target.h (target_terminal_init): Move prototype to
10375 "target/target.h".
10376 (target_terminal_inferior): Likewise.
10377 (target_terminal_ours): Likewise.
10378 * target/target.h (target_terminal_init): New prototype, moved
10379 from "target.h".
10380 (target_terminal_inferior): Likewise.
10381 (target_terminal_ours): Likewise.
10382 * utils.c (gdb_flush_out_err): New function.
10383
10384 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10385
10386 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10387 * common/common-gdbthread.h: New file, with parts from
10388 "gdb/gdbthread.h".
10389 * gdbthread.h: Include "common-gdbthread.h".
10390 (switch_to_thread): Moved to "common/common-gdbthread.h".
10391
10392 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10393
10394 * Makefile.in (SFILES): Add "common/job-control.c".
10395 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10396 (COMMON_OBS): Add "job-control.o".
10397 * common/job-control.c: New file, with contents from
10398 "gdb/inflow.c".
10399 * common/job-control.h: New file, with contents from "terminal.h".
10400 * fork-child.c: Include "job-control.h".
10401 * inflow.c: Include "job-control.h".
10402 (gdb_setpgid): Move to "common/common-inflow.c".
10403 (_initialize_inflow): Move setting of "job_control" to
10404 "handle_job_control".
10405 * terminal.h (job_control): Moved to "common/common-terminal.h".
10406 (gdb_setpgid): Likewise.
10407 * top.c: Include "job_control.h".
10408 * utils.c: Likewise.
10409 (job_control): Moved to "job-control.c".
10410
10411 2017-06-07 Pedro Alves <palves@redhat.com>
10412
10413 * Makefile.in (SFILES): Add gdb_regex.c.
10414 (COMMON_OBS): Add gdb_regex.o.
10415 * ada-lang.c (ada_add_standard_exceptions)
10416 (ada_add_exceptions_from_frame, name_matches_regex)
10417 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10418 parameter type to compiled_regex. Adjust.
10419 (ada_exceptions_list): Use compiled_regex.
10420 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10421 std::unique_ptr<compiled_regex>.
10422 (exception_catchpoint::~exception_catchpoint): Remove regfree
10423 call.
10424 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10425 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10426 * breakpoint.c (solib_catchpoint::compiled): Now a
10427 std::unique_ptr<compiled_regex>.
10428 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10429 (check_status_catch_solib): Adjust to use compiled_regex.
10430 (add_solib_catchpoint): Adjust to use compiled_regex.
10431 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10432 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10433 compiled_regex reference. Adjust to use it.
10434 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10435 declaration. Include "gdb_regex.h".
10436 (apropos_cmd): Change regex parameter to compiled_regex reference.
10437 * gdb_regex.c: New file.
10438 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10439 declarations.
10440 (class compiled_regex): New.
10441 * linux-tdep.c: Include "common/gdb_optional.h".
10442 (struct mapping_regexes): New, factored out from
10443 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10444 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10445 gdb::optional and remove cleanups. Adjust to compiled_regex.
10446 * probe.c: Include "common/gdb_optional.h".
10447 (collect_probes): Use compiled_regex and gdb::optional and remove
10448 cleanups.
10449 * skip.c: Include "common/gdb_optional.h".
10450 (skiplist_entry::compiled_function_regexp): Now a
10451 gdb::optional<compiled_regex>.
10452 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10453 (free_skiplist_entry): Remove regfree call.
10454 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10455 compiled_regex and gdb::optional.
10456 * symtab.c: Include "common/gdb_optional.h".
10457 (search_symbols): Use compiled_regex and gdb::optional.
10458 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10459 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10460 to gdb_regex.c.
10461
10462 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10463
10464 * regcache.c (regcache::save): Avoid buffer use.
10465 (regcache::dump): Likewise.
10466
10467 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10468
10469 * sh-tdep.c (sh_pseudo_register_read): Remove
10470 MAX_REGISTER_SIZE.
10471 (sh_pseudo_register_write): Likewise.
10472 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10473 (sh64_pseudo_register_write): Likewise
10474
10475 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10476
10477 * aarch64-tdep.c (aarch64_store_return_value): Use
10478 V_REGISTER_SIZE.
10479 (aarch64_pseudo_read_value): Likewise.
10480 (aarch64_pseudo_write): Likewise.
10481
10482 2017-06-06 Yao Qi <yao.qi@linaro.org>
10483
10484 * regformats/regdef.h (set_register_cache): Remove the
10485 declaration.
10486
10487 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10488
10489 * frame.c (frame_unwind_register_signed): Use
10490 frame_unwind_register_value.
10491
10492 2017-06-06 Pedro Alves <palves@redhat.com>
10493
10494 PR breakpoints/21553
10495 * breakpoint.c (create_breakpoints_sal_default)
10496 (init_breakpoint_sal, create_breakpoint_sal): Use
10497 gdb::unique_xmalloc_ptr for string parameters.
10498 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10499 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10500 (base_breakpoint_create_breakpoints_sal)
10501 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10502 (strace_marker_create_breakpoints_sal)
10503 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10504 string parameters.
10505 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10506 gdb::unique_xmalloc_ptr for string parameters.
10507 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10508 parameters.
10509
10510 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10511
10512 * alpha-tdep.c (alpha_register_to_value): Use
10513 get_frame_register_value.
10514 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10515
10516 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10517
10518 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10519 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10520 (ia64_value_to_register): Likewise.
10521 (ia64_extract_return_value): Likewise.
10522 (ia64_store_return_value): Likewise.
10523 (ia64_push_dummy_call): Likewise.
10524
10525 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10526
10527 GDB 8.0 released.
10528
10529 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10530
10531 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10532
10533 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10534
10535 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10536 parameter.
10537 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10538
10539 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10540
10541 * event-loop.c (poll_timers): Unallocate timer using delete
10542 instead of xfree.
10543
10544 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10545
10546 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10547 (struct breakpoint) <~breakpoint>: New.
10548 (struct watchpoint): Inherit from breakpoint.
10549 <~watchpoint>: New.
10550 <base>: Remove.
10551 (struct tracepoint): Inherit from breakpoint.
10552 <base>: Remove.
10553 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10554 (struct longjmp_breakpoint): Inherit from breakpoint.
10555 <~longjmp_breakpoint>: New.
10556 <base>: Remove.
10557 (new_breakpoint_from_type): Remove casts.
10558 (watchpoint_in_thread_scope): Remove reference to base field.
10559 (watchpoint_del_at_next_stop): Likewise.
10560 (update_watchpoint): Likewise.
10561 (watchpoint_check): Likewise.
10562 (bpstat_check_watchpoint): Likewise.
10563 (set_longjmp_breakpoint): Likewise.
10564 (struct fork_catchpoint): Inherit from breakpoint.
10565 <base>: Remove.
10566 (struct solib_catchpoint): Inherit from breakpoint.
10567 <~solib_catchpoint>: New.
10568 <base>: Remove.
10569 (dtor_catch_solib): Change to ...
10570 (solib_catchpoint::~solib_catchpoint): ... this.
10571 (breakpoint_hit_catch_solib): Remove reference to base field.
10572 (add_solib_catchpoint): Likewise.
10573 (create_fork_vfork_event_catchpoint): Likewise.
10574 (struct exec_catchpoint): Inherit from breakpoint.
10575 <~exec_catchpoint>: New.
10576 <base>: Remove.
10577 (dtor_catch_exec): Change to ...
10578 (exec_catchpoint::~exec_catchpoint): ... this.
10579 (dtor_watchpoint): Change to ...
10580 (watchpoint::~watchpoint): ... this.
10581 (watch_command_1): Remove reference to base field.
10582 (catch_exec_command_1): Likewise.
10583 (base_breakpoint_dtor): Change to ...
10584 (breakpoint::~breakpoint): ... this.
10585 (base_breakpoint_ops): Remove dtor field value.
10586 (longjmp_bkpt_dtor): Change to ...
10587 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10588 (strace_marker_create_breakpoints_sal): Remove reference to base
10589 field.
10590 (delete_breakpoint): Don't manually call breakpoint destructor.
10591 (create_tracepoint_from_upload): Remove reference to base field.
10592 (trace_pass_set_count): Likewise.
10593 (initialize_breakpoint_ops): Don't initialize
10594 momentary_breakpoint_ops, don't set dtors.
10595 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10596 <~ada_catchpoint>: New.
10597 <base>: Remove.
10598 (create_excep_cond_exprs): Remove reference to base field.
10599 (dtor_exception): Change to ...
10600 (ada_catchpoint::~ada_catchpoint): ... this.
10601 (dtor_catch_exception): Remove.
10602 (dtor_catch_exception_unhandled): Remove.
10603 (dtor_catch_assert): Remove.
10604 (create_ada_exception_catchpoint): Remove reference to base
10605 field.
10606 (initialize_ada_catchpoint_ops): Don't set dtors.
10607 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10608 breakpoint.
10609 <~signal_catchpoint>: New.
10610 <base>: Remove.
10611 (signal_catchpoint_dtor): Change to ...
10612 (signal_catchpoint::~signal_catchpoint): ... this.
10613 (create_signal_catchpoint): Remove reference to base field.
10614 (initialize_signal_catchpoint_ops): Don't set dtor.
10615 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10616 from breakpoint.
10617 <~syscall_catchpoint>: New.
10618 <base>: Remove.
10619 (dtor_catch_syscall): Change to ...
10620 (syscall_catchpoint::~syscall_catchpoint): ... this.
10621 (create_syscall_event_catchpoint): Remove reference to base
10622 field.
10623 (initialize_syscall_catchpoint_ops): Don't set dtor.
10624 * break-catch-throw.c (struct exception_catchpoint): Inherit
10625 from breakpoint.
10626 <~exception_catchpoint>: New.
10627 <base>: Remove.
10628 (dtor_exception_catchpoint): Change to ...
10629 (exception_catchpoint::~exception_catchpoint): ... this.
10630 (handle_gnu_v3_exceptions): Remove reference to base field.
10631 (initialize_throw_catchpoint_ops): Don't set dtor.
10632 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10633 field.
10634 * remote.c (remote_get_tracepoint_status): Likewise.
10635 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10636 * tracefile.c (tracefile_fetch_registers): Likewise.
10637 * tracepoint.c (actions_command): Likewise.
10638 (validate_actionline): Likewise.
10639 (tfind_1): Likewise.
10640 (get_traceframe_location): Likewise.
10641 (find_matching_tracepoint_location): Likewise.
10642 (parse_tracepoint_status): Likewise.
10643 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10644
10645 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10646
10647 * breakpoint.c (struct longjmp_breakpoint): New struct.
10648 (is_tracepoint_type): Change return type to bool.
10649 (is_longjmp_type): New function.
10650 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10651 (set_raw_breakpoint_without_location): Use
10652 new_breakpoint_from_type.
10653 (set_raw_breakpoint): Likewise.
10654
10655 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10656
10657 * breakpoint.c (new_breakpoint_from_type): New function.
10658 (create_breakpoint_sal): Use new_breakpoint_from_type and
10659 unique_ptr.
10660 (create_breakpoint): Likewise.
10661
10662 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10663
10664 * memattr.c (mem_info_command): Rename to ...
10665 (info_mem_command): ... this.
10666 (mem_enable_command): Rename to ...
10667 (enable_mem_command): ... this.
10668 (mem_disable_command): Rename to ...
10669 (disable_mem_command): ... this.
10670 (mem_delete_command): Rename to ...
10671 (delete_mem_command): ... this.
10672 (_initialize_mem): Adjust function names.
10673
10674 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10675
10676 * btrace.c (handle_pt_insn_events): New.
10677 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10678 STATUS. Split into this and ...
10679 (handle_pt_insn_event_flags): ... this.
10680
10681 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10682
10683 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10684 and struct pt_insn.resynced.
10685 * configure: Regenerated.
10686 * config.in: Regenerated.
10687
10688 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10689
10690 * btrace.c (ftrace_find_call_by_number): New function.
10691 (ftrace_new_function): Store objects, not pointers.
10692 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10693 ftrace_new_gap, ftrace_update_function,
10694 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10695 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10696 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10697 btrace_ends_with_single_insn, btrace_call_get): Account for
10698 btrace_thread_info::functions now storing objects.
10699 * btrace.h (struct btrace_thread_info): Add constructor.
10700 (struct btrace_thread_info) <functions>: Make std::vector.
10701 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10702 Initialize with default values.
10703 * record-btrace.c (record_btrace_frame_sniffer): Account for
10704 btrace_thread_info::functions now storing objects.
10705
10706 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10707
10708 * btrace.c: Remove typedef bfun_s.
10709 (ftrace_new_gap): Directly add gaps to the list of gaps.
10710 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10711 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10712 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10713 instead of gdb VEC.
10714
10715 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10716
10717 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10718 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10719 with btrace_thread_info::next_segment and
10720 btrace_thread_info::prev_segment.
10721 * btrace.h: Remove struct btrace_func_link.
10722 (struct btrace_function): Replace pair of function segment pointers
10723 with pair of indices.
10724 * python/py-record-btrace.c (btpy_call_prev_sibling,
10725 btpy_call_next_sibling): Replace references to
10726 btrace_thread_info::segment with btrace_thread_info::next_segment and
10727 btrace_thread_info::prev_segment.
10728 * record-btrace.c (record_btrace_frame_this_id): Use
10729 btrace_find_call_by_number.
10730
10731 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10732
10733 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10734 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10735 btrace_insn_next, btrace_insn_prev): Remove references to
10736 btrace_thread_info::flow.
10737 * btrace.h (struct btrace_function): Remove FLOW.
10738
10739 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10740
10741 * btrace.c (ftrace_find_call_by_number): New function.
10742 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10743 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10744 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10745 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10746 index.
10747 * btrace.h (struct btrace_function): Turn UP into an index.
10748 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10749 as an index.
10750 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10751 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10752 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10753
10754 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10755
10756 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10757 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10758 ftrace_update_function, ftrace_compute_global_level_offset,
10759 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10760 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10761 btrace_insn_end, btrace_is_empty): Remove references to
10762 btrace_thread_info::begin and btrace_thread_info::end.
10763 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10764 (struct btrace_thread_info) <functions>: Adjust comment.
10765 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10766 btrace_thread_info::begin.
10767
10768 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10769
10770 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10771 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10772 ftrace_update_function): Remove arguments that implicitly were always
10773 BTINFO->END.
10774 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10775 Don't pass BTINFO->END.
10776
10777 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10778
10779 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10780 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10781 btrace_find_insn_by_number): Replace function segment pointer with
10782 index.
10783 (btrace_insn_cmp): Simplify.
10784 * btrace.h: (struct btrace_insn_iterator) Rename index to
10785 insn_index. Replace function segment pointer with index into function
10786 segment vector.
10787 * record-btrace.c (record_btrace_call_history): Replace function
10788 segment pointer use with index.
10789 (record_btrace_frame_sniffer): Retrieve function call segment through
10790 vector.
10791 (record_btrace_set_replay): Remove defunc't safety check.
10792
10793 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10794
10795 * btrace.c (btrace_ends_with_single_insn): New function.
10796 (btrace_call_get, btrace_call_number, btrace_call_begin,
10797 btrace_call_end, btrace_call_next, btrace_call_prev,
10798 btrace_find_call_by_number): Use index into call segment vector
10799 instead of pointer.
10800 (btrace_call_cmp): Simplify.
10801 * btrace.h (struct btrace_call_iterator): Replace function call segment
10802 pointer with index into vector.
10803 * record-btrace.c (record_btrace_call_history): Use index instead of
10804 pointer.
10805
10806 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10807
10808 * btrace.c (btrace_insn_begin, btrace_insn_end,
10809 btrace_find_insn_by_number): Add btinfo to iterator.
10810 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10811
10812 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10813
10814 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10815 and save pointers directly.
10816 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10817 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10818 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10819 changed signature of functions.
10820 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10821 (btrace_fetch): Remove code that adds btrace_function pointers to
10822 vector of btrace_functions.
10823 (btrace_clear): Simplify freeing vector of btrace_functions.
10824
10825 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10826
10827 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10828 Replace VEC_* with std::vector functions.
10829 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10830 (struct btrace_thread_info)<functions>: Change type to std::vector.
10831
10832 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10833
10834 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10835 "Removed targets and native configurations" up. Merge duplicate
10836 "New commands" sub-sections. Add "New options" sub-sections.
10837
10838 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10839
10840 * defs.h (copy_integer_to_size): New declaration.
10841 * findvar.c (copy_integer_to_size): New function.
10842 (do_cint_test): New selftest function.
10843 (copy_integer_to_size_test): Likewise.
10844 (_initialize_findvar): Likewise.
10845 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10846 (mips_fbsd_collect_reg): Use raw_collect_integer.
10847 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10848 (mips64_fill_gregset): Use raw_collect_integer
10849 (mips64_fill_fpregset): Use raw_supply_integer.
10850 * regcache.c (regcache::raw_supply_integer): New function.
10851 (regcache::raw_collect_integer): Likewise.
10852 * regcache.h: (regcache::raw_supply_integer): New declaration.
10853 (regcache::raw_collect_integer): Likewise.
10854
10855 2017-05-24 Yao Qi <yao.qi@linaro.org>
10856
10857 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10858 (COMMON_OBS): Add gdbarch-selftests.o.
10859 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10860 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10861 * gdbarch-selftests.c: New file.
10862 * regcache.h (regcache) <~regcache>: Mark it virtual if
10863 GDB_SELF_TEST.
10864 <raw_write>: Likewise.
10865
10866 2017-05-24 Yao Qi <yao.qi@linaro.org>
10867
10868 * regcache.c (current_regcache): Change it to
10869 regcache::current_regcache.
10870 (regcache_observer_target_changed): Update.
10871 (regcache_thread_ptid_changed): Make it a regcache static
10872 method.
10873 (regcache_thread_ptid_changed): Update.
10874 (class regcache_access): New.
10875 (current_regcache_test): Update.
10876 (_initialize_regcache): Update.
10877 * regcache.h: Include forward_list.
10878 (regcache): Declare regcache_thread_ptid_changed and declare
10879 registers_changed_ptid as friend.
10880
10881 2017-05-24 Yao Qi <yao.qi@linaro.org>
10882
10883 * i387-tdep.c (i387_register_to_value): Use register_size
10884 instead of TYPE_LENGTH.
10885 * m68k-tdep.c (m68k_register_to_value): Likewise.
10886
10887 2017-05-24 Yao Qi <yao.qi@linaro.org>
10888
10889 * i387-tdep.c (i387_convert_register_p): Return false if type
10890 code isn't TYPE_CODE_FLT.
10891
10892 2017-05-24 Yao Qi <yao.qi@linaro.org>
10893
10894 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10895 length is 4.
10896 (alpha_register_to_value): Remove type length check.
10897 (alpha_value_to_register): Likewise.
10898
10899 2017-05-24 Yao Qi <yao.qi@linaro.org>
10900
10901 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10902 TYPE_CODE_FLT.
10903
10904 2017-05-24 Yao Qi <yao.qi@linaro.org>
10905
10906 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10907 TYPE_CODE_FLT or not.
10908
10909 2017-05-24 Yao Qi <yao.qi@linaro.org>
10910
10911 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10912 * avr-tdep.c (avr_gdbarch_init): Likewise.
10913 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10914 * cris-tdep.c (cris_gdbarch_init): Likewise.
10915 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10916 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10917 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10918 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10919 * mep-tdep.c (mep_gdbarch_init): Likewise.
10920 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10921 * mips-tdep.c (mips_gdbarch_init): Likewise.
10922 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10923 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10924 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10925 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10926 * v850-tdep.c (v850_gdbarch_init): Likewise.
10927
10928 2017-05-24 Yao Qi <yao.qi@linaro.org>
10929
10930 * selftest-arch.c (tests_with_arch): Call registers_changed
10931 and reinit_frame_cache.
10932 * selftest.c (run_self_tests): Likewise.
10933
10934 2017-05-24 Yao Qi <yao.qi@linaro.org>
10935
10936 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10937 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10938
10939 2017-05-24 Yao Qi <yao.qi@linaro.org>
10940
10941 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10942 set_gdbarch_print_insn.
10943
10944 2017-05-24 Yao Qi <yao.qi@linaro.org>
10945
10946 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10947 set_gdbarch_print_insn.
10948
10949 2017-05-24 Yao Qi <yao.qi@linaro.org>
10950
10951 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10952 set_gdbarch_print_insn.
10953 * arc-tdep.c (arc_gdbarch_init): Likewise.
10954 * arch-utils.c: include dis-asm.h.
10955 (default_print_insn): New function.
10956 * arch-utils.h (default_print_insn): Declare.
10957 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10958 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10959 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10960 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10961 * frv-tdep.c (frv_gdbarch_init): Likewise.
10962 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10963 * gdbarch.sh (print_insn): Use default_print_insn.
10964 * gdbarch.c: Regenerated.
10965 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10966 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10967 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10968 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10969 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10970 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10971 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10972 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10973 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10974 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10975 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10976 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10977 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10978 * mt-tdep.c (mt_gdbarch_init): Likewise.
10979 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10980 * nios2-tdep.c (nios2_print_insn): Remove.
10981 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10982 * rx-tdep.c (rx_gdbarch_init): Likewise.
10983 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10984 * score-tdep.c (score_print_insn): Remove.
10985 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10986 * sh-tdep.c (sh_gdbarch_init): Likewise.
10987 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10988 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10989 * tic6x-tdep.c (tic6x_print_insn): Remove.
10990 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10991 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10992 * v850-tdep.c (v850_gdbarch_init): Likewise.
10993 * vax-tdep.c (vax_gdbarch_init): Likewise.
10994 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10995 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10996
10997 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10998
10999 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11000 (MIPS_FP0_REGNUM): Remove.
11001 (MIPS_FSR_REGNUM): Remove.
11002 (mips_fbsd_supply_fpregs): Use mips_regnum.
11003 (mips_fbsd_supply_gregs): Likewise.
11004 (mips_fbsd_collect_fpregs): Likewise.
11005 (mips_fbsd_collect_gregs): Likewise.
11006
11007 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11008
11009 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11010 (getpfpregs_supplies): New function.
11011 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11012 getfpregs_supplies.
11013 (mips_fbsd_store_inferior_registers): Likewise.
11014
11015 2017-05-22 Pedro Alves <palves@redhat.com>
11016
11017 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11018 maintainer.
11019
11020 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11021
11022 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11023 (store_register): Likewise.
11024 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11025 (get_decimal_float_return_value): Likewise.
11026 (do_ppc_sysv_return_value): Likewise.
11027 (ppc64_sysv_abi_push_integer): Likewise.
11028 (ppc64_sysv_abi_push_freg): Likewise.
11029 (ppc64_sysv_abi_return_value_base): Likewise.
11030 (ppc64_sysv_abi_return_value): Likewise.
11031 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11032 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11033 * rs6000-nat.c: Likewise.
11034 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11035 (rs6000_value_to_register): Likewise.
11036 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11037
11038 2017-05-21 Tom Tromey <tom@tromey.com>
11039
11040 PR rust/21466:
11041 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11042 arrays as "[T]", not "[T; ]".
11043
11044 2017-05-19 Tom Tromey <tom@tromey.com>
11045
11046 PR rust/21484:
11047 * rust-lang.c (exp_descriptor_rust): New function.
11048 (rust_language_defn): Use it.
11049 * p-lang.c (pascal_language_defn): Update.
11050 * opencl-lang.c (opencl_language_defn): Update.
11051 * objc-lang.c (objc_language_defn): Update.
11052 * m2-lang.c (m2_language_defn): Update.
11053 * language.h (struct language_defn)
11054 <la_watch_location_expression>: New member.
11055 * language.c (unknown_language_defn, auto_language_defn)
11056 (local_language_defn): Update.
11057 * go-lang.c (go_language_defn): Update.
11058 * f-lang.c (f_language_defn): Update.
11059 * d-lang.c (d_language_defn): Update.
11060 * c-lang.h (c_watch_location_expression): Declare.
11061 * c-lang.c (c_watch_location_expression): New function.
11062 (c_language_defn, cplus_language_defn, asm_language_defn)
11063 (minimal_language_defn): Use it.
11064 * breakpoint.c (watch_command_1): Call
11065 la_watch_location_expression.
11066 * ada-lang.c (ada_language_defn): Update.
11067
11068 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11069
11070 PR tui/21482
11071 * gdb_curses.h (NOMACROS): Define.
11072 (NCURSES_NOMACROS): Define.
11073
11074 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11075
11076 PR tui/21482
11077 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11078 arg to char *.
11079 * tui/tui-wingeneral.c (box_win): Likewise.
11080 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11081 (tui_show_source_line): Likewise.
11082 (tui_show_exec_info_content): Likewise.
11083
11084 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11085
11086 * sparc-tdep.c (sparc_structure_return_p)
11087 (sparc_arg_on_registers_p): New functions.
11088 (sparc32_store_arguments): Use them.
11089 * sparc64-tdep.c (sparc64_16_byte_align_p)
11090 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11091 Handle TYPE_CODE_ARRAY.
11092
11093 2017-05-17 Yao Qi <yao.qi@linaro.org>
11094
11095 * cli/cli-decode.c (add_alias_cmd): New function.
11096 * command.h (add_alias_cmd): Declare.
11097 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11098 instead call add_alias_cmd.
11099
11100 2017-05-17 Pedro Alves <palves@redhat.com>
11101
11102 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11103 (nat_makefile_frag): ... this. All references updated.
11104 * configure.ac: Likewise.
11105 * configure.nat: Likewise. Enhance comments.
11106 * configure: Regenerate.
11107
11108 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11109
11110 * procfs.c (procfs_create_inferior): Change prototype to match
11111 definition.
11112
11113 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11114
11115 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11116 C++ compiler warning.
11117
11118 2017-05-12 Tom Tromey <tom@tromey.com>
11119
11120 PR rust/21483:
11121 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11122 recurse, just call value_struct_elt directly.
11123
11124 2017-05-12 Tom Tromey <tom@tromey.com>
11125
11126 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11127 OP_RUST_ARRAY>: Fix.
11128
11129 2017-05-12 Tom Tromey <tom@tromey.com>
11130
11131 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11132
11133 2017-05-09 Yao Qi <yao.qi@linaro.org>
11134
11135 * regcache.c: Include <forward_list>.
11136 (struct regcache_list): Remove.
11137 (current_regcache): Update.
11138 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11139 (regcache_thread_ptid_changed): Likewise.
11140 (registers_changed_ptid): Likewise.
11141 (current_regcache_size): Likewise.
11142
11143 2017-05-09 Yao Qi <yao.qi@linaro.org>
11144
11145 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11146 (current_regcache_size): New function.
11147 (current_regcache_test): New function.
11148 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11149
11150 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11151
11152 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11153 (print_gp_register_row): Use get_frame_register_value.
11154
11155 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11156
11157 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11158 (mips_supply_fpregset): Likewise.
11159 (mips64_supply_gregset): Likewise.
11160
11161 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11162
11163 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11164 regcache->raw_supply_zeroed.
11165
11166 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11167
11168 * configure.nat: Rearrange 'case' statements to match
11169 host before cpu.
11170
11171 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11172
11173 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11174 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11175 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11176 "@nat_extra_makefile_frag@".
11177 (Makefile): Remove dependency on "@frags@".
11178 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11179 (data-directory/Makefile): Likewise.
11180 * config/aarch64/linux.mh: Deleted; moved contents to
11181 "gdb/configure.nat".
11182 * config/alpha/alpha-linux.mh: Likewise.
11183 * config/alpha/nbsd.mh: Likewise.
11184 * config/arm/linux.mh: Likewise.
11185 * config/arm/nbsdelf.mh: Likewise.
11186 * config/i386/cygwin.mh: Likewise.
11187 * config/i386/cygwin64.mh: Likewise.
11188 * config/i386/darwin.mh: Likewise.
11189 * config/i386/fbsd.mh: Likewise.
11190 * config/i386/fbsd64.mh: Likewise.
11191 * config/i386/go32.mh: Likewise.
11192 * config/i386/i386gnu.mh: Likewise.
11193 * config/i386/i386sol2.mh: Likewise.
11194 * config/i386/linux.mh: Likewise.
11195 * config/i386/linux64.mh: Likewise.
11196 * config/i386/mingw.mh: Likewise.
11197 * config/i386/mingw64.mh: Likewise.
11198 * config/i386/nbsd64.mh: Likewise.
11199 * config/i386/nbsdelf.mh: Likewise.
11200 * config/i386/nto.mh: Likewise.
11201 * config/i386/obsd.mh: Likewise.
11202 * config/i386/obsd64.mh: Likewise.
11203 * config/i386/sol2-64.mh: Likewise.
11204 * config/ia64/linux.mh: Likewise.
11205 * config/m32r/linux.mh: Likewise.
11206 * config/m68k/linux.mh: Likewise.
11207 * config/m68k/nbsdelf.mh: Likewise.
11208 * config/m68k/obsd.mh: Likewise.
11209 * config/m88k/obsd.mh: Likewise.
11210 * config/mips/fbsd.mh: Likewise.
11211 * config/mips/linux.mh: Likewise.
11212 * config/mips/nbsd.mh: Likewise.
11213 * config/mips/obsd64.mh: Likewise.
11214 * config/pa/linux.mh: Likewise.
11215 * config/pa/nbsd.mh: Likewise.
11216 * config/pa/obsd.mh: Likewise.
11217 * config/powerpc/aix.mh: Likewise.
11218 * config/powerpc/fbsd.mh: Likewise.
11219 * config/powerpc/linux.mh: Likewise.
11220 * config/powerpc/nbsd.mh: Likewise.
11221 * config/powerpc/obsd.mh: Likewise.
11222 * config/powerpc/ppc64-linux.mh: Likewise.
11223 * config/powerpc/spu-linux.mh: Likewise.
11224 * config/s390/linux.mh: Likewise.
11225 * config/sh/nbsd.mh: Likewise.
11226 * config/sparc/fbsd.mh: Likewise.
11227 * config/sparc/linux.mh: Likewise.
11228 * config/sparc/linux64.mh: Likewise.
11229 * config/sparc/nbsd64.mh: Likewise.
11230 * config/sparc/nbsdelf.mh: Likewise.
11231 * config/sparc/obsd64.mh: Likewise.
11232 * config/sparc/sol2.mh: Likewise.
11233 * config/tilegx/linux.mh: Likewise.
11234 * config/vax/nbsdelf.mh: Likewise.
11235 * config/vax/obsd.mh: Likewise.
11236 * config/xtensa/linux.mh: Likewise.
11237 * config/i386/i386gnu.mn: New file, with excerpts from
11238 "config/i386/i386gnu.mh".
11239 * configure: Regenerate.
11240 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11241 *.mh files under "gdb/config".
11242 * configure.nat: New file, with contents from the
11243 "gdb/config/*/*.mh" files.
11244
11245 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11246
11247 * btrace.c (btrace_clear): Free insn vector.
11248
11249 2017-05-05 Pedro Alves <palves@redhat.com>
11250
11251 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11252 * configure: Regenerate.
11253
11254 2017-05-04 Pedro Alves <palves@redhat.com>
11255
11256 * Makefile.in (SFILES): Add progspace-and-thread.c.
11257 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11258 (COMMON_OBS): Add progspace-and-thread.o.
11259 * breakpoint.c: Include "progspace-and-thread.h".
11260 (update_inserted_breakpoint_locations)
11261 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11262 Use scoped_restore_current_pspace_and_thread.
11263 (create_std_terminate_master_breakpoint): Use
11264 scoped_restore_current_program_space.
11265 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11266 (print_breakpoint_location): Use
11267 scoped_restore_current_program_space.
11268 (bp_loc_is_permanent): Use
11269 scoped_restore_current_pspace_and_thread.
11270 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11271 (download_tracepoint_locations): Use
11272 scoped_restore_current_pspace_and_thread.
11273 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11274 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11275 (enum step_over_calls_kind): Moved from inferior.h.
11276 (class scoped_restore_current_thread): New class.
11277 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11278 declaration.
11279 (scoped_restore_current_thread): New class.
11280 * infcmd.c: Include "common/gdb_optional.h".
11281 (continue_1, proceed_after_attach): Use
11282 scoped_restore_current_thread.
11283 (notice_new_inferior): Use scoped_restore_current_thread.
11284 * inferior.c: Include "progspace-and-thread.h".
11285 (restore_inferior, save_current_inferior): Delete.
11286 (add_inferior_command, clone_inferior_command): Use
11287 scoped_restore_current_pspace_and_thread.
11288 * inferior.h (scoped_restore_current_inferior): New class.
11289 * infrun.c: Include "progspace-and-thread.h" and
11290 "common/gdb_optional.h".
11291 (follow_fork_inferior): Use
11292 scoped_restore_current_pspace_and_thread.
11293 (scoped_restore_exited_inferior): New class.
11294 (handle_vfork_child_exec_or_exit): Use
11295 scoped_restore_exited_inferior,
11296 scoped_restore_current_pspace_and_thread,
11297 scoped_restore_current_thread and scoped_restore.
11298 (fetch_inferior_event): Use scoped_restore_current_thread.
11299 * linespec.c (decode_line_full, decode_line_1): Use
11300 scoped_restore_current_program_space.
11301 * mi/mi-main.c: Include "progspace-and-thread.h".
11302 (exec_continue): Use scoped_restore_current_thread.
11303 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11304 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11305 * proc-service.c (ps_pglobal_lookup): Use
11306 scoped_restore_current_program_space.
11307 * progspace-and-thread.c: New file.
11308 * progspace-and-thread.h: New file.
11309 * progspace.c (release_program_space, clone_program_space): Use
11310 scoped_restore_current_program_space.
11311 (restore_program_space, save_current_program_space)
11312 (save_current_space_and_thread): Delete.
11313 (switch_to_program_space_and_thread): Moved to
11314 progspace-and-thread.c.
11315 * progspace.h (save_current_program_space)
11316 (save_current_space_and_thread): Delete declarations.
11317 (scoped_restore_current_program_space): New class.
11318 * remote.c (remote_btrace_maybe_reopen): Use
11319 scoped_restore_current_thread.
11320 * symtab.c: Include "progspace-and-thread.h".
11321 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11322 * thread.c (print_thread_info_1): Use
11323 scoped_restore_current_thread.
11324 (struct current_thread_cleanup): Delete.
11325 (do_restore_current_thread_cleanup)
11326 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11327 (scoped_restore_current_thread::~scoped_restore_current_thread):
11328 ... this new dtor.
11329 (make_cleanup_restore_current_thread): Rename/convert to ...
11330 (scoped_restore_current_thread::scoped_restore_current_thread):
11331 ... this new ctor.
11332 (thread_apply_all_command): Use scoped_restore_current_thread.
11333 (thread_apply_command): Use scoped_restore_current_thread.
11334 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11335 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11336
11337 2017-05-04 Pedro Alves <palves@redhat.com>
11338
11339 * thread.c (make_cleanup_restore_current_thread): Move
11340 find_thread_ptid call before the is_stopped call. Assert that the
11341 thread is found. Replace is_stopped call by checking the thread's
11342 state directly. Remove unnecessary NULL-thread check.
11343
11344 2017-05-04 Pedro Alves <palves@redhat.com>
11345
11346 * corelow.c (thread_section_name): New class.
11347 (get_core_register_section, get_core_siginfo): Use it.
11348
11349 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11350
11351 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11352 (get_core_register_section): Remove xfree of NULL pointer.
11353
11354 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11355
11356 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11357 * regcache.c (regcache::raw_supply_zeroed): New function.
11358 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11359
11360 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11361
11362 * gdbarch.sh: Remove commented out definition of
11363 TARGET_CHAR_BIT.
11364 * gdbarch.h: Re-generate.
11365
11366 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11367
11368 * configure: Regenerate.
11369
11370 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11371
11372 * solib-target.c (solib_target_relocate_section_addresses):
11373 Remove num_section_bases, num_bases, segment_bases variables.
11374
11375 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11376
11377 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11378
11379 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11380
11381 * solib-target.c: Include <vector>
11382 (struct lm_info_target) <~lm_info_target>: Remove.
11383 <segment_bases, section_bases>: Change type to
11384 std::vector<CORE_ADDR>.
11385 (library_list_start_segment, library_list_start_section,
11386 library_list_end_library,
11387 solib_target_relocate_section_addresses): Adjust.
11388
11389 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11390
11391 * gdbarch.sh (software_single_step): Change return type to
11392 std::vector<CORE_ADDR>.
11393 * gdbarch.c, gdbarch.h: Re-generate.
11394 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11395 Adjust.
11396 (arm_deal_with_atomic_sequence_raw): Adjust.
11397 (thumb_get_next_pcs_raw): Adjust.
11398 (arm_get_next_pcs_raw): Adjust.
11399 (arm_get_next_pcs): Adjust.
11400 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11401 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11402 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11403 (alpha_software_single_step): Adjust.
11404 * alpha-tdep.h (alpha_software_single_step): Adjust.
11405 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11406 * arm-tdep.c (arm_software_single_step): Adjust.
11407 (arm_breakpoint_kind_from_current_state): Adjust.
11408 * arm-tdep.h (arm_software_single_step): Adjust.
11409 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11410 * cris-tdep.c (cris_software_single_step): Adjust.
11411 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11412 (micromips_deal_with_atomic_sequence): Adjust.
11413 (deal_with_atomic_sequence): Adjust.
11414 (mips_software_single_step): Adjust.
11415 * mips-tdep.h (mips_software_single_step): Adjust.
11416 * moxie-tdep.c (moxie_software_single_step): Adjust.
11417 * nios2-tdep.c (nios2_software_single_step): Adjust.
11418 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11419 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11420 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11421 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11422 * sparc-tdep.c (sparc_software_single_step): Adjust.
11423 * spu-tdep.c (spu_software_single_step): Adjust.
11424 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11425
11426 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11427
11428 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11429 * gdbarch.h: Re-generate.
11430
11431 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11432
11433 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11434 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11435 * python/py-instruction.c, python/py-instruction.h: New file.
11436 * python/py-record.c: Add py-instruction.h include.
11437 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11438 gdb.RecordInstruction.
11439 * python/python-internal.h: Add gdbpy_initialize_instruction
11440 declaration.
11441 * python/python.c (do_start_initialization): Add
11442 gdbpy_initialize_instruction.
11443
11444 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11445
11446 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11447 Remove.
11448 (btrace_func_from_recpy_func): New function.
11449 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11450 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11451 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11452 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11453 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11454 Also, use new helper functions.
11455 (btpy_list_item): Use new helper functions.
11456 (recpy_bt_function_call_history): Use new type name.
11457 (btpy_call_getset): Remove.
11458 (gdbpy_initialize_btrace): Remove code to initialize
11459 gdb.BtraceFunctionCall.
11460 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11461 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11462 recpy_bt_func_prev, recpy_bt_func_next): New export.
11463 * python/py-record.c (recpy_func_type): New static object.
11464 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11465 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11466 recpy_func_next): New function.
11467 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11468 (recpy_func_getset): New static object.
11469 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11470 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11471
11472 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11473
11474 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11475 (btpy_object, btpy_insn_type, btpy_new): Remove.
11476 (btpy_list_object): Use gdb.RecordInstruction type instead of
11477 gdb.BtraceInstruction type.
11478 (btrace_insn_from_recpy_insn): New function.
11479 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11480 btpy_new.
11481 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11482 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11483 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11484 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11485 instead of btpy_object.
11486 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11487 btpy_insn_data, btpy_insn_decode): Rename to ...
11488 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11489 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11490 recpy_bt_insn_decode): This. Also, use new helper functions.
11491 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11492 recpy_insn_type.
11493 (btpy_insn_getset): Remove.
11494 (gdbpy_initialize_btrace): Remove code to initialize
11495 gdb.BtraceInstruction. Use recpy_element_object.
11496 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11497 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11498 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11499 * python/py-record.c (recpy_insn_type): New static object.
11500 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11501 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11502 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11503 New function.
11504 (recpy_insn_getset): New static object.
11505 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11506 * python/py-record.h (recpy_element_object): New typedef.
11507 (recpy_insn_type, recpy_insn_new): New export.
11508
11509 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11510
11511 * py-record-btrace.c (btpy_insn_new): Removed.
11512 (btpy_insn_or_gap_new): New function.
11513 (btpy_insn_error): Removed.
11514 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11515 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11516 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11517 btpy_insn_or_gap_new instead of btpy_insn_new.
11518 (btpy_insn_getset): Remove btpy_insn_error.
11519 * py-record.c (recpy_gap_type): New static object.
11520 (recpy_gap_object): New typedef.
11521 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11522 recpy_gap_reason_string): New function.
11523 (recpy_gap_getset): New static object.
11524 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11525 * py-record.h (recpy_gap_new): New export.
11526
11527 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11528
11529 * python/py-record.c (recpy_ptid): Remove.
11530 (recpy_record_getset): Remove recpy_ptid.
11531
11532 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11533
11534 * btrace.c (btrace_fetch): Set inferior_ptid.
11535 * python/py-record-btrace.c: Add "py-record.h" include.
11536 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11537 recpy_bt_end, recpy_bt_instruction_history,
11538 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11539 in gdb.Record object instead of current ptid.
11540 * python/py-record.c: Include new "py-record.h" file.
11541 (recpy_record_object): Moved to py-record.h.
11542 * python/py-record.h: New file.
11543
11544 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11545
11546 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11547 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11548 indentation.
11549
11550 2017-05-01 Joel Brobecker <brobecker@adacore.com>
11551
11552 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11553 the past maintainers section.
11554
11555 2017-04-28 Yao Qi <yao.qi@linaro.org>
11556
11557 * infcmd.c (get_return_value): Use regcache ctor, and remove
11558 cleanup.
11559
11560 2017-04-28 Yao Qi <yao.qi@linaro.org>
11561 Pedro Alves <palves@redhat.com>
11562
11563 * regcache.c (regcache::regcache): New tag dispatch ctor.
11564 (do_cooked_read): Moved above.
11565 (regcache_dup): Use the tag dispatch ctor..
11566 * regcache.h (regcache): Declare ctor, delete copy ctor and
11567 assignment operator, remove friend regcache_dup.
11568
11569 2017-04-28 Yao Qi <yao.qi@linaro.org>
11570
11571 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11572 call method save instead of regcache_cpy.
11573 * regcache.h (struct regcache): Make regcache_dup a friend.
11574
11575 2017-04-28 Yao Qi <yao.qi@linaro.org>
11576
11577 * regcache.c (struct regcache): Move to regcache.h
11578 (regcache::arch): New method.
11579 (regcache_get_ptid): Update.
11580 (get_regcache_arch): Call arch method.
11581 (get_regcache_aspace): Call method aspace.
11582 (register_buffer): Change it to method.
11583 (regcache_save): Change it to regcache::save.
11584 (regcache_restore): Likewise.
11585 (regcache_cpy_no_passthrough): Remove the declaration.
11586 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11587 (regcache_cpy_no_passthrough): Change it to method
11588 cpy_no_passthrough.
11589 (regcache_register_status): Change it to method
11590 get_register_status.
11591 (regcache_invalidate): Change it to method invalidate.
11592 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11593 (regcache_raw_update): Change it to method raw_update.
11594 (regcache_raw_read): Likewise.
11595 (regcache_raw_read_signed): Likewise.
11596 (regcache_raw_read_unsigned): Likewise.
11597 (regcache_raw_write_signed): Likewise.
11598 (regcache_raw_write_unsigned): Likewise.
11599 (regcache_cooked_read): Likewise.
11600 (regcache_cooked_read_value): Likewise.
11601 (regcache_cooked_read_signed): Likewise.
11602 (regcache_cooked_read_unsigned): Likewise.
11603 (regcache_cooked_write_signed): Likewise.
11604 (regcache_cooked_write_unsigned): Likewise.
11605 (regcache_raw_set_cached_value): Likewise.
11606 (regcache_raw_write): Likewise.
11607 (regcache_cooked_write): Likewise.
11608 (regcache_xfer_part): Likewise.
11609 (regcache_raw_read_part): Likewise.
11610 (regcache_raw_write_part): Likewise.
11611 (regcache_cooked_read_part): Likewise.
11612 (regcache_cooked_write_part): Likewise.
11613 (regcache_raw_supply): Likewise.
11614 (regcache_raw_collect): Likewise.
11615 (regcache_transfer_regset): Likewise.
11616 (regcache_supply_regset): Likewise.
11617 (regcache_collect_regset): Likewise.
11618 (regcache_debug_print_register): Likewise.
11619 (enum regcache_dump_what): Move it to regcache.h.
11620 (regcache_dump): Change it to method dump.
11621 * regcache.h (enum regcache_dump_what): New.
11622 (class regcache): New.
11623 * target.c (target_fetch_registers): Call method
11624 debug_print_register.
11625 (target_store_registers): Likewise.
11626
11627 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11628
11629 * windows-nat.c (struct lm_info_windows): Initialize field.
11630 (windows_make_so): Allocate lm_info_windows with new.
11631 (windows_free_so): Free lm_info_windows with delete.
11632
11633 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11634
11635 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11636 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11637 cleanup.
11638 (darwin_free_so): Free lm_info_darwin with delete.
11639
11640 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11641
11642 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11643 <l_addr_p>: Change type to bool.
11644 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11645 (svr4_free_so): Free lm_info_svr4 with delete.
11646 (svr4_copy_library_list): Replace memcpy with call to copy
11647 constructor.
11648 (library_list_start_library, svr4_default_sos): Allocate
11649 lm_info_svr4 with new.
11650
11651 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11652
11653 * solib-target.c (struct lm_info_target): Add destructor,
11654 initialize fields.
11655 <name>: Change type to std::string.
11656 (library_list_start_library): Allocate lm_info_target with new.
11657 (solib_target_free_library_list): Free lm_info_target with
11658 delete.
11659 (solib_target_current_sos): Adapt to std::string.
11660 (solib_target_free_so): Free lm_info_target with delete.
11661
11662 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11663
11664 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11665 fields.
11666 (frv_current_sos): Allocate lm_info_frv with new.
11667 (frv_relocate_main_executable): Free lm_info_frv with delete,
11668 allocate with new.
11669 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11670
11671 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11672
11673 * solib-frv.c (struct lm_info_frv): Fix indentation.
11674
11675 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11676
11677 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11678 map field.
11679 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11680 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11681 and allocate with new.
11682 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11683
11684 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11685
11686 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11687 <filename, member_name>: Change type to std::string.
11688 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11689 (library_list_start_library): Allocate lm_info_aix with new.
11690 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11691 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11692 with copy constructor.
11693
11694 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11695
11696 * solist.h (struct lm_info): Remove.
11697 (struct lm_info_base): New class.
11698 (struct so_list) <lm_info>: Change type to lm_info_base *.
11699 * nto-tdep.c (struct lm_info): Remove.
11700 (lm_addr): Adjust.
11701 * solib-aix.c (struct lm_info): Rename to ...
11702 (struct lm_info_aix): ... this. Extend lm_info_base.
11703 (lm_info_p): Rename to ...
11704 (lm_info_aix_p): ... this, and adjust.
11705 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11706 solib_aix_parse_libraries, library_list_start_library,
11707 solib_aix_free_library_list, solib_aix_parse_libraries,
11708 solib_aix_get_library_list,
11709 solib_aix_relocate_section_addresses, solib_aix_free_so,
11710 solib_aix_get_section_offsets,
11711 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11712 Adjust.
11713 (struct solib_aix_inferior_data) <library_list>: Adjust.
11714 * solib-darwin.c (struct lm_info): Rename to ...
11715 (struct lm_info_darwin): ... this. Extend lm_info_base.
11716 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11717 * solib-dsbt.c (struct lm_info): Rename to ...
11718 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11719 (struct dsbt_info) <main_executable_lm_info): Adjust.
11720 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11721 dsbt_relocate_section_addresses): Adjust.
11722 * solib-frv.c (struct lm_info): Rename to ...
11723 (struct lm_info_frv): ... this. Extend lm_info_base.
11724 (main_executable_lm_info): Adjust.
11725 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11726 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11727 find_canonical_descriptor_in_load_object,
11728 frv_fdpic_find_canonical_descriptor): Adjust.
11729 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11730 to lm_info_svr4.
11731 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11732 svr4_clear_so, svr4_copy_library_list,
11733 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11734 svr4_current_sos, svr4_fetch_objfile_link_map,
11735 solist_update_incremental): Adjust.
11736 * solib-svr4.h (struct lm_info_svr4): Move here from
11737 solib-svr4.c.
11738 * solib-target.c (struct lm_info): Rename to ...
11739 (struct lm_info_target): ... this. Extend lm_info_base.
11740 (lm_info_p): Rename to ...
11741 (lm_info_target_p): ... this.
11742 (solib_target_parse_libraries, library_list_start_segment,
11743 library_list_start_section, library_list_start_library,
11744 library_list_end_library, solib_target_free_library_list,
11745 solib_target_current_sos, solib_target_free_so,
11746 solib_target_relocate_section_addresses): Adjust.
11747 * windows-nat.c (struct lm_info): Rename to ...
11748 (struct lm_info_windows): ... this. Extend lm_info_base.
11749 (windows_make_so, handle_load_dll, handle_unload_dll,
11750 windows_xfer_shared_libraries): Adjust.
11751
11752 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11753
11754 * solib-darwin.c (struct darwin_so_list): Remove.
11755 (darwin_current_sos): Allocate an so_list object instead of a
11756 darwin_so_list, separately allocate an lm_info object.
11757 (darwin_free_so): Free lm_info.
11758
11759 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11760
11761 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11762 with fprintf_filtered.
11763
11764 2017-04-28 Yao Qi <yao.qi@linaro.org>
11765
11766 * regcache.c (regcache::regcache): New function.
11767 (regcache::~regcache): New function.
11768 (regcache_xmalloc_1): Remove.
11769 (regcache_xmalloc): Call new regcache.
11770 (regcache_xfree): Call delete regcache.
11771 (get_thread_arch_aspace_regcache): Call new regcache.
11772
11773 2017-04-28 Yao Qi <yao.qi@linaro.org>
11774
11775 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11776 lwp instead of ptid_get_lwp.
11777
11778 2017-04-28 Yao Qi <yao.qi@linaro.org>
11779
11780 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11781 lwp_info instead of getting from inferior_ptid.
11782
11783 2017-04-27 Keith Seitz <keiths@redhat.com>
11784
11785 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11786 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11787 (CV_CONVERSION_BADNESS): Define.
11788 (rank_one_type): Remove overly restrictive rvalue reference
11789 rank checks.
11790 Add cv-qualifier checks and subranks for type equality.
11791 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11792 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11793 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11794
11795 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11796
11797 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11798 count when creating the object.
11799
11800 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11801 Ulrich Weigand <uweigand@de.ibm.com>
11802
11803 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11804 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11805 is used in AIX.
11806 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11807 (process_xcoff_symbol): Likewise.
11808 (scan_xcoff_symtab): Likewise.
11809
11810 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11811
11812 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11813 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11814 (ia64_access_reg): Use get_frame_register_unsigned.
11815 (ia64_access_rse_reg): Likewise.
11816 (ia64_libunwind_frame_prev_register): Likewise.
11817
11818 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11819
11820 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11821 * gdbarch.c: Regenerated.
11822 * gdbarch.h: Regenerated.
11823 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11824 visibility external.
11825 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11826 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11827 (enum cfa_how_kind): Move to ...
11828 (struct dwarf2_frame_state_reg_info): Likewise.
11829 (struct dwarf2_frame_state): Likewise.
11830 * dwarf2-frame.h: ... here.
11831 (dwarf2_frame_state_alloc_regs): New declaration.
11832 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11833 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11834
11835 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11836
11837 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11838 regcache_raw_read_unsigned.
11839 (xtensa_pseudo_register_write): Likewise.
11840
11841 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11842
11843 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11844 (nds32_pseudo_register_write): Likewise.
11845
11846 2017-04-25 Yao Qi <yao.qi@linaro.org>
11847
11848 * regcache.c (struct regcache) <readonly_p>: Change its type
11849 to bool.
11850 (regcache_xmalloc_1): Update parameter type and callers update.
11851
11852 2017-04-25 Yao Qi <yao.qi@linaro.org>
11853
11854 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11855 set_gdbarch_wchar_bit.
11856 * arm-tdep.c (arm_gdbarch_init): Likewise.
11857
11858 2017-04-25 Pedro Alves <palves@redhat.com>
11859
11860 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11861 (BothAreRelocatable, memcopy, memmove): Don't define.
11862 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11863 macros.
11864
11865 2017-04-25 Pedro Alves <palves@redhat.com>
11866
11867 * common/common-defs.h: Include "common/poison.h".
11868 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11869 and adjust.
11870 * common/poison.h: New file.
11871 * common/traits.h: Include <type_traits>.
11872 (Not, Or, Requires): New, moved from common/function-view.h.
11873
11874 2017-04-25 Pedro Alves <palves@redhat.com>
11875
11876 * breakpoint.h (struct breakpoint): In-class initialize all
11877 fields. Make boolean fields "bool".
11878 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11879 memset call and initializations no longer necessary.
11880
11881 2017-04-25 Pedro Alves <palves@redhat.com>
11882
11883 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11884 reference.
11885 (pt_btrace_insn): New function.
11886 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11887
11888 2017-04-25 Pedro Alves <palves@redhat.com>
11889
11890 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11891 "base" field and inherit from "bp_location" instead. Add
11892 non-default ctor.
11893 (allocate_location_exception): Use new non-default ctor.
11894 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11895 (init_bp_location): Convert to ...
11896 (bp_location::bp_location): ... this new ctor, and remove memset
11897 call.
11898 (base_breakpoint_allocate_location): Use the new non-default ctor.
11899 * breakpoint.h (bp_location): Now a class. Declare default and
11900 non-default ctors. In-class initialize all members.
11901 (init_bp_location): Remove declaration.
11902
11903 2017-04-25 Pedro Alves <palves@redhat.com>
11904
11905 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11906 assignment operator.
11907
11908 2017-04-24 Yao Qi <yao.qi@linaro.org>
11909
11910 * doublest.c (convert_doublest_to_floatformat): Call
11911 floatformat_totalsize_bytes.
11912
11913 2017-04-22 Tom Tromey <tom@tromey.com>
11914
11915 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11916 ui_out_emit_list.
11917 * stack.c (print_frame): Use ui_out_emit_list.
11918 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11919 ui_out_emit_list.
11920 * mi/mi-main.c (print_one_inferior)
11921 (mi_cmd_data_list_register_names)
11922 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11923 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11924 ui_out_emit_list.
11925 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11926 (mi_output_solib_attribs): Use ui_out_emit_list,
11927 ui_out_emit_tuple.
11928 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11929 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11930 (mi_cmd_stack_list_args, list_args_or_locals): Use
11931 ui_out_emit_list.
11932 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11933 * breakpoint.c (print_solib_event, output_thread_groups): Use
11934 ui_out_emit_list.
11935
11936 2017-04-22 Tom Tromey <tom@tromey.com>
11937
11938 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11939 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11940 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11941
11942 2017-04-22 Tom Tromey <tom@tromey.com>
11943
11944 * tracepoint.c (tvariables_info_1)
11945 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11946
11947 2017-04-22 Tom Tromey <tom@tromey.com>
11948
11949 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11950 annotate_arg_emitter.
11951 * breakpoint.c (print_mention_watchpoint)
11952 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11953 * annotate.h (struct annotate_arg_emitter): New.
11954
11955 2017-04-22 Tom Tromey <tom@tromey.com>
11956
11957 * record-btrace.c (record_btrace_insn_history)
11958 (record_btrace_insn_history_range, record_btrace_call_history)
11959 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11960 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11961 ui_out_emit_tuple.
11962 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11963 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11964 * skip.c (skip_info): Use ui_out_emit_tuple.
11965 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11966 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11967 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11968 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11969 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11970 ui_out_emit_tuple.
11971 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11972 (output_register, mi_cmd_data_read_memory)
11973 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11974 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11975 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11976 Use ui_out_emit_tuple.
11977 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11978 ui_out_emit_tuple.
11979 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11980 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11981 * linux-thread-db.c (info_auto_load_libthread_db): Use
11982 ui_out_emit_tuple.
11983 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11984 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11985 * disasm.c (do_mixed_source_and_assembly_deprecated)
11986 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11987 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11988 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11989 * breakpoint.c (print_one_breakpoint_location)
11990 (print_one_breakpoint): Use ui_out_emit_tuple.
11991 * auto-load.c (print_script, info_auto_load_cmd): Use
11992 ui_out_emit_tuple.
11993 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11994
11995 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11996
11997 * thread.c (print_thread_info_1): Remove dead code.
11998
11999 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12000
12001 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12002 GDB_SELF_TEST.
12003 * arm-tdep.c (selftests::arm_record_test): Likewise.
12004
12005 2017-04-21 Yao Qi <yao.qi@linaro.org>
12006
12007 * regcache.c (regcache_restore): Remove argument 2. Replace
12008 argument 3 with regcache. Get register status from
12009 src->register_status and get register contents from
12010 register_buffer (src, regnum).
12011 (regcache_cpy): Update.
12012
12013 2017-04-19 Pedro Alves <palves@redhat.com>
12014
12015 * gdbthread.h (thread): Add missing closing parenthesis in
12016 comment.
12017
12018 2017-04-19 Pedro Alves <palves@redhat.com>
12019
12020 * common/refcounted-object.h: New file.
12021 * gdbthread.h: Include "common/refcounted-object.h".
12022 (thread_info): Inherit from refcounted_object and add comments.
12023 (thread_info::incref, thread_info::decref)
12024 (thread_info::m_refcount): Delete.
12025 (thread_info::deletable): Use the refcounted_object::refcount()
12026 method.
12027 * inferior.c (current_inferior_): Add comment.
12028 (set_current_inferior): Increment/decrement refcounts.
12029 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12030 not-deletable instead of comparing with the current inferior.
12031 (initialize_inferiors): Increment the initial inferior's refcount.
12032 * inferior.h (struct inferior): Forward declare.
12033 Include "common/refcounted-object.h".
12034 (current_inferior, set_current_inferior): Move declaration to
12035 before struct inferior's definition, and fix comment.
12036 (inferior): Inherit from refcounted_object. Add comments.
12037 * thread.c (switch_to_thread_no_regs): Reference the thread's
12038 inferior pointer directly instead of doing a ptid lookup.
12039 (switch_to_no_thread): New function.
12040 (switch_to_thread(thread_info *)): New function, factored out
12041 from ...
12042 (switch_to_thread(ptid_t)): ... this.
12043 (restore_current_thread): Delete.
12044 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12045 fields, and add 'inf' field.
12046 (do_restore_current_thread_cleanup): Check whether old->inf is
12047 alive instead of looking up an inferior by ptid. Use
12048 switch_to_thread and switch_to_no_thread.
12049 (restore_current_thread_cleanup_dtor): Use old->inf directly
12050 instead of lookup up an inferior by id. Decref the inferior.
12051 Don't restore 'removable'.
12052 (make_cleanup_restore_current_thread): Same the inferior pointer
12053 in old, instead of the inferior number. Incref the inferior.
12054 Don't save/clear 'removable'.
12055
12056 2017-04-19 Pedro Alves <palves@redhat.com>
12057
12058 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12059 unittests/scoped_restore-selftests.c.
12060 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12061 * common/scoped_restore.h (scoped_restore_base): Make "class".
12062 (scoped_restore_base::release): New public method.
12063 (scoped_restore_base::scoped_restore_base): New protected ctor.
12064 (scoped_restore_base::m_saved_var): New protected field.
12065 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12066 scoped_restore_base base class instead of m_saved_var directly.
12067 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12068 (scoped_restore_tmpl::scoped_restore_tmpl(const
12069 scoped_restore_tmpl<T>&)): Likewise.
12070 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12071 method.
12072 (scoped_restore_tmpl::saved_var): New method.
12073 (scoped_restore_tmpl::m_saved_var): Delete.
12074 * inferior.h (inferior::detaching): Now a bool.
12075 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12076 cleanup.
12077 * unittests/scoped_restore-selftests.c: New file.
12078
12079 2017-04-19 Pedro Alves <palves@redhat.com>
12080
12081 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12082 Re-sort in alphabetic order.
12083
12084 2017-04-18 Pedro Alves <palves@redhat.com>
12085
12086 * xml-support.c (obstack_xml_printf): Delete.
12087 * xml-support.h (obstack_xml_printf): Delete.
12088
12089 2017-04-18 Pedro Alves <palves@redhat.com>
12090
12091 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12092 vdebug, verror, body_text, start_element, end_element, name,
12093 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12094 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12095 is_xinclude>: Make private and add m_ prefix.
12096 (gdb_xml_parser::body_text): New method, based on ...
12097 (gdb_xml_body_text): ... this. Adjust.
12098 (gdb_xml_parser::vdebug): New method, based on ...
12099 (gdb_xml_debug): ... this. Adjust.
12100 (gdb_xml_parser::verror): New method, based on ...
12101 (gdb_xml_error): ... this. Adjust.
12102 (gdb_xml_parser::start_element): New method, based on ...
12103 (gdb_xml_start_element): ... this. Adjust.
12104 (gdb_xml_start_element_wrapper): Defer to
12105 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12106 (gdb_xml_parser::end_element): New method, based on ...
12107 (gdb_xml_end_element_wrapper): ... this. Adjust.
12108 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12109 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12110 (gdb_xml_parser::use_dtd): New method, based on ...
12111 (gdb_xml_use_dtd): ... this. Adjust.
12112 (gdb_xml_parser::parse): New method, based on ...
12113 (gdb_xml_parse): ... this. Adjust.
12114 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12115 (xinclude_start_include): Adjust to call the parser's name method.
12116 (xml_xinclude_default, xml_xinclude_start_doctype)
12117 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12118 method.
12119 (xml_process_xincludes): Adjust to call parser methods.
12120 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12121 declarations.
12122
12123 2017-04-18 Pedro Alves <palves@redhat.com>
12124
12125 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12126 gdb::optional<std::string>.
12127 * xml-support.c: Include <string>.
12128 (scope_level::scope_level(scope_level &&))
12129 (scope_level::~scope_level): Delete.
12130 (scope_level::body): Now a std::string.
12131 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12132 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12133 parameter.
12134 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12135 (xinclude_parsing_data::output): Now a std::string reference.
12136 (xinclude_start_include): Adjust.
12137 (xml_xinclude_default): Adjust.
12138 (xml_process_xincludes): Add 'output' parameter, and return bool.
12139 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12140 and return bool.
12141 * xml-tdesc.c: Include <unordered_map> and <string>.
12142 (tdesc_xml_cache): Delete.
12143 (tdesc_xml_cache_s): Delete.
12144 (xml_cache): Now an std::unordered_map.
12145 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12146 (target_fetch_description_xml): Change return type to
12147 gdb::optional<std::string>, and adjust.
12148 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12149 (target_fetch_description_xml): Change return type to
12150 gdb::optional<std::string>.
12151
12152 2017-04-18 Pedro Alves <palves@redhat.com>
12153
12154 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12155 unittests/optional-selftests.c.
12156 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12157 * unittests/optional-selftests.c: New file.
12158 * unittests/optional/assignment/1.cc: New file.
12159 * unittests/optional/assignment/2.cc: New file.
12160 * unittests/optional/assignment/3.cc: New file.
12161 * unittests/optional/assignment/4.cc: New file.
12162 * unittests/optional/assignment/5.cc: New file.
12163 * unittests/optional/assignment/6.cc: New file.
12164 * unittests/optional/assignment/7.cc: New file.
12165 * unittests/optional/cons/copy.cc: New file.
12166 * unittests/optional/cons/default.cc: New file.
12167 * unittests/optional/cons/move.cc: New file.
12168 * unittests/optional/cons/value.cc: New file.
12169 * unittests/optional/in_place.cc: New file.
12170 * unittests/optional/observers/1.cc: New file.
12171 * unittests/optional/observers/2.cc: New file.
12172
12173 2017-04-18 Pedro Alves <palves@redhat.com>
12174
12175 * common/gdb_optional.h: Include common/traits.h.
12176 (in_place_t): New type.
12177 (in_place): New constexpr variable.
12178 (optional::optional): Remove member initialization of
12179 m_instantiated.
12180 (optional::optional(in_place_t...)): New constructor.
12181 (optional::~optional): Use reset.
12182 (optional::optional(const optional&)): New.
12183 (optional::optional(const optional&&)): New.
12184 (optional::optional(T &)): New.
12185 (optional::optional(T &&)): New.
12186 (operator::operator=(const optional &)): New.
12187 (operator::operator=(optional &&)): New.
12188 (operator::operator= (const T &))
12189 (operator::operator= (T &&))
12190 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12191 (operator::reset): New.
12192 (operator::m_instantiated):: Add in-class initializer.
12193 * common/traits.h: Include <type_traits>.
12194 (struct And): New types.
12195
12196 2017-04-18 Pedro Alves <palves@redhat.com>
12197
12198 * xml-support.c: Include <vector>.
12199 (scope_level::scope_level(const gdb_xml_element *))
12200 (scope_level::scope_level(scope_level&&)): New.
12201 (scope_level::~scope_level): New.
12202 (scope_level_s): Delete.
12203 (gdb_xml_parser::scopes): Now a std::vector.
12204 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12205 Use std::vector.
12206 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12207 scope cleanup code.
12208 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12209 of the scopes member. Use std::vector::emplace_back.
12210
12211 2017-04-18 Pedro Alves <palves@redhat.com>
12212
12213 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12214 a bool.
12215 (gdb_xml_end_element): Change type of first parameter.
12216 (gdb_xml_cleanup): Rename to ...
12217 (gdb_xml_parser::~gdb_xml_parser): ... this.
12218 (gdb_xml_create_parser_and_cleanup): Delete with ...
12219 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12220 to this new ctor.
12221 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12222 using gdb_xml_create_parser_and_cleanup.
12223 (xinclude_parsing_data): Add ctor/dtor.
12224 (xml_xinclude_cleanup): Delete.
12225 (xml_process_xincludes): Create a local xinclude_parsing_data
12226 instead of heap-allocating one. Create a local gdb_xml_parser
12227 instead of heap-allocating one with
12228 gdb_xml_create_parser_and_cleanup.
12229
12230 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12231
12232 PR threads/20743
12233 * fbsd-nat.c (resume_one_thread_cb): Remove.
12234 (resume_all_threads_cb): Remove.
12235 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12236 iterate_over_threads.
12237
12238 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12239
12240 * NEWS: Create a new section for the next release branch.
12241 Rename the section of the current branch, now that it has
12242 been cut.
12243
12244 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12245
12246 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12247 * version.in: Bump version to 8.0.50.DATE-git.
12248
12249 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12250
12251 PR gdb/21385
12252 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12253 independently of the host, and fix build breakage on Cygwin.
12254
12255 2017-04-13 Pedro Alves <palves@redhat.com>
12256
12257 * inferior.c (free_inferior): Convert to ...
12258 (inferior::~inferior): ... this dtor.
12259 (inferior::inferior): New ctor, factored out from ...
12260 (add_inferior_silent): ... here. Allocate the inferior with a new
12261 expression.
12262 (delete_inferior): Call delete instead of free_inferior.
12263 * inferior.h (gdb_environ, continuation): Forward declare.
12264 (inferior): Now a class. Add in-class initialization to all
12265 members. Make boolean fields bool, except 'detaching'.
12266 (inferior::inferior): New explicit ctor.
12267 (inferior::~inferior): New.
12268
12269 2017-04-13 Pedro Alves <palves@redhat.com>
12270
12271 * inferior.c (init_inferior_list): Delete.
12272 * inferior.h (init_inferior_list): Delete.
12273
12274 2017-04-13 Pedro Alves <palves@redhat.com>
12275
12276 PR threads/13217
12277 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12278 (top level): Call it twice, with different thread sets.
12279
12280 2017-04-13 Pedro Alves <palves@redhat.com>
12281
12282 * thread.c: Include <algorithm>.
12283 (thread_array_cleanup): Delete.
12284 (scoped_inc_dec_ref): New class.
12285 (live_threads_count): New function.
12286 (set_thread_refcount): Delete.
12287 (tp_array_compar_ascending): Now a bool.
12288 (tp_array_compar): Convert to a std::sort comparison function.
12289 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12290 and live_threads_count.
12291
12292 2017-04-13 Pedro Alves <palves@redhat.com>
12293
12294 * infrun.c (follow_fork_inferior): Also switch the current
12295 inferior.
12296
12297 2017-04-13 Pedro Alves <palves@redhat.com>
12298
12299 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12300 before calling create_internal_breakpoint.
12301
12302 2017-04-13 Pedro Alves <palves@redhat.com>
12303
12304 * fork-child.c (execv_argv): New class.
12305 (breakup_args): Refactored as ...
12306 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12307 Copy arguments to storage and replace separators with NULL
12308 terminators in place.
12309 (escape_bang_in_quoted_argument): Adjust to return bool.
12310 (execv_argv::execv_argv): New ctor.
12311 (execv_argv::init_for_shell): New method, factored out from
12312 fork_inferior. Don't strdup strings into the vector.
12313 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12314 Remove free_vector_argv call.
12315
12316 2017-04-13 Yao Qi <yao.qi@linaro.org>
12317
12318 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12319 tdep->rx_psw_type.
12320
12321 2017-04-13 Yao Qi <yao.qi@linaro.org>
12322
12323 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12324 * rx-tdep.c (rx_gdbarch_init): Likewise.
12325
12326 2017-04-13 Pedro Alves <palves@redhat.com>
12327
12328 * breakpoint.h (struct breakpoint): Reindent.
12329
12330 2017-04-13 Pedro Alves <palves@redhat.com>
12331
12332 * breakpoint.c (bp_location): Rename to ...
12333 (bp_locations): ... this. All references updated.
12334 (bp_location_count): Rename to ...
12335 (bp_locations_count): ... this. All references updated.
12336 (bp_location_placed_address_before_address_max): Rename to ...
12337 (bp_locations_placed_address_before_address_max): ... this. All
12338 references updated.
12339 (bp_location_shadow_len_after_address_max): Rename to ...
12340 (bp_locations_shadow_len_after_address_max): ... this. All
12341 references updated.
12342 (bp_location_compare_addrs): Rename to ...
12343 (bp_locations_compare_addrs): ... this. All references updated.
12344 (bp_location_compare):Rename to ...
12345 (bp_locations_compare): ... this. All references updated.
12346 (bp_location_target_extensions_update): Rename to ...
12347 (bp_locations_target_extensions_update): ... this. All references
12348 updated.
12349
12350 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12351
12352 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12353 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12354 'sgtty.h'.
12355 * common/gdb_termios.h: New file, with parts of "terminal.h".
12356 * inflow.c: Include "gdb_termios.h".
12357 * ser-unix.c: Include "gdb_termios.h".
12358 * terminal.h: Move terminal-related defines to
12359 "common/gdb_termios.h".
12360
12361 2017-04-12 Tom Tromey <tom@tromey.com>
12362
12363 * probe.c (parse_probes): Update.
12364 * location.h (delete_event_location): Don't declare.
12365 (event_location_deleter::operator()): Update.
12366 * location.c (event_location_deleter::operator()): Rename from
12367 delete_event_location.
12368 * linespec.h (linespec_result) <location>: Change type to
12369 event_location_up.
12370 * linespec.c (canonicalize_linespec, event_location_to_sals)
12371 (decode_objc): Update.
12372 (linespec_result): Don't call delete_event_location.
12373 * breakpoint.c (create_breakpoints_sal)
12374 (bkpt_probe_create_sals_from_location)
12375 (strace_marker_create_sals_from_location): Update.
12376
12377 2017-04-12 Tom Tromey <tom@tromey.com>
12378
12379 * linespec.h (struct linespec_result): Add constructor and
12380 destructor.
12381 (init_linespec_result, destroy_linespec_result)
12382 (make_cleanup_destroy_linespec_result): Don't declare.
12383 * linespec.c (init_linespec_result): Remove.
12384 (linespec_result::~linespec_result): Rename from
12385 destroy_linespec_result. Update.
12386 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12387 Remove.
12388 * breakpoint.c (create_breakpoint, break_range_command)
12389 (decode_location_default): Update.
12390 * ax-gdb.c (agent_command_1): Update.
12391
12392 2017-04-12 Tom Tromey <tom@tromey.com>
12393
12394 * remote.c (remote_download_tracepoint): Update.
12395 * python/py-breakpoint.c (bppy_get_location): Update.
12396 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12397 (gdbscm_breakpoint_location): Update.
12398 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12399 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12400 Change type to event_location_up.
12401 * breakpoint.c (create_overlay_event_breakpoint)
12402 (create_longjmp_master_breakpoint)
12403 (create_std_terminate_master_breakpoint)
12404 (create_exception_master_breakpoint)
12405 (breakpoint_event_location_empty_p, print_breakpoint_location)
12406 (print_one_breakpoint_location, create_thread_event_breakpoint)
12407 (init_breakpoint_sal, create_breakpoint)
12408 (print_recreate_ranged_breakpoint, break_range_command)
12409 (init_ada_exception_breakpoint, say_where): Update.
12410 (base_breakpoint_dtor): Don't call delete_event_location.
12411 (bkpt_print_recreate, tracepoint_print_recreate)
12412 (dprintf_print_recreate, update_static_tracepoint)
12413 (breakpoint_re_set_default): Update.
12414
12415 2017-04-12 Tom Tromey <tom@tromey.com>
12416
12417 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12418 type of "to_do". Update.
12419 (compute_stack_depth): Use std::vector.
12420
12421 2017-04-12 Tom Tromey <tom@tromey.com>
12422
12423 * printcmd.c (find_instruction_backward): Use std::vector.
12424
12425 2017-04-12 Tom Tromey <tom@tromey.com>
12426
12427 * symfile.c (objfilep): Remove typedef.
12428 (reread_symbols): Use a std::vector.
12429
12430 2017-04-12 Tom Tromey <tom@tromey.com>
12431
12432 * mi/mi-main.c (exec_direction_forward): Remove.
12433 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12434 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12435 scoped_restore.
12436 * guile/guile.c (guile_repl_command, guile_command)
12437 (gdbscm_execute_gdb_command): Use scoped_restore.
12438 * go-exp.y (go_parse): Use scoped_restore.
12439 * d-exp.y (d_parse): Use scoped_restore.
12440 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12441 * c-exp.y (c_parse): Use scoped_restore.
12442
12443 2017-04-12 Tom Tromey <tom@tromey.com>
12444
12445 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12446 (mi_parse): Update return type.
12447 (mi_parse_free): Remove.
12448 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12449 (mi_parse::~mi_parse): Rename from mi_parse_free.
12450 (mi_parse_cleanup): Remove.
12451 (mi_parse): Return a unique_ptr. Use new.
12452 * mi/mi-main.c (mi_execute_command): Update.
12453
12454 2017-04-12 Tom Tromey <tom@tromey.com>
12455
12456 * location.c (explicit_location_lex_one): Return a
12457 unique_xmalloc_ptr.
12458 (string_to_explicit_location): Update. Remove cleanups.
12459
12460 2017-04-12 Tom Tromey <tom@tromey.com>
12461
12462 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12463 (compare_value_and_voffset): Change type. Update.
12464 (compute_vtable_size): Change type of "offset_vec".
12465 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12466 (gnuv3_get_typeid): Remove extraneous declaration.
12467
12468 2017-04-12 Tom Tromey <tom@tromey.com>
12469
12470 * charset.h (wchar_iterator): Fix comment.
12471
12472 2017-04-12 Tom Tromey <tom@tromey.com>
12473
12474 * charset.c (iconv_wrapper): New class.
12475 (cleanup_iconv): Remove.
12476 (convert_between_encodings): Use it.
12477
12478 2017-04-12 Tom Tromey <tom@tromey.com>
12479
12480 * symfile.h (increment_reading_symtab): Update type.
12481 * symfile.c (decrement_reading_symtab): Remove.
12482 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12483 * psymtab.c (psymtab_to_symtab): Update.
12484 * dwarf2read.c (dw2_instantiate_symtab): Update.
12485
12486 2017-04-12 Tom Tromey <tom@tromey.com>
12487
12488 * jit.c (struct jit_reader): Declare separately. Add constructor
12489 and destructor. Change type of "handle".
12490 (loaded_jit_reader): Define separately.
12491 (jit_reader_load): Update. New "new".
12492 (jit_reader_unload_command): Use "delete".
12493 * gdb-dlfcn.h (struct dlclose_deleter): New.
12494 (gdb_dlhandle_up): New typedef.
12495 (gdb_dlopen, gdb_dlsym): Update types.
12496 (gdb_dlclose): Remove.
12497 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12498 (gdb_dlsym): Change type of "handle".
12499 (make_cleanup_dlclose): Remove.
12500 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12501 * compile/compile-c-support.c (load_libcc): Update.
12502
12503 2017-04-12 Tom Tromey <tom@tromey.com>
12504
12505 * symtab.h (find_pcs_for_symtab_line): Change return type.
12506 * symtab.c (find_pcs_for_symtab_line): Change return type.
12507 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12508 type of "vec". Update.
12509 (ltpy_get_pcs_for_line): Update.
12510 * linespec.c (decode_digits_ordinary): Update.
12511
12512 2017-04-12 Tom Tromey <tom@tromey.com>
12513
12514 * tracepoint.c (actions_command): Update.
12515 * python/python.c (python_command, python_interactive_command):
12516 Update.
12517 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12518 * guile/guile.c (guile_command): Update.
12519 * defs.h (read_command_lines, read_command_lines_1): Return
12520 command_line_up.
12521 (command_lines_deleter): New struct.
12522 (command_line_up): New typedef.
12523 * compile/compile.c (compile_code_command)
12524 (compile_print_command): Update.
12525 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12526 command_line_up.
12527 (make_cleanup_free_command_lines): Remove.
12528 * cli/cli-script.c (get_command_line, read_command_lines_1)
12529 (copy_command_lines): Return command_line_up.
12530 (while_command, if_command, read_command_lines, define_command)
12531 (document_command): Update.
12532 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12533 Remove.
12534 * breakpoint.h (breakpoint_set_commands): Change type of
12535 "commands".
12536 * breakpoint.c (breakpoint_set_commands): Change type of
12537 "commands". Update.
12538 (do_map_commands_command, update_dprintf_command_list)
12539 (create_tracepoint_from_upload): Update.
12540
12541 2017-04-12 Tom Tromey <tom@tromey.com>
12542
12543 * tracepoint.c (scope_info): Update.
12544 * spu-tdep.c (spu_catch_start): Update.
12545 * python/python.c (gdbpy_decode_line): Update.
12546 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12547 * python/py-breakpoint.c (bppy_init): Update.
12548 * probe.c (parse_probes): Update.
12549 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12550 * location.h (event_location_deleter): New struct.
12551 (event_location_up): New typedef.
12552 (new_linespec_location, new_address_location, new_probe_location)
12553 (new_explicit_location, copy_event_location)
12554 (string_to_event_location, string_to_event_location_basic)
12555 (string_to_explicit_location): Update return type.
12556 (make_cleanup_delete_event_location): Remove.
12557 * location.c (new_linespec_location, new_address_location)
12558 (new_probe_location, new_explicit_location, copy_event_location):
12559 Return event_location_up.
12560 (delete_event_location_cleanup)
12561 (make_cleanup_delete_event_location): Remove.
12562 (string_to_explicit_location, string_to_event_location_basic)
12563 (string_to_event_location): Return event_location_up.
12564 * linespec.c (canonicalize_linespec, event_location_to_sals)
12565 (decode_line_with_current_source)
12566 (decode_line_with_last_displayed, decode_objc): Update.
12567 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12568 * completer.c (location_completer): Update.
12569 * cli/cli-cmds.c (edit_command, list_command): Update.
12570 * breakpoint.c (create_overlay_event_breakpoint)
12571 (create_longjmp_master_breakpoint)
12572 (create_std_terminate_master_breakpoint)
12573 (create_exception_master_breakpoint)
12574 (create_thread_event_breakpoint): Update.
12575 (init_breakpoint_sal): Update. Remove some dead code.
12576 (create_breakpoint_sal): Change type of "location". Update.
12577 (create_breakpoints_sal, create_breakpoint, break_command_1)
12578 (dprintf_command, break_range_command, until_break_command)
12579 (init_ada_exception_breakpoint)
12580 (strace_marker_create_sals_from_location)
12581 (update_static_tracepoint, trace_command, ftrace_command)
12582 (strace_command, create_tracepoint_from_upload): Update.
12583 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12584 * ax-gdb.c (agent_command_1): Update.
12585
12586 2017-04-12 Pedro Alves <palves@redhat.com>
12587
12588 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12589 * configure.tgt: Handle i[34567]86-*-go32* and
12590 i[34567]86-*-msdosdjgpp*.
12591 * i386-tdep.c (i386_svr4_reg_to_regnum):
12592 Make extern.
12593 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12594 i386-go32-tdep.c.
12595 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12596 * i386-go32-tdep.c: New file.
12597 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12598 declarations.
12599
12600 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12601
12602 * aix-thread.c (pd_status2str): Change return type to const char *.
12603
12604 2017-04-12 Pedro Alves <palves@redhat.com>
12605
12606 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12607 calls to set_gdbarch_gnu_triplet_regexp.
12608
12609 2017-04-12 Pedro Alves <palves@redhat.com>
12610
12611 PR gdb/21323
12612 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12613 New enum value.
12614 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12615 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12616 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12617 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12618 * gdbarch.h, gdbarch.c: Regenerate.
12619 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12620 gdbarch_wchar_bit and gdbarch_wchar_signed.
12621 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12622 * arm-tdep.c (arm_gdbarch_init): Likewise.
12623 * avr-tdep.c (avr_gdbarch_init): Likewise.
12624 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12625 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12626 * i386-tdep.c (i386_go32_init_abi): Likewise.
12627 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12628 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12629 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12630 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12631 * sh-tdep.c (sh_gdbarch_init): Likewise.
12632 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12633 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12634 * windows-tdep.c (windows_init_abi): Likewise.
12635 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12636
12637 2017-04-12 Pedro Alves <palves@redhat.com>
12638
12639 PR c++/21323
12640 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12641 cplus_primitive_type_char32_t>: New enum values.
12642 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12643 and cplus_primitive_type_char32_t.
12644 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12645 32, use the archtecture's built-in type for char16_t and char32_t,
12646 respectively. Otherwise, fallback to init_integer_type as before,
12647 but make the type unsigned, and issue a complaint.
12648 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12649
12650 2017-04-12 Alan Hayward <alan.hayward@arm.com>
12651
12652 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12653 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12654
12655 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12656
12657 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12658 'const char *'.
12659
12660 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12661
12662 * common/common-utils.c (free_vector_argv): New function.
12663 * common/common-utils.h: Include <vector>.
12664 (free_vector_argv): New prototype.
12665 * darwin-nat.c (darwin_create_inferior): Rewrite function
12666 prototype in order to constify "exec_file" and accept a
12667 "std::string" for "allargs".
12668 * fork-child.c: Include <vector>.
12669 (breakup_args): Rewrite function, using C++.
12670 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12671 and accept "std::string" for "allargs". Update the code to
12672 calculate "argv" based on "allargs". Update calls to "exec_fun"
12673 and "execvp".
12674 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12675 order to constify "exec_file" and accept a "std::string" for
12676 "allargs".
12677 * go32-nat.c (go32_create_inferior): Likewise.
12678 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12679 * infcmd.c (run_command_1): Constify "exec_file". Use
12680 "std::string" for inferior arguments.
12681 * inferior.h (fork_inferior): Update prototype.
12682 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12683 prototype in order to constify "exec_file" and accept a
12684 "std::string" for "allargs".
12685 * nto-procfs.c (procfs_create_inferior): Likewise.
12686 * procfs.c (procfs_create_inferior): Likewise.
12687 * remote-sim.c (gdbsim_create_inferior): Likewise.
12688 * remote.c (extended_remote_run): Update code to accept
12689 "std::string" as argument.
12690 (extended_remote_create_inferior): Rewrite function prototype in
12691 order to constify "exec_file" and accept a "std::string" for
12692 "allargs".
12693 * rs6000-nat.c (super_create_inferior): Likewise.
12694 (rs6000_create_inferior): Likewise.
12695 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12696 * windows-nat.c (windows_create_inferior): Likewise.
12697
12698 2017-04-11 Pedro Alves <palves@redhat.com>
12699
12700 * thread.c: Fix whitespace throughout.
12701
12702 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12703
12704 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12705
12706 2017-04-11 Alan Hayward <alan.hayward@arm.com>
12707
12708 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12709
12710 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12711
12712 PR gdb/21364
12713 * osdata.c (info_osdata): Check if 'type' is an empty string
12714 instead of NULL.
12715
12716 2017-04-10 Pedro Alves <palves@redhat.com>
12717
12718 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12719 (ptid_to_global_thread_id, in_thread_list)
12720 (do_captured_list_thread_ids, set_resumed, set_running)
12721 (set_executing, set_stop_requested, finish_thread_state)
12722 (validate_registers_access, can_access_registers_ptid)
12723 (print_thread_info_1, switch_to_thread)
12724 (do_restore_current_thread_cleanup)
12725 (make_cleanup_restore_current_thread, thread_command)
12726 (thread_name_command): Use operator== instead of ptid_equal.
12727
12728 2017-04-10 Pedro Alves <palves@redhat.com>
12729
12730 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12731 (current_thread_cleanup_chain): Delete.
12732 (restore_current_thread_cleanup_dtor)
12733 (make_cleanup_restore_current_thread): Remove references to
12734 current_thread_cleanup_chain.
12735
12736 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12737
12738 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12739 REG_UNKNOWN.
12740
12741 2017-04-10 Yao Qi <yao.qi@linaro.org>
12742
12743 PR gdb/19942
12744 * gdbthread.h (thread_info::deletable): New method.
12745 (thread_info::incref): New method.
12746 (thread_info::decref): New method.
12747 (thread_info::refcount): Move it to private.
12748 * infrun.c (save_stop_context): Call inc_refcount.
12749 (release_stop_context_cleanup): Likewise.
12750 * thread.c (set_thread_exited): New function.
12751 (init_thread_list): Delete "tp" only it is deletable, otherwise
12752 call set_thread_exited.
12753 (delete_thread_1): Call set_thread_exited.
12754 (current_thread_cleanup) <inferior_pid>: Remove.
12755 <thread>: New field.
12756 (restore_current_thread_ptid_changed): Removed.
12757 (do_restore_current_thread_cleanup): Adjust.
12758 (restore_current_thread_cleanup_dtor): Don't call
12759 find_thread_ptid.
12760 (set_thread_refcount): Use dec_refcount.
12761 (make_cleanup_restore_current_thread): Adjust.
12762 (thread_apply_all_command): Call inc_refcount.
12763 (_initialize_thread): Don't call
12764 observer_attach_thread_ptid_changed.
12765
12766 2017-04-10 Yao Qi <yao.qi@linaro.org>
12767
12768 * thread.c (delete_thread_1): Hoist code on marking thread as
12769 exited.
12770
12771 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12772
12773 * windows-nat.c (windows_detach): Initialize ptid with
12774 minus_one_ptid.
12775
12776 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12777
12778 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12779
12780 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12781
12782 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12783 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12784 (bfin_pseudo_register_write): Likewise
12785
12786 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12787
12788 * common/ptid.h (struct ptid): Change to...
12789 (class ptid_t): ... this.
12790 <ptid_t>: New constructors.
12791 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12792 matches>: New methods.
12793 <make_null, make_minus_one>: New static methods.
12794 <pid>: Rename to...
12795 <m_pid>: ...this.
12796 <lwp>: Rename to...
12797 <m_lwp>: ...this.
12798 <tid>: Rename to...
12799 <m_tid>: ...this.
12800 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12801 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12802 as references, move comment to class ptid_t.
12803 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12804 ptid_t static methods.
12805 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12806 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12807 Take ptid arguments as references, implement using ptid_t methods.
12808 * unittests/ptid-selftests.c: New file.
12809 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12810 unittests/ptid-selftests.c.
12811 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12812
12813 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12814
12815 * python/python.c (python_run_simple_file): Cast mode literal to
12816 non-const char pointer as expected by PyFile_FromString.
12817
12818 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12819
12820 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12821 minus_one_ptid and null_ptid.
12822
12823 2017-04-05 Pedro Alves <palves@redhat.com>
12824
12825 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12826 * configure: Regenerate.
12827
12828 2017-04-05 Pedro Alves <palves@redhat.com>
12829
12830 * ada-exp.y (yyerror): Constify.
12831 * ada-lang.c (bound_name, get_selections)
12832 (ada_variant_discrim_type)
12833 (ada_variant_discrim_name, ada_value_struct_elt)
12834 (ada_lookup_struct_elt_type, is_unchecked_variant)
12835 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12836 (catch_ada_exception_command_split)
12837 (catch_ada_assert_command_split, catch_assert_command)
12838 (ada_op_name): Constify.
12839 * ada-lang.h (ada_yyerror, get_selections)
12840 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12841 * arc-tdep.c (arc_print_frame_cache): Constify.
12842 * arm-tdep.c (arm_skip_stub): Constify.
12843 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12844 (gen_aggregate_elt_ref): Constify.
12845 * bcache.c (print_bcache_statistics): Constify.
12846 * bcache.h (print_bcache_statistics): Constify.
12847 * break-catch-throw.c (catch_exception_command_1):
12848 * breakpoint.c (struct ep_type_description::description):
12849 Constify.
12850 (add_solib_catchpoint): Constify.
12851 (catch_fork_command_1): Add cast.
12852 (add_catch_command): Constify.
12853 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12854 Constify.
12855 * bsd-uthread.c (bsd_uthread_state): Constify.
12856 * buildsym.c (patch_subfile_names): Constify.
12857 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12858 Constify.
12859 * c-exp.y (yyerror): Constify.
12860 (token::oper): Constify.
12861 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12862 * c-varobj.c (cplus_describe_child): Constify.
12863 * charset.c (find_charset_names): Add cast.
12864 (find_charset_names): Constify array and add const_cast.
12865 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12866 (edit_command): Constify.
12867 * cli/cli-decode.c (lookup_cmd): Constify.
12868 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12869 Constify.
12870 (struct dump_context): Constify.
12871 (add_dump_command, restore_command): Constify.
12872 * cli/cli-script.c (get_command_line): Constify.
12873 * cli/cli-script.h (get_command_line): Constify.
12874 * cli/cli-utils.c (check_for_argument): Constify.
12875 * cli/cli-utils.h (check_for_argument): Constify.
12876 * coff-pe-read.c (struct read_pe_section_data): Constify.
12877 * command.h (lookup_cmd): Constify.
12878 * common/print-utils.c (decimal2str): Constify.
12879 * completer.c (gdb_print_filename): Constify.
12880 * corefile.c (set_gnutarget): Constify.
12881 * cp-name-parser.y (yyerror): Constify.
12882 * cp-valprint.c (cp_print_class_member): Constify.
12883 * cris-tdep.c (cris_register_name, crisv32_register_name):
12884 Constify.
12885 * d-exp.y (yyerror): Constify.
12886 (struct token::oper): Constify.
12887 * d-lang.h (d_yyerror): Constify.
12888 * dbxread.c (struct header_file_location::name): Constify.
12889 (add_old_header_file, add_new_header_file, last_function_name)
12890 (dbx_next_symbol_text, add_bincl_to_list)
12891 (find_corresponding_bincl_psymtab, set_namestring)
12892 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12893 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12894 * defs.h (command_line_input, print_address_symbolic)
12895 (deprecated_readline_begin_hook): Constify.
12896 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12897 Constify.
12898 * event-top.c (handle_line_of_input): Constify and add cast.
12899 * exceptions.c (catch_errors): Constify.
12900 * exceptions.h (catch_errors): Constify.
12901 * expprint.c (print_subexp_standard, op_string, op_name)
12902 (op_name_standard, dump_raw_expression, dump_raw_expression):
12903 * expression.h (op_name, op_string, dump_raw_expression):
12904 Constify.
12905 * f-exp.y (yyerror): Constify.
12906 (struct token::oper): Constify.
12907 (struct f77_boolean_val::name): Constify.
12908 * f-lang.c (f_word_break_characters): Constify.
12909 * f-lang.h (f_yyerror): Constify.
12910 * fork-child.c (fork_inferior): Add cast.
12911 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12912 (new_variant): Constify.
12913 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12914 * gdbarch.c: Regenerate.
12915 * gdbcore.h (set_gnutarget): Constify.
12916 * go-exp.y (yyerror): Constify.
12917 (token::oper): Constify.
12918 * go-lang.h (go_yyerror): Constify.
12919 * go32-nat.c (go32_sysinfo): Constify.
12920 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12921 * guile/scm-cmd.c (cmdscm_function): Constify.
12922 * guile/scm-param.c (pascm_param_value): Constify.
12923 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12924 (h8300sx_register_name): Constify.
12925 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12926 Constify.
12927 * ia64-tdep.c (ia64_register_names): Constify.
12928 * infcmd.c (construct_inferior_arguments): Constify.
12929 (path_command, attach_post_wait): Constify.
12930 * language.c (show_range_command, show_case_command)
12931 (unk_lang_error): Constify.
12932 * language.h (language_defn::la_error)
12933 (language_defn::la_name_of_this): Constify.
12934 * linespec.c (decode_line_2): Constify.
12935 * linux-thread-db.c (thread_db_err_str): Constify.
12936 * lm32-tdep.c (lm32_register_name): Constify.
12937 * m2-exp.y (yyerror): Constify.
12938 * m2-lang.h (m2_yyerror): Constify.
12939 * m32r-tdep.c (m32r_register_names): Constify and make static.
12940 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12941 * m88k-tdep.c (m88k_register_name): Constify.
12942 * macroexp.c (appendmem): Constify.
12943 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12944 (upgrade_type, parse_external, parse_partial_symbols)
12945 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12946 (new_symbol): Constify.
12947 * memattr.c (mem_info_command): Constify.
12948 * mep-tdep.c (register_name_from_keyword): Constify.
12949 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12950 Constify.
12951 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12952 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12953 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12954 cast.
12955 (mi_execute_async_cli_command): Constify.
12956 * mips-tdep.c (mips_register_name): Constify.
12957 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12958 (am33_register_name, am33_2_register_name)
12959 * moxie-tdep.c (moxie_register_names): Constify.
12960 * nat/linux-osdata.c (osdata_type): Constify fields.
12961 * nto-tdep.c (nto_parse_redirection): Constify.
12962 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12963 (lookup_child_selector): Constify.
12964 (objc_methcall::name): Constify.
12965 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12966 (lookup_struct_typedef): Constify.
12967 * objfiles.c (pc_in_section): Constify.
12968 * objfiles.h (pc_in_section): Constify.
12969 * p-exp.y (struct token::oper): Constify.
12970 (yyerror): Constify.
12971 * p-lang.h (pascal_yyerror): Constify.
12972 * parser-defs.h (op_name_standard): Constify.
12973 (op_print::string): Constify.
12974 (exp_descriptor::op_name): Constify.
12975 * printcmd.c (print_address_symbolic): Constify.
12976 * psymtab.c (print_partial_symbols): Constify.
12977 * python/py-breakpoint.c (stop_func): Constify.
12978 (bppy_get_expression): Constify.
12979 * python/py-cmd.c (cmdpy_completer::name): Constify.
12980 (cmdpy_function): Constify.
12981 * python/py-event.c (evpy_add_attribute)
12982 (gdbpy_initialize_event_generic): Constify.
12983 * python/py-event.h (evpy_add_attribute)
12984 (gdbpy_initialize_event_generic): Constify.
12985 * python/py-evts.c (add_new_registry): Constify.
12986 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12987 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12988 * python/py-inferior.c (get_buffer): Add cast.
12989 * python/py-param.c (parm_constant::name): Constify.
12990 * python/py-unwind.c (fprint_frame_id): Constify.
12991 * python/python.c (gdbpy_parameter_value): Constify.
12992 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12993 * remote.c (memory_packet_config::name): Constify.
12994 (show_packet_config_cmd, remote_write_bytes)
12995 (remote_buffer_add_string):
12996 * reverse.c (exec_reverse_once): Constify.
12997 * rs6000-tdep.c (variant::name, variant::description): Constify.
12998 * rust-exp.y (rustyyerror): Constify.
12999 * rust-lang.c (rust_op_name): Constify.
13000 * rust-lang.h (rustyyerror): Constify.
13001 * serial.h (serial_ops::name): Constify.
13002 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13003 (sh_sh3e_register_name, sh_sh2e_register_name)
13004 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13005 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13006 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13007 (sh_sh4al_dsp_register_name): Constify.
13008 * sh64-tdep.c (sh64_register_name): Constify.
13009 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13010 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13011 * stabsread.c (patch_block_stabs, read_type_number)
13012 (ref_map::stabs, ref_add, process_reference)
13013 (symbol_reference_defined, define_symbol, define_symbol)
13014 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13015 (read_one_struct_field, read_struct_fields, read_baseclasses)
13016 (read_tilde_fields, read_struct_type, read_array_type)
13017 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13018 (read_huge_number, read_range_type, read_args, common_block_start)
13019 (find_name_end): Constify.
13020 * stabsread.h (common_block_start, define_symbol)
13021 (process_one_symbol, symbol_reference_defined, ref_add):
13022 * symfile.c (get_section_index, add_symbol_file_command):
13023 * symfile.h (get_section_index): Constify.
13024 * target-descriptions.c (tdesc_type::name): Constify.
13025 (tdesc_free_type): Add cast.
13026 * target.c (find_default_run_target):
13027 (add_deprecated_target_alias, find_default_run_target)
13028 (target_announce_detach): Constify.
13029 (do_option): Constify.
13030 * target.h (add_deprecated_target_alias): Constify.
13031 * thread.c (print_thread_info_1): Constify.
13032 * top.c (deprecated_readline_begin_hook, command_line_input):
13033 Constify.
13034 (init_main): Add casts.
13035 * top.h (handle_line_of_input): Constify.
13036 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13037 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13038 (tfind_command): Rename to ...
13039 (tfind_command_1): ... this and constify.
13040 (tfind_command): New function.
13041 (tfind_end_command, tfind_start_command): Adjust.
13042 (encode_source_string): Constify.
13043 * tracepoint.h (encode_source_string): Constify.
13044 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13045 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13046 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13047 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13048 * tui/tui-win.c (parse_scrolling_args): Constify.
13049 * tui/tui-windata.c (tui_erase_data_content): Constify.
13050 * tui/tui-windata.h (tui_erase_data_content): Constify.
13051 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13052 * tui/tui.c (tui_enable): Add cast.
13053 * utils.c (defaulted_query): Constify.
13054 (init_page_info): Add cast.
13055 (puts_debug, subset_compare): Constify.
13056 * utils.h (subset_compare): Constify.
13057 * varobj.c (varobj_format_string): Constify.
13058 * varobj.h (varobj_format_string): Constify.
13059 * vax-tdep.c (vax_register_name): Constify.
13060 * windows-nat.c (windows_detach): Constify.
13061 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13062 * xml-support.c (gdb_xml_end_element): Constify.
13063 * xml-tdesc.c (tdesc_start_reg): Constify.
13064 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13065 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13066 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13067
13068 2017-04-05 Pedro Alves <palves@redhat.com>
13069
13070 * proc-api.c (struct trans): Constify.
13071 (procfs_note): Constify.
13072 * proc-events.c (struct trans, syscall_table):
13073 * proc-flags.c (struct trans): Constify.
13074 * proc-utils.h (procfs_note): Constify.
13075 * proc-why.c (struct trans): Constify.
13076 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13077 (procfs_detach): Constify.
13078 * sol-thread.c (struct string_map): Constify.
13079 (td_err_string, td_state_string): Constify.
13080
13081 2017-04-05 Pedro Alves <palves@redhat.com>
13082
13083 * proc-api.c (procfs_filename): Don't initialize
13084 procfs_filename.
13085 (prepare_to_trace): Assume procfs_filename is non-NULL.
13086 (_initialize_proc_api): Give procfs_filename a default value here.
13087
13088 2017-04-05 Pedro Alves <palves@redhat.com>
13089
13090 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13091 'cond_string' parameter.
13092 (extract_exception_regexp): Constify 'string' parameter.
13093 (catch_exception_command_1): Constify.
13094 * breakpoint.c (init_catchpoint)
13095 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13096 parameter.
13097 (ep_parse_optional_if_clause, catch_fork_command_1)
13098 (catch_exec_command_1): Constify.
13099 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13100 parameter.
13101 (ep_parse_optional_if_clause): Constify.
13102 * cli/cli-utils.c (remove_trailing_whitespace)
13103 (check_for_argument): Constify.
13104 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13105 non-const overload.
13106 (check_for_argument): Likewise.
13107
13108 2017-04-05 Pedro Alves <palves@redhat.com>
13109
13110 * event-top.c (command_line_handler): Add cast to execute_command
13111 call.
13112 * record-btrace.c (cmd_record_btrace_bts_start)
13113 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13114 (cmd_record_btrace_start): Add cast to execute_command call.
13115 * record-full.c (record_full_goto_insn):
13116 * record.c (record_start, record_stop): Add cast to
13117 execute_command_to_string calls.
13118 (cmd_record_start): Add cast to execute_command calls.
13119
13120 2017-04-05 Pedro Alves <palves@redhat.com>
13121
13122 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13123 static inline function.
13124 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13125 array and use gdb_PyArg_ParseTupleAndKeywords.
13126 * python/py-cmd.c (cmdpy_init): Likewise.
13127 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13128 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13129 (infpy_search_memory): Likewise.
13130 * python/py-objfile.c (objfpy_add_separate_debug_file)
13131 (gdbpy_lookup_objfile): Likewise.
13132 * python/py-symbol.c (gdbpy_lookup_symbol)
13133 (gdbpy_lookup_global_symbol): Likewise.
13134 * python/py-type.c (gdbpy_lookup_type): Likewise.
13135 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13136 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13137 Likewise.
13138
13139 2017-04-05 Pedro Alves <palves@redhat.com>
13140
13141 * python/python-internal.h (gdb_PyGetSetDef): New type.
13142 * python/py-block.c (block_object_getset)
13143 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13144 * python/py-event.c (event_object_getset)
13145 (finish_breakpoint_object_getset): Likewise.
13146 * python/py-inferior.c (inferior_object_getset): Likewise.
13147 * python/py-infthread.c (thread_object_getset): Likewise.
13148 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13149 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13150 * python/py-objfile.c (objfile_getset): Likewise.
13151 * python/py-progspace.c (pspace_getset): Likewise.
13152 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13153 Likewise.
13154 * python/py-record.c (recpy_record_getset): Likewise.
13155 * python/py-symbol.c (symbol_object_getset): Likewise.
13156 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13157 Likewise.
13158 * python/py-type.c (type_object_getset, field_object_getset):
13159 Likewise.
13160 * python/py-value.c (value_object_getset): Likewise.
13161
13162 2017-04-05 Pedro Alves <palves@redhat.com>
13163
13164 * python/python-internal.h (gdb_PyObject_CallMethod)
13165 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13166 New functions.
13167 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13168 (PySys_GetObject, PySys_SetPath): New macros.
13169
13170 2017-04-05 Pedro Alves <palves@redhat.com>
13171
13172 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13173 info_osdata_command.
13174 * osdata.c (info_osdata_command): Rename to ...
13175 (info_osdata): ... this. Constify 'type' parameter, and remove
13176 the 'from_tty' parameter. Accept NULL TYPE.
13177 (info_osdata_command): New function.
13178 * osdata.h (info_osdata_command): Remove declaration.
13179 (info_osdata): New declaration.
13180
13181 2017-04-05 Pedro Alves <palves@redhat.com>
13182
13183 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13184 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13185 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13186 parameter.
13187 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13188 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13189 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13190 parameter.
13191 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13192 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13193 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13194 (mi_cmd_file_list_exec_source_files)
13195 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13196 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13197 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13198 parameter.
13199 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13200 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13201 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13202 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13203 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13204 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13205 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13206 'command' parameter.
13207 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13208 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13209 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13210 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13211 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13212 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13213 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13214 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13215 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13216 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13217 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13218 parameter.
13219 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13220 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13221 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13222 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13223 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13224 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13225 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13226 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13227 (mi_cmd_data_list_changed_registers)
13228 (mi_cmd_data_write_register_values)
13229 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13230 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13231 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13232 (mi_cmd_list_features, mi_cmd_list_target_features)
13233 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13234 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13235 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13236 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13237 (mi_cmd_trace_frame_collected): Constify 'command'
13238 parameter.
13239 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13240 'command' parameter.
13241
13242 2017-04-05 Pedro Alves <palves@redhat.com>
13243
13244 * ada-lang.c (ada_completer_word_break_characters): Now a const
13245 array.
13246 (ada_get_gdb_completer_word_break_characters): Constify.
13247 * completer.c (gdb_completer_command_word_break_characters)
13248 (gdb_completer_file_name_break_characters)
13249 (gdb_completer_quote_characters): Now const arrays.
13250 (get_gdb_completer_quote_characters): Constify.
13251 (set_rl_completer_word_break_characters): New function.
13252 (set_gdb_completion_word_break_characters)
13253 (complete_line_internal): Use it.
13254 * completer.h (get_gdb_completer_quote_characters): Constify.
13255 (set_rl_completer_word_break_characters): Declare.
13256 * f-lang.c (f_word_break_characters): Constify.
13257 * language.c (default_word_break_characters): Constify.
13258 * language.h (language_defn::la_word_break_characters): Constify.
13259 (default_word_break_characters): Constify.
13260 * top.c (init_main): Use set_rl_completer_word_break_characters.
13261
13262 2017-04-05 Pedro Alves <palves@redhat.com>
13263
13264 * aix-thread.c (aix_thread_pid_to_str)
13265 (aix_thread_extra_thread_info): Constify.
13266 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13267 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13268 (bsd_uthread_pid_to_str): Constify.
13269 * corelow.c (core_pid_to_str): Constify.
13270 * darwin-nat.c (darwin_pid_to_str): Constify.
13271 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13272 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13273 Constify.
13274 * gnu-nat.c (gnu_pid_to_str): Constify.
13275 * go32-nat.c (go32_pid_to_str): Constify.
13276 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13277 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13278 * inferior.c (inferior_pid_to_str): Constify.
13279 * linux-nat.c (linux_nat_pid_to_str): Constify.
13280 * linux-tdep.c (linux_core_pid_to_str): Constify.
13281 * linux-thread-db.c (thread_db_pid_to_str)
13282 (thread_db_extra_thread_info): Constify.
13283 * nto-tdep.c (nto_extra_thread_info): Constify.
13284 * nto-tdep.h (nto_extra_thread_info): Constify.
13285 * obsd-nat.c (obsd_pid_to_str): Constify.
13286 * procfs.c (procfs_pid_to_str): Constify.
13287 * ravenscar-thread.c (ravenscar_extra_thread_info)
13288 (ravenscar_pid_to_str): Constify.
13289 * remote-sim.c (gdbsim_pid_to_str): Constify.
13290 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13291 Constify.
13292 * sol-thread.c (solaris_pid_to_str): Constify.
13293 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13294 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13295 * target.c (default_pid_to_str, target_pid_to_str)
13296 (normal_pid_to_str, default_pid_to_str): Constify.
13297 * target.h (target_ops::to_pid_to_str)
13298 (target_ops::to_extra_thread_info): Constify.
13299 (target_pid_to_str, normal_pid_to_str): Constify.
13300 * windows-nat.c (windows_pid_to_str): Constify.
13301 * gdbarch.sh (core_pid_to_str): Constify.
13302 * target-delegates.c: Regenerate.
13303 * gdbarch.h, gdbarch.c: Regenerate.
13304
13305 2017-04-05 Pedro Alves <palves@redhat.com>
13306
13307 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13308 the memory of the temporary warning_pre_print override.
13309 * utils.c (warning_pre_print): Constify.
13310 * utils.h (warning_pre_print): Constify.
13311
13312 2017-04-05 Pedro Alves <palves@redhat.com>
13313
13314 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13315 (shell_command): New function.
13316 (make_command): Use std::string.
13317 (init_cli_cmds): Register shell_command instead of shell_escape.
13318
13319 2017-04-05 Pedro Alves <palves@redhat.com>
13320
13321 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13322 * tracepoint.c (default_collect): Don't initialize.
13323
13324 2017-04-05 Pedro Alves <palves@redhat.com>
13325
13326 * macroexp.c (macro_buffer::shared): Now a bool.
13327 (init_buffer): Update.
13328 (init_shared_buffer): Constify 'addr' parameter.
13329 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13330 casts.
13331
13332 2017-04-05 Pedro Alves <palves@redhat.com>
13333
13334 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13335 * disasm.c (set_disassembler_options): Constify local.
13336 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13337
13338 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13339
13340 PR gdb/21352
13341 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13342 option.
13343
13344 2017-04-05 Yao Qi <yao.qi@linaro.org>
13345
13346 * frame.c (frame_unwind_register_unsigned): Call
13347 frame_unwind_register_value.
13348
13349 2017-04-05 Yao Qi <yao.qi@linaro.org>
13350
13351 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13352 Use gdb_test_multiple, and don't match anchor.
13353
13354 2017-04-05 Pedro Alves <palves@redhat.com>
13355
13356 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13357 (Write After Approval): Remove Simon Marchi.
13358
13359 2017-04-05 Pedro Alves <palves@redhat.com>
13360
13361 * common/gdb_optional.h (optional::optional): Make constexpr and
13362 initialize m_dummy.
13363
13364 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13365
13366 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13367 (amd64fbsd_jmp_buf_reg_offset): Remove.
13368 (amd64fbsd_supply_uthread): Remove function.
13369 (amd64fbsd_collect_uthread): Remove function.
13370 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13371 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13372 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13373 (fbsd-nat.c): Update comment.
13374 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13375 (i386fbsd_jmp_buf_reg_offset): Remove.
13376 (i386fbsd_supply_uthread): Remove function.
13377 (i386fbsd_collect_uthread): Remove function.
13378 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13379
13380 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13381
13382 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13383 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13384 * NEWS: Mention that support for FreeBSD/alpha was removed.
13385 * alpha-fbsd-tdep.c: Delete file.
13386 * config/alpha/fbsd.mh: Delete file.
13387 * configure.host: Delete alpha*-*-freebsd* and
13388 alpha*-*-kfreebsd*-gnu.
13389 * configure.tgt: Delete alpha*-*-freebsd* and
13390 alpha*-*-kfreebsd*-gnu.
13391
13392 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13393
13394 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13395 amd64bsd_store_inferior_registers): Use ptid from regcache.
13396
13397 2017-04-04 Pedro Alves <palves@redhat.com>
13398
13399 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13400 data fields, make them private and add "m_" prefixes.
13401 (lnp_state_machine::lnp_state_machine): New ctor.
13402 (record_line, check_line_address, handle_set_discriminator)
13403 (handle_set_address, handle_advance_pc, handle_special_opcode)
13404 (handle_advance_line, handle_set_file, handle_negate_stmt)
13405 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13406 (end_sequence, advance_line): New methods.
13407 (m_gdbarch, m_record_lines_p): New fields.
13408 (lnp_reader_state): Delete.
13409 (dwarf_record_line): Rename to ...
13410 (lnp_state_machine::record_line): ... adjust.
13411 (init_lnp_state_machine): Delete.
13412 (lnp_state_machine::lnp_state_machine): New.
13413 (check_line_address): Rename to ...
13414 (lnp_state_machine::check_line_address): This.
13415 (dwarf_decode_lines_1): Remove reference to "reader_state".
13416 Adjust lnp_state_machine having a non-default ctor. Use bool.
13417 State machine internal state manipulation moved to
13418 lnp_state_machine methods.
13419
13420 2017-04-04 Pedro Alves <palves@redhat.com>
13421
13422 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13423 unittests/offset-type-selftests.c.
13424 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13425 * common/offset-type.h: New file.
13426 * common/preprocessor.h: New file.
13427 * common/traits.h: New file.
13428 * common/valid-expr.h: New file.
13429 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13430 sect_offset and cu_offset strong typedefs throughout.
13431 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13432 typedefs throughout.
13433 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13434 sect_offset and cu_offset strong typedefs throughout.
13435 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13436 typedefs throughout.
13437 * gdbtypes.h: Include "common/offset-type.h".
13438 (cu_offset): Now an offset type (strong typedef) instead of a
13439 struct.
13440 (sect_offset): Likewise.
13441 (union call_site_parameter_u): Rename "param_offset" field to
13442 "param_cu_off".
13443 * unittests/offset-type-selftests.c: New file.
13444
13445 2017-04-04 Pedro Alves <palves@redhat.com>
13446
13447 * common/underlying.h: New file.
13448 * dwarf2read.c: Include "common/gdb_optional.h" and
13449 "common/underlying.h".
13450 (dir_index, file_name_index): New types.
13451 (file_entry): Use them.
13452 (file_entry::include): Use to_underlying.
13453 (line_header::add_file_name): Use dir_index.
13454 (read_formatted_entries): Use gdb::optional. Read form before
13455 writting to file_entry.
13456 (dwarf_decode_line_header): Use dir_index.
13457 (lnp_state_machine::current_file): Use to_underlying.
13458 (lnp_state_machine::file): Change type to file_name_index.
13459 (dwarf_record_line): Use to_underlying.
13460 (init_lnp_state_machine): Use file_name_index.
13461 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13462
13463 2017-04-04 Pedro Alves <palves@redhat.com>
13464
13465 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13466 operator bool, has_value and get methods.
13467
13468 2017-04-04 Pedro Alves <palves@redhat.com>
13469
13470 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13471 fields.
13472 (line_header): Initialize all data fields. Change type of
13473 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13474 Change type of include_dirs to std::vector<const char *>. Remove
13475 num_include_dirs, include_dirs_size. Change type of file_names to
13476 std::vector<file_entry>. Remove num_file_names, file_names_size.
13477 (line_header::line_header): New.
13478 (line_header::add_include_dir, line_header::add_file_name): New
13479 methods.
13480 (line_header::include_dir_at): Remove NULL check.
13481 (line_header::file_name_at): Add const overload.
13482 (line_header_up): New unique_ptr typedef.
13483 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13484 std::vector. Remove free_line_header call.
13485 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13486 free_line_header call.
13487 (free_cu_line_header): Delete.
13488 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13489 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13490 Adjust to use std::vector.
13491 (free_line_header): Delete.
13492 (free_line_header_voidp): Use delete.
13493 (add_include_dir): Replace with ...
13494 (line_header::add_include_dir): ... this method. Use std::vector.
13495 (add_file_name): Replace with ...
13496 (line_header::add_file_name): ... this method. Use std::vector.
13497 (add_include_dir_stub): Delete.
13498 (read_formatted_entries): Remove memset.
13499 (dwarf_decode_line_header): Return a line_header_up instead of a
13500 raw pointer. Remove cleanup handling. Pass lambdas to
13501 read_formatted_entries. Adjust to use line_header methods.
13502 (dwarf_decode_lines_1): Adjust to use line_header methods.
13503 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13504 use std::vector.
13505
13506 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13507
13508 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13509 instead of struct ptid.
13510
13511 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13512
13513 * frame.c (get_frame_register_bytes): Unwind using value.
13514 (put_frame_register_bytes): Likewise.
13515
13516 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13517
13518 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13519 aggregate-like.
13520
13521 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13522
13523 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13524
13525 2017-03-29 Yao Qi <yao.qi@linaro.org>
13526
13527 * gdbthread.h (struct thread_info): Declare constructor and
13528 destructor. Add some in-class member initializers.
13529 * thread.c (free_thread): Remove.
13530 (init_thread_list): Call delete instead of free_thread.
13531 (new_thread): Call thread_info constructor.
13532 (thread_info::thread_info): New function.
13533 (thread_info::~thread_info): New function.
13534 (delete_thread_1): Call delete instead of free_thread.
13535 (make_cleanup_restore_current_thread): Move tp and frame to
13536 inner block.
13537
13538 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13539
13540 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13541 (arc_skip_prologue): Likewise.
13542 (arc_make_frame_cache): Likewise.
13543 (arc_pv_get_operand): New function.
13544 (arc_is_in_prologue): Likewise.
13545 (arc_analyze_prologue): Likewise.
13546 (arc_print_frame_cache): Likewise.
13547 (MAX_PROLOGUE_LENGTH): New constant.
13548
13549 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13550
13551 * configure.tgt: Add arc-insn.o.
13552 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13553 (dump_arc_instruction_command): New function.
13554 (arc_fprintf_disasm): Likewise.
13555 (arc_disassemble_info): Likewise.
13556 (arc_insn_get_operand_value): Likewise.
13557 (arc_insn_get_operand_value_signed): Likewise.
13558 (arc_insn_get_memory_base_reg): Likewise.
13559 (arc_insn_get_memory_offset): Likewise.
13560 (arc_insn_get_branch_target): Likewise.
13561 (arc_insn_dump): Likewise.
13562 (arc_insn_get_linear_next_pc): Likewise.
13563 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13564 (arc_disassemble_info): Likewise.
13565 (arc_insn_get_branch_target): Likewise.
13566 (arc_insn_get_linear_next_pc): Likewise.
13567 * NEWS: Mention new "maint print arc arc-instruction".
13568
13569 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13570
13571 * arc-tdep (maintenance_print_arc_list): New variable.
13572 (maintenance_print_arc_command): New function.
13573
13574 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13575
13576 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13577 Add "limm" and "reserved".
13578 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13579 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13580 * arc-tdep.h (arc_regnum): Likewise.
13581
13582 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13583
13584 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13585 for THREADPTR register.
13586 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13587 register.
13588 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13589 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13590 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13591
13592 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13593
13594 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13595 registers above gdbarch_num_regs (gdbarch) as privileged in
13596 call0 ABI.
13597
13598 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13599
13600 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13601 for a single specified register or for all registers in
13602 a0_base..a0_base + C0_NREGS range.
13603 (supply_gregset_reg): Call regcache_raw_supply for a single
13604 specified register or for all registers in a0_base..a0_base +
13605 C0_NREGS range.
13606
13607 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13608
13609 * arch/xtensa.h (C0_NREGS): Add definition.
13610 * xtensa-tdep.c (C0_NREGS): Remove definition.
13611
13612 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13613
13614 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13615 Drop xtensa_default_isa initialization.
13616 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13617
13618 2017-03-27 Pedro Alves <palves@redhat.com>
13619
13620 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13621 (file_entry::include_dir): New method.
13622 (line_header::include_dir_at, line_header::file_name_at): New
13623 methods.
13624 (setup_type_unit_groups, setup_type_unit_groups)
13625 (psymtab_include_file_name): Simplify using the new methods.
13626 (lnp_state_machine) <the_line_header>: New field.
13627 <file>: Add comment.
13628 (lnp_state_machine::current_file): New method.
13629 (dwarf_record_line): Simplify using the new methods.
13630 (init_lnp_state_machine): Initialize the "the_line_header" field.
13631 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13632 Simplify using the new methods.
13633
13634 2017-03-27 Pedro Alves <palves@redhat.com>
13635
13636 * cp-name-parser.y (make_empty): Delete.
13637 (demangler_special, nested_name, ptr_operator, array_indicator)
13638 (direct_declarator, declarator_1): Use fill_comp instead of
13639 make_empty.
13640
13641 2017-03-27 Pedro Alves <palves@redhat.com>
13642
13643 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13644 to ATTRIBUTE_PRINTF.
13645 * solib-target.c (library_list_start_list): Print "string" not
13646 "version".
13647 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13648 gdb_xml_error call.
13649
13650 2017-03-27 Pedro Alves <palves@redhat.com>
13651
13652 * dwarf2read.c (struct file_and_directory): New.
13653 (dwarf2_get_dwz_file): Adjust to use std::string.
13654 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13655 (find_file_and_directory): Adjust to return a file_and_directory
13656 object.
13657 (read_file_scope): Adjust to use file_and_directory. Remove
13658 make_cleanup/do_cleanups calls.
13659 (open_and_init_dwp_file): Adjust to use std::string. Remove
13660 make_cleanup/do_cleanups calls.
13661 * python/python.c (do_start_initialization): Adjust to ldirname
13662 returning a std::string.
13663 * utils.c (ldirname): Now returns a std::string.
13664 * utils.h (ldirname): Change return type to std::string.
13665 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13666 returning a std::string.
13667 * xml-tdesc.c (file_read_description_xml): Likewise.
13668
13669 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13670
13671 * regcache.c (regcache_debug_print_register): New function.
13672 * regcache.h (regcache_debug_print_register): New declaration.
13673 * target.c (debug_print_register): Remove.
13674 (target_fetch_registers): Call regcache_debug_print_register.
13675 (target_store_registers): Likewise.
13676
13677 2017-03-24 Pádraig Brady <pbrady@fb.com>
13678
13679 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13680 reference beyond the 'lh->include_dirs' array before accessing to
13681 it.
13682 (psymtab_include_file_name): Likewise.
13683 (dwarf_decode_lines_1): Likewise.
13684 (dwarf_decode_lines): Likewise.
13685 (file_file_name): Likewise.
13686
13687 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13688
13689 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13690 inferior_ptid.
13691 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13692 ps_lsetfpregs): Likewise.
13693 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13694 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13695 ps_lsetfpregs): Likewise.
13696 * target.c (target_fetch_registers, target_store_registers):
13697 Remove asserts.
13698
13699 2017-03-23 Alan Hayward <alan.hayward@arm.com>
13700
13701 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13702
13703 2017-03-23 Yao Qi <yao.qi@linaro.org>
13704
13705 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13706 (_initialize_aarch64_tdep): Register it.
13707 (aarch64_record_load_store): Handle PRFM instruction.
13708 (aarch64_process_record_test): New function.
13709
13710 2017-03-23 Yao Qi <yao.qi@linaro.org>
13711
13712 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13713 indentation.
13714
13715 2017-03-23 Yao Qi <yao.qi@linaro.org>
13716
13717 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13718
13719 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13720
13721 python/python.c (do_start_initialization): Fix memory leak.
13722
13723 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13724
13725 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13726 using get_ptrace_pid.
13727 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13728 inferior_ptid.
13729 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13730 inferior_ptid instead of pid.
13731
13732 2017-03-22 Yao Qi <yao.qi@linaro.org>
13733
13734 * aarch64-tdep.c: Wrap locally used classes in anonymous
13735 namespace.
13736 * arm-tdep.c: Likewise.
13737 * linespec.c: Likewise.
13738 * ui-out.c: Likewise.
13739
13740 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13741
13742 PR gdb/19637
13743 * python/lib/gdb/printer/bound_registers.py: Import sys.
13744
13745 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13746
13747 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13748 windows_thread_info parameter and use it instead of
13749 current_thread.
13750 (windows_fetch_inferior_registers): Don't set current_thread,
13751 pass the thread to do_windows_fetch_inferior_registers. Use
13752 ptid from regcache instead of inferior_ptid.
13753 (do_windows_store_inferior_registers): Add windows_thread_info
13754 parameter and use it instead of current_thread.
13755 (windows_store_inferior_registers): Don't set current_thread,
13756 pass the thread to do_windows_store_inferior_registers. Use
13757 ptid from regcache instead of inferior_ptid.
13758
13759 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13760
13761 * ser-mingw.c (ser_windows_raw): Remove reference to
13762 struct serial::current_timeout.
13763
13764 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13765
13766 PR tdep/20928
13767 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13768 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13769 (sparc64_fsr_type): Fix %fsr decoding.
13770
13771 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13772
13773 * python/py-record-btrace.c (btpy_insn_data): Change return type
13774 for Python 2.
13775
13776 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13777
13778 * spu-linux-nat.c (spu_fetch_inferior_registers,
13779 spu_store_inferior_registers): Use ptid from regcache, set and
13780 restore inferior_ptid.
13781 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13782 Likewise.
13783
13784 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13785
13786 * i386-linux-nat.c (fetch_register, store_register,
13787 i386_linux_fetch_inferior_registers,
13788 i386_linux_store_inferior_registers): Use ptid from regcache.
13789 * ia64-linux-nat.c (ia64_linux_fetch_register,
13790 ia64_linux_store_register): Likewise.
13791 * inf-ptrace.c (inf_ptrace_fetch_register,
13792 inf_ptrace_store_register): Likewise.
13793 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13794 m32r_linux_store_inferior_registers): Likewise.
13795 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13796 m68kbsd_store_inferior_registers): Likewise.
13797 * m68k-linux-nat.c (fetch_register, store_register,
13798 m68k_linux_fetch_inferior_registers,
13799 m68k_linux_store_inferior_registers): Likewise.
13800 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13801 m88kbsd_store_inferior_registers): Likewise.
13802 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13803 mips_fbsd_store_inferior_registers): Likewise.
13804 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13805 mips64_linux_regsets_store_registers): Likewise.
13806 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13807 mipsnbsd_store_inferior_registers): Likewise.
13808 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13809 mips64obsd_store_inferior_registers): Likewise.
13810 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13811 Likewise.
13812 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13813 ppcfbsd_store_inferior_registers): Likewise.
13814 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13815 ppc_linux_store_inferior_registers): Likewise.
13816 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13817 ppcnbsd_store_inferior_registers): Likewise.
13818 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13819 ppcobsd_store_registers): Likewise.
13820 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13821 Likewise.
13822 * ravenscar-thread.c (ravenscar_fetch_registers,
13823 ravenscar_store_registers, ravenscar_prepare_to_store):
13824 Likewise.
13825 * record-btrace.c (record_btrace_fetch_registers,
13826 record_btrace_store_registers, record_btrace_prepare_to_store):
13827 Likewise.
13828 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13829 Lookup inferior using ptid from regcache, instead of
13830 current_inferior.
13831 * remote.c (remote_fetch_registers, remote_store_registers): Use
13832 ptid from regcache.
13833 * rs6000-nat.c (fetch_register, store_register): Likewise.
13834 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13835 s390_linux_store_inferior_registers): Likewise.
13836 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13837 shnbsd_store_inferior_registers): Likewise.
13838 * sol-thread.c (sol_thread_fetch_registers,
13839 sol_thread_store_registers): Likewise.
13840 * sparc-nat.c (sparc_fetch_inferior_registers,
13841 sparc_store_inferior_registers): Likewise.
13842 * tilegx-linux-nat.c (fetch_inferior_registers,
13843 store_inferior_registers): Likewise.
13844 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13845 vaxbsd_store_inferior_registers): Likewise.
13846 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13847 store_xtregs): Likewise.
13848
13849 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13850
13851 PR gdb/14441
13852 * NEWS: Mention support for rvalue references in GDB and python.
13853 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13854 supports both lvalue and rvalue references.
13855
13856 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13857
13858 PR gdb/14441
13859 * gdbtypes.c (rank_one_type): Implement overloading
13860 resolution rules regarding rvalue references.
13861
13862 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13863
13864 PR gdb/14441
13865 * aarch64-tdep.c (aarch64_type_align)
13866 (aarch64_extract_return_value, aarch64_store_return_value): Change
13867 lvalue reference type checks to general reference type checks.
13868 * amd64-tdep.c (amd64_classify): Likewise.
13869 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13870 Likewise.
13871 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13872 (arm_store_return_value): Likewise.
13873 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13874 * c-typeprint.c (c_print_type): Likewise.
13875 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13876 (cplus_number_of_children, cplus_describe_child): Likewise.
13877 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13878 * completer.c (expression_completer): Likewise.
13879 * cp-support.c (make_symbol_overload_list_adl_namespace):
13880 Likewise.
13881 * darwin-nat-info.c (info_mach_region_command): Likewise.
13882 * dwarf2loc.c (entry_data_value_coerce_ref)
13883 (value_of_dwarf_reg_entry): Likewise.
13884 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13885 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13886 Likewise.
13887 * findvar.c (extract_typed_address, store_typed_address):
13888 Likewise.
13889 * gdbtypes.c (rank_one_type): Likewise.
13890 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13891 * infcall.c (value_arg_coerce): Likewise.
13892 * language.c (pointer_type): Likewise.
13893 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13894 Likewise.
13895 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13896 * mn10300-tdep.c (mn10300_type_align): Likewise.
13897 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13898 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13899 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13900 Likewise.
13901 * printcmd.c (print_formatted, x_command): Likewise.
13902 * python/py-type.c (typy_get_composite, typy_template_argument):
13903 Likewise.
13904 * python/py-value.c (valpy_referenced_value)
13905 (valpy_get_dynamic_type, value_has_field): Likewise.
13906 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13907 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13908 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13909 * spu-tdep.c (spu_scalar_value_p): Likewise.
13910 * symtab.c (lookup_symbol_aux): Likewise.
13911 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13912 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13913 Likewise.
13914 * valops.c (value_cast_pointers, value_cast)
13915 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13916 (value_struct_elt, value_struct_elt_bitpos)
13917 (value_find_oload_method_list, find_overload_match)
13918 (value_rtti_indirect_type): Likewise.
13919 * valprint.c (val_print_scalar_type_p, generic_val_print):
13920 Likewise.
13921 * value.c (value_actual_type, value_as_address, unpack_long)
13922 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13923 (coerce_ref): Likewise.
13924 * varobj.c (varobj_get_value_type): Likewise.
13925
13926 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13927
13928 PR gdb/14441
13929 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13930 table of constants.
13931 * python/lib/gdb/command/explore.py: Support exploring values
13932 of rvalue reference types.
13933 * python/lib/gdb/types.py: Implement get_basic_type() for
13934 rvalue reference types.
13935 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13936 constant.
13937 * python/py-value.c (valpy_getitem): Add an rvalue reference
13938 check.
13939 (valpy_reference_value): Add new parameter "refcode".
13940 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13941 New wrappers for valpy_reference_value().
13942 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13943 (gdbpy_invoke_xmethod): Likewise.
13944
13945 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13946
13947 PR gdb/14441
13948 * dwarf2read.c (process_die, read_type_die_1): Handle the
13949 DW_TAG_rvalue_reference_type DIE.
13950 (read_tag_reference_type): Add new parameter "refcode".
13951
13952 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13953
13954 PR gdb/14441
13955 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13956 (c_type_print_modifier, c_type_print_varspec_suffix)
13957 (c_type_print_base): Support printing rvalue reference types.
13958 * c-valprint.c (c_val_print, c_value_print): Support printing
13959 rvalue reference values.
13960
13961 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13962
13963 PR gdb/14441
13964 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13965 typename.
13966 * cp-support.c (replace_typedefs): Handle
13967 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13968 * python/py-type.c (typy_lookup_type): Likewise.
13969
13970 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13971
13972 PR gdb/14441
13973 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13974 * parse.c (insert_type): Change assert statement.
13975 (follow_types): Handle rvalue reference types.
13976 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13977 constant.
13978
13979 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13980
13981 PR gdb/14441
13982 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13983 value_ref() interface.
13984 * c-valprint.c (c_value_print): Likewise.
13985 * infcall.c (value_arg_coerce): Likewise.
13986 * python/py-value.c (valpy_reference_value): Likewise.
13987 * valops.c (value_cast, value_reinterpret_cast)
13988 (value_dynamic_cast, typecmp): Likewise.
13989 (value_ref): Parameterize by kind of return value reference type.
13990 * value.h (value_ref): Add new parameter "refcode".
13991
13992 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13993
13994 PR gdb/14441
13995 * dwarf2read.c (read_tag_reference_type): Use
13996 lookup_lvalue_reference_type() instead of lookup_reference_type().
13997 * eval.c (evaluate_subexp_standard): Likewise.
13998 * f-exp.y: Likewise.
13999 * gdbtypes.c (make_reference_type, lookup_reference_type):
14000 Generalize with rvalue reference types.
14001 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14002 convenience wrappers for lookup_reference_type().
14003 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14004 reference kind parameter.
14005 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14006 wrappers for lookup_reference_type().
14007 * guile/scm-type.c (gdbscm_type_reference): Use
14008 lookup_lvalue_reference_type() instead of lookup_reference_type().
14009 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14010 * parse.c (follow_types): Likewise.
14011 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14012 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14013 Likewise.
14014 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14015 (gdbpy_invoke_xmethod): Likewise.
14016 * stabsread.c: Provide extra argument to make_reference_type()
14017 call.
14018 * valops.c (value_ref, value_rtti_indirect_type): Use
14019 lookup_lvalue_reference_type() instead of lookup_reference_type().
14020
14021 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14022
14023 PR gdb/14441
14024 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14025 (TYPE_IS_REFERENCE): New macro.
14026 (struct type): Add rvalue_reference_type field.
14027 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14028
14029 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14030
14031 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14032 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14033 New function definition.
14034 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14035 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14036 New function declaration.
14037 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14038 * mi/mi-interp.h: New file.
14039 * solib.c (info_sharedlibrary_command): Replace for loop with
14040 ALL_SO_LIBS macro
14041 * solib.h (update_solib_list): New function declaration.
14042 (so_list_head): Move macro.
14043 * solist.h (ALL_SO_LIBS): New macro.
14044
14045 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14046
14047 * infcmd.c (post_create_inferior): Remove unused argument in
14048 call to solib_add.
14049 * remote.c (remote_start_remote): Likewise.
14050 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14051 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14052 (enable_break): Likewise.
14053 * solib.c (update_solib_list): Remove unused target argument
14054 and its documentation.
14055 (solib_add): Remove unused target argument. Remove unused
14056 argument in call to update_solib_list.
14057 (info_sharedlibrary_command): Remove unused argument in call
14058 to update_solib_list.
14059 (sharedlibrary_command): Remove unused argument in call to
14060 solib_add.
14061 (handle_solib_event): Likewise.
14062 (reload_shared_libraries): Likewise.
14063 * solib.h (solib_add): Remove unused target argument.
14064
14065 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14066
14067 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14068 (s390_displaced_step_fixup): Cover relative branches with the
14069 default fixup handling. This fixes lack of support for some
14070 relative branch instructions.
14071
14072 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14073
14074 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14075 ptid from regcache.
14076
14077 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14078
14079 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14080 i386_darwin_store_inferior_registers): Use ptid from regcache.
14081
14082 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14083
14084 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14085 i386bsd_store_inferior_registers): Use ptid from regcache.
14086
14087 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14088
14089 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14090 hppaobsd_store_registers): Use ptid from regcache.
14091
14092 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14093
14094 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14095 hppanbsd_store_registers): Use ptid from regcache.
14096
14097 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14098
14099 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14100 from regcache. Use get_ptrace_pid.
14101
14102 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14103
14104 * corelow.c (get_core_register_section): Use ptid from regcache,
14105 update doc.
14106
14107 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14108
14109 * bsd-uthread.c (bsd_uthread_fetch_registers,
14110 bsd_uthread_store_registers): Use ptid from regcache, set and
14111 restore inferior_ptid.
14112
14113 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14114
14115 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14116 fetch_fp_regs, store_register, store_regs, store_fp_register,
14117 store_fp_regs): Use ptid from regcache.
14118
14119 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14120
14121 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14122 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14123 store_vfp_regs): Use ptid from regcache.
14124
14125 2017-03-17 Pedro Alves <palves@redhat.com>
14126
14127 PR remote/21188
14128 * ser-base.c (ser_base_wait_for): Add comment.
14129 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14130 version.
14131 * ser-unix.c (hardwire_raw): Remove reference to
14132 scb->current_timeout.
14133 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14134 (hardwire_ops): Install ser_base_readchar instead of
14135 hardwire_readchar.
14136 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14137 Remove fields.
14138
14139 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14140
14141 PR gdb/19637
14142 * python/lib/gdb/printer/bound_registers.py: Add support for
14143 Python 3.
14144
14145 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14146
14147 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14148 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14149 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14150 byte_offset to subobj_byte_offset. Fix the handling of
14151 DWARF_VALUE_STACK on big-endian targets when coming via an
14152 implicit pointer.
14153 (dwarf2_evaluate_loc_desc): Adjust call to
14154 dwarf2_evaluate_loc_desc_full.
14155 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14156 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14157
14158 2017-03-16 Yao Qi <yao.qi@linaro.org>
14159
14160 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14161 and REVSH instructions.
14162
14163 2017-03-16 Yao Qi <yao.qi@linaro.org>
14164
14165 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14166 (arm_record_test): Declare.
14167 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14168 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14169 align with the manual.
14170 (thumb_record_misc): Adjust the code order to align with the
14171 manual.
14172 (thumb2_record_decode_insn_handler): Fix instruction matching.
14173 (instruction_reader_thumb): New class.
14174 (arm_record_test): New function.
14175
14176 2017-03-16 Yao Qi <yao.qi@linaro.org>
14177
14178 * arm-tdep.c (abstract_memory_reader): New class.
14179 (instruction_reader): New class.
14180 (extract_arm_insn): Add argument 'reader'. Callers updated.
14181 (decode_insn): Likewise.
14182
14183 2017-03-16 Doug Evans <dje@google.com>
14184
14185 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14186 member. Change type of TYPE member to SCM. All uses updated.
14187 (lsscm_make_lazy_string_smob): Add assert.
14188 (lsscm_make_lazy_string): Flag bad length values.
14189 (lsscm_elt_type): New function.
14190 (gdbscm_lazy_string_to_value): Rewrite to use
14191 lsscm_safe_lazy_string_to_value.
14192 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14193 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14194 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14195 in incoming type.
14196 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14197 * guile/scm-type.c (tyscm_scm_to_type): New function.
14198
14199 2017-03-15 Doug Evans <dje@google.com>
14200
14201 PR python/17728, python/18439, python/18779
14202 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14203 member. Change type of TYPE member to PyObject *. All uses updated.
14204 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14205 (gdbpy_create_lazy_string_object): Flag bad length values.
14206 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14207 Handle typedefs in incoming type.
14208 (stpy_lazy_string_elt_type): New function.
14209 (gdbpy_extract_lazy_string): Call it.
14210 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14211 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14212 typedefs in incoming type.
14213
14214 2017-03-16 Doug Evans <dje@google.com>
14215
14216 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14217 * guile/scm-type.c (tyscm_scm_to_type): New function.
14218
14219 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14220
14221 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14222 "ULONGEST" for "skip".
14223
14224 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14225
14226 PR gdb/21220
14227 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14228 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14229 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14230 over ptrace peek/poke until end of buffer or error.
14231
14232 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14233
14234 * parse.c (length_of_subexp): Make static.
14235 * parser-defs.h (length_of_subexp): Remove.
14236
14237 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14238
14239 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14240 as well.
14241
14242 2017-03-14 Pedro Alves <palves@redhat.com>
14243
14244 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14245 (main): Use std::unique_ptr. Remove calls to
14246 cp_demangled_name_parse_free.
14247
14248 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14249
14250 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14251 alphabsd_store_inferior_registers): Use regcache->ptid instead
14252 of inferior_ptid.
14253
14254 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14255
14256 * aix-thread.c (aix_thread_fetch_registers,
14257 aix_thread_store_registers): Use regcache->ptid instead of
14258 inferior_ptid.
14259
14260 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14261
14262 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14263 store_gregs_to_thread, fetch_fpregs_from_thread,
14264 store_fpregs_to_thread): Use regcache->ptid instead of
14265 inferior_ptid.
14266
14267 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14268
14269 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14270 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14271 instead of inferior_ptid.
14272
14273 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14274
14275 * target.c (target_fetch_registers, target_store_registers): Add
14276 assert.
14277
14278 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14279
14280 * regcache.h (regcache_get_ptid): New function.
14281 * regcache.c (regcache_get_ptid): New function.
14282
14283 2017-03-13 Mark Wielaard <mark@klomp.org>
14284
14285 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14286
14287 2017-03-10 Keith Seitz <keiths@redhat.com>
14288
14289 PR c++/8218
14290 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14291
14292 2017-03-08 Pedro Alves <palves@redhat.com>
14293
14294 PR gdb/18360
14295 * infrun.c (start_step_over, do_target_resume, resume)
14296 (restart_threads): Assert we're not resuming a thread that is
14297 meant to be stopped.
14298 (infrun_thread_stop_requested_callback): Delete.
14299 (infrun_thread_stop_requested): If the thread is internally
14300 stopped, queue a pending stop event and clear the thread's
14301 inline-frame state.
14302 (handle_stop_requested): New function.
14303 (handle_syscall_event, handle_inferior_event_1): Use
14304 handle_stop_requested.
14305 (handle_stop_requested): New function.
14306 (handle_signal_stop): Set the thread's stop_signal here instead of
14307 at caller.
14308 (finish_step_over): Clear step over info unconditionally.
14309 (handle_signal_stop): If the user had interrupted the event
14310 thread, consider the stop a random signal.
14311 (handle_signal_stop) <signal arrived while stepping over
14312 breakpoint>: Don't restart threads here.
14313 (stop_waiting): Don't clear step-over info here.
14314
14315 2017-03-08 Pedro Alves <palves@redhat.com>
14316
14317 PR 21206
14318 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14319 goes to argument 2, not 1.
14320
14321 2017-03-08 Pedro Alves <palves@redhat.com>
14322
14323 PR cli/21218
14324 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14325 display_gdb_prompt.
14326 (command_line_input): Add comment.
14327
14328 2017-03-08 Pedro Alves <palves@redhat.com>
14329
14330 PR tui/21216
14331 * tui/tui-file.c (tui_file::write): New.
14332 * tui/tui-file.h (tui_file): Override "write".
14333 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14334 factored out from ...
14335 (tui_puts): ... here.
14336 (tui_putc): Use them.
14337 (tui_write): New function.
14338 * tui/tui-io.h (tui_write): Declare.
14339
14340 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14341
14342 * Makefile.in (SFILES): Replace "environ.c" with
14343 "common/environ.c".
14344 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14345 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14346 to...
14347 * common/environ.c: ... here.
14348 * environ.h: Moved to...
14349 * common/environ.h: ... here.
14350
14351 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14352
14353 * gdbarch.sh (pstring_ptr): New static function.
14354 (gdbarch_disassembler_options): Use it.
14355 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14356 not valid_disassembler_option->name.
14357 * gdbarch.c: Regenerate.
14358
14359 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14360
14361 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14362
14363 2017-03-07 Pedro Alves <palves@redhat.com>
14364
14365 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14366
14367 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14368
14369 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14370 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14371 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14372 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14373
14374 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14375
14376 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14377
14378 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14379
14380 * remote.c (remote_add_target_side_commands): Use range-based
14381 for loop.
14382
14383 2017-03-03 Yao Qi <yao.qi@linaro.org>
14384
14385 PR gdb/21165
14386 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14387 value is lazy.
14388 * valprint.c (common_val_print): Likewise.
14389
14390 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14391
14392 * NEWS: Mention new set/show disassembler-options commands.
14393 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14394 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14395 (prospective_options): New static variable.
14396 (gdb_disassembler::gdb_disassembler): Initialize
14397 m_di.disassembler_options.
14398 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14399 (get_disassembler_options): New function.
14400 (set_disassembler_options): Likewise.
14401 (set_disassembler_options_sfunc): Likewise.
14402 (show_disassembler_options_sfunc): Likewise.
14403 (disassembler_options_completer): Likewise.
14404 (_initialize_disasm): Likewise.
14405 * disasm.h (get_disassembler_options): New prototype.
14406 (set_disassembler_options): Likewise.
14407 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14408 (gdbarch_verify_disassembler_options): Likewise.
14409 * gdbarch.c: Regenerate.
14410 * gdbarch.h: Likewise.
14411 * arm-tdep.c (num_disassembly_options): Delete.
14412 (set_disassembly_style): Likewise.
14413 (arm_disassembler_options): New static variable.
14414 (set_disassembly_style_sfunc): Convert short style name into long
14415 option name. Call set_disassembler_options.
14416 (show_disassembly_style_sfunc): New function.
14417 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14418 set_gdbarch_verify_disassembler_options.
14419 (_initialize_arm_tdep): Delete regnames variable and update callers.
14420 (arm_disassembler_options): Initialize.
14421 (disasm_options): New variable.
14422 (num_disassembly_options): Rename from this...
14423 (num_disassembly_styles): ...to this. Compute by scanning through
14424 disasm_options.
14425 (valid_disassembly_styles): Initialize using disasm_options.
14426 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14427 set_arm_regname_option.
14428 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14429 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14430 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14431 set_gdbarch_verify_disassembler_options.
14432 * s390-tdep.c (s390_disassembler_options): New static variable.
14433 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14434 set_gdbarch_verify_disassembler_options.
14435
14436 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14437
14438 * remote.c (remote_add_target_side_condition): Remove "struct"
14439 keyword from range-based for loop.
14440
14441 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14442
14443 * remote.c (remote_add_target_side_condition): Use range-based
14444 for loop. Update comment.
14445
14446 2017-02-27 Yao Qi <yao.qi@linaro.org>
14447
14448 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14449
14450 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14451
14452 * regcache.c (regcache_raw_update): New function.
14453 (regcache_raw_read): Move code to regcache_raw_update.
14454 * regcache.h (regcache_raw_update): New declaration.
14455 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14456
14457 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14458
14459 * dwarf2read.c (create_debug_type_hash_table): Initialize
14460 header.signature and header.type_offset_in_tu.
14461
14462 2017-02-24 Pedro Alves <palves@redhat.com>
14463
14464 * symtab.c (make_file_symbol_completion_list_1): Use
14465 add_symtab_completions.
14466
14467 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14468
14469 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14470
14471 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14472
14473 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14474 I386_MAX_REGISTER_SIZE.
14475 (i386_pseudo_register_write): Likewise.
14476 (i386_process_record): Likewise.
14477 * i387-tdep.c (i387_supply_xsave): Likewise.
14478 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14479 (store_register): Likewise.
14480
14481 2017-02-23 Pedro Alves <palves@redhat.com>
14482
14483 * ada-lang.c: Include "common/function-view.h".
14484 (ada_iterate_over_symbols): Adjust to use function_view as
14485 callback type.
14486 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14487 (ada_make_symbol_completion_list): Use a lambda.
14488 (ada_exc_search_name_matches): Delete.
14489 (name_matches_regex): New.
14490 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14491 * compile/compile-c-support.c: Include "common/function-view.h".
14492 (print_one_macro): Change prototype to accept a ui_file pointer.
14493 (write_macro_definitions): Use a lambda.
14494 * dwarf2read.c: Include "common/function-view.h".
14495 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14496 (dw2_expand_symtabs_matching): Adjust to use function_view as
14497 callback type.
14498 * language.h: Include "common/function-view.h".
14499 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14500 function_view as callback type.
14501 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14502 * linespec.c: Include "common/function-view.h".
14503 (collect_info::add_symbol): New method.
14504 (struct symbol_and_data_callback, iterate_inline_only, struct
14505 symbol_matcher_data, iterate_name_matcher): Delete.
14506 (iterate_over_all_matching_symtabs): Adjust to use function_view
14507 as callback type and lambdas.
14508 (iterate_over_file_blocks): Adjust to use function_view as
14509 callback type.
14510 (decode_compound_collector): Now a class with private fields.
14511 (decode_compound_collector::release_symbols): New method.
14512 (collect_one_symbol): Rename to...
14513 (decode_compound_collector::operator()): ... this and adjust.
14514 (lookup_prefix_sym): decode_compound_collector construction bits
14515 move to decode_compound_collector ctor. Pass the
14516 decode_compound_collector object directly as callback. Remove
14517 cleanups and use decode_compound_collector::release_symbols
14518 instead.
14519 (symtab_collector): Now a class with private fields.
14520 (symtab_collector::release_symtabs): New method.
14521 (add_symtabs_to_list): Rename to...
14522 (symtab_collector::operator()): ... this and adjust.
14523 (collect_symtabs_from_filename): symtab_collector construction
14524 bits move to symtab_collector ctor. Pass the symtab_collector
14525 object directly as callback. Remove cleanups and use
14526 symtab_collector::release_symtabs instead.
14527 (collect_symbols): Delete.
14528 (add_matching_symbols_to_info): Use lambdas.
14529 * macrocmd.c (print_macro_callback): Delete.
14530 (info_macro_command): Use a lambda.
14531 (info_macros_command): Pass print_macro_definition as callable
14532 directly.
14533 (print_one_macro): Remove 'ignore' parameter.
14534 (macro_list_command): Adjust.
14535 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14536 (macro_for_each_data::user_data): Delete field.
14537 (foreach_macro): Adjust to call the function_view.
14538 (macro_for_each): Adjust to use function_view as callback type.
14539 (foreach_macro_in_scope): Adjust to call the function_view.
14540 (macro_for_each_in_scope): Adjust to use function_view as callback
14541 type.
14542 * macrotab.h: Include "common/function-view.h".
14543 (macro_callback_fn): Declare a prototype instead of a pointer.
14544 Remove "user_data" parameter.
14545 (macro_for_each, macro_for_each_in_scope): Adjust to use
14546 function_view as callback type.
14547 * psymtab.c (partial_map_expand_apply)
14548 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14549 Adjust to use function_view as callback type and to return bool.
14550 (psym_expand_symtabs_matching): Adjust to use function_view as
14551 callback types.
14552 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14553 to use function_view as callback type and to return bool.
14554 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14555 callback types.
14556 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14557 as callback types.
14558 * symfile.h: Include "common/function-view.h".
14559 (expand_symtabs_file_matcher_ftype)
14560 (expand_symtabs_symbol_matcher_ftype)
14561 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14562 return bool.
14563 (quick_symbol_functions::map_symtabs_matching_filename)
14564 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14565 function_view as callback type and return bool.
14566 (expand_symtabs_matching): Adjust to use function_view as callback
14567 type.
14568 (maintenance_expand_name_matcher)
14569 (maintenance_expand_file_matcher): Delete.
14570 (maintenance_expand_symtabs): Use lambdas.
14571 * symtab.c (iterate_over_some_symtabs): Adjust to use
14572 function_view as callback types and return bool.
14573 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14574 of a cleanup.
14575 (lookup_symtab_callback): Delete.
14576 (lookup_symtab): Use a lambda.
14577 (iterate_over_symbols): Adjust to use function_view as callback
14578 type.
14579 (struct search_symbols_data, search_symbols_file_matches)
14580 (search_symbols_name_matches): Delete.
14581 (search_symbols): Use a pair of lambdas.
14582 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14583 (symtab_expansion_callback): Delete.
14584 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14585 * symtab.h: Include "common/function-view.h".
14586 (iterate_over_some_symtabs): Adjust to use function_view as
14587 callback type and return bool.
14588 (iterate_over_symtabs): Adjust to use function_view as callback
14589 type.
14590 (symbol_found_callback_ftype): Remove 'data' parameter and return
14591 bool.
14592 (iterate_over_symbols): Adjust to use function_view as callback
14593 type.
14594
14595 2017-02-23 Pedro Alves <palves@redhat.com>
14596
14597 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14598 (%.o) <unittests/%.c>: New pattern.
14599 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14600 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14601 * common/function-view.h: New file.
14602 * unittests/function-view-selftests.c: New file.
14603 * configure: Regenerate.
14604
14605 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14606
14607 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14608 inferior_ptid.
14609 * go32-nat.c (go32_thread_alive): Likewise.
14610
14611 2017-02-23 Yao Qi <yao.qi@linaro.org>
14612
14613 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14614 delete.
14615
14616 2017-02-23 Yao Qi <yao.qi@linaro.org>
14617
14618 * varobj.c (varobj_clear_saved_item): Use delete instead of
14619 xfree.
14620 (update_dynamic_varobj_children): Likewise.
14621
14622 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14623
14624 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14625
14626 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14627
14628 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14629 m_enum_value to 0 in default constructor.
14630
14631 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14632
14633 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14634 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14635 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14636 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14637 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14638 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14639 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14640 IS_STORE_CONDITIONAL_INSN.
14641
14642 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14643
14644 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14645
14646 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14647
14648 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14649
14650 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14651
14652 * dwarf2read.c (skip_one_die, read_attribute_value)
14653 (dwarf2_const_value_attr, dump_die_shallow)
14654 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14655 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14656
14657 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14658
14659 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14660 (dwarf_parse_macro_header): Accept DWARF version 5.
14661 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14662
14663 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14664
14665 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14666 DW_AT_GNU_*.
14667 * common/common-exceptions.h (enum errors): Likewise.
14668 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14669 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14670 (dwarf_expr_context::execute_stack_op): Likewise.
14671 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14672 Likewise.
14673 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14674 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14675 (show_entry_values_debug, call_site_to_target_addr)
14676 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14677 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14678 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14679 (value_of_dwarf_block_entry, indirect_pieced_value)
14680 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14681 (disassemble_dwarf_expression): Likewise.
14682 * dwarf2read.c (process_die, inherit_abstract_dies)
14683 (read_call_site_scope): Likewise.
14684 * gdbtypes.h (struct func_type, struct call_site_parameter)
14685 (struct call_site): Likewise.
14686 * stack.c (read_frame_arg): Likewise.
14687 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14688
14689 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14690
14691 * defs.h (read_unsigned_leb128): New declaration.
14692 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14693 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14694 (dwarf2_find_location_expression): Call also
14695 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14696 * dwarf2loc.h (dwarf2_version): New declaration.
14697 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14698 rnglists.
14699 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14700 .debug_rnglists.
14701 (struct dwop_section_names): Add loclists_dwo.
14702 (dwop_section_names): Add .debug_loclists.dwo.
14703 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14704 (struct dwarf2_per_cu_data): Add dwarf_version.
14705 (struct dwo_sections): Add loclists.
14706 (struct attr_abbrev): Add implicit_const.
14707 (read_indirect_line_string): New declaration.
14708 (read_unsigned_leb128): Delete declaration.
14709 (rcuh_kind): New definition.
14710 (read_and_check_comp_unit_head): Change parameter
14711 is_debug_types_section to section_kind.
14712 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14713 (read_comp_unit_head): Change parameter abfd to section, add parameter
14714 section_kind. Handle DWARF-5.
14715 (error_check_comp_unit_head): Accept also DWARF version 5.
14716 (read_and_check_comp_unit_head): Change parameter
14717 is_debug_types_section to section_kind.
14718 (read_and_check_type_unit_head): Delete function.
14719 (read_abbrev_offset): Handle DWARF-5.
14720 (create_debug_type_hash_table): Add parameter section_kind. Process
14721 only DW_UT_type. Use signature and type_offset_in_tu from struct
14722 comp_unit_head.
14723 (create_debug_types_hash_table): Update create_debug_type_hash_table
14724 caller.
14725 (create_all_type_units): Call create_debug_type_hash_table.
14726 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14727 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14728 caller.
14729 (skip_one_die): Handle DW_FORM_implicit_const.
14730 (dwarf2_rnglists_process): New function.
14731 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14732 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14733 (read_attribute_value): Handle DW_FORM_implicit_const,
14734 DW_FORM_line_strp.
14735 (read_attribute): Handle DW_FORM_implicit_const.
14736 (read_indirect_string_at_offset_from): New function from
14737 read_indirect_string_at_offset.
14738 (read_indirect_string_at_offset): Call
14739 read_indirect_string_at_offset_from.
14740 (read_indirect_line_string_at_offset): New function.
14741 (read_indirect_string): New function comment.
14742 (read_indirect_line_string): New function.
14743 (read_unsigned_leb128): Make it global.
14744 (dwarf2_string_attr): Handle DWARF-5.
14745 (add_include_dir_stub, read_formatted_entries): New functions.
14746 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14747 Handle DWARF-5.
14748 (per_cu_header_read_in): Update read_comp_unit_head caller.
14749 (dwarf2_version): New function.
14750 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14751 rnglists.
14752 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14753 fields.
14754
14755 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14756
14757 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14758
14759 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14760
14761 * dwarf2read.c (dwarf2_ranges_process): New function from
14762 dwarf2_ranges_read.
14763 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14764 dwarf2_ranges_process.
14765
14766 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14767
14768 * dwarf2read.c (create_debug_type_hash_table): New function from
14769 create_debug_types_hash_table.
14770 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14771 (create_all_type_units, open_and_init_dwo_file): Update
14772 create_debug_types_hash_table callers.
14773
14774 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14775
14776 PR gdb/16188
14777 * fork-child.c (trace_start_error): Fix thinko. va_end should
14778 refer to 'ap', not 'args'.
14779
14780 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14781 Pedro Alves <palves@redhat.com>
14782
14783 PR gdb/16188
14784 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14785 calls succeeded.
14786 * fork-child.c (trace_start_error): New function.
14787 (trace_start_error_with_name): Likewise.
14788 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14789 * inf-ptrace.c (inf_ptrace_me): Likewise.
14790 * inferior.h (trace_start_error): New prototype.
14791 (trace_start_error_with_name): Likewise.
14792
14793 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14794
14795 PR gdb/21164
14796 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14797 NULL before using it.
14798 * symmisc.c (maintenance_print_symbols): Likewise.
14799 (maintenance_print_msymbols): Likewise.
14800
14801 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14802
14803 * NEWS: Add record Python bindings entry.
14804
14805 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14806
14807 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14808 py-record-full.o.
14809 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14810 * python/py-record-btrace.c, python/py-record-btrace.h,
14811 python/py-record-full.c, python/py-record-full.h: New file.
14812 * python/py-record.c: Add include for py-record-btrace.h and
14813 py-record-full.h.
14814 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14815 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14816 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14817 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14818 New definition.
14819 (gdbpy_initialize_btrace): New export.
14820 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14821
14822 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14823
14824 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14825 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14826 * python/py-record.c: New file.
14827 * python/python-internal.h (gdbpy_start_recording,
14828 gdbpy_current_recording, gdpy_stop_recording,
14829 gdbpy_initialize_record): New export.
14830 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14831 (python_GdbMethods): Add gdbpy_start_recording,
14832 gdbpy_current_recording and gdbpy_stop_recording.
14833
14834 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14835
14836 * record-btrace.c (record_btrace_record_method): New function.
14837 (init_record_btrace_ops): Initialize to_record_method.
14838 * record-full.c (record_full_record_method): New function.
14839 (init_record_full_ops, init_record_full_core_ops): Add
14840 record_full_record_method.
14841 * record.h (enum record_method): New enum.
14842 * target-debug.h (target_debug_print_enum_record_method: New define.
14843 * target-delegates.c: Regenerate.
14844 * target.c (target_record_method): New function.
14845 * target.h: Include record.h.
14846 (struct target_ops) <to_record_method>: New field.
14847 (target_record_method): New export.
14848
14849 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14850
14851 * record.h (record_start, record_stop): New export.
14852 * record.c (record_start, record_stop): New function.
14853
14854 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14855
14856 * btrace.c (btrace_fetch): Copy function call segments pointer
14857 into a vector.
14858 (btrace_clear): Clear the vector.
14859 (btrace_find_insn_by_number): Use binary search to find the correct
14860 function call segment.
14861 * btrace.h (brace_fun_p): New typedef.
14862 (struct btrace_thread_info) <functions>: New field.
14863
14864 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14865
14866 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14867 * btrace.c (btrace_decode_error): ... here. New function.
14868 * btrace.h (btrace_decode_error): New export.
14869
14870 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14871
14872 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14873 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14874 btrace_find_insn_by_number): Remove special case for gaps.
14875 * btrace.h (btrace_insn_get_error): New export.
14876 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14877 * record-btrace.c (btrace_insn_history): Print number for gaps.
14878 (record_btrace_info, record_btrace_goto): Handle gaps.
14879
14880 2017-02-14 Tom Tromey <tom@tromey.com>
14881
14882 PR python/13598:
14883 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14884 event.
14885 * python/py-evts.c (gdbpy_initialize_py_events): Add
14886 before_prompt registry.
14887 * python/py-events.h (events_object) <before_prompt>: New field.
14888
14889 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14890
14891 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14892
14893 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14894
14895 * symfile (_initialize_symfile): Add usage text to the load command's
14896 help text.
14897
14898 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14899
14900 * utils.c (defaulted_query): Don't query on secondary UIs.
14901
14902 2017-02-10 Tom Tromey <tom@tromey.com>
14903
14904 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14905
14906 2017-02-10 Tom Tromey <tom@tromey.com>
14907
14908 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14909 "cleanup" local.
14910 * python/py-type.c (typy_legacy_template_argument): Remove
14911 unnecessary "cleanup" local.
14912
14913 2017-02-10 Tom Tromey <tom@tromey.com>
14914
14915 * python/python.c (do_start_initialization): New function, from
14916 _initialize_python.
14917 (_initialize_python): Call do_start_initialization.
14918 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14919 goto.
14920
14921 2017-02-10 Tom Tromey <tom@tromey.com>
14922
14923 * python/py-prettyprint.c (pretty_print_one_value): Use
14924 gdbpy_ref.
14925
14926 2017-02-10 Tom Tromey <tom@tromey.com>
14927
14928 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14929 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14930 gdbpy_ref.
14931 * python/py-type.c (field_new): Use gdbpy_ref.
14932 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14933 gdbpy_ref.
14934 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14935 (py_free_pspace): Likewise.
14936 (pspace_to_pspace_object): Likewise.
14937 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14938 (py_free_objfile): Likewise.
14939 (objfile_to_objfile_object): Likewise.
14940 * python/py-inferior.c (delete_thread_object): Use
14941 gdbpy_ref.
14942 (infpy_read_memory): Likewise.
14943 (py_free_inferior): Likewise.
14944 * python/py-evtregistry.c (create_eventregistry_object): Use
14945 gdbpy_ref.
14946 * python/py-event.c (create_event_object): Use gdbpy_ref.
14947
14948 2017-02-10 Tom Tromey <tom@tromey.com>
14949
14950 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14951 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14952 used.
14953 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14954 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14955 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14956 python/py-framefilter.c, python/py-function.c,
14957 python/py-inferior.c, python/py-infevents.c,
14958 python/py-linetable.c, python/py-newobjfileevent.c,
14959 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14960 python/py-signalevent.c, python/py-stopevent.c,
14961 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14962 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14963 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14964 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14965
14966 2017-02-10 Tom Tromey <tom@tromey.com>
14967
14968 * ui-out.h (ui_out_emit_type): New class.
14969 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14970 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14971 and ui_out_emit_tuple.
14972 (enumerate_locals): Likewise.
14973 (py_mi_print_variables, py_print_locals, py_print_args): Use
14974 ui_out_emit_list.
14975 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14976 ui_out_emit_list.
14977 * common/gdb_optional.h: New file.
14978
14979 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14980
14981 * MAINTAINERS (Write After Approval): Update my e-mail address.
14982
14983 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14984
14985 PR gdb/21122
14986 * breakpoint.c (_initialize_breakpoint): Update the help description
14987 of the 'commands' command to indicate that it takes a list argument.
14988
14989 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14990
14991 * interps.c (current_interp_set_logging): Remove "return".
14992
14993 2017-02-09 Gary Benson <gbenson@redhat.com>
14994
14995 * symtab.c (add_symtab_completions): Prevent NULL pointer
14996 dereference.
14997
14998 2017-02-08 Pedro Alves <palves@redhat.com>
14999
15000 * interps.c (interp::interp): Remove reference to quiet_p.
15001 (interp_set): Make static. Remove dead "Switching to" output
15002 code.
15003 (interp_quiet_p, interp_set_quiet): Delete.
15004 (interpreter_exec_cmd): Don't set the interpreter quiet.
15005 * interps.h (interp_quiet_p): Make static.
15006 (class interp) <quiet_p>: Remove field
15007
15008 2017-02-08 Jerome Guitton <guitton@adacore.com>
15009
15010 * cli/cli-decode.c (find_command_name_length): Make it extern.
15011 * cli/cli-decode.h (find_command_name_length): Declare.
15012 * cli/cli-script.c (command_name_equals, line_first_arg):
15013 New functions.
15014 (process_next_line): Use cli-decode to parse command names.
15015 (build_command_line): Make args a constant pointer.
15016
15017 2017-02-08 Jerome Guitton <guitton@adacore.com>
15018
15019 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15020 Remove case-insensitive search.
15021
15022 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15023
15024 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15025 at the end of the line. Avoids an ARI warning.
15026
15027 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15028
15029 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15030 rdseed instructions.
15031 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15032
15033 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15034
15035 PR tdep/20936
15036 Provide and use sparc32 and sparc64 target description XML files.
15037 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15038 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15039 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15040 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15041 * features/sparc/sparc32-solaris.xml: New file.
15042 * features/sparc/sparc64-solaris.xml: New file.
15043 * features/sparc/sparc32-solaris.c: Generated.
15044 * features/sparc/sparc64-solaris.c: Generated.
15045 * sparc-tdep.h: Account for differences in target descriptions.
15046 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15047 (sparc32_register_type): Use target provided registers.
15048 (validate_tdesc_registers): New function.
15049 (sparc32_gdbarch_init): Use tdesc_has_registers.
15050 Set pseudoregister functions.
15051 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15052 (sparc64_register_type): Use target provided registers.
15053 (sparc64_init_abi): Set pseudoregister functions.
15054
15055 2017-02-03 Tom Tromey <tom@tromey.com>
15056
15057 PR rust/21097:
15058 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15059 with a single member.
15060
15061 2017-02-03 Pedro Alves <palves@redhat.com>
15062
15063 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15064 (cli_interp_base::~cli_interp_base): New.
15065 (cli_interp): New struct.
15066 (as_cli_interp): Cast the interp itself to cli_interp.
15067 (cli_interpreter_pre_command_loop): Rename to ...
15068 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15069 parameter.
15070 (cli_interpreter_init): Rename to ...
15071 (cli_interp::init): ... this. Remove 'self' parameter. Use
15072 boolean. Make extern.
15073 (cli_interpreter_resume): Rename to ...
15074 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15075 extern.
15076 (cli_interpreter_suspend): Rename to ...
15077 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15078 extern.
15079 (cli_interpreter_exec): Rename to ...
15080 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15081 extern.
15082 (cli_interpreter_supports_command_editing): Rename to ...
15083 (cli_interp_base::supports_command_editing): ... this. Remove
15084 'interp' parameter. Make extern.
15085 (cli_ui_out): Rename to ...
15086 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15087 Make extern.
15088 (cli_set_logging): Rename to ...
15089 (cli_interp_base::set_logging): ... this. Remove 'interp'
15090 parameter. Make extern.
15091 (cli_interp_procs): Delete.
15092 (cli_interp_factory): Adjust to use "new".
15093 * cli/cli-interp.h: Include "interps.h".
15094 (struct cli_interp_base): New struct.
15095 * interps.c (struct interp): Delete. Fields moved to interps.h.
15096 (interp_new): Delete.
15097 (interp::interp, interp::~interp): New.
15098 (interp_set): Use bool, and return void. Assume the interpreter
15099 has suspend, init and resume methods, and that the all return
15100 void.
15101 (set_top_level_interpreter): interp_set returns void.
15102 (interp_ui_out): Adapt.
15103 (current_interp_set_logging): Adapt.
15104 (interp_data): Delete.
15105 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15106 (interp_exec): Adapt.
15107 (top_level_interpreter_data): Delete.
15108 * interps.h (interp_init_ftype, interp_resume_ftype)
15109 (interp_suspend_ftype, interp_exec_ftype)
15110 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15111 (class interp): New.
15112 (interp_new): Delete.
15113 (interp_set): Now returns void. Use bool.
15114 (interp_data, top_level_interpreter_data): Delete.
15115 * mi/mi-common.h: Include interps.h.
15116 (class mi_interp): Inherit from interp. Define a ctor. Declare
15117 init, resume, suspect, exec, interp_ui_out, set_logging and
15118 pre_command_loop methods.
15119 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15120 (mi_interpreter_init): Rename to ...
15121 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15122 bool, return void and make extern. Adjust.
15123 (mi_interpreter_resume): ... Rename to ...
15124 (mi_interp::resume): ... this. Remove the 'data' parameter,
15125 return void and make extern. Adjust.
15126 (mi_interpreter_suspend): ... Rename to ...
15127 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15128 return void and make extern. Adjust.
15129 (mi_interpreter_exec): ... Rename to ...
15130 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15131 extern. Adjust.
15132 (mi_interpreter_pre_command_loop): ... Rename to ...
15133 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15134 parameter and make extern.
15135 (mi_on_normal_stop_1): Adjust.
15136 (mi_ui_out): Rename to ...
15137 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15138 parameter and make extern. Adjust.
15139 (mi_set_logging): Rename to ...
15140 (mi_interp::set_logging): ... this. Remove the 'interp'
15141 parameter and make extern. Adjust.
15142 (mi_interp_procs): Delete.
15143 (mi_interp_factory): Adjust to use 'new'.
15144 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15145 (mi_print_exception, mi_execute_command, mi_load_progress):
15146 Adjust.
15147 * tui/tui-interp.c (tui_interp): New class.
15148 (as_tui_interp): Return a tui_interp pointer.
15149 (tui_on_normal_stop, tui_on_signal_received)
15150 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15151 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15152 to use interp::interp_ui_out.
15153 (tui_init): Rename to ...
15154 (tui_interp::init): ... this. Remove the 'self' parameter, use
15155 bool, return void and make extern. Adjust.
15156 (tui_resume): Rename to ...
15157 (tui_interp::resume): ... this. Remove the 'data' parameter,
15158 return void and make extern. Adjust.
15159 (tui_suspend): Rename to ...
15160 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15161 return void and make extern. Adjust.
15162 (tui_ui_out): Rename to ...
15163 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15164 parameter, and make extern. Adjust.
15165 (tui_exec): Rename to ...
15166 (tui_interp::exec): ... this. Remove the 'data' parameter and
15167 make extern.
15168 (tui_interp_procs): Delete.
15169 (tui_interp_factory): Use "new".
15170
15171 2017-02-02 Tom Tromey <tom@tromey.com>
15172
15173 * rust-exp.y (ends_raw_string, space_then_number)
15174 (rust_identifier_start_p): Return bool.
15175 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15176 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15177 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15178 (rust_chartype_p): Return bool.
15179 (val_print_struct, rust_print_struct_def, rust_print_type):
15180 Update.
15181 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15182 Return bool.
15183
15184 2017-02-02 Tom Tromey <tom@tromey.com>
15185
15186 * rust-lang.c: Reindent.
15187
15188 2017-02-02 Tom Tromey <tom@tromey.com>
15189
15190 * rust-lang.h (rust_crate_for_block): Update.
15191 * rust-lang.c (rust_crate_for_block): Return std::string.
15192 (rust_get_disr_info): Use std:;string, not
15193 gdb::unique_xmalloc_ptr.
15194 * rust-exp.y (crate_name): Update.
15195
15196 2017-02-02 Pedro Alves <palves@redhat.com>
15197
15198 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15199 field out of gdb_disassembler_test and make it static.
15200
15201 2017-02-02 Pedro Alves <palves@redhat.com>
15202
15203 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15204 mi1_interp and mi_interp fields.
15205
15206 2017-02-02 Pedro Alves <palves@redhat.com>
15207
15208 * cli/cli-interp.c (struct saved_output_files, saved_output):
15209 Moved from cli/cli-logging.c.
15210 (cli_set_logging): New function.
15211 (cli_interp_procs): Install cli_set_logging.
15212 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15213 Declare.
15214 * cli/cli-logging.c (struct saved_output_files, saved_output):
15215 Moved to cli/cli-interp.c.
15216 (pop_output_files): Don't save outputs here.
15217 (make_logging_output): New function.
15218 (handle_redirections): Don't build tee nor save previous outputs
15219 here.
15220 * interps.c (current_interp_set_logging): Change prototype.
15221 Assume there's always a set_logging_proc method installed.
15222 * interps.h (interp_set_logging_ftype): Change prototype.
15223 (current_interp_set_logging): Change prototype and adjust comment.
15224 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15225 use make_logging_output.
15226 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15227 2017-02-02 Pedro Alves <palves@redhat.com>
15228
15229 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15230 from ...
15231 (set_logging_overwrite): ... here.
15232 (logging_no_redirect_file): Delete.
15233 (set_logging_redirect): Don't handle redirection on the fly.
15234 Instead warn that "logging off" / "logging on" is necessary.
15235 (pop_output_files): Delete references to logging_no_redirect_file.
15236 (show_logging_command): Always speak in terms of what will happen
15237 once logging is reenabled.
15238
15239 2017-02-02 Pedro Alves <palves@redhat.com>
15240
15241 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15242
15243 2017-02-02 Pedro Alves <palves@redhat.com>
15244
15245 * disasm.c (gdb_pretty_print_insn): Rename to ...
15246 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15247 Remove gdbarch parameter. Adapt to clear the object's buffers
15248 instead of allocating new buffers, and to print using the object's
15249 gdb_disassembler instead of calling gdb_print_insn.
15250 (dump_insns): Use gdb_pretty_print_disassembler.
15251 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15252 (gdb_pretty_print_disassembler): New class.
15253 * record-btrace.c (btrace_insn_history): Use
15254 gdb_pretty_print_disassembler.
15255
15256 2017-02-02 Pedro Alves <palves@redhat.com>
15257
15258 * ada-lang.c (type_as_string): Use string_file.
15259 * ada-valprint.c (ada_print_floating): Use string_file.
15260 * ada-varobj.c (ada_varobj_scalar_image)
15261 (ada_varobj_get_value_image): Use string_file.
15262 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15263 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15264 * breakpoint.c (update_inserted_breakpoint_locations)
15265 (insert_breakpoint_locations, reattach_breakpoints)
15266 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15267 (print_it_watchpoint): Use string_file.
15268 (save_breakpoints): Use stdio_file.
15269 * c-exp.y (oper): Use string_file.
15270 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15271 tee_file.
15272 (pop_output_files): Use delete.
15273 (handle_redirections): Use stdio_file and tee_file.
15274 * cli/cli-setshow.c (do_show_command): Use string_file.
15275 * compile/compile-c-support.c (c_compute_program): Use
15276 string_file.
15277 * compile/compile-c-symbols.c (generate_vla_size): Take a
15278 'string_file &' instead of a 'ui_file *'.
15279 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15280 of a 'ui_file *'. Use string_file.
15281 (generate_c_for_variable_locations): Take a 'string_file &'
15282 instead of a 'ui_file *'.
15283 * compile/compile-internal.h (generate_c_for_for_one_variable):
15284 Take a 'string_file &' instead of a 'ui_file *'.
15285 * compile/compile-loc2c.c (push, pushf, unary, binary)
15286 (print_label, pushf_register_address, pushf_register)
15287 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15288 'ui_file *'. Adjust.
15289 * compile/compile.c (compile_to_object): Use string_file.
15290 * compile/compile.h (compile_dwarf_expr_to_c)
15291 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15292 'ui_file *'.
15293 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15294 (replace_typedefs_qualified_name): Use string_file and
15295 obstack_copy0.
15296 * disasm.c (gdb_pretty_print_insn): Use string_file.
15297 (gdb_disassembly): Adjust reference the null_stream global.
15298 (do_ui_file_delete): Delete.
15299 (gdb_insn_length): Use null_stream.
15300 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15301 * dwarf2loc.c (dwarf2_compile_property_to_c)
15302 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15303 'string_file &' instead of a 'ui_file *'.
15304 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15305 * dwarf2read.c (do_ui_file_peek_last): Delete.
15306 (dwarf2_compute_name): Use string_file.
15307 * event-top.c (gdb_setup_readline): Use stdio_file.
15308 * gdbarch.sh (verify_gdbarch): Use string_file.
15309 * gdbtypes.c (safe_parse_type): Use null_stream.
15310 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15311 string_file.
15312 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15313 'string_file *' instead of a 'ui_file *'.
15314 (gdbscm_arch_disassemble): Use string_file.
15315 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15316 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15317 inherits from ui_file.
15318 (ioscm_file_port_delete, ioscm_file_port_rewind)
15319 (ioscm_file_port_put): Delete.
15320 (ioscm_file_port_write): Rename to ...
15321 (ioscm_file_port::write): ... this. Remove file_port_magic
15322 checks.
15323 (ioscm_file_port_new): Delete.
15324 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15325 ui_file_up.
15326 * guile/scm-type.c (tyscm_type_name): Use string_file.
15327 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15328 Use string_file.
15329 * infcmd.c (print_return_value_1): Use string_file.
15330 * infrun.c (print_target_wait_results): Use string_file.
15331 * language.c (add_language): Use string_file.
15332 * location.c (explicit_to_string_internal): Use string_file.
15333 * main.c (captured_main_1): Use null_file.
15334 * maint.c (maintenance_print_architecture): Use stdio_file.
15335 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15336 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15337 event_channel>: Change type to mi_console_file pointer.
15338 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15339 (mi_console_file_delete): Delete.
15340 (struct mi_console_file): Delete.
15341 (mi_console_file_magic): Delete.
15342 (mi_console_file_new): Delete.
15343 (mi_console_file::mi_console_file): New.
15344 (mi_console_file_delete): Delete.
15345 (mi_console_file_fputs): Delete.
15346 (mi_console_file::write): New.
15347 (mi_console_raw_packet): Delete.
15348 (mi_console_file::flush): New.
15349 (mi_console_file_flush): Delete.
15350 (mi_console_set_raw): Rename to ...
15351 (mi_console_file::set_raw): ... this.
15352 * mi/mi-console.h (class mi_console_file): New class.
15353 (mi_console_file_new, mi_console_set_raw): Delete.
15354 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15355 (mi_set_logging): Use delete and tee_file. Adjust.
15356 * mi/mi-main.c (output_register): Use string_file.
15357 (mi_cmd_data_evaluate_expression): Use string_file.
15358 (mi_cmd_data_read_memory): Use string_file.
15359 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15360 * mi/mi-out.c (mi_ui_out::main_stream): New.
15361 (mi_ui_out::rewind): Use main_stream and
15362 string_file.
15363 (mi_ui_out::put): Use main_stream and string_file.
15364 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15365 Allocate a 'string_file' instead.
15366 (mi_out_new): Don't allocate a mem_fileopen stream here.
15367 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15368 (mi_ui_out::main_stream): Declare method.
15369 * printcmd.c (eval_command): Use string_file.
15370 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15371 * python/py-arch.c (archpy_disassemble): Use string_file.
15372 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15373 * python/py-frame.c (frapy_str): Use string_file.
15374 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15375 Use string_file.
15376 * python/py-type.c (typy_str): Use string_file.
15377 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15378 * python/py-value.c (valpy_str): Use string_file.
15379 * record-btrace.c (btrace_insn_history): Use string_file.
15380 * regcache.c (regcache_print): Use stdio_file.
15381 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15382 * remote.c (escape_buffer): Use string_file.
15383 * rust-lang.c (rust_get_disr_info): Use string_file.
15384 * serial.c (serial_open_ops_1): Use stdio_file.
15385 (do_serial_close): Use delete.
15386 * stack.c (print_frame_arg): Use string_file.
15387 (print_frame_args): Remove local mem_fileopen stream, not used.
15388 (print_frame): Use string_file.
15389 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15390 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15391 Take a 'string_file *' instead of a 'ui_file *'.
15392 * top.c (new_ui): Use stdio_file and stderr_file.
15393 (free_ui): Use delete.
15394 (execute_command_to_string): Use string_file.
15395 (quit_confirm): Use string_file.
15396 * tracepoint.c (collection_list::append_exp): Use string_file.
15397 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15398 * tui/tui-file.c: Don't include "ui-file.h".
15399 (enum streamtype, struct tui_stream): Delete.
15400 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15401 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15402 (tui_file::tui_file): New method.
15403 (tui_file_fputs): Delete.
15404 (tui_file_get_strbuf): Delete.
15405 (tui_file::puts): New method.
15406 (tui_file_adjust_strbuf): Delete.
15407 (tui_file_flush): Delete.
15408 (tui_file::flush): New method.
15409 * tui/tui-file.h: Tweak intro comment.
15410 Include ui-file.h.
15411 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15412 (tui_file_adjust_strbuf): Delete declarations.
15413 (class tui_file): New class.
15414 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15415 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15416 (tui_register_format): Use string_stream.
15417 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15418 (tui_get_function_from_frame): Use string_file.
15419 * typeprint.c (type_to_string): Use string_file.
15420 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15421 (null_stream): New global.
15422 (ui_file_delete): Delete.
15423 (ui_file::ui_file): New.
15424 (null_file_isatty): Delete.
15425 (ui_file::~ui_file): New.
15426 (null_file_rewind): Delete.
15427 (ui_file::printf): New.
15428 (null_file_put): Delete.
15429 (null_file_flush): Delete.
15430 (ui_file::putstr): New.
15431 (null_file_write): Delete.
15432 (ui_file::putstrn): New.
15433 (null_file_read): Delete.
15434 (ui_file::putc): New.
15435 (null_file_fputs): Delete.
15436 (null_file_write_async_safe): Delete.
15437 (ui_file::vprintf): New.
15438 (null_file_delete): Delete.
15439 (null_file::write): New.
15440 (null_file_fseek): Delete.
15441 (null_file::puts): New.
15442 (ui_file_data): Delete.
15443 (null_file::write_async_safe): New.
15444 (gdb_flush, ui_file_isatty): Adjust.
15445 (ui_file_put, ui_file_rewind): Delete.
15446 (ui_file_write): Adjust.
15447 (ui_file_write_for_put): Delete.
15448 (ui_file_write_async_safe, ui_file_read): Adjust.
15449 (ui_file_fseek): Delete.
15450 (fputs_unfiltered): Adjust.
15451 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15452 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15453 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15454 (set_ui_file_data): Delete.
15455 (string_file::~string_file, string_file::write)
15456 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15457 (do_ui_file_as_string, ui_file_as_string): Delete.
15458 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15459 (struct mem_file): Delete.
15460 (mem_file_new): Delete.
15461 (stdio_file::stdio_file): New.
15462 (mem_file_delete): Delete.
15463 (stdio_file::stdio_file): New.
15464 (mem_fileopen): Delete.
15465 (stdio_file::~stdio_file): New.
15466 (mem_file_rewind): Delete.
15467 (stdio_file::set_stream): New.
15468 (mem_file_put): Delete.
15469 (stdio_file::open): New.
15470 (mem_file_write): Delete.
15471 (stdio_file_magic, struct stdio_file): Delete.
15472 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15473 (stdio_file::flush): New.
15474 (stdio_file_read): Rename to ...
15475 (stdio_file::read): ... this. Adjust.
15476 (stdio_file_write): Rename to ...
15477 (stdio_file::write): ... this. Adjust.
15478 (stdio_file_write_async_safe): Rename to ...
15479 (stdio_file::write_async_safe) ... this. Adjust.
15480 (stdio_file_fputs): Rename to ...
15481 (stdio_file::puts) ... this. Adjust.
15482 (stdio_file_isatty): Delete.
15483 (stdio_file_fseek): Delete.
15484 (stdio_file::isatty): New.
15485 (stderr_file_write): Rename to ...
15486 (stderr_file::write) ... this. Adjust.
15487 (stderr_file_fputs): Rename to ...
15488 (stderr_file::puts) ... this. Adjust.
15489 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15490 (stderr_file::stderr_file): New.
15491 (tee_file_magic): Delete.
15492 (struct tee_file): Delete.
15493 (tee_file::tee_file): New.
15494 (tee_file_new): Delete.
15495 (tee_file::~tee_file): New.
15496 (tee_file_delete): Delete.
15497 (tee_file_flush): Rename to ...
15498 (tee_file::flush): ... this. Adjust.
15499 (tee_file_write): Rename to ...
15500 (tee_file::write): ... this. Adjust.
15501 (tee_file::write_async_safe): New.
15502 (tee_file_fputs): Rename to ...
15503 (tee_file::puts): ... this. Adjust.
15504 (tee_file_isatty): Rename to ...
15505 (tee_file::isatty): ... this. Adjust.
15506 * ui-file.h (struct obstack, struct ui_file): Don't
15507 forward-declare.
15508 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15509 (ui_file_write_ftype)
15510 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15511 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15512 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15513 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15514 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15515 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15516 (set_ui_file_fseek): Delete.
15517 (ui_file_data, ui_file_delete, ui_file_rewind)
15518 (struct ui_file): New.
15519 (ui_file_up): New.
15520 (class null_file): New.
15521 (null_stream): Declare.
15522 (ui_file_write_for_put, ui_file_put): Delete.
15523 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15524 Delete.
15525 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15526 (gdb_fopen, tee_file_new): Delete.
15527 (struct string_file): New.
15528 (struct stdio_file): New.
15529 (stdio_file_up): New.
15530 (struct stderr_file): New.
15531 (class tee_file): New.
15532 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15533 of a 'ui_file *'. Adjust.
15534 * ui-out.h (class ui_out) <field_stream>: Likewise.
15535 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15536 (null_stream): Delete.
15537 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15538 Adjust.
15539 * utils.h (struct ui_file): Delete forward declaration..
15540 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15541 (error_stream): Take a 'string_file &' instead of a
15542 'ui_file *'.
15543 * varobj.c (varobj_value_get_print_value): Use string_file.
15544 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15545 * gdbarch.c: Regenerate.
15546
15547 2017-02-02 Pedro Alves <palves@redhat.com>
15548
15549 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15550 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15551 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15552 Adjust to call gdb_print_insn instead of
15553 gdb_disassembler::print_insn.
15554 (dump_insns, do_mixed_source_and_assembly_deprecated)
15555 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15556 'gdbarch' parameter. Remove gdb_disassembler parameter.
15557 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15558 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15559 declaration.
15560 (gdb_pretty_print_insn): Re-add declaration.
15561 * record-btrace.c (btrace_insn_history): Don't allocate a
15562 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15563
15564 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15565
15566 * disasm.h (gdb_disassembly): Remove file_string parameter.
15567 * disasm.c (gdb_disassembly): Likewise.
15568 * cli/cli-cmds.c (print_disassembly): Adapt.
15569 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15570 * stack.c (do_gdb_disassembly): Likewise.
15571
15572 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15573
15574 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15575 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15576 targets. And if the implicit value is longer than needed, extract
15577 the first bytes instead of the "least significant" ones.
15578
15579 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15580
15581 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15582 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15583 (btrace_fetch): Assert can_access_registers_ptid.
15584 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15585 validate_registers_access.
15586
15587 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15588
15589 * gdbthread.h (can_access_registers_ptid): New.
15590 * thread.c (can_access_registers_ptid): New.
15591
15592 2017-02-01 Pedro Alves <palves@redhat.com>
15593
15594 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15595
15596 2017-01-31 Pedro Alves <palves@redhat.com>
15597
15598 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15599 Fix typos.
15600
15601 2017-01-31 Pedro Alves <palves@redhat.com>
15602
15603 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15604 not used.
15605
15606 2017-01-31 Pedro Alves <palves@redhat.com>
15607
15608 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15609
15610 2017-01-31 Pedro Alves <palves@redhat.com>
15611
15612 * common/scoped_restore.h
15613 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15614 change the value's parameter type to T2.
15615 (make_scoped_restore): Likewise.
15616
15617 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15618 Richard Henderson <rth@redhat.com>
15619
15620 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15621 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15622 GS_BASE for older kernels.
15623 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15624 GS_BASE for older kernels.
15625 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15626 and GS_BASE to the offset table.
15627 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15628 system register group.
15629 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15630 for older kernels.
15631 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15632 amd64 ABI.
15633 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15634 AMD64_GSBASE_REGNUM.
15635 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15636 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15637 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15638 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15639 i386/64bit-segments.xml in those rules.
15640 * features/i386/64bit-segments.xml: New file.
15641 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15642 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15643 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15644 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15645 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15646 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15647 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15648 * features/i386/amd64-avx-linux.c: Regenerated.
15649 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15650 * features/i386/amd64-avx-mpx.c: Regenerated.
15651 * features/i386/amd64-avx512-linux.c: Regenerated.
15652 * features/i386/amd64-linux.c: Regenerated.
15653 * features/i386/amd64-mpx-linux.c: Regenerated.
15654 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15655 * features/i386/i386-avx-mpx.c: Regenerated.
15656 * features/i386/x32-avx-linux.c: Regenerated.
15657 * features/i386/x32-avx512-linux.c: Regenerated.
15658 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15659 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15660 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15661 * regformats/i386/amd64-linux.dat: Regenerated.
15662 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15663 * regformats/i386/x32-avx-linux.dat: Regenerated.
15664 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15665 * regformats/i386/x32-linux.dat: Regenerated.
15666
15667 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15668
15669 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15670 Set to AMD64_NUM_REGS.
15671
15672 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15673
15674 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15675 that checks validity of a register number.
15676
15677 2017-01-27 Kees Cook <keescook@google.com>
15678
15679 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15680 fetch_fpregs if target has fpa registers.
15681 (arm_linux_store_inferior_registers): Call store_fpregs if target
15682 has fpa registers.
15683
15684 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15685
15686 * cris-tdep.c (cris_gdbarch_init): Remove check for
15687 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15688
15689 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15690
15691 * corelow.c (get_core_register_section): Check for regset
15692 existence before checking for REGSET_VARIABLE_SIZE.
15693
15694 2017-01-26 Yao Qi <yao.qi@linaro.org>
15695 Pedro Alves <palves@redhat.com>
15696
15697 PR gdb/20939
15698 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15699 call memory_error, save memaddr instead.
15700 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15701 negative, cal memory_error.
15702 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15703
15704 2017-01-26 Yao Qi <yao.qi@linaro.org>
15705
15706 * disasm-selftests.c (memory_error_test): New function.
15707 (_initialize_disasm_selftests): Register memory_error_test.
15708
15709 2017-01-26 Yao Qi <yao.qi@linaro.org>
15710
15711 * Makefile.in (SFILES): Add disasm-selftests.c and
15712 selftest-arch.c.
15713 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15714 * disasm-selftests.c: New file.
15715 * selftest-arch.c: New file.
15716 * selftest-arch.h: New file.
15717
15718 2017-01-26 Yao Qi <yao.qi@linaro.org>
15719
15720 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15721 to bfd_arch_mep. Don't return 0 if section is not
15722 found. Call print_insn_mep.
15723
15724 2017-01-26 Pedro Alves <palves@redhat.com>
15725 Yao Qi <yao.qi@linaro.org>
15726
15727 * arm-tdep.c: Include "disasm.h".
15728 (gdb_print_insn_arm): Update code to get gdbarch.
15729 * disasm.c (dis_asm_read_memory): Change it to
15730 gdb_disassembler::dis_asm_read_memory.
15731 (dis_asm_memory_error): Likewise.
15732 (dis_asm_print_address): Likewise.
15733 (gdb_pretty_print_insn): Change it to
15734 gdb_disassembler::pretty_print_insn.
15735 (dump_insns): Add one argument gdb_disassemlber. All
15736 callers updated.
15737 (do_mixed_source_and_assembly_deprecated): Likewise.
15738 (do_mixed_source_and_assembly): Likewise.
15739 (do_assembly_only): Likewise.
15740 (gdb_disassembler::gdb_disassembler): New.
15741 (gdb_disassembler::print_insn): New.
15742 * disasm.h (class gdb_disassembler): New.
15743 (gdb_pretty_print_insn): Remove declaration.
15744 (gdb_disassemble_info): Likewise.
15745 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15746 (gdbscm_disasm_read_memory_worker): Update.
15747 (gdbscm_disasm_read_memory): Update.
15748 (gdbscm_disasm_memory_error): Remove.
15749 (gdbscm_disasm_print_address): Remove.
15750 (gdbscm_disassembler::gdbscm_disassembler): New.
15751 (gdbscm_print_insn_from_port): Update.
15752 * mips-tdep.c: Include disasm.h.
15753 (gdb_print_insn_mips): Update code to get gdbarch.
15754 * record-btrace.c (btrace_insn_history): Update.
15755 * spu-tdep.c: Include disasm.h.
15756 (struct spu_dis_asm_data): Remove.
15757 (struct spu_dis_asm_info): New.
15758 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15759 SPU id.
15760 (gdb_print_insn_spu): Cast disassemble_info to
15761 spu_dis_asm_info.
15762
15763 2017-01-26 Yao Qi <yao.qi@linaro.org>
15764
15765 * disasm.c (do_ui_file_delete): Delete.
15766 (gdb_insn_length): Move code creating stream to ...
15767 * utils.c (null_stream): ... here. New function.
15768 * utils.h (null_stream): Declare.
15769
15770 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15771
15772 * python/py-inferior.c (find_thread_object): Return directly
15773 from the loop. Remove "found" variable.
15774
15775 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15776
15777 GDB 7.12.1 released.
15778
15779 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15780
15781 * python/py-function.c (fnpy_call): Reorder declarations to have
15782 the gdbpy_enter object declared first.
15783 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15784
15785 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15786
15787 PR python/21068
15788 * python/python-internal.h (PyMem_RawMalloc): Define for
15789 Python < 3.4.
15790 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15791 PyMem_RawMalloc instead of PyMem_Malloc.
15792
15793 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15794 Luis Machado <lgustavo@codesourcery.com>
15795
15796 * NEWS (New commands): Mention flash-erase.
15797 (New MI commands): Mention target-flash-erase.
15798 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15799 command.
15800 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15801 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15802 * target.c (flash_erase_command): New function.
15803 (initialize_targets): Add new flash-erase command.
15804 * target.h (flash_erase_command): New declaration.
15805
15806 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15807
15808 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15809 HAVE_SYS_PROCFS_H is defined.
15810
15811 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15812
15813 * remote.c (struct cached_reg): Change data into a pointer.
15814 * (stop_reply_dtr): Free data pointers before deleting vector.
15815 (process_stop_reply): Likewise.
15816 (remote_parse_stop_reply): Allocate space for data
15817
15818 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15819
15820 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15821 MAX_REGISTER_SIZE.
15822 (amd64_pseudo_register_read_value): Likewise.
15823 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15824 (store_register_using_P): Likewise.
15825 * regcache.c (regcache_xfer_part): Likewise.
15826
15827 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15828
15829 Split real and pseudo registers.
15830 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15831 (sparc32_pseudo_regnum): New enum.
15832 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15833 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15834 (SPARC32_CP0_REGISTERS): New macro.
15835 (sparc32_pseudo_register_name): New function.
15836 (sparc32_register_name): Use sparc32_pseudo_register_name.
15837 (sparc32_pseudo_register_type): New function.
15838 (sparc32_register_type): Use sparc32_pseudo_register_type.
15839 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15840 pseudo register numbers.
15841 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15842 (SPARC64_CP0_REGISTERS): New macro.
15843 (sparc64_pseudo_register_name): New function.
15844 (sparc64_register_name): Use sparc64_pseudo_register_name.
15845 (sparc64_pseudo_register_type): New function.
15846 (sparc64_register_type): Use sparc64_pseudo_register_type.
15847 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15848 pseudo register numbers.
15849 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15850 sparc64_store_arguments): Handle pseudo register numbers.
15851
15852 2017-01-13 Yao Qi <yao.qi@linaro.org>
15853
15854 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15855 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15856 output.
15857 (getpkt_or_notif_sane_1): Likewise.
15858
15859 2017-01-13 Yao Qi <yao.qi@linaro.org>
15860
15861 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15862 of CC. Pass "-x c++-header" instead of "-x c".
15863
15864 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15865
15866 * remote.c (remote_can_async_p): Update comment.
15867
15868 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15869
15870 * linux-nat.c (linux_nat_can_async_p): Update comment.
15871
15872 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15873
15874 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15875
15876 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15877
15878 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15879
15880 2017-01-10 Tom Tromey <tom@tromey.com>
15881
15882 * python/py-type.c (typy_legacy_template_argument): Update.
15883 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15884 ~demangle_parse_info): Declare new members.
15885 (cp_demangled_name_to_comp): Return unique_ptr.
15886 (cp_demangled_name_parse_free)
15887 (make_cleanup_cp_demangled_name_parse_free)
15888 (cp_new_demangle_parse_info): Remove.
15889 * cp-support.c (do_demangled_name_parse_free_cleanup)
15890 (make_cleanup_cp_demangled_name_parse_free): Remove.
15891 (inspect_type, cp_canonicalize_string_full)
15892 (cp_canonicalize_string): Update.
15893 (mangled_name_to_comp): Change return type.
15894 (cp_class_name_from_physname, method_name_from_physname)
15895 (cp_func_name, cp_remove_params): Update.
15896 * cp-name-parser.y (demangle_parse_info): New constructor, from
15897 cp_new_demangle_parse_info.
15898 (~demangle_parse_info): New destructor, from
15899 cp_demangled_name_parse_free.
15900 (cp_merge_demangle_parse_infos): Update.
15901 (cp_demangled_name_to_comp): Change return type.
15902
15903 2017-01-10 Tom Tromey <tom@tromey.com>
15904
15905 * top.c (prevent_dont_repeat): Change return type.
15906 * python/python.c (execute_gdb_command): Use std::string.
15907 Update.
15908 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15909 * command.h (prevent_dont_repeat): Change return type.
15910 * breakpoint.c (bpstat_do_actions_1): Update.
15911
15912 2017-01-10 Tom Tromey <tom@tromey.com>
15913
15914 * value.h (scoped_value_mark::~scoped_value_mark): Call
15915 free_to_mark.
15916 (scoped_value_mark::free_to_mark): New method.
15917 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15918 scoped_value_mark.
15919
15920 2017-01-10 Tom Tromey <tom@tromey.com>
15921
15922 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15923 (valpy_reference_value, valpy_const_value, valpy_get_address)
15924 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15925 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15926 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15927 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15928 scoped_value_mark.
15929 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15930 * value.h (scoped_value_mark): New class.
15931
15932 2017-01-10 Tom Tromey <tom@tromey.com>
15933
15934 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15935 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15936 * psymtab.c (discard_psymtabs_upto): Remove.
15937 (make_cleanup_discard_psymtabs): Remove.
15938 (struct psymtab_state): Remove.
15939
15940 2017-01-10 Tom Tromey <tom@tromey.com>
15941
15942 * record-full.c (record_full_save_cleanups): Remove.
15943 (record_full_save): Use gdb::unlinker.
15944 * gcore.c (do_bfd_delete_cleanup): Remove.
15945 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15946 cleanups.
15947 * dwarf2read.c (unlink_if_set): Remove.
15948 (write_psymtabs_to_index): Use gdb::unlinker.
15949 * common/gdb_unlinker.h: New file.
15950
15951 2017-01-10 Tom Tromey <tom@tromey.com>
15952
15953 * windows-tdep.c (windows_xfer_shared_library): Update.
15954 * windows-nat.c (windows_make_so): Update.
15955 * utils.h (make_cleanup_bfd_unref): Remove.
15956 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15957 * symfile.h (symfile_bfd_open)
15958 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15959 * symfile.c (read_symbols, symbol_file_add)
15960 (separate_debug_file_exists): Update.
15961 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15962 (generic_load, reread_symbols): Update.
15963 * symfile-mem.c (symbol_file_add_from_memory): Update.
15964 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15965 (spu_symbol_file_add_from_memory): Update.
15966 * solist.h (struct target_so_ops) <bfd_open>: Return
15967 gdb_bfd_ref_ptr.
15968 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15969 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15970 gdb_bfd_ref_ptr.
15971 (solib_map_sections, reload_shared_libraries_1): Update.
15972 * solib-svr4.c (enable_break): Update.
15973 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15974 * solib-frv.c (enable_break2): Update.
15975 * solib-dsbt.c (enable_break): Update.
15976 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15977 gdb_bfd_ref_ptr.
15978 (darwin_solib_get_all_image_info_addr_at_init): Update.
15979 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15980 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15981 * record-full.c (record_full_save): Update.
15982 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15983 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15984 * minidebug.c (find_separate_debug_file_in_section): Return
15985 gdb_bfd_ref_ptr.
15986 * machoread.c (macho_add_oso_symfile): Change abfd to
15987 gdb_bfd_ref_ptr.
15988 (macho_symfile_read_all_oso): Update.
15989 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15990 (macho_symfile_read): Update.
15991 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15992 (jit_bfd_try_read_symtab): Update.
15993 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15994 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15995 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15996 gdb_bfd_ref_ptr.
15997 (gdb_bfd_ref_policy): New struct.
15998 (gdb_bfd_ref_ptr): New typedef.
15999 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16000 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16001 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16002 gdb_bfd_ref_ptr.
16003 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16004 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16005 (gcore_command): Update.
16006 * exec.c (exec_file_attach): Update.
16007 * elfread.c (elf_symfile_read): Update.
16008 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16009 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16010 (open_and_init_dwo_file): Update.
16011 (open_dwp_file): Return gdb_bfd_ref_ptr.
16012 (open_and_init_dwp_file): Update.
16013 * corelow.c (core_open): Update.
16014 * compile/compile-object-load.c (compile_object_load): Update.
16015 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16016 * coffread.c (coff_symfile_read): Update.
16017 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16018 gdb_bfd_ref_ptr. Rename.
16019 (dump_bfd_file, restore_command): Update.
16020 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16021 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16022 (find_separate_debug_file_by_buildid): Update.
16023
16024 2017-01-10 Tom Tromey <tom@tromey.com>
16025
16026 * common/gdb_ref_ptr.h: New file.
16027 * python/py-ref.h (struct gdbpy_ref_policy): New.
16028 (gdbpy_ref): Now a typedef.
16029
16030 2017-01-10 Tom Tromey <tom@tromey.com>
16031
16032 * utils.h (make_cleanup_htab_delete): Don't declare.
16033 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16034 Remove.
16035 * linespec.c (decode_compound_collector): Add constructor,
16036 destructor.
16037 (lookup_prefix_sym): Remove cleanup.
16038 (symtab_collector): Add constructor, destructor.
16039 (collect_symtabs_from_filename): Remove cleanup.
16040 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16041 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16042 Use htab_up.
16043 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16044 * dwarf2read.c (dw2_expand_symtabs_matching)
16045 (dw2_map_symbol_filenames, dwarf_decode_macros)
16046 (write_psymtabs_to_index): Use htab_up.
16047 * dwarf2loc.c (func_verify_no_selftailcall)
16048 (call_site_find_chain_1, func_verify_no_selftailcall)
16049 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16050 std::vector, gdb::unique_xmalloc_ptr.
16051 (call_sitep): Remove typedef.
16052 (dwarf2_locexpr_baton_eval): Remove unused variable.
16053
16054 2017-01-10 Tom Tromey <tom@tromey.com>
16055
16056 * python/python-internal.h (make_cleanup_py_decref)
16057 (make_cleanup_py_xdecref): Don't declare.
16058 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16059 (py_xdecref, make_cleanup_py_xdecref): Remove.
16060
16061 2017-01-10 Tom Tromey <tom@tromey.com>
16062
16063 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16064 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16065
16066 2017-01-10 Tom Tromey <tom@tromey.com>
16067
16068 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16069
16070 2017-01-10 Tom Tromey <tom@tromey.com>
16071
16072 * python/py-utils.c (unicode_to_encoded_string)
16073 (python_string_to_target_string)
16074 (python_string_to_target_python_string)
16075 (python_string_to_host_string, gdbpy_obj_to_string)
16076 (get_addr_from_python): Use gdbpy_ref.
16077
16078 2017-01-10 Tom Tromey <tom@tromey.com>
16079
16080 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16081 gdbpy_ref.
16082
16083 2017-01-10 Tom Tromey <tom@tromey.com>
16084
16085 * python/python.c (eval_python_command, gdbpy_decode_line)
16086 (gdbpy_run_events, gdbpy_start_type_printers)
16087 (gdbpy_apply_type_printers): Use gdbpy_ref.
16088
16089 2017-01-10 Tom Tromey <tom@tromey.com>
16090
16091 * python/py-param.c (get_doc_string, compute_enum_values): Use
16092 gdbpy_ref.
16093
16094 2017-01-10 Tom Tromey <tom@tromey.com>
16095
16096 * python/py-inferior.c (find_thread_object, build_inferior_list):
16097 Use gdbpy_ref.
16098
16099 2017-01-10 Tom Tromey <tom@tromey.com>
16100
16101 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16102
16103 2017-01-10 Tom Tromey <tom@tromey.com>
16104
16105 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16106 gdbpy_ref.
16107
16108 2017-01-10 Tom Tromey <tom@tromey.com>
16109
16110 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16111 extra incref.
16112 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16113 Use gdbpy_ref.
16114
16115 2017-01-10 Tom Tromey <tom@tromey.com>
16116
16117 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16118 gdbpy_ref.
16119
16120 2017-01-10 Tom Tromey <tom@tromey.com>
16121
16122 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16123 decref results of PyArg_ParseTupleAndKeywords.
16124
16125 2017-01-10 Tom Tromey <tom@tromey.com>
16126
16127 * python/python.c (python_run_simple_file): Use
16128 unique_xmalloc_ptr, gdbpy_ref.
16129
16130 2017-01-10 Tom Tromey <tom@tromey.com>
16131
16132 * python/py-prettyprint.c (print_stack_unless_memory_error)
16133 (print_string_repr, print_children): Use gdbpy_ref.
16134 (dummy_python_frame): New class.
16135 (dummy_python_frame::dummy_python_frame): Rename from
16136 push_dummy_python_frame.
16137 (py_restore_tstate): Remove.
16138
16139 2017-01-10 Tom Tromey <tom@tromey.com>
16140
16141 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16142
16143 2017-01-10 Tom Tromey <tom@tromey.com>
16144
16145 * python/python.c (ensure_python_env, restore_python_env):
16146 Remove.
16147 * python/python-internal.h (ensure_python_env): Don't declare.
16148 * varobj.h (varobj_ensure_python_env): Don't declare.
16149 * varobj.c (varobj_ensure_python_env): Remove.
16150
16151 2017-01-10 Tom Tromey <tom@tromey.com>
16152
16153 * varobj.c (varobj_value_get_print_value): Use
16154 gdbpy_enter_varobj.
16155
16156 2017-01-10 Tom Tromey <tom@tromey.com>
16157
16158 * python/py-prettyprint.c (print_string_repr, print_children):
16159 Update.
16160 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16161 of "encoding".
16162 * varobj.c (varobj_value_get_print_value): Update.
16163 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16164
16165 2017-01-10 Tom Tromey <tom@tromey.com>
16166
16167 * varobj.c (varobj_get_display_hint)
16168 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16169 (varobj_set_visualizer, free_variable): Use
16170 gdbpy_enter_varobj.
16171
16172 2017-01-10 Tom Tromey <tom@tromey.com>
16173
16174 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16175 (do_finish_initialization): New function. Use gdbpy_ref.
16176 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16177 do_finish_initialization.
16178
16179 2017-01-10 Tom Tromey <tom@tromey.com>
16180
16181 * python/py-param.c (get_set_value, get_show_value): Use
16182 gdbpy_enter, gdbpy_ref.
16183
16184 2017-01-10 Tom Tromey <tom@tromey.com>
16185
16186 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16187
16188 2017-01-10 Tom Tromey <tom@tromey.com>
16189
16190 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16191
16192 2017-01-10 Tom Tromey <tom@tromey.com>
16193
16194 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16195 Use gdbpy_enter_varobj.
16196
16197 2017-01-10 Tom Tromey <tom@tromey.com>
16198
16199 * varobj.c (gdbpy_enter_varobj): New constructor.
16200 * python/python-internal.h (gdbpy_enter_varobj): New class.
16201 * python/py-varobj.c (py_varobj_get_iterator): Use
16202 gdbpy_enter_varobj.
16203
16204 2017-01-10 Tom Tromey <tom@tromey.com>
16205
16206 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16207 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16208 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16209 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16210 unique_xmalloc_ptr.
16211 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16212
16213 2017-01-10 Tom Tromey <tom@tromey.com>
16214
16215 * python/py-xmethods.c (invoke_match_method): Use
16216 gdbpy_ref.
16217
16218 2017-01-10 Tom Tromey <tom@tromey.com>
16219
16220 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16221 gdbpy_enter, gdbpy_ref.
16222
16223 2017-01-10 Tom Tromey <tom@tromey.com>
16224
16225 * python/python.c (python_interactive_command): Use gdbpy_enter.
16226
16227 2017-01-10 Tom Tromey <tom@tromey.com>
16228
16229 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16230 gdbpy_ref.
16231
16232 2017-01-10 Tom Tromey <tom@tromey.com>
16233
16234 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16235 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16236
16237 2017-01-10 Tom Tromey <tom@tromey.com>
16238
16239 * utils.h (htab_deleter): New struct.
16240 (htab_up): New typedef.
16241 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16242 gdbpy_enter, gdbpy_ref, htab_up.
16243
16244 2017-01-10 Tom Tromey <tom@tromey.com>
16245
16246 * python/py-unwind.c (pending_frame_invalidate): Remove.
16247 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16248
16249 2017-01-10 Tom Tromey <tom@tromey.com>
16250
16251 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16252 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16253
16254 2017-01-10 Tom Tromey <tom@tromey.com>
16255
16256 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16257
16258 2017-01-10 Tom Tromey <tom@tromey.com>
16259
16260 * python/python.c (gdbpy_eval_from_control_command)
16261 (gdbpy_source_script, gdbpy_run_events)
16262 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16263 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16264 gdbpy_enter.
16265
16266 2017-01-10 Tom Tromey <tom@tromey.com>
16267
16268 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16269
16270 2017-01-10 Tom Tromey <tom@tromey.com>
16271
16272 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16273
16274 2017-01-10 Tom Tromey <tom@tromey.com>
16275
16276 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16277 (python_on_inferior_call_pre, python_on_inferior_call_post)
16278 (python_on_memory_change, python_on_register_change)
16279 (python_inferior_exit, python_new_objfile, add_thread_object)
16280 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16281
16282 2017-01-10 Tom Tromey <tom@tromey.com>
16283
16284 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16285 (bpfinishpy_handle_exit): Use gdbpy_enter.
16286
16287 2017-01-10 Tom Tromey <tom@tromey.com>
16288
16289 * python/py-cmd.c (cmdpy_destroyer)
16290 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16291 gdbpy_enter.
16292
16293 2017-01-10 Tom Tromey <tom@tromey.com>
16294
16295 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16296 gdbpy_enter.
16297 (gdbpy_breakpoint_has_cond): Likewise.
16298
16299 2017-01-10 Tom Tromey <tom@tromey.com>
16300
16301 * python/python.c (gdbpy_enter): New constructor.
16302 (~gdbpy_enter): New destructor.
16303 (restore_python_env, ensure_python_env): Rewrite.
16304 * python/python-internal.h (gdbpy_enter): New class.
16305
16306 2017-01-10 Tom Tromey <tom@tromey.com>
16307
16308 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16309
16310 2017-01-10 Tom Tromey <tom@tromey.com>
16311
16312 * python/py-value.c (value_has_field, get_field_flag)
16313 (get_field_type, valpy_getitem, convert_value_from_python): Use
16314 gdbpy_ref.
16315
16316 2017-01-10 Tom Tromey <tom@tromey.com>
16317
16318 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16319 gdbpy_ref.
16320
16321 2017-01-10 Tom Tromey <tom@tromey.com>
16322
16323 * python/py-prettyprint.c (search_pp_list)
16324 (find_pretty_printer_from_objfiles)
16325 (find_pretty_printer_from_progspace)
16326 (find_pretty_printer_from_gdb, find_pretty_printer)
16327 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16328 gdbpy_ref.
16329
16330 2017-01-10 Tom Tromey <tom@tromey.com>
16331
16332 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16333
16334 2017-01-10 Tom Tromey <tom@tromey.com>
16335
16336 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16337 (ltpy_get_all_source_lines): Use gdbpy_ref.
16338
16339 2017-01-10 Tom Tromey <tom@tromey.com>
16340
16341 * python/py-framefilter.c (extract_sym, extract_value)
16342 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16343 gdbpy_ref.
16344
16345 2017-01-10 Tom Tromey <tom@tromey.com>
16346
16347 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16348
16349 2017-01-10 Tom Tromey <tom@tromey.com>
16350
16351 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16352
16353 2017-01-10 Tom Tromey <tom@tromey.com>
16354
16355 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16356 gdbpy_ref.
16357
16358 2017-01-10 Tom Tromey <tom@tromey.com>
16359
16360 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16361
16362 2017-01-10 Tom Tromey <tom@tromey.com>
16363
16364 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16365 (typy_range): Use gdbpy_ref.
16366
16367 2017-01-10 Tom Tromey <tom@tromey.com>
16368
16369 * python/py-threadevent.c (create_thread_event_object): Use
16370 gdbpy_ref.
16371 * python/py-stopevent.c (create_stop_event_object): Simplify.
16372 (emit_stop_event): Use gdbpy_ref.
16373 * python/py-signalevent.c (create_signal_event_object): Use
16374 gdbpy_ref.
16375 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16376 (emit_new_objfile_event, create_clear_objfiles_event_object)
16377 (emit_clear_objfiles_event): Use gdbpy_ref.
16378 * python/py-infevents.c (create_inferior_call_event_object)
16379 (create_register_changed_event_object)
16380 (create_memory_changed_event_object, emit_inferior_call_event)
16381 (emit_memory_changed_event, emit_register_changed_event): Use
16382 gdbpy_ref.
16383 * python/py-exitedevent.c (create_exited_event_object)
16384 (emit_exited_event): Use gdbpy_ref.
16385 * python/py-event.h (evpy_emit_event): Remove
16386 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16387 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16388 * python/py-continueevent.c (emit_continue_event): Use
16389 gdbpy_ref.
16390 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16391 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16392 gdbpy_ref.
16393 * python/py-bpevent.c (create_breakpoint_event_object): Use
16394 gdbpy_ref.
16395
16396 2017-01-10 Tom Tromey <tom@tromey.com>
16397
16398 * python/py-ref.h: New file.
16399
16400 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16401
16402 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16403 void.
16404 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16405 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16406 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16407 * ui-out.c (ui_out::redirect): Likewise.
16408 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16409 * cli/cli-logging.c (set_logging_redirect): Update call site of
16410 ui_out::redirect.
16411 (handle_redirections): Likewise.
16412 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16413 * top.c (execute_command_to_string): Likewise.
16414 * utils.c (do_ui_out_redirect_pop): Likewise.
16415
16416 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16417
16418 * stack.c (_initialize_stack): Update "frame" command help message.
16419
16420 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16421
16422 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16423
16424 2017-01-06 Yao Qi <yao.qi@linaro.org>
16425
16426 * x86-linux-nat.h: Include gdb_proc_service.h.
16427
16428 2017-01-06 Yao Qi <yao.qi@linaro.org>
16429
16430 * ser-base.h: Include serial.h.
16431
16432 2017-01-06 Yao Qi <yao.qi@linaro.org>
16433
16434 * ppc-linux-tdep.h: Include ppc-tdep.h.
16435
16436 2017-01-06 Yao Qi <yao.qi@linaro.org>
16437
16438 * nat/amd64-linux-siginfo.h: Include signal.h.
16439
16440 2017-01-06 Yao Qi <yao.qi@linaro.org>
16441
16442 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16443
16444 2017-01-06 Yao Qi <yao.qi@linaro.org>
16445
16446 * mi/mi-parse.h: Include mi-cmds.h.
16447
16448 2017-01-06 Yao Qi <yao.qi@linaro.org>
16449
16450 * inf-loop.c: Don't include "target.h".
16451 * inf-loop.h: Include it here.
16452
16453 2017-01-06 Yao Qi <yao.qi@linaro.org>
16454
16455 * dfp.h: Include "dboulest.h" and "expression.h".
16456
16457 2017-01-06 Yao Qi <yao.qi@linaro.org>
16458
16459 * ax-gdb.h: Include "ax.h".
16460
16461 2017-01-06 Yao Qi <yao.qi@linaro.org>
16462
16463 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16464 with nat/gdb_ptrace.h.
16465
16466 2017-01-05 Yao Qi <yao.qi@linaro.org>
16467
16468 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16469 new line.
16470 (mips64_fbsd_sigframe_init): Likewise.
16471
16472 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16473
16474 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16475 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16476
16477 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16478
16479 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16480 * NEWS: Mention new FreeBSD/mips native configuration.
16481 * config/mips/fbsd.mh: New file.
16482 * configure.host: Add mips*-*-freebsd*.
16483 * mips-fbsd-nat.c: New file.
16484
16485 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16486
16487 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16488 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16489 * NEWS: Mention new FreeBSD/mips target.
16490 * configure.tgt: Add mips*-*-freebsd*.
16491 * mips-fbsd-tdep.c: New file.
16492 * mips-fbsd-tdep.h: New file.
16493
16494 2017-01-04 Yao Qi <yao.qi@linaro.org>
16495
16496 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16497 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16498
16499 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16500
16501 Update copyright year range in all GDB files.
16502
16503 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16504
16505 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16506
16507 For older changes see ChangeLog-2016.
16508 \f
16509 Local Variables:
16510 mode: change-log
16511 left-margin: 8
16512 fill-column: 74
16513 version-control: never
16514 coding: utf-8
16515 End:
This page took 0.384449 seconds and 5 git commands to generate.