Convert SystemTap probe interface to C++ (and perform some cleanups)
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
2 Simon Marchi <simark@simark.ca>
3
4 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
5 variable.
6 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
7 <aexpr>: Change type to 'expression_up'.
8 (stap_probe_arg_s): Delete type and VEC.
9 (struct stap_probe): Delete. Replace by...
10 (class stap_static_probe_ops): ...this and...
11 (class stap_probe): ...this. Rename variables to add 'm_'
12 prefix. Do not use 'union' for arguments anymore.
13 (stap_get_expected_argument_type): Receive probe name instead
14 of 'struct stap_probe'. Adjust code.
15 (stap_parse_probe_arguments): Rename to...
16 (stap_probe::parse_arguments): ...this. Adjust code to
17 reflect change.
18 (stap_get_probe_address): Rename to...
19 (stap_probe::get_relocated_address): ...this. Adjust code
20 to reflect change.
21 (stap_get_probe_argument_count): Rename to...
22 (stap_probe::get_argument_count): ...this. Adjust code
23 to reflect change.
24 (stap_get_arg): Rename to...
25 (stap_probe::get_arg_by_number'): ...this. Adjust code to
26 reflect change.
27 (can_evaluate_probe_arguments): Rename to...
28 (stap_probe::can_evaluate_arguments): ...this. Adjust code
29 to reflect change.
30 (stap_evaluate_probe_argument): Rename to...
31 (stap_probe::evaluate_argument): ...this. Adjust code
32 to reflect change.
33 (stap_compile_to_ax): Rename to...
34 (stap_probe::compile_to_ax): ...this. Adjust code to
35 reflect change.
36 (stap_probe_destroy): Delete.
37 (stap_modify_semaphore): Adjust comment.
38 (stap_set_semaphore): Rename to...
39 (stap_probe::set_semaphore): ...this. Adjust code to reflect
40 change.
41 (stap_clear_semaphore): Rename to...
42 (stap_probe::clear_semaphore): ...this. Adjust code to
43 reflect change.
44 (stap_probe::get_static_ops): New method.
45 (handle_stap_probe): Adjust code to create instance of
46 'stap_probe'.
47 (stap_get_probes): Rename to...
48 (stap_static_probe_ops::get_probes): ...this. Adjust code to
49 reflect change.
50 (stap_probe_is_linespec): Rename to...
51 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
52 reflect change.
53 (stap_type_name): Rename to...
54 (stap_static_probe_ops::type_name): ...this. Adjust code to
55 reflect change.
56 (stap_gen_info_probes_table_header): Rename to...
57 (stap_static_probe_ops::gen_info_probes_table_header):
58 ...this. Adjust code to reflect change.
59 (stap_gen_info_probes_table_values): Rename to...
60 (stap_probe::gen_info_probes_table_values): ...this. Adjust
61 code to reflect change.
62 (struct probe_ops stap_probe_ops): Delete.
63 (info_probes_stap_command): Use 'info_probes_for_spops'
64 instead of 'info_probes_for_ops'.
65 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
66 of 'all_probe_ops'.
67
68 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
69
70 * break-catch-throw.c (fetch_probe_arguments): Use
71 'probe.prob' instead of 'probe.probe'.
72 * breakpoint.c (create_longjmp_master_breakpoint): Call
73 'can_evaluate_arguments' and 'get_relocated_address' methods
74 from probe.
75 (create_exception_master_breakpoint): Likewise.
76 (add_location_to_breakpoint): Use 'sal->prob' instead of
77 'sal->probe'.
78 (bkpt_probe_insert_location): Call 'set_semaphore' method from
79 probe.
80 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
81 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
82 of 'probe_ops'.
83 (probe_key_free): Call 'delete' on probe.
84 (check_exception_resume): Use 'probe.prob' instead of
85 'probe.probe'.
86 * location.c (string_to_event_location_basic): Call
87 'probe_linespec_to_static_ops'.
88 * probe.c (class any_static_probe_ops): New class.
89 (any_static_probe_ops any_static_probe_ops): New variable.
90 (parse_probes_in_pspace): Receive 'static_probe_ops' as
91 argument. Adjust code to reflect change.
92 (parse_probes): Use 'static_probe_ops' instead of
93 'probe_ops'. Adjust code to reflect change.
94 (find_probes_in_objfile): Call methods to get name and
95 provider from probe.
96 (find_probe_by_pc): Use 'result.prob' instead of
97 'result.probe'. Call 'get_relocated_address' method from
98 probe.
99 (collect_probes): Adjust comment and argument list to receive
100 'static_probe_ops' instead of 'probe_ops'. Adjust code to
101 reflect change. Call necessary methods from probe.
102 (compare_probes): Call methods to get name and provider from
103 probes.
104 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
105 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
106 adjust code accordingly.
107 (print_ui_out_not_applicables): Likewise.
108 (info_probes_for_ops): Rename to...
109 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
110 as argument instead of 'probe_ops'. Adjust code. Call
111 necessary methods from probe.
112 (info_probes_command): Use 'info_probes_for_spops'.
113 (enable_probes_command): Pass correct argument to
114 'collect_probes'. Call methods from probe.
115 (disable_probes_command): Likewise.
116 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
117 (get_probe_argument_count): Move to
118 'any_static_probe_ops::get_argument_count'.
119 (can_evaluate_probe_arguments): Move to
120 'any_static_probe_ops::can_evaluate_arguments'.
121 (evaluate_probe_argument): Move to
122 'any_static_probe_ops::evaluate_argument'.
123 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
124 'probe.probe'.
125 (probe_linespec_to_ops): Rename to...
126 (probe_linespec_to_static_ops): ...this. Adjust code.
127 (probe_any_is_linespec): Rename to...
128 (any_static_probe_ops::is_linespec): ...this.
129 (probe_any_get_probes): Rename to...
130 (any_static_probe_ops::get_probes): ...this.
131 (any_static_probe_ops::type_name): New method.
132 (any_static_probe_ops::gen_info_probes_table_header): New
133 method.
134 (compute_probe_arg): Use 'pc_probe.prob' instead of
135 'pc_probe.probe'. Call methods from probe.
136 (compile_probe_arg): Likewise.
137 (std::vector<const probe_ops *> all_probe_ops): Delete.
138 (std::vector<const static_probe_ops *> all_static_probe_ops):
139 New variable.
140 (_initialize_probe): Use 'all_static_probe_ops' instead of
141 'all_probe_ops'.
142 * probe.h (struct info_probe_column) <field_name>: Delete
143 extraneous newline
144 (info_probe_column_s): Delete type and VEC.
145 (struct probe_ops): Delete. Replace with...
146 (class static_probe_ops): ...this and...
147 (clas probe): ...this.
148 (struct bound_probe) <bound_probe>: Delete extraneous
149 newline. Adjust constructor to receive 'probe' instead of
150 'struct probe'.
151 <probe>: Rename to...
152 <prob>: ...this. Delete extraneous newline.
153 <objfile>: Delete extraneous newline.
154 (register_probe_ops): Delete unused prototype.
155 (info_probes_for_ops): Rename to...
156 (info_probes_for_spops): ...this. Adjust comment.
157 (get_probe_address): Move to 'probe::get_address'.
158 (get_probe_argument_count): Move to
159 'probe::get_argument_count'.
160 (can_evaluate_probe_arguments): Move to
161 'probe::can_evaluate_arguments'.
162 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
163 * solib-svr4.c (struct svr4_info): Adjust comment.
164 (struct probe_and_action) <probe>: Rename to...
165 <prob>: ...this.
166 (register_solib_event_probe): Receive 'probe' instead of
167 'struct probe' as argument. Use 'prob' instead of 'probe'
168 when applicable.
169 (solib_event_probe_action): Call 'get_argument_count' method
170 from probe. Adjust comment.
171 (svr4_handle_solib_event): Adjust comment. Call
172 'evaluate_argument' method from probe.
173 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
174 from probe.
175 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
176 'struct probe'. Call 'can_evaluate_arguments' from probe.
177 * symfile.h: Forward declare 'class probe' instead of 'struct
178 probe'.
179 * symtab.h: Likewise.
180 (struct symtab_and_line) <probe>: Rename to...
181 <prob>: ...this.
182 * tracepoint.c (start_tracing): Use 'prob' when applicable.
183 Call probe methods.
184 (stop_tracing): Likewise.
185
186 2017-11-22 Joel Brobecker <brobecker@adacore.com>
187
188 * ravenscar-thread.c (ravenscar_inferior_created): Remove
189 trailing newline at end of string in call to warning.
190
191 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
192
193 * osdata.h: Include vector isntead of vec.h.
194 (osdata_column_s): Remove typedef.
195 (struct osdata_column): Add constructor.
196 <name, value>: Change type to std::string.
197 (DEF_VEC_O (osdata_column_s)): Remove.
198 (osdata_item_s): Remove typedef.
199 (struct osdata_item) <columns>: Change type to std::vector.
200 (DEF_VEC_O (osdata_item_s)): Remove.
201 (struct osdata): Add constructor.
202 <type>: Change type to std::string.
203 <items>: Change type to std::vector.
204 (osdata_p): Remove typedef.
205 (DEF_VEC_P (osdata_p)): Remove.
206 (osdata_parse): Return a unique_ptr.
207 (osdata_free): Remove.
208 (make_cleanup_osdata_free): Remove.
209 (get_osdata): Return a unique_ptr.
210 (get_osdata_column): Return pointer to std::string, take a
211 reference to osdata_item as parameter.
212 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
213 unique_ptr.
214 <property_name>: Change type to std::string.
215 (osdata_start_osdata): Allocate osdata with new and adjust.
216 (osdata_start_item): Adjust.
217 (osdata_start_column): Adjust.
218 (osdata_end_column): Adjust.
219 (clear_parsing_data): Remove.
220 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
221 (osdata_item_clear): Remove.
222 (get_osdata): return a unique_ptr and adjust.
223 (get_osdata_column): Return a pointer to std::string and adjust.
224 (info_osdata): Adjust.
225 * mi/mi-main.c: Include <map>.
226 (free_vector_of_osdata_items): Remove.
227 (list_available_thread_groups): Adjust, use std::map instead of
228 splay tree.
229
230 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
231
232 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
233 case in switch.
234
235 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
236
237 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
238
239 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
240
241 * varobj.h (struct varobj_update_result): Add constructor, add
242 move constructor, disable copy and assign, initialize fields.
243 <newobj>: Change type to std::vector.
244 (varobj_update): Return std::vector.
245 * varobj.c (install_dynamic_child): Change VEC parameters to
246 std::vector and adjust.
247 (update_dynamic_varobj_children): Likewise.
248 (varobj_update): Return std::vector and adjust.
249 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
250
251 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
252
253 * varobj.h (struct varobj) <parent>: Remove const.
254 <children>: Change type to std::vector.
255 (varobj_list_children): Return std::vector const reference.
256 (varobj_restrict_range): Change parameter type to std::vector
257 const reference.
258 * varobj.c (varobj_has_more): Adjust.
259 (varobj_restrict_range): Change parameter type to std::vector
260 const reference and adjust.
261 (install_dynamic_child): Adjust.
262 (update_dynamic_varobj_children): Adjust.
263 (varobj_list_children): Return std::vector const reference and
264 adjust.
265 (varobj_add_child): Adjust.
266 (update_type_if_necessary): Adjust.
267 (varobj_update): Adjust.
268 (delete_variable_1): Adjust.
269 * ada-varobj.c (ada_value_has_mutated): Adjust.
270 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
271
272 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
273
274 * varobj.h (struct varobj): Add constructor and destructor,
275 initialize fields.
276 * varobj.c (struct varobj_root): Initialize fields.
277 (struct varobj_dynamic): Initialize fields.
278 (varobj_create): Use unique_ptr instead of cleanup. Create
279 varobj with new instead of new_root_variable.
280 (delete_variable_1): Free variable with delete instead of
281 free_variable.
282 (create_child_with_value): Create variable with new instead of
283 new_variable.
284 (varobj::varobj): New.
285 (varobj::~varobj): New (body mostly coming from free_variable).
286 (new_variable): Remove.
287 (free_variable): Remove.
288 (do_free_variable_cleanup): Remove.
289 (make_cleanup_free_variable): Remove.
290
291 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
292
293 * core-regset.c: Remove file.
294 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
295
296 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
297
298 * NEWS: Document use of GNU MPFR.
299 * README: Likewise.
300
301 * Makefile.in (LIBMPFR): Add define.
302 (CLIBS): Add $(LIBMPFR).
303 * configure.ac: Add --with-mpfr configure option.
304 * configure: Regenerate.
305 * config.in: Regenerate.
306
307 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
308 (class mpfr_float_ops): New type.
309 (mpfr_float_ops::from_target): Two new overloaded functions.
310 (mpfr_float_ops::to_target): Likewise.
311 (mpfr_float_ops::to_string): New function.
312 (mpfr_float_ops::from_string): Likewise.
313 (mpfr_float_ops::to_longest): Likewise.
314 (mpfr_float_ops::from_longest): Likewise.
315 (mpfr_float_ops::from_ulongest): Likewise.
316 (mpfr_float_ops::to_host_double): Likewise.
317 (mpfr_float_ops::from_host_double): Likewise.
318 (mpfr_float_ops::convert): Likewise.
319 (mpfr_float_ops::binop): Likewise.
320 (mpfr_float_ops::compare): Likewise.
321 (get_target_float_ops): Use mpfr_float_ops if available.
322
323 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
324
325 * target-float.c: Do not include <math.h>.
326 Include <cmath> and <limits>.
327 (DOUBLEST): Do not define.
328 (class target_float_ops): New type.
329 (class host_float_ops): New templated type.
330 (class decimal_float_ops): New type.
331
332 (floatformat_to_doublest): Rename to ...
333 (host_float_ops<T>::from_target): ... this. Use template type T
334 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
335 (host_float_ops<T>::from_target): New overload using a type argument.
336 (floatformat_from_doublest): Rename to ...
337 (host_float_ops<T>::to_target): ... this. Use template type T
338 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
339 (host_float_ops<T>::to_target): New overload using a type argument.
340 (floatformat_printf_format): New function.
341 (struct printf_length_modifier): New templated type.
342 (floatformat_to_string): Rename to ...
343 (host_float_ops<T>::to_string): ... this. Use type instead of
344 floatformat argument. Use floatformat_printf_format and
345 printf_length_modifier. Remove special handling of invalid numbers,
346 infinities and NaN (moved to target_float_to_string).
347 (struct scanf_length_modifier): New templated type.
348 (floatformat_from_string): Rename to ...
349 (host_float_ops<T>::from_string): ... this. Use type instead of
350 floatformat argument. Use scanf_length_modifier.
351 (floatformat_to_longest): Rename to ...
352 (host_float_ops<T>::to_longest): ... this. Use type instead of
353 floatformat argument. Handle out-of-range values deterministically.
354 (floatformat_from_longest): Rename to ...
355 (host_float_ops<T>::from_longest): ... this. Use type instead of
356 floatformat argument.
357 (floatformat_from_ulongest): Rename to ...
358 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
359 floatformat argument.
360 (floatformat_to_host_double): Rename to ...
361 (host_float_ops<T>::to_host_double): ... this. Use type instead of
362 floatformat argument.
363 (floatformat_from_host_double): Rename to ...
364 (host_float_ops<T>::from_host_double): ... this. Use type instead of
365 floatformat argument.
366 (floatformat_convert): Rename to ...
367 (host_float_ops<T>::convert): ... this. Use type instead of
368 floatformat arguments. Remove handling of no-op conversions.
369 (floatformat_binop): Rename to ...
370 (host_float_ops<T>::binop): ... this. Use type instead of
371 floatformat arguments.
372 (floatformat_compare): Rename to ...
373 (host_float_ops<T>::compare): ... this. Use type instead of
374 floatformat arguments.
375
376 (match_endianness): Use type instead of length/byte_order arguments.
377 (set_decnumber_context): Likewise.
378 (decimal_from_number): Likewise. Update calls.
379 (decimal_to_number): Likewise.
380 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
381 (decimal_float_ops::to_host_double): New dummy function.
382 (decimal_float_ops::from_host_double): Likewise.
383 (decimal_to_string): Rename to ...
384 (decimal_float_ops::to_string): ... this. Use type instead of
385 length/byte_order arguments. Update calls.
386 (decimal_from_string): Rename to ...
387 (decimal_float_ops::from_string): ... this. Use type instead of
388 length/byte_order arguments. Update calls.
389 (decimal_from_longest): Rename to ...
390 (decimal_float_ops::from_longest): ... this. Use type instead of
391 length/byte_order arguments. Update calls.
392 (decimal_from_ulongest): Rename to ...
393 (decimal_float_ops::from_ulongest): ... this. Use type instead of
394 length/byte_order arguments. Update calls.
395 (decimal_to_longest): Rename to ...
396 (decimal_float_ops::to_longest): ... this. Use type instead of
397 length/byte_order arguments. Update calls.
398 (decimal_binop): Rename to ...
399 (decimal_float_ops::binop): ... this. Use type instead of
400 length/byte_order arguments. Update calls.
401 (decimal_compare): Rename to ...
402 (decimal_float_ops::compare): ... this. Use type instead of
403 length/byte_order arguments. Update calls.
404 (decimal_convert): Rename to ...
405 (decimal_float_ops::convert): ... this. Use type instead of
406 length/byte_order arguments. Update calls.
407
408 (target_float_same_category_p): New function.
409 (target_float_same_format_p): Likewise.
410 (target_float_format_length): Likewise.
411 (enum target_float_ops_kind): New type.
412 (get_target_float_ops_kind): New function.
413 (get_target_float_ops): Three new overloaded functions.
414
415 (target_float_is_zero): Update call.
416 (target_float_to_string): Add special handling of invalid numbers,
417 infinities and NaN (moved from floatformat_to_string). Use
418 target_float_ops callback.
419 (target_float_from_string): Use target_float_ops callback.
420 (target_float_to_longest): Likewise.
421 (target_float_from_longest): Likewise.
422 (target_float_from_ulongest): Likewise.
423 (target_float_to_host_double): Likewise.
424 (target_float_from_host_double): Likewise.
425 (target_float_convert): Add special case for no-op conversions.
426 Use target_float_ops callback.
427 (target_float_binop): Use target_float_ops callback.
428 (target_float_compare): Likewise.
429
430 2017-11-22 Yao Qi <yao.qi@linaro.org>
431
432 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
433
434 2017-11-22 Yao Qi <yao.qi@linaro.org>
435
436 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
437 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
438
439 2017-11-21 Jerome Guitton <guitton@adacore.com>
440
441 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
442 with event ptid from the lower layer before doing the
443 ravenscar-specific update.
444
445 2017-11-21 Joel Brobecker <brobecker@adacore.com>
446
447 * ravenscar-thread.c (is_ravenscar_task): Also verify that
448 the ptid's TID is nonzero.
449
450 2017-11-21 Joel Brobecker <brobecker@adacore.com>
451
452 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
453 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
454 Make non-static. Change return type to char *. Adjust code
455 accordingly. Rewrite the function's documentation.
456 (read_atcb): Adjust call to get_tcb_types_info accordingly.
457 * ravenscar-thread.c (ravenscar_inferior_created): Check that
458 we have enough debugging information in the runtime to support
459 Ada task debugging before we enable the ravenscar-thread layer.
460
461 2017-11-21 Joel Brobecker <brobecker@adacore.com>
462
463 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
464 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
465 * ravenscar-thread.c: Add into comment.
466 (base_magic_null_ptid): Delete.
467 (base_ptid): Change documentation.
468 (ravenscar_active_task): Renames ravenscar_running_thread.
469 All callers updated throughout.
470 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
471 (ravenscar_task_is_currently_active): Likewise.
472 (get_base_thread_from_ravenscar_task): Ditto.
473 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
474 (ravenscar_runtime_initialized): Likewise.
475 (get_running_thread_id): Add new parameter "cpu". Adjust
476 implementation to handle this new parameter.
477 (ravenscar_fetch_registers): Small adjustment to use
478 is_ravenscar_task and ravenscar_task_is_currently_active in
479 order to decide whether to use the target beneath or this
480 module's arch_ops.
481 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
482 (ravenscar_stopped_by_sw_breakpoint): Use
483 get_base_thread_from_ravenscar_task to get the underlying
484 thread, rather than using base_ptid.
485 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
486 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
487 Likewise.
488 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
489
490 2017-11-21 Joel Brobecker <brobecker@adacore.com>
491
492 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
493 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
494 (get_tcb_types_info): Set fieldnos.base_cpu.
495 (read_atcb): Set task_info->base_cpu.
496 (info_task): Print "Base CPU" info if set by runtime.
497
498 2017-11-21 Joel Brobecker <brobecker@adacore.com>
499
500 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
501 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
502 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
503 New functions.
504 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
505 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
506 to_stopped_data_address and to_core_of_thread fields of
507 ravenscar_ops.
508
509 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
510
511 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
512 (struct gdbarch_tdep): New member long_double_abi.
513 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
514 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
515 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
516 format depending on long_double_abi tdep member.
517 (ppc_floatformat_for_type): Handle __ibm128 type.
518
519 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
520
521 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
522
523 2017-11-21 Pedro Alves <palves@redhat.com>
524
525 * dwarf2read.c (mapped_index::find_name_components_bounds)
526 <completion mode, upper bound>: Use std::lower_bound instead of
527 std::upper_bound.
528 (test_mapped_index_find_name_component_bounds): Remove incorrect
529 "t1_fund" from expected symbols.
530
531 2017-11-21 Pedro Alves <palves@redhat.com>
532
533 * dwarf2read.c (mapped_index::name_components_casing): New field.
534 (mapped_index) <build_name_components,
535 find_name_components_bounds): Declare new methods.
536 (mapped_index::find_name_components_bounds)
537 (mapped_index::build_name_components): New methods, factored out
538 from dw2_expand_symtabs_matching_symbol.
539 (check_find_bounds_finds)
540 (test_mapped_index_find_name_component_bounds): New.
541 (run_test): Rename to ...
542 (test_dw2_expand_symtabs_matching_symbol): ... this.
543 (run_test): Reimplement.
544
545 2017-11-21 Pedro Alves <palves@redhat.com>
546
547 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
548 (symbol_end): Use cp_ident_is_alnum.
549 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
550 * dwarf2read.c (make_sort_after_prefix_name): New function.
551 (dw2_expand_symtabs_matching_symbol): Use it.
552 (test_symbols): Add more symbols.
553 (run_test): Add tests.
554
555 2017-11-17 Tom Tromey <tom@tromey.com>
556
557 * symtab.h (enum symbol_subclass_kind): New.
558 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
559 Remove.
560 <subclass>: New member.
561 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
562 * rust-lang.c (rust_get_trait_object_pointer): Update.
563 * dwarf2read.c (read_func_scope): Update.
564 (read_variable): Update.
565
566 2017-11-17 Tom Tromey <tom@tromey.com>
567
568 * dwarf2read.c (read_func_scope): Update.
569 * symtab.h (struct template_symbol): Derive from symbol.
570 <base>: Remove.
571
572 2017-11-17 Tom Tromey <tom@tromey.com>
573
574 * symtab.h (struct symbol) <is_rust_vtable>: New member.
575 (struct rust_vtable_symbol): New.
576 (find_symbol_at_address): Declare.
577 * symtab.c (find_symbol_at_address): New function.
578 * symfile.h (struct quick_symbol_functions)
579 <find_compunit_symtab_by_address>: New member.
580 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
581 function.
582 (debug_sym_quick_functions): Link to
583 debug_qf_find_compunit_symtab_by_address.
584 * rust-lang.c (rust_get_trait_object_pointer): New function.
585 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
586 rust_get_trait_object_pointer.
587 * psymtab.c (psym_relocate): Clear psymbol_map.
588 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
589 functions.
590 (psym_functions): Link to psym_find_compunit_symtab_by_address.
591 * objfiles.h (struct objfile) <psymbol_map>: New member.
592 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
593 (process_die) <DW_TAG_variable>: New case. Call read_variable.
594 (rust_containing_type, read_variable): New functions.
595
596 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
597
598 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
599
600 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
601
602 * common/filestuff.c: Include <algorithm>.
603 (open_fds): Change type to std::vector<int>.
604 (do_mark_open_fd): Adjust.
605 (unmark_fd_no_cloexec): Adjust.
606 (do_close): Adjust.
607
608 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
609
610 * breakpoint.c (output_thread_groups): Take an std::vector.
611 (print_one_breakpoint_location): Adjust.
612
613 2017-11-17 Joel Brobecker <brobecker@adacore.com>
614
615 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
616 (ada_evaluate_subexp_for_cast): New function.
617 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
618 ada_evaluate_subexp_for_cast.
619 (ada_evaluate_subexp) <nosideret>: Replace code by call to
620 eval_skip_value.
621 * eval.c (evaluate_var_value): Make non-static.
622 (evaluate_var_msym_value, eval_skip_value): Likewise.
623 * value.h (evaluate_var_value, evaluate_var_msym_value)
624 (eval_skip_value): Declare.
625
626 2017-11-16 Joel Brobecker <brobecker@adacore.com>
627
628 * ada-lang.c (ada_value_cast): Remove parameter "noside".
629 Update all callers.
630
631 2017-11-16 Pedro Alves <palves@redhat.com>
632
633 * python/py-unwind.c (pyuw_sniffer): Translate
634 PyExc_KeyboardInterrupt to a GDB Quit exception.
635
636 2017-11-16 Pedro Alves <palves@redhat.com>
637
638 * infrun.c (resume_cleanups): Delete.
639 (resume): No longer install a resume_cleanups cleanup nor call
640 QUIT.
641 (proceed): Pass the terminal to the inferior.
642 (keep_going_pass_signal): No longer install a resume_cleanups
643 cleanup.
644
645 2017-11-16 Pedro Alves <palves@redhat.com>
646
647 * inf-loop.c (inferior_event_handler): Don't swallow the exception
648 if the prompt is blocked.
649
650 2017-11-16 Pedro Alves <palves@redhat.com>
651
652 * breakpoint.c (insert_bp_location): Replace bp_err and
653 bp_err_message locals by a gdb_exception local.
654
655 2017-11-16 Pedro Alves <palves@redhat.com>
656
657 * inflow.c (scoped_ignore_sigttou): New class.
658 (child_terminal_ours_1, new_tty): Use it.
659
660 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
661
662 * target-float.c (decimal_from_number): Add byte_order argument and
663 call match_endianness. Error if unknown floating-point type.
664 (decimal_to_number): Add byte_order argument and call match_endianness.
665 (decimal_from_longest): Update call. Do not call match_endianness.
666 (decimal_from_ulongest): Likewise.
667 (decimal_binop): Likewise.
668 (decimal_is_zero): Likewise.
669 (decimal_compare): Likewise.
670 (decimal_convert): Likewise.
671
672 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
673
674 * python/python.c (gdbpy_rbreak): New function.
675 * NEWS: Document Python rbreak feature.
676
677 2017-11-16 Yao Qi <yao.qi@linaro.org>
678
679 * features/tic6x-c62x.xml: Remove.
680 * features/tic6x-c64x.xml: Remove.
681 * features/tic6x-c64xp.xml: Remove.
682
683 2017-11-15 John Baldwin <jhb@FreeBSD.org>
684
685 * symtab.h: Include <array>.
686
687 2017-11-15 John Baldwin <jhb@FreeBSD.org>
688
689 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
690 (bsd_kvm_proc_cmd): Likewise.
691
692 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
693
694 * tui/tui-win.c (window_name_completer): Replace VEC with
695 std::vector.
696
697 2017-11-15 Andrew Cagney <cagney@gnu.org>
698
699 * MAINTAINERS: Remove no-longer applicable entries.
700
701 2017-11-15 Andrew Cagney <cagney@gnu.org>
702
703 * MAINTAINERS: Move self to Past Maintainers.
704
705 2017-11-15 Yao Qi <yao.qi@linaro.org>
706
707 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
708 * features/nios2-linux.c: Remove.
709 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
710 initialize_tdesc_nios2_linux.
711
712 2017-11-15 Yao Qi <yao.qi@linaro.org>
713
714 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
715 M68HC11_LAST_HARD_REG + 1.
716
717 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
718
719 PR gdb/22388
720 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
721 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
722 Return TARGET_XFER_EOF if size of returned data is 0.
723
724 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
725
726 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
727 memory-map-selftests.c.
728 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
729 * memory-map.c (memory_map_start_memory): Fix computation of hi
730 address.
731 * unittests/memory-map-selftests.c: New file.
732
733 2017-11-09 Joel Brobecker <brobecker@adacore.com>
734
735 * ada-lang.c: Fix some typos in the general command documenting
736 how Ada expressions are being evaluated and how their result
737 is printed.
738
739 2017-11-09 Tom Tromey <tom@tromey.com>
740
741 * psymtab.c (psymbol_hash): Do not hash string contents.
742 (psymbol_compare): Add comment.
743
744 2017-11-09 Tom Tromey <tom@tromey.com>
745
746 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
747
748 2017-11-08 Joel Brobecker <brobecker@adacore.com>
749
750 * ada-exp.y (write_var_from_sym): Remove parameter
751 "orig_left_context". Update all callers.
752
753 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
754
755 * tracepoint.h (class collection_list) <stringify>: Return
756 std::vector<std::string>.
757 (encode_actions_rsp): Change parameters to
758 std::vector<std::string> *.
759 * tracepoint.c (collection_list::stringify): Return
760 std::vector<std::string> and adjust accordingly.
761 (encode_actions_rsp): Changee parameters to
762 std::vector<std::string> and adjust accordingly.
763 * remote.c (free_actions_list),
764 free_actions_list_cleanup_wrapper): Remove.
765 (remote_download_tracepoint): Adjust to std::vector.
766
767 2017-11-08 Tom Tromey <tom@tromey.com>
768
769 * dwarf2read.c (symbolp): Remove typedef.
770 (read_func_scope): Use std::vector.
771 (process_structure_scope): Use std::vector.
772
773 2017-11-08 Pedro Alves <palves@redhat.com>
774
775 * ada-lang.c (ada_make_symbol_completion_list): Use
776 completion_skip_symbol.
777 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
778 (symbol_is_function_or_method(symbol*)): New.
779 (add_symtab_completions): Add complete_symbol_mode parameter. Use
780 completion_skip_symbol.
781 (default_collect_symbol_completion_matches_break_on): Use
782 completion_skip_symbol. Pass down mode.
783 (collect_file_symbol_completion_matches): Pass down mode.
784 * symtab.h (symbol_is_function_or_method): New declarations.
785 (completion_skip_symbol): New template function.
786
787 2017-11-08 Pedro Alves <palves@redhat.com>
788
789 * linespec.c (iterate_over_all_matching_symtabs): Add
790 search_domain parameter. Pass it down to expand_symtabs_matching.
791 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
792 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
793 search_domain.
794 (add_all_symbol_names_from_pspace): Add search_domain parameter.
795 Pass it down.
796 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
797 symbols.
798 (add_matching_symbols_to_info): Add search_domain parameter. Pass
799 it down.
800
801 2017-11-08 Pedro Alves <palves@redhat.com>
802
803 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
804 text_len locals and don't pass them down.
805 * symtab.c (completion_list_add_name): Remove
806 sym_text/sym_text_len parameters and adjust.
807 (completion_list_add_symbol, completion_list_add_msymbol)
808 (completion_list_objc_symbol, completion_list_add_fields)
809 (add_symtab_completions): Likewise.
810 (default_collect_symbol_completion_matches_break_on)
811 (collect_file_symbol_completion_matches): Remove sym_text_len
812 local and don't pass it down.
813 * symtab.h (completion_list_add_name): Remove
814 sym_text/sym_text_len parameters.
815
816 2017-11-08 Pedro Alves <palves@redhat.com>
817
818 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
819 unittests/lookup_name_info-selftests.c.
820 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
821 * cp-support.c: Include "selftest.h".
822 (cp_remove_params_1): Rename from cp_remove_params. Add
823 'require_param' parameter, and handle it.
824 (cp_remove_params): Reimplement.
825 (cp_remove_params_if_any): New.
826 (selftests::quote): New.
827 (selftests::check_remove_params): New.
828 (selftests::test_cp_remove_params): New.
829 (_initialize_cp_support): Install
830 selftests::test_cp_remove_params.
831 * cp-support.h (cp_remove_params_if_any): Declare.
832 * dwarf2read.c :Include "selftest.h".
833 (dw2_expand_symtabs_matching_symbol): Use
834 lookup_name_info::make_ignore_params.
835 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
836 (selftests::dw2_expand_symtabs_matching::string_or_null)
837 (selftests::dw2_expand_symtabs_matching::check_match)
838 (selftests::dw2_expand_symtabs_matching::test_symbols)
839 (selftests::dw2_expand_symtabs_matching::run_test): New.
840 (_initialize_dwarf2_read): Register
841 selftests::dw2_expand_symtabs_matching::run_test.
842 * psymtab.c (psym_expand_symtabs_matching): Use
843 lookup_name_info::make_ignore_params.
844 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
845 If the lookup name wants to ignore parameters, strip them.
846 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
847 code handling '('.
848 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
849 (default_collect_symbol_completion_matches_break_on): Don't try to
850 strip parameters.
851 * symtab.h (lookup_name_info::lookup_name_info): Add
852 'ignore_parameters' parameter.
853 (lookup_name_info::ignore_parameters)
854 (lookup_name_info::make_ignore_params): New methods.
855 (lookup_name_info::m_ignore_parameters): New field.
856 * unittests/lookup_name_info-selftests.c: New file.
857
858 2017-11-08 Pedro Alves <palves@redhat.com>
859
860 * dwarf2read.c (dw2_expand_marked_cus)
861 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
862 (dw2_expand_symtabs_matching): Move further below.
863 (dw2_expand_marked_cus): Reindent.
864
865 2017-11-08 Pedro Alves <palves@redhat.com>
866
867 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
868 (struct name_component): New.
869 (mapped_index::name_components): New field.
870 (mapped_index::symbol_name_at): New method.
871 (dwarf2_read_index): Call mapped_index ctor.
872 (dw2_map_matching_symbols): Add comment about name_components
873 table.
874 (dw2_expand_symtabs_matching): Factor part to...
875 (dw2_expand_symtabs_matching_symbol): ... this new function.
876 Build name components table, and lookup symbols in it before
877 calling the name matcher.
878 (dw2_expand_marked_cus): New, factored out from
879 dw2_expand_symtabs_matching.
880 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
881
882 2017-11-08 Pedro Alves <palves@redhat.com>
883
884 * ada-lang.c (ada_encode): Rename to ..
885 (ada_encode_1): ... this. Add throw_errors parameter and handle
886 it.
887 (ada_encode): Reimplement.
888 (match_name): Delete, folded into full_name.
889 (resolve_subexp): No longer pass the encoded name to
890 ada_lookup_symbol_list.
891 (should_use_wild_match): Delete.
892 (name_match_type_from_name): New.
893 (ada_lookup_simple_minsym): Use lookup_name_info and the
894 language's symbol_name_matcher_ftype.
895 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
896 (ada_add_block_renamings): Adjust to use lookup_name_info.
897 (ada_lookup_name): New.
898 (add_nonlocal_symbols, ada_add_all_symbols)
899 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
900 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
901 (ada_name_for_lookup): Delete.
902 (ada_lookup_encoded_symbol): Construct a verbatim name.
903 (wild_match): Reverse sense of return type. Use bool.
904 (full_match): Reverse sense of return type. Inline bits of old
905 match_name here.
906 (ada_add_block_symbols): Adjust to use lookup_name_info.
907 (symbol_completion_match): Delete, folded into...
908 (ada_lookup_name_info::matches): ... .this new method.
909 (symbol_completion_add): Delete.
910 (ada_collect_symbol_completion_matches): Add name_match_type
911 parameter. Adjust to use lookup_name_info and
912 completion_list_add_name.
913 (get_var_value, ada_add_global_exceptions): Adjust to use
914 lookup_name_info.
915 (ada_get_symbol_name_cmp): Delete.
916 (do_wild_match, do_full_match): New functions.
917 (ada_lookup_name_info::ada_lookup_name_info): New method.
918 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
919 functions.
920 (ada_language_defn): Install ada_get_symbol_name_matcher.
921 * ada-lex.l (processId): If name starts with '<', copy it
922 verbatim.
923 * block.c (block_iter_match_step, block_iter_match_first)
924 (block_iter_match_next, block_lookup_symbol)
925 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
926 lookup_name_info.
927 * block.h (block_iter_match_first, block_iter_match_next)
928 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
929 * c-lang.c (c_language_defn, cplus_language_defn)
930 (asm_language_defn, minimal_language_defn): Adjust comments to
931 refer to la_get_symbol_name_matcher.
932 * completer.c (complete_files_symbols)
933 (collect_explicit_location_matches, symbol_completer): Pass a
934 symbol_name_match_type down.
935 * completer.h (class completion_match, completion_match_result):
936 New classes.
937 (completion_tracker::reset_completion_match_result): New method.
938 (completion_tracker::m_completion_match_result): New field.
939 * cp-support.c (make_symbol_overload_list_block): Adjust to use
940 lookup_name_info.
941 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
942 functions.
943 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
944 * d-lang.c: Adjust comments to refer to
945 la_get_symbol_name_matcher.
946 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
947 Adjust to use lookup_name_info.
948 (dict_iter_match_first, dict_iter_match_next)
949 (iter_match_first_hashed, iter_match_next_hashed)
950 (iter_match_first_linear, iter_match_next_linear): Adjust to work
951 with a lookup_name_info.
952 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
953 Likewise.
954 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
955 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
956 (gdb_index_symbol_name_matcher): New class.
957 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
958 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
959 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
960 with a symbol_name_match_type.
961 (f_language_defn): Adjust comments to refer to
962 la_get_symbol_name_matcher.
963 * go-lang.c (go_language_defn): Adjust comments to refer to
964 la_get_symbol_name_matcher.
965 * language.c (default_symbol_name_matcher)
966 (language_get_symbol_name_matcher): New functions.
967 (unknown_language_defn, auto_language_defn): Adjust comments to
968 refer to la_get_symbol_name_matcher.
969 * language.h (symbol_name_cmp_ftype): Delete.
970 (language_defn) <la_collect_symbol_completion_matches>: Add match
971 type parameter.
972 <la_get_symbol_name_cmp>: Delete field.
973 <la_get_symbol_name_matcher>: New field.
974 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
975 (default_symbol_name_matcher, language_get_symbol_name_matcher):
976 Declare.
977 * linespec.c (iterate_over_all_matching_symtabs)
978 (iterate_over_file_blocks): Adjust to use lookup_name_info.
979 (find_methods): Add language parameter, and use lookup_name_info
980 and the language's symbol_name_matcher_ftype.
981 (linespec_complete_function): Adjust.
982 (lookup_prefix_sym): Use lookup_name_info.
983 (add_all_symbol_names_from_pspace): Adjust.
984 (find_superclass_methods): Add language parameter and pass it
985 down.
986 (find_method): Pass symbol language down.
987 (find_linespec_symbols): Don't demangle or Ada encode here.
988 (search_minsyms_for_name): Add lookup_name_info parameter.
989 (add_matching_symbols_to_info): Add name_match_type parameter.
990 Use lookup_name_info.
991 * m2-lang.c (m2_language_defn): Adjust comments to refer to
992 la_get_symbol_name_matcher.
993 * minsyms.c: Include <algorithm>.
994 (add_minsym_to_demangled_hash_table): Remove table parameter and
995 add objfile parameter. Use search_name_hash, and add language to
996 demangled languages vector.
997 (struct found_minimal_symbols): New struct.
998 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
999 New functions.
1000 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1001 input names here. Use lookup_name_info instead. Lookup up
1002 demangled names once for each language in the demangled names
1003 vector.
1004 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1005 demangled names once for each language in the demangled names
1006 vector.
1007 (build_minimal_symbol_hash_tables): Adjust.
1008 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1009 lookup_name_info.
1010 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1011 la_get_symbol_name_matcher.
1012 * objfiles.h: Include <vector>.
1013 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1014 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1015 la_get_symbol_name_matcher.
1016 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1017 la_get_symbol_name_matcher.
1018 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1019 (match_partial_symbol): Use symbol_name_match_type,
1020 lookup_name_info and psymbol_name_matches.
1021 (lookup_partial_symbol): Use lookup_name_info.
1022 (map_block): Use symbol_name_match_type and lookup_name_info.
1023 (psym_map_matching_symbols): Use symbol_name_match_type.
1024 (psymbol_name_matches): New.
1025 (recursively_search_psymtabs): Use lookup_name_info and
1026 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1027 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1028 'kind' parameter to 'domain'.
1029 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1030 la_get_symbol_name_matcher.
1031 * symfile-debug.c (debug_qf_map_matching_symbols)
1032 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1033 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1034 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1035 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1036 Adjust to use symbol_name_match_type.
1037 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1038 (expand_symtabs_matching): Adjust to use lookup_name_info.
1039 * symmisc.c (maintenance_expand_symtabs): Use
1040 lookup_name_info::match_any ().
1041 * symtab.c (symbol_matches_search_name): New.
1042 (eq_symbol_entry): Adjust to use lookup_name_info and the
1043 language's matcher.
1044 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1045 (lookup_name_info::match_any): New.
1046 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1047 (compare_symbol_name): Add language, lookup_name_info and
1048 completion_match_result parameters, and use them.
1049 (completion_list_add_name): Make extern. Add language and
1050 lookup_name_info parameters. Use them.
1051 (completion_list_add_symbol, completion_list_add_msymbol)
1052 (completion_list_objc_symbol): Add lookup_name_info parameters and
1053 adjust. Pass down language.
1054 (completion_list_add_fields): Add lookup_name_info parameters and
1055 adjust. Pass down language.
1056 (add_symtab_completions): Add lookup_name_info parameters and
1057 adjust.
1058 (default_collect_symbol_completion_matches_break_on): Add
1059 name_match_type parameter, and use it. Use lookup_name_info.
1060 (default_collect_symbol_completion_matches)
1061 (collect_symbol_completion_matches): Add name_match_type
1062 parameter, and pass it down.
1063 (collect_symbol_completion_matches_type): Adjust.
1064 (collect_file_symbol_completion_matches): Add name_match_type
1065 parameter, and use lookup_name_info.
1066 * symtab.h: Include <string> and "common/gdb_optional.h".
1067 (enum class symbol_name_match_type): New.
1068 (class ada_lookup_name_info): New.
1069 (struct demangle_for_lookup_info): New.
1070 (class lookup_name_info): New.
1071 (symbol_name_matcher_ftype): New.
1072 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1073 (symbol_matches_search_name): Declare.
1074 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1075 (default_collect_symbol_completion_matches)
1076 (collect_symbol_completion_matches)
1077 (collect_file_symbol_completion_matches): Add name_match_type
1078 parameter.
1079 (iterate_over_symbols): Use lookup_name_info.
1080 (completion_list_add_name): Declare.
1081 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1082 (strncmp_iw_with_mode): Now extern.
1083 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1084 (strncmp_iw_with_mode): Declare.
1085
1086 2017-11-08 Keith Seitz <keiths@redhat.com>
1087 Pedro Alves <palves@redhat.com>
1088
1089 * ada-lang.c (ada_language_defn): Install
1090 default_search_name_hash.
1091 * buildsym.c (struct buildsym_compunit): <language>: New field.
1092 (finish_block_internal): Pass language when creating dictionaries.
1093 (start_buildsym_compunit, start_symtab): New language parameters.
1094 Use them.
1095 (restart_symtab): Pass down compilation unit's language.
1096 * buildsym.h (enum language): Forward declare.
1097 (start_symtab): New 'language' parameter.
1098 * c-lang.c (c_language_defn, cplus_language_defn)
1099 (asm_language_defn, minimal_language_defn): Install
1100 default_search_name_hash.
1101 * coffread.c (coff_start_symtab): Adjust.
1102 * d-lang.c (d_language_defn): Install default_search_name_hash.
1103 * dbxread.c (struct symloc): Add 'pst_language' field.
1104 (PST_LANGUAGE): Define.
1105 (start_psymtab, read_ofile_symtab): Use it.
1106 (process_one_symbol): New 'language' parameter. Pass it down.
1107 * dictionary.c (struct dictionary) <language>: New field.
1108 (DICT_LANGUAGE): Define.
1109 (dict_create_hashed, dict_create_hashed_expandable)
1110 (dict_create_linear, dict_create_linear_expandable): New parameter
1111 'language'. Set the dictionary's language.
1112 (iter_match_first_hashed): Adjust to rename.
1113 (insert_symbol_hashed): Assert we don't see mismatching
1114 languages. Adjust to rename.
1115 (dict_hash): Rename to ...
1116 (default_search_name_hash): ... this and make extern.
1117 * dictionary.h (struct language_defn): Forward declare.
1118 (dict_create_hashed): New parameter 'language'.
1119 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1120 * f-lang.c (f_language_defn): Install default_search_name_hash.
1121 * go-lang.c (go_language_defn): Install default_search_name_hash.
1122 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1123 creation.
1124 * language.c (unknown_language_defn, auto_language_defn):
1125 * language.h (language_defn::la_search_name_hash): New field.
1126 (default_search_name_hash): Declare.
1127 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1128 * mdebugread.c (new_block): New parameter 'language'.
1129 * mdebugread.c (parse_symbol): Pass symbol language to block
1130 allocation.
1131 (psymtab_to_symtab_1): Pass down language.
1132 (new_symtab): Pass compunit's language to block allocation.
1133 * objc-lang.c (objc_language_defn): Install
1134 default_search_name_hash.
1135 * opencl-lang.c (opencl_language_defn):
1136 * p-lang.c (pascal_language_defn): Install
1137 default_search_name_hash.
1138 * rust-lang.c (rust_language_defn): Install
1139 default_search_name_hash.
1140 * stabsread.h (enum language): Forward declare.
1141 (process_one_symbol): Add 'language' parameter.
1142 * symtab.c (search_name_hash): New function.
1143 * symtab.h (search_name_hash): Declare.
1144 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1145
1146 2017-11-08 Pedro Alves <palves@redhat.com>
1147
1148 * cp-name-parser.y (main): Don't initialize extra_chars.
1149
1150 2017-11-07 Tom Tromey <tom@tromey.com>
1151
1152 * event-top.h (command_handler): Constify.
1153 * record-full.c (cmd_record_full_start): Update.
1154 * thread.c (thread_apply_all_command): Update.
1155 * printcmd.c (eval_command): Update.
1156 * mi/mi-main.c (mi_execute_cli_command): Update.
1157 (mi_execute_async_cli_command): Update.
1158 * tui/tui-stack.c (tui_update_command): Update.
1159 * cli/cli-interp.c (safe_execute_command): Constify.
1160 * record.c (record_start): Update.
1161 (record_start, record_stop, cmd_record_start): Update.
1162 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1163 (cmd_record_btrace_pt_start): Update.
1164 (cmd_record_btrace_start): Update.
1165 (cmd_record_btrace_start): Update.
1166 * reverse.c (exec_reverse_once): Update.
1167 * python/python.c (execute_gdb_command): Don't copy the command.
1168 * event-top.c (command_line_handler): Update.
1169 (command_handler): Constify.
1170 * defs.h (deprecated_call_command_hook): Constify.
1171 * cli/cli-script.h (execute_user_command): Constify.
1172 * cli/cli-script.c (execute_user_command): Constify.
1173 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1174 (enum command_control_type): Update.
1175 * main.c (catch_command_errors): Remove non-const overload.
1176 (catch_command_errors_ftype): Remove.
1177 * python/py-cmd.c (cmdpy_function): Constify.
1178 * guile/scm-cmd.c (cmdscm_function): Constify.
1179 * cli/cli-dump.c (call_dump_func): Constify.
1180 * cli/cli-decode.c (do_const_cfunc): Constify.
1181 (do_sfunc): Constify.
1182 (cmd_func): Constify.
1183 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1184 * top.h (execute_command): Constify.
1185 * top.c (execute_command): Constify.
1186 (execute_command_to_string): Constify.
1187 (deprecated_call_command_hook): Constify.
1188 * command.h (cmd_func): Constify.
1189 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1190
1191 2017-11-07 Tom Tromey <tom@tromey.com>
1192
1193 * ada-lang.c (catch_ada_exception_command): Constify.
1194 (catch_assert_command): Constify.
1195 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1196 (catch_rethrow_command): Constify.
1197 (catch_exception_command_1): Constify.
1198 * breakpoint.h (add_catch_command): Constify.
1199 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1200 (catch_syscall_split_args): Constify.
1201 * break-catch-sig.c (catch_signal_command): Constify.
1202 (catch_signal_split_args): Constify.
1203 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1204 cmd_const_sfunc_ftype.
1205 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1206 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1207 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1208 (add_setshow_string_cmd, struct cmd_list_element)
1209 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1210 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1211 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1212 Constify.
1213 (set_cmd_sfunc): Constify.
1214 (empty_sfunc): Constify.
1215 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1216 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1217 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1218 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1219 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1220 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1221 Constify.
1222 (set_cmd_sfunc): Constify.
1223 (cmd_sfunc_ftype): Remove.
1224 * compile/compile.c (set_compile_args): Constify.
1225 * infrun.c (set_disable_randomization): Constify.
1226 * infcmd.c (set_args_command, set_cwd_command): Constify.
1227 * breakpoint.c (set_condition_evaluation_mode): Constify.
1228 (add_catch_command): Constify.
1229 (catch_fork_command_1, catch_exec_command_1)
1230 (catch_load_command_1, catch_unload_command_1): Constify.
1231 (catch_load_or_unload): Constify.
1232 * guile/scm-param.c (pascm_set_func): Constify.
1233 (add_setshow_generic): Constify.
1234 * python/py-param.c (get_set_value): Constify.
1235 * top.h (set_verbose): Constify.
1236 * tui/tui-win.c (tui_set_var_cmd): Constify.
1237 * mi/mi-main.c (set_mi_async_command): Constify.
1238 * cli/cli-logging.c (set_logging_overwrite)
1239 (set_logging_redirect): Constify.
1240 * value.c (set_max_value_size): Constify.
1241 * valprint.c (set_input_radix, set_output_radix): Constify.
1242 * utils.c (set_width_command, set_height_command): Constify.
1243 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1244 * tracepoint.c (set_disconnected_tracing)
1245 (set_circular_trace_buffer, set_trace_buffer_size)
1246 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1247 * top.c (set_history_size_command, set_verbose, set_editing)
1248 (set_gdb_datadir, set_history_filename): Constify.
1249 * target.c (set_targetdebug, maint_set_target_async_command)
1250 (maint_set_target_non_stop_command, set_target_permissions)
1251 (set_write_memory_permission): Constify.
1252 (open_target): Constify.
1253 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1254 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1255 * symtab.c (set_symbol_cache_size_handler): Constify.
1256 * symfile.c (set_ext_lang_command): Constify.
1257 * symfile-debug.c (set_debug_symfile): Constify.
1258 * source.c (set_directories_command): Constify.
1259 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1260 * serial.c (set_parity): Constify.
1261 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1262 * remote.c (set_remote_exec_file, set_remotebreak)
1263 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1264 * record.c (set_record_insn_history_size)
1265 (set_record_call_history_size): Constify.
1266 * record-full.c (set_record_full_insn_max_num): Constify.
1267 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1268 * osabi.c (set_osabi): Constify.
1269 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1270 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1271 * maint.c (maintenance_set_profile_cmd): Constify.
1272 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1273 * language.c (set_language_command, set_range_command)
1274 (set_case_command): Constify.
1275 * infrun.c (set_non_stop, set_observer_mode)
1276 (set_stop_on_solib_events, set_schedlock_func)
1277 (set_exec_direction_func): Constify.
1278 * infcmd.c (set_inferior_tty_command): Constify.
1279 * disasm.c (set_disassembler_options_sfunc): Constify.
1280 * demangle.c (set_demangling_command): Constify.
1281 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1282 * cris-tdep.c (set_cris_version, set_cris_mode)
1283 (set_cris_dwarf2_cfi): Constify.
1284 * corefile.c (set_gnutarget_command): Constify.
1285 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1286 (set_target_wide_charset_sfunc): Constify.
1287 * breakpoint.c (update_dprintf_commands): Constify.
1288 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1289 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1290 (set_disassembly_style_sfunc): Constify.
1291 * arch-utils.c (set_endian, set_architecture): Constify.
1292 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1293 * agent.c (set_can_use_agent): Constify.
1294
1295 2017-11-07 Tom Tromey <tom@tromey.com>
1296
1297 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1298 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1299 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1300 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1301 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1302 (parse_int_arg, show_thread_default_detach_sc_cmd)
1303 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1304 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1305 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1306 (show_task_pause_cmd, set_task_detach_sc_cmd)
1307 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1308 (set_noninvasive_cmd, set_thread_pause_cmd)
1309 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1310 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1311 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1312 * windows-nat.c (display_selectors): Constify.
1313 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1314 non-const "cfunc".
1315 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1316 (cmd_cfunc_eq): Likewise.
1317 (struct cmd_list_element): Likewise.
1318 (do_cfunc): Remove.
1319 (cli_user_command_p): Update.
1320 * command.h (add_cmd): Remove non-const overload.
1321 (cmd_cfunc_ftype): Remove typedef.
1322 (cmd_cfunc_eq): Remove non-const overload.
1323 * value.c (show_values): Constify.
1324 * thread.c (thread_apply_all_command): Constify.
1325 * symfile.c (load_command): Constify.
1326 * source.c (directory_command): Constify.
1327 * maint.c (maintenance_internal_error)
1328 (maintenance_demangler_warning, maintenance_space_display)
1329 (maintenance_print_architecture, maintenance_translate_address)
1330 (maintenance_info_selftests, maintenance_internal_warning):
1331 Constify.
1332 * breakpoint.c (disable_trace_command, enable_trace_command):
1333 Constify.
1334 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1335 Constify.
1336 (add_auto_load_safe_path): Constify.
1337 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1338 * top.h (show_commands): Constify.
1339 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1340 * sparc64-tdep.c (adi_examine_command): Constify.
1341 (adi_assign_command): Constify.
1342
1343 2017-11-07 Tom Tromey <tom@tromey.com>
1344
1345 * frame.h (info_locals_command, info_args_command): Constify.
1346 * auto-load.h (auto_load_info_scripts): Constify.
1347 * inferior.h (registers_info): Constify.
1348 * copying.c: Rebuild.
1349 * copying.awk: Constify generated commands.
1350 * auto-load.c (auto_load_info_scripts)
1351 (info_auto_load_gdb_scripts): Constify.
1352 * cli/cli-decode.c (struct cmd_list_element): Take a
1353 cmd_const_cfunc_ftype.
1354 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1355 * tui/tui-win.c (tui_all_windows_info): Constify.
1356 * python/py-auto-load.c (info_auto_load_python_scripts):
1357 Constify.
1358 * cli/cli-cmds.c (show_command): Remove non-const overload.
1359 * tracepoint.c (info_tvariables_command, info_scope_command):
1360 Constify.
1361 (info_static_tracepoint_markers_command): Constify.
1362 * thread.c (info_threads_command): Constify.
1363 (print_thread_info_1): Constify.
1364 * target.c (info_target_command): Constify.
1365 * symtab.c (info_sources_command, info_functions_command)
1366 (info_types_command): Constify.
1367 (info_variables_command): Remove non-const overload.
1368 * symfile.c (info_ext_lang_command): Constify.
1369 * stack.c (info_frame_command, info_locals_command)
1370 (info_args_command): Constify.
1371 (backtrace_command): Remove non-const overload.
1372 * source.c (info_source_command, info_line_command): Constify.
1373 * solib.c (info_sharedlibrary_command): Constify.
1374 * skip.c (info_skip_command): Constify.
1375 * ser-go32.c (info_serial_command): Constify.
1376 * reverse.c (info_bookmarks_command): Constify.
1377 * printcmd.c (info_symbol_command, info_address_command)
1378 (info_display_command): Constify.
1379 * osdata.c (info_osdata_command): Constify.
1380 * objc-lang.c (info_selectors_command, info_classes_command):
1381 Constify.
1382 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1383 * memattr.c (info_mem_command): Constify.
1384 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1385 * linux-fork.c (info_checkpoints_command): Constify.
1386 * infrun.c (info_signals_command): Constify.
1387 * inflow.c (info_terminal_command): Constify.
1388 * inferior.c (info_inferiors_command): Constify.
1389 (print_inferior): Constify.
1390 * infcmd.c (info_program_command, info_all_registers_command)
1391 (info_registers_command, info_vector_command)
1392 (info_float_command): Constify.
1393 (registers_info): Constify.
1394 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1395 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1396 Constify.
1397 * f-valprint.c (info_common_command): Constify.
1398 * dcache.c (info_dcache_command): Constify.
1399 (dcache_info_1): Constify.
1400 * darwin-nat-info.c (info_mach_tasks_command)
1401 (info_mach_task_command, info_mach_ports_command)
1402 (info_mach_port_command, info_mach_threads_command)
1403 (info_mach_thread_command, info_mach_regions_command)
1404 (info_mach_regions_recurse_command, info_mach_region_command)
1405 (info_mach_exceptions_command): Constify.
1406 (get_task_from_args): Constify.
1407 * cp-support.c (info_vtbl_command): Constify.
1408 * breakpoint.c (info_watchpoints_command)
1409 (info_tracepoints_command): Constify.
1410 (info_breakpoints_command): Remove non-const overload.
1411 * avr-tdep.c (avr_io_reg_read_command): Constify.
1412 * auxv.c (info_auxv_command): Constify.
1413 * ada-tasks.c (info_tasks_command): Constify.
1414 (info_task): Constify.
1415 * ada-lang.c (info_exceptions_command): Constify.
1416
1417 2017-11-07 Tom Tromey <tom@tromey.com>
1418
1419 * solib.h (no_shared_libraries): Constify.
1420 * frame.h (return_command): Constify.
1421 * cli/cli-cmds.h (quit_command): Constify.
1422 * top.h (quit_command, execute_command): Constify.
1423 * target.h (flash_erase_command): Constify.
1424 * inferior.h (set_inferior_args, attach_command): Constify.
1425 * tracepoint.h (start_tracing, stop_tracing): Constify.
1426 * breakpoint.h (break_command, tbreak_command)
1427 (hbreak_command_wrapper, thbreak_command_wrapper)
1428 (rbreak_command_wrapper, watch_command_wrapper)
1429 (awatch_command_wrapper, rwatch_command_wrapper)
1430 (get_tracepoint_by_number): Constify.
1431 * symtab.c (info_variables_command, rbreak_command)
1432 (symtab_symbol_info): Constify.
1433 (info_variables_command): Add non-const overload.
1434 * top.c (dont_repeat_command): Constify.
1435 * breakpoint.c (ignore_command, commands_command)
1436 (condition_command, tbreak_command, hbreak_command)
1437 (thbreak_command, clear_command, break_command)
1438 (info_breakpoints_command, watch_command, rwatch_command)
1439 (awatch_command, trace_command, ftrace_command, strace_command)
1440 (trace_pass_command, break_range_command, dprintf_command)
1441 (agent_printf_command, get_tracepoint_by_number)
1442 (watch_maybe_just_location, trace_pass_command): Constify.
1443 (info_breakpoints_command): Add non-const overload.
1444 * tracefile.c (tsave_command): Constify.
1445 * infcmd.c (attach_command, disconnect_command, signal_command)
1446 (queue_signal_command, stepi_command, nexti_command)
1447 (finish_command, next_command, step_command, until_command)
1448 (advance_command, jump_command, continue_command, run_command)
1449 (start_command, starti_command, interrupt_command)
1450 (run_command_1, set_inferior_args, step_1): Constify.
1451 * inferior.c (add_inferior_command, remove_inferior_command)
1452 (clone_inferior_command): Constify.
1453 * linux-fork.c (checkpoint_command, restart_command): Constify.
1454 * windows-nat.c (signal_event_command): Constify.
1455 * guile/guile.c (guile_repl_command, guile_command): Constify.
1456 * printcmd.c (x_command, display_command, printf_command)
1457 (output_command, set_command, call_command, print_command)
1458 (eval_command): Constify.
1459 (non_const_set_command): Remove.
1460 (_initialize_printcmd): Update.
1461 * source.c (forward_search_command, reverse_search_command):
1462 Constify.
1463 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1464 Constify.
1465 * infrun.c (handle_command): Constify.
1466 * memattr.c (mem_command): Constify.
1467 * stack.c (return_command, up_command, up_silently_command)
1468 (down_command, down_silently_command, frame_command)
1469 (backtrace_command, func_command, backtrace_command_1): Constify.
1470 (backtrace_command): Add non-const overload.
1471 * remote-sim.c (simulator_command): Constify.
1472 * exec.c (set_section_command): Constify.
1473 * tracepoint.c (tdump_command, trace_variable_command)
1474 (tstatus_command, tstop_command, tstart_command)
1475 (end_actions_pseudocommand, while_stepping_pseudocommand)
1476 (collect_pseudocommand, teval_pseudocommand, actions_command)
1477 (start_tracing, stop_tracing): Constify.
1478 * value.c (init_if_undefined_command): Constify.
1479 * tui/tui-stack.c (tui_update_command): Constify.
1480 * tui/tui-win.c (tui_refresh_all_command)
1481 (tui_set_tab_width_command, tui_set_win_height_command)
1482 (tui_set_focus_command, tui_scroll_forward_command)
1483 (tui_scroll_backward_command, tui_scroll_left_command)
1484 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1485 (tui_set_win_height): Constify.
1486 * tui/tui-layout.c (tui_layout_command): Constify.
1487 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1488 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1489 (proc_untrace_sysexit_cmd): Constify.
1490 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1491 (threadset_test_cmd, threadlist_update_test_cmd)
1492 (threadalive_test): Constify.
1493 * objc-lang.c (print_object_command): Constify.
1494 * command.h (add_com): Constify.
1495 * cli/cli-dump.c (restore_command): Constify.
1496 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1497 (help_command, complete_command, shell_command, edit_command)
1498 (list_command, disassemble_command, make_command)
1499 (apropos_command, alias_command): Constify.
1500 * cli/cli-script.c (document_command, define_command)
1501 (while_command, if_command, validate_comname): Constify.
1502 * cli/cli-decode.c (struct cmd_list_element): Change type of
1503 "fun".
1504 * target.c (do_monitor_command, flash_erase_command): Constify.
1505 * regcache.c (reg_flush_command): Constify.
1506 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1507 (reverse_nexti, reverse_continue, reverse_finish)
1508 (save_bookmark_command, goto_bookmark_command)
1509 (exec_reverse_once): Constify.
1510 * python/python.c (python_interactive_command, python_command):
1511 Constify.
1512 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1513 Constify.
1514 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1515 * gcore.c (gcore_command): Constify.
1516
1517 2017-11-07 Tom Tromey <tom@tromey.com>
1518
1519 * printcmd.c (x_command): Call set_repeat_arguments.
1520 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1521 * top.c (repeat_arguments): New global.
1522 (set_repeat_arguments): New function.
1523 (execute_command): Handle repeat_arguments.
1524 (show_commands): Calls set_repeat_arguments.
1525 * command.h (set_repeat_arguments): Declare.
1526
1527 2017-11-07 Tom Tromey <tom@tromey.com>
1528
1529 * stack.c (backtrace_command): Use std::string.
1530 (backtrace_command_1): Make "count_exp" const.
1531
1532 2017-11-07 Tom Tromey <tom@tromey.com>
1533
1534 * source.c (directory_switch, mod_path, add_path): Constify.
1535 * defs.h (add_path, mod_path, directory_switch): Constify.
1536 * mi/mi-cmd-env.c (env_mod_path): Constify.
1537
1538 2017-11-07 Tom Tromey <tom@tromey.com>
1539
1540 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1541 (run_command_1, continue_command, step_1, jump_command)
1542 (signal_command, until_command, advance_command, finish_command)
1543 (attach_command): Update.
1544
1545 2017-11-07 Tom Tromey <tom@tromey.com>
1546
1547 * command.h (set_cmd_cfunc): Don't declare.
1548 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1549
1550 2017-11-07 Tom Tromey <tom@tromey.com>
1551
1552 * stack.c (select_frame_command): Constify.
1553 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1554 * command.h (add_com_suppress_notification): Constify.
1555
1556 2017-11-07 Tom Tromey <tom@tromey.com>
1557
1558 * breakpoint.c (stop_command): Constify.
1559 * cli/cli-decode.c (struct cmd_list_element): Constify.
1560 * command.h (add_abbrev_prefix_cmd): Constify.
1561
1562 2017-11-07 Pedro Alves <palves@redhat.com>
1563
1564 * breakpoint.c (extract_bp_kind): New enum.
1565 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1566 factored out from ...
1567 (extract_bp_number_and_location): ... here.
1568 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1569
1570 2017-11-07 Pedro Alves <palves@redhat.com>
1571
1572 * breakpoint.c (extract_bp_number_and_location): Change return
1573 type to void. Throw error instead of warning.
1574 (enable_disable_command): Adjust.
1575
1576 2017-11-07 Xavier Roirand <roirand@adacore.com>
1577 Pedro Alves <palves@redhat.com>
1578
1579 * breakpoint.c (map_breakpoint_number_range): New, factored out
1580 from ...
1581 (map_breakpoint_numbers): ... here.
1582 (find_location_by_number): Change parameters from string to
1583 breakpoint number and location.
1584 (extract_bp_number_and_location): New function.
1585 (enable_disable_bp_num_loc)
1586 (enable_disable_breakpoint_location_range)
1587 (enable_disable_command): New functions, factored out ...
1588 (enable_command, disable_command): ... these functions, and
1589 adjusted to support ranges.
1590 * NEWS: Document enable/disable breakpoint location range feature.
1591
1592 2017-11-06 Luis Machado <luis.machado@linaro.org>
1593
1594 * MAINTAINERS (Write After Approval): Update my e-mail address.
1595
1596 2017-11-06 Pedro Alves <palves@redhat.com>
1597
1598 * gnu-nat.c (gnu_terminal_init): Delete.
1599 (gnu_target): Don't install gnu_terminal_init.
1600 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1601 (child_terminal_init): ... this function.
1602
1603 2017-11-06 Pedro Alves <palves@redhat.com>
1604
1605 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1606 sgtty.h.
1607 * config.in, configure: Regenerate.
1608
1609 2017-11-06 Pedro Alves <palves@redhat.com>
1610
1611 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1612 (async_init_signals): Adjust.
1613 (handle_stop_sig): Rename to ...
1614 (handle_sigtstp): ... this.
1615 (async_stop_sig): Rename to ...
1616 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1617 SIGTSTP path.
1618 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1619 instead of STOP_SIGNAL thoughout.
1620 (handle_stop_sig): Rename to ...
1621 (handle_sigtstp): ... this.
1622 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1623
1624 2017-11-06 Pedro Alves <palves@redhat.com>
1625
1626 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1627 longer set flags twice in row.
1628
1629 2017-11-06 Pedro Alves <palves@redhat.com>
1630
1631 * Makefile.in (SER_HARDWIRE): Update comment.
1632 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1633 * common/gdb_termios.h: Delete file.
1634 * common/job-control.c: Include termios.h and unistd.h instead of
1635 gdb_termios.h.
1636 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1637 check.
1638 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1639 Remove sgtty code.
1640 * configure.ac: No longer check for termio.h and sgtty.h.
1641 * configure: Regenerate.
1642 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1643 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1644 Replace PROCESS_GROUP_TYPE references with pid_t references
1645 throughout.
1646 (gdb_getpgrp): Delete.
1647 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1648 (child_terminal_inferior): Remove comment. Remove sgtty code.
1649 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1650 gdb_getpgrp. Use serial_set_tty_state instead aof
1651 serial_noflush_set_tty_state. Remove sgtty code.
1652 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1653 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1654 (inferior_process_group): Now returns pid_t.
1655 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1656 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1657 * ser-event.c (serial_event_ops): Update.
1658 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1659 (dos_ops): Update.
1660 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1661 * ser-pipe.c (pipe_ops): Update.
1662 * ser-tcp.c (tcp_ops): Update.
1663 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1664 HAVE_TERMIOS checks.
1665 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1666 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1667 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1668 assume termios.
1669 (hardwire_noflush_set_tty_state): Delete.
1670 (hardwire_print_tty_state, hardwire_drain_output)
1671 (hardwire_flush_output, hardwire_flush_input)
1672 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1673 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1674 code, and assume termios.
1675 (hardwire_ops): Update.
1676 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1677 * serial.c (serial_noflush_set_tty_state): Delete.
1678 * serial.h (serial_noflush_set_tty_state): Delete.
1679 (serial_ops::noflush_set_tty_state): Delete.
1680
1681 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1682
1683 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1684 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1685 (COMMON_OBS): Remove doublest.o and dfp.o.
1686 Do not build target-float.c (instead of doublest.c)
1687 with -Wformat-nonliteral.
1688
1689 * doublest.c: Remove file.
1690 * doublest.h: Remove file.
1691 * dfp.c: Remove file.
1692 * dfp.h: Remove file.
1693
1694 * target-float.c: Do not include "doublest.h" and "dfp.h".
1695 (DOUBLEST): Move here from doublest.h.
1696 (enum float_kind): Likewise.
1697 (FLOATFORMAT_CHAR_BIT): Likewise.
1698 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1699 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1700 (floatformat_precision): Likewise.
1701 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1702 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1703 Likewise.
1704 (host_float_format, host_double_format, host_long_double_format):
1705 Likewise.
1706 (floatformat_to_string, floatformat_from_string): Likewise.
1707 (floatformat_to_doublest): Likewise. Also, inline the original
1708 convert_floatformat_to_doublest.
1709 (floatformat_from_doublest): Likewise. Also, inline the original
1710 convert_floatformat_from_doublest.
1711
1712 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1713 (MAX_DECIMAL_STRING): Move here from dfp.c.
1714 (match_endianness): Likewise.
1715 (set_decnumber_context, decimal_check_errors): Likewise.
1716 (decimal_from_number, decimal_to_number): Likewise.
1717 (decimal_to_string, decimal_from_string): Likewise. Make static.
1718 (decimal_from_longest, decimal_from_ulongest): Likewise.
1719 (decimal_to_longest): Likewise.
1720 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1721 (decimal_convert): Likewise.
1722
1723 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1724
1725 * doublest.c: Do not include "gdbtypes.h".
1726 (extract_typed_floating): Remove.
1727 (store_typed_floating): Remove.
1728 (convert_typed_floating): Remove.
1729 * doublest.h (struct type): Remove.
1730 (DOUBLEST_PRINT_FORMAT): Remove.
1731 (DOUBLEST_SCAN_FORMAT): Remove.
1732 (extract_typed_floating): Remove.
1733 (store_typed_floating): Remove.
1734 (convert_typed_floating): Remove.
1735
1736 * dfp.c (decimal_from_doublest): Remove.
1737 (decimal_to_doublest): Remove.
1738 * dfp.h: Do not include "doublest.h".
1739 (decimal_from_doublest): Remove.
1740 (decimal_to_doublest): Remove.
1741
1742 * value.c: Do not include "doublest.h" and "dfp.h".
1743 (value_as_double): Remove.
1744 (unpack_double): Remove.
1745 (value_from_double): Remove.
1746 (value_from_decfloat): Remove.
1747 * value.h: Do not include "doublest.h".
1748 (value_as_double): Remove.
1749 (unpack_double): Remove.
1750 (value_from_double): Remove.
1751 (value_from_decfloat): Remove.
1752
1753 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1754
1755 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1756 (i386_extract_return_value): Use target_float_convert.
1757 (i386_store_return_value): Likewise.
1758 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1759 (i387_value_to_register): Likewise.
1760 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1761 (ia64_register_to_value): Use target_float_convert.
1762 (ia64_value_to_register): Likewise.
1763 (ia64_extract_return_value): Likewise.
1764 (ia64_store_return_value): Likewise.
1765 (ia64_push_dummy_call): Likewise.
1766 * m68k-tdep.c: Include "target-float.h".
1767 (m68k_register_to_value): Use target_float_convert.
1768 (m68k_value_to_register): Likewise.
1769 (m68k_svr4_extract_return_value): Likewise.
1770 (m68k_svr4_store_return_value): Likewise.
1771 * ppc-sysv-tdep.c: Include "target-float.h".
1772 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1773 (do_ppc_sysv_return_value): Likewise.
1774 (ppc64_sysv_abi_push_freg): Likewise.
1775 (ppc64_sysv_abi_return_value_base): Likewise.
1776 * rs6000-aix-tdep.c: Include "target-float.h".
1777 (rs6000_push_dummy_call): Use target_float_convert.
1778 (rs6000_return_value): Likewise.
1779 * rs6000-lynx178-tdep.c: Include "target-float.h".
1780 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1781 (rs6000_lynx178_return_value): Likewise.
1782 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1783 (rs6000_register_to_value): Use target_float_convert.
1784 (rs6000_value_to_register): Likewise.
1785 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1786 (arm_extract_return_value): Use target_float_convert.
1787 (arm_store_return_value): Likewise.
1788 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1789 (sh_register_convert_to_virtual): Use target_float_convert.
1790 (sh_register_convert_to_raw): Likewise.
1791 * sh64-tdep.c: Include "target-float.h".
1792 (sh64_extract_return_value): Use target_float_convert.
1793 (sh64_register_convert_to_virtual): Likewise.
1794 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1795
1796 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1797
1798 * target-float.c (floatformat_to_host_double): New function.
1799 (floatformat_from_host_double): Likewise.
1800 (target_float_to_host_double): Likewise.
1801 (target_float_from_host_double): Likewise.
1802 * target-float.h (target_float_to_host_double): Add prototype.
1803 (target_float_from_host_double): Likewise.
1804
1805 * guile/scm-value.c: Include "target-float.h".
1806 (gdbscm_value_to_real): Use target_float_to_host_double.
1807 Handle integer source values via value_as_long.
1808 * guile/scm-math.c: Include "target-float.h". Do not include
1809 "doublest.h", "dfp.h", and "expression.h".
1810 (vlscm_convert_typed_number): Use target_float_from_host_double.
1811 (vlscm_convert_number): Likewise.
1812
1813 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1814 (convert_value_from_python): Use target_float_from_host_double.
1815
1816 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1817
1818 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1819 (cast_from_fixed): Likewise.
1820 (ada_scaling_type): New function.
1821 (ada_delta): Return value instead of DOUBLEST. Perform target
1822 arithmetic instead of host arithmetic.
1823 (scaling_factor): Rename to ...
1824 (ada_scaling_factor) ... this. Make non-static. Return value instead
1825 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1826 (ada_fixed_to_float): Remove.
1827 (ada_float_to_fixed): Remove.
1828 * ada-lang.h (ada_fixed_to_float): Remove.
1829 (ada_float_to_fixed): Remove.
1830 (ada_delta): Return value instead of DOUBLEST.
1831 (ada_scaling_factor): Add prototype.
1832
1833 * ada-typeprint.c: Include "target-float.h".
1834 (print_fixed_point_type): Perform target arithmetic instead of
1835 host arithmetic.
1836 * ada-valprint.c: Include "target-float.h".
1837 (ada_val_print_num): Perform target arithmetic instead of
1838 host arithmetic for fixed-point types.
1839
1840 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1841
1842 * target-float.c: Include <math.h>.
1843 (floatformat_binop): New function.
1844 (floatformat_compare): Likewise.
1845 (target_float_binop): Likewise.
1846 (target_float_compare): Likewise.
1847 * target-float.h: Include "expression.h".
1848 (target_float_binop): Add prototype.
1849 (target_float_compare): Likewise.
1850
1851 * valarith.c: Do not include "doublest.h" and "dfp.h".
1852 Include "common/byte-vector.h".
1853 (value_args_as_decimal): Remove, replace by ...
1854 (value_args_as_target_float): ... this function. Handle both
1855 binary and decimal target floating-point formats.
1856 (scalar_binop): Handle both binary and decimal FP using
1857 value_args_as_target_float and target_float_binop.
1858 (value_equal): Handle both binary and decimal FP using
1859 value_args_as_target_float and target_float_compare.
1860 (value_less): Likewise.
1861 (value_pos): Handle all scalar types as simple copy.
1862 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1863 * dfp.c (decimal_binop): Throw error instead of internal_error
1864 when called with an unsupported operation code.
1865
1866 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1867
1868 * target-float.c (target_float_to_string): New function.
1869 (target_float_from_string): New function.
1870 * target-float.h (target_float_to_string): Add prototype.
1871 (target_float_from_string): Add prototype.
1872
1873 * valprint.c: Include "target-float.h". Do not include
1874 "doublest.h" and "dfp.h".
1875 (print_floating): Use target_float_to_string.
1876 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1877 (printf_floating): Use target_float_to_string.
1878 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1879 (print_i387_value): Use target_float_to_string.
1880 * mips-tdep.c: Include "target-float.h".
1881 (mips_print_fp_register): Use target_float_to_string.
1882 * sh64-tdep.c: Include "target-float.h".
1883 (sh64_do_fp_register): Use target_float_to_string.
1884
1885 * parse.c: Include "target-float.h". Do not include
1886 "doublest.h" and "dfp.h".
1887 (parse_float): Use target_float_from_string.
1888 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1889 (define_symbol): Use target_float_from_string.
1890 * gdbarch-selftests.c: Include "target-float.h".
1891 (register_to_value_test): Use target_float_from_string.
1892
1893 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1894
1895 * Makefile.c (SFILES): Add target-float.c.
1896 (HFILES_NO_SRCDIR): Add target-float.h.
1897 (COMMON_OBS): Add target-float.o.
1898 * target-float.h: New file.
1899 * target-float.c: New file.
1900
1901 * doublest.c (floatformat_classify): Fix detection of float_zero.
1902
1903 * gdbtypes.c (is_floating_type): New function.
1904 * gdbtypes.h (is_floating_type): Add prototype.
1905
1906 * value.c: Do not include "floatformat.h".
1907 (unpack_double): Use target_float_is_valid.
1908 (is_floating_value): New function.
1909 * value.h (is_floating_value): Add prototype-
1910
1911 * valarith.c: Include "target-float.h".
1912 (value_logical_not): Use target_float_is_zero.
1913
1914 * python/py-value.c: Include "target-float.h".
1915 (valpy_nonzero): Use target_float_is_zero.
1916
1917 2017-11-04 Tom Tromey <tom@tromey.com>
1918
1919 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1920
1921 2017-11-04 Tom Tromey <tom@tromey.com>
1922
1923 * breakpoint.c (set_momentary_breakpoint): Return
1924 breakpoint_up.
1925 (until_break_command): Update.
1926 (new_until_break_fsm): Change argument types to
1927 breakpoint_up.
1928 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1929 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1930 Remove.
1931 * infcmd.c (finish_forward): Update.
1932 * breakpoint.h (set_momentary_breakpoint)
1933 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1934 (make_cleanup_delete_breakpoint): Remove.
1935 (struct breakpoint_deleter): New.
1936 (breakpoint_up): New typedef.
1937 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1938 (insert_exception_resume_breakpoint): Update.
1939 (insert_exception_resume_from_probe): Update.
1940 (insert_longjmp_resume_breakpoint): Update.
1941 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1942 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1943 * infcall.c (call_function_by_hand_dummy): Update
1944
1945 2017-11-04 Tom Tromey <tom@tromey.com>
1946
1947 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1948
1949 2017-11-04 Tom Tromey <tom@tromey.com>
1950
1951 * linux-tdep.c (linux_core_info_proc_mappings): Use
1952 gdb::def_vector.
1953 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1954 "size" argument.
1955 (linux_corefile_thread): Update.
1956 (linux_make_corefile_notes): Remove unused variable.
1957
1958 2017-11-04 Tom Tromey <tom@tromey.com>
1959
1960 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1961 gdb::byte_vector.
1962
1963 2017-11-04 Tom Tromey <tom@tromey.com>
1964
1965 * objfiles.c (do_free_objfile_cleanup): Remove.
1966 * compile/compile-object-load.c (compile_object_load): Update.
1967 * objfiles.h (make_cleanup_free_objfile): Remove.
1968
1969 2017-11-04 Tom Tromey <tom@tromey.com>
1970
1971 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1972 (adi_read_versions): Change "tags" to "gdb_byte *".
1973 (adi_print_versions): Likewise.
1974
1975 2017-11-04 Tom Tromey <tom@tromey.com>
1976
1977 * breakpoint.c
1978 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1979 from start_rbreak_breakpoints.
1980 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1981 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1982 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1983 * symtab.c (do_end_rbreak_breakpoints): Remove.
1984 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1985
1986 2017-11-04 Tom Tromey <tom@tromey.com>
1987
1988 * cp-namespace.c (reset_directive_searched): Remove.
1989 (cp_lookup_symbol_via_imports): Use scoped_restore.
1990 * cp-support.c (reset_directive_searched): Remove.
1991 (make_symbol_overload_list_using): Use scoped_restore.
1992 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1993 (reset_directive_searched): Remove.
1994
1995 2017-11-04 Tom Tromey <tom@tromey.com>
1996
1997 * symfile.c (find_separate_debug_file_by_debuglink): Use
1998 unique_xmalloc_ptr.
1999
2000 2017-11-04 Tom Tromey <tom@tromey.com>
2001
2002 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2003 type of "info".
2004 (compute_stack_depth): Likewise.
2005 (do_compile_dwarf_expr_to_c): Use std::vector.
2006
2007 2017-11-04 Tom Tromey <tom@tromey.com>
2008
2009 * compile/compile-object-load.c (link_callbacks_einfo): Use
2010 std::string.
2011
2012 2017-11-04 Tom Tromey <tom@tromey.com>
2013
2014 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2015 Use scoped_free_pendings.
2016 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2017 scoped_free_pendings.
2018 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2019 (xcoff_initial_scan): Likewise.
2020 * buildsym.c (reset_symtab_globals): Update comment.
2021 (scoped_free_pendings): Rename from really_free_pendings.
2022 (prepare_for_building): Update comment.
2023 (buildsym_init): Likewise.
2024 * buildsym.h (class scoped_free_pendings): New class.
2025 (really_free_pendings): Don't declare.
2026
2027 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2028
2029 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2030 output when converting a zero value to a special byteorder format.
2031
2032 2017-11-02 Yao Qi <yao.qi@linaro.org>
2033
2034 * frame.c (do_frame_register_read): Remove aspace.
2035 * jit.c (jit_frame_sniffer): Likwise.
2036 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2037 * regcache.c (regcache::regcache): Pass nullptr.
2038 (regcache_print): Caller updated.
2039 * regcache.h (regcache::regcache): Remove one constructor
2040 parameter aspace.
2041
2042 2017-11-02 Yao Qi <yao.qi@linaro.org>
2043
2044 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2045
2046 2017-11-02 Yao Qi <yao.qi@linaro.org>
2047
2048 * breakpoint.c (insert_single_step_breakpoints): Update.
2049 * frame.c (struct frame_info) <aspace>: Add const.
2050 (frame_save_as_regcache): Add const.
2051 (get_frame_address_space): Return const address_space *.
2052 * frame.h (get_frame_address_space): Update declaration.
2053 * infrun.c (struct step_over_info) <aspace>: Add const.
2054 (set_step_over_info): Make aspace const.
2055 (displaced_step_prepare_throw): Change variable const.
2056 (resume): Likewise.
2057 (proceed): Likewise.
2058 (adjust_pc_after_break): Likewise.
2059 (save_waitstatus): Likewise.
2060 (handle_signal_stop): Likewise.
2061 (keep_going_pass_signal): Likewise.
2062 * jit.c (jit_frame_sniffer): Add const.
2063 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2064 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2065 * record-full.c (record_full_wait_1): Likewise.
2066 * regcache.c (regcache::regcache): Change parameter to const.
2067 * regcache.h (regcache::regcache): Likewise.
2068 (regcache::aspace): Return const address_space *.
2069 (regcache) <m_aspace>: Add const.
2070
2071 2017-11-02 Yao Qi <yao.qi@linaro.org>
2072
2073 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2074 * frame.c (create_sentinel_frame): Likewise.
2075 * infrun.c (displaced_step_prepare_throw): Likewise.
2076 (resume): Likewise.
2077 (thread_still_needs_step_over_bp): Likewise.
2078 (proceed): Likewise.
2079 (do_target_wait): Likewise.
2080 (adjust_pc_after_break): Likewise.
2081 (handle_syscall_event): Likewise.
2082 (save_waitstatus): Likewise.
2083 (handle_inferior_event_1): Likewise.
2084 (handle_signal_stop): Likewise.
2085 (keep_going_pass_signal): Likewise.
2086 * linux-nat.c (status_callback): Likewise.
2087 (save_stop_reason): Likewise.
2088 (resume_stopped_resumed_lwps): Likewise.
2089 * record-full.c (record_full_exec_insn): Likewise.
2090 (record_full_wait_1): Likewise.
2091 * regcache.c (get_regcache_aspace): Remove.
2092 * regcache.h (get_regcache_aspace): Remove.
2093
2094 2017-11-02 Yao Qi <yao.qi@linaro.org>
2095
2096 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2097 (init_regcache_descr): Use gdbarch_num_regs.
2098 (regcache::regcache): Likewise.
2099 (regcache::get_register_status): Likewise.
2100 (regcache::assert_raw_regnum): Likewise.
2101 (regcache::cooked_read): Likewise.
2102 (regcache::cooked_read_value): Likewise.
2103 (regcache::cooked_write): Likewise.
2104 (regcache::dump): Likewise.
2105 (regcache::num_raw_registers): New method.
2106 * regcache.h (class regcache) <num_raw_registers>: New.
2107
2108 2017-11-02 Yao Qi <yao.qi@linaro.org>
2109
2110 * regcache.c (regcache::assert_regnum): New method.
2111 (regcache::invalidate): Call assert_regnum.
2112 (regcache::raw_update): Likewise.
2113 (regcache::raw_write): Likewise.
2114 (regcache::raw_read_part): Likewise.
2115 (regcache::raw_write_part): Likewise.
2116 (regcache::raw_supply): Likewise.
2117 (regcache::raw_supply_integer): Likewise.
2118 (regcache::raw_supply_zeroed): Likewise.
2119 (regcache::raw_collect): Likewise.
2120 (regcache::raw_collect_integer): Likewise.
2121 * regcache.h (regcache::assert_regnum): Declare.
2122
2123 2017-11-02 Yao Qi <yao.qi@linaro.org>
2124
2125 * regcache.c (regcache::dump): Remove code.
2126
2127 2017-11-02 Yao Qi <yao.qi@linaro.org>
2128
2129 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2130 Remove.
2131 <sizeof_cooked_register_status>: Remove.
2132 (init_regcache_descr): Update.
2133 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2134 (regcache::save): Likewise.
2135 (regcache::dump): Likewise.
2136
2137 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2138
2139 * ft32-tdep.c (ft32_fetch_instruction): New function.
2140 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2141
2142 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2143
2144 * cli/cli-script.c (execute_control_command): Rename to ...
2145 (execute_control_command_1): ... this.
2146 (execute_control_command): New function.
2147
2148 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2149
2150 * tracepoint.c (tfind_command): Remove const_cast.
2151
2152 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2153
2154 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2155
2156 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2157
2158 * common/common-utils.h (in_inclusive_range): New function.
2159 * arm-tdep.c (arm_record_extension_space): Use
2160 in_inclusive_range.
2161 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2162 * cris-tdep.c (cris_spec_reg_applicable): Use
2163 in_inclusive_range.
2164
2165 2017-10-30 Pedro Alves <palves@redhat.com>
2166 Simon Marchi <simon.marchi@ericsson.com>
2167
2168 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2169 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2170
2171 2017-10-30 Pedro Alves <palves@redhat.com>
2172
2173 * common/common-utils.c (string_appendf, string_vappendf): New
2174 functions.
2175 * common/common-utils.h (string_appendf, string_vappendf): New
2176 declarations.
2177 * unittests/common-utils-selftests.c (string_appendf_func)
2178 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2179 (string_vappendf_tests): New functions.
2180 (_initialize_common_utils_selftests): Register "string_appendf" and
2181 "string_vappendf tests".
2182
2183 2017-10-30 Pedro Alves <palves@redhat.com>
2184
2185 * unittests/common-utils-selftests.c (format_func): New typedef.
2186 (string_printf_tests, string_vprintf_tests): Tests factored out
2187 and merged to ...
2188 (test_format_func): ... this new function.
2189 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2190 test_format_func.
2191
2192 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * darwin-nat.c: Remove include of gdb.h.
2195
2196 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2197
2198 * xtensa-xtregs.c: Fix formatting issues.
2199
2200 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2201
2202 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2203
2204 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2205
2206 PR python/21213
2207 * python/py-infthread.c (thpy_get_inferior): Increment reference
2208 of inferior before returning it.
2209
2210 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2211
2212 * unittests/common-utils-selftests.c (format): Add
2213 ATTRIBUTE_PRINTF.
2214
2215 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2216
2217 * xml-syscall.c (struct syscall_desc): Add constructor.
2218 <name>: Change type to std::string.
2219 (syscall_desc_up): New typedef.
2220 (syscall_desc_p): Remove typeder.
2221 (DEF_VEC_P(syscall_desc_p)): Remove.
2222 (struct syscall_group_desc): Add constructor.
2223 <name>: Change type to std::string.
2224 <syscalls>: Change type to std::vector.
2225 (syscall_group_desc_up): New typedef.
2226 (syscall_group_desc_p): Remove typedef.
2227 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2228 (struct syscalls_info) <syscalls>: Change type to std::vector of
2229 unique_ptr.
2230 <groups>: Likewise.
2231 <my_gdb_datadir>: Change type to std::string.
2232 (syscalls_info_up): New typedef.
2233 (allocate_syscalls_info): Remove.
2234 (syscalls_info_free_syscalls_desc): Remove.
2235 (syscalls_info_free_syscall_group_desc): Remove.
2236 (free_syscalls_info): Remove.
2237 (make_cleanup_free_syscalls_info): Remove.
2238 (syscall_group_create_syscall_group_desc): Adjust.
2239 (syscall_group_add_syscall): Adjust.
2240 (syscall_create_syscall_desc): Adjust.
2241 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2242 (init_syscalls_info): Adjust.
2243 (syscall_group_get_group_by_name): Adjust.
2244 (xml_get_syscall_number): Adjust.
2245 (xml_get_syscall_name): Adjust.
2246 (xml_list_of_syscalls): Adjust.
2247 (xml_list_syscalls_by_group): Adjust.
2248 (xml_list_of_groups): Adjust.
2249
2250 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2251
2252 * probe.h: Don't include gdb_vecs.h.
2253 (DEF_VEC_P (probe_p)): Remove.
2254 (find_probes_in_objfile): Return an std::vector.
2255 * probe.c (find_probes_in_objfile): Likewise.
2256 * breakpoint.c (breakpoint_objfile_data)
2257 <longjmp_probes>: Change type to std::vector.
2258 <exception_probes>: Likewise.
2259 (free_breakpoint_probes): Don't manually free vectors.
2260 (create_longjmp_master_breakpoint): Adjust.
2261 (create_exception_master_breakpoint): Adjust.
2262 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2263 parameter type, adjust.
2264 (svr4_create_solib_event_breakpoints): Adjust.
2265
2266 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2267
2268 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2269 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2270 with new.
2271 (free_breakpoint_probes): Rename to ...
2272 (free_breakpoint_objfile_data): ... this, and call delete on
2273 bp_objfile_data..
2274
2275 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2276
2277 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2278 (loaded_script_ptr): Remove typedef.
2279 (DEF_VEC_P (loaded_script_ptr)): Remove.
2280 (struct collect_matching_scripts_data): Add constructor.
2281 <scripts_p>: Change type to (pointer to) std::vector.
2282 (collect_matching_scripts_data): Adjust.
2283 (sort_scripts_by_name): Make suitable for std::sort.
2284 (print_scripts): Don't sort vector, adjust to std::vector.
2285 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2286
2287 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2288
2289 * symfile.c (filename_language): Make struct, not typedef. Add
2290 constructor.
2291 <ext>: Change type to std::string.
2292 (DEF_VEC_O (filename_language)): Remove.
2293 (filename_language_table): Change type to std::vector.
2294 (add_filename_language): Adjust.
2295 (set_ext_lang_command): Adjust.
2296 (info_ext_lang_command): Adjust.
2297 (deduce_language_from_filename): Adjust.
2298 (class scoped_restore_filename_language_table): Remove.
2299 (test_filename_language): Use scoped_restore.
2300 (test_set_ext_lang_command): Use scoped_restore, adjust to
2301 std::vector change.
2302
2303 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2304
2305 * symfile.c: Include selftest.h.
2306 (class scoped_restore_filename_language_table): New.
2307 (test_filename_language): New test.
2308 (test_set_ext_lang_command): New test.
2309 (_initialize_symfile): Register tests.
2310
2311 2017-10-27 Keith Seitz <keiths@redhat.com>
2312
2313 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2314 in the bp_location, falling back to find_pc_sect_function when
2315 needed.
2316 (add_location_to_breakpoint): Save sal->symbol.
2317 * breakpoint.h (struct bp_location) <symbol>: New field.
2318 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2319 * symtab.h (struct symtab_and_line) <symbol>: New field.
2320
2321 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2322
2323 PR gdb/13669
2324 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2325 to rewind obstack.
2326
2327 2017-10-26 Pedro Alves <palves@redhat.com>
2328
2329 * remote.c (remote_async_terminal_ours_p): Delete.
2330 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2331 Remove references to 'remote_async_terminal_ours_p'.
2332
2333 2017-10-26 Yao Qi <yao.qi@linaro.org>
2334
2335 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2336
2337 2017-10-26 Yao Qi <yao.qi@linaro.org>
2338
2339 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2340 aspace const.
2341 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2342 Likewise.
2343 * breakpoint.c (bpstat_check_location): Remove cast.
2344 (breakpoint_hit_catch_fork): Make aspce const.
2345 (breakpoint_hit_catch_solib): Likewise.
2346 (breakpoint_hit_catch_exec): Likewise.
2347 (breakpoint_hit_ranged_breakpoint): Likewise.
2348 (breakpoint_hit_watchpoint): Likewise.
2349 (base_breakpoint_breakpoint_hit): Likewise.
2350 (bkpt_breakpoint_hit): Likewise.
2351 (dprintf_breakpoint_hit): Likewise.
2352 (tracepoint_breakpoint_hit): Likewise.
2353 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2354
2355 2017-10-26 Yao Qi <yao.qi@linaro.org>
2356
2357 * breakpoint.c (breakpoint_location_address_match): Change
2358 "struct address_space *" to "const address_space".
2359 (breakpoint_location_address_range_overlap): Likewise.
2360 (breakpoint_here_p): Likewise.
2361 (breakpoint_in_range_p): Likewise.
2362 (moribund_breakpoint_here_p): Likewise.
2363 (bp_location_inserted_here_p): Likewise.
2364 (software_breakpoint_inserted_here_p): Likewise.
2365 (hardware_breakpoint_inserted_here_p): Likewise.
2366 (hardware_watchpoint_inserted_in_range): Likewise.
2367 (bpstat_check_location): Likewise.
2368 (bpstat_stop_status): Likewise.
2369 (breakpoint_address_match): Likewise.
2370 (breakpoint_address_match_range): Likewise.
2371 (breakpoint_location_address_match): Likewise.
2372 (breakpoint_location_address_range_overlap): Likewise.
2373 (insert_single_step_breakpoint): Likewise.
2374 (breakpoint_has_location_inserted_here): Likewise.
2375 (single_step_breakpoint_inserted_here_p): Likewise.
2376 (pc_at_non_inline_function): Likewise.
2377 * breakpoint.h (bpstat_stop_status): Update declaration.
2378 (breakpoint_here_p): Likewise.
2379 (breakpoint_in_range_p): Likewise.
2380 (moribund_breakpoint_here_p): Likewise.
2381 (breakpoint_inserted_here_p): Likewise.
2382 (software_breakpoint_inserted_here_p): Likewise.
2383 (hardware_breakpoint_inserted_here_p): Likewise.
2384 (breakpoint_has_location_inserted_here): Likewise.
2385 (single_step_breakpoint_inserted_here_p): Likewise.
2386 (hardware_watchpoint_inserted_in_range): Likewise.
2387 (breakpoint_address_match): Likewise.
2388 (insert_single_step_breakpoint): Likewise.
2389 (pc_at_non_inline_function): Likewise.
2390 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2391 * record.c (record_check_stopped_by_breakpoint): Likewise.
2392 * record.h (record_check_stopped_by_breakpoint): Likewise.
2393 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2394
2395 2017-10-25 Yao Qi <yao.qi@linaro.org>
2396
2397 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2398 regcache->arch () instead get_regcache_arch.
2399 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2400 Likewise.
2401 (aarch64_fbsd_store_inferior_registers): Likewise.
2402 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2403 (store_gregs_to_thread): Likewise.
2404 (fetch_fpregs_from_thread): Likewise.
2405 (store_fpregs_to_thread): Likewise.
2406 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2407 (aarch64_store_return_value): Likewise.
2408 (aarch64_software_single_step): Likewise.
2409 * aix-thread.c (aix_thread_wait): Likewise.
2410 (supply_reg32): Likewise.
2411 (supply_sprs64): Likewise.
2412 (supply_sprs32): Likewise.
2413 (fill_gprs64): Likewise.
2414 (fill_gprs32): Likewise.
2415 (fill_sprs64): Likewise.
2416 (fill_sprs32): Likewise.
2417 (store_regs_user_thread): Likewise.
2418 (store_regs_kernel_thread): Likewise.
2419 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2420 (alphabsd_store_inferior_registers): Likewise.
2421 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2422 (alpha_store_return_value): Likewise.
2423 (alpha_deal_with_atomic_sequence): Likewise.
2424 (alpha_next_pc): Likewise.
2425 (alpha_software_single_step): Likewise.
2426 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2427 (amd64bsd_store_inferior_registers): Likewise.
2428 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2429 Likewise.
2430 (amd64_linux_store_inferior_registers): Likewise.
2431 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2432 (amd64_collect_native_gregset): Likewise.
2433 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2434 (amd64obsd_collect_uthread): Likewise.
2435 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2436 (amd64_collect_fpregset): Likewise.
2437 (amd64_supply_fxsave): Likewise.
2438 (amd64_supply_xsave): Likewise.
2439 (amd64_collect_fxsave): Likewise.
2440 (amd64_collect_xsave): Likewise.
2441 * arc-tdep.c (arc_write_pc): Likewise.
2442 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2443 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2444 (arm_fbsd_store_inferior_registers): Likewise.
2445 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2446 (store_vfp_regs): Likewise.
2447 (arm_linux_fetch_inferior_registers): Likewise.
2448 (arm_linux_store_inferior_registers): Likewise.
2449 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2450 (arm_linux_sigreturn_next_pc): Likewise.
2451 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2452 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2453 (fetch_register): Likewise.
2454 (store_register): Likewise.
2455 * arm-tdep.c (arm_is_thumb): Likewise.
2456 (displaced_in_arm_mode): Likewise.
2457 (bx_write_pc): Likewise.
2458 (arm_get_next_pcs_addr_bits_remove): Likewise.
2459 (arm_software_single_step): Likewise.
2460 (arm_extract_return_value): Likewise.
2461 (arm_store_return_value): Likewise.
2462 (arm_write_pc): Likewise.
2463 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2464 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2465 (bsd_uthread_store_registers): Likewise.
2466 * core-regset.c (fetch_core_registers): Likewise.
2467 * corelow.c (get_core_registers): Likewise.
2468 * cris-tdep.c (cris_store_return_value): Likewise.
2469 (cris_extract_return_value): Likewise.
2470 (find_step_target): Likewise.
2471 (find_step_target): Likewise.
2472 (cris_software_single_step): Likewise.
2473 * ctf.c (ctf_fetch_registers): Likewise.
2474 * darwin-nat.c (cancel_breakpoint): Likewise.
2475 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2476 * frv-tdep.c (frv_extract_return_value): Likewise.
2477 * ft32-tdep.c (ft32_store_return_value): Likewise.
2478 (ft32_extract_return_value): Likewise.
2479 * go32-nat.c (fetch_register): Likewise.
2480 (go32_fetch_registers): Likewise.
2481 (go32_store_registers): Likewise.
2482 (store_register): Likewise.
2483 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2484 (h8300_store_return_value): Likewise.
2485 * hppa-linux-nat.c (fetch_register): Likewise.
2486 (store_register): Likewise.
2487 (hppa_linux_fetch_inferior_registers): Likewise.
2488 (hppa_linux_store_inferior_registers): Likewise.
2489 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2490 (i386_darwin_store_inferior_registers): Likewise.
2491 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2492 (gnu_store_registers): Likewise.
2493 * i386-linux-nat.c (fetch_register): Likewise.
2494 (store_register): Likewise.
2495 (supply_gregset): Likewise.
2496 (fill_gregset): Likewise.
2497 (i386_linux_fetch_inferior_registers): Likewise.
2498 (i386_linux_store_inferior_registers): Likewise.
2499 (i386_linux_resume): Likewise.
2500 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2501 Likewise.
2502 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2503 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2504 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2505 (i386obsd_collect_uthread): Likewise.
2506 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2507 (i386_supply_gregset): Likewise.
2508 (i386_collect_gregset): Likewise.
2509 (i386_supply_fpregset): Likewise.
2510 (i386_collect_fpregset): Likewise.
2511 (i386_mpx_bd_base): Likewise.
2512 * i386-v4-nat.c (supply_fpregset): Likewise.
2513 (fill_fpregset): Likewise.
2514 * i387-tdep.c (i387_supply_fsave): Likewise.
2515 (i387_collect_fsave): Likewise.
2516 (i387_supply_fxsave): Likewise.
2517 (i387_collect_fxsave): Likewise.
2518 (i387_supply_xsave): Likewise.
2519 (i387_collect_xsave): Likewise.
2520 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2521 (ia64_linux_store_registers): Likewise.
2522 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2523 (ia64_extract_return_value): Likewise.
2524 (ia64_store_return_value): Likewise.
2525 (find_func_descr): Likewise.
2526 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2527 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2528 (inf_ptrace_store_registers): Likewise.
2529 * infrun.c (use_displaced_stepping): Likewise.
2530 (displaced_step_prepare_throw): Likewise.
2531 (resume): Likewise.
2532 (proceed): Likewise.
2533 (do_target_wait): Likewise.
2534 (adjust_pc_after_break): Likewise.
2535 (handle_inferior_event_1): Likewise.
2536 (handle_signal_stop): Likewise.
2537 (save_infcall_suspend_state): Likewise.
2538 (restore_infcall_suspend_state): Likewise.
2539 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2540 * jit.c (jit_frame_prev_register): Likewise.
2541 * linux-nat.c (save_stop_reason): Likewise.
2542 (linux_nat_wait_1): Likewise.
2543 (resume_stopped_resumed_lwps): Likewise.
2544 * linux-record.c (record_linux_sockaddr): Likewise.
2545 (record_linux_msghdr): Likewise.
2546 (record_linux_system_call): Likewise.
2547 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2548 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2549 (lm32_store_return_value): Likewise.
2550 * m32c-tdep.c (m32c_read_flg): Likewise.
2551 (m32c_pseudo_register_read): Likewise.
2552 (m32c_pseudo_register_write): Likewise.
2553 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2554 (m32r_linux_collect_gregset): Likewise.
2555 * m32r-tdep.c (m32r_store_return_value): Likewise.
2556 (m32r_extract_return_value): Likewise.
2557 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2558 (m68kbsd_collect_fpregset): Likewise.
2559 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2560 * m68k-linux-nat.c (fetch_register): Likewise.
2561 (old_fetch_inferior_registers): Likewise.
2562 (old_store_inferior_registers): Likewise.
2563 (store_regs): Likewise.
2564 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2565 (m68k_svr4_store_return_value): Likewise.
2566 * m88k-tdep.c (m88k_store_arguments): Likewise.
2567 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2568 (mi_cmd_data_write_register_values): Likewise.
2569 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2570 (mips_fbsd_store_inferior_registers): Likewise.
2571 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2572 (mips_fbsd_supply_gregs): Likewise.
2573 (mips_fbsd_collect_fpregs): Likewise.
2574 (mips_fbsd_collect_gregs): Likewise.
2575 (mips_fbsd_supply_fpregset): Likewise.
2576 (mips_fbsd_collect_fpregset): Likewise.
2577 (mips_fbsd_supply_gregset): Likewise.
2578 (mips_fbsd_collect_gregset): Likewise.
2579 * mips-linux-nat.c (supply_gregset): Likewise.
2580 (fill_gregset): Likewise.
2581 (supply_fpregset): Likewise.
2582 (fill_fpregset): Likewise.
2583 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2584 (mips_fill_gregset): Likewise.
2585 (mips_supply_fpregset): Likewise.
2586 (mips_fill_fpregset): Likewise.
2587 (mips64_supply_gregset): Likewise.
2588 (micromips_linux_sigframe_validate): Likewise.
2589 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2590 (mipsnbsd_fetch_inferior_registers): Likewise.
2591 (mipsnbsd_store_inferior_registers): Likewise.
2592 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2593 (mipsnbsd_supply_gregset): Likewise.
2594 (mipsnbsd_iterate_over_regset_sections): Likewise.
2595 (mipsnbsd_supply_reg): Likewise.
2596 (mipsnbsd_supply_fpreg): Likewise.
2597 * mips-tdep.c (mips_in_frame_stub): Likewise.
2598 (mips_dummy_id): Likewise.
2599 (is_octeon_bbit_op): Likewise.
2600 (micromips_bc1_pc): Likewise.
2601 (extended_mips16_next_pc): Likewise.
2602 (mips16_next_pc): Likewise.
2603 (deal_with_atomic_sequence): Likewise.
2604 * moxie-tdep.c (moxie_process_readu): Likewise.
2605 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2606 * nto-procfs.c (procfs_store_registers): Likewise.
2607 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2608 (ppcfbsd_store_inferior_registers): Likewise.
2609 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2610 (fetch_altivec_register): Likewise.
2611 (get_spe_registers): Likewise.
2612 (fetch_spe_register): Likewise.
2613 (fetch_altivec_registers): Likewise.
2614 (fetch_all_gp_regs): Likewise.
2615 (fetch_all_fp_regs): Likewise.
2616 (store_vsx_register): Likewise.
2617 (store_altivec_register): Likewise.
2618 (set_spe_registers): Likewise.
2619 (store_spe_register): Likewise.
2620 (store_altivec_registers): Likewise.
2621 (store_all_gp_regs): Likewise.
2622 (store_all_fp_regs): Likewise.
2623 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2624 (ppc_linux_collect_gregset): Likewise.
2625 (ppc_canonicalize_syscall): Likewise.
2626 (ppc_linux_record_signal): Likewise.
2627 (ppu2spu_prev_register): Likewise.
2628 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2629 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2630 (ppcobsd_store_registers): Likewise.
2631 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2632 Likewise.
2633 (ppc_ravenscar_generic_store_registers): Likewise.
2634 * procfs.c (procfs_fetch_registers): Likewise.
2635 (procfs_store_registers): Likewise.
2636 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2637 (ravenscar_store_registers): Likewise.
2638 (ravenscar_prepare_to_store): Likewise.
2639 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2640 * record-full.c (record_full_wait_1): Likewise.
2641 (record_full_registers_change): Likewise.
2642 (record_full_store_registers): Likewise.
2643 (record_full_core_fetch_registers): Likewise.
2644 (record_full_save): Likewise.
2645 (record_full_goto_insn): Likewise.
2646 * regcache.c (regcache_register_size): Likewise.
2647 (get_regcache_arch): Remove.
2648 (regcache_read_pc): Likewise.
2649 * regcache.h (get_regcache_arch): Remove.
2650 * remote-sim.c (gdbsim_fetch_register): Likewise.
2651 (gdbsim_store_register): Likewise.
2652 * remote.c (fetch_register_using_p): Likewise.
2653 (send_g_packet): Likewise.
2654 (remote_prepare_to_store): Likewise.
2655 (store_registers_using_G): Likewise.
2656 * reverse.c (save_bookmark_command): Likewise.
2657 (goto_bookmark_command): Likewise.
2658 * rs6000-aix-tdep.c (branch_dest): Likewise.
2659 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2660 (fetch_register): Likewise.
2661 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2662 (ppc_collect_reg): Likewise.
2663 (ppc_collect_gregset): Likewise.
2664 (ppc_collect_fpregset): Likewise.
2665 (ppc_collect_vsxregset): Likewise.
2666 (ppc_collect_vrregset): Likewise.
2667 (ppc_displaced_step_hw_singlestep): Likewise.
2668 (rs6000_pseudo_register_read): Likewise.
2669 (rs6000_pseudo_register_write): Likewise.
2670 * s390-linux-nat.c (supply_gregset): Likewise.
2671 (fill_gregset): Likewise.
2672 (s390_linux_fetch_inferior_registers): Likewise.
2673 * s390-linux-tdep.c (s390_write_pc): Likewise.
2674 (s390_software_single_step): Likewise.
2675 (s390_all_but_pc_registers_record): Likewise.
2676 (s390_linux_syscall_record): Likewise.
2677 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2678 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2679 (shnbsd_store_inferior_registers): Likewise.
2680 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2681 (sh_extract_return_value_fpu): Likewise.
2682 (sh_store_return_value_nofpu): Likewise.
2683 (sh_corefile_supply_regset): Likewise.
2684 (sh_corefile_collect_regset): Likewise.
2685 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2686 (sh64_store_return_value): Likewise.
2687 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2688 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2689 (sparc_store_inferior_registers): Likewise.
2690 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2691 (sparc_ravenscar_prepare_to_store): Likewise.
2692 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2693 (sparc_analyze_control_transfer): Likewise.
2694 (sparc_step_trap): Likewise.
2695 (sparc_software_single_step): Likewise.
2696 (sparc32_gdbarch_init): Likewise.
2697 (sparc_supply_rwindow): Likewise.
2698 (sparc_collect_rwindow): Likewise.
2699 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2700 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2701 (sparc64nbsd_collect_gregset): Likewise.
2702 (sparc64nbsd_supply_fpregset): Likewise.
2703 (sparc64nbsd_collect_fpregset): Likewise.
2704 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2705 (sparc64_supply_gregset): Likewise.
2706 (sparc64_collect_gregset): Likewise.
2707 (sparc64_supply_fpregset): Likewise.
2708 (sparc64_collect_fpregset): Likewise.
2709 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2710 * spu-tdep.c (spu_unwind_sp): Likewise.
2711 (spu2ppu_prev_register): Likewise.
2712 (spu_memory_remove_breakpoint): Likewise.
2713 * stack.c (return_command): Likewise.
2714 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2715 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2716 * tracefile.c (trace_save_ctf): Likewise.
2717 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2718 (do_windows_store_inferior_registers): Likewise.
2719 (windows_resume): Likewise.
2720 * xtensa-linux-nat.c (fill_gregset): Likewise.
2721 (supply_gregset_reg): Likewise.
2722 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2723 (xtensa_register_read_masked): Likewise.
2724 (xtensa_supply_gregset): Likewise.
2725 (xtensa_extract_return_value): Likewise.
2726 (xtensa_store_return_value): Likewise.
2727
2728 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2729
2730 * doublest.c (floatformat_from_string): New function.
2731 * doublest.h (floatformat_from_string): Add prototype.
2732
2733 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2734 (OP_FLOAT): ... this.
2735 * expression.h: Do not include "doublest.h".
2736 (union exp_element): Replace doubleconst and decfloatconst by
2737 new element floatconst.
2738 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2739 (ada_evaluate_subexp): Likewise.
2740 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2741 OP_DOUBLE and OP_DECFLOAT.
2742 * expprint.c (print_subexp_standard): Likewise.
2743 (dump_subexp_body_standard): Likewise.
2744 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2745
2746 * parse.c: Include "dfp.h".
2747 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2748 (write_exp_elt_floatcst): New function.
2749 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2750 and OP_DECFLOAT.
2751 (operator_check_standard): Likewise.
2752 (parse_float): Do not accept suffix. Take type as input. Return bool.
2753 Return target format buffer instead of host DOUBLEST.
2754 Use floatformat_from_string and decimal_from_string to parse
2755 either binary or decimal floating-point types.
2756 (parse_c_float): Remove.
2757 * parser-defs.h: Do not include "doublest.h".
2758 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2759 (write_exp_elt_floatcst): Add prototype.
2760 (parse_float): Update prototype.
2761 (parse_c_float): Remove.
2762
2763 * c-exp.y: Do not include "dfp.h".
2764 (typed_val_float): Use byte buffer instead of DOUBLEST.
2765 (typed_val_decfloat): Remove.
2766 (DECFLOAT): Remove.
2767 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2768 (parse_number): Update to new parse_float interface.
2769 Parse suffixes and determine type before calling parse_float.
2770 Handle decimal and binary FP types the same way.
2771
2772 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2773 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2774 (parse_number): Update to new parse_float interface.
2775 Parse suffixes and determine type before calling parse_float.
2776
2777 * f-exp.y: Replace dval by typed_val_float.
2778 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2779 (parse_number): Use parse_float instead of atof.
2780
2781 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2782 (parse_go_float): Remove.
2783 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2784 (parse_number): Call parse_float instead of parse_go_float.
2785 Parse suffixes and determine type before calling parse_float.
2786
2787 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2788 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2789 (parse_number): Update to new parse_float interface.
2790 Parse suffixes and determine type before calling parse_float.
2791
2792 * m2-exp.y: Replace dval by byte buffer val.
2793 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2794 (parse_number): Call parse_float instead of atof.
2795
2796 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2797 (lex_number): Call parse_float instead of strtod.
2798 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2799 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2800 Use write_exp_elt_floatcst.
2801 (unit_testing): Remove static variable.
2802 (rust_type): Do not check unit_testing.
2803 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2804
2805 * ada-exp.y (type_float, type_double): Remove.
2806 (typed_val_float): Use byte buffer instead of DOUBLEST.
2807 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2808 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2809
2810 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2811
2812 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2813 * arch/aarch64.h: New file.
2814
2815 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2816
2817 * dfp.h (decimal_from_string): Use const reference for argument.
2818 * dfp.c (decimal_from_string): Likewise.
2819
2820 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2821
2822 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2823 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2824 * mips-tdep.c (mips_print_fp_register): Likewise.
2825
2826 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2827
2828 * common/format.h (enum argclass): Replace decfloat_arg by
2829 dec32float_arg, dec64float_arg, and dec128float_arg.
2830 * common/format.c (parse_format_string): Update to return
2831 new decimal float argument classes.
2832
2833 * printcmd.c (printf_decfloat): Rename to ...
2834 (printf_floating): ... this. Add argclass argument, and use it
2835 instead of parsing the format string again. Add support for
2836 binary floating-point values, using floatformat_to_string.
2837 Convert value to the target format if it doesn't already match.
2838 (ui_printf): Call printf_floating instead of printf_decfloat,
2839 also for double_arg / long_double_arg. Pass argclass.
2840
2841 * dfp.c (decimal_to_string): Add format string argument.
2842 * dfp.h (decimal_to_string): Likewise.
2843
2844 * doublest.c (floatformat_to_string): Add format string argument.
2845 * doublest.h (floatformat_to_string): Likewise.
2846
2847 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2848
2849 * doublest.c (floatformat_precision): New routine.
2850 (floatformat_to_string): Likewise.
2851 * doublest.c (floatformat_to_string): Add prototype.
2852
2853 * printcmd.c (print_scalar_formatted): Only call print_floating
2854 on floating-point types.
2855 * valprint.c: Do not include "floatformat.h".
2856 (generic_val_print_decfloat): Remove.
2857 (generic_val_print): Call generic_val_print_float for both
2858 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2859 (print_floating): Use floatformat_to_string. Handle decimal float.
2860 (print_decimal_floating): Remove, merge into floatformat_to_string.
2861 * value.h (print_decimal_floating): Remove.
2862
2863 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2864
2865 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2866
2867 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2868
2869 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2870
2871 * memattr.h: Don't include vec.h.
2872 (struct mem_attrib): Initialize fields.
2873 <unknown>: New static method.
2874 (struct mem_region): Add constructors, operator<, initialize
2875 fields.
2876 * memattr.c: Include algorithm.
2877 (default_mem_attrib, unknown_mem_attrib): Remove.
2878 (user_mem_region_list): New global.
2879 (target_mem_region_list, mem_region_list): Change type to
2880 std::vector<mem_region>.
2881 (mem_use_target): Now a function.
2882 (target_mem_regions_valid): Change type to bool.
2883 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2884 (require_user_regions): Adjust.
2885 (require_target_regions): Adjust.
2886 (create_mem_region): Adjust.
2887 (lookup_mem_region): Adjust.
2888 (invalidate_target_mem_regions): Adjust.
2889 (mem_clear): Rename to...
2890 (user_mem_clear): ... this, and adjust.
2891 (mem_command): Adjust.
2892 (info_mem_command): Adjust.
2893 (mem_enable, enable_mem_command, mem_disable,
2894 disable_mem_command): Adjust.
2895 (mem_delete): Adjust.
2896 (delete_mem_command): Adjust.
2897 * memory-map.h (parse_memory_map): Return an std::vector.
2898 * memory-map.c (parse_memory_map): Likewise.
2899 (struct memory_map_parsing_data): Add constructor.
2900 <memory_map>: Point to std::vector.
2901 (memory_map_start_memory): Adjust.
2902 (memory_map_end_memory): Adjust.
2903 (memory_map_end_property): Adjust.
2904 (clear_result): Remove.
2905 * remote.c (remote_memory_map): Return an std::vector.
2906 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2907 Remove.
2908 (target_debug_print_mem_region_vector): New.
2909 * target-delegates.c: Regenerate.
2910 * target.h (mem_region_vector): New typedef.
2911 (to_memory_map): Return mem_region_vector.
2912 (target_memory_map): Return an std::vector.
2913 * target.c (target_memory_map): Return an std::vector.
2914 (flash_erase_command): Adjust.
2915
2916 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2917
2918 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2919 Change type to std::string.
2920 (memory_map_start_property): Adjust.
2921 (memory_map_end_property): Adjust.
2922
2923 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2924
2925 * infrun.h: Include common/byte-vector.h.
2926 (struct displaced_step_closure): New struct.
2927 (struct buf_displaced_step_closure): New struct.
2928 * infrun.c (displaced_step_closure::~displaced_step_closure):
2929 Provide default implementation.
2930 (displaced_step_clear): Deallocate step closure with delete.
2931 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2932 (aarch64_displaced_step_closure): ... this, extend
2933 displaced_step_closure.
2934 (aarch64_displaced_step_data) <dsc>: Change type to
2935 aarch64_displaced_step_closure.
2936 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2937 unique_ptr.
2938 (aarch64_displaced_step_fixup): Add cast for displaced step
2939 closure.
2940 * amd64-tdep.c (displaced_step_closure): Rename to ...
2941 (amd64_displaced_step_closure): ... this, extend
2942 displaced_step_closure.
2943 <insn_buf>: Change type to std::vector<gdb_byte>.
2944 <max_len>: Remove.
2945 (fixup_riprel): Change type of DSC parameter, adjust to type
2946 change of insn_buf.
2947 (fixup_displaced_copy): Change type of DSC parameter.
2948 (amd64_displaced_step_copy_insn): Instantiate
2949 amd64_displaced_step_closure.
2950 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2951 to type change of insn_buf.
2952 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2953 parameter DSC.
2954 (arm_linux_copy_svc): Likewise.
2955 (cleanup_kernel_helper_return): Likewise.
2956 (arm_catch_kernel_helper_return): Likewise.
2957 (arm_linux_displaced_step_copy_insn): Instantiate
2958 arm_displaced_step_closure.
2959 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2960 (displaced_read_reg): Change type of parameter DSC.
2961 (branch_write_pc): Likewise.
2962 (load_write_pc): Likewise.
2963 (alu_write_pc): Likewise.
2964 (displaced_write_reg): Likewise.
2965 (arm_copy_unmodified): Likewise.
2966 (thumb_copy_unmodified_32bit): Likewise.
2967 (thumb_copy_unmodified_16bit): Likewise.
2968 (cleanup_preload): Likewise.
2969 (install_preload): Likewise.
2970 (arm_copy_preload): Likewise.
2971 (thumb2_copy_preload): Likewise.
2972 (install_preload_reg): Likewise.
2973 (arm_copy_preload_reg): Likewise.
2974 (cleanup_copro_load_store): Likewise.
2975 (install_copro_load_store): Likewise.
2976 (arm_copy_copro_load_store) Likewise.
2977 (thumb2_copy_copro_load_store): Likewise.
2978 (cleanup_branch): Likewise.
2979 (install_b_bl_blx): Likewise.
2980 (arm_copy_b_bl_blx): Likewise.
2981 (thumb2_copy_b_bl_blx): Likewise.
2982 (thumb_copy_b): Likewise.
2983 (install_bx_blx_reg): Likewise.
2984 (arm_copy_bx_blx_reg): Likewise.
2985 (thumb_copy_bx_blx_reg): Likewise.
2986 (cleanup_alu_imm): Likewise.
2987 (arm_copy_alu_imm): Likewise.
2988 (thumb2_copy_alu_imm): Likewise.
2989 (cleanup_alu_reg): Likewise.
2990 (install_alu_reg): Likewise.
2991 (arm_copy_alu_reg): Likewise.
2992 (thumb_copy_alu_reg): Likewise.
2993 (cleanup_alu_shifted_reg): Likewise.
2994 (install_alu_shifted_reg): Likewise.
2995 (arm_copy_alu_shifted_reg): Likewise.
2996 (cleanup_load): Likewise.
2997 (cleanup_store): Likewise.
2998 (arm_copy_extra_ld_st): Likewise.
2999 (install_load_store): Likewise.
3000 (thumb2_copy_load_literal): Likewise.
3001 (thumb2_copy_load_reg_imm): Likewise.
3002 (arm_copy_ldr_str_ldrb_strb): Likewise.
3003 (cleanup_block_load_all): Likewise.
3004 (cleanup_block_store_pc): Likewise.
3005 (cleanup_block_load_pc): Likewise.
3006 (arm_copy_block_xfer): Likewise.
3007 (thumb2_copy_block_xfer): Likewise.
3008 (cleanup_svc): Likewise.
3009 (install_svc): Likewise.
3010 (arm_copy_svc): Likewise.
3011 (thumb_copy_svc): Likewise.
3012 (arm_copy_undef): Likewise.
3013 (thumb_32bit_copy_undef): Likewise.
3014 (arm_copy_unpred): Likewise.
3015 (arm_decode_misc_memhint_neon): Likewise.
3016 (arm_decode_unconditional): Likewise.
3017 (arm_decode_miscellaneous): Likewise.
3018 (arm_decode_dp_misc): Likewise.
3019 (arm_decode_ld_st_word_ubyte): Likewise.
3020 (arm_decode_media): Likewise.
3021 (arm_decode_b_bl_ldmstm): Likewise.
3022 (arm_decode_ext_reg_ld_st): Likewise.
3023 (thumb2_decode_dp_shift_reg): Likewise.
3024 (thumb2_decode_ext_reg_ld_st): Likewise.
3025 (arm_decode_svc_copro): Likewise.
3026 (thumb2_decode_svc_copro): Likewise.
3027 (install_pc_relative): Likewise.
3028 (thumb_copy_pc_relative_16bit): Likewise.
3029 (thumb_decode_pc_relative_16bit): Likewise.
3030 (thumb_copy_pc_relative_32bit): Likewise.
3031 (thumb_copy_16bit_ldr_literal): Likewise.
3032 (thumb_copy_cbnz_cbz): Likewise.
3033 (thumb2_copy_table_branch): Likewise.
3034 (cleanup_pop_pc_16bit_all): Likewise.
3035 (thumb_copy_pop_pc_16bit): Likewise.
3036 (thumb_process_displaced_16bit_insn): Likewise.
3037 (decode_thumb_32bit_ld_mem_hints): Likewise.
3038 (thumb_process_displaced_32bit_insn): Likewise.
3039 (thumb_process_displaced_insn): Likewise.
3040 (arm_process_displaced_insn): Likewise.
3041 (arm_displaced_init_closure): Likewise.
3042 (arm_displaced_step_fixup): Add cast for closure.
3043 * arm-tdep.h: Include infrun.h.
3044 (displaced_step_closure): Rename to ...
3045 (arm_displaced_step_closure): ... this, extend
3046 displaced_step_closure.
3047 <u::svc::copy_svc_os>: Change type of parameter DSC.
3048 <cleanup>: Likewise.
3049 (arm_process_displaced_insn): Likewise.
3050 (arm_displaced_init_closure): Likewise.
3051 (displaced_read_reg): Likewise.
3052 (displaced_write_reg): Likewise.
3053 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3054 Adjust.
3055 * i386-tdep.h: Include infrun.h.
3056 (i386_displaced_step_closure): New typedef.
3057 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3058 i386_displaced_step_closure.
3059 (i386_displaced_step_fixup): Adjust.
3060 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3061 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3062 and unique_ptr.
3063 (ppc_displaced_step_fixup): Adjust.
3064 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3065 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3066 and unique_ptr.
3067 (s390_displaced_step_fixup): Adjust.
3068
3069 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3070
3071 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3072 Remove declarations.
3073
3074 2017-10-20 Tom Tromey <tom@tromey.com>
3075
3076 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3077 std::vector.
3078 (gdb_bfd_record_inclusion): Update.
3079 (bfdp): Remove typedef.
3080
3081 2017-10-20 Tom Tromey <tom@tromey.com>
3082
3083 * gdb_bfd.c (gdb_bfd_ref): Use new.
3084 (struct gdb_bfd_data): Add constructor, destructor, and member
3085 initializers.
3086 (gdb_bfd_unref): Use delete.
3087
3088 2017-10-20 Tom Tromey <tom@tromey.com>
3089
3090 * exec.c (exec_file_attach): Use new_bfd_ref.
3091 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3092 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3093 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3094 new_bfd_ref.
3095 * gdb_bfd.h (new_bfd_ref): New function.
3096
3097 2017-10-20 Pedro Alves <palves@redhat.com>
3098
3099 * main.c (captured_command_loop): Add attribute noinline.
3100
3101 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3102
3103 * interps.c (struct interp_factory): Add constructor.
3104 (interp_factory_p): Remove typedef.
3105 (DEF_VEC_P(interp_factory_p)): Remove.
3106 (interpreter_factories): Change type to std::vector.
3107 (interp_factory_register): Adjust.
3108 (interp_lookup): Adjust.
3109 (interpreter_completer): Adjust.
3110
3111 2017-10-19 Tom Tromey <tom@tromey.com>
3112
3113 * break-catch-syscall.c (catch_syscall_completer): Use
3114 std::string, gdb::unique_xmalloc_ptr.
3115
3116 2017-10-19 Tom Tromey <tom@tromey.com>
3117
3118 * infcall.c (call_function_by_hand_dummy): Use std::string.
3119
3120 2017-10-19 Tom Tromey <tom@tromey.com>
3121
3122 * mi/mi-main.c (mi_cmd_execute): Update.
3123 * top.h (prepare_execute_command): Return scoped_value_mark.
3124 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3125 Add move constructor.
3126 * top.c (prepare_execute_command): Return scoped_value_mark.
3127 (execute_command): Update.
3128
3129 2017-10-19 Pedro Alves <palves@redhat.com>
3130
3131 * xml-support.c (xml_fetch_content_from_file): Check fread's
3132 return.
3133
3134 2017-10-19 Pedro Alves <palves@redhat.com>
3135
3136 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3137 async.
3138 (handle_error_fd): New function.
3139 (ser_base_async): Add/delete an event loop file handler for
3140 error_fd.
3141
3142 2017-10-19 Pedro Alves <palves@redhat.com>
3143
3144 * xml-support.c (xml_fetch_content_from_file): Don't read in
3145 chunks. Instead use fseek to determine the file's size, and read
3146 it in one go.
3147
3148 2017-11-18 Keith Seitz <keiths@redhat.com>
3149
3150 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3151 types.
3152 Add whitespace to front of type name.
3153
3154 2017-10-18 Keith Seitz <keiths@redhat.com>
3155
3156 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3157 DW_AT_accessibility.
3158
3159 2017-10-18 Yao Qi <yao.qi@linaro.org>
3160
3161 * features/tic6x-c62x-linux.c: Remove.
3162
3163 2017-10-17 Tom Tromey <tom@tromey.com>
3164
3165 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3166 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3167 (do_mixed_source_and_assembly): Likewise.
3168
3169 2017-10-17 Tom Tromey <tom@tromey.com>
3170
3171 * regcache.c (regcache::xfer_part): Remove assertion.
3172
3173 2017-10-17 Pedro Alves <palves@redhat.com>
3174
3175 * xml-support.c (xml_fetch_content_from_file): Call
3176 unique_ptr::release() instead unique_ptr::get() when passing
3177 through xrealloc.
3178
3179 2017-10-17 Yao Qi <yao.qi@linaro.org>
3180
3181 * regcache.c (regcache::xfer_part): Remove parameters read and
3182 write, add parameter is_raw. All callers are updated.
3183
3184 2017-10-16 Keith Seitz <keiths@redhat.com>
3185
3186 * c-typeprint.c (enum access_specifier): Moved here from
3187 c_type_print_base.
3188 (output_access_specifier): New function.
3189 (c_type_print_base): Consider typedefs when assessing
3190 whether access labels are needed.
3191 Use output_access_specifier as needed.
3192 Output access specifier for typedefs, if needed.
3193 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3194 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3195 fields.
3196 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3197 accessor macros.
3198
3199 2017-10-16 Tom Tromey <tom@tromey.com>
3200
3201 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3202 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3203 * target.c (target_fileio_read_stralloc): Update.
3204 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3205 * target.h (target_fileio_read_stralloc): Return
3206 unique_xmalloc_ptr.
3207
3208 2017-10-16 Tom Tromey <tom@tromey.com>
3209
3210 * xml-syscall.c (xml_init_syscalls_info): Update.
3211 * xml-support.c (xinclude_start_include): Update.
3212 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3213 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3214 (xml_fetch_content_from_file): Likewise.
3215 * osdata.c (get_osdata): Update.
3216 * target.h (target_read_stralloc, target_get_osdata): Return
3217 unique_xmalloc_ptr.
3218 * solib-aix.c (solib_aix_get_library_list): Update.
3219 * solib-target.c (solib_target_current_sos): Update.
3220 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3221 * xml-tdesc.c (fetch_available_features_from_target): Update.
3222 (target_fetch_description_xml): Update.
3223 (file_read_description_xml): Update.
3224 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3225 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3226 (remote_pid_to_exec_file): Update.
3227 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3228 (target_get_osdata): Likewise.
3229
3230 2017-10-16 Tom Tromey <tom@tromey.com>
3231
3232 * remote.c (remote_register_number_and_offset): Use std::vector.
3233 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3234 (putpkt_binary): Use gdb::def_vector.
3235 (compare_sections_command): Use gdb::byte_vector.
3236
3237 2017-10-16 Tom Tromey <tom@tromey.com>
3238
3239 * ppc-linux-nat.c (hwdebug_insert_point): Use
3240 gdb::unique_xmalloc_ptr, XDUP.
3241
3242 2017-10-16 Tom Tromey <tom@tromey.com>
3243
3244 * probe.c (parse_probes): Use std::string.
3245 (info_probes_for_ops, enable_probes_command)
3246 (disable_probes_command): Remove cleanups.
3247
3248 2017-10-16 Tom Tromey <tom@tromey.com>
3249
3250 * buildsym.c (block_compar): Remove.
3251 (end_symtab_get_static_block): Use std::vector.
3252
3253 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3254
3255 * memrange.h (struct mem_range): Define operator< and operator==.
3256 (mem_range_s): Remove.
3257 (DEF_VEC_O (mem_range_s)): Remove.
3258 (normalize_mem_ranges): Change parameter type to std::vector.
3259 * memrange.c (compare_mem_ranges): Remove.
3260 (normalize_mem_ranges): Change parameter type to std::vector,
3261 adjust to vector change.
3262 * exec.c (section_table_available_memory): Return vector, remove
3263 parameter.
3264 (section_table_read_available_memory): Adjust to std::vector
3265 change.
3266 * remote.c (remote_read_bytes): Adjust to std::vector
3267 change.
3268 * tracepoint.h (traceframe_available_memory): Change parameter
3269 type to std::vector.
3270 * tracepoint.c (traceframe_available_memory): Change parameter
3271 type to std::vector, adjust.
3272 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3273 std::vector change.
3274 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3275 unittests/memrange-selftests.c.
3276 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3277 * gdb/unittests/memrange-selftests.c: New file.
3278
3279 2017-10-16 Pedro Alves <palves@redhat.com>
3280
3281 * elfread.c (probe_key_free): Rename range-for variable.
3282 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3283 (find_probe_by_pc, collect_probes): Rename range-for variable.
3284
3285 2017-10-16 Yao Qi <yao.qi@linaro.org>
3286
3287 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3288 * features/tic6x-c62x.c: Remove.
3289 * features/tic6x-c64x-linux.c: Remove.
3290 * features/tic6x-c64x.c: Remove.
3291 * features/tic6x-c64xp-linux.c: Remove.
3292 * features/tic6x-c64xp.c: Remove.
3293 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3294 initialize_tdesc_tic6x_*_linux functions.
3295 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3296 initialize_tdesc_tic6x_* functions.
3297
3298 2017-10-16 Yao Qi <yao.qi@linaro.org>
3299
3300 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3301 tic6x-c62x.
3302 * regformats/tic6x-c62x.dat: Remove.
3303 * regformats/tic6x-c64x.dat: Remove.
3304 * regformats/tic6x-c64xp.dat: Remove.
3305
3306 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3307
3308 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3309 (the !HAVE_LIBEXPAT version).
3310
3311 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3312
3313 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3314 const.
3315
3316 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3317
3318 * target.h: Include tracepoint.h.
3319 (enum trace_find_type): Move to tracepoint.h.
3320 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3321 * tracepoint.h: Don't include target.h
3322 (enum trace_find_type): Move from target.h.
3323 (parse_traceframe_info): Return a unique ptr.
3324 * tracepoint.c (current_traceframe_info): Change type to unique
3325 ptr.
3326 (free_traceframe_info): Remove.
3327 (clear_traceframe_info): Don't manually free
3328 current_traceframe_info.
3329 (free_result): Remove.
3330 (parse_traceframe_info): Return a unique ptr.
3331 (get_traceframe_info): Adjust to unique ptr.
3332 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3333 * remote.c (remote_traceframe_info): Return a unique ptr.
3334 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3335 ptr.
3336 * target-debug.h (target_debug_print_traceframe_info_up): New
3337 macro.
3338 * target-delegates.c: Regenerate.
3339
3340 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3341
3342 * memrange.h (struct mem_range): Add constructors.
3343 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3344 std::vector<mem_range>.
3345 * tracepoint.c (free_traceframe_info): Don't manually free
3346 vector.
3347 (traceframe_info_start_memory): Adjust to vector change.
3348 (traceframe_available_memory): Likewise.
3349 * tracefile-tfile.c (build_traceframe_info): Likewise.
3350 * ctf.c (ctf_traceframe_info): Likewise.
3351
3352 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3353
3354 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3355 std::vector<int>.
3356 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3357 (traceframe_info_start_tvar): Adjust to vector change.
3358 (parse_traceframe_info): Allocate with new.
3359 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3360 vector change.
3361 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3362 change.
3363 tfile_traceframe_info): Allocate with new.
3364 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3365 change.
3366
3367 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3368
3369 * tracepoint.c (traceframe_info): Rename to...
3370 (current_traceframe_info): ...this.
3371 (clear_traceframe_info): Adjust.
3372 (get_traceframe_info): Adjust.
3373
3374 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3375
3376 * nat/linux-osdata.c: Include algorithm.
3377 (compare_processes): Remove.
3378 (struct pid_pgid_entry): New struct.
3379 (linux_xfer_osdata_processgroups): Use std::vector instead of
3380 XNEWVEC.
3381
3382 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3383
3384 * objfiles.h: Don't include symfile.h.
3385 (struct partial_symbol): Remove forward-declaration.
3386 (struct objfile) <global_psymbols, static_psymbols>: Change type
3387 to std::vector<partial_symbol *>.
3388 * objfiles.c (objfile::objfile): Don't memset those fields.
3389 (objfile::~objfile): Don't free those fields.
3390 * psympriv.h (struct psymbol_allocation_list): Remove
3391 forward-declaration.
3392 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3393 to std::vector.
3394 (start_psymtab_common): Change parameters to std::vector.
3395 * psymtab.c: Include algorithm.
3396 (require_partial_symbols): Call shrink_to_fit.
3397 (find_pc_sect_psymbol): Adjust to vector change.
3398 (match_partial_symbol): Likewise.
3399 (lookup_partial_symbol): Likewise.
3400 (psym_relocate): Likewise.
3401 (dump_psymtab): Likewise.
3402 (recursively_search_psymtabs): Likewise.
3403 (compare_psymbols): Remove.
3404 (sort_pst_symbols): Adjust to vector change.
3405 (start_psymtab_common): Likewise.
3406 (end_psymtab_common): Likewise.
3407 (psymbol_bcache_full): De-constify return value.
3408 (add_psymbol_to_bcache): Likewise.
3409 (extend_psymbol_list): Remove.
3410 (append_psymbol_to_list): Adjust to vector change.
3411 (add_psymbol_to_list): Likewise.
3412 (init_psymbol_list): Likewise.
3413 (maintenance_info_psymtabs): Likewise.
3414 (maintenance_check_psymtabs): Likewise.
3415 * symfile.h (struct psymbol_allocation_list): Remove.
3416 * symfile.c (reread_symbols): Adjust to vector change.
3417 * dbxread.c (start_psymtab): Change type of parameters.
3418 (dbx_symfile_read): Adjust to vector change.
3419 (read_dbx_symtab): Likewise.
3420 (start_psymtab): Change type of parameters.
3421 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3422 (create_partial_symtab): Likewise.
3423 (add_partial_symbol): Likewise.
3424 (write_one_signatured_type): Likewise.
3425 (recursively_write_psymbols): Likewise.
3426 * mdebugread.c (parse_partial_symbols): Likewise.
3427 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3428 (scan_xcoff_symtab): Adjust to vector change.
3429 (xcoff_initial_scan): Likewise.
3430
3431 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3432
3433 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3434
3435 2017-10-13 Yao Qi <yao.qi@linaro.org>
3436
3437 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3438 Remove s390x-*-expedite, add s390x-expedite.
3439
3440 2017-10-13 Yao Qi <yao.qi@linaro.org>
3441
3442 * features/s390-gs-linux64.c: Regenerated.
3443 * features/s390x-gs-linux64.c: Regenerated.
3444
3445 2017-10-13 Tom Tromey <tom@tromey.com>
3446
3447 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3448 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3449 delete.
3450 * symfile.c (symbol_file_add_with_addrs): Use new.
3451 (symbol_file_add_separate): Update comment.
3452 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3453 * jit.c (jit_object_close_impl): Use new.
3454 (jit_unregister_code): Use delete.
3455 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3456 (~objfile): Rename from free_objfile.
3457 (free_objfile_separate_debug, do_free_objfile_cleanup)
3458 (free_all_objfiles, objfile_purge_solibs): Use delete.
3459 * objfiles.h (struct objfile): Add constructor and destructor.
3460 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3461 (allocate_objfile, free_objfile): Don't declare.
3462 (struct objstats): Add initializers.
3463
3464 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3465
3466 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3467 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3468 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3469 * gdbarch.h: Regenerate.
3470 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3471 Adjust comment.
3472 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3473 (i386_displaced_step_fixup): Adjust comment.
3474 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3475
3476 2017-10-12 Tom Tromey <tom@tromey.com>
3477
3478 * prologue-value.h (pv_area::store_would_trash): Return bool.
3479 (pv_area::find_reg): Likewise.
3480 * prologue-value.c (pv_area::store_would_trash): Return bool.
3481 (pv_area::find_reg): Likewise.
3482
3483 2017-10-12 Tom Tromey <tom@tromey.com>
3484
3485 * s390-linux-tdep.c (s390_store, s390_load)
3486 (s390_check_for_saved, s390_analyze_prologue): Update.
3487 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3488 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3489 * prologue-value.h (class pv_area): Move from prologue-value.c.
3490 Change names of members. Add constructor, destructor, member
3491 functions.
3492 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3493 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3494 (pv_area_fetch, pv_area_scan): Don't declare.
3495 * prologue-value.c (struct pv_area::area_entry): Now member of
3496 pv_area.
3497 (struct pv_area): Move to prologue-value.h.
3498 (pv_area::pv_area): Rename from make_pv_area.
3499 (pv_area::~pv_area): Rename from free_pv_area.
3500 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3501 (clear_entries, find_entry, overlaps, store_would_trash, store)
3502 (fetch, find_reg, scan): Now member of pv_area.
3503 Remove "area" argument. Update.
3504 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3505 Update.
3506 * mn10300-tdep.c (push_reg, check_for_saved)
3507 (mn10300_analyze_prologue): Update.
3508 * mep-tdep.c (is_arg_spill, check_for_saved)
3509 (mep_analyze_prologue): Update.
3510 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3511 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3512 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3513 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3514 Update.
3515 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3516 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3517
3518 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3519
3520 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3521 * linux-nat.c (linux_nat_delete_thread): New variable.
3522 (lwp_free): Invoke linux_nat_delete_thread if set.
3523 (linux_nat_set_delete_thread): New function.
3524 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3525 thread delete callback.
3526 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3527 (_initialize_arm_linux_nat): Assign thread delete callback.
3528 * s390-linux-nat.c (s390_delete_thread): New function.
3529 (_initialize_s390_nat): Assign thread delete callback.
3530 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3531 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3532 function.
3533 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3534 declaration.
3535 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3536 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3537
3538 2017-10-09 Tom Tromey <tom@tromey.com>
3539
3540 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3541 std::string.
3542 * tui/tui-layout.c (enum tui_status): Use std::string.
3543
3544 2017-10-11 Tom Tromey <tom@tromey.com>
3545
3546 * gdbthread.h (thread_command): Constify.
3547 * inferior.h (detach_command): Constify.
3548 * top.h (set_history, show_history): Constify.
3549 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3550 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3551 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3552 * printcmd.c (set_command): Constify.
3553 (non_const_set_command): New function.
3554 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3555 * breakpoint.c (enable_command, disable_command, delete_command)
3556 (catch_command, tcatch_command, set_breakpoint_cmd)
3557 (show_breakpoint_cmd): Constify.
3558 * macrocmd.c (macro_command): Constify.
3559 * infcmd.c (unset_command, kill_command, detach_command)
3560 (info_proc_cmd): Constify.
3561 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3562 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3563 (info_auto_load_cmd): Constify.
3564 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3565 (unset_tdesc_cmd): Constify.
3566 * ada-lang.c (set_ada_command, show_ada_command)
3567 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3568 * guile/guile.c (set_guile_command, show_guile_command)
3569 (info_guile_command): Constify.
3570 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3571 Constify.
3572 * skip.c (skip_command): Constify.
3573 * compile/compile.c (_initialize_compile): Constify.
3574 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3575 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3576 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3577 (maint_btrace_pt_show_cmd): Constify.
3578 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3579 Constify.
3580 * python/python.c (user_show_python, user_set_python): Constify.
3581 * mips-tdep.c (set_mips_command, show_mips_command)
3582 (set_mipsfpu_command): Constify.
3583 * record-btrace.c (cmd_record_btrace_start)
3584 (cmd_set_record_btrace, cmd_show_record_btrace)
3585 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3586 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3587 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3588 Constify.
3589 * symfile.c (overlay_command): Constify.
3590 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3591 * cli/cli-logging.c (set_logging_command, show_logging_command):
3592 Constify.
3593 * cli/cli-dump.c (dump_command, append_command)
3594 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3595 (tekhex_dump_command, binary_dump_command)
3596 (binary_append_command): Constify.
3597 * cli/cli-decode.c (struct cmd_list_element): Change type of
3598 "fun".
3599 * cli/cli-cmds.c (info_command, show_command, set_debug)
3600 (show_debug): Constify.
3601 (show_command): Add non-const overload.
3602 * top.c (set_history, show_history): Constify.
3603 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3604 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3605 * target.c (target_command): Constify.
3606 * sparc64-tdep.c (info_adi_command): Constify.
3607 * record-full.c (cmd_record_full_start): Constify.
3608 (set_record_full_command): Constify. Fix typo.
3609 (show_record_full_command): Constify.
3610 * thread.c (thread_command, thread_apply_command): Constify.
3611 * memattr.c (dummy_cmd): Constify.
3612 * value.c (function_command): Constify.
3613 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3614 * probe.c (info_probes_command): Constify.
3615 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3616 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3617 (show_thread_cmd, set_thread_default_cmd)
3618 (show_thread_default_cmd): Constify.
3619 (check_empty): Constify.
3620 * tracepoint.c (tfind_command): Constify.
3621 * cp-support.c (maint_cplus_command): Constify.
3622 * windows-tdep.c (info_w32_command): Constify.
3623 * record.c (cmd_record_start, set_record_command)
3624 (show_record_command, info_record_command, cmd_record_goto):
3625 Constify.
3626 * ravenscar-thread.c (set_ravenscar_command)
3627 (show_ravenscar_command): Constify.
3628 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3629 Constify.
3630 (add_internal_problem_command): Remove casts.
3631 * arc-tdep.c (maintenance_print_arc_command): Constify.
3632 * valprint.c (set_print, show_print, set_print_raw)
3633 (show_print_raw): Constify.
3634 * maint.c (maintenance_command, maintenance_info_command)
3635 (maintenance_print_command, maintenance_set_cmd)
3636 (maintenance_show_cmd, set_per_command_cmd)
3637 (show_per_command_cmd, maintenance_check_command): Constify.
3638 * language.c (set_check, show_check): Constify.
3639 * typeprint.c (show_print_type, set_print_type): Constify.
3640 * go32-nat.c (go32_info_dos_command): Constify.
3641
3642 2017-10-11 Tom Tromey <tom@tromey.com>
3643
3644 * breakpoint.c (prepare_re_set_context): Remove.
3645 (breakpoint_re_set_one): Update. Don't use cleanups.
3646 (breakpoint_re_set): Use scoped_restore, std::string, and
3647 scoped_restore_current_language.
3648
3649 2017-10-11 Tom Tromey <tom@tromey.com>
3650
3651 * breakpoint.c (commands_command_1): Use std::string.
3652 (cleanup_executing_breakpoints): Remove.
3653 (bpstat_do_actions_1): Use scoped_restore.
3654 (bpstat_check_watchpoint): Use std::string.
3655 (decode_static_tracepoint_spec): Likewise.
3656 (break_range_command): Likewise.
3657 (watch_command_1): Likewise.
3658 (compare_breakpoints): Change argument types.
3659 (clear_command): Use std::vector.
3660 (cleanup_executing_breakpoints): Remove.
3661 (update_global_location_list): Use unique_xmalloc_ptr.
3662 (strace_command): Remove unused declaration.
3663
3664 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3665
3666 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3667 * NEWS: Mention new FreeBSD/arm native configuration.
3668 * configure.host: Add arm*-*-freebsd*.
3669 * configure.nat: Likewise.
3670 * arm-fbsd-nat.c: New file.
3671
3672 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3673
3674 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3675 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3676 * NEWS: Mention new FreeBSD/arm target.
3677 * configure.tgt: Add arm*-*-freebsd*.
3678 * arm-fbsd-tdep.c: New file.
3679 * arm-fbsd-tdep.h: New file.
3680
3681 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3682
3683 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3684 `gdbarch_elfcore_write_linux_prpsinfo'.
3685 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3686 method.
3687 (elf_internal_linux_prpsinfo): Remove declaration.
3688 * gdbarch.h: Regenerate.
3689 * gdbarch.c: Regenerate.
3690
3691 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3692
3693 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3694 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3695
3696 2017-10-11 Pedro Alves <palves@redhat.com>
3697
3698 * breakpoint.c (reattach_breakpoints): Delete.
3699 * breakpoint.h (reattach_breakpoints): Delete.
3700
3701 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3702
3703 * symfile.c (registered_sym_fns): Make struct, not typedef.
3704 (DEF_VEC_O (registered_sym_fns)): Remove.
3705 (symtab_fns): Change type to std::vector.
3706 (add_symtab_fns): Adjust.
3707 (find_sym_fns): Adjust.
3708
3709 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3710
3711 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3712 * arc-tdep.h (arc_arch_is_em): New function.
3713 (arc_arch_is_hs): Likewise.
3714
3715 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3716
3717 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3718 parentheses in the declaration.
3719 (macro_lookup_inclusion): Likewise.
3720 (macro_lookup_definition): Likewise.
3721 * p-lang.h (pascal_builtin_types): Likewise.
3722 * tui/tui-data.c (tui_win_list): Likewise.
3723 * tui/tui-data.h (tui_win_list): Likewise.
3724 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3725
3726 2017-10-11 Mark Rages <markrages@gmail.com>
3727
3728 * target-memory.c (block_boundaries): Fix for block address not
3729 aligned on block size.
3730
3731 2017-10-10 Pedro Alves <palves@redhat.com>
3732 Tom Tromey <tom@tromey.com>
3733
3734 * breakpoint.c (struct captured_breakpoint_query_args)
3735 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3736 (print_breakpoint): New.
3737 * breakpoint.h (print_breakpoint): Declare.
3738 * common/common-exceptions.h (enum return_reason): Remove
3739 references to catch_exceptions.
3740 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3741 Delete.
3742 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3743 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3744 * gdb.h: Delete.
3745 * gdbthread.h (thread_select): Declare.
3746 * mi/mi-cmd-break.c: Don't include gdb.h.
3747 (breakpoint_notify): Use print_breakpoint.
3748 * mi/mi-cmd-catch.c: Don't include gdb.h.
3749 * mi/mi-interp.c: Don't include gdb.h.
3750 (mi_print_breakpoint_for_event): New.
3751 (mi_breakpoint_created, mi_breakpoint_modified): Use
3752 mi_print_breakpoint_for_event.
3753 * mi/mi-main.c: Don't include gdb.h.
3754 (mi_cmd_thread_select): Parse the global thread ID here. Use
3755 thread_select instead of gdb_thread_select.
3756 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3757 of using gdb_list_thread_ids.
3758 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3759 FILEIO_ENOSYS here.
3760 (remote_fileio_request): Use TRY/CATCH instead of
3761 catch_exceptions.
3762 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3763 (symbol_file_add_from_memory_wrapper): Delete.
3764 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3765 * thread.c: Don't include gdb.h.
3766 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3767 (thread_alive): Use thread_select.
3768 (do_captured_thread_select): Delete, parts salvaged as ...
3769 (thread_select): ... this new function.
3770 (gdb_thread_select): Delete.
3771
3772 2017-10-10 Pedro Alves <palves@redhat.com>
3773 Tom Tromey <tom@tromey.com>
3774
3775 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3776 and reverse logic.
3777 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3778 No longer macros. Instead ...
3779 (enum wp_check_result): They're now values of this new
3780 enumeration.
3781 (watchpoint_check): Change return type to wp_check_result and
3782 parameter type to bpstat.
3783 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3784 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3785 catch_errors. Reverse logic of watchpoint_check call.
3786 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3787 pointer as parameter.
3788 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3789 * common/common-exceptions.c (throw_exception_sjlj): Update
3790 comments to avoid mentioning catch_errors.
3791 * exceptions.c (catch_errors): Delete.
3792 * exceptions.h: Update comments to avoid mentioning catch_errors.
3793 (catch_errors_ftype, catch_errors): Delete.
3794 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3795 (hook_stop_stub): Delete.
3796 (restore_selected_frame): Change return type to void, and
3797 parameter type to const frame_id &.
3798 (restore_infcall_control_state): Use TRY/CATCH instead of
3799 catch_errors.
3800 * main.c (captured_command_loop): Return void and remove
3801 parameter. Remove references to catch_errors.
3802 (captured_main): Use TRY/CATCH instead of catch_errors.
3803 * objc-lang.c (objc_submethod_helper_data)
3804 (find_objc_msgcall_submethod_helper): Delete.
3805 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3806 catch_errors.
3807 * record-full.c (record_full_message): Return void.
3808 (record_full_message_args, record_full_message_wrapper): Delete.
3809 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3810 instead of catch_errors.
3811 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3812 parameter type to int.
3813 * solib-darwin.c (open_symbol_file_object): Ditto.
3814 * solib-dsbt.c (open_symbol_file_object): Ditto.
3815 * solib-frv.c (open_symbol_file_object): Ditto.
3816 * solib-svr4.c (open_symbol_file_object): Ditto.
3817 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3818 * solib.c (update_solib_list): Use TRY/CATCH instead of
3819 catch_errors.
3820 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3821 Change type.
3822 * symmisc.c (struct print_symbol_args): Remove.
3823 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3824 (print_symbol): Change type.
3825 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3826 and remove parameters.
3827 (catch_errors): New.
3828 (get_windows_debug_event): Adjust.
3829
3830 2017-10-09 Tom Tromey <tom@tromey.com>
3831
3832 * mi/mi-main.c (free_splay_tree): Remove.
3833 (list_available_thread_groups): Use splay_tree_up.
3834 * common/gdb_splay_tree.h: New file.
3835
3836 2017-10-09 Tom Tromey <tom@tromey.com>
3837
3838 * mi/mi-main.c (do_nothing): Remove.
3839 (list_available_thread_groups): Update.
3840
3841 2017-10-09 Pedro Alves <palves@redhat.com>
3842
3843 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3844 reading registers when switching context.
3845
3846 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3847
3848 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3849 (fbsd_convert_siginfo): Likewise.
3850 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3851
3852 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3853
3854 * configure.ac (try_guile_versions): Remove guile-2.2.
3855 * configure: Regenerate.
3856
3857 2017-10-09 Tom Tromey <tom@tromey.com>
3858
3859 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3860 (COMPILE.pre): Use $(CXX).
3861
3862 2017-10-09 Pedro Alves <palves@redhat.com>
3863
3864 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3865 Use bool.
3866 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3867 * cp-support.h (cp_remove_params): Now returns a
3868 gdb::unique_xmalloc_ptr.
3869 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3870 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3871 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3872 returning a gdb::unique_xmalloc_ptr.
3873 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3874 * stack.c (find_frame_funname): Adjust to cp_remove_params
3875 returning a gdb::unique_xmalloc_ptr.
3876
3877 2017-10-08 Tom Tromey <tom@tromey.com>
3878
3879 * dwarf2read.c (dwarf2_get_dwz_file): Use
3880 gdb::unique_xmalloc_ptr.
3881 (find_slot_in_mapped_hash): Likewise.
3882 (dwarf2_physname): Likewise.
3883 (create_dwo_unit_in_dwp_v1): Use std::string.
3884 (create_dwo_unit_in_dwp_v2): Likewise.
3885 (lookup_dwo_cutu): Likewise.
3886 (inherit_abstract_dies): Use std::vector.
3887 (read_array_type): Likewise.
3888 (dwarf_decode_macros): Remove unused declaration.
3889 (unsigned_int_compar): Remove.
3890 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3891 (psymtabs_addrmap_cleanup): Remove.
3892
3893 2017-10-08 Tom Tromey <tom@tromey.com>
3894
3895 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3896 * frame.h (frame_cleanup_after_sniffer): Declare.
3897 (frame_prepare_for_sniffer): Return void.
3898 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3899 type of argument.
3900 (frame_prepare_for_sniffer): Return void.
3901
3902 2017-10-08 Tom Tromey <tom@tromey.com>
3903
3904 * utils.h (make_cleanup_value_free): Remove.
3905 * utils.c (do_value_free, struct cleanup): Remove.
3906 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3907 Use gdb_value_up.
3908 * value.h (struct value_deleter): New.
3909 (gdb_value_up): New typedef.
3910
3911 2017-10-08 Tom Tromey <tom@tromey.com>
3912
3913 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3914 (make_cleanup_free_search_symbols): Remove.
3915 (search_symbols): Return std::vector.
3916 (symbol_search::compare_search_syms): Now member of
3917 symbol_search. Change arguments.
3918 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3919 (symtab_symbol_info, rbreak_command): Update.
3920 * symtab.h (struct symbol_search) <next>: Remove.
3921 Add constructors.
3922 (symbol_search::operator<): New function.
3923 (symbol_search::operator==): New function.
3924 (search_symbols): Remove std::vector.
3925 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3926 (symbol_search::compare_search_syms): Declare.
3927
3928 2017-10-06 Yao Qi <yao.qi@linaro.org>
3929
3930 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3931 arch/aarch64-insn.o.
3932 Remove one rule.
3933 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3934
3935 2017-10-06 Yao Qi <yao.qi@linaro.org>
3936
3937 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3938 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3939 arch/arm-linux.o respectively.
3940 * configure.tgt: Likewise.
3941
3942 2017-10-06 Yao Qi <yao.qi@linaro.org>
3943
3944 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3945 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3946
3947 2017-10-06 Pedro Alves <palves@redhat.com>
3948
3949 * windows-nat.c: Include <algorithm>.
3950
3951 2017-10-06 Yao Qi <yao.qi@linaro.org>
3952
3953 * configure.tgt (i386_tobjs): New variable.
3954 (amd64_tobjs): New variable.
3955 Set $cpu_obs and $os_obs.
3956
3957 2017-10-06 Yao Qi <yao.qi@linaro.org>
3958
3959 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3960 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3961 (clean): Remove object files and dependency files.
3962 (distclean): Remove the directory.
3963 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3964 * configure: Re-generated.
3965 * configure.tgt: Replace amd64.o with arch/amd64.o.
3966
3967 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3968
3969 PR build/22188
3970 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3971 and SETEND.
3972
3973 2017-10-05 Pedro Alves <palves@redhat.com>
3974
3975 * linux-nat.c (linux_child_follow_fork): When following the parent
3976 and detaching the child, consult the parent thread's architecture
3977 instead of the child's.
3978
3979 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3980
3981 * ax.h: Do not include "doublest.h".
3982 (union agent_val): Remove.
3983
3984 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3985
3986 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3987 (decimal_to_string): Return std::string object.
3988 (decimal_from_string): Accept std::string object. Return bool.
3989 (decimal_from_integral, decimal_from_doublest): Remove.
3990 (decimal_from_longest): Add prototype.
3991 (decimal_from_ulongest): Likewise.
3992 (decimal_to_longest): Likewise.
3993 (decimal_from_doublest): Likewise.
3994 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3995 (MAX_DECIMAL_STRING): Move here.
3996 (decimal_to_string): Return std::string object.
3997 (decimal_from_string): Accept std::string object. Return bool.
3998 (decimal_from_integral): Remove, replace by ...
3999 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4000 (decimal_to_longest): New function.
4001 (decimal_from_floating): Remove, replace by ...
4002 (decimal_from_doublest): ... this new function.
4003 (decimal_to_doublest): Update to new decimal_to_string interface.
4004
4005 * value.c (unpack_long): Use decimal_to_longest.
4006 * valops.c (value_cast): Use decimal_from_doublest instead of
4007 decimal_from_floating. Use decimal_from_[u]longest isntead of
4008 decimal_from_integral.
4009 * valarith.c (value_args_as_decimal): Likewise.
4010 * valprint.c (print_decimal_floating): Update to new
4011 decimal_to_string interface.
4012 * printcmd.c (printf_decfloat): Likewise.
4013 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4014
4015 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4016
4017 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4018 * gdbtypes.c: Include "floatformat.h".
4019 * value.c: Likewise.
4020 * m68k-tdep.c: Likewise.
4021
4022 * findvar.c: Do not include "floatformat.h".
4023 * amd64-darwin-tdep.c: Likewise.
4024 * arm-linux-tdep.c: Likewise.
4025 * i386-darwin-tdep.c: Likewise.
4026 * i387-tdep.c: Likewise.
4027 * m68k-linux-tdep.c: Likewise.
4028 * mep-tdep.c: Likewise.
4029 * mips-tdep.c: Likewise.
4030 * nios2-tdep.c: Likewise.
4031 * s390-linux-tdep.c: Likewise.
4032 * sparc-obsd-tdep.c: Likewise.
4033 * sparc-tdep.c: Likewise.
4034 * sparc64-tdep.c: Likewise.
4035 * spu-tdep.c: Likewise.
4036 * tic6x-tdep.c: Likewise.
4037 * tilegx-tdep.c: Likewise.
4038 * vax-tdep.c: Likewise.
4039 * xstormy16-tdep.c: Likewise.
4040 * xtensa-tdep.c: Likewise.
4041
4042 * top.c: Do not include "doublest.h".
4043 * aarch64-tdep.c: Likewise.
4044 * alpha-tdep.c: Likewise.
4045 * arm-linux-tdep.c: Likewise.
4046 * m68k-linux-tdep.c: Likewise.
4047 * tilegx-tdep.c: Likewise.
4048 * xstormy16-tdep.c: Likewise.
4049
4050 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4051
4052 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4053 (mipsn32_fbsd_sigframe): Define.
4054 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4055 for FreeBSD/mipsn32.
4056
4057 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4058
4059 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4060 AT_HWCAP.
4061
4062 2017-10-05 Tristan Gingold <tgingold@free.fr>
4063
4064 * MAINTAINERS (Misc): Update my email address.
4065
4066 2017-10-04 Pedro Alves <palves@redhat.com>
4067
4068 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4069 it instead of target_gdbarch.
4070 (get_remote_state, get_remote_packet_size): Adjust
4071 get_remote_arch_state calls, passing down target_gdbarch
4072 explicitly.
4073 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4074 'gdbarch' and use it instead of target_gdbarch.
4075 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4076 passing down target_gdbarch explicitly.
4077 (struct stop_reply) <arch>: New field.
4078 (remote_parse_stop_reply): Use the stopped thread's architecture,
4079 not the current inferior's. Save the architecture in the
4080 stop_reply.
4081 (process_stop_reply): Use the stop reply's architecture.
4082 (process_g_packet, remote_fetch_registers)
4083 (remote_prepare_to_store, store_registers_using_G)
4084 (remote_store_registers): Adjust get_remote_arch_state calls,
4085 using the regcache's architecture.
4086 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4087 passing down target_gdbarch explicitly.
4088 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4089 beneath instead of calling target_gdbarch.
4090 * target.c (default_thread_architecture): Use the specified
4091 inferior's architecture, instead of the current inferior's
4092 architecture (via target_gdbarch).
4093
4094 2017-10-04 Pedro Alves <palves@redhat.com>
4095
4096 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4097 case.
4098 (regcache_print): Handle !target_has_registers here instead.
4099
4100 2017-10-04 Pedro Alves <palves@redhat.com>
4101
4102 * frame.c (create_test_frame): Delete.
4103 * frame.h (create_test_frame): Delete.
4104 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4105 (class regcache_test): Delete.
4106 (test_target_has_registers, test_target_has_stack)
4107 (test_target_has_memory, test_target_prepare_to_store)
4108 (test_target_store_registers): New functions.
4109 (test_target_ops): New class.
4110 (register_to_value_test): Error out if there's already a
4111 process_stratum (or higher) target pushed. Create a fuller mock
4112 environment, with mock target_ops, inferior, address space, thread
4113 and inferior_ptid.
4114 * progspace.c (struct address_space): Move to ...
4115 * progspace.h (struct address_space): ... here.
4116 * regcache.h (regcache::~regcache, regcache::raw_write)
4117 [GDB_SELF_TEST]: No longer virtual.
4118
4119 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4120
4121 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4122
4123 2017-10-04 Pedro Alves <palves@redhat.com>
4124
4125 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4126 out of 'between TRY and CATCH'.
4127
4128 2017-10-04 Pedro Alves <palves@redhat.com>
4129
4130 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4131 * common/common-exceptions.h (TRY): Open an outermost scope.
4132 Expand intro comment.
4133 (CATCH): Reindent.
4134 (END_CATCH): Close the outermost scope.
4135 * completer.c (complete_line_internal): Add missing END_CATCH.
4136
4137 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4138
4139 * NEWS (Changes since GDB 8.0): Add entry about new
4140 'set-cwd-on-gdbserver' feature.
4141 (New remote packets): Add entry for QSetWorkingDir.
4142 * common/common-inferior.h (set_inferior_cwd): New prototype.
4143 * infcmd.c (set_inferior_cwd): Remove "static".
4144 (show_cwd_command): Expand text to include remote debugging.
4145 * remote.c: Add PACKET_QSetWorkingDir.
4146 (remote_protocol_features) <QSetWorkingDir>: New entry for
4147 PACKET_QSetWorkingDir.
4148 (extended_remote_set_inferior_cwd): New function.
4149 (extended_remote_create_inferior): Call
4150 "extended_remote_set_inferior_cwd".
4151 (_initialize_remote): Call "add_packet_config_cmd" for
4152 QSetWorkingDir.
4153
4154 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4155
4156 * NEWS (New commands): Mention "set/show cwd".
4157 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4158 "cd" command's help text.
4159 * common/common-inferior.h (get_inferior_cwd): New prototype.
4160 * infcmd.c (inferior_cwd_scratch): New global variable.
4161 (set_inferior_cwd): New function.
4162 (get_inferior_cwd): Likewise.
4163 (set_cwd_command): Likewise.
4164 (show_cwd_command): Likewise.
4165 (_initialize_infcmd): Add "set/show cwd" commands.
4166 * inferior.h (class inferior) <cwd>: New field.
4167 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4168 (fork_inferior): Change inferior's cwd before its execution.
4169 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4170 to CreateProcess.
4171
4172 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4173
4174 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4175 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4176 (COMMON_OBS): Add gdb_tilde_expand.o.
4177 * common/gdb_tilde_expand.c: New file.
4178 * common/gdb_tilde_expand.h: Likewise.
4179
4180 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4181
4182 * gdbarch.sh (objfile): Remove duplicate declaration.
4183 * gdbarch.h: Regenerate.
4184
4185 2017-10-03 Tom Tromey <tom@tromey.com>
4186
4187 * utils.c (internal_vproblem): Use string_vprintf.
4188
4189 2017-10-03 Tom Tromey <tom@tromey.com>
4190
4191 * printcmd.c (info_symbol_command): Use std::string.
4192
4193 2017-10-03 Tom Tromey <tom@tromey.com>
4194
4195 * top.c (gdb_safe_append_history): Use std::string.
4196
4197 2017-10-03 Tom Tromey <tom@tromey.com>
4198
4199 * event-top.c (stdin_event_handler): Update.
4200 * main.c (captured_main_1): Update.
4201 * top.h (make_delete_ui_cleanup): Remove.
4202 (struct ui): Add constructor and destructor.
4203 (new_ui, delete_ui): Remove.
4204 * top.c (make_delete_ui_cleanup): Remove.
4205 (new_ui_command): Use std::unique_ptr.
4206 (delete_ui_cleanup): Remove.
4207 (ui::ui): Rename from new_ui. Update.
4208 (free_ui): Remove.
4209 (ui::~ui): Rename from delete_ui. Update.
4210
4211 2017-10-03 Tom Tromey <tom@tromey.com>
4212
4213 * symfile.c (load_progress): Use gdb::byte_vector.
4214
4215 2017-10-03 Tom Tromey <tom@tromey.com>
4216
4217 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4218 declaration.
4219 * printcmd.c (x_command): Remove unused declaration.
4220 * symfile.c (symbol_file_command): Remove unused declaration.
4221
4222 2017-10-03 Tom Tromey <tom@tromey.com>
4223
4224 * utils.c (internal_vproblem): Use std::string.
4225 (defaulted_query): Likewise.
4226
4227 2017-10-03 Tom Tromey <tom@tromey.com>
4228
4229 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4230 * top.c (execute_command_to_string): Update.
4231 * utils.c (make_cleanup_restore_page_info): Remove.
4232 (do_restore_page_info_cleanup): Remove.
4233 (set_batch_flag_and_restore_page_info):
4234 New.
4235 (make_cleanup_restore_page_info): Remove.
4236 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4237 (~set_batch_flag_and_restore_page_info): New
4238 (make_cleanup_restore_uinteger): Remove.
4239 (make_cleanup_restore_integer): Remove.
4240 (struct restore_integer_closure): Remove.
4241 (restore_integer): Remove.
4242 * utils.h (struct set_batch_flag_and_restore_page_info): New
4243 class.
4244 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4245 (make_cleanup_restore_page_info): Remove.
4246 (make_cleanup_restore_uinteger) Remove.
4247 (make_cleanup_restore_integer) Remove.
4248
4249 2017-10-03 Tom Tromey <tom@tromey.com>
4250
4251 * record-full.h (record_full_gdb_operation_disable_set): Return
4252 scoped_restore_tmpl<int>.
4253 * infrun.c (adjust_pc_after_break): Update.
4254 (handle_signal_stop): Update.
4255 * record-full.c (record_full_gdb_operation_disable_set): Return
4256 scoped_restore_tmpl<int>.
4257 (record_full_wait_1, record_full_insert_breakpoint)
4258 (record_full_remove_breakpoint, record_full_save)
4259 (record_full_goto_insn): Update.
4260
4261 2017-10-02 Tom Tromey <tom@tromey.com>
4262
4263 PR rust/22236:
4264 * rust-lang.c (rust_val_print_str): New function.
4265 (val_print_struct): Call it.
4266 (rust_subscript): Preserve name of slice type.
4267
4268 2017-10-02 Tom Tromey <tom@tromey.com>
4269
4270 * rust-lang.c (rust_subscript): Handle slices in
4271 EVAL_AVOID_SIDE_EFFECTS case.
4272
4273 2017-10-02 Tom Tromey <tom@tromey.com>
4274
4275 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4276
4277 2017-10-02 Tom Tromey <tom@tromey.com>
4278
4279 * rust-lang.h (rust_slice_type): Add "extern".
4280
4281 2017-10-02 Tom Tromey <tom@tromey.com>
4282 Pedro Alves <palves@redhat.com>
4283
4284 * ada-lang.h (ada_exc_info::operator<): Make const.
4285 (ada_exc_info::operator==): Make const.
4286 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4287 Make const.
4288
4289 2017-09-29 Tom Tromey <tom@tromey.com>
4290
4291 * target.c (read_whatever_is_readable): Change type of "result".
4292 Update.
4293 (free_memory_read_result_vector): Remove.
4294 (read_memory_robust): Change return type. Update.
4295 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4296 bin2hex, std::string.
4297 * target.h (memory_read_result_s): Remove typedef.
4298 (free_memory_read_result_vector): Remove.
4299 (read_memory_robust): Return std::vector.
4300
4301 2017-09-29 Tom Tromey <tom@tromey.com>
4302
4303 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4304
4305 2017-09-29 Tom Tromey <tom@tromey.com>
4306
4307 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4308 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4309 operator< and operator==.
4310 (ada_exceptions_list): Return a std::vector.
4311 * ada-lang.c (ada_exc_info::operator<): Rename from
4312 compare_ada_exception_info.
4313 (ada_exc_info::operator==): New.
4314 (sort_remove_dups_ada_exceptions_list): Change type of
4315 "exceptions".
4316 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4317 (ada_add_global_exceptions): Likewise.
4318 (ada_exceptions_list_1): Return a std::vector.
4319 (ada_exceptions_list): Likewise.
4320
4321 2017-09-29 Tom Tromey <tom@tromey.com>
4322
4323 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4324 'std::set *'.
4325 (print_one_inferior): Update.
4326 (free_vector_of_ints): Remove.
4327 (list_available_thread_groups): Change "ids" to std::set.
4328 (mi_cmd_list_thread_groups): Update.
4329 (struct collect_cores_data) <core>: Now a std::set.
4330 (collect_cores): Update.
4331 (unique): Remove.
4332 (print_one_inferior): Update.
4333
4334 2017-09-29 Tom Tromey <tom@tromey.com>
4335
4336 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4337 (mi_execute_async_cli_command): Likewise.
4338 (mi_cmd_trace_frame_collected): Use field_fmt.
4339
4340 2017-09-29 Tom Tromey <tom@tromey.com>
4341
4342 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4343 gdb::byte_vector.
4344
4345 2017-09-29 Tom Tromey <tom@tromey.com>
4346
4347 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4348
4349 2017-09-29 Tom Tromey <tom@tromey.com>
4350
4351 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4352
4353 2017-09-29 Tom Tromey <tom@tromey.com>
4354
4355 * varobj.h (varobj_gen_name): Return std::string.
4356 * varobj.c (varobj_gen_name): Return std::string.
4357 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4358 (mi_cmd_var_delete): Don't copy "name".
4359
4360 2017-09-29 Tom Tromey <tom@tromey.com>
4361
4362 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4363 (mi_cmd_break_insert_1): Update.
4364
4365 2017-09-29 Tom Tromey <tom@tromey.com>
4366
4367 * target.h (make_scoped_defer_target_commit_resume): Update.
4368 * target.c (make_scoped_defer_target_commit_resume): Rename from
4369 make_cleanup_defer_target_commit_resume. Return a
4370 scoped_restore.
4371 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4372
4373 2017-09-29 Tom Tromey <tom@tromey.com>
4374
4375 * main.c (captured_main_1): Remove unused declaration.
4376 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4377
4378 2017-09-29 Tom Tromey <tom@tromey.com>
4379
4380 * symtab.c (search_symbols): Remove unused outer cleanup.
4381 (make_source_files_completion_list): Remove unused declaration.
4382
4383 2017-09-29 Tom Tromey <tom@tromey.com>
4384
4385 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4386
4387 2017-09-29 Tom Tromey <tom@tromey.com>
4388
4389 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4390 gdb::byte_vector.
4391
4392 2017-09-29 Tom Tromey <tom@tromey.com>
4393
4394 * complaints.c (vcomplaint): Use std::string.
4395
4396 2017-09-29 Tom Tromey <tom@tromey.com>
4397
4398 * tracepoint.c (trace_variable_command): Use std::string.
4399 (encode_actions_1): Remove unused declarations.
4400 (create_tsv_from_upload): Use std::string.
4401
4402 2017-09-29 Tom Tromey <tom@tromey.com>
4403
4404 * cp-support.c (gdb_demangle): Use std::string.
4405
4406 2017-09-29 Tom Tromey <tom@tromey.com>
4407
4408 * stack.c (parse_frame_specification): Use std::string
4409 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4410
4411 2017-09-29 Tom Tromey <tom@tromey.com>
4412
4413 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4414
4415 2017-09-29 Tom Tromey <tom@tromey.com>
4416
4417 * utils.c (vfprintf_maybe_filtered): Use std::string.
4418 (vfprintf_unfiltered): Likewise.
4419
4420 2017-09-29 Tom Tromey <tom@tromey.com>
4421
4422 * event-top.c (top_level_prompt): Return std::string.
4423 (display_gdb_prompt): Update.
4424
4425 2017-09-29 Tom Tromey <tom@tromey.com>
4426
4427 * unittests/common-utils-selftests.c (format): New function.
4428 (string_vprintf_tests): New function.
4429 (_initialize_common_utils_selftests): Register new tests.
4430 * common/common-utils.c (string_vprintf): New function.
4431 * common/common-utils.h (string_vprintf): Declare.
4432
4433 2017-09-29 Pedro Alves <palves@redhat.com>
4434
4435 * common/rsp-low.c (unpack_varlen_hex): Constify.
4436 * common/rsp-low.h (unpack_varlen_hex): Constify.
4437 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4438 Constify.
4439 * remote.c (remote_set_permissions, read_ptid)
4440 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4441 (remote_static_tracepoint_marker_at)
4442 (remote_static_tracepoint_markers_by_strid)
4443 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4444 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4445 (parse_tracepoint_definition, parse_tsv_definition)
4446 (parse_static_tracepoint_marker_definition): Constify.
4447 * tracepoint.h (parse_static_tracepoint_marker_definition)
4448 (parse_trace_status, parse_tracepoint_status)
4449 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4450
4451 2017-09-29 Pedro Alves <palves@redhat.com>
4452
4453 * remote.c (target_buf, target_buf_size): Delete.
4454 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4455 Use the connection's packet buffer instead.
4456 All callers adjusted.
4457 (_initialize_remote): Remove references to target_buf and
4458 target_buf_size.
4459
4460 2017-09-28 Pedro Alves <palves@redhat.com>
4461
4462 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4463 unittests/common-utils-selftests.c.
4464 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4465 (COMMON_OBS): Remove utils-selftests.o.
4466 * utils-selftests.c: Move to ...
4467 * unittests/common-utils-selftests.c: ... here and rename self
4468 test to "string_printf".
4469
4470 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4471
4472 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4473 having NULL cus or tus.
4474
4475 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4476
4477 * arm-tdep.c: (convert_from_extended): Remove.
4478 (convert_to_extended): Likewise.
4479 (arm_extract_return_value): Use convert_typed_floating.
4480 (arm_store_return_value): Likewise.
4481
4482 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4483 * sh-tdep.c: Do not include "floatformat.h".
4484 (sh_littlebyte_bigword_type): New function.
4485 (sh_register_convert_to_virtual): Use convert_typed_floating.
4486 (sh_register_convert_to_raw): Likewise.
4487 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4488 (sh64_littlebyte_bigword_type): New function.
4489 (sh64_extract_return_value): Use convert_typed_floating.
4490 (sh64_register_convert_to_virtual): Likewise.
4491 (sh64_register_convert_to_raw): Likewise.
4492
4493 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4494
4495 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4496 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4497
4498 * gdbtypes.h (union type_specific): Make field floatformat hold
4499 just a single struct floatformat, not an array.
4500 (floatformat_from_type): Move here.
4501 * gdbtypes.c (floatformat_from_type): Move here. Update to
4502 changed TYPE_FLOATFORMAT definition.
4503 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4504 (recursive_dump_type): Likewise.
4505 (init_float_type): Install correct floatformat for byte order.
4506 (arch_float_type): Likewise.
4507
4508 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4509
4510 * gdbtypes.c (init_type): Change incoming argument from
4511 length-in-bytes to length-in-bits. Assert length is a
4512 multiple of TARGET_CHAR_BITS.
4513 (arch_type, arch_flags_type): Likewise.
4514 (init_integer_type): Update call to init_type.
4515 (init_character_type): Likewise.
4516 (init_boolean_type): Likewise.
4517 (init_float_type): Likewise.
4518 (init_decfloat_type): Likewise.
4519 (init_complex_type): Likewise.
4520 (init_pointer_type): Likewise.
4521 (objfile_type): Likewise.
4522 (arch_integer_type): Update call to arch_type.
4523 (arch_character_type): Likewise.
4524 (arch_boolean_type): Likewise.
4525 (arch_float_type): Likewise.
4526 (arch_decfloat_type): Likewise.
4527 (arch_complex_type): Likewise.
4528 (arch_pointer_type): Likewise.
4529 (gdbtypes_post_init): Likewise.
4530
4531 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4532 (read_base_type): Likewise.
4533 * mdebugread.c (basic_type): Likewise.
4534 * stabsread.c (dbx_init_float_type): Likewise.
4535 (rs6000_builtin_type): Likewise.
4536 (read_range_type): Likewise. Also, fix call to init_integer_type
4537 with erroneous length argument.
4538
4539 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4540 * d-lang.c (build_d_types): Likewise.
4541 * f-lang.c (build_fortran_types): Likewise.
4542 * go-lang.c (build_go_types): Likewise.
4543 * opencl-lang.c (build_opencl_types): Likewise.
4544 * jit.c (finalize_symtab): Likewise.
4545 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4546 (build_std_type_info_type): Likewise.
4547 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4548 update call to arch_flags_type.
4549
4550 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4551 arch_type.
4552 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4553 * windows-tdep.c (windows_get_tlb_type): Likewise.
4554
4555 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4556 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4557 * m32c-tdep.c (make_types): Likewise.
4558 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4559 (rl78_psw_type): Update call to arch_flags_type.
4560 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4561 * rx-tdep.c (rx_psw_type): Likewise.
4562 (rx_fpsw_type): Likewise.
4563 * sparc-tdep.c (sparc_psr_type): Likewise.
4564 (sparc_fsr_type): Likewise.
4565 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4566 (sparc64_ccr_type): Likewise.
4567 (sparc64_fsr_type): Likewise.
4568 (sparc64_fprs_type): Likewise.
4569
4570 2017-09-27 Tom Tromey <tom@tromey.com>
4571
4572 * findcmd.c (find_command): Constify.
4573
4574 2017-09-27 Tom Tromey <tom@tromey.com>
4575
4576 * ada-tasks.c (task_command_1, task_command): Constify.
4577
4578 2017-09-27 Tom Tromey <tom@tromey.com>
4579
4580 * symtab.c (maintenance_print_symbol_cache)
4581 (maintenance_flush_symbol_cache)
4582 (maintenance_print_symbol_cache_statistics): Constify.
4583
4584 2017-09-27 Tom Tromey <tom@tromey.com>
4585
4586 * inferior.c (detach_inferior_command, kill_inferior_command)
4587 (inferior_command): Constify.
4588
4589 2017-09-27 Tom Tromey <tom@tromey.com>
4590
4591 * regcache.c (regcache_print, maintenance_print_registers)
4592 (maintenance_print_raw_registers)
4593 (maintenance_print_cooked_registers)
4594 (maintenance_print_register_groups)
4595 (maintenance_print_remote_registers): Constify.
4596
4597 2017-09-27 Tom Tromey <tom@tromey.com>
4598
4599 * printcmd.c (map_display_numbers, undisplay_command)
4600 (enable_disable_display_command, enable_display_command)
4601 (disable_display_command): Constify.
4602
4603 2017-09-27 Tom Tromey <tom@tromey.com>
4604
4605 * breakpoint.h (delete_command): Don't declare.
4606 * breakpoint.c (delete_command, enable_once_command)
4607 (enable_count_command, enable_delete_command, breakpoint_1)
4608 (maintenance_info_breakpoints, stopin_command, stopat_command)
4609 (delete_command, delete_trace_command, save_breakpoints)
4610 (save_breakpoints_command, save_tracepoints_command): Constify.
4611
4612 2017-09-27 Tom Tromey <tom@tromey.com>
4613
4614 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4615 (skip_ws, extract_identifier, macro_define_command)
4616 (macro_undef_command, macro_list_command): Constify.
4617
4618 2017-09-27 Tom Tromey <tom@tromey.com>
4619
4620 * infcmd.c (environment_info, set_environment_command)
4621 (unset_environment_command, path_info, info_proc_cmd_1)
4622 (info_proc_cmd_mappings, info_proc_cmd_stat)
4623 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4624 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4625
4626 2017-09-27 Tom Tromey <tom@tromey.com>
4627
4628 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4629 Constify.
4630
4631 2017-09-27 Tom Tromey <tom@tromey.com>
4632
4633 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4634
4635 2017-09-27 Tom Tromey <tom@tromey.com>
4636
4637 * demangle.c (demangle_command): Constify.
4638
4639 2017-09-27 Tom Tromey <tom@tromey.com>
4640
4641 * progspace.c (maintenance_info_program_spaces_command):
4642 Constify.
4643
4644 2017-09-27 Tom Tromey <tom@tromey.com>
4645
4646 * compile/compile.c (check_raw_argument, compile_file_command)
4647 (compile_code_command, compile_print_command): Constify.
4648
4649 2017-09-27 Tom Tromey <tom@tromey.com>
4650
4651 * reggroups.c (maintenance_print_reggroups): Constify.
4652
4653 2017-09-27 Tom Tromey <tom@tromey.com>
4654
4655 * dwarf2read.c (save_gdb_index_command): Constify.
4656
4657 2017-09-27 Tom Tromey <tom@tromey.com>
4658
4659 * stap-probe.c (info_probes_stap_command): Constify.
4660
4661 2017-09-27 Tom Tromey <tom@tromey.com>
4662
4663 * fork-child.c (unset_exec_wrapper_command): Constify.
4664
4665 2017-09-27 Tom Tromey <tom@tromey.com>
4666
4667 * btrace.c (get_uint, get_context_size, no_chunk)
4668 (maint_btrace_packet_history_cmd)
4669 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4670 (maint_info_btrace_cmd): Constify.
4671
4672 2017-09-27 Tom Tromey <tom@tromey.com>
4673
4674 * reverse.c (delete_bookmark_command): Constify.
4675
4676 2017-09-27 Tom Tromey <tom@tromey.com>
4677
4678 * remote.c (set_memory_packet_size)
4679 (set_memory_write_packet_size, show_memory_write_packet_size)
4680 (set_memory_read_packet_size, show_memory_read_packet_size)
4681 (compare_sections_command, packet_command, remote_put_command)
4682 (remote_get_command, remote_delete_command): Constify.
4683
4684 2017-09-27 Tom Tromey <tom@tromey.com>
4685
4686 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4687 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4688 (set_mipsfpu_auto_command): Constify.
4689
4690 2017-09-27 Tom Tromey <tom@tromey.com>
4691
4692 * cli/cli-cmds.h (cd_command): Constify.
4693 * cli/cli-cmds.c (cd_command): Constify.
4694
4695 2017-09-27 Tom Tromey <tom@tromey.com>
4696
4697 * thread.c (thread_name_command, thread_find_command): Constify.
4698
4699 2017-09-27 Tom Tromey <tom@tromey.com>
4700
4701 * probe.c (enable_probes_command, disable_probes_command):
4702 Constify.
4703
4704 2017-09-27 Tom Tromey <tom@tromey.com>
4705
4706 * symfile.c (symbol_file_command): Constify.
4707 * gdbcore.h (deprecated_file_changed_hook): Constify.
4708 * exec.c (deprecated_file_changed_hook, exec_file_command)
4709 (file_command): Constify.
4710 * defs.h (symbol_file_command): Constify.
4711
4712 2017-09-27 Tom Tromey <tom@tromey.com>
4713
4714 * remote-fileio.c (set_system_call_allowed)
4715 (show_system_call_allowed): Constify.
4716
4717 2017-09-27 Tom Tromey <tom@tromey.com>
4718
4719 * tracepoint.c (delete_trace_variable_command)
4720 (tfind_end_command, tfind_start_command, tfind_pc_command)
4721 (tfind_tracepoint_command, tfind_line_command)
4722 (tfind_range_command, tfind_outside_command): Constify.
4723
4724 2017-09-27 Tom Tromey <tom@tromey.com>
4725
4726 * ax-gdb.c (maint_agent_printf_command, agent_command)
4727 (agent_eval_command): Constify.
4728
4729 2017-09-27 Tom Tromey <tom@tromey.com>
4730
4731 * tracepoint.c (info_scope_command): Constify.
4732 * python/python.c (gdbpy_decode_line): Constify.
4733 * python/py-breakpoint.c (bppy_init): Constify.
4734 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4735 * location.h: (new_linespec_location)
4736 (string_to_event_location_basic, string_to_event_location):
4737 Constify.
4738 * location.c (new_linespec_location)
4739 (string_to_event_location_basic, string_to_event_location):
4740 Constify.
4741 * linespec.h (decode_line_with_current_source)
4742 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4743 * linespec.c (linespec_lex_to_end)
4744 (decode_line_with_current_source)
4745 (decode_line_with_last_displayed): Constify.
4746 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4747 Constify.
4748 * cli/cli-cmds.c (edit_command, list_command): Constify.
4749 * breakpoint.h (until_break_command, watch_command_wrapper)
4750 (awatch_command_wrapper, rwatch_command_wrapper)
4751 (init_ada_exception_breakpoint): Constify.
4752 * breakpoint.c (break_command_1, dprintf_command)
4753 (break_range_command, watch_command_wrapper)
4754 (rwatch_command_wrapper, awatch_command_wrapper)
4755 (until_break_command, init_ada_exception_breakpoint)
4756 (strace_marker_create_sals_from_location, trace_command)
4757 (ftrace_command, strace_command, struct tracepoint): Constify.
4758 * ax-gdb.c (agent_command_1): Constify.
4759 * ada-lang.c (ada_exception_sal): Constify.
4760
4761 2017-09-27 Tom Tromey <tom@tromey.com>
4762
4763 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4764 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4765 (get_context_size, no_chunk, get_insn_history_modifiers)
4766 (cmd_record_insn_history, get_call_history_modifiers)
4767 (cmd_record_call_history): Constify.
4768
4769 2017-09-27 Tom Tromey <tom@tromey.com>
4770
4771 * source.c (show_substitute_path_command)
4772 (unset_substitute_path_command, set_substitute_path_command):
4773 Constify.
4774
4775 2017-09-27 Tom Tromey <tom@tromey.com>
4776
4777 * typeprint.c (maintenance_print_type): Constify.
4778 * maint.c (maintenance_dump_me, maintenance_demangle)
4779 (maintenance_time_display, maintenance_info_sections)
4780 (maintenance_print_statistics, maintenance_deprecate)
4781 (maintenance_undeprecate): Constify.
4782 (maintenance_do_deprecate): Constify. Use std::string.
4783 (maintenance_selftest): Constify.
4784 * gdbtypes.h (maintenance_print_type): Constify.
4785
4786 2017-09-27 Tom Tromey <tom@tromey.com>
4787
4788 * hppa-tdep.c (unwind_command): Constify.
4789
4790 2017-09-27 Tom Tromey <tom@tromey.com>
4791
4792 * target-descriptions.c (unset_tdesc_filename_cmd)
4793 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4794 Constify.
4795
4796 2017-09-27 Tom Tromey <tom@tromey.com>
4797
4798 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4799
4800 2017-09-27 Tom Tromey <tom@tromey.com>
4801
4802 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4803
4804 2017-09-27 Tom Tromey <tom@tromey.com>
4805
4806 * tui/tui-regs.c (tui_reg_command): Constify.
4807
4808 2017-09-27 Tom Tromey <tom@tromey.com>
4809
4810 * skip.c (skip_file_command, skip_function_command)
4811 (skip_enable_command, skip_disable_command, skip_delete_command):
4812 Constify.
4813
4814 2017-09-27 Tom Tromey <tom@tromey.com>
4815
4816 * record-btrace.c (cmd_record_btrace_bts_start)
4817 (cmd_record_btrace_pt_start): Constify.
4818
4819 2017-09-27 Tom Tromey <tom@tromey.com>
4820
4821 * symmisc.c (maintenance_print_symbols)
4822 (maintenance_print_msymbols, maintenance_print_objfiles)
4823 (maintenance_info_symtabs, maintenance_check_symtabs)
4824 (maintenance_expand_symtabs, maintenance_info_line_tables):
4825 Constify.
4826
4827 2017-09-27 Tom Tromey <tom@tromey.com>
4828
4829 * top.c (new_ui_command): Constify.
4830
4831 2017-09-27 Tom Tromey <tom@tromey.com>
4832
4833 * symfile.c (add_symbol_file_command)
4834 (remove_symbol_file_command, list_overlays_command)
4835 (map_overlay_command, unmap_overlay_command)
4836 (overlay_auto_command, overlay_manual_command)
4837 (overlay_off_command, overlay_load_command): Constify.
4838
4839 2017-09-27 Tom Tromey <tom@tromey.com>
4840
4841 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4842 (info_spu_mailbox_command, info_spu_dma_command)
4843 (info_spu_proxydma_command): Constify.
4844
4845 2017-09-27 Tom Tromey <tom@tromey.com>
4846
4847 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4848
4849 2017-09-27 Tom Tromey <tom@tromey.com>
4850
4851 * cli/cli-script.c (user_defined_command): Constify.
4852
4853 2017-09-27 Tom Tromey <tom@tromey.com>
4854
4855 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4856 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4857 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4858 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4859 (dump_binary_value, append_binary_memory, append_binary_value):
4860 Constify.
4861 (struct dump_context) <func>: Constify.
4862 (add_dump_command): Update.
4863
4864 2017-09-27 Tom Tromey <tom@tromey.com>
4865
4866 * cli/cli-cmds.c (show_version, show_configuration)
4867 (source_command, show_user): Constify.
4868
4869 2017-09-27 Tom Tromey <tom@tromey.com>
4870
4871 * target.c (maintenance_print_target_stack): Constify.
4872
4873 2017-09-27 Tom Tromey <tom@tromey.com>
4874
4875 * interps.c (interpreter_exec_cmd): Constify.
4876
4877 2017-09-27 Tom Tromey <tom@tromey.com>
4878
4879 * record-full.c (cmd_record_full_restore): Constify.
4880
4881 2017-09-27 Tom Tromey <tom@tromey.com>
4882
4883 * memattr.c (enable_mem_command, disable_mem_command)
4884 (delete_mem_command): Constify.
4885
4886 2017-09-27 Tom Tromey <tom@tromey.com>
4887
4888 * value.c (show_convenience): Constify.
4889
4890 2017-09-27 Tom Tromey <tom@tromey.com>
4891
4892 * gdbcore.h (core_file_command): Update.
4893 * corefile.c (core_file_command): Constify.
4894
4895 2017-09-27 Tom Tromey <tom@tromey.com>
4896
4897 * user-regs.c (maintenance_print_user_registers): Constify.
4898
4899 2017-09-27 Tom Tromey <tom@tromey.com>
4900
4901 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4902
4903 2017-09-27 Tom Tromey <tom@tromey.com>
4904
4905 * cp-support.c (first_component_command): Constify.
4906
4907 2017-09-27 Tom Tromey <tom@tromey.com>
4908
4909 * psymtab.c (maintenance_print_psymbols)
4910 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4911 Constify.
4912
4913 2017-09-27 Tom Tromey <tom@tromey.com>
4914
4915 * windows-tdep.c (display_tib): Constify.
4916
4917 2017-09-27 Tom Tromey <tom@tromey.com>
4918
4919 * linux-fork.c (delete_checkpoint_command)
4920 (detach_checkpoint_command): Constify.
4921
4922 2017-09-27 Tom Tromey <tom@tromey.com>
4923
4924 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4925
4926 2017-09-27 Tom Tromey <tom@tromey.com>
4927
4928 * arc-tdep.c (dump_arc_instruction_command): Constify.
4929
4930 2017-09-27 Tom Tromey <tom@tromey.com>
4931
4932 * valprint.c (set_radix, show_radix): Constify.
4933
4934 2017-09-27 Tom Tromey <tom@tromey.com>
4935
4936 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4937
4938 2017-09-27 Tom Tromey <tom@tromey.com>
4939
4940 * command.h (not_just_help_class_command): Update.
4941 * cli/cli-decode.h (not_just_help_class_command): Update.
4942 * cli/cli-decode.c (not_just_help_class_command): Constify.
4943
4944 2017-09-27 Tom Tromey <tom@tromey.com>
4945
4946 * gdb_bfd.c (maintenance_info_bfds): Constify.
4947
4948 2017-09-27 Tom Tromey <tom@tromey.com>
4949
4950 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4951 overloads.
4952 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4953 (do_const_cfunc): New function.
4954 (cmd_cfunc_eq): New overload.
4955 (cli_user_command_p): Check do_const_cfunc.
4956 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4957 const_cfunc.
4958 * command.h (add_cmd): Add const overload and no-function
4959 overload.
4960 (set_cmd_cfunc): Add const overload.
4961 (cmd_const_cfunc_ftype): Declare.
4962 (cmd_cfunc_eq): Add const overload.
4963 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4964 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4965 overload.
4966
4967 2017-09-27 Tom Tromey <tom@tromey.com>
4968
4969 * macroexp.c (get_next_token_for_substitution): New function.
4970 (substitute_args): Call it. Check for __VA_OPT__.
4971
4972 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4973 Pedro Alves <palves@redhat.com>
4974
4975 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4976 producer_is_icc_lt_14.
4977 (producer_is_icc_lt_14): New function.
4978 (check_producer): Add code for checking version of ICC.
4979 (producer_is_icc): Move to producer.c.
4980 (read_structure_type): Restrict ICC workaround to ICC<14.
4981 * producer.c: Include selftest.h.
4982 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4983 New functions.
4984 * producer.h (producer_is_icc): New declaration.
4985
4986 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4987
4988 * Makefile.in (SFILES): Add producer.c.
4989 (COMMON_OBS): Add producer.o
4990 * amd64-tdep.c (producer.h): Add new include.
4991 * dwarf2read.c (producer.h): Add new include.
4992 * producer.c: New file.
4993 * producer.h: New file.
4994 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4995 producer.c.
4996 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4997 producer.h.
4998
4999 2017-09-26 Matthias Klose <doko@ubuntu.com>
5000
5001 * configure.ac: Search ncursesw before ncurses.
5002 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5003 * gdb_curses.h: Include <ncursesw/ncurses.h>
5004 * config.in, configure: Regenerate.
5005
5006 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5007
5008 PR gdb/22185
5009 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5010 obsolete.
5011 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5012 Remove i386sol2 support.
5013 * configure.nat <i386sol2>: Remove.
5014 <sol2-64>: Fold into ...
5015 <sol2>: ... this.
5016 Move common settings to default section.
5017 Add sol-thread.o.
5018 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5019 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5020 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5021 <i[34567]86-*-solaris*>: Remove.
5022 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5023
5024 * configure.ac: Remove wctype in libw check.
5025 (_MSE_INT_H): Don't define on Solaris 7-9.
5026 <solaris*>: Remove libthread_db.so.1 check.
5027 * configure: Regenerate.
5028 * config.in: Regenerate.
5029
5030 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5031 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5032 (gdb_ps_size_t): Remove.
5033 Use base types in users.
5034 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5035
5036 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5037
5038 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5039
5040 PR build/22206
5041 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5042 (adi_is_addr_mapped): Likewise.
5043 (PSR_ICC): Don't redefine.
5044 (PSR_IMPL): Likewise.
5045
5046 2017-09-25 Tom Tromey <tom@tromey.com>
5047
5048 * regcache.c (regcache::dump): Use string_printf.
5049
5050 2017-09-25 Tom Tromey <tom@tromey.com>
5051
5052 * regcache.c (class regcache_invalidator): New.
5053 (struct register_to_invalidate): Remove.
5054 (make_cleanup_regcache_invalidate): Remove.
5055 (regcache::raw_write): Use regcache_invalidator.
5056
5057 2017-09-25 Tom Tromey <tom@tromey.com>
5058
5059 * spu-tdep.c (spu2ppu_sniffer): Update.
5060 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5061 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5062 Remove.
5063 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5064 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5065 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5066 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5067 (frame_pop): Update.
5068
5069 2017-09-25 Tom Tromey <tom@tromey.com>
5070
5071 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5072 * regcache.h (regcache_xfree): Don't declare.
5073 * regcache.c (regcache_xfree): Remove.
5074 (do_regcache_xfree): Use delete.
5075 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5076 * linux-fork.c (free_fork): Use delete.
5077 (fork_save_infrun_state): Likewise.
5078 * jit.c (jit_dealloc_cache): Use delete.
5079 * infrun.c (discard_infcall_suspend_state): Use delete.
5080
5081 2017-09-25 Tom Tromey <tom@tromey.com>
5082
5083 * regcache.h (regcache_xmalloc): Don't declare.
5084 (regcache_raw_set_cached_value): Update comment.
5085 * regcache.c (regcache_xmalloc): Remove.
5086 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5087 * jit.c (jit_frame_sniffer): Use new.
5088 * frame.c (frame_save_as_regcache): Use new.
5089
5090 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5091
5092 * NEWS: Advertise support for guarded-storage registers on IBM z.
5093
5094 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5095
5096 * s390-linux-nat.c (have_regset_gs): New static variable.
5097 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5098 control block and guarded-storage broadcast control regsets.
5099 (s390_read_description): Detect whether the target has
5100 guarded-storage support, return appropriate tdesc.
5101 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5102 (features/s390x-gs-linux64.c): Likewise.
5103 (struct gdbarch_tdep) <have_gs>: New field.
5104 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5105 (s390_gsbc_regset): New variables.
5106 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5107 and s390_gsbc_regset, if applicable.
5108 (s390_core_read_description): Check whether core file was from a
5109 target with guarded-storage support; include appropriate regsets.
5110 (s390_gdbarch_init): Add registers for guarded-storage support.
5111 (_initialize_s390_tdep): Initialize new target descriptions that
5112 include registers for guarded-storage support.
5113 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5114 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5115 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5116 (S390_NUM_REGS): Adjust macro definition.
5117 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5118 (tdesc_s390x_gs_linux64): New declarations.
5119
5120 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5121
5122 * features/s390-gs-linux64.xml: New file.
5123 * features/s390-gs.xml: New file.
5124 * features/s390-gsbc.xml: New file.
5125 * features/s390x-gs-linux64.xml: New file.
5126 * features/Makefile (WHICH): Add s390-gs-linux64 and
5127 s390x-gs-linux64.
5128 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5129 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5130 * features/s390-gs-linux64.c: New generated file.
5131 * features/s390x-gs-linux64.c: New file.
5132 * regformats/s390-gs-linux64.dat: New file.
5133 * regformats/s390x-gs-linux64.dat: New file.
5134
5135 2017-09-23 Tom Tromey <tom@tromey.com>
5136
5137 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5138
5139 2017-09-22 Tom Tromey <tom@tromey.com>
5140
5141 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5142 type to scoped_restore_tmpl.
5143 <scoped_input_handler>: Initialize m_quit_handler directly.
5144
5145 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5146
5147 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5148 (cd_command): Likewise. Free "current_directory" before
5149 assigning to it.
5150 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5151 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5152 * top.c (gdb_dirbuf): Remove global declaration.
5153 * top.h (gdb_dirbuf): Likewise.
5154
5155 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5156
5157 * gnulib/aclocal.m4: Regenerate.
5158 * gnulib/config.in: Regenerate.
5159 * gnulib/configure: Regenerate.
5160 * gnulib/import/Makefile.am: Regenerate.
5161 * gnulib/import/Makefile.in: Regenerate.
5162 * gnulib/import/assure.h: New file.
5163 * gnulib/import/at-func.c: Likewise
5164 * gnulib/import/chdir-long.c: New file.
5165 * gnulib/import/chdir-long.h: New file.
5166 * gnulib/import/cloexec.c: New file.
5167 * gnulib/import/cloexec.h: New file.
5168 * gnulib/import/close.c: New file.
5169 * gnulib/import/closedir.c: New file.
5170 * gnulib/import/dirent-private.h: New file.
5171 * gnulib/import/dup-safer.c: New file.
5172 * gnulib/import/dup.c: New file.
5173 * gnulib/import/dup2.c: New file.
5174 * gnulib/import/error.c: New file.
5175 * gnulib/import/error.h: New file.
5176 * gnulib/import/exitfail.c: New file.
5177 * gnulib/import/exitfail.h: New file.
5178 * gnulib/import/fchdir.c: New file.
5179 * gnulib/import/fcntl.c: New file.
5180 * gnulib/import/fcntl.in.h: New file.
5181 * gnulib/import/fd-hook.c: New file.
5182 * gnulib/import/fd-hook.h: New file.
5183 * gnulib/import/fd-safer.c: New file.
5184 * gnulib/import/fdopendir.c: New file.
5185 * gnulib/import/filename.h: New file.
5186 * gnulib/import/filenamecat-lgpl.c: New file.
5187 * gnulib/import/filenamecat.h: New file.
5188 * gnulib/import/fstat.c: New file.
5189 * gnulib/import/fstatat.c: New file.
5190 * gnulib/import/getcwd-lgpl.c: New file.
5191 * gnulib/import/getcwd.c: New file.
5192 * gnulib/import/getdtablesize.c: New file.
5193 * gnulib/import/getlogin_r.c: New file.
5194 * gnulib/import/getprogname.c: New file.
5195 * gnulib/import/getprogname.h: New file.
5196 * gnulib/import/gettext.h: New file.
5197 * gnulib/import/glob-libc.h: New file.
5198 * gnulib/import/glob.c: New file.
5199 * gnulib/import/glob.in.h: New file.
5200 * gnulib/import/intprops.h: New file.
5201 * gnulib/import/m4/chdir-long.m4: New file.
5202 * gnulib/import/m4/close.m4: New file.
5203 * gnulib/import/m4/closedir.m4: New file.
5204 * gnulib/import/m4/d-ino.m4: New file.
5205 * gnulib/import/m4/d-type.m4: New file.
5206 * gnulib/import/m4/dup.m4: New file.
5207 * gnulib/import/m4/dup2.m4: New file.
5208 * gnulib/import/m4/error.m4: New file.
5209 * gnulib/import/m4/fchdir.m4: New file.
5210 * gnulib/import/m4/fcntl.m4: New file.
5211 * gnulib/import/m4/fcntl_h.m4: New file.
5212 * gnulib/import/m4/fdopendir.m4: New file.
5213 * gnulib/import/m4/filenamecat.m4: New file.
5214 * gnulib/import/m4/fstat.m4: New file.
5215 * gnulib/import/m4/fstatat.m4: New file.
5216 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5217 * gnulib/import/m4/getcwd-path-max.m4: New file.
5218 * gnulib/import/m4/getcwd.m4: New file.
5219 * gnulib/import/m4/getdtablesize.m4: New file.
5220 * gnulib/import/m4/getlogin_r.m4: New file.
5221 * gnulib/import/m4/getprogname.m4: New file.
5222 * gnulib/import/m4/glob.m4: New file.
5223 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5224 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5225 * gnulib/import/m4/mempcpy.m4: New file.
5226 * gnulib/import/m4/memrchr.m4: New file.
5227 * gnulib/import/m4/mode_t.m4: New file.
5228 * gnulib/import/m4/msvc-inval.m4: New file.
5229 * gnulib/import/m4/msvc-nothrow.m4: New file.
5230 * gnulib/import/m4/open.m4: New file.
5231 * gnulib/import/m4/openat.m4: New file.
5232 * gnulib/import/m4/opendir.m4: New file.
5233 * gnulib/import/m4/readdir.m4: New file.
5234 * gnulib/import/m4/realloc.m4: New file.
5235 * gnulib/import/m4/rewinddir.m4: New file.
5236 * gnulib/import/m4/save-cwd.m4: New file.
5237 * gnulib/import/m4/strdup.m4: New file.
5238 * gnulib/import/m4/strerror.m4: New file.
5239 * gnulib/import/m4/unistd-safer.m4: New file.
5240 * gnulib/import/mempcpy.c: New file.
5241 * gnulib/import/memrchr.c: New file.
5242 * gnulib/import/msvc-inval.c: New file.
5243 * gnulib/import/msvc-inval.h: New file.
5244 * gnulib/import/msvc-nothrow.c: New file.
5245 * gnulib/import/msvc-nothrow.h: New file.
5246 * gnulib/import/open.c: New file.
5247 * gnulib/import/openat-die.c: New file.
5248 * gnulib/import/openat-priv.h: New file.
5249 * gnulib/import/openat-proc.c: New file.
5250 * gnulib/import/openat.c: New file.
5251 * gnulib/import/openat.h: New file.
5252 * gnulib/import/opendir.c: New file.
5253 * gnulib/import/pipe-safer.c: New file.
5254 * gnulib/import/readdir.c: New file.
5255 * gnulib/import/realloc.c: New file.
5256 * gnulib/import/rewinddir.c: New file.
5257 * gnulib/import/save-cwd.c: New file.
5258 * gnulib/import/save-cwd.h: New file.
5259 * gnulib/import/strdup.c: New file.
5260 * gnulib/import/strerror-override.c: New file.
5261 * gnulib/import/strerror-override.h: New file.
5262 * gnulib/import/strerror.c: New file.
5263 * gnulib/import/unistd--.h: New file.
5264 * gnulib/import/unistd-safer.h: New file.
5265 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5266 "getcwd" and "glob".
5267 * ser-tcp.c: Undefine "close" before redefining it.
5268
5269 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5270
5271 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5272 get rid of res_val.
5273
5274 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5275
5276 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5277 <sol2,sparc>: Likewise.
5278 <sol2-64,i386>: Likewise.
5279
5280 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5281 -Wdeprecated-declarations on *-*-solaris*.
5282 * configure: Regenerate.
5283
5284 * procfs.c: Include "nat/inferior.h".
5285 (procfs_info_proc): Fix typo.
5286
5287 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5288
5289 * remote.c (vector): Include.
5290 (struct private_thread_info): Add field, thread_handle.
5291 (free_private_thread_info): Deallocate storage associated with
5292 thread handle.
5293 (get_private_info_thread): Initialize `thread_handle' field.
5294 (struct thread_item): Add field, thread_handle.
5295 (clear_threads_listing_context): Deallocate storage associated
5296 with thread handle.
5297 (start_thread): Add support for "handle" attribute.
5298 (thread_attributes): Add "handle".
5299 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5300 field.
5301 (remote_update_thread_list): Update thread_handle.
5302 (remote_thread_handle_to_thread_info): New function.
5303 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5304
5305 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5306
5307 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5308 function.
5309 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5310 * python/python-internal.h (thread_object_type): Declare.
5311
5312 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5313
5314 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5315 (target_thread_handle_to_thread_info): Declare.
5316 * target.c (target_thread_handle_to_thread_info): New function.
5317 * target-delegates.c: Regenerate.
5318 * gdbthread.h (find_thread_by_handle): Declare.
5319 * thread.c (find_thread_by_handle): New function.
5320 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5321 function.
5322 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5323
5324 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5325
5326 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5327
5328 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5329
5330 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5331
5332 2017-09-21 Yao Qi <yao.qi@linaro.org>
5333
5334 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5335 to gdb_target_obs.
5336
5337 2017-09-20 Tom Tromey <tom@tromey.com>
5338
5339 * breakpoint.c (struct counted_command_line): Remove.
5340 (breakpoint_commands): Update.
5341 (alloc_counted_command_line, incref_counted_command_line)
5342 (decref_counted_command_line, do_cleanup_counted_command_line)
5343 (make_cleanup_decref_counted_command_line): Remove.
5344 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5345 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5346 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5347 (save_breakpoints): Update.
5348 * breakpoint.h (counted_command_line): Now a typedef to
5349 shared_ptr.
5350 (struct breakpoint) <commands>: Now a counted_command_line.
5351 (struct bpstats) <command>: Likewise.
5352
5353 2017-09-20 Tom Tromey <tom@tromey.com>
5354
5355 * breakpoint.c (struct commands_info, do_map_commands_command):
5356 Remove.
5357 (commands_command_1): Update.
5358 (iterate_over_related_breakpoints): Take a function_view.
5359 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5360 (delete_command): Update.
5361 (map_breakpoint_numbers): Take a function_view.
5362 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5363 (disable_command): Update.
5364 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5365 (enable_command): Update.
5366 (struct disp_data, do_enable_breakpoint_disp)
5367 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5368 (do_map_enable_delete_breakpoint): Remove.
5369 (enable_once_command, enable_count_command, enable_delete_command)
5370 (delete_trace_variable_command): Update.
5371
5372 2017-09-20 Tom Tromey <tom@tromey.com>
5373
5374 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5375 (bpstat_clear): Use delete.
5376 (bpstats): New constructors.
5377 (bpstat_copy, bpstat_stop_status): Use new.
5378 (dprintf_after_condition_true): Update.
5379 * breakpoint.h (bpstats::bpstats): Add constructors.
5380 (bpstats::~bpstats): Add destructor.
5381
5382 2017-09-20 Pedro Alves <palves@redhat.com>
5383
5384 * eval.c (make_params): Delete, refactored as ...
5385 (class fake_method): ... this new type's ctor.
5386 (fake_method::~fake_method): New.
5387 (evaluate_subexp_standard): Use 'fake_method'.
5388
5389 2017-09-20 Tom Tromey <tom@tromey.com>
5390
5391 * windows-nat.c (get_windows_debug_event, windows_wait)
5392 (do_initial_windows_stuff, windows_attach): Update.
5393 * utils.c (vwarning, internal_vproblem): Update.
5394 (ui_unregister_input_event_handler_cleanup)
5395 (prepare_to_handle_input): Remove.
5396 (class scoped_input_handler): New.
5397 (defaulted_query, prompt_for_continue): Update.
5398 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5399 Update.
5400 * top.c (undo_terminal_modifications_before_exit): Update.
5401 * target/target.h (target_terminal_init, target_terminal_inferior)
5402 (target_terminal_ours): Don't declare.
5403 (class target_terminal): New.
5404 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5405 (target_terminal_ours_for_output)
5406 (make_cleanup_restore_target_terminal): Don't declare.
5407 (target_terminal_info): Remove.
5408 * target.c (enum terminal_state, terminal_state): Remove.
5409 (target_terminal::terminal_state): Define.
5410 (target_terminal::init): Rename from target_terminal_init.
5411 (target_terminal::inferior): Rename from
5412 target_terminal_inferior.
5413 (target_terminal::ours): Rename from target_terminal_ours.
5414 (target_terminal::ours_for_output): Rename from
5415 target_terminal_ours_for_output.
5416 (target_terminal::info): New method.
5417 (cleanup_restore_target_terminal)
5418 (make_cleanup_restore_target_terminal): Remove.
5419 * solib.c (handle_solib_event): Update.
5420 * remote.c (remote_serial_quit_handler): Update.
5421 (remote_terminal_inferior, remote_wait_as): Update.
5422 * record-full.c (record_full_wait_1): Update.
5423 * nto-procfs.c (procfs_create_inferior): Update.
5424 * nat/fork-inferior.c (startup_inferior): Update.
5425 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5426 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5427 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5428 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5429 (mi_breakpoint_created, mi_breakpoint_deleted)
5430 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5431 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5432 (mi_user_selected_context_changed, report_initial_inferior):
5433 Update.
5434 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5435 (linux_nat_terminal_inferior): Update.
5436 * infrun.c (follow_fork_inferior)
5437 (handle_vfork_child_exec_or_exit, do_target_resume)
5438 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5439 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5440 Update.
5441 * inflow.c (child_terminal_init, info_terminal_command): Update.
5442 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5443 (attach_command): Update.
5444 * infcall.c (call_thread_fsm_should_stop): Update.
5445 * gnu-nat.c (gnu_attach): Update.
5446 * extension.c (struct active_ext_lang_state)
5447 (restore_active_ext_lang): Update.
5448 * exceptions.c (print_flush): Update.
5449 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5450 (struct quit_handler_cleanup_data, restore_quit_handler)
5451 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5452 Remove.
5453 * cp-support.c (gdb_demangle): Update.
5454 * breakpoint.c (update_inserted_breakpoint_locations)
5455 (insert_breakpoint_locations, handle_jit_event)
5456 (disable_breakpoints_in_unloaded_shlib): Update.
5457 * annotate.c (annotate_breakpoints_invalid)
5458 (annotate_frames_invalid): Update.
5459
5460 2017-09-20 Tom Tromey <tom@tromey.com>
5461
5462 * main.c (catch_command_errors): Rename from
5463 catch_command_errors_const.
5464 (captured_main_1): Update.
5465
5466 2017-09-20 Pedro Alves <palves@redhat.com>
5467
5468 * cli/cli-cmds.c (list_command): Use print_sal_location.
5469 (print_sal_location): New function.
5470 (ambiguous_line_spec): Use print_sal_location.
5471 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5472 * symtab.c (find_function_start_sal): Likewise.
5473 * symtab.h (symtab_and_line::symbol): New field.
5474
5475 2017-09-20 Pedro Alves <palves@redhat.com>
5476
5477 * linespec.c (minsym_found): Handle non-text minsyms.
5478 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5479
5480 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5481
5482 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5483 backslash.
5484
5485 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5486
5487 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5488 vmovups instead vmovaps.
5489 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5490
5491 2017-09-19 John Baldwin <jhb@FreeBSD.org>
5492
5493 * NEWS (Changes since GDB 8.0): Add starti.
5494 * infcmd.c (enum run_break): New.
5495 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5496 case.
5497 (run_command): Use enum run_how.
5498 (start_command): Likewise.
5499 (starti_command): New function.
5500 (RUN_ARGS_HELP): New macro.
5501 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5502 commands. Add starti command.
5503
5504 2017-09-19 Yao Qi <yao.qi@linaro.org>
5505
5506 * Makefile.in (monitor.o): Remove the rule.
5507
5508 2017-09-19 Yao Qi <yao.qi@linaro.org>
5509
5510 * annotate.h (struct annotate_arg_emitter): Use
5511 DISABLE_COPY_AND_ASSIGN.
5512 * common/refcounted-object.h (refcounted_object): Likewise.
5513 * completer.h (struct completion_result): Likewise.
5514 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5515 * filename-seen-cache.h (filename_seen_cache): Likewise.
5516 * gdbcore.h (thread_section_name): Likewise.
5517 * gdb_regex.h (compiled_regex): Likewise.
5518 * gdbthread.h (scoped_restore_current_thread): Likewise.
5519 * inferior.h (scoped_restore_current_inferior): Likewise.
5520 * jit.c (jit_reader): Likewise.
5521 * linespec.h (struct linespec_result): Likewise.
5522 * mi/mi-parse.h (struct mi_parse): Likewise.
5523 * nat/fork-inferior.c (execv_argv): Likewise.
5524 * progspace.h (scoped_restore_current_program_space): Likewise.
5525 * python/python-internal.h (class gdbpy_enter): Likewise.
5526 * regcache.h (regcache): Likewise.
5527 * target-descriptions.c (struct tdesc_reg): Likewise.
5528 (struct tdesc_type): Likewise.
5529 (struct tdesc_feature): Likewise.
5530 * ui-out.h (ui_out_emit_type): Likewise.
5531
5532 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5533
5534 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5535 label abort_expression.
5536
5537 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5538
5539 * common/buffer.c (buffer_xml_printf): Adjust.
5540 * common/xml-utils.c (xml_escape_text): Change return type to
5541 std::string, update code accordingly.
5542 * common/xml-utils.h (xml_escape_text): Change return type to
5543 std::string.
5544 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5545 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5546 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5547 Adjust.
5548
5549 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5550
5551 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5552 (SUBDIR_UNITTESTS_OBS): Add new object file.
5553 * unittests/xml-utils-selftests.c: New file.
5554
5555 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5556
5557 * common/selftest.h (selftest): New struct/interface.
5558 (register_test): Add name parameter, add new overload.
5559 (run_tests): Add filter parameter.
5560 (for_each_selftest_ftype): New typedef.
5561 (for_each_selftest): New declaration.
5562 * common/selftest.c (tests): Change type to
5563 map<string, unique_ptr<selftest>>.
5564 (simple_selftest): New struct.
5565 (register_test): New function.
5566 (register_test): Add name parameter and use it.
5567 (run_tests): Add filter parameter and use it. Add prints.
5568 Adjust to vector -> map change.
5569 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5570 registering selftests.
5571 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5572 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5573 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5574 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5575 * findvar.c (_initialize_findvar): Likewise.
5576 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5577 * maint.c (maintenance_selftest): Update call to run_tests.
5578 (maintenance_info_selftests): New function.
5579 (_initialize_maint_cmds): Register "maintenance info selftests"
5580 command. Update "maintenance selftest" doc.
5581 * regcache.c (_initialize_regcache): Add names when registering
5582 selftests.
5583 * rust-exp.y (_initialize_rust_exp): Likewise.
5584 * selftest-arch.c (gdbarch_selftest): New struct.
5585 (gdbarch_tests): Remove.
5586 (register_test_foreach_arch): Add name parameter. Call
5587 register_test.
5588 (tests_with_arch): Remove, move most content to
5589 gdbarch_selftest::operator().
5590 (_initialize_selftests_foreach_arch): Remove.
5591 * selftest-arch.h (register_test_foreach_arch): Add name
5592 parameter.
5593 (run_tests_with_arch): New declaration.
5594 * utils-selftests.c (_initialize_utils_selftests): Add names
5595 when registering selftests.
5596 * utils.c (_initialize_utils): Likewise.
5597 * unittests/array-view-selftests.c
5598 (_initialize_array_view_selftests): Likewise.
5599 * unittests/environ-selftests.c (_initialize_environ_selftests):
5600 Likewise.
5601 * unittests/function-view-selftests.c
5602 (_initialize_function_view_selftests): Likewise.
5603 * unittests/offset-type-selftests.c
5604 (_initialize_offset_type_selftests): Likewise.
5605 * unittests/optional-selftests.c
5606 (_initialize_optional_selftests): Likewise.
5607 * unittests/scoped_restore-selftests.c
5608 (_initialize_scoped_restore_selftests): Likewise.
5609 * NEWS: Document "maintenance selftest" and "maint info
5610 selftests".
5611
5612 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5613
5614 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5615 scoped_restore.
5616
5617 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5618
5619 * mi/mi-main.c (mi_load_progress): Make uiout variable
5620 a unique_ptr.
5621
5622 2017-09-15 Pedro Alves <palves@redhat.com>
5623
5624 * compile/compile-c-types.c (convert_enum, convert_int)
5625 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5626
5627 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5628
5629 * dwarf2read.c (copy_string): Remove.
5630 (parse_macro_definition): Replace copy_string with savestring.
5631
5632 2017-09-15 Yao Qi <yao.qi@linaro.org>
5633
5634 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5635 gdb_target_obs.
5636 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5637 Likewise.
5638 (i[34567]86-*-linux*): Likewise.
5639
5640 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5641
5642 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5643 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5644 <stack>: Change type to std::vector.
5645 <stack_len, stack_allocated>: Remove.
5646 <grow_stack>: Remove.
5647 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5648 (dwarf_expr_context::~dwarf_expr_context): Remove.
5649 (dwarf_expr_context::grow_stack): Remove.
5650 (dwarf_expr_context::push): Adjust.
5651 (dwarf_expr_context::pop): Adjust.
5652 (dwarf_expr_context::fetch): Adjust.
5653 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5654 (dwarf_expr_context::stack_empty_p): Adjust.
5655 (dwarf_expr_context::execute_stack_op): Adjust.
5656
5657 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5658
5659 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5660 return type to bool.
5661 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5662
5663 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5664
5665 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5666 Change type to bool.
5667 (dwarf_stack_value) <in_stack_memory>: Likewise.
5668 (dwarf_expr_context) <push_address>: Change parameter type to
5669 bool.
5670 <fetch_in_stack_memory>: Change return type to bool.
5671 <push>: Change parameter type to bool.
5672 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5673 to bool.
5674 (dwarf_expr_context::push_address): Likewise.
5675 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5676 to bool.
5677 (dwarf_expr_context::execute_stack_op): Adjust.
5678 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5679
5680 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5681
5682 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5683 (struct dwarf_expr_context) <n_pieces>: Remove.
5684 <pieces>: Change type to std::vector.
5685 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5686 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5687 pieces.
5688 (dwarf_expr_context::add_piece): Adjust.
5689 * dwarf2loc.c (struct piece_closure): Initialize fields.
5690 <n_pieces>: Remove.
5691 <pieces>: Change type to std::vector.
5692 (allocate_piece_closure): Adjust, change parameter to
5693 std::vector rvalue and std::move it to piece_closure.
5694 (rw_pieced_value): Adjust.
5695 (check_pieced_synthetic_pointer): Adjust.
5696 (indirect_synthetic_pointer): Adjust.
5697 (coerce_pieced_ref): Adjust.
5698 (free_pieced_value_closure): Adjust. Use delete to free
5699 piece_closure.
5700 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5701 to allocate_piece_closure.
5702 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5703
5704 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * probe.h (probe_ops_cp): Remove typedef.
5707 (DEF_VEC_P (probe_ops_cp)): Remove.
5708 (all_probe_ops): Change type to std::vector.
5709 * probe.c (info_probes_for_ops): Adjust to vector change.
5710 (probe_linespec_to_ops): Likewise.
5711 (all_probe_ops): Change type to std::vector.
5712 (_initialize_probe): Adjust to vector change.
5713 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5714 * elfread.c (elf_get_probes): Likewise.
5715 * stap-probe.c (_initialize_stap_probe): Likewise.
5716
5717 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5718
5719 * probe.h (struct bound_probe): Define constructors.
5720 * probe.c (bound_probe_s): Remove typedef.
5721 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5722 (collect_probes): Change return type to std::vector, remove
5723 cleanup.
5724 (compare_probes): Return bool, change parameter type. Change
5725 semantic to "less than".
5726 (gen_ui_out_table_header_info): Change parameter to std::vector
5727 and update.
5728 (exists_probe_with_pops): Likewise.
5729 (info_probes_for_ops): Update to std::vector change.
5730 (enable_probes_command): Likewise.
5731 (disable_probes_command): Likewise.
5732
5733 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5734
5735 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5736 vec to std::vector.
5737 * probe.c (parse_probes_in_pspace): Update.
5738 (find_probes_in_objfile): Update.
5739 (find_probe_by_pc): Update.
5740 (collect_probes): Update.
5741 (probe_any_get_probes): Update.
5742 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5743 return type to reference to std::vector.
5744 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5745 std::vector and update.
5746 (dtrace_process_dof): Likewise.
5747 (dtrace_get_probes): Likewise.
5748 * elfread.c (elf_get_probes): Change return type to std::vector,
5749 store an std::vector in bfd_data.
5750 (probe_key_free): Update to std::vector.
5751 * stap-probe.c (handle_stap_probe): Change parameter to
5752 std::vector and update.
5753 (stap_get_probes): Likewise.
5754 * symfile-debug.c (debug_sym_get_probes): Change return type to
5755 std::vector and update.
5756
5757 2017-09-11 Tom Tromey <tom@tromey.com>
5758
5759 * breakpoint.c (program_breakpoint_here_p): Update.
5760 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5761 from make_show_memory_breakpoints_cleanup. Return a
5762 scoped_restore_tmpl<int>.
5763 (restore_show_memory_breakpoints): Remove.
5764 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5765 * mem-break.c (memory_validate_breakpoint): Update.
5766 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5767 (ia64_memory_remove_breakpoint): Update.
5768 (ia64_breakpoint_from_pc): Update.
5769 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5770 from make_show_memory_breakpoints_cleanup.
5771
5772 2017-09-11 Tom Tromey <tom@tromey.com>
5773
5774 * d-namespace.c (d_lookup_symbol): Use std::string.
5775 (find_symbol_in_baseclass): Likewise.
5776
5777 2017-09-11 Tom Tromey <tom@tromey.com>
5778
5779 * ctf.c (ctf_start): Use std::string.
5780
5781 2017-09-11 Tom Tromey <tom@tromey.com>
5782
5783 * ada-lang.c (is_known_support_routine): Update.
5784 (ada_unhandled_exception_name_addr_from_raise): Update.
5785 * guile/scm-frame.c (gdbscm_frame_name): Update.
5786 * python/py-frame.c (frapy_name): Update.
5787 (frapy_function): Update.
5788 * stack.h (find_frame_funname): Update.
5789 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5790 (print_frame): Update.
5791
5792 2017-09-11 Tom Tromey <tom@tromey.com>
5793
5794 * findcmd.c (put_bits): Take a gdb::byte_vector.
5795 (parse_find_args): Return gdb::byte_vector. "args" now const.
5796 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5797 cleanups.
5798 (find_command): Update.
5799
5800 2017-09-11 Tom Tromey <tom@tromey.com>
5801
5802 * cli/cli-script.c (class scoped_restore_hook_in): New.
5803 (clear_hook_in_cleanup): Remove.
5804 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5805 scoped_restore_hook_in.
5806
5807 2017-09-11 Tom Tromey <tom@tromey.com>
5808
5809 * cli/cli-script.c (restore_interp): Remove.
5810 (read_command_lines): Use scoped_restore_interp.
5811 * interps.c (scoped_restore_interp::set_temp): Rename from
5812 interp_set_temp.
5813 * interps.h (class scoped_restore_interp): New.
5814 (interp_set_temp): Remove.
5815
5816 2017-09-11 Tom Tromey <tom@tromey.com>
5817
5818 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5819 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5820 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5821 scoped_restore.
5822 (mi_cmd_break_insert_1): Update.
5823 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5824 scoped_restore.
5825
5826 2017-09-11 Tom Tromey <tom@tromey.com>
5827
5828 * demangle.c (demangle_command): Update.
5829 * breakpoint.c (disable_command): Update.
5830 (enable_command): Update.
5831 (find_location_by_number): Make "number" const. Use
5832 get_number_trailer.
5833 * cli/cli-utils.c (extract_arg): Return std::string.
5834 * probe.c (parse_probe_linespec): Update. Change types.
5835 (collect_probes): Take string arguments.
5836 (parse_probe_linespec): Likewise.
5837 (info_probes_for_ops): Update.
5838 (enable_probes_command): Update.
5839 (disable_probes_command): Update.
5840 * break-catch-sig.c (catch_signal_split_args): Update.
5841 * mi/mi-parse.c (mi_parse): Update.
5842
5843 2017-09-11 Tom Tromey <tom@tromey.com>
5844
5845 * language.h (language_enum): Make argument const.
5846 * language.c (language_enum): Make argument const.
5847
5848 2017-09-11 Tom Tromey <tom@tromey.com>
5849
5850 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5851 as function.
5852 (skip_to_space): Rename from skip_to_space_const.
5853 * common/common-utils.c (skip_to_space): New function.
5854 (skip_to_space): Rename from skip_to_space_const.
5855 * cli/cli-utils.h (get_number): Rename from get_number_const.
5856 (extract_arg): Rename from extract_arg_const.
5857 * cli/cli-utils.c (get_number): Rename from get_number_const.
5858 (extract_arg): Rename from extract_arg_const.
5859 (number_or_range_parser::get_number): Use ::get_number.
5860 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5861 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5862 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5863 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5864 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5865 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5866 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5867 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5868
5869 2017-09-11 Tom Tromey <tom@tromey.com>
5870
5871 * python/python.c (do_start_initialization): Use
5872 py-event-types.def to initialize types.
5873 Define all object type structures.
5874 * python/python-internal.h: Don't declare event initialization
5875 functions.
5876 * python/py-threadevent.c (thread_event_object_type): Don't
5877 define.
5878 * python/py-stopevent.c (stop_event_object_type): Don't define.
5879 * python/py-signalevent.c (signal_event_object_type): Don't
5880 declare or define.
5881 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5882 (clear_objfiles_event_object_type): Don't declare or define.
5883 * python/py-infevents.c (inferior_call_pre_event_object_type)
5884 (inferior_call_post_event_object_type)
5885 (register_changed_event_object_type)
5886 (memory_changed_event_object_type): Don't declare or define.
5887 * python/py-inferior.c (new_thread_event_object_type)
5888 (new_inferior_event_object_type)
5889 (inferior_deleted_event_object_type): Don't declare or define.
5890 * python/py-exitedevent.c (exited_event_object_type): Don't
5891 declare or define.
5892 * python/py-evts.c (gdbpy_initialize_py_events): Use
5893 py-all-events.def.
5894 * python/py-events.h (thread_event_object_type): Don't declare.
5895 (events_object): Use py-all-events.def.
5896 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5897 py-event-types.def.
5898 * python/py-event-types.def: New file.
5899 * python/py-continueevent.c (create_continue_event_object): Don't
5900 declare or define.
5901 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5902 declare or define.
5903 * python/py-all-events.def: New file.
5904
5905 2017-09-11 Tom Tromey <tom@tromey.com>
5906
5907 * python/py-threadevent.c (create_thread_event_object): Return
5908 gdbpy_ref.
5909 * python/py-stopevent.h (create_stop_event_object)
5910 (create_breakpoint_event_object, create_signal_event_object):
5911 Update.
5912 * python/py-stopevent.c (create_stop_event_object): Return
5913 gdbpy_ref.
5914 (emit_stop_event): Update.
5915 * python/py-signalevent.c (create_signal_event_object): Return
5916 gdbpy_ref.
5917 * python/py-infevents.c (create_inferior_call_event_object):
5918 Update.
5919 * python/py-event.h (create_event_object)
5920 (create_thread_event_object): Update.
5921 * python/py-event.c (create_event_object): Return gdbpy_ref.
5922 * python/py-continueevent.c: Return gdbpy_ref.
5923 * python/py-bpevent.c (create_breakpoint_event_object): Return
5924 gdbpy_ref.
5925
5926 2017-09-11 Tom Tromey <tom@tromey.com>
5927
5928 PR python/15622:
5929 * NEWS: Add entry.
5930 * python/python.c (do_start_initialization): Initialize new event
5931 types.
5932 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5933 (gdbpy_initialize_inferior_deleted_event)
5934 (gdbpy_initialize_new_thread_event): Declare.
5935 * python/py-threadevent.c (create_thread_event_object): Add option
5936 "thread" parameter.
5937 * python/py-inferior.c (new_thread_event_object_type)
5938 (new_inferior_event_object_type)
5939 (inferior_deleted_event_object_type): Declare.
5940 (python_new_inferior, python_inferior_deleted): New functions.
5941 (add_thread_object): Emit new_thread event.
5942 (gdbpy_initialize_inferior): Attach new functions to corresponding
5943 observers.
5944 (new_thread, new_inferior, inferior_deleted): Define new event
5945 types.
5946 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5947 registries.
5948 * python/py-events.h (events_object) <new_inferior,
5949 inferior_deleted, new_thread>: New fields.
5950 * python/py-event.h (create_thread_event_breakpoint): Add optional
5951 "thread" parameter.
5952
5953 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5954
5955 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5956 check current_ui instead.
5957 (internal_vproblem): Likewise.
5958
5959 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5960
5961 * thread.c (print_thread_info_1): Remove unnecessary calls to
5962 uiout->is_mi_like_p.
5963
5964 2017-09-09 Tom Tromey <tom@tromey.com>
5965
5966 * namespace.h (add_using_directive): Update.
5967 * namespace.c (add_using_directive): Change type of excludes to
5968 std::vector.
5969 * dwarf2read.c (read_import_statement): Use std::vector.
5970 (read_namespace): Update.
5971 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5972
5973 2017-09-09 Tom Tromey <tom@tromey.com>
5974
5975 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5976
5977 2017-09-09 Tom Tromey <tom@tromey.com>
5978
5979 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5980
5981 2017-09-09 Tom Tromey <tom@tromey.com>
5982
5983 * stack.c (func_command): Use gdb::def_vector.
5984
5985 2017-09-09 Tom Tromey <tom@tromey.com>
5986
5987 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5988 ui_out_emit_list, ui_out_emit_tuple.
5989 (mi_cmd_var_update): Likewise.
5990
5991 2017-09-09 Tom Tromey <tom@tromey.com>
5992
5993 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5994 ui_out_redirect_pop.
5995 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5996 ui_out_redirect_pop.
5997 * utils.c (do_ui_out_redirect_pop)
5998 (make_cleanup_ui_out_redirect_pop): Remove.
5999 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6000 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6001 * ui-out.h (ui_out_redirect_pop): New class.
6002
6003 2017-09-09 Tom Tromey <tom@tromey.com>
6004
6005 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6006 (list_available_thread_groups, mi_cmd_list_thread_groups)
6007 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6008 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6009 Likewise.
6010
6011 2017-09-09 Tom Tromey <tom@tromey.com>
6012
6013 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6014 ui_out_emit_tuple.
6015
6016 2017-09-09 Tom Tromey <tom@tromey.com>
6017
6018 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6019 * stack.c (print_frame): Use ui_out_emit_tuple.
6020 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6021 (info_spu_mailbox_command, info_spu_dma_command)
6022 (info_spu_proxydma_command): Likewise.
6023 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6024 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6025 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6026 ui_out_emit_tuple.
6027 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6028
6029 2017-09-09 Tom Tromey <tom@tromey.com>
6030
6031 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6032 (class ui_out_emit_table): Update comment.
6033 * ui-out.c (do_cleanup_table_end)
6034 (make_cleanup_ui_out_table_begin_end): Remove.
6035 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6036 (info_spu_dma_cmdlist): Likewise.
6037 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6038 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6039 ui_out_emit_table.
6040
6041 2017-09-09 Tom Tromey <tom@tromey.com>
6042
6043 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6044 ui_out_emit_list, gdb::optional.
6045
6046 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6047
6048 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6049 prototype.
6050 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6051 prototype.
6052 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6053 prototype.
6054 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6055 * ada-exp.y: Remove _initialize_ada_exp prototype.
6056 * ada-lang.c: Remove _initialize_ada_language prototype.
6057 * ada-tasks.c: Remove _initialize_tasks prototype.
6058 * addrmap.c: Remove _initialize_addrmap prototype.
6059 * agent.c: Remove _initialize_agent prototype.
6060 * aix-thread.c: Remove _initialize_aix_thread prototype.
6061 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6062 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6063 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6064 prototype.
6065 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6066 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6067 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6068 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6069 prototype.
6070 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6071 prototype.
6072 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6073 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6074 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6075 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6076 prototype.
6077 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6078 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6079 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6080 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6081 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6082 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6083 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6084 prototype.
6085 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6086 prototype.
6087 * annotate.c: Remove _initialize_annotate prototype.
6088 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6089 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6090 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6091 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6092 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6093 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6094 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6095 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6096 prototype.
6097 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6098 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6099 * auto-load.c: Remove _initialize_auto_load prototype.
6100 * auxv.c: Remove _initialize_auxv prototype.
6101 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6102 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6103 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6104 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6105 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6106 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6107 prototype.
6108 * break-catch-throw.c: Remove _initialize_break_catch_throw
6109 prototype.
6110 * breakpoint.c: Remove _initialize_breakpoint prototype.
6111 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6112 * btrace.c: Remove _initialize_btrace prototype.
6113 * charset.c: Remove _initialize_charset prototype.
6114 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6115 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6116 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6117 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6118 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6119 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6120 * coffread.c: Remove _initialize_coffread prototype.
6121 * compile/compile.c: Remove _initialize_compile prototype.
6122 * complaints.c: Remove _initialize_complaints prototype.
6123 * completer.c: Remove _initialize_completer prototype.
6124 * copying.awk: Remove _initialize_copying prototype.
6125 * copying.c: Regenerate.
6126 * core-regset.c: Remove _initialize_core_regset prototype.
6127 * corefile.c: Remove _initialize_core prototype.
6128 * corelow.c: Remove _initialize_corelow prototype.
6129 * cp-abi.c: Remove _initialize_cp_abi prototype.
6130 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6131 * cp-support.c: Remove _initialize_cp_support prototype.
6132 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6133 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6134 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6135 * ctf.c: Remove _initialize_ctf prototype.
6136 * d-lang.c: Remove _initialize_d_language prototype.
6137 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6138 prototype.
6139 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6140 * dbxread.c: Remove _initialize_dbxread prototype.
6141 * dcache.c: Remove _initialize_dcache prototype.
6142 * demangle.c: Remove _initialize_demangler prototype.
6143 * disasm-selftests.c: Remove _initialize_disasm_selftests
6144 prototype.
6145 * disasm.c: Remove _initialize_disasm prototype.
6146 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6147 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6148 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6149 prototype.
6150 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6151 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6152 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6153 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6154 * elfread.c: Remove _initialize_elfread prototype.
6155 * exec.c: Remove _initialize_exec prototype.
6156 * extension.c: Remove _initialize_extension prototype.
6157 * f-lang.c: Remove _initialize_f_language prototype.
6158 * f-valprint.c: Remove _initialize_f_valprint prototype.
6159 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6160 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6161 * filesystem.c: Remove _initialize_filesystem prototype.
6162 * findcmd.c: Remove _initialize_mem_search prototype.
6163 * fork-child.c: Remove _initialize_fork_child prototype.
6164 * frame-base.c: Remove _initialize_frame_base prototype.
6165 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6166 * frame.c: Remove _initialize_frame prototype.
6167 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6168 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6169 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6170 * gcore.c: Remove _initialize_gcore prototype.
6171 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6172 * gdbarch.c: Regenerate.
6173 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6174 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6175 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6176 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6177 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6178 * go-lang.c: Remove _initialize_go_language prototype.
6179 * go32-nat.c: Remove _initialize_go32_nat prototype.
6180 * guile/guile.c: Remove _initialize_guile prototype.
6181 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6182 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6183 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6184 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6185 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6186 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6187 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6188 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6189 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6190 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6191 prototype.
6192 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6193 prototype.
6194 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6195 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6196 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6197 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6198 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6199 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6200 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6201 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6202 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6203 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6204 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6205 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6206 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6207 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6208 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6209 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6210 prototype.
6211 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6212 prototype.
6213 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6214 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6215 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6216 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6217 * infcall.c: Remove _initialize_infcall prototype.
6218 * infcmd.c: Remove _initialize_infcmd prototype.
6219 * inferior.c: Remove _initialize_inferiors prototype.
6220 * inflow.c: Remove _initialize_inflow prototype.
6221 * infrun.c: Remove _initialize_infrun prototype.
6222 * interps.c: Remove _initialize_interpreter prototype.
6223 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6224 * jit.c: Remove _initialize_jit prototype.
6225 * language.c: Remove _initialize_language prototype.
6226 * linux-fork.c: Remove _initialize_linux_fork prototype.
6227 * linux-nat.c: Remove _initialize_linux_nat prototype.
6228 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6229 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6230 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6231 * m2-lang.c: Remove _initialize_m2_language prototype.
6232 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6233 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6234 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6235 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6236 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6237 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6238 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6239 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6240 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6241 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6242 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6243 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6244 * machoread.c: Remove _initialize_machoread prototype.
6245 * macrocmd.c: Remove _initialize_macrocmd prototype.
6246 * macroscope.c: Remove _initialize_macroscope prototype.
6247 * maint.c: Remove _initialize_maint_cmds prototype.
6248 * mdebugread.c: Remove _initialize_mdebugread prototype.
6249 * memattr.c: Remove _initialize_mem prototype.
6250 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6251 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6252 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6253 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6254 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6255 * microblaze-linux-tdep.c: Remove
6256 _initialize_microblaze_linux_tdep prototype.
6257 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6258 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6259 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6260 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6261 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6262 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6263 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6264 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6265 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6266 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6267 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6268 prototype.
6269 * mipsread.c: Remove _initialize_mipsread prototype.
6270 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6271 prototype.
6272 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6273 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6274 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6275 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6276 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6277 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6278 prototype.
6279 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6280 * nto-procfs.c: Remove _initialize_procfs prototype.
6281 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6282 * objc-lang.c: Remove _initialize_objc_language prototype.
6283 * objfiles.c: Remove _initialize_objfiles prototype.
6284 * observer.c: Remove observer_test_first_notification_function,
6285 observer_test_second_notification_function,
6286 observer_test_third_notification_function, and
6287 _initialize_observer prototypes.
6288 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6289 * osabi.c: Remove _initialize_gdb_osabi prototype.
6290 * osdata.c: Remove _initialize_osdata prototype.
6291 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6292 * parse.c: Remove _initialize_parse prototype.
6293 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6294 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6295 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6296 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6297 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6298 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6299 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6300 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6301 * printcmd.c: Remove _initialize_printcmd prototype.
6302 * probe.c: Remove _initialize_probe prototype.
6303 * proc-api.c: Remove _initialize_proc_api prototype.
6304 * proc-events.c: Remove _initialize_proc_events prototype.
6305 * proc-service.c: Remove _initialize_proc_service prototype.
6306 * procfs.c: Remove _initialize_procfs prototype.
6307 * psymtab.c: Remove _initialize_psymtab prototype.
6308 * python/python.c: Remove _initialize_python prototype.
6309 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6310 * record-btrace.c: Remove _initialize_record_btrace prototype.
6311 * record-full.c: Remove _initialize_record_full prototype.
6312 * record.c: Remove _initialize_record prototype.
6313 * regcache.c: Remove _initialize_regcache prototype.
6314 * reggroups.c: Remove _initialize_reggroup prototype.
6315 * remote-notif.c: Remove _initialize_notif prototype.
6316 * remote-sim.c: Remove _initialize_remote_sim prototype.
6317 * remote.c: Remove _initialize_remote prototype.
6318 * reverse.c: Remove _initialize_reverse prototype.
6319 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6320 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6321 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6322 prototype.
6323 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6324 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6325 * rust-exp.y: Remove _initialize_rust_exp prototype.
6326 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6327 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6328 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6329 * score-tdep.c: Remove _initialize_score_tdep prototype.
6330 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6331 prototype.
6332 * ser-go32.c: Remove _initialize_ser_dos prototype.
6333 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6334 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6335 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6336 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6337 * serial.c: Remove _initialize_serial prototype.
6338 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6339 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6340 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6341 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6342 * skip.c: Remove _initialize_step_skip prototype.
6343 * sol-thread.c: Remove _initialize_sol_thread prototype.
6344 * solib-aix.c: Remove _initialize_solib_aix prototype.
6345 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6346 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6347 * solib-frv.c: Remove _initialize_frv_solib prototype.
6348 * solib-spu.c: Remove _initialize_spu_solib prototype.
6349 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6350 * solib-target.c: Remove _initialize_solib_target prototype.
6351 * solib.c: Remove _initialize_solib prototype.
6352 * source.c: Remove _initialize_source prototype.
6353 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6354 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6355 prototype.
6356 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6357 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6358 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6359 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6360 prototype.
6361 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6362 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6363 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6364 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6365 prototype.
6366 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6367 prototype.
6368 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6369 prototype.
6370 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6371 prototype.
6372 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6373 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6374 prototype.
6375 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6376 prototype.
6377 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6378 prototype.
6379 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6380 prototype.
6381 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6382 prototype.
6383 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6384 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6385 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6386 * stabsread.c: Remove _initialize_stabsread prototype.
6387 * stack.c: Remove _initialize_stack prototype.
6388 * stap-probe.c: Remove _initialize_stap_probe prototype.
6389 * std-regs.c: Remove _initialize_frame_reg prototype.
6390 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6391 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6392 * symfile.c: Remove _initialize_symfile prototype.
6393 * symmisc.c: Remove _initialize_symmisc prototype.
6394 * symtab.c: Remove _initialize_symtab prototype.
6395 * target-dcache.c: Remove _initialize_target_dcache prototype.
6396 * target-descriptions.c: Remove _initialize_target_descriptions
6397 prototype.
6398 * thread.c: Remove _initialize_thread prototype.
6399 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6400 prototype.
6401 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6402 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6403 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6404 prototype.
6405 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6406 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6407 * tracefile.c: Remove _initialize_tracefile prototype.
6408 * tracepoint.c: Remove _initialize_tracepoint prototype.
6409 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6410 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6411 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6412 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6413 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6414 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6415 * tui/tui.c: Remove _initialize_tui prototype.
6416 * typeprint.c: Remove _initialize_typeprint prototype.
6417 * user-regs.c: Remove _initialize_user_regs prototype.
6418 * utils.c: Remove _initialize_utils prototype.
6419 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6420 * valarith.c: Remove _initialize_valarith prototype.
6421 * valops.c: Remove _initialize_valops prototype.
6422 * valprint.c: Remove _initialize_valprint prototype.
6423 * value.c: Remove _initialize_values prototype.
6424 * varobj.c: Remove _initialize_varobj prototype.
6425 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6426 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6427 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6428 * windows-nat.c: Remove _initialize_windows_nat,
6429 _initialize_check_for_gdb_ini, and _initialize_loadable
6430 prototypes.
6431 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6432 * xcoffread.c: Remove _initialize_xcoffread prototype.
6433 * xml-support.c: Remove _initialize_xml_support prototype.
6434 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6435 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6436 prototype.
6437 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6438 prototype.
6439 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6440
6441 2017-09-08 Keith Seitz <keiths@redhat.com>
6442
6443 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6444 field.
6445
6446 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6447
6448 * f-valprint.c (f_val_print): Remove check for one byte
6449 sized integers. Remove printing of character type.
6450
6451 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6452 Christoph Weinmann <christoph.t.weinmann@intel.com>
6453 Bernhard Heckel <bernhard.heckel@intel.com>
6454
6455 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6456 to maintain proper indentation when printing pointers/refs.
6457
6458 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6459
6460 GDB 8.0.1 released.
6461
6462 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6463
6464 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6465
6466 2017-09-05 Tom Tromey <tom@tromey.com>
6467
6468 * parse.c (funcall_chain): Now a std::vector.
6469 (start_arglist, end_arglist): Simplify.
6470 (free_funcalls): Remove.
6471 (parse_exp_in_context_1): Remove cleanup.
6472
6473 2017-09-05 Tom Tromey <tom@tromey.com>
6474
6475 * go-exp.y (go_parse): Don't create a cleanup.
6476
6477 2017-09-05 Tom Tromey <tom@tromey.com>
6478
6479 * d-exp.y (PrimaryExpression): Use std::string.
6480 (d_parse): Don't create a cleanup.
6481
6482 2017-09-05 Tom Tromey <tom@tromey.com>
6483
6484 * utils.c (do_clear_parser_state): Remove.
6485 (make_cleanup_clear_parser_state): Remove.
6486 * p-exp.y (pascal_parse): Use scoped_restore.
6487 * m2-exp.y (m2_parse): Use scoped_restore.
6488 * f-exp.y (f_parse): Use scoped_restore.
6489 * d-exp.y (d_parse): Use scoped_restore.
6490 * c-exp.y (c_parse): Use scoped_restore.
6491 * ada-exp.y (ada_parse): Use scoped_restore.
6492 * utils.h (make_cleanup_clear_parser_state): Remove.
6493
6494 2017-09-06 Keith Seitz <keiths@redhat.com>
6495
6496 * dwarf2read.c (dw2_linkage_name_attr): New function.
6497 (dw2_linkage_name): New function.
6498 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6499 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6500 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6501
6502 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6503
6504 * config/djgpp/djconfig.sh: Correct shell portability issue.
6505
6506 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6507
6508 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6509
6510 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6511
6512 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6513 * NEWS: Mention new FreeBSD/mips native configuration.
6514 * configure.host: Add aarch64*-*-freebsd*.
6515 * configure.nat: Likewise.
6516 * aarch64-fbsd-nat.c: New file.
6517
6518 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6519
6520 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6521 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6522 * NEWS: Mention new FreeBSD/aarch64 target.
6523 * configure.tgt: Add aarch64*-*-freebsd*.
6524 * aarch64-fbsd-tdep.c: New file.
6525 * aarch64-fbsd-tdep.h: New file.
6526
6527 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6528
6529 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6530
6531 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6532
6533 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6534 of TLS symbols.
6535
6536 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6537
6538 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6539 call.
6540
6541 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6542
6543 * infrun.c (follow_exec): Call add_thread after
6544 target_find_description.
6545
6546 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6547
6548 * infrun.c (handle_inferior_event_1): When exec'ing, read
6549 stop_pc after follow_exec.
6550
6551 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6552
6553 * remote.c (process_g_packet): Update error message.
6554
6555 2017-09-05 Yao Qi <yao.qi@linaro.org>
6556
6557 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6558 targets.
6559
6560 2017-09-05 Pedro Alves <palves@redhat.com>
6561
6562 * eval.c (eval_call, evaluate_funcall): New functions, factored
6563 out from ...
6564 (evaluate_subexp_standard): ... this.
6565
6566 2017-09-05 Yao Qi <yao.qi@linaro.org>
6567
6568 * amd64-tdep.c (amd64_target_description): Create target
6569 descriptions.
6570 (_initialize_amd64_tdep): Don't call functions
6571 initialize_tdesc_amd64_*. Add self tests.
6572 * arch/amd64.c (amd64_create_target_description): Add parameter
6573 is_linux. Call set_tdesc_osabi if is_linux is true.
6574 * arch/amd64.h (amd64_create_target_description): Update the
6575 declaration.
6576 * arch/i386.c (i386_create_target_description): Add parameter
6577 is_linux. Call set_tdesc_osabi if is_linux is true.
6578 * arch/i386.h (i386_create_target_description): Update
6579 declaration.
6580 * configure.tgt: Add i386.o to gdb_target_obs.
6581 * features/Makefile (XMLTOC): Remove i386/*.xml.
6582 * features/i386/amd64-avx-avx512.c: Remove.
6583 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6584 * features/i386/amd64-avx-mpx.c: Remove.
6585 * features/i386/amd64-avx.c: Remove.
6586 * features/i386/amd64-mpx.c: Remove.
6587 * features/i386/amd64.c: Remove.
6588 * features/i386/i386-avx-avx512.c: Remove.
6589 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6590 * features/i386/i386-avx-mpx.c: Remove.
6591 * features/i386/i386-avx.c: Remove.
6592 * features/i386/i386-mmx.c: Remove.
6593 * features/i386/i386-mpx.c: Remove.
6594 * features/i386/i386.c: Remove.
6595 * i386-tdep.c: Don't include features/i386/i386*.c., include
6596 target-descriptions.h and arch/i386.h.
6597 (i386_target_description): Create target descriptions.
6598 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6599 functions. Do self tests.
6600
6601 2017-09-05 Yao Qi <yao.qi@linaro.org>
6602
6603 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6604 * features/i386/amd64-avx-avx512-linux.c: Removed.
6605 * features/i386/amd64-avx-linux.c: Removed.
6606 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6607 * features/i386/amd64-avx-mpx-linux.c: Removed.
6608 * features/i386/amd64-linux.c: Removed.
6609 * features/i386/amd64-mpx-linux.c: Removed.
6610 * features/i386/x32-avx-avx512-linux.c: Removed.
6611 * features/i386/x32-avx-linux.c: Removed.
6612 * features/i386/x32-linux.c: Removed.
6613
6614 2017-09-05 Yao Qi <yao.qi@linaro.org>
6615
6616 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6617 features/i386/*.c.
6618 (amd64_linux_read_description): Call
6619 amd64_create_target_description.
6620 * arch/amd64.c: New file.
6621 * arch/amd64.h: New file.
6622 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6623 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6624
6625 2017-09-05 Yao Qi <yao.qi@linaro.org>
6626
6627 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6628 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6629 (amd64_linux_read_description): Create target descriptions.
6630 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6631 functions. Add unit tests.
6632 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6633 x32-core.xml.
6634 * features/i386/64bit-avx.c: Generated.
6635 * features/i386/64bit-avx512.c: Generated.
6636 * features/i386/64bit-core.c: Generated.
6637 * features/i386/64bit-linux.c: Generated.
6638 * features/i386/64bit-mpx.c: Generated.
6639 * features/i386/64bit-pkeys.c: Generated.
6640 * features/i386/64bit-segments.c: Generated.
6641 * features/i386/64bit-sse.c: Generated.
6642 * features/i386/x32-core.c: Generated.
6643 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6644 c files for amd64-linux and x32-linux.
6645
6646 2017-09-05 Yao Qi <yao.qi@linaro.org>
6647
6648 * amd64-linux-tdep.c (amd64_linux_read_description): New
6649 function.
6650 (amd64_linux_core_read_description): Call
6651 amd64_linux_read_description.
6652 (amd64_linux_init_abi): Likewise.
6653 (amd64_x32_linux_init_abi): Likewise.
6654 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6655 * x86-linux-nat.c (x86_linux_read_description): Call
6656 amd64_linux_read_description.
6657
6658 2017-09-05 Yao Qi <yao.qi@linaro.org>
6659
6660 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6661 comments.
6662
6663 2017-09-05 Yao Qi <yao.qi@linaro.org>
6664
6665 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6666 * features/i386/i386-avx-avx512-linux.c: Remove.
6667 * features/i386/i386-avx-linux.c: Remove.
6668 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6669 * features/i386/i386-avx-mpx-linux.c: Remove.
6670 * features/i386/i386-linux.c: Remove.
6671 * features/i386/i386-mmx-linux.c: Remove.
6672 * features/i386/i386-mpx-linux.c: Remove.
6673
6674 2017-09-05 Yao Qi <yao.qi@linaro.org>
6675
6676 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6677 (SFILES): Add arch/i386.c.
6678 (HFILES_NO_SRCDIR): Add arch/i386.h.
6679 * arch/i386.c: New file.
6680 * arch/i386.h: New file.
6681 * arch/tdesc.h (allocate_target_description): Declare.
6682 (set_tdesc_architecture): Declare.
6683 (set_tdesc_osabi): Declare.
6684 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6685 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6686 include arch/i386.h.
6687 (i386_linux_read_description): Remove code and call
6688 i386_create_target_description.
6689 (set_tdesc_architecture): New function.
6690 (set_tdesc_osabi): New function.
6691 * target-descriptions.h (allocate_target_description): Remove.
6692
6693 2017-09-05 Yao Qi <yao.qi@linaro.org>
6694
6695 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6696 * target-descriptions.c (tdesc_create_feature): Likewise, and
6697 adjust code.
6698 * features/i386/32bit-avx.c: Re-generated.
6699 * features/i386/32bit-avx512.c: Re-generated.
6700 * features/i386/32bit-core.c: Re-generated.
6701 * features/i386/32bit-linux.c: Re-generated.
6702 * features/i386/32bit-mpx.c: Re-generated.
6703 * features/i386/32bit-pkeys.c: Re-generated.
6704 * features/i386/32bit-sse.c: Re-generated.
6705
6706 2017-09-05 Yao Qi <yao.qi@linaro.org>
6707
6708 * regformats/regdef.h (struct reg): Override operator == and !=.
6709
6710 2017-09-05 Yao Qi <yao.qi@linaro.org>
6711
6712 * arch/tdesc.h: New file.
6713 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6714 * target-descriptions.c: Update comments.
6715 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6716 declarations.
6717 * features/i386/32bit-avx.c: Re-generated.
6718 * features/i386/32bit-avx512.c: Re-generated.
6719 * features/i386/32bit-core.c: Re-generated.
6720 * features/i386/32bit-linux.c: Re-generated.
6721 * features/i386/32bit-mpx.c: Re-generated.
6722 * features/i386/32bit-pkeys.c: Re-generated.
6723 * features/i386/32bit-sse.c: Re-generated.
6724
6725 2017-09-05 Yao Qi <yao.qi@linaro.org>
6726
6727 * regformats/regdat.sh: Update generated code.
6728
6729 2017-09-05 Yao Qi <yao.qi@linaro.org>
6730
6731 * regformats/regdat.sh: Adjust code order.
6732
6733 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6734
6735 * expprint.c (dump_subexp_body_standard): Use constant format
6736 string in fprintf_filtered call.
6737
6738 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6739
6740 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6741 NetBSD/i386.
6742 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6743
6744 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6745
6746 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6747
6748 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6749
6750 * bsd-kvm.o: Define _KMEMUSER.
6751 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6752 * configure: Regenerate.
6753
6754 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6755
6756 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6757 * i386-fbsd-nat.c: Likewise.
6758
6759 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6760
6761 * unittests/array-view-selftests.c: Add include of <array>.
6762
6763 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6764
6765 * spu-tdep.c (flush_ea_cache): Add missing argument to
6766 call_function_by_hand.
6767
6768 2017-09-04 Pedro Alves <palves@redhat.com>
6769
6770 * NEWS (Safer support for debugging with no debug info): New.
6771
6772 2017-09-04 Pedro Alves <palves@redhat.com>
6773
6774 * c-exp.y (function_method, function_method_void): Add current
6775 instance flags to TYPE_INSTANCE.
6776 * dwarf2read.c (check_modifier): New.
6777 (compute_delayed_physnames): Assert that only C++ adds delayed
6778 physnames. Mark fn_fields as const/volatile depending on
6779 physname.
6780 * eval.c (make_params): New type_instance_flags parameter. Use
6781 it as the new type's instance flags.
6782 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6783 flags element and pass it to make_params.
6784 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6785 instance flags element.
6786 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6787 * gdbtypes.h: Include "enum-flags.h".
6788 (type_instance_flags): New enum-flags type.
6789 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6790 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6791 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6792 (follow_type_instance_flags): New function.
6793 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6794 * parser-defs.h (follow_type_instance_flags): Declare.
6795 * valops.c (value_struct_elt_for_reference): const/volatile must
6796 match too.
6797
6798 2017-09-04 Pedro Alves <palves@redhat.com>
6799
6800 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6801 function/method scopes; lookup the nested name as a function local
6802 static variable.
6803
6804 2017-09-04 Pedro Alves <palves@redhat.com>
6805
6806 (%type <voidval>): Add function_method.
6807 * c-exp.y (exp): New production for calls with no arguments.
6808 (function_method, function_method_void_or_typelist): New
6809 productions.
6810 (exp): New production for "method()::static_var".
6811 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6812 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6813 Handle OP_FUNC_STATIC_VAR.
6814 * parse.c (operator_length_standard):
6815 Handle OP_FUNC_STATIC_VAR.
6816
6817 2017-09-04 Pedro Alves <palves@redhat.com>
6818
6819 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6820 handling.
6821 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6822 Ditto.
6823 * parse.c (operator_length_standard, operator_check_standard):
6824 Ditto.
6825 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6826
6827 2017-09-04 Pedro Alves <palves@redhat.com>
6828
6829 * ax-gdb.c: Include "typeprint.h".
6830 (gen_expr_for_cast): New function.
6831 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6832 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6833 type is unknown.
6834 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6835 nodebug_data_symbol.
6836 * eval.c: Include "typeprint.h".
6837 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6838 Error out if symbol has unknown type.
6839 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6840 evaluate_subexp_for_cast.
6841 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6842 OP_VAR_MSYM_VALUE.
6843 (evaluate_subexp_for_cast): New function.
6844 * gdbtypes.c (init_nodebug_var_type): New function.
6845 (objfile_type): Use it to initialize types of variables with no
6846 debug info.
6847 * typeprint.c (error_unknown_type): New.
6848 * typeprint.h (error_unknown_type): New declaration.
6849 * compile/compile-c-types.c (convert_type_basic): Handle
6850 TYPE_CODE_ERROR; warn and fallback to int for variables with
6851 unknown type.
6852
6853 2017-09-04 Pedro Alves <palves@redhat.com>
6854
6855 * eval.c (evaluate_var_value): New function, factored out from ...
6856 (evaluate_subexp_standard): ... here.
6857
6858 2017-09-04 Pedro Alves <palves@redhat.com>
6859
6860 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6861 Remove useless assignments to 'op'.
6862
6863 2017-09-04 Pedro Alves <palves@redhat.com>
6864
6865 * eval.c (eval_skip_value): New function.
6866 (evaluate_subexp_standard): Use it.
6867
6868 2017-09-04 Pedro Alves <palves@redhat.com>
6869
6870 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6871 function name from symbol/minsym and pass it to
6872 error_call_unknown_return_type.
6873
6874 2017-09-04 Pedro Alves <palves@redhat.com>
6875
6876 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6877 * ax-gdb.c (gen_msym_var_ref): New function.
6878 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6879 * eval.c (evaluate_var_msym_value): New function.
6880 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6881 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6882 to call_function_by_hand.
6883 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6884 Handle OP_VAR_MSYM_VALUE.
6885 (union exp_element) <msymbol>: New field.
6886 * minsyms.h (struct type): Forward declare.
6887 (find_minsym_type_and_address): Declare.
6888 * parse.c (write_exp_elt_msym): New function.
6889 (write_exp_msymbol): Delete, refactored as ...
6890 (find_minsym_type_and_address): ... this new function.
6891 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6892 (operator_length_standard, operator_check_standard): Handle
6893 OP_VAR_MSYM_VALUE.
6894 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6895
6896 2017-09-04 Pedro Alves <palves@redhat.com>
6897
6898 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6899 TYPE_GNU_IFUNC specially here. Throw error if return type is
6900 unknown.
6901 * ada-typeprint.c (print_func_type): Handle functions with unknown
6902 return type.
6903 * c-typeprint.c (c_type_print_base): Handle functions and methods
6904 with unknown return type.
6905 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6906 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6907 * compile/compile-c-types.c: Include "objfiles.h".
6908 (convert_func): For functions with unknown return type, warn and
6909 default to int.
6910 * compile/compile-object-run.c (compile_object_run): Adjust call
6911 to call_function_by_hand_dummy.
6912 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6913 call_function_by_hand.
6914 * eval.c (evaluate_subexp_standard): Adjust calls to
6915 call_function_by_hand. Handle functions and methods with unknown
6916 return type. Pass expect_type to call_function_by_hand.
6917 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6918 return type.
6919 * gcore.c (call_target_sbrk): Adjust call to
6920 call_function_by_hand.
6921 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6922 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6923 an integer address type instead of nodebug.
6924 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6925 call_function_by_hand.
6926 * infcall.c (error_call_unknown_return_type): New function.
6927 (call_function_by_hand): New "default_return_type" parameter.
6928 Pass it down.
6929 (call_function_by_hand_dummy): New "default_return_type"
6930 parameter. Use it instead of defaulting to int. If there's no
6931 default and the return type is unknown, throw an error. If
6932 there's a default return type, and the called function has no
6933 debug info, then assume the function is prototyped.
6934 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6935 New "default_return_type" parameter.
6936 (error_call_unknown_return_type): New declaration.
6937 * linux-fork.c (call_lseek): Cast return type of lseek.
6938 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6939 call_function_by_hand.
6940 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6941 calls to call_function_by_hand.
6942 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6943 return type.
6944 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6945 (value_nsstring, print_object_command): Adjust calls to
6946 call_function_by_hand.
6947 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6948 functions with unknown return type.
6949 (pascal_type_print_func_varspec_suffix): New function.
6950 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6951 TYPE_CODE_METHOD>: Use it.
6952 * python/py-value.c (valpy_call): Adjust call to
6953 call_function_by_hand.
6954 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6955 call_function_by_hand.
6956 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6957 call_function_by_hand.
6958 * valops.c (value_allocate_space_in_inferior): Adjust call to
6959 call_function_by_hand.
6960 * typeprint.c (type_print_unknown_return_type): New function.
6961 * typeprint.h (type_print_unknown_return_type): New declaration.
6962
6963 2017-09-04 Pedro Alves <palves@redhat.com>
6964
6965 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6966 types with more than one parameter as prototyped.
6967
6968 2017-09-04 Pedro Alves <palves@redhat.com>
6969
6970 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6971 (disassemble_command): Use gdb_disassembly_flags instead of bare
6972 int.
6973 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6974 (dump_insns, do_mixed_source_and_assembly_deprecated)
6975 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6976 Use gdb_disassembly_flags instead of bare int.
6977 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6978 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6979 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6980 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6981 (enum gdb_disassembly_flag): ... values of this new enumeration.
6982 (gdb_disassembly_flags): Define.
6983 (gdb_disassembly)
6984 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6985 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6986 gdb_disassembly_flags instead of bare int.
6987 * record-btrace.c (btrace_insn_history)
6988 (record_btrace_insn_history, record_btrace_insn_history_range)
6989 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6990 instead of bare int.
6991 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6992 Use gdb_disassembly_flags instead of bare int.
6993 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6994 Define.
6995 * target-delegates.c: Regenerate.
6996 * target.c (target_insn_history, target_insn_history_from)
6997 (target_insn_history_range): Use gdb_disassembly_flags instead of
6998 bare int.
6999 * target.h: Include "disasm.h".
7000 (struct target_ops) <to_insn_history, to_insn_history_from,
7001 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7002 int.
7003 (target_insn_history, target_insn_history_from)
7004 (target_insn_history_range): Use gdb_disassembly_flags instead of
7005 bare int.
7006
7007 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7008
7009 * cli/cli-script.c (build_command_line): For if/while commands,
7010 check whether args is empty.
7011
7012 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7013
7014 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7015 (enum command_control_type): Likewise.
7016 (struct command_line): Likewise.
7017 (free_command_lines): Likewise.
7018 (struct command_lines_deleter): Likewise.
7019 (command_line_up): Likewise.
7020 (read_command_lines): Likewise.
7021 (read_command_lines_1): Likewise.
7022 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7023 (enum command_control_type): Likewise.
7024 (struct command_line): Likewise.
7025 (free_command_lines): Likewise.
7026 (struct command_lines_deleter): Likewise.
7027 (command_line_up): Likewise.
7028 (read_command_lines): Likewise.
7029 (read_command_lines_1): Likewise.
7030 * breakpoint.h: Include cli/cli-script.h.
7031 * extension-priv.h: Likewise.
7032 * gdbcmd.h: Likewise.
7033
7034 2017-09-04 Pedro Alves <palves@redhat.com>
7035
7036 * ada-lang.c (is_known_support_routine): Move sal declaration to
7037 where it is initialized.
7038 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7039 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7040 (clear_command, update_static_tracepoint): Remove init_sal
7041 references. Move declarations closer to initializations.
7042 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7043 initializations.
7044 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7045 references. Move sal declarations closer to initializations.
7046 * frame.c (find_frame_sal): Return a symtab_and_line via function
7047 return instead of output parameter. Remove init_sal references.
7048 * frame.h (find_frame_sal): Return a symtab_and_line via function
7049 return instead of output parameter.
7050 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7051 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7052 instead of memset.
7053 (gdbscm_find_pc_line): Remove init_sal reference.
7054 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7055 references. Move declarations closer to initializations.
7056 * infcmd.c (set_step_frame): Update. Move declarations closer to
7057 initializations.
7058 (finish_backward): Remove init_sal references. Move declarations
7059 closer to initializations.
7060 * infrun.c (process_event_stop_test, handle_step_into_function)
7061 (insert_hp_step_resume_breakpoint_at_frame)
7062 (insert_step_resume_breakpoint_at_caller): Likewise.
7063 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7064 (symbol_to_sal): Likewise.
7065 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7066 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7067 to its initialization.
7068 * reverse.c (save_bookmark_command): Use new/delete. Remove
7069 init_sal references. Move declarations closer to initializations.
7070 * source.c (get_current_source_symtab_and_line): Remove brace
7071 initialization.
7072 (set_current_source_symtab_and_line): Now takes the sal by const
7073 reference. Remove brace initialization.
7074 (line_info): Remove init_sal reference.
7075 * source.h (set_current_source_symtab_and_line): Now takes a
7076 symtab_and_line via const reference.
7077 * stack.c (set_current_sal_from_frame): Adjust.
7078 (print_frame_info): Adjust.
7079 (get_last_displayed_sal): Return the sal via function return
7080 instead of via output parameter. Simplify.
7081 (frame_info): Adjust.
7082 * stack.h (get_last_displayed_sal): Return the sal via function
7083 return instead of via output parameter.
7084 * symtab.c (init_sal): Delete.
7085 (find_pc_sect_line): Remove init_sal references. Move
7086 declarations closer to initializations.
7087 (find_function_start_sal): Remove init_sal references. Move
7088 declarations closer to initializations.
7089 * symtab.h (struct symtab_and_line): In-class initialize all
7090 fields.
7091 * tracepoint.c (set_traceframe_context)
7092 (print_one_static_tracepoint_marker): Remove init_sal references.
7093 Move declarations closer to initializations.
7094 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7095 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7096 declarations closer to initializations.
7097 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7098 init_sal references. Adjust.
7099
7100 2017-09-04 Pedro Alves <palves@redhat.com>
7101
7102 * ax-gdb.c (agent_command_1): Use range-for.
7103 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7104 * breakpoint.c: Include "common/array-view.h".
7105 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7106 parameter from struct symtabs_and_lines to
7107 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7108 (breakpoint_sals_to_pc): Change sals parameter from struct
7109 symtabs_and_lines to std::vector reference.
7110 (check_fast_tracepoint_sals): Change sals parameter from struct
7111 symtabs_and_lines to std::array_view. Use range-for.
7112 (decode_static_tracepoint_spec): Return a std::vector instead of
7113 symtabs_and_lines. Update.
7114 (create_breakpoint): Update.
7115 (break_range_command, until_break_command, clear_command): Update.
7116 (base_breakpoint_decode_location, bkpt_decode_location)
7117 (bkpt_probe_create_sals_from_location)
7118 (bkpt_probe_decode_location, tracepoint_decode_location)
7119 (tracepoint_probe_decode_location)
7120 (strace_marker_create_sals_from_location): Return a std::vector
7121 instead of symtabs_and_lines.
7122 (strace_marker_create_breakpoints_sal): Update.
7123 (strace_marker_decode_location): Return a std::vector instead of
7124 symtabs_and_lines. Update.
7125 (update_breakpoint_locations): Change struct symtabs_and_lines
7126 parameters to gdb::array_view. Adjust.
7127 (location_to_sals): Return a std::vector instead of
7128 symtabs_and_lines. Update.
7129 (breakpoint_re_set_default): Use std::vector instead of struct
7130 symtabs_and_lines.
7131 (decode_location_default): Return a std::vector instead of
7132 symtabs_and_lines. Update.
7133 * breakpoint.h: Include "common/array-view.h".
7134 (struct breakpoint_ops) <decode_location>: Now returns a
7135 std::vector instead of returning a symtabs_and_lines via output
7136 parameter.
7137 (update_breakpoint_locations): Change sals parameters to use
7138 gdb::array_view.
7139 * cli/cli-cmds.c (edit_command, list_command): Update to use
7140 std::vector and gdb::array_view.
7141 (ambiguous_line_spec): Adjust to use gdb::array_view and
7142 range-for.
7143 (compare_symtabs): Rename to ...
7144 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7145 const reference and adjust.
7146 (filter_sals): Rewrite using std::vector and standard algorithms.
7147 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7148 (jump_command): Update to use std::vector.
7149 * linespec.c (struct linespec_state) <canonical_names>: Update
7150 comment.
7151 (add_sal_to_sals_basic): Delete.
7152 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7153 (decode_line_2, create_sals_line_offset)
7154 (convert_address_location_to_sals, convert_linespec_to_sals)
7155 (convert_explicit_location_to_sals, parse_linespec)
7156 (event_location_to_sals, decode_line_full, decode_line_1)
7157 (decode_line_with_current_source)
7158 (decode_line_with_last_displayed, decode_objc)
7159 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7160 (linespec_result::~linespec_result): Adjust to use std::vector
7161 instead of symtabs_and_lines.
7162 * linespec.h (linespec_sals::sals): Now a std::vector.
7163 (struct linespec_result): Use std::vector, bool, and in-class
7164 initialization.
7165 (decode_line_1, decode_line_with_current_source)
7166 (decode_line_with_last_displayed): Return std::vector.
7167 * macrocmd.c (info_macros_command): Use std::vector.
7168 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7169 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7170 std::vector.
7171 * probe.h (parse_probes): Return a std::vector.
7172 * python/python.c (gdbpy_decode_line): Use std::vector and
7173 gdb::array_view.
7174 * source.c (select_source_symtab, line_info): Use std::vector.
7175 * stack.c (func_command): Use std::vector.
7176 * symtab.h (struct symtabs_and_lines): Delete.
7177 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7178
7179 2017-09-04 Pedro Alves <palves@redhat.com>
7180
7181 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7182 unittests/array-view-selftests.c.
7183 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7184 * common/array-view.h: New file.
7185 * unittests/array-view-selftests.c: New file.
7186
7187 2017-09-04 Pedro Alves <palves@redhat.com>
7188
7189 * cli/cli-cmds.c (edit_command): Pass message to
7190 ambiguous_line_spec.
7191 (list_command): Pass message to ambiguous_line_spec. Say
7192 "first"/"last" instead of "start" and "end" to be consistent with
7193 the manual.
7194 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7195 them to print formatted message.
7196
7197 2017-09-04 Pedro Alves <palves@redhat.com>
7198
7199 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7200 ftrace_update_insns by reference instead of pointer.
7201
7202 2017-09-04 Yao Qi <yao.qi@linaro.org>
7203
7204 * i386-go32-tdep.c: Include x86-xstate.h.
7205 (i386_go32_init_abi): Call i386_target_description.
7206 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7207 if xcr0 is X86_XSTATE_X87_MASK.
7208 * i386-tdep.h (tdesc_i386): Remove the declaration.
7209 (tdesc_i386_mmx): Likewise.
7210
7211 2017-09-04 Yao Qi <yao.qi@linaro.org>
7212
7213 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7214 X86_XSTATE_SSE_MASK instead of 0.
7215
7216 2017-09-04 Yao Qi <yao.qi@linaro.org>
7217
7218 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7219 i386_target_description.
7220 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7221 i386_target_description.
7222 * i386-tdep.c (i386_gdbarch_init): Likewise.
7223
7224 2017-09-04 Yao Qi <yao.qi@linaro.org>
7225
7226 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7227 (x86_darwin_init_abi_64): Call amd64_target_description.
7228 * amd64-dicos-tdep.c: Likewise.
7229 * amd64-fbsd-nat.c: Likewise.
7230 * amd64-fbsd-tdep.c: Likewise.
7231 * amd64-nbsd-tdep.c: Likewise.
7232 * amd64-obsd-tdep.c: Likewise.
7233 * amd64-sol2-tdep.c: Likewise.
7234 * amd64-windows-tdep.c: Likewise.
7235 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7236
7237 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7238
7239 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7240 (btrace_function) <insn>: Change type to use std::vector.
7241 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7242 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7243 ftrace_update_insns, ftrace_compute_global_level_offset,
7244 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7245 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7246 change to std::vector.
7247 (ftrace_update_insns): Adjust to change to std::vector, change
7248 type of INSN parameter.
7249 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7250 * record-btrace.c (btrace_call_history_insn_range,
7251 btrace_compute_src_line_range,
7252 record_btrace_frame_prev_register): Adjust to change to
7253 std::vector.
7254 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7255 to change to std::vector.
7256
7257 2017-09-03 Tom Tromey <tom@tromey.com>
7258
7259 * corefile.c (reopen_exec_file): Use std::string.
7260
7261 2017-09-03 Tom Tromey <tom@tromey.com>
7262
7263 * compile/compile.c (compile_register_name_mangled): Return
7264 std::string.
7265 * compile/compile-loc2c.c (pushf_register_address): Update.
7266 (pushf_register): Update.
7267 * compile/compile-c-types.c (convert_array): Update.
7268 * compile/compile-c-symbols.c (generate_vla_size): Update.
7269 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7270 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7271 (convert_one_symbol): Update.
7272 (generate_c_for_for_one_variable): Update.
7273 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7274 std::string.
7275 (generate_register_struct): Update.
7276 * compile/compile-internal.h (c_get_range_decl_name): Return a
7277 std::string.
7278 (compile_register_name_mangled): Return std::string.
7279
7280 2017-09-03 Tom Tromey <tom@tromey.com>
7281
7282 * utils.c (perror_string): Return a std::string.
7283 (throw_perror_with_name, perror_warning_with_name): Update.
7284
7285 2017-09-03 Tom Tromey <tom@tromey.com>
7286
7287 * demangle.c (demangle_command): Use std::string,
7288 unique_xmalloc_ptr.
7289
7290 2017-09-03 Tom Tromey <tom@tromey.com>
7291
7292 * cli/cli-setshow.c (do_set_command): Use std::string.
7293
7294 2017-09-03 Tom Tromey <tom@tromey.com>
7295
7296 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7297
7298 2017-09-03 Tom Tromey <tom@tromey.com>
7299
7300 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7301
7302 2017-09-03 Tom Tromey <tom@tromey.com>
7303
7304 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7305 gdb::unique_xmalloc_ptr.
7306
7307 2017-09-03 Tom Tromey <tom@tromey.com>
7308
7309 * thread.c (print_thread_info_1): Use string_printf.
7310 (thread_apply_command, thread_apply_all_command): Use
7311 std::string.
7312
7313 2017-09-03 Tom Tromey <tom@tromey.com>
7314
7315 * valprint.c (val_print_string): Update.
7316 * gdbcore.h (memory_error_message): Return std::string.
7317 * corefile.c (memory_error_message): Return std::string.
7318 (memory_error): Update.
7319 * breakpoint.c (insert_bp_location): Update.
7320
7321 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7322
7323 * target/waitstatus.h (target_waitstatus_to_string): Change
7324 return type to std::string.
7325 * target/waitstatus.c (target_waitstatus_to_string): Return
7326 std::string.
7327 * target.h (target_waitstatus_to_string): Remove declaration.
7328 * infrun.c (resume, clear_proceed_status_thread,
7329 print_target_wait_results, do_target_wait, save_waitstatus,
7330 stop_all_threads): Adjust.
7331 * record-btrace.c (record_btrace_wait): Adjust.
7332 * target-debug.h
7333 (target_debug_print_struct_target_waitstatus_p): Adjust.
7334
7335 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7336
7337 PR gdb/22046
7338 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7339 detection.
7340
7341 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7342
7343 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7344 for setting/unsetting environment variables on the remote target.
7345 (New remote packets): Add entries for QEnvironmentHexEncoded,
7346 QEnvironmentUnset and QEnvironmentReset.
7347 * common/environ.c (gdb_environ::operator=): Extend method to
7348 handle m_user_set_env_list and m_user_unset_env_list.
7349 (gdb_environ::clear): Likewise.
7350 (match_var_in_string): Change type of first parameter from 'char
7351 *' to 'const char *'.
7352 (gdb_environ::set): Extend method to handle
7353 m_user_set_env_list and m_user_unset_env_list.
7354 (gdb_environ::unset): Likewise.
7355 (gdb_environ::clear_user_set_env): New method.
7356 (gdb_environ::user_set_envp): Likewise.
7357 (gdb_environ::user_unset_envp): Likewise.
7358 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7359 m_user_unset_env_list on move constructor/assignment.
7360 (unset): Add new default parameter 'update_unset_list = true'.
7361 (clear_user_set_env): New method.
7362 (user_set_envp): Likewise.
7363 (user_unset_envp): Likewise.
7364 (m_user_set_env_list): New std::set.
7365 (m_user_unset_env_list): Likewise.
7366 * common/rsp-low.c (hex2str): New function.
7367 (bin2hex): New overload for bin2hex function.
7368 * common/rsp-low.c (hex2str): New prototype.
7369 (str2hex): New overload prototype.
7370 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7371 QEnvironmentUnset and QEnvironmentReset.
7372 (remote_protocol_features): Add QEnvironmentHexEncoded,
7373 QEnvironmentUnset and QEnvironmentReset packets.
7374 (send_environment_packet): New function.
7375 (extended_remote_environment_support): Likewise.
7376 (extended_remote_create_inferior): Call
7377 extended_remote_environment_support.
7378 (_initialize_remote): Add QEnvironmentHexEncoded,
7379 QEnvironmentUnset and QEnvironmentReset packet configs.
7380 * unittests/environ-selftests.c (gdb_selftest_env_var):
7381 New variable.
7382 (test_vector_initialization): New function.
7383 (test_init_from_host_environ): Likewise.
7384 (test_reinit_from_host_environ): Likewise.
7385 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7386 Likewise.
7387 (test_unset_set_empty_vector): Likewise.
7388 (test_vector_clear): Likewise.
7389 (test_std_move): Likewise.
7390 (test_move_constructor):
7391 (test_self_move): Likewise.
7392 (test_set_unset_reset): Likewise.
7393 (run_tests): Rewrite in terms of the functions above.
7394
7395 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7396
7397 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7398 (adi_available): Use a temp variable of type CORE_ADDR as argument
7399 3 when calling target_auxv_search.
7400 (adi_normalize_address): Use masks and xor operators to calculate
7401 normalized address.
7402 (adi_read_versions, adi_write_versions, adi_print_versions)
7403 (do_examine, do_assign): Use paddress.
7404
7405 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7406
7407 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7408 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7409 out of loop and add supply of FIR.
7410 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7411 add collect of FIR.
7412
7413 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7414
7415 PR gdb/21827
7416 * cli/cli-script.c (define_command): Don't convert command name
7417 to lower case.
7418
7419 2017-08-25 Joel Brobecker <brobecker@adacore.com>
7420
7421 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7422 Update all callers accordingly. Remove all code blocks handling
7423 the case where DISPP is not NULL.
7424
7425 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7426
7427 PR symtab/22003
7428 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7429 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7430 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7431
7432 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7433
7434 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7435 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7436 (read_comp_units_from_section): New parameter abbrev_section, use
7437 read_and_check_comp_unit_head, allocate signatured_type if needed.
7438 (create_all_comp_units): Update read_comp_units_from_section caller.
7439
7440 2017-08-23 Pedro Alves <palves@redhat.com>
7441
7442 PR remote/21852
7443 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7444 to null_ptid and switch to thread without reading the registers
7445 after adding the inferior.
7446
7447 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7448
7449 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7450 compile-gcc.
7451 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7452 (compile_to_object): Implement compile_gcc.
7453 (_initialize_compile): Install "set compile-gcc". Initialize
7454 compile_gcc.
7455
7456 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7457
7458 * compile/compile.c (compile_to_object): Conditionally call
7459 set_verbose. Conditionally call compile or compile_v0.
7460
7461 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7462
7463 * sparc64-tdep.h: (adi_normalize_address): New export.
7464 * sparc-nat.h: (open_adi_tag_fd): New export.
7465 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7466 * sparc64-linux-tdep.c:
7467 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7468 (sparc64_linux_handle_segmentation_fault): New function.
7469 (sparc64_linux_init_abi): Register
7470 sparc64_linux_handle_segmentation_fault
7471 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7472 (sparc64_addr_bits_remove): New function.
7473 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7474 (MAX_PROC_NAME_SIZE): New macro.
7475 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7476 (sparc64adilist): New variable.
7477 (adi_proc_list): New variable.
7478 (find_adi_info): New function.
7479 (add_adi_info): New function.
7480 (get_adi_info_proc): New function.
7481 (get_adi_info): New function.
7482 (info_adi_command): New function.
7483 (read_maps_entry): New function.
7484 (adi_available): New function.
7485 (adi_normalize_address): New function.
7486 (adi_align_address): New function.
7487 (adi_convert_byte_count): New function.
7488 (adi_tag_fd): New function.
7489 (adi_is_addr_mapped): New function.
7490 (adi_read_versions): New function.
7491 (adi_write_versions): New function.
7492 (adi_print_versions): New function.
7493 (do_examine): New function.
7494 (do_assign): New function.
7495 (adi_examine_command): New function.
7496 (adi_assign_command): New function.
7497 (_initialize_sparc64_adi_tdep): New function.
7498
7499 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7500
7501 * breakpoint.c (breakpoints_info): Rename to ...
7502 (info_breakpoints_command): ... this.
7503 (watchpoints_info): Rename to ...
7504 (info_watchpoints_command): ... this.
7505 (tracepoints_info): Rename to ...
7506 (info_tracepoints_command): ... this.
7507 (_initialize_breakpoint): Adjust.
7508 * dcache.c (dcache_info): Rename to ...
7509 (info_display_command): ... this.
7510 (_initialize_dcache): Adjust.
7511 * frame.h (args_info): Rename to ...
7512 (info_args_command): ... this.
7513 (locals_info): Rename to ...
7514 (info_locals_command): ... this.
7515 * infcmd.c (nofp_registers_info): Rename to ...
7516 (info_registers_command): ... this.
7517 (float_info): Rename to ...
7518 (info_float_command): ... this.
7519 (program_info): Rename to ...
7520 (info_program_command): ... this.
7521 (all_registers_info): Rename to ...
7522 (info_all_registers_command): ... this.
7523 (vector_info): Rename to ...
7524 (info_vector_command): ... this.
7525 (float_info): Rename to ...
7526 (info_float_command): ... this.
7527 (_initialize_infcmd): Adjust.
7528 * inferior.h (term_info): Rename to ...
7529 (info_terminal_command): ... this.
7530 * inflow.c (term_info): Rename to ...
7531 (info_terminal_command): ... this.
7532 (_initialize_inflow): Adjust.
7533 * infrun.c (signals_info): Rename to ...
7534 (info_signals_command): ... this.
7535 (_initialize_infrun): Adjust.
7536 * objc-lang.c (classes_info): Rename to ...
7537 (info_classes_command): ... this.
7538 (selectors_info): Rename to ...
7539 (info_selectors_command): ... this.
7540 (_initialize_objc_language): Adjust.
7541 * printcmd.c (sym_info): Rename to ...
7542 (info_symbol_command): ... this.
7543 (address_info): Rename to ...
7544 (info_address_command): ... this.
7545 (display_info): Rename to ...
7546 (info_display_command): ... this.
7547 (_initialize_printcmd): Adjust.
7548 * reverse.c (bookmarks_info): Rename to ...
7549 (info_breakpoints_command): ... this.
7550 (_initialize_reverse): Adjust.
7551 * ser-go32.c (dos_info): Rename to ...
7552 (info_serial_command): ... this.
7553 (_initialize_ser_dos): Adjust.
7554 * skip.c (skip_info): Rename to ...
7555 (info_skip_command): ... this.
7556 (_initialize_step_skip): Adjust.
7557 * source.c (line_info): Rename to ...
7558 (info_line_command): ... this.
7559 (source_info): Rename to ...
7560 (info_source_command)
7561 * stack.c (frame_info): Rename to ...
7562 (info_frame_command): ... this.
7563 (locals_info): Rename to ...
7564 (info_locals_command): ... this.
7565 (args_info): Rename to ...
7566 (info_args_command): ... this.
7567 (_initialize_stack): Adjust.
7568 * symtab.c (sources_info): Rename to ...
7569 (info_sources_command): ... this.
7570 (variables_info): Rename to ...
7571 (info_variables_command): ... this.
7572 (functions_info): Rename to ...
7573 (info_functions_command): ... this.
7574 (types_info): Rename to ...
7575 (info_types_command): ... this.
7576 (_initialize_symtab): Adjust.
7577 * target.c (target_info): Rename to ...
7578 (info_target_command): ... this.
7579 (initialize_targets): Adjust.
7580 * tracepoint.c (tvariables_info): Rename to ...
7581 (info_tvariables_command): ... this.
7582 (scope_info): Rename to ...
7583 (info_scope_command): ... this.
7584 (trace_dump_actions): Adjust.
7585 (_initialize_tracepoint): Adjust.
7586
7587 2017-08-22 Tom Tromey <tom@tromey.com>
7588
7589 * breakpoint.h (install_breakpoint): Update.
7590 * breakpoint.c (add_solib_catchpoint): Update.
7591 (install_breakpoint): Change argument to a std::unique_ptr.
7592 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7593 (create_breakpoint_sal, create_breakpoint): Update.
7594 (watch_command_1, catch_exec_command_1)
7595 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7596 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7597 Return the breakpoint.
7598 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7599 (new_single_step_breakpoint): Update.
7600 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7601 std::unique_ptr.
7602 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7603 std::unique_ptr.
7604 * break-catch-sig.c (create_signal_catchpoint): Use
7605 std::unique_ptr.
7606 * ada-lang.c (create_ada_exception_catchpoint): Use
7607 std::unique_ptr.
7608
7609 2017-08-22 Tom Tromey <tom@tromey.com>
7610
7611 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7612
7613 2017-08-22 Tom Tromey <tom@tromey.com>
7614
7615 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7616 (lookup_partial_symbol): Update.
7617
7618 2017-08-22 Tom Tromey <tom@tromey.com>
7619
7620 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7621 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7622 (find_and_open_source, symtab_to_fullname): Update.
7623 * psymtab.c (psymtab_to_fullname): Update.
7624
7625 2017-08-22 Tom Tromey <tom@tromey.com>
7626
7627 * exec.c (exec_file_attach): Update.
7628 * linux-thread-db.c (try_thread_db_load): Update.
7629 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7630 * utils.c (gdb_realpath): Change return type.
7631 (gdb_realpath_keepfile): Update.
7632 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7633 (_initialize_utils): Register the new self test.
7634 * source.c (openp): Update.
7635 (find_and_open_source): Update.
7636 * nto-tdep.c (nto_find_and_open_solib): Update.
7637 * main.c (set_gdb_data_directory): Update.
7638 (captured_main_1): Update.
7639 * dwarf2read.c (dwarf2_get_dwz_file): Update
7640 (dw2_map_symbol_filenames): Update.
7641 * auto-load.c (auto_load_safe_path_vec_update): Update.
7642 (filename_is_in_auto_load_safe_path_vec): Change type of
7643 "filename_realp".
7644 (auto_load_objfile_script): Update.
7645 (file_is_auto_load_safe): Update. Use std::string.
7646 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7647
7648 2017-08-22 Tom Tromey <tom@tromey.com>
7649
7650 * utils.c (gdb_realpath_keepfile): Return a
7651 gdb::unique_xmalloc_ptr.
7652 * exec.c (exec_file_attach): Update.
7653 * utils.h (gdb_realpath_keepfile): Return a
7654 gdb::unique_xmalloc_ptr.
7655
7656 2017-08-22 Tom Tromey <tom@tromey.com>
7657
7658 * compile/compile.c (compile_file_command): Use
7659 gdb::unique_xmalloc_ptr, std::string.
7660 * utils.c (gdb_abspath): Change return type.
7661 * source.c (openp): Update.
7662 * objfiles.c (allocate_objfile): Update.
7663 * main.c (set_gdb_data_directory): Update.
7664 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7665
7666 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7667
7668 * cli-cmds.c (list_commands): List actual code around more than
7669 one location.
7670
7671 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7672
7673 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7674
7675 2017-08-21 Pedro Alves <palves@redhat.com>
7676
7677 PR gdb/19487
7678 * c-exp.y (variable production): Handle function aliases.
7679 * minsyms.c (msymbol_is_text): New function.
7680 * minsyms.h (msymbol_is_text): Declare.
7681 * symtab.c (find_function_alias_target): New function.
7682 * symtab.h (find_function_alias_target): Declare.
7683
7684 2017-08-21 Pedro Alves <palves@redhat.com>
7685
7686 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7687 typedefs.
7688 * typeprint.c (whatis_exp): If handling "whatis", and expression
7689 is OP_TYPE, strip one typedef level. Otherwise don't strip
7690 typedefs here.
7691 * valops.c (value_cast): Save "to" type before resolving
7692 stubs/typedefs. Use that type as resulting value's type.
7693
7694 2017-08-18 Tom Tromey <tom@tromey.com>
7695 Pedro Alves <palves@redhat.com>
7696
7697 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7698 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7699 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7700 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7701 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7702 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7703 (linux_get_siginfo_data): Add "thread" argument. Use
7704 scoped_restore.
7705 * linux-nat.c (linux_child_follow_fork)
7706 (check_stopped_by_watchpoint): Use scoped_restore.
7707 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7708 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7709 (restore_inferior_ptid, save_inferior_ptid): Remove.
7710 * btrace.c (btrace_fetch): Use scoped_restore.
7711 * bsd-uthread.c (bsd_uthread_fetch_registers)
7712 (bsd_uthread_store_registers): Use scoped_restore.
7713 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7714 scoped_restore.
7715 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7716 (aix_thread_xfer_partial): Use scoped_restore.
7717 * inferior.h (save_inferior_ptid): Remove.
7718
7719 2017-08-18 Yao Qi <yao.qi@linaro.org>
7720
7721 PR tdep/21818
7722 * arm-tdep.c (gdb_print_insn_arm): Mark
7723 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7724
7725 2017-08-18 Yao Qi <yao.qi@linaro.org>
7726
7727 * NEWS: Mention GDBserver's new option "--selftest".
7728 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7729 * selftest.c: Move it to common/selftest.c.
7730 * selftest.h: Move it to common/selftest.h.
7731 * selftest-arch.c (reset): New function.
7732 (tests_with_arch): Call reset.
7733
7734 2017-08-18 Yao Qi <yao.qi@linaro.org>
7735
7736 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7737 instead of exception_fprintf and printf_filtered.
7738
7739 2017-08-18 Yao Qi <yao.qi@linaro.org>
7740
7741 * selftest.c (register_self_test): Rename it to
7742 selftests::register_test.
7743 (run_self_tests): selftest::run_tests.
7744 * selftest.h: Update declarations.
7745 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7746 selftests::register_test_foreach_arch.
7747 * selftest-arch.h: Update declaration.
7748 * aarch64-tdep.c: Update.
7749 * arm-tdep.c: Likewise.
7750 * disasm-selftests.c: Likewise.
7751 * dwarf2loc.c: Likewise.
7752 * dwarf2-frame.c: Likewise.
7753 * findvar.c: Likewise.
7754 * gdbarch-selftests.c: Likewise.
7755 * maint.c (maintenance_selftest): Likewise.
7756 * regcache.c: Likewise.
7757 * rust-exp.y: Likewise.
7758 * selftest-arch.c: Likewise.
7759 * unittests/environ-selftests.c: Likewise.
7760 * unittests/function-view-selftests.c: Likewise.
7761 * unittests/offset-type-selftests.c: Likewise.
7762 * unittests/optional-selftests.c: Likewise.
7763 * unittests/scoped_restore-selftests.c: Likewise.
7764 * utils-selftests.c: Likewise.
7765
7766 2017-08-17 Pedro Alves <palves@redhat.com>
7767
7768 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7769 local.
7770
7771 2017-08-17 Pedro Alves <palves@redhat.com>
7772
7773 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7774 field.
7775 (reset_die_in_process): Delete, replaced by ...
7776 (process_die_scope): ... this new class. Make it responsible for
7777 freeing cu->line_header too.
7778 (process_die): Use process_die_scope.
7779 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7780 cu->line_header_die_owner. Don't release the line header if it's
7781 owned by the CU.
7782 (setup_type_unit_groups): Make the CU/DIE own the line header.
7783 Don't release the line header here.
7784
7785 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7786
7787 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7788
7789 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7790
7791 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7792 Single-Key mode
7793
7794 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7795
7796 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7797 mode command list.
7798
7799 2017-08-15 Stafford Horne <shorne@gmail.com>
7800
7801 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7802
7803 2017-08-15 Stafford Horne <shorne@gmail.com>
7804
7805 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7806
7807 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7808
7809 PR gdb/21954
7810 * infcmd.c (unset_environment_command): Use the 'clear' method on
7811 the environment instead of resetting it.
7812
7813 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7814
7815 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7816 platforms.
7817
7818 2017-08-14 Tom Tromey <tom@tromey.com>
7819
7820 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7821 (print_binary_chars): Likewise.
7822 (BITS_IN_BYTES): Remove.
7823
7824 2017-08-14 Tom Tromey <tom@tromey.com>
7825
7826 PR gdb/21675
7827 * valprint.c (LOW_ZERO): Change value to 034.
7828 (print_octal_chars): Add static_asserts for octal constants.
7829 * printcmd.c (print_scalar_formatted): Add 'd' case.
7830
7831 2017-08-11 Tom Tromey <tom@tromey.com>
7832
7833 * symfile.c (add_symbol_file_command): Use std::vector.
7834
7835 2017-08-14 Tom Tromey <tom@tromey.com>
7836
7837 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7838 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7839 std::move.
7840 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7841
7842 2017-08-11 Pedro Alves <palves@redhat.com>
7843
7844 * infrun.c (process_event_stop_test): Adjust
7845 function_name_is_marked_for_skip call.
7846 * skip.c: Include <list>.
7847 (skiplist_entry): Make it a class with private fields, and
7848 getters/setters.
7849 (skiplist_entry_chain): Delete.
7850 (skiplist_entries): New.
7851 (skiplist_entry_count): Delete.
7852 (highest_skiplist_entry_num): New.
7853 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7854 (add_skiplist_entry): Delete.
7855 (skiplist_entry::skiplist_entry): New.
7856 (skiplist_entry::add_entry): New.
7857 (skip_file_command, skip_function): Adjust.
7858 (compile_skip_regexp): Delete.
7859 (skip_command): Don't compile regexp here. Adjust to use
7860 skiplist_entry::add_entry.
7861 (skip_info): Adjust to use range-for and getters.
7862 (skip_enable_command, skip_disable_command): Adjust to use
7863 range-for and setters.
7864 (skip_delete_command): Adjust to use std::list.
7865 (add_skiplist_entry): Delete.
7866 (skip_file_p): Delete, refactored as ...
7867 (skiplist_entry::do_skip_file_p): ... this new method.
7868 (skip_gfile_p): Delete, refactored as ...
7869 (skiplist_entry::do_gskip_file_p): ... this new method.
7870 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7871 (skiplist_entry::skip_function_p): ... this new method.
7872 (function_name_is_marked_for_skip): Now returns bool, and takes
7873 the function sal by const reference. Adjust to use range-for and
7874 skiplist_entry methods.
7875 (_initialize_step_skip): Remove references to
7876 skiplist_entry_chain, skiplist_entry_count.
7877 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7878 takes the function sal by const reference.
7879
7880 2017-08-11 Yao Qi <yao.qi@linaro.org>
7881
7882 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7883 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7884 (dwarf2_frame_cache):
7885 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7886 RETURN_MASK_ALL and set *this_case to NULL.
7887 * frame-unwind.h: Update comments.
7888
7889 2017-08-11 Yao Qi <yao.qi@linaro.org>
7890
7891 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7892 (dwarf2_frame_state_copy_regs): Remove.
7893 (dwarf2_frame_state_free_regs): Remove.
7894 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7895 (dwarf2_restore_rule): Call method .alloc_regs instead of
7896 dwarf2_frame_state_alloc_regs.
7897 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7898 constructor. Call std::move.
7899 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7900 (dwarf2_frame_cache): Likewise.
7901
7902 [GDB_SELF_TEST]: Include selftest.h and
7903 selftest-arch.h.
7904 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7905 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7906 execute_cfa_program_test.
7907
7908 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7909 copy ctor, assignment operator, move assignment.
7910 <alloc_regs>: New method.
7911 <swap>: New method.
7912 (struct dwarf2_frame_state): Delete dtor.
7913 (dwarf2_frame_state_alloc_regs): Remove declaration.
7914 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7915 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7916
7917 2017-08-11 Yao Qi <yao.qi@linaro.org>
7918
7919 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7920 (dwarf2_frame_state::dwarf2_frame_state): New.
7921 (dwarf2_frame_state::~dwarf2_frame_state): New.
7922 (dwarf2_fetch_cfa_info): Update.
7923 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7924 rather than a pointer. Update code.
7925 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7926 dtor.
7927 <data_align, code_align, retaddr_column>: Change them to const.
7928 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7929 to bool.
7930
7931 2017-08-11 Yao Qi <yao.qi@linaro.org>
7932
7933 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7934 <loc.exp>: New field.
7935 * dwarf2-frame.c (execute_cfa_program): Update.
7936 (dwarf2_frame_prev_register): Update.
7937
7938 2017-08-10 Pedro Alves <palves@redhat.com>
7939
7940 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7941
7942 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7943
7944 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7945 (fbsd_pending_children): Use std::list.
7946 (fbsd_remember_child): Likewise.
7947 (fbsd_is_child_pending): Likewise.
7948 (fbsd_pending_vfork_done): Use std::forward_list.
7949 (fbsd_add_vfork_done): Likewise.
7950 (fbsd_is_vfork_done_pending): Likewise.
7951 (fbsd_next_vfork_done): Likewise.
7952
7953 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7954
7955 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7956 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7957 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7958 for `mapfilename'.
7959 (fbsd_xfer_partial): Use gdb::byte_vector.
7960 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7961
7962 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7963
7964 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7965 "filestuff.h".
7966 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7967
7968 2017-08-09 Tom Tromey <tom@tromey.com>
7969
7970 * skip.c (skiplist_entry): New constructor.
7971 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7972 (skiplist_entry::file_is_glob): Now bool.
7973 (skiplist_entry::file, skiplist_entry::function): Now
7974 std::string.
7975 (make_skip_entry): Return a unique_ptr. Use new.
7976 (free_skiplist_entry, free_skiplist_entry_cleanup)
7977 (make_free_skiplist_entry_cleanup): Remove.
7978 (skip_command, skip_disable_command, add_skiplist_entry)
7979 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7980 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7981 (function_name_is_marked_for_skip): Update.
7982 (skip_delete_command): Update. Use delete.
7983
7984 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7985
7986 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7987 (aarch64_linux_core_read_description): New function.
7988 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7989
7990 2017-08-09 Pedro Alves <palves@redhat.com>
7991
7992 * cp-name-parser.y (cp_comp_to_string): Return a
7993 gdb::unique_xmalloc_ptr<char>.
7994 * cp-support.c (replace_typedefs_qualified_name)
7995 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7996 (cp_canonicalize_string_full): Use op= instead of explicit
7997 convertion.
7998 (cp_class_name_from_physname, method_name_from_physname)
7999 (cp_func_name, cp_remove_params): Adjust to use
8000 gdb::unique_xmalloc_ptr<char>.
8001 * cp-support.h (cp_comp_to_string): Return a
8002 gdb::unique_xmalloc_ptr<char>.
8003 * python/py-type.c (typy_lookup_type): Adjust to use
8004 gdb::unique_xmalloc_ptr<char>.
8005
8006 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8007
8008 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8009
8010 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8011 Yao Qi <yao.qi@linaro.org>
8012
8013 * cp-support.c (cp_canonicalize_string_full): Use
8014 gdb::unique_xmalloc_ptr<char>.
8015 (cp_canonicalize_string): Likewise.
8016
8017 2017-08-09 Yao Qi <yao.qi@linaro.org>
8018
8019 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8020 * regformats/i386/amd64-avx-avx512.dat: Remove.
8021 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8022 * regformats/i386/amd64-avx-mpx.dat:Remove.
8023 * regformats/i386/amd64-avx.dat: Remove.
8024 * regformats/i386/amd64-mpx.dat: Remove.
8025 * regformats/i386/i386-avx-avx512.dat: Remove.
8026 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8027 * regformats/i386/i386-avx-mpx.dat: Remove.
8028 * regformats/i386/i386-mmx.dat: Remove.
8029 * regformats/i386/i386-mpx.dat: Remove.
8030
8031 2017-08-09 Yao Qi <yao.qi@linaro.org>
8032
8033 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8034 * amd64-tdep.c: Don't include features/i386/x32*.c.
8035 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8036 functions.
8037 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8038 and i386/x32-avx-avx512.
8039 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8040 and i386/x32.xml.
8041 * features/i386/x32-avx-avx512.c: Removed.
8042 * features/i386/x32-avx-avx512.xml: Removed.
8043 * features/i386/x32-avx.c: Removed.
8044 * features/i386/x32-avx.xml: Removed.
8045 * features/i386/x32.c: Removed.
8046 * features/i386/x32.xml: Removed.
8047 * regformats/i386/x32-avx-avx512.dat: Removed.
8048 * regformats/i386/x32-avx.dat: Removed.
8049 * regformats/i386/x32.dat: Removed.
8050
8051 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8052
8053 PR breakpoints/21886
8054 * mem-break.c (default_memory_insert_breakpoint): Use
8055 `->placed_address' rather than `->reqstd_address' for the
8056 breakpoint location.
8057
8058 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8059
8060 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8061 assertions.
8062
8063 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8064
8065 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8066 a union of `tdep_info', `tdesc_data' and `id'.
8067 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8068 rather than `info.tdep_info'.
8069 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8070 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8071 * i386-tdep.c (i386_gdbarch_init): Likewise.
8072 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8073 * mips-tdep.c (mips_gdbarch_init): Likewise.
8074 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8075 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8076 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8077 `info.tdep_info'.
8078 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8079 `info.tdep_info'.
8080 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8081 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8082 `info.tdep_info'.
8083 * spu-tdep.c (spu_gdbarch_init): Likewise.
8084 * gdbarch.h: Regenerate.
8085
8086 2017-08-07 Leszek Swirski <leszeks@google.com>
8087
8088 PR symtab/20899
8089 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8090
8091 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8092
8093 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8094 (gdbsim_open): Rename gdb_argv args object to argv.
8095
8096 2017-08-05 Tom Tromey <tom@tromey.com>
8097
8098 * compile/compile-object-load.c (compile_object_load): Use
8099 gdb::unique_xmalloc_ptr.
8100 * cli/cli-dump.c (scan_filename): Rename from
8101 scan_filename_with_cleanup. Change return type.
8102 (scan_expression): Rename from scan_expression_with_cleanup.
8103 Change return type.
8104 (dump_memory_to_file, dump_value_to_file, restore_command):
8105 Use gdb::unique_xmalloc_ptr. Update.
8106 * cli/cli-cmds.c (find_and_open_script): Use
8107 gdb::unique_xmalloc_ptr.
8108 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8109 * symmisc.c (maintenance_print_symbols)
8110 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8111 * symfile.c (symfile_bfd_open, generic_load)
8112 (add_symbol_file_command, remove_symbol_file_command): Use
8113 gdb::unique_xmalloc_ptr.
8114 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8115 * psymtab.c (maintenance_print_psymbols): Use
8116 gdb::unique_xmalloc_ptr.
8117 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8118 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8119 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8120 (reload_shared_libraries_1): Likewise.
8121
8122 2017-08-05 Tom Tromey <tom@tromey.com>
8123
8124 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8125 (rust_op_vector, rust_set_vector): New typedefs.
8126 (current_parser): New global.
8127 (work_obstack): Change to pointer type. Update all users.
8128 (rust_ast, pstate): Remove globals.
8129 (struct rust_parser): New.
8130 (%union) <params, field_inits>: Change type.
8131 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8132 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8133 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8134 (convert_params_to_types, convert_params_to_expression): Change
8135 type of "params".
8136 (ast_string): Change type of "fields".
8137 (rust_parse): Make a rust_parser. Remove cleanups.
8138 (rust_lex_tests): Make and install an auto_obstack.
8139
8140 2017-08-04 Yao Qi <yao.qi@linaro.org>
8141
8142 * configure.srv (ipa_x32_linux_regobj): New.
8143 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8144 instead of X86_TDESC_AVX512.
8145 (initialize_low_tracepoint): Call
8146 init_registers_x32_avx_avx512_linux.
8147
8148 2017-08-04 Yao Qi <yao.qi@linaro.org>
8149
8150 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8151
8152 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8153
8154 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8155
8156 2017-08-03 Tom Tromey <tom@tromey.com>
8157
8158 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8159 Remove.
8160 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8161
8162 2017-08-03 Tom Tromey <tom@tromey.com>
8163
8164 * python/py-param.c (compute_enum_values): Use gdb_argv.
8165
8166 2017-08-03 Tom Tromey <tom@tromey.com>
8167
8168 * utils.h (struct gdb_argv_deleter): New.
8169 (gdb_argv): New class.
8170 * utils.c (gdb_argv::reset): New method.
8171 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8172 * tracefile.c (tsave_command): Use gdb_argv.
8173 * top.c (new_ui_command): Use gdb_argv.
8174 * symmisc.c (maintenance_print_symbols)
8175 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8176 * symfile.c (symbol_file_command, generic_load)
8177 (remove_symbol_file_command): Use gdb_argv.
8178 * stack.c (backtrace_command): Use gdb_argv.
8179 * source.c (add_path, show_substitute_path_command)
8180 (unset_substitute_path_command, set_substitute_path_command):
8181 Use gdb_argv.
8182 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8183 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8184 * remote.c (extended_remote_run, remote_put_command)
8185 (remote_get_command, remote_delete_command): Use gdb_argv.
8186 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8187 (gdbsim_open): Use gdb_argv.
8188 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8189 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8190 * procfs.c (procfs_info_proc): Use gdb_argv.
8191 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8192 * infrun.c (handle_command): Use gdb_argv.
8193 * inferior.c (add_inferior_command, clone_inferior_command):
8194 Use gdb_argv.
8195 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8196 * exec.c (exec_file_command): Use gdb_argv.
8197 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8198 * compile/compile.c (build_argc_argv): Use gdb_argv.
8199
8200 2017-08-03 Tom Tromey <tom@tromey.com>
8201
8202 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8203
8204 2017-08-03 Tom Tromey <tom@tromey.com>
8205
8206 * python/python.c (compute_python_string): Return std::string.
8207 (gdbpy_eval_from_control_command): Update.
8208 (do_start_initialization): Use std::string.
8209 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8210 xstrprintf.
8211 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8212 xstrprintf.
8213
8214 2017-08-03 Tom Tromey <tom@tromey.com>
8215
8216 * top.h (do_restore_instream_cleanup): Remove.
8217 * top.c (do_restore_instream_cleanup): Remove.
8218 (read_command_file): Use scoped_restore.
8219 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8220
8221 2017-08-03 Tom Tromey <tom@tromey.com>
8222
8223 * cli/cli-script.c (execute_user_command)
8224 (execute_control_command): Use scoped_restore.
8225
8226 2017-08-03 Tom Tromey <tom@tromey.com>
8227
8228 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8229 (execute_user_command): Remove user_call_depth; use
8230 user_args_stack's size instead.
8231
8232 2017-08-03 Tom Tromey <tom@tromey.com>
8233
8234 * top.h (in_user_command): Remove.
8235 * top.c (in_user_command): Remove.
8236 * cli/cli-script.c (do_restore_user_call_depth)
8237 (execute_user_command): Update.
8238
8239 2017-08-03 Tom Tromey <tom@tromey.com>
8240
8241 * valops.c (search_struct_method): Use gdb::byte_vector.
8242 * valarith.c (value_concat): Use std::vector.
8243 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8244 (simple_search_memory): Likewise.
8245 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8246 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8247 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8248 * elfread.c (elf_rel_plt_read): Use std::string.
8249 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8250 * cli/cli-dump.c (restore_section_callback): Use
8251 gdb::byte_vector.
8252
8253 2017-08-03 Tom Tromey <tom@tromey.com>
8254
8255 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8256
8257 2017-08-03 Tom Tromey <tom@tromey.com>
8258
8259 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8260 (tui_register_format): Use scoped_restore.
8261
8262 2017-08-03 Tom Tromey <tom@tromey.com>
8263
8264 * reverse.c (exec_direction_default): Remove.
8265 (exec_reverse_once): Use scoped_restore.
8266 * remote.c (restore_remote_timeout): Remove.
8267 (remote_flash_erase, remote_flash_write, remote_flash_done)
8268 (readchar, remote_serial_write): Use scoped_restore.
8269 * cli/cli-script.c (struct source_cleanup_lines_args)
8270 (source_cleanup_lines): Remove.
8271 (script_from_file): Use scoped_restore.
8272 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8273 (source_command): Use scoped_restore.
8274
8275 2017-08-03 Tom Tromey <tom@tromey.com>
8276
8277 * utils.h (make_cleanup_free_so): Remove.
8278 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8279 * solist.h (struct so_deleter): New.
8280 (so_list_up): New typedef.
8281 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8282
8283 2017-08-03 Tom Tromey <tom@tromey.com>
8284
8285 * utils.h (make_cleanup_restore_current_language): Remove.
8286 * utils.c (do_restore_current_language)
8287 (make_cleanup_restore_current_language): Remove.
8288 * parse.c (parse_exp_in_context_1)
8289 (parse_expression_with_language): Use
8290 scoped_restore_current_language.
8291 * mi/mi-main.c (mi_cmd_execute): Use
8292 scoped_restore_current_language.
8293 * language.h (scoped_restore_current_language): New class.
8294
8295 2017-08-03 Tom Tromey <tom@tromey.com>
8296
8297 * compile/compile.c (cleanup_unlink_file): Remove.
8298 (compile_to_object): Use gdb::unlinker.
8299 (eval_compile_command): Likewise.
8300
8301 2017-08-03 Tom Tromey <tom@tromey.com>
8302
8303 * utils.h (make_cleanup_fclose): Remove.
8304 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8305
8306 2017-08-03 Tom Tromey <tom@tromey.com>
8307
8308 * top.c (open_terminal_stream): Return gdb_file_up.
8309 (new_ui_command): Update.
8310
8311 2017-08-03 Tom Tromey <tom@tromey.com>
8312
8313 * source.c (print_source_lines_base, forward_search_command)
8314 (reverse_search_command): Use gdb_file_up.
8315
8316 2017-08-03 Tom Tromey <tom@tromey.com>
8317
8318 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8319
8320 2017-08-03 Tom Tromey <tom@tromey.com>
8321
8322 * cli/cli-cmds.c (find_and_open_script): Change return type.
8323 Remove "streamp" and "full_path" parameters.
8324 (source_script_with_search): Update.
8325 * auto-load.c (source_script_file): Update.
8326 * cli/cli-cmds.h (find_and_open_script): Change type.
8327 (open_script): New struct.
8328
8329 2017-08-03 Tom Tromey <tom@tromey.com>
8330
8331 * xml-support.c (xml_fetch_content_from_file): Update.
8332 * ui-file.c (stdio_file::open): Update.
8333 * tracefile-tfile.c (tfile_start): Update.
8334 * remote.c (remote_file_put, remote_file_get): Update.
8335 * nat/linux-procfs.c (linux_proc_get_int)
8336 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8337 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8338 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8339 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8340 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8341 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8342 * linux-nat.c (linux_proc_pending_signals): Update.
8343 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8344 (file_closer): Remove.
8345 * compile/compile.c (compile_to_object): Update.
8346 * common/filestuff.h (struct gdb_file_deleter): New.
8347 (gdb_file_up): New typedef.
8348 (gdb_fopen_cloexec): Change return type.
8349 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8350 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8351 (dump_binary_file, restore_binary_file): Update.
8352 * auto-load.c (auto_load_objfile_script_1): Update.
8353
8354 2017-08-03 Tom Tromey <tom@tromey.com>
8355
8356 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8357 (info_static_tracepoint_markers_command): Likewise.
8358 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8359 * skip.c (skip_info): Use ui_out_emit_table.
8360 * progspace.c (print_program_space): Use ui_out_emit_table.
8361 * osdata.c (info_osdata): Use ui_out_emit_table.
8362 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8363 ui_out_emit_table.
8364 * linux-thread-db.c (info_auto_load_libthread_db): Use
8365 ui_out_emit_table.
8366 * inferior.c (print_inferior): Use ui_out_emit_table.
8367 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8368 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8369 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8370 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8371 * ui-out.h (class ui_out_emit_table): New.
8372
8373 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8374
8375 * mips-tdep.c (mips_fpu_type_str): New function.
8376 (mips_dump_tdep): Call it.
8377
8378 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8379
8380 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8381 `->mips_fpu_type'.
8382
8383 2017-07-31 Xavier Roirand <roirand@adacore.com>
8384
8385 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8386
8387 2017-07-27 Xavier Roirand <roirand@adacore.com>
8388
8389 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8390
8391 2017-07-26 Yao Qi <yao.qi@linaro.org>
8392
8393 * cli/cli-cmds.c (maintenancechecklist): New variable.
8394 * gdbcmd.h (maintenancechecklist): Declare it.
8395 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8396 Call i386_linux_read_description with different masks.
8397 * maint.c (maintenance_check_command): New function.
8398 (_initialize_maint_cmds): Call add_prefix_cmd.
8399 * target-descriptions.c (tdesc_reg): override operator != and ==.
8400 (tdesc_type): Likewise.
8401 (tdesc_feature): Likewise.
8402 (target_desc): Likewise.
8403 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8404 (maintenance_check_xml_descriptions): New function.
8405 (_initialize_target_descriptions) Add command "xml-descriptions".
8406 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8407
8408 2017-07-26 Yao Qi <yao.qi@linaro.org>
8409
8410 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8411 Include features/i386/32bit-*.c.
8412 (i386_linux_read_description): Generate target description if it
8413 doesn't exist.
8414 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8415 functions.
8416 * features/i386/32bit-linux.c: Re-generated.
8417 * features/i386/32bit-sse.c: Likewise.
8418 * target-descriptions.c (print_c_feature::visit): Print code to
8419 set register number if needed.
8420 (print_c_feature) <m_next_regnum>: New field.
8421
8422 2017-07-26 Yao Qi <yao.qi@linaro.org>
8423
8424 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8425 (FEATURE_XMLFILES): New.
8426 (FEATURE_CFILES): New.
8427 New rules.
8428 (clean-cfiles): Remove generated c files.
8429 * features/i386/32bit-avx.c: Generated.
8430 * features/i386/32bit-avx512.c: Generated.
8431 * features/i386/32bit-core.c: Generated.
8432 * features/i386/32bit-linux.c: Generated.
8433 * features/i386/32bit-mpx.c: Generated.
8434 * features/i386/32bit-pkeys.c: Generated.
8435 * features/i386/32bit-sse.c: Generated.
8436 * target-descriptions.c: Include algorithm.
8437 (tdesc_element_visitor): Add method visit_end.
8438 (print_c_tdesc): Implement visit_end.
8439 (print_c_tdesc:: m_filename_after_features): Move it to
8440 protected.
8441 (print_c_feature): New class.
8442 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8443 name starts with "i386/32bit-".
8444
8445 2017-07-26 Yao Qi <yao.qi@linaro.org>
8446
8447 * target-descriptions.c (tdesc_element_visitor): New class.
8448 (tdesc_element): New class.
8449 (tdesc_reg): Inherit from tdesc_element.
8450 (tdesc_reg::accept): New function.
8451 (tdesc_type): Inherit from tdesc_element.
8452 (tdesc_type::accept): New function.
8453 (tdesc_feature): Inherit from tdesc_element.
8454 (tdesc_feature::accept): New function.
8455 (target_desc): Inherit from tdesc_element.
8456 (target_desc::target_desc): New.
8457 (target_desc::~target_desc): New.
8458 (target_desc::accept): New.
8459 (allocate_target_description): Use new.
8460 (free_target_description): Use delete.
8461 (print_c_tdesc): New class.
8462 (maint_print_c_tdesc_cmd): Adjust.
8463
8464 * features/aarch64.c: Re-generated.
8465 * features/arc-arcompact.c: Re-generated.
8466 * features/arc-v2.c: Re-generated.
8467 * features/arm/arm-with-iwmmxt.c: Re-generated.
8468 * features/arm/arm-with-m.c: Re-generated.
8469 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8470 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8471 * features/arm/arm-with-neon.c: Re-generated.
8472 * features/arm/arm-with-vfpv2.c: Re-generated.
8473 * features/arm/arm-with-vfpv3.c: Re-generated.
8474 * features/i386/amd64-avx-avx512.c: Re-generated.
8475 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8476 * features/i386/amd64-avx.c: Re-generated.
8477 * features/i386/amd64-avx-linux.c: Re-generated.
8478 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8479 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8480 * features/i386/amd64-avx-mpx.c: Re-generated.
8481 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8482 * features/i386/amd64.c: Re-generated.
8483 * features/i386/amd64-linux.c: Re-generated.
8484 * features/i386/amd64-mpx.c: Re-generated.
8485 * features/i386/amd64-mpx-linux.c: Re-generated.
8486 * features/i386/i386-avx-avx512.c: Re-generated.
8487 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8488 * features/i386/i386-avx.c: Re-generated.
8489 * features/i386/i386-avx-linux.c: Re-generated.
8490 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8491 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8492 * features/i386/i386-avx-mpx.c: Re-generated.
8493 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8494 * features/i386/i386.c: Re-generated.
8495 * features/i386/i386-linux.c: Re-generated.
8496 * features/i386/i386-mmx.c: Re-generated.
8497 * features/i386/i386-mmx-linux.c: Re-generated.
8498 * features/i386/i386-mpx.c: Re-generated.
8499 * features/i386/i386-mpx-linux.c: Re-generated.
8500 * features/i386/x32-avx-avx512.c: Re-generated.
8501 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8502 * features/i386/x32-avx.c: Re-generated.
8503 * features/i386/x32-avx-linux.c: Re-generated.
8504 * features/i386/x32.c: Re-generated.
8505 * features/i386/x32-linux.c: Re-generated.
8506 * features/microblaze.c: Re-generated.
8507 * features/microblaze-with-stack-protect.c: Re-generated.
8508 * features/mips64-dsp-linux.c: Re-generated.
8509 * features/mips64-linux.c: Re-generated.
8510 * features/mips-dsp-linux.c: Re-generated.
8511 * features/mips-linux.c: Re-generated.
8512 * features/nds32.c: Re-generated.
8513 * features/nios2.c: Re-generated.
8514 * features/nios2-linux.c: Re-generated.
8515 * features/rs6000/powerpc-32.c: Re-generated.
8516 * features/rs6000/powerpc-32l.c: Re-generated.
8517 * features/rs6000/powerpc-403.c: Re-generated.
8518 * features/rs6000/powerpc-403gc.c : Re-generated.
8519 * features/rs6000/powerpc-405.c: Re-generated.
8520 * features/rs6000/powerpc-505.c: Re-generated.
8521 * features/rs6000/powerpc-601.c: Re-generated.
8522 * features/rs6000/powerpc-602.c: Re-generated.
8523 * features/rs6000/powerpc-603.c: Re-generated.
8524 * features/rs6000/powerpc-604.c: Re-generated.
8525 * features/rs6000/powerpc-64.c: Re-generated.
8526 * features/rs6000/powerpc-64l.c: Re-generated.
8527 * features/rs6000/powerpc-7400.c: Re-generated.
8528 * features/rs6000/powerpc-750.c: Re-generated.
8529 * features/rs6000/powerpc-860.c: Re-generated.
8530 * features/rs6000/powerpc-altivec32.c: Re-generated.
8531 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8532 * features/rs6000/powerpc-altivec64.c: Re-generated.
8533 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8534 * features/rs6000/powerpc-cell32l.c: Re-generated.
8535 * features/rs6000/powerpc-cell64l.c: Re-generated.
8536 * features/rs6000/powerpc-e500.c: Re-generated.
8537 * features/rs6000/powerpc-e500l.c: Re-generated.
8538 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8539 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8540 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8541 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8542 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8543 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8544 * features/rs6000/powerpc-vsx32.c: Re-generated.
8545 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8546 * features/rs6000/powerpc-vsx64.c: Re-generated.
8547 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8548 * features/rs6000/rs6000.c: Re-generated.
8549 * features/s390-linux32.c: Re-generated.
8550 * features/s390-linux32v1.c: Re-generated.
8551 * features/s390-linux32v2.c: Re-generated.
8552 * features/s390-linux64.c: Re-generated.
8553 * features/s390-linux64v1.c: Re-generated.
8554 * features/s390-linux64v2.c: Re-generated.
8555 * features/s390-te-linux64.c: Re-generated.
8556 * features/s390-tevx-linux64.c: Re-generated.
8557 * features/s390-vx-linux64.c: Re-generated.
8558 * features/s390x-linux64.c: Re-generated.
8559 * features/s390x-linux64v1.c: Re-generated.
8560 * features/s390x-linux64v2.c: Re-generated.
8561 * features/s390x-te-linux64.c: Re-generated.
8562 * features/s390x-tevx-linux64.c: Re-generated.
8563 * features/s390x-vx-linux64.c: Re-generated.
8564 * features/sparc/sparc32-solaris.c: Re-generated.
8565 * features/sparc/sparc64-solaris.c: Re-generated.
8566 * features/tic6x-c62x.c: Re-generated.
8567 * features/tic6x-c62x-linux.c: Re-generated.
8568 * features/tic6x-c64x.c: Re-generated.
8569 * features/tic6x-c64x-linux.c: Re-generated.
8570 * features/tic6x-c64xp.c: Re-generated.
8571 * features/tic6x-c64xp-linux.c: Re-generated.
8572
8573 2017-07-26 Yao Qi <yao.qi@linaro.org>
8574
8575 * i386-linux-tdep.c (i386_linux_read_description): New function.
8576 (i386_linux_core_read_description): Call
8577 i386_linux_read_description.
8578 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8579 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8580 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8581 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8582 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8583 * x86-linux-nat.c (x86_linux_read_description): Call
8584 i386_linux_read_description.
8585
8586 2017-07-26 Yao Qi <yao.qi@linaro.org>
8587
8588 * NEWS: Mention it.
8589 * features/Makefile (%.c: %.xml): Pass the xml file name to
8590 command "maint print c-tdesc".
8591 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8592 name from 'arg'.
8593
8594 2017-07-26 Yao Qi <yao.qi@linaro.org>
8595
8596 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8597 in-class initialization.
8598 (tdesc_create_feature): Call new instead of XCNEW.
8599 (free_target_description): Ue delete.
8600
8601 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8602
8603 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8604
8605 2017-07-25 Yao Qi <yao.qi@linaro.org>
8606
8607 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8608 constant.
8609 (amd64_x32_init_abi): Likewise.
8610 * amd64-tdep.h (amd64_init_abi): Update declaration.
8611 (amd64_x32_init_abi): Likewise.
8612
8613 2017-07-25 Yao Qi <yao.qi@linaro.org>
8614
8615 PR tdep/21717
8616 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8617 condition for FPSCR.
8618 (arm_linux_store_inferior_registers): Likewise.
8619
8620 2017-07-22 Tom Tromey <tom@tromey.com>
8621
8622 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8623 <syscalls_counts>: Now a std::vector.
8624 (get_catch_syscall_inferior_data): Use "new".
8625 (catch_syscall_inferior_data_cleanup): Use "delete".
8626 (insert_catch_syscall, remove_catch_syscall)
8627 (clear_syscall_counts): Update.
8628
8629 2017-07-22 Tom Tromey <tom@tromey.com>
8630
8631 * break-catch-syscall.c (syscall_catchpoint)
8632 <syscalls_to_be_caught>: Now a std::vector<int>
8633 (~syscall_catchpoint): Remove.
8634 (insert_catch_syscall, remove_catch_syscall)
8635 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8636 (print_mention_catch_syscall, print_recreate_catch_syscall):
8637 Update.
8638 (create_syscall_event_catchpoint): Change type of "filter"
8639 parameter.
8640 (catch_syscall_split_args): Return a std::vector.
8641 (catch_syscall_command_1, catching_syscall_number_1): Update.
8642
8643 2017-07-22 Tom Tromey <tom@tromey.com>
8644
8645 * break-catch-throw.c (struct exception_catchpoint)
8646 <exception_rx>: Now a std::string.
8647 (~exception_catchpoint): Remove.
8648 (print_one_detail_exception_catchpoint): Update.
8649 (handle_gnu_v3_exceptions): Change type of except_rx.
8650 (extract_exception_regexp): Return a std::string.
8651 (catch_exception_command_1): Update.
8652
8653 2017-07-22 Tom Tromey <tom@tromey.com>
8654
8655 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8656 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8657 std::vector.
8658 <catch_all>: Now a bool.
8659 (~signal_catchpoint): Remove.
8660 (signal_catchpoint_insert_location)
8661 (signal_catchpoint_remove_location)
8662 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8663 (signal_catchpoint_print_mention)
8664 (signal_catchpoint_print_recreate)
8665 (signal_catchpoint_explains_signal): Update.
8666 (create_signal_catchpoint): Change type of "filter" and
8667 "catch_all".
8668 (catch_signal_split_args): Return a std::vector. Change type of
8669 "catch_all".
8670 (catch_signal_command): Update.
8671
8672 2017-07-20 Pedro Alves <palves@redhat.com>
8673
8674 * ada-lang.c (ada_language_defn): Make extern.
8675 (_initialize_ada_language): Remove add_language call.
8676 * c-lang.c (c_language_defn, cplus_language_defn)
8677 (asm_language_defn, minimal_language_defn): Make extern.
8678 (_initialize_c_language): Delete.
8679 * completer.c (compare_cstrings): Delete, moved to utils.h.
8680 * d-lang.c (d_language_defn): Make extern.
8681 (_initialize_d_language): Remove add_language calls.
8682 * defs.h (enum language): Add comment.
8683 * f-lang.c (f_language_defn): Make extern.
8684 (_initialize_f_language): Remove add_language call.
8685 * go-lang.c (go_language_defn): Make extern.
8686 (_initialize_go_language): Remove add_language call.
8687 * language.c: Include <algorithm>.
8688 (languages): Redefine as const array.
8689 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8690 (set_language_command): Handle "local". Use for-range loop.
8691 (set_language): Remove loop.
8692 (language_enum): Rewrite.
8693 (language_def, language_str): Remove loops.
8694 (add_language): Delete.
8695 (add_set_language_command): New, based on add_languages.
8696 (skip_language_trampoline): Adjust.
8697 (local_language_defn): Delete.
8698 (language_gdbarch_post_init): Adjust.
8699 (_initialize_language): Remove add_language calls. Call
8700 add_set_language_command.
8701 * language.h (add_language): Delete.
8702 (auto_language_defn)
8703 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8704 (asm_language_defn, c_language_defn, cplus_language_defn)
8705 (d_language_defn, f_language_defn, go_language_defn)
8706 (m2_language_defn, objc_language_defn, opencl_language_defn)
8707 (pascal_language_defn, rust_language_defn): Declare.
8708 * m2-lang.c (m2_language_defn): Make extern.
8709 (_initialize_m2_language): Remove add_language call.
8710 * objc-lang.c (objc_language_defn): Make extern.
8711 (_initialize_objc_language): Remove add_language call.
8712 * opencl-lang.c (opencl_language_defn): Make extern.
8713 (_initialize_opencl_language): Remove add_language call.
8714 * p-lang.c (pascal_language_defn): Make extern.
8715 (_initialize_pascal_language): Delete.
8716 * rust-lang.c (rust_language_defn): Make extern.
8717 (_initialize_rust_language): Delete.
8718 * utils.h (compare_cstrings): New static inline function.
8719
8720 2017-07-20 Pedro Alves <palves@redhat.com>
8721
8722 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8723 (get_var_value): Constify parameters.
8724 (get_int_var_value): Change prototype.
8725 (to_fixed_range_type): Adjust.
8726 * ada-lang.h (get_int_var_value): Change prototype.
8727
8728 2017-07-20 Pedro Alves <palves@redhat.com>
8729
8730 * dwarf2read.c (dw2_lookup_symbol): Use
8731 SYMBOL_MATCHES_SEARCH_NAME.
8732 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8733
8734 2017-07-20 Pedro Alves <palves@redhat.com>
8735
8736 * block.c (block_iter_name_step, block_iter_name_first)
8737 (block_iter_name_next): Delete.
8738 (block_lookup_symbol_primary): Adjust to use
8739 dict_iter_match_first/dict_iter_match_next.
8740 * block.h (block_iter_name_first, block_iter_name_next): Delete
8741 declarations.
8742 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8743 dict_iter_match_first/dict_iter_match_next.
8744
8745 2017-07-20 Pedro Alves <palves@redhat.com>
8746
8747 * cp-support.c (cp_find_first_component_aux): Add missing case for
8748 end of string.
8749
8750 2017-07-18 David Blaikie <dblaikie@gmail.com>
8751
8752 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8753 of dwo_cu's dwo_file.
8754
8755 2017-07-18 Yao Qi <yao.qi@linaro.org>
8756
8757 * remote.c (store_registers_using_G): Remove one line comment.
8758
8759 2017-07-18 Yao Qi <yao.qi@linaro.org>
8760
8761 * regcache.c (regcache_cpy): Simplify it.
8762 (regcache::cpy_no_passthrough): Remove it.
8763 * regcache.h (cpy_no_passthrough): Remove it.
8764 (regcache_dup, regcache_cpy): Update comments.
8765
8766 2017-07-18 Pedro Alves <palves@redhat.com>
8767
8768 * remote-sim.c (sim_command_completer): Adjust to work with a
8769 completion_tracker instead of a VEC.
8770
8771 2017-07-17 Pedro Alves <palves@redhat.com>
8772
8773 * completer.c (complete_source_filenames): New function.
8774 (complete_address_and_linespec_locations): New function.
8775 (location_completer): Use complete_address_and_linespec_locations.
8776 (completion_tracker::build_completion_result): Honor the tracker's
8777 request to suppress append.
8778 * completer.h (completion_tracker::suppress_append_ws)
8779 (completion_tracker::set_suppress_append_ws): New methods.
8780 (completion_tracker::m_suppress_append_ws): New field.
8781 (complete_source_filenames): New declaration.
8782 * linespec.c (linespec_complete_what): New.
8783 (struct ls_parser) <complete_what, completion_word,
8784 completion_quote_char, completion_quote_end, completion_tracker>:
8785 New fields.
8786 (string_find_incomplete_keyword_at_end): New.
8787 (linespec_lexer_lex_string): Record quote char. If in completion
8788 mode, don't throw.
8789 (linespec_lexer_consume_token): Advance the completion word point.
8790 (linespec_lexer_peek_token): Save/restore completion info.
8791 (save_stream_and_consume_token): New.
8792 (set_completion_after_number): New.
8793 (linespec_parse_basic): Set what to complete next depending on
8794 token. Handle function and label completions specially.
8795 (parse_linespec): Disable objc shortcut in completion mode. Set
8796 what to complete next depending on token type. Skip keyword if in
8797 completion mode.
8798 (complete_linespec_component, linespec_complete): New.
8799 * linespec.h (linespec_complete): Declare.
8800
8801 2017-07-17 Pedro Alves <palves@redhat.com>
8802
8803 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8804 Handle 'operator<' / 'operator<<'.
8805
8806 2017-07-17 Pedro Alves <palves@redhat.com>
8807
8808 * completer.c (collect_explicit_location_matches): Handle
8809 MATCH_LABEL.
8810 (convert_explicit_location_to_linespec): New, factored out from
8811 ...
8812 (convert_explicit_location_to_sals): ... this.
8813 (complete_label): New.
8814 (linespec_complete_label, find_label_symbols_in_block): New.
8815 (find_label_symbols): Add completion_mode parameter and adjust to
8816 call find_label_symbols_in_block.
8817 * linespec.h (linespec_complete_label): Declare.
8818
8819 2017-07-17 Pedro Alves <palves@redhat.com>
8820
8821 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8822 complete_symbol_mode parameter.
8823 * cli/cli-cmds.c (complete_command): Get the completion result out
8824 of the handle_brkchars tracker if used a custom word point.
8825 * completer.c: Include "linespec.h".
8826 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8827 (advance_to_expression_complete_word_point): New.
8828 (completion_tracker::completes_to_completion_word): New.
8829 (complete_files_symbols): Pass down
8830 complete_symbol_mode::EXPRESSION.
8831 (explicit_options, probe_options): New.
8832 (collect_explicit_location_matches): Complete on the
8833 explictit_loc->foo instead of word. Use
8834 linespec_complete_function. Handle MATCH_LINE. Handle offering
8835 keyword and options completions.
8836 (backup_text_ptr): Delete.
8837 (skip_keyword): New.
8838 (complete_explicit_location): Remove 'word' parameter. Add
8839 language, quoted_arg_start and quoted_arg_end parameters.
8840 Rewrite, parsing left to right.
8841 (location_completer): Rewrite.
8842 (location_completer_handle_brkchars): New function.
8843 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8844 (enum complete_line_internal_reason): Adjust comments.
8845 (completion_tracker::discard_completions): New.
8846 (completer_handle_brkchars_func_for_completer): Handle
8847 location_completer.
8848 (gdb_custom_word_point_brkchars)
8849 (gdb_org_rl_basic_quote_characters): New.
8850 (gdb_completion_word_break_characters_throw)
8851 (completion_find_completion_word): Handle trackers that use a
8852 custom word point.
8853 (completion_tracker::advance_custom_word_point_by): New.
8854 (completion_tracker::build_completion_result): Don't rely on
8855 readline appending the quote char.
8856 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8857 use a custom word point.
8858 (gdb_rl_attempted_completion_function): Restore
8859 rl_basic_quote_characters.
8860 * completer.h (class completion_tracker): Extend intro comment.
8861 (completion_tracker::set_quote_char)
8862 (completion_tracker::quote_char)
8863 (completion_tracker::set_use_custom_word_point)
8864 (completion_tracker::use_custom_word_point)
8865 (completion_tracker::custom_word_point)
8866 (completion_tracker::set_custom_word_point)
8867 (completion_tracker::advance_custom_word_point_by)
8868 (completion_tracker::completes_to_completion_word)
8869 (completion_tracker::discard_completions): New methods.
8870 (completion_tracker::m_quote_char)
8871 (completion_tracker::m_use_custom_word_point)
8872 (completion_tracker::m_custom_word_point): New fields.
8873 (advance_to_expression_complete_word_point): Declare.
8874 * f-lang.c (f_collect_symbol_completion_matches): Add
8875 complete_symbol_mode parameter.
8876 * language.h (struct language_defn)
8877 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8878 parameter.
8879 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8880 (linespec_complete_function): New function.
8881 (linespec_lexer_lex_keyword): Adjust.
8882 * linespec.h (linespec_keywords, linespec_complete_function): New
8883 declarations.
8884 * location.c (find_end_quote): New function.
8885 (explicit_location_lex_one): Add explicit_completion_info
8886 parameter. Save quoting info. Don't throw if being called for
8887 completion. Don't handle Ada operators here.
8888 (is_cp_operator, skip_op_false_positives, first_of)
8889 (explicit_location_lex_one_function): New function.
8890 (string_to_explicit_location): Replace 'dont_throw' parameter with
8891 an explicit_completion_info pointer parameter. Handle it. Don't
8892 use explicit_location_lex_one to lex function names. Use
8893 explicit_location_lex_one_function instead.
8894 * location.h (struct explicit_completion_info): New.
8895 (string_to_explicit_location): Replace 'dont_throw' parameter with
8896 an explicit_completion_info pointer parameter.
8897 * symtab.c (default_collect_symbol_completion_matches_break_on):
8898 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8899 (default_collect_symbol_completion_matches)
8900 (collect_symbol_completion_matches): Add complete_symbol_mode
8901 parameter.
8902 (collect_symbol_completion_matches_type): Pass down
8903 complete_symbol_mode::EXPRESSION.
8904 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8905 parameter. Handle LINESPEC mode.
8906 * symtab.h (complete_symbol_mode): New.
8907 (default_collect_symbol_completion_matches_break_on)
8908 (default_collect_symbol_completion_matches)
8909 (collect_symbol_completion_matches)
8910 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8911 parameter.
8912
8913 2017-07-17 Pedro Alves <palves@redhat.com>
8914
8915 * utils.c (enum class strncmp_iw_mode): New.
8916 (strcmp_iw): Rename to ...
8917 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8918 parameters. Handle them.
8919 (strncmp_iw): New.
8920 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8921 * utils.h (strncmp_iw): Declare.
8922 (strcmp_iw): Move describing comments here.
8923
8924 2017-07-17 Pedro Alves <palves@redhat.com>
8925
8926 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8927 CP_OPERATOR_STR.
8928 * c-typeprint.c (is_type_conversion_operator): Use
8929 CP_OPERATOR_STR.
8930 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8931 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8932 CP_OPERATOR_LEN.
8933 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8934 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8935 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8936 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8937 CP_OPERATOR_STR.
8938 * location.c: Include "cp-support.h".
8939 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8940 CP_OPERATOR_STR.
8941 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8942 CP_OPERATOR_LEN.
8943
8944 2017-07-17 Pedro Alves <palves@redhat.com>
8945
8946 * cli/cli-cmds.c (complete_command): Use a completion tracker
8947 along with completion_find_completion_word for handle_brkchars
8948 phase.
8949 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8950 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8951 (struct gdb_rl_completion_word_info): New.
8952 (gdb_rl_find_completion_word): New.
8953 (completion_find_completion_word): New.
8954 * completer.h (completion_find_completion_word): Declare.
8955
8956 2017-07-17 Pedro Alves <palves@redhat.com>
8957
8958 * ada-lang.c (symbol_completion_match): Adjust comments.
8959 (symbol_completion_add): Replace vector parameter with
8960 completion_tracker parameter. Use it.
8961 (ada_make_symbol_completion_list): Rename to...
8962 (ada_collect_symbol_completion_matches): ... this. Add
8963 completion_tracker parameter and use it.
8964 (ada_language_defn): Adjust.
8965 * break-catch-syscall.c (catch_syscall_completer): Adjust
8966 prototype and work with completion_tracker instead of VEC.
8967 * breakpoint.c (condition_completer): Adjust prototype and work
8968 with completion_tracker instead of VEC.
8969 * c-lang.c (c_language_defn, cplus_language_defn)
8970 (asm_language_defn, minimal_language_defn): Adjust to renames.
8971 * cli/cli-cmds.c (complete_command): Rework using
8972 completion_tracker. Catch exceptions when completing.
8973 * cli/cli-decode.c (integer_unlimited_completer)
8974 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8975 with completion_tracker instead of VEC.
8976 * command.h (struct completion_tracker): Forward declare.
8977 (completer_ftype, completer_handle_brkchars_ftype): Change
8978 types.
8979 (complete_on_cmdlist, complete_on_enum): Adjust.
8980 * completer.c: Include <algorithm>.
8981 (struct gdb_completer_state): New.
8982 (current_completion): New global.
8983 (readline_line_completion_function): Delete.
8984 (noop_completer, filename_completer)
8985 (filename_completer_handle_brkchars, complete_files_symbols)
8986 (linespec_location_completer): Adjust to work with a
8987 completion_tracker instead of a VEC.
8988 (string_or_empty): New.
8989 (collect_explicit_location_matches): Adjust to work with a
8990 completion_tracker instead of a VEC.
8991 (explicit_location_completer): Rename to ...
8992 (complete_explicit_location): ... this and adjust to work with a
8993 completion_tracker instead of a VEC.
8994 (location_completer): Adjust to work with a completion_tracker
8995 instead of a VEC.
8996 (add_struct_fields): Adjust to work with a completion_list instead
8997 of VEC.
8998 (expression_completer): Rename to ...
8999 (complete_expression): ... this and adjust to work with a
9000 completion_tracker instead of a VEC. Use complete_files_symbols.
9001 (expression_completer): Reimplement on top of complete_expression.
9002 (symbol_completer): Adjust to work with a completion_tracker
9003 instead of a VEC.
9004 (enum complete_line_internal_reason): Add describing comments.
9005 (complete_line_internal_normal_command): Adjust to work with a
9006 completion_tracker instead of a VEC.
9007 (complete_line_internal): Rename to ...
9008 (complete_line_internal_1): ... this and adjust to work with a
9009 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9010 handle_brkchars phase.
9011 (new_completion_tracker): Delete.
9012 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9013 complete_line_internal_1.
9014 (free_completion_tracker): Delete.
9015 (INITIAL_COMPLETION_HTAB_SIZE): New.
9016 (completion_tracker::completion_tracker)
9017 (completion_tracker::~completion_tracker): New.
9018 (maybe_add_completion): Delete.
9019 (completion_tracker::maybe_add_completion)
9020 (completion_tracker::add_completion)
9021 (completion_tracker::add_completions): New.
9022 (throw_max_completions_reached_error): Delete.
9023 (complete_line): Adjust to work with a completion_tracker instead
9024 of a VEC. Don't create a completion_tracker_t or check for max
9025 completions here.
9026 (command_completer, command_completer_handle_brkchars)
9027 (signal_completer, reg_or_group_completer_1)
9028 (reg_or_group_completer, default_completer_handle_brkchars):
9029 Adjust to work with a completion_tracker.
9030 (gdb_completion_word_break_characters_throw): New.
9031 (gdb_completion_word_break_characters): Reimplement.
9032 (line_completion_function): Delete.
9033 (completion_tracker::recompute_lowest_common_denominator)
9034 (expand_preserving_ws)
9035 (completion_tracker::build_completion_result)
9036 (completion_result::completion_result)
9037 (completion_result::completion_result)
9038 (completion_result::~completion_result)
9039 (completion_result::completion_result)
9040 (completion_result::release_match_list, compare_cstrings)
9041 (completion_result::sort_match_list)
9042 (completion_result::reset_match_list)
9043 (gdb_rl_attempted_completion_function_throw)
9044 (gdb_rl_attempted_completion_function): New.
9045 * completer.h (completion_list, struct completion_result)
9046 (class completion_tracker): New.
9047 (complete_line): Add completion_tracker parameter.
9048 (readline_line_completion_function): Delete.
9049 (gdb_rl_attempted_completion_function): New.
9050 (noop_completer, filename_completer, expression_completer)
9051 (location_completer, symbol_completer, command_completer)
9052 (signal_completer, reg_or_group_completer): Update prototypes.
9053 (completion_tracker_t, new_completion_tracker)
9054 (make_cleanup_free_completion_tracker): Delete.
9055 (enum maybe_add_completion_enum): Delete.
9056 (maybe_add_completion): Delete.
9057 (throw_max_completions_reached_error): Delete.
9058 * corefile.c (complete_set_gnutarget): Adjust to work with a
9059 completion_tracker instead of a VEC.
9060 * cp-abi.c (cp_abi_completer): Adjust to work with a
9061 completion_tracker instead of a VEC.
9062 * d-lang.c (d_language_defn): Adjust.
9063 * disasm.c (disassembler_options_completer): Adjust to work with a
9064 completion_tracker instead of a VEC.
9065 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9066 (f_collect_symbol_completion_matches): ... this. Adjust to work
9067 with a completion_tracker instead of a VEC.
9068 (f_language_defn): Adjust.
9069 * go-lang.c (go_language_defn): Adjust.
9070 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9071 Adjust to work with a completion_tracker instead of a VEC.
9072 * infrun.c (handle_completer): Likewise.
9073 * interps.c (interpreter_completer): Likewise.
9074 * interps.h (interpreter_completer): Likewise.
9075 * language.c (unknown_language_defn, auto_language_defn)
9076 (local_language_defn): Adjust.
9077 * language.h (language_defn::la_make_symbol_completion_list):
9078 Rename to ...
9079 (language_defn::la_collect_symbol_completion_matches): ... this
9080 and adjust to work with a completion_tracker instead of a VEC.
9081 * m2-lang.c (m2_language_defn): Adjust.
9082 * objc-lang.c (objc_language_defn): Adjust.
9083 * opencl-lang.c (opencl_language_defn): Adjust.
9084 * p-lang.c (pascal_language_defn): Adjust.
9085 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9086 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9087 with a completion_tracker.
9088 * rust-lang.c (rust_language_defn): Adjust.
9089 * symtab.c (free_completion_list, do_free_completion_list)
9090 (return_val, completion_tracker): Delete.
9091 (completion_list_add_name, completion_list_add_symbol)
9092 (completion_list_add_msymbol, completion_list_objc_symbol)
9093 (completion_list_add_fields, add_symtab_completions): Add
9094 completion_tracker parameter and use it.
9095 (default_make_symbol_completion_list_break_on_1): Rename to...
9096 (default_collect_symbol_completion_matches_break_on): ... this.
9097 Add completion_tracker parameter and use it instead of allocating
9098 a completion tracker here.
9099 (default_make_symbol_completion_list_break_on): Delete old
9100 implementation.
9101 (default_make_symbol_completion_list): Delete.
9102 (default_collect_symbol_completion_matches): New.
9103 (make_symbol_completion_list): Delete.
9104 (collect_symbol_completion_matches): New.
9105 (make_symbol_completion_type): Rename to ...
9106 (collect_symbol_completion_matches_type): ... this. Add
9107 completion_tracker parameter and use it instead of VEC.
9108 (make_file_symbol_completion_list_1): Rename to...
9109 (collect_file_symbol_completion_matches): ... this. Add
9110 completion_tracker parameter and use it instead of VEC.
9111 (make_file_symbol_completion_list): Delete.
9112 (add_filename_to_list): Use completion_list instead of a VEC.
9113 (add_partial_filename_data::list): Now a completion_list.
9114 (make_source_files_completion_list): Work with a completion_list
9115 instead of a VEC.
9116 * symtab.h: Include "completer.h".
9117 (default_make_symbol_completion_list_break_on)
9118 (default_make_symbol_completion_list, make_symbol_completion_list)
9119 (make_symbol_completion_type, make_file_symbol_completion_list)
9120 (make_source_files_completion_list): Delete.
9121 (default_collect_symbol_completion_matches_break_on)
9122 (default_collect_symbol_completion_matches)
9123 (collect_symbol_completion_matches)
9124 (collect_symbol_completion_matches_type)
9125 (collect_file_symbol_completion_matches)
9126 (make_source_files_completion_list): New.
9127 * top.c (init_main): Don't install a rl_completion_entry_function
9128 hook. Install a rl_attempted_completion_function hook instead.
9129 * tui/tui-layout.c (layout_completer): Adjust to work with a
9130 completion_tracker.
9131 * tui/tui-regs.c (tui_reggroup_completer):
9132 * tui/tui-win.c (window_name_completer, focus_completer)
9133 (winheight_completer): Adjust to work with a completion_tracker.
9134 * value.c: Include "completer.h".
9135 (complete_internalvar): Adjust to work with a completion_tracker.
9136 * value.h (complete_internalvar): Likewise.
9137
9138 2017-07-17 Pedro Alves <palves@redhat.com>
9139
9140 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9141 renames.
9142 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9143 comments to completer_ftype's declaration.
9144 <completer_handle_brkchars>: Change type to
9145 completer_handle_brkchars_ftype.
9146 * command.h (completer_ftype): Add describing comment and give
9147 names to parameters.
9148 (completer_ftype_void): Rename to ...
9149 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9150 (set_cmd_completer_handle_brkchars): Adjust.
9151 * completer.c (filename_completer_handle_brkchars): New function.
9152 (complete_line_internal_normal_command): New function, factored
9153 out from ...
9154 (complete_line_internal): ... here.
9155 (command_completer_handle_brkchars)
9156 (default_completer_handle_brkchars)
9157 (completer_handle_brkchars_func_for_completer): New functions.
9158 * completer.h (set_gdb_completion_word_break_characters): Delete
9159 declaration.
9160 (completer_handle_brkchars_func_for_completer): New declaration.
9161 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9162 completer_handle_brkchars_func_for_completer.
9163
9164 2017-07-17 Pedro Alves <palves@redhat.com>
9165
9166 * completer.c (symbol_completer): New function, based on
9167 make_symbol_completion_list_fn.
9168 * completer.h (symbol_completer): New declaration.
9169 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9170 * python/py-cmd.c (completers): Adjust.
9171 * symtab.c (make_symbol_completion_list_fn): Delete.
9172 * symtab.h (make_symbol_completion_list_fn): Delete.
9173 * cli/cli-decode.c (add_cmd): Adjust.
9174
9175 2017-07-17 Pedro Alves <palves@redhat.com>
9176
9177 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9178 * dwarf2read.c: Include "filename-seen-cache.h".
9179 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9180 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9181 * filename-seen-cache.c: New file.
9182 * filename-seen-cache.h: New file.
9183 * symtab.c: Include "filename-seen-cache.h".
9184 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9185 (create_filename_seen_cache, clear_filename_seen_cache)
9186 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9187 to filename-seen-cache.h/filename-seen-cache.c.
9188 (output_source_filename, sources_info)
9189 (maybe_add_partial_symtab_filename)
9190 (make_source_files_completion_list): Adjust to use
9191 filename_seen_cache.
9192
9193 2017-07-17 Pedro Alves <palves@redhat.com>
9194
9195 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9196 fields.
9197 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9198 dwarf2_debug_sections*)): New.
9199 (dwarf2_per_objfile::dwarf2_per_objfile(const
9200 dwarf2_per_objfile&)): Declare as deleted.
9201 (dwarf2_per_objfile::operator=): Declare as deleted.
9202 (dwarf2_per_objfile::dwarf2_per_objfile)
9203 (dwarf2_per_objfile::~dwarf2_per_objfile)
9204 (dwarf2_per_objfile::free_cached_comp_units): New.
9205 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9206 ctor. Call dwarf2_per_objfile's ctor manually.
9207 (dwarf2_locate_sections): Deleted/refactored as ...
9208 (dwarf2_per_objfile::locate_sections): ... this new method.
9209 (free_cached_comp_units): Defer to
9210 dwarf2_per_objfile::free_cached_comp_units.
9211 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9212
9213 2017-07-14 Tom Tromey <tom@tromey.com>
9214
9215 PR rust/21764:
9216 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9217 parameter.
9218 <UNOP_SIZEOF>: Split into separate case.
9219 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9220
9221 2017-07-14 Tom Tromey <tom@tromey.com>
9222
9223 PR rust/21763:
9224 * symtab.c (symbol_matches_domain): Add language_rust to special
9225 case.
9226 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9227 treat LOC_TYPEDEF symbols as variables.
9228
9229 2017-07-14 Pedro Alves <palves@redhat.com>
9230
9231 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9232 symtabs matching all symtabs with SRCFILE as file name instead of
9233 only considering the first hit, with lookup_symtab.
9234
9235 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9236
9237 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9238 operator_name parameters.
9239 (gen_expr): Update function call.
9240
9241 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9242
9243 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9244 parameter.
9245 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9246 Likewise.
9247 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9248 parameter, use agent_expr::gdbarch instead, update function
9249 calls.
9250 (locexpr_tracepoint_var_ref): Likewise.
9251 (loclist_tracepoint_var_ref): Likewise.
9252 * ax-gdb.c (gen_trace_static_fields): Likewise.
9253 (gen_traced_pop): Likewise.
9254 (gen_frame_args_address): Likewise.
9255 (gen_frame_locals_address): Likewise.
9256 (gen_var_ref): Likewise.
9257 (gen_struct_ref_recursive): Likewise.
9258 (gen_static_field): Likewise.
9259 (gen_maybe_namespace_elt): Likewise.
9260 (gen_expr): Likewise.
9261 (gen_trace_for_var): Likewise.
9262 (gen_trace_for_expr): Likewise.
9263 (gen_trace_for_return_address): Likewise.
9264
9265 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9266
9267 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9268 parameter.
9269 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9270
9271 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9272
9273 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9274 from ax, update calls.
9275 (gen_usual_arithmetic): Likewise.
9276 (gen_integral_promotions): Likewise.
9277 (gen_bitfield_ref): Likewise.
9278 (gen_primitive_field): Likewise.
9279 (gen_struct_ref_recursive): Likewise.
9280 (gen_struct_ref): Likewise.
9281 (gen_maybe_namespace_elt): Likewise.
9282 (gen_struct_elt_for_reference): Likewise.
9283 (gen_namespace_elt): Likewise.
9284 (gen_aggregate_elt_ref): Likewise.
9285 (gen_expr): Get gdbarch from ax, update calls.
9286 (gen_expr_binop_rest): Likewise.
9287
9288 2017-07-13 Pedro Alves <palves@redhat.com>
9289
9290 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9291 as default tdesc.
9292 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9293 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9294 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9295 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9296 tdep.
9297 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9298 Get final tdesc from the tdep.
9299 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9300 default tdesc.
9301 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9302 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9303 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9304 Use it as default tdesc.
9305 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9306 down to amd_init_abi. No longer handle fallback tdesc here.
9307 * amd64-tdep.h (tdesc_x32): Declare.
9308 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9309 parameter.
9310 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9311 as default tdesc.
9312
9313 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9314
9315 * s390-linux-tdep.c (s390_process_record): Add support for
9316 instructions new in arch12.
9317
9318 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9319
9320 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9321 PT_GETFSBASE and PT_GETGSBASE.
9322 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9323 PT_SETGSBASE.
9324
9325 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9326
9327 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9328 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9329 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9330 those rules.
9331 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9332 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9333 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9334 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9335 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9336 * features/i386/amd64.xml: Add 64bit-segments.xml.
9337 * features/i386/amd64-avx-avx512.c: Regenerated.
9338 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9339 * features/i386/amd64-avx-mpx.c: Regenerated.
9340 * features/i386/amd64-avx.c: Regenerated.
9341 * features/i386/amd64-mpx.c: Regenerated.
9342 * features/i386/amd64.c: Regenerated.
9343 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9344 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9345 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9346 * regformats/i386/amd64-avx.dat: Regenerated.
9347 * regformats/i386/amd64-mpx.dat: Regenerated.
9348 * regformats/i386/amd64.dat: Regenerated.
9349
9350 2017-07-10 Yao Qi <yao.qi@linaro.org>
9351
9352 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9353 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9354
9355 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9356
9357 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9358 unsetenv.
9359 * gnulib/aclocal.m4: Regenerate.
9360 * gnulib/config.in: Regenerate.
9361 * gnulib/configure: Regenerate.
9362 * gnulib/import/Makefile.am: Regenerate.
9363 * gnulib/import/Makefile.in: Regenerate.
9364 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9365 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9366 * gnulib/import/m4/environ.m4: New file.
9367 * gnulib/import/m4/setenv.m4: New file.
9368 * gnulib/import/setenv.c: New file.
9369 * gnulib/import/unsetenv.c: New file.
9370
9371 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9372
9373 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9374 address when op is DW_OP_addr.
9375
9376 2017-07-09 Tom Tromey <tom@tromey.com>
9377
9378 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9379 check and apply to outer type.
9380
9381 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9382
9383 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9384 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9385 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9386 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9387
9388 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9389
9390 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9391
9392 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9393
9394 * corelow.c (get_core_siginfo): Remove.
9395 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9396 instead of get_core_siginfo.
9397 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9398 * gdbarch.h: Re-generate.
9399 * gdbarch.c: Re-generate.
9400 * linux-tdep.c (linux_core_xfer_siginfo): New.
9401 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9402
9403 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9404
9405 * corelow.c (thread_section_name): Move to ...
9406 * gdbcore.h (thread_section_name): ... here.
9407
9408 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9409
9410 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9411 (struct siginfo32): New.
9412 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9413 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9414 via ptrace(PT_LWPINFO).
9415
9416 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9417
9418 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9419 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9420 (fbsd_get_siginfo_type): New.
9421 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9422 (_initialize_fbsd_tdep): New.
9423
9424 2017-07-06 David Blaikie <dblaikie@gmail.com>
9425
9426 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9427 a singular dwo_unit*) to support multiple CUs in the same way that
9428 multiple TUs are supported.
9429 (create_cus_hash_table): Replace create_dwo_cu with a function for
9430 parsing multiple CUs from a DWO file.
9431 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9432 create_dwo_cu.
9433 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9434 htab_find, rather than comparing the signature to a singleton CU in
9435 the dwo_file.
9436
9437 2017-07-06 Pedro Alves <palves@redhat.com>
9438
9439 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9440
9441 2017-07-04 Pedro Alves <palves@redhat.com>
9442
9443 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9444 * gdbtypes.h (TYPE_STATIC): Delete.
9445 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9446 is_synchronized, is_native>: Delete.
9447 <dummy>: Bump.
9448 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9449 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9450 (TYPE_FN_FIELD_ABSTRACT): Delete.
9451
9452 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9453
9454 * buffer.h (buffer_finish): Fix spelling mistakes.
9455
9456 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9457
9458 * .dir-locals.el: Automatically switch to C-style comments in
9459 versions of Emacs that support the feature.
9460
9461 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9462 Pedro Alves <palves@redhat.com>
9463
9464 PR cli/21688
9465 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9466 (process_next_line): New variable 'inline_cmd'.
9467 Adjust 'if' clauses for "python", "compile" and "guile" to use
9468 'command_name_equals' and check for '!inline_cmd'.
9469
9470 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9471
9472 PR cli/21688
9473 * cli/cli-script.c (command_name_equals_not_inline): New function.
9474 (process_next_line): Adjust 'if' clauses for "python", "compile"
9475 and "guile" to use command_name_equals_not_inline.
9476
9477 2017-06-29 Pedro Alves <palves@redhat.com>
9478
9479 * completer.c (expression_completer): Call
9480 linespec_location_completer instead of location_completer.
9481
9482 2017-06-29 Pedro Alves <palves@redhat.com>
9483
9484 * completer.c (expression_completer): Remove code that recomputes
9485 'text' from 'word'.
9486
9487 2017-06-29 Yao Qi <yao.qi@linaro.org>
9488
9489 * regformats/regdat.sh: Generate code with
9490 "ifndef IN_PROCESS_AGENT".
9491
9492 2017-06-28 Pedro Alves <palves@redhat.com>
9493
9494 * command.h: Include "common/scoped_restore.h".
9495
9496 2017-06-28 Yao Qi <yao.qi@linaro.org>
9497
9498 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9499 instead of obstack_grow.
9500
9501 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9502
9503 PR gdb/21337
9504 * symfile.c (reread_symbols): Call objfiles_changed just before
9505 read_symbols.
9506
9507 2017-06-27 Pedro Alves <palves@redhat.com>
9508
9509 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9510 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9511 (completion_list_add_symbol, completion_list_add_msymbol):
9512 ... these new functions.
9513 (add_symtab_completions)
9514 (default_make_symbol_completion_list_break_on_1): Adjust.
9515
9516 2017-06-27 Pedro Alves <palves@redhat.com>
9517
9518 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9519 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9520 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9521 dtor.
9522 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9523 'storage_obstack' field an auto_obstack. In-class initialize all
9524 non-bitfield fields. Make minsyms_read bool.
9525 * symfile.c (read_symbols): Adjust.
9526
9527 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9528
9529 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9530 (gdbsim_store_register): Likewise.
9531
9532 2017-06-27 Pedro Alves <palves@redhat.com>
9533
9534 * c-exp.y (name_obstack): Now an auto_obstack.
9535 (yylex): Use auto_obstack::clear.
9536 (c_parse): Use auto_obstack::clear instead of reinitializing and
9537 freeing the obstack.
9538 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9539 * d-exp.y (name_obstack): Now an auto_obstack.
9540 (yylex): Use auto_obstack::clear.
9541 (d_parse): Use auto_obstack::clear instead of reinitializing and
9542 freeing the obstack.
9543 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9544 auto_obstack.
9545 * dwarf2read.c (create_addrmap_from_index)
9546 (dwarf2_build_psymtabs_hard)
9547 (update_enumeration_type_from_children): Likewise.
9548 * gdb_obstack.h (auto_obstack): New type.
9549 * go-exp.y (name_obstack): Now an auto_obstack.
9550 (build_packaged_name): Use auto_obstack::clear.
9551 (go_parse): Use auto_obstack::clear instead of reinitializing and
9552 freeing the obstack.
9553 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9554 auto_obstack.
9555 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9556 * rust-exp.y (work_obstack): Now an auto_obstack.
9557 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9558 reinitializing and freeing the obstack.
9559 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9560 (host_char_to_target): Use auto_obstack.
9561 * utils.h (make_cleanup_obstack_free): Delete declaration.
9562 * valprint.c (generic_emit_char, generic_printstr): Use
9563 auto_obstack.
9564
9565 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9566
9567 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9568 thread.
9569 (darwin_init_thread_list): Don't update dummy thread.
9570 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9571
9572 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9573
9574 * record-full.c (netorder16): Remove.
9575
9576 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9577
9578 * common/diagnostics.h: Define macros for GCC.
9579 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9580 * common/vec.h: Include diagnostics.h.
9581 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9582 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9583 warning.
9584
9585 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9586
9587 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9588 New macro.
9589 * ada-lex.l: Ignore deprecated register warnings.
9590
9591 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9592
9593 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9594 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9595
9596 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9597
9598 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9599 its own line.
9600
9601 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9602
9603 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9604
9605 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9606
9607 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9608 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9609 (xtensa_register_read_masked): Likewise.
9610
9611 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9612
9613 * common/environ.c (gdb_environ::unset): Update comment.
9614
9615 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9616
9617 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9618 registers.
9619
9620 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9621
9622 * record-full.c (record_full_exec_insn): Use byte_vector.
9623
9624 2017-06-22 Yao Qi <yao.qi@linaro.org>
9625
9626 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9627 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9628
9629 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9630
9631 * remote.c (cached_reg): Move from here...
9632 * regcache.h (cached_reg): ...to here.
9633 * python/py-unwind.c (struct reg_info): Remove.
9634 (cached_frame_info): Use cached_reg_t.
9635 (pyuw_prev_register): Likewise.
9636 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9637 (pyuw_dealloc_cache): Free all registers.
9638
9639 2017-06-22 Pedro Alves <palves@redhat.com>
9640 Simon Marchi <simon.marchi@ericsson.com>
9641
9642 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9643 warning.
9644 * common/diagnostics.h: New file.
9645
9646 2017-06-22 Pedro Alves <palves@redhat.com>
9647
9648 * common/agent.h: Add include guards.
9649
9650 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9651
9652 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9653 talk about addressable units instead of bytes.
9654
9655 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9656
9657 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9658 of '::const_iterator'.
9659
9660 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9661
9662 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9663 'unittests/environ-selftests.c'.
9664 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9665 * charset.c (find_charset_names): Declare object 'iconv_env'.
9666 Update code to use 'iconv_env' object. Remove call to
9667 'free_environ'.
9668 * common/environ.c: Include <utility>.
9669 (make_environ): Delete function.
9670 (free_environ): Delete function.
9671 (gdb_environ::clear): New function.
9672 (gdb_environ::operator=): New function.
9673 (gdb_environ::get): Likewise.
9674 (environ_vector): Delete function.
9675 (set_in_environ): Delete function.
9676 (gdb_environ::set): New function.
9677 (unset_in_environ): Delete function.
9678 (gdb_environ::unset): New function.
9679 (gdb_environ::envp): Likewise.
9680 * common/environ.h: Include <vector>.
9681 (struct gdb_environ): Delete; transform into...
9682 (class gdb_environ): ... this class.
9683 (free_environ): Delete prototype.
9684 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9685 environ_vector): Likewise.
9686 * infcmd.c (run_command_1): Update code to call
9687 'envp' from 'gdb_environ' class.
9688 (environment_info): Update code to call methods from 'gdb_environ'
9689 class.
9690 (unset_environment_command): Likewise.
9691 (path_info): Likewise.
9692 (path_command): Likewise.
9693 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9694 (inferior::inferior): Initialize 'environment' using the host's
9695 information.
9696 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9697 Include "environ.h".
9698 (class inferior) <environment>: Change type from 'struct
9699 gdb_environ' to 'gdb_environ'.
9700 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9701 methods from 'gdb_environ' class.
9702 * solib.c (solib_find_1): Likewise
9703 * unittests/environ-selftests.c: New file.
9704
9705 2017-06-20 Yao Qi <yao.qi@linaro.org>
9706
9707 * features/i386/i386-linux.xml: Exchange the order of including
9708 32bit-linux.xml and 32bit-sse.xml.
9709 * features/i386/i386-linux.c: Regenerated.
9710
9711 2017-06-20 Yao Qi <yao.qi@linaro.org>
9712
9713 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9714 Delete copy ctor and assignment operator.
9715 (tdesc_type): Likewise.
9716 (tdesc_feature): Likewise.
9717 (tdesc_free_reg): Remove.
9718 (tdesc_create_reg): Use new.
9719 (tdesc_free_type): Remove.
9720 (tdesc_create_vector): Use new.
9721 (tdesc_create_union): Likewise.
9722 (tdesc_create_flags): Likewise.
9723 (tdesc_create_enum): Likewise.
9724 (tdesc_free_feature): Delete.
9725 (free_target_description): Use delete.
9726
9727 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9728
9729 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9730 registers.
9731
9732 2017-06-19 Pedro Alves <palves@redhat.com>
9733
9734 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9735 after gdb::unlinker.
9736
9737 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9738
9739 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9740 gdb_environ to access an environment variable.
9741
9742 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9743
9744 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9745 gdb_byte*.
9746
9747 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9748
9749 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9750
9751 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9752
9753 * configure: Re-generate.
9754 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9755
9756 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9757
9758 * configure: Re-generate.
9759 * warning.m4: Pass -Werror to compiler when checking for
9760 supported warning flags.
9761
9762 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9763
9764 * Makefile.in (COMPILE.pre): Add "-x c++".
9765
9766 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9767 Pedro Alves <palves@redhat.com>
9768 Yao Qi <yao.qi@linaro.org>
9769
9770 * defs.h (RequireLongest): New.
9771 (extract_integer): Declare function template.
9772 (extract_signed_integer): Remove the declaration, but define it
9773 static inline.
9774 (extract_unsigned_integer): Likewise.
9775 (store_integer): Declare function template.
9776 (store_signed_integer): Remove the declaration, but define it
9777 static inline.
9778 (store_unsigned_integer): Likewise.
9779 * findvar.c (extract_integer): New function template.
9780 (extract_signed_integer): Remove.
9781 (extract_unsigned_integer): Remove.
9782 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9783 instantiations.
9784 (store_integer): New function template.
9785 (store_signed_integer): Remove.
9786 (store_unsigned_integer): Remove.
9787 (store_integer): Explicit instantiations.
9788 * regcache.c (regcache_raw_read_signed): Update.
9789 (regcache::raw_read): New function.
9790 (regcache::raw_read_signed): Remove.
9791 (regcache::raw_read_unsigned): Remove.
9792 (regcache_raw_read_unsigned): Update.
9793 (regcache_raw_write_unsigned): Update.
9794 (regcache::raw_write_signed): Remove.
9795 (regcache::raw_write): New function.
9796 (regcache_cooked_read_signed): Update.
9797 (regcache::raw_write_unsigned): Remove.
9798 (regcache::cooked_read_signed): Remove.
9799 (regcache_cooked_read_unsigned): Update.
9800 (regcache::cooked_read_unsigned): Remove.
9801 (regcache_cooked_write_signed): Update.
9802 (regcache_cooked_write_unsigned): Update.
9803 * regcache.h (regcache) <raw_read_signed>: Remove.
9804 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9805 <raw_read, raw_write>: New.
9806 <cooked_read_signed, cooked_write_signed>: Remove.
9807 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9808 <cooked_read, cooked_write>: New.
9809 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9810 (sh64_pseudo_register_write): Update.
9811
9812 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9813
9814 * arc-tdep.c (arc_disassembler_options): New variable.
9815 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9816 of default_print_insn.
9817 (arc_delayed_print_insn): Set info->section when needed,
9818 use default_print_insn to retrieve a disassembler.
9819
9820 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9821
9822 PR gdb/21574
9823 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9824 to mention $SHELL and startup-with-shell.
9825
9826 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9827
9828 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9829
9830 2017-06-14 Yao Qi <yao.qi@linaro.org>
9831
9832 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9833 default_print_insn instead of print_insn_aarch64.
9834 * arm-tdep.c (gdb_print_insn_arm): Call
9835 default_print_insn instead of print_insn_big_arm
9836 and print_insn_little_arm.
9837 * i386-tdep.c (i386_print_insn): Call default_print_insn
9838 instead of print_insn_i386.
9839 * ia64-tdep.c (ia64_print_insn): Call
9840 default_print_insn instead of print_insn_ia64.
9841 * mips-tdep.c (gdb_print_insn_mips): Call
9842 default_print_insn instead of print_insn_big_mips
9843 and print_insn_little_mips.
9844 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9845 instead of print_insn_spu.
9846
9847 2017-06-14 Pedro Alves <palves@redhat.com>
9848
9849 * ada-lang.c: Include "common/byte-vector.h".
9850 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9851 * charset.c (wchar_iterator::iterate): Resize the vector instead
9852 of reserving it.
9853 * common/byte-vector.h: Include "common/def-vector.h".
9854 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9855 * cli/cli-dump.c: Include "common/byte-vector.h".
9856 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9857 * common/byte-vector.h: New file.
9858 * common/def-vector.h: New file.
9859 * common/default-init-alloc.h: New file.
9860 * dwarf2loc.c: Include "common/byte-vector.h".
9861 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9862 instead of reserving it.
9863 * dwarf2read.c: Include "common/byte-vector.h".
9864 (data_buf::m_vec): Now a gdb::byte_vector.
9865 * gdb_regex.c: Include "common/def-vector.h".
9866 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9867 * mi/mi-main.c: Include "common/byte-vector.h".
9868 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9869 * printcmd.c: Include "common/byte-vector.h".
9870 (print_scalar_formatted): Use gdb::byte_vector.
9871 * valprint.c: Include "common/byte-vector.h".
9872 (maybe_negate_by_bytes, print_decimal_chars): Use
9873 gdb::byte_vector.
9874
9875 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9876
9877 * darwin-nat.c: Include "nat/fork-inferior.h".
9878
9879 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9880
9881 * configure.nat: Factor out Darwin bits that are not
9882 architecture-specific. Add fork-inferior.o.
9883
9884 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9885
9886 * configure.nat: Factor out AIX bits that are not
9887 architecture-specific. Add fork-inferior.o.
9888
9889 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9890
9891 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9892 (read_pieced_value, write_pieced_value): ...here. Reduce to
9893 wrappers that just call rw_pieced_value.
9894
9895 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9896
9897 * dwarf2loc.c (write_pieced_value): When writing the data for a
9898 memory piece, use write_memory_with_notification instead of
9899 write_memory.
9900
9901 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9902
9903 * valops.c (read_value_memory): Change embedded_offset to
9904 represent a bit offset instead of a byte offset.
9905 * value.h (read_value_memory): Adjust comment.
9906
9907 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9908
9909 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9910 dest_offset_bits and source_offset_bits.
9911 (write_pieced_value): Likewise.
9912
9913 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9914
9915 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9916 given by DW_OP_bit_piece.
9917 (write_pieced_value): Likewise.
9918
9919 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9920
9921 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9922 some other preparations to the places where sufficient information
9923 is available.
9924 (write_pieced_value): Likewise.
9925
9926 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9927
9928 * dwarf2loc.c (bits_to_bytes): New function.
9929 (read_pieced_value): Fix offset calculations for register pieces
9930 on big-endian targets.
9931 (write_pieced_value): Likewise.
9932
9933 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9934
9935 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9936 (write_pieced_value): Likewise.
9937
9938 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9939
9940 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9941 transfer the source value's least significant bits, instead of its
9942 lowest-addressed ones. Rename type_len to max_offset.
9943 (read_pieced_value): Mirror above changes to write_pieced_value as
9944 applicable.
9945
9946 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9947
9948 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9949 truncate full bytes from dest_offset_bits before using it as an
9950 offset into the buffer.
9951
9952 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9953
9954 * dwarf2loc.c (write_pieced_value): Include transfer size in
9955 byte-wise check.
9956
9957 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9958
9959 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9960 calculation of this_size.
9961
9962 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9963
9964 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9965 when targeting a bit-field.
9966 (write_pieced_value): Likewise.
9967
9968 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9969
9970 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9971 (allocate_piece_closure): Drop addr_size parameter.
9972 (dwarf2_evaluate_loc_desc_full): Adjust call to
9973 allocate_piece_closure.
9974
9975 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9976
9977 PR gdb/21226
9978 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9979 the LSB end, independent of endianness.
9980
9981 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9982
9983 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9984 size capping.
9985
9986 2017-06-13 Yao Qi <yao.qi@linaro.org>
9987
9988 * mips-linux-nat.c: Move include features/mips*-linux.c to
9989 mips-linux-tdep.c.
9990 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9991 to mips-linux-tdep.c.
9992 * mips-linux-tdep.c: Include features/mips*-linux.c
9993 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9994 functions.
9995 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9996 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9997 (tdesc_mips64_dsp_linux): Declare.
9998
9999 2017-06-12 Tom Tromey <tom@tromey.com>
10000
10001 * valprint.h (val_print_type_code_int): Remove.
10002 * valprint.c (generic_val_print_int): Always call
10003 val_print_scalar_formatted.
10004 (val_print_type_code_int): Remove.
10005 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10006 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10007 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10008 * ada-valprint.c (ada_val_print_num): Use
10009 val_print_scalar_formatted.
10010
10011 2017-06-12 Tom Tromey <tom@tromey.com>
10012
10013 * printcmd.c (print_scalar_formatted): Unify the two switches.
10014 Don't convert scalars to LONGEST.
10015
10016 2017-06-12 Tom Tromey <tom@tromey.com>
10017
10018 PR exp/16225:
10019 * valprint.h (print_decimal_chars): Update.
10020 * valprint.c (maybe_negate_by_bytes): New function.
10021 (print_decimal_chars): Add "is_signed" argument.
10022 * printcmd.c (print_scalar_formatted): Update.
10023
10024 2017-06-12 Tom Tromey <tom@tromey.com>
10025
10026 PR exp/16225:
10027 * valprint.h (print_binary_chars, print_hex_chars): Update.
10028 * valprint.c (val_print_type_code_int): Update.
10029 (print_binary_chars): Add "zero_pad" argument.
10030 (emit_octal_digit): New function.
10031 (print_octal_chars): Don't zero-pad.
10032 (print_decimal_chars): Likewise.
10033 (print_hex_chars): Add "zero_pad" argument.
10034 * sh64-tdep.c (sh64_do_fp_register): Update.
10035 * regcache.c (regcache::dump): Update.
10036 * printcmd.c (print_scalar_formatted): Update.
10037 * infcmd.c (default_print_one_register_info): Update.
10038
10039 2017-06-12 Pedro Alves <palves@redhat.com>
10040 Alan Hayward <alan.hayward@arm.com>
10041
10042 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10043 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10044 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10045 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10046 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10047
10048 2017-06-12 Pedro Alves <palves@redhat.com>
10049
10050 * dwarf2read.c (mapped_symtab::data): Now a vector of
10051 symtab_index_entry instead of vector of
10052 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10053 whether an element's name is NULL instead of checking whether the
10054 element itself is NULL.
10055 (find_slot): Change return type. Adjust.
10056 (hash_expand, , add_index_entry, uniquify_cu_indices)
10057 (write_hash_table): Adjust.
10058
10059 2017-06-12 Pedro Alves <palves@redhat.com>
10060
10061 * dwarf2read.c (recursively_count_psymbols): New function.
10062 (write_psymtabs_to_index): Call it to compute number of psyms and
10063 pass estimate size of psyms_seen to unordered_set's ctor.
10064
10065 2017-06-12 Pedro Alves <palves@redhat.com>
10066
10067 * dwarf2read.c (write_hash_table): Check if key already exists
10068 before emplacing.
10069
10070 2017-06-12 Pedro Alves <palves@redhat.com>
10071
10072 * dwarf2read.c (data_buf::append_space): Rename to...
10073 (data_buf::grow): ... this, and make private. Adjust all callers.
10074 (data_buf::append_uint): New method.
10075 (add_address_entry, write_one_signatured_type)
10076 (write_psymtabs_to_index): Use it.
10077
10078 2017-06-12 Pedro Alves <palves@redhat.com>
10079
10080 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10081 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10082 (data_buf::file_write): Call ::fwrite directly.
10083
10084 2017-06-12 Pedro Alves <palves@redhat.com>
10085
10086 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10087 std::vector::erase.
10088
10089 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10090
10091 Code cleanup: C++ify .gdb_index producer.
10092 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10093 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10094 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10095 (create_strtab, add_string): Remove.
10096 (file_write, data_buf): New.
10097 (struct symtab_index_entry): Use std::vector for cu_indices.
10098 (struct mapped_symtab): Use std::vector for data.
10099 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10100 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10101 Remove.
10102 (find_slot): Change return type. Update it to the new data structures.
10103 (hash_expand, add_index_entry): Update it to the new data structures.
10104 (offset_type_compare): Remove.
10105 (uniquify_cu_indices): Update it to the new data structures.
10106 (c_str_view, c_str_view_hasher, vector_hasher): New.
10107 (add_indices_to_cpool): Remove.
10108 (write_hash_table): Update it to the new data structures.
10109 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10110 (eq_psymtab_cu_index): Remove.
10111 (psym_index_map): New typedef.
10112 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10113 reference and std::unordered_map for cu_index_htab.
10114 (add_address_entry, add_address_entry_worker, write_address_map)
10115 (write_psymbols): Update it to the new data structures.
10116 (write_obstack): Remove.
10117 (struct signatured_type_index_data): Change types_list to a data_buf
10118 reference and psyms_seen to a std::unordered_set reference.
10119 (write_one_signatured_type, recursively_write_psymbols)
10120 (write_psymtabs_to_index): Update it to the new data structures.
10121
10122 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10123
10124 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10125 separate-debug-file commands.
10126 * symfile.h (separate_debug_file_debug): New global.
10127 * symfile.c (separate_debug_file_debug): New global.
10128 (separate_debug_file_exists, find_separate_debug_file): Add
10129 debug output.
10130 (_initialize_symfile): Add "set debug separate-debug-file"
10131 command.
10132 * build-id.c (build_id_to_debug_bfd,
10133 find_separate_debug_file_by_buildid): Add debug output.
10134
10135 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10136
10137 * gdbarch.sh (displaced_step_free_closure): Remove.
10138 * gdbarch.h, gdbarch.c: Re-generate.
10139 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10140 displaced_step_free_closure.
10141 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10142 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10143 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10144 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10145 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10146 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10147 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10148 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10149 * infrun.c (displaced_step_clear): Call xfree instead of
10150 gdbarch_displaced_step_free_closure.
10151
10152 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10153
10154 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10155 NULL".
10156
10157 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10158
10159 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10160 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10161 (mn10300_push_dummy_call): Likewise.
10162
10163 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10164
10165 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10166
10167 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10168
10169 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10170
10171 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10172
10173 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10174 able to start inferiors using a shell.
10175 (New remote packets): Announce new packet "QStartupWithShell".
10176 * remote.c: Add PACKET_QStartupWithShell.
10177 (extended_remote_create_inferior): Handle new
10178 PACKET_QStartupWithShell.
10179 (remote_protocol_features) <QStartupWithShell>: New entry for
10180 PACKET_QStartupWithShell.
10181 (_initialize_remote): Call "add_packet_config_cmd" for
10182 QStartupShell.
10183
10184 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10185 Pedro Alves <palves@redhat.com>
10186
10187 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10188 and "nat/fork-inferior.h".
10189 * common/common-inferior.h: New file, with contents from
10190 "gdb/inferior.h".
10191 * commom/common-utils.c: Include "common-utils.h".
10192 (stringify_argv): New function.
10193 * common/common-utils.h (stringify_argv): New prototype.
10194 * configure.nat: Add "fork-inferior.o" as a dependency for
10195 "*linux*", "fbsd*" and "nbsd*" hosts.
10196 * corefile.c (get_exec_file): Update comment.
10197 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10198 instead of "startup_inferior".
10199 (darwin_create_inferior): Call "add_thread_silent" after
10200 "fork_inferior".
10201 * fork-child.c: Cleanup unnecessary includes.
10202 (SHELL_FILE): Move to "common/common-fork-child.c".
10203 (environ): Likewise.
10204 (exec_wrapper): Initialize.
10205 (get_exec_wrapper): New function.
10206 (breakup_args): Move to "common/common-fork-child.c"; rename to
10207 "breakup_args_for_exec".
10208 (escape_bang_in_quoted_argument): Move to
10209 "common/common-fork-child.c".
10210 (saved_ui): New variable.
10211 (prefork_hook): New function.
10212 (postfork_hook): Likewise.
10213 (postfork_child_hook): Likewise.
10214 (gdb_startup_inferior): Likewise.
10215 (fork_inferior): Move to "common/common-fork-child.c". Update
10216 function to support gdbserver.
10217 (startup_inferior): Likewise.
10218 * gdbcore.h (get_exec_file): Remove declaration.
10219 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10220 instead of "startup_inferior". Call "add_thread_silent" after
10221 "fork_inferior".
10222 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10223 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10224 instead of "startup_inferior". Call "add_thread_silent" after
10225 "fork_inferior".
10226 * inferior.h: Include "common-inferior.h".
10227 (trace_start_error): Move to "common/common-utils.h".
10228 (trace_start_error_with_name): Likewise.
10229 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10230 (startup_inferior): Likewise.
10231 (gdb_startup_inferior): New prototype.
10232 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10233 * nat/fork-inferior.h: New file.
10234 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10235 instead of "startup_inferior". Call "add_thread_silent" after
10236 "fork_inferior".
10237 * target.h (target_terminal_init): Move prototype to
10238 "target/target.h".
10239 (target_terminal_inferior): Likewise.
10240 (target_terminal_ours): Likewise.
10241 * target/target.h (target_terminal_init): New prototype, moved
10242 from "target.h".
10243 (target_terminal_inferior): Likewise.
10244 (target_terminal_ours): Likewise.
10245 * utils.c (gdb_flush_out_err): New function.
10246
10247 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10248
10249 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10250 * common/common-gdbthread.h: New file, with parts from
10251 "gdb/gdbthread.h".
10252 * gdbthread.h: Include "common-gdbthread.h".
10253 (switch_to_thread): Moved to "common/common-gdbthread.h".
10254
10255 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10256
10257 * Makefile.in (SFILES): Add "common/job-control.c".
10258 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10259 (COMMON_OBS): Add "job-control.o".
10260 * common/job-control.c: New file, with contents from
10261 "gdb/inflow.c".
10262 * common/job-control.h: New file, with contents from "terminal.h".
10263 * fork-child.c: Include "job-control.h".
10264 * inflow.c: Include "job-control.h".
10265 (gdb_setpgid): Move to "common/common-inflow.c".
10266 (_initialize_inflow): Move setting of "job_control" to
10267 "handle_job_control".
10268 * terminal.h (job_control): Moved to "common/common-terminal.h".
10269 (gdb_setpgid): Likewise.
10270 * top.c: Include "job_control.h".
10271 * utils.c: Likewise.
10272 (job_control): Moved to "job-control.c".
10273
10274 2017-06-07 Pedro Alves <palves@redhat.com>
10275
10276 * Makefile.in (SFILES): Add gdb_regex.c.
10277 (COMMON_OBS): Add gdb_regex.o.
10278 * ada-lang.c (ada_add_standard_exceptions)
10279 (ada_add_exceptions_from_frame, name_matches_regex)
10280 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10281 parameter type to compiled_regex. Adjust.
10282 (ada_exceptions_list): Use compiled_regex.
10283 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10284 std::unique_ptr<compiled_regex>.
10285 (exception_catchpoint::~exception_catchpoint): Remove regfree
10286 call.
10287 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10288 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10289 * breakpoint.c (solib_catchpoint::compiled): Now a
10290 std::unique_ptr<compiled_regex>.
10291 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10292 (check_status_catch_solib): Adjust to use compiled_regex.
10293 (add_solib_catchpoint): Adjust to use compiled_regex.
10294 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10295 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10296 compiled_regex reference. Adjust to use it.
10297 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10298 declaration. Include "gdb_regex.h".
10299 (apropos_cmd): Change regex parameter to compiled_regex reference.
10300 * gdb_regex.c: New file.
10301 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10302 declarations.
10303 (class compiled_regex): New.
10304 * linux-tdep.c: Include "common/gdb_optional.h".
10305 (struct mapping_regexes): New, factored out from
10306 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10307 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10308 gdb::optional and remove cleanups. Adjust to compiled_regex.
10309 * probe.c: Include "common/gdb_optional.h".
10310 (collect_probes): Use compiled_regex and gdb::optional and remove
10311 cleanups.
10312 * skip.c: Include "common/gdb_optional.h".
10313 (skiplist_entry::compiled_function_regexp): Now a
10314 gdb::optional<compiled_regex>.
10315 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10316 (free_skiplist_entry): Remove regfree call.
10317 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10318 compiled_regex and gdb::optional.
10319 * symtab.c: Include "common/gdb_optional.h".
10320 (search_symbols): Use compiled_regex and gdb::optional.
10321 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10322 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10323 to gdb_regex.c.
10324
10325 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10326
10327 * regcache.c (regcache::save): Avoid buffer use.
10328 (regcache::dump): Likewise.
10329
10330 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10331
10332 * sh-tdep.c (sh_pseudo_register_read): Remove
10333 MAX_REGISTER_SIZE.
10334 (sh_pseudo_register_write): Likewise.
10335 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10336 (sh64_pseudo_register_write): Likewise
10337
10338 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10339
10340 * aarch64-tdep.c (aarch64_store_return_value): Use
10341 V_REGISTER_SIZE.
10342 (aarch64_pseudo_read_value): Likewise.
10343 (aarch64_pseudo_write): Likewise.
10344
10345 2017-06-06 Yao Qi <yao.qi@linaro.org>
10346
10347 * regformats/regdef.h (set_register_cache): Remove the
10348 declaration.
10349
10350 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10351
10352 * frame.c (frame_unwind_register_signed): Use
10353 frame_unwind_register_value.
10354
10355 2017-06-06 Pedro Alves <palves@redhat.com>
10356
10357 PR breakpoints/21553
10358 * breakpoint.c (create_breakpoints_sal_default)
10359 (init_breakpoint_sal, create_breakpoint_sal): Use
10360 gdb::unique_xmalloc_ptr for string parameters.
10361 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10362 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10363 (base_breakpoint_create_breakpoints_sal)
10364 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10365 (strace_marker_create_breakpoints_sal)
10366 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10367 string parameters.
10368 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10369 gdb::unique_xmalloc_ptr for string parameters.
10370 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10371 parameters.
10372
10373 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10374
10375 * alpha-tdep.c (alpha_register_to_value): Use
10376 get_frame_register_value.
10377 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10378
10379 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10380
10381 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10382 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10383 (ia64_value_to_register): Likewise.
10384 (ia64_extract_return_value): Likewise.
10385 (ia64_store_return_value): Likewise.
10386 (ia64_push_dummy_call): Likewise.
10387
10388 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10389
10390 GDB 8.0 released.
10391
10392 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10393
10394 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10395
10396 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10397
10398 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10399 parameter.
10400 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10401
10402 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10403
10404 * event-loop.c (poll_timers): Unallocate timer using delete
10405 instead of xfree.
10406
10407 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10408
10409 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10410 (struct breakpoint) <~breakpoint>: New.
10411 (struct watchpoint): Inherit from breakpoint.
10412 <~watchpoint>: New.
10413 <base>: Remove.
10414 (struct tracepoint): Inherit from breakpoint.
10415 <base>: Remove.
10416 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10417 (struct longjmp_breakpoint): Inherit from breakpoint.
10418 <~longjmp_breakpoint>: New.
10419 <base>: Remove.
10420 (new_breakpoint_from_type): Remove casts.
10421 (watchpoint_in_thread_scope): Remove reference to base field.
10422 (watchpoint_del_at_next_stop): Likewise.
10423 (update_watchpoint): Likewise.
10424 (watchpoint_check): Likewise.
10425 (bpstat_check_watchpoint): Likewise.
10426 (set_longjmp_breakpoint): Likewise.
10427 (struct fork_catchpoint): Inherit from breakpoint.
10428 <base>: Remove.
10429 (struct solib_catchpoint): Inherit from breakpoint.
10430 <~solib_catchpoint>: New.
10431 <base>: Remove.
10432 (dtor_catch_solib): Change to ...
10433 (solib_catchpoint::~solib_catchpoint): ... this.
10434 (breakpoint_hit_catch_solib): Remove reference to base field.
10435 (add_solib_catchpoint): Likewise.
10436 (create_fork_vfork_event_catchpoint): Likewise.
10437 (struct exec_catchpoint): Inherit from breakpoint.
10438 <~exec_catchpoint>: New.
10439 <base>: Remove.
10440 (dtor_catch_exec): Change to ...
10441 (exec_catchpoint::~exec_catchpoint): ... this.
10442 (dtor_watchpoint): Change to ...
10443 (watchpoint::~watchpoint): ... this.
10444 (watch_command_1): Remove reference to base field.
10445 (catch_exec_command_1): Likewise.
10446 (base_breakpoint_dtor): Change to ...
10447 (breakpoint::~breakpoint): ... this.
10448 (base_breakpoint_ops): Remove dtor field value.
10449 (longjmp_bkpt_dtor): Change to ...
10450 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10451 (strace_marker_create_breakpoints_sal): Remove reference to base
10452 field.
10453 (delete_breakpoint): Don't manually call breakpoint destructor.
10454 (create_tracepoint_from_upload): Remove reference to base field.
10455 (trace_pass_set_count): Likewise.
10456 (initialize_breakpoint_ops): Don't initialize
10457 momentary_breakpoint_ops, don't set dtors.
10458 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10459 <~ada_catchpoint>: New.
10460 <base>: Remove.
10461 (create_excep_cond_exprs): Remove reference to base field.
10462 (dtor_exception): Change to ...
10463 (ada_catchpoint::~ada_catchpoint): ... this.
10464 (dtor_catch_exception): Remove.
10465 (dtor_catch_exception_unhandled): Remove.
10466 (dtor_catch_assert): Remove.
10467 (create_ada_exception_catchpoint): Remove reference to base
10468 field.
10469 (initialize_ada_catchpoint_ops): Don't set dtors.
10470 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10471 breakpoint.
10472 <~signal_catchpoint>: New.
10473 <base>: Remove.
10474 (signal_catchpoint_dtor): Change to ...
10475 (signal_catchpoint::~signal_catchpoint): ... this.
10476 (create_signal_catchpoint): Remove reference to base field.
10477 (initialize_signal_catchpoint_ops): Don't set dtor.
10478 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10479 from breakpoint.
10480 <~syscall_catchpoint>: New.
10481 <base>: Remove.
10482 (dtor_catch_syscall): Change to ...
10483 (syscall_catchpoint::~syscall_catchpoint): ... this.
10484 (create_syscall_event_catchpoint): Remove reference to base
10485 field.
10486 (initialize_syscall_catchpoint_ops): Don't set dtor.
10487 * break-catch-throw.c (struct exception_catchpoint): Inherit
10488 from breakpoint.
10489 <~exception_catchpoint>: New.
10490 <base>: Remove.
10491 (dtor_exception_catchpoint): Change to ...
10492 (exception_catchpoint::~exception_catchpoint): ... this.
10493 (handle_gnu_v3_exceptions): Remove reference to base field.
10494 (initialize_throw_catchpoint_ops): Don't set dtor.
10495 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10496 field.
10497 * remote.c (remote_get_tracepoint_status): Likewise.
10498 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10499 * tracefile.c (tracefile_fetch_registers): Likewise.
10500 * tracepoint.c (actions_command): Likewise.
10501 (validate_actionline): Likewise.
10502 (tfind_1): Likewise.
10503 (get_traceframe_location): Likewise.
10504 (find_matching_tracepoint_location): Likewise.
10505 (parse_tracepoint_status): Likewise.
10506 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10507
10508 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10509
10510 * breakpoint.c (struct longjmp_breakpoint): New struct.
10511 (is_tracepoint_type): Change return type to bool.
10512 (is_longjmp_type): New function.
10513 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10514 (set_raw_breakpoint_without_location): Use
10515 new_breakpoint_from_type.
10516 (set_raw_breakpoint): Likewise.
10517
10518 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10519
10520 * breakpoint.c (new_breakpoint_from_type): New function.
10521 (create_breakpoint_sal): Use new_breakpoint_from_type and
10522 unique_ptr.
10523 (create_breakpoint): Likewise.
10524
10525 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10526
10527 * memattr.c (mem_info_command): Rename to ...
10528 (info_mem_command): ... this.
10529 (mem_enable_command): Rename to ...
10530 (enable_mem_command): ... this.
10531 (mem_disable_command): Rename to ...
10532 (disable_mem_command): ... this.
10533 (mem_delete_command): Rename to ...
10534 (delete_mem_command): ... this.
10535 (_initialize_mem): Adjust function names.
10536
10537 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10538
10539 * btrace.c (handle_pt_insn_events): New.
10540 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10541 STATUS. Split into this and ...
10542 (handle_pt_insn_event_flags): ... this.
10543
10544 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10545
10546 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10547 and struct pt_insn.resynced.
10548 * configure: Regenerated.
10549 * config.in: Regenerated.
10550
10551 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10552
10553 * btrace.c (ftrace_find_call_by_number): New function.
10554 (ftrace_new_function): Store objects, not pointers.
10555 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10556 ftrace_new_gap, ftrace_update_function,
10557 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10558 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10559 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10560 btrace_ends_with_single_insn, btrace_call_get): Account for
10561 btrace_thread_info::functions now storing objects.
10562 * btrace.h (struct btrace_thread_info): Add constructor.
10563 (struct btrace_thread_info) <functions>: Make std::vector.
10564 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10565 Initialize with default values.
10566 * record-btrace.c (record_btrace_frame_sniffer): Account for
10567 btrace_thread_info::functions now storing objects.
10568
10569 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10570
10571 * btrace.c: Remove typedef bfun_s.
10572 (ftrace_new_gap): Directly add gaps to the list of gaps.
10573 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10574 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10575 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10576 instead of gdb VEC.
10577
10578 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10579
10580 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10581 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10582 with btrace_thread_info::next_segment and
10583 btrace_thread_info::prev_segment.
10584 * btrace.h: Remove struct btrace_func_link.
10585 (struct btrace_function): Replace pair of function segment pointers
10586 with pair of indices.
10587 * python/py-record-btrace.c (btpy_call_prev_sibling,
10588 btpy_call_next_sibling): Replace references to
10589 btrace_thread_info::segment with btrace_thread_info::next_segment and
10590 btrace_thread_info::prev_segment.
10591 * record-btrace.c (record_btrace_frame_this_id): Use
10592 btrace_find_call_by_number.
10593
10594 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10595
10596 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10597 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10598 btrace_insn_next, btrace_insn_prev): Remove references to
10599 btrace_thread_info::flow.
10600 * btrace.h (struct btrace_function): Remove FLOW.
10601
10602 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10603
10604 * btrace.c (ftrace_find_call_by_number): New function.
10605 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10606 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10607 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10608 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10609 index.
10610 * btrace.h (struct btrace_function): Turn UP into an index.
10611 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10612 as an index.
10613 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10614 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10615 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10616
10617 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10618
10619 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10620 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10621 ftrace_update_function, ftrace_compute_global_level_offset,
10622 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10623 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10624 btrace_insn_end, btrace_is_empty): Remove references to
10625 btrace_thread_info::begin and btrace_thread_info::end.
10626 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10627 (struct btrace_thread_info) <functions>: Adjust comment.
10628 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10629 btrace_thread_info::begin.
10630
10631 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10632
10633 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10634 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10635 ftrace_update_function): Remove arguments that implicitly were always
10636 BTINFO->END.
10637 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10638 Don't pass BTINFO->END.
10639
10640 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10641
10642 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10643 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10644 btrace_find_insn_by_number): Replace function segment pointer with
10645 index.
10646 (btrace_insn_cmp): Simplify.
10647 * btrace.h: (struct btrace_insn_iterator) Rename index to
10648 insn_index. Replace function segment pointer with index into function
10649 segment vector.
10650 * record-btrace.c (record_btrace_call_history): Replace function
10651 segment pointer use with index.
10652 (record_btrace_frame_sniffer): Retrieve function call segment through
10653 vector.
10654 (record_btrace_set_replay): Remove defunc't safety check.
10655
10656 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10657
10658 * btrace.c (btrace_ends_with_single_insn): New function.
10659 (btrace_call_get, btrace_call_number, btrace_call_begin,
10660 btrace_call_end, btrace_call_next, btrace_call_prev,
10661 btrace_find_call_by_number): Use index into call segment vector
10662 instead of pointer.
10663 (btrace_call_cmp): Simplify.
10664 * btrace.h (struct btrace_call_iterator): Replace function call segment
10665 pointer with index into vector.
10666 * record-btrace.c (record_btrace_call_history): Use index instead of
10667 pointer.
10668
10669 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10670
10671 * btrace.c (btrace_insn_begin, btrace_insn_end,
10672 btrace_find_insn_by_number): Add btinfo to iterator.
10673 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10674
10675 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10676
10677 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10678 and save pointers directly.
10679 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10680 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10681 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10682 changed signature of functions.
10683 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10684 (btrace_fetch): Remove code that adds btrace_function pointers to
10685 vector of btrace_functions.
10686 (btrace_clear): Simplify freeing vector of btrace_functions.
10687
10688 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10689
10690 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10691 Replace VEC_* with std::vector functions.
10692 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10693 (struct btrace_thread_info)<functions>: Change type to std::vector.
10694
10695 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10696
10697 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10698 "Removed targets and native configurations" up. Merge duplicate
10699 "New commands" sub-sections. Add "New options" sub-sections.
10700
10701 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10702
10703 * defs.h (copy_integer_to_size): New declaration.
10704 * findvar.c (copy_integer_to_size): New function.
10705 (do_cint_test): New selftest function.
10706 (copy_integer_to_size_test): Likewise.
10707 (_initialize_findvar): Likewise.
10708 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10709 (mips_fbsd_collect_reg): Use raw_collect_integer.
10710 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10711 (mips64_fill_gregset): Use raw_collect_integer
10712 (mips64_fill_fpregset): Use raw_supply_integer.
10713 * regcache.c (regcache::raw_supply_integer): New function.
10714 (regcache::raw_collect_integer): Likewise.
10715 * regcache.h: (regcache::raw_supply_integer): New declaration.
10716 (regcache::raw_collect_integer): Likewise.
10717
10718 2017-05-24 Yao Qi <yao.qi@linaro.org>
10719
10720 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10721 (COMMON_OBS): Add gdbarch-selftests.o.
10722 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10723 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10724 * gdbarch-selftests.c: New file.
10725 * regcache.h (regcache) <~regcache>: Mark it virtual if
10726 GDB_SELF_TEST.
10727 <raw_write>: Likewise.
10728
10729 2017-05-24 Yao Qi <yao.qi@linaro.org>
10730
10731 * regcache.c (current_regcache): Change it to
10732 regcache::current_regcache.
10733 (regcache_observer_target_changed): Update.
10734 (regcache_thread_ptid_changed): Make it a regcache static
10735 method.
10736 (regcache_thread_ptid_changed): Update.
10737 (class regcache_access): New.
10738 (current_regcache_test): Update.
10739 (_initialize_regcache): Update.
10740 * regcache.h: Include forward_list.
10741 (regcache): Declare regcache_thread_ptid_changed and declare
10742 registers_changed_ptid as friend.
10743
10744 2017-05-24 Yao Qi <yao.qi@linaro.org>
10745
10746 * i387-tdep.c (i387_register_to_value): Use register_size
10747 instead of TYPE_LENGTH.
10748 * m68k-tdep.c (m68k_register_to_value): Likewise.
10749
10750 2017-05-24 Yao Qi <yao.qi@linaro.org>
10751
10752 * i387-tdep.c (i387_convert_register_p): Return false if type
10753 code isn't TYPE_CODE_FLT.
10754
10755 2017-05-24 Yao Qi <yao.qi@linaro.org>
10756
10757 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10758 length is 4.
10759 (alpha_register_to_value): Remove type length check.
10760 (alpha_value_to_register): Likewise.
10761
10762 2017-05-24 Yao Qi <yao.qi@linaro.org>
10763
10764 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10765 TYPE_CODE_FLT.
10766
10767 2017-05-24 Yao Qi <yao.qi@linaro.org>
10768
10769 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10770 TYPE_CODE_FLT or not.
10771
10772 2017-05-24 Yao Qi <yao.qi@linaro.org>
10773
10774 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10775 * avr-tdep.c (avr_gdbarch_init): Likewise.
10776 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10777 * cris-tdep.c (cris_gdbarch_init): Likewise.
10778 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10779 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10780 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10781 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10782 * mep-tdep.c (mep_gdbarch_init): Likewise.
10783 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10784 * mips-tdep.c (mips_gdbarch_init): Likewise.
10785 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10786 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10787 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10788 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10789 * v850-tdep.c (v850_gdbarch_init): Likewise.
10790
10791 2017-05-24 Yao Qi <yao.qi@linaro.org>
10792
10793 * selftest-arch.c (tests_with_arch): Call registers_changed
10794 and reinit_frame_cache.
10795 * selftest.c (run_self_tests): Likewise.
10796
10797 2017-05-24 Yao Qi <yao.qi@linaro.org>
10798
10799 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10800 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10801
10802 2017-05-24 Yao Qi <yao.qi@linaro.org>
10803
10804 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10805 set_gdbarch_print_insn.
10806
10807 2017-05-24 Yao Qi <yao.qi@linaro.org>
10808
10809 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10810 set_gdbarch_print_insn.
10811
10812 2017-05-24 Yao Qi <yao.qi@linaro.org>
10813
10814 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10815 set_gdbarch_print_insn.
10816 * arc-tdep.c (arc_gdbarch_init): Likewise.
10817 * arch-utils.c: include dis-asm.h.
10818 (default_print_insn): New function.
10819 * arch-utils.h (default_print_insn): Declare.
10820 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10821 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10822 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10823 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10824 * frv-tdep.c (frv_gdbarch_init): Likewise.
10825 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10826 * gdbarch.sh (print_insn): Use default_print_insn.
10827 * gdbarch.c: Regenerated.
10828 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10829 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10830 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10831 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10832 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10833 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10834 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10835 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10836 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10837 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10838 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10839 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10840 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10841 * mt-tdep.c (mt_gdbarch_init): Likewise.
10842 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10843 * nios2-tdep.c (nios2_print_insn): Remove.
10844 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10845 * rx-tdep.c (rx_gdbarch_init): Likewise.
10846 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10847 * score-tdep.c (score_print_insn): Remove.
10848 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10849 * sh-tdep.c (sh_gdbarch_init): Likewise.
10850 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10851 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10852 * tic6x-tdep.c (tic6x_print_insn): Remove.
10853 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10854 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10855 * v850-tdep.c (v850_gdbarch_init): Likewise.
10856 * vax-tdep.c (vax_gdbarch_init): Likewise.
10857 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10858 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10859
10860 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10861
10862 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10863 (MIPS_FP0_REGNUM): Remove.
10864 (MIPS_FSR_REGNUM): Remove.
10865 (mips_fbsd_supply_fpregs): Use mips_regnum.
10866 (mips_fbsd_supply_gregs): Likewise.
10867 (mips_fbsd_collect_fpregs): Likewise.
10868 (mips_fbsd_collect_gregs): Likewise.
10869
10870 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10871
10872 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10873 (getpfpregs_supplies): New function.
10874 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10875 getfpregs_supplies.
10876 (mips_fbsd_store_inferior_registers): Likewise.
10877
10878 2017-05-22 Pedro Alves <palves@redhat.com>
10879
10880 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10881 maintainer.
10882
10883 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10884
10885 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10886 (store_register): Likewise.
10887 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10888 (get_decimal_float_return_value): Likewise.
10889 (do_ppc_sysv_return_value): Likewise.
10890 (ppc64_sysv_abi_push_integer): Likewise.
10891 (ppc64_sysv_abi_push_freg): Likewise.
10892 (ppc64_sysv_abi_return_value_base): Likewise.
10893 (ppc64_sysv_abi_return_value): Likewise.
10894 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10895 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10896 * rs6000-nat.c: Likewise.
10897 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10898 (rs6000_value_to_register): Likewise.
10899 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10900
10901 2017-05-21 Tom Tromey <tom@tromey.com>
10902
10903 PR rust/21466:
10904 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10905 arrays as "[T]", not "[T; ]".
10906
10907 2017-05-19 Tom Tromey <tom@tromey.com>
10908
10909 PR rust/21484:
10910 * rust-lang.c (exp_descriptor_rust): New function.
10911 (rust_language_defn): Use it.
10912 * p-lang.c (pascal_language_defn): Update.
10913 * opencl-lang.c (opencl_language_defn): Update.
10914 * objc-lang.c (objc_language_defn): Update.
10915 * m2-lang.c (m2_language_defn): Update.
10916 * language.h (struct language_defn)
10917 <la_watch_location_expression>: New member.
10918 * language.c (unknown_language_defn, auto_language_defn)
10919 (local_language_defn): Update.
10920 * go-lang.c (go_language_defn): Update.
10921 * f-lang.c (f_language_defn): Update.
10922 * d-lang.c (d_language_defn): Update.
10923 * c-lang.h (c_watch_location_expression): Declare.
10924 * c-lang.c (c_watch_location_expression): New function.
10925 (c_language_defn, cplus_language_defn, asm_language_defn)
10926 (minimal_language_defn): Use it.
10927 * breakpoint.c (watch_command_1): Call
10928 la_watch_location_expression.
10929 * ada-lang.c (ada_language_defn): Update.
10930
10931 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10932
10933 PR tui/21482
10934 * gdb_curses.h (NOMACROS): Define.
10935 (NCURSES_NOMACROS): Define.
10936
10937 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10938
10939 PR tui/21482
10940 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10941 arg to char *.
10942 * tui/tui-wingeneral.c (box_win): Likewise.
10943 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10944 (tui_show_source_line): Likewise.
10945 (tui_show_exec_info_content): Likewise.
10946
10947 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10948
10949 * sparc-tdep.c (sparc_structure_return_p)
10950 (sparc_arg_on_registers_p): New functions.
10951 (sparc32_store_arguments): Use them.
10952 * sparc64-tdep.c (sparc64_16_byte_align_p)
10953 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10954 Handle TYPE_CODE_ARRAY.
10955
10956 2017-05-17 Yao Qi <yao.qi@linaro.org>
10957
10958 * cli/cli-decode.c (add_alias_cmd): New function.
10959 * command.h (add_alias_cmd): Declare.
10960 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10961 instead call add_alias_cmd.
10962
10963 2017-05-17 Pedro Alves <palves@redhat.com>
10964
10965 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10966 (nat_makefile_frag): ... this. All references updated.
10967 * configure.ac: Likewise.
10968 * configure.nat: Likewise. Enhance comments.
10969 * configure: Regenerate.
10970
10971 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10972
10973 * procfs.c (procfs_create_inferior): Change prototype to match
10974 definition.
10975
10976 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10977
10978 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10979 C++ compiler warning.
10980
10981 2017-05-12 Tom Tromey <tom@tromey.com>
10982
10983 PR rust/21483:
10984 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10985 recurse, just call value_struct_elt directly.
10986
10987 2017-05-12 Tom Tromey <tom@tromey.com>
10988
10989 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10990 OP_RUST_ARRAY>: Fix.
10991
10992 2017-05-12 Tom Tromey <tom@tromey.com>
10993
10994 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10995
10996 2017-05-09 Yao Qi <yao.qi@linaro.org>
10997
10998 * regcache.c: Include <forward_list>.
10999 (struct regcache_list): Remove.
11000 (current_regcache): Update.
11001 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11002 (regcache_thread_ptid_changed): Likewise.
11003 (registers_changed_ptid): Likewise.
11004 (current_regcache_size): Likewise.
11005
11006 2017-05-09 Yao Qi <yao.qi@linaro.org>
11007
11008 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11009 (current_regcache_size): New function.
11010 (current_regcache_test): New function.
11011 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11012
11013 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11014
11015 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11016 (print_gp_register_row): Use get_frame_register_value.
11017
11018 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11019
11020 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11021 (mips_supply_fpregset): Likewise.
11022 (mips64_supply_gregset): Likewise.
11023
11024 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11025
11026 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11027 regcache->raw_supply_zeroed.
11028
11029 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11030
11031 * configure.nat: Rearrange 'case' statements to match
11032 host before cpu.
11033
11034 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11035
11036 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11037 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11038 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11039 "@nat_extra_makefile_frag@".
11040 (Makefile): Remove dependency on "@frags@".
11041 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11042 (data-directory/Makefile): Likewise.
11043 * config/aarch64/linux.mh: Deleted; moved contents to
11044 "gdb/configure.nat".
11045 * config/alpha/alpha-linux.mh: Likewise.
11046 * config/alpha/nbsd.mh: Likewise.
11047 * config/arm/linux.mh: Likewise.
11048 * config/arm/nbsdelf.mh: Likewise.
11049 * config/i386/cygwin.mh: Likewise.
11050 * config/i386/cygwin64.mh: Likewise.
11051 * config/i386/darwin.mh: Likewise.
11052 * config/i386/fbsd.mh: Likewise.
11053 * config/i386/fbsd64.mh: Likewise.
11054 * config/i386/go32.mh: Likewise.
11055 * config/i386/i386gnu.mh: Likewise.
11056 * config/i386/i386sol2.mh: Likewise.
11057 * config/i386/linux.mh: Likewise.
11058 * config/i386/linux64.mh: Likewise.
11059 * config/i386/mingw.mh: Likewise.
11060 * config/i386/mingw64.mh: Likewise.
11061 * config/i386/nbsd64.mh: Likewise.
11062 * config/i386/nbsdelf.mh: Likewise.
11063 * config/i386/nto.mh: Likewise.
11064 * config/i386/obsd.mh: Likewise.
11065 * config/i386/obsd64.mh: Likewise.
11066 * config/i386/sol2-64.mh: Likewise.
11067 * config/ia64/linux.mh: Likewise.
11068 * config/m32r/linux.mh: Likewise.
11069 * config/m68k/linux.mh: Likewise.
11070 * config/m68k/nbsdelf.mh: Likewise.
11071 * config/m68k/obsd.mh: Likewise.
11072 * config/m88k/obsd.mh: Likewise.
11073 * config/mips/fbsd.mh: Likewise.
11074 * config/mips/linux.mh: Likewise.
11075 * config/mips/nbsd.mh: Likewise.
11076 * config/mips/obsd64.mh: Likewise.
11077 * config/pa/linux.mh: Likewise.
11078 * config/pa/nbsd.mh: Likewise.
11079 * config/pa/obsd.mh: Likewise.
11080 * config/powerpc/aix.mh: Likewise.
11081 * config/powerpc/fbsd.mh: Likewise.
11082 * config/powerpc/linux.mh: Likewise.
11083 * config/powerpc/nbsd.mh: Likewise.
11084 * config/powerpc/obsd.mh: Likewise.
11085 * config/powerpc/ppc64-linux.mh: Likewise.
11086 * config/powerpc/spu-linux.mh: Likewise.
11087 * config/s390/linux.mh: Likewise.
11088 * config/sh/nbsd.mh: Likewise.
11089 * config/sparc/fbsd.mh: Likewise.
11090 * config/sparc/linux.mh: Likewise.
11091 * config/sparc/linux64.mh: Likewise.
11092 * config/sparc/nbsd64.mh: Likewise.
11093 * config/sparc/nbsdelf.mh: Likewise.
11094 * config/sparc/obsd64.mh: Likewise.
11095 * config/sparc/sol2.mh: Likewise.
11096 * config/tilegx/linux.mh: Likewise.
11097 * config/vax/nbsdelf.mh: Likewise.
11098 * config/vax/obsd.mh: Likewise.
11099 * config/xtensa/linux.mh: Likewise.
11100 * config/i386/i386gnu.mn: New file, with excerpts from
11101 "config/i386/i386gnu.mh".
11102 * configure: Regenerate.
11103 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11104 *.mh files under "gdb/config".
11105 * configure.nat: New file, with contents from the
11106 "gdb/config/*/*.mh" files.
11107
11108 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11109
11110 * btrace.c (btrace_clear): Free insn vector.
11111
11112 2017-05-05 Pedro Alves <palves@redhat.com>
11113
11114 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11115 * configure: Regenerate.
11116
11117 2017-05-04 Pedro Alves <palves@redhat.com>
11118
11119 * Makefile.in (SFILES): Add progspace-and-thread.c.
11120 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11121 (COMMON_OBS): Add progspace-and-thread.o.
11122 * breakpoint.c: Include "progspace-and-thread.h".
11123 (update_inserted_breakpoint_locations)
11124 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11125 Use scoped_restore_current_pspace_and_thread.
11126 (create_std_terminate_master_breakpoint): Use
11127 scoped_restore_current_program_space.
11128 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11129 (print_breakpoint_location): Use
11130 scoped_restore_current_program_space.
11131 (bp_loc_is_permanent): Use
11132 scoped_restore_current_pspace_and_thread.
11133 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11134 (download_tracepoint_locations): Use
11135 scoped_restore_current_pspace_and_thread.
11136 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11137 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11138 (enum step_over_calls_kind): Moved from inferior.h.
11139 (class scoped_restore_current_thread): New class.
11140 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11141 declaration.
11142 (scoped_restore_current_thread): New class.
11143 * infcmd.c: Include "common/gdb_optional.h".
11144 (continue_1, proceed_after_attach): Use
11145 scoped_restore_current_thread.
11146 (notice_new_inferior): Use scoped_restore_current_thread.
11147 * inferior.c: Include "progspace-and-thread.h".
11148 (restore_inferior, save_current_inferior): Delete.
11149 (add_inferior_command, clone_inferior_command): Use
11150 scoped_restore_current_pspace_and_thread.
11151 * inferior.h (scoped_restore_current_inferior): New class.
11152 * infrun.c: Include "progspace-and-thread.h" and
11153 "common/gdb_optional.h".
11154 (follow_fork_inferior): Use
11155 scoped_restore_current_pspace_and_thread.
11156 (scoped_restore_exited_inferior): New class.
11157 (handle_vfork_child_exec_or_exit): Use
11158 scoped_restore_exited_inferior,
11159 scoped_restore_current_pspace_and_thread,
11160 scoped_restore_current_thread and scoped_restore.
11161 (fetch_inferior_event): Use scoped_restore_current_thread.
11162 * linespec.c (decode_line_full, decode_line_1): Use
11163 scoped_restore_current_program_space.
11164 * mi/mi-main.c: Include "progspace-and-thread.h".
11165 (exec_continue): Use scoped_restore_current_thread.
11166 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11167 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11168 * proc-service.c (ps_pglobal_lookup): Use
11169 scoped_restore_current_program_space.
11170 * progspace-and-thread.c: New file.
11171 * progspace-and-thread.h: New file.
11172 * progspace.c (release_program_space, clone_program_space): Use
11173 scoped_restore_current_program_space.
11174 (restore_program_space, save_current_program_space)
11175 (save_current_space_and_thread): Delete.
11176 (switch_to_program_space_and_thread): Moved to
11177 progspace-and-thread.c.
11178 * progspace.h (save_current_program_space)
11179 (save_current_space_and_thread): Delete declarations.
11180 (scoped_restore_current_program_space): New class.
11181 * remote.c (remote_btrace_maybe_reopen): Use
11182 scoped_restore_current_thread.
11183 * symtab.c: Include "progspace-and-thread.h".
11184 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11185 * thread.c (print_thread_info_1): Use
11186 scoped_restore_current_thread.
11187 (struct current_thread_cleanup): Delete.
11188 (do_restore_current_thread_cleanup)
11189 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11190 (scoped_restore_current_thread::~scoped_restore_current_thread):
11191 ... this new dtor.
11192 (make_cleanup_restore_current_thread): Rename/convert to ...
11193 (scoped_restore_current_thread::scoped_restore_current_thread):
11194 ... this new ctor.
11195 (thread_apply_all_command): Use scoped_restore_current_thread.
11196 (thread_apply_command): Use scoped_restore_current_thread.
11197 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11198 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11199
11200 2017-05-04 Pedro Alves <palves@redhat.com>
11201
11202 * thread.c (make_cleanup_restore_current_thread): Move
11203 find_thread_ptid call before the is_stopped call. Assert that the
11204 thread is found. Replace is_stopped call by checking the thread's
11205 state directly. Remove unnecessary NULL-thread check.
11206
11207 2017-05-04 Pedro Alves <palves@redhat.com>
11208
11209 * corelow.c (thread_section_name): New class.
11210 (get_core_register_section, get_core_siginfo): Use it.
11211
11212 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11213
11214 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11215 (get_core_register_section): Remove xfree of NULL pointer.
11216
11217 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11218
11219 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11220 * regcache.c (regcache::raw_supply_zeroed): New function.
11221 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11222
11223 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11224
11225 * gdbarch.sh: Remove commented out definition of
11226 TARGET_CHAR_BIT.
11227 * gdbarch.h: Re-generate.
11228
11229 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11230
11231 * configure: Regenerate.
11232
11233 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11234
11235 * solib-target.c (solib_target_relocate_section_addresses):
11236 Remove num_section_bases, num_bases, segment_bases variables.
11237
11238 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11239
11240 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11241
11242 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11243
11244 * solib-target.c: Include <vector>
11245 (struct lm_info_target) <~lm_info_target>: Remove.
11246 <segment_bases, section_bases>: Change type to
11247 std::vector<CORE_ADDR>.
11248 (library_list_start_segment, library_list_start_section,
11249 library_list_end_library,
11250 solib_target_relocate_section_addresses): Adjust.
11251
11252 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11253
11254 * gdbarch.sh (software_single_step): Change return type to
11255 std::vector<CORE_ADDR>.
11256 * gdbarch.c, gdbarch.h: Re-generate.
11257 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11258 Adjust.
11259 (arm_deal_with_atomic_sequence_raw): Adjust.
11260 (thumb_get_next_pcs_raw): Adjust.
11261 (arm_get_next_pcs_raw): Adjust.
11262 (arm_get_next_pcs): Adjust.
11263 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11264 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11265 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11266 (alpha_software_single_step): Adjust.
11267 * alpha-tdep.h (alpha_software_single_step): Adjust.
11268 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11269 * arm-tdep.c (arm_software_single_step): Adjust.
11270 (arm_breakpoint_kind_from_current_state): Adjust.
11271 * arm-tdep.h (arm_software_single_step): Adjust.
11272 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11273 * cris-tdep.c (cris_software_single_step): Adjust.
11274 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11275 (micromips_deal_with_atomic_sequence): Adjust.
11276 (deal_with_atomic_sequence): Adjust.
11277 (mips_software_single_step): Adjust.
11278 * mips-tdep.h (mips_software_single_step): Adjust.
11279 * moxie-tdep.c (moxie_software_single_step): Adjust.
11280 * nios2-tdep.c (nios2_software_single_step): Adjust.
11281 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11282 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11283 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11284 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11285 * sparc-tdep.c (sparc_software_single_step): Adjust.
11286 * spu-tdep.c (spu_software_single_step): Adjust.
11287 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11288
11289 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11290
11291 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11292 * gdbarch.h: Re-generate.
11293
11294 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11295
11296 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11297 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11298 * python/py-instruction.c, python/py-instruction.h: New file.
11299 * python/py-record.c: Add py-instruction.h include.
11300 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11301 gdb.RecordInstruction.
11302 * python/python-internal.h: Add gdbpy_initialize_instruction
11303 declaration.
11304 * python/python.c (do_start_initialization): Add
11305 gdbpy_initialize_instruction.
11306
11307 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11308
11309 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11310 Remove.
11311 (btrace_func_from_recpy_func): New function.
11312 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11313 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11314 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11315 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11316 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11317 Also, use new helper functions.
11318 (btpy_list_item): Use new helper functions.
11319 (recpy_bt_function_call_history): Use new type name.
11320 (btpy_call_getset): Remove.
11321 (gdbpy_initialize_btrace): Remove code to initialize
11322 gdb.BtraceFunctionCall.
11323 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11324 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11325 recpy_bt_func_prev, recpy_bt_func_next): New export.
11326 * python/py-record.c (recpy_func_type): New static object.
11327 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11328 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11329 recpy_func_next): New function.
11330 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11331 (recpy_func_getset): New static object.
11332 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11333 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11334
11335 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11336
11337 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11338 (btpy_object, btpy_insn_type, btpy_new): Remove.
11339 (btpy_list_object): Use gdb.RecordInstruction type instead of
11340 gdb.BtraceInstruction type.
11341 (btrace_insn_from_recpy_insn): New function.
11342 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11343 btpy_new.
11344 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11345 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11346 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11347 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11348 instead of btpy_object.
11349 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11350 btpy_insn_data, btpy_insn_decode): Rename to ...
11351 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11352 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11353 recpy_bt_insn_decode): This. Also, use new helper functions.
11354 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11355 recpy_insn_type.
11356 (btpy_insn_getset): Remove.
11357 (gdbpy_initialize_btrace): Remove code to initialize
11358 gdb.BtraceInstruction. Use recpy_element_object.
11359 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11360 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11361 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11362 * python/py-record.c (recpy_insn_type): New static object.
11363 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11364 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11365 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11366 New function.
11367 (recpy_insn_getset): New static object.
11368 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11369 * python/py-record.h (recpy_element_object): New typedef.
11370 (recpy_insn_type, recpy_insn_new): New export.
11371
11372 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11373
11374 * py-record-btrace.c (btpy_insn_new): Removed.
11375 (btpy_insn_or_gap_new): New function.
11376 (btpy_insn_error): Removed.
11377 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11378 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11379 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11380 btpy_insn_or_gap_new instead of btpy_insn_new.
11381 (btpy_insn_getset): Remove btpy_insn_error.
11382 * py-record.c (recpy_gap_type): New static object.
11383 (recpy_gap_object): New typedef.
11384 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11385 recpy_gap_reason_string): New function.
11386 (recpy_gap_getset): New static object.
11387 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11388 * py-record.h (recpy_gap_new): New export.
11389
11390 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11391
11392 * python/py-record.c (recpy_ptid): Remove.
11393 (recpy_record_getset): Remove recpy_ptid.
11394
11395 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11396
11397 * btrace.c (btrace_fetch): Set inferior_ptid.
11398 * python/py-record-btrace.c: Add "py-record.h" include.
11399 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11400 recpy_bt_end, recpy_bt_instruction_history,
11401 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11402 in gdb.Record object instead of current ptid.
11403 * python/py-record.c: Include new "py-record.h" file.
11404 (recpy_record_object): Moved to py-record.h.
11405 * python/py-record.h: New file.
11406
11407 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11408
11409 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11410 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11411 indentation.
11412
11413 2017-05-01 Joel Brobecker <brobecker@adacore.com>
11414
11415 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11416 the past maintainers section.
11417
11418 2017-04-28 Yao Qi <yao.qi@linaro.org>
11419
11420 * infcmd.c (get_return_value): Use regcache ctor, and remove
11421 cleanup.
11422
11423 2017-04-28 Yao Qi <yao.qi@linaro.org>
11424 Pedro Alves <palves@redhat.com>
11425
11426 * regcache.c (regcache::regcache): New tag dispatch ctor.
11427 (do_cooked_read): Moved above.
11428 (regcache_dup): Use the tag dispatch ctor..
11429 * regcache.h (regcache): Declare ctor, delete copy ctor and
11430 assignment operator, remove friend regcache_dup.
11431
11432 2017-04-28 Yao Qi <yao.qi@linaro.org>
11433
11434 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11435 call method save instead of regcache_cpy.
11436 * regcache.h (struct regcache): Make regcache_dup a friend.
11437
11438 2017-04-28 Yao Qi <yao.qi@linaro.org>
11439
11440 * regcache.c (struct regcache): Move to regcache.h
11441 (regcache::arch): New method.
11442 (regcache_get_ptid): Update.
11443 (get_regcache_arch): Call arch method.
11444 (get_regcache_aspace): Call method aspace.
11445 (register_buffer): Change it to method.
11446 (regcache_save): Change it to regcache::save.
11447 (regcache_restore): Likewise.
11448 (regcache_cpy_no_passthrough): Remove the declaration.
11449 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11450 (regcache_cpy_no_passthrough): Change it to method
11451 cpy_no_passthrough.
11452 (regcache_register_status): Change it to method
11453 get_register_status.
11454 (regcache_invalidate): Change it to method invalidate.
11455 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11456 (regcache_raw_update): Change it to method raw_update.
11457 (regcache_raw_read): Likewise.
11458 (regcache_raw_read_signed): Likewise.
11459 (regcache_raw_read_unsigned): Likewise.
11460 (regcache_raw_write_signed): Likewise.
11461 (regcache_raw_write_unsigned): Likewise.
11462 (regcache_cooked_read): Likewise.
11463 (regcache_cooked_read_value): Likewise.
11464 (regcache_cooked_read_signed): Likewise.
11465 (regcache_cooked_read_unsigned): Likewise.
11466 (regcache_cooked_write_signed): Likewise.
11467 (regcache_cooked_write_unsigned): Likewise.
11468 (regcache_raw_set_cached_value): Likewise.
11469 (regcache_raw_write): Likewise.
11470 (regcache_cooked_write): Likewise.
11471 (regcache_xfer_part): Likewise.
11472 (regcache_raw_read_part): Likewise.
11473 (regcache_raw_write_part): Likewise.
11474 (regcache_cooked_read_part): Likewise.
11475 (regcache_cooked_write_part): Likewise.
11476 (regcache_raw_supply): Likewise.
11477 (regcache_raw_collect): Likewise.
11478 (regcache_transfer_regset): Likewise.
11479 (regcache_supply_regset): Likewise.
11480 (regcache_collect_regset): Likewise.
11481 (regcache_debug_print_register): Likewise.
11482 (enum regcache_dump_what): Move it to regcache.h.
11483 (regcache_dump): Change it to method dump.
11484 * regcache.h (enum regcache_dump_what): New.
11485 (class regcache): New.
11486 * target.c (target_fetch_registers): Call method
11487 debug_print_register.
11488 (target_store_registers): Likewise.
11489
11490 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11491
11492 * windows-nat.c (struct lm_info_windows): Initialize field.
11493 (windows_make_so): Allocate lm_info_windows with new.
11494 (windows_free_so): Free lm_info_windows with delete.
11495
11496 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11497
11498 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11499 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11500 cleanup.
11501 (darwin_free_so): Free lm_info_darwin with delete.
11502
11503 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11504
11505 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11506 <l_addr_p>: Change type to bool.
11507 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11508 (svr4_free_so): Free lm_info_svr4 with delete.
11509 (svr4_copy_library_list): Replace memcpy with call to copy
11510 constructor.
11511 (library_list_start_library, svr4_default_sos): Allocate
11512 lm_info_svr4 with new.
11513
11514 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11515
11516 * solib-target.c (struct lm_info_target): Add destructor,
11517 initialize fields.
11518 <name>: Change type to std::string.
11519 (library_list_start_library): Allocate lm_info_target with new.
11520 (solib_target_free_library_list): Free lm_info_target with
11521 delete.
11522 (solib_target_current_sos): Adapt to std::string.
11523 (solib_target_free_so): Free lm_info_target with delete.
11524
11525 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11526
11527 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11528 fields.
11529 (frv_current_sos): Allocate lm_info_frv with new.
11530 (frv_relocate_main_executable): Free lm_info_frv with delete,
11531 allocate with new.
11532 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11533
11534 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11535
11536 * solib-frv.c (struct lm_info_frv): Fix indentation.
11537
11538 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11539
11540 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11541 map field.
11542 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11543 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11544 and allocate with new.
11545 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11546
11547 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11548
11549 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11550 <filename, member_name>: Change type to std::string.
11551 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11552 (library_list_start_library): Allocate lm_info_aix with new.
11553 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11554 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11555 with copy constructor.
11556
11557 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11558
11559 * solist.h (struct lm_info): Remove.
11560 (struct lm_info_base): New class.
11561 (struct so_list) <lm_info>: Change type to lm_info_base *.
11562 * nto-tdep.c (struct lm_info): Remove.
11563 (lm_addr): Adjust.
11564 * solib-aix.c (struct lm_info): Rename to ...
11565 (struct lm_info_aix): ... this. Extend lm_info_base.
11566 (lm_info_p): Rename to ...
11567 (lm_info_aix_p): ... this, and adjust.
11568 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11569 solib_aix_parse_libraries, library_list_start_library,
11570 solib_aix_free_library_list, solib_aix_parse_libraries,
11571 solib_aix_get_library_list,
11572 solib_aix_relocate_section_addresses, solib_aix_free_so,
11573 solib_aix_get_section_offsets,
11574 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11575 Adjust.
11576 (struct solib_aix_inferior_data) <library_list>: Adjust.
11577 * solib-darwin.c (struct lm_info): Rename to ...
11578 (struct lm_info_darwin): ... this. Extend lm_info_base.
11579 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11580 * solib-dsbt.c (struct lm_info): Rename to ...
11581 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11582 (struct dsbt_info) <main_executable_lm_info): Adjust.
11583 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11584 dsbt_relocate_section_addresses): Adjust.
11585 * solib-frv.c (struct lm_info): Rename to ...
11586 (struct lm_info_frv): ... this. Extend lm_info_base.
11587 (main_executable_lm_info): Adjust.
11588 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11589 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11590 find_canonical_descriptor_in_load_object,
11591 frv_fdpic_find_canonical_descriptor): Adjust.
11592 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11593 to lm_info_svr4.
11594 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11595 svr4_clear_so, svr4_copy_library_list,
11596 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11597 svr4_current_sos, svr4_fetch_objfile_link_map,
11598 solist_update_incremental): Adjust.
11599 * solib-svr4.h (struct lm_info_svr4): Move here from
11600 solib-svr4.c.
11601 * solib-target.c (struct lm_info): Rename to ...
11602 (struct lm_info_target): ... this. Extend lm_info_base.
11603 (lm_info_p): Rename to ...
11604 (lm_info_target_p): ... this.
11605 (solib_target_parse_libraries, library_list_start_segment,
11606 library_list_start_section, library_list_start_library,
11607 library_list_end_library, solib_target_free_library_list,
11608 solib_target_current_sos, solib_target_free_so,
11609 solib_target_relocate_section_addresses): Adjust.
11610 * windows-nat.c (struct lm_info): Rename to ...
11611 (struct lm_info_windows): ... this. Extend lm_info_base.
11612 (windows_make_so, handle_load_dll, handle_unload_dll,
11613 windows_xfer_shared_libraries): Adjust.
11614
11615 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11616
11617 * solib-darwin.c (struct darwin_so_list): Remove.
11618 (darwin_current_sos): Allocate an so_list object instead of a
11619 darwin_so_list, separately allocate an lm_info object.
11620 (darwin_free_so): Free lm_info.
11621
11622 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11623
11624 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11625 with fprintf_filtered.
11626
11627 2017-04-28 Yao Qi <yao.qi@linaro.org>
11628
11629 * regcache.c (regcache::regcache): New function.
11630 (regcache::~regcache): New function.
11631 (regcache_xmalloc_1): Remove.
11632 (regcache_xmalloc): Call new regcache.
11633 (regcache_xfree): Call delete regcache.
11634 (get_thread_arch_aspace_regcache): Call new regcache.
11635
11636 2017-04-28 Yao Qi <yao.qi@linaro.org>
11637
11638 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11639 lwp instead of ptid_get_lwp.
11640
11641 2017-04-28 Yao Qi <yao.qi@linaro.org>
11642
11643 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11644 lwp_info instead of getting from inferior_ptid.
11645
11646 2017-04-27 Keith Seitz <keiths@redhat.com>
11647
11648 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11649 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11650 (CV_CONVERSION_BADNESS): Define.
11651 (rank_one_type): Remove overly restrictive rvalue reference
11652 rank checks.
11653 Add cv-qualifier checks and subranks for type equality.
11654 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11655 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11656 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11657
11658 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11659
11660 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11661 count when creating the object.
11662
11663 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11664 Ulrich Weigand <uweigand@de.ibm.com>
11665
11666 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11667 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11668 is used in AIX.
11669 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11670 (process_xcoff_symbol): Likewise.
11671 (scan_xcoff_symtab): Likewise.
11672
11673 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11674
11675 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11676 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11677 (ia64_access_reg): Use get_frame_register_unsigned.
11678 (ia64_access_rse_reg): Likewise.
11679 (ia64_libunwind_frame_prev_register): Likewise.
11680
11681 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11682
11683 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11684 * gdbarch.c: Regenerated.
11685 * gdbarch.h: Regenerated.
11686 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11687 visibility external.
11688 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11689 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11690 (enum cfa_how_kind): Move to ...
11691 (struct dwarf2_frame_state_reg_info): Likewise.
11692 (struct dwarf2_frame_state): Likewise.
11693 * dwarf2-frame.h: ... here.
11694 (dwarf2_frame_state_alloc_regs): New declaration.
11695 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11696 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11697
11698 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11699
11700 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11701 regcache_raw_read_unsigned.
11702 (xtensa_pseudo_register_write): Likewise.
11703
11704 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11705
11706 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11707 (nds32_pseudo_register_write): Likewise.
11708
11709 2017-04-25 Yao Qi <yao.qi@linaro.org>
11710
11711 * regcache.c (struct regcache) <readonly_p>: Change its type
11712 to bool.
11713 (regcache_xmalloc_1): Update parameter type and callers update.
11714
11715 2017-04-25 Yao Qi <yao.qi@linaro.org>
11716
11717 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11718 set_gdbarch_wchar_bit.
11719 * arm-tdep.c (arm_gdbarch_init): Likewise.
11720
11721 2017-04-25 Pedro Alves <palves@redhat.com>
11722
11723 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11724 (BothAreRelocatable, memcopy, memmove): Don't define.
11725 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11726 macros.
11727
11728 2017-04-25 Pedro Alves <palves@redhat.com>
11729
11730 * common/common-defs.h: Include "common/poison.h".
11731 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11732 and adjust.
11733 * common/poison.h: New file.
11734 * common/traits.h: Include <type_traits>.
11735 (Not, Or, Requires): New, moved from common/function-view.h.
11736
11737 2017-04-25 Pedro Alves <palves@redhat.com>
11738
11739 * breakpoint.h (struct breakpoint): In-class initialize all
11740 fields. Make boolean fields "bool".
11741 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11742 memset call and initializations no longer necessary.
11743
11744 2017-04-25 Pedro Alves <palves@redhat.com>
11745
11746 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11747 reference.
11748 (pt_btrace_insn): New function.
11749 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11750
11751 2017-04-25 Pedro Alves <palves@redhat.com>
11752
11753 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11754 "base" field and inherit from "bp_location" instead. Add
11755 non-default ctor.
11756 (allocate_location_exception): Use new non-default ctor.
11757 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11758 (init_bp_location): Convert to ...
11759 (bp_location::bp_location): ... this new ctor, and remove memset
11760 call.
11761 (base_breakpoint_allocate_location): Use the new non-default ctor.
11762 * breakpoint.h (bp_location): Now a class. Declare default and
11763 non-default ctors. In-class initialize all members.
11764 (init_bp_location): Remove declaration.
11765
11766 2017-04-25 Pedro Alves <palves@redhat.com>
11767
11768 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11769 assignment operator.
11770
11771 2017-04-24 Yao Qi <yao.qi@linaro.org>
11772
11773 * doublest.c (convert_doublest_to_floatformat): Call
11774 floatformat_totalsize_bytes.
11775
11776 2017-04-22 Tom Tromey <tom@tromey.com>
11777
11778 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11779 ui_out_emit_list.
11780 * stack.c (print_frame): Use ui_out_emit_list.
11781 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11782 ui_out_emit_list.
11783 * mi/mi-main.c (print_one_inferior)
11784 (mi_cmd_data_list_register_names)
11785 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11786 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11787 ui_out_emit_list.
11788 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11789 (mi_output_solib_attribs): Use ui_out_emit_list,
11790 ui_out_emit_tuple.
11791 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11792 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11793 (mi_cmd_stack_list_args, list_args_or_locals): Use
11794 ui_out_emit_list.
11795 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11796 * breakpoint.c (print_solib_event, output_thread_groups): Use
11797 ui_out_emit_list.
11798
11799 2017-04-22 Tom Tromey <tom@tromey.com>
11800
11801 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11802 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11803 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11804
11805 2017-04-22 Tom Tromey <tom@tromey.com>
11806
11807 * tracepoint.c (tvariables_info_1)
11808 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11809
11810 2017-04-22 Tom Tromey <tom@tromey.com>
11811
11812 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11813 annotate_arg_emitter.
11814 * breakpoint.c (print_mention_watchpoint)
11815 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11816 * annotate.h (struct annotate_arg_emitter): New.
11817
11818 2017-04-22 Tom Tromey <tom@tromey.com>
11819
11820 * record-btrace.c (record_btrace_insn_history)
11821 (record_btrace_insn_history_range, record_btrace_call_history)
11822 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11823 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11824 ui_out_emit_tuple.
11825 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11826 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11827 * skip.c (skip_info): Use ui_out_emit_tuple.
11828 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11829 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11830 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11831 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11832 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11833 ui_out_emit_tuple.
11834 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11835 (output_register, mi_cmd_data_read_memory)
11836 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11837 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11838 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11839 Use ui_out_emit_tuple.
11840 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11841 ui_out_emit_tuple.
11842 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11843 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11844 * linux-thread-db.c (info_auto_load_libthread_db): Use
11845 ui_out_emit_tuple.
11846 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11847 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11848 * disasm.c (do_mixed_source_and_assembly_deprecated)
11849 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11850 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11851 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11852 * breakpoint.c (print_one_breakpoint_location)
11853 (print_one_breakpoint): Use ui_out_emit_tuple.
11854 * auto-load.c (print_script, info_auto_load_cmd): Use
11855 ui_out_emit_tuple.
11856 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11857
11858 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11859
11860 * thread.c (print_thread_info_1): Remove dead code.
11861
11862 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11863
11864 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11865 GDB_SELF_TEST.
11866 * arm-tdep.c (selftests::arm_record_test): Likewise.
11867
11868 2017-04-21 Yao Qi <yao.qi@linaro.org>
11869
11870 * regcache.c (regcache_restore): Remove argument 2. Replace
11871 argument 3 with regcache. Get register status from
11872 src->register_status and get register contents from
11873 register_buffer (src, regnum).
11874 (regcache_cpy): Update.
11875
11876 2017-04-19 Pedro Alves <palves@redhat.com>
11877
11878 * gdbthread.h (thread): Add missing closing parenthesis in
11879 comment.
11880
11881 2017-04-19 Pedro Alves <palves@redhat.com>
11882
11883 * common/refcounted-object.h: New file.
11884 * gdbthread.h: Include "common/refcounted-object.h".
11885 (thread_info): Inherit from refcounted_object and add comments.
11886 (thread_info::incref, thread_info::decref)
11887 (thread_info::m_refcount): Delete.
11888 (thread_info::deletable): Use the refcounted_object::refcount()
11889 method.
11890 * inferior.c (current_inferior_): Add comment.
11891 (set_current_inferior): Increment/decrement refcounts.
11892 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11893 not-deletable instead of comparing with the current inferior.
11894 (initialize_inferiors): Increment the initial inferior's refcount.
11895 * inferior.h (struct inferior): Forward declare.
11896 Include "common/refcounted-object.h".
11897 (current_inferior, set_current_inferior): Move declaration to
11898 before struct inferior's definition, and fix comment.
11899 (inferior): Inherit from refcounted_object. Add comments.
11900 * thread.c (switch_to_thread_no_regs): Reference the thread's
11901 inferior pointer directly instead of doing a ptid lookup.
11902 (switch_to_no_thread): New function.
11903 (switch_to_thread(thread_info *)): New function, factored out
11904 from ...
11905 (switch_to_thread(ptid_t)): ... this.
11906 (restore_current_thread): Delete.
11907 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11908 fields, and add 'inf' field.
11909 (do_restore_current_thread_cleanup): Check whether old->inf is
11910 alive instead of looking up an inferior by ptid. Use
11911 switch_to_thread and switch_to_no_thread.
11912 (restore_current_thread_cleanup_dtor): Use old->inf directly
11913 instead of lookup up an inferior by id. Decref the inferior.
11914 Don't restore 'removable'.
11915 (make_cleanup_restore_current_thread): Same the inferior pointer
11916 in old, instead of the inferior number. Incref the inferior.
11917 Don't save/clear 'removable'.
11918
11919 2017-04-19 Pedro Alves <palves@redhat.com>
11920
11921 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11922 unittests/scoped_restore-selftests.c.
11923 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11924 * common/scoped_restore.h (scoped_restore_base): Make "class".
11925 (scoped_restore_base::release): New public method.
11926 (scoped_restore_base::scoped_restore_base): New protected ctor.
11927 (scoped_restore_base::m_saved_var): New protected field.
11928 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11929 scoped_restore_base base class instead of m_saved_var directly.
11930 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11931 (scoped_restore_tmpl::scoped_restore_tmpl(const
11932 scoped_restore_tmpl<T>&)): Likewise.
11933 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11934 method.
11935 (scoped_restore_tmpl::saved_var): New method.
11936 (scoped_restore_tmpl::m_saved_var): Delete.
11937 * inferior.h (inferior::detaching): Now a bool.
11938 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11939 cleanup.
11940 * unittests/scoped_restore-selftests.c: New file.
11941
11942 2017-04-19 Pedro Alves <palves@redhat.com>
11943
11944 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11945 Re-sort in alphabetic order.
11946
11947 2017-04-18 Pedro Alves <palves@redhat.com>
11948
11949 * xml-support.c (obstack_xml_printf): Delete.
11950 * xml-support.h (obstack_xml_printf): Delete.
11951
11952 2017-04-18 Pedro Alves <palves@redhat.com>
11953
11954 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11955 vdebug, verror, body_text, start_element, end_element, name,
11956 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11957 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11958 is_xinclude>: Make private and add m_ prefix.
11959 (gdb_xml_parser::body_text): New method, based on ...
11960 (gdb_xml_body_text): ... this. Adjust.
11961 (gdb_xml_parser::vdebug): New method, based on ...
11962 (gdb_xml_debug): ... this. Adjust.
11963 (gdb_xml_parser::verror): New method, based on ...
11964 (gdb_xml_error): ... this. Adjust.
11965 (gdb_xml_parser::start_element): New method, based on ...
11966 (gdb_xml_start_element): ... this. Adjust.
11967 (gdb_xml_start_element_wrapper): Defer to
11968 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11969 (gdb_xml_parser::end_element): New method, based on ...
11970 (gdb_xml_end_element_wrapper): ... this. Adjust.
11971 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11972 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11973 (gdb_xml_parser::use_dtd): New method, based on ...
11974 (gdb_xml_use_dtd): ... this. Adjust.
11975 (gdb_xml_parser::parse): New method, based on ...
11976 (gdb_xml_parse): ... this. Adjust.
11977 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11978 (xinclude_start_include): Adjust to call the parser's name method.
11979 (xml_xinclude_default, xml_xinclude_start_doctype)
11980 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11981 method.
11982 (xml_process_xincludes): Adjust to call parser methods.
11983 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11984 declarations.
11985
11986 2017-04-18 Pedro Alves <palves@redhat.com>
11987
11988 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11989 gdb::optional<std::string>.
11990 * xml-support.c: Include <string>.
11991 (scope_level::scope_level(scope_level &&))
11992 (scope_level::~scope_level): Delete.
11993 (scope_level::body): Now a std::string.
11994 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11995 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11996 parameter.
11997 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11998 (xinclude_parsing_data::output): Now a std::string reference.
11999 (xinclude_start_include): Adjust.
12000 (xml_xinclude_default): Adjust.
12001 (xml_process_xincludes): Add 'output' parameter, and return bool.
12002 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12003 and return bool.
12004 * xml-tdesc.c: Include <unordered_map> and <string>.
12005 (tdesc_xml_cache): Delete.
12006 (tdesc_xml_cache_s): Delete.
12007 (xml_cache): Now an std::unordered_map.
12008 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12009 (target_fetch_description_xml): Change return type to
12010 gdb::optional<std::string>, and adjust.
12011 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12012 (target_fetch_description_xml): Change return type to
12013 gdb::optional<std::string>.
12014
12015 2017-04-18 Pedro Alves <palves@redhat.com>
12016
12017 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12018 unittests/optional-selftests.c.
12019 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12020 * unittests/optional-selftests.c: New file.
12021 * unittests/optional/assignment/1.cc: New file.
12022 * unittests/optional/assignment/2.cc: New file.
12023 * unittests/optional/assignment/3.cc: New file.
12024 * unittests/optional/assignment/4.cc: New file.
12025 * unittests/optional/assignment/5.cc: New file.
12026 * unittests/optional/assignment/6.cc: New file.
12027 * unittests/optional/assignment/7.cc: New file.
12028 * unittests/optional/cons/copy.cc: New file.
12029 * unittests/optional/cons/default.cc: New file.
12030 * unittests/optional/cons/move.cc: New file.
12031 * unittests/optional/cons/value.cc: New file.
12032 * unittests/optional/in_place.cc: New file.
12033 * unittests/optional/observers/1.cc: New file.
12034 * unittests/optional/observers/2.cc: New file.
12035
12036 2017-04-18 Pedro Alves <palves@redhat.com>
12037
12038 * common/gdb_optional.h: Include common/traits.h.
12039 (in_place_t): New type.
12040 (in_place): New constexpr variable.
12041 (optional::optional): Remove member initialization of
12042 m_instantiated.
12043 (optional::optional(in_place_t...)): New constructor.
12044 (optional::~optional): Use reset.
12045 (optional::optional(const optional&)): New.
12046 (optional::optional(const optional&&)): New.
12047 (optional::optional(T &)): New.
12048 (optional::optional(T &&)): New.
12049 (operator::operator=(const optional &)): New.
12050 (operator::operator=(optional &&)): New.
12051 (operator::operator= (const T &))
12052 (operator::operator= (T &&))
12053 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12054 (operator::reset): New.
12055 (operator::m_instantiated):: Add in-class initializer.
12056 * common/traits.h: Include <type_traits>.
12057 (struct And): New types.
12058
12059 2017-04-18 Pedro Alves <palves@redhat.com>
12060
12061 * xml-support.c: Include <vector>.
12062 (scope_level::scope_level(const gdb_xml_element *))
12063 (scope_level::scope_level(scope_level&&)): New.
12064 (scope_level::~scope_level): New.
12065 (scope_level_s): Delete.
12066 (gdb_xml_parser::scopes): Now a std::vector.
12067 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12068 Use std::vector.
12069 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12070 scope cleanup code.
12071 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12072 of the scopes member. Use std::vector::emplace_back.
12073
12074 2017-04-18 Pedro Alves <palves@redhat.com>
12075
12076 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12077 a bool.
12078 (gdb_xml_end_element): Change type of first parameter.
12079 (gdb_xml_cleanup): Rename to ...
12080 (gdb_xml_parser::~gdb_xml_parser): ... this.
12081 (gdb_xml_create_parser_and_cleanup): Delete with ...
12082 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12083 to this new ctor.
12084 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12085 using gdb_xml_create_parser_and_cleanup.
12086 (xinclude_parsing_data): Add ctor/dtor.
12087 (xml_xinclude_cleanup): Delete.
12088 (xml_process_xincludes): Create a local xinclude_parsing_data
12089 instead of heap-allocating one. Create a local gdb_xml_parser
12090 instead of heap-allocating one with
12091 gdb_xml_create_parser_and_cleanup.
12092
12093 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12094
12095 PR threads/20743
12096 * fbsd-nat.c (resume_one_thread_cb): Remove.
12097 (resume_all_threads_cb): Remove.
12098 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12099 iterate_over_threads.
12100
12101 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12102
12103 * NEWS: Create a new section for the next release branch.
12104 Rename the section of the current branch, now that it has
12105 been cut.
12106
12107 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12108
12109 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12110 * version.in: Bump version to 8.0.50.DATE-git.
12111
12112 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12113
12114 PR gdb/21385
12115 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12116 independently of the host, and fix build breakage on Cygwin.
12117
12118 2017-04-13 Pedro Alves <palves@redhat.com>
12119
12120 * inferior.c (free_inferior): Convert to ...
12121 (inferior::~inferior): ... this dtor.
12122 (inferior::inferior): New ctor, factored out from ...
12123 (add_inferior_silent): ... here. Allocate the inferior with a new
12124 expression.
12125 (delete_inferior): Call delete instead of free_inferior.
12126 * inferior.h (gdb_environ, continuation): Forward declare.
12127 (inferior): Now a class. Add in-class initialization to all
12128 members. Make boolean fields bool, except 'detaching'.
12129 (inferior::inferior): New explicit ctor.
12130 (inferior::~inferior): New.
12131
12132 2017-04-13 Pedro Alves <palves@redhat.com>
12133
12134 * inferior.c (init_inferior_list): Delete.
12135 * inferior.h (init_inferior_list): Delete.
12136
12137 2017-04-13 Pedro Alves <palves@redhat.com>
12138
12139 PR threads/13217
12140 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12141 (top level): Call it twice, with different thread sets.
12142
12143 2017-04-13 Pedro Alves <palves@redhat.com>
12144
12145 * thread.c: Include <algorithm>.
12146 (thread_array_cleanup): Delete.
12147 (scoped_inc_dec_ref): New class.
12148 (live_threads_count): New function.
12149 (set_thread_refcount): Delete.
12150 (tp_array_compar_ascending): Now a bool.
12151 (tp_array_compar): Convert to a std::sort comparison function.
12152 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12153 and live_threads_count.
12154
12155 2017-04-13 Pedro Alves <palves@redhat.com>
12156
12157 * infrun.c (follow_fork_inferior): Also switch the current
12158 inferior.
12159
12160 2017-04-13 Pedro Alves <palves@redhat.com>
12161
12162 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12163 before calling create_internal_breakpoint.
12164
12165 2017-04-13 Pedro Alves <palves@redhat.com>
12166
12167 * fork-child.c (execv_argv): New class.
12168 (breakup_args): Refactored as ...
12169 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12170 Copy arguments to storage and replace separators with NULL
12171 terminators in place.
12172 (escape_bang_in_quoted_argument): Adjust to return bool.
12173 (execv_argv::execv_argv): New ctor.
12174 (execv_argv::init_for_shell): New method, factored out from
12175 fork_inferior. Don't strdup strings into the vector.
12176 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12177 Remove free_vector_argv call.
12178
12179 2017-04-13 Yao Qi <yao.qi@linaro.org>
12180
12181 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12182 tdep->rx_psw_type.
12183
12184 2017-04-13 Yao Qi <yao.qi@linaro.org>
12185
12186 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12187 * rx-tdep.c (rx_gdbarch_init): Likewise.
12188
12189 2017-04-13 Pedro Alves <palves@redhat.com>
12190
12191 * breakpoint.h (struct breakpoint): Reindent.
12192
12193 2017-04-13 Pedro Alves <palves@redhat.com>
12194
12195 * breakpoint.c (bp_location): Rename to ...
12196 (bp_locations): ... this. All references updated.
12197 (bp_location_count): Rename to ...
12198 (bp_locations_count): ... this. All references updated.
12199 (bp_location_placed_address_before_address_max): Rename to ...
12200 (bp_locations_placed_address_before_address_max): ... this. All
12201 references updated.
12202 (bp_location_shadow_len_after_address_max): Rename to ...
12203 (bp_locations_shadow_len_after_address_max): ... this. All
12204 references updated.
12205 (bp_location_compare_addrs): Rename to ...
12206 (bp_locations_compare_addrs): ... this. All references updated.
12207 (bp_location_compare):Rename to ...
12208 (bp_locations_compare): ... this. All references updated.
12209 (bp_location_target_extensions_update): Rename to ...
12210 (bp_locations_target_extensions_update): ... this. All references
12211 updated.
12212
12213 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12214
12215 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12216 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12217 'sgtty.h'.
12218 * common/gdb_termios.h: New file, with parts of "terminal.h".
12219 * inflow.c: Include "gdb_termios.h".
12220 * ser-unix.c: Include "gdb_termios.h".
12221 * terminal.h: Move terminal-related defines to
12222 "common/gdb_termios.h".
12223
12224 2017-04-12 Tom Tromey <tom@tromey.com>
12225
12226 * probe.c (parse_probes): Update.
12227 * location.h (delete_event_location): Don't declare.
12228 (event_location_deleter::operator()): Update.
12229 * location.c (event_location_deleter::operator()): Rename from
12230 delete_event_location.
12231 * linespec.h (linespec_result) <location>: Change type to
12232 event_location_up.
12233 * linespec.c (canonicalize_linespec, event_location_to_sals)
12234 (decode_objc): Update.
12235 (linespec_result): Don't call delete_event_location.
12236 * breakpoint.c (create_breakpoints_sal)
12237 (bkpt_probe_create_sals_from_location)
12238 (strace_marker_create_sals_from_location): Update.
12239
12240 2017-04-12 Tom Tromey <tom@tromey.com>
12241
12242 * linespec.h (struct linespec_result): Add constructor and
12243 destructor.
12244 (init_linespec_result, destroy_linespec_result)
12245 (make_cleanup_destroy_linespec_result): Don't declare.
12246 * linespec.c (init_linespec_result): Remove.
12247 (linespec_result::~linespec_result): Rename from
12248 destroy_linespec_result. Update.
12249 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12250 Remove.
12251 * breakpoint.c (create_breakpoint, break_range_command)
12252 (decode_location_default): Update.
12253 * ax-gdb.c (agent_command_1): Update.
12254
12255 2017-04-12 Tom Tromey <tom@tromey.com>
12256
12257 * remote.c (remote_download_tracepoint): Update.
12258 * python/py-breakpoint.c (bppy_get_location): Update.
12259 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12260 (gdbscm_breakpoint_location): Update.
12261 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12262 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12263 Change type to event_location_up.
12264 * breakpoint.c (create_overlay_event_breakpoint)
12265 (create_longjmp_master_breakpoint)
12266 (create_std_terminate_master_breakpoint)
12267 (create_exception_master_breakpoint)
12268 (breakpoint_event_location_empty_p, print_breakpoint_location)
12269 (print_one_breakpoint_location, create_thread_event_breakpoint)
12270 (init_breakpoint_sal, create_breakpoint)
12271 (print_recreate_ranged_breakpoint, break_range_command)
12272 (init_ada_exception_breakpoint, say_where): Update.
12273 (base_breakpoint_dtor): Don't call delete_event_location.
12274 (bkpt_print_recreate, tracepoint_print_recreate)
12275 (dprintf_print_recreate, update_static_tracepoint)
12276 (breakpoint_re_set_default): Update.
12277
12278 2017-04-12 Tom Tromey <tom@tromey.com>
12279
12280 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12281 type of "to_do". Update.
12282 (compute_stack_depth): Use std::vector.
12283
12284 2017-04-12 Tom Tromey <tom@tromey.com>
12285
12286 * printcmd.c (find_instruction_backward): Use std::vector.
12287
12288 2017-04-12 Tom Tromey <tom@tromey.com>
12289
12290 * symfile.c (objfilep): Remove typedef.
12291 (reread_symbols): Use a std::vector.
12292
12293 2017-04-12 Tom Tromey <tom@tromey.com>
12294
12295 * mi/mi-main.c (exec_direction_forward): Remove.
12296 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12297 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12298 scoped_restore.
12299 * guile/guile.c (guile_repl_command, guile_command)
12300 (gdbscm_execute_gdb_command): Use scoped_restore.
12301 * go-exp.y (go_parse): Use scoped_restore.
12302 * d-exp.y (d_parse): Use scoped_restore.
12303 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12304 * c-exp.y (c_parse): Use scoped_restore.
12305
12306 2017-04-12 Tom Tromey <tom@tromey.com>
12307
12308 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12309 (mi_parse): Update return type.
12310 (mi_parse_free): Remove.
12311 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12312 (mi_parse::~mi_parse): Rename from mi_parse_free.
12313 (mi_parse_cleanup): Remove.
12314 (mi_parse): Return a unique_ptr. Use new.
12315 * mi/mi-main.c (mi_execute_command): Update.
12316
12317 2017-04-12 Tom Tromey <tom@tromey.com>
12318
12319 * location.c (explicit_location_lex_one): Return a
12320 unique_xmalloc_ptr.
12321 (string_to_explicit_location): Update. Remove cleanups.
12322
12323 2017-04-12 Tom Tromey <tom@tromey.com>
12324
12325 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12326 (compare_value_and_voffset): Change type. Update.
12327 (compute_vtable_size): Change type of "offset_vec".
12328 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12329 (gnuv3_get_typeid): Remove extraneous declaration.
12330
12331 2017-04-12 Tom Tromey <tom@tromey.com>
12332
12333 * charset.h (wchar_iterator): Fix comment.
12334
12335 2017-04-12 Tom Tromey <tom@tromey.com>
12336
12337 * charset.c (iconv_wrapper): New class.
12338 (cleanup_iconv): Remove.
12339 (convert_between_encodings): Use it.
12340
12341 2017-04-12 Tom Tromey <tom@tromey.com>
12342
12343 * symfile.h (increment_reading_symtab): Update type.
12344 * symfile.c (decrement_reading_symtab): Remove.
12345 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12346 * psymtab.c (psymtab_to_symtab): Update.
12347 * dwarf2read.c (dw2_instantiate_symtab): Update.
12348
12349 2017-04-12 Tom Tromey <tom@tromey.com>
12350
12351 * jit.c (struct jit_reader): Declare separately. Add constructor
12352 and destructor. Change type of "handle".
12353 (loaded_jit_reader): Define separately.
12354 (jit_reader_load): Update. New "new".
12355 (jit_reader_unload_command): Use "delete".
12356 * gdb-dlfcn.h (struct dlclose_deleter): New.
12357 (gdb_dlhandle_up): New typedef.
12358 (gdb_dlopen, gdb_dlsym): Update types.
12359 (gdb_dlclose): Remove.
12360 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12361 (gdb_dlsym): Change type of "handle".
12362 (make_cleanup_dlclose): Remove.
12363 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12364 * compile/compile-c-support.c (load_libcc): Update.
12365
12366 2017-04-12 Tom Tromey <tom@tromey.com>
12367
12368 * symtab.h (find_pcs_for_symtab_line): Change return type.
12369 * symtab.c (find_pcs_for_symtab_line): Change return type.
12370 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12371 type of "vec". Update.
12372 (ltpy_get_pcs_for_line): Update.
12373 * linespec.c (decode_digits_ordinary): Update.
12374
12375 2017-04-12 Tom Tromey <tom@tromey.com>
12376
12377 * tracepoint.c (actions_command): Update.
12378 * python/python.c (python_command, python_interactive_command):
12379 Update.
12380 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12381 * guile/guile.c (guile_command): Update.
12382 * defs.h (read_command_lines, read_command_lines_1): Return
12383 command_line_up.
12384 (command_lines_deleter): New struct.
12385 (command_line_up): New typedef.
12386 * compile/compile.c (compile_code_command)
12387 (compile_print_command): Update.
12388 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12389 command_line_up.
12390 (make_cleanup_free_command_lines): Remove.
12391 * cli/cli-script.c (get_command_line, read_command_lines_1)
12392 (copy_command_lines): Return command_line_up.
12393 (while_command, if_command, read_command_lines, define_command)
12394 (document_command): Update.
12395 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12396 Remove.
12397 * breakpoint.h (breakpoint_set_commands): Change type of
12398 "commands".
12399 * breakpoint.c (breakpoint_set_commands): Change type of
12400 "commands". Update.
12401 (do_map_commands_command, update_dprintf_command_list)
12402 (create_tracepoint_from_upload): Update.
12403
12404 2017-04-12 Tom Tromey <tom@tromey.com>
12405
12406 * tracepoint.c (scope_info): Update.
12407 * spu-tdep.c (spu_catch_start): Update.
12408 * python/python.c (gdbpy_decode_line): Update.
12409 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12410 * python/py-breakpoint.c (bppy_init): Update.
12411 * probe.c (parse_probes): Update.
12412 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12413 * location.h (event_location_deleter): New struct.
12414 (event_location_up): New typedef.
12415 (new_linespec_location, new_address_location, new_probe_location)
12416 (new_explicit_location, copy_event_location)
12417 (string_to_event_location, string_to_event_location_basic)
12418 (string_to_explicit_location): Update return type.
12419 (make_cleanup_delete_event_location): Remove.
12420 * location.c (new_linespec_location, new_address_location)
12421 (new_probe_location, new_explicit_location, copy_event_location):
12422 Return event_location_up.
12423 (delete_event_location_cleanup)
12424 (make_cleanup_delete_event_location): Remove.
12425 (string_to_explicit_location, string_to_event_location_basic)
12426 (string_to_event_location): Return event_location_up.
12427 * linespec.c (canonicalize_linespec, event_location_to_sals)
12428 (decode_line_with_current_source)
12429 (decode_line_with_last_displayed, decode_objc): Update.
12430 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12431 * completer.c (location_completer): Update.
12432 * cli/cli-cmds.c (edit_command, list_command): Update.
12433 * breakpoint.c (create_overlay_event_breakpoint)
12434 (create_longjmp_master_breakpoint)
12435 (create_std_terminate_master_breakpoint)
12436 (create_exception_master_breakpoint)
12437 (create_thread_event_breakpoint): Update.
12438 (init_breakpoint_sal): Update. Remove some dead code.
12439 (create_breakpoint_sal): Change type of "location". Update.
12440 (create_breakpoints_sal, create_breakpoint, break_command_1)
12441 (dprintf_command, break_range_command, until_break_command)
12442 (init_ada_exception_breakpoint)
12443 (strace_marker_create_sals_from_location)
12444 (update_static_tracepoint, trace_command, ftrace_command)
12445 (strace_command, create_tracepoint_from_upload): Update.
12446 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12447 * ax-gdb.c (agent_command_1): Update.
12448
12449 2017-04-12 Pedro Alves <palves@redhat.com>
12450
12451 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12452 * configure.tgt: Handle i[34567]86-*-go32* and
12453 i[34567]86-*-msdosdjgpp*.
12454 * i386-tdep.c (i386_svr4_reg_to_regnum):
12455 Make extern.
12456 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12457 i386-go32-tdep.c.
12458 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12459 * i386-go32-tdep.c: New file.
12460 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12461 declarations.
12462
12463 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12464
12465 * aix-thread.c (pd_status2str): Change return type to const char *.
12466
12467 2017-04-12 Pedro Alves <palves@redhat.com>
12468
12469 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12470 calls to set_gdbarch_gnu_triplet_regexp.
12471
12472 2017-04-12 Pedro Alves <palves@redhat.com>
12473
12474 PR gdb/21323
12475 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12476 New enum value.
12477 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12478 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12479 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12480 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12481 * gdbarch.h, gdbarch.c: Regenerate.
12482 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12483 gdbarch_wchar_bit and gdbarch_wchar_signed.
12484 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12485 * arm-tdep.c (arm_gdbarch_init): Likewise.
12486 * avr-tdep.c (avr_gdbarch_init): Likewise.
12487 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12488 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12489 * i386-tdep.c (i386_go32_init_abi): Likewise.
12490 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12491 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12492 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12493 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12494 * sh-tdep.c (sh_gdbarch_init): Likewise.
12495 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12496 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12497 * windows-tdep.c (windows_init_abi): Likewise.
12498 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12499
12500 2017-04-12 Pedro Alves <palves@redhat.com>
12501
12502 PR c++/21323
12503 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12504 cplus_primitive_type_char32_t>: New enum values.
12505 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12506 and cplus_primitive_type_char32_t.
12507 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12508 32, use the archtecture's built-in type for char16_t and char32_t,
12509 respectively. Otherwise, fallback to init_integer_type as before,
12510 but make the type unsigned, and issue a complaint.
12511 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12512
12513 2017-04-12 Alan Hayward <alan.hayward@arm.com>
12514
12515 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12516 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12517
12518 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12519
12520 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12521 'const char *'.
12522
12523 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12524
12525 * common/common-utils.c (free_vector_argv): New function.
12526 * common/common-utils.h: Include <vector>.
12527 (free_vector_argv): New prototype.
12528 * darwin-nat.c (darwin_create_inferior): Rewrite function
12529 prototype in order to constify "exec_file" and accept a
12530 "std::string" for "allargs".
12531 * fork-child.c: Include <vector>.
12532 (breakup_args): Rewrite function, using C++.
12533 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12534 and accept "std::string" for "allargs". Update the code to
12535 calculate "argv" based on "allargs". Update calls to "exec_fun"
12536 and "execvp".
12537 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12538 order to constify "exec_file" and accept a "std::string" for
12539 "allargs".
12540 * go32-nat.c (go32_create_inferior): Likewise.
12541 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12542 * infcmd.c (run_command_1): Constify "exec_file". Use
12543 "std::string" for inferior arguments.
12544 * inferior.h (fork_inferior): Update prototype.
12545 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12546 prototype in order to constify "exec_file" and accept a
12547 "std::string" for "allargs".
12548 * nto-procfs.c (procfs_create_inferior): Likewise.
12549 * procfs.c (procfs_create_inferior): Likewise.
12550 * remote-sim.c (gdbsim_create_inferior): Likewise.
12551 * remote.c (extended_remote_run): Update code to accept
12552 "std::string" as argument.
12553 (extended_remote_create_inferior): Rewrite function prototype in
12554 order to constify "exec_file" and accept a "std::string" for
12555 "allargs".
12556 * rs6000-nat.c (super_create_inferior): Likewise.
12557 (rs6000_create_inferior): Likewise.
12558 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12559 * windows-nat.c (windows_create_inferior): Likewise.
12560
12561 2017-04-11 Pedro Alves <palves@redhat.com>
12562
12563 * thread.c: Fix whitespace throughout.
12564
12565 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12566
12567 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12568
12569 2017-04-11 Alan Hayward <alan.hayward@arm.com>
12570
12571 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12572
12573 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12574
12575 PR gdb/21364
12576 * osdata.c (info_osdata): Check if 'type' is an empty string
12577 instead of NULL.
12578
12579 2017-04-10 Pedro Alves <palves@redhat.com>
12580
12581 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12582 (ptid_to_global_thread_id, in_thread_list)
12583 (do_captured_list_thread_ids, set_resumed, set_running)
12584 (set_executing, set_stop_requested, finish_thread_state)
12585 (validate_registers_access, can_access_registers_ptid)
12586 (print_thread_info_1, switch_to_thread)
12587 (do_restore_current_thread_cleanup)
12588 (make_cleanup_restore_current_thread, thread_command)
12589 (thread_name_command): Use operator== instead of ptid_equal.
12590
12591 2017-04-10 Pedro Alves <palves@redhat.com>
12592
12593 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12594 (current_thread_cleanup_chain): Delete.
12595 (restore_current_thread_cleanup_dtor)
12596 (make_cleanup_restore_current_thread): Remove references to
12597 current_thread_cleanup_chain.
12598
12599 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12600
12601 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12602 REG_UNKNOWN.
12603
12604 2017-04-10 Yao Qi <yao.qi@linaro.org>
12605
12606 PR gdb/19942
12607 * gdbthread.h (thread_info::deletable): New method.
12608 (thread_info::incref): New method.
12609 (thread_info::decref): New method.
12610 (thread_info::refcount): Move it to private.
12611 * infrun.c (save_stop_context): Call inc_refcount.
12612 (release_stop_context_cleanup): Likewise.
12613 * thread.c (set_thread_exited): New function.
12614 (init_thread_list): Delete "tp" only it is deletable, otherwise
12615 call set_thread_exited.
12616 (delete_thread_1): Call set_thread_exited.
12617 (current_thread_cleanup) <inferior_pid>: Remove.
12618 <thread>: New field.
12619 (restore_current_thread_ptid_changed): Removed.
12620 (do_restore_current_thread_cleanup): Adjust.
12621 (restore_current_thread_cleanup_dtor): Don't call
12622 find_thread_ptid.
12623 (set_thread_refcount): Use dec_refcount.
12624 (make_cleanup_restore_current_thread): Adjust.
12625 (thread_apply_all_command): Call inc_refcount.
12626 (_initialize_thread): Don't call
12627 observer_attach_thread_ptid_changed.
12628
12629 2017-04-10 Yao Qi <yao.qi@linaro.org>
12630
12631 * thread.c (delete_thread_1): Hoist code on marking thread as
12632 exited.
12633
12634 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12635
12636 * windows-nat.c (windows_detach): Initialize ptid with
12637 minus_one_ptid.
12638
12639 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12640
12641 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12642
12643 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12644
12645 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12646 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12647 (bfin_pseudo_register_write): Likewise
12648
12649 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12650
12651 * common/ptid.h (struct ptid): Change to...
12652 (class ptid_t): ... this.
12653 <ptid_t>: New constructors.
12654 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12655 matches>: New methods.
12656 <make_null, make_minus_one>: New static methods.
12657 <pid>: Rename to...
12658 <m_pid>: ...this.
12659 <lwp>: Rename to...
12660 <m_lwp>: ...this.
12661 <tid>: Rename to...
12662 <m_tid>: ...this.
12663 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12664 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12665 as references, move comment to class ptid_t.
12666 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12667 ptid_t static methods.
12668 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12669 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12670 Take ptid arguments as references, implement using ptid_t methods.
12671 * unittests/ptid-selftests.c: New file.
12672 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12673 unittests/ptid-selftests.c.
12674 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12675
12676 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12677
12678 * python/python.c (python_run_simple_file): Cast mode literal to
12679 non-const char pointer as expected by PyFile_FromString.
12680
12681 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12682
12683 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12684 minus_one_ptid and null_ptid.
12685
12686 2017-04-05 Pedro Alves <palves@redhat.com>
12687
12688 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12689 * configure: Regenerate.
12690
12691 2017-04-05 Pedro Alves <palves@redhat.com>
12692
12693 * ada-exp.y (yyerror): Constify.
12694 * ada-lang.c (bound_name, get_selections)
12695 (ada_variant_discrim_type)
12696 (ada_variant_discrim_name, ada_value_struct_elt)
12697 (ada_lookup_struct_elt_type, is_unchecked_variant)
12698 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12699 (catch_ada_exception_command_split)
12700 (catch_ada_assert_command_split, catch_assert_command)
12701 (ada_op_name): Constify.
12702 * ada-lang.h (ada_yyerror, get_selections)
12703 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12704 * arc-tdep.c (arc_print_frame_cache): Constify.
12705 * arm-tdep.c (arm_skip_stub): Constify.
12706 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12707 (gen_aggregate_elt_ref): Constify.
12708 * bcache.c (print_bcache_statistics): Constify.
12709 * bcache.h (print_bcache_statistics): Constify.
12710 * break-catch-throw.c (catch_exception_command_1):
12711 * breakpoint.c (struct ep_type_description::description):
12712 Constify.
12713 (add_solib_catchpoint): Constify.
12714 (catch_fork_command_1): Add cast.
12715 (add_catch_command): Constify.
12716 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12717 Constify.
12718 * bsd-uthread.c (bsd_uthread_state): Constify.
12719 * buildsym.c (patch_subfile_names): Constify.
12720 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12721 Constify.
12722 * c-exp.y (yyerror): Constify.
12723 (token::oper): Constify.
12724 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12725 * c-varobj.c (cplus_describe_child): Constify.
12726 * charset.c (find_charset_names): Add cast.
12727 (find_charset_names): Constify array and add const_cast.
12728 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12729 (edit_command): Constify.
12730 * cli/cli-decode.c (lookup_cmd): Constify.
12731 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12732 Constify.
12733 (struct dump_context): Constify.
12734 (add_dump_command, restore_command): Constify.
12735 * cli/cli-script.c (get_command_line): Constify.
12736 * cli/cli-script.h (get_command_line): Constify.
12737 * cli/cli-utils.c (check_for_argument): Constify.
12738 * cli/cli-utils.h (check_for_argument): Constify.
12739 * coff-pe-read.c (struct read_pe_section_data): Constify.
12740 * command.h (lookup_cmd): Constify.
12741 * common/print-utils.c (decimal2str): Constify.
12742 * completer.c (gdb_print_filename): Constify.
12743 * corefile.c (set_gnutarget): Constify.
12744 * cp-name-parser.y (yyerror): Constify.
12745 * cp-valprint.c (cp_print_class_member): Constify.
12746 * cris-tdep.c (cris_register_name, crisv32_register_name):
12747 Constify.
12748 * d-exp.y (yyerror): Constify.
12749 (struct token::oper): Constify.
12750 * d-lang.h (d_yyerror): Constify.
12751 * dbxread.c (struct header_file_location::name): Constify.
12752 (add_old_header_file, add_new_header_file, last_function_name)
12753 (dbx_next_symbol_text, add_bincl_to_list)
12754 (find_corresponding_bincl_psymtab, set_namestring)
12755 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12756 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12757 * defs.h (command_line_input, print_address_symbolic)
12758 (deprecated_readline_begin_hook): Constify.
12759 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12760 Constify.
12761 * event-top.c (handle_line_of_input): Constify and add cast.
12762 * exceptions.c (catch_errors): Constify.
12763 * exceptions.h (catch_errors): Constify.
12764 * expprint.c (print_subexp_standard, op_string, op_name)
12765 (op_name_standard, dump_raw_expression, dump_raw_expression):
12766 * expression.h (op_name, op_string, dump_raw_expression):
12767 Constify.
12768 * f-exp.y (yyerror): Constify.
12769 (struct token::oper): Constify.
12770 (struct f77_boolean_val::name): Constify.
12771 * f-lang.c (f_word_break_characters): Constify.
12772 * f-lang.h (f_yyerror): Constify.
12773 * fork-child.c (fork_inferior): Add cast.
12774 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12775 (new_variant): Constify.
12776 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12777 * gdbarch.c: Regenerate.
12778 * gdbcore.h (set_gnutarget): Constify.
12779 * go-exp.y (yyerror): Constify.
12780 (token::oper): Constify.
12781 * go-lang.h (go_yyerror): Constify.
12782 * go32-nat.c (go32_sysinfo): Constify.
12783 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12784 * guile/scm-cmd.c (cmdscm_function): Constify.
12785 * guile/scm-param.c (pascm_param_value): Constify.
12786 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12787 (h8300sx_register_name): Constify.
12788 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12789 Constify.
12790 * ia64-tdep.c (ia64_register_names): Constify.
12791 * infcmd.c (construct_inferior_arguments): Constify.
12792 (path_command, attach_post_wait): Constify.
12793 * language.c (show_range_command, show_case_command)
12794 (unk_lang_error): Constify.
12795 * language.h (language_defn::la_error)
12796 (language_defn::la_name_of_this): Constify.
12797 * linespec.c (decode_line_2): Constify.
12798 * linux-thread-db.c (thread_db_err_str): Constify.
12799 * lm32-tdep.c (lm32_register_name): Constify.
12800 * m2-exp.y (yyerror): Constify.
12801 * m2-lang.h (m2_yyerror): Constify.
12802 * m32r-tdep.c (m32r_register_names): Constify and make static.
12803 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12804 * m88k-tdep.c (m88k_register_name): Constify.
12805 * macroexp.c (appendmem): Constify.
12806 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12807 (upgrade_type, parse_external, parse_partial_symbols)
12808 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12809 (new_symbol): Constify.
12810 * memattr.c (mem_info_command): Constify.
12811 * mep-tdep.c (register_name_from_keyword): Constify.
12812 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12813 Constify.
12814 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12815 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12816 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12817 cast.
12818 (mi_execute_async_cli_command): Constify.
12819 * mips-tdep.c (mips_register_name): Constify.
12820 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12821 (am33_register_name, am33_2_register_name)
12822 * moxie-tdep.c (moxie_register_names): Constify.
12823 * nat/linux-osdata.c (osdata_type): Constify fields.
12824 * nto-tdep.c (nto_parse_redirection): Constify.
12825 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12826 (lookup_child_selector): Constify.
12827 (objc_methcall::name): Constify.
12828 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12829 (lookup_struct_typedef): Constify.
12830 * objfiles.c (pc_in_section): Constify.
12831 * objfiles.h (pc_in_section): Constify.
12832 * p-exp.y (struct token::oper): Constify.
12833 (yyerror): Constify.
12834 * p-lang.h (pascal_yyerror): Constify.
12835 * parser-defs.h (op_name_standard): Constify.
12836 (op_print::string): Constify.
12837 (exp_descriptor::op_name): Constify.
12838 * printcmd.c (print_address_symbolic): Constify.
12839 * psymtab.c (print_partial_symbols): Constify.
12840 * python/py-breakpoint.c (stop_func): Constify.
12841 (bppy_get_expression): Constify.
12842 * python/py-cmd.c (cmdpy_completer::name): Constify.
12843 (cmdpy_function): Constify.
12844 * python/py-event.c (evpy_add_attribute)
12845 (gdbpy_initialize_event_generic): Constify.
12846 * python/py-event.h (evpy_add_attribute)
12847 (gdbpy_initialize_event_generic): Constify.
12848 * python/py-evts.c (add_new_registry): Constify.
12849 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12850 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12851 * python/py-inferior.c (get_buffer): Add cast.
12852 * python/py-param.c (parm_constant::name): Constify.
12853 * python/py-unwind.c (fprint_frame_id): Constify.
12854 * python/python.c (gdbpy_parameter_value): Constify.
12855 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12856 * remote.c (memory_packet_config::name): Constify.
12857 (show_packet_config_cmd, remote_write_bytes)
12858 (remote_buffer_add_string):
12859 * reverse.c (exec_reverse_once): Constify.
12860 * rs6000-tdep.c (variant::name, variant::description): Constify.
12861 * rust-exp.y (rustyyerror): Constify.
12862 * rust-lang.c (rust_op_name): Constify.
12863 * rust-lang.h (rustyyerror): Constify.
12864 * serial.h (serial_ops::name): Constify.
12865 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12866 (sh_sh3e_register_name, sh_sh2e_register_name)
12867 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12868 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12869 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12870 (sh_sh4al_dsp_register_name): Constify.
12871 * sh64-tdep.c (sh64_register_name): Constify.
12872 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12873 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12874 * stabsread.c (patch_block_stabs, read_type_number)
12875 (ref_map::stabs, ref_add, process_reference)
12876 (symbol_reference_defined, define_symbol, define_symbol)
12877 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12878 (read_one_struct_field, read_struct_fields, read_baseclasses)
12879 (read_tilde_fields, read_struct_type, read_array_type)
12880 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12881 (read_huge_number, read_range_type, read_args, common_block_start)
12882 (find_name_end): Constify.
12883 * stabsread.h (common_block_start, define_symbol)
12884 (process_one_symbol, symbol_reference_defined, ref_add):
12885 * symfile.c (get_section_index, add_symbol_file_command):
12886 * symfile.h (get_section_index): Constify.
12887 * target-descriptions.c (tdesc_type::name): Constify.
12888 (tdesc_free_type): Add cast.
12889 * target.c (find_default_run_target):
12890 (add_deprecated_target_alias, find_default_run_target)
12891 (target_announce_detach): Constify.
12892 (do_option): Constify.
12893 * target.h (add_deprecated_target_alias): Constify.
12894 * thread.c (print_thread_info_1): Constify.
12895 * top.c (deprecated_readline_begin_hook, command_line_input):
12896 Constify.
12897 (init_main): Add casts.
12898 * top.h (handle_line_of_input): Constify.
12899 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12900 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12901 (tfind_command): Rename to ...
12902 (tfind_command_1): ... this and constify.
12903 (tfind_command): New function.
12904 (tfind_end_command, tfind_start_command): Adjust.
12905 (encode_source_string): Constify.
12906 * tracepoint.h (encode_source_string): Constify.
12907 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12908 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12909 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12910 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12911 * tui/tui-win.c (parse_scrolling_args): Constify.
12912 * tui/tui-windata.c (tui_erase_data_content): Constify.
12913 * tui/tui-windata.h (tui_erase_data_content): Constify.
12914 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12915 * tui/tui.c (tui_enable): Add cast.
12916 * utils.c (defaulted_query): Constify.
12917 (init_page_info): Add cast.
12918 (puts_debug, subset_compare): Constify.
12919 * utils.h (subset_compare): Constify.
12920 * varobj.c (varobj_format_string): Constify.
12921 * varobj.h (varobj_format_string): Constify.
12922 * vax-tdep.c (vax_register_name): Constify.
12923 * windows-nat.c (windows_detach): Constify.
12924 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12925 * xml-support.c (gdb_xml_end_element): Constify.
12926 * xml-tdesc.c (tdesc_start_reg): Constify.
12927 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12928 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12929 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12930
12931 2017-04-05 Pedro Alves <palves@redhat.com>
12932
12933 * proc-api.c (struct trans): Constify.
12934 (procfs_note): Constify.
12935 * proc-events.c (struct trans, syscall_table):
12936 * proc-flags.c (struct trans): Constify.
12937 * proc-utils.h (procfs_note): Constify.
12938 * proc-why.c (struct trans): Constify.
12939 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12940 (procfs_detach): Constify.
12941 * sol-thread.c (struct string_map): Constify.
12942 (td_err_string, td_state_string): Constify.
12943
12944 2017-04-05 Pedro Alves <palves@redhat.com>
12945
12946 * proc-api.c (procfs_filename): Don't initialize
12947 procfs_filename.
12948 (prepare_to_trace): Assume procfs_filename is non-NULL.
12949 (_initialize_proc_api): Give procfs_filename a default value here.
12950
12951 2017-04-05 Pedro Alves <palves@redhat.com>
12952
12953 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12954 'cond_string' parameter.
12955 (extract_exception_regexp): Constify 'string' parameter.
12956 (catch_exception_command_1): Constify.
12957 * breakpoint.c (init_catchpoint)
12958 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12959 parameter.
12960 (ep_parse_optional_if_clause, catch_fork_command_1)
12961 (catch_exec_command_1): Constify.
12962 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12963 parameter.
12964 (ep_parse_optional_if_clause): Constify.
12965 * cli/cli-utils.c (remove_trailing_whitespace)
12966 (check_for_argument): Constify.
12967 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12968 non-const overload.
12969 (check_for_argument): Likewise.
12970
12971 2017-04-05 Pedro Alves <palves@redhat.com>
12972
12973 * event-top.c (command_line_handler): Add cast to execute_command
12974 call.
12975 * record-btrace.c (cmd_record_btrace_bts_start)
12976 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12977 (cmd_record_btrace_start): Add cast to execute_command call.
12978 * record-full.c (record_full_goto_insn):
12979 * record.c (record_start, record_stop): Add cast to
12980 execute_command_to_string calls.
12981 (cmd_record_start): Add cast to execute_command calls.
12982
12983 2017-04-05 Pedro Alves <palves@redhat.com>
12984
12985 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12986 static inline function.
12987 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12988 array and use gdb_PyArg_ParseTupleAndKeywords.
12989 * python/py-cmd.c (cmdpy_init): Likewise.
12990 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12991 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12992 (infpy_search_memory): Likewise.
12993 * python/py-objfile.c (objfpy_add_separate_debug_file)
12994 (gdbpy_lookup_objfile): Likewise.
12995 * python/py-symbol.c (gdbpy_lookup_symbol)
12996 (gdbpy_lookup_global_symbol): Likewise.
12997 * python/py-type.c (gdbpy_lookup_type): Likewise.
12998 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12999 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13000 Likewise.
13001
13002 2017-04-05 Pedro Alves <palves@redhat.com>
13003
13004 * python/python-internal.h (gdb_PyGetSetDef): New type.
13005 * python/py-block.c (block_object_getset)
13006 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13007 * python/py-event.c (event_object_getset)
13008 (finish_breakpoint_object_getset): Likewise.
13009 * python/py-inferior.c (inferior_object_getset): Likewise.
13010 * python/py-infthread.c (thread_object_getset): Likewise.
13011 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13012 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13013 * python/py-objfile.c (objfile_getset): Likewise.
13014 * python/py-progspace.c (pspace_getset): Likewise.
13015 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13016 Likewise.
13017 * python/py-record.c (recpy_record_getset): Likewise.
13018 * python/py-symbol.c (symbol_object_getset): Likewise.
13019 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13020 Likewise.
13021 * python/py-type.c (type_object_getset, field_object_getset):
13022 Likewise.
13023 * python/py-value.c (value_object_getset): Likewise.
13024
13025 2017-04-05 Pedro Alves <palves@redhat.com>
13026
13027 * python/python-internal.h (gdb_PyObject_CallMethod)
13028 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13029 New functions.
13030 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13031 (PySys_GetObject, PySys_SetPath): New macros.
13032
13033 2017-04-05 Pedro Alves <palves@redhat.com>
13034
13035 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13036 info_osdata_command.
13037 * osdata.c (info_osdata_command): Rename to ...
13038 (info_osdata): ... this. Constify 'type' parameter, and remove
13039 the 'from_tty' parameter. Accept NULL TYPE.
13040 (info_osdata_command): New function.
13041 * osdata.h (info_osdata_command): Remove declaration.
13042 (info_osdata): New declaration.
13043
13044 2017-04-05 Pedro Alves <palves@redhat.com>
13045
13046 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13047 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13048 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13049 parameter.
13050 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13051 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13052 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13053 parameter.
13054 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13055 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13056 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13057 (mi_cmd_file_list_exec_source_files)
13058 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13059 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13060 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13061 parameter.
13062 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13063 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13064 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13065 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13066 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13067 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13068 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13069 'command' parameter.
13070 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13071 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13072 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13073 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13074 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13075 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13076 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13077 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13078 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13079 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13080 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13081 parameter.
13082 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13083 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13084 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13085 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13086 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13087 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13088 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13089 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13090 (mi_cmd_data_list_changed_registers)
13091 (mi_cmd_data_write_register_values)
13092 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13093 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13094 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13095 (mi_cmd_list_features, mi_cmd_list_target_features)
13096 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13097 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13098 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13099 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13100 (mi_cmd_trace_frame_collected): Constify 'command'
13101 parameter.
13102 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13103 'command' parameter.
13104
13105 2017-04-05 Pedro Alves <palves@redhat.com>
13106
13107 * ada-lang.c (ada_completer_word_break_characters): Now a const
13108 array.
13109 (ada_get_gdb_completer_word_break_characters): Constify.
13110 * completer.c (gdb_completer_command_word_break_characters)
13111 (gdb_completer_file_name_break_characters)
13112 (gdb_completer_quote_characters): Now const arrays.
13113 (get_gdb_completer_quote_characters): Constify.
13114 (set_rl_completer_word_break_characters): New function.
13115 (set_gdb_completion_word_break_characters)
13116 (complete_line_internal): Use it.
13117 * completer.h (get_gdb_completer_quote_characters): Constify.
13118 (set_rl_completer_word_break_characters): Declare.
13119 * f-lang.c (f_word_break_characters): Constify.
13120 * language.c (default_word_break_characters): Constify.
13121 * language.h (language_defn::la_word_break_characters): Constify.
13122 (default_word_break_characters): Constify.
13123 * top.c (init_main): Use set_rl_completer_word_break_characters.
13124
13125 2017-04-05 Pedro Alves <palves@redhat.com>
13126
13127 * aix-thread.c (aix_thread_pid_to_str)
13128 (aix_thread_extra_thread_info): Constify.
13129 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13130 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13131 (bsd_uthread_pid_to_str): Constify.
13132 * corelow.c (core_pid_to_str): Constify.
13133 * darwin-nat.c (darwin_pid_to_str): Constify.
13134 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13135 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13136 Constify.
13137 * gnu-nat.c (gnu_pid_to_str): Constify.
13138 * go32-nat.c (go32_pid_to_str): Constify.
13139 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13140 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13141 * inferior.c (inferior_pid_to_str): Constify.
13142 * linux-nat.c (linux_nat_pid_to_str): Constify.
13143 * linux-tdep.c (linux_core_pid_to_str): Constify.
13144 * linux-thread-db.c (thread_db_pid_to_str)
13145 (thread_db_extra_thread_info): Constify.
13146 * nto-tdep.c (nto_extra_thread_info): Constify.
13147 * nto-tdep.h (nto_extra_thread_info): Constify.
13148 * obsd-nat.c (obsd_pid_to_str): Constify.
13149 * procfs.c (procfs_pid_to_str): Constify.
13150 * ravenscar-thread.c (ravenscar_extra_thread_info)
13151 (ravenscar_pid_to_str): Constify.
13152 * remote-sim.c (gdbsim_pid_to_str): Constify.
13153 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13154 Constify.
13155 * sol-thread.c (solaris_pid_to_str): Constify.
13156 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13157 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13158 * target.c (default_pid_to_str, target_pid_to_str)
13159 (normal_pid_to_str, default_pid_to_str): Constify.
13160 * target.h (target_ops::to_pid_to_str)
13161 (target_ops::to_extra_thread_info): Constify.
13162 (target_pid_to_str, normal_pid_to_str): Constify.
13163 * windows-nat.c (windows_pid_to_str): Constify.
13164 * gdbarch.sh (core_pid_to_str): Constify.
13165 * target-delegates.c: Regenerate.
13166 * gdbarch.h, gdbarch.c: Regenerate.
13167
13168 2017-04-05 Pedro Alves <palves@redhat.com>
13169
13170 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13171 the memory of the temporary warning_pre_print override.
13172 * utils.c (warning_pre_print): Constify.
13173 * utils.h (warning_pre_print): Constify.
13174
13175 2017-04-05 Pedro Alves <palves@redhat.com>
13176
13177 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13178 (shell_command): New function.
13179 (make_command): Use std::string.
13180 (init_cli_cmds): Register shell_command instead of shell_escape.
13181
13182 2017-04-05 Pedro Alves <palves@redhat.com>
13183
13184 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13185 * tracepoint.c (default_collect): Don't initialize.
13186
13187 2017-04-05 Pedro Alves <palves@redhat.com>
13188
13189 * macroexp.c (macro_buffer::shared): Now a bool.
13190 (init_buffer): Update.
13191 (init_shared_buffer): Constify 'addr' parameter.
13192 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13193 casts.
13194
13195 2017-04-05 Pedro Alves <palves@redhat.com>
13196
13197 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13198 * disasm.c (set_disassembler_options): Constify local.
13199 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13200
13201 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13202
13203 PR gdb/21352
13204 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13205 option.
13206
13207 2017-04-05 Yao Qi <yao.qi@linaro.org>
13208
13209 * frame.c (frame_unwind_register_unsigned): Call
13210 frame_unwind_register_value.
13211
13212 2017-04-05 Yao Qi <yao.qi@linaro.org>
13213
13214 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13215 Use gdb_test_multiple, and don't match anchor.
13216
13217 2017-04-05 Pedro Alves <palves@redhat.com>
13218
13219 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13220 (Write After Approval): Remove Simon Marchi.
13221
13222 2017-04-05 Pedro Alves <palves@redhat.com>
13223
13224 * common/gdb_optional.h (optional::optional): Make constexpr and
13225 initialize m_dummy.
13226
13227 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13228
13229 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13230 (amd64fbsd_jmp_buf_reg_offset): Remove.
13231 (amd64fbsd_supply_uthread): Remove function.
13232 (amd64fbsd_collect_uthread): Remove function.
13233 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13234 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13235 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13236 (fbsd-nat.c): Update comment.
13237 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13238 (i386fbsd_jmp_buf_reg_offset): Remove.
13239 (i386fbsd_supply_uthread): Remove function.
13240 (i386fbsd_collect_uthread): Remove function.
13241 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13242
13243 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13244
13245 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13246 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13247 * NEWS: Mention that support for FreeBSD/alpha was removed.
13248 * alpha-fbsd-tdep.c: Delete file.
13249 * config/alpha/fbsd.mh: Delete file.
13250 * configure.host: Delete alpha*-*-freebsd* and
13251 alpha*-*-kfreebsd*-gnu.
13252 * configure.tgt: Delete alpha*-*-freebsd* and
13253 alpha*-*-kfreebsd*-gnu.
13254
13255 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13256
13257 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13258 amd64bsd_store_inferior_registers): Use ptid from regcache.
13259
13260 2017-04-04 Pedro Alves <palves@redhat.com>
13261
13262 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13263 data fields, make them private and add "m_" prefixes.
13264 (lnp_state_machine::lnp_state_machine): New ctor.
13265 (record_line, check_line_address, handle_set_discriminator)
13266 (handle_set_address, handle_advance_pc, handle_special_opcode)
13267 (handle_advance_line, handle_set_file, handle_negate_stmt)
13268 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13269 (end_sequence, advance_line): New methods.
13270 (m_gdbarch, m_record_lines_p): New fields.
13271 (lnp_reader_state): Delete.
13272 (dwarf_record_line): Rename to ...
13273 (lnp_state_machine::record_line): ... adjust.
13274 (init_lnp_state_machine): Delete.
13275 (lnp_state_machine::lnp_state_machine): New.
13276 (check_line_address): Rename to ...
13277 (lnp_state_machine::check_line_address): This.
13278 (dwarf_decode_lines_1): Remove reference to "reader_state".
13279 Adjust lnp_state_machine having a non-default ctor. Use bool.
13280 State machine internal state manipulation moved to
13281 lnp_state_machine methods.
13282
13283 2017-04-04 Pedro Alves <palves@redhat.com>
13284
13285 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13286 unittests/offset-type-selftests.c.
13287 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13288 * common/offset-type.h: New file.
13289 * common/preprocessor.h: New file.
13290 * common/traits.h: New file.
13291 * common/valid-expr.h: New file.
13292 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13293 sect_offset and cu_offset strong typedefs throughout.
13294 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13295 typedefs throughout.
13296 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13297 sect_offset and cu_offset strong typedefs throughout.
13298 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13299 typedefs throughout.
13300 * gdbtypes.h: Include "common/offset-type.h".
13301 (cu_offset): Now an offset type (strong typedef) instead of a
13302 struct.
13303 (sect_offset): Likewise.
13304 (union call_site_parameter_u): Rename "param_offset" field to
13305 "param_cu_off".
13306 * unittests/offset-type-selftests.c: New file.
13307
13308 2017-04-04 Pedro Alves <palves@redhat.com>
13309
13310 * common/underlying.h: New file.
13311 * dwarf2read.c: Include "common/gdb_optional.h" and
13312 "common/underlying.h".
13313 (dir_index, file_name_index): New types.
13314 (file_entry): Use them.
13315 (file_entry::include): Use to_underlying.
13316 (line_header::add_file_name): Use dir_index.
13317 (read_formatted_entries): Use gdb::optional. Read form before
13318 writting to file_entry.
13319 (dwarf_decode_line_header): Use dir_index.
13320 (lnp_state_machine::current_file): Use to_underlying.
13321 (lnp_state_machine::file): Change type to file_name_index.
13322 (dwarf_record_line): Use to_underlying.
13323 (init_lnp_state_machine): Use file_name_index.
13324 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13325
13326 2017-04-04 Pedro Alves <palves@redhat.com>
13327
13328 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13329 operator bool, has_value and get methods.
13330
13331 2017-04-04 Pedro Alves <palves@redhat.com>
13332
13333 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13334 fields.
13335 (line_header): Initialize all data fields. Change type of
13336 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13337 Change type of include_dirs to std::vector<const char *>. Remove
13338 num_include_dirs, include_dirs_size. Change type of file_names to
13339 std::vector<file_entry>. Remove num_file_names, file_names_size.
13340 (line_header::line_header): New.
13341 (line_header::add_include_dir, line_header::add_file_name): New
13342 methods.
13343 (line_header::include_dir_at): Remove NULL check.
13344 (line_header::file_name_at): Add const overload.
13345 (line_header_up): New unique_ptr typedef.
13346 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13347 std::vector. Remove free_line_header call.
13348 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13349 free_line_header call.
13350 (free_cu_line_header): Delete.
13351 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13352 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13353 Adjust to use std::vector.
13354 (free_line_header): Delete.
13355 (free_line_header_voidp): Use delete.
13356 (add_include_dir): Replace with ...
13357 (line_header::add_include_dir): ... this method. Use std::vector.
13358 (add_file_name): Replace with ...
13359 (line_header::add_file_name): ... this method. Use std::vector.
13360 (add_include_dir_stub): Delete.
13361 (read_formatted_entries): Remove memset.
13362 (dwarf_decode_line_header): Return a line_header_up instead of a
13363 raw pointer. Remove cleanup handling. Pass lambdas to
13364 read_formatted_entries. Adjust to use line_header methods.
13365 (dwarf_decode_lines_1): Adjust to use line_header methods.
13366 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13367 use std::vector.
13368
13369 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13370
13371 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13372 instead of struct ptid.
13373
13374 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13375
13376 * frame.c (get_frame_register_bytes): Unwind using value.
13377 (put_frame_register_bytes): Likewise.
13378
13379 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13380
13381 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13382 aggregate-like.
13383
13384 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13385
13386 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13387
13388 2017-03-29 Yao Qi <yao.qi@linaro.org>
13389
13390 * gdbthread.h (struct thread_info): Declare constructor and
13391 destructor. Add some in-class member initializers.
13392 * thread.c (free_thread): Remove.
13393 (init_thread_list): Call delete instead of free_thread.
13394 (new_thread): Call thread_info constructor.
13395 (thread_info::thread_info): New function.
13396 (thread_info::~thread_info): New function.
13397 (delete_thread_1): Call delete instead of free_thread.
13398 (make_cleanup_restore_current_thread): Move tp and frame to
13399 inner block.
13400
13401 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13402
13403 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13404 (arc_skip_prologue): Likewise.
13405 (arc_make_frame_cache): Likewise.
13406 (arc_pv_get_operand): New function.
13407 (arc_is_in_prologue): Likewise.
13408 (arc_analyze_prologue): Likewise.
13409 (arc_print_frame_cache): Likewise.
13410 (MAX_PROLOGUE_LENGTH): New constant.
13411
13412 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13413
13414 * configure.tgt: Add arc-insn.o.
13415 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13416 (dump_arc_instruction_command): New function.
13417 (arc_fprintf_disasm): Likewise.
13418 (arc_disassemble_info): Likewise.
13419 (arc_insn_get_operand_value): Likewise.
13420 (arc_insn_get_operand_value_signed): Likewise.
13421 (arc_insn_get_memory_base_reg): Likewise.
13422 (arc_insn_get_memory_offset): Likewise.
13423 (arc_insn_get_branch_target): Likewise.
13424 (arc_insn_dump): Likewise.
13425 (arc_insn_get_linear_next_pc): Likewise.
13426 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13427 (arc_disassemble_info): Likewise.
13428 (arc_insn_get_branch_target): Likewise.
13429 (arc_insn_get_linear_next_pc): Likewise.
13430 * NEWS: Mention new "maint print arc arc-instruction".
13431
13432 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13433
13434 * arc-tdep (maintenance_print_arc_list): New variable.
13435 (maintenance_print_arc_command): New function.
13436
13437 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13438
13439 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13440 Add "limm" and "reserved".
13441 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13442 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13443 * arc-tdep.h (arc_regnum): Likewise.
13444
13445 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13446
13447 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13448 for THREADPTR register.
13449 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13450 register.
13451 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13452 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13453 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13454
13455 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13456
13457 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13458 registers above gdbarch_num_regs (gdbarch) as privileged in
13459 call0 ABI.
13460
13461 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13462
13463 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13464 for a single specified register or for all registers in
13465 a0_base..a0_base + C0_NREGS range.
13466 (supply_gregset_reg): Call regcache_raw_supply for a single
13467 specified register or for all registers in a0_base..a0_base +
13468 C0_NREGS range.
13469
13470 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13471
13472 * arch/xtensa.h (C0_NREGS): Add definition.
13473 * xtensa-tdep.c (C0_NREGS): Remove definition.
13474
13475 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13476
13477 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13478 Drop xtensa_default_isa initialization.
13479 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13480
13481 2017-03-27 Pedro Alves <palves@redhat.com>
13482
13483 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13484 (file_entry::include_dir): New method.
13485 (line_header::include_dir_at, line_header::file_name_at): New
13486 methods.
13487 (setup_type_unit_groups, setup_type_unit_groups)
13488 (psymtab_include_file_name): Simplify using the new methods.
13489 (lnp_state_machine) <the_line_header>: New field.
13490 <file>: Add comment.
13491 (lnp_state_machine::current_file): New method.
13492 (dwarf_record_line): Simplify using the new methods.
13493 (init_lnp_state_machine): Initialize the "the_line_header" field.
13494 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13495 Simplify using the new methods.
13496
13497 2017-03-27 Pedro Alves <palves@redhat.com>
13498
13499 * cp-name-parser.y (make_empty): Delete.
13500 (demangler_special, nested_name, ptr_operator, array_indicator)
13501 (direct_declarator, declarator_1): Use fill_comp instead of
13502 make_empty.
13503
13504 2017-03-27 Pedro Alves <palves@redhat.com>
13505
13506 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13507 to ATTRIBUTE_PRINTF.
13508 * solib-target.c (library_list_start_list): Print "string" not
13509 "version".
13510 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13511 gdb_xml_error call.
13512
13513 2017-03-27 Pedro Alves <palves@redhat.com>
13514
13515 * dwarf2read.c (struct file_and_directory): New.
13516 (dwarf2_get_dwz_file): Adjust to use std::string.
13517 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13518 (find_file_and_directory): Adjust to return a file_and_directory
13519 object.
13520 (read_file_scope): Adjust to use file_and_directory. Remove
13521 make_cleanup/do_cleanups calls.
13522 (open_and_init_dwp_file): Adjust to use std::string. Remove
13523 make_cleanup/do_cleanups calls.
13524 * python/python.c (do_start_initialization): Adjust to ldirname
13525 returning a std::string.
13526 * utils.c (ldirname): Now returns a std::string.
13527 * utils.h (ldirname): Change return type to std::string.
13528 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13529 returning a std::string.
13530 * xml-tdesc.c (file_read_description_xml): Likewise.
13531
13532 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13533
13534 * regcache.c (regcache_debug_print_register): New function.
13535 * regcache.h (regcache_debug_print_register): New declaration.
13536 * target.c (debug_print_register): Remove.
13537 (target_fetch_registers): Call regcache_debug_print_register.
13538 (target_store_registers): Likewise.
13539
13540 2017-03-24 Pádraig Brady <pbrady@fb.com>
13541
13542 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13543 reference beyond the 'lh->include_dirs' array before accessing to
13544 it.
13545 (psymtab_include_file_name): Likewise.
13546 (dwarf_decode_lines_1): Likewise.
13547 (dwarf_decode_lines): Likewise.
13548 (file_file_name): Likewise.
13549
13550 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13551
13552 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13553 inferior_ptid.
13554 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13555 ps_lsetfpregs): Likewise.
13556 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13557 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13558 ps_lsetfpregs): Likewise.
13559 * target.c (target_fetch_registers, target_store_registers):
13560 Remove asserts.
13561
13562 2017-03-23 Alan Hayward <alan.hayward@arm.com>
13563
13564 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13565
13566 2017-03-23 Yao Qi <yao.qi@linaro.org>
13567
13568 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13569 (_initialize_aarch64_tdep): Register it.
13570 (aarch64_record_load_store): Handle PRFM instruction.
13571 (aarch64_process_record_test): New function.
13572
13573 2017-03-23 Yao Qi <yao.qi@linaro.org>
13574
13575 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13576 indentation.
13577
13578 2017-03-23 Yao Qi <yao.qi@linaro.org>
13579
13580 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13581
13582 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13583
13584 python/python.c (do_start_initialization): Fix memory leak.
13585
13586 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13587
13588 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13589 using get_ptrace_pid.
13590 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13591 inferior_ptid.
13592 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13593 inferior_ptid instead of pid.
13594
13595 2017-03-22 Yao Qi <yao.qi@linaro.org>
13596
13597 * aarch64-tdep.c: Wrap locally used classes in anonymous
13598 namespace.
13599 * arm-tdep.c: Likewise.
13600 * linespec.c: Likewise.
13601 * ui-out.c: Likewise.
13602
13603 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13604
13605 PR gdb/19637
13606 * python/lib/gdb/printer/bound_registers.py: Import sys.
13607
13608 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13609
13610 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13611 windows_thread_info parameter and use it instead of
13612 current_thread.
13613 (windows_fetch_inferior_registers): Don't set current_thread,
13614 pass the thread to do_windows_fetch_inferior_registers. Use
13615 ptid from regcache instead of inferior_ptid.
13616 (do_windows_store_inferior_registers): Add windows_thread_info
13617 parameter and use it instead of current_thread.
13618 (windows_store_inferior_registers): Don't set current_thread,
13619 pass the thread to do_windows_store_inferior_registers. Use
13620 ptid from regcache instead of inferior_ptid.
13621
13622 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13623
13624 * ser-mingw.c (ser_windows_raw): Remove reference to
13625 struct serial::current_timeout.
13626
13627 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13628
13629 PR tdep/20928
13630 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13631 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13632 (sparc64_fsr_type): Fix %fsr decoding.
13633
13634 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13635
13636 * python/py-record-btrace.c (btpy_insn_data): Change return type
13637 for Python 2.
13638
13639 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13640
13641 * spu-linux-nat.c (spu_fetch_inferior_registers,
13642 spu_store_inferior_registers): Use ptid from regcache, set and
13643 restore inferior_ptid.
13644 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13645 Likewise.
13646
13647 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13648
13649 * i386-linux-nat.c (fetch_register, store_register,
13650 i386_linux_fetch_inferior_registers,
13651 i386_linux_store_inferior_registers): Use ptid from regcache.
13652 * ia64-linux-nat.c (ia64_linux_fetch_register,
13653 ia64_linux_store_register): Likewise.
13654 * inf-ptrace.c (inf_ptrace_fetch_register,
13655 inf_ptrace_store_register): Likewise.
13656 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13657 m32r_linux_store_inferior_registers): Likewise.
13658 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13659 m68kbsd_store_inferior_registers): Likewise.
13660 * m68k-linux-nat.c (fetch_register, store_register,
13661 m68k_linux_fetch_inferior_registers,
13662 m68k_linux_store_inferior_registers): Likewise.
13663 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13664 m88kbsd_store_inferior_registers): Likewise.
13665 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13666 mips_fbsd_store_inferior_registers): Likewise.
13667 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13668 mips64_linux_regsets_store_registers): Likewise.
13669 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13670 mipsnbsd_store_inferior_registers): Likewise.
13671 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13672 mips64obsd_store_inferior_registers): Likewise.
13673 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13674 Likewise.
13675 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13676 ppcfbsd_store_inferior_registers): Likewise.
13677 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13678 ppc_linux_store_inferior_registers): Likewise.
13679 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13680 ppcnbsd_store_inferior_registers): Likewise.
13681 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13682 ppcobsd_store_registers): Likewise.
13683 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13684 Likewise.
13685 * ravenscar-thread.c (ravenscar_fetch_registers,
13686 ravenscar_store_registers, ravenscar_prepare_to_store):
13687 Likewise.
13688 * record-btrace.c (record_btrace_fetch_registers,
13689 record_btrace_store_registers, record_btrace_prepare_to_store):
13690 Likewise.
13691 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13692 Lookup inferior using ptid from regcache, instead of
13693 current_inferior.
13694 * remote.c (remote_fetch_registers, remote_store_registers): Use
13695 ptid from regcache.
13696 * rs6000-nat.c (fetch_register, store_register): Likewise.
13697 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13698 s390_linux_store_inferior_registers): Likewise.
13699 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13700 shnbsd_store_inferior_registers): Likewise.
13701 * sol-thread.c (sol_thread_fetch_registers,
13702 sol_thread_store_registers): Likewise.
13703 * sparc-nat.c (sparc_fetch_inferior_registers,
13704 sparc_store_inferior_registers): Likewise.
13705 * tilegx-linux-nat.c (fetch_inferior_registers,
13706 store_inferior_registers): Likewise.
13707 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13708 vaxbsd_store_inferior_registers): Likewise.
13709 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13710 store_xtregs): Likewise.
13711
13712 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13713
13714 PR gdb/14441
13715 * NEWS: Mention support for rvalue references in GDB and python.
13716 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13717 supports both lvalue and rvalue references.
13718
13719 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13720
13721 PR gdb/14441
13722 * gdbtypes.c (rank_one_type): Implement overloading
13723 resolution rules regarding rvalue references.
13724
13725 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13726
13727 PR gdb/14441
13728 * aarch64-tdep.c (aarch64_type_align)
13729 (aarch64_extract_return_value, aarch64_store_return_value): Change
13730 lvalue reference type checks to general reference type checks.
13731 * amd64-tdep.c (amd64_classify): Likewise.
13732 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13733 Likewise.
13734 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13735 (arm_store_return_value): Likewise.
13736 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13737 * c-typeprint.c (c_print_type): Likewise.
13738 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13739 (cplus_number_of_children, cplus_describe_child): Likewise.
13740 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13741 * completer.c (expression_completer): Likewise.
13742 * cp-support.c (make_symbol_overload_list_adl_namespace):
13743 Likewise.
13744 * darwin-nat-info.c (info_mach_region_command): Likewise.
13745 * dwarf2loc.c (entry_data_value_coerce_ref)
13746 (value_of_dwarf_reg_entry): Likewise.
13747 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13748 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13749 Likewise.
13750 * findvar.c (extract_typed_address, store_typed_address):
13751 Likewise.
13752 * gdbtypes.c (rank_one_type): Likewise.
13753 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13754 * infcall.c (value_arg_coerce): Likewise.
13755 * language.c (pointer_type): Likewise.
13756 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13757 Likewise.
13758 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13759 * mn10300-tdep.c (mn10300_type_align): Likewise.
13760 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13761 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13762 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13763 Likewise.
13764 * printcmd.c (print_formatted, x_command): Likewise.
13765 * python/py-type.c (typy_get_composite, typy_template_argument):
13766 Likewise.
13767 * python/py-value.c (valpy_referenced_value)
13768 (valpy_get_dynamic_type, value_has_field): Likewise.
13769 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13770 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13771 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13772 * spu-tdep.c (spu_scalar_value_p): Likewise.
13773 * symtab.c (lookup_symbol_aux): Likewise.
13774 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13775 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13776 Likewise.
13777 * valops.c (value_cast_pointers, value_cast)
13778 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13779 (value_struct_elt, value_struct_elt_bitpos)
13780 (value_find_oload_method_list, find_overload_match)
13781 (value_rtti_indirect_type): Likewise.
13782 * valprint.c (val_print_scalar_type_p, generic_val_print):
13783 Likewise.
13784 * value.c (value_actual_type, value_as_address, unpack_long)
13785 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13786 (coerce_ref): Likewise.
13787 * varobj.c (varobj_get_value_type): Likewise.
13788
13789 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13790
13791 PR gdb/14441
13792 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13793 table of constants.
13794 * python/lib/gdb/command/explore.py: Support exploring values
13795 of rvalue reference types.
13796 * python/lib/gdb/types.py: Implement get_basic_type() for
13797 rvalue reference types.
13798 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13799 constant.
13800 * python/py-value.c (valpy_getitem): Add an rvalue reference
13801 check.
13802 (valpy_reference_value): Add new parameter "refcode".
13803 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13804 New wrappers for valpy_reference_value().
13805 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13806 (gdbpy_invoke_xmethod): Likewise.
13807
13808 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13809
13810 PR gdb/14441
13811 * dwarf2read.c (process_die, read_type_die_1): Handle the
13812 DW_TAG_rvalue_reference_type DIE.
13813 (read_tag_reference_type): Add new parameter "refcode".
13814
13815 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13816
13817 PR gdb/14441
13818 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13819 (c_type_print_modifier, c_type_print_varspec_suffix)
13820 (c_type_print_base): Support printing rvalue reference types.
13821 * c-valprint.c (c_val_print, c_value_print): Support printing
13822 rvalue reference values.
13823
13824 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13825
13826 PR gdb/14441
13827 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13828 typename.
13829 * cp-support.c (replace_typedefs): Handle
13830 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13831 * python/py-type.c (typy_lookup_type): Likewise.
13832
13833 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13834
13835 PR gdb/14441
13836 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13837 * parse.c (insert_type): Change assert statement.
13838 (follow_types): Handle rvalue reference types.
13839 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13840 constant.
13841
13842 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13843
13844 PR gdb/14441
13845 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13846 value_ref() interface.
13847 * c-valprint.c (c_value_print): Likewise.
13848 * infcall.c (value_arg_coerce): Likewise.
13849 * python/py-value.c (valpy_reference_value): Likewise.
13850 * valops.c (value_cast, value_reinterpret_cast)
13851 (value_dynamic_cast, typecmp): Likewise.
13852 (value_ref): Parameterize by kind of return value reference type.
13853 * value.h (value_ref): Add new parameter "refcode".
13854
13855 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13856
13857 PR gdb/14441
13858 * dwarf2read.c (read_tag_reference_type): Use
13859 lookup_lvalue_reference_type() instead of lookup_reference_type().
13860 * eval.c (evaluate_subexp_standard): Likewise.
13861 * f-exp.y: Likewise.
13862 * gdbtypes.c (make_reference_type, lookup_reference_type):
13863 Generalize with rvalue reference types.
13864 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13865 convenience wrappers for lookup_reference_type().
13866 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13867 reference kind parameter.
13868 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13869 wrappers for lookup_reference_type().
13870 * guile/scm-type.c (gdbscm_type_reference): Use
13871 lookup_lvalue_reference_type() instead of lookup_reference_type().
13872 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13873 * parse.c (follow_types): Likewise.
13874 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13875 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13876 Likewise.
13877 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13878 (gdbpy_invoke_xmethod): Likewise.
13879 * stabsread.c: Provide extra argument to make_reference_type()
13880 call.
13881 * valops.c (value_ref, value_rtti_indirect_type): Use
13882 lookup_lvalue_reference_type() instead of lookup_reference_type().
13883
13884 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13885
13886 PR gdb/14441
13887 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13888 (TYPE_IS_REFERENCE): New macro.
13889 (struct type): Add rvalue_reference_type field.
13890 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13891
13892 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13893
13894 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13895 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13896 New function definition.
13897 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13898 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13899 New function declaration.
13900 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13901 * mi/mi-interp.h: New file.
13902 * solib.c (info_sharedlibrary_command): Replace for loop with
13903 ALL_SO_LIBS macro
13904 * solib.h (update_solib_list): New function declaration.
13905 (so_list_head): Move macro.
13906 * solist.h (ALL_SO_LIBS): New macro.
13907
13908 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13909
13910 * infcmd.c (post_create_inferior): Remove unused argument in
13911 call to solib_add.
13912 * remote.c (remote_start_remote): Likewise.
13913 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13914 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13915 (enable_break): Likewise.
13916 * solib.c (update_solib_list): Remove unused target argument
13917 and its documentation.
13918 (solib_add): Remove unused target argument. Remove unused
13919 argument in call to update_solib_list.
13920 (info_sharedlibrary_command): Remove unused argument in call
13921 to update_solib_list.
13922 (sharedlibrary_command): Remove unused argument in call to
13923 solib_add.
13924 (handle_solib_event): Likewise.
13925 (reload_shared_libraries): Likewise.
13926 * solib.h (solib_add): Remove unused target argument.
13927
13928 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13929
13930 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13931 (s390_displaced_step_fixup): Cover relative branches with the
13932 default fixup handling. This fixes lack of support for some
13933 relative branch instructions.
13934
13935 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13936
13937 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13938 ptid from regcache.
13939
13940 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13941
13942 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13943 i386_darwin_store_inferior_registers): Use ptid from regcache.
13944
13945 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13946
13947 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13948 i386bsd_store_inferior_registers): Use ptid from regcache.
13949
13950 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13951
13952 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13953 hppaobsd_store_registers): Use ptid from regcache.
13954
13955 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13956
13957 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13958 hppanbsd_store_registers): Use ptid from regcache.
13959
13960 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13961
13962 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13963 from regcache. Use get_ptrace_pid.
13964
13965 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13966
13967 * corelow.c (get_core_register_section): Use ptid from regcache,
13968 update doc.
13969
13970 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13971
13972 * bsd-uthread.c (bsd_uthread_fetch_registers,
13973 bsd_uthread_store_registers): Use ptid from regcache, set and
13974 restore inferior_ptid.
13975
13976 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13977
13978 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13979 fetch_fp_regs, store_register, store_regs, store_fp_register,
13980 store_fp_regs): Use ptid from regcache.
13981
13982 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13983
13984 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13985 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13986 store_vfp_regs): Use ptid from regcache.
13987
13988 2017-03-17 Pedro Alves <palves@redhat.com>
13989
13990 PR remote/21188
13991 * ser-base.c (ser_base_wait_for): Add comment.
13992 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13993 version.
13994 * ser-unix.c (hardwire_raw): Remove reference to
13995 scb->current_timeout.
13996 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13997 (hardwire_ops): Install ser_base_readchar instead of
13998 hardwire_readchar.
13999 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14000 Remove fields.
14001
14002 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14003
14004 PR gdb/19637
14005 * python/lib/gdb/printer/bound_registers.py: Add support for
14006 Python 3.
14007
14008 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14009
14010 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14011 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14012 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14013 byte_offset to subobj_byte_offset. Fix the handling of
14014 DWARF_VALUE_STACK on big-endian targets when coming via an
14015 implicit pointer.
14016 (dwarf2_evaluate_loc_desc): Adjust call to
14017 dwarf2_evaluate_loc_desc_full.
14018 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14019 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14020
14021 2017-03-16 Yao Qi <yao.qi@linaro.org>
14022
14023 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14024 and REVSH instructions.
14025
14026 2017-03-16 Yao Qi <yao.qi@linaro.org>
14027
14028 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14029 (arm_record_test): Declare.
14030 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14031 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14032 align with the manual.
14033 (thumb_record_misc): Adjust the code order to align with the
14034 manual.
14035 (thumb2_record_decode_insn_handler): Fix instruction matching.
14036 (instruction_reader_thumb): New class.
14037 (arm_record_test): New function.
14038
14039 2017-03-16 Yao Qi <yao.qi@linaro.org>
14040
14041 * arm-tdep.c (abstract_memory_reader): New class.
14042 (instruction_reader): New class.
14043 (extract_arm_insn): Add argument 'reader'. Callers updated.
14044 (decode_insn): Likewise.
14045
14046 2017-03-16 Doug Evans <dje@google.com>
14047
14048 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14049 member. Change type of TYPE member to SCM. All uses updated.
14050 (lsscm_make_lazy_string_smob): Add assert.
14051 (lsscm_make_lazy_string): Flag bad length values.
14052 (lsscm_elt_type): New function.
14053 (gdbscm_lazy_string_to_value): Rewrite to use
14054 lsscm_safe_lazy_string_to_value.
14055 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14056 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14057 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14058 in incoming type.
14059 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14060 * guile/scm-type.c (tyscm_scm_to_type): New function.
14061
14062 2017-03-15 Doug Evans <dje@google.com>
14063
14064 PR python/17728, python/18439, python/18779
14065 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14066 member. Change type of TYPE member to PyObject *. All uses updated.
14067 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14068 (gdbpy_create_lazy_string_object): Flag bad length values.
14069 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14070 Handle typedefs in incoming type.
14071 (stpy_lazy_string_elt_type): New function.
14072 (gdbpy_extract_lazy_string): Call it.
14073 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14074 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14075 typedefs in incoming type.
14076
14077 2017-03-16 Doug Evans <dje@google.com>
14078
14079 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14080 * guile/scm-type.c (tyscm_scm_to_type): New function.
14081
14082 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14083
14084 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14085 "ULONGEST" for "skip".
14086
14087 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14088
14089 PR gdb/21220
14090 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14091 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14092 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14093 over ptrace peek/poke until end of buffer or error.
14094
14095 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14096
14097 * parse.c (length_of_subexp): Make static.
14098 * parser-defs.h (length_of_subexp): Remove.
14099
14100 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14101
14102 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14103 as well.
14104
14105 2017-03-14 Pedro Alves <palves@redhat.com>
14106
14107 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14108 (main): Use std::unique_ptr. Remove calls to
14109 cp_demangled_name_parse_free.
14110
14111 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14112
14113 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14114 alphabsd_store_inferior_registers): Use regcache->ptid instead
14115 of inferior_ptid.
14116
14117 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14118
14119 * aix-thread.c (aix_thread_fetch_registers,
14120 aix_thread_store_registers): Use regcache->ptid instead of
14121 inferior_ptid.
14122
14123 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14124
14125 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14126 store_gregs_to_thread, fetch_fpregs_from_thread,
14127 store_fpregs_to_thread): Use regcache->ptid instead of
14128 inferior_ptid.
14129
14130 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14131
14132 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14133 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14134 instead of inferior_ptid.
14135
14136 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14137
14138 * target.c (target_fetch_registers, target_store_registers): Add
14139 assert.
14140
14141 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14142
14143 * regcache.h (regcache_get_ptid): New function.
14144 * regcache.c (regcache_get_ptid): New function.
14145
14146 2017-03-13 Mark Wielaard <mark@klomp.org>
14147
14148 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14149
14150 2017-03-10 Keith Seitz <keiths@redhat.com>
14151
14152 PR c++/8218
14153 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14154
14155 2017-03-08 Pedro Alves <palves@redhat.com>
14156
14157 PR gdb/18360
14158 * infrun.c (start_step_over, do_target_resume, resume)
14159 (restart_threads): Assert we're not resuming a thread that is
14160 meant to be stopped.
14161 (infrun_thread_stop_requested_callback): Delete.
14162 (infrun_thread_stop_requested): If the thread is internally
14163 stopped, queue a pending stop event and clear the thread's
14164 inline-frame state.
14165 (handle_stop_requested): New function.
14166 (handle_syscall_event, handle_inferior_event_1): Use
14167 handle_stop_requested.
14168 (handle_stop_requested): New function.
14169 (handle_signal_stop): Set the thread's stop_signal here instead of
14170 at caller.
14171 (finish_step_over): Clear step over info unconditionally.
14172 (handle_signal_stop): If the user had interrupted the event
14173 thread, consider the stop a random signal.
14174 (handle_signal_stop) <signal arrived while stepping over
14175 breakpoint>: Don't restart threads here.
14176 (stop_waiting): Don't clear step-over info here.
14177
14178 2017-03-08 Pedro Alves <palves@redhat.com>
14179
14180 PR 21206
14181 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14182 goes to argument 2, not 1.
14183
14184 2017-03-08 Pedro Alves <palves@redhat.com>
14185
14186 PR cli/21218
14187 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14188 display_gdb_prompt.
14189 (command_line_input): Add comment.
14190
14191 2017-03-08 Pedro Alves <palves@redhat.com>
14192
14193 PR tui/21216
14194 * tui/tui-file.c (tui_file::write): New.
14195 * tui/tui-file.h (tui_file): Override "write".
14196 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14197 factored out from ...
14198 (tui_puts): ... here.
14199 (tui_putc): Use them.
14200 (tui_write): New function.
14201 * tui/tui-io.h (tui_write): Declare.
14202
14203 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14204
14205 * Makefile.in (SFILES): Replace "environ.c" with
14206 "common/environ.c".
14207 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14208 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14209 to...
14210 * common/environ.c: ... here.
14211 * environ.h: Moved to...
14212 * common/environ.h: ... here.
14213
14214 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14215
14216 * gdbarch.sh (pstring_ptr): New static function.
14217 (gdbarch_disassembler_options): Use it.
14218 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14219 not valid_disassembler_option->name.
14220 * gdbarch.c: Regenerate.
14221
14222 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14223
14224 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14225
14226 2017-03-07 Pedro Alves <palves@redhat.com>
14227
14228 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14229
14230 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14231
14232 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14233 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14234 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14235 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14236
14237 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14238
14239 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14240
14241 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14242
14243 * remote.c (remote_add_target_side_commands): Use range-based
14244 for loop.
14245
14246 2017-03-03 Yao Qi <yao.qi@linaro.org>
14247
14248 PR gdb/21165
14249 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14250 value is lazy.
14251 * valprint.c (common_val_print): Likewise.
14252
14253 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14254
14255 * NEWS: Mention new set/show disassembler-options commands.
14256 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14257 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14258 (prospective_options): New static variable.
14259 (gdb_disassembler::gdb_disassembler): Initialize
14260 m_di.disassembler_options.
14261 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14262 (get_disassembler_options): New function.
14263 (set_disassembler_options): Likewise.
14264 (set_disassembler_options_sfunc): Likewise.
14265 (show_disassembler_options_sfunc): Likewise.
14266 (disassembler_options_completer): Likewise.
14267 (_initialize_disasm): Likewise.
14268 * disasm.h (get_disassembler_options): New prototype.
14269 (set_disassembler_options): Likewise.
14270 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14271 (gdbarch_verify_disassembler_options): Likewise.
14272 * gdbarch.c: Regenerate.
14273 * gdbarch.h: Likewise.
14274 * arm-tdep.c (num_disassembly_options): Delete.
14275 (set_disassembly_style): Likewise.
14276 (arm_disassembler_options): New static variable.
14277 (set_disassembly_style_sfunc): Convert short style name into long
14278 option name. Call set_disassembler_options.
14279 (show_disassembly_style_sfunc): New function.
14280 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14281 set_gdbarch_verify_disassembler_options.
14282 (_initialize_arm_tdep): Delete regnames variable and update callers.
14283 (arm_disassembler_options): Initialize.
14284 (disasm_options): New variable.
14285 (num_disassembly_options): Rename from this...
14286 (num_disassembly_styles): ...to this. Compute by scanning through
14287 disasm_options.
14288 (valid_disassembly_styles): Initialize using disasm_options.
14289 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14290 set_arm_regname_option.
14291 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14292 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14293 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14294 set_gdbarch_verify_disassembler_options.
14295 * s390-tdep.c (s390_disassembler_options): New static variable.
14296 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14297 set_gdbarch_verify_disassembler_options.
14298
14299 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14300
14301 * remote.c (remote_add_target_side_condition): Remove "struct"
14302 keyword from range-based for loop.
14303
14304 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14305
14306 * remote.c (remote_add_target_side_condition): Use range-based
14307 for loop. Update comment.
14308
14309 2017-02-27 Yao Qi <yao.qi@linaro.org>
14310
14311 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14312
14313 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14314
14315 * regcache.c (regcache_raw_update): New function.
14316 (regcache_raw_read): Move code to regcache_raw_update.
14317 * regcache.h (regcache_raw_update): New declaration.
14318 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14319
14320 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14321
14322 * dwarf2read.c (create_debug_type_hash_table): Initialize
14323 header.signature and header.type_offset_in_tu.
14324
14325 2017-02-24 Pedro Alves <palves@redhat.com>
14326
14327 * symtab.c (make_file_symbol_completion_list_1): Use
14328 add_symtab_completions.
14329
14330 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14331
14332 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14333
14334 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14335
14336 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14337 I386_MAX_REGISTER_SIZE.
14338 (i386_pseudo_register_write): Likewise.
14339 (i386_process_record): Likewise.
14340 * i387-tdep.c (i387_supply_xsave): Likewise.
14341 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14342 (store_register): Likewise.
14343
14344 2017-02-23 Pedro Alves <palves@redhat.com>
14345
14346 * ada-lang.c: Include "common/function-view.h".
14347 (ada_iterate_over_symbols): Adjust to use function_view as
14348 callback type.
14349 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14350 (ada_make_symbol_completion_list): Use a lambda.
14351 (ada_exc_search_name_matches): Delete.
14352 (name_matches_regex): New.
14353 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14354 * compile/compile-c-support.c: Include "common/function-view.h".
14355 (print_one_macro): Change prototype to accept a ui_file pointer.
14356 (write_macro_definitions): Use a lambda.
14357 * dwarf2read.c: Include "common/function-view.h".
14358 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14359 (dw2_expand_symtabs_matching): Adjust to use function_view as
14360 callback type.
14361 * language.h: Include "common/function-view.h".
14362 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14363 function_view as callback type.
14364 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14365 * linespec.c: Include "common/function-view.h".
14366 (collect_info::add_symbol): New method.
14367 (struct symbol_and_data_callback, iterate_inline_only, struct
14368 symbol_matcher_data, iterate_name_matcher): Delete.
14369 (iterate_over_all_matching_symtabs): Adjust to use function_view
14370 as callback type and lambdas.
14371 (iterate_over_file_blocks): Adjust to use function_view as
14372 callback type.
14373 (decode_compound_collector): Now a class with private fields.
14374 (decode_compound_collector::release_symbols): New method.
14375 (collect_one_symbol): Rename to...
14376 (decode_compound_collector::operator()): ... this and adjust.
14377 (lookup_prefix_sym): decode_compound_collector construction bits
14378 move to decode_compound_collector ctor. Pass the
14379 decode_compound_collector object directly as callback. Remove
14380 cleanups and use decode_compound_collector::release_symbols
14381 instead.
14382 (symtab_collector): Now a class with private fields.
14383 (symtab_collector::release_symtabs): New method.
14384 (add_symtabs_to_list): Rename to...
14385 (symtab_collector::operator()): ... this and adjust.
14386 (collect_symtabs_from_filename): symtab_collector construction
14387 bits move to symtab_collector ctor. Pass the symtab_collector
14388 object directly as callback. Remove cleanups and use
14389 symtab_collector::release_symtabs instead.
14390 (collect_symbols): Delete.
14391 (add_matching_symbols_to_info): Use lambdas.
14392 * macrocmd.c (print_macro_callback): Delete.
14393 (info_macro_command): Use a lambda.
14394 (info_macros_command): Pass print_macro_definition as callable
14395 directly.
14396 (print_one_macro): Remove 'ignore' parameter.
14397 (macro_list_command): Adjust.
14398 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14399 (macro_for_each_data::user_data): Delete field.
14400 (foreach_macro): Adjust to call the function_view.
14401 (macro_for_each): Adjust to use function_view as callback type.
14402 (foreach_macro_in_scope): Adjust to call the function_view.
14403 (macro_for_each_in_scope): Adjust to use function_view as callback
14404 type.
14405 * macrotab.h: Include "common/function-view.h".
14406 (macro_callback_fn): Declare a prototype instead of a pointer.
14407 Remove "user_data" parameter.
14408 (macro_for_each, macro_for_each_in_scope): Adjust to use
14409 function_view as callback type.
14410 * psymtab.c (partial_map_expand_apply)
14411 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14412 Adjust to use function_view as callback type and to return bool.
14413 (psym_expand_symtabs_matching): Adjust to use function_view as
14414 callback types.
14415 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14416 to use function_view as callback type and to return bool.
14417 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14418 callback types.
14419 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14420 as callback types.
14421 * symfile.h: Include "common/function-view.h".
14422 (expand_symtabs_file_matcher_ftype)
14423 (expand_symtabs_symbol_matcher_ftype)
14424 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14425 return bool.
14426 (quick_symbol_functions::map_symtabs_matching_filename)
14427 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14428 function_view as callback type and return bool.
14429 (expand_symtabs_matching): Adjust to use function_view as callback
14430 type.
14431 (maintenance_expand_name_matcher)
14432 (maintenance_expand_file_matcher): Delete.
14433 (maintenance_expand_symtabs): Use lambdas.
14434 * symtab.c (iterate_over_some_symtabs): Adjust to use
14435 function_view as callback types and return bool.
14436 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14437 of a cleanup.
14438 (lookup_symtab_callback): Delete.
14439 (lookup_symtab): Use a lambda.
14440 (iterate_over_symbols): Adjust to use function_view as callback
14441 type.
14442 (struct search_symbols_data, search_symbols_file_matches)
14443 (search_symbols_name_matches): Delete.
14444 (search_symbols): Use a pair of lambdas.
14445 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14446 (symtab_expansion_callback): Delete.
14447 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14448 * symtab.h: Include "common/function-view.h".
14449 (iterate_over_some_symtabs): Adjust to use function_view as
14450 callback type and return bool.
14451 (iterate_over_symtabs): Adjust to use function_view as callback
14452 type.
14453 (symbol_found_callback_ftype): Remove 'data' parameter and return
14454 bool.
14455 (iterate_over_symbols): Adjust to use function_view as callback
14456 type.
14457
14458 2017-02-23 Pedro Alves <palves@redhat.com>
14459
14460 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14461 (%.o) <unittests/%.c>: New pattern.
14462 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14463 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14464 * common/function-view.h: New file.
14465 * unittests/function-view-selftests.c: New file.
14466 * configure: Regenerate.
14467
14468 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14469
14470 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14471 inferior_ptid.
14472 * go32-nat.c (go32_thread_alive): Likewise.
14473
14474 2017-02-23 Yao Qi <yao.qi@linaro.org>
14475
14476 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14477 delete.
14478
14479 2017-02-23 Yao Qi <yao.qi@linaro.org>
14480
14481 * varobj.c (varobj_clear_saved_item): Use delete instead of
14482 xfree.
14483 (update_dynamic_varobj_children): Likewise.
14484
14485 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14486
14487 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14488
14489 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14490
14491 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14492 m_enum_value to 0 in default constructor.
14493
14494 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14495
14496 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14497 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14498 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14499 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14500 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14501 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14502 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14503 IS_STORE_CONDITIONAL_INSN.
14504
14505 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14506
14507 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14508
14509 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14510
14511 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14512
14513 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14514
14515 * dwarf2read.c (skip_one_die, read_attribute_value)
14516 (dwarf2_const_value_attr, dump_die_shallow)
14517 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14518 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14519
14520 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14521
14522 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14523 (dwarf_parse_macro_header): Accept DWARF version 5.
14524 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14525
14526 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14527
14528 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14529 DW_AT_GNU_*.
14530 * common/common-exceptions.h (enum errors): Likewise.
14531 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14532 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14533 (dwarf_expr_context::execute_stack_op): Likewise.
14534 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14535 Likewise.
14536 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14537 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14538 (show_entry_values_debug, call_site_to_target_addr)
14539 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14540 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14541 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14542 (value_of_dwarf_block_entry, indirect_pieced_value)
14543 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14544 (disassemble_dwarf_expression): Likewise.
14545 * dwarf2read.c (process_die, inherit_abstract_dies)
14546 (read_call_site_scope): Likewise.
14547 * gdbtypes.h (struct func_type, struct call_site_parameter)
14548 (struct call_site): Likewise.
14549 * stack.c (read_frame_arg): Likewise.
14550 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14551
14552 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14553
14554 * defs.h (read_unsigned_leb128): New declaration.
14555 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14556 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14557 (dwarf2_find_location_expression): Call also
14558 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14559 * dwarf2loc.h (dwarf2_version): New declaration.
14560 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14561 rnglists.
14562 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14563 .debug_rnglists.
14564 (struct dwop_section_names): Add loclists_dwo.
14565 (dwop_section_names): Add .debug_loclists.dwo.
14566 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14567 (struct dwarf2_per_cu_data): Add dwarf_version.
14568 (struct dwo_sections): Add loclists.
14569 (struct attr_abbrev): Add implicit_const.
14570 (read_indirect_line_string): New declaration.
14571 (read_unsigned_leb128): Delete declaration.
14572 (rcuh_kind): New definition.
14573 (read_and_check_comp_unit_head): Change parameter
14574 is_debug_types_section to section_kind.
14575 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14576 (read_comp_unit_head): Change parameter abfd to section, add parameter
14577 section_kind. Handle DWARF-5.
14578 (error_check_comp_unit_head): Accept also DWARF version 5.
14579 (read_and_check_comp_unit_head): Change parameter
14580 is_debug_types_section to section_kind.
14581 (read_and_check_type_unit_head): Delete function.
14582 (read_abbrev_offset): Handle DWARF-5.
14583 (create_debug_type_hash_table): Add parameter section_kind. Process
14584 only DW_UT_type. Use signature and type_offset_in_tu from struct
14585 comp_unit_head.
14586 (create_debug_types_hash_table): Update create_debug_type_hash_table
14587 caller.
14588 (create_all_type_units): Call create_debug_type_hash_table.
14589 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14590 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14591 caller.
14592 (skip_one_die): Handle DW_FORM_implicit_const.
14593 (dwarf2_rnglists_process): New function.
14594 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14595 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14596 (read_attribute_value): Handle DW_FORM_implicit_const,
14597 DW_FORM_line_strp.
14598 (read_attribute): Handle DW_FORM_implicit_const.
14599 (read_indirect_string_at_offset_from): New function from
14600 read_indirect_string_at_offset.
14601 (read_indirect_string_at_offset): Call
14602 read_indirect_string_at_offset_from.
14603 (read_indirect_line_string_at_offset): New function.
14604 (read_indirect_string): New function comment.
14605 (read_indirect_line_string): New function.
14606 (read_unsigned_leb128): Make it global.
14607 (dwarf2_string_attr): Handle DWARF-5.
14608 (add_include_dir_stub, read_formatted_entries): New functions.
14609 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14610 Handle DWARF-5.
14611 (per_cu_header_read_in): Update read_comp_unit_head caller.
14612 (dwarf2_version): New function.
14613 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14614 rnglists.
14615 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14616 fields.
14617
14618 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14619
14620 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14621
14622 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14623
14624 * dwarf2read.c (dwarf2_ranges_process): New function from
14625 dwarf2_ranges_read.
14626 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14627 dwarf2_ranges_process.
14628
14629 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14630
14631 * dwarf2read.c (create_debug_type_hash_table): New function from
14632 create_debug_types_hash_table.
14633 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14634 (create_all_type_units, open_and_init_dwo_file): Update
14635 create_debug_types_hash_table callers.
14636
14637 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14638
14639 PR gdb/16188
14640 * fork-child.c (trace_start_error): Fix thinko. va_end should
14641 refer to 'ap', not 'args'.
14642
14643 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14644 Pedro Alves <palves@redhat.com>
14645
14646 PR gdb/16188
14647 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14648 calls succeeded.
14649 * fork-child.c (trace_start_error): New function.
14650 (trace_start_error_with_name): Likewise.
14651 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14652 * inf-ptrace.c (inf_ptrace_me): Likewise.
14653 * inferior.h (trace_start_error): New prototype.
14654 (trace_start_error_with_name): Likewise.
14655
14656 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14657
14658 PR gdb/21164
14659 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14660 NULL before using it.
14661 * symmisc.c (maintenance_print_symbols): Likewise.
14662 (maintenance_print_msymbols): Likewise.
14663
14664 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14665
14666 * NEWS: Add record Python bindings entry.
14667
14668 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14669
14670 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14671 py-record-full.o.
14672 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14673 * python/py-record-btrace.c, python/py-record-btrace.h,
14674 python/py-record-full.c, python/py-record-full.h: New file.
14675 * python/py-record.c: Add include for py-record-btrace.h and
14676 py-record-full.h.
14677 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14678 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14679 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14680 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14681 New definition.
14682 (gdbpy_initialize_btrace): New export.
14683 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14684
14685 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14686
14687 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14688 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14689 * python/py-record.c: New file.
14690 * python/python-internal.h (gdbpy_start_recording,
14691 gdbpy_current_recording, gdpy_stop_recording,
14692 gdbpy_initialize_record): New export.
14693 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14694 (python_GdbMethods): Add gdbpy_start_recording,
14695 gdbpy_current_recording and gdbpy_stop_recording.
14696
14697 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14698
14699 * record-btrace.c (record_btrace_record_method): New function.
14700 (init_record_btrace_ops): Initialize to_record_method.
14701 * record-full.c (record_full_record_method): New function.
14702 (init_record_full_ops, init_record_full_core_ops): Add
14703 record_full_record_method.
14704 * record.h (enum record_method): New enum.
14705 * target-debug.h (target_debug_print_enum_record_method: New define.
14706 * target-delegates.c: Regenerate.
14707 * target.c (target_record_method): New function.
14708 * target.h: Include record.h.
14709 (struct target_ops) <to_record_method>: New field.
14710 (target_record_method): New export.
14711
14712 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14713
14714 * record.h (record_start, record_stop): New export.
14715 * record.c (record_start, record_stop): New function.
14716
14717 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14718
14719 * btrace.c (btrace_fetch): Copy function call segments pointer
14720 into a vector.
14721 (btrace_clear): Clear the vector.
14722 (btrace_find_insn_by_number): Use binary search to find the correct
14723 function call segment.
14724 * btrace.h (brace_fun_p): New typedef.
14725 (struct btrace_thread_info) <functions>: New field.
14726
14727 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14728
14729 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14730 * btrace.c (btrace_decode_error): ... here. New function.
14731 * btrace.h (btrace_decode_error): New export.
14732
14733 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14734
14735 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14736 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14737 btrace_find_insn_by_number): Remove special case for gaps.
14738 * btrace.h (btrace_insn_get_error): New export.
14739 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14740 * record-btrace.c (btrace_insn_history): Print number for gaps.
14741 (record_btrace_info, record_btrace_goto): Handle gaps.
14742
14743 2017-02-14 Tom Tromey <tom@tromey.com>
14744
14745 PR python/13598:
14746 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14747 event.
14748 * python/py-evts.c (gdbpy_initialize_py_events): Add
14749 before_prompt registry.
14750 * python/py-events.h (events_object) <before_prompt>: New field.
14751
14752 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14753
14754 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14755
14756 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14757
14758 * symfile (_initialize_symfile): Add usage text to the load command's
14759 help text.
14760
14761 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14762
14763 * utils.c (defaulted_query): Don't query on secondary UIs.
14764
14765 2017-02-10 Tom Tromey <tom@tromey.com>
14766
14767 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14768
14769 2017-02-10 Tom Tromey <tom@tromey.com>
14770
14771 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14772 "cleanup" local.
14773 * python/py-type.c (typy_legacy_template_argument): Remove
14774 unnecessary "cleanup" local.
14775
14776 2017-02-10 Tom Tromey <tom@tromey.com>
14777
14778 * python/python.c (do_start_initialization): New function, from
14779 _initialize_python.
14780 (_initialize_python): Call do_start_initialization.
14781 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14782 goto.
14783
14784 2017-02-10 Tom Tromey <tom@tromey.com>
14785
14786 * python/py-prettyprint.c (pretty_print_one_value): Use
14787 gdbpy_ref.
14788
14789 2017-02-10 Tom Tromey <tom@tromey.com>
14790
14791 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14792 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14793 gdbpy_ref.
14794 * python/py-type.c (field_new): Use gdbpy_ref.
14795 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14796 gdbpy_ref.
14797 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14798 (py_free_pspace): Likewise.
14799 (pspace_to_pspace_object): Likewise.
14800 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14801 (py_free_objfile): Likewise.
14802 (objfile_to_objfile_object): Likewise.
14803 * python/py-inferior.c (delete_thread_object): Use
14804 gdbpy_ref.
14805 (infpy_read_memory): Likewise.
14806 (py_free_inferior): Likewise.
14807 * python/py-evtregistry.c (create_eventregistry_object): Use
14808 gdbpy_ref.
14809 * python/py-event.c (create_event_object): Use gdbpy_ref.
14810
14811 2017-02-10 Tom Tromey <tom@tromey.com>
14812
14813 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14814 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14815 used.
14816 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14817 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14818 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14819 python/py-framefilter.c, python/py-function.c,
14820 python/py-inferior.c, python/py-infevents.c,
14821 python/py-linetable.c, python/py-newobjfileevent.c,
14822 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14823 python/py-signalevent.c, python/py-stopevent.c,
14824 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14825 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14826 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14827 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14828
14829 2017-02-10 Tom Tromey <tom@tromey.com>
14830
14831 * ui-out.h (ui_out_emit_type): New class.
14832 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14833 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14834 and ui_out_emit_tuple.
14835 (enumerate_locals): Likewise.
14836 (py_mi_print_variables, py_print_locals, py_print_args): Use
14837 ui_out_emit_list.
14838 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14839 ui_out_emit_list.
14840 * common/gdb_optional.h: New file.
14841
14842 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14843
14844 * MAINTAINERS (Write After Approval): Update my e-mail address.
14845
14846 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14847
14848 PR gdb/21122
14849 * breakpoint.c (_initialize_breakpoint): Update the help description
14850 of the 'commands' command to indicate that it takes a list argument.
14851
14852 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14853
14854 * interps.c (current_interp_set_logging): Remove "return".
14855
14856 2017-02-09 Gary Benson <gbenson@redhat.com>
14857
14858 * symtab.c (add_symtab_completions): Prevent NULL pointer
14859 dereference.
14860
14861 2017-02-08 Pedro Alves <palves@redhat.com>
14862
14863 * interps.c (interp::interp): Remove reference to quiet_p.
14864 (interp_set): Make static. Remove dead "Switching to" output
14865 code.
14866 (interp_quiet_p, interp_set_quiet): Delete.
14867 (interpreter_exec_cmd): Don't set the interpreter quiet.
14868 * interps.h (interp_quiet_p): Make static.
14869 (class interp) <quiet_p>: Remove field
14870
14871 2017-02-08 Jerome Guitton <guitton@adacore.com>
14872
14873 * cli/cli-decode.c (find_command_name_length): Make it extern.
14874 * cli/cli-decode.h (find_command_name_length): Declare.
14875 * cli/cli-script.c (command_name_equals, line_first_arg):
14876 New functions.
14877 (process_next_line): Use cli-decode to parse command names.
14878 (build_command_line): Make args a constant pointer.
14879
14880 2017-02-08 Jerome Guitton <guitton@adacore.com>
14881
14882 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14883 Remove case-insensitive search.
14884
14885 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14886
14887 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14888 at the end of the line. Avoids an ARI warning.
14889
14890 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14891
14892 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14893 rdseed instructions.
14894 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14895
14896 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14897
14898 PR tdep/20936
14899 Provide and use sparc32 and sparc64 target description XML files.
14900 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14901 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14902 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14903 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14904 * features/sparc/sparc32-solaris.xml: New file.
14905 * features/sparc/sparc64-solaris.xml: New file.
14906 * features/sparc/sparc32-solaris.c: Generated.
14907 * features/sparc/sparc64-solaris.c: Generated.
14908 * sparc-tdep.h: Account for differences in target descriptions.
14909 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14910 (sparc32_register_type): Use target provided registers.
14911 (validate_tdesc_registers): New function.
14912 (sparc32_gdbarch_init): Use tdesc_has_registers.
14913 Set pseudoregister functions.
14914 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14915 (sparc64_register_type): Use target provided registers.
14916 (sparc64_init_abi): Set pseudoregister functions.
14917
14918 2017-02-03 Tom Tromey <tom@tromey.com>
14919
14920 PR rust/21097:
14921 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14922 with a single member.
14923
14924 2017-02-03 Pedro Alves <palves@redhat.com>
14925
14926 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14927 (cli_interp_base::~cli_interp_base): New.
14928 (cli_interp): New struct.
14929 (as_cli_interp): Cast the interp itself to cli_interp.
14930 (cli_interpreter_pre_command_loop): Rename to ...
14931 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14932 parameter.
14933 (cli_interpreter_init): Rename to ...
14934 (cli_interp::init): ... this. Remove 'self' parameter. Use
14935 boolean. Make extern.
14936 (cli_interpreter_resume): Rename to ...
14937 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14938 extern.
14939 (cli_interpreter_suspend): Rename to ...
14940 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14941 extern.
14942 (cli_interpreter_exec): Rename to ...
14943 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14944 extern.
14945 (cli_interpreter_supports_command_editing): Rename to ...
14946 (cli_interp_base::supports_command_editing): ... this. Remove
14947 'interp' parameter. Make extern.
14948 (cli_ui_out): Rename to ...
14949 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14950 Make extern.
14951 (cli_set_logging): Rename to ...
14952 (cli_interp_base::set_logging): ... this. Remove 'interp'
14953 parameter. Make extern.
14954 (cli_interp_procs): Delete.
14955 (cli_interp_factory): Adjust to use "new".
14956 * cli/cli-interp.h: Include "interps.h".
14957 (struct cli_interp_base): New struct.
14958 * interps.c (struct interp): Delete. Fields moved to interps.h.
14959 (interp_new): Delete.
14960 (interp::interp, interp::~interp): New.
14961 (interp_set): Use bool, and return void. Assume the interpreter
14962 has suspend, init and resume methods, and that the all return
14963 void.
14964 (set_top_level_interpreter): interp_set returns void.
14965 (interp_ui_out): Adapt.
14966 (current_interp_set_logging): Adapt.
14967 (interp_data): Delete.
14968 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14969 (interp_exec): Adapt.
14970 (top_level_interpreter_data): Delete.
14971 * interps.h (interp_init_ftype, interp_resume_ftype)
14972 (interp_suspend_ftype, interp_exec_ftype)
14973 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14974 (class interp): New.
14975 (interp_new): Delete.
14976 (interp_set): Now returns void. Use bool.
14977 (interp_data, top_level_interpreter_data): Delete.
14978 * mi/mi-common.h: Include interps.h.
14979 (class mi_interp): Inherit from interp. Define a ctor. Declare
14980 init, resume, suspect, exec, interp_ui_out, set_logging and
14981 pre_command_loop methods.
14982 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14983 (mi_interpreter_init): Rename to ...
14984 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14985 bool, return void and make extern. Adjust.
14986 (mi_interpreter_resume): ... Rename to ...
14987 (mi_interp::resume): ... this. Remove the 'data' parameter,
14988 return void and make extern. Adjust.
14989 (mi_interpreter_suspend): ... Rename to ...
14990 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14991 return void and make extern. Adjust.
14992 (mi_interpreter_exec): ... Rename to ...
14993 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14994 extern. Adjust.
14995 (mi_interpreter_pre_command_loop): ... Rename to ...
14996 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14997 parameter and make extern.
14998 (mi_on_normal_stop_1): Adjust.
14999 (mi_ui_out): Rename to ...
15000 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15001 parameter and make extern. Adjust.
15002 (mi_set_logging): Rename to ...
15003 (mi_interp::set_logging): ... this. Remove the 'interp'
15004 parameter and make extern. Adjust.
15005 (mi_interp_procs): Delete.
15006 (mi_interp_factory): Adjust to use 'new'.
15007 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15008 (mi_print_exception, mi_execute_command, mi_load_progress):
15009 Adjust.
15010 * tui/tui-interp.c (tui_interp): New class.
15011 (as_tui_interp): Return a tui_interp pointer.
15012 (tui_on_normal_stop, tui_on_signal_received)
15013 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15014 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15015 to use interp::interp_ui_out.
15016 (tui_init): Rename to ...
15017 (tui_interp::init): ... this. Remove the 'self' parameter, use
15018 bool, return void and make extern. Adjust.
15019 (tui_resume): Rename to ...
15020 (tui_interp::resume): ... this. Remove the 'data' parameter,
15021 return void and make extern. Adjust.
15022 (tui_suspend): Rename to ...
15023 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15024 return void and make extern. Adjust.
15025 (tui_ui_out): Rename to ...
15026 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15027 parameter, and make extern. Adjust.
15028 (tui_exec): Rename to ...
15029 (tui_interp::exec): ... this. Remove the 'data' parameter and
15030 make extern.
15031 (tui_interp_procs): Delete.
15032 (tui_interp_factory): Use "new".
15033
15034 2017-02-02 Tom Tromey <tom@tromey.com>
15035
15036 * rust-exp.y (ends_raw_string, space_then_number)
15037 (rust_identifier_start_p): Return bool.
15038 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15039 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15040 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15041 (rust_chartype_p): Return bool.
15042 (val_print_struct, rust_print_struct_def, rust_print_type):
15043 Update.
15044 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15045 Return bool.
15046
15047 2017-02-02 Tom Tromey <tom@tromey.com>
15048
15049 * rust-lang.c: Reindent.
15050
15051 2017-02-02 Tom Tromey <tom@tromey.com>
15052
15053 * rust-lang.h (rust_crate_for_block): Update.
15054 * rust-lang.c (rust_crate_for_block): Return std::string.
15055 (rust_get_disr_info): Use std:;string, not
15056 gdb::unique_xmalloc_ptr.
15057 * rust-exp.y (crate_name): Update.
15058
15059 2017-02-02 Pedro Alves <palves@redhat.com>
15060
15061 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15062 field out of gdb_disassembler_test and make it static.
15063
15064 2017-02-02 Pedro Alves <palves@redhat.com>
15065
15066 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15067 mi1_interp and mi_interp fields.
15068
15069 2017-02-02 Pedro Alves <palves@redhat.com>
15070
15071 * cli/cli-interp.c (struct saved_output_files, saved_output):
15072 Moved from cli/cli-logging.c.
15073 (cli_set_logging): New function.
15074 (cli_interp_procs): Install cli_set_logging.
15075 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15076 Declare.
15077 * cli/cli-logging.c (struct saved_output_files, saved_output):
15078 Moved to cli/cli-interp.c.
15079 (pop_output_files): Don't save outputs here.
15080 (make_logging_output): New function.
15081 (handle_redirections): Don't build tee nor save previous outputs
15082 here.
15083 * interps.c (current_interp_set_logging): Change prototype.
15084 Assume there's always a set_logging_proc method installed.
15085 * interps.h (interp_set_logging_ftype): Change prototype.
15086 (current_interp_set_logging): Change prototype and adjust comment.
15087 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15088 use make_logging_output.
15089 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15090 2017-02-02 Pedro Alves <palves@redhat.com>
15091
15092 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15093 from ...
15094 (set_logging_overwrite): ... here.
15095 (logging_no_redirect_file): Delete.
15096 (set_logging_redirect): Don't handle redirection on the fly.
15097 Instead warn that "logging off" / "logging on" is necessary.
15098 (pop_output_files): Delete references to logging_no_redirect_file.
15099 (show_logging_command): Always speak in terms of what will happen
15100 once logging is reenabled.
15101
15102 2017-02-02 Pedro Alves <palves@redhat.com>
15103
15104 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15105
15106 2017-02-02 Pedro Alves <palves@redhat.com>
15107
15108 * disasm.c (gdb_pretty_print_insn): Rename to ...
15109 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15110 Remove gdbarch parameter. Adapt to clear the object's buffers
15111 instead of allocating new buffers, and to print using the object's
15112 gdb_disassembler instead of calling gdb_print_insn.
15113 (dump_insns): Use gdb_pretty_print_disassembler.
15114 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15115 (gdb_pretty_print_disassembler): New class.
15116 * record-btrace.c (btrace_insn_history): Use
15117 gdb_pretty_print_disassembler.
15118
15119 2017-02-02 Pedro Alves <palves@redhat.com>
15120
15121 * ada-lang.c (type_as_string): Use string_file.
15122 * ada-valprint.c (ada_print_floating): Use string_file.
15123 * ada-varobj.c (ada_varobj_scalar_image)
15124 (ada_varobj_get_value_image): Use string_file.
15125 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15126 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15127 * breakpoint.c (update_inserted_breakpoint_locations)
15128 (insert_breakpoint_locations, reattach_breakpoints)
15129 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15130 (print_it_watchpoint): Use string_file.
15131 (save_breakpoints): Use stdio_file.
15132 * c-exp.y (oper): Use string_file.
15133 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15134 tee_file.
15135 (pop_output_files): Use delete.
15136 (handle_redirections): Use stdio_file and tee_file.
15137 * cli/cli-setshow.c (do_show_command): Use string_file.
15138 * compile/compile-c-support.c (c_compute_program): Use
15139 string_file.
15140 * compile/compile-c-symbols.c (generate_vla_size): Take a
15141 'string_file &' instead of a 'ui_file *'.
15142 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15143 of a 'ui_file *'. Use string_file.
15144 (generate_c_for_variable_locations): Take a 'string_file &'
15145 instead of a 'ui_file *'.
15146 * compile/compile-internal.h (generate_c_for_for_one_variable):
15147 Take a 'string_file &' instead of a 'ui_file *'.
15148 * compile/compile-loc2c.c (push, pushf, unary, binary)
15149 (print_label, pushf_register_address, pushf_register)
15150 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15151 'ui_file *'. Adjust.
15152 * compile/compile.c (compile_to_object): Use string_file.
15153 * compile/compile.h (compile_dwarf_expr_to_c)
15154 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15155 'ui_file *'.
15156 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15157 (replace_typedefs_qualified_name): Use string_file and
15158 obstack_copy0.
15159 * disasm.c (gdb_pretty_print_insn): Use string_file.
15160 (gdb_disassembly): Adjust reference the null_stream global.
15161 (do_ui_file_delete): Delete.
15162 (gdb_insn_length): Use null_stream.
15163 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15164 * dwarf2loc.c (dwarf2_compile_property_to_c)
15165 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15166 'string_file &' instead of a 'ui_file *'.
15167 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15168 * dwarf2read.c (do_ui_file_peek_last): Delete.
15169 (dwarf2_compute_name): Use string_file.
15170 * event-top.c (gdb_setup_readline): Use stdio_file.
15171 * gdbarch.sh (verify_gdbarch): Use string_file.
15172 * gdbtypes.c (safe_parse_type): Use null_stream.
15173 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15174 string_file.
15175 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15176 'string_file *' instead of a 'ui_file *'.
15177 (gdbscm_arch_disassemble): Use string_file.
15178 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15179 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15180 inherits from ui_file.
15181 (ioscm_file_port_delete, ioscm_file_port_rewind)
15182 (ioscm_file_port_put): Delete.
15183 (ioscm_file_port_write): Rename to ...
15184 (ioscm_file_port::write): ... this. Remove file_port_magic
15185 checks.
15186 (ioscm_file_port_new): Delete.
15187 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15188 ui_file_up.
15189 * guile/scm-type.c (tyscm_type_name): Use string_file.
15190 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15191 Use string_file.
15192 * infcmd.c (print_return_value_1): Use string_file.
15193 * infrun.c (print_target_wait_results): Use string_file.
15194 * language.c (add_language): Use string_file.
15195 * location.c (explicit_to_string_internal): Use string_file.
15196 * main.c (captured_main_1): Use null_file.
15197 * maint.c (maintenance_print_architecture): Use stdio_file.
15198 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15199 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15200 event_channel>: Change type to mi_console_file pointer.
15201 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15202 (mi_console_file_delete): Delete.
15203 (struct mi_console_file): Delete.
15204 (mi_console_file_magic): Delete.
15205 (mi_console_file_new): Delete.
15206 (mi_console_file::mi_console_file): New.
15207 (mi_console_file_delete): Delete.
15208 (mi_console_file_fputs): Delete.
15209 (mi_console_file::write): New.
15210 (mi_console_raw_packet): Delete.
15211 (mi_console_file::flush): New.
15212 (mi_console_file_flush): Delete.
15213 (mi_console_set_raw): Rename to ...
15214 (mi_console_file::set_raw): ... this.
15215 * mi/mi-console.h (class mi_console_file): New class.
15216 (mi_console_file_new, mi_console_set_raw): Delete.
15217 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15218 (mi_set_logging): Use delete and tee_file. Adjust.
15219 * mi/mi-main.c (output_register): Use string_file.
15220 (mi_cmd_data_evaluate_expression): Use string_file.
15221 (mi_cmd_data_read_memory): Use string_file.
15222 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15223 * mi/mi-out.c (mi_ui_out::main_stream): New.
15224 (mi_ui_out::rewind): Use main_stream and
15225 string_file.
15226 (mi_ui_out::put): Use main_stream and string_file.
15227 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15228 Allocate a 'string_file' instead.
15229 (mi_out_new): Don't allocate a mem_fileopen stream here.
15230 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15231 (mi_ui_out::main_stream): Declare method.
15232 * printcmd.c (eval_command): Use string_file.
15233 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15234 * python/py-arch.c (archpy_disassemble): Use string_file.
15235 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15236 * python/py-frame.c (frapy_str): Use string_file.
15237 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15238 Use string_file.
15239 * python/py-type.c (typy_str): Use string_file.
15240 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15241 * python/py-value.c (valpy_str): Use string_file.
15242 * record-btrace.c (btrace_insn_history): Use string_file.
15243 * regcache.c (regcache_print): Use stdio_file.
15244 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15245 * remote.c (escape_buffer): Use string_file.
15246 * rust-lang.c (rust_get_disr_info): Use string_file.
15247 * serial.c (serial_open_ops_1): Use stdio_file.
15248 (do_serial_close): Use delete.
15249 * stack.c (print_frame_arg): Use string_file.
15250 (print_frame_args): Remove local mem_fileopen stream, not used.
15251 (print_frame): Use string_file.
15252 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15253 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15254 Take a 'string_file *' instead of a 'ui_file *'.
15255 * top.c (new_ui): Use stdio_file and stderr_file.
15256 (free_ui): Use delete.
15257 (execute_command_to_string): Use string_file.
15258 (quit_confirm): Use string_file.
15259 * tracepoint.c (collection_list::append_exp): Use string_file.
15260 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15261 * tui/tui-file.c: Don't include "ui-file.h".
15262 (enum streamtype, struct tui_stream): Delete.
15263 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15264 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15265 (tui_file::tui_file): New method.
15266 (tui_file_fputs): Delete.
15267 (tui_file_get_strbuf): Delete.
15268 (tui_file::puts): New method.
15269 (tui_file_adjust_strbuf): Delete.
15270 (tui_file_flush): Delete.
15271 (tui_file::flush): New method.
15272 * tui/tui-file.h: Tweak intro comment.
15273 Include ui-file.h.
15274 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15275 (tui_file_adjust_strbuf): Delete declarations.
15276 (class tui_file): New class.
15277 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15278 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15279 (tui_register_format): Use string_stream.
15280 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15281 (tui_get_function_from_frame): Use string_file.
15282 * typeprint.c (type_to_string): Use string_file.
15283 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15284 (null_stream): New global.
15285 (ui_file_delete): Delete.
15286 (ui_file::ui_file): New.
15287 (null_file_isatty): Delete.
15288 (ui_file::~ui_file): New.
15289 (null_file_rewind): Delete.
15290 (ui_file::printf): New.
15291 (null_file_put): Delete.
15292 (null_file_flush): Delete.
15293 (ui_file::putstr): New.
15294 (null_file_write): Delete.
15295 (ui_file::putstrn): New.
15296 (null_file_read): Delete.
15297 (ui_file::putc): New.
15298 (null_file_fputs): Delete.
15299 (null_file_write_async_safe): Delete.
15300 (ui_file::vprintf): New.
15301 (null_file_delete): Delete.
15302 (null_file::write): New.
15303 (null_file_fseek): Delete.
15304 (null_file::puts): New.
15305 (ui_file_data): Delete.
15306 (null_file::write_async_safe): New.
15307 (gdb_flush, ui_file_isatty): Adjust.
15308 (ui_file_put, ui_file_rewind): Delete.
15309 (ui_file_write): Adjust.
15310 (ui_file_write_for_put): Delete.
15311 (ui_file_write_async_safe, ui_file_read): Adjust.
15312 (ui_file_fseek): Delete.
15313 (fputs_unfiltered): Adjust.
15314 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15315 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15316 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15317 (set_ui_file_data): Delete.
15318 (string_file::~string_file, string_file::write)
15319 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15320 (do_ui_file_as_string, ui_file_as_string): Delete.
15321 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15322 (struct mem_file): Delete.
15323 (mem_file_new): Delete.
15324 (stdio_file::stdio_file): New.
15325 (mem_file_delete): Delete.
15326 (stdio_file::stdio_file): New.
15327 (mem_fileopen): Delete.
15328 (stdio_file::~stdio_file): New.
15329 (mem_file_rewind): Delete.
15330 (stdio_file::set_stream): New.
15331 (mem_file_put): Delete.
15332 (stdio_file::open): New.
15333 (mem_file_write): Delete.
15334 (stdio_file_magic, struct stdio_file): Delete.
15335 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15336 (stdio_file::flush): New.
15337 (stdio_file_read): Rename to ...
15338 (stdio_file::read): ... this. Adjust.
15339 (stdio_file_write): Rename to ...
15340 (stdio_file::write): ... this. Adjust.
15341 (stdio_file_write_async_safe): Rename to ...
15342 (stdio_file::write_async_safe) ... this. Adjust.
15343 (stdio_file_fputs): Rename to ...
15344 (stdio_file::puts) ... this. Adjust.
15345 (stdio_file_isatty): Delete.
15346 (stdio_file_fseek): Delete.
15347 (stdio_file::isatty): New.
15348 (stderr_file_write): Rename to ...
15349 (stderr_file::write) ... this. Adjust.
15350 (stderr_file_fputs): Rename to ...
15351 (stderr_file::puts) ... this. Adjust.
15352 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15353 (stderr_file::stderr_file): New.
15354 (tee_file_magic): Delete.
15355 (struct tee_file): Delete.
15356 (tee_file::tee_file): New.
15357 (tee_file_new): Delete.
15358 (tee_file::~tee_file): New.
15359 (tee_file_delete): Delete.
15360 (tee_file_flush): Rename to ...
15361 (tee_file::flush): ... this. Adjust.
15362 (tee_file_write): Rename to ...
15363 (tee_file::write): ... this. Adjust.
15364 (tee_file::write_async_safe): New.
15365 (tee_file_fputs): Rename to ...
15366 (tee_file::puts): ... this. Adjust.
15367 (tee_file_isatty): Rename to ...
15368 (tee_file::isatty): ... this. Adjust.
15369 * ui-file.h (struct obstack, struct ui_file): Don't
15370 forward-declare.
15371 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15372 (ui_file_write_ftype)
15373 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15374 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15375 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15376 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15377 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15378 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15379 (set_ui_file_fseek): Delete.
15380 (ui_file_data, ui_file_delete, ui_file_rewind)
15381 (struct ui_file): New.
15382 (ui_file_up): New.
15383 (class null_file): New.
15384 (null_stream): Declare.
15385 (ui_file_write_for_put, ui_file_put): Delete.
15386 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15387 Delete.
15388 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15389 (gdb_fopen, tee_file_new): Delete.
15390 (struct string_file): New.
15391 (struct stdio_file): New.
15392 (stdio_file_up): New.
15393 (struct stderr_file): New.
15394 (class tee_file): New.
15395 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15396 of a 'ui_file *'. Adjust.
15397 * ui-out.h (class ui_out) <field_stream>: Likewise.
15398 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15399 (null_stream): Delete.
15400 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15401 Adjust.
15402 * utils.h (struct ui_file): Delete forward declaration..
15403 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15404 (error_stream): Take a 'string_file &' instead of a
15405 'ui_file *'.
15406 * varobj.c (varobj_value_get_print_value): Use string_file.
15407 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15408 * gdbarch.c: Regenerate.
15409
15410 2017-02-02 Pedro Alves <palves@redhat.com>
15411
15412 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15413 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15414 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15415 Adjust to call gdb_print_insn instead of
15416 gdb_disassembler::print_insn.
15417 (dump_insns, do_mixed_source_and_assembly_deprecated)
15418 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15419 'gdbarch' parameter. Remove gdb_disassembler parameter.
15420 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15421 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15422 declaration.
15423 (gdb_pretty_print_insn): Re-add declaration.
15424 * record-btrace.c (btrace_insn_history): Don't allocate a
15425 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15426
15427 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15428
15429 * disasm.h (gdb_disassembly): Remove file_string parameter.
15430 * disasm.c (gdb_disassembly): Likewise.
15431 * cli/cli-cmds.c (print_disassembly): Adapt.
15432 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15433 * stack.c (do_gdb_disassembly): Likewise.
15434
15435 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15436
15437 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15438 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15439 targets. And if the implicit value is longer than needed, extract
15440 the first bytes instead of the "least significant" ones.
15441
15442 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15443
15444 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15445 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15446 (btrace_fetch): Assert can_access_registers_ptid.
15447 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15448 validate_registers_access.
15449
15450 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15451
15452 * gdbthread.h (can_access_registers_ptid): New.
15453 * thread.c (can_access_registers_ptid): New.
15454
15455 2017-02-01 Pedro Alves <palves@redhat.com>
15456
15457 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15458
15459 2017-01-31 Pedro Alves <palves@redhat.com>
15460
15461 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15462 Fix typos.
15463
15464 2017-01-31 Pedro Alves <palves@redhat.com>
15465
15466 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15467 not used.
15468
15469 2017-01-31 Pedro Alves <palves@redhat.com>
15470
15471 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15472
15473 2017-01-31 Pedro Alves <palves@redhat.com>
15474
15475 * common/scoped_restore.h
15476 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15477 change the value's parameter type to T2.
15478 (make_scoped_restore): Likewise.
15479
15480 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15481 Richard Henderson <rth@redhat.com>
15482
15483 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15484 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15485 GS_BASE for older kernels.
15486 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15487 GS_BASE for older kernels.
15488 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15489 and GS_BASE to the offset table.
15490 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15491 system register group.
15492 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15493 for older kernels.
15494 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15495 amd64 ABI.
15496 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15497 AMD64_GSBASE_REGNUM.
15498 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15499 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15500 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15501 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15502 i386/64bit-segments.xml in those rules.
15503 * features/i386/64bit-segments.xml: New file.
15504 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15505 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15506 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15507 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15508 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15509 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15510 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15511 * features/i386/amd64-avx-linux.c: Regenerated.
15512 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15513 * features/i386/amd64-avx-mpx.c: Regenerated.
15514 * features/i386/amd64-avx512-linux.c: Regenerated.
15515 * features/i386/amd64-linux.c: Regenerated.
15516 * features/i386/amd64-mpx-linux.c: Regenerated.
15517 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15518 * features/i386/i386-avx-mpx.c: Regenerated.
15519 * features/i386/x32-avx-linux.c: Regenerated.
15520 * features/i386/x32-avx512-linux.c: Regenerated.
15521 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15522 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15523 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15524 * regformats/i386/amd64-linux.dat: Regenerated.
15525 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15526 * regformats/i386/x32-avx-linux.dat: Regenerated.
15527 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15528 * regformats/i386/x32-linux.dat: Regenerated.
15529
15530 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15531
15532 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15533 Set to AMD64_NUM_REGS.
15534
15535 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15536
15537 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15538 that checks validity of a register number.
15539
15540 2017-01-27 Kees Cook <keescook@google.com>
15541
15542 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15543 fetch_fpregs if target has fpa registers.
15544 (arm_linux_store_inferior_registers): Call store_fpregs if target
15545 has fpa registers.
15546
15547 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15548
15549 * cris-tdep.c (cris_gdbarch_init): Remove check for
15550 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15551
15552 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15553
15554 * corelow.c (get_core_register_section): Check for regset
15555 existence before checking for REGSET_VARIABLE_SIZE.
15556
15557 2017-01-26 Yao Qi <yao.qi@linaro.org>
15558 Pedro Alves <palves@redhat.com>
15559
15560 PR gdb/20939
15561 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15562 call memory_error, save memaddr instead.
15563 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15564 negative, cal memory_error.
15565 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15566
15567 2017-01-26 Yao Qi <yao.qi@linaro.org>
15568
15569 * disasm-selftests.c (memory_error_test): New function.
15570 (_initialize_disasm_selftests): Register memory_error_test.
15571
15572 2017-01-26 Yao Qi <yao.qi@linaro.org>
15573
15574 * Makefile.in (SFILES): Add disasm-selftests.c and
15575 selftest-arch.c.
15576 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15577 * disasm-selftests.c: New file.
15578 * selftest-arch.c: New file.
15579 * selftest-arch.h: New file.
15580
15581 2017-01-26 Yao Qi <yao.qi@linaro.org>
15582
15583 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15584 to bfd_arch_mep. Don't return 0 if section is not
15585 found. Call print_insn_mep.
15586
15587 2017-01-26 Pedro Alves <palves@redhat.com>
15588 Yao Qi <yao.qi@linaro.org>
15589
15590 * arm-tdep.c: Include "disasm.h".
15591 (gdb_print_insn_arm): Update code to get gdbarch.
15592 * disasm.c (dis_asm_read_memory): Change it to
15593 gdb_disassembler::dis_asm_read_memory.
15594 (dis_asm_memory_error): Likewise.
15595 (dis_asm_print_address): Likewise.
15596 (gdb_pretty_print_insn): Change it to
15597 gdb_disassembler::pretty_print_insn.
15598 (dump_insns): Add one argument gdb_disassemlber. All
15599 callers updated.
15600 (do_mixed_source_and_assembly_deprecated): Likewise.
15601 (do_mixed_source_and_assembly): Likewise.
15602 (do_assembly_only): Likewise.
15603 (gdb_disassembler::gdb_disassembler): New.
15604 (gdb_disassembler::print_insn): New.
15605 * disasm.h (class gdb_disassembler): New.
15606 (gdb_pretty_print_insn): Remove declaration.
15607 (gdb_disassemble_info): Likewise.
15608 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15609 (gdbscm_disasm_read_memory_worker): Update.
15610 (gdbscm_disasm_read_memory): Update.
15611 (gdbscm_disasm_memory_error): Remove.
15612 (gdbscm_disasm_print_address): Remove.
15613 (gdbscm_disassembler::gdbscm_disassembler): New.
15614 (gdbscm_print_insn_from_port): Update.
15615 * mips-tdep.c: Include disasm.h.
15616 (gdb_print_insn_mips): Update code to get gdbarch.
15617 * record-btrace.c (btrace_insn_history): Update.
15618 * spu-tdep.c: Include disasm.h.
15619 (struct spu_dis_asm_data): Remove.
15620 (struct spu_dis_asm_info): New.
15621 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15622 SPU id.
15623 (gdb_print_insn_spu): Cast disassemble_info to
15624 spu_dis_asm_info.
15625
15626 2017-01-26 Yao Qi <yao.qi@linaro.org>
15627
15628 * disasm.c (do_ui_file_delete): Delete.
15629 (gdb_insn_length): Move code creating stream to ...
15630 * utils.c (null_stream): ... here. New function.
15631 * utils.h (null_stream): Declare.
15632
15633 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15634
15635 * python/py-inferior.c (find_thread_object): Return directly
15636 from the loop. Remove "found" variable.
15637
15638 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15639
15640 GDB 7.12.1 released.
15641
15642 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15643
15644 * python/py-function.c (fnpy_call): Reorder declarations to have
15645 the gdbpy_enter object declared first.
15646 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15647
15648 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15649
15650 PR python/21068
15651 * python/python-internal.h (PyMem_RawMalloc): Define for
15652 Python < 3.4.
15653 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15654 PyMem_RawMalloc instead of PyMem_Malloc.
15655
15656 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15657 Luis Machado <lgustavo@codesourcery.com>
15658
15659 * NEWS (New commands): Mention flash-erase.
15660 (New MI commands): Mention target-flash-erase.
15661 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15662 command.
15663 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15664 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15665 * target.c (flash_erase_command): New function.
15666 (initialize_targets): Add new flash-erase command.
15667 * target.h (flash_erase_command): New declaration.
15668
15669 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15670
15671 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15672 HAVE_SYS_PROCFS_H is defined.
15673
15674 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15675
15676 * remote.c (struct cached_reg): Change data into a pointer.
15677 * (stop_reply_dtr): Free data pointers before deleting vector.
15678 (process_stop_reply): Likewise.
15679 (remote_parse_stop_reply): Allocate space for data
15680
15681 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15682
15683 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15684 MAX_REGISTER_SIZE.
15685 (amd64_pseudo_register_read_value): Likewise.
15686 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15687 (store_register_using_P): Likewise.
15688 * regcache.c (regcache_xfer_part): Likewise.
15689
15690 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15691
15692 Split real and pseudo registers.
15693 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15694 (sparc32_pseudo_regnum): New enum.
15695 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15696 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15697 (SPARC32_CP0_REGISTERS): New macro.
15698 (sparc32_pseudo_register_name): New function.
15699 (sparc32_register_name): Use sparc32_pseudo_register_name.
15700 (sparc32_pseudo_register_type): New function.
15701 (sparc32_register_type): Use sparc32_pseudo_register_type.
15702 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15703 pseudo register numbers.
15704 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15705 (SPARC64_CP0_REGISTERS): New macro.
15706 (sparc64_pseudo_register_name): New function.
15707 (sparc64_register_name): Use sparc64_pseudo_register_name.
15708 (sparc64_pseudo_register_type): New function.
15709 (sparc64_register_type): Use sparc64_pseudo_register_type.
15710 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15711 pseudo register numbers.
15712 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15713 sparc64_store_arguments): Handle pseudo register numbers.
15714
15715 2017-01-13 Yao Qi <yao.qi@linaro.org>
15716
15717 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15718 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15719 output.
15720 (getpkt_or_notif_sane_1): Likewise.
15721
15722 2017-01-13 Yao Qi <yao.qi@linaro.org>
15723
15724 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15725 of CC. Pass "-x c++-header" instead of "-x c".
15726
15727 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15728
15729 * remote.c (remote_can_async_p): Update comment.
15730
15731 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15732
15733 * linux-nat.c (linux_nat_can_async_p): Update comment.
15734
15735 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15736
15737 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15738
15739 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15740
15741 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15742
15743 2017-01-10 Tom Tromey <tom@tromey.com>
15744
15745 * python/py-type.c (typy_legacy_template_argument): Update.
15746 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15747 ~demangle_parse_info): Declare new members.
15748 (cp_demangled_name_to_comp): Return unique_ptr.
15749 (cp_demangled_name_parse_free)
15750 (make_cleanup_cp_demangled_name_parse_free)
15751 (cp_new_demangle_parse_info): Remove.
15752 * cp-support.c (do_demangled_name_parse_free_cleanup)
15753 (make_cleanup_cp_demangled_name_parse_free): Remove.
15754 (inspect_type, cp_canonicalize_string_full)
15755 (cp_canonicalize_string): Update.
15756 (mangled_name_to_comp): Change return type.
15757 (cp_class_name_from_physname, method_name_from_physname)
15758 (cp_func_name, cp_remove_params): Update.
15759 * cp-name-parser.y (demangle_parse_info): New constructor, from
15760 cp_new_demangle_parse_info.
15761 (~demangle_parse_info): New destructor, from
15762 cp_demangled_name_parse_free.
15763 (cp_merge_demangle_parse_infos): Update.
15764 (cp_demangled_name_to_comp): Change return type.
15765
15766 2017-01-10 Tom Tromey <tom@tromey.com>
15767
15768 * top.c (prevent_dont_repeat): Change return type.
15769 * python/python.c (execute_gdb_command): Use std::string.
15770 Update.
15771 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15772 * command.h (prevent_dont_repeat): Change return type.
15773 * breakpoint.c (bpstat_do_actions_1): Update.
15774
15775 2017-01-10 Tom Tromey <tom@tromey.com>
15776
15777 * value.h (scoped_value_mark::~scoped_value_mark): Call
15778 free_to_mark.
15779 (scoped_value_mark::free_to_mark): New method.
15780 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15781 scoped_value_mark.
15782
15783 2017-01-10 Tom Tromey <tom@tromey.com>
15784
15785 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15786 (valpy_reference_value, valpy_const_value, valpy_get_address)
15787 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15788 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15789 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15790 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15791 scoped_value_mark.
15792 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15793 * value.h (scoped_value_mark): New class.
15794
15795 2017-01-10 Tom Tromey <tom@tromey.com>
15796
15797 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15798 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15799 * psymtab.c (discard_psymtabs_upto): Remove.
15800 (make_cleanup_discard_psymtabs): Remove.
15801 (struct psymtab_state): Remove.
15802
15803 2017-01-10 Tom Tromey <tom@tromey.com>
15804
15805 * record-full.c (record_full_save_cleanups): Remove.
15806 (record_full_save): Use gdb::unlinker.
15807 * gcore.c (do_bfd_delete_cleanup): Remove.
15808 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15809 cleanups.
15810 * dwarf2read.c (unlink_if_set): Remove.
15811 (write_psymtabs_to_index): Use gdb::unlinker.
15812 * common/gdb_unlinker.h: New file.
15813
15814 2017-01-10 Tom Tromey <tom@tromey.com>
15815
15816 * windows-tdep.c (windows_xfer_shared_library): Update.
15817 * windows-nat.c (windows_make_so): Update.
15818 * utils.h (make_cleanup_bfd_unref): Remove.
15819 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15820 * symfile.h (symfile_bfd_open)
15821 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15822 * symfile.c (read_symbols, symbol_file_add)
15823 (separate_debug_file_exists): Update.
15824 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15825 (generic_load, reread_symbols): Update.
15826 * symfile-mem.c (symbol_file_add_from_memory): Update.
15827 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15828 (spu_symbol_file_add_from_memory): Update.
15829 * solist.h (struct target_so_ops) <bfd_open>: Return
15830 gdb_bfd_ref_ptr.
15831 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15832 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15833 gdb_bfd_ref_ptr.
15834 (solib_map_sections, reload_shared_libraries_1): Update.
15835 * solib-svr4.c (enable_break): Update.
15836 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15837 * solib-frv.c (enable_break2): Update.
15838 * solib-dsbt.c (enable_break): Update.
15839 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15840 gdb_bfd_ref_ptr.
15841 (darwin_solib_get_all_image_info_addr_at_init): Update.
15842 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15843 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15844 * record-full.c (record_full_save): Update.
15845 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15846 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15847 * minidebug.c (find_separate_debug_file_in_section): Return
15848 gdb_bfd_ref_ptr.
15849 * machoread.c (macho_add_oso_symfile): Change abfd to
15850 gdb_bfd_ref_ptr.
15851 (macho_symfile_read_all_oso): Update.
15852 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15853 (macho_symfile_read): Update.
15854 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15855 (jit_bfd_try_read_symtab): Update.
15856 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15857 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15858 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15859 gdb_bfd_ref_ptr.
15860 (gdb_bfd_ref_policy): New struct.
15861 (gdb_bfd_ref_ptr): New typedef.
15862 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15863 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15864 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15865 gdb_bfd_ref_ptr.
15866 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15867 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15868 (gcore_command): Update.
15869 * exec.c (exec_file_attach): Update.
15870 * elfread.c (elf_symfile_read): Update.
15871 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15872 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15873 (open_and_init_dwo_file): Update.
15874 (open_dwp_file): Return gdb_bfd_ref_ptr.
15875 (open_and_init_dwp_file): Update.
15876 * corelow.c (core_open): Update.
15877 * compile/compile-object-load.c (compile_object_load): Update.
15878 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15879 * coffread.c (coff_symfile_read): Update.
15880 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15881 gdb_bfd_ref_ptr. Rename.
15882 (dump_bfd_file, restore_command): Update.
15883 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15884 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15885 (find_separate_debug_file_by_buildid): Update.
15886
15887 2017-01-10 Tom Tromey <tom@tromey.com>
15888
15889 * common/gdb_ref_ptr.h: New file.
15890 * python/py-ref.h (struct gdbpy_ref_policy): New.
15891 (gdbpy_ref): Now a typedef.
15892
15893 2017-01-10 Tom Tromey <tom@tromey.com>
15894
15895 * utils.h (make_cleanup_htab_delete): Don't declare.
15896 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15897 Remove.
15898 * linespec.c (decode_compound_collector): Add constructor,
15899 destructor.
15900 (lookup_prefix_sym): Remove cleanup.
15901 (symtab_collector): Add constructor, destructor.
15902 (collect_symtabs_from_filename): Remove cleanup.
15903 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15904 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15905 Use htab_up.
15906 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15907 * dwarf2read.c (dw2_expand_symtabs_matching)
15908 (dw2_map_symbol_filenames, dwarf_decode_macros)
15909 (write_psymtabs_to_index): Use htab_up.
15910 * dwarf2loc.c (func_verify_no_selftailcall)
15911 (call_site_find_chain_1, func_verify_no_selftailcall)
15912 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15913 std::vector, gdb::unique_xmalloc_ptr.
15914 (call_sitep): Remove typedef.
15915 (dwarf2_locexpr_baton_eval): Remove unused variable.
15916
15917 2017-01-10 Tom Tromey <tom@tromey.com>
15918
15919 * python/python-internal.h (make_cleanup_py_decref)
15920 (make_cleanup_py_xdecref): Don't declare.
15921 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15922 (py_xdecref, make_cleanup_py_xdecref): Remove.
15923
15924 2017-01-10 Tom Tromey <tom@tromey.com>
15925
15926 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15927 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15928
15929 2017-01-10 Tom Tromey <tom@tromey.com>
15930
15931 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15932
15933 2017-01-10 Tom Tromey <tom@tromey.com>
15934
15935 * python/py-utils.c (unicode_to_encoded_string)
15936 (python_string_to_target_string)
15937 (python_string_to_target_python_string)
15938 (python_string_to_host_string, gdbpy_obj_to_string)
15939 (get_addr_from_python): Use gdbpy_ref.
15940
15941 2017-01-10 Tom Tromey <tom@tromey.com>
15942
15943 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15944 gdbpy_ref.
15945
15946 2017-01-10 Tom Tromey <tom@tromey.com>
15947
15948 * python/python.c (eval_python_command, gdbpy_decode_line)
15949 (gdbpy_run_events, gdbpy_start_type_printers)
15950 (gdbpy_apply_type_printers): Use gdbpy_ref.
15951
15952 2017-01-10 Tom Tromey <tom@tromey.com>
15953
15954 * python/py-param.c (get_doc_string, compute_enum_values): Use
15955 gdbpy_ref.
15956
15957 2017-01-10 Tom Tromey <tom@tromey.com>
15958
15959 * python/py-inferior.c (find_thread_object, build_inferior_list):
15960 Use gdbpy_ref.
15961
15962 2017-01-10 Tom Tromey <tom@tromey.com>
15963
15964 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15965
15966 2017-01-10 Tom Tromey <tom@tromey.com>
15967
15968 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15969 gdbpy_ref.
15970
15971 2017-01-10 Tom Tromey <tom@tromey.com>
15972
15973 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15974 extra incref.
15975 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15976 Use gdbpy_ref.
15977
15978 2017-01-10 Tom Tromey <tom@tromey.com>
15979
15980 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15981 gdbpy_ref.
15982
15983 2017-01-10 Tom Tromey <tom@tromey.com>
15984
15985 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15986 decref results of PyArg_ParseTupleAndKeywords.
15987
15988 2017-01-10 Tom Tromey <tom@tromey.com>
15989
15990 * python/python.c (python_run_simple_file): Use
15991 unique_xmalloc_ptr, gdbpy_ref.
15992
15993 2017-01-10 Tom Tromey <tom@tromey.com>
15994
15995 * python/py-prettyprint.c (print_stack_unless_memory_error)
15996 (print_string_repr, print_children): Use gdbpy_ref.
15997 (dummy_python_frame): New class.
15998 (dummy_python_frame::dummy_python_frame): Rename from
15999 push_dummy_python_frame.
16000 (py_restore_tstate): Remove.
16001
16002 2017-01-10 Tom Tromey <tom@tromey.com>
16003
16004 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16005
16006 2017-01-10 Tom Tromey <tom@tromey.com>
16007
16008 * python/python.c (ensure_python_env, restore_python_env):
16009 Remove.
16010 * python/python-internal.h (ensure_python_env): Don't declare.
16011 * varobj.h (varobj_ensure_python_env): Don't declare.
16012 * varobj.c (varobj_ensure_python_env): Remove.
16013
16014 2017-01-10 Tom Tromey <tom@tromey.com>
16015
16016 * varobj.c (varobj_value_get_print_value): Use
16017 gdbpy_enter_varobj.
16018
16019 2017-01-10 Tom Tromey <tom@tromey.com>
16020
16021 * python/py-prettyprint.c (print_string_repr, print_children):
16022 Update.
16023 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16024 of "encoding".
16025 * varobj.c (varobj_value_get_print_value): Update.
16026 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16027
16028 2017-01-10 Tom Tromey <tom@tromey.com>
16029
16030 * varobj.c (varobj_get_display_hint)
16031 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16032 (varobj_set_visualizer, free_variable): Use
16033 gdbpy_enter_varobj.
16034
16035 2017-01-10 Tom Tromey <tom@tromey.com>
16036
16037 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16038 (do_finish_initialization): New function. Use gdbpy_ref.
16039 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16040 do_finish_initialization.
16041
16042 2017-01-10 Tom Tromey <tom@tromey.com>
16043
16044 * python/py-param.c (get_set_value, get_show_value): Use
16045 gdbpy_enter, gdbpy_ref.
16046
16047 2017-01-10 Tom Tromey <tom@tromey.com>
16048
16049 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16050
16051 2017-01-10 Tom Tromey <tom@tromey.com>
16052
16053 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16054
16055 2017-01-10 Tom Tromey <tom@tromey.com>
16056
16057 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16058 Use gdbpy_enter_varobj.
16059
16060 2017-01-10 Tom Tromey <tom@tromey.com>
16061
16062 * varobj.c (gdbpy_enter_varobj): New constructor.
16063 * python/python-internal.h (gdbpy_enter_varobj): New class.
16064 * python/py-varobj.c (py_varobj_get_iterator): Use
16065 gdbpy_enter_varobj.
16066
16067 2017-01-10 Tom Tromey <tom@tromey.com>
16068
16069 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16070 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16071 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16072 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16073 unique_xmalloc_ptr.
16074 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16075
16076 2017-01-10 Tom Tromey <tom@tromey.com>
16077
16078 * python/py-xmethods.c (invoke_match_method): Use
16079 gdbpy_ref.
16080
16081 2017-01-10 Tom Tromey <tom@tromey.com>
16082
16083 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16084 gdbpy_enter, gdbpy_ref.
16085
16086 2017-01-10 Tom Tromey <tom@tromey.com>
16087
16088 * python/python.c (python_interactive_command): Use gdbpy_enter.
16089
16090 2017-01-10 Tom Tromey <tom@tromey.com>
16091
16092 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16093 gdbpy_ref.
16094
16095 2017-01-10 Tom Tromey <tom@tromey.com>
16096
16097 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16098 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16099
16100 2017-01-10 Tom Tromey <tom@tromey.com>
16101
16102 * utils.h (htab_deleter): New struct.
16103 (htab_up): New typedef.
16104 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16105 gdbpy_enter, gdbpy_ref, htab_up.
16106
16107 2017-01-10 Tom Tromey <tom@tromey.com>
16108
16109 * python/py-unwind.c (pending_frame_invalidate): Remove.
16110 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16111
16112 2017-01-10 Tom Tromey <tom@tromey.com>
16113
16114 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16115 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16116
16117 2017-01-10 Tom Tromey <tom@tromey.com>
16118
16119 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16120
16121 2017-01-10 Tom Tromey <tom@tromey.com>
16122
16123 * python/python.c (gdbpy_eval_from_control_command)
16124 (gdbpy_source_script, gdbpy_run_events)
16125 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16126 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16127 gdbpy_enter.
16128
16129 2017-01-10 Tom Tromey <tom@tromey.com>
16130
16131 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16132
16133 2017-01-10 Tom Tromey <tom@tromey.com>
16134
16135 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16136
16137 2017-01-10 Tom Tromey <tom@tromey.com>
16138
16139 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16140 (python_on_inferior_call_pre, python_on_inferior_call_post)
16141 (python_on_memory_change, python_on_register_change)
16142 (python_inferior_exit, python_new_objfile, add_thread_object)
16143 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16144
16145 2017-01-10 Tom Tromey <tom@tromey.com>
16146
16147 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16148 (bpfinishpy_handle_exit): Use gdbpy_enter.
16149
16150 2017-01-10 Tom Tromey <tom@tromey.com>
16151
16152 * python/py-cmd.c (cmdpy_destroyer)
16153 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16154 gdbpy_enter.
16155
16156 2017-01-10 Tom Tromey <tom@tromey.com>
16157
16158 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16159 gdbpy_enter.
16160 (gdbpy_breakpoint_has_cond): Likewise.
16161
16162 2017-01-10 Tom Tromey <tom@tromey.com>
16163
16164 * python/python.c (gdbpy_enter): New constructor.
16165 (~gdbpy_enter): New destructor.
16166 (restore_python_env, ensure_python_env): Rewrite.
16167 * python/python-internal.h (gdbpy_enter): New class.
16168
16169 2017-01-10 Tom Tromey <tom@tromey.com>
16170
16171 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16172
16173 2017-01-10 Tom Tromey <tom@tromey.com>
16174
16175 * python/py-value.c (value_has_field, get_field_flag)
16176 (get_field_type, valpy_getitem, convert_value_from_python): Use
16177 gdbpy_ref.
16178
16179 2017-01-10 Tom Tromey <tom@tromey.com>
16180
16181 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16182 gdbpy_ref.
16183
16184 2017-01-10 Tom Tromey <tom@tromey.com>
16185
16186 * python/py-prettyprint.c (search_pp_list)
16187 (find_pretty_printer_from_objfiles)
16188 (find_pretty_printer_from_progspace)
16189 (find_pretty_printer_from_gdb, find_pretty_printer)
16190 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16191 gdbpy_ref.
16192
16193 2017-01-10 Tom Tromey <tom@tromey.com>
16194
16195 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16196
16197 2017-01-10 Tom Tromey <tom@tromey.com>
16198
16199 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16200 (ltpy_get_all_source_lines): Use gdbpy_ref.
16201
16202 2017-01-10 Tom Tromey <tom@tromey.com>
16203
16204 * python/py-framefilter.c (extract_sym, extract_value)
16205 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16206 gdbpy_ref.
16207
16208 2017-01-10 Tom Tromey <tom@tromey.com>
16209
16210 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16211
16212 2017-01-10 Tom Tromey <tom@tromey.com>
16213
16214 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16215
16216 2017-01-10 Tom Tromey <tom@tromey.com>
16217
16218 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16219 gdbpy_ref.
16220
16221 2017-01-10 Tom Tromey <tom@tromey.com>
16222
16223 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16224
16225 2017-01-10 Tom Tromey <tom@tromey.com>
16226
16227 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16228 (typy_range): Use gdbpy_ref.
16229
16230 2017-01-10 Tom Tromey <tom@tromey.com>
16231
16232 * python/py-threadevent.c (create_thread_event_object): Use
16233 gdbpy_ref.
16234 * python/py-stopevent.c (create_stop_event_object): Simplify.
16235 (emit_stop_event): Use gdbpy_ref.
16236 * python/py-signalevent.c (create_signal_event_object): Use
16237 gdbpy_ref.
16238 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16239 (emit_new_objfile_event, create_clear_objfiles_event_object)
16240 (emit_clear_objfiles_event): Use gdbpy_ref.
16241 * python/py-infevents.c (create_inferior_call_event_object)
16242 (create_register_changed_event_object)
16243 (create_memory_changed_event_object, emit_inferior_call_event)
16244 (emit_memory_changed_event, emit_register_changed_event): Use
16245 gdbpy_ref.
16246 * python/py-exitedevent.c (create_exited_event_object)
16247 (emit_exited_event): Use gdbpy_ref.
16248 * python/py-event.h (evpy_emit_event): Remove
16249 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16250 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16251 * python/py-continueevent.c (emit_continue_event): Use
16252 gdbpy_ref.
16253 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16254 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16255 gdbpy_ref.
16256 * python/py-bpevent.c (create_breakpoint_event_object): Use
16257 gdbpy_ref.
16258
16259 2017-01-10 Tom Tromey <tom@tromey.com>
16260
16261 * python/py-ref.h: New file.
16262
16263 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16264
16265 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16266 void.
16267 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16268 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16269 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16270 * ui-out.c (ui_out::redirect): Likewise.
16271 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16272 * cli/cli-logging.c (set_logging_redirect): Update call site of
16273 ui_out::redirect.
16274 (handle_redirections): Likewise.
16275 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16276 * top.c (execute_command_to_string): Likewise.
16277 * utils.c (do_ui_out_redirect_pop): Likewise.
16278
16279 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16280
16281 * stack.c (_initialize_stack): Update "frame" command help message.
16282
16283 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16284
16285 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16286
16287 2017-01-06 Yao Qi <yao.qi@linaro.org>
16288
16289 * x86-linux-nat.h: Include gdb_proc_service.h.
16290
16291 2017-01-06 Yao Qi <yao.qi@linaro.org>
16292
16293 * ser-base.h: Include serial.h.
16294
16295 2017-01-06 Yao Qi <yao.qi@linaro.org>
16296
16297 * ppc-linux-tdep.h: Include ppc-tdep.h.
16298
16299 2017-01-06 Yao Qi <yao.qi@linaro.org>
16300
16301 * nat/amd64-linux-siginfo.h: Include signal.h.
16302
16303 2017-01-06 Yao Qi <yao.qi@linaro.org>
16304
16305 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16306
16307 2017-01-06 Yao Qi <yao.qi@linaro.org>
16308
16309 * mi/mi-parse.h: Include mi-cmds.h.
16310
16311 2017-01-06 Yao Qi <yao.qi@linaro.org>
16312
16313 * inf-loop.c: Don't include "target.h".
16314 * inf-loop.h: Include it here.
16315
16316 2017-01-06 Yao Qi <yao.qi@linaro.org>
16317
16318 * dfp.h: Include "dboulest.h" and "expression.h".
16319
16320 2017-01-06 Yao Qi <yao.qi@linaro.org>
16321
16322 * ax-gdb.h: Include "ax.h".
16323
16324 2017-01-06 Yao Qi <yao.qi@linaro.org>
16325
16326 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16327 with nat/gdb_ptrace.h.
16328
16329 2017-01-05 Yao Qi <yao.qi@linaro.org>
16330
16331 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16332 new line.
16333 (mips64_fbsd_sigframe_init): Likewise.
16334
16335 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16336
16337 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16338 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16339
16340 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16341
16342 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16343 * NEWS: Mention new FreeBSD/mips native configuration.
16344 * config/mips/fbsd.mh: New file.
16345 * configure.host: Add mips*-*-freebsd*.
16346 * mips-fbsd-nat.c: New file.
16347
16348 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16349
16350 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16351 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16352 * NEWS: Mention new FreeBSD/mips target.
16353 * configure.tgt: Add mips*-*-freebsd*.
16354 * mips-fbsd-tdep.c: New file.
16355 * mips-fbsd-tdep.h: New file.
16356
16357 2017-01-04 Yao Qi <yao.qi@linaro.org>
16358
16359 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16360 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16361
16362 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16363
16364 Update copyright year range in all GDB files.
16365
16366 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16367
16368 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16369
16370 For older changes see ChangeLog-2016.
16371 \f
16372 Local Variables:
16373 mode: change-log
16374 left-margin: 8
16375 fill-column: 74
16376 version-control: never
16377 coding: utf-8
16378 End:
This page took 0.367393 seconds and 4 git commands to generate.