8f0432aed104db215a039d2aeb310b7ec87bda62
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * target-float.c (floatformat_to_host_double): New function.
4 (floatformat_from_host_double): Likewise.
5 (target_float_to_host_double): Likewise.
6 (target_float_from_host_double): Likewise.
7 * target-float.h (target_float_to_host_double): Add prototype.
8 (target_float_from_host_double): Likewise.
9
10 * guile/scm-value.c: Include "target-float.h".
11 (gdbscm_value_to_real): Use target_float_to_host_double.
12 Handle integer source values via value_as_long.
13 * guile/scm-math.c: Include "target-float.h". Do not include
14 "doublest.h", "dfp.h", and "expression.h".
15 (vlscm_convert_typed_number): Use target_float_from_host_double.
16 (vlscm_convert_number): Likewise.
17
18 * python/py-value.c (valpy_float): Use target_float_to_host_double.
19 (convert_value_from_python): Use target_float_from_host_double.
20
21 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
22
23 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
24 (cast_from_fixed): Likewise.
25 (ada_scaling_type): New function.
26 (ada_delta): Return value instead of DOUBLEST. Perform target
27 arithmetic instead of host arithmetic.
28 (scaling_factor): Rename to ...
29 (ada_scaling_factor) ... this. Make non-static. Return value instead
30 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
31 (ada_fixed_to_float): Remove.
32 (ada_float_to_fixed): Remove.
33 * ada-lang.h (ada_fixed_to_float): Remove.
34 (ada_float_to_fixed): Remove.
35 (ada_delta): Return value instead of DOUBLEST.
36 (ada_scaling_factor): Add prototype.
37
38 * ada-typeprint.c: Include "target-float.h".
39 (print_fixed_point_type): Perform target arithmetic instead of
40 host arithmetic.
41 * ada-valprint.c: Include "target-float.h".
42 (ada_val_print_num): Perform target arithmetic instead of
43 host arithmetic for fixed-point types.
44
45 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
46
47 * target-float.c: Include <math.h>.
48 (floatformat_binop): New function.
49 (floatformat_compare): Likewise.
50 (target_float_binop): Likewise.
51 (target_float_compare): Likewise.
52 * target-float.h: Include "expression.h".
53 (target_float_binop): Add prototype.
54 (target_float_compare): Likewise.
55
56 * valarith.c: Do not include "doublest.h" and "dfp.h".
57 Include "common/byte-vector.h".
58 (value_args_as_decimal): Remove, replace by ...
59 (value_args_as_target_float): ... this function. Handle both
60 binary and decimal target floating-point formats.
61 (scalar_binop): Handle both binary and decimal FP using
62 value_args_as_target_float and target_float_binop.
63 (value_equal): Handle both binary and decimal FP using
64 value_args_as_target_float and target_float_compare.
65 (value_less): Likewise.
66 (value_pos): Handle all scalar types as simple copy.
67 (value_neg): Handle all scalar types via BINOP_SUB from 0.
68 * dfp.c (decimal_binop): Throw error instead of internal_error
69 when called with an unsupported operation code.
70
71 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
72
73 * target-float.c (target_float_to_string): New function.
74 (target_float_from_string): New function.
75 * target-float.h (target_float_to_string): Add prototype.
76 (target_float_from_string): Add prototype.
77
78 * valprint.c: Include "target-float.h". Do not include
79 "doublest.h" and "dfp.h".
80 (print_floating): Use target_float_to_string.
81 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
82 (printf_floating): Use target_float_to_string.
83 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
84 (print_i387_value): Use target_float_to_string.
85 * mips-tdep.c: Include "target-float.h".
86 (mips_print_fp_register): Use target_float_to_string.
87 * sh64-tdep.c: Include "target-float.h".
88 (sh64_do_fp_register): Use target_float_to_string.
89
90 * parse.c: Include "target-float.h". Do not include
91 "doublest.h" and "dfp.h".
92 (parse_float): Use target_float_from_string.
93 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
94 (define_symbol): Use target_float_from_string.
95 * gdbarch-selftests.c: Include "target-float.h".
96 (register_to_value_test): Use target_float_from_string.
97
98 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
99
100 * Makefile.c (SFILES): Add target-float.c.
101 (HFILES_NO_SRCDIR): Add target-float.h.
102 (COMMON_OBS): Add target-float.o.
103 * target-float.h: New file.
104 * target-float.c: New file.
105
106 * doublest.c (floatformat_classify): Fix detection of float_zero.
107
108 * gdbtypes.c (is_floating_type): New function.
109 * gdbtypes.h (is_floating_type): Add prototype.
110
111 * value.c: Do not include "floatformat.h".
112 (unpack_double): Use target_float_is_valid.
113 (is_floating_value): New function.
114 * value.h (is_floating_value): Add prototype-
115
116 * valarith.c: Include "target-float.h".
117 (value_logical_not): Use target_float_is_zero.
118
119 * python/py-value.c: Include "target-float.h".
120 (valpy_nonzero): Use target_float_is_zero.
121
122 2017-11-04 Tom Tromey <tom@tromey.com>
123
124 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
125
126 2017-11-04 Tom Tromey <tom@tromey.com>
127
128 * breakpoint.c (set_momentary_breakpoint): Return
129 breakpoint_up.
130 (until_break_command): Update.
131 (new_until_break_fsm): Change argument types to
132 breakpoint_up.
133 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
134 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
135 Remove.
136 * infcmd.c (finish_forward): Update.
137 * breakpoint.h (set_momentary_breakpoint)
138 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
139 (make_cleanup_delete_breakpoint): Remove.
140 (struct breakpoint_deleter): New.
141 (breakpoint_up): New typedef.
142 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
143 (insert_exception_resume_breakpoint): Update.
144 (insert_exception_resume_from_probe): Update.
145 (insert_longjmp_resume_breakpoint): Update.
146 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
147 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
148 * infcall.c (call_function_by_hand_dummy): Update
149
150 2017-11-04 Tom Tromey <tom@tromey.com>
151
152 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
153
154 2017-11-04 Tom Tromey <tom@tromey.com>
155
156 * linux-tdep.c (linux_core_info_proc_mappings): Use
157 gdb::def_vector.
158 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
159 "size" argument.
160 (linux_corefile_thread): Update.
161 (linux_make_corefile_notes): Remove unused variable.
162
163 2017-11-04 Tom Tromey <tom@tromey.com>
164
165 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
166 gdb::byte_vector.
167
168 2017-11-04 Tom Tromey <tom@tromey.com>
169
170 * objfiles.c (do_free_objfile_cleanup): Remove.
171 * compile/compile-object-load.c (compile_object_load): Update.
172 * objfiles.h (make_cleanup_free_objfile): Remove.
173
174 2017-11-04 Tom Tromey <tom@tromey.com>
175
176 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
177 (adi_read_versions): Change "tags" to "gdb_byte *".
178 (adi_print_versions): Likewise.
179
180 2017-11-04 Tom Tromey <tom@tromey.com>
181
182 * breakpoint.c
183 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
184 from start_rbreak_breakpoints.
185 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
186 * breakpoint.h (class scoped_rbreak_breakpoints): New.
187 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
188 * symtab.c (do_end_rbreak_breakpoints): Remove.
189 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
190
191 2017-11-04 Tom Tromey <tom@tromey.com>
192
193 * cp-namespace.c (reset_directive_searched): Remove.
194 (cp_lookup_symbol_via_imports): Use scoped_restore.
195 * cp-support.c (reset_directive_searched): Remove.
196 (make_symbol_overload_list_using): Use scoped_restore.
197 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
198 (reset_directive_searched): Remove.
199
200 2017-11-04 Tom Tromey <tom@tromey.com>
201
202 * symfile.c (find_separate_debug_file_by_debuglink): Use
203 unique_xmalloc_ptr.
204
205 2017-11-04 Tom Tromey <tom@tromey.com>
206
207 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
208 type of "info".
209 (compute_stack_depth): Likewise.
210 (do_compile_dwarf_expr_to_c): Use std::vector.
211
212 2017-11-04 Tom Tromey <tom@tromey.com>
213
214 * compile/compile-object-load.c (link_callbacks_einfo): Use
215 std::string.
216
217 2017-11-04 Tom Tromey <tom@tromey.com>
218
219 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
220 Use scoped_free_pendings.
221 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
222 scoped_free_pendings.
223 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
224 (xcoff_initial_scan): Likewise.
225 * buildsym.c (reset_symtab_globals): Update comment.
226 (scoped_free_pendings): Rename from really_free_pendings.
227 (prepare_for_building): Update comment.
228 (buildsym_init): Likewise.
229 * buildsym.h (class scoped_free_pendings): New class.
230 (really_free_pendings): Don't declare.
231
232 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
233
234 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
235 output when converting a zero value to a special byteorder format.
236
237 2017-11-02 Yao Qi <yao.qi@linaro.org>
238
239 * frame.c (do_frame_register_read): Remove aspace.
240 * jit.c (jit_frame_sniffer): Likwise.
241 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
242 * regcache.c (regcache::regcache): Pass nullptr.
243 (regcache_print): Caller updated.
244 * regcache.h (regcache::regcache): Remove one constructor
245 parameter aspace.
246
247 2017-11-02 Yao Qi <yao.qi@linaro.org>
248
249 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
250
251 2017-11-02 Yao Qi <yao.qi@linaro.org>
252
253 * breakpoint.c (insert_single_step_breakpoints): Update.
254 * frame.c (struct frame_info) <aspace>: Add const.
255 (frame_save_as_regcache): Add const.
256 (get_frame_address_space): Return const address_space *.
257 * frame.h (get_frame_address_space): Update declaration.
258 * infrun.c (struct step_over_info) <aspace>: Add const.
259 (set_step_over_info): Make aspace const.
260 (displaced_step_prepare_throw): Change variable const.
261 (resume): Likewise.
262 (proceed): Likewise.
263 (adjust_pc_after_break): Likewise.
264 (save_waitstatus): Likewise.
265 (handle_signal_stop): Likewise.
266 (keep_going_pass_signal): Likewise.
267 * jit.c (jit_frame_sniffer): Add const.
268 * mips-tdep.c (mips_single_step_through_delay): Likewise.
269 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
270 * record-full.c (record_full_wait_1): Likewise.
271 * regcache.c (regcache::regcache): Change parameter to const.
272 * regcache.h (regcache::regcache): Likewise.
273 (regcache::aspace): Return const address_space *.
274 (regcache) <m_aspace>: Add const.
275
276 2017-11-02 Yao Qi <yao.qi@linaro.org>
277
278 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
279 * frame.c (create_sentinel_frame): Likewise.
280 * infrun.c (displaced_step_prepare_throw): Likewise.
281 (resume): Likewise.
282 (thread_still_needs_step_over_bp): Likewise.
283 (proceed): Likewise.
284 (do_target_wait): Likewise.
285 (adjust_pc_after_break): Likewise.
286 (handle_syscall_event): Likewise.
287 (save_waitstatus): Likewise.
288 (handle_inferior_event_1): Likewise.
289 (handle_signal_stop): Likewise.
290 (keep_going_pass_signal): Likewise.
291 * linux-nat.c (status_callback): Likewise.
292 (save_stop_reason): Likewise.
293 (resume_stopped_resumed_lwps): Likewise.
294 * record-full.c (record_full_exec_insn): Likewise.
295 (record_full_wait_1): Likewise.
296 * regcache.c (get_regcache_aspace): Remove.
297 * regcache.h (get_regcache_aspace): Remove.
298
299 2017-11-02 Yao Qi <yao.qi@linaro.org>
300
301 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
302 (init_regcache_descr): Use gdbarch_num_regs.
303 (regcache::regcache): Likewise.
304 (regcache::get_register_status): Likewise.
305 (regcache::assert_raw_regnum): Likewise.
306 (regcache::cooked_read): Likewise.
307 (regcache::cooked_read_value): Likewise.
308 (regcache::cooked_write): Likewise.
309 (regcache::dump): Likewise.
310 (regcache::num_raw_registers): New method.
311 * regcache.h (class regcache) <num_raw_registers>: New.
312
313 2017-11-02 Yao Qi <yao.qi@linaro.org>
314
315 * regcache.c (regcache::assert_regnum): New method.
316 (regcache::invalidate): Call assert_regnum.
317 (regcache::raw_update): Likewise.
318 (regcache::raw_write): Likewise.
319 (regcache::raw_read_part): Likewise.
320 (regcache::raw_write_part): Likewise.
321 (regcache::raw_supply): Likewise.
322 (regcache::raw_supply_integer): Likewise.
323 (regcache::raw_supply_zeroed): Likewise.
324 (regcache::raw_collect): Likewise.
325 (regcache::raw_collect_integer): Likewise.
326 * regcache.h (regcache::assert_regnum): Declare.
327
328 2017-11-02 Yao Qi <yao.qi@linaro.org>
329
330 * regcache.c (regcache::dump): Remove code.
331
332 2017-11-02 Yao Qi <yao.qi@linaro.org>
333
334 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
335 Remove.
336 <sizeof_cooked_register_status>: Remove.
337 (init_regcache_descr): Update.
338 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
339 (regcache::save): Likewise.
340 (regcache::dump): Likewise.
341
342 2017-11-01 James Bowman <james.bowman@ftdichip.com>
343
344 * ft32-tdep.c (ft32_fetch_instruction): New function.
345 (ft32_analyze_prologue): Use ft32_fetch_instruction().
346
347 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
348
349 * cli/cli-script.c (execute_control_command): Rename to ...
350 (execute_control_command_1): ... this.
351 (execute_control_command): New function.
352
353 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
354
355 * tracepoint.c (tfind_command): Remove const_cast.
356
357 2017-10-30 Mike Gulick <mgulick@mathworks.com>
358
359 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
360
361 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
362
363 * common/common-utils.h (in_inclusive_range): New function.
364 * arm-tdep.c (arm_record_extension_space): Use
365 in_inclusive_range.
366 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
367 * cris-tdep.c (cris_spec_reg_applicable): Use
368 in_inclusive_range.
369
370 2017-10-30 Pedro Alves <palves@redhat.com>
371 Simon Marchi <simon.marchi@ericsson.com>
372
373 * remote.c (remote_set_syscall_catchpoint): Build a std::string
374 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
375
376 2017-10-30 Pedro Alves <palves@redhat.com>
377
378 * common/common-utils.c (string_appendf, string_vappendf): New
379 functions.
380 * common/common-utils.h (string_appendf, string_vappendf): New
381 declarations.
382 * unittests/common-utils-selftests.c (string_appendf_func)
383 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
384 (string_vappendf_tests): New functions.
385 (_initialize_common_utils_selftests): Register "string_appendf" and
386 "string_vappendf tests".
387
388 2017-10-30 Pedro Alves <palves@redhat.com>
389
390 * unittests/common-utils-selftests.c (format_func): New typedef.
391 (string_printf_tests, string_vprintf_tests): Tests factored out
392 and merged to ...
393 (test_format_func): ... this new function.
394 (string_printf_tests, string_vprintf_tests): Reimplement on top of
395 test_format_func.
396
397 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
398
399 * darwin-nat.c: Remove include of gdb.h.
400
401 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
402
403 * xtensa-xtregs.c: Fix formatting issues.
404
405 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
406
407 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
408
409 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
410
411 PR python/21213
412 * python/py-infthread.c (thpy_get_inferior): Increment reference
413 of inferior before returning it.
414
415 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
416
417 * unittests/common-utils-selftests.c (format): Add
418 ATTRIBUTE_PRINTF.
419
420 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
421
422 * xml-syscall.c (struct syscall_desc): Add constructor.
423 <name>: Change type to std::string.
424 (syscall_desc_up): New typedef.
425 (syscall_desc_p): Remove typeder.
426 (DEF_VEC_P(syscall_desc_p)): Remove.
427 (struct syscall_group_desc): Add constructor.
428 <name>: Change type to std::string.
429 <syscalls>: Change type to std::vector.
430 (syscall_group_desc_up): New typedef.
431 (syscall_group_desc_p): Remove typedef.
432 (DEF_VEC_P(syscall_group_desc_p)): Remove.
433 (struct syscalls_info) <syscalls>: Change type to std::vector of
434 unique_ptr.
435 <groups>: Likewise.
436 <my_gdb_datadir>: Change type to std::string.
437 (syscalls_info_up): New typedef.
438 (allocate_syscalls_info): Remove.
439 (syscalls_info_free_syscalls_desc): Remove.
440 (syscalls_info_free_syscall_group_desc): Remove.
441 (free_syscalls_info): Remove.
442 (make_cleanup_free_syscalls_info): Remove.
443 (syscall_group_create_syscall_group_desc): Adjust.
444 (syscall_group_add_syscall): Adjust.
445 (syscall_create_syscall_desc): Adjust.
446 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
447 (init_syscalls_info): Adjust.
448 (syscall_group_get_group_by_name): Adjust.
449 (xml_get_syscall_number): Adjust.
450 (xml_get_syscall_name): Adjust.
451 (xml_list_of_syscalls): Adjust.
452 (xml_list_syscalls_by_group): Adjust.
453 (xml_list_of_groups): Adjust.
454
455 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
456
457 * probe.h: Don't include gdb_vecs.h.
458 (DEF_VEC_P (probe_p)): Remove.
459 (find_probes_in_objfile): Return an std::vector.
460 * probe.c (find_probes_in_objfile): Likewise.
461 * breakpoint.c (breakpoint_objfile_data)
462 <longjmp_probes>: Change type to std::vector.
463 <exception_probes>: Likewise.
464 (free_breakpoint_probes): Don't manually free vectors.
465 (create_longjmp_master_breakpoint): Adjust.
466 (create_exception_master_breakpoint): Adjust.
467 * solib-svr4.c (svr4_create_probe_breakpoints): Change
468 parameter type, adjust.
469 (svr4_create_solib_event_breakpoints): Adjust.
470
471 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
472
473 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
474 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
475 with new.
476 (free_breakpoint_probes): Rename to ...
477 (free_breakpoint_objfile_data): ... this, and call delete on
478 bp_objfile_data..
479
480 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
481
482 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
483 (loaded_script_ptr): Remove typedef.
484 (DEF_VEC_P (loaded_script_ptr)): Remove.
485 (struct collect_matching_scripts_data): Add constructor.
486 <scripts_p>: Change type to (pointer to) std::vector.
487 (collect_matching_scripts_data): Adjust.
488 (sort_scripts_by_name): Make suitable for std::sort.
489 (print_scripts): Don't sort vector, adjust to std::vector.
490 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
491
492 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
493
494 * symfile.c (filename_language): Make struct, not typedef. Add
495 constructor.
496 <ext>: Change type to std::string.
497 (DEF_VEC_O (filename_language)): Remove.
498 (filename_language_table): Change type to std::vector.
499 (add_filename_language): Adjust.
500 (set_ext_lang_command): Adjust.
501 (info_ext_lang_command): Adjust.
502 (deduce_language_from_filename): Adjust.
503 (class scoped_restore_filename_language_table): Remove.
504 (test_filename_language): Use scoped_restore.
505 (test_set_ext_lang_command): Use scoped_restore, adjust to
506 std::vector change.
507
508 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
509
510 * symfile.c: Include selftest.h.
511 (class scoped_restore_filename_language_table): New.
512 (test_filename_language): New test.
513 (test_set_ext_lang_command): New test.
514 (_initialize_symfile): Register tests.
515
516 2017-10-27 Keith Seitz <keiths@redhat.com>
517
518 * breakpoint.c (print_breakpoint_location): Use the symbol saved
519 in the bp_location, falling back to find_pc_sect_function when
520 needed.
521 (add_location_to_breakpoint): Save sal->symbol.
522 * breakpoint.h (struct bp_location) <symbol>: New field.
523 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
524 * symtab.h (struct symtab_and_line) <symbol>: New field.
525
526 2017-10-26 Patrick Frants <osscontribute@gmail.com>
527
528 PR gdb/13669
529 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
530 to rewind obstack.
531
532 2017-10-26 Pedro Alves <palves@redhat.com>
533
534 * remote.c (remote_async_terminal_ours_p): Delete.
535 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
536 Remove references to 'remote_async_terminal_ours_p'.
537
538 2017-10-26 Yao Qi <yao.qi@linaro.org>
539
540 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
541
542 2017-10-26 Yao Qi <yao.qi@linaro.org>
543
544 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
545 aspace const.
546 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
547 Likewise.
548 * breakpoint.c (bpstat_check_location): Remove cast.
549 (breakpoint_hit_catch_fork): Make aspce const.
550 (breakpoint_hit_catch_solib): Likewise.
551 (breakpoint_hit_catch_exec): Likewise.
552 (breakpoint_hit_ranged_breakpoint): Likewise.
553 (breakpoint_hit_watchpoint): Likewise.
554 (base_breakpoint_breakpoint_hit): Likewise.
555 (bkpt_breakpoint_hit): Likewise.
556 (dprintf_breakpoint_hit): Likewise.
557 (tracepoint_breakpoint_hit): Likewise.
558 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
559
560 2017-10-26 Yao Qi <yao.qi@linaro.org>
561
562 * breakpoint.c (breakpoint_location_address_match): Change
563 "struct address_space *" to "const address_space".
564 (breakpoint_location_address_range_overlap): Likewise.
565 (breakpoint_here_p): Likewise.
566 (breakpoint_in_range_p): Likewise.
567 (moribund_breakpoint_here_p): Likewise.
568 (bp_location_inserted_here_p): Likewise.
569 (software_breakpoint_inserted_here_p): Likewise.
570 (hardware_breakpoint_inserted_here_p): Likewise.
571 (hardware_watchpoint_inserted_in_range): Likewise.
572 (bpstat_check_location): Likewise.
573 (bpstat_stop_status): Likewise.
574 (breakpoint_address_match): Likewise.
575 (breakpoint_address_match_range): Likewise.
576 (breakpoint_location_address_match): Likewise.
577 (breakpoint_location_address_range_overlap): Likewise.
578 (insert_single_step_breakpoint): Likewise.
579 (breakpoint_has_location_inserted_here): Likewise.
580 (single_step_breakpoint_inserted_here_p): Likewise.
581 (pc_at_non_inline_function): Likewise.
582 * breakpoint.h (bpstat_stop_status): Update declaration.
583 (breakpoint_here_p): Likewise.
584 (breakpoint_in_range_p): Likewise.
585 (moribund_breakpoint_here_p): Likewise.
586 (breakpoint_inserted_here_p): Likewise.
587 (software_breakpoint_inserted_here_p): Likewise.
588 (hardware_breakpoint_inserted_here_p): Likewise.
589 (breakpoint_has_location_inserted_here): Likewise.
590 (single_step_breakpoint_inserted_here_p): Likewise.
591 (hardware_watchpoint_inserted_in_range): Likewise.
592 (breakpoint_address_match): Likewise.
593 (insert_single_step_breakpoint): Likewise.
594 (pc_at_non_inline_function): Likewise.
595 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
596 * record.c (record_check_stopped_by_breakpoint): Likewise.
597 * record.h (record_check_stopped_by_breakpoint): Likewise.
598 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
599
600 2017-10-25 Yao Qi <yao.qi@linaro.org>
601
602 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
603 regcache->arch () instead get_regcache_arch.
604 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
605 Likewise.
606 (aarch64_fbsd_store_inferior_registers): Likewise.
607 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
608 (store_gregs_to_thread): Likewise.
609 (fetch_fpregs_from_thread): Likewise.
610 (store_fpregs_to_thread): Likewise.
611 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
612 (aarch64_store_return_value): Likewise.
613 (aarch64_software_single_step): Likewise.
614 * aix-thread.c (aix_thread_wait): Likewise.
615 (supply_reg32): Likewise.
616 (supply_sprs64): Likewise.
617 (supply_sprs32): Likewise.
618 (fill_gprs64): Likewise.
619 (fill_gprs32): Likewise.
620 (fill_sprs64): Likewise.
621 (fill_sprs32): Likewise.
622 (store_regs_user_thread): Likewise.
623 (store_regs_kernel_thread): Likewise.
624 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
625 (alphabsd_store_inferior_registers): Likewise.
626 * alpha-tdep.c (alpha_extract_return_value): Likewise.
627 (alpha_store_return_value): Likewise.
628 (alpha_deal_with_atomic_sequence): Likewise.
629 (alpha_next_pc): Likewise.
630 (alpha_software_single_step): Likewise.
631 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
632 (amd64bsd_store_inferior_registers): Likewise.
633 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
634 Likewise.
635 (amd64_linux_store_inferior_registers): Likewise.
636 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
637 (amd64_collect_native_gregset): Likewise.
638 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
639 (amd64obsd_collect_uthread): Likewise.
640 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
641 (amd64_collect_fpregset): Likewise.
642 (amd64_supply_fxsave): Likewise.
643 (amd64_supply_xsave): Likewise.
644 (amd64_collect_fxsave): Likewise.
645 (amd64_collect_xsave): Likewise.
646 * arc-tdep.c (arc_write_pc): Likewise.
647 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
648 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
649 (arm_fbsd_store_inferior_registers): Likewise.
650 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
651 (store_vfp_regs): Likewise.
652 (arm_linux_fetch_inferior_registers): Likewise.
653 (arm_linux_store_inferior_registers): Likewise.
654 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
655 (arm_linux_sigreturn_next_pc): Likewise.
656 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
657 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
658 (fetch_register): Likewise.
659 (store_register): Likewise.
660 * arm-tdep.c (arm_is_thumb): Likewise.
661 (displaced_in_arm_mode): Likewise.
662 (bx_write_pc): Likewise.
663 (arm_get_next_pcs_addr_bits_remove): Likewise.
664 (arm_software_single_step): Likewise.
665 (arm_extract_return_value): Likewise.
666 (arm_store_return_value): Likewise.
667 (arm_write_pc): Likewise.
668 * bfin-tdep.c (bfin_extract_return_value): Likewise.
669 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
670 (bsd_uthread_store_registers): Likewise.
671 * core-regset.c (fetch_core_registers): Likewise.
672 * corelow.c (get_core_registers): Likewise.
673 * cris-tdep.c (cris_store_return_value): Likewise.
674 (cris_extract_return_value): Likewise.
675 (find_step_target): Likewise.
676 (find_step_target): Likewise.
677 (cris_software_single_step): Likewise.
678 * ctf.c (ctf_fetch_registers): Likewise.
679 * darwin-nat.c (cancel_breakpoint): Likewise.
680 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
681 * frv-tdep.c (frv_extract_return_value): Likewise.
682 * ft32-tdep.c (ft32_store_return_value): Likewise.
683 (ft32_extract_return_value): Likewise.
684 * go32-nat.c (fetch_register): Likewise.
685 (go32_fetch_registers): Likewise.
686 (go32_store_registers): Likewise.
687 (store_register): Likewise.
688 * h8300-tdep.c (h8300_extract_return_value): Likewise.
689 (h8300_store_return_value): Likewise.
690 * hppa-linux-nat.c (fetch_register): Likewise.
691 (store_register): Likewise.
692 (hppa_linux_fetch_inferior_registers): Likewise.
693 (hppa_linux_store_inferior_registers): Likewise.
694 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
695 (i386_darwin_store_inferior_registers): Likewise.
696 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
697 (gnu_store_registers): Likewise.
698 * i386-linux-nat.c (fetch_register): Likewise.
699 (store_register): Likewise.
700 (supply_gregset): Likewise.
701 (fill_gregset): Likewise.
702 (i386_linux_fetch_inferior_registers): Likewise.
703 (i386_linux_store_inferior_registers): Likewise.
704 (i386_linux_resume): Likewise.
705 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
706 Likewise.
707 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
708 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
709 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
710 (i386obsd_collect_uthread): Likewise.
711 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
712 (i386_supply_gregset): Likewise.
713 (i386_collect_gregset): Likewise.
714 (i386_supply_fpregset): Likewise.
715 (i386_collect_fpregset): Likewise.
716 (i386_mpx_bd_base): Likewise.
717 * i386-v4-nat.c (supply_fpregset): Likewise.
718 (fill_fpregset): Likewise.
719 * i387-tdep.c (i387_supply_fsave): Likewise.
720 (i387_collect_fsave): Likewise.
721 (i387_supply_fxsave): Likewise.
722 (i387_collect_fxsave): Likewise.
723 (i387_supply_xsave): Likewise.
724 (i387_collect_xsave): Likewise.
725 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
726 (ia64_linux_store_registers): Likewise.
727 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
728 (ia64_extract_return_value): Likewise.
729 (ia64_store_return_value): Likewise.
730 (find_func_descr): Likewise.
731 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
732 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
733 (inf_ptrace_store_registers): Likewise.
734 * infrun.c (use_displaced_stepping): Likewise.
735 (displaced_step_prepare_throw): Likewise.
736 (resume): Likewise.
737 (proceed): Likewise.
738 (do_target_wait): Likewise.
739 (adjust_pc_after_break): Likewise.
740 (handle_inferior_event_1): Likewise.
741 (handle_signal_stop): Likewise.
742 (save_infcall_suspend_state): Likewise.
743 (restore_infcall_suspend_state): Likewise.
744 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
745 * jit.c (jit_frame_prev_register): Likewise.
746 * linux-nat.c (save_stop_reason): Likewise.
747 (linux_nat_wait_1): Likewise.
748 (resume_stopped_resumed_lwps): Likewise.
749 * linux-record.c (record_linux_sockaddr): Likewise.
750 (record_linux_msghdr): Likewise.
751 (record_linux_system_call): Likewise.
752 * linux-tdep.c (linux_collect_thread_registers): Likewise.
753 * lm32-tdep.c (lm32_extract_return_value): Likewise.
754 (lm32_store_return_value): Likewise.
755 * m32c-tdep.c (m32c_read_flg): Likewise.
756 (m32c_pseudo_register_read): Likewise.
757 (m32c_pseudo_register_write): Likewise.
758 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
759 (m32r_linux_collect_gregset): Likewise.
760 * m32r-tdep.c (m32r_store_return_value): Likewise.
761 (m32r_extract_return_value): Likewise.
762 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
763 (m68kbsd_collect_fpregset): Likewise.
764 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
765 * m68k-linux-nat.c (fetch_register): Likewise.
766 (old_fetch_inferior_registers): Likewise.
767 (old_store_inferior_registers): Likewise.
768 (store_regs): Likewise.
769 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
770 (m68k_svr4_store_return_value): Likewise.
771 * m88k-tdep.c (m88k_store_arguments): Likewise.
772 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
773 (mi_cmd_data_write_register_values): Likewise.
774 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
775 (mips_fbsd_store_inferior_registers): Likewise.
776 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
777 (mips_fbsd_supply_gregs): Likewise.
778 (mips_fbsd_collect_fpregs): Likewise.
779 (mips_fbsd_collect_gregs): Likewise.
780 (mips_fbsd_supply_fpregset): Likewise.
781 (mips_fbsd_collect_fpregset): Likewise.
782 (mips_fbsd_supply_gregset): Likewise.
783 (mips_fbsd_collect_gregset): Likewise.
784 * mips-linux-nat.c (supply_gregset): Likewise.
785 (fill_gregset): Likewise.
786 (supply_fpregset): Likewise.
787 (fill_fpregset): Likewise.
788 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
789 (mips_fill_gregset): Likewise.
790 (mips_supply_fpregset): Likewise.
791 (mips_fill_fpregset): Likewise.
792 (mips64_supply_gregset): Likewise.
793 (micromips_linux_sigframe_validate): Likewise.
794 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
795 (mipsnbsd_fetch_inferior_registers): Likewise.
796 (mipsnbsd_store_inferior_registers): Likewise.
797 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
798 (mipsnbsd_supply_gregset): Likewise.
799 (mipsnbsd_iterate_over_regset_sections): Likewise.
800 (mipsnbsd_supply_reg): Likewise.
801 (mipsnbsd_supply_fpreg): Likewise.
802 * mips-tdep.c (mips_in_frame_stub): Likewise.
803 (mips_dummy_id): Likewise.
804 (is_octeon_bbit_op): Likewise.
805 (micromips_bc1_pc): Likewise.
806 (extended_mips16_next_pc): Likewise.
807 (mips16_next_pc): Likewise.
808 (deal_with_atomic_sequence): Likewise.
809 * moxie-tdep.c (moxie_process_readu): Likewise.
810 * nios2-tdep.c (nios2_get_next_pc): Likewise.
811 * nto-procfs.c (procfs_store_registers): Likewise.
812 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
813 (ppcfbsd_store_inferior_registers): Likewise.
814 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
815 (fetch_altivec_register): Likewise.
816 (get_spe_registers): Likewise.
817 (fetch_spe_register): Likewise.
818 (fetch_altivec_registers): Likewise.
819 (fetch_all_gp_regs): Likewise.
820 (fetch_all_fp_regs): Likewise.
821 (store_vsx_register): Likewise.
822 (store_altivec_register): Likewise.
823 (set_spe_registers): Likewise.
824 (store_spe_register): Likewise.
825 (store_altivec_registers): Likewise.
826 (store_all_gp_regs): Likewise.
827 (store_all_fp_regs): Likewise.
828 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
829 (ppc_linux_collect_gregset): Likewise.
830 (ppc_canonicalize_syscall): Likewise.
831 (ppc_linux_record_signal): Likewise.
832 (ppu2spu_prev_register): Likewise.
833 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
834 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
835 (ppcobsd_store_registers): Likewise.
836 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
837 Likewise.
838 (ppc_ravenscar_generic_store_registers): Likewise.
839 * procfs.c (procfs_fetch_registers): Likewise.
840 (procfs_store_registers): Likewise.
841 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
842 (ravenscar_store_registers): Likewise.
843 (ravenscar_prepare_to_store): Likewise.
844 * record-btrace.c (record_btrace_fetch_registers): Likewise.
845 * record-full.c (record_full_wait_1): Likewise.
846 (record_full_registers_change): Likewise.
847 (record_full_store_registers): Likewise.
848 (record_full_core_fetch_registers): Likewise.
849 (record_full_save): Likewise.
850 (record_full_goto_insn): Likewise.
851 * regcache.c (regcache_register_size): Likewise.
852 (get_regcache_arch): Remove.
853 (regcache_read_pc): Likewise.
854 * regcache.h (get_regcache_arch): Remove.
855 * remote-sim.c (gdbsim_fetch_register): Likewise.
856 (gdbsim_store_register): Likewise.
857 * remote.c (fetch_register_using_p): Likewise.
858 (send_g_packet): Likewise.
859 (remote_prepare_to_store): Likewise.
860 (store_registers_using_G): Likewise.
861 * reverse.c (save_bookmark_command): Likewise.
862 (goto_bookmark_command): Likewise.
863 * rs6000-aix-tdep.c (branch_dest): Likewise.
864 * rs6000-nat.c (rs6000_ptrace64): Likewise.
865 (fetch_register): Likewise.
866 * rs6000-tdep.c (ppc_supply_reg): Likewise.
867 (ppc_collect_reg): Likewise.
868 (ppc_collect_gregset): Likewise.
869 (ppc_collect_fpregset): Likewise.
870 (ppc_collect_vsxregset): Likewise.
871 (ppc_collect_vrregset): Likewise.
872 (ppc_displaced_step_hw_singlestep): Likewise.
873 (rs6000_pseudo_register_read): Likewise.
874 (rs6000_pseudo_register_write): Likewise.
875 * s390-linux-nat.c (supply_gregset): Likewise.
876 (fill_gregset): Likewise.
877 (s390_linux_fetch_inferior_registers): Likewise.
878 * s390-linux-tdep.c (s390_write_pc): Likewise.
879 (s390_software_single_step): Likewise.
880 (s390_all_but_pc_registers_record): Likewise.
881 (s390_linux_syscall_record): Likewise.
882 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
883 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
884 (shnbsd_store_inferior_registers): Likewise.
885 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
886 (sh_extract_return_value_fpu): Likewise.
887 (sh_store_return_value_nofpu): Likewise.
888 (sh_corefile_supply_regset): Likewise.
889 (sh_corefile_collect_regset): Likewise.
890 * sh64-tdep.c (sh64_extract_return_value): Likewise.
891 (sh64_store_return_value): Likewise.
892 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
893 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
894 (sparc_store_inferior_registers): Likewise.
895 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
896 (sparc_ravenscar_prepare_to_store): Likewise.
897 * sparc-tdep.c (sparc32_store_arguments): Likewise.
898 (sparc_analyze_control_transfer): Likewise.
899 (sparc_step_trap): Likewise.
900 (sparc_software_single_step): Likewise.
901 (sparc32_gdbarch_init): Likewise.
902 (sparc_supply_rwindow): Likewise.
903 (sparc_collect_rwindow): Likewise.
904 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
905 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
906 (sparc64nbsd_collect_gregset): Likewise.
907 (sparc64nbsd_supply_fpregset): Likewise.
908 (sparc64nbsd_collect_fpregset): Likewise.
909 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
910 (sparc64_supply_gregset): Likewise.
911 (sparc64_collect_gregset): Likewise.
912 (sparc64_supply_fpregset): Likewise.
913 (sparc64_collect_fpregset): Likewise.
914 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
915 * spu-tdep.c (spu_unwind_sp): Likewise.
916 (spu2ppu_prev_register): Likewise.
917 (spu_memory_remove_breakpoint): Likewise.
918 * stack.c (return_command): Likewise.
919 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
920 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
921 * tracefile.c (trace_save_ctf): Likewise.
922 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
923 (do_windows_store_inferior_registers): Likewise.
924 (windows_resume): Likewise.
925 * xtensa-linux-nat.c (fill_gregset): Likewise.
926 (supply_gregset_reg): Likewise.
927 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
928 (xtensa_register_read_masked): Likewise.
929 (xtensa_supply_gregset): Likewise.
930 (xtensa_extract_return_value): Likewise.
931 (xtensa_store_return_value): Likewise.
932
933 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
934
935 * doublest.c (floatformat_from_string): New function.
936 * doublest.h (floatformat_from_string): Add prototype.
937
938 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
939 (OP_FLOAT): ... this.
940 * expression.h: Do not include "doublest.h".
941 (union exp_element): Replace doubleconst and decfloatconst by
942 new element floatconst.
943 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
944 (ada_evaluate_subexp): Likewise.
945 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
946 OP_DOUBLE and OP_DECFLOAT.
947 * expprint.c (print_subexp_standard): Likewise.
948 (dump_subexp_body_standard): Likewise.
949 * breakpoint.c (watchpoint_exp_is_const): Likewise.
950
951 * parse.c: Include "dfp.h".
952 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
953 (write_exp_elt_floatcst): New function.
954 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
955 and OP_DECFLOAT.
956 (operator_check_standard): Likewise.
957 (parse_float): Do not accept suffix. Take type as input. Return bool.
958 Return target format buffer instead of host DOUBLEST.
959 Use floatformat_from_string and decimal_from_string to parse
960 either binary or decimal floating-point types.
961 (parse_c_float): Remove.
962 * parser-defs.h: Do not include "doublest.h".
963 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
964 (write_exp_elt_floatcst): Add prototype.
965 (parse_float): Update prototype.
966 (parse_c_float): Remove.
967
968 * c-exp.y: Do not include "dfp.h".
969 (typed_val_float): Use byte buffer instead of DOUBLEST.
970 (typed_val_decfloat): Remove.
971 (DECFLOAT): Remove.
972 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
973 (parse_number): Update to new parse_float interface.
974 Parse suffixes and determine type before calling parse_float.
975 Handle decimal and binary FP types the same way.
976
977 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
978 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
979 (parse_number): Update to new parse_float interface.
980 Parse suffixes and determine type before calling parse_float.
981
982 * f-exp.y: Replace dval by typed_val_float.
983 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
984 (parse_number): Use parse_float instead of atof.
985
986 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
987 (parse_go_float): Remove.
988 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
989 (parse_number): Call parse_float instead of parse_go_float.
990 Parse suffixes and determine type before calling parse_float.
991
992 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
993 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
994 (parse_number): Update to new parse_float interface.
995 Parse suffixes and determine type before calling parse_float.
996
997 * m2-exp.y: Replace dval by byte buffer val.
998 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
999 (parse_number): Call parse_float instead of atof.
1000
1001 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1002 (lex_number): Call parse_float instead of strtod.
1003 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1004 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1005 Use write_exp_elt_floatcst.
1006 (unit_testing): Remove static variable.
1007 (rust_type): Do not check unit_testing.
1008 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
1009
1010 * ada-exp.y (type_float, type_double): Remove.
1011 (typed_val_float): Use byte buffer instead of DOUBLEST.
1012 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1013 * ada-lex.l (processReal): Use parse_float instead of sscanf.
1014
1015 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1016
1017 * aarch64-tdep.h (enum aarch64_regnum): Remove.
1018 * arch/aarch64.h: New file.
1019
1020 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1021
1022 * dfp.h (decimal_from_string): Use const reference for argument.
1023 * dfp.c (decimal_from_string): Likewise.
1024
1025 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1026
1027 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1028 * sh64-tdep.c (sh64_do_fp_register): Likewise.
1029 * mips-tdep.c (mips_print_fp_register): Likewise.
1030
1031 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1032
1033 * common/format.h (enum argclass): Replace decfloat_arg by
1034 dec32float_arg, dec64float_arg, and dec128float_arg.
1035 * common/format.c (parse_format_string): Update to return
1036 new decimal float argument classes.
1037
1038 * printcmd.c (printf_decfloat): Rename to ...
1039 (printf_floating): ... this. Add argclass argument, and use it
1040 instead of parsing the format string again. Add support for
1041 binary floating-point values, using floatformat_to_string.
1042 Convert value to the target format if it doesn't already match.
1043 (ui_printf): Call printf_floating instead of printf_decfloat,
1044 also for double_arg / long_double_arg. Pass argclass.
1045
1046 * dfp.c (decimal_to_string): Add format string argument.
1047 * dfp.h (decimal_to_string): Likewise.
1048
1049 * doublest.c (floatformat_to_string): Add format string argument.
1050 * doublest.h (floatformat_to_string): Likewise.
1051
1052 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1053
1054 * doublest.c (floatformat_precision): New routine.
1055 (floatformat_to_string): Likewise.
1056 * doublest.c (floatformat_to_string): Add prototype.
1057
1058 * printcmd.c (print_scalar_formatted): Only call print_floating
1059 on floating-point types.
1060 * valprint.c: Do not include "floatformat.h".
1061 (generic_val_print_decfloat): Remove.
1062 (generic_val_print): Call generic_val_print_float for both
1063 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1064 (print_floating): Use floatformat_to_string. Handle decimal float.
1065 (print_decimal_floating): Remove, merge into floatformat_to_string.
1066 * value.h (print_decimal_floating): Remove.
1067
1068 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1069
1070 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1071
1072 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1073
1074 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1075
1076 * memattr.h: Don't include vec.h.
1077 (struct mem_attrib): Initialize fields.
1078 <unknown>: New static method.
1079 (struct mem_region): Add constructors, operator<, initialize
1080 fields.
1081 * memattr.c: Include algorithm.
1082 (default_mem_attrib, unknown_mem_attrib): Remove.
1083 (user_mem_region_list): New global.
1084 (target_mem_region_list, mem_region_list): Change type to
1085 std::vector<mem_region>.
1086 (mem_use_target): Now a function.
1087 (target_mem_regions_valid): Change type to bool.
1088 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1089 (require_user_regions): Adjust.
1090 (require_target_regions): Adjust.
1091 (create_mem_region): Adjust.
1092 (lookup_mem_region): Adjust.
1093 (invalidate_target_mem_regions): Adjust.
1094 (mem_clear): Rename to...
1095 (user_mem_clear): ... this, and adjust.
1096 (mem_command): Adjust.
1097 (info_mem_command): Adjust.
1098 (mem_enable, enable_mem_command, mem_disable,
1099 disable_mem_command): Adjust.
1100 (mem_delete): Adjust.
1101 (delete_mem_command): Adjust.
1102 * memory-map.h (parse_memory_map): Return an std::vector.
1103 * memory-map.c (parse_memory_map): Likewise.
1104 (struct memory_map_parsing_data): Add constructor.
1105 <memory_map>: Point to std::vector.
1106 (memory_map_start_memory): Adjust.
1107 (memory_map_end_memory): Adjust.
1108 (memory_map_end_property): Adjust.
1109 (clear_result): Remove.
1110 * remote.c (remote_memory_map): Return an std::vector.
1111 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1112 Remove.
1113 (target_debug_print_mem_region_vector): New.
1114 * target-delegates.c: Regenerate.
1115 * target.h (mem_region_vector): New typedef.
1116 (to_memory_map): Return mem_region_vector.
1117 (target_memory_map): Return an std::vector.
1118 * target.c (target_memory_map): Return an std::vector.
1119 (flash_erase_command): Adjust.
1120
1121 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1122
1123 * memory-map.c (struct memory_map_parsing_data) <property_name>:
1124 Change type to std::string.
1125 (memory_map_start_property): Adjust.
1126 (memory_map_end_property): Adjust.
1127
1128 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1129
1130 * infrun.h: Include common/byte-vector.h.
1131 (struct displaced_step_closure): New struct.
1132 (struct buf_displaced_step_closure): New struct.
1133 * infrun.c (displaced_step_closure::~displaced_step_closure):
1134 Provide default implementation.
1135 (displaced_step_clear): Deallocate step closure with delete.
1136 * aarch64-tdep.c (displaced_step_closure): Rename to ...
1137 (aarch64_displaced_step_closure): ... this, extend
1138 displaced_step_closure.
1139 (aarch64_displaced_step_data) <dsc>: Change type to
1140 aarch64_displaced_step_closure.
1141 (aarch64_displaced_step_copy_insn): Adjust to type change, use
1142 unique_ptr.
1143 (aarch64_displaced_step_fixup): Add cast for displaced step
1144 closure.
1145 * amd64-tdep.c (displaced_step_closure): Rename to ...
1146 (amd64_displaced_step_closure): ... this, extend
1147 displaced_step_closure.
1148 <insn_buf>: Change type to std::vector<gdb_byte>.
1149 <max_len>: Remove.
1150 (fixup_riprel): Change type of DSC parameter, adjust to type
1151 change of insn_buf.
1152 (fixup_displaced_copy): Change type of DSC parameter.
1153 (amd64_displaced_step_copy_insn): Instantiate
1154 amd64_displaced_step_closure.
1155 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1156 to type change of insn_buf.
1157 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1158 parameter DSC.
1159 (arm_linux_copy_svc): Likewise.
1160 (cleanup_kernel_helper_return): Likewise.
1161 (arm_catch_kernel_helper_return): Likewise.
1162 (arm_linux_displaced_step_copy_insn): Instantiate
1163 arm_displaced_step_closure.
1164 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1165 (displaced_read_reg): Change type of parameter DSC.
1166 (branch_write_pc): Likewise.
1167 (load_write_pc): Likewise.
1168 (alu_write_pc): Likewise.
1169 (displaced_write_reg): Likewise.
1170 (arm_copy_unmodified): Likewise.
1171 (thumb_copy_unmodified_32bit): Likewise.
1172 (thumb_copy_unmodified_16bit): Likewise.
1173 (cleanup_preload): Likewise.
1174 (install_preload): Likewise.
1175 (arm_copy_preload): Likewise.
1176 (thumb2_copy_preload): Likewise.
1177 (install_preload_reg): Likewise.
1178 (arm_copy_preload_reg): Likewise.
1179 (cleanup_copro_load_store): Likewise.
1180 (install_copro_load_store): Likewise.
1181 (arm_copy_copro_load_store) Likewise.
1182 (thumb2_copy_copro_load_store): Likewise.
1183 (cleanup_branch): Likewise.
1184 (install_b_bl_blx): Likewise.
1185 (arm_copy_b_bl_blx): Likewise.
1186 (thumb2_copy_b_bl_blx): Likewise.
1187 (thumb_copy_b): Likewise.
1188 (install_bx_blx_reg): Likewise.
1189 (arm_copy_bx_blx_reg): Likewise.
1190 (thumb_copy_bx_blx_reg): Likewise.
1191 (cleanup_alu_imm): Likewise.
1192 (arm_copy_alu_imm): Likewise.
1193 (thumb2_copy_alu_imm): Likewise.
1194 (cleanup_alu_reg): Likewise.
1195 (install_alu_reg): Likewise.
1196 (arm_copy_alu_reg): Likewise.
1197 (thumb_copy_alu_reg): Likewise.
1198 (cleanup_alu_shifted_reg): Likewise.
1199 (install_alu_shifted_reg): Likewise.
1200 (arm_copy_alu_shifted_reg): Likewise.
1201 (cleanup_load): Likewise.
1202 (cleanup_store): Likewise.
1203 (arm_copy_extra_ld_st): Likewise.
1204 (install_load_store): Likewise.
1205 (thumb2_copy_load_literal): Likewise.
1206 (thumb2_copy_load_reg_imm): Likewise.
1207 (arm_copy_ldr_str_ldrb_strb): Likewise.
1208 (cleanup_block_load_all): Likewise.
1209 (cleanup_block_store_pc): Likewise.
1210 (cleanup_block_load_pc): Likewise.
1211 (arm_copy_block_xfer): Likewise.
1212 (thumb2_copy_block_xfer): Likewise.
1213 (cleanup_svc): Likewise.
1214 (install_svc): Likewise.
1215 (arm_copy_svc): Likewise.
1216 (thumb_copy_svc): Likewise.
1217 (arm_copy_undef): Likewise.
1218 (thumb_32bit_copy_undef): Likewise.
1219 (arm_copy_unpred): Likewise.
1220 (arm_decode_misc_memhint_neon): Likewise.
1221 (arm_decode_unconditional): Likewise.
1222 (arm_decode_miscellaneous): Likewise.
1223 (arm_decode_dp_misc): Likewise.
1224 (arm_decode_ld_st_word_ubyte): Likewise.
1225 (arm_decode_media): Likewise.
1226 (arm_decode_b_bl_ldmstm): Likewise.
1227 (arm_decode_ext_reg_ld_st): Likewise.
1228 (thumb2_decode_dp_shift_reg): Likewise.
1229 (thumb2_decode_ext_reg_ld_st): Likewise.
1230 (arm_decode_svc_copro): Likewise.
1231 (thumb2_decode_svc_copro): Likewise.
1232 (install_pc_relative): Likewise.
1233 (thumb_copy_pc_relative_16bit): Likewise.
1234 (thumb_decode_pc_relative_16bit): Likewise.
1235 (thumb_copy_pc_relative_32bit): Likewise.
1236 (thumb_copy_16bit_ldr_literal): Likewise.
1237 (thumb_copy_cbnz_cbz): Likewise.
1238 (thumb2_copy_table_branch): Likewise.
1239 (cleanup_pop_pc_16bit_all): Likewise.
1240 (thumb_copy_pop_pc_16bit): Likewise.
1241 (thumb_process_displaced_16bit_insn): Likewise.
1242 (decode_thumb_32bit_ld_mem_hints): Likewise.
1243 (thumb_process_displaced_32bit_insn): Likewise.
1244 (thumb_process_displaced_insn): Likewise.
1245 (arm_process_displaced_insn): Likewise.
1246 (arm_displaced_init_closure): Likewise.
1247 (arm_displaced_step_fixup): Add cast for closure.
1248 * arm-tdep.h: Include infrun.h.
1249 (displaced_step_closure): Rename to ...
1250 (arm_displaced_step_closure): ... this, extend
1251 displaced_step_closure.
1252 <u::svc::copy_svc_os>: Change type of parameter DSC.
1253 <cleanup>: Likewise.
1254 (arm_process_displaced_insn): Likewise.
1255 (arm_displaced_init_closure): Likewise.
1256 (displaced_read_reg): Likewise.
1257 (displaced_write_reg): Likewise.
1258 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1259 Adjust.
1260 * i386-tdep.h: Include infrun.h.
1261 (i386_displaced_step_closure): New typedef.
1262 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1263 i386_displaced_step_closure.
1264 (i386_displaced_step_fixup): Adjust.
1265 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1266 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1267 and unique_ptr.
1268 (ppc_displaced_step_fixup): Adjust.
1269 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1270 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1271 and unique_ptr.
1272 (s390_displaced_step_fixup): Adjust.
1273
1274 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1275
1276 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1277 Remove declarations.
1278
1279 2017-10-20 Tom Tromey <tom@tromey.com>
1280
1281 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1282 std::vector.
1283 (gdb_bfd_record_inclusion): Update.
1284 (bfdp): Remove typedef.
1285
1286 2017-10-20 Tom Tromey <tom@tromey.com>
1287
1288 * gdb_bfd.c (gdb_bfd_ref): Use new.
1289 (struct gdb_bfd_data): Add constructor, destructor, and member
1290 initializers.
1291 (gdb_bfd_unref): Use delete.
1292
1293 2017-10-20 Tom Tromey <tom@tromey.com>
1294
1295 * exec.c (exec_file_attach): Use new_bfd_ref.
1296 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1297 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1298 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1299 new_bfd_ref.
1300 * gdb_bfd.h (new_bfd_ref): New function.
1301
1302 2017-10-20 Pedro Alves <palves@redhat.com>
1303
1304 * main.c (captured_command_loop): Add attribute noinline.
1305
1306 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1307
1308 * interps.c (struct interp_factory): Add constructor.
1309 (interp_factory_p): Remove typedef.
1310 (DEF_VEC_P(interp_factory_p)): Remove.
1311 (interpreter_factories): Change type to std::vector.
1312 (interp_factory_register): Adjust.
1313 (interp_lookup): Adjust.
1314 (interpreter_completer): Adjust.
1315
1316 2017-10-19 Tom Tromey <tom@tromey.com>
1317
1318 * break-catch-syscall.c (catch_syscall_completer): Use
1319 std::string, gdb::unique_xmalloc_ptr.
1320
1321 2017-10-19 Tom Tromey <tom@tromey.com>
1322
1323 * infcall.c (call_function_by_hand_dummy): Use std::string.
1324
1325 2017-10-19 Tom Tromey <tom@tromey.com>
1326
1327 * mi/mi-main.c (mi_cmd_execute): Update.
1328 * top.h (prepare_execute_command): Return scoped_value_mark.
1329 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1330 Add move constructor.
1331 * top.c (prepare_execute_command): Return scoped_value_mark.
1332 (execute_command): Update.
1333
1334 2017-10-19 Pedro Alves <palves@redhat.com>
1335
1336 * xml-support.c (xml_fetch_content_from_file): Check fread's
1337 return.
1338
1339 2017-10-19 Pedro Alves <palves@redhat.com>
1340
1341 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1342 async.
1343 (handle_error_fd): New function.
1344 (ser_base_async): Add/delete an event loop file handler for
1345 error_fd.
1346
1347 2017-10-19 Pedro Alves <palves@redhat.com>
1348
1349 * xml-support.c (xml_fetch_content_from_file): Don't read in
1350 chunks. Instead use fseek to determine the file's size, and read
1351 it in one go.
1352
1353 2017-11-18 Keith Seitz <keiths@redhat.com>
1354
1355 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1356 types.
1357 Add whitespace to front of type name.
1358
1359 2017-10-18 Keith Seitz <keiths@redhat.com>
1360
1361 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1362 DW_AT_accessibility.
1363
1364 2017-10-18 Yao Qi <yao.qi@linaro.org>
1365
1366 * features/tic6x-c62x-linux.c: Remove.
1367
1368 2017-10-17 Tom Tromey <tom@tromey.com>
1369
1370 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1371 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1372 (do_mixed_source_and_assembly): Likewise.
1373
1374 2017-10-17 Tom Tromey <tom@tromey.com>
1375
1376 * regcache.c (regcache::xfer_part): Remove assertion.
1377
1378 2017-10-17 Pedro Alves <palves@redhat.com>
1379
1380 * xml-support.c (xml_fetch_content_from_file): Call
1381 unique_ptr::release() instead unique_ptr::get() when passing
1382 through xrealloc.
1383
1384 2017-10-17 Yao Qi <yao.qi@linaro.org>
1385
1386 * regcache.c (regcache::xfer_part): Remove parameters read and
1387 write, add parameter is_raw. All callers are updated.
1388
1389 2017-10-16 Keith Seitz <keiths@redhat.com>
1390
1391 * c-typeprint.c (enum access_specifier): Moved here from
1392 c_type_print_base.
1393 (output_access_specifier): New function.
1394 (c_type_print_base): Consider typedefs when assessing
1395 whether access labels are needed.
1396 Use output_access_specifier as needed.
1397 Output access specifier for typedefs, if needed.
1398 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1399 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1400 fields.
1401 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1402 accessor macros.
1403
1404 2017-10-16 Tom Tromey <tom@tromey.com>
1405
1406 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1407 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1408 * target.c (target_fileio_read_stralloc): Update.
1409 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1410 * target.h (target_fileio_read_stralloc): Return
1411 unique_xmalloc_ptr.
1412
1413 2017-10-16 Tom Tromey <tom@tromey.com>
1414
1415 * xml-syscall.c (xml_init_syscalls_info): Update.
1416 * xml-support.c (xinclude_start_include): Update.
1417 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1418 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1419 (xml_fetch_content_from_file): Likewise.
1420 * osdata.c (get_osdata): Update.
1421 * target.h (target_read_stralloc, target_get_osdata): Return
1422 unique_xmalloc_ptr.
1423 * solib-aix.c (solib_aix_get_library_list): Update.
1424 * solib-target.c (solib_target_current_sos): Update.
1425 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1426 * xml-tdesc.c (fetch_available_features_from_target): Update.
1427 (target_fetch_description_xml): Update.
1428 (file_read_description_xml): Update.
1429 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1430 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1431 (remote_pid_to_exec_file): Update.
1432 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1433 (target_get_osdata): Likewise.
1434
1435 2017-10-16 Tom Tromey <tom@tromey.com>
1436
1437 * remote.c (remote_register_number_and_offset): Use std::vector.
1438 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1439 (putpkt_binary): Use gdb::def_vector.
1440 (compare_sections_command): Use gdb::byte_vector.
1441
1442 2017-10-16 Tom Tromey <tom@tromey.com>
1443
1444 * ppc-linux-nat.c (hwdebug_insert_point): Use
1445 gdb::unique_xmalloc_ptr, XDUP.
1446
1447 2017-10-16 Tom Tromey <tom@tromey.com>
1448
1449 * probe.c (parse_probes): Use std::string.
1450 (info_probes_for_ops, enable_probes_command)
1451 (disable_probes_command): Remove cleanups.
1452
1453 2017-10-16 Tom Tromey <tom@tromey.com>
1454
1455 * buildsym.c (block_compar): Remove.
1456 (end_symtab_get_static_block): Use std::vector.
1457
1458 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1459
1460 * memrange.h (struct mem_range): Define operator< and operator==.
1461 (mem_range_s): Remove.
1462 (DEF_VEC_O (mem_range_s)): Remove.
1463 (normalize_mem_ranges): Change parameter type to std::vector.
1464 * memrange.c (compare_mem_ranges): Remove.
1465 (normalize_mem_ranges): Change parameter type to std::vector,
1466 adjust to vector change.
1467 * exec.c (section_table_available_memory): Return vector, remove
1468 parameter.
1469 (section_table_read_available_memory): Adjust to std::vector
1470 change.
1471 * remote.c (remote_read_bytes): Adjust to std::vector
1472 change.
1473 * tracepoint.h (traceframe_available_memory): Change parameter
1474 type to std::vector.
1475 * tracepoint.c (traceframe_available_memory): Change parameter
1476 type to std::vector, adjust.
1477 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1478 std::vector change.
1479 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1480 unittests/memrange-selftests.c.
1481 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1482 * gdb/unittests/memrange-selftests.c: New file.
1483
1484 2017-10-16 Pedro Alves <palves@redhat.com>
1485
1486 * elfread.c (probe_key_free): Rename range-for variable.
1487 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1488 (find_probe_by_pc, collect_probes): Rename range-for variable.
1489
1490 2017-10-16 Yao Qi <yao.qi@linaro.org>
1491
1492 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1493 * features/tic6x-c62x.c: Remove.
1494 * features/tic6x-c64x-linux.c: Remove.
1495 * features/tic6x-c64x.c: Remove.
1496 * features/tic6x-c64xp-linux.c: Remove.
1497 * features/tic6x-c64xp.c: Remove.
1498 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1499 initialize_tdesc_tic6x_*_linux functions.
1500 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1501 initialize_tdesc_tic6x_* functions.
1502
1503 2017-10-16 Yao Qi <yao.qi@linaro.org>
1504
1505 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1506 tic6x-c62x.
1507 * regformats/tic6x-c62x.dat: Remove.
1508 * regformats/tic6x-c64x.dat: Remove.
1509 * regformats/tic6x-c64xp.dat: Remove.
1510
1511 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1512
1513 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1514 (the !HAVE_LIBEXPAT version).
1515
1516 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1517
1518 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1519 const.
1520
1521 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1522
1523 * target.h: Include tracepoint.h.
1524 (enum trace_find_type): Move to tracepoint.h.
1525 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1526 * tracepoint.h: Don't include target.h
1527 (enum trace_find_type): Move from target.h.
1528 (parse_traceframe_info): Return a unique ptr.
1529 * tracepoint.c (current_traceframe_info): Change type to unique
1530 ptr.
1531 (free_traceframe_info): Remove.
1532 (clear_traceframe_info): Don't manually free
1533 current_traceframe_info.
1534 (free_result): Remove.
1535 (parse_traceframe_info): Return a unique ptr.
1536 (get_traceframe_info): Adjust to unique ptr.
1537 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1538 * remote.c (remote_traceframe_info): Return a unique ptr.
1539 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1540 ptr.
1541 * target-debug.h (target_debug_print_traceframe_info_up): New
1542 macro.
1543 * target-delegates.c: Regenerate.
1544
1545 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1546
1547 * memrange.h (struct mem_range): Add constructors.
1548 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1549 std::vector<mem_range>.
1550 * tracepoint.c (free_traceframe_info): Don't manually free
1551 vector.
1552 (traceframe_info_start_memory): Adjust to vector change.
1553 (traceframe_available_memory): Likewise.
1554 * tracefile-tfile.c (build_traceframe_info): Likewise.
1555 * ctf.c (ctf_traceframe_info): Likewise.
1556
1557 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1558
1559 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1560 std::vector<int>.
1561 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1562 (traceframe_info_start_tvar): Adjust to vector change.
1563 (parse_traceframe_info): Allocate with new.
1564 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1565 vector change.
1566 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1567 change.
1568 tfile_traceframe_info): Allocate with new.
1569 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1570 change.
1571
1572 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1573
1574 * tracepoint.c (traceframe_info): Rename to...
1575 (current_traceframe_info): ...this.
1576 (clear_traceframe_info): Adjust.
1577 (get_traceframe_info): Adjust.
1578
1579 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1580
1581 * nat/linux-osdata.c: Include algorithm.
1582 (compare_processes): Remove.
1583 (struct pid_pgid_entry): New struct.
1584 (linux_xfer_osdata_processgroups): Use std::vector instead of
1585 XNEWVEC.
1586
1587 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1588
1589 * objfiles.h: Don't include symfile.h.
1590 (struct partial_symbol): Remove forward-declaration.
1591 (struct objfile) <global_psymbols, static_psymbols>: Change type
1592 to std::vector<partial_symbol *>.
1593 * objfiles.c (objfile::objfile): Don't memset those fields.
1594 (objfile::~objfile): Don't free those fields.
1595 * psympriv.h (struct psymbol_allocation_list): Remove
1596 forward-declaration.
1597 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1598 to std::vector.
1599 (start_psymtab_common): Change parameters to std::vector.
1600 * psymtab.c: Include algorithm.
1601 (require_partial_symbols): Call shrink_to_fit.
1602 (find_pc_sect_psymbol): Adjust to vector change.
1603 (match_partial_symbol): Likewise.
1604 (lookup_partial_symbol): Likewise.
1605 (psym_relocate): Likewise.
1606 (dump_psymtab): Likewise.
1607 (recursively_search_psymtabs): Likewise.
1608 (compare_psymbols): Remove.
1609 (sort_pst_symbols): Adjust to vector change.
1610 (start_psymtab_common): Likewise.
1611 (end_psymtab_common): Likewise.
1612 (psymbol_bcache_full): De-constify return value.
1613 (add_psymbol_to_bcache): Likewise.
1614 (extend_psymbol_list): Remove.
1615 (append_psymbol_to_list): Adjust to vector change.
1616 (add_psymbol_to_list): Likewise.
1617 (init_psymbol_list): Likewise.
1618 (maintenance_info_psymtabs): Likewise.
1619 (maintenance_check_psymtabs): Likewise.
1620 * symfile.h (struct psymbol_allocation_list): Remove.
1621 * symfile.c (reread_symbols): Adjust to vector change.
1622 * dbxread.c (start_psymtab): Change type of parameters.
1623 (dbx_symfile_read): Adjust to vector change.
1624 (read_dbx_symtab): Likewise.
1625 (start_psymtab): Change type of parameters.
1626 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1627 (create_partial_symtab): Likewise.
1628 (add_partial_symbol): Likewise.
1629 (write_one_signatured_type): Likewise.
1630 (recursively_write_psymbols): Likewise.
1631 * mdebugread.c (parse_partial_symbols): Likewise.
1632 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1633 (scan_xcoff_symtab): Adjust to vector change.
1634 (xcoff_initial_scan): Likewise.
1635
1636 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1637
1638 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1639
1640 2017-10-13 Yao Qi <yao.qi@linaro.org>
1641
1642 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1643 Remove s390x-*-expedite, add s390x-expedite.
1644
1645 2017-10-13 Yao Qi <yao.qi@linaro.org>
1646
1647 * features/s390-gs-linux64.c: Regenerated.
1648 * features/s390x-gs-linux64.c: Regenerated.
1649
1650 2017-10-13 Tom Tromey <tom@tromey.com>
1651
1652 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1653 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1654 delete.
1655 * symfile.c (symbol_file_add_with_addrs): Use new.
1656 (symbol_file_add_separate): Update comment.
1657 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1658 * jit.c (jit_object_close_impl): Use new.
1659 (jit_unregister_code): Use delete.
1660 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1661 (~objfile): Rename from free_objfile.
1662 (free_objfile_separate_debug, do_free_objfile_cleanup)
1663 (free_all_objfiles, objfile_purge_solibs): Use delete.
1664 * objfiles.h (struct objfile): Add constructor and destructor.
1665 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1666 (allocate_objfile, free_objfile): Don't declare.
1667 (struct objstats): Add initializers.
1668
1669 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1670
1671 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1672 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1673 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1674 * gdbarch.h: Regenerate.
1675 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1676 Adjust comment.
1677 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1678 (i386_displaced_step_fixup): Adjust comment.
1679 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1680
1681 2017-10-12 Tom Tromey <tom@tromey.com>
1682
1683 * prologue-value.h (pv_area::store_would_trash): Return bool.
1684 (pv_area::find_reg): Likewise.
1685 * prologue-value.c (pv_area::store_would_trash): Return bool.
1686 (pv_area::find_reg): Likewise.
1687
1688 2017-10-12 Tom Tromey <tom@tromey.com>
1689
1690 * s390-linux-tdep.c (s390_store, s390_load)
1691 (s390_check_for_saved, s390_analyze_prologue): Update.
1692 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1693 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1694 * prologue-value.h (class pv_area): Move from prologue-value.c.
1695 Change names of members. Add constructor, destructor, member
1696 functions.
1697 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1698 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1699 (pv_area_fetch, pv_area_scan): Don't declare.
1700 * prologue-value.c (struct pv_area::area_entry): Now member of
1701 pv_area.
1702 (struct pv_area): Move to prologue-value.h.
1703 (pv_area::pv_area): Rename from make_pv_area.
1704 (pv_area::~pv_area): Rename from free_pv_area.
1705 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1706 (clear_entries, find_entry, overlaps, store_would_trash, store)
1707 (fetch, find_reg, scan): Now member of pv_area.
1708 Remove "area" argument. Update.
1709 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1710 Update.
1711 * mn10300-tdep.c (push_reg, check_for_saved)
1712 (mn10300_analyze_prologue): Update.
1713 * mep-tdep.c (is_arg_spill, check_for_saved)
1714 (mep_analyze_prologue): Update.
1715 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1716 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1717 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1718 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1719 Update.
1720 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1721 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1722
1723 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1724
1725 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1726 * linux-nat.c (linux_nat_delete_thread): New variable.
1727 (lwp_free): Invoke linux_nat_delete_thread if set.
1728 (linux_nat_set_delete_thread): New function.
1729 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1730 thread delete callback.
1731 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1732 (_initialize_arm_linux_nat): Assign thread delete callback.
1733 * s390-linux-nat.c (s390_delete_thread): New function.
1734 (_initialize_s390_nat): Assign thread delete callback.
1735 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1736 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1737 function.
1738 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1739 declaration.
1740 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1741 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1742
1743 2017-10-09 Tom Tromey <tom@tromey.com>
1744
1745 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1746 std::string.
1747 * tui/tui-layout.c (enum tui_status): Use std::string.
1748
1749 2017-10-11 Tom Tromey <tom@tromey.com>
1750
1751 * gdbthread.h (thread_command): Constify.
1752 * inferior.h (detach_command): Constify.
1753 * top.h (set_history, show_history): Constify.
1754 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1755 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1756 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1757 * printcmd.c (set_command): Constify.
1758 (non_const_set_command): New function.
1759 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1760 * breakpoint.c (enable_command, disable_command, delete_command)
1761 (catch_command, tcatch_command, set_breakpoint_cmd)
1762 (show_breakpoint_cmd): Constify.
1763 * macrocmd.c (macro_command): Constify.
1764 * infcmd.c (unset_command, kill_command, detach_command)
1765 (info_proc_cmd): Constify.
1766 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1767 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1768 (info_auto_load_cmd): Constify.
1769 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1770 (unset_tdesc_cmd): Constify.
1771 * ada-lang.c (set_ada_command, show_ada_command)
1772 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1773 * guile/guile.c (set_guile_command, show_guile_command)
1774 (info_guile_command): Constify.
1775 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1776 Constify.
1777 * skip.c (skip_command): Constify.
1778 * compile/compile.c (_initialize_compile): Constify.
1779 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1780 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1781 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1782 (maint_btrace_pt_show_cmd): Constify.
1783 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1784 Constify.
1785 * python/python.c (user_show_python, user_set_python): Constify.
1786 * mips-tdep.c (set_mips_command, show_mips_command)
1787 (set_mipsfpu_command): Constify.
1788 * record-btrace.c (cmd_record_btrace_start)
1789 (cmd_set_record_btrace, cmd_show_record_btrace)
1790 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1791 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1792 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1793 Constify.
1794 * symfile.c (overlay_command): Constify.
1795 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1796 * cli/cli-logging.c (set_logging_command, show_logging_command):
1797 Constify.
1798 * cli/cli-dump.c (dump_command, append_command)
1799 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1800 (tekhex_dump_command, binary_dump_command)
1801 (binary_append_command): Constify.
1802 * cli/cli-decode.c (struct cmd_list_element): Change type of
1803 "fun".
1804 * cli/cli-cmds.c (info_command, show_command, set_debug)
1805 (show_debug): Constify.
1806 (show_command): Add non-const overload.
1807 * top.c (set_history, show_history): Constify.
1808 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1809 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1810 * target.c (target_command): Constify.
1811 * sparc64-tdep.c (info_adi_command): Constify.
1812 * record-full.c (cmd_record_full_start): Constify.
1813 (set_record_full_command): Constify. Fix typo.
1814 (show_record_full_command): Constify.
1815 * thread.c (thread_command, thread_apply_command): Constify.
1816 * memattr.c (dummy_cmd): Constify.
1817 * value.c (function_command): Constify.
1818 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1819 * probe.c (info_probes_command): Constify.
1820 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1821 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1822 (show_thread_cmd, set_thread_default_cmd)
1823 (show_thread_default_cmd): Constify.
1824 (check_empty): Constify.
1825 * tracepoint.c (tfind_command): Constify.
1826 * cp-support.c (maint_cplus_command): Constify.
1827 * windows-tdep.c (info_w32_command): Constify.
1828 * record.c (cmd_record_start, set_record_command)
1829 (show_record_command, info_record_command, cmd_record_goto):
1830 Constify.
1831 * ravenscar-thread.c (set_ravenscar_command)
1832 (show_ravenscar_command): Constify.
1833 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1834 Constify.
1835 (add_internal_problem_command): Remove casts.
1836 * arc-tdep.c (maintenance_print_arc_command): Constify.
1837 * valprint.c (set_print, show_print, set_print_raw)
1838 (show_print_raw): Constify.
1839 * maint.c (maintenance_command, maintenance_info_command)
1840 (maintenance_print_command, maintenance_set_cmd)
1841 (maintenance_show_cmd, set_per_command_cmd)
1842 (show_per_command_cmd, maintenance_check_command): Constify.
1843 * language.c (set_check, show_check): Constify.
1844 * typeprint.c (show_print_type, set_print_type): Constify.
1845 * go32-nat.c (go32_info_dos_command): Constify.
1846
1847 2017-10-11 Tom Tromey <tom@tromey.com>
1848
1849 * breakpoint.c (prepare_re_set_context): Remove.
1850 (breakpoint_re_set_one): Update. Don't use cleanups.
1851 (breakpoint_re_set): Use scoped_restore, std::string, and
1852 scoped_restore_current_language.
1853
1854 2017-10-11 Tom Tromey <tom@tromey.com>
1855
1856 * breakpoint.c (commands_command_1): Use std::string.
1857 (cleanup_executing_breakpoints): Remove.
1858 (bpstat_do_actions_1): Use scoped_restore.
1859 (bpstat_check_watchpoint): Use std::string.
1860 (decode_static_tracepoint_spec): Likewise.
1861 (break_range_command): Likewise.
1862 (watch_command_1): Likewise.
1863 (compare_breakpoints): Change argument types.
1864 (clear_command): Use std::vector.
1865 (cleanup_executing_breakpoints): Remove.
1866 (update_global_location_list): Use unique_xmalloc_ptr.
1867 (strace_command): Remove unused declaration.
1868
1869 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1870
1871 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1872 * NEWS: Mention new FreeBSD/arm native configuration.
1873 * configure.host: Add arm*-*-freebsd*.
1874 * configure.nat: Likewise.
1875 * arm-fbsd-nat.c: New file.
1876
1877 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1878
1879 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1880 (ALLDEPFILES): Add arm-fbsd-tdep.c.
1881 * NEWS: Mention new FreeBSD/arm target.
1882 * configure.tgt: Add arm*-*-freebsd*.
1883 * arm-fbsd-tdep.c: New file.
1884 * arm-fbsd-tdep.h: New file.
1885
1886 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1887
1888 * linux-tdep.c (linux_make_corefile_notes): Remove call to
1889 `gdbarch_elfcore_write_linux_prpsinfo'.
1890 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1891 method.
1892 (elf_internal_linux_prpsinfo): Remove declaration.
1893 * gdbarch.h: Regenerate.
1894 * gdbarch.c: Regenerate.
1895
1896 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1897
1898 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1899 `set_gdbarch_elfcore_write_linux_prpsinfo'.
1900
1901 2017-10-11 Pedro Alves <palves@redhat.com>
1902
1903 * breakpoint.c (reattach_breakpoints): Delete.
1904 * breakpoint.h (reattach_breakpoints): Delete.
1905
1906 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
1907
1908 * symfile.c (registered_sym_fns): Make struct, not typedef.
1909 (DEF_VEC_O (registered_sym_fns)): Remove.
1910 (symtab_fns): Change type to std::vector.
1911 (add_symtab_fns): Adjust.
1912 (find_sym_fns): Adjust.
1913
1914 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
1915
1916 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1917 * arc-tdep.h (arc_arch_is_em): New function.
1918 (arc_arch_is_hs): Likewise.
1919
1920 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1921
1922 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1923 parentheses in the declaration.
1924 (macro_lookup_inclusion): Likewise.
1925 (macro_lookup_definition): Likewise.
1926 * p-lang.h (pascal_builtin_types): Likewise.
1927 * tui/tui-data.c (tui_win_list): Likewise.
1928 * tui/tui-data.h (tui_win_list): Likewise.
1929 * utils.h (make_cleanup_free_section_addr_info): Likewise.
1930
1931 2017-10-11 Mark Rages <markrages@gmail.com>
1932
1933 * target-memory.c (block_boundaries): Fix for block address not
1934 aligned on block size.
1935
1936 2017-10-10 Pedro Alves <palves@redhat.com>
1937 Tom Tromey <tom@tromey.com>
1938
1939 * breakpoint.c (struct captured_breakpoint_query_args)
1940 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1941 (print_breakpoint): New.
1942 * breakpoint.h (print_breakpoint): Declare.
1943 * common/common-exceptions.h (enum return_reason): Remove
1944 references to catch_exceptions.
1945 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1946 Delete.
1947 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1948 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1949 * gdb.h: Delete.
1950 * gdbthread.h (thread_select): Declare.
1951 * mi/mi-cmd-break.c: Don't include gdb.h.
1952 (breakpoint_notify): Use print_breakpoint.
1953 * mi/mi-cmd-catch.c: Don't include gdb.h.
1954 * mi/mi-interp.c: Don't include gdb.h.
1955 (mi_print_breakpoint_for_event): New.
1956 (mi_breakpoint_created, mi_breakpoint_modified): Use
1957 mi_print_breakpoint_for_event.
1958 * mi/mi-main.c: Don't include gdb.h.
1959 (mi_cmd_thread_select): Parse the global thread ID here. Use
1960 thread_select instead of gdb_thread_select.
1961 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1962 of using gdb_list_thread_ids.
1963 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
1964 FILEIO_ENOSYS here.
1965 (remote_fileio_request): Use TRY/CATCH instead of
1966 catch_exceptions.
1967 * symfile-mem.c (struct symbol_file_add_from_memory_args)
1968 (symbol_file_add_from_memory_wrapper): Delete.
1969 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1970 * thread.c: Don't include gdb.h.
1971 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1972 (thread_alive): Use thread_select.
1973 (do_captured_thread_select): Delete, parts salvaged as ...
1974 (thread_select): ... this new function.
1975 (gdb_thread_select): Delete.
1976
1977 2017-10-10 Pedro Alves <palves@redhat.com>
1978 Tom Tromey <tom@tromey.com>
1979
1980 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1981 and reverse logic.
1982 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1983 No longer macros. Instead ...
1984 (enum wp_check_result): They're now values of this new
1985 enumeration.
1986 (watchpoint_check): Change return type to wp_check_result and
1987 parameter type to bpstat.
1988 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1989 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1990 catch_errors. Reverse logic of watchpoint_check call.
1991 (breakpoint_re_set_one): Now returns void and takes a breakpoint
1992 pointer as parameter.
1993 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1994 * common/common-exceptions.c (throw_exception_sjlj): Update
1995 comments to avoid mentioning catch_errors.
1996 * exceptions.c (catch_errors): Delete.
1997 * exceptions.h: Update comments to avoid mentioning catch_errors.
1998 (catch_errors_ftype, catch_errors): Delete.
1999 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2000 (hook_stop_stub): Delete.
2001 (restore_selected_frame): Change return type to void, and
2002 parameter type to const frame_id &.
2003 (restore_infcall_control_state): Use TRY/CATCH instead of
2004 catch_errors.
2005 * main.c (captured_command_loop): Return void and remove
2006 parameter. Remove references to catch_errors.
2007 (captured_main): Use TRY/CATCH instead of catch_errors.
2008 * objc-lang.c (objc_submethod_helper_data)
2009 (find_objc_msgcall_submethod_helper): Delete.
2010 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2011 catch_errors.
2012 * record-full.c (record_full_message): Return void.
2013 (record_full_message_args, record_full_message_wrapper): Delete.
2014 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2015 instead of catch_errors.
2016 * solib-aix.c (solib_aix_open_symbol_file_object): Change
2017 parameter type to int.
2018 * solib-darwin.c (open_symbol_file_object): Ditto.
2019 * solib-dsbt.c (open_symbol_file_object): Ditto.
2020 * solib-frv.c (open_symbol_file_object): Ditto.
2021 * solib-svr4.c (open_symbol_file_object): Ditto.
2022 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2023 * solib.c (update_solib_list): Use TRY/CATCH instead of
2024 catch_errors.
2025 * solist.h (struct target_so_ops) <open_symbol_file_object>:
2026 Change type.
2027 * symmisc.c (struct print_symbol_args): Remove.
2028 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2029 (print_symbol): Change type.
2030 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2031 and remove parameters.
2032 (catch_errors): New.
2033 (get_windows_debug_event): Adjust.
2034
2035 2017-10-09 Tom Tromey <tom@tromey.com>
2036
2037 * mi/mi-main.c (free_splay_tree): Remove.
2038 (list_available_thread_groups): Use splay_tree_up.
2039 * common/gdb_splay_tree.h: New file.
2040
2041 2017-10-09 Tom Tromey <tom@tromey.com>
2042
2043 * mi/mi-main.c (do_nothing): Remove.
2044 (list_available_thread_groups): Update.
2045
2046 2017-10-09 Pedro Alves <palves@redhat.com>
2047
2048 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2049 reading registers when switching context.
2050
2051 2017-10-09 John Baldwin <jhb@FreeBSD.org>
2052
2053 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2054 (fbsd_convert_siginfo): Likewise.
2055 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2056
2057 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
2058
2059 * configure.ac (try_guile_versions): Remove guile-2.2.
2060 * configure: Regenerate.
2061
2062 2017-10-09 Tom Tromey <tom@tromey.com>
2063
2064 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2065 (COMPILE.pre): Use $(CXX).
2066
2067 2017-10-09 Pedro Alves <palves@redhat.com>
2068
2069 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2070 Use bool.
2071 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2072 * cp-support.h (cp_remove_params): Now returns a
2073 gdb::unique_xmalloc_ptr.
2074 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2075 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2076 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2077 returning a gdb::unique_xmalloc_ptr.
2078 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2079 * stack.c (find_frame_funname): Adjust to cp_remove_params
2080 returning a gdb::unique_xmalloc_ptr.
2081
2082 2017-10-08 Tom Tromey <tom@tromey.com>
2083
2084 * dwarf2read.c (dwarf2_get_dwz_file): Use
2085 gdb::unique_xmalloc_ptr.
2086 (find_slot_in_mapped_hash): Likewise.
2087 (dwarf2_physname): Likewise.
2088 (create_dwo_unit_in_dwp_v1): Use std::string.
2089 (create_dwo_unit_in_dwp_v2): Likewise.
2090 (lookup_dwo_cutu): Likewise.
2091 (inherit_abstract_dies): Use std::vector.
2092 (read_array_type): Likewise.
2093 (dwarf_decode_macros): Remove unused declaration.
2094 (unsigned_int_compar): Remove.
2095 (dwarf2_build_psymtabs_hard): Use scoped_restore.
2096 (psymtabs_addrmap_cleanup): Remove.
2097
2098 2017-10-08 Tom Tromey <tom@tromey.com>
2099
2100 * frame-unwind.c (frame_unwind_try_unwinder): Update.
2101 * frame.h (frame_cleanup_after_sniffer): Declare.
2102 (frame_prepare_for_sniffer): Return void.
2103 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
2104 type of argument.
2105 (frame_prepare_for_sniffer): Return void.
2106
2107 2017-10-08 Tom Tromey <tom@tromey.com>
2108
2109 * utils.h (make_cleanup_value_free): Remove.
2110 * utils.c (do_value_free, struct cleanup): Remove.
2111 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2112 Use gdb_value_up.
2113 * value.h (struct value_deleter): New.
2114 (gdb_value_up): New typedef.
2115
2116 2017-10-08 Tom Tromey <tom@tromey.com>
2117
2118 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2119 (make_cleanup_free_search_symbols): Remove.
2120 (search_symbols): Return std::vector.
2121 (symbol_search::compare_search_syms): Now member of
2122 symbol_search. Change arguments.
2123 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
2124 (symtab_symbol_info, rbreak_command): Update.
2125 * symtab.h (struct symbol_search) <next>: Remove.
2126 Add constructors.
2127 (symbol_search::operator<): New function.
2128 (symbol_search::operator==): New function.
2129 (search_symbols): Remove std::vector.
2130 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2131 (symbol_search::compare_search_syms): Declare.
2132
2133 2017-10-06 Yao Qi <yao.qi@linaro.org>
2134
2135 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2136 arch/aarch64-insn.o.
2137 Remove one rule.
2138 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2139
2140 2017-10-06 Yao Qi <yao.qi@linaro.org>
2141
2142 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2143 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2144 arch/arm-linux.o respectively.
2145 * configure.tgt: Likewise.
2146
2147 2017-10-06 Yao Qi <yao.qi@linaro.org>
2148
2149 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2150 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2151
2152 2017-10-06 Pedro Alves <palves@redhat.com>
2153
2154 * windows-nat.c: Include <algorithm>.
2155
2156 2017-10-06 Yao Qi <yao.qi@linaro.org>
2157
2158 * configure.tgt (i386_tobjs): New variable.
2159 (amd64_tobjs): New variable.
2160 Set $cpu_obs and $os_obs.
2161
2162 2017-10-06 Yao Qi <yao.qi@linaro.org>
2163
2164 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2165 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2166 (clean): Remove object files and dependency files.
2167 (distclean): Remove the directory.
2168 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2169 * configure: Re-generated.
2170 * configure.tgt: Replace amd64.o with arch/amd64.o.
2171
2172 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2173
2174 PR build/22188
2175 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2176 and SETEND.
2177
2178 2017-10-05 Pedro Alves <palves@redhat.com>
2179
2180 * linux-nat.c (linux_child_follow_fork): When following the parent
2181 and detaching the child, consult the parent thread's architecture
2182 instead of the child's.
2183
2184 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2185
2186 * ax.h: Do not include "doublest.h".
2187 (union agent_val): Remove.
2188
2189 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2190
2191 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2192 (decimal_to_string): Return std::string object.
2193 (decimal_from_string): Accept std::string object. Return bool.
2194 (decimal_from_integral, decimal_from_doublest): Remove.
2195 (decimal_from_longest): Add prototype.
2196 (decimal_from_ulongest): Likewise.
2197 (decimal_to_longest): Likewise.
2198 (decimal_from_doublest): Likewise.
2199 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2200 (MAX_DECIMAL_STRING): Move here.
2201 (decimal_to_string): Return std::string object.
2202 (decimal_from_string): Accept std::string object. Return bool.
2203 (decimal_from_integral): Remove, replace by ...
2204 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2205 (decimal_to_longest): New function.
2206 (decimal_from_floating): Remove, replace by ...
2207 (decimal_from_doublest): ... this new function.
2208 (decimal_to_doublest): Update to new decimal_to_string interface.
2209
2210 * value.c (unpack_long): Use decimal_to_longest.
2211 * valops.c (value_cast): Use decimal_from_doublest instead of
2212 decimal_from_floating. Use decimal_from_[u]longest isntead of
2213 decimal_from_integral.
2214 * valarith.c (value_args_as_decimal): Likewise.
2215 * valprint.c (print_decimal_floating): Update to new
2216 decimal_to_string interface.
2217 * printcmd.c (printf_decfloat): Likewise.
2218 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2219
2220 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2221
2222 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2223 * gdbtypes.c: Include "floatformat.h".
2224 * value.c: Likewise.
2225 * m68k-tdep.c: Likewise.
2226
2227 * findvar.c: Do not include "floatformat.h".
2228 * amd64-darwin-tdep.c: Likewise.
2229 * arm-linux-tdep.c: Likewise.
2230 * i386-darwin-tdep.c: Likewise.
2231 * i387-tdep.c: Likewise.
2232 * m68k-linux-tdep.c: Likewise.
2233 * mep-tdep.c: Likewise.
2234 * mips-tdep.c: Likewise.
2235 * nios2-tdep.c: Likewise.
2236 * s390-linux-tdep.c: Likewise.
2237 * sparc-obsd-tdep.c: Likewise.
2238 * sparc-tdep.c: Likewise.
2239 * sparc64-tdep.c: Likewise.
2240 * spu-tdep.c: Likewise.
2241 * tic6x-tdep.c: Likewise.
2242 * tilegx-tdep.c: Likewise.
2243 * vax-tdep.c: Likewise.
2244 * xstormy16-tdep.c: Likewise.
2245 * xtensa-tdep.c: Likewise.
2246
2247 * top.c: Do not include "doublest.h".
2248 * aarch64-tdep.c: Likewise.
2249 * alpha-tdep.c: Likewise.
2250 * arm-linux-tdep.c: Likewise.
2251 * m68k-linux-tdep.c: Likewise.
2252 * tilegx-tdep.c: Likewise.
2253 * xstormy16-tdep.c: Likewise.
2254
2255 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2256
2257 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2258 (mipsn32_fbsd_sigframe): Define.
2259 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2260 for FreeBSD/mipsn32.
2261
2262 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2263
2264 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2265 AT_HWCAP.
2266
2267 2017-10-05 Tristan Gingold <tgingold@free.fr>
2268
2269 * MAINTAINERS (Misc): Update my email address.
2270
2271 2017-10-04 Pedro Alves <palves@redhat.com>
2272
2273 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2274 it instead of target_gdbarch.
2275 (get_remote_state, get_remote_packet_size): Adjust
2276 get_remote_arch_state calls, passing down target_gdbarch
2277 explicitly.
2278 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2279 'gdbarch' and use it instead of target_gdbarch.
2280 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2281 passing down target_gdbarch explicitly.
2282 (struct stop_reply) <arch>: New field.
2283 (remote_parse_stop_reply): Use the stopped thread's architecture,
2284 not the current inferior's. Save the architecture in the
2285 stop_reply.
2286 (process_stop_reply): Use the stop reply's architecture.
2287 (process_g_packet, remote_fetch_registers)
2288 (remote_prepare_to_store, store_registers_using_G)
2289 (remote_store_registers): Adjust get_remote_arch_state calls,
2290 using the regcache's architecture.
2291 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2292 passing down target_gdbarch explicitly.
2293 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2294 beneath instead of calling target_gdbarch.
2295 * target.c (default_thread_architecture): Use the specified
2296 inferior's architecture, instead of the current inferior's
2297 architecture (via target_gdbarch).
2298
2299 2017-10-04 Pedro Alves <palves@redhat.com>
2300
2301 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2302 case.
2303 (regcache_print): Handle !target_has_registers here instead.
2304
2305 2017-10-04 Pedro Alves <palves@redhat.com>
2306
2307 * frame.c (create_test_frame): Delete.
2308 * frame.h (create_test_frame): Delete.
2309 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2310 (class regcache_test): Delete.
2311 (test_target_has_registers, test_target_has_stack)
2312 (test_target_has_memory, test_target_prepare_to_store)
2313 (test_target_store_registers): New functions.
2314 (test_target_ops): New class.
2315 (register_to_value_test): Error out if there's already a
2316 process_stratum (or higher) target pushed. Create a fuller mock
2317 environment, with mock target_ops, inferior, address space, thread
2318 and inferior_ptid.
2319 * progspace.c (struct address_space): Move to ...
2320 * progspace.h (struct address_space): ... here.
2321 * regcache.h (regcache::~regcache, regcache::raw_write)
2322 [GDB_SELF_TEST]: No longer virtual.
2323
2324 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2325
2326 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2327
2328 2017-10-04 Pedro Alves <palves@redhat.com>
2329
2330 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2331 out of 'between TRY and CATCH'.
2332
2333 2017-10-04 Pedro Alves <palves@redhat.com>
2334
2335 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2336 * common/common-exceptions.h (TRY): Open an outermost scope.
2337 Expand intro comment.
2338 (CATCH): Reindent.
2339 (END_CATCH): Close the outermost scope.
2340 * completer.c (complete_line_internal): Add missing END_CATCH.
2341
2342 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2343
2344 * NEWS (Changes since GDB 8.0): Add entry about new
2345 'set-cwd-on-gdbserver' feature.
2346 (New remote packets): Add entry for QSetWorkingDir.
2347 * common/common-inferior.h (set_inferior_cwd): New prototype.
2348 * infcmd.c (set_inferior_cwd): Remove "static".
2349 (show_cwd_command): Expand text to include remote debugging.
2350 * remote.c: Add PACKET_QSetWorkingDir.
2351 (remote_protocol_features) <QSetWorkingDir>: New entry for
2352 PACKET_QSetWorkingDir.
2353 (extended_remote_set_inferior_cwd): New function.
2354 (extended_remote_create_inferior): Call
2355 "extended_remote_set_inferior_cwd".
2356 (_initialize_remote): Call "add_packet_config_cmd" for
2357 QSetWorkingDir.
2358
2359 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2360
2361 * NEWS (New commands): Mention "set/show cwd".
2362 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2363 "cd" command's help text.
2364 * common/common-inferior.h (get_inferior_cwd): New prototype.
2365 * infcmd.c (inferior_cwd_scratch): New global variable.
2366 (set_inferior_cwd): New function.
2367 (get_inferior_cwd): Likewise.
2368 (set_cwd_command): Likewise.
2369 (show_cwd_command): Likewise.
2370 (_initialize_infcmd): Add "set/show cwd" commands.
2371 * inferior.h (class inferior) <cwd>: New field.
2372 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2373 (fork_inferior): Change inferior's cwd before its execution.
2374 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2375 to CreateProcess.
2376
2377 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2378
2379 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2380 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2381 (COMMON_OBS): Add gdb_tilde_expand.o.
2382 * common/gdb_tilde_expand.c: New file.
2383 * common/gdb_tilde_expand.h: Likewise.
2384
2385 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2386
2387 * gdbarch.sh (objfile): Remove duplicate declaration.
2388 * gdbarch.h: Regenerate.
2389
2390 2017-10-03 Tom Tromey <tom@tromey.com>
2391
2392 * utils.c (internal_vproblem): Use string_vprintf.
2393
2394 2017-10-03 Tom Tromey <tom@tromey.com>
2395
2396 * printcmd.c (info_symbol_command): Use std::string.
2397
2398 2017-10-03 Tom Tromey <tom@tromey.com>
2399
2400 * top.c (gdb_safe_append_history): Use std::string.
2401
2402 2017-10-03 Tom Tromey <tom@tromey.com>
2403
2404 * event-top.c (stdin_event_handler): Update.
2405 * main.c (captured_main_1): Update.
2406 * top.h (make_delete_ui_cleanup): Remove.
2407 (struct ui): Add constructor and destructor.
2408 (new_ui, delete_ui): Remove.
2409 * top.c (make_delete_ui_cleanup): Remove.
2410 (new_ui_command): Use std::unique_ptr.
2411 (delete_ui_cleanup): Remove.
2412 (ui::ui): Rename from new_ui. Update.
2413 (free_ui): Remove.
2414 (ui::~ui): Rename from delete_ui. Update.
2415
2416 2017-10-03 Tom Tromey <tom@tromey.com>
2417
2418 * symfile.c (load_progress): Use gdb::byte_vector.
2419
2420 2017-10-03 Tom Tromey <tom@tromey.com>
2421
2422 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2423 declaration.
2424 * printcmd.c (x_command): Remove unused declaration.
2425 * symfile.c (symbol_file_command): Remove unused declaration.
2426
2427 2017-10-03 Tom Tromey <tom@tromey.com>
2428
2429 * utils.c (internal_vproblem): Use std::string.
2430 (defaulted_query): Likewise.
2431
2432 2017-10-03 Tom Tromey <tom@tromey.com>
2433
2434 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2435 * top.c (execute_command_to_string): Update.
2436 * utils.c (make_cleanup_restore_page_info): Remove.
2437 (do_restore_page_info_cleanup): Remove.
2438 (set_batch_flag_and_restore_page_info):
2439 New.
2440 (make_cleanup_restore_page_info): Remove.
2441 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2442 (~set_batch_flag_and_restore_page_info): New
2443 (make_cleanup_restore_uinteger): Remove.
2444 (make_cleanup_restore_integer): Remove.
2445 (struct restore_integer_closure): Remove.
2446 (restore_integer): Remove.
2447 * utils.h (struct set_batch_flag_and_restore_page_info): New
2448 class.
2449 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2450 (make_cleanup_restore_page_info): Remove.
2451 (make_cleanup_restore_uinteger) Remove.
2452 (make_cleanup_restore_integer) Remove.
2453
2454 2017-10-03 Tom Tromey <tom@tromey.com>
2455
2456 * record-full.h (record_full_gdb_operation_disable_set): Return
2457 scoped_restore_tmpl<int>.
2458 * infrun.c (adjust_pc_after_break): Update.
2459 (handle_signal_stop): Update.
2460 * record-full.c (record_full_gdb_operation_disable_set): Return
2461 scoped_restore_tmpl<int>.
2462 (record_full_wait_1, record_full_insert_breakpoint)
2463 (record_full_remove_breakpoint, record_full_save)
2464 (record_full_goto_insn): Update.
2465
2466 2017-10-02 Tom Tromey <tom@tromey.com>
2467
2468 PR rust/22236:
2469 * rust-lang.c (rust_val_print_str): New function.
2470 (val_print_struct): Call it.
2471 (rust_subscript): Preserve name of slice type.
2472
2473 2017-10-02 Tom Tromey <tom@tromey.com>
2474
2475 * rust-lang.c (rust_subscript): Handle slices in
2476 EVAL_AVOID_SIDE_EFFECTS case.
2477
2478 2017-10-02 Tom Tromey <tom@tromey.com>
2479
2480 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2481
2482 2017-10-02 Tom Tromey <tom@tromey.com>
2483
2484 * rust-lang.h (rust_slice_type): Add "extern".
2485
2486 2017-10-02 Tom Tromey <tom@tromey.com>
2487 Pedro Alves <palves@redhat.com>
2488
2489 * ada-lang.h (ada_exc_info::operator<): Make const.
2490 (ada_exc_info::operator==): Make const.
2491 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2492 Make const.
2493
2494 2017-09-29 Tom Tromey <tom@tromey.com>
2495
2496 * target.c (read_whatever_is_readable): Change type of "result".
2497 Update.
2498 (free_memory_read_result_vector): Remove.
2499 (read_memory_robust): Change return type. Update.
2500 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2501 bin2hex, std::string.
2502 * target.h (memory_read_result_s): Remove typedef.
2503 (free_memory_read_result_vector): Remove.
2504 (read_memory_robust): Return std::vector.
2505
2506 2017-09-29 Tom Tromey <tom@tromey.com>
2507
2508 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2509
2510 2017-09-29 Tom Tromey <tom@tromey.com>
2511
2512 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2513 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2514 operator< and operator==.
2515 (ada_exceptions_list): Return a std::vector.
2516 * ada-lang.c (ada_exc_info::operator<): Rename from
2517 compare_ada_exception_info.
2518 (ada_exc_info::operator==): New.
2519 (sort_remove_dups_ada_exceptions_list): Change type of
2520 "exceptions".
2521 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2522 (ada_add_global_exceptions): Likewise.
2523 (ada_exceptions_list_1): Return a std::vector.
2524 (ada_exceptions_list): Likewise.
2525
2526 2017-09-29 Tom Tromey <tom@tromey.com>
2527
2528 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2529 'std::set *'.
2530 (print_one_inferior): Update.
2531 (free_vector_of_ints): Remove.
2532 (list_available_thread_groups): Change "ids" to std::set.
2533 (mi_cmd_list_thread_groups): Update.
2534 (struct collect_cores_data) <core>: Now a std::set.
2535 (collect_cores): Update.
2536 (unique): Remove.
2537 (print_one_inferior): Update.
2538
2539 2017-09-29 Tom Tromey <tom@tromey.com>
2540
2541 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2542 (mi_execute_async_cli_command): Likewise.
2543 (mi_cmd_trace_frame_collected): Use field_fmt.
2544
2545 2017-09-29 Tom Tromey <tom@tromey.com>
2546
2547 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2548 gdb::byte_vector.
2549
2550 2017-09-29 Tom Tromey <tom@tromey.com>
2551
2552 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2553
2554 2017-09-29 Tom Tromey <tom@tromey.com>
2555
2556 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2557
2558 2017-09-29 Tom Tromey <tom@tromey.com>
2559
2560 * varobj.h (varobj_gen_name): Return std::string.
2561 * varobj.c (varobj_gen_name): Return std::string.
2562 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2563 (mi_cmd_var_delete): Don't copy "name".
2564
2565 2017-09-29 Tom Tromey <tom@tromey.com>
2566
2567 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2568 (mi_cmd_break_insert_1): Update.
2569
2570 2017-09-29 Tom Tromey <tom@tromey.com>
2571
2572 * target.h (make_scoped_defer_target_commit_resume): Update.
2573 * target.c (make_scoped_defer_target_commit_resume): Rename from
2574 make_cleanup_defer_target_commit_resume. Return a
2575 scoped_restore.
2576 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2577
2578 2017-09-29 Tom Tromey <tom@tromey.com>
2579
2580 * main.c (captured_main_1): Remove unused declaration.
2581 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2582
2583 2017-09-29 Tom Tromey <tom@tromey.com>
2584
2585 * symtab.c (search_symbols): Remove unused outer cleanup.
2586 (make_source_files_completion_list): Remove unused declaration.
2587
2588 2017-09-29 Tom Tromey <tom@tromey.com>
2589
2590 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2591
2592 2017-09-29 Tom Tromey <tom@tromey.com>
2593
2594 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2595 gdb::byte_vector.
2596
2597 2017-09-29 Tom Tromey <tom@tromey.com>
2598
2599 * complaints.c (vcomplaint): Use std::string.
2600
2601 2017-09-29 Tom Tromey <tom@tromey.com>
2602
2603 * tracepoint.c (trace_variable_command): Use std::string.
2604 (encode_actions_1): Remove unused declarations.
2605 (create_tsv_from_upload): Use std::string.
2606
2607 2017-09-29 Tom Tromey <tom@tromey.com>
2608
2609 * cp-support.c (gdb_demangle): Use std::string.
2610
2611 2017-09-29 Tom Tromey <tom@tromey.com>
2612
2613 * stack.c (parse_frame_specification): Use std::string
2614 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2615
2616 2017-09-29 Tom Tromey <tom@tromey.com>
2617
2618 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2619
2620 2017-09-29 Tom Tromey <tom@tromey.com>
2621
2622 * utils.c (vfprintf_maybe_filtered): Use std::string.
2623 (vfprintf_unfiltered): Likewise.
2624
2625 2017-09-29 Tom Tromey <tom@tromey.com>
2626
2627 * event-top.c (top_level_prompt): Return std::string.
2628 (display_gdb_prompt): Update.
2629
2630 2017-09-29 Tom Tromey <tom@tromey.com>
2631
2632 * unittests/common-utils-selftests.c (format): New function.
2633 (string_vprintf_tests): New function.
2634 (_initialize_common_utils_selftests): Register new tests.
2635 * common/common-utils.c (string_vprintf): New function.
2636 * common/common-utils.h (string_vprintf): Declare.
2637
2638 2017-09-29 Pedro Alves <palves@redhat.com>
2639
2640 * common/rsp-low.c (unpack_varlen_hex): Constify.
2641 * common/rsp-low.h (unpack_varlen_hex): Constify.
2642 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2643 Constify.
2644 * remote.c (remote_set_permissions, read_ptid)
2645 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2646 (remote_static_tracepoint_marker_at)
2647 (remote_static_tracepoint_markers_by_strid)
2648 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2649 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2650 (parse_tracepoint_definition, parse_tsv_definition)
2651 (parse_static_tracepoint_marker_definition): Constify.
2652 * tracepoint.h (parse_static_tracepoint_marker_definition)
2653 (parse_trace_status, parse_tracepoint_status)
2654 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2655
2656 2017-09-29 Pedro Alves <palves@redhat.com>
2657
2658 * remote.c (target_buf, target_buf_size): Delete.
2659 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2660 Use the connection's packet buffer instead.
2661 All callers adjusted.
2662 (_initialize_remote): Remove references to target_buf and
2663 target_buf_size.
2664
2665 2017-09-28 Pedro Alves <palves@redhat.com>
2666
2667 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2668 unittests/common-utils-selftests.c.
2669 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2670 (COMMON_OBS): Remove utils-selftests.o.
2671 * utils-selftests.c: Move to ...
2672 * unittests/common-utils-selftests.c: ... here and rename self
2673 test to "string_printf".
2674
2675 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2676
2677 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2678 having NULL cus or tus.
2679
2680 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2681
2682 * arm-tdep.c: (convert_from_extended): Remove.
2683 (convert_to_extended): Likewise.
2684 (arm_extract_return_value): Use convert_typed_floating.
2685 (arm_store_return_value): Likewise.
2686
2687 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2688 * sh-tdep.c: Do not include "floatformat.h".
2689 (sh_littlebyte_bigword_type): New function.
2690 (sh_register_convert_to_virtual): Use convert_typed_floating.
2691 (sh_register_convert_to_raw): Likewise.
2692 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2693 (sh64_littlebyte_bigword_type): New function.
2694 (sh64_extract_return_value): Use convert_typed_floating.
2695 (sh64_register_convert_to_virtual): Likewise.
2696 (sh64_register_convert_to_raw): Likewise.
2697
2698 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2699
2700 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2701 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2702
2703 * gdbtypes.h (union type_specific): Make field floatformat hold
2704 just a single struct floatformat, not an array.
2705 (floatformat_from_type): Move here.
2706 * gdbtypes.c (floatformat_from_type): Move here. Update to
2707 changed TYPE_FLOATFORMAT definition.
2708 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2709 (recursive_dump_type): Likewise.
2710 (init_float_type): Install correct floatformat for byte order.
2711 (arch_float_type): Likewise.
2712
2713 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2714
2715 * gdbtypes.c (init_type): Change incoming argument from
2716 length-in-bytes to length-in-bits. Assert length is a
2717 multiple of TARGET_CHAR_BITS.
2718 (arch_type, arch_flags_type): Likewise.
2719 (init_integer_type): Update call to init_type.
2720 (init_character_type): Likewise.
2721 (init_boolean_type): Likewise.
2722 (init_float_type): Likewise.
2723 (init_decfloat_type): Likewise.
2724 (init_complex_type): Likewise.
2725 (init_pointer_type): Likewise.
2726 (objfile_type): Likewise.
2727 (arch_integer_type): Update call to arch_type.
2728 (arch_character_type): Likewise.
2729 (arch_boolean_type): Likewise.
2730 (arch_float_type): Likewise.
2731 (arch_decfloat_type): Likewise.
2732 (arch_complex_type): Likewise.
2733 (arch_pointer_type): Likewise.
2734 (gdbtypes_post_init): Likewise.
2735
2736 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2737 (read_base_type): Likewise.
2738 * mdebugread.c (basic_type): Likewise.
2739 * stabsread.c (dbx_init_float_type): Likewise.
2740 (rs6000_builtin_type): Likewise.
2741 (read_range_type): Likewise. Also, fix call to init_integer_type
2742 with erroneous length argument.
2743
2744 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2745 * d-lang.c (build_d_types): Likewise.
2746 * f-lang.c (build_fortran_types): Likewise.
2747 * go-lang.c (build_go_types): Likewise.
2748 * opencl-lang.c (build_opencl_types): Likewise.
2749 * jit.c (finalize_symtab): Likewise.
2750 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2751 (build_std_type_info_type): Likewise.
2752 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2753 update call to arch_flags_type.
2754
2755 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2756 arch_type.
2757 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2758 * windows-tdep.c (windows_get_tlb_type): Likewise.
2759
2760 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2761 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2762 * m32c-tdep.c (make_types): Likewise.
2763 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2764 (rl78_psw_type): Update call to arch_flags_type.
2765 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2766 * rx-tdep.c (rx_psw_type): Likewise.
2767 (rx_fpsw_type): Likewise.
2768 * sparc-tdep.c (sparc_psr_type): Likewise.
2769 (sparc_fsr_type): Likewise.
2770 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2771 (sparc64_ccr_type): Likewise.
2772 (sparc64_fsr_type): Likewise.
2773 (sparc64_fprs_type): Likewise.
2774
2775 2017-09-27 Tom Tromey <tom@tromey.com>
2776
2777 * findcmd.c (find_command): Constify.
2778
2779 2017-09-27 Tom Tromey <tom@tromey.com>
2780
2781 * ada-tasks.c (task_command_1, task_command): Constify.
2782
2783 2017-09-27 Tom Tromey <tom@tromey.com>
2784
2785 * symtab.c (maintenance_print_symbol_cache)
2786 (maintenance_flush_symbol_cache)
2787 (maintenance_print_symbol_cache_statistics): Constify.
2788
2789 2017-09-27 Tom Tromey <tom@tromey.com>
2790
2791 * inferior.c (detach_inferior_command, kill_inferior_command)
2792 (inferior_command): Constify.
2793
2794 2017-09-27 Tom Tromey <tom@tromey.com>
2795
2796 * regcache.c (regcache_print, maintenance_print_registers)
2797 (maintenance_print_raw_registers)
2798 (maintenance_print_cooked_registers)
2799 (maintenance_print_register_groups)
2800 (maintenance_print_remote_registers): Constify.
2801
2802 2017-09-27 Tom Tromey <tom@tromey.com>
2803
2804 * printcmd.c (map_display_numbers, undisplay_command)
2805 (enable_disable_display_command, enable_display_command)
2806 (disable_display_command): Constify.
2807
2808 2017-09-27 Tom Tromey <tom@tromey.com>
2809
2810 * breakpoint.h (delete_command): Don't declare.
2811 * breakpoint.c (delete_command, enable_once_command)
2812 (enable_count_command, enable_delete_command, breakpoint_1)
2813 (maintenance_info_breakpoints, stopin_command, stopat_command)
2814 (delete_command, delete_trace_command, save_breakpoints)
2815 (save_breakpoints_command, save_tracepoints_command): Constify.
2816
2817 2017-09-27 Tom Tromey <tom@tromey.com>
2818
2819 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2820 (skip_ws, extract_identifier, macro_define_command)
2821 (macro_undef_command, macro_list_command): Constify.
2822
2823 2017-09-27 Tom Tromey <tom@tromey.com>
2824
2825 * infcmd.c (environment_info, set_environment_command)
2826 (unset_environment_command, path_info, info_proc_cmd_1)
2827 (info_proc_cmd_mappings, info_proc_cmd_stat)
2828 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2829 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2830
2831 2017-09-27 Tom Tromey <tom@tromey.com>
2832
2833 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2834 Constify.
2835
2836 2017-09-27 Tom Tromey <tom@tromey.com>
2837
2838 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2839
2840 2017-09-27 Tom Tromey <tom@tromey.com>
2841
2842 * demangle.c (demangle_command): Constify.
2843
2844 2017-09-27 Tom Tromey <tom@tromey.com>
2845
2846 * progspace.c (maintenance_info_program_spaces_command):
2847 Constify.
2848
2849 2017-09-27 Tom Tromey <tom@tromey.com>
2850
2851 * compile/compile.c (check_raw_argument, compile_file_command)
2852 (compile_code_command, compile_print_command): Constify.
2853
2854 2017-09-27 Tom Tromey <tom@tromey.com>
2855
2856 * reggroups.c (maintenance_print_reggroups): Constify.
2857
2858 2017-09-27 Tom Tromey <tom@tromey.com>
2859
2860 * dwarf2read.c (save_gdb_index_command): Constify.
2861
2862 2017-09-27 Tom Tromey <tom@tromey.com>
2863
2864 * stap-probe.c (info_probes_stap_command): Constify.
2865
2866 2017-09-27 Tom Tromey <tom@tromey.com>
2867
2868 * fork-child.c (unset_exec_wrapper_command): Constify.
2869
2870 2017-09-27 Tom Tromey <tom@tromey.com>
2871
2872 * btrace.c (get_uint, get_context_size, no_chunk)
2873 (maint_btrace_packet_history_cmd)
2874 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2875 (maint_info_btrace_cmd): Constify.
2876
2877 2017-09-27 Tom Tromey <tom@tromey.com>
2878
2879 * reverse.c (delete_bookmark_command): Constify.
2880
2881 2017-09-27 Tom Tromey <tom@tromey.com>
2882
2883 * remote.c (set_memory_packet_size)
2884 (set_memory_write_packet_size, show_memory_write_packet_size)
2885 (set_memory_read_packet_size, show_memory_read_packet_size)
2886 (compare_sections_command, packet_command, remote_put_command)
2887 (remote_get_command, remote_delete_command): Constify.
2888
2889 2017-09-27 Tom Tromey <tom@tromey.com>
2890
2891 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2892 (set_mipsfpu_double_command, set_mipsfpu_none_command)
2893 (set_mipsfpu_auto_command): Constify.
2894
2895 2017-09-27 Tom Tromey <tom@tromey.com>
2896
2897 * cli/cli-cmds.h (cd_command): Constify.
2898 * cli/cli-cmds.c (cd_command): Constify.
2899
2900 2017-09-27 Tom Tromey <tom@tromey.com>
2901
2902 * thread.c (thread_name_command, thread_find_command): Constify.
2903
2904 2017-09-27 Tom Tromey <tom@tromey.com>
2905
2906 * probe.c (enable_probes_command, disable_probes_command):
2907 Constify.
2908
2909 2017-09-27 Tom Tromey <tom@tromey.com>
2910
2911 * symfile.c (symbol_file_command): Constify.
2912 * gdbcore.h (deprecated_file_changed_hook): Constify.
2913 * exec.c (deprecated_file_changed_hook, exec_file_command)
2914 (file_command): Constify.
2915 * defs.h (symbol_file_command): Constify.
2916
2917 2017-09-27 Tom Tromey <tom@tromey.com>
2918
2919 * remote-fileio.c (set_system_call_allowed)
2920 (show_system_call_allowed): Constify.
2921
2922 2017-09-27 Tom Tromey <tom@tromey.com>
2923
2924 * tracepoint.c (delete_trace_variable_command)
2925 (tfind_end_command, tfind_start_command, tfind_pc_command)
2926 (tfind_tracepoint_command, tfind_line_command)
2927 (tfind_range_command, tfind_outside_command): Constify.
2928
2929 2017-09-27 Tom Tromey <tom@tromey.com>
2930
2931 * ax-gdb.c (maint_agent_printf_command, agent_command)
2932 (agent_eval_command): Constify.
2933
2934 2017-09-27 Tom Tromey <tom@tromey.com>
2935
2936 * tracepoint.c (info_scope_command): Constify.
2937 * python/python.c (gdbpy_decode_line): Constify.
2938 * python/py-breakpoint.c (bppy_init): Constify.
2939 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2940 * location.h: (new_linespec_location)
2941 (string_to_event_location_basic, string_to_event_location):
2942 Constify.
2943 * location.c (new_linespec_location)
2944 (string_to_event_location_basic, string_to_event_location):
2945 Constify.
2946 * linespec.h (decode_line_with_current_source)
2947 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2948 * linespec.c (linespec_lex_to_end)
2949 (decode_line_with_current_source)
2950 (decode_line_with_last_displayed): Constify.
2951 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2952 Constify.
2953 * cli/cli-cmds.c (edit_command, list_command): Constify.
2954 * breakpoint.h (until_break_command, watch_command_wrapper)
2955 (awatch_command_wrapper, rwatch_command_wrapper)
2956 (init_ada_exception_breakpoint): Constify.
2957 * breakpoint.c (break_command_1, dprintf_command)
2958 (break_range_command, watch_command_wrapper)
2959 (rwatch_command_wrapper, awatch_command_wrapper)
2960 (until_break_command, init_ada_exception_breakpoint)
2961 (strace_marker_create_sals_from_location, trace_command)
2962 (ftrace_command, strace_command, struct tracepoint): Constify.
2963 * ax-gdb.c (agent_command_1): Constify.
2964 * ada-lang.c (ada_exception_sal): Constify.
2965
2966 2017-09-27 Tom Tromey <tom@tromey.com>
2967
2968 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2969 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2970 (get_context_size, no_chunk, get_insn_history_modifiers)
2971 (cmd_record_insn_history, get_call_history_modifiers)
2972 (cmd_record_call_history): Constify.
2973
2974 2017-09-27 Tom Tromey <tom@tromey.com>
2975
2976 * source.c (show_substitute_path_command)
2977 (unset_substitute_path_command, set_substitute_path_command):
2978 Constify.
2979
2980 2017-09-27 Tom Tromey <tom@tromey.com>
2981
2982 * typeprint.c (maintenance_print_type): Constify.
2983 * maint.c (maintenance_dump_me, maintenance_demangle)
2984 (maintenance_time_display, maintenance_info_sections)
2985 (maintenance_print_statistics, maintenance_deprecate)
2986 (maintenance_undeprecate): Constify.
2987 (maintenance_do_deprecate): Constify. Use std::string.
2988 (maintenance_selftest): Constify.
2989 * gdbtypes.h (maintenance_print_type): Constify.
2990
2991 2017-09-27 Tom Tromey <tom@tromey.com>
2992
2993 * hppa-tdep.c (unwind_command): Constify.
2994
2995 2017-09-27 Tom Tromey <tom@tromey.com>
2996
2997 * target-descriptions.c (unset_tdesc_filename_cmd)
2998 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2999 Constify.
3000
3001 2017-09-27 Tom Tromey <tom@tromey.com>
3002
3003 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3004
3005 2017-09-27 Tom Tromey <tom@tromey.com>
3006
3007 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3008
3009 2017-09-27 Tom Tromey <tom@tromey.com>
3010
3011 * tui/tui-regs.c (tui_reg_command): Constify.
3012
3013 2017-09-27 Tom Tromey <tom@tromey.com>
3014
3015 * skip.c (skip_file_command, skip_function_command)
3016 (skip_enable_command, skip_disable_command, skip_delete_command):
3017 Constify.
3018
3019 2017-09-27 Tom Tromey <tom@tromey.com>
3020
3021 * record-btrace.c (cmd_record_btrace_bts_start)
3022 (cmd_record_btrace_pt_start): Constify.
3023
3024 2017-09-27 Tom Tromey <tom@tromey.com>
3025
3026 * symmisc.c (maintenance_print_symbols)
3027 (maintenance_print_msymbols, maintenance_print_objfiles)
3028 (maintenance_info_symtabs, maintenance_check_symtabs)
3029 (maintenance_expand_symtabs, maintenance_info_line_tables):
3030 Constify.
3031
3032 2017-09-27 Tom Tromey <tom@tromey.com>
3033
3034 * top.c (new_ui_command): Constify.
3035
3036 2017-09-27 Tom Tromey <tom@tromey.com>
3037
3038 * symfile.c (add_symbol_file_command)
3039 (remove_symbol_file_command, list_overlays_command)
3040 (map_overlay_command, unmap_overlay_command)
3041 (overlay_auto_command, overlay_manual_command)
3042 (overlay_off_command, overlay_load_command): Constify.
3043
3044 2017-09-27 Tom Tromey <tom@tromey.com>
3045
3046 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3047 (info_spu_mailbox_command, info_spu_dma_command)
3048 (info_spu_proxydma_command): Constify.
3049
3050 2017-09-27 Tom Tromey <tom@tromey.com>
3051
3052 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3053
3054 2017-09-27 Tom Tromey <tom@tromey.com>
3055
3056 * cli/cli-script.c (user_defined_command): Constify.
3057
3058 2017-09-27 Tom Tromey <tom@tromey.com>
3059
3060 * cli/cli-dump.c (dump_memory_command, dump_value_command)
3061 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3062 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3063 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3064 (dump_binary_value, append_binary_memory, append_binary_value):
3065 Constify.
3066 (struct dump_context) <func>: Constify.
3067 (add_dump_command): Update.
3068
3069 2017-09-27 Tom Tromey <tom@tromey.com>
3070
3071 * cli/cli-cmds.c (show_version, show_configuration)
3072 (source_command, show_user): Constify.
3073
3074 2017-09-27 Tom Tromey <tom@tromey.com>
3075
3076 * target.c (maintenance_print_target_stack): Constify.
3077
3078 2017-09-27 Tom Tromey <tom@tromey.com>
3079
3080 * interps.c (interpreter_exec_cmd): Constify.
3081
3082 2017-09-27 Tom Tromey <tom@tromey.com>
3083
3084 * record-full.c (cmd_record_full_restore): Constify.
3085
3086 2017-09-27 Tom Tromey <tom@tromey.com>
3087
3088 * memattr.c (enable_mem_command, disable_mem_command)
3089 (delete_mem_command): Constify.
3090
3091 2017-09-27 Tom Tromey <tom@tromey.com>
3092
3093 * value.c (show_convenience): Constify.
3094
3095 2017-09-27 Tom Tromey <tom@tromey.com>
3096
3097 * gdbcore.h (core_file_command): Update.
3098 * corefile.c (core_file_command): Constify.
3099
3100 2017-09-27 Tom Tromey <tom@tromey.com>
3101
3102 * user-regs.c (maintenance_print_user_registers): Constify.
3103
3104 2017-09-27 Tom Tromey <tom@tromey.com>
3105
3106 * cp-namespace.c (maintenance_cplus_namespace): Constify.
3107
3108 2017-09-27 Tom Tromey <tom@tromey.com>
3109
3110 * cp-support.c (first_component_command): Constify.
3111
3112 2017-09-27 Tom Tromey <tom@tromey.com>
3113
3114 * psymtab.c (maintenance_print_psymbols)
3115 (maintenance_info_psymtabs, maintenance_check_psymtabs):
3116 Constify.
3117
3118 2017-09-27 Tom Tromey <tom@tromey.com>
3119
3120 * windows-tdep.c (display_tib): Constify.
3121
3122 2017-09-27 Tom Tromey <tom@tromey.com>
3123
3124 * linux-fork.c (delete_checkpoint_command)
3125 (detach_checkpoint_command): Constify.
3126
3127 2017-09-27 Tom Tromey <tom@tromey.com>
3128
3129 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3130
3131 2017-09-27 Tom Tromey <tom@tromey.com>
3132
3133 * arc-tdep.c (dump_arc_instruction_command): Constify.
3134
3135 2017-09-27 Tom Tromey <tom@tromey.com>
3136
3137 * valprint.c (set_radix, show_radix): Constify.
3138
3139 2017-09-27 Tom Tromey <tom@tromey.com>
3140
3141 * dtrace-probe.c (info_probes_dtrace_command): Constify.
3142
3143 2017-09-27 Tom Tromey <tom@tromey.com>
3144
3145 * command.h (not_just_help_class_command): Update.
3146 * cli/cli-decode.h (not_just_help_class_command): Update.
3147 * cli/cli-decode.c (not_just_help_class_command): Constify.
3148
3149 2017-09-27 Tom Tromey <tom@tromey.com>
3150
3151 * gdb_bfd.c (maintenance_info_bfds): Constify.
3152
3153 2017-09-27 Tom Tromey <tom@tromey.com>
3154
3155 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3156 overloads.
3157 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3158 (do_const_cfunc): New function.
3159 (cmd_cfunc_eq): New overload.
3160 (cli_user_command_p): Check do_const_cfunc.
3161 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3162 const_cfunc.
3163 * command.h (add_cmd): Add const overload and no-function
3164 overload.
3165 (set_cmd_cfunc): Add const overload.
3166 (cmd_const_cfunc_ftype): Declare.
3167 (cmd_cfunc_eq): Add const overload.
3168 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3169 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3170 overload.
3171
3172 2017-09-27 Tom Tromey <tom@tromey.com>
3173
3174 * macroexp.c (get_next_token_for_substitution): New function.
3175 (substitute_args): Call it. Check for __VA_OPT__.
3176
3177 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3178 Pedro Alves <palves@redhat.com>
3179
3180 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3181 producer_is_icc_lt_14.
3182 (producer_is_icc_lt_14): New function.
3183 (check_producer): Add code for checking version of ICC.
3184 (producer_is_icc): Move to producer.c.
3185 (read_structure_type): Restrict ICC workaround to ICC<14.
3186 * producer.c: Include selftest.h.
3187 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3188 New functions.
3189 * producer.h (producer_is_icc): New declaration.
3190
3191 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3192
3193 * Makefile.in (SFILES): Add producer.c.
3194 (COMMON_OBS): Add producer.o
3195 * amd64-tdep.c (producer.h): Add new include.
3196 * dwarf2read.c (producer.h): Add new include.
3197 * producer.c: New file.
3198 * producer.h: New file.
3199 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3200 producer.c.
3201 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3202 producer.h.
3203
3204 2017-09-26 Matthias Klose <doko@ubuntu.com>
3205
3206 * configure.ac: Search ncursesw before ncurses.
3207 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3208 * gdb_curses.h: Include <ncursesw/ncurses.h>
3209 * config.in, configure: Regenerate.
3210
3211 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3212
3213 PR gdb/22185
3214 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3215 obsolete.
3216 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3217 Remove i386sol2 support.
3218 * configure.nat <i386sol2>: Remove.
3219 <sol2-64>: Fold into ...
3220 <sol2>: ... this.
3221 Move common settings to default section.
3222 Add sol-thread.o.
3223 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3224 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3225 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3226 <i[34567]86-*-solaris*>: Remove.
3227 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3228
3229 * configure.ac: Remove wctype in libw check.
3230 (_MSE_INT_H): Don't define on Solaris 7-9.
3231 <solaris*>: Remove libthread_db.so.1 check.
3232 * configure: Regenerate.
3233 * config.in: Regenerate.
3234
3235 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3236 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3237 (gdb_ps_size_t): Remove.
3238 Use base types in users.
3239 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3240
3241 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3242
3243 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3244
3245 PR build/22206
3246 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3247 (adi_is_addr_mapped): Likewise.
3248 (PSR_ICC): Don't redefine.
3249 (PSR_IMPL): Likewise.
3250
3251 2017-09-25 Tom Tromey <tom@tromey.com>
3252
3253 * regcache.c (regcache::dump): Use string_printf.
3254
3255 2017-09-25 Tom Tromey <tom@tromey.com>
3256
3257 * regcache.c (class regcache_invalidator): New.
3258 (struct register_to_invalidate): Remove.
3259 (make_cleanup_regcache_invalidate): Remove.
3260 (regcache::raw_write): Use regcache_invalidator.
3261
3262 2017-09-25 Tom Tromey <tom@tromey.com>
3263
3264 * spu-tdep.c (spu2ppu_sniffer): Update.
3265 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3266 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3267 Remove.
3268 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3269 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3270 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3271 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3272 (frame_pop): Update.
3273
3274 2017-09-25 Tom Tromey <tom@tromey.com>
3275
3276 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3277 * regcache.h (regcache_xfree): Don't declare.
3278 * regcache.c (regcache_xfree): Remove.
3279 (do_regcache_xfree): Use delete.
3280 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3281 * linux-fork.c (free_fork): Use delete.
3282 (fork_save_infrun_state): Likewise.
3283 * jit.c (jit_dealloc_cache): Use delete.
3284 * infrun.c (discard_infcall_suspend_state): Use delete.
3285
3286 2017-09-25 Tom Tromey <tom@tromey.com>
3287
3288 * regcache.h (regcache_xmalloc): Don't declare.
3289 (regcache_raw_set_cached_value): Update comment.
3290 * regcache.c (regcache_xmalloc): Remove.
3291 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3292 * jit.c (jit_frame_sniffer): Use new.
3293 * frame.c (frame_save_as_regcache): Use new.
3294
3295 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3296
3297 * NEWS: Advertise support for guarded-storage registers on IBM z.
3298
3299 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3300
3301 * s390-linux-nat.c (have_regset_gs): New static variable.
3302 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3303 control block and guarded-storage broadcast control regsets.
3304 (s390_read_description): Detect whether the target has
3305 guarded-storage support, return appropriate tdesc.
3306 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3307 (features/s390x-gs-linux64.c): Likewise.
3308 (struct gdbarch_tdep) <have_gs>: New field.
3309 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3310 (s390_gsbc_regset): New variables.
3311 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3312 and s390_gsbc_regset, if applicable.
3313 (s390_core_read_description): Check whether core file was from a
3314 target with guarded-storage support; include appropriate regsets.
3315 (s390_gdbarch_init): Add registers for guarded-storage support.
3316 (_initialize_s390_tdep): Initialize new target descriptions that
3317 include registers for guarded-storage support.
3318 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3319 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3320 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3321 (S390_NUM_REGS): Adjust macro definition.
3322 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3323 (tdesc_s390x_gs_linux64): New declarations.
3324
3325 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3326
3327 * features/s390-gs-linux64.xml: New file.
3328 * features/s390-gs.xml: New file.
3329 * features/s390-gsbc.xml: New file.
3330 * features/s390x-gs-linux64.xml: New file.
3331 * features/Makefile (WHICH): Add s390-gs-linux64 and
3332 s390x-gs-linux64.
3333 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3334 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3335 * features/s390-gs-linux64.c: New generated file.
3336 * features/s390x-gs-linux64.c: New file.
3337 * regformats/s390-gs-linux64.dat: New file.
3338 * regformats/s390x-gs-linux64.dat: New file.
3339
3340 2017-09-23 Tom Tromey <tom@tromey.com>
3341
3342 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3343
3344 2017-09-22 Tom Tromey <tom@tromey.com>
3345
3346 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3347 type to scoped_restore_tmpl.
3348 <scoped_input_handler>: Initialize m_quit_handler directly.
3349
3350 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3351
3352 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3353 (cd_command): Likewise. Free "current_directory" before
3354 assigning to it.
3355 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3356 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3357 * top.c (gdb_dirbuf): Remove global declaration.
3358 * top.h (gdb_dirbuf): Likewise.
3359
3360 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3361
3362 * gnulib/aclocal.m4: Regenerate.
3363 * gnulib/config.in: Regenerate.
3364 * gnulib/configure: Regenerate.
3365 * gnulib/import/Makefile.am: Regenerate.
3366 * gnulib/import/Makefile.in: Regenerate.
3367 * gnulib/import/assure.h: New file.
3368 * gnulib/import/at-func.c: Likewise
3369 * gnulib/import/chdir-long.c: New file.
3370 * gnulib/import/chdir-long.h: New file.
3371 * gnulib/import/cloexec.c: New file.
3372 * gnulib/import/cloexec.h: New file.
3373 * gnulib/import/close.c: New file.
3374 * gnulib/import/closedir.c: New file.
3375 * gnulib/import/dirent-private.h: New file.
3376 * gnulib/import/dup-safer.c: New file.
3377 * gnulib/import/dup.c: New file.
3378 * gnulib/import/dup2.c: New file.
3379 * gnulib/import/error.c: New file.
3380 * gnulib/import/error.h: New file.
3381 * gnulib/import/exitfail.c: New file.
3382 * gnulib/import/exitfail.h: New file.
3383 * gnulib/import/fchdir.c: New file.
3384 * gnulib/import/fcntl.c: New file.
3385 * gnulib/import/fcntl.in.h: New file.
3386 * gnulib/import/fd-hook.c: New file.
3387 * gnulib/import/fd-hook.h: New file.
3388 * gnulib/import/fd-safer.c: New file.
3389 * gnulib/import/fdopendir.c: New file.
3390 * gnulib/import/filename.h: New file.
3391 * gnulib/import/filenamecat-lgpl.c: New file.
3392 * gnulib/import/filenamecat.h: New file.
3393 * gnulib/import/fstat.c: New file.
3394 * gnulib/import/fstatat.c: New file.
3395 * gnulib/import/getcwd-lgpl.c: New file.
3396 * gnulib/import/getcwd.c: New file.
3397 * gnulib/import/getdtablesize.c: New file.
3398 * gnulib/import/getlogin_r.c: New file.
3399 * gnulib/import/getprogname.c: New file.
3400 * gnulib/import/getprogname.h: New file.
3401 * gnulib/import/gettext.h: New file.
3402 * gnulib/import/glob-libc.h: New file.
3403 * gnulib/import/glob.c: New file.
3404 * gnulib/import/glob.in.h: New file.
3405 * gnulib/import/intprops.h: New file.
3406 * gnulib/import/m4/chdir-long.m4: New file.
3407 * gnulib/import/m4/close.m4: New file.
3408 * gnulib/import/m4/closedir.m4: New file.
3409 * gnulib/import/m4/d-ino.m4: New file.
3410 * gnulib/import/m4/d-type.m4: New file.
3411 * gnulib/import/m4/dup.m4: New file.
3412 * gnulib/import/m4/dup2.m4: New file.
3413 * gnulib/import/m4/error.m4: New file.
3414 * gnulib/import/m4/fchdir.m4: New file.
3415 * gnulib/import/m4/fcntl.m4: New file.
3416 * gnulib/import/m4/fcntl_h.m4: New file.
3417 * gnulib/import/m4/fdopendir.m4: New file.
3418 * gnulib/import/m4/filenamecat.m4: New file.
3419 * gnulib/import/m4/fstat.m4: New file.
3420 * gnulib/import/m4/fstatat.m4: New file.
3421 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3422 * gnulib/import/m4/getcwd-path-max.m4: New file.
3423 * gnulib/import/m4/getcwd.m4: New file.
3424 * gnulib/import/m4/getdtablesize.m4: New file.
3425 * gnulib/import/m4/getlogin_r.m4: New file.
3426 * gnulib/import/m4/getprogname.m4: New file.
3427 * gnulib/import/m4/glob.m4: New file.
3428 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3429 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3430 * gnulib/import/m4/mempcpy.m4: New file.
3431 * gnulib/import/m4/memrchr.m4: New file.
3432 * gnulib/import/m4/mode_t.m4: New file.
3433 * gnulib/import/m4/msvc-inval.m4: New file.
3434 * gnulib/import/m4/msvc-nothrow.m4: New file.
3435 * gnulib/import/m4/open.m4: New file.
3436 * gnulib/import/m4/openat.m4: New file.
3437 * gnulib/import/m4/opendir.m4: New file.
3438 * gnulib/import/m4/readdir.m4: New file.
3439 * gnulib/import/m4/realloc.m4: New file.
3440 * gnulib/import/m4/rewinddir.m4: New file.
3441 * gnulib/import/m4/save-cwd.m4: New file.
3442 * gnulib/import/m4/strdup.m4: New file.
3443 * gnulib/import/m4/strerror.m4: New file.
3444 * gnulib/import/m4/unistd-safer.m4: New file.
3445 * gnulib/import/mempcpy.c: New file.
3446 * gnulib/import/memrchr.c: New file.
3447 * gnulib/import/msvc-inval.c: New file.
3448 * gnulib/import/msvc-inval.h: New file.
3449 * gnulib/import/msvc-nothrow.c: New file.
3450 * gnulib/import/msvc-nothrow.h: New file.
3451 * gnulib/import/open.c: New file.
3452 * gnulib/import/openat-die.c: New file.
3453 * gnulib/import/openat-priv.h: New file.
3454 * gnulib/import/openat-proc.c: New file.
3455 * gnulib/import/openat.c: New file.
3456 * gnulib/import/openat.h: New file.
3457 * gnulib/import/opendir.c: New file.
3458 * gnulib/import/pipe-safer.c: New file.
3459 * gnulib/import/readdir.c: New file.
3460 * gnulib/import/realloc.c: New file.
3461 * gnulib/import/rewinddir.c: New file.
3462 * gnulib/import/save-cwd.c: New file.
3463 * gnulib/import/save-cwd.h: New file.
3464 * gnulib/import/strdup.c: New file.
3465 * gnulib/import/strerror-override.c: New file.
3466 * gnulib/import/strerror-override.h: New file.
3467 * gnulib/import/strerror.c: New file.
3468 * gnulib/import/unistd--.h: New file.
3469 * gnulib/import/unistd-safer.h: New file.
3470 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3471 "getcwd" and "glob".
3472 * ser-tcp.c: Undefine "close" before redefining it.
3473
3474 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3475
3476 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3477 get rid of res_val.
3478
3479 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3480
3481 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3482 <sol2,sparc>: Likewise.
3483 <sol2-64,i386>: Likewise.
3484
3485 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3486 -Wdeprecated-declarations on *-*-solaris*.
3487 * configure: Regenerate.
3488
3489 * procfs.c: Include "nat/inferior.h".
3490 (procfs_info_proc): Fix typo.
3491
3492 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3493
3494 * remote.c (vector): Include.
3495 (struct private_thread_info): Add field, thread_handle.
3496 (free_private_thread_info): Deallocate storage associated with
3497 thread handle.
3498 (get_private_info_thread): Initialize `thread_handle' field.
3499 (struct thread_item): Add field, thread_handle.
3500 (clear_threads_listing_context): Deallocate storage associated
3501 with thread handle.
3502 (start_thread): Add support for "handle" attribute.
3503 (thread_attributes): Add "handle".
3504 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3505 field.
3506 (remote_update_thread_list): Update thread_handle.
3507 (remote_thread_handle_to_thread_info): New function.
3508 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3509
3510 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3511
3512 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3513 function.
3514 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3515 * python/python-internal.h (thread_object_type): Declare.
3516
3517 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3518
3519 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3520 (target_thread_handle_to_thread_info): Declare.
3521 * target.c (target_thread_handle_to_thread_info): New function.
3522 * target-delegates.c: Regenerate.
3523 * gdbthread.h (find_thread_by_handle): Declare.
3524 * thread.c (find_thread_by_handle): New function.
3525 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3526 function.
3527 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3528
3529 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3530
3531 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3532
3533 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3534
3535 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3536
3537 2017-09-21 Yao Qi <yao.qi@linaro.org>
3538
3539 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3540 to gdb_target_obs.
3541
3542 2017-09-20 Tom Tromey <tom@tromey.com>
3543
3544 * breakpoint.c (struct counted_command_line): Remove.
3545 (breakpoint_commands): Update.
3546 (alloc_counted_command_line, incref_counted_command_line)
3547 (decref_counted_command_line, do_cleanup_counted_command_line)
3548 (make_cleanup_decref_counted_command_line): Remove.
3549 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3550 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3551 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3552 (save_breakpoints): Update.
3553 * breakpoint.h (counted_command_line): Now a typedef to
3554 shared_ptr.
3555 (struct breakpoint) <commands>: Now a counted_command_line.
3556 (struct bpstats) <command>: Likewise.
3557
3558 2017-09-20 Tom Tromey <tom@tromey.com>
3559
3560 * breakpoint.c (struct commands_info, do_map_commands_command):
3561 Remove.
3562 (commands_command_1): Update.
3563 (iterate_over_related_breakpoints): Take a function_view.
3564 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3565 (delete_command): Update.
3566 (map_breakpoint_numbers): Take a function_view.
3567 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3568 (disable_command): Update.
3569 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3570 (enable_command): Update.
3571 (struct disp_data, do_enable_breakpoint_disp)
3572 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3573 (do_map_enable_delete_breakpoint): Remove.
3574 (enable_once_command, enable_count_command, enable_delete_command)
3575 (delete_trace_variable_command): Update.
3576
3577 2017-09-20 Tom Tromey <tom@tromey.com>
3578
3579 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3580 (bpstat_clear): Use delete.
3581 (bpstats): New constructors.
3582 (bpstat_copy, bpstat_stop_status): Use new.
3583 (dprintf_after_condition_true): Update.
3584 * breakpoint.h (bpstats::bpstats): Add constructors.
3585 (bpstats::~bpstats): Add destructor.
3586
3587 2017-09-20 Pedro Alves <palves@redhat.com>
3588
3589 * eval.c (make_params): Delete, refactored as ...
3590 (class fake_method): ... this new type's ctor.
3591 (fake_method::~fake_method): New.
3592 (evaluate_subexp_standard): Use 'fake_method'.
3593
3594 2017-09-20 Tom Tromey <tom@tromey.com>
3595
3596 * windows-nat.c (get_windows_debug_event, windows_wait)
3597 (do_initial_windows_stuff, windows_attach): Update.
3598 * utils.c (vwarning, internal_vproblem): Update.
3599 (ui_unregister_input_event_handler_cleanup)
3600 (prepare_to_handle_input): Remove.
3601 (class scoped_input_handler): New.
3602 (defaulted_query, prompt_for_continue): Update.
3603 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3604 Update.
3605 * top.c (undo_terminal_modifications_before_exit): Update.
3606 * target/target.h (target_terminal_init, target_terminal_inferior)
3607 (target_terminal_ours): Don't declare.
3608 (class target_terminal): New.
3609 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3610 (target_terminal_ours_for_output)
3611 (make_cleanup_restore_target_terminal): Don't declare.
3612 (target_terminal_info): Remove.
3613 * target.c (enum terminal_state, terminal_state): Remove.
3614 (target_terminal::terminal_state): Define.
3615 (target_terminal::init): Rename from target_terminal_init.
3616 (target_terminal::inferior): Rename from
3617 target_terminal_inferior.
3618 (target_terminal::ours): Rename from target_terminal_ours.
3619 (target_terminal::ours_for_output): Rename from
3620 target_terminal_ours_for_output.
3621 (target_terminal::info): New method.
3622 (cleanup_restore_target_terminal)
3623 (make_cleanup_restore_target_terminal): Remove.
3624 * solib.c (handle_solib_event): Update.
3625 * remote.c (remote_serial_quit_handler): Update.
3626 (remote_terminal_inferior, remote_wait_as): Update.
3627 * record-full.c (record_full_wait_1): Update.
3628 * nto-procfs.c (procfs_create_inferior): Update.
3629 * nat/fork-inferior.c (startup_inferior): Update.
3630 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3631 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3632 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3633 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3634 (mi_breakpoint_created, mi_breakpoint_deleted)
3635 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3636 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3637 (mi_user_selected_context_changed, report_initial_inferior):
3638 Update.
3639 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3640 (linux_nat_terminal_inferior): Update.
3641 * infrun.c (follow_fork_inferior)
3642 (handle_vfork_child_exec_or_exit, do_target_resume)
3643 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3644 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3645 Update.
3646 * inflow.c (child_terminal_init, info_terminal_command): Update.
3647 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3648 (attach_command): Update.
3649 * infcall.c (call_thread_fsm_should_stop): Update.
3650 * gnu-nat.c (gnu_attach): Update.
3651 * extension.c (struct active_ext_lang_state)
3652 (restore_active_ext_lang): Update.
3653 * exceptions.c (print_flush): Update.
3654 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3655 (struct quit_handler_cleanup_data, restore_quit_handler)
3656 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3657 Remove.
3658 * cp-support.c (gdb_demangle): Update.
3659 * breakpoint.c (update_inserted_breakpoint_locations)
3660 (insert_breakpoint_locations, handle_jit_event)
3661 (disable_breakpoints_in_unloaded_shlib): Update.
3662 * annotate.c (annotate_breakpoints_invalid)
3663 (annotate_frames_invalid): Update.
3664
3665 2017-09-20 Tom Tromey <tom@tromey.com>
3666
3667 * main.c (catch_command_errors): Rename from
3668 catch_command_errors_const.
3669 (captured_main_1): Update.
3670
3671 2017-09-20 Pedro Alves <palves@redhat.com>
3672
3673 * cli/cli-cmds.c (list_command): Use print_sal_location.
3674 (print_sal_location): New function.
3675 (ambiguous_line_spec): Use print_sal_location.
3676 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3677 * symtab.c (find_function_start_sal): Likewise.
3678 * symtab.h (symtab_and_line::symbol): New field.
3679
3680 2017-09-20 Pedro Alves <palves@redhat.com>
3681
3682 * linespec.c (minsym_found): Handle non-text minsyms.
3683 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3684
3685 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3686
3687 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3688 backslash.
3689
3690 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3691
3692 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3693 vmovups instead vmovaps.
3694 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3695
3696 2017-09-19 John Baldwin <jhb@FreeBSD.org>
3697
3698 * NEWS (Changes since GDB 8.0): Add starti.
3699 * infcmd.c (enum run_break): New.
3700 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3701 case.
3702 (run_command): Use enum run_how.
3703 (start_command): Likewise.
3704 (starti_command): New function.
3705 (RUN_ARGS_HELP): New macro.
3706 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3707 commands. Add starti command.
3708
3709 2017-09-19 Yao Qi <yao.qi@linaro.org>
3710
3711 * Makefile.in (monitor.o): Remove the rule.
3712
3713 2017-09-19 Yao Qi <yao.qi@linaro.org>
3714
3715 * annotate.h (struct annotate_arg_emitter): Use
3716 DISABLE_COPY_AND_ASSIGN.
3717 * common/refcounted-object.h (refcounted_object): Likewise.
3718 * completer.h (struct completion_result): Likewise.
3719 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3720 * filename-seen-cache.h (filename_seen_cache): Likewise.
3721 * gdbcore.h (thread_section_name): Likewise.
3722 * gdb_regex.h (compiled_regex): Likewise.
3723 * gdbthread.h (scoped_restore_current_thread): Likewise.
3724 * inferior.h (scoped_restore_current_inferior): Likewise.
3725 * jit.c (jit_reader): Likewise.
3726 * linespec.h (struct linespec_result): Likewise.
3727 * mi/mi-parse.h (struct mi_parse): Likewise.
3728 * nat/fork-inferior.c (execv_argv): Likewise.
3729 * progspace.h (scoped_restore_current_program_space): Likewise.
3730 * python/python-internal.h (class gdbpy_enter): Likewise.
3731 * regcache.h (regcache): Likewise.
3732 * target-descriptions.c (struct tdesc_reg): Likewise.
3733 (struct tdesc_type): Likewise.
3734 (struct tdesc_feature): Likewise.
3735 * ui-out.h (ui_out_emit_type): Likewise.
3736
3737 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3738
3739 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3740 label abort_expression.
3741
3742 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3743
3744 * common/buffer.c (buffer_xml_printf): Adjust.
3745 * common/xml-utils.c (xml_escape_text): Change return type to
3746 std::string, update code accordingly.
3747 * common/xml-utils.h (xml_escape_text): Change return type to
3748 std::string.
3749 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3750 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3751 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3752 Adjust.
3753
3754 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3755
3756 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3757 (SUBDIR_UNITTESTS_OBS): Add new object file.
3758 * unittests/xml-utils-selftests.c: New file.
3759
3760 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3761
3762 * common/selftest.h (selftest): New struct/interface.
3763 (register_test): Add name parameter, add new overload.
3764 (run_tests): Add filter parameter.
3765 (for_each_selftest_ftype): New typedef.
3766 (for_each_selftest): New declaration.
3767 * common/selftest.c (tests): Change type to
3768 map<string, unique_ptr<selftest>>.
3769 (simple_selftest): New struct.
3770 (register_test): New function.
3771 (register_test): Add name parameter and use it.
3772 (run_tests): Add filter parameter and use it. Add prints.
3773 Adjust to vector -> map change.
3774 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3775 registering selftests.
3776 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3777 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3778 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3779 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3780 * findvar.c (_initialize_findvar): Likewise.
3781 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3782 * maint.c (maintenance_selftest): Update call to run_tests.
3783 (maintenance_info_selftests): New function.
3784 (_initialize_maint_cmds): Register "maintenance info selftests"
3785 command. Update "maintenance selftest" doc.
3786 * regcache.c (_initialize_regcache): Add names when registering
3787 selftests.
3788 * rust-exp.y (_initialize_rust_exp): Likewise.
3789 * selftest-arch.c (gdbarch_selftest): New struct.
3790 (gdbarch_tests): Remove.
3791 (register_test_foreach_arch): Add name parameter. Call
3792 register_test.
3793 (tests_with_arch): Remove, move most content to
3794 gdbarch_selftest::operator().
3795 (_initialize_selftests_foreach_arch): Remove.
3796 * selftest-arch.h (register_test_foreach_arch): Add name
3797 parameter.
3798 (run_tests_with_arch): New declaration.
3799 * utils-selftests.c (_initialize_utils_selftests): Add names
3800 when registering selftests.
3801 * utils.c (_initialize_utils): Likewise.
3802 * unittests/array-view-selftests.c
3803 (_initialize_array_view_selftests): Likewise.
3804 * unittests/environ-selftests.c (_initialize_environ_selftests):
3805 Likewise.
3806 * unittests/function-view-selftests.c
3807 (_initialize_function_view_selftests): Likewise.
3808 * unittests/offset-type-selftests.c
3809 (_initialize_offset_type_selftests): Likewise.
3810 * unittests/optional-selftests.c
3811 (_initialize_optional_selftests): Likewise.
3812 * unittests/scoped_restore-selftests.c
3813 (_initialize_scoped_restore_selftests): Likewise.
3814 * NEWS: Document "maintenance selftest" and "maint info
3815 selftests".
3816
3817 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3818
3819 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3820 scoped_restore.
3821
3822 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3823
3824 * mi/mi-main.c (mi_load_progress): Make uiout variable
3825 a unique_ptr.
3826
3827 2017-09-15 Pedro Alves <palves@redhat.com>
3828
3829 * compile/compile-c-types.c (convert_enum, convert_int)
3830 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3831
3832 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3833
3834 * dwarf2read.c (copy_string): Remove.
3835 (parse_macro_definition): Replace copy_string with savestring.
3836
3837 2017-09-15 Yao Qi <yao.qi@linaro.org>
3838
3839 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3840 gdb_target_obs.
3841 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3842 Likewise.
3843 (i[34567]86-*-linux*): Likewise.
3844
3845 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3846
3847 * dwarf2expr.h (dwarf_stack_value): Add constructor.
3848 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3849 <stack>: Change type to std::vector.
3850 <stack_len, stack_allocated>: Remove.
3851 <grow_stack>: Remove.
3852 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3853 (dwarf_expr_context::~dwarf_expr_context): Remove.
3854 (dwarf_expr_context::grow_stack): Remove.
3855 (dwarf_expr_context::push): Adjust.
3856 (dwarf_expr_context::pop): Adjust.
3857 (dwarf_expr_context::fetch): Adjust.
3858 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3859 (dwarf_expr_context::stack_empty_p): Adjust.
3860 (dwarf_expr_context::execute_stack_op): Adjust.
3861
3862 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3863
3864 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3865 return type to bool.
3866 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3867
3868 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3869
3870 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3871 Change type to bool.
3872 (dwarf_stack_value) <in_stack_memory>: Likewise.
3873 (dwarf_expr_context) <push_address>: Change parameter type to
3874 bool.
3875 <fetch_in_stack_memory>: Change return type to bool.
3876 <push>: Change parameter type to bool.
3877 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3878 to bool.
3879 (dwarf_expr_context::push_address): Likewise.
3880 (dwarf_expr_context::fetch_in_stack_memory): Change return type
3881 to bool.
3882 (dwarf_expr_context::execute_stack_op): Adjust.
3883 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3884
3885 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3886
3887 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3888 (struct dwarf_expr_context) <n_pieces>: Remove.
3889 <pieces>: Change type to std::vector.
3890 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3891 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3892 pieces.
3893 (dwarf_expr_context::add_piece): Adjust.
3894 * dwarf2loc.c (struct piece_closure): Initialize fields.
3895 <n_pieces>: Remove.
3896 <pieces>: Change type to std::vector.
3897 (allocate_piece_closure): Adjust, change parameter to
3898 std::vector rvalue and std::move it to piece_closure.
3899 (rw_pieced_value): Adjust.
3900 (check_pieced_synthetic_pointer): Adjust.
3901 (indirect_synthetic_pointer): Adjust.
3902 (coerce_pieced_ref): Adjust.
3903 (free_pieced_value_closure): Adjust. Use delete to free
3904 piece_closure.
3905 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
3906 to allocate_piece_closure.
3907 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3908
3909 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3910
3911 * probe.h (probe_ops_cp): Remove typedef.
3912 (DEF_VEC_P (probe_ops_cp)): Remove.
3913 (all_probe_ops): Change type to std::vector.
3914 * probe.c (info_probes_for_ops): Adjust to vector change.
3915 (probe_linespec_to_ops): Likewise.
3916 (all_probe_ops): Change type to std::vector.
3917 (_initialize_probe): Adjust to vector change.
3918 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3919 * elfread.c (elf_get_probes): Likewise.
3920 * stap-probe.c (_initialize_stap_probe): Likewise.
3921
3922 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3923
3924 * probe.h (struct bound_probe): Define constructors.
3925 * probe.c (bound_probe_s): Remove typedef.
3926 (DEF_VEC_O (bound_probe_s)): Remove VEC.
3927 (collect_probes): Change return type to std::vector, remove
3928 cleanup.
3929 (compare_probes): Return bool, change parameter type. Change
3930 semantic to "less than".
3931 (gen_ui_out_table_header_info): Change parameter to std::vector
3932 and update.
3933 (exists_probe_with_pops): Likewise.
3934 (info_probes_for_ops): Update to std::vector change.
3935 (enable_probes_command): Likewise.
3936 (disable_probes_command): Likewise.
3937
3938 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3939
3940 * probe.h (struct probe_ops) <get_probes>: Change parameter from
3941 vec to std::vector.
3942 * probe.c (parse_probes_in_pspace): Update.
3943 (find_probes_in_objfile): Update.
3944 (find_probe_by_pc): Update.
3945 (collect_probes): Update.
3946 (probe_any_get_probes): Update.
3947 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3948 return type to reference to std::vector.
3949 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3950 std::vector and update.
3951 (dtrace_process_dof): Likewise.
3952 (dtrace_get_probes): Likewise.
3953 * elfread.c (elf_get_probes): Change return type to std::vector,
3954 store an std::vector in bfd_data.
3955 (probe_key_free): Update to std::vector.
3956 * stap-probe.c (handle_stap_probe): Change parameter to
3957 std::vector and update.
3958 (stap_get_probes): Likewise.
3959 * symfile-debug.c (debug_sym_get_probes): Change return type to
3960 std::vector and update.
3961
3962 2017-09-11 Tom Tromey <tom@tromey.com>
3963
3964 * breakpoint.c (program_breakpoint_here_p): Update.
3965 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3966 from make_show_memory_breakpoints_cleanup. Return a
3967 scoped_restore_tmpl<int>.
3968 (restore_show_memory_breakpoints): Remove.
3969 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3970 * mem-break.c (memory_validate_breakpoint): Update.
3971 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3972 (ia64_memory_remove_breakpoint): Update.
3973 (ia64_breakpoint_from_pc): Update.
3974 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3975 from make_show_memory_breakpoints_cleanup.
3976
3977 2017-09-11 Tom Tromey <tom@tromey.com>
3978
3979 * d-namespace.c (d_lookup_symbol): Use std::string.
3980 (find_symbol_in_baseclass): Likewise.
3981
3982 2017-09-11 Tom Tromey <tom@tromey.com>
3983
3984 * ctf.c (ctf_start): Use std::string.
3985
3986 2017-09-11 Tom Tromey <tom@tromey.com>
3987
3988 * ada-lang.c (is_known_support_routine): Update.
3989 (ada_unhandled_exception_name_addr_from_raise): Update.
3990 * guile/scm-frame.c (gdbscm_frame_name): Update.
3991 * python/py-frame.c (frapy_name): Update.
3992 (frapy_function): Update.
3993 * stack.h (find_frame_funname): Update.
3994 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3995 (print_frame): Update.
3996
3997 2017-09-11 Tom Tromey <tom@tromey.com>
3998
3999 * findcmd.c (put_bits): Take a gdb::byte_vector.
4000 (parse_find_args): Return gdb::byte_vector. "args" now const.
4001 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
4002 cleanups.
4003 (find_command): Update.
4004
4005 2017-09-11 Tom Tromey <tom@tromey.com>
4006
4007 * cli/cli-script.c (class scoped_restore_hook_in): New.
4008 (clear_hook_in_cleanup): Remove.
4009 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4010 scoped_restore_hook_in.
4011
4012 2017-09-11 Tom Tromey <tom@tromey.com>
4013
4014 * cli/cli-script.c (restore_interp): Remove.
4015 (read_command_lines): Use scoped_restore_interp.
4016 * interps.c (scoped_restore_interp::set_temp): Rename from
4017 interp_set_temp.
4018 * interps.h (class scoped_restore_interp): New.
4019 (interp_set_temp): Remove.
4020
4021 2017-09-11 Tom Tromey <tom@tromey.com>
4022
4023 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4024 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4025 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4026 scoped_restore.
4027 (mi_cmd_break_insert_1): Update.
4028 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4029 scoped_restore.
4030
4031 2017-09-11 Tom Tromey <tom@tromey.com>
4032
4033 * demangle.c (demangle_command): Update.
4034 * breakpoint.c (disable_command): Update.
4035 (enable_command): Update.
4036 (find_location_by_number): Make "number" const. Use
4037 get_number_trailer.
4038 * cli/cli-utils.c (extract_arg): Return std::string.
4039 * probe.c (parse_probe_linespec): Update. Change types.
4040 (collect_probes): Take string arguments.
4041 (parse_probe_linespec): Likewise.
4042 (info_probes_for_ops): Update.
4043 (enable_probes_command): Update.
4044 (disable_probes_command): Update.
4045 * break-catch-sig.c (catch_signal_split_args): Update.
4046 * mi/mi-parse.c (mi_parse): Update.
4047
4048 2017-09-11 Tom Tromey <tom@tromey.com>
4049
4050 * language.h (language_enum): Make argument const.
4051 * language.c (language_enum): Make argument const.
4052
4053 2017-09-11 Tom Tromey <tom@tromey.com>
4054
4055 * common/common-utils.h (skip_to_space): Remove macro, redeclare
4056 as function.
4057 (skip_to_space): Rename from skip_to_space_const.
4058 * common/common-utils.c (skip_to_space): New function.
4059 (skip_to_space): Rename from skip_to_space_const.
4060 * cli/cli-utils.h (get_number): Rename from get_number_const.
4061 (extract_arg): Rename from extract_arg_const.
4062 * cli/cli-utils.c (get_number): Rename from get_number_const.
4063 (extract_arg): Rename from extract_arg_const.
4064 (number_or_range_parser::get_number): Use ::get_number.
4065 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4066 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4067 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4068 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4069 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4070 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4071 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4072 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4073
4074 2017-09-11 Tom Tromey <tom@tromey.com>
4075
4076 * python/python.c (do_start_initialization): Use
4077 py-event-types.def to initialize types.
4078 Define all object type structures.
4079 * python/python-internal.h: Don't declare event initialization
4080 functions.
4081 * python/py-threadevent.c (thread_event_object_type): Don't
4082 define.
4083 * python/py-stopevent.c (stop_event_object_type): Don't define.
4084 * python/py-signalevent.c (signal_event_object_type): Don't
4085 declare or define.
4086 * python/py-newobjfileevent.c (new_objfile_event_object_type)
4087 (clear_objfiles_event_object_type): Don't declare or define.
4088 * python/py-infevents.c (inferior_call_pre_event_object_type)
4089 (inferior_call_post_event_object_type)
4090 (register_changed_event_object_type)
4091 (memory_changed_event_object_type): Don't declare or define.
4092 * python/py-inferior.c (new_thread_event_object_type)
4093 (new_inferior_event_object_type)
4094 (inferior_deleted_event_object_type): Don't declare or define.
4095 * python/py-exitedevent.c (exited_event_object_type): Don't
4096 declare or define.
4097 * python/py-evts.c (gdbpy_initialize_py_events): Use
4098 py-all-events.def.
4099 * python/py-events.h (thread_event_object_type): Don't declare.
4100 (events_object): Use py-all-events.def.
4101 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
4102 py-event-types.def.
4103 * python/py-event-types.def: New file.
4104 * python/py-continueevent.c (create_continue_event_object): Don't
4105 declare or define.
4106 * python/py-bpevent.c (breakpoint_event_object_type): Don't
4107 declare or define.
4108 * python/py-all-events.def: New file.
4109
4110 2017-09-11 Tom Tromey <tom@tromey.com>
4111
4112 * python/py-threadevent.c (create_thread_event_object): Return
4113 gdbpy_ref.
4114 * python/py-stopevent.h (create_stop_event_object)
4115 (create_breakpoint_event_object, create_signal_event_object):
4116 Update.
4117 * python/py-stopevent.c (create_stop_event_object): Return
4118 gdbpy_ref.
4119 (emit_stop_event): Update.
4120 * python/py-signalevent.c (create_signal_event_object): Return
4121 gdbpy_ref.
4122 * python/py-infevents.c (create_inferior_call_event_object):
4123 Update.
4124 * python/py-event.h (create_event_object)
4125 (create_thread_event_object): Update.
4126 * python/py-event.c (create_event_object): Return gdbpy_ref.
4127 * python/py-continueevent.c: Return gdbpy_ref.
4128 * python/py-bpevent.c (create_breakpoint_event_object): Return
4129 gdbpy_ref.
4130
4131 2017-09-11 Tom Tromey <tom@tromey.com>
4132
4133 PR python/15622:
4134 * NEWS: Add entry.
4135 * python/python.c (do_start_initialization): Initialize new event
4136 types.
4137 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4138 (gdbpy_initialize_inferior_deleted_event)
4139 (gdbpy_initialize_new_thread_event): Declare.
4140 * python/py-threadevent.c (create_thread_event_object): Add option
4141 "thread" parameter.
4142 * python/py-inferior.c (new_thread_event_object_type)
4143 (new_inferior_event_object_type)
4144 (inferior_deleted_event_object_type): Declare.
4145 (python_new_inferior, python_inferior_deleted): New functions.
4146 (add_thread_object): Emit new_thread event.
4147 (gdbpy_initialize_inferior): Attach new functions to corresponding
4148 observers.
4149 (new_thread, new_inferior, inferior_deleted): Define new event
4150 types.
4151 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4152 registries.
4153 * python/py-events.h (events_object) <new_inferior,
4154 inferior_deleted, new_thread>: New fields.
4155 * python/py-event.h (create_thread_event_breakpoint): Add optional
4156 "thread" parameter.
4157
4158 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4159
4160 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4161 check current_ui instead.
4162 (internal_vproblem): Likewise.
4163
4164 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4165
4166 * thread.c (print_thread_info_1): Remove unnecessary calls to
4167 uiout->is_mi_like_p.
4168
4169 2017-09-09 Tom Tromey <tom@tromey.com>
4170
4171 * namespace.h (add_using_directive): Update.
4172 * namespace.c (add_using_directive): Change type of excludes to
4173 std::vector.
4174 * dwarf2read.c (read_import_statement): Use std::vector.
4175 (read_namespace): Update.
4176 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4177
4178 2017-09-09 Tom Tromey <tom@tromey.com>
4179
4180 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4181
4182 2017-09-09 Tom Tromey <tom@tromey.com>
4183
4184 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4185
4186 2017-09-09 Tom Tromey <tom@tromey.com>
4187
4188 * stack.c (func_command): Use gdb::def_vector.
4189
4190 2017-09-09 Tom Tromey <tom@tromey.com>
4191
4192 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4193 ui_out_emit_list, ui_out_emit_tuple.
4194 (mi_cmd_var_update): Likewise.
4195
4196 2017-09-09 Tom Tromey <tom@tromey.com>
4197
4198 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4199 ui_out_redirect_pop.
4200 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4201 ui_out_redirect_pop.
4202 * utils.c (do_ui_out_redirect_pop)
4203 (make_cleanup_ui_out_redirect_pop): Remove.
4204 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4205 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4206 * ui-out.h (ui_out_redirect_pop): New class.
4207
4208 2017-09-09 Tom Tromey <tom@tromey.com>
4209
4210 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4211 (list_available_thread_groups, mi_cmd_list_thread_groups)
4212 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4213 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4214 Likewise.
4215
4216 2017-09-09 Tom Tromey <tom@tromey.com>
4217
4218 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4219 ui_out_emit_tuple.
4220
4221 2017-09-09 Tom Tromey <tom@tromey.com>
4222
4223 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4224 * stack.c (print_frame): Use ui_out_emit_tuple.
4225 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4226 (info_spu_mailbox_command, info_spu_dma_command)
4227 (info_spu_proxydma_command): Likewise.
4228 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4229 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4230 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4231 ui_out_emit_tuple.
4232 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4233
4234 2017-09-09 Tom Tromey <tom@tromey.com>
4235
4236 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4237 (class ui_out_emit_table): Update comment.
4238 * ui-out.c (do_cleanup_table_end)
4239 (make_cleanup_ui_out_table_begin_end): Remove.
4240 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4241 (info_spu_dma_cmdlist): Likewise.
4242 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4243 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4244 ui_out_emit_table.
4245
4246 2017-09-09 Tom Tromey <tom@tromey.com>
4247
4248 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4249 ui_out_emit_list, gdb::optional.
4250
4251 2017-09-09 John Baldwin <jhb@FreeBSD.org>
4252
4253 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4254 prototype.
4255 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4256 prototype.
4257 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4258 prototype.
4259 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4260 * ada-exp.y: Remove _initialize_ada_exp prototype.
4261 * ada-lang.c: Remove _initialize_ada_language prototype.
4262 * ada-tasks.c: Remove _initialize_tasks prototype.
4263 * addrmap.c: Remove _initialize_addrmap prototype.
4264 * agent.c: Remove _initialize_agent prototype.
4265 * aix-thread.c: Remove _initialize_aix_thread prototype.
4266 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4267 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4268 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4269 prototype.
4270 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4271 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4272 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4273 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4274 prototype.
4275 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4276 prototype.
4277 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4278 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4279 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4280 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4281 prototype.
4282 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4283 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4284 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4285 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4286 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4287 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4288 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4289 prototype.
4290 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4291 prototype.
4292 * annotate.c: Remove _initialize_annotate prototype.
4293 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4294 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4295 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4296 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4297 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4298 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4299 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4300 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4301 prototype.
4302 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4303 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4304 * auto-load.c: Remove _initialize_auto_load prototype.
4305 * auxv.c: Remove _initialize_auxv prototype.
4306 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4307 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4308 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4309 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4310 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4311 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4312 prototype.
4313 * break-catch-throw.c: Remove _initialize_break_catch_throw
4314 prototype.
4315 * breakpoint.c: Remove _initialize_breakpoint prototype.
4316 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4317 * btrace.c: Remove _initialize_btrace prototype.
4318 * charset.c: Remove _initialize_charset prototype.
4319 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4320 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4321 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4322 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4323 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4324 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4325 * coffread.c: Remove _initialize_coffread prototype.
4326 * compile/compile.c: Remove _initialize_compile prototype.
4327 * complaints.c: Remove _initialize_complaints prototype.
4328 * completer.c: Remove _initialize_completer prototype.
4329 * copying.awk: Remove _initialize_copying prototype.
4330 * copying.c: Regenerate.
4331 * core-regset.c: Remove _initialize_core_regset prototype.
4332 * corefile.c: Remove _initialize_core prototype.
4333 * corelow.c: Remove _initialize_corelow prototype.
4334 * cp-abi.c: Remove _initialize_cp_abi prototype.
4335 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4336 * cp-support.c: Remove _initialize_cp_support prototype.
4337 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4338 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4339 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4340 * ctf.c: Remove _initialize_ctf prototype.
4341 * d-lang.c: Remove _initialize_d_language prototype.
4342 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4343 prototype.
4344 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4345 * dbxread.c: Remove _initialize_dbxread prototype.
4346 * dcache.c: Remove _initialize_dcache prototype.
4347 * demangle.c: Remove _initialize_demangler prototype.
4348 * disasm-selftests.c: Remove _initialize_disasm_selftests
4349 prototype.
4350 * disasm.c: Remove _initialize_disasm prototype.
4351 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4352 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4353 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4354 prototype.
4355 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4356 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4357 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4358 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4359 * elfread.c: Remove _initialize_elfread prototype.
4360 * exec.c: Remove _initialize_exec prototype.
4361 * extension.c: Remove _initialize_extension prototype.
4362 * f-lang.c: Remove _initialize_f_language prototype.
4363 * f-valprint.c: Remove _initialize_f_valprint prototype.
4364 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4365 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4366 * filesystem.c: Remove _initialize_filesystem prototype.
4367 * findcmd.c: Remove _initialize_mem_search prototype.
4368 * fork-child.c: Remove _initialize_fork_child prototype.
4369 * frame-base.c: Remove _initialize_frame_base prototype.
4370 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4371 * frame.c: Remove _initialize_frame prototype.
4372 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4373 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4374 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4375 * gcore.c: Remove _initialize_gcore prototype.
4376 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4377 * gdbarch.c: Regenerate.
4378 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4379 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4380 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4381 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4382 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4383 * go-lang.c: Remove _initialize_go_language prototype.
4384 * go32-nat.c: Remove _initialize_go32_nat prototype.
4385 * guile/guile.c: Remove _initialize_guile prototype.
4386 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4387 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4388 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4389 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4390 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4391 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4392 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4393 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4394 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4395 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4396 prototype.
4397 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4398 prototype.
4399 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4400 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4401 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4402 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4403 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4404 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4405 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4406 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4407 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4408 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4409 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4410 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4411 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4412 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4413 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4414 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4415 prototype.
4416 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4417 prototype.
4418 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4419 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4420 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4421 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4422 * infcall.c: Remove _initialize_infcall prototype.
4423 * infcmd.c: Remove _initialize_infcmd prototype.
4424 * inferior.c: Remove _initialize_inferiors prototype.
4425 * inflow.c: Remove _initialize_inflow prototype.
4426 * infrun.c: Remove _initialize_infrun prototype.
4427 * interps.c: Remove _initialize_interpreter prototype.
4428 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4429 * jit.c: Remove _initialize_jit prototype.
4430 * language.c: Remove _initialize_language prototype.
4431 * linux-fork.c: Remove _initialize_linux_fork prototype.
4432 * linux-nat.c: Remove _initialize_linux_nat prototype.
4433 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4434 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4435 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4436 * m2-lang.c: Remove _initialize_m2_language prototype.
4437 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4438 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4439 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4440 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4441 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4442 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4443 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4444 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4445 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4446 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4447 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4448 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4449 * machoread.c: Remove _initialize_machoread prototype.
4450 * macrocmd.c: Remove _initialize_macrocmd prototype.
4451 * macroscope.c: Remove _initialize_macroscope prototype.
4452 * maint.c: Remove _initialize_maint_cmds prototype.
4453 * mdebugread.c: Remove _initialize_mdebugread prototype.
4454 * memattr.c: Remove _initialize_mem prototype.
4455 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4456 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4457 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4458 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4459 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4460 * microblaze-linux-tdep.c: Remove
4461 _initialize_microblaze_linux_tdep prototype.
4462 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4463 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4464 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4465 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4466 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4467 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4468 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4469 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4470 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4471 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4472 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4473 prototype.
4474 * mipsread.c: Remove _initialize_mipsread prototype.
4475 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4476 prototype.
4477 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4478 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4479 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4480 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4481 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4482 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4483 prototype.
4484 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4485 * nto-procfs.c: Remove _initialize_procfs prototype.
4486 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4487 * objc-lang.c: Remove _initialize_objc_language prototype.
4488 * objfiles.c: Remove _initialize_objfiles prototype.
4489 * observer.c: Remove observer_test_first_notification_function,
4490 observer_test_second_notification_function,
4491 observer_test_third_notification_function, and
4492 _initialize_observer prototypes.
4493 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4494 * osabi.c: Remove _initialize_gdb_osabi prototype.
4495 * osdata.c: Remove _initialize_osdata prototype.
4496 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4497 * parse.c: Remove _initialize_parse prototype.
4498 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4499 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4500 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4501 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4502 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4503 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4504 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4505 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4506 * printcmd.c: Remove _initialize_printcmd prototype.
4507 * probe.c: Remove _initialize_probe prototype.
4508 * proc-api.c: Remove _initialize_proc_api prototype.
4509 * proc-events.c: Remove _initialize_proc_events prototype.
4510 * proc-service.c: Remove _initialize_proc_service prototype.
4511 * procfs.c: Remove _initialize_procfs prototype.
4512 * psymtab.c: Remove _initialize_psymtab prototype.
4513 * python/python.c: Remove _initialize_python prototype.
4514 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4515 * record-btrace.c: Remove _initialize_record_btrace prototype.
4516 * record-full.c: Remove _initialize_record_full prototype.
4517 * record.c: Remove _initialize_record prototype.
4518 * regcache.c: Remove _initialize_regcache prototype.
4519 * reggroups.c: Remove _initialize_reggroup prototype.
4520 * remote-notif.c: Remove _initialize_notif prototype.
4521 * remote-sim.c: Remove _initialize_remote_sim prototype.
4522 * remote.c: Remove _initialize_remote prototype.
4523 * reverse.c: Remove _initialize_reverse prototype.
4524 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4525 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4526 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4527 prototype.
4528 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4529 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4530 * rust-exp.y: Remove _initialize_rust_exp prototype.
4531 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4532 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4533 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4534 * score-tdep.c: Remove _initialize_score_tdep prototype.
4535 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4536 prototype.
4537 * ser-go32.c: Remove _initialize_ser_dos prototype.
4538 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4539 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4540 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4541 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4542 * serial.c: Remove _initialize_serial prototype.
4543 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4544 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4545 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4546 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4547 * skip.c: Remove _initialize_step_skip prototype.
4548 * sol-thread.c: Remove _initialize_sol_thread prototype.
4549 * solib-aix.c: Remove _initialize_solib_aix prototype.
4550 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4551 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4552 * solib-frv.c: Remove _initialize_frv_solib prototype.
4553 * solib-spu.c: Remove _initialize_spu_solib prototype.
4554 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4555 * solib-target.c: Remove _initialize_solib_target prototype.
4556 * solib.c: Remove _initialize_solib prototype.
4557 * source.c: Remove _initialize_source prototype.
4558 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4559 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4560 prototype.
4561 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4562 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4563 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4564 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4565 prototype.
4566 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4567 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4568 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4569 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4570 prototype.
4571 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4572 prototype.
4573 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4574 prototype.
4575 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4576 prototype.
4577 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4578 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4579 prototype.
4580 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4581 prototype.
4582 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4583 prototype.
4584 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4585 prototype.
4586 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4587 prototype.
4588 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4589 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4590 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4591 * stabsread.c: Remove _initialize_stabsread prototype.
4592 * stack.c: Remove _initialize_stack prototype.
4593 * stap-probe.c: Remove _initialize_stap_probe prototype.
4594 * std-regs.c: Remove _initialize_frame_reg prototype.
4595 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4596 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4597 * symfile.c: Remove _initialize_symfile prototype.
4598 * symmisc.c: Remove _initialize_symmisc prototype.
4599 * symtab.c: Remove _initialize_symtab prototype.
4600 * target-dcache.c: Remove _initialize_target_dcache prototype.
4601 * target-descriptions.c: Remove _initialize_target_descriptions
4602 prototype.
4603 * thread.c: Remove _initialize_thread prototype.
4604 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4605 prototype.
4606 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4607 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4608 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4609 prototype.
4610 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4611 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4612 * tracefile.c: Remove _initialize_tracefile prototype.
4613 * tracepoint.c: Remove _initialize_tracepoint prototype.
4614 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4615 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4616 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4617 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4618 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4619 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4620 * tui/tui.c: Remove _initialize_tui prototype.
4621 * typeprint.c: Remove _initialize_typeprint prototype.
4622 * user-regs.c: Remove _initialize_user_regs prototype.
4623 * utils.c: Remove _initialize_utils prototype.
4624 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4625 * valarith.c: Remove _initialize_valarith prototype.
4626 * valops.c: Remove _initialize_valops prototype.
4627 * valprint.c: Remove _initialize_valprint prototype.
4628 * value.c: Remove _initialize_values prototype.
4629 * varobj.c: Remove _initialize_varobj prototype.
4630 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4631 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4632 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4633 * windows-nat.c: Remove _initialize_windows_nat,
4634 _initialize_check_for_gdb_ini, and _initialize_loadable
4635 prototypes.
4636 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4637 * xcoffread.c: Remove _initialize_xcoffread prototype.
4638 * xml-support.c: Remove _initialize_xml_support prototype.
4639 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4640 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4641 prototype.
4642 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4643 prototype.
4644 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4645
4646 2017-09-08 Keith Seitz <keiths@redhat.com>
4647
4648 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4649 field.
4650
4651 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4652
4653 * f-valprint.c (f_val_print): Remove check for one byte
4654 sized integers. Remove printing of character type.
4655
4656 2017-09-08 Frank Penczek <frank.penczek@intel.com>
4657 Christoph Weinmann <christoph.t.weinmann@intel.com>
4658 Bernhard Heckel <bernhard.heckel@intel.com>
4659
4660 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4661 to maintain proper indentation when printing pointers/refs.
4662
4663 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4664
4665 GDB 8.0.1 released.
4666
4667 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4668
4669 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4670
4671 2017-09-05 Tom Tromey <tom@tromey.com>
4672
4673 * parse.c (funcall_chain): Now a std::vector.
4674 (start_arglist, end_arglist): Simplify.
4675 (free_funcalls): Remove.
4676 (parse_exp_in_context_1): Remove cleanup.
4677
4678 2017-09-05 Tom Tromey <tom@tromey.com>
4679
4680 * go-exp.y (go_parse): Don't create a cleanup.
4681
4682 2017-09-05 Tom Tromey <tom@tromey.com>
4683
4684 * d-exp.y (PrimaryExpression): Use std::string.
4685 (d_parse): Don't create a cleanup.
4686
4687 2017-09-05 Tom Tromey <tom@tromey.com>
4688
4689 * utils.c (do_clear_parser_state): Remove.
4690 (make_cleanup_clear_parser_state): Remove.
4691 * p-exp.y (pascal_parse): Use scoped_restore.
4692 * m2-exp.y (m2_parse): Use scoped_restore.
4693 * f-exp.y (f_parse): Use scoped_restore.
4694 * d-exp.y (d_parse): Use scoped_restore.
4695 * c-exp.y (c_parse): Use scoped_restore.
4696 * ada-exp.y (ada_parse): Use scoped_restore.
4697 * utils.h (make_cleanup_clear_parser_state): Remove.
4698
4699 2017-09-06 Keith Seitz <keiths@redhat.com>
4700
4701 * dwarf2read.c (dw2_linkage_name_attr): New function.
4702 (dw2_linkage_name): New function.
4703 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4704 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4705 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4706
4707 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4708
4709 * config/djgpp/djconfig.sh: Correct shell portability issue.
4710
4711 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4712
4713 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4714
4715 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4716
4717 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4718 * NEWS: Mention new FreeBSD/mips native configuration.
4719 * configure.host: Add aarch64*-*-freebsd*.
4720 * configure.nat: Likewise.
4721 * aarch64-fbsd-nat.c: New file.
4722
4723 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4724
4725 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4726 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4727 * NEWS: Mention new FreeBSD/aarch64 target.
4728 * configure.tgt: Add aarch64*-*-freebsd*.
4729 * aarch64-fbsd-tdep.c: New file.
4730 * aarch64-fbsd-tdep.h: New file.
4731
4732 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4733
4734 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4735
4736 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4737
4738 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4739 of TLS symbols.
4740
4741 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4742
4743 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4744 call.
4745
4746 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4747
4748 * infrun.c (follow_exec): Call add_thread after
4749 target_find_description.
4750
4751 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4752
4753 * infrun.c (handle_inferior_event_1): When exec'ing, read
4754 stop_pc after follow_exec.
4755
4756 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4757
4758 * remote.c (process_g_packet): Update error message.
4759
4760 2017-09-05 Yao Qi <yao.qi@linaro.org>
4761
4762 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4763 targets.
4764
4765 2017-09-05 Pedro Alves <palves@redhat.com>
4766
4767 * eval.c (eval_call, evaluate_funcall): New functions, factored
4768 out from ...
4769 (evaluate_subexp_standard): ... this.
4770
4771 2017-09-05 Yao Qi <yao.qi@linaro.org>
4772
4773 * amd64-tdep.c (amd64_target_description): Create target
4774 descriptions.
4775 (_initialize_amd64_tdep): Don't call functions
4776 initialize_tdesc_amd64_*. Add self tests.
4777 * arch/amd64.c (amd64_create_target_description): Add parameter
4778 is_linux. Call set_tdesc_osabi if is_linux is true.
4779 * arch/amd64.h (amd64_create_target_description): Update the
4780 declaration.
4781 * arch/i386.c (i386_create_target_description): Add parameter
4782 is_linux. Call set_tdesc_osabi if is_linux is true.
4783 * arch/i386.h (i386_create_target_description): Update
4784 declaration.
4785 * configure.tgt: Add i386.o to gdb_target_obs.
4786 * features/Makefile (XMLTOC): Remove i386/*.xml.
4787 * features/i386/amd64-avx-avx512.c: Remove.
4788 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4789 * features/i386/amd64-avx-mpx.c: Remove.
4790 * features/i386/amd64-avx.c: Remove.
4791 * features/i386/amd64-mpx.c: Remove.
4792 * features/i386/amd64.c: Remove.
4793 * features/i386/i386-avx-avx512.c: Remove.
4794 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4795 * features/i386/i386-avx-mpx.c: Remove.
4796 * features/i386/i386-avx.c: Remove.
4797 * features/i386/i386-mmx.c: Remove.
4798 * features/i386/i386-mpx.c: Remove.
4799 * features/i386/i386.c: Remove.
4800 * i386-tdep.c: Don't include features/i386/i386*.c., include
4801 target-descriptions.h and arch/i386.h.
4802 (i386_target_description): Create target descriptions.
4803 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4804 functions. Do self tests.
4805
4806 2017-09-05 Yao Qi <yao.qi@linaro.org>
4807
4808 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4809 * features/i386/amd64-avx-avx512-linux.c: Removed.
4810 * features/i386/amd64-avx-linux.c: Removed.
4811 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4812 * features/i386/amd64-avx-mpx-linux.c: Removed.
4813 * features/i386/amd64-linux.c: Removed.
4814 * features/i386/amd64-mpx-linux.c: Removed.
4815 * features/i386/x32-avx-avx512-linux.c: Removed.
4816 * features/i386/x32-avx-linux.c: Removed.
4817 * features/i386/x32-linux.c: Removed.
4818
4819 2017-09-05 Yao Qi <yao.qi@linaro.org>
4820
4821 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
4822 features/i386/*.c.
4823 (amd64_linux_read_description): Call
4824 amd64_create_target_description.
4825 * arch/amd64.c: New file.
4826 * arch/amd64.h: New file.
4827 * configure.tgt (x86_64-*-linux*): Append amd64.o.
4828 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4829
4830 2017-09-05 Yao Qi <yao.qi@linaro.org>
4831
4832 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4833 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
4834 (amd64_linux_read_description): Create target descriptions.
4835 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4836 functions. Add unit tests.
4837 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4838 x32-core.xml.
4839 * features/i386/64bit-avx.c: Generated.
4840 * features/i386/64bit-avx512.c: Generated.
4841 * features/i386/64bit-core.c: Generated.
4842 * features/i386/64bit-linux.c: Generated.
4843 * features/i386/64bit-mpx.c: Generated.
4844 * features/i386/64bit-pkeys.c: Generated.
4845 * features/i386/64bit-segments.c: Generated.
4846 * features/i386/64bit-sse.c: Generated.
4847 * features/i386/x32-core.c: Generated.
4848 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4849 c files for amd64-linux and x32-linux.
4850
4851 2017-09-05 Yao Qi <yao.qi@linaro.org>
4852
4853 * amd64-linux-tdep.c (amd64_linux_read_description): New
4854 function.
4855 (amd64_linux_core_read_description): Call
4856 amd64_linux_read_description.
4857 (amd64_linux_init_abi): Likewise.
4858 (amd64_x32_linux_init_abi): Likewise.
4859 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4860 * x86-linux-nat.c (x86_linux_read_description): Call
4861 amd64_linux_read_description.
4862
4863 2017-09-05 Yao Qi <yao.qi@linaro.org>
4864
4865 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4866 comments.
4867
4868 2017-09-05 Yao Qi <yao.qi@linaro.org>
4869
4870 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4871 * features/i386/i386-avx-avx512-linux.c: Remove.
4872 * features/i386/i386-avx-linux.c: Remove.
4873 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4874 * features/i386/i386-avx-mpx-linux.c: Remove.
4875 * features/i386/i386-linux.c: Remove.
4876 * features/i386/i386-mmx-linux.c: Remove.
4877 * features/i386/i386-mpx-linux.c: Remove.
4878
4879 2017-09-05 Yao Qi <yao.qi@linaro.org>
4880
4881 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4882 (SFILES): Add arch/i386.c.
4883 (HFILES_NO_SRCDIR): Add arch/i386.h.
4884 * arch/i386.c: New file.
4885 * arch/i386.h: New file.
4886 * arch/tdesc.h (allocate_target_description): Declare.
4887 (set_tdesc_architecture): Declare.
4888 (set_tdesc_osabi): Declare.
4889 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4890 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4891 include arch/i386.h.
4892 (i386_linux_read_description): Remove code and call
4893 i386_create_target_description.
4894 (set_tdesc_architecture): New function.
4895 (set_tdesc_osabi): New function.
4896 * target-descriptions.h (allocate_target_description): Remove.
4897
4898 2017-09-05 Yao Qi <yao.qi@linaro.org>
4899
4900 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4901 * target-descriptions.c (tdesc_create_feature): Likewise, and
4902 adjust code.
4903 * features/i386/32bit-avx.c: Re-generated.
4904 * features/i386/32bit-avx512.c: Re-generated.
4905 * features/i386/32bit-core.c: Re-generated.
4906 * features/i386/32bit-linux.c: Re-generated.
4907 * features/i386/32bit-mpx.c: Re-generated.
4908 * features/i386/32bit-pkeys.c: Re-generated.
4909 * features/i386/32bit-sse.c: Re-generated.
4910
4911 2017-09-05 Yao Qi <yao.qi@linaro.org>
4912
4913 * regformats/regdef.h (struct reg): Override operator == and !=.
4914
4915 2017-09-05 Yao Qi <yao.qi@linaro.org>
4916
4917 * arch/tdesc.h: New file.
4918 * regformats/regdat.sh: Generate code using tdesc_create_reg.
4919 * target-descriptions.c: Update comments.
4920 * target-descriptions.h: Include "arch/tdesc.h". Remove the
4921 declarations.
4922 * features/i386/32bit-avx.c: Re-generated.
4923 * features/i386/32bit-avx512.c: Re-generated.
4924 * features/i386/32bit-core.c: Re-generated.
4925 * features/i386/32bit-linux.c: Re-generated.
4926 * features/i386/32bit-mpx.c: Re-generated.
4927 * features/i386/32bit-pkeys.c: Re-generated.
4928 * features/i386/32bit-sse.c: Re-generated.
4929
4930 2017-09-05 Yao Qi <yao.qi@linaro.org>
4931
4932 * regformats/regdat.sh: Update generated code.
4933
4934 2017-09-05 Yao Qi <yao.qi@linaro.org>
4935
4936 * regformats/regdat.sh: Adjust code order.
4937
4938 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4939
4940 * expprint.c (dump_subexp_body_standard): Use constant format
4941 string in fprintf_filtered call.
4942
4943 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4944
4945 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4946 NetBSD/i386.
4947 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4948
4949 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4950
4951 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4952
4953 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4954
4955 * bsd-kvm.o: Define _KMEMUSER.
4956 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4957 * configure: Regenerate.
4958
4959 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4960
4961 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4962 * i386-fbsd-nat.c: Likewise.
4963
4964 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4965
4966 * unittests/array-view-selftests.c: Add include of <array>.
4967
4968 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4969
4970 * spu-tdep.c (flush_ea_cache): Add missing argument to
4971 call_function_by_hand.
4972
4973 2017-09-04 Pedro Alves <palves@redhat.com>
4974
4975 * NEWS (Safer support for debugging with no debug info): New.
4976
4977 2017-09-04 Pedro Alves <palves@redhat.com>
4978
4979 * c-exp.y (function_method, function_method_void): Add current
4980 instance flags to TYPE_INSTANCE.
4981 * dwarf2read.c (check_modifier): New.
4982 (compute_delayed_physnames): Assert that only C++ adds delayed
4983 physnames. Mark fn_fields as const/volatile depending on
4984 physname.
4985 * eval.c (make_params): New type_instance_flags parameter. Use
4986 it as the new type's instance flags.
4987 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4988 flags element and pass it to make_params.
4989 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4990 instance flags element.
4991 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4992 * gdbtypes.h: Include "enum-flags.h".
4993 (type_instance_flags): New enum-flags type.
4994 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4995 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4996 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4997 (follow_type_instance_flags): New function.
4998 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4999 * parser-defs.h (follow_type_instance_flags): Declare.
5000 * valops.c (value_struct_elt_for_reference): const/volatile must
5001 match too.
5002
5003 2017-09-04 Pedro Alves <palves@redhat.com>
5004
5005 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5006 function/method scopes; lookup the nested name as a function local
5007 static variable.
5008
5009 2017-09-04 Pedro Alves <palves@redhat.com>
5010
5011 (%type <voidval>): Add function_method.
5012 * c-exp.y (exp): New production for calls with no arguments.
5013 (function_method, function_method_void_or_typelist): New
5014 productions.
5015 (exp): New production for "method()::static_var".
5016 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5017 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5018 Handle OP_FUNC_STATIC_VAR.
5019 * parse.c (operator_length_standard):
5020 Handle OP_FUNC_STATIC_VAR.
5021
5022 2017-09-04 Pedro Alves <palves@redhat.com>
5023
5024 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5025 handling.
5026 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5027 Ditto.
5028 * parse.c (operator_length_standard, operator_check_standard):
5029 Ditto.
5030 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5031
5032 2017-09-04 Pedro Alves <palves@redhat.com>
5033
5034 * ax-gdb.c: Include "typeprint.h".
5035 (gen_expr_for_cast): New function.
5036 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5037 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5038 type is unknown.
5039 * dwarf2read.c (new_symbol_full): Fallback to int instead of
5040 nodebug_data_symbol.
5041 * eval.c: Include "typeprint.h".
5042 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5043 Error out if symbol has unknown type.
5044 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5045 evaluate_subexp_for_cast.
5046 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5047 OP_VAR_MSYM_VALUE.
5048 (evaluate_subexp_for_cast): New function.
5049 * gdbtypes.c (init_nodebug_var_type): New function.
5050 (objfile_type): Use it to initialize types of variables with no
5051 debug info.
5052 * typeprint.c (error_unknown_type): New.
5053 * typeprint.h (error_unknown_type): New declaration.
5054 * compile/compile-c-types.c (convert_type_basic): Handle
5055 TYPE_CODE_ERROR; warn and fallback to int for variables with
5056 unknown type.
5057
5058 2017-09-04 Pedro Alves <palves@redhat.com>
5059
5060 * eval.c (evaluate_var_value): New function, factored out from ...
5061 (evaluate_subexp_standard): ... here.
5062
5063 2017-09-04 Pedro Alves <palves@redhat.com>
5064
5065 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5066 Remove useless assignments to 'op'.
5067
5068 2017-09-04 Pedro Alves <palves@redhat.com>
5069
5070 * eval.c (eval_skip_value): New function.
5071 (evaluate_subexp_standard): Use it.
5072
5073 2017-09-04 Pedro Alves <palves@redhat.com>
5074
5075 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5076 function name from symbol/minsym and pass it to
5077 error_call_unknown_return_type.
5078
5079 2017-09-04 Pedro Alves <palves@redhat.com>
5080
5081 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5082 * ax-gdb.c (gen_msym_var_ref): New function.
5083 (gen_expr): Handle OP_VAR_MSYM_VALUE.
5084 * eval.c (evaluate_var_msym_value): New function.
5085 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5086 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5087 to call_function_by_hand.
5088 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5089 Handle OP_VAR_MSYM_VALUE.
5090 (union exp_element) <msymbol>: New field.
5091 * minsyms.h (struct type): Forward declare.
5092 (find_minsym_type_and_address): Declare.
5093 * parse.c (write_exp_elt_msym): New function.
5094 (write_exp_msymbol): Delete, refactored as ...
5095 (find_minsym_type_and_address): ... this new function.
5096 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5097 (operator_length_standard, operator_check_standard): Handle
5098 OP_VAR_MSYM_VALUE.
5099 * std-operator.def (OP_VAR_MSYM_VALUE): New.
5100
5101 2017-09-04 Pedro Alves <palves@redhat.com>
5102
5103 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5104 TYPE_GNU_IFUNC specially here. Throw error if return type is
5105 unknown.
5106 * ada-typeprint.c (print_func_type): Handle functions with unknown
5107 return type.
5108 * c-typeprint.c (c_type_print_base): Handle functions and methods
5109 with unknown return type.
5110 * compile/compile-c-symbols.c (convert_symbol_bmsym)
5111 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5112 * compile/compile-c-types.c: Include "objfiles.h".
5113 (convert_func): For functions with unknown return type, warn and
5114 default to int.
5115 * compile/compile-object-run.c (compile_object_run): Adjust call
5116 to call_function_by_hand_dummy.
5117 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5118 call_function_by_hand.
5119 * eval.c (evaluate_subexp_standard): Adjust calls to
5120 call_function_by_hand. Handle functions and methods with unknown
5121 return type. Pass expect_type to call_function_by_hand.
5122 * f-typeprint.c (f_type_print_base): Handle functions with unknown
5123 return type.
5124 * gcore.c (call_target_sbrk): Adjust call to
5125 call_function_by_hand.
5126 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5127 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
5128 an integer address type instead of nodebug.
5129 * guile/scm-value.c (gdbscm_value_call): Adjust call to
5130 call_function_by_hand.
5131 * infcall.c (error_call_unknown_return_type): New function.
5132 (call_function_by_hand): New "default_return_type" parameter.
5133 Pass it down.
5134 (call_function_by_hand_dummy): New "default_return_type"
5135 parameter. Use it instead of defaulting to int. If there's no
5136 default and the return type is unknown, throw an error. If
5137 there's a default return type, and the called function has no
5138 debug info, then assume the function is prototyped.
5139 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5140 New "default_return_type" parameter.
5141 (error_call_unknown_return_type): New declaration.
5142 * linux-fork.c (call_lseek): Cast return type of lseek.
5143 (inferior_call_waitpid, checkpoint_command): Adjust calls to
5144 call_function_by_hand.
5145 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5146 calls to call_function_by_hand.
5147 * m2-typeprint.c (m2_procedure): Handle functions with unknown
5148 return type.
5149 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5150 (value_nsstring, print_object_command): Adjust calls to
5151 call_function_by_hand.
5152 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5153 functions with unknown return type.
5154 (pascal_type_print_func_varspec_suffix): New function.
5155 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5156 TYPE_CODE_METHOD>: Use it.
5157 * python/py-value.c (valpy_call): Adjust call to
5158 call_function_by_hand.
5159 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5160 call_function_by_hand.
5161 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5162 call_function_by_hand.
5163 * valops.c (value_allocate_space_in_inferior): Adjust call to
5164 call_function_by_hand.
5165 * typeprint.c (type_print_unknown_return_type): New function.
5166 * typeprint.h (type_print_unknown_return_type): New declaration.
5167
5168 2017-09-04 Pedro Alves <palves@redhat.com>
5169
5170 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5171 types with more than one parameter as prototyped.
5172
5173 2017-09-04 Pedro Alves <palves@redhat.com>
5174
5175 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5176 (disassemble_command): Use gdb_disassembly_flags instead of bare
5177 int.
5178 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5179 (dump_insns, do_mixed_source_and_assembly_deprecated)
5180 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5181 Use gdb_disassembly_flags instead of bare int.
5182 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5183 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5184 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5185 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5186 (enum gdb_disassembly_flag): ... values of this new enumeration.
5187 (gdb_disassembly_flags): Define.
5188 (gdb_disassembly)
5189 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5190 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5191 gdb_disassembly_flags instead of bare int.
5192 * record-btrace.c (btrace_insn_history)
5193 (record_btrace_insn_history, record_btrace_insn_history_range)
5194 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5195 instead of bare int.
5196 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5197 Use gdb_disassembly_flags instead of bare int.
5198 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5199 Define.
5200 * target-delegates.c: Regenerate.
5201 * target.c (target_insn_history, target_insn_history_from)
5202 (target_insn_history_range): Use gdb_disassembly_flags instead of
5203 bare int.
5204 * target.h: Include "disasm.h".
5205 (struct target_ops) <to_insn_history, to_insn_history_from,
5206 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5207 int.
5208 (target_insn_history, target_insn_history_from)
5209 (target_insn_history_range): Use gdb_disassembly_flags instead of
5210 bare int.
5211
5212 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5213
5214 * cli/cli-script.c (build_command_line): For if/while commands,
5215 check whether args is empty.
5216
5217 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5218
5219 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5220 (enum command_control_type): Likewise.
5221 (struct command_line): Likewise.
5222 (free_command_lines): Likewise.
5223 (struct command_lines_deleter): Likewise.
5224 (command_line_up): Likewise.
5225 (read_command_lines): Likewise.
5226 (read_command_lines_1): Likewise.
5227 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5228 (enum command_control_type): Likewise.
5229 (struct command_line): Likewise.
5230 (free_command_lines): Likewise.
5231 (struct command_lines_deleter): Likewise.
5232 (command_line_up): Likewise.
5233 (read_command_lines): Likewise.
5234 (read_command_lines_1): Likewise.
5235 * breakpoint.h: Include cli/cli-script.h.
5236 * extension-priv.h: Likewise.
5237 * gdbcmd.h: Likewise.
5238
5239 2017-09-04 Pedro Alves <palves@redhat.com>
5240
5241 * ada-lang.c (is_known_support_routine): Move sal declaration to
5242 where it is initialized.
5243 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5244 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5245 (clear_command, update_static_tracepoint): Remove init_sal
5246 references. Move declarations closer to initializations.
5247 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5248 initializations.
5249 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5250 references. Move sal declarations closer to initializations.
5251 * frame.c (find_frame_sal): Return a symtab_and_line via function
5252 return instead of output parameter. Remove init_sal references.
5253 * frame.h (find_frame_sal): Return a symtab_and_line via function
5254 return instead of output parameter.
5255 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5256 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5257 instead of memset.
5258 (gdbscm_find_pc_line): Remove init_sal reference.
5259 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5260 references. Move declarations closer to initializations.
5261 * infcmd.c (set_step_frame): Update. Move declarations closer to
5262 initializations.
5263 (finish_backward): Remove init_sal references. Move declarations
5264 closer to initializations.
5265 * infrun.c (process_event_stop_test, handle_step_into_function)
5266 (insert_hp_step_resume_breakpoint_at_frame)
5267 (insert_step_resume_breakpoint_at_caller): Likewise.
5268 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5269 (symbol_to_sal): Likewise.
5270 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5271 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5272 to its initialization.
5273 * reverse.c (save_bookmark_command): Use new/delete. Remove
5274 init_sal references. Move declarations closer to initializations.
5275 * source.c (get_current_source_symtab_and_line): Remove brace
5276 initialization.
5277 (set_current_source_symtab_and_line): Now takes the sal by const
5278 reference. Remove brace initialization.
5279 (line_info): Remove init_sal reference.
5280 * source.h (set_current_source_symtab_and_line): Now takes a
5281 symtab_and_line via const reference.
5282 * stack.c (set_current_sal_from_frame): Adjust.
5283 (print_frame_info): Adjust.
5284 (get_last_displayed_sal): Return the sal via function return
5285 instead of via output parameter. Simplify.
5286 (frame_info): Adjust.
5287 * stack.h (get_last_displayed_sal): Return the sal via function
5288 return instead of via output parameter.
5289 * symtab.c (init_sal): Delete.
5290 (find_pc_sect_line): Remove init_sal references. Move
5291 declarations closer to initializations.
5292 (find_function_start_sal): Remove init_sal references. Move
5293 declarations closer to initializations.
5294 * symtab.h (struct symtab_and_line): In-class initialize all
5295 fields.
5296 * tracepoint.c (set_traceframe_context)
5297 (print_one_static_tracepoint_marker): Remove init_sal references.
5298 Move declarations closer to initializations.
5299 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5300 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5301 declarations closer to initializations.
5302 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5303 init_sal references. Adjust.
5304
5305 2017-09-04 Pedro Alves <palves@redhat.com>
5306
5307 * ax-gdb.c (agent_command_1): Use range-for.
5308 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5309 * breakpoint.c: Include "common/array-view.h".
5310 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5311 parameter from struct symtabs_and_lines to
5312 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5313 (breakpoint_sals_to_pc): Change sals parameter from struct
5314 symtabs_and_lines to std::vector reference.
5315 (check_fast_tracepoint_sals): Change sals parameter from struct
5316 symtabs_and_lines to std::array_view. Use range-for.
5317 (decode_static_tracepoint_spec): Return a std::vector instead of
5318 symtabs_and_lines. Update.
5319 (create_breakpoint): Update.
5320 (break_range_command, until_break_command, clear_command): Update.
5321 (base_breakpoint_decode_location, bkpt_decode_location)
5322 (bkpt_probe_create_sals_from_location)
5323 (bkpt_probe_decode_location, tracepoint_decode_location)
5324 (tracepoint_probe_decode_location)
5325 (strace_marker_create_sals_from_location): Return a std::vector
5326 instead of symtabs_and_lines.
5327 (strace_marker_create_breakpoints_sal): Update.
5328 (strace_marker_decode_location): Return a std::vector instead of
5329 symtabs_and_lines. Update.
5330 (update_breakpoint_locations): Change struct symtabs_and_lines
5331 parameters to gdb::array_view. Adjust.
5332 (location_to_sals): Return a std::vector instead of
5333 symtabs_and_lines. Update.
5334 (breakpoint_re_set_default): Use std::vector instead of struct
5335 symtabs_and_lines.
5336 (decode_location_default): Return a std::vector instead of
5337 symtabs_and_lines. Update.
5338 * breakpoint.h: Include "common/array-view.h".
5339 (struct breakpoint_ops) <decode_location>: Now returns a
5340 std::vector instead of returning a symtabs_and_lines via output
5341 parameter.
5342 (update_breakpoint_locations): Change sals parameters to use
5343 gdb::array_view.
5344 * cli/cli-cmds.c (edit_command, list_command): Update to use
5345 std::vector and gdb::array_view.
5346 (ambiguous_line_spec): Adjust to use gdb::array_view and
5347 range-for.
5348 (compare_symtabs): Rename to ...
5349 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5350 const reference and adjust.
5351 (filter_sals): Rewrite using std::vector and standard algorithms.
5352 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5353 (jump_command): Update to use std::vector.
5354 * linespec.c (struct linespec_state) <canonical_names>: Update
5355 comment.
5356 (add_sal_to_sals_basic): Delete.
5357 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5358 (decode_line_2, create_sals_line_offset)
5359 (convert_address_location_to_sals, convert_linespec_to_sals)
5360 (convert_explicit_location_to_sals, parse_linespec)
5361 (event_location_to_sals, decode_line_full, decode_line_1)
5362 (decode_line_with_current_source)
5363 (decode_line_with_last_displayed, decode_objc)
5364 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5365 (linespec_result::~linespec_result): Adjust to use std::vector
5366 instead of symtabs_and_lines.
5367 * linespec.h (linespec_sals::sals): Now a std::vector.
5368 (struct linespec_result): Use std::vector, bool, and in-class
5369 initialization.
5370 (decode_line_1, decode_line_with_current_source)
5371 (decode_line_with_last_displayed): Return std::vector.
5372 * macrocmd.c (info_macros_command): Use std::vector.
5373 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5374 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5375 std::vector.
5376 * probe.h (parse_probes): Return a std::vector.
5377 * python/python.c (gdbpy_decode_line): Use std::vector and
5378 gdb::array_view.
5379 * source.c (select_source_symtab, line_info): Use std::vector.
5380 * stack.c (func_command): Use std::vector.
5381 * symtab.h (struct symtabs_and_lines): Delete.
5382 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5383
5384 2017-09-04 Pedro Alves <palves@redhat.com>
5385
5386 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5387 unittests/array-view-selftests.c.
5388 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5389 * common/array-view.h: New file.
5390 * unittests/array-view-selftests.c: New file.
5391
5392 2017-09-04 Pedro Alves <palves@redhat.com>
5393
5394 * cli/cli-cmds.c (edit_command): Pass message to
5395 ambiguous_line_spec.
5396 (list_command): Pass message to ambiguous_line_spec. Say
5397 "first"/"last" instead of "start" and "end" to be consistent with
5398 the manual.
5399 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5400 them to print formatted message.
5401
5402 2017-09-04 Pedro Alves <palves@redhat.com>
5403
5404 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5405 ftrace_update_insns by reference instead of pointer.
5406
5407 2017-09-04 Yao Qi <yao.qi@linaro.org>
5408
5409 * i386-go32-tdep.c: Include x86-xstate.h.
5410 (i386_go32_init_abi): Call i386_target_description.
5411 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5412 if xcr0 is X86_XSTATE_X87_MASK.
5413 * i386-tdep.h (tdesc_i386): Remove the declaration.
5414 (tdesc_i386_mmx): Likewise.
5415
5416 2017-09-04 Yao Qi <yao.qi@linaro.org>
5417
5418 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5419 X86_XSTATE_SSE_MASK instead of 0.
5420
5421 2017-09-04 Yao Qi <yao.qi@linaro.org>
5422
5423 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5424 i386_target_description.
5425 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5426 i386_target_description.
5427 * i386-tdep.c (i386_gdbarch_init): Likewise.
5428
5429 2017-09-04 Yao Qi <yao.qi@linaro.org>
5430
5431 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5432 (x86_darwin_init_abi_64): Call amd64_target_description.
5433 * amd64-dicos-tdep.c: Likewise.
5434 * amd64-fbsd-nat.c: Likewise.
5435 * amd64-fbsd-tdep.c: Likewise.
5436 * amd64-nbsd-tdep.c: Likewise.
5437 * amd64-obsd-tdep.c: Likewise.
5438 * amd64-sol2-tdep.c: Likewise.
5439 * amd64-windows-tdep.c: Likewise.
5440 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5441
5442 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5443
5444 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5445 (btrace_function) <insn>: Change type to use std::vector.
5446 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5447 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5448 ftrace_update_insns, ftrace_compute_global_level_offset,
5449 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5450 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5451 change to std::vector.
5452 (ftrace_update_insns): Adjust to change to std::vector, change
5453 type of INSN parameter.
5454 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5455 * record-btrace.c (btrace_call_history_insn_range,
5456 btrace_compute_src_line_range,
5457 record_btrace_frame_prev_register): Adjust to change to
5458 std::vector.
5459 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5460 to change to std::vector.
5461
5462 2017-09-03 Tom Tromey <tom@tromey.com>
5463
5464 * corefile.c (reopen_exec_file): Use std::string.
5465
5466 2017-09-03 Tom Tromey <tom@tromey.com>
5467
5468 * compile/compile.c (compile_register_name_mangled): Return
5469 std::string.
5470 * compile/compile-loc2c.c (pushf_register_address): Update.
5471 (pushf_register): Update.
5472 * compile/compile-c-types.c (convert_array): Update.
5473 * compile/compile-c-symbols.c (generate_vla_size): Update.
5474 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5475 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5476 (convert_one_symbol): Update.
5477 (generate_c_for_for_one_variable): Update.
5478 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5479 std::string.
5480 (generate_register_struct): Update.
5481 * compile/compile-internal.h (c_get_range_decl_name): Return a
5482 std::string.
5483 (compile_register_name_mangled): Return std::string.
5484
5485 2017-09-03 Tom Tromey <tom@tromey.com>
5486
5487 * utils.c (perror_string): Return a std::string.
5488 (throw_perror_with_name, perror_warning_with_name): Update.
5489
5490 2017-09-03 Tom Tromey <tom@tromey.com>
5491
5492 * demangle.c (demangle_command): Use std::string,
5493 unique_xmalloc_ptr.
5494
5495 2017-09-03 Tom Tromey <tom@tromey.com>
5496
5497 * cli/cli-setshow.c (do_set_command): Use std::string.
5498
5499 2017-09-03 Tom Tromey <tom@tromey.com>
5500
5501 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5502
5503 2017-09-03 Tom Tromey <tom@tromey.com>
5504
5505 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5506
5507 2017-09-03 Tom Tromey <tom@tromey.com>
5508
5509 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5510 gdb::unique_xmalloc_ptr.
5511
5512 2017-09-03 Tom Tromey <tom@tromey.com>
5513
5514 * thread.c (print_thread_info_1): Use string_printf.
5515 (thread_apply_command, thread_apply_all_command): Use
5516 std::string.
5517
5518 2017-09-03 Tom Tromey <tom@tromey.com>
5519
5520 * valprint.c (val_print_string): Update.
5521 * gdbcore.h (memory_error_message): Return std::string.
5522 * corefile.c (memory_error_message): Return std::string.
5523 (memory_error): Update.
5524 * breakpoint.c (insert_bp_location): Update.
5525
5526 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5527
5528 * target/waitstatus.h (target_waitstatus_to_string): Change
5529 return type to std::string.
5530 * target/waitstatus.c (target_waitstatus_to_string): Return
5531 std::string.
5532 * target.h (target_waitstatus_to_string): Remove declaration.
5533 * infrun.c (resume, clear_proceed_status_thread,
5534 print_target_wait_results, do_target_wait, save_waitstatus,
5535 stop_all_threads): Adjust.
5536 * record-btrace.c (record_btrace_wait): Adjust.
5537 * target-debug.h
5538 (target_debug_print_struct_target_waitstatus_p): Adjust.
5539
5540 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5541
5542 PR gdb/22046
5543 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5544 detection.
5545
5546 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5547
5548 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5549 for setting/unsetting environment variables on the remote target.
5550 (New remote packets): Add entries for QEnvironmentHexEncoded,
5551 QEnvironmentUnset and QEnvironmentReset.
5552 * common/environ.c (gdb_environ::operator=): Extend method to
5553 handle m_user_set_env_list and m_user_unset_env_list.
5554 (gdb_environ::clear): Likewise.
5555 (match_var_in_string): Change type of first parameter from 'char
5556 *' to 'const char *'.
5557 (gdb_environ::set): Extend method to handle
5558 m_user_set_env_list and m_user_unset_env_list.
5559 (gdb_environ::unset): Likewise.
5560 (gdb_environ::clear_user_set_env): New method.
5561 (gdb_environ::user_set_envp): Likewise.
5562 (gdb_environ::user_unset_envp): Likewise.
5563 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5564 m_user_unset_env_list on move constructor/assignment.
5565 (unset): Add new default parameter 'update_unset_list = true'.
5566 (clear_user_set_env): New method.
5567 (user_set_envp): Likewise.
5568 (user_unset_envp): Likewise.
5569 (m_user_set_env_list): New std::set.
5570 (m_user_unset_env_list): Likewise.
5571 * common/rsp-low.c (hex2str): New function.
5572 (bin2hex): New overload for bin2hex function.
5573 * common/rsp-low.c (hex2str): New prototype.
5574 (str2hex): New overload prototype.
5575 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5576 QEnvironmentUnset and QEnvironmentReset.
5577 (remote_protocol_features): Add QEnvironmentHexEncoded,
5578 QEnvironmentUnset and QEnvironmentReset packets.
5579 (send_environment_packet): New function.
5580 (extended_remote_environment_support): Likewise.
5581 (extended_remote_create_inferior): Call
5582 extended_remote_environment_support.
5583 (_initialize_remote): Add QEnvironmentHexEncoded,
5584 QEnvironmentUnset and QEnvironmentReset packet configs.
5585 * unittests/environ-selftests.c (gdb_selftest_env_var):
5586 New variable.
5587 (test_vector_initialization): New function.
5588 (test_init_from_host_environ): Likewise.
5589 (test_reinit_from_host_environ): Likewise.
5590 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5591 Likewise.
5592 (test_unset_set_empty_vector): Likewise.
5593 (test_vector_clear): Likewise.
5594 (test_std_move): Likewise.
5595 (test_move_constructor):
5596 (test_self_move): Likewise.
5597 (test_set_unset_reset): Likewise.
5598 (run_tests): Rewrite in terms of the functions above.
5599
5600 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
5601
5602 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5603 (adi_available): Use a temp variable of type CORE_ADDR as argument
5604 3 when calling target_auxv_search.
5605 (adi_normalize_address): Use masks and xor operators to calculate
5606 normalized address.
5607 (adi_read_versions, adi_write_versions, adi_print_versions)
5608 (do_examine, do_assign): Use paddress.
5609
5610 2017-08-29 John Baldwin <jhb@FreeBSD.org>
5611
5612 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5613 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5614 out of loop and add supply of FIR.
5615 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5616 add collect of FIR.
5617
5618 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5619
5620 PR gdb/21827
5621 * cli/cli-script.c (define_command): Don't convert command name
5622 to lower case.
5623
5624 2017-08-25 Joel Brobecker <brobecker@adacore.com>
5625
5626 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5627 Update all callers accordingly. Remove all code blocks handling
5628 the case where DISPP is not NULL.
5629
5630 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5631
5632 PR symtab/22003
5633 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5634 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5635 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5636
5637 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5638
5639 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5640 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5641 (read_comp_units_from_section): New parameter abbrev_section, use
5642 read_and_check_comp_unit_head, allocate signatured_type if needed.
5643 (create_all_comp_units): Update read_comp_units_from_section caller.
5644
5645 2017-08-23 Pedro Alves <palves@redhat.com>
5646
5647 PR remote/21852
5648 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5649 to null_ptid and switch to thread without reading the registers
5650 after adding the inferior.
5651
5652 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5653
5654 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5655 compile-gcc.
5656 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5657 (compile_to_object): Implement compile_gcc.
5658 (_initialize_compile): Install "set compile-gcc". Initialize
5659 compile_gcc.
5660
5661 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5662
5663 * compile/compile.c (compile_to_object): Conditionally call
5664 set_verbose. Conditionally call compile or compile_v0.
5665
5666 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
5667
5668 * sparc64-tdep.h: (adi_normalize_address): New export.
5669 * sparc-nat.h: (open_adi_tag_fd): New export.
5670 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5671 * sparc64-linux-tdep.c:
5672 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5673 (sparc64_linux_handle_segmentation_fault): New function.
5674 (sparc64_linux_init_abi): Register
5675 sparc64_linux_handle_segmentation_fault
5676 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5677 (sparc64_addr_bits_remove): New function.
5678 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5679 (MAX_PROC_NAME_SIZE): New macro.
5680 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5681 (sparc64adilist): New variable.
5682 (adi_proc_list): New variable.
5683 (find_adi_info): New function.
5684 (add_adi_info): New function.
5685 (get_adi_info_proc): New function.
5686 (get_adi_info): New function.
5687 (info_adi_command): New function.
5688 (read_maps_entry): New function.
5689 (adi_available): New function.
5690 (adi_normalize_address): New function.
5691 (adi_align_address): New function.
5692 (adi_convert_byte_count): New function.
5693 (adi_tag_fd): New function.
5694 (adi_is_addr_mapped): New function.
5695 (adi_read_versions): New function.
5696 (adi_write_versions): New function.
5697 (adi_print_versions): New function.
5698 (do_examine): New function.
5699 (do_assign): New function.
5700 (adi_examine_command): New function.
5701 (adi_assign_command): New function.
5702 (_initialize_sparc64_adi_tdep): New function.
5703
5704 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * breakpoint.c (breakpoints_info): Rename to ...
5707 (info_breakpoints_command): ... this.
5708 (watchpoints_info): Rename to ...
5709 (info_watchpoints_command): ... this.
5710 (tracepoints_info): Rename to ...
5711 (info_tracepoints_command): ... this.
5712 (_initialize_breakpoint): Adjust.
5713 * dcache.c (dcache_info): Rename to ...
5714 (info_display_command): ... this.
5715 (_initialize_dcache): Adjust.
5716 * frame.h (args_info): Rename to ...
5717 (info_args_command): ... this.
5718 (locals_info): Rename to ...
5719 (info_locals_command): ... this.
5720 * infcmd.c (nofp_registers_info): Rename to ...
5721 (info_registers_command): ... this.
5722 (float_info): Rename to ...
5723 (info_float_command): ... this.
5724 (program_info): Rename to ...
5725 (info_program_command): ... this.
5726 (all_registers_info): Rename to ...
5727 (info_all_registers_command): ... this.
5728 (vector_info): Rename to ...
5729 (info_vector_command): ... this.
5730 (float_info): Rename to ...
5731 (info_float_command): ... this.
5732 (_initialize_infcmd): Adjust.
5733 * inferior.h (term_info): Rename to ...
5734 (info_terminal_command): ... this.
5735 * inflow.c (term_info): Rename to ...
5736 (info_terminal_command): ... this.
5737 (_initialize_inflow): Adjust.
5738 * infrun.c (signals_info): Rename to ...
5739 (info_signals_command): ... this.
5740 (_initialize_infrun): Adjust.
5741 * objc-lang.c (classes_info): Rename to ...
5742 (info_classes_command): ... this.
5743 (selectors_info): Rename to ...
5744 (info_selectors_command): ... this.
5745 (_initialize_objc_language): Adjust.
5746 * printcmd.c (sym_info): Rename to ...
5747 (info_symbol_command): ... this.
5748 (address_info): Rename to ...
5749 (info_address_command): ... this.
5750 (display_info): Rename to ...
5751 (info_display_command): ... this.
5752 (_initialize_printcmd): Adjust.
5753 * reverse.c (bookmarks_info): Rename to ...
5754 (info_breakpoints_command): ... this.
5755 (_initialize_reverse): Adjust.
5756 * ser-go32.c (dos_info): Rename to ...
5757 (info_serial_command): ... this.
5758 (_initialize_ser_dos): Adjust.
5759 * skip.c (skip_info): Rename to ...
5760 (info_skip_command): ... this.
5761 (_initialize_step_skip): Adjust.
5762 * source.c (line_info): Rename to ...
5763 (info_line_command): ... this.
5764 (source_info): Rename to ...
5765 (info_source_command)
5766 * stack.c (frame_info): Rename to ...
5767 (info_frame_command): ... this.
5768 (locals_info): Rename to ...
5769 (info_locals_command): ... this.
5770 (args_info): Rename to ...
5771 (info_args_command): ... this.
5772 (_initialize_stack): Adjust.
5773 * symtab.c (sources_info): Rename to ...
5774 (info_sources_command): ... this.
5775 (variables_info): Rename to ...
5776 (info_variables_command): ... this.
5777 (functions_info): Rename to ...
5778 (info_functions_command): ... this.
5779 (types_info): Rename to ...
5780 (info_types_command): ... this.
5781 (_initialize_symtab): Adjust.
5782 * target.c (target_info): Rename to ...
5783 (info_target_command): ... this.
5784 (initialize_targets): Adjust.
5785 * tracepoint.c (tvariables_info): Rename to ...
5786 (info_tvariables_command): ... this.
5787 (scope_info): Rename to ...
5788 (info_scope_command): ... this.
5789 (trace_dump_actions): Adjust.
5790 (_initialize_tracepoint): Adjust.
5791
5792 2017-08-22 Tom Tromey <tom@tromey.com>
5793
5794 * breakpoint.h (install_breakpoint): Update.
5795 * breakpoint.c (add_solib_catchpoint): Update.
5796 (install_breakpoint): Change argument to a std::unique_ptr.
5797 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5798 (create_breakpoint_sal, create_breakpoint): Update.
5799 (watch_command_1, catch_exec_command_1)
5800 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5801 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5802 Return the breakpoint.
5803 (set_raw_breakpoint_without_location, set_raw_breakpoint)
5804 (new_single_step_breakpoint): Update.
5805 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5806 std::unique_ptr.
5807 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5808 std::unique_ptr.
5809 * break-catch-sig.c (create_signal_catchpoint): Use
5810 std::unique_ptr.
5811 * ada-lang.c (create_ada_exception_catchpoint): Use
5812 std::unique_ptr.
5813
5814 2017-08-22 Tom Tromey <tom@tromey.com>
5815
5816 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5817
5818 2017-08-22 Tom Tromey <tom@tromey.com>
5819
5820 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5821 (lookup_partial_symbol): Update.
5822
5823 2017-08-22 Tom Tromey <tom@tromey.com>
5824
5825 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5826 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5827 (find_and_open_source, symtab_to_fullname): Update.
5828 * psymtab.c (psymtab_to_fullname): Update.
5829
5830 2017-08-22 Tom Tromey <tom@tromey.com>
5831
5832 * exec.c (exec_file_attach): Update.
5833 * linux-thread-db.c (try_thread_db_load): Update.
5834 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5835 * utils.c (gdb_realpath): Change return type.
5836 (gdb_realpath_keepfile): Update.
5837 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5838 (_initialize_utils): Register the new self test.
5839 * source.c (openp): Update.
5840 (find_and_open_source): Update.
5841 * nto-tdep.c (nto_find_and_open_solib): Update.
5842 * main.c (set_gdb_data_directory): Update.
5843 (captured_main_1): Update.
5844 * dwarf2read.c (dwarf2_get_dwz_file): Update
5845 (dw2_map_symbol_filenames): Update.
5846 * auto-load.c (auto_load_safe_path_vec_update): Update.
5847 (filename_is_in_auto_load_safe_path_vec): Change type of
5848 "filename_realp".
5849 (auto_load_objfile_script): Update.
5850 (file_is_auto_load_safe): Update. Use std::string.
5851 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5852
5853 2017-08-22 Tom Tromey <tom@tromey.com>
5854
5855 * utils.c (gdb_realpath_keepfile): Return a
5856 gdb::unique_xmalloc_ptr.
5857 * exec.c (exec_file_attach): Update.
5858 * utils.h (gdb_realpath_keepfile): Return a
5859 gdb::unique_xmalloc_ptr.
5860
5861 2017-08-22 Tom Tromey <tom@tromey.com>
5862
5863 * compile/compile.c (compile_file_command): Use
5864 gdb::unique_xmalloc_ptr, std::string.
5865 * utils.c (gdb_abspath): Change return type.
5866 * source.c (openp): Update.
5867 * objfiles.c (allocate_objfile): Update.
5868 * main.c (set_gdb_data_directory): Update.
5869 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5870
5871 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
5872
5873 * cli-cmds.c (list_commands): List actual code around more than
5874 one location.
5875
5876 2017-08-21 John Baldwin <jhb@FreeBSD.org>
5877
5878 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5879
5880 2017-08-21 Pedro Alves <palves@redhat.com>
5881
5882 PR gdb/19487
5883 * c-exp.y (variable production): Handle function aliases.
5884 * minsyms.c (msymbol_is_text): New function.
5885 * minsyms.h (msymbol_is_text): Declare.
5886 * symtab.c (find_function_alias_target): New function.
5887 * symtab.h (find_function_alias_target): Declare.
5888
5889 2017-08-21 Pedro Alves <palves@redhat.com>
5890
5891 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5892 typedefs.
5893 * typeprint.c (whatis_exp): If handling "whatis", and expression
5894 is OP_TYPE, strip one typedef level. Otherwise don't strip
5895 typedefs here.
5896 * valops.c (value_cast): Save "to" type before resolving
5897 stubs/typedefs. Use that type as resulting value's type.
5898
5899 2017-08-18 Tom Tromey <tom@tromey.com>
5900 Pedro Alves <palves@redhat.com>
5901
5902 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5903 * sol-thread.c (sol_thread_resume, sol_thread_wait)
5904 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5905 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5906 * proc-service.c (ps_xfer_memory): Use scoped_restore.
5907 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5908 (linux_get_siginfo_data): Add "thread" argument. Use
5909 scoped_restore.
5910 * linux-nat.c (linux_child_follow_fork)
5911 (check_stopped_by_watchpoint): Use scoped_restore.
5912 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5913 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5914 (restore_inferior_ptid, save_inferior_ptid): Remove.
5915 * btrace.c (btrace_fetch): Use scoped_restore.
5916 * bsd-uthread.c (bsd_uthread_fetch_registers)
5917 (bsd_uthread_store_registers): Use scoped_restore.
5918 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5919 scoped_restore.
5920 * aix-thread.c (aix_thread_resume, aix_thread_wait)
5921 (aix_thread_xfer_partial): Use scoped_restore.
5922 * inferior.h (save_inferior_ptid): Remove.
5923
5924 2017-08-18 Yao Qi <yao.qi@linaro.org>
5925
5926 PR tdep/21818
5927 * arm-tdep.c (gdb_print_insn_arm): Mark
5928 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5929
5930 2017-08-18 Yao Qi <yao.qi@linaro.org>
5931
5932 * NEWS: Mention GDBserver's new option "--selftest".
5933 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5934 * selftest.c: Move it to common/selftest.c.
5935 * selftest.h: Move it to common/selftest.h.
5936 * selftest-arch.c (reset): New function.
5937 (tests_with_arch): Call reset.
5938
5939 2017-08-18 Yao Qi <yao.qi@linaro.org>
5940
5941 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
5942 instead of exception_fprintf and printf_filtered.
5943
5944 2017-08-18 Yao Qi <yao.qi@linaro.org>
5945
5946 * selftest.c (register_self_test): Rename it to
5947 selftests::register_test.
5948 (run_self_tests): selftest::run_tests.
5949 * selftest.h: Update declarations.
5950 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5951 selftests::register_test_foreach_arch.
5952 * selftest-arch.h: Update declaration.
5953 * aarch64-tdep.c: Update.
5954 * arm-tdep.c: Likewise.
5955 * disasm-selftests.c: Likewise.
5956 * dwarf2loc.c: Likewise.
5957 * dwarf2-frame.c: Likewise.
5958 * findvar.c: Likewise.
5959 * gdbarch-selftests.c: Likewise.
5960 * maint.c (maintenance_selftest): Likewise.
5961 * regcache.c: Likewise.
5962 * rust-exp.y: Likewise.
5963 * selftest-arch.c: Likewise.
5964 * unittests/environ-selftests.c: Likewise.
5965 * unittests/function-view-selftests.c: Likewise.
5966 * unittests/offset-type-selftests.c: Likewise.
5967 * unittests/optional-selftests.c: Likewise.
5968 * unittests/scoped_restore-selftests.c: Likewise.
5969 * utils-selftests.c: Likewise.
5970
5971 2017-08-17 Pedro Alves <palves@redhat.com>
5972
5973 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5974 local.
5975
5976 2017-08-17 Pedro Alves <palves@redhat.com>
5977
5978 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5979 field.
5980 (reset_die_in_process): Delete, replaced by ...
5981 (process_die_scope): ... this new class. Make it responsible for
5982 freeing cu->line_header too.
5983 (process_die): Use process_die_scope.
5984 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5985 cu->line_header_die_owner. Don't release the line header if it's
5986 owned by the CU.
5987 (setup_type_unit_groups): Make the CU/DIE own the line header.
5988 Don't release the line header here.
5989
5990 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
5991
5992 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5993
5994 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
5995
5996 * NEWS: Mention new shortcuts for nexti and stepi in TUI
5997 Single-Key mode
5998
5999 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
6000
6001 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6002 mode command list.
6003
6004 2017-08-15 Stafford Horne <shorne@gmail.com>
6005
6006 * MAINTAINERS (Write After Approval): Add Stafford Horne.
6007
6008 2017-08-15 Stafford Horne <shorne@gmail.com>
6009
6010 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6011
6012 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
6013
6014 PR gdb/21954
6015 * infcmd.c (unset_environment_command): Use the 'clear' method on
6016 the environment instead of resetting it.
6017
6018 2017-08-15 John Baldwin <jhb@FreeBSD.org>
6019
6020 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6021 platforms.
6022
6023 2017-08-14 Tom Tromey <tom@tromey.com>
6024
6025 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6026 (print_binary_chars): Likewise.
6027 (BITS_IN_BYTES): Remove.
6028
6029 2017-08-14 Tom Tromey <tom@tromey.com>
6030
6031 PR gdb/21675
6032 * valprint.c (LOW_ZERO): Change value to 034.
6033 (print_octal_chars): Add static_asserts for octal constants.
6034 * printcmd.c (print_scalar_formatted): Add 'd' case.
6035
6036 2017-08-11 Tom Tromey <tom@tromey.com>
6037
6038 * symfile.c (add_symbol_file_command): Use std::vector.
6039
6040 2017-08-14 Tom Tromey <tom@tromey.com>
6041
6042 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6043 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6044 std::move.
6045 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6046
6047 2017-08-11 Pedro Alves <palves@redhat.com>
6048
6049 * infrun.c (process_event_stop_test): Adjust
6050 function_name_is_marked_for_skip call.
6051 * skip.c: Include <list>.
6052 (skiplist_entry): Make it a class with private fields, and
6053 getters/setters.
6054 (skiplist_entry_chain): Delete.
6055 (skiplist_entries): New.
6056 (skiplist_entry_count): Delete.
6057 (highest_skiplist_entry_num): New.
6058 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6059 (add_skiplist_entry): Delete.
6060 (skiplist_entry::skiplist_entry): New.
6061 (skiplist_entry::add_entry): New.
6062 (skip_file_command, skip_function): Adjust.
6063 (compile_skip_regexp): Delete.
6064 (skip_command): Don't compile regexp here. Adjust to use
6065 skiplist_entry::add_entry.
6066 (skip_info): Adjust to use range-for and getters.
6067 (skip_enable_command, skip_disable_command): Adjust to use
6068 range-for and setters.
6069 (skip_delete_command): Adjust to use std::list.
6070 (add_skiplist_entry): Delete.
6071 (skip_file_p): Delete, refactored as ...
6072 (skiplist_entry::do_skip_file_p): ... this new method.
6073 (skip_gfile_p): Delete, refactored as ...
6074 (skiplist_entry::do_gskip_file_p): ... this new method.
6075 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6076 (skiplist_entry::skip_function_p): ... this new method.
6077 (function_name_is_marked_for_skip): Now returns bool, and takes
6078 the function sal by const reference. Adjust to use range-for and
6079 skiplist_entry methods.
6080 (_initialize_step_skip): Remove references to
6081 skiplist_entry_chain, skiplist_entry_count.
6082 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6083 takes the function sal by const reference.
6084
6085 2017-08-11 Yao Qi <yao.qi@linaro.org>
6086
6087 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6088 (dwarf2_frame_cache): Remove reset_cache_cleanup.
6089 (dwarf2_frame_cache):
6090 * frame-unwind.c (frame_unwind_try_unwinder): Catch
6091 RETURN_MASK_ALL and set *this_case to NULL.
6092 * frame-unwind.h: Update comments.
6093
6094 2017-08-11 Yao Qi <yao.qi@linaro.org>
6095
6096 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6097 (dwarf2_frame_state_copy_regs): Remove.
6098 (dwarf2_frame_state_free_regs): Remove.
6099 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6100 (dwarf2_restore_rule): Call method .alloc_regs instead of
6101 dwarf2_frame_state_alloc_regs.
6102 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
6103 constructor. Call std::move.
6104 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6105 (dwarf2_frame_cache): Likewise.
6106
6107 [GDB_SELF_TEST]: Include selftest.h and
6108 selftest-arch.h.
6109 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6110 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6111 execute_cfa_program_test.
6112
6113 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6114 copy ctor, assignment operator, move assignment.
6115 <alloc_regs>: New method.
6116 <swap>: New method.
6117 (struct dwarf2_frame_state): Delete dtor.
6118 (dwarf2_frame_state_alloc_regs): Remove declaration.
6119 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6120 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6121
6122 2017-08-11 Yao Qi <yao.qi@linaro.org>
6123
6124 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6125 (dwarf2_frame_state::dwarf2_frame_state): New.
6126 (dwarf2_frame_state::~dwarf2_frame_state): New.
6127 (dwarf2_fetch_cfa_info): Update.
6128 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
6129 rather than a pointer. Update code.
6130 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6131 dtor.
6132 <data_align, code_align, retaddr_column>: Change them to const.
6133 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6134 to bool.
6135
6136 2017-08-11 Yao Qi <yao.qi@linaro.org>
6137
6138 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6139 <loc.exp>: New field.
6140 * dwarf2-frame.c (execute_cfa_program): Update.
6141 (dwarf2_frame_prev_register): Update.
6142
6143 2017-08-10 Pedro Alves <palves@redhat.com>
6144
6145 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6146
6147 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6148
6149 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6150 (fbsd_pending_children): Use std::list.
6151 (fbsd_remember_child): Likewise.
6152 (fbsd_is_child_pending): Likewise.
6153 (fbsd_pending_vfork_done): Use std::forward_list.
6154 (fbsd_add_vfork_done): Likewise.
6155 (fbsd_is_vfork_done_pending): Likewise.
6156 (fbsd_next_vfork_done): Likewise.
6157
6158 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6159
6160 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6161 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6162 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6163 for `mapfilename'.
6164 (fbsd_xfer_partial): Use gdb::byte_vector.
6165 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6166
6167 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6168
6169 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6170 "filestuff.h".
6171 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6172
6173 2017-08-09 Tom Tromey <tom@tromey.com>
6174
6175 * skip.c (skiplist_entry): New constructor.
6176 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6177 (skiplist_entry::file_is_glob): Now bool.
6178 (skiplist_entry::file, skiplist_entry::function): Now
6179 std::string.
6180 (make_skip_entry): Return a unique_ptr. Use new.
6181 (free_skiplist_entry, free_skiplist_entry_cleanup)
6182 (make_free_skiplist_entry_cleanup): Remove.
6183 (skip_command, skip_disable_command, add_skiplist_entry)
6184 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6185 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6186 (function_name_is_marked_for_skip): Update.
6187 (skip_delete_command): Update. Use delete.
6188
6189 2017-08-09 Jiong Wang <jiong.wang@arm.com>
6190
6191 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6192 (aarch64_linux_core_read_description): New function.
6193 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6194
6195 2017-08-09 Pedro Alves <palves@redhat.com>
6196
6197 * cp-name-parser.y (cp_comp_to_string): Return a
6198 gdb::unique_xmalloc_ptr<char>.
6199 * cp-support.c (replace_typedefs_qualified_name)
6200 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6201 (cp_canonicalize_string_full): Use op= instead of explicit
6202 convertion.
6203 (cp_class_name_from_physname, method_name_from_physname)
6204 (cp_func_name, cp_remove_params): Adjust to use
6205 gdb::unique_xmalloc_ptr<char>.
6206 * cp-support.h (cp_comp_to_string): Return a
6207 gdb::unique_xmalloc_ptr<char>.
6208 * python/py-type.c (typy_lookup_type): Adjust to use
6209 gdb::unique_xmalloc_ptr<char>.
6210
6211 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6212
6213 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6214
6215 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6216 Yao Qi <yao.qi@linaro.org>
6217
6218 * cp-support.c (cp_canonicalize_string_full): Use
6219 gdb::unique_xmalloc_ptr<char>.
6220 (cp_canonicalize_string): Likewise.
6221
6222 2017-08-09 Yao Qi <yao.qi@linaro.org>
6223
6224 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6225 * regformats/i386/amd64-avx-avx512.dat: Remove.
6226 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6227 * regformats/i386/amd64-avx-mpx.dat:Remove.
6228 * regformats/i386/amd64-avx.dat: Remove.
6229 * regformats/i386/amd64-mpx.dat: Remove.
6230 * regformats/i386/i386-avx-avx512.dat: Remove.
6231 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6232 * regformats/i386/i386-avx-mpx.dat: Remove.
6233 * regformats/i386/i386-mmx.dat: Remove.
6234 * regformats/i386/i386-mpx.dat: Remove.
6235
6236 2017-08-09 Yao Qi <yao.qi@linaro.org>
6237
6238 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6239 * amd64-tdep.c: Don't include features/i386/x32*.c.
6240 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6241 functions.
6242 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6243 and i386/x32-avx-avx512.
6244 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6245 and i386/x32.xml.
6246 * features/i386/x32-avx-avx512.c: Removed.
6247 * features/i386/x32-avx-avx512.xml: Removed.
6248 * features/i386/x32-avx.c: Removed.
6249 * features/i386/x32-avx.xml: Removed.
6250 * features/i386/x32.c: Removed.
6251 * features/i386/x32.xml: Removed.
6252 * regformats/i386/x32-avx-avx512.dat: Removed.
6253 * regformats/i386/x32-avx.dat: Removed.
6254 * regformats/i386/x32.dat: Removed.
6255
6256 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6257
6258 PR breakpoints/21886
6259 * mem-break.c (default_memory_insert_breakpoint): Use
6260 `->placed_address' rather than `->reqstd_address' for the
6261 breakpoint location.
6262
6263 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6264
6265 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6266 assertions.
6267
6268 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6269
6270 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6271 a union of `tdep_info', `tdesc_data' and `id'.
6272 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6273 rather than `info.tdep_info'.
6274 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6275 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6276 * i386-tdep.c (i386_gdbarch_init): Likewise.
6277 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6278 * mips-tdep.c (mips_gdbarch_init): Likewise.
6279 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6280 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6281 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6282 `info.tdep_info'.
6283 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6284 `info.tdep_info'.
6285 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6286 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6287 `info.tdep_info'.
6288 * spu-tdep.c (spu_gdbarch_init): Likewise.
6289 * gdbarch.h: Regenerate.
6290
6291 2017-08-07 Leszek Swirski <leszeks@google.com>
6292
6293 PR symtab/20899
6294 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6295
6296 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6297
6298 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6299 (gdbsim_open): Rename gdb_argv args object to argv.
6300
6301 2017-08-05 Tom Tromey <tom@tromey.com>
6302
6303 * compile/compile-object-load.c (compile_object_load): Use
6304 gdb::unique_xmalloc_ptr.
6305 * cli/cli-dump.c (scan_filename): Rename from
6306 scan_filename_with_cleanup. Change return type.
6307 (scan_expression): Rename from scan_expression_with_cleanup.
6308 Change return type.
6309 (dump_memory_to_file, dump_value_to_file, restore_command):
6310 Use gdb::unique_xmalloc_ptr. Update.
6311 * cli/cli-cmds.c (find_and_open_script): Use
6312 gdb::unique_xmalloc_ptr.
6313 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6314 * symmisc.c (maintenance_print_symbols)
6315 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6316 * symfile.c (symfile_bfd_open, generic_load)
6317 (add_symbol_file_command, remove_symbol_file_command): Use
6318 gdb::unique_xmalloc_ptr.
6319 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6320 * psymtab.c (maintenance_print_psymbols): Use
6321 gdb::unique_xmalloc_ptr.
6322 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6323 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6324 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6325 (reload_shared_libraries_1): Likewise.
6326
6327 2017-08-05 Tom Tromey <tom@tromey.com>
6328
6329 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6330 (rust_op_vector, rust_set_vector): New typedefs.
6331 (current_parser): New global.
6332 (work_obstack): Change to pointer type. Update all users.
6333 (rust_ast, pstate): Remove globals.
6334 (struct rust_parser): New.
6335 (%union) <params, field_inits>: Change type.
6336 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6337 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6338 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6339 (convert_params_to_types, convert_params_to_expression): Change
6340 type of "params".
6341 (ast_string): Change type of "fields".
6342 (rust_parse): Make a rust_parser. Remove cleanups.
6343 (rust_lex_tests): Make and install an auto_obstack.
6344
6345 2017-08-04 Yao Qi <yao.qi@linaro.org>
6346
6347 * configure.srv (ipa_x32_linux_regobj): New.
6348 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6349 instead of X86_TDESC_AVX512.
6350 (initialize_low_tracepoint): Call
6351 init_registers_x32_avx_avx512_linux.
6352
6353 2017-08-04 Yao Qi <yao.qi@linaro.org>
6354
6355 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6356
6357 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6358
6359 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6360
6361 2017-08-03 Tom Tromey <tom@tromey.com>
6362
6363 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6364 Remove.
6365 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6366
6367 2017-08-03 Tom Tromey <tom@tromey.com>
6368
6369 * python/py-param.c (compute_enum_values): Use gdb_argv.
6370
6371 2017-08-03 Tom Tromey <tom@tromey.com>
6372
6373 * utils.h (struct gdb_argv_deleter): New.
6374 (gdb_argv): New class.
6375 * utils.c (gdb_argv::reset): New method.
6376 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6377 * tracefile.c (tsave_command): Use gdb_argv.
6378 * top.c (new_ui_command): Use gdb_argv.
6379 * symmisc.c (maintenance_print_symbols)
6380 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6381 * symfile.c (symbol_file_command, generic_load)
6382 (remove_symbol_file_command): Use gdb_argv.
6383 * stack.c (backtrace_command): Use gdb_argv.
6384 * source.c (add_path, show_substitute_path_command)
6385 (unset_substitute_path_command, set_substitute_path_command):
6386 Use gdb_argv.
6387 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6388 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6389 * remote.c (extended_remote_run, remote_put_command)
6390 (remote_get_command, remote_delete_command): Use gdb_argv.
6391 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6392 (gdbsim_open): Use gdb_argv.
6393 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6394 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6395 * procfs.c (procfs_info_proc): Use gdb_argv.
6396 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6397 * infrun.c (handle_command): Use gdb_argv.
6398 * inferior.c (add_inferior_command, clone_inferior_command):
6399 Use gdb_argv.
6400 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6401 * exec.c (exec_file_command): Use gdb_argv.
6402 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6403 * compile/compile.c (build_argc_argv): Use gdb_argv.
6404
6405 2017-08-03 Tom Tromey <tom@tromey.com>
6406
6407 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6408
6409 2017-08-03 Tom Tromey <tom@tromey.com>
6410
6411 * python/python.c (compute_python_string): Return std::string.
6412 (gdbpy_eval_from_control_command): Update.
6413 (do_start_initialization): Use std::string.
6414 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6415 xstrprintf.
6416 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6417 xstrprintf.
6418
6419 2017-08-03 Tom Tromey <tom@tromey.com>
6420
6421 * top.h (do_restore_instream_cleanup): Remove.
6422 * top.c (do_restore_instream_cleanup): Remove.
6423 (read_command_file): Use scoped_restore.
6424 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6425
6426 2017-08-03 Tom Tromey <tom@tromey.com>
6427
6428 * cli/cli-script.c (execute_user_command)
6429 (execute_control_command): Use scoped_restore.
6430
6431 2017-08-03 Tom Tromey <tom@tromey.com>
6432
6433 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6434 (execute_user_command): Remove user_call_depth; use
6435 user_args_stack's size instead.
6436
6437 2017-08-03 Tom Tromey <tom@tromey.com>
6438
6439 * top.h (in_user_command): Remove.
6440 * top.c (in_user_command): Remove.
6441 * cli/cli-script.c (do_restore_user_call_depth)
6442 (execute_user_command): Update.
6443
6444 2017-08-03 Tom Tromey <tom@tromey.com>
6445
6446 * valops.c (search_struct_method): Use gdb::byte_vector.
6447 * valarith.c (value_concat): Use std::vector.
6448 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6449 (simple_search_memory): Likewise.
6450 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6451 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6452 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6453 * elfread.c (elf_rel_plt_read): Use std::string.
6454 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6455 * cli/cli-dump.c (restore_section_callback): Use
6456 gdb::byte_vector.
6457
6458 2017-08-03 Tom Tromey <tom@tromey.com>
6459
6460 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6461
6462 2017-08-03 Tom Tromey <tom@tromey.com>
6463
6464 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6465 (tui_register_format): Use scoped_restore.
6466
6467 2017-08-03 Tom Tromey <tom@tromey.com>
6468
6469 * reverse.c (exec_direction_default): Remove.
6470 (exec_reverse_once): Use scoped_restore.
6471 * remote.c (restore_remote_timeout): Remove.
6472 (remote_flash_erase, remote_flash_write, remote_flash_done)
6473 (readchar, remote_serial_write): Use scoped_restore.
6474 * cli/cli-script.c (struct source_cleanup_lines_args)
6475 (source_cleanup_lines): Remove.
6476 (script_from_file): Use scoped_restore.
6477 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6478 (source_command): Use scoped_restore.
6479
6480 2017-08-03 Tom Tromey <tom@tromey.com>
6481
6482 * utils.h (make_cleanup_free_so): Remove.
6483 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6484 * solist.h (struct so_deleter): New.
6485 (so_list_up): New typedef.
6486 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6487
6488 2017-08-03 Tom Tromey <tom@tromey.com>
6489
6490 * utils.h (make_cleanup_restore_current_language): Remove.
6491 * utils.c (do_restore_current_language)
6492 (make_cleanup_restore_current_language): Remove.
6493 * parse.c (parse_exp_in_context_1)
6494 (parse_expression_with_language): Use
6495 scoped_restore_current_language.
6496 * mi/mi-main.c (mi_cmd_execute): Use
6497 scoped_restore_current_language.
6498 * language.h (scoped_restore_current_language): New class.
6499
6500 2017-08-03 Tom Tromey <tom@tromey.com>
6501
6502 * compile/compile.c (cleanup_unlink_file): Remove.
6503 (compile_to_object): Use gdb::unlinker.
6504 (eval_compile_command): Likewise.
6505
6506 2017-08-03 Tom Tromey <tom@tromey.com>
6507
6508 * utils.h (make_cleanup_fclose): Remove.
6509 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6510
6511 2017-08-03 Tom Tromey <tom@tromey.com>
6512
6513 * top.c (open_terminal_stream): Return gdb_file_up.
6514 (new_ui_command): Update.
6515
6516 2017-08-03 Tom Tromey <tom@tromey.com>
6517
6518 * source.c (print_source_lines_base, forward_search_command)
6519 (reverse_search_command): Use gdb_file_up.
6520
6521 2017-08-03 Tom Tromey <tom@tromey.com>
6522
6523 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6524
6525 2017-08-03 Tom Tromey <tom@tromey.com>
6526
6527 * cli/cli-cmds.c (find_and_open_script): Change return type.
6528 Remove "streamp" and "full_path" parameters.
6529 (source_script_with_search): Update.
6530 * auto-load.c (source_script_file): Update.
6531 * cli/cli-cmds.h (find_and_open_script): Change type.
6532 (open_script): New struct.
6533
6534 2017-08-03 Tom Tromey <tom@tromey.com>
6535
6536 * xml-support.c (xml_fetch_content_from_file): Update.
6537 * ui-file.c (stdio_file::open): Update.
6538 * tracefile-tfile.c (tfile_start): Update.
6539 * remote.c (remote_file_put, remote_file_get): Update.
6540 * nat/linux-procfs.c (linux_proc_get_int)
6541 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6542 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6543 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6544 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6545 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6546 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6547 * linux-nat.c (linux_proc_pending_signals): Update.
6548 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6549 (file_closer): Remove.
6550 * compile/compile.c (compile_to_object): Update.
6551 * common/filestuff.h (struct gdb_file_deleter): New.
6552 (gdb_file_up): New typedef.
6553 (gdb_fopen_cloexec): Change return type.
6554 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6555 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6556 (dump_binary_file, restore_binary_file): Update.
6557 * auto-load.c (auto_load_objfile_script_1): Update.
6558
6559 2017-08-03 Tom Tromey <tom@tromey.com>
6560
6561 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6562 (info_static_tracepoint_markers_command): Likewise.
6563 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6564 * skip.c (skip_info): Use ui_out_emit_table.
6565 * progspace.c (print_program_space): Use ui_out_emit_table.
6566 * osdata.c (info_osdata): Use ui_out_emit_table.
6567 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6568 ui_out_emit_table.
6569 * linux-thread-db.c (info_auto_load_libthread_db): Use
6570 ui_out_emit_table.
6571 * inferior.c (print_inferior): Use ui_out_emit_table.
6572 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6573 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6574 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6575 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6576 * ui-out.h (class ui_out_emit_table): New.
6577
6578 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6579
6580 * mips-tdep.c (mips_fpu_type_str): New function.
6581 (mips_dump_tdep): Call it.
6582
6583 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6584
6585 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6586 `->mips_fpu_type'.
6587
6588 2017-07-31 Xavier Roirand <roirand@adacore.com>
6589
6590 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6591
6592 2017-07-27 Xavier Roirand <roirand@adacore.com>
6593
6594 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6595
6596 2017-07-26 Yao Qi <yao.qi@linaro.org>
6597
6598 * cli/cli-cmds.c (maintenancechecklist): New variable.
6599 * gdbcmd.h (maintenancechecklist): Declare it.
6600 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6601 Call i386_linux_read_description with different masks.
6602 * maint.c (maintenance_check_command): New function.
6603 (_initialize_maint_cmds): Call add_prefix_cmd.
6604 * target-descriptions.c (tdesc_reg): override operator != and ==.
6605 (tdesc_type): Likewise.
6606 (tdesc_feature): Likewise.
6607 (target_desc): Likewise.
6608 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6609 (maintenance_check_xml_descriptions): New function.
6610 (_initialize_target_descriptions) Add command "xml-descriptions".
6611 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6612
6613 2017-07-26 Yao Qi <yao.qi@linaro.org>
6614
6615 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6616 Include features/i386/32bit-*.c.
6617 (i386_linux_read_description): Generate target description if it
6618 doesn't exist.
6619 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6620 functions.
6621 * features/i386/32bit-linux.c: Re-generated.
6622 * features/i386/32bit-sse.c: Likewise.
6623 * target-descriptions.c (print_c_feature::visit): Print code to
6624 set register number if needed.
6625 (print_c_feature) <m_next_regnum>: New field.
6626
6627 2017-07-26 Yao Qi <yao.qi@linaro.org>
6628
6629 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6630 (FEATURE_XMLFILES): New.
6631 (FEATURE_CFILES): New.
6632 New rules.
6633 (clean-cfiles): Remove generated c files.
6634 * features/i386/32bit-avx.c: Generated.
6635 * features/i386/32bit-avx512.c: Generated.
6636 * features/i386/32bit-core.c: Generated.
6637 * features/i386/32bit-linux.c: Generated.
6638 * features/i386/32bit-mpx.c: Generated.
6639 * features/i386/32bit-pkeys.c: Generated.
6640 * features/i386/32bit-sse.c: Generated.
6641 * target-descriptions.c: Include algorithm.
6642 (tdesc_element_visitor): Add method visit_end.
6643 (print_c_tdesc): Implement visit_end.
6644 (print_c_tdesc:: m_filename_after_features): Move it to
6645 protected.
6646 (print_c_feature): New class.
6647 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6648 name starts with "i386/32bit-".
6649
6650 2017-07-26 Yao Qi <yao.qi@linaro.org>
6651
6652 * target-descriptions.c (tdesc_element_visitor): New class.
6653 (tdesc_element): New class.
6654 (tdesc_reg): Inherit from tdesc_element.
6655 (tdesc_reg::accept): New function.
6656 (tdesc_type): Inherit from tdesc_element.
6657 (tdesc_type::accept): New function.
6658 (tdesc_feature): Inherit from tdesc_element.
6659 (tdesc_feature::accept): New function.
6660 (target_desc): Inherit from tdesc_element.
6661 (target_desc::target_desc): New.
6662 (target_desc::~target_desc): New.
6663 (target_desc::accept): New.
6664 (allocate_target_description): Use new.
6665 (free_target_description): Use delete.
6666 (print_c_tdesc): New class.
6667 (maint_print_c_tdesc_cmd): Adjust.
6668
6669 * features/aarch64.c: Re-generated.
6670 * features/arc-arcompact.c: Re-generated.
6671 * features/arc-v2.c: Re-generated.
6672 * features/arm/arm-with-iwmmxt.c: Re-generated.
6673 * features/arm/arm-with-m.c: Re-generated.
6674 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6675 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6676 * features/arm/arm-with-neon.c: Re-generated.
6677 * features/arm/arm-with-vfpv2.c: Re-generated.
6678 * features/arm/arm-with-vfpv3.c: Re-generated.
6679 * features/i386/amd64-avx-avx512.c: Re-generated.
6680 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6681 * features/i386/amd64-avx.c: Re-generated.
6682 * features/i386/amd64-avx-linux.c: Re-generated.
6683 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6684 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6685 * features/i386/amd64-avx-mpx.c: Re-generated.
6686 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6687 * features/i386/amd64.c: Re-generated.
6688 * features/i386/amd64-linux.c: Re-generated.
6689 * features/i386/amd64-mpx.c: Re-generated.
6690 * features/i386/amd64-mpx-linux.c: Re-generated.
6691 * features/i386/i386-avx-avx512.c: Re-generated.
6692 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6693 * features/i386/i386-avx.c: Re-generated.
6694 * features/i386/i386-avx-linux.c: Re-generated.
6695 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6696 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6697 * features/i386/i386-avx-mpx.c: Re-generated.
6698 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6699 * features/i386/i386.c: Re-generated.
6700 * features/i386/i386-linux.c: Re-generated.
6701 * features/i386/i386-mmx.c: Re-generated.
6702 * features/i386/i386-mmx-linux.c: Re-generated.
6703 * features/i386/i386-mpx.c: Re-generated.
6704 * features/i386/i386-mpx-linux.c: Re-generated.
6705 * features/i386/x32-avx-avx512.c: Re-generated.
6706 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6707 * features/i386/x32-avx.c: Re-generated.
6708 * features/i386/x32-avx-linux.c: Re-generated.
6709 * features/i386/x32.c: Re-generated.
6710 * features/i386/x32-linux.c: Re-generated.
6711 * features/microblaze.c: Re-generated.
6712 * features/microblaze-with-stack-protect.c: Re-generated.
6713 * features/mips64-dsp-linux.c: Re-generated.
6714 * features/mips64-linux.c: Re-generated.
6715 * features/mips-dsp-linux.c: Re-generated.
6716 * features/mips-linux.c: Re-generated.
6717 * features/nds32.c: Re-generated.
6718 * features/nios2.c: Re-generated.
6719 * features/nios2-linux.c: Re-generated.
6720 * features/rs6000/powerpc-32.c: Re-generated.
6721 * features/rs6000/powerpc-32l.c: Re-generated.
6722 * features/rs6000/powerpc-403.c: Re-generated.
6723 * features/rs6000/powerpc-403gc.c : Re-generated.
6724 * features/rs6000/powerpc-405.c: Re-generated.
6725 * features/rs6000/powerpc-505.c: Re-generated.
6726 * features/rs6000/powerpc-601.c: Re-generated.
6727 * features/rs6000/powerpc-602.c: Re-generated.
6728 * features/rs6000/powerpc-603.c: Re-generated.
6729 * features/rs6000/powerpc-604.c: Re-generated.
6730 * features/rs6000/powerpc-64.c: Re-generated.
6731 * features/rs6000/powerpc-64l.c: Re-generated.
6732 * features/rs6000/powerpc-7400.c: Re-generated.
6733 * features/rs6000/powerpc-750.c: Re-generated.
6734 * features/rs6000/powerpc-860.c: Re-generated.
6735 * features/rs6000/powerpc-altivec32.c: Re-generated.
6736 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6737 * features/rs6000/powerpc-altivec64.c: Re-generated.
6738 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6739 * features/rs6000/powerpc-cell32l.c: Re-generated.
6740 * features/rs6000/powerpc-cell64l.c: Re-generated.
6741 * features/rs6000/powerpc-e500.c: Re-generated.
6742 * features/rs6000/powerpc-e500l.c: Re-generated.
6743 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6744 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6745 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6746 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6747 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6748 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6749 * features/rs6000/powerpc-vsx32.c: Re-generated.
6750 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6751 * features/rs6000/powerpc-vsx64.c: Re-generated.
6752 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6753 * features/rs6000/rs6000.c: Re-generated.
6754 * features/s390-linux32.c: Re-generated.
6755 * features/s390-linux32v1.c: Re-generated.
6756 * features/s390-linux32v2.c: Re-generated.
6757 * features/s390-linux64.c: Re-generated.
6758 * features/s390-linux64v1.c: Re-generated.
6759 * features/s390-linux64v2.c: Re-generated.
6760 * features/s390-te-linux64.c: Re-generated.
6761 * features/s390-tevx-linux64.c: Re-generated.
6762 * features/s390-vx-linux64.c: Re-generated.
6763 * features/s390x-linux64.c: Re-generated.
6764 * features/s390x-linux64v1.c: Re-generated.
6765 * features/s390x-linux64v2.c: Re-generated.
6766 * features/s390x-te-linux64.c: Re-generated.
6767 * features/s390x-tevx-linux64.c: Re-generated.
6768 * features/s390x-vx-linux64.c: Re-generated.
6769 * features/sparc/sparc32-solaris.c: Re-generated.
6770 * features/sparc/sparc64-solaris.c: Re-generated.
6771 * features/tic6x-c62x.c: Re-generated.
6772 * features/tic6x-c62x-linux.c: Re-generated.
6773 * features/tic6x-c64x.c: Re-generated.
6774 * features/tic6x-c64x-linux.c: Re-generated.
6775 * features/tic6x-c64xp.c: Re-generated.
6776 * features/tic6x-c64xp-linux.c: Re-generated.
6777
6778 2017-07-26 Yao Qi <yao.qi@linaro.org>
6779
6780 * i386-linux-tdep.c (i386_linux_read_description): New function.
6781 (i386_linux_core_read_description): Call
6782 i386_linux_read_description.
6783 * i386-linux-tdep.h (i386_linux_read_description): Declare.
6784 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6785 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6786 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6787 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6788 * x86-linux-nat.c (x86_linux_read_description): Call
6789 i386_linux_read_description.
6790
6791 2017-07-26 Yao Qi <yao.qi@linaro.org>
6792
6793 * NEWS: Mention it.
6794 * features/Makefile (%.c: %.xml): Pass the xml file name to
6795 command "maint print c-tdesc".
6796 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6797 name from 'arg'.
6798
6799 2017-07-26 Yao Qi <yao.qi@linaro.org>
6800
6801 * target-descriptions.c (target_desc): Add ctor and dtor. Do
6802 in-class initialization.
6803 (tdesc_create_feature): Call new instead of XCNEW.
6804 (free_target_description): Ue delete.
6805
6806 2017-07-25 John Baldwin <jhb@FreeBSD.org>
6807
6808 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6809
6810 2017-07-25 Yao Qi <yao.qi@linaro.org>
6811
6812 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6813 constant.
6814 (amd64_x32_init_abi): Likewise.
6815 * amd64-tdep.h (amd64_init_abi): Update declaration.
6816 (amd64_x32_init_abi): Likewise.
6817
6818 2017-07-25 Yao Qi <yao.qi@linaro.org>
6819
6820 PR tdep/21717
6821 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6822 condition for FPSCR.
6823 (arm_linux_store_inferior_registers): Likewise.
6824
6825 2017-07-22 Tom Tromey <tom@tromey.com>
6826
6827 * break-catch-syscall.c (struct catch_syscall_inferior_data)
6828 <syscalls_counts>: Now a std::vector.
6829 (get_catch_syscall_inferior_data): Use "new".
6830 (catch_syscall_inferior_data_cleanup): Use "delete".
6831 (insert_catch_syscall, remove_catch_syscall)
6832 (clear_syscall_counts): Update.
6833
6834 2017-07-22 Tom Tromey <tom@tromey.com>
6835
6836 * break-catch-syscall.c (syscall_catchpoint)
6837 <syscalls_to_be_caught>: Now a std::vector<int>
6838 (~syscall_catchpoint): Remove.
6839 (insert_catch_syscall, remove_catch_syscall)
6840 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6841 (print_mention_catch_syscall, print_recreate_catch_syscall):
6842 Update.
6843 (create_syscall_event_catchpoint): Change type of "filter"
6844 parameter.
6845 (catch_syscall_split_args): Return a std::vector.
6846 (catch_syscall_command_1, catching_syscall_number_1): Update.
6847
6848 2017-07-22 Tom Tromey <tom@tromey.com>
6849
6850 * break-catch-throw.c (struct exception_catchpoint)
6851 <exception_rx>: Now a std::string.
6852 (~exception_catchpoint): Remove.
6853 (print_one_detail_exception_catchpoint): Update.
6854 (handle_gnu_v3_exceptions): Change type of except_rx.
6855 (extract_exception_regexp): Return a std::string.
6856 (catch_exception_command_1): Update.
6857
6858 2017-07-22 Tom Tromey <tom@tromey.com>
6859
6860 * break-catch-sig.c (gdb_signal_type): Remove typedef.
6861 (struct signal_catchpoint) <signals_to_be_caught>: Now a
6862 std::vector.
6863 <catch_all>: Now a bool.
6864 (~signal_catchpoint): Remove.
6865 (signal_catchpoint_insert_location)
6866 (signal_catchpoint_remove_location)
6867 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6868 (signal_catchpoint_print_mention)
6869 (signal_catchpoint_print_recreate)
6870 (signal_catchpoint_explains_signal): Update.
6871 (create_signal_catchpoint): Change type of "filter" and
6872 "catch_all".
6873 (catch_signal_split_args): Return a std::vector. Change type of
6874 "catch_all".
6875 (catch_signal_command): Update.
6876
6877 2017-07-20 Pedro Alves <palves@redhat.com>
6878
6879 * ada-lang.c (ada_language_defn): Make extern.
6880 (_initialize_ada_language): Remove add_language call.
6881 * c-lang.c (c_language_defn, cplus_language_defn)
6882 (asm_language_defn, minimal_language_defn): Make extern.
6883 (_initialize_c_language): Delete.
6884 * completer.c (compare_cstrings): Delete, moved to utils.h.
6885 * d-lang.c (d_language_defn): Make extern.
6886 (_initialize_d_language): Remove add_language calls.
6887 * defs.h (enum language): Add comment.
6888 * f-lang.c (f_language_defn): Make extern.
6889 (_initialize_f_language): Remove add_language call.
6890 * go-lang.c (go_language_defn): Make extern.
6891 (_initialize_go_language): Remove add_language call.
6892 * language.c: Include <algorithm>.
6893 (languages): Redefine as const array.
6894 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6895 (set_language_command): Handle "local". Use for-range loop.
6896 (set_language): Remove loop.
6897 (language_enum): Rewrite.
6898 (language_def, language_str): Remove loops.
6899 (add_language): Delete.
6900 (add_set_language_command): New, based on add_languages.
6901 (skip_language_trampoline): Adjust.
6902 (local_language_defn): Delete.
6903 (language_gdbarch_post_init): Adjust.
6904 (_initialize_language): Remove add_language calls. Call
6905 add_set_language_command.
6906 * language.h (add_language): Delete.
6907 (auto_language_defn)
6908 (unknown_language_defn, minimal_language_defn, ada_language_defn)
6909 (asm_language_defn, c_language_defn, cplus_language_defn)
6910 (d_language_defn, f_language_defn, go_language_defn)
6911 (m2_language_defn, objc_language_defn, opencl_language_defn)
6912 (pascal_language_defn, rust_language_defn): Declare.
6913 * m2-lang.c (m2_language_defn): Make extern.
6914 (_initialize_m2_language): Remove add_language call.
6915 * objc-lang.c (objc_language_defn): Make extern.
6916 (_initialize_objc_language): Remove add_language call.
6917 * opencl-lang.c (opencl_language_defn): Make extern.
6918 (_initialize_opencl_language): Remove add_language call.
6919 * p-lang.c (pascal_language_defn): Make extern.
6920 (_initialize_pascal_language): Delete.
6921 * rust-lang.c (rust_language_defn): Make extern.
6922 (_initialize_rust_language): Delete.
6923 * utils.h (compare_cstrings): New static inline function.
6924
6925 2017-07-20 Pedro Alves <palves@redhat.com>
6926
6927 * ada-lang.c (ada_to_fixed_type_1): Adjust.
6928 (get_var_value): Constify parameters.
6929 (get_int_var_value): Change prototype.
6930 (to_fixed_range_type): Adjust.
6931 * ada-lang.h (get_int_var_value): Change prototype.
6932
6933 2017-07-20 Pedro Alves <palves@redhat.com>
6934
6935 * dwarf2read.c (dw2_lookup_symbol): Use
6936 SYMBOL_MATCHES_SEARCH_NAME.
6937 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6938
6939 2017-07-20 Pedro Alves <palves@redhat.com>
6940
6941 * block.c (block_iter_name_step, block_iter_name_first)
6942 (block_iter_name_next): Delete.
6943 (block_lookup_symbol_primary): Adjust to use
6944 dict_iter_match_first/dict_iter_match_next.
6945 * block.h (block_iter_name_first, block_iter_name_next): Delete
6946 declarations.
6947 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6948 dict_iter_match_first/dict_iter_match_next.
6949
6950 2017-07-20 Pedro Alves <palves@redhat.com>
6951
6952 * cp-support.c (cp_find_first_component_aux): Add missing case for
6953 end of string.
6954
6955 2017-07-18 David Blaikie <dblaikie@gmail.com>
6956
6957 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6958 of dwo_cu's dwo_file.
6959
6960 2017-07-18 Yao Qi <yao.qi@linaro.org>
6961
6962 * remote.c (store_registers_using_G): Remove one line comment.
6963
6964 2017-07-18 Yao Qi <yao.qi@linaro.org>
6965
6966 * regcache.c (regcache_cpy): Simplify it.
6967 (regcache::cpy_no_passthrough): Remove it.
6968 * regcache.h (cpy_no_passthrough): Remove it.
6969 (regcache_dup, regcache_cpy): Update comments.
6970
6971 2017-07-18 Pedro Alves <palves@redhat.com>
6972
6973 * remote-sim.c (sim_command_completer): Adjust to work with a
6974 completion_tracker instead of a VEC.
6975
6976 2017-07-17 Pedro Alves <palves@redhat.com>
6977
6978 * completer.c (complete_source_filenames): New function.
6979 (complete_address_and_linespec_locations): New function.
6980 (location_completer): Use complete_address_and_linespec_locations.
6981 (completion_tracker::build_completion_result): Honor the tracker's
6982 request to suppress append.
6983 * completer.h (completion_tracker::suppress_append_ws)
6984 (completion_tracker::set_suppress_append_ws): New methods.
6985 (completion_tracker::m_suppress_append_ws): New field.
6986 (complete_source_filenames): New declaration.
6987 * linespec.c (linespec_complete_what): New.
6988 (struct ls_parser) <complete_what, completion_word,
6989 completion_quote_char, completion_quote_end, completion_tracker>:
6990 New fields.
6991 (string_find_incomplete_keyword_at_end): New.
6992 (linespec_lexer_lex_string): Record quote char. If in completion
6993 mode, don't throw.
6994 (linespec_lexer_consume_token): Advance the completion word point.
6995 (linespec_lexer_peek_token): Save/restore completion info.
6996 (save_stream_and_consume_token): New.
6997 (set_completion_after_number): New.
6998 (linespec_parse_basic): Set what to complete next depending on
6999 token. Handle function and label completions specially.
7000 (parse_linespec): Disable objc shortcut in completion mode. Set
7001 what to complete next depending on token type. Skip keyword if in
7002 completion mode.
7003 (complete_linespec_component, linespec_complete): New.
7004 * linespec.h (linespec_complete): Declare.
7005
7006 2017-07-17 Pedro Alves <palves@redhat.com>
7007
7008 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7009 Handle 'operator<' / 'operator<<'.
7010
7011 2017-07-17 Pedro Alves <palves@redhat.com>
7012
7013 * completer.c (collect_explicit_location_matches): Handle
7014 MATCH_LABEL.
7015 (convert_explicit_location_to_linespec): New, factored out from
7016 ...
7017 (convert_explicit_location_to_sals): ... this.
7018 (complete_label): New.
7019 (linespec_complete_label, find_label_symbols_in_block): New.
7020 (find_label_symbols): Add completion_mode parameter and adjust to
7021 call find_label_symbols_in_block.
7022 * linespec.h (linespec_complete_label): Declare.
7023
7024 2017-07-17 Pedro Alves <palves@redhat.com>
7025
7026 * ada-lang.c (ada_collect_symbol_completion_matches): Add
7027 complete_symbol_mode parameter.
7028 * cli/cli-cmds.c (complete_command): Get the completion result out
7029 of the handle_brkchars tracker if used a custom word point.
7030 * completer.c: Include "linespec.h".
7031 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7032 (advance_to_expression_complete_word_point): New.
7033 (completion_tracker::completes_to_completion_word): New.
7034 (complete_files_symbols): Pass down
7035 complete_symbol_mode::EXPRESSION.
7036 (explicit_options, probe_options): New.
7037 (collect_explicit_location_matches): Complete on the
7038 explictit_loc->foo instead of word. Use
7039 linespec_complete_function. Handle MATCH_LINE. Handle offering
7040 keyword and options completions.
7041 (backup_text_ptr): Delete.
7042 (skip_keyword): New.
7043 (complete_explicit_location): Remove 'word' parameter. Add
7044 language, quoted_arg_start and quoted_arg_end parameters.
7045 Rewrite, parsing left to right.
7046 (location_completer): Rewrite.
7047 (location_completer_handle_brkchars): New function.
7048 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7049 (enum complete_line_internal_reason): Adjust comments.
7050 (completion_tracker::discard_completions): New.
7051 (completer_handle_brkchars_func_for_completer): Handle
7052 location_completer.
7053 (gdb_custom_word_point_brkchars)
7054 (gdb_org_rl_basic_quote_characters): New.
7055 (gdb_completion_word_break_characters_throw)
7056 (completion_find_completion_word): Handle trackers that use a
7057 custom word point.
7058 (completion_tracker::advance_custom_word_point_by): New.
7059 (completion_tracker::build_completion_result): Don't rely on
7060 readline appending the quote char.
7061 (gdb_rl_attempted_completion_function_throw): Handle trackers that
7062 use a custom word point.
7063 (gdb_rl_attempted_completion_function): Restore
7064 rl_basic_quote_characters.
7065 * completer.h (class completion_tracker): Extend intro comment.
7066 (completion_tracker::set_quote_char)
7067 (completion_tracker::quote_char)
7068 (completion_tracker::set_use_custom_word_point)
7069 (completion_tracker::use_custom_word_point)
7070 (completion_tracker::custom_word_point)
7071 (completion_tracker::set_custom_word_point)
7072 (completion_tracker::advance_custom_word_point_by)
7073 (completion_tracker::completes_to_completion_word)
7074 (completion_tracker::discard_completions): New methods.
7075 (completion_tracker::m_quote_char)
7076 (completion_tracker::m_use_custom_word_point)
7077 (completion_tracker::m_custom_word_point): New fields.
7078 (advance_to_expression_complete_word_point): Declare.
7079 * f-lang.c (f_collect_symbol_completion_matches): Add
7080 complete_symbol_mode parameter.
7081 * language.h (struct language_defn)
7082 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7083 parameter.
7084 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
7085 (linespec_complete_function): New function.
7086 (linespec_lexer_lex_keyword): Adjust.
7087 * linespec.h (linespec_keywords, linespec_complete_function): New
7088 declarations.
7089 * location.c (find_end_quote): New function.
7090 (explicit_location_lex_one): Add explicit_completion_info
7091 parameter. Save quoting info. Don't throw if being called for
7092 completion. Don't handle Ada operators here.
7093 (is_cp_operator, skip_op_false_positives, first_of)
7094 (explicit_location_lex_one_function): New function.
7095 (string_to_explicit_location): Replace 'dont_throw' parameter with
7096 an explicit_completion_info pointer parameter. Handle it. Don't
7097 use explicit_location_lex_one to lex function names. Use
7098 explicit_location_lex_one_function instead.
7099 * location.h (struct explicit_completion_info): New.
7100 (string_to_explicit_location): Replace 'dont_throw' parameter with
7101 an explicit_completion_info pointer parameter.
7102 * symtab.c (default_collect_symbol_completion_matches_break_on):
7103 Add complete_symbol_mode parameter. Handle LINESPEC mode.
7104 (default_collect_symbol_completion_matches)
7105 (collect_symbol_completion_matches): Add complete_symbol_mode
7106 parameter.
7107 (collect_symbol_completion_matches_type): Pass down
7108 complete_symbol_mode::EXPRESSION.
7109 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7110 parameter. Handle LINESPEC mode.
7111 * symtab.h (complete_symbol_mode): New.
7112 (default_collect_symbol_completion_matches_break_on)
7113 (default_collect_symbol_completion_matches)
7114 (collect_symbol_completion_matches)
7115 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7116 parameter.
7117
7118 2017-07-17 Pedro Alves <palves@redhat.com>
7119
7120 * utils.c (enum class strncmp_iw_mode): New.
7121 (strcmp_iw): Rename to ...
7122 (strncmp_iw_with_mode): ... this. Add string2_len and mode
7123 parameters. Handle them.
7124 (strncmp_iw): New.
7125 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7126 * utils.h (strncmp_iw): Declare.
7127 (strcmp_iw): Move describing comments here.
7128
7129 2017-07-17 Pedro Alves <palves@redhat.com>
7130
7131 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7132 CP_OPERATOR_STR.
7133 * c-typeprint.c (is_type_conversion_operator): Use
7134 CP_OPERATOR_STR.
7135 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7136 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7137 CP_OPERATOR_LEN.
7138 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7139 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7140 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7141 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7142 CP_OPERATOR_STR.
7143 * location.c: Include "cp-support.h".
7144 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7145 CP_OPERATOR_STR.
7146 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7147 CP_OPERATOR_LEN.
7148
7149 2017-07-17 Pedro Alves <palves@redhat.com>
7150
7151 * cli/cli-cmds.c (complete_command): Use a completion tracker
7152 along with completion_find_completion_word for handle_brkchars
7153 phase.
7154 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7155 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7156 (struct gdb_rl_completion_word_info): New.
7157 (gdb_rl_find_completion_word): New.
7158 (completion_find_completion_word): New.
7159 * completer.h (completion_find_completion_word): Declare.
7160
7161 2017-07-17 Pedro Alves <palves@redhat.com>
7162
7163 * ada-lang.c (symbol_completion_match): Adjust comments.
7164 (symbol_completion_add): Replace vector parameter with
7165 completion_tracker parameter. Use it.
7166 (ada_make_symbol_completion_list): Rename to...
7167 (ada_collect_symbol_completion_matches): ... this. Add
7168 completion_tracker parameter and use it.
7169 (ada_language_defn): Adjust.
7170 * break-catch-syscall.c (catch_syscall_completer): Adjust
7171 prototype and work with completion_tracker instead of VEC.
7172 * breakpoint.c (condition_completer): Adjust prototype and work
7173 with completion_tracker instead of VEC.
7174 * c-lang.c (c_language_defn, cplus_language_defn)
7175 (asm_language_defn, minimal_language_defn): Adjust to renames.
7176 * cli/cli-cmds.c (complete_command): Rework using
7177 completion_tracker. Catch exceptions when completing.
7178 * cli/cli-decode.c (integer_unlimited_completer)
7179 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7180 with completion_tracker instead of VEC.
7181 * command.h (struct completion_tracker): Forward declare.
7182 (completer_ftype, completer_handle_brkchars_ftype): Change
7183 types.
7184 (complete_on_cmdlist, complete_on_enum): Adjust.
7185 * completer.c: Include <algorithm>.
7186 (struct gdb_completer_state): New.
7187 (current_completion): New global.
7188 (readline_line_completion_function): Delete.
7189 (noop_completer, filename_completer)
7190 (filename_completer_handle_brkchars, complete_files_symbols)
7191 (linespec_location_completer): Adjust to work with a
7192 completion_tracker instead of a VEC.
7193 (string_or_empty): New.
7194 (collect_explicit_location_matches): Adjust to work with a
7195 completion_tracker instead of a VEC.
7196 (explicit_location_completer): Rename to ...
7197 (complete_explicit_location): ... this and adjust to work with a
7198 completion_tracker instead of a VEC.
7199 (location_completer): Adjust to work with a completion_tracker
7200 instead of a VEC.
7201 (add_struct_fields): Adjust to work with a completion_list instead
7202 of VEC.
7203 (expression_completer): Rename to ...
7204 (complete_expression): ... this and adjust to work with a
7205 completion_tracker instead of a VEC. Use complete_files_symbols.
7206 (expression_completer): Reimplement on top of complete_expression.
7207 (symbol_completer): Adjust to work with a completion_tracker
7208 instead of a VEC.
7209 (enum complete_line_internal_reason): Add describing comments.
7210 (complete_line_internal_normal_command): Adjust to work with a
7211 completion_tracker instead of a VEC.
7212 (complete_line_internal): Rename to ...
7213 (complete_line_internal_1): ... this and adjust to work with a
7214 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7215 handle_brkchars phase.
7216 (new_completion_tracker): Delete.
7217 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7218 complete_line_internal_1.
7219 (free_completion_tracker): Delete.
7220 (INITIAL_COMPLETION_HTAB_SIZE): New.
7221 (completion_tracker::completion_tracker)
7222 (completion_tracker::~completion_tracker): New.
7223 (maybe_add_completion): Delete.
7224 (completion_tracker::maybe_add_completion)
7225 (completion_tracker::add_completion)
7226 (completion_tracker::add_completions): New.
7227 (throw_max_completions_reached_error): Delete.
7228 (complete_line): Adjust to work with a completion_tracker instead
7229 of a VEC. Don't create a completion_tracker_t or check for max
7230 completions here.
7231 (command_completer, command_completer_handle_brkchars)
7232 (signal_completer, reg_or_group_completer_1)
7233 (reg_or_group_completer, default_completer_handle_brkchars):
7234 Adjust to work with a completion_tracker.
7235 (gdb_completion_word_break_characters_throw): New.
7236 (gdb_completion_word_break_characters): Reimplement.
7237 (line_completion_function): Delete.
7238 (completion_tracker::recompute_lowest_common_denominator)
7239 (expand_preserving_ws)
7240 (completion_tracker::build_completion_result)
7241 (completion_result::completion_result)
7242 (completion_result::completion_result)
7243 (completion_result::~completion_result)
7244 (completion_result::completion_result)
7245 (completion_result::release_match_list, compare_cstrings)
7246 (completion_result::sort_match_list)
7247 (completion_result::reset_match_list)
7248 (gdb_rl_attempted_completion_function_throw)
7249 (gdb_rl_attempted_completion_function): New.
7250 * completer.h (completion_list, struct completion_result)
7251 (class completion_tracker): New.
7252 (complete_line): Add completion_tracker parameter.
7253 (readline_line_completion_function): Delete.
7254 (gdb_rl_attempted_completion_function): New.
7255 (noop_completer, filename_completer, expression_completer)
7256 (location_completer, symbol_completer, command_completer)
7257 (signal_completer, reg_or_group_completer): Update prototypes.
7258 (completion_tracker_t, new_completion_tracker)
7259 (make_cleanup_free_completion_tracker): Delete.
7260 (enum maybe_add_completion_enum): Delete.
7261 (maybe_add_completion): Delete.
7262 (throw_max_completions_reached_error): Delete.
7263 * corefile.c (complete_set_gnutarget): Adjust to work with a
7264 completion_tracker instead of a VEC.
7265 * cp-abi.c (cp_abi_completer): Adjust to work with a
7266 completion_tracker instead of a VEC.
7267 * d-lang.c (d_language_defn): Adjust.
7268 * disasm.c (disassembler_options_completer): Adjust to work with a
7269 completion_tracker instead of a VEC.
7270 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7271 (f_collect_symbol_completion_matches): ... this. Adjust to work
7272 with a completion_tracker instead of a VEC.
7273 (f_language_defn): Adjust.
7274 * go-lang.c (go_language_defn): Adjust.
7275 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7276 Adjust to work with a completion_tracker instead of a VEC.
7277 * infrun.c (handle_completer): Likewise.
7278 * interps.c (interpreter_completer): Likewise.
7279 * interps.h (interpreter_completer): Likewise.
7280 * language.c (unknown_language_defn, auto_language_defn)
7281 (local_language_defn): Adjust.
7282 * language.h (language_defn::la_make_symbol_completion_list):
7283 Rename to ...
7284 (language_defn::la_collect_symbol_completion_matches): ... this
7285 and adjust to work with a completion_tracker instead of a VEC.
7286 * m2-lang.c (m2_language_defn): Adjust.
7287 * objc-lang.c (objc_language_defn): Adjust.
7288 * opencl-lang.c (opencl_language_defn): Adjust.
7289 * p-lang.c (pascal_language_defn): Adjust.
7290 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7291 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7292 with a completion_tracker.
7293 * rust-lang.c (rust_language_defn): Adjust.
7294 * symtab.c (free_completion_list, do_free_completion_list)
7295 (return_val, completion_tracker): Delete.
7296 (completion_list_add_name, completion_list_add_symbol)
7297 (completion_list_add_msymbol, completion_list_objc_symbol)
7298 (completion_list_add_fields, add_symtab_completions): Add
7299 completion_tracker parameter and use it.
7300 (default_make_symbol_completion_list_break_on_1): Rename to...
7301 (default_collect_symbol_completion_matches_break_on): ... this.
7302 Add completion_tracker parameter and use it instead of allocating
7303 a completion tracker here.
7304 (default_make_symbol_completion_list_break_on): Delete old
7305 implementation.
7306 (default_make_symbol_completion_list): Delete.
7307 (default_collect_symbol_completion_matches): New.
7308 (make_symbol_completion_list): Delete.
7309 (collect_symbol_completion_matches): New.
7310 (make_symbol_completion_type): Rename to ...
7311 (collect_symbol_completion_matches_type): ... this. Add
7312 completion_tracker parameter and use it instead of VEC.
7313 (make_file_symbol_completion_list_1): Rename to...
7314 (collect_file_symbol_completion_matches): ... this. Add
7315 completion_tracker parameter and use it instead of VEC.
7316 (make_file_symbol_completion_list): Delete.
7317 (add_filename_to_list): Use completion_list instead of a VEC.
7318 (add_partial_filename_data::list): Now a completion_list.
7319 (make_source_files_completion_list): Work with a completion_list
7320 instead of a VEC.
7321 * symtab.h: Include "completer.h".
7322 (default_make_symbol_completion_list_break_on)
7323 (default_make_symbol_completion_list, make_symbol_completion_list)
7324 (make_symbol_completion_type, make_file_symbol_completion_list)
7325 (make_source_files_completion_list): Delete.
7326 (default_collect_symbol_completion_matches_break_on)
7327 (default_collect_symbol_completion_matches)
7328 (collect_symbol_completion_matches)
7329 (collect_symbol_completion_matches_type)
7330 (collect_file_symbol_completion_matches)
7331 (make_source_files_completion_list): New.
7332 * top.c (init_main): Don't install a rl_completion_entry_function
7333 hook. Install a rl_attempted_completion_function hook instead.
7334 * tui/tui-layout.c (layout_completer): Adjust to work with a
7335 completion_tracker.
7336 * tui/tui-regs.c (tui_reggroup_completer):
7337 * tui/tui-win.c (window_name_completer, focus_completer)
7338 (winheight_completer): Adjust to work with a completion_tracker.
7339 * value.c: Include "completer.h".
7340 (complete_internalvar): Adjust to work with a completion_tracker.
7341 * value.h (complete_internalvar): Likewise.
7342
7343 2017-07-17 Pedro Alves <palves@redhat.com>
7344
7345 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7346 renames.
7347 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7348 comments to completer_ftype's declaration.
7349 <completer_handle_brkchars>: Change type to
7350 completer_handle_brkchars_ftype.
7351 * command.h (completer_ftype): Add describing comment and give
7352 names to parameters.
7353 (completer_ftype_void): Rename to ...
7354 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7355 (set_cmd_completer_handle_brkchars): Adjust.
7356 * completer.c (filename_completer_handle_brkchars): New function.
7357 (complete_line_internal_normal_command): New function, factored
7358 out from ...
7359 (complete_line_internal): ... here.
7360 (command_completer_handle_brkchars)
7361 (default_completer_handle_brkchars)
7362 (completer_handle_brkchars_func_for_completer): New functions.
7363 * completer.h (set_gdb_completion_word_break_characters): Delete
7364 declaration.
7365 (completer_handle_brkchars_func_for_completer): New declaration.
7366 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7367 completer_handle_brkchars_func_for_completer.
7368
7369 2017-07-17 Pedro Alves <palves@redhat.com>
7370
7371 * completer.c (symbol_completer): New function, based on
7372 make_symbol_completion_list_fn.
7373 * completer.h (symbol_completer): New declaration.
7374 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7375 * python/py-cmd.c (completers): Adjust.
7376 * symtab.c (make_symbol_completion_list_fn): Delete.
7377 * symtab.h (make_symbol_completion_list_fn): Delete.
7378 * cli/cli-decode.c (add_cmd): Adjust.
7379
7380 2017-07-17 Pedro Alves <palves@redhat.com>
7381
7382 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7383 * dwarf2read.c: Include "filename-seen-cache.h".
7384 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7385 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7386 * filename-seen-cache.c: New file.
7387 * filename-seen-cache.h: New file.
7388 * symtab.c: Include "filename-seen-cache.h".
7389 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7390 (create_filename_seen_cache, clear_filename_seen_cache)
7391 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7392 to filename-seen-cache.h/filename-seen-cache.c.
7393 (output_source_filename, sources_info)
7394 (maybe_add_partial_symtab_filename)
7395 (make_source_files_completion_list): Adjust to use
7396 filename_seen_cache.
7397
7398 2017-07-17 Pedro Alves <palves@redhat.com>
7399
7400 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7401 fields.
7402 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7403 dwarf2_debug_sections*)): New.
7404 (dwarf2_per_objfile::dwarf2_per_objfile(const
7405 dwarf2_per_objfile&)): Declare as deleted.
7406 (dwarf2_per_objfile::operator=): Declare as deleted.
7407 (dwarf2_per_objfile::dwarf2_per_objfile)
7408 (dwarf2_per_objfile::~dwarf2_per_objfile)
7409 (dwarf2_per_objfile::free_cached_comp_units): New.
7410 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7411 ctor. Call dwarf2_per_objfile's ctor manually.
7412 (dwarf2_locate_sections): Deleted/refactored as ...
7413 (dwarf2_per_objfile::locate_sections): ... this new method.
7414 (free_cached_comp_units): Defer to
7415 dwarf2_per_objfile::free_cached_comp_units.
7416 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7417
7418 2017-07-14 Tom Tromey <tom@tromey.com>
7419
7420 PR rust/21764:
7421 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7422 parameter.
7423 <UNOP_SIZEOF>: Split into separate case.
7424 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7425
7426 2017-07-14 Tom Tromey <tom@tromey.com>
7427
7428 PR rust/21763:
7429 * symtab.c (symbol_matches_domain): Add language_rust to special
7430 case.
7431 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7432 treat LOC_TYPEDEF symbols as variables.
7433
7434 2017-07-14 Pedro Alves <palves@redhat.com>
7435
7436 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7437 symtabs matching all symtabs with SRCFILE as file name instead of
7438 only considering the first hit, with lookup_symtab.
7439
7440 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7441
7442 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7443 operator_name parameters.
7444 (gen_expr): Update function call.
7445
7446 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7447
7448 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7449 parameter.
7450 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7451 Likewise.
7452 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7453 parameter, use agent_expr::gdbarch instead, update function
7454 calls.
7455 (locexpr_tracepoint_var_ref): Likewise.
7456 (loclist_tracepoint_var_ref): Likewise.
7457 * ax-gdb.c (gen_trace_static_fields): Likewise.
7458 (gen_traced_pop): Likewise.
7459 (gen_frame_args_address): Likewise.
7460 (gen_frame_locals_address): Likewise.
7461 (gen_var_ref): Likewise.
7462 (gen_struct_ref_recursive): Likewise.
7463 (gen_static_field): Likewise.
7464 (gen_maybe_namespace_elt): Likewise.
7465 (gen_expr): Likewise.
7466 (gen_trace_for_var): Likewise.
7467 (gen_trace_for_expr): Likewise.
7468 (gen_trace_for_return_address): Likewise.
7469
7470 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7471
7472 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7473 parameter.
7474 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7475
7476 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7477
7478 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7479 from ax, update calls.
7480 (gen_usual_arithmetic): Likewise.
7481 (gen_integral_promotions): Likewise.
7482 (gen_bitfield_ref): Likewise.
7483 (gen_primitive_field): Likewise.
7484 (gen_struct_ref_recursive): Likewise.
7485 (gen_struct_ref): Likewise.
7486 (gen_maybe_namespace_elt): Likewise.
7487 (gen_struct_elt_for_reference): Likewise.
7488 (gen_namespace_elt): Likewise.
7489 (gen_aggregate_elt_ref): Likewise.
7490 (gen_expr): Get gdbarch from ax, update calls.
7491 (gen_expr_binop_rest): Likewise.
7492
7493 2017-07-13 Pedro Alves <palves@redhat.com>
7494
7495 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7496 as default tdesc.
7497 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7498 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7499 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7500 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7501 tdep.
7502 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7503 Get final tdesc from the tdep.
7504 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7505 default tdesc.
7506 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7507 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7508 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7509 Use it as default tdesc.
7510 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7511 down to amd_init_abi. No longer handle fallback tdesc here.
7512 * amd64-tdep.h (tdesc_x32): Declare.
7513 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7514 parameter.
7515 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7516 as default tdesc.
7517
7518 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7519
7520 * s390-linux-tdep.c (s390_process_record): Add support for
7521 instructions new in arch12.
7522
7523 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7524
7525 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7526 PT_GETFSBASE and PT_GETGSBASE.
7527 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7528 PT_SETGSBASE.
7529
7530 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7531
7532 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7533 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7534 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7535 those rules.
7536 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7537 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7538 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7539 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7540 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7541 * features/i386/amd64.xml: Add 64bit-segments.xml.
7542 * features/i386/amd64-avx-avx512.c: Regenerated.
7543 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7544 * features/i386/amd64-avx-mpx.c: Regenerated.
7545 * features/i386/amd64-avx.c: Regenerated.
7546 * features/i386/amd64-mpx.c: Regenerated.
7547 * features/i386/amd64.c: Regenerated.
7548 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7549 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7550 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7551 * regformats/i386/amd64-avx.dat: Regenerated.
7552 * regformats/i386/amd64-mpx.dat: Regenerated.
7553 * regformats/i386/amd64.dat: Regenerated.
7554
7555 2017-07-10 Yao Qi <yao.qi@linaro.org>
7556
7557 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7558 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7559
7560 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7561
7562 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7563 unsetenv.
7564 * gnulib/aclocal.m4: Regenerate.
7565 * gnulib/config.in: Regenerate.
7566 * gnulib/configure: Regenerate.
7567 * gnulib/import/Makefile.am: Regenerate.
7568 * gnulib/import/Makefile.in: Regenerate.
7569 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7570 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7571 * gnulib/import/m4/environ.m4: New file.
7572 * gnulib/import/m4/setenv.m4: New file.
7573 * gnulib/import/setenv.c: New file.
7574 * gnulib/import/unsetenv.c: New file.
7575
7576 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7577
7578 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7579 address when op is DW_OP_addr.
7580
7581 2017-07-09 Tom Tromey <tom@tromey.com>
7582
7583 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7584 check and apply to outer type.
7585
7586 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7587
7588 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7589 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7590 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7591 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7592
7593 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7594
7595 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7596
7597 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7598
7599 * corelow.c (get_core_siginfo): Remove.
7600 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7601 instead of get_core_siginfo.
7602 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7603 * gdbarch.h: Re-generate.
7604 * gdbarch.c: Re-generate.
7605 * linux-tdep.c (linux_core_xfer_siginfo): New.
7606 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7607
7608 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7609
7610 * corelow.c (thread_section_name): Move to ...
7611 * gdbcore.h (thread_section_name): ... here.
7612
7613 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7614
7615 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7616 (struct siginfo32): New.
7617 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7618 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7619 via ptrace(PT_LWPINFO).
7620
7621 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7622
7623 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7624 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7625 (fbsd_get_siginfo_type): New.
7626 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7627 (_initialize_fbsd_tdep): New.
7628
7629 2017-07-06 David Blaikie <dblaikie@gmail.com>
7630
7631 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7632 a singular dwo_unit*) to support multiple CUs in the same way that
7633 multiple TUs are supported.
7634 (create_cus_hash_table): Replace create_dwo_cu with a function for
7635 parsing multiple CUs from a DWO file.
7636 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7637 create_dwo_cu.
7638 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7639 htab_find, rather than comparing the signature to a singleton CU in
7640 the dwo_file.
7641
7642 2017-07-06 Pedro Alves <palves@redhat.com>
7643
7644 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7645
7646 2017-07-04 Pedro Alves <palves@redhat.com>
7647
7648 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7649 * gdbtypes.h (TYPE_STATIC): Delete.
7650 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7651 is_synchronized, is_native>: Delete.
7652 <dummy>: Bump.
7653 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7654 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7655 (TYPE_FN_FIELD_ABSTRACT): Delete.
7656
7657 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7658
7659 * buffer.h (buffer_finish): Fix spelling mistakes.
7660
7661 2017-07-01 Eli Zaretskii <eliz@gnu.org>
7662
7663 * .dir-locals.el: Automatically switch to C-style comments in
7664 versions of Emacs that support the feature.
7665
7666 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7667 Pedro Alves <palves@redhat.com>
7668
7669 PR cli/21688
7670 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7671 (process_next_line): New variable 'inline_cmd'.
7672 Adjust 'if' clauses for "python", "compile" and "guile" to use
7673 'command_name_equals' and check for '!inline_cmd'.
7674
7675 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7676
7677 PR cli/21688
7678 * cli/cli-script.c (command_name_equals_not_inline): New function.
7679 (process_next_line): Adjust 'if' clauses for "python", "compile"
7680 and "guile" to use command_name_equals_not_inline.
7681
7682 2017-06-29 Pedro Alves <palves@redhat.com>
7683
7684 * completer.c (expression_completer): Call
7685 linespec_location_completer instead of location_completer.
7686
7687 2017-06-29 Pedro Alves <palves@redhat.com>
7688
7689 * completer.c (expression_completer): Remove code that recomputes
7690 'text' from 'word'.
7691
7692 2017-06-29 Yao Qi <yao.qi@linaro.org>
7693
7694 * regformats/regdat.sh: Generate code with
7695 "ifndef IN_PROCESS_AGENT".
7696
7697 2017-06-28 Pedro Alves <palves@redhat.com>
7698
7699 * command.h: Include "common/scoped_restore.h".
7700
7701 2017-06-28 Yao Qi <yao.qi@linaro.org>
7702
7703 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7704 instead of obstack_grow.
7705
7706 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7707
7708 PR gdb/21337
7709 * symfile.c (reread_symbols): Call objfiles_changed just before
7710 read_symbols.
7711
7712 2017-06-27 Pedro Alves <palves@redhat.com>
7713
7714 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7715 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7716 (completion_list_add_symbol, completion_list_add_msymbol):
7717 ... these new functions.
7718 (add_symtab_completions)
7719 (default_make_symbol_completion_list_break_on_1): Adjust.
7720
7721 2017-06-27 Pedro Alves <palves@redhat.com>
7722
7723 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7724 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7725 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7726 dtor.
7727 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7728 'storage_obstack' field an auto_obstack. In-class initialize all
7729 non-bitfield fields. Make minsyms_read bool.
7730 * symfile.c (read_symbols): Adjust.
7731
7732 2017-06-27 Alan Hayward <alan.hayward@arm.com>
7733
7734 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7735 (gdbsim_store_register): Likewise.
7736
7737 2017-06-27 Pedro Alves <palves@redhat.com>
7738
7739 * c-exp.y (name_obstack): Now an auto_obstack.
7740 (yylex): Use auto_obstack::clear.
7741 (c_parse): Use auto_obstack::clear instead of reinitializing and
7742 freeing the obstack.
7743 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7744 * d-exp.y (name_obstack): Now an auto_obstack.
7745 (yylex): Use auto_obstack::clear.
7746 (d_parse): Use auto_obstack::clear instead of reinitializing and
7747 freeing the obstack.
7748 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7749 auto_obstack.
7750 * dwarf2read.c (create_addrmap_from_index)
7751 (dwarf2_build_psymtabs_hard)
7752 (update_enumeration_type_from_children): Likewise.
7753 * gdb_obstack.h (auto_obstack): New type.
7754 * go-exp.y (name_obstack): Now an auto_obstack.
7755 (build_packaged_name): Use auto_obstack::clear.
7756 (go_parse): Use auto_obstack::clear instead of reinitializing and
7757 freeing the obstack.
7758 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7759 auto_obstack.
7760 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7761 * rust-exp.y (work_obstack): Now an auto_obstack.
7762 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7763 reinitializing and freeing the obstack.
7764 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7765 (host_char_to_target): Use auto_obstack.
7766 * utils.h (make_cleanup_obstack_free): Delete declaration.
7767 * valprint.c (generic_emit_char, generic_printstr): Use
7768 auto_obstack.
7769
7770 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7771
7772 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7773 thread.
7774 (darwin_init_thread_list): Don't update dummy thread.
7775 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7776
7777 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7778
7779 * record-full.c (netorder16): Remove.
7780
7781 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7782
7783 * common/diagnostics.h: Define macros for GCC.
7784 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7785 * common/vec.h: Include diagnostics.h.
7786 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7787 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7788 warning.
7789
7790 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7791
7792 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7793 New macro.
7794 * ada-lex.l: Ignore deprecated register warnings.
7795
7796 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7797
7798 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7799 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7800
7801 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7802
7803 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7804 its own line.
7805
7806 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7807
7808 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7809
7810 2017-06-23 Alan Hayward <alan.hayward@arm.com>
7811
7812 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7813 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7814 (xtensa_register_read_masked): Likewise.
7815
7816 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
7817
7818 * common/environ.c (gdb_environ::unset): Update comment.
7819
7820 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7821
7822 * python/py-unwind.c (pyuw_sniffer): Allocate space for
7823 registers.
7824
7825 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7826
7827 * record-full.c (record_full_exec_insn): Use byte_vector.
7828
7829 2017-06-22 Yao Qi <yao.qi@linaro.org>
7830
7831 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7832 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7833
7834 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7835
7836 * remote.c (cached_reg): Move from here...
7837 * regcache.h (cached_reg): ...to here.
7838 * python/py-unwind.c (struct reg_info): Remove.
7839 (cached_frame_info): Use cached_reg_t.
7840 (pyuw_prev_register): Likewise.
7841 (pyuw_sniffer): Use cached_reg_t and allocate registers.
7842 (pyuw_dealloc_cache): Free all registers.
7843
7844 2017-06-22 Pedro Alves <palves@redhat.com>
7845 Simon Marchi <simon.marchi@ericsson.com>
7846
7847 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7848 warning.
7849 * common/diagnostics.h: New file.
7850
7851 2017-06-22 Pedro Alves <palves@redhat.com>
7852
7853 * common/agent.h: Add include guards.
7854
7855 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
7856
7857 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7858 talk about addressable units instead of bytes.
7859
7860 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7861
7862 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7863 of '::const_iterator'.
7864
7865 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7866
7867 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7868 'unittests/environ-selftests.c'.
7869 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7870 * charset.c (find_charset_names): Declare object 'iconv_env'.
7871 Update code to use 'iconv_env' object. Remove call to
7872 'free_environ'.
7873 * common/environ.c: Include <utility>.
7874 (make_environ): Delete function.
7875 (free_environ): Delete function.
7876 (gdb_environ::clear): New function.
7877 (gdb_environ::operator=): New function.
7878 (gdb_environ::get): Likewise.
7879 (environ_vector): Delete function.
7880 (set_in_environ): Delete function.
7881 (gdb_environ::set): New function.
7882 (unset_in_environ): Delete function.
7883 (gdb_environ::unset): New function.
7884 (gdb_environ::envp): Likewise.
7885 * common/environ.h: Include <vector>.
7886 (struct gdb_environ): Delete; transform into...
7887 (class gdb_environ): ... this class.
7888 (free_environ): Delete prototype.
7889 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7890 environ_vector): Likewise.
7891 * infcmd.c (run_command_1): Update code to call
7892 'envp' from 'gdb_environ' class.
7893 (environment_info): Update code to call methods from 'gdb_environ'
7894 class.
7895 (unset_environment_command): Likewise.
7896 (path_info): Likewise.
7897 (path_command): Likewise.
7898 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7899 (inferior::inferior): Initialize 'environment' using the host's
7900 information.
7901 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7902 Include "environ.h".
7903 (class inferior) <environment>: Change type from 'struct
7904 gdb_environ' to 'gdb_environ'.
7905 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7906 methods from 'gdb_environ' class.
7907 * solib.c (solib_find_1): Likewise
7908 * unittests/environ-selftests.c: New file.
7909
7910 2017-06-20 Yao Qi <yao.qi@linaro.org>
7911
7912 * features/i386/i386-linux.xml: Exchange the order of including
7913 32bit-linux.xml and 32bit-sse.xml.
7914 * features/i386/i386-linux.c: Regenerated.
7915
7916 2017-06-20 Yao Qi <yao.qi@linaro.org>
7917
7918 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7919 Delete copy ctor and assignment operator.
7920 (tdesc_type): Likewise.
7921 (tdesc_feature): Likewise.
7922 (tdesc_free_reg): Remove.
7923 (tdesc_create_reg): Use new.
7924 (tdesc_free_type): Remove.
7925 (tdesc_create_vector): Use new.
7926 (tdesc_create_union): Likewise.
7927 (tdesc_create_flags): Likewise.
7928 (tdesc_create_enum): Likewise.
7929 (tdesc_free_feature): Delete.
7930 (free_target_description): Use delete.
7931
7932 2017-06-19 John Baldwin <jhb@FreeBSD.org>
7933
7934 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7935 registers.
7936
7937 2017-06-19 Pedro Alves <palves@redhat.com>
7938
7939 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7940 after gdb::unlinker.
7941
7942 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
7943
7944 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7945 gdb_environ to access an environment variable.
7946
7947 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7948
7949 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7950 gdb_byte*.
7951
7952 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7953
7954 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7955
7956 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7957
7958 * configure: Re-generate.
7959 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7960
7961 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7962
7963 * configure: Re-generate.
7964 * warning.m4: Pass -Werror to compiler when checking for
7965 supported warning flags.
7966
7967 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7968
7969 * Makefile.in (COMPILE.pre): Add "-x c++".
7970
7971 2017-06-16 Alan Hayward <alan.hayward@arm.com>
7972 Pedro Alves <palves@redhat.com>
7973 Yao Qi <yao.qi@linaro.org>
7974
7975 * defs.h (RequireLongest): New.
7976 (extract_integer): Declare function template.
7977 (extract_signed_integer): Remove the declaration, but define it
7978 static inline.
7979 (extract_unsigned_integer): Likewise.
7980 (store_integer): Declare function template.
7981 (store_signed_integer): Remove the declaration, but define it
7982 static inline.
7983 (store_unsigned_integer): Likewise.
7984 * findvar.c (extract_integer): New function template.
7985 (extract_signed_integer): Remove.
7986 (extract_unsigned_integer): Remove.
7987 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7988 instantiations.
7989 (store_integer): New function template.
7990 (store_signed_integer): Remove.
7991 (store_unsigned_integer): Remove.
7992 (store_integer): Explicit instantiations.
7993 * regcache.c (regcache_raw_read_signed): Update.
7994 (regcache::raw_read): New function.
7995 (regcache::raw_read_signed): Remove.
7996 (regcache::raw_read_unsigned): Remove.
7997 (regcache_raw_read_unsigned): Update.
7998 (regcache_raw_write_unsigned): Update.
7999 (regcache::raw_write_signed): Remove.
8000 (regcache::raw_write): New function.
8001 (regcache_cooked_read_signed): Update.
8002 (regcache::raw_write_unsigned): Remove.
8003 (regcache::cooked_read_signed): Remove.
8004 (regcache_cooked_read_unsigned): Update.
8005 (regcache::cooked_read_unsigned): Remove.
8006 (regcache_cooked_write_signed): Update.
8007 (regcache_cooked_write_unsigned): Update.
8008 * regcache.h (regcache) <raw_read_signed>: Remove.
8009 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8010 <raw_read, raw_write>: New.
8011 <cooked_read_signed, cooked_write_signed>: Remove.
8012 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8013 <cooked_read, cooked_write>: New.
8014 * sh64-tdep.c (sh64_pseudo_register_read): Update.
8015 (sh64_pseudo_register_write): Update.
8016
8017 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
8018
8019 * arc-tdep.c (arc_disassembler_options): New variable.
8020 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8021 of default_print_insn.
8022 (arc_delayed_print_insn): Set info->section when needed,
8023 use default_print_insn to retrieve a disassembler.
8024
8025 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
8026
8027 PR gdb/21574
8028 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8029 to mention $SHELL and startup-with-shell.
8030
8031 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
8032
8033 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8034
8035 2017-06-14 Yao Qi <yao.qi@linaro.org>
8036
8037 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8038 default_print_insn instead of print_insn_aarch64.
8039 * arm-tdep.c (gdb_print_insn_arm): Call
8040 default_print_insn instead of print_insn_big_arm
8041 and print_insn_little_arm.
8042 * i386-tdep.c (i386_print_insn): Call default_print_insn
8043 instead of print_insn_i386.
8044 * ia64-tdep.c (ia64_print_insn): Call
8045 default_print_insn instead of print_insn_ia64.
8046 * mips-tdep.c (gdb_print_insn_mips): Call
8047 default_print_insn instead of print_insn_big_mips
8048 and print_insn_little_mips.
8049 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8050 instead of print_insn_spu.
8051
8052 2017-06-14 Pedro Alves <palves@redhat.com>
8053
8054 * ada-lang.c: Include "common/byte-vector.h".
8055 (ada_value_primitive_packed_val): Use gdb::byte_vector.
8056 * charset.c (wchar_iterator::iterate): Resize the vector instead
8057 of reserving it.
8058 * common/byte-vector.h: Include "common/def-vector.h".
8059 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8060 * cli/cli-dump.c: Include "common/byte-vector.h".
8061 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8062 * common/byte-vector.h: New file.
8063 * common/def-vector.h: New file.
8064 * common/default-init-alloc.h: New file.
8065 * dwarf2loc.c: Include "common/byte-vector.h".
8066 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8067 instead of reserving it.
8068 * dwarf2read.c: Include "common/byte-vector.h".
8069 (data_buf::m_vec): Now a gdb::byte_vector.
8070 * gdb_regex.c: Include "common/def-vector.h".
8071 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8072 * mi/mi-main.c: Include "common/byte-vector.h".
8073 (mi_cmd_data_read_memory): Use gdb::byte_vector.
8074 * printcmd.c: Include "common/byte-vector.h".
8075 (print_scalar_formatted): Use gdb::byte_vector.
8076 * valprint.c: Include "common/byte-vector.h".
8077 (maybe_negate_by_bytes, print_decimal_chars): Use
8078 gdb::byte_vector.
8079
8080 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8081
8082 * darwin-nat.c: Include "nat/fork-inferior.h".
8083
8084 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8085
8086 * configure.nat: Factor out Darwin bits that are not
8087 architecture-specific. Add fork-inferior.o.
8088
8089 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8090
8091 * configure.nat: Factor out AIX bits that are not
8092 architecture-specific. Add fork-inferior.o.
8093
8094 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8095
8096 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
8097 (read_pieced_value, write_pieced_value): ...here. Reduce to
8098 wrappers that just call rw_pieced_value.
8099
8100 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8101
8102 * dwarf2loc.c (write_pieced_value): When writing the data for a
8103 memory piece, use write_memory_with_notification instead of
8104 write_memory.
8105
8106 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8107
8108 * valops.c (read_value_memory): Change embedded_offset to
8109 represent a bit offset instead of a byte offset.
8110 * value.h (read_value_memory): Adjust comment.
8111
8112 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8113
8114 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8115 dest_offset_bits and source_offset_bits.
8116 (write_pieced_value): Likewise.
8117
8118 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8119
8120 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8121 given by DW_OP_bit_piece.
8122 (write_pieced_value): Likewise.
8123
8124 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8125
8126 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8127 some other preparations to the places where sufficient information
8128 is available.
8129 (write_pieced_value): Likewise.
8130
8131 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8132
8133 * dwarf2loc.c (bits_to_bytes): New function.
8134 (read_pieced_value): Fix offset calculations for register pieces
8135 on big-endian targets.
8136 (write_pieced_value): Likewise.
8137
8138 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8139
8140 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8141 (write_pieced_value): Likewise.
8142
8143 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8144
8145 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8146 transfer the source value's least significant bits, instead of its
8147 lowest-addressed ones. Rename type_len to max_offset.
8148 (read_pieced_value): Mirror above changes to write_pieced_value as
8149 applicable.
8150
8151 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8152
8153 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8154 truncate full bytes from dest_offset_bits before using it as an
8155 offset into the buffer.
8156
8157 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8158
8159 * dwarf2loc.c (write_pieced_value): Include transfer size in
8160 byte-wise check.
8161
8162 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8163
8164 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8165 calculation of this_size.
8166
8167 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8168
8169 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8170 when targeting a bit-field.
8171 (write_pieced_value): Likewise.
8172
8173 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8174
8175 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8176 (allocate_piece_closure): Drop addr_size parameter.
8177 (dwarf2_evaluate_loc_desc_full): Adjust call to
8178 allocate_piece_closure.
8179
8180 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8181
8182 PR gdb/21226
8183 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8184 the LSB end, independent of endianness.
8185
8186 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8187
8188 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8189 size capping.
8190
8191 2017-06-13 Yao Qi <yao.qi@linaro.org>
8192
8193 * mips-linux-nat.c: Move include features/mips*-linux.c to
8194 mips-linux-tdep.c.
8195 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8196 to mips-linux-tdep.c.
8197 * mips-linux-tdep.c: Include features/mips*-linux.c
8198 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8199 functions.
8200 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8201 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8202 (tdesc_mips64_dsp_linux): Declare.
8203
8204 2017-06-12 Tom Tromey <tom@tromey.com>
8205
8206 * valprint.h (val_print_type_code_int): Remove.
8207 * valprint.c (generic_val_print_int): Always call
8208 val_print_scalar_formatted.
8209 (val_print_type_code_int): Remove.
8210 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8211 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8212 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8213 * ada-valprint.c (ada_val_print_num): Use
8214 val_print_scalar_formatted.
8215
8216 2017-06-12 Tom Tromey <tom@tromey.com>
8217
8218 * printcmd.c (print_scalar_formatted): Unify the two switches.
8219 Don't convert scalars to LONGEST.
8220
8221 2017-06-12 Tom Tromey <tom@tromey.com>
8222
8223 PR exp/16225:
8224 * valprint.h (print_decimal_chars): Update.
8225 * valprint.c (maybe_negate_by_bytes): New function.
8226 (print_decimal_chars): Add "is_signed" argument.
8227 * printcmd.c (print_scalar_formatted): Update.
8228
8229 2017-06-12 Tom Tromey <tom@tromey.com>
8230
8231 PR exp/16225:
8232 * valprint.h (print_binary_chars, print_hex_chars): Update.
8233 * valprint.c (val_print_type_code_int): Update.
8234 (print_binary_chars): Add "zero_pad" argument.
8235 (emit_octal_digit): New function.
8236 (print_octal_chars): Don't zero-pad.
8237 (print_decimal_chars): Likewise.
8238 (print_hex_chars): Add "zero_pad" argument.
8239 * sh64-tdep.c (sh64_do_fp_register): Update.
8240 * regcache.c (regcache::dump): Update.
8241 * printcmd.c (print_scalar_formatted): Update.
8242 * infcmd.c (default_print_one_register_info): Update.
8243
8244 2017-06-12 Pedro Alves <palves@redhat.com>
8245 Alan Hayward <alan.hayward@arm.com>
8246
8247 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8248 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8249 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8250 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8251 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8252
8253 2017-06-12 Pedro Alves <palves@redhat.com>
8254
8255 * dwarf2read.c (mapped_symtab::data): Now a vector of
8256 symtab_index_entry instead of vector of
8257 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8258 whether an element's name is NULL instead of checking whether the
8259 element itself is NULL.
8260 (find_slot): Change return type. Adjust.
8261 (hash_expand, , add_index_entry, uniquify_cu_indices)
8262 (write_hash_table): Adjust.
8263
8264 2017-06-12 Pedro Alves <palves@redhat.com>
8265
8266 * dwarf2read.c (recursively_count_psymbols): New function.
8267 (write_psymtabs_to_index): Call it to compute number of psyms and
8268 pass estimate size of psyms_seen to unordered_set's ctor.
8269
8270 2017-06-12 Pedro Alves <palves@redhat.com>
8271
8272 * dwarf2read.c (write_hash_table): Check if key already exists
8273 before emplacing.
8274
8275 2017-06-12 Pedro Alves <palves@redhat.com>
8276
8277 * dwarf2read.c (data_buf::append_space): Rename to...
8278 (data_buf::grow): ... this, and make private. Adjust all callers.
8279 (data_buf::append_uint): New method.
8280 (add_address_entry, write_one_signatured_type)
8281 (write_psymtabs_to_index): Use it.
8282
8283 2017-06-12 Pedro Alves <palves@redhat.com>
8284
8285 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8286 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8287 (data_buf::file_write): Call ::fwrite directly.
8288
8289 2017-06-12 Pedro Alves <palves@redhat.com>
8290
8291 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8292 std::vector::erase.
8293
8294 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8295
8296 Code cleanup: C++ify .gdb_index producer.
8297 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8298 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8299 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8300 (create_strtab, add_string): Remove.
8301 (file_write, data_buf): New.
8302 (struct symtab_index_entry): Use std::vector for cu_indices.
8303 (struct mapped_symtab): Use std::vector for data.
8304 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8305 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8306 Remove.
8307 (find_slot): Change return type. Update it to the new data structures.
8308 (hash_expand, add_index_entry): Update it to the new data structures.
8309 (offset_type_compare): Remove.
8310 (uniquify_cu_indices): Update it to the new data structures.
8311 (c_str_view, c_str_view_hasher, vector_hasher): New.
8312 (add_indices_to_cpool): Remove.
8313 (write_hash_table): Update it to the new data structures.
8314 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8315 (eq_psymtab_cu_index): Remove.
8316 (psym_index_map): New typedef.
8317 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8318 reference and std::unordered_map for cu_index_htab.
8319 (add_address_entry, add_address_entry_worker, write_address_map)
8320 (write_psymbols): Update it to the new data structures.
8321 (write_obstack): Remove.
8322 (struct signatured_type_index_data): Change types_list to a data_buf
8323 reference and psyms_seen to a std::unordered_set reference.
8324 (write_one_signatured_type, recursively_write_psymbols)
8325 (write_psymtabs_to_index): Update it to the new data structures.
8326
8327 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8328
8329 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8330 separate-debug-file commands.
8331 * symfile.h (separate_debug_file_debug): New global.
8332 * symfile.c (separate_debug_file_debug): New global.
8333 (separate_debug_file_exists, find_separate_debug_file): Add
8334 debug output.
8335 (_initialize_symfile): Add "set debug separate-debug-file"
8336 command.
8337 * build-id.c (build_id_to_debug_bfd,
8338 find_separate_debug_file_by_buildid): Add debug output.
8339
8340 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8341
8342 * gdbarch.sh (displaced_step_free_closure): Remove.
8343 * gdbarch.h, gdbarch.c: Re-generate.
8344 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8345 displaced_step_free_closure.
8346 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8347 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8348 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8349 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8350 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8351 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8352 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8353 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8354 * infrun.c (displaced_step_clear): Call xfree instead of
8355 gdbarch_displaced_step_free_closure.
8356
8357 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8358
8359 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8360 NULL".
8361
8362 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8363
8364 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8365 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8366 (mn10300_push_dummy_call): Likewise.
8367
8368 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8369
8370 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8371
8372 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8373
8374 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8375
8376 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8377
8378 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8379 able to start inferiors using a shell.
8380 (New remote packets): Announce new packet "QStartupWithShell".
8381 * remote.c: Add PACKET_QStartupWithShell.
8382 (extended_remote_create_inferior): Handle new
8383 PACKET_QStartupWithShell.
8384 (remote_protocol_features) <QStartupWithShell>: New entry for
8385 PACKET_QStartupWithShell.
8386 (_initialize_remote): Call "add_packet_config_cmd" for
8387 QStartupShell.
8388
8389 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8390 Pedro Alves <palves@redhat.com>
8391
8392 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8393 and "nat/fork-inferior.h".
8394 * common/common-inferior.h: New file, with contents from
8395 "gdb/inferior.h".
8396 * commom/common-utils.c: Include "common-utils.h".
8397 (stringify_argv): New function.
8398 * common/common-utils.h (stringify_argv): New prototype.
8399 * configure.nat: Add "fork-inferior.o" as a dependency for
8400 "*linux*", "fbsd*" and "nbsd*" hosts.
8401 * corefile.c (get_exec_file): Update comment.
8402 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8403 instead of "startup_inferior".
8404 (darwin_create_inferior): Call "add_thread_silent" after
8405 "fork_inferior".
8406 * fork-child.c: Cleanup unnecessary includes.
8407 (SHELL_FILE): Move to "common/common-fork-child.c".
8408 (environ): Likewise.
8409 (exec_wrapper): Initialize.
8410 (get_exec_wrapper): New function.
8411 (breakup_args): Move to "common/common-fork-child.c"; rename to
8412 "breakup_args_for_exec".
8413 (escape_bang_in_quoted_argument): Move to
8414 "common/common-fork-child.c".
8415 (saved_ui): New variable.
8416 (prefork_hook): New function.
8417 (postfork_hook): Likewise.
8418 (postfork_child_hook): Likewise.
8419 (gdb_startup_inferior): Likewise.
8420 (fork_inferior): Move to "common/common-fork-child.c". Update
8421 function to support gdbserver.
8422 (startup_inferior): Likewise.
8423 * gdbcore.h (get_exec_file): Remove declaration.
8424 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8425 instead of "startup_inferior". Call "add_thread_silent" after
8426 "fork_inferior".
8427 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8428 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8429 instead of "startup_inferior". Call "add_thread_silent" after
8430 "fork_inferior".
8431 * inferior.h: Include "common-inferior.h".
8432 (trace_start_error): Move to "common/common-utils.h".
8433 (trace_start_error_with_name): Likewise.
8434 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8435 (startup_inferior): Likewise.
8436 (gdb_startup_inferior): New prototype.
8437 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8438 * nat/fork-inferior.h: New file.
8439 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8440 instead of "startup_inferior". Call "add_thread_silent" after
8441 "fork_inferior".
8442 * target.h (target_terminal_init): Move prototype to
8443 "target/target.h".
8444 (target_terminal_inferior): Likewise.
8445 (target_terminal_ours): Likewise.
8446 * target/target.h (target_terminal_init): New prototype, moved
8447 from "target.h".
8448 (target_terminal_inferior): Likewise.
8449 (target_terminal_ours): Likewise.
8450 * utils.c (gdb_flush_out_err): New function.
8451
8452 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8453
8454 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8455 * common/common-gdbthread.h: New file, with parts from
8456 "gdb/gdbthread.h".
8457 * gdbthread.h: Include "common-gdbthread.h".
8458 (switch_to_thread): Moved to "common/common-gdbthread.h".
8459
8460 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8461
8462 * Makefile.in (SFILES): Add "common/job-control.c".
8463 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8464 (COMMON_OBS): Add "job-control.o".
8465 * common/job-control.c: New file, with contents from
8466 "gdb/inflow.c".
8467 * common/job-control.h: New file, with contents from "terminal.h".
8468 * fork-child.c: Include "job-control.h".
8469 * inflow.c: Include "job-control.h".
8470 (gdb_setpgid): Move to "common/common-inflow.c".
8471 (_initialize_inflow): Move setting of "job_control" to
8472 "handle_job_control".
8473 * terminal.h (job_control): Moved to "common/common-terminal.h".
8474 (gdb_setpgid): Likewise.
8475 * top.c: Include "job_control.h".
8476 * utils.c: Likewise.
8477 (job_control): Moved to "job-control.c".
8478
8479 2017-06-07 Pedro Alves <palves@redhat.com>
8480
8481 * Makefile.in (SFILES): Add gdb_regex.c.
8482 (COMMON_OBS): Add gdb_regex.o.
8483 * ada-lang.c (ada_add_standard_exceptions)
8484 (ada_add_exceptions_from_frame, name_matches_regex)
8485 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8486 parameter type to compiled_regex. Adjust.
8487 (ada_exceptions_list): Use compiled_regex.
8488 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8489 std::unique_ptr<compiled_regex>.
8490 (exception_catchpoint::~exception_catchpoint): Remove regfree
8491 call.
8492 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8493 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8494 * breakpoint.c (solib_catchpoint::compiled): Now a
8495 std::unique_ptr<compiled_regex>.
8496 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8497 (check_status_catch_solib): Adjust to use compiled_regex.
8498 (add_solib_catchpoint): Adjust to use compiled_regex.
8499 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8500 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8501 compiled_regex reference. Adjust to use it.
8502 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8503 declaration. Include "gdb_regex.h".
8504 (apropos_cmd): Change regex parameter to compiled_regex reference.
8505 * gdb_regex.c: New file.
8506 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8507 declarations.
8508 (class compiled_regex): New.
8509 * linux-tdep.c: Include "common/gdb_optional.h".
8510 (struct mapping_regexes): New, factored out from
8511 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8512 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8513 gdb::optional and remove cleanups. Adjust to compiled_regex.
8514 * probe.c: Include "common/gdb_optional.h".
8515 (collect_probes): Use compiled_regex and gdb::optional and remove
8516 cleanups.
8517 * skip.c: Include "common/gdb_optional.h".
8518 (skiplist_entry::compiled_function_regexp): Now a
8519 gdb::optional<compiled_regex>.
8520 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8521 (free_skiplist_entry): Remove regfree call.
8522 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8523 compiled_regex and gdb::optional.
8524 * symtab.c: Include "common/gdb_optional.h".
8525 (search_symbols): Use compiled_regex and gdb::optional.
8526 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8527 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8528 to gdb_regex.c.
8529
8530 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8531
8532 * regcache.c (regcache::save): Avoid buffer use.
8533 (regcache::dump): Likewise.
8534
8535 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8536
8537 * sh-tdep.c (sh_pseudo_register_read): Remove
8538 MAX_REGISTER_SIZE.
8539 (sh_pseudo_register_write): Likewise.
8540 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8541 (sh64_pseudo_register_write): Likewise
8542
8543 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8544
8545 * aarch64-tdep.c (aarch64_store_return_value): Use
8546 V_REGISTER_SIZE.
8547 (aarch64_pseudo_read_value): Likewise.
8548 (aarch64_pseudo_write): Likewise.
8549
8550 2017-06-06 Yao Qi <yao.qi@linaro.org>
8551
8552 * regformats/regdef.h (set_register_cache): Remove the
8553 declaration.
8554
8555 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8556
8557 * frame.c (frame_unwind_register_signed): Use
8558 frame_unwind_register_value.
8559
8560 2017-06-06 Pedro Alves <palves@redhat.com>
8561
8562 PR breakpoints/21553
8563 * breakpoint.c (create_breakpoints_sal_default)
8564 (init_breakpoint_sal, create_breakpoint_sal): Use
8565 gdb::unique_xmalloc_ptr for string parameters.
8566 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8567 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8568 (base_breakpoint_create_breakpoints_sal)
8569 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8570 (strace_marker_create_breakpoints_sal)
8571 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8572 string parameters.
8573 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8574 gdb::unique_xmalloc_ptr for string parameters.
8575 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8576 parameters.
8577
8578 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8579
8580 * alpha-tdep.c (alpha_register_to_value): Use
8581 get_frame_register_value.
8582 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8583
8584 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8585
8586 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8587 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8588 (ia64_value_to_register): Likewise.
8589 (ia64_extract_return_value): Likewise.
8590 (ia64_store_return_value): Likewise.
8591 (ia64_push_dummy_call): Likewise.
8592
8593 2017-06-04 Joel Brobecker <brobecker@adacore.com>
8594
8595 GDB 8.0 released.
8596
8597 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8598
8599 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8600
8601 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8602
8603 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8604 parameter.
8605 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8606
8607 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8608
8609 * event-loop.c (poll_timers): Unallocate timer using delete
8610 instead of xfree.
8611
8612 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8613
8614 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8615 (struct breakpoint) <~breakpoint>: New.
8616 (struct watchpoint): Inherit from breakpoint.
8617 <~watchpoint>: New.
8618 <base>: Remove.
8619 (struct tracepoint): Inherit from breakpoint.
8620 <base>: Remove.
8621 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8622 (struct longjmp_breakpoint): Inherit from breakpoint.
8623 <~longjmp_breakpoint>: New.
8624 <base>: Remove.
8625 (new_breakpoint_from_type): Remove casts.
8626 (watchpoint_in_thread_scope): Remove reference to base field.
8627 (watchpoint_del_at_next_stop): Likewise.
8628 (update_watchpoint): Likewise.
8629 (watchpoint_check): Likewise.
8630 (bpstat_check_watchpoint): Likewise.
8631 (set_longjmp_breakpoint): Likewise.
8632 (struct fork_catchpoint): Inherit from breakpoint.
8633 <base>: Remove.
8634 (struct solib_catchpoint): Inherit from breakpoint.
8635 <~solib_catchpoint>: New.
8636 <base>: Remove.
8637 (dtor_catch_solib): Change to ...
8638 (solib_catchpoint::~solib_catchpoint): ... this.
8639 (breakpoint_hit_catch_solib): Remove reference to base field.
8640 (add_solib_catchpoint): Likewise.
8641 (create_fork_vfork_event_catchpoint): Likewise.
8642 (struct exec_catchpoint): Inherit from breakpoint.
8643 <~exec_catchpoint>: New.
8644 <base>: Remove.
8645 (dtor_catch_exec): Change to ...
8646 (exec_catchpoint::~exec_catchpoint): ... this.
8647 (dtor_watchpoint): Change to ...
8648 (watchpoint::~watchpoint): ... this.
8649 (watch_command_1): Remove reference to base field.
8650 (catch_exec_command_1): Likewise.
8651 (base_breakpoint_dtor): Change to ...
8652 (breakpoint::~breakpoint): ... this.
8653 (base_breakpoint_ops): Remove dtor field value.
8654 (longjmp_bkpt_dtor): Change to ...
8655 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8656 (strace_marker_create_breakpoints_sal): Remove reference to base
8657 field.
8658 (delete_breakpoint): Don't manually call breakpoint destructor.
8659 (create_tracepoint_from_upload): Remove reference to base field.
8660 (trace_pass_set_count): Likewise.
8661 (initialize_breakpoint_ops): Don't initialize
8662 momentary_breakpoint_ops, don't set dtors.
8663 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8664 <~ada_catchpoint>: New.
8665 <base>: Remove.
8666 (create_excep_cond_exprs): Remove reference to base field.
8667 (dtor_exception): Change to ...
8668 (ada_catchpoint::~ada_catchpoint): ... this.
8669 (dtor_catch_exception): Remove.
8670 (dtor_catch_exception_unhandled): Remove.
8671 (dtor_catch_assert): Remove.
8672 (create_ada_exception_catchpoint): Remove reference to base
8673 field.
8674 (initialize_ada_catchpoint_ops): Don't set dtors.
8675 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8676 breakpoint.
8677 <~signal_catchpoint>: New.
8678 <base>: Remove.
8679 (signal_catchpoint_dtor): Change to ...
8680 (signal_catchpoint::~signal_catchpoint): ... this.
8681 (create_signal_catchpoint): Remove reference to base field.
8682 (initialize_signal_catchpoint_ops): Don't set dtor.
8683 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8684 from breakpoint.
8685 <~syscall_catchpoint>: New.
8686 <base>: Remove.
8687 (dtor_catch_syscall): Change to ...
8688 (syscall_catchpoint::~syscall_catchpoint): ... this.
8689 (create_syscall_event_catchpoint): Remove reference to base
8690 field.
8691 (initialize_syscall_catchpoint_ops): Don't set dtor.
8692 * break-catch-throw.c (struct exception_catchpoint): Inherit
8693 from breakpoint.
8694 <~exception_catchpoint>: New.
8695 <base>: Remove.
8696 (dtor_exception_catchpoint): Change to ...
8697 (exception_catchpoint::~exception_catchpoint): ... this.
8698 (handle_gnu_v3_exceptions): Remove reference to base field.
8699 (initialize_throw_catchpoint_ops): Don't set dtor.
8700 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8701 field.
8702 * remote.c (remote_get_tracepoint_status): Likewise.
8703 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8704 * tracefile.c (tracefile_fetch_registers): Likewise.
8705 * tracepoint.c (actions_command): Likewise.
8706 (validate_actionline): Likewise.
8707 (tfind_1): Likewise.
8708 (get_traceframe_location): Likewise.
8709 (find_matching_tracepoint_location): Likewise.
8710 (parse_tracepoint_status): Likewise.
8711 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8712
8713 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8714
8715 * breakpoint.c (struct longjmp_breakpoint): New struct.
8716 (is_tracepoint_type): Change return type to bool.
8717 (is_longjmp_type): New function.
8718 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8719 (set_raw_breakpoint_without_location): Use
8720 new_breakpoint_from_type.
8721 (set_raw_breakpoint): Likewise.
8722
8723 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8724
8725 * breakpoint.c (new_breakpoint_from_type): New function.
8726 (create_breakpoint_sal): Use new_breakpoint_from_type and
8727 unique_ptr.
8728 (create_breakpoint): Likewise.
8729
8730 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8731
8732 * memattr.c (mem_info_command): Rename to ...
8733 (info_mem_command): ... this.
8734 (mem_enable_command): Rename to ...
8735 (enable_mem_command): ... this.
8736 (mem_disable_command): Rename to ...
8737 (disable_mem_command): ... this.
8738 (mem_delete_command): Rename to ...
8739 (delete_mem_command): ... this.
8740 (_initialize_mem): Adjust function names.
8741
8742 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8743
8744 * btrace.c (handle_pt_insn_events): New.
8745 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8746 STATUS. Split into this and ...
8747 (handle_pt_insn_event_flags): ... this.
8748
8749 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8750
8751 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8752 and struct pt_insn.resynced.
8753 * configure: Regenerated.
8754 * config.in: Regenerated.
8755
8756 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8757
8758 * btrace.c (ftrace_find_call_by_number): New function.
8759 (ftrace_new_function): Store objects, not pointers.
8760 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8761 ftrace_new_gap, ftrace_update_function,
8762 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8763 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8764 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8765 btrace_ends_with_single_insn, btrace_call_get): Account for
8766 btrace_thread_info::functions now storing objects.
8767 * btrace.h (struct btrace_thread_info): Add constructor.
8768 (struct btrace_thread_info) <functions>: Make std::vector.
8769 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8770 Initialize with default values.
8771 * record-btrace.c (record_btrace_frame_sniffer): Account for
8772 btrace_thread_info::functions now storing objects.
8773
8774 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8775
8776 * btrace.c: Remove typedef bfun_s.
8777 (ftrace_new_gap): Directly add gaps to the list of gaps.
8778 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8779 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8780 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8781 instead of gdb VEC.
8782
8783 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8784
8785 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8786 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8787 with btrace_thread_info::next_segment and
8788 btrace_thread_info::prev_segment.
8789 * btrace.h: Remove struct btrace_func_link.
8790 (struct btrace_function): Replace pair of function segment pointers
8791 with pair of indices.
8792 * python/py-record-btrace.c (btpy_call_prev_sibling,
8793 btpy_call_next_sibling): Replace references to
8794 btrace_thread_info::segment with btrace_thread_info::next_segment and
8795 btrace_thread_info::prev_segment.
8796 * record-btrace.c (record_btrace_frame_this_id): Use
8797 btrace_find_call_by_number.
8798
8799 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8800
8801 * btrace.c (ftrace_new_function, ftrace_fixup_level,
8802 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8803 btrace_insn_next, btrace_insn_prev): Remove references to
8804 btrace_thread_info::flow.
8805 * btrace.h (struct btrace_function): Remove FLOW.
8806
8807 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8808
8809 * btrace.c (ftrace_find_call_by_number): New function.
8810 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8811 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8812 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8813 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8814 index.
8815 * btrace.h (struct btrace_function): Turn UP into an index.
8816 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8817 as an index.
8818 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8819 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8820 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8821
8822 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8823
8824 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8825 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8826 ftrace_update_function, ftrace_compute_global_level_offset,
8827 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8828 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8829 btrace_insn_end, btrace_is_empty): Remove references to
8830 btrace_thread_info::begin and btrace_thread_info::end.
8831 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8832 (struct btrace_thread_info) <functions>: Adjust comment.
8833 * record-btrace.c (record_btrace_start_replaying): Remove reference to
8834 btrace_thread_info::begin.
8835
8836 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8837
8838 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8839 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8840 ftrace_update_function): Remove arguments that implicitly were always
8841 BTINFO->END.
8842 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8843 Don't pass BTINFO->END.
8844
8845 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8846
8847 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8848 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8849 btrace_find_insn_by_number): Replace function segment pointer with
8850 index.
8851 (btrace_insn_cmp): Simplify.
8852 * btrace.h: (struct btrace_insn_iterator) Rename index to
8853 insn_index. Replace function segment pointer with index into function
8854 segment vector.
8855 * record-btrace.c (record_btrace_call_history): Replace function
8856 segment pointer use with index.
8857 (record_btrace_frame_sniffer): Retrieve function call segment through
8858 vector.
8859 (record_btrace_set_replay): Remove defunc't safety check.
8860
8861 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8862
8863 * btrace.c (btrace_ends_with_single_insn): New function.
8864 (btrace_call_get, btrace_call_number, btrace_call_begin,
8865 btrace_call_end, btrace_call_next, btrace_call_prev,
8866 btrace_find_call_by_number): Use index into call segment vector
8867 instead of pointer.
8868 (btrace_call_cmp): Simplify.
8869 * btrace.h (struct btrace_call_iterator): Replace function call segment
8870 pointer with index into vector.
8871 * record-btrace.c (record_btrace_call_history): Use index instead of
8872 pointer.
8873
8874 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8875
8876 * btrace.c (btrace_insn_begin, btrace_insn_end,
8877 btrace_find_insn_by_number): Add btinfo to iterator.
8878 * btrace.h (struct btrace_insn_iterator): Add btinfo.
8879
8880 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8881
8882 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8883 and save pointers directly.
8884 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8885 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8886 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
8887 changed signature of functions.
8888 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8889 (btrace_fetch): Remove code that adds btrace_function pointers to
8890 vector of btrace_functions.
8891 (btrace_clear): Simplify freeing vector of btrace_functions.
8892
8893 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8894
8895 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8896 Replace VEC_* with std::vector functions.
8897 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8898 (struct btrace_thread_info)<functions>: Change type to std::vector.
8899
8900 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
8901
8902 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
8903 "Removed targets and native configurations" up. Merge duplicate
8904 "New commands" sub-sections. Add "New options" sub-sections.
8905
8906 2017-05-26 Alan Hayward <alan.hayward@arm.com>
8907
8908 * defs.h (copy_integer_to_size): New declaration.
8909 * findvar.c (copy_integer_to_size): New function.
8910 (do_cint_test): New selftest function.
8911 (copy_integer_to_size_test): Likewise.
8912 (_initialize_findvar): Likewise.
8913 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8914 (mips_fbsd_collect_reg): Use raw_collect_integer.
8915 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8916 (mips64_fill_gregset): Use raw_collect_integer
8917 (mips64_fill_fpregset): Use raw_supply_integer.
8918 * regcache.c (regcache::raw_supply_integer): New function.
8919 (regcache::raw_collect_integer): Likewise.
8920 * regcache.h: (regcache::raw_supply_integer): New declaration.
8921 (regcache::raw_collect_integer): Likewise.
8922
8923 2017-05-24 Yao Qi <yao.qi@linaro.org>
8924
8925 * Makefile.in (SFILES): Add gdbarch-selftests.c.
8926 (COMMON_OBS): Add gdbarch-selftests.o.
8927 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8928 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8929 * gdbarch-selftests.c: New file.
8930 * regcache.h (regcache) <~regcache>: Mark it virtual if
8931 GDB_SELF_TEST.
8932 <raw_write>: Likewise.
8933
8934 2017-05-24 Yao Qi <yao.qi@linaro.org>
8935
8936 * regcache.c (current_regcache): Change it to
8937 regcache::current_regcache.
8938 (regcache_observer_target_changed): Update.
8939 (regcache_thread_ptid_changed): Make it a regcache static
8940 method.
8941 (regcache_thread_ptid_changed): Update.
8942 (class regcache_access): New.
8943 (current_regcache_test): Update.
8944 (_initialize_regcache): Update.
8945 * regcache.h: Include forward_list.
8946 (regcache): Declare regcache_thread_ptid_changed and declare
8947 registers_changed_ptid as friend.
8948
8949 2017-05-24 Yao Qi <yao.qi@linaro.org>
8950
8951 * i387-tdep.c (i387_register_to_value): Use register_size
8952 instead of TYPE_LENGTH.
8953 * m68k-tdep.c (m68k_register_to_value): Likewise.
8954
8955 2017-05-24 Yao Qi <yao.qi@linaro.org>
8956
8957 * i387-tdep.c (i387_convert_register_p): Return false if type
8958 code isn't TYPE_CODE_FLT.
8959
8960 2017-05-24 Yao Qi <yao.qi@linaro.org>
8961
8962 * alpha-tdep.c (alpha_convert_register_p): Return true if type
8963 length is 4.
8964 (alpha_register_to_value): Remove type length check.
8965 (alpha_value_to_register): Likewise.
8966
8967 2017-05-24 Yao Qi <yao.qi@linaro.org>
8968
8969 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8970 TYPE_CODE_FLT.
8971
8972 2017-05-24 Yao Qi <yao.qi@linaro.org>
8973
8974 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8975 TYPE_CODE_FLT or not.
8976
8977 2017-05-24 Yao Qi <yao.qi@linaro.org>
8978
8979 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8980 * avr-tdep.c (avr_gdbarch_init): Likewise.
8981 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8982 * cris-tdep.c (cris_gdbarch_init): Likewise.
8983 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8984 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8985 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8986 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8987 * mep-tdep.c (mep_gdbarch_init): Likewise.
8988 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8989 * mips-tdep.c (mips_gdbarch_init): Likewise.
8990 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8991 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8992 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8993 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8994 * v850-tdep.c (v850_gdbarch_init): Likewise.
8995
8996 2017-05-24 Yao Qi <yao.qi@linaro.org>
8997
8998 * selftest-arch.c (tests_with_arch): Call registers_changed
8999 and reinit_frame_cache.
9000 * selftest.c (run_self_tests): Likewise.
9001
9002 2017-05-24 Yao Qi <yao.qi@linaro.org>
9003
9004 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9005 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9006
9007 2017-05-24 Yao Qi <yao.qi@linaro.org>
9008
9009 * rl78-tdep.c (rl78_gdbarch_init): Don't call
9010 set_gdbarch_print_insn.
9011
9012 2017-05-24 Yao Qi <yao.qi@linaro.org>
9013
9014 * h8300-tdep.c (h8300_gdbarch_init): Don't call
9015 set_gdbarch_print_insn.
9016
9017 2017-05-24 Yao Qi <yao.qi@linaro.org>
9018
9019 * alpha-tdep.c (alpha_gdbarch_init): Don't call
9020 set_gdbarch_print_insn.
9021 * arc-tdep.c (arc_gdbarch_init): Likewise.
9022 * arch-utils.c: include dis-asm.h.
9023 (default_print_insn): New function.
9024 * arch-utils.h (default_print_insn): Declare.
9025 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9026 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9027 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9028 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9029 * frv-tdep.c (frv_gdbarch_init): Likewise.
9030 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9031 * gdbarch.sh (print_insn): Use default_print_insn.
9032 * gdbarch.c: Regenerated.
9033 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9034 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9035 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9036 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9037 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9038 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9039 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9040 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9041 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9042 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9043 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9044 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9045 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9046 * mt-tdep.c (mt_gdbarch_init): Likewise.
9047 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9048 * nios2-tdep.c (nios2_print_insn): Remove.
9049 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9050 * rx-tdep.c (rx_gdbarch_init): Likewise.
9051 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9052 * score-tdep.c (score_print_insn): Remove.
9053 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9054 * sh-tdep.c (sh_gdbarch_init): Likewise.
9055 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9056 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9057 * tic6x-tdep.c (tic6x_print_insn): Remove.
9058 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9059 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9060 * v850-tdep.c (v850_gdbarch_init): Likewise.
9061 * vax-tdep.c (vax_gdbarch_init): Likewise.
9062 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9063 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9064
9065 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9066
9067 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9068 (MIPS_FP0_REGNUM): Remove.
9069 (MIPS_FSR_REGNUM): Remove.
9070 (mips_fbsd_supply_fpregs): Use mips_regnum.
9071 (mips_fbsd_supply_gregs): Likewise.
9072 (mips_fbsd_collect_fpregs): Likewise.
9073 (mips_fbsd_collect_gregs): Likewise.
9074
9075 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9076
9077 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9078 (getpfpregs_supplies): New function.
9079 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9080 getfpregs_supplies.
9081 (mips_fbsd_store_inferior_registers): Likewise.
9082
9083 2017-05-22 Pedro Alves <palves@redhat.com>
9084
9085 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9086 maintainer.
9087
9088 2017-05-22 Alan Hayward <alan.hayward@arm.com>
9089
9090 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9091 (store_register): Likewise.
9092 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9093 (get_decimal_float_return_value): Likewise.
9094 (do_ppc_sysv_return_value): Likewise.
9095 (ppc64_sysv_abi_push_integer): Likewise.
9096 (ppc64_sysv_abi_push_freg): Likewise.
9097 (ppc64_sysv_abi_return_value_base): Likewise.
9098 (ppc64_sysv_abi_return_value): Likewise.
9099 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9100 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9101 * rs6000-nat.c: Likewise.
9102 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9103 (rs6000_value_to_register): Likewise.
9104 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9105
9106 2017-05-21 Tom Tromey <tom@tromey.com>
9107
9108 PR rust/21466:
9109 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9110 arrays as "[T]", not "[T; ]".
9111
9112 2017-05-19 Tom Tromey <tom@tromey.com>
9113
9114 PR rust/21484:
9115 * rust-lang.c (exp_descriptor_rust): New function.
9116 (rust_language_defn): Use it.
9117 * p-lang.c (pascal_language_defn): Update.
9118 * opencl-lang.c (opencl_language_defn): Update.
9119 * objc-lang.c (objc_language_defn): Update.
9120 * m2-lang.c (m2_language_defn): Update.
9121 * language.h (struct language_defn)
9122 <la_watch_location_expression>: New member.
9123 * language.c (unknown_language_defn, auto_language_defn)
9124 (local_language_defn): Update.
9125 * go-lang.c (go_language_defn): Update.
9126 * f-lang.c (f_language_defn): Update.
9127 * d-lang.c (d_language_defn): Update.
9128 * c-lang.h (c_watch_location_expression): Declare.
9129 * c-lang.c (c_watch_location_expression): New function.
9130 (c_language_defn, cplus_language_defn, asm_language_defn)
9131 (minimal_language_defn): Use it.
9132 * breakpoint.c (watch_command_1): Call
9133 la_watch_location_expression.
9134 * ada-lang.c (ada_language_defn): Update.
9135
9136 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9137
9138 PR tui/21482
9139 * gdb_curses.h (NOMACROS): Define.
9140 (NCURSES_NOMACROS): Define.
9141
9142 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9143
9144 PR tui/21482
9145 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9146 arg to char *.
9147 * tui/tui-wingeneral.c (box_win): Likewise.
9148 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9149 (tui_show_source_line): Likewise.
9150 (tui_show_exec_info_content): Likewise.
9151
9152 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9153
9154 * sparc-tdep.c (sparc_structure_return_p)
9155 (sparc_arg_on_registers_p): New functions.
9156 (sparc32_store_arguments): Use them.
9157 * sparc64-tdep.c (sparc64_16_byte_align_p)
9158 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9159 Handle TYPE_CODE_ARRAY.
9160
9161 2017-05-17 Yao Qi <yao.qi@linaro.org>
9162
9163 * cli/cli-decode.c (add_alias_cmd): New function.
9164 * command.h (add_alias_cmd): Declare.
9165 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9166 instead call add_alias_cmd.
9167
9168 2017-05-17 Pedro Alves <palves@redhat.com>
9169
9170 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9171 (nat_makefile_frag): ... this. All references updated.
9172 * configure.ac: Likewise.
9173 * configure.nat: Likewise. Enhance comments.
9174 * configure: Regenerate.
9175
9176 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9177
9178 * procfs.c (procfs_create_inferior): Change prototype to match
9179 definition.
9180
9181 2017-05-13 Eli Zaretskii <eliz@gnu.org>
9182
9183 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9184 C++ compiler warning.
9185
9186 2017-05-12 Tom Tromey <tom@tromey.com>
9187
9188 PR rust/21483:
9189 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9190 recurse, just call value_struct_elt directly.
9191
9192 2017-05-12 Tom Tromey <tom@tromey.com>
9193
9194 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9195 OP_RUST_ARRAY>: Fix.
9196
9197 2017-05-12 Tom Tromey <tom@tromey.com>
9198
9199 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9200
9201 2017-05-09 Yao Qi <yao.qi@linaro.org>
9202
9203 * regcache.c: Include <forward_list>.
9204 (struct regcache_list): Remove.
9205 (current_regcache): Update.
9206 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9207 (regcache_thread_ptid_changed): Likewise.
9208 (registers_changed_ptid): Likewise.
9209 (current_regcache_size): Likewise.
9210
9211 2017-05-09 Yao Qi <yao.qi@linaro.org>
9212
9213 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9214 (current_regcache_size): New function.
9215 (current_regcache_test): New function.
9216 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9217
9218 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9219
9220 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9221 (print_gp_register_row): Use get_frame_register_value.
9222
9223 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9224
9225 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9226 (mips_supply_fpregset): Likewise.
9227 (mips64_supply_gregset): Likewise.
9228
9229 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9230
9231 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9232 regcache->raw_supply_zeroed.
9233
9234 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9235
9236 * configure.nat: Rearrange 'case' statements to match
9237 host before cpu.
9238
9239 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9240
9241 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9242 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9243 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9244 "@nat_extra_makefile_frag@".
9245 (Makefile): Remove dependency on "@frags@".
9246 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9247 (data-directory/Makefile): Likewise.
9248 * config/aarch64/linux.mh: Deleted; moved contents to
9249 "gdb/configure.nat".
9250 * config/alpha/alpha-linux.mh: Likewise.
9251 * config/alpha/nbsd.mh: Likewise.
9252 * config/arm/linux.mh: Likewise.
9253 * config/arm/nbsdelf.mh: Likewise.
9254 * config/i386/cygwin.mh: Likewise.
9255 * config/i386/cygwin64.mh: Likewise.
9256 * config/i386/darwin.mh: Likewise.
9257 * config/i386/fbsd.mh: Likewise.
9258 * config/i386/fbsd64.mh: Likewise.
9259 * config/i386/go32.mh: Likewise.
9260 * config/i386/i386gnu.mh: Likewise.
9261 * config/i386/i386sol2.mh: Likewise.
9262 * config/i386/linux.mh: Likewise.
9263 * config/i386/linux64.mh: Likewise.
9264 * config/i386/mingw.mh: Likewise.
9265 * config/i386/mingw64.mh: Likewise.
9266 * config/i386/nbsd64.mh: Likewise.
9267 * config/i386/nbsdelf.mh: Likewise.
9268 * config/i386/nto.mh: Likewise.
9269 * config/i386/obsd.mh: Likewise.
9270 * config/i386/obsd64.mh: Likewise.
9271 * config/i386/sol2-64.mh: Likewise.
9272 * config/ia64/linux.mh: Likewise.
9273 * config/m32r/linux.mh: Likewise.
9274 * config/m68k/linux.mh: Likewise.
9275 * config/m68k/nbsdelf.mh: Likewise.
9276 * config/m68k/obsd.mh: Likewise.
9277 * config/m88k/obsd.mh: Likewise.
9278 * config/mips/fbsd.mh: Likewise.
9279 * config/mips/linux.mh: Likewise.
9280 * config/mips/nbsd.mh: Likewise.
9281 * config/mips/obsd64.mh: Likewise.
9282 * config/pa/linux.mh: Likewise.
9283 * config/pa/nbsd.mh: Likewise.
9284 * config/pa/obsd.mh: Likewise.
9285 * config/powerpc/aix.mh: Likewise.
9286 * config/powerpc/fbsd.mh: Likewise.
9287 * config/powerpc/linux.mh: Likewise.
9288 * config/powerpc/nbsd.mh: Likewise.
9289 * config/powerpc/obsd.mh: Likewise.
9290 * config/powerpc/ppc64-linux.mh: Likewise.
9291 * config/powerpc/spu-linux.mh: Likewise.
9292 * config/s390/linux.mh: Likewise.
9293 * config/sh/nbsd.mh: Likewise.
9294 * config/sparc/fbsd.mh: Likewise.
9295 * config/sparc/linux.mh: Likewise.
9296 * config/sparc/linux64.mh: Likewise.
9297 * config/sparc/nbsd64.mh: Likewise.
9298 * config/sparc/nbsdelf.mh: Likewise.
9299 * config/sparc/obsd64.mh: Likewise.
9300 * config/sparc/sol2.mh: Likewise.
9301 * config/tilegx/linux.mh: Likewise.
9302 * config/vax/nbsdelf.mh: Likewise.
9303 * config/vax/obsd.mh: Likewise.
9304 * config/xtensa/linux.mh: Likewise.
9305 * config/i386/i386gnu.mn: New file, with excerpts from
9306 "config/i386/i386gnu.mh".
9307 * configure: Regenerate.
9308 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9309 *.mh files under "gdb/config".
9310 * configure.nat: New file, with contents from the
9311 "gdb/config/*/*.mh" files.
9312
9313 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9314
9315 * btrace.c (btrace_clear): Free insn vector.
9316
9317 2017-05-05 Pedro Alves <palves@redhat.com>
9318
9319 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9320 * configure: Regenerate.
9321
9322 2017-05-04 Pedro Alves <palves@redhat.com>
9323
9324 * Makefile.in (SFILES): Add progspace-and-thread.c.
9325 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9326 (COMMON_OBS): Add progspace-and-thread.o.
9327 * breakpoint.c: Include "progspace-and-thread.h".
9328 (update_inserted_breakpoint_locations)
9329 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9330 Use scoped_restore_current_pspace_and_thread.
9331 (create_std_terminate_master_breakpoint): Use
9332 scoped_restore_current_program_space.
9333 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9334 (print_breakpoint_location): Use
9335 scoped_restore_current_program_space.
9336 (bp_loc_is_permanent): Use
9337 scoped_restore_current_pspace_and_thread.
9338 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9339 (download_tracepoint_locations): Use
9340 scoped_restore_current_pspace_and_thread.
9341 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9342 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9343 (enum step_over_calls_kind): Moved from inferior.h.
9344 (class scoped_restore_current_thread): New class.
9345 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9346 declaration.
9347 (scoped_restore_current_thread): New class.
9348 * infcmd.c: Include "common/gdb_optional.h".
9349 (continue_1, proceed_after_attach): Use
9350 scoped_restore_current_thread.
9351 (notice_new_inferior): Use scoped_restore_current_thread.
9352 * inferior.c: Include "progspace-and-thread.h".
9353 (restore_inferior, save_current_inferior): Delete.
9354 (add_inferior_command, clone_inferior_command): Use
9355 scoped_restore_current_pspace_and_thread.
9356 * inferior.h (scoped_restore_current_inferior): New class.
9357 * infrun.c: Include "progspace-and-thread.h" and
9358 "common/gdb_optional.h".
9359 (follow_fork_inferior): Use
9360 scoped_restore_current_pspace_and_thread.
9361 (scoped_restore_exited_inferior): New class.
9362 (handle_vfork_child_exec_or_exit): Use
9363 scoped_restore_exited_inferior,
9364 scoped_restore_current_pspace_and_thread,
9365 scoped_restore_current_thread and scoped_restore.
9366 (fetch_inferior_event): Use scoped_restore_current_thread.
9367 * linespec.c (decode_line_full, decode_line_1): Use
9368 scoped_restore_current_program_space.
9369 * mi/mi-main.c: Include "progspace-and-thread.h".
9370 (exec_continue): Use scoped_restore_current_thread.
9371 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9372 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9373 * proc-service.c (ps_pglobal_lookup): Use
9374 scoped_restore_current_program_space.
9375 * progspace-and-thread.c: New file.
9376 * progspace-and-thread.h: New file.
9377 * progspace.c (release_program_space, clone_program_space): Use
9378 scoped_restore_current_program_space.
9379 (restore_program_space, save_current_program_space)
9380 (save_current_space_and_thread): Delete.
9381 (switch_to_program_space_and_thread): Moved to
9382 progspace-and-thread.c.
9383 * progspace.h (save_current_program_space)
9384 (save_current_space_and_thread): Delete declarations.
9385 (scoped_restore_current_program_space): New class.
9386 * remote.c (remote_btrace_maybe_reopen): Use
9387 scoped_restore_current_thread.
9388 * symtab.c: Include "progspace-and-thread.h".
9389 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9390 * thread.c (print_thread_info_1): Use
9391 scoped_restore_current_thread.
9392 (struct current_thread_cleanup): Delete.
9393 (do_restore_current_thread_cleanup)
9394 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9395 (scoped_restore_current_thread::~scoped_restore_current_thread):
9396 ... this new dtor.
9397 (make_cleanup_restore_current_thread): Rename/convert to ...
9398 (scoped_restore_current_thread::scoped_restore_current_thread):
9399 ... this new ctor.
9400 (thread_apply_all_command): Use scoped_restore_current_thread.
9401 (thread_apply_command): Use scoped_restore_current_thread.
9402 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9403 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9404
9405 2017-05-04 Pedro Alves <palves@redhat.com>
9406
9407 * thread.c (make_cleanup_restore_current_thread): Move
9408 find_thread_ptid call before the is_stopped call. Assert that the
9409 thread is found. Replace is_stopped call by checking the thread's
9410 state directly. Remove unnecessary NULL-thread check.
9411
9412 2017-05-04 Pedro Alves <palves@redhat.com>
9413
9414 * corelow.c (thread_section_name): New class.
9415 (get_core_register_section, get_core_siginfo): Use it.
9416
9417 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9418
9419 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9420 (get_core_register_section): Remove xfree of NULL pointer.
9421
9422 2017-05-03 Alan Hayward <alan.hayward@arm.com>
9423
9424 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9425 * regcache.c (regcache::raw_supply_zeroed): New function.
9426 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9427
9428 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9429
9430 * gdbarch.sh: Remove commented out definition of
9431 TARGET_CHAR_BIT.
9432 * gdbarch.h: Re-generate.
9433
9434 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9435
9436 * configure: Regenerate.
9437
9438 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9439
9440 * solib-target.c (solib_target_relocate_section_addresses):
9441 Remove num_section_bases, num_bases, segment_bases variables.
9442
9443 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9444
9445 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9446
9447 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9448
9449 * solib-target.c: Include <vector>
9450 (struct lm_info_target) <~lm_info_target>: Remove.
9451 <segment_bases, section_bases>: Change type to
9452 std::vector<CORE_ADDR>.
9453 (library_list_start_segment, library_list_start_section,
9454 library_list_end_library,
9455 solib_target_relocate_section_addresses): Adjust.
9456
9457 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9458
9459 * gdbarch.sh (software_single_step): Change return type to
9460 std::vector<CORE_ADDR>.
9461 * gdbarch.c, gdbarch.h: Re-generate.
9462 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9463 Adjust.
9464 (arm_deal_with_atomic_sequence_raw): Adjust.
9465 (thumb_get_next_pcs_raw): Adjust.
9466 (arm_get_next_pcs_raw): Adjust.
9467 (arm_get_next_pcs): Adjust.
9468 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9469 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9470 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9471 (alpha_software_single_step): Adjust.
9472 * alpha-tdep.h (alpha_software_single_step): Adjust.
9473 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9474 * arm-tdep.c (arm_software_single_step): Adjust.
9475 (arm_breakpoint_kind_from_current_state): Adjust.
9476 * arm-tdep.h (arm_software_single_step): Adjust.
9477 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9478 * cris-tdep.c (cris_software_single_step): Adjust.
9479 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9480 (micromips_deal_with_atomic_sequence): Adjust.
9481 (deal_with_atomic_sequence): Adjust.
9482 (mips_software_single_step): Adjust.
9483 * mips-tdep.h (mips_software_single_step): Adjust.
9484 * moxie-tdep.c (moxie_software_single_step): Adjust.
9485 * nios2-tdep.c (nios2_software_single_step): Adjust.
9486 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9487 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9488 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9489 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9490 * sparc-tdep.c (sparc_software_single_step): Adjust.
9491 * spu-tdep.c (spu_software_single_step): Adjust.
9492 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9493
9494 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9495
9496 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9497 * gdbarch.h: Re-generate.
9498
9499 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9500
9501 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9502 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9503 * python/py-instruction.c, python/py-instruction.h: New file.
9504 * python/py-record.c: Add py-instruction.h include.
9505 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9506 gdb.RecordInstruction.
9507 * python/python-internal.h: Add gdbpy_initialize_instruction
9508 declaration.
9509 * python/python.c (do_start_initialization): Add
9510 gdbpy_initialize_instruction.
9511
9512 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9513
9514 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9515 Remove.
9516 (btrace_func_from_recpy_func): New function.
9517 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9518 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9519 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9520 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9521 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9522 Also, use new helper functions.
9523 (btpy_list_item): Use new helper functions.
9524 (recpy_bt_function_call_history): Use new type name.
9525 (btpy_call_getset): Remove.
9526 (gdbpy_initialize_btrace): Remove code to initialize
9527 gdb.BtraceFunctionCall.
9528 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9529 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9530 recpy_bt_func_prev, recpy_bt_func_next): New export.
9531 * python/py-record.c (recpy_func_type): New static object.
9532 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9533 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9534 recpy_func_next): New function.
9535 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9536 (recpy_func_getset): New static object.
9537 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9538 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9539
9540 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9541
9542 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9543 (btpy_object, btpy_insn_type, btpy_new): Remove.
9544 (btpy_list_object): Use gdb.RecordInstruction type instead of
9545 gdb.BtraceInstruction type.
9546 (btrace_insn_from_recpy_insn): New function.
9547 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9548 btpy_new.
9549 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9550 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9551 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9552 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9553 instead of btpy_object.
9554 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9555 btpy_insn_data, btpy_insn_decode): Rename to ...
9556 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9557 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9558 recpy_bt_insn_decode): This. Also, use new helper functions.
9559 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9560 recpy_insn_type.
9561 (btpy_insn_getset): Remove.
9562 (gdbpy_initialize_btrace): Remove code to initialize
9563 gdb.BtraceInstruction. Use recpy_element_object.
9564 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9565 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9566 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9567 * python/py-record.c (recpy_insn_type): New static object.
9568 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9569 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9570 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9571 New function.
9572 (recpy_insn_getset): New static object.
9573 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9574 * python/py-record.h (recpy_element_object): New typedef.
9575 (recpy_insn_type, recpy_insn_new): New export.
9576
9577 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9578
9579 * py-record-btrace.c (btpy_insn_new): Removed.
9580 (btpy_insn_or_gap_new): New function.
9581 (btpy_insn_error): Removed.
9582 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9583 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9584 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9585 btpy_insn_or_gap_new instead of btpy_insn_new.
9586 (btpy_insn_getset): Remove btpy_insn_error.
9587 * py-record.c (recpy_gap_type): New static object.
9588 (recpy_gap_object): New typedef.
9589 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9590 recpy_gap_reason_string): New function.
9591 (recpy_gap_getset): New static object.
9592 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9593 * py-record.h (recpy_gap_new): New export.
9594
9595 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9596
9597 * python/py-record.c (recpy_ptid): Remove.
9598 (recpy_record_getset): Remove recpy_ptid.
9599
9600 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9601
9602 * btrace.c (btrace_fetch): Set inferior_ptid.
9603 * python/py-record-btrace.c: Add "py-record.h" include.
9604 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9605 recpy_bt_end, recpy_bt_instruction_history,
9606 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9607 in gdb.Record object instead of current ptid.
9608 * python/py-record.c: Include new "py-record.h" file.
9609 (recpy_record_object): Moved to py-record.h.
9610 * python/py-record.h: New file.
9611
9612 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9613
9614 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9615 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9616 indentation.
9617
9618 2017-05-01 Joel Brobecker <brobecker@adacore.com>
9619
9620 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9621 the past maintainers section.
9622
9623 2017-04-28 Yao Qi <yao.qi@linaro.org>
9624
9625 * infcmd.c (get_return_value): Use regcache ctor, and remove
9626 cleanup.
9627
9628 2017-04-28 Yao Qi <yao.qi@linaro.org>
9629 Pedro Alves <palves@redhat.com>
9630
9631 * regcache.c (regcache::regcache): New tag dispatch ctor.
9632 (do_cooked_read): Moved above.
9633 (regcache_dup): Use the tag dispatch ctor..
9634 * regcache.h (regcache): Declare ctor, delete copy ctor and
9635 assignment operator, remove friend regcache_dup.
9636
9637 2017-04-28 Yao Qi <yao.qi@linaro.org>
9638
9639 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9640 call method save instead of regcache_cpy.
9641 * regcache.h (struct regcache): Make regcache_dup a friend.
9642
9643 2017-04-28 Yao Qi <yao.qi@linaro.org>
9644
9645 * regcache.c (struct regcache): Move to regcache.h
9646 (regcache::arch): New method.
9647 (regcache_get_ptid): Update.
9648 (get_regcache_arch): Call arch method.
9649 (get_regcache_aspace): Call method aspace.
9650 (register_buffer): Change it to method.
9651 (regcache_save): Change it to regcache::save.
9652 (regcache_restore): Likewise.
9653 (regcache_cpy_no_passthrough): Remove the declaration.
9654 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9655 (regcache_cpy_no_passthrough): Change it to method
9656 cpy_no_passthrough.
9657 (regcache_register_status): Change it to method
9658 get_register_status.
9659 (regcache_invalidate): Change it to method invalidate.
9660 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9661 (regcache_raw_update): Change it to method raw_update.
9662 (regcache_raw_read): Likewise.
9663 (regcache_raw_read_signed): Likewise.
9664 (regcache_raw_read_unsigned): Likewise.
9665 (regcache_raw_write_signed): Likewise.
9666 (regcache_raw_write_unsigned): Likewise.
9667 (regcache_cooked_read): Likewise.
9668 (regcache_cooked_read_value): Likewise.
9669 (regcache_cooked_read_signed): Likewise.
9670 (regcache_cooked_read_unsigned): Likewise.
9671 (regcache_cooked_write_signed): Likewise.
9672 (regcache_cooked_write_unsigned): Likewise.
9673 (regcache_raw_set_cached_value): Likewise.
9674 (regcache_raw_write): Likewise.
9675 (regcache_cooked_write): Likewise.
9676 (regcache_xfer_part): Likewise.
9677 (regcache_raw_read_part): Likewise.
9678 (regcache_raw_write_part): Likewise.
9679 (regcache_cooked_read_part): Likewise.
9680 (regcache_cooked_write_part): Likewise.
9681 (regcache_raw_supply): Likewise.
9682 (regcache_raw_collect): Likewise.
9683 (regcache_transfer_regset): Likewise.
9684 (regcache_supply_regset): Likewise.
9685 (regcache_collect_regset): Likewise.
9686 (regcache_debug_print_register): Likewise.
9687 (enum regcache_dump_what): Move it to regcache.h.
9688 (regcache_dump): Change it to method dump.
9689 * regcache.h (enum regcache_dump_what): New.
9690 (class regcache): New.
9691 * target.c (target_fetch_registers): Call method
9692 debug_print_register.
9693 (target_store_registers): Likewise.
9694
9695 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9696
9697 * windows-nat.c (struct lm_info_windows): Initialize field.
9698 (windows_make_so): Allocate lm_info_windows with new.
9699 (windows_free_so): Free lm_info_windows with delete.
9700
9701 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9702
9703 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9704 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9705 cleanup.
9706 (darwin_free_so): Free lm_info_darwin with delete.
9707
9708 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9709
9710 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9711 <l_addr_p>: Change type to bool.
9712 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9713 (svr4_free_so): Free lm_info_svr4 with delete.
9714 (svr4_copy_library_list): Replace memcpy with call to copy
9715 constructor.
9716 (library_list_start_library, svr4_default_sos): Allocate
9717 lm_info_svr4 with new.
9718
9719 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9720
9721 * solib-target.c (struct lm_info_target): Add destructor,
9722 initialize fields.
9723 <name>: Change type to std::string.
9724 (library_list_start_library): Allocate lm_info_target with new.
9725 (solib_target_free_library_list): Free lm_info_target with
9726 delete.
9727 (solib_target_current_sos): Adapt to std::string.
9728 (solib_target_free_so): Free lm_info_target with delete.
9729
9730 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9731
9732 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9733 fields.
9734 (frv_current_sos): Allocate lm_info_frv with new.
9735 (frv_relocate_main_executable): Free lm_info_frv with delete,
9736 allocate with new.
9737 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9738
9739 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9740
9741 * solib-frv.c (struct lm_info_frv): Fix indentation.
9742
9743 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9744
9745 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9746 map field.
9747 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9748 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9749 and allocate with new.
9750 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9751
9752 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9753
9754 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9755 <filename, member_name>: Change type to std::string.
9756 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9757 (library_list_start_library): Allocate lm_info_aix with new.
9758 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9759 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9760 with copy constructor.
9761
9762 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9763
9764 * solist.h (struct lm_info): Remove.
9765 (struct lm_info_base): New class.
9766 (struct so_list) <lm_info>: Change type to lm_info_base *.
9767 * nto-tdep.c (struct lm_info): Remove.
9768 (lm_addr): Adjust.
9769 * solib-aix.c (struct lm_info): Rename to ...
9770 (struct lm_info_aix): ... this. Extend lm_info_base.
9771 (lm_info_p): Rename to ...
9772 (lm_info_aix_p): ... this, and adjust.
9773 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9774 solib_aix_parse_libraries, library_list_start_library,
9775 solib_aix_free_library_list, solib_aix_parse_libraries,
9776 solib_aix_get_library_list,
9777 solib_aix_relocate_section_addresses, solib_aix_free_so,
9778 solib_aix_get_section_offsets,
9779 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9780 Adjust.
9781 (struct solib_aix_inferior_data) <library_list>: Adjust.
9782 * solib-darwin.c (struct lm_info): Rename to ...
9783 (struct lm_info_darwin): ... this. Extend lm_info_base.
9784 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9785 * solib-dsbt.c (struct lm_info): Rename to ...
9786 (struct lm_info_dsbt): ... this. Extend lm_info_base.
9787 (struct dsbt_info) <main_executable_lm_info): Adjust.
9788 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9789 dsbt_relocate_section_addresses): Adjust.
9790 * solib-frv.c (struct lm_info): Rename to ...
9791 (struct lm_info_frv): ... this. Extend lm_info_base.
9792 (main_executable_lm_info): Adjust.
9793 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9794 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9795 find_canonical_descriptor_in_load_object,
9796 frv_fdpic_find_canonical_descriptor): Adjust.
9797 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9798 to lm_info_svr4.
9799 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9800 svr4_clear_so, svr4_copy_library_list,
9801 library_list_start_library, svr4_default_sos, svr4_read_so_list,
9802 svr4_current_sos, svr4_fetch_objfile_link_map,
9803 solist_update_incremental): Adjust.
9804 * solib-svr4.h (struct lm_info_svr4): Move here from
9805 solib-svr4.c.
9806 * solib-target.c (struct lm_info): Rename to ...
9807 (struct lm_info_target): ... this. Extend lm_info_base.
9808 (lm_info_p): Rename to ...
9809 (lm_info_target_p): ... this.
9810 (solib_target_parse_libraries, library_list_start_segment,
9811 library_list_start_section, library_list_start_library,
9812 library_list_end_library, solib_target_free_library_list,
9813 solib_target_current_sos, solib_target_free_so,
9814 solib_target_relocate_section_addresses): Adjust.
9815 * windows-nat.c (struct lm_info): Rename to ...
9816 (struct lm_info_windows): ... this. Extend lm_info_base.
9817 (windows_make_so, handle_load_dll, handle_unload_dll,
9818 windows_xfer_shared_libraries): Adjust.
9819
9820 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9821
9822 * solib-darwin.c (struct darwin_so_list): Remove.
9823 (darwin_current_sos): Allocate an so_list object instead of a
9824 darwin_so_list, separately allocate an lm_info object.
9825 (darwin_free_so): Free lm_info.
9826
9827 2017-04-28 John Baldwin <jhb@FreeBSD.org>
9828
9829 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9830 with fprintf_filtered.
9831
9832 2017-04-28 Yao Qi <yao.qi@linaro.org>
9833
9834 * regcache.c (regcache::regcache): New function.
9835 (regcache::~regcache): New function.
9836 (regcache_xmalloc_1): Remove.
9837 (regcache_xmalloc): Call new regcache.
9838 (regcache_xfree): Call delete regcache.
9839 (get_thread_arch_aspace_regcache): Call new regcache.
9840
9841 2017-04-28 Yao Qi <yao.qi@linaro.org>
9842
9843 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9844 lwp instead of ptid_get_lwp.
9845
9846 2017-04-28 Yao Qi <yao.qi@linaro.org>
9847
9848 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9849 lwp_info instead of getting from inferior_ptid.
9850
9851 2017-04-27 Keith Seitz <keiths@redhat.com>
9852
9853 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9854 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9855 (CV_CONVERSION_BADNESS): Define.
9856 (rank_one_type): Remove overly restrictive rvalue reference
9857 rank checks.
9858 Add cv-qualifier checks and subranks for type equality.
9859 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9860 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9861 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9862
9863 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
9864
9865 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9866 count when creating the object.
9867
9868 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
9869 Ulrich Weigand <uweigand@de.ibm.com>
9870
9871 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9872 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9873 is used in AIX.
9874 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9875 (process_xcoff_symbol): Likewise.
9876 (scan_xcoff_symtab): Likewise.
9877
9878 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9879
9880 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9881 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9882 (ia64_access_reg): Use get_frame_register_unsigned.
9883 (ia64_access_rse_reg): Likewise.
9884 (ia64_libunwind_frame_prev_register): Likewise.
9885
9886 2017-04-26 Jiong Wang <jiong.wang@arm.com>
9887
9888 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9889 * gdbarch.c: Regenerated.
9890 * gdbarch.h: Regenerated.
9891 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9892 visibility external.
9893 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9894 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9895 (enum cfa_how_kind): Move to ...
9896 (struct dwarf2_frame_state_reg_info): Likewise.
9897 (struct dwarf2_frame_state): Likewise.
9898 * dwarf2-frame.h: ... here.
9899 (dwarf2_frame_state_alloc_regs): New declaration.
9900 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9901 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9902
9903 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9904
9905 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9906 regcache_raw_read_unsigned.
9907 (xtensa_pseudo_register_write): Likewise.
9908
9909 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9910
9911 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9912 (nds32_pseudo_register_write): Likewise.
9913
9914 2017-04-25 Yao Qi <yao.qi@linaro.org>
9915
9916 * regcache.c (struct regcache) <readonly_p>: Change its type
9917 to bool.
9918 (regcache_xmalloc_1): Update parameter type and callers update.
9919
9920 2017-04-25 Yao Qi <yao.qi@linaro.org>
9921
9922 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9923 set_gdbarch_wchar_bit.
9924 * arm-tdep.c (arm_gdbarch_init): Likewise.
9925
9926 2017-04-25 Pedro Alves <palves@redhat.com>
9927
9928 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9929 (BothAreRelocatable, memcopy, memmove): Don't define.
9930 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9931 macros.
9932
9933 2017-04-25 Pedro Alves <palves@redhat.com>
9934
9935 * common/common-defs.h: Include "common/poison.h".
9936 * common/function-view.h: (Not, Or, Requires): Move to traits.h
9937 and adjust.
9938 * common/poison.h: New file.
9939 * common/traits.h: Include <type_traits>.
9940 (Not, Or, Requires): New, moved from common/function-view.h.
9941
9942 2017-04-25 Pedro Alves <palves@redhat.com>
9943
9944 * breakpoint.h (struct breakpoint): In-class initialize all
9945 fields. Make boolean fields "bool".
9946 * breakpoint.c (init_raw_breakpoint_without_location): Remove
9947 memset call and initializations no longer necessary.
9948
9949 2017-04-25 Pedro Alves <palves@redhat.com>
9950
9951 * btrace.c (pt_btrace_insn_flags): Change parameter type to
9952 reference.
9953 (pt_btrace_insn): New function.
9954 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9955
9956 2017-04-25 Pedro Alves <palves@redhat.com>
9957
9958 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
9959 "base" field and inherit from "bp_location" instead. Add
9960 non-default ctor.
9961 (allocate_location_exception): Use new non-default ctor.
9962 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9963 (init_bp_location): Convert to ...
9964 (bp_location::bp_location): ... this new ctor, and remove memset
9965 call.
9966 (base_breakpoint_allocate_location): Use the new non-default ctor.
9967 * breakpoint.h (bp_location): Now a class. Declare default and
9968 non-default ctors. In-class initialize all members.
9969 (init_bp_location): Remove declaration.
9970
9971 2017-04-25 Pedro Alves <palves@redhat.com>
9972
9973 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9974 assignment operator.
9975
9976 2017-04-24 Yao Qi <yao.qi@linaro.org>
9977
9978 * doublest.c (convert_doublest_to_floatformat): Call
9979 floatformat_totalsize_bytes.
9980
9981 2017-04-22 Tom Tromey <tom@tromey.com>
9982
9983 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9984 ui_out_emit_list.
9985 * stack.c (print_frame): Use ui_out_emit_list.
9986 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9987 ui_out_emit_list.
9988 * mi/mi-main.c (print_one_inferior)
9989 (mi_cmd_data_list_register_names)
9990 (mi_cmd_data_list_register_values, mi_cmd_list_features)
9991 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9992 ui_out_emit_list.
9993 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9994 (mi_output_solib_attribs): Use ui_out_emit_list,
9995 ui_out_emit_tuple.
9996 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9997 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9998 (mi_cmd_stack_list_args, list_args_or_locals): Use
9999 ui_out_emit_list.
10000 * disasm.c (do_assembly_only): Use ui_out_emit_list.
10001 * breakpoint.c (print_solib_event, output_thread_groups): Use
10002 ui_out_emit_list.
10003
10004 2017-04-22 Tom Tromey <tom@tromey.com>
10005
10006 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10007 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10008 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10009
10010 2017-04-22 Tom Tromey <tom@tromey.com>
10011
10012 * tracepoint.c (tvariables_info_1)
10013 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10014
10015 2017-04-22 Tom Tromey <tom@tromey.com>
10016
10017 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10018 annotate_arg_emitter.
10019 * breakpoint.c (print_mention_watchpoint)
10020 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10021 * annotate.h (struct annotate_arg_emitter): New.
10022
10023 2017-04-22 Tom Tromey <tom@tromey.com>
10024
10025 * record-btrace.c (record_btrace_insn_history)
10026 (record_btrace_insn_history_range, record_btrace_call_history)
10027 (record_btrace_call_history_range): Use ui_out_emit_tuple.
10028 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10029 ui_out_emit_tuple.
10030 * stack.c (print_frame_info): Use ui_out_emit_tuple.
10031 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10032 * skip.c (skip_info): Use ui_out_emit_tuple.
10033 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10034 * progspace.c (print_program_space): Use ui_out_emit_tuple.
10035 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10036 * osdata.c (info_osdata): Use ui_out_emit_tuple.
10037 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10038 ui_out_emit_tuple.
10039 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10040 (output_register, mi_cmd_data_read_memory)
10041 (mi_cmd_data_read_memory_bytes, mi_load_progress)
10042 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10043 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10044 Use ui_out_emit_tuple.
10045 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10046 ui_out_emit_tuple.
10047 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10048 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10049 * linux-thread-db.c (info_auto_load_libthread_db): Use
10050 ui_out_emit_tuple.
10051 * inferior.c (print_inferior): Use ui_out_emit_tuple.
10052 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10053 * disasm.c (do_mixed_source_and_assembly_deprecated)
10054 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10055 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10056 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10057 * breakpoint.c (print_one_breakpoint_location)
10058 (print_one_breakpoint): Use ui_out_emit_tuple.
10059 * auto-load.c (print_script, info_auto_load_cmd): Use
10060 ui_out_emit_tuple.
10061 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10062
10063 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
10064
10065 * thread.c (print_thread_info_1): Remove dead code.
10066
10067 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10068
10069 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10070 GDB_SELF_TEST.
10071 * arm-tdep.c (selftests::arm_record_test): Likewise.
10072
10073 2017-04-21 Yao Qi <yao.qi@linaro.org>
10074
10075 * regcache.c (regcache_restore): Remove argument 2. Replace
10076 argument 3 with regcache. Get register status from
10077 src->register_status and get register contents from
10078 register_buffer (src, regnum).
10079 (regcache_cpy): Update.
10080
10081 2017-04-19 Pedro Alves <palves@redhat.com>
10082
10083 * gdbthread.h (thread): Add missing closing parenthesis in
10084 comment.
10085
10086 2017-04-19 Pedro Alves <palves@redhat.com>
10087
10088 * common/refcounted-object.h: New file.
10089 * gdbthread.h: Include "common/refcounted-object.h".
10090 (thread_info): Inherit from refcounted_object and add comments.
10091 (thread_info::incref, thread_info::decref)
10092 (thread_info::m_refcount): Delete.
10093 (thread_info::deletable): Use the refcounted_object::refcount()
10094 method.
10095 * inferior.c (current_inferior_): Add comment.
10096 (set_current_inferior): Increment/decrement refcounts.
10097 (prune_inferiors, remove_inferior_command): Skip inferiors marked
10098 not-deletable instead of comparing with the current inferior.
10099 (initialize_inferiors): Increment the initial inferior's refcount.
10100 * inferior.h (struct inferior): Forward declare.
10101 Include "common/refcounted-object.h".
10102 (current_inferior, set_current_inferior): Move declaration to
10103 before struct inferior's definition, and fix comment.
10104 (inferior): Inherit from refcounted_object. Add comments.
10105 * thread.c (switch_to_thread_no_regs): Reference the thread's
10106 inferior pointer directly instead of doing a ptid lookup.
10107 (switch_to_no_thread): New function.
10108 (switch_to_thread(thread_info *)): New function, factored out
10109 from ...
10110 (switch_to_thread(ptid_t)): ... this.
10111 (restore_current_thread): Delete.
10112 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10113 fields, and add 'inf' field.
10114 (do_restore_current_thread_cleanup): Check whether old->inf is
10115 alive instead of looking up an inferior by ptid. Use
10116 switch_to_thread and switch_to_no_thread.
10117 (restore_current_thread_cleanup_dtor): Use old->inf directly
10118 instead of lookup up an inferior by id. Decref the inferior.
10119 Don't restore 'removable'.
10120 (make_cleanup_restore_current_thread): Same the inferior pointer
10121 in old, instead of the inferior number. Incref the inferior.
10122 Don't save/clear 'removable'.
10123
10124 2017-04-19 Pedro Alves <palves@redhat.com>
10125
10126 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10127 unittests/scoped_restore-selftests.c.
10128 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10129 * common/scoped_restore.h (scoped_restore_base): Make "class".
10130 (scoped_restore_base::release): New public method.
10131 (scoped_restore_base::scoped_restore_base): New protected ctor.
10132 (scoped_restore_base::m_saved_var): New protected field.
10133 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10134 scoped_restore_base base class instead of m_saved_var directly.
10135 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10136 (scoped_restore_tmpl::scoped_restore_tmpl(const
10137 scoped_restore_tmpl<T>&)): Likewise.
10138 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10139 method.
10140 (scoped_restore_tmpl::saved_var): New method.
10141 (scoped_restore_tmpl::m_saved_var): Delete.
10142 * inferior.h (inferior::detaching): Now a bool.
10143 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10144 cleanup.
10145 * unittests/scoped_restore-selftests.c: New file.
10146
10147 2017-04-19 Pedro Alves <palves@redhat.com>
10148
10149 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10150 Re-sort in alphabetic order.
10151
10152 2017-04-18 Pedro Alves <palves@redhat.com>
10153
10154 * xml-support.c (obstack_xml_printf): Delete.
10155 * xml-support.h (obstack_xml_printf): Delete.
10156
10157 2017-04-18 Pedro Alves <palves@redhat.com>
10158
10159 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10160 vdebug, verror, body_text, start_element, end_element, name,
10161 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10162 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10163 is_xinclude>: Make private and add m_ prefix.
10164 (gdb_xml_parser::body_text): New method, based on ...
10165 (gdb_xml_body_text): ... this. Adjust.
10166 (gdb_xml_parser::vdebug): New method, based on ...
10167 (gdb_xml_debug): ... this. Adjust.
10168 (gdb_xml_parser::verror): New method, based on ...
10169 (gdb_xml_error): ... this. Adjust.
10170 (gdb_xml_parser::start_element): New method, based on ...
10171 (gdb_xml_start_element): ... this. Adjust.
10172 (gdb_xml_start_element_wrapper): Defer to
10173 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10174 (gdb_xml_parser::end_element): New method, based on ...
10175 (gdb_xml_end_element_wrapper): ... this. Adjust.
10176 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10177 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10178 (gdb_xml_parser::use_dtd): New method, based on ...
10179 (gdb_xml_use_dtd): ... this. Adjust.
10180 (gdb_xml_parser::parse): New method, based on ...
10181 (gdb_xml_parse): ... this. Adjust.
10182 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10183 (xinclude_start_include): Adjust to call the parser's name method.
10184 (xml_xinclude_default, xml_xinclude_start_doctype)
10185 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10186 method.
10187 (xml_process_xincludes): Adjust to call parser methods.
10188 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10189 declarations.
10190
10191 2017-04-18 Pedro Alves <palves@redhat.com>
10192
10193 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10194 gdb::optional<std::string>.
10195 * xml-support.c: Include <string>.
10196 (scope_level::scope_level(scope_level &&))
10197 (scope_level::~scope_level): Delete.
10198 (scope_level::body): Now a std::string.
10199 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10200 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10201 parameter.
10202 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10203 (xinclude_parsing_data::output): Now a std::string reference.
10204 (xinclude_start_include): Adjust.
10205 (xml_xinclude_default): Adjust.
10206 (xml_process_xincludes): Add 'output' parameter, and return bool.
10207 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10208 and return bool.
10209 * xml-tdesc.c: Include <unordered_map> and <string>.
10210 (tdesc_xml_cache): Delete.
10211 (tdesc_xml_cache_s): Delete.
10212 (xml_cache): Now an std::unordered_map.
10213 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10214 (target_fetch_description_xml): Change return type to
10215 gdb::optional<std::string>, and adjust.
10216 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10217 (target_fetch_description_xml): Change return type to
10218 gdb::optional<std::string>.
10219
10220 2017-04-18 Pedro Alves <palves@redhat.com>
10221
10222 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10223 unittests/optional-selftests.c.
10224 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10225 * unittests/optional-selftests.c: New file.
10226 * unittests/optional/assignment/1.cc: New file.
10227 * unittests/optional/assignment/2.cc: New file.
10228 * unittests/optional/assignment/3.cc: New file.
10229 * unittests/optional/assignment/4.cc: New file.
10230 * unittests/optional/assignment/5.cc: New file.
10231 * unittests/optional/assignment/6.cc: New file.
10232 * unittests/optional/assignment/7.cc: New file.
10233 * unittests/optional/cons/copy.cc: New file.
10234 * unittests/optional/cons/default.cc: New file.
10235 * unittests/optional/cons/move.cc: New file.
10236 * unittests/optional/cons/value.cc: New file.
10237 * unittests/optional/in_place.cc: New file.
10238 * unittests/optional/observers/1.cc: New file.
10239 * unittests/optional/observers/2.cc: New file.
10240
10241 2017-04-18 Pedro Alves <palves@redhat.com>
10242
10243 * common/gdb_optional.h: Include common/traits.h.
10244 (in_place_t): New type.
10245 (in_place): New constexpr variable.
10246 (optional::optional): Remove member initialization of
10247 m_instantiated.
10248 (optional::optional(in_place_t...)): New constructor.
10249 (optional::~optional): Use reset.
10250 (optional::optional(const optional&)): New.
10251 (optional::optional(const optional&&)): New.
10252 (optional::optional(T &)): New.
10253 (optional::optional(T &&)): New.
10254 (operator::operator=(const optional &)): New.
10255 (operator::operator=(optional &&)): New.
10256 (operator::operator= (const T &))
10257 (operator::operator= (T &&))
10258 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10259 (operator::reset): New.
10260 (operator::m_instantiated):: Add in-class initializer.
10261 * common/traits.h: Include <type_traits>.
10262 (struct And): New types.
10263
10264 2017-04-18 Pedro Alves <palves@redhat.com>
10265
10266 * xml-support.c: Include <vector>.
10267 (scope_level::scope_level(const gdb_xml_element *))
10268 (scope_level::scope_level(scope_level&&)): New.
10269 (scope_level::~scope_level): New.
10270 (scope_level_s): Delete.
10271 (gdb_xml_parser::scopes): Now a std::vector.
10272 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10273 Use std::vector.
10274 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10275 scope cleanup code.
10276 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10277 of the scopes member. Use std::vector::emplace_back.
10278
10279 2017-04-18 Pedro Alves <palves@redhat.com>
10280
10281 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10282 a bool.
10283 (gdb_xml_end_element): Change type of first parameter.
10284 (gdb_xml_cleanup): Rename to ...
10285 (gdb_xml_parser::~gdb_xml_parser): ... this.
10286 (gdb_xml_create_parser_and_cleanup): Delete with ...
10287 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10288 to this new ctor.
10289 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10290 using gdb_xml_create_parser_and_cleanup.
10291 (xinclude_parsing_data): Add ctor/dtor.
10292 (xml_xinclude_cleanup): Delete.
10293 (xml_process_xincludes): Create a local xinclude_parsing_data
10294 instead of heap-allocating one. Create a local gdb_xml_parser
10295 instead of heap-allocating one with
10296 gdb_xml_create_parser_and_cleanup.
10297
10298 2017-04-18 John Baldwin <jhb@FreeBSD.org>
10299
10300 PR threads/20743
10301 * fbsd-nat.c (resume_one_thread_cb): Remove.
10302 (resume_all_threads_cb): Remove.
10303 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10304 iterate_over_threads.
10305
10306 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10307
10308 * NEWS: Create a new section for the next release branch.
10309 Rename the section of the current branch, now that it has
10310 been cut.
10311
10312 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10313
10314 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10315 * version.in: Bump version to 8.0.50.DATE-git.
10316
10317 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10318
10319 PR gdb/21385
10320 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10321 independently of the host, and fix build breakage on Cygwin.
10322
10323 2017-04-13 Pedro Alves <palves@redhat.com>
10324
10325 * inferior.c (free_inferior): Convert to ...
10326 (inferior::~inferior): ... this dtor.
10327 (inferior::inferior): New ctor, factored out from ...
10328 (add_inferior_silent): ... here. Allocate the inferior with a new
10329 expression.
10330 (delete_inferior): Call delete instead of free_inferior.
10331 * inferior.h (gdb_environ, continuation): Forward declare.
10332 (inferior): Now a class. Add in-class initialization to all
10333 members. Make boolean fields bool, except 'detaching'.
10334 (inferior::inferior): New explicit ctor.
10335 (inferior::~inferior): New.
10336
10337 2017-04-13 Pedro Alves <palves@redhat.com>
10338
10339 * inferior.c (init_inferior_list): Delete.
10340 * inferior.h (init_inferior_list): Delete.
10341
10342 2017-04-13 Pedro Alves <palves@redhat.com>
10343
10344 PR threads/13217
10345 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10346 (top level): Call it twice, with different thread sets.
10347
10348 2017-04-13 Pedro Alves <palves@redhat.com>
10349
10350 * thread.c: Include <algorithm>.
10351 (thread_array_cleanup): Delete.
10352 (scoped_inc_dec_ref): New class.
10353 (live_threads_count): New function.
10354 (set_thread_refcount): Delete.
10355 (tp_array_compar_ascending): Now a bool.
10356 (tp_array_compar): Convert to a std::sort comparison function.
10357 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10358 and live_threads_count.
10359
10360 2017-04-13 Pedro Alves <palves@redhat.com>
10361
10362 * infrun.c (follow_fork_inferior): Also switch the current
10363 inferior.
10364
10365 2017-04-13 Pedro Alves <palves@redhat.com>
10366
10367 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10368 before calling create_internal_breakpoint.
10369
10370 2017-04-13 Pedro Alves <palves@redhat.com>
10371
10372 * fork-child.c (execv_argv): New class.
10373 (breakup_args): Refactored as ...
10374 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10375 Copy arguments to storage and replace separators with NULL
10376 terminators in place.
10377 (escape_bang_in_quoted_argument): Adjust to return bool.
10378 (execv_argv::execv_argv): New ctor.
10379 (execv_argv::init_for_shell): New method, factored out from
10380 fork_inferior. Don't strdup strings into the vector.
10381 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10382 Remove free_vector_argv call.
10383
10384 2017-04-13 Yao Qi <yao.qi@linaro.org>
10385
10386 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10387 tdep->rx_psw_type.
10388
10389 2017-04-13 Yao Qi <yao.qi@linaro.org>
10390
10391 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10392 * rx-tdep.c (rx_gdbarch_init): Likewise.
10393
10394 2017-04-13 Pedro Alves <palves@redhat.com>
10395
10396 * breakpoint.h (struct breakpoint): Reindent.
10397
10398 2017-04-13 Pedro Alves <palves@redhat.com>
10399
10400 * breakpoint.c (bp_location): Rename to ...
10401 (bp_locations): ... this. All references updated.
10402 (bp_location_count): Rename to ...
10403 (bp_locations_count): ... this. All references updated.
10404 (bp_location_placed_address_before_address_max): Rename to ...
10405 (bp_locations_placed_address_before_address_max): ... this. All
10406 references updated.
10407 (bp_location_shadow_len_after_address_max): Rename to ...
10408 (bp_locations_shadow_len_after_address_max): ... this. All
10409 references updated.
10410 (bp_location_compare_addrs): Rename to ...
10411 (bp_locations_compare_addrs): ... this. All references updated.
10412 (bp_location_compare):Rename to ...
10413 (bp_locations_compare): ... this. All references updated.
10414 (bp_location_target_extensions_update): Rename to ...
10415 (bp_locations_target_extensions_update): ... this. All references
10416 updated.
10417
10418 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10419
10420 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10421 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10422 'sgtty.h'.
10423 * common/gdb_termios.h: New file, with parts of "terminal.h".
10424 * inflow.c: Include "gdb_termios.h".
10425 * ser-unix.c: Include "gdb_termios.h".
10426 * terminal.h: Move terminal-related defines to
10427 "common/gdb_termios.h".
10428
10429 2017-04-12 Tom Tromey <tom@tromey.com>
10430
10431 * probe.c (parse_probes): Update.
10432 * location.h (delete_event_location): Don't declare.
10433 (event_location_deleter::operator()): Update.
10434 * location.c (event_location_deleter::operator()): Rename from
10435 delete_event_location.
10436 * linespec.h (linespec_result) <location>: Change type to
10437 event_location_up.
10438 * linespec.c (canonicalize_linespec, event_location_to_sals)
10439 (decode_objc): Update.
10440 (linespec_result): Don't call delete_event_location.
10441 * breakpoint.c (create_breakpoints_sal)
10442 (bkpt_probe_create_sals_from_location)
10443 (strace_marker_create_sals_from_location): Update.
10444
10445 2017-04-12 Tom Tromey <tom@tromey.com>
10446
10447 * linespec.h (struct linespec_result): Add constructor and
10448 destructor.
10449 (init_linespec_result, destroy_linespec_result)
10450 (make_cleanup_destroy_linespec_result): Don't declare.
10451 * linespec.c (init_linespec_result): Remove.
10452 (linespec_result::~linespec_result): Rename from
10453 destroy_linespec_result. Update.
10454 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10455 Remove.
10456 * breakpoint.c (create_breakpoint, break_range_command)
10457 (decode_location_default): Update.
10458 * ax-gdb.c (agent_command_1): Update.
10459
10460 2017-04-12 Tom Tromey <tom@tromey.com>
10461
10462 * remote.c (remote_download_tracepoint): Update.
10463 * python/py-breakpoint.c (bppy_get_location): Update.
10464 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10465 (gdbscm_breakpoint_location): Update.
10466 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10467 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10468 Change type to event_location_up.
10469 * breakpoint.c (create_overlay_event_breakpoint)
10470 (create_longjmp_master_breakpoint)
10471 (create_std_terminate_master_breakpoint)
10472 (create_exception_master_breakpoint)
10473 (breakpoint_event_location_empty_p, print_breakpoint_location)
10474 (print_one_breakpoint_location, create_thread_event_breakpoint)
10475 (init_breakpoint_sal, create_breakpoint)
10476 (print_recreate_ranged_breakpoint, break_range_command)
10477 (init_ada_exception_breakpoint, say_where): Update.
10478 (base_breakpoint_dtor): Don't call delete_event_location.
10479 (bkpt_print_recreate, tracepoint_print_recreate)
10480 (dprintf_print_recreate, update_static_tracepoint)
10481 (breakpoint_re_set_default): Update.
10482
10483 2017-04-12 Tom Tromey <tom@tromey.com>
10484
10485 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10486 type of "to_do". Update.
10487 (compute_stack_depth): Use std::vector.
10488
10489 2017-04-12 Tom Tromey <tom@tromey.com>
10490
10491 * printcmd.c (find_instruction_backward): Use std::vector.
10492
10493 2017-04-12 Tom Tromey <tom@tromey.com>
10494
10495 * symfile.c (objfilep): Remove typedef.
10496 (reread_symbols): Use a std::vector.
10497
10498 2017-04-12 Tom Tromey <tom@tromey.com>
10499
10500 * mi/mi-main.c (exec_direction_forward): Remove.
10501 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10502 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10503 scoped_restore.
10504 * guile/guile.c (guile_repl_command, guile_command)
10505 (gdbscm_execute_gdb_command): Use scoped_restore.
10506 * go-exp.y (go_parse): Use scoped_restore.
10507 * d-exp.y (d_parse): Use scoped_restore.
10508 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10509 * c-exp.y (c_parse): Use scoped_restore.
10510
10511 2017-04-12 Tom Tromey <tom@tromey.com>
10512
10513 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10514 (mi_parse): Update return type.
10515 (mi_parse_free): Remove.
10516 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10517 (mi_parse::~mi_parse): Rename from mi_parse_free.
10518 (mi_parse_cleanup): Remove.
10519 (mi_parse): Return a unique_ptr. Use new.
10520 * mi/mi-main.c (mi_execute_command): Update.
10521
10522 2017-04-12 Tom Tromey <tom@tromey.com>
10523
10524 * location.c (explicit_location_lex_one): Return a
10525 unique_xmalloc_ptr.
10526 (string_to_explicit_location): Update. Remove cleanups.
10527
10528 2017-04-12 Tom Tromey <tom@tromey.com>
10529
10530 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10531 (compare_value_and_voffset): Change type. Update.
10532 (compute_vtable_size): Change type of "offset_vec".
10533 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10534 (gnuv3_get_typeid): Remove extraneous declaration.
10535
10536 2017-04-12 Tom Tromey <tom@tromey.com>
10537
10538 * charset.h (wchar_iterator): Fix comment.
10539
10540 2017-04-12 Tom Tromey <tom@tromey.com>
10541
10542 * charset.c (iconv_wrapper): New class.
10543 (cleanup_iconv): Remove.
10544 (convert_between_encodings): Use it.
10545
10546 2017-04-12 Tom Tromey <tom@tromey.com>
10547
10548 * symfile.h (increment_reading_symtab): Update type.
10549 * symfile.c (decrement_reading_symtab): Remove.
10550 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10551 * psymtab.c (psymtab_to_symtab): Update.
10552 * dwarf2read.c (dw2_instantiate_symtab): Update.
10553
10554 2017-04-12 Tom Tromey <tom@tromey.com>
10555
10556 * jit.c (struct jit_reader): Declare separately. Add constructor
10557 and destructor. Change type of "handle".
10558 (loaded_jit_reader): Define separately.
10559 (jit_reader_load): Update. New "new".
10560 (jit_reader_unload_command): Use "delete".
10561 * gdb-dlfcn.h (struct dlclose_deleter): New.
10562 (gdb_dlhandle_up): New typedef.
10563 (gdb_dlopen, gdb_dlsym): Update types.
10564 (gdb_dlclose): Remove.
10565 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10566 (gdb_dlsym): Change type of "handle".
10567 (make_cleanup_dlclose): Remove.
10568 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10569 * compile/compile-c-support.c (load_libcc): Update.
10570
10571 2017-04-12 Tom Tromey <tom@tromey.com>
10572
10573 * symtab.h (find_pcs_for_symtab_line): Change return type.
10574 * symtab.c (find_pcs_for_symtab_line): Change return type.
10575 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10576 type of "vec". Update.
10577 (ltpy_get_pcs_for_line): Update.
10578 * linespec.c (decode_digits_ordinary): Update.
10579
10580 2017-04-12 Tom Tromey <tom@tromey.com>
10581
10582 * tracepoint.c (actions_command): Update.
10583 * python/python.c (python_command, python_interactive_command):
10584 Update.
10585 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10586 * guile/guile.c (guile_command): Update.
10587 * defs.h (read_command_lines, read_command_lines_1): Return
10588 command_line_up.
10589 (command_lines_deleter): New struct.
10590 (command_line_up): New typedef.
10591 * compile/compile.c (compile_code_command)
10592 (compile_print_command): Update.
10593 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10594 command_line_up.
10595 (make_cleanup_free_command_lines): Remove.
10596 * cli/cli-script.c (get_command_line, read_command_lines_1)
10597 (copy_command_lines): Return command_line_up.
10598 (while_command, if_command, read_command_lines, define_command)
10599 (document_command): Update.
10600 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10601 Remove.
10602 * breakpoint.h (breakpoint_set_commands): Change type of
10603 "commands".
10604 * breakpoint.c (breakpoint_set_commands): Change type of
10605 "commands". Update.
10606 (do_map_commands_command, update_dprintf_command_list)
10607 (create_tracepoint_from_upload): Update.
10608
10609 2017-04-12 Tom Tromey <tom@tromey.com>
10610
10611 * tracepoint.c (scope_info): Update.
10612 * spu-tdep.c (spu_catch_start): Update.
10613 * python/python.c (gdbpy_decode_line): Update.
10614 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10615 * python/py-breakpoint.c (bppy_init): Update.
10616 * probe.c (parse_probes): Update.
10617 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10618 * location.h (event_location_deleter): New struct.
10619 (event_location_up): New typedef.
10620 (new_linespec_location, new_address_location, new_probe_location)
10621 (new_explicit_location, copy_event_location)
10622 (string_to_event_location, string_to_event_location_basic)
10623 (string_to_explicit_location): Update return type.
10624 (make_cleanup_delete_event_location): Remove.
10625 * location.c (new_linespec_location, new_address_location)
10626 (new_probe_location, new_explicit_location, copy_event_location):
10627 Return event_location_up.
10628 (delete_event_location_cleanup)
10629 (make_cleanup_delete_event_location): Remove.
10630 (string_to_explicit_location, string_to_event_location_basic)
10631 (string_to_event_location): Return event_location_up.
10632 * linespec.c (canonicalize_linespec, event_location_to_sals)
10633 (decode_line_with_current_source)
10634 (decode_line_with_last_displayed, decode_objc): Update.
10635 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10636 * completer.c (location_completer): Update.
10637 * cli/cli-cmds.c (edit_command, list_command): Update.
10638 * breakpoint.c (create_overlay_event_breakpoint)
10639 (create_longjmp_master_breakpoint)
10640 (create_std_terminate_master_breakpoint)
10641 (create_exception_master_breakpoint)
10642 (create_thread_event_breakpoint): Update.
10643 (init_breakpoint_sal): Update. Remove some dead code.
10644 (create_breakpoint_sal): Change type of "location". Update.
10645 (create_breakpoints_sal, create_breakpoint, break_command_1)
10646 (dprintf_command, break_range_command, until_break_command)
10647 (init_ada_exception_breakpoint)
10648 (strace_marker_create_sals_from_location)
10649 (update_static_tracepoint, trace_command, ftrace_command)
10650 (strace_command, create_tracepoint_from_upload): Update.
10651 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10652 * ax-gdb.c (agent_command_1): Update.
10653
10654 2017-04-12 Pedro Alves <palves@redhat.com>
10655
10656 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10657 * configure.tgt: Handle i[34567]86-*-go32* and
10658 i[34567]86-*-msdosdjgpp*.
10659 * i386-tdep.c (i386_svr4_reg_to_regnum):
10660 Make extern.
10661 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10662 i386-go32-tdep.c.
10663 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10664 * i386-go32-tdep.c: New file.
10665 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10666 declarations.
10667
10668 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10669
10670 * aix-thread.c (pd_status2str): Change return type to const char *.
10671
10672 2017-04-12 Pedro Alves <palves@redhat.com>
10673
10674 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10675 calls to set_gdbarch_gnu_triplet_regexp.
10676
10677 2017-04-12 Pedro Alves <palves@redhat.com>
10678
10679 PR gdb/21323
10680 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10681 New enum value.
10682 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10683 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10684 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10685 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10686 * gdbarch.h, gdbarch.c: Regenerate.
10687 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10688 gdbarch_wchar_bit and gdbarch_wchar_signed.
10689 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10690 * arm-tdep.c (arm_gdbarch_init): Likewise.
10691 * avr-tdep.c (avr_gdbarch_init): Likewise.
10692 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10693 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10694 * i386-tdep.c (i386_go32_init_abi): Likewise.
10695 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10696 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10697 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10698 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10699 * sh-tdep.c (sh_gdbarch_init): Likewise.
10700 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10701 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10702 * windows-tdep.c (windows_init_abi): Likewise.
10703 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10704
10705 2017-04-12 Pedro Alves <palves@redhat.com>
10706
10707 PR c++/21323
10708 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10709 cplus_primitive_type_char32_t>: New enum values.
10710 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10711 and cplus_primitive_type_char32_t.
10712 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10713 32, use the archtecture's built-in type for char16_t and char32_t,
10714 respectively. Otherwise, fallback to init_integer_type as before,
10715 but make the type unsigned, and issue a complaint.
10716 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10717
10718 2017-04-12 Alan Hayward <alan.hayward@arm.com>
10719
10720 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10721 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10722
10723 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10724
10725 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10726 'const char *'.
10727
10728 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10729
10730 * common/common-utils.c (free_vector_argv): New function.
10731 * common/common-utils.h: Include <vector>.
10732 (free_vector_argv): New prototype.
10733 * darwin-nat.c (darwin_create_inferior): Rewrite function
10734 prototype in order to constify "exec_file" and accept a
10735 "std::string" for "allargs".
10736 * fork-child.c: Include <vector>.
10737 (breakup_args): Rewrite function, using C++.
10738 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10739 and accept "std::string" for "allargs". Update the code to
10740 calculate "argv" based on "allargs". Update calls to "exec_fun"
10741 and "execvp".
10742 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10743 order to constify "exec_file" and accept a "std::string" for
10744 "allargs".
10745 * go32-nat.c (go32_create_inferior): Likewise.
10746 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10747 * infcmd.c (run_command_1): Constify "exec_file". Use
10748 "std::string" for inferior arguments.
10749 * inferior.h (fork_inferior): Update prototype.
10750 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10751 prototype in order to constify "exec_file" and accept a
10752 "std::string" for "allargs".
10753 * nto-procfs.c (procfs_create_inferior): Likewise.
10754 * procfs.c (procfs_create_inferior): Likewise.
10755 * remote-sim.c (gdbsim_create_inferior): Likewise.
10756 * remote.c (extended_remote_run): Update code to accept
10757 "std::string" as argument.
10758 (extended_remote_create_inferior): Rewrite function prototype in
10759 order to constify "exec_file" and accept a "std::string" for
10760 "allargs".
10761 * rs6000-nat.c (super_create_inferior): Likewise.
10762 (rs6000_create_inferior): Likewise.
10763 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10764 * windows-nat.c (windows_create_inferior): Likewise.
10765
10766 2017-04-11 Pedro Alves <palves@redhat.com>
10767
10768 * thread.c: Fix whitespace throughout.
10769
10770 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10771
10772 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10773
10774 2017-04-11 Alan Hayward <alan.hayward@arm.com>
10775
10776 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10777
10778 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10779
10780 PR gdb/21364
10781 * osdata.c (info_osdata): Check if 'type' is an empty string
10782 instead of NULL.
10783
10784 2017-04-10 Pedro Alves <palves@redhat.com>
10785
10786 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10787 (ptid_to_global_thread_id, in_thread_list)
10788 (do_captured_list_thread_ids, set_resumed, set_running)
10789 (set_executing, set_stop_requested, finish_thread_state)
10790 (validate_registers_access, can_access_registers_ptid)
10791 (print_thread_info_1, switch_to_thread)
10792 (do_restore_current_thread_cleanup)
10793 (make_cleanup_restore_current_thread, thread_command)
10794 (thread_name_command): Use operator== instead of ptid_equal.
10795
10796 2017-04-10 Pedro Alves <palves@redhat.com>
10797
10798 * thread.c (struct current_thread_cleanup) <next>: Delete field.
10799 (current_thread_cleanup_chain): Delete.
10800 (restore_current_thread_cleanup_dtor)
10801 (make_cleanup_restore_current_thread): Remove references to
10802 current_thread_cleanup_chain.
10803
10804 2017-04-10 Alan Hayward <alan.hayward@arm.com>
10805
10806 * msp430-tdep.c (msp430_pseudo_register_read): Never return
10807 REG_UNKNOWN.
10808
10809 2017-04-10 Yao Qi <yao.qi@linaro.org>
10810
10811 PR gdb/19942
10812 * gdbthread.h (thread_info::deletable): New method.
10813 (thread_info::incref): New method.
10814 (thread_info::decref): New method.
10815 (thread_info::refcount): Move it to private.
10816 * infrun.c (save_stop_context): Call inc_refcount.
10817 (release_stop_context_cleanup): Likewise.
10818 * thread.c (set_thread_exited): New function.
10819 (init_thread_list): Delete "tp" only it is deletable, otherwise
10820 call set_thread_exited.
10821 (delete_thread_1): Call set_thread_exited.
10822 (current_thread_cleanup) <inferior_pid>: Remove.
10823 <thread>: New field.
10824 (restore_current_thread_ptid_changed): Removed.
10825 (do_restore_current_thread_cleanup): Adjust.
10826 (restore_current_thread_cleanup_dtor): Don't call
10827 find_thread_ptid.
10828 (set_thread_refcount): Use dec_refcount.
10829 (make_cleanup_restore_current_thread): Adjust.
10830 (thread_apply_all_command): Call inc_refcount.
10831 (_initialize_thread): Don't call
10832 observer_attach_thread_ptid_changed.
10833
10834 2017-04-10 Yao Qi <yao.qi@linaro.org>
10835
10836 * thread.c (delete_thread_1): Hoist code on marking thread as
10837 exited.
10838
10839 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10840
10841 * windows-nat.c (windows_detach): Initialize ptid with
10842 minus_one_ptid.
10843
10844 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
10845
10846 * unittests/ptid-selftests.c: Fix erroneous assert messages.
10847
10848 2017-04-07 Alan Hayward <alan.hayward@arm.com>
10849
10850 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10851 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10852 (bfin_pseudo_register_write): Likewise
10853
10854 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
10855
10856 * common/ptid.h (struct ptid): Change to...
10857 (class ptid_t): ... this.
10858 <ptid_t>: New constructors.
10859 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10860 matches>: New methods.
10861 <make_null, make_minus_one>: New static methods.
10862 <pid>: Rename to...
10863 <m_pid>: ...this.
10864 <lwp>: Rename to...
10865 <m_lwp>: ...this.
10866 <tid>: Rename to...
10867 <m_tid>: ...this.
10868 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10869 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10870 as references, move comment to class ptid_t.
10871 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10872 ptid_t static methods.
10873 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10874 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10875 Take ptid arguments as references, implement using ptid_t methods.
10876 * unittests/ptid-selftests.c: New file.
10877 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10878 unittests/ptid-selftests.c.
10879 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10880
10881 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
10882
10883 * python/python.c (python_run_simple_file): Cast mode literal to
10884 non-const char pointer as expected by PyFile_FromString.
10885
10886 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
10887
10888 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10889 minus_one_ptid and null_ptid.
10890
10891 2017-04-05 Pedro Alves <palves@redhat.com>
10892
10893 * warning.m4 (build_warnings): Remove -Wno-write-strings.
10894 * configure: Regenerate.
10895
10896 2017-04-05 Pedro Alves <palves@redhat.com>
10897
10898 * ada-exp.y (yyerror): Constify.
10899 * ada-lang.c (bound_name, get_selections)
10900 (ada_variant_discrim_type)
10901 (ada_variant_discrim_name, ada_value_struct_elt)
10902 (ada_lookup_struct_elt_type, is_unchecked_variant)
10903 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10904 (catch_ada_exception_command_split)
10905 (catch_ada_assert_command_split, catch_assert_command)
10906 (ada_op_name): Constify.
10907 * ada-lang.h (ada_yyerror, get_selections)
10908 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10909 * arc-tdep.c (arc_print_frame_cache): Constify.
10910 * arm-tdep.c (arm_skip_stub): Constify.
10911 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10912 (gen_aggregate_elt_ref): Constify.
10913 * bcache.c (print_bcache_statistics): Constify.
10914 * bcache.h (print_bcache_statistics): Constify.
10915 * break-catch-throw.c (catch_exception_command_1):
10916 * breakpoint.c (struct ep_type_description::description):
10917 Constify.
10918 (add_solib_catchpoint): Constify.
10919 (catch_fork_command_1): Add cast.
10920 (add_catch_command): Constify.
10921 * breakpoint.h (add_catch_command, add_solib_catchpoint):
10922 Constify.
10923 * bsd-uthread.c (bsd_uthread_state): Constify.
10924 * buildsym.c (patch_subfile_names): Constify.
10925 * buildsym.h (next_symbol_text_func, patch_subfile_names):
10926 Constify.
10927 * c-exp.y (yyerror): Constify.
10928 (token::oper): Constify.
10929 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10930 * c-varobj.c (cplus_describe_child): Constify.
10931 * charset.c (find_charset_names): Add cast.
10932 (find_charset_names): Constify array and add const_cast.
10933 * cli/cli-cmds.c (complete_command, cd_command): Constify.
10934 (edit_command): Constify.
10935 * cli/cli-decode.c (lookup_cmd): Constify.
10936 * cli/cli-dump.c (dump_memory_command, dump_value_command):
10937 Constify.
10938 (struct dump_context): Constify.
10939 (add_dump_command, restore_command): Constify.
10940 * cli/cli-script.c (get_command_line): Constify.
10941 * cli/cli-script.h (get_command_line): Constify.
10942 * cli/cli-utils.c (check_for_argument): Constify.
10943 * cli/cli-utils.h (check_for_argument): Constify.
10944 * coff-pe-read.c (struct read_pe_section_data): Constify.
10945 * command.h (lookup_cmd): Constify.
10946 * common/print-utils.c (decimal2str): Constify.
10947 * completer.c (gdb_print_filename): Constify.
10948 * corefile.c (set_gnutarget): Constify.
10949 * cp-name-parser.y (yyerror): Constify.
10950 * cp-valprint.c (cp_print_class_member): Constify.
10951 * cris-tdep.c (cris_register_name, crisv32_register_name):
10952 Constify.
10953 * d-exp.y (yyerror): Constify.
10954 (struct token::oper): Constify.
10955 * d-lang.h (d_yyerror): Constify.
10956 * dbxread.c (struct header_file_location::name): Constify.
10957 (add_old_header_file, add_new_header_file, last_function_name)
10958 (dbx_next_symbol_text, add_bincl_to_list)
10959 (find_corresponding_bincl_psymtab, set_namestring)
10960 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10961 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10962 * defs.h (command_line_input, print_address_symbolic)
10963 (deprecated_readline_begin_hook): Constify.
10964 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10965 Constify.
10966 * event-top.c (handle_line_of_input): Constify and add cast.
10967 * exceptions.c (catch_errors): Constify.
10968 * exceptions.h (catch_errors): Constify.
10969 * expprint.c (print_subexp_standard, op_string, op_name)
10970 (op_name_standard, dump_raw_expression, dump_raw_expression):
10971 * expression.h (op_name, op_string, dump_raw_expression):
10972 Constify.
10973 * f-exp.y (yyerror): Constify.
10974 (struct token::oper): Constify.
10975 (struct f77_boolean_val::name): Constify.
10976 * f-lang.c (f_word_break_characters): Constify.
10977 * f-lang.h (f_yyerror): Constify.
10978 * fork-child.c (fork_inferior): Add cast.
10979 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10980 (new_variant): Constify.
10981 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10982 * gdbarch.c: Regenerate.
10983 * gdbcore.h (set_gnutarget): Constify.
10984 * go-exp.y (yyerror): Constify.
10985 (token::oper): Constify.
10986 * go-lang.h (go_yyerror): Constify.
10987 * go32-nat.c (go32_sysinfo): Constify.
10988 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10989 * guile/scm-cmd.c (cmdscm_function): Constify.
10990 * guile/scm-param.c (pascm_param_value): Constify.
10991 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10992 (h8300sx_register_name): Constify.
10993 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10994 Constify.
10995 * ia64-tdep.c (ia64_register_names): Constify.
10996 * infcmd.c (construct_inferior_arguments): Constify.
10997 (path_command, attach_post_wait): Constify.
10998 * language.c (show_range_command, show_case_command)
10999 (unk_lang_error): Constify.
11000 * language.h (language_defn::la_error)
11001 (language_defn::la_name_of_this): Constify.
11002 * linespec.c (decode_line_2): Constify.
11003 * linux-thread-db.c (thread_db_err_str): Constify.
11004 * lm32-tdep.c (lm32_register_name): Constify.
11005 * m2-exp.y (yyerror): Constify.
11006 * m2-lang.h (m2_yyerror): Constify.
11007 * m32r-tdep.c (m32r_register_names): Constify and make static.
11008 * m68hc11-tdep.c (m68hc11_register_names): Constify.
11009 * m88k-tdep.c (m88k_register_name): Constify.
11010 * macroexp.c (appendmem): Constify.
11011 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11012 (upgrade_type, parse_external, parse_partial_symbols)
11013 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11014 (new_symbol): Constify.
11015 * memattr.c (mem_info_command): Constify.
11016 * mep-tdep.c (register_name_from_keyword): Constify.
11017 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11018 Constify.
11019 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11020 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11021 * mi/mi-main.c (captured_mi_execute_command): Constify and add
11022 cast.
11023 (mi_execute_async_cli_command): Constify.
11024 * mips-tdep.c (mips_register_name): Constify.
11025 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11026 (am33_register_name, am33_2_register_name)
11027 * moxie-tdep.c (moxie_register_names): Constify.
11028 * nat/linux-osdata.c (osdata_type): Constify fields.
11029 * nto-tdep.c (nto_parse_redirection): Constify.
11030 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11031 (lookup_child_selector): Constify.
11032 (objc_methcall::name): Constify.
11033 * objc-lang.h (lookup_objc_class, lookup_child_selector)
11034 (lookup_struct_typedef): Constify.
11035 * objfiles.c (pc_in_section): Constify.
11036 * objfiles.h (pc_in_section): Constify.
11037 * p-exp.y (struct token::oper): Constify.
11038 (yyerror): Constify.
11039 * p-lang.h (pascal_yyerror): Constify.
11040 * parser-defs.h (op_name_standard): Constify.
11041 (op_print::string): Constify.
11042 (exp_descriptor::op_name): Constify.
11043 * printcmd.c (print_address_symbolic): Constify.
11044 * psymtab.c (print_partial_symbols): Constify.
11045 * python/py-breakpoint.c (stop_func): Constify.
11046 (bppy_get_expression): Constify.
11047 * python/py-cmd.c (cmdpy_completer::name): Constify.
11048 (cmdpy_function): Constify.
11049 * python/py-event.c (evpy_add_attribute)
11050 (gdbpy_initialize_event_generic): Constify.
11051 * python/py-event.h (evpy_add_attribute)
11052 (gdbpy_initialize_event_generic): Constify.
11053 * python/py-evts.c (add_new_registry): Constify.
11054 * python/py-finishbreakpoint.c (outofscope_func): Constify.
11055 * python/py-framefilter.c (get_py_iter_from_func): Constify.
11056 * python/py-inferior.c (get_buffer): Add cast.
11057 * python/py-param.c (parm_constant::name): Constify.
11058 * python/py-unwind.c (fprint_frame_id): Constify.
11059 * python/python.c (gdbpy_parameter_value): Constify.
11060 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11061 * remote.c (memory_packet_config::name): Constify.
11062 (show_packet_config_cmd, remote_write_bytes)
11063 (remote_buffer_add_string):
11064 * reverse.c (exec_reverse_once): Constify.
11065 * rs6000-tdep.c (variant::name, variant::description): Constify.
11066 * rust-exp.y (rustyyerror): Constify.
11067 * rust-lang.c (rust_op_name): Constify.
11068 * rust-lang.h (rustyyerror): Constify.
11069 * serial.h (serial_ops::name): Constify.
11070 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11071 (sh_sh3e_register_name, sh_sh2e_register_name)
11072 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11073 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11074 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11075 (sh_sh4al_dsp_register_name): Constify.
11076 * sh64-tdep.c (sh64_register_name): Constify.
11077 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11078 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11079 * stabsread.c (patch_block_stabs, read_type_number)
11080 (ref_map::stabs, ref_add, process_reference)
11081 (symbol_reference_defined, define_symbol, define_symbol)
11082 (error_type, read_type, read_member_functions, read_cpp_abbrev)
11083 (read_one_struct_field, read_struct_fields, read_baseclasses)
11084 (read_tilde_fields, read_struct_type, read_array_type)
11085 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11086 (read_huge_number, read_range_type, read_args, common_block_start)
11087 (find_name_end): Constify.
11088 * stabsread.h (common_block_start, define_symbol)
11089 (process_one_symbol, symbol_reference_defined, ref_add):
11090 * symfile.c (get_section_index, add_symbol_file_command):
11091 * symfile.h (get_section_index): Constify.
11092 * target-descriptions.c (tdesc_type::name): Constify.
11093 (tdesc_free_type): Add cast.
11094 * target.c (find_default_run_target):
11095 (add_deprecated_target_alias, find_default_run_target)
11096 (target_announce_detach): Constify.
11097 (do_option): Constify.
11098 * target.h (add_deprecated_target_alias): Constify.
11099 * thread.c (print_thread_info_1): Constify.
11100 * top.c (deprecated_readline_begin_hook, command_line_input):
11101 Constify.
11102 (init_main): Add casts.
11103 * top.h (handle_line_of_input): Constify.
11104 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11105 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11106 (tfind_command): Rename to ...
11107 (tfind_command_1): ... this and constify.
11108 (tfind_command): New function.
11109 (tfind_end_command, tfind_start_command): Adjust.
11110 (encode_source_string): Constify.
11111 * tracepoint.h (encode_source_string): Constify.
11112 * tui/tui-data.c (tui_partial_win_by_name): Constify.
11113 * tui/tui-data.h (tui_partial_win_by_name): Constify.
11114 * tui/tui-source.c (tui_set_source_content_nil): Constify.
11115 * tui/tui-source.h (tui_set_source_content_nil): Constify.
11116 * tui/tui-win.c (parse_scrolling_args): Constify.
11117 * tui/tui-windata.c (tui_erase_data_content): Constify.
11118 * tui/tui-windata.h (tui_erase_data_content): Constify.
11119 * tui/tui-winsource.c (tui_erase_source_content): Constify.
11120 * tui/tui.c (tui_enable): Add cast.
11121 * utils.c (defaulted_query): Constify.
11122 (init_page_info): Add cast.
11123 (puts_debug, subset_compare): Constify.
11124 * utils.h (subset_compare): Constify.
11125 * varobj.c (varobj_format_string): Constify.
11126 * varobj.h (varobj_format_string): Constify.
11127 * vax-tdep.c (vax_register_name): Constify.
11128 * windows-nat.c (windows_detach): Constify.
11129 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11130 * xml-support.c (gdb_xml_end_element): Constify.
11131 * xml-tdesc.c (tdesc_start_reg): Constify.
11132 * xstormy16-tdep.c (xstormy16_register_name): Constify.
11133 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11134 * xtensa-tdep.h (xtensa_register_t::name): Constify.
11135
11136 2017-04-05 Pedro Alves <palves@redhat.com>
11137
11138 * proc-api.c (struct trans): Constify.
11139 (procfs_note): Constify.
11140 * proc-events.c (struct trans, syscall_table):
11141 * proc-flags.c (struct trans): Constify.
11142 * proc-utils.h (procfs_note): Constify.
11143 * proc-why.c (struct trans): Constify.
11144 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11145 (procfs_detach): Constify.
11146 * sol-thread.c (struct string_map): Constify.
11147 (td_err_string, td_state_string): Constify.
11148
11149 2017-04-05 Pedro Alves <palves@redhat.com>
11150
11151 * proc-api.c (procfs_filename): Don't initialize
11152 procfs_filename.
11153 (prepare_to_trace): Assume procfs_filename is non-NULL.
11154 (_initialize_proc_api): Give procfs_filename a default value here.
11155
11156 2017-04-05 Pedro Alves <palves@redhat.com>
11157
11158 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11159 'cond_string' parameter.
11160 (extract_exception_regexp): Constify 'string' parameter.
11161 (catch_exception_command_1): Constify.
11162 * breakpoint.c (init_catchpoint)
11163 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11164 parameter.
11165 (ep_parse_optional_if_clause, catch_fork_command_1)
11166 (catch_exec_command_1): Constify.
11167 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11168 parameter.
11169 (ep_parse_optional_if_clause): Constify.
11170 * cli/cli-utils.c (remove_trailing_whitespace)
11171 (check_for_argument): Constify.
11172 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11173 non-const overload.
11174 (check_for_argument): Likewise.
11175
11176 2017-04-05 Pedro Alves <palves@redhat.com>
11177
11178 * event-top.c (command_line_handler): Add cast to execute_command
11179 call.
11180 * record-btrace.c (cmd_record_btrace_bts_start)
11181 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11182 (cmd_record_btrace_start): Add cast to execute_command call.
11183 * record-full.c (record_full_goto_insn):
11184 * record.c (record_start, record_stop): Add cast to
11185 execute_command_to_string calls.
11186 (cmd_record_start): Add cast to execute_command calls.
11187
11188 2017-04-05 Pedro Alves <palves@redhat.com>
11189
11190 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11191 static inline function.
11192 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11193 array and use gdb_PyArg_ParseTupleAndKeywords.
11194 * python/py-cmd.c (cmdpy_init): Likewise.
11195 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11196 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11197 (infpy_search_memory): Likewise.
11198 * python/py-objfile.c (objfpy_add_separate_debug_file)
11199 (gdbpy_lookup_objfile): Likewise.
11200 * python/py-symbol.c (gdbpy_lookup_symbol)
11201 (gdbpy_lookup_global_symbol): Likewise.
11202 * python/py-type.c (gdbpy_lookup_type): Likewise.
11203 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11204 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11205 Likewise.
11206
11207 2017-04-05 Pedro Alves <palves@redhat.com>
11208
11209 * python/python-internal.h (gdb_PyGetSetDef): New type.
11210 * python/py-block.c (block_object_getset)
11211 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11212 * python/py-event.c (event_object_getset)
11213 (finish_breakpoint_object_getset): Likewise.
11214 * python/py-inferior.c (inferior_object_getset): Likewise.
11215 * python/py-infthread.c (thread_object_getset): Likewise.
11216 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11217 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11218 * python/py-objfile.c (objfile_getset): Likewise.
11219 * python/py-progspace.c (pspace_getset): Likewise.
11220 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11221 Likewise.
11222 * python/py-record.c (recpy_record_getset): Likewise.
11223 * python/py-symbol.c (symbol_object_getset): Likewise.
11224 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11225 Likewise.
11226 * python/py-type.c (type_object_getset, field_object_getset):
11227 Likewise.
11228 * python/py-value.c (value_object_getset): Likewise.
11229
11230 2017-04-05 Pedro Alves <palves@redhat.com>
11231
11232 * python/python-internal.h (gdb_PyObject_CallMethod)
11233 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11234 New functions.
11235 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11236 (PySys_GetObject, PySys_SetPath): New macros.
11237
11238 2017-04-05 Pedro Alves <palves@redhat.com>
11239
11240 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11241 info_osdata_command.
11242 * osdata.c (info_osdata_command): Rename to ...
11243 (info_osdata): ... this. Constify 'type' parameter, and remove
11244 the 'from_tty' parameter. Accept NULL TYPE.
11245 (info_osdata_command): New function.
11246 * osdata.h (info_osdata_command): Remove declaration.
11247 (info_osdata): New declaration.
11248
11249 2017-04-05 Pedro Alves <palves@redhat.com>
11250
11251 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11252 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11253 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11254 parameter.
11255 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11256 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11257 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11258 parameter.
11259 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11260 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11261 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11262 (mi_cmd_file_list_exec_source_files)
11263 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11264 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11265 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11266 parameter.
11267 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11268 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11269 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11270 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11271 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11272 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11273 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11274 'command' parameter.
11275 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11276 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11277 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11278 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11279 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11280 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11281 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11282 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11283 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11284 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11285 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11286 parameter.
11287 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11288 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11289 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11290 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11291 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11292 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11293 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11294 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11295 (mi_cmd_data_list_changed_registers)
11296 (mi_cmd_data_write_register_values)
11297 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11298 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11299 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11300 (mi_cmd_list_features, mi_cmd_list_target_features)
11301 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11302 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11303 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11304 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11305 (mi_cmd_trace_frame_collected): Constify 'command'
11306 parameter.
11307 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11308 'command' parameter.
11309
11310 2017-04-05 Pedro Alves <palves@redhat.com>
11311
11312 * ada-lang.c (ada_completer_word_break_characters): Now a const
11313 array.
11314 (ada_get_gdb_completer_word_break_characters): Constify.
11315 * completer.c (gdb_completer_command_word_break_characters)
11316 (gdb_completer_file_name_break_characters)
11317 (gdb_completer_quote_characters): Now const arrays.
11318 (get_gdb_completer_quote_characters): Constify.
11319 (set_rl_completer_word_break_characters): New function.
11320 (set_gdb_completion_word_break_characters)
11321 (complete_line_internal): Use it.
11322 * completer.h (get_gdb_completer_quote_characters): Constify.
11323 (set_rl_completer_word_break_characters): Declare.
11324 * f-lang.c (f_word_break_characters): Constify.
11325 * language.c (default_word_break_characters): Constify.
11326 * language.h (language_defn::la_word_break_characters): Constify.
11327 (default_word_break_characters): Constify.
11328 * top.c (init_main): Use set_rl_completer_word_break_characters.
11329
11330 2017-04-05 Pedro Alves <palves@redhat.com>
11331
11332 * aix-thread.c (aix_thread_pid_to_str)
11333 (aix_thread_extra_thread_info): Constify.
11334 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11335 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11336 (bsd_uthread_pid_to_str): Constify.
11337 * corelow.c (core_pid_to_str): Constify.
11338 * darwin-nat.c (darwin_pid_to_str): Constify.
11339 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11340 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11341 Constify.
11342 * gnu-nat.c (gnu_pid_to_str): Constify.
11343 * go32-nat.c (go32_pid_to_str): Constify.
11344 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11345 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11346 * inferior.c (inferior_pid_to_str): Constify.
11347 * linux-nat.c (linux_nat_pid_to_str): Constify.
11348 * linux-tdep.c (linux_core_pid_to_str): Constify.
11349 * linux-thread-db.c (thread_db_pid_to_str)
11350 (thread_db_extra_thread_info): Constify.
11351 * nto-tdep.c (nto_extra_thread_info): Constify.
11352 * nto-tdep.h (nto_extra_thread_info): Constify.
11353 * obsd-nat.c (obsd_pid_to_str): Constify.
11354 * procfs.c (procfs_pid_to_str): Constify.
11355 * ravenscar-thread.c (ravenscar_extra_thread_info)
11356 (ravenscar_pid_to_str): Constify.
11357 * remote-sim.c (gdbsim_pid_to_str): Constify.
11358 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11359 Constify.
11360 * sol-thread.c (solaris_pid_to_str): Constify.
11361 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11362 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11363 * target.c (default_pid_to_str, target_pid_to_str)
11364 (normal_pid_to_str, default_pid_to_str): Constify.
11365 * target.h (target_ops::to_pid_to_str)
11366 (target_ops::to_extra_thread_info): Constify.
11367 (target_pid_to_str, normal_pid_to_str): Constify.
11368 * windows-nat.c (windows_pid_to_str): Constify.
11369 * gdbarch.sh (core_pid_to_str): Constify.
11370 * target-delegates.c: Regenerate.
11371 * gdbarch.h, gdbarch.c: Regenerate.
11372
11373 2017-04-05 Pedro Alves <palves@redhat.com>
11374
11375 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11376 the memory of the temporary warning_pre_print override.
11377 * utils.c (warning_pre_print): Constify.
11378 * utils.h (warning_pre_print): Constify.
11379
11380 2017-04-05 Pedro Alves <palves@redhat.com>
11381
11382 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11383 (shell_command): New function.
11384 (make_command): Use std::string.
11385 (init_cli_cmds): Register shell_command instead of shell_escape.
11386
11387 2017-04-05 Pedro Alves <palves@redhat.com>
11388
11389 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11390 * tracepoint.c (default_collect): Don't initialize.
11391
11392 2017-04-05 Pedro Alves <palves@redhat.com>
11393
11394 * macroexp.c (macro_buffer::shared): Now a bool.
11395 (init_buffer): Update.
11396 (init_shared_buffer): Constify 'addr' parameter.
11397 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11398 casts.
11399
11400 2017-04-05 Pedro Alves <palves@redhat.com>
11401
11402 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11403 * disasm.c (set_disassembler_options): Constify local.
11404 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11405
11406 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11407
11408 PR gdb/21352
11409 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11410 option.
11411
11412 2017-04-05 Yao Qi <yao.qi@linaro.org>
11413
11414 * frame.c (frame_unwind_register_unsigned): Call
11415 frame_unwind_register_value.
11416
11417 2017-04-05 Yao Qi <yao.qi@linaro.org>
11418
11419 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11420 Use gdb_test_multiple, and don't match anchor.
11421
11422 2017-04-05 Pedro Alves <palves@redhat.com>
11423
11424 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11425 (Write After Approval): Remove Simon Marchi.
11426
11427 2017-04-05 Pedro Alves <palves@redhat.com>
11428
11429 * common/gdb_optional.h (optional::optional): Make constexpr and
11430 initialize m_dummy.
11431
11432 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11433
11434 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11435 (amd64fbsd_jmp_buf_reg_offset): Remove.
11436 (amd64fbsd_supply_uthread): Remove function.
11437 (amd64fbsd_collect_uthread): Remove function.
11438 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11439 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11440 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11441 (fbsd-nat.c): Update comment.
11442 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11443 (i386fbsd_jmp_buf_reg_offset): Remove.
11444 (i386fbsd_supply_uthread): Remove function.
11445 (i386fbsd_collect_uthread): Remove function.
11446 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11447
11448 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11449
11450 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11451 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11452 * NEWS: Mention that support for FreeBSD/alpha was removed.
11453 * alpha-fbsd-tdep.c: Delete file.
11454 * config/alpha/fbsd.mh: Delete file.
11455 * configure.host: Delete alpha*-*-freebsd* and
11456 alpha*-*-kfreebsd*-gnu.
11457 * configure.tgt: Delete alpha*-*-freebsd* and
11458 alpha*-*-kfreebsd*-gnu.
11459
11460 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11461
11462 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11463 amd64bsd_store_inferior_registers): Use ptid from regcache.
11464
11465 2017-04-04 Pedro Alves <palves@redhat.com>
11466
11467 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11468 data fields, make them private and add "m_" prefixes.
11469 (lnp_state_machine::lnp_state_machine): New ctor.
11470 (record_line, check_line_address, handle_set_discriminator)
11471 (handle_set_address, handle_advance_pc, handle_special_opcode)
11472 (handle_advance_line, handle_set_file, handle_negate_stmt)
11473 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11474 (end_sequence, advance_line): New methods.
11475 (m_gdbarch, m_record_lines_p): New fields.
11476 (lnp_reader_state): Delete.
11477 (dwarf_record_line): Rename to ...
11478 (lnp_state_machine::record_line): ... adjust.
11479 (init_lnp_state_machine): Delete.
11480 (lnp_state_machine::lnp_state_machine): New.
11481 (check_line_address): Rename to ...
11482 (lnp_state_machine::check_line_address): This.
11483 (dwarf_decode_lines_1): Remove reference to "reader_state".
11484 Adjust lnp_state_machine having a non-default ctor. Use bool.
11485 State machine internal state manipulation moved to
11486 lnp_state_machine methods.
11487
11488 2017-04-04 Pedro Alves <palves@redhat.com>
11489
11490 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11491 unittests/offset-type-selftests.c.
11492 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11493 * common/offset-type.h: New file.
11494 * common/preprocessor.h: New file.
11495 * common/traits.h: New file.
11496 * common/valid-expr.h: New file.
11497 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11498 sect_offset and cu_offset strong typedefs throughout.
11499 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11500 typedefs throughout.
11501 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11502 sect_offset and cu_offset strong typedefs throughout.
11503 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11504 typedefs throughout.
11505 * gdbtypes.h: Include "common/offset-type.h".
11506 (cu_offset): Now an offset type (strong typedef) instead of a
11507 struct.
11508 (sect_offset): Likewise.
11509 (union call_site_parameter_u): Rename "param_offset" field to
11510 "param_cu_off".
11511 * unittests/offset-type-selftests.c: New file.
11512
11513 2017-04-04 Pedro Alves <palves@redhat.com>
11514
11515 * common/underlying.h: New file.
11516 * dwarf2read.c: Include "common/gdb_optional.h" and
11517 "common/underlying.h".
11518 (dir_index, file_name_index): New types.
11519 (file_entry): Use them.
11520 (file_entry::include): Use to_underlying.
11521 (line_header::add_file_name): Use dir_index.
11522 (read_formatted_entries): Use gdb::optional. Read form before
11523 writting to file_entry.
11524 (dwarf_decode_line_header): Use dir_index.
11525 (lnp_state_machine::current_file): Use to_underlying.
11526 (lnp_state_machine::file): Change type to file_name_index.
11527 (dwarf_record_line): Use to_underlying.
11528 (init_lnp_state_machine): Use file_name_index.
11529 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11530
11531 2017-04-04 Pedro Alves <palves@redhat.com>
11532
11533 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11534 operator bool, has_value and get methods.
11535
11536 2017-04-04 Pedro Alves <palves@redhat.com>
11537
11538 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11539 fields.
11540 (line_header): Initialize all data fields. Change type of
11541 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11542 Change type of include_dirs to std::vector<const char *>. Remove
11543 num_include_dirs, include_dirs_size. Change type of file_names to
11544 std::vector<file_entry>. Remove num_file_names, file_names_size.
11545 (line_header::line_header): New.
11546 (line_header::add_include_dir, line_header::add_file_name): New
11547 methods.
11548 (line_header::include_dir_at): Remove NULL check.
11549 (line_header::file_name_at): Add const overload.
11550 (line_header_up): New unique_ptr typedef.
11551 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11552 std::vector. Remove free_line_header call.
11553 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11554 free_line_header call.
11555 (free_cu_line_header): Delete.
11556 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11557 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11558 Adjust to use std::vector.
11559 (free_line_header): Delete.
11560 (free_line_header_voidp): Use delete.
11561 (add_include_dir): Replace with ...
11562 (line_header::add_include_dir): ... this method. Use std::vector.
11563 (add_file_name): Replace with ...
11564 (line_header::add_file_name): ... this method. Use std::vector.
11565 (add_include_dir_stub): Delete.
11566 (read_formatted_entries): Remove memset.
11567 (dwarf_decode_line_header): Return a line_header_up instead of a
11568 raw pointer. Remove cleanup handling. Pass lambdas to
11569 read_formatted_entries. Adjust to use line_header methods.
11570 (dwarf_decode_lines_1): Adjust to use line_header methods.
11571 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11572 use std::vector.
11573
11574 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11575
11576 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11577 instead of struct ptid.
11578
11579 2017-05-04 Alan Hayward <alan.hayward@arm.com>
11580
11581 * frame.c (get_frame_register_bytes): Unwind using value.
11582 (put_frame_register_bytes): Likewise.
11583
11584 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11585
11586 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11587 aggregate-like.
11588
11589 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11590
11591 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11592
11593 2017-03-29 Yao Qi <yao.qi@linaro.org>
11594
11595 * gdbthread.h (struct thread_info): Declare constructor and
11596 destructor. Add some in-class member initializers.
11597 * thread.c (free_thread): Remove.
11598 (init_thread_list): Call delete instead of free_thread.
11599 (new_thread): Call thread_info constructor.
11600 (thread_info::thread_info): New function.
11601 (thread_info::~thread_info): New function.
11602 (delete_thread_1): Call delete instead of free_thread.
11603 (make_cleanup_restore_current_thread): Move tp and frame to
11604 inner block.
11605
11606 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11607
11608 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11609 (arc_skip_prologue): Likewise.
11610 (arc_make_frame_cache): Likewise.
11611 (arc_pv_get_operand): New function.
11612 (arc_is_in_prologue): Likewise.
11613 (arc_analyze_prologue): Likewise.
11614 (arc_print_frame_cache): Likewise.
11615 (MAX_PROLOGUE_LENGTH): New constant.
11616
11617 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11618
11619 * configure.tgt: Add arc-insn.o.
11620 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11621 (dump_arc_instruction_command): New function.
11622 (arc_fprintf_disasm): Likewise.
11623 (arc_disassemble_info): Likewise.
11624 (arc_insn_get_operand_value): Likewise.
11625 (arc_insn_get_operand_value_signed): Likewise.
11626 (arc_insn_get_memory_base_reg): Likewise.
11627 (arc_insn_get_memory_offset): Likewise.
11628 (arc_insn_get_branch_target): Likewise.
11629 (arc_insn_dump): Likewise.
11630 (arc_insn_get_linear_next_pc): Likewise.
11631 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11632 (arc_disassemble_info): Likewise.
11633 (arc_insn_get_branch_target): Likewise.
11634 (arc_insn_get_linear_next_pc): Likewise.
11635 * NEWS: Mention new "maint print arc arc-instruction".
11636
11637 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11638
11639 * arc-tdep (maintenance_print_arc_list): New variable.
11640 (maintenance_print_arc_command): New function.
11641
11642 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11643
11644 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11645 Add "limm" and "reserved".
11646 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11647 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11648 * arc-tdep.h (arc_regnum): Likewise.
11649
11650 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11651
11652 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11653 for THREADPTR register.
11654 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11655 register.
11656 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11657 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11658 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11659
11660 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11661
11662 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11663 registers above gdbarch_num_regs (gdbarch) as privileged in
11664 call0 ABI.
11665
11666 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11667
11668 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11669 for a single specified register or for all registers in
11670 a0_base..a0_base + C0_NREGS range.
11671 (supply_gregset_reg): Call regcache_raw_supply for a single
11672 specified register or for all registers in a0_base..a0_base +
11673 C0_NREGS range.
11674
11675 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11676
11677 * arch/xtensa.h (C0_NREGS): Add definition.
11678 * xtensa-tdep.c (C0_NREGS): Remove definition.
11679
11680 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11681
11682 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11683 Drop xtensa_default_isa initialization.
11684 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11685
11686 2017-03-27 Pedro Alves <palves@redhat.com>
11687
11688 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11689 (file_entry::include_dir): New method.
11690 (line_header::include_dir_at, line_header::file_name_at): New
11691 methods.
11692 (setup_type_unit_groups, setup_type_unit_groups)
11693 (psymtab_include_file_name): Simplify using the new methods.
11694 (lnp_state_machine) <the_line_header>: New field.
11695 <file>: Add comment.
11696 (lnp_state_machine::current_file): New method.
11697 (dwarf_record_line): Simplify using the new methods.
11698 (init_lnp_state_machine): Initialize the "the_line_header" field.
11699 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11700 Simplify using the new methods.
11701
11702 2017-03-27 Pedro Alves <palves@redhat.com>
11703
11704 * cp-name-parser.y (make_empty): Delete.
11705 (demangler_special, nested_name, ptr_operator, array_indicator)
11706 (direct_declarator, declarator_1): Use fill_comp instead of
11707 make_empty.
11708
11709 2017-03-27 Pedro Alves <palves@redhat.com>
11710
11711 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11712 to ATTRIBUTE_PRINTF.
11713 * solib-target.c (library_list_start_list): Print "string" not
11714 "version".
11715 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11716 gdb_xml_error call.
11717
11718 2017-03-27 Pedro Alves <palves@redhat.com>
11719
11720 * dwarf2read.c (struct file_and_directory): New.
11721 (dwarf2_get_dwz_file): Adjust to use std::string.
11722 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11723 (find_file_and_directory): Adjust to return a file_and_directory
11724 object.
11725 (read_file_scope): Adjust to use file_and_directory. Remove
11726 make_cleanup/do_cleanups calls.
11727 (open_and_init_dwp_file): Adjust to use std::string. Remove
11728 make_cleanup/do_cleanups calls.
11729 * python/python.c (do_start_initialization): Adjust to ldirname
11730 returning a std::string.
11731 * utils.c (ldirname): Now returns a std::string.
11732 * utils.h (ldirname): Change return type to std::string.
11733 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11734 returning a std::string.
11735 * xml-tdesc.c (file_read_description_xml): Likewise.
11736
11737 2017-03-24 Alan Hayward <alan.hayward@arm.com>
11738
11739 * regcache.c (regcache_debug_print_register): New function.
11740 * regcache.h (regcache_debug_print_register): New declaration.
11741 * target.c (debug_print_register): Remove.
11742 (target_fetch_registers): Call regcache_debug_print_register.
11743 (target_store_registers): Likewise.
11744
11745 2017-03-24 Pádraig Brady <pbrady@fb.com>
11746
11747 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11748 reference beyond the 'lh->include_dirs' array before accessing to
11749 it.
11750 (psymtab_include_file_name): Likewise.
11751 (dwarf_decode_lines_1): Likewise.
11752 (dwarf_decode_lines): Likewise.
11753 (file_file_name): Likewise.
11754
11755 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11756
11757 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11758 inferior_ptid.
11759 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11760 ps_lsetfpregs): Likewise.
11761 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11762 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11763 ps_lsetfpregs): Likewise.
11764 * target.c (target_fetch_registers, target_store_registers):
11765 Remove asserts.
11766
11767 2017-03-23 Alan Hayward <alan.hayward@arm.com>
11768
11769 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11770
11771 2017-03-23 Yao Qi <yao.qi@linaro.org>
11772
11773 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11774 (_initialize_aarch64_tdep): Register it.
11775 (aarch64_record_load_store): Handle PRFM instruction.
11776 (aarch64_process_record_test): New function.
11777
11778 2017-03-23 Yao Qi <yao.qi@linaro.org>
11779
11780 * aarch64-tdep.c (aarch64_record_load_store): Fix code
11781 indentation.
11782
11783 2017-03-23 Yao Qi <yao.qi@linaro.org>
11784
11785 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11786
11787 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11788
11789 python/python.c (do_start_initialization): Fix memory leak.
11790
11791 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11792
11793 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11794 using get_ptrace_pid.
11795 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11796 inferior_ptid.
11797 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11798 inferior_ptid instead of pid.
11799
11800 2017-03-22 Yao Qi <yao.qi@linaro.org>
11801
11802 * aarch64-tdep.c: Wrap locally used classes in anonymous
11803 namespace.
11804 * arm-tdep.c: Likewise.
11805 * linespec.c: Likewise.
11806 * ui-out.c: Likewise.
11807
11808 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
11809
11810 PR gdb/19637
11811 * python/lib/gdb/printer/bound_registers.py: Import sys.
11812
11813 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11814
11815 * windows-nat.c (do_windows_fetch_inferior_registers): Add
11816 windows_thread_info parameter and use it instead of
11817 current_thread.
11818 (windows_fetch_inferior_registers): Don't set current_thread,
11819 pass the thread to do_windows_fetch_inferior_registers. Use
11820 ptid from regcache instead of inferior_ptid.
11821 (do_windows_store_inferior_registers): Add windows_thread_info
11822 parameter and use it instead of current_thread.
11823 (windows_store_inferior_registers): Don't set current_thread,
11824 pass the thread to do_windows_store_inferior_registers. Use
11825 ptid from regcache instead of inferior_ptid.
11826
11827 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11828
11829 * ser-mingw.c (ser_windows_raw): Remove reference to
11830 struct serial::current_timeout.
11831
11832 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
11833
11834 PR tdep/20928
11835 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11836 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11837 (sparc64_fsr_type): Fix %fsr decoding.
11838
11839 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
11840
11841 * python/py-record-btrace.c (btpy_insn_data): Change return type
11842 for Python 2.
11843
11844 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11845
11846 * spu-linux-nat.c (spu_fetch_inferior_registers,
11847 spu_store_inferior_registers): Use ptid from regcache, set and
11848 restore inferior_ptid.
11849 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11850 Likewise.
11851
11852 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11853
11854 * i386-linux-nat.c (fetch_register, store_register,
11855 i386_linux_fetch_inferior_registers,
11856 i386_linux_store_inferior_registers): Use ptid from regcache.
11857 * ia64-linux-nat.c (ia64_linux_fetch_register,
11858 ia64_linux_store_register): Likewise.
11859 * inf-ptrace.c (inf_ptrace_fetch_register,
11860 inf_ptrace_store_register): Likewise.
11861 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11862 m32r_linux_store_inferior_registers): Likewise.
11863 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11864 m68kbsd_store_inferior_registers): Likewise.
11865 * m68k-linux-nat.c (fetch_register, store_register,
11866 m68k_linux_fetch_inferior_registers,
11867 m68k_linux_store_inferior_registers): Likewise.
11868 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11869 m88kbsd_store_inferior_registers): Likewise.
11870 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11871 mips_fbsd_store_inferior_registers): Likewise.
11872 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11873 mips64_linux_regsets_store_registers): Likewise.
11874 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11875 mipsnbsd_store_inferior_registers): Likewise.
11876 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11877 mips64obsd_store_inferior_registers): Likewise.
11878 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11879 Likewise.
11880 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11881 ppcfbsd_store_inferior_registers): Likewise.
11882 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11883 ppc_linux_store_inferior_registers): Likewise.
11884 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11885 ppcnbsd_store_inferior_registers): Likewise.
11886 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11887 ppcobsd_store_registers): Likewise.
11888 * procfs.c (procfs_fetch_registers, procfs_store_registers):
11889 Likewise.
11890 * ravenscar-thread.c (ravenscar_fetch_registers,
11891 ravenscar_store_registers, ravenscar_prepare_to_store):
11892 Likewise.
11893 * record-btrace.c (record_btrace_fetch_registers,
11894 record_btrace_store_registers, record_btrace_prepare_to_store):
11895 Likewise.
11896 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11897 Lookup inferior using ptid from regcache, instead of
11898 current_inferior.
11899 * remote.c (remote_fetch_registers, remote_store_registers): Use
11900 ptid from regcache.
11901 * rs6000-nat.c (fetch_register, store_register): Likewise.
11902 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11903 s390_linux_store_inferior_registers): Likewise.
11904 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11905 shnbsd_store_inferior_registers): Likewise.
11906 * sol-thread.c (sol_thread_fetch_registers,
11907 sol_thread_store_registers): Likewise.
11908 * sparc-nat.c (sparc_fetch_inferior_registers,
11909 sparc_store_inferior_registers): Likewise.
11910 * tilegx-linux-nat.c (fetch_inferior_registers,
11911 store_inferior_registers): Likewise.
11912 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11913 vaxbsd_store_inferior_registers): Likewise.
11914 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11915 store_xtregs): Likewise.
11916
11917 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11918
11919 PR gdb/14441
11920 * NEWS: Mention support for rvalue references in GDB and python.
11921 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11922 supports both lvalue and rvalue references.
11923
11924 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11925
11926 PR gdb/14441
11927 * gdbtypes.c (rank_one_type): Implement overloading
11928 resolution rules regarding rvalue references.
11929
11930 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11931
11932 PR gdb/14441
11933 * aarch64-tdep.c (aarch64_type_align)
11934 (aarch64_extract_return_value, aarch64_store_return_value): Change
11935 lvalue reference type checks to general reference type checks.
11936 * amd64-tdep.c (amd64_classify): Likewise.
11937 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11938 Likewise.
11939 * arm-tdep.c (arm_type_align, arm_extract_return_value)
11940 (arm_store_return_value): Likewise.
11941 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11942 * c-typeprint.c (c_print_type): Likewise.
11943 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11944 (cplus_number_of_children, cplus_describe_child): Likewise.
11945 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11946 * completer.c (expression_completer): Likewise.
11947 * cp-support.c (make_symbol_overload_list_adl_namespace):
11948 Likewise.
11949 * darwin-nat-info.c (info_mach_region_command): Likewise.
11950 * dwarf2loc.c (entry_data_value_coerce_ref)
11951 (value_of_dwarf_reg_entry): Likewise.
11952 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11953 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11954 Likewise.
11955 * findvar.c (extract_typed_address, store_typed_address):
11956 Likewise.
11957 * gdbtypes.c (rank_one_type): Likewise.
11958 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11959 * infcall.c (value_arg_coerce): Likewise.
11960 * language.c (pointer_type): Likewise.
11961 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11962 Likewise.
11963 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11964 * mn10300-tdep.c (mn10300_type_align): Likewise.
11965 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11966 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11967 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11968 Likewise.
11969 * printcmd.c (print_formatted, x_command): Likewise.
11970 * python/py-type.c (typy_get_composite, typy_template_argument):
11971 Likewise.
11972 * python/py-value.c (valpy_referenced_value)
11973 (valpy_get_dynamic_type, value_has_field): Likewise.
11974 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11975 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11976 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11977 * spu-tdep.c (spu_scalar_value_p): Likewise.
11978 * symtab.c (lookup_symbol_aux): Likewise.
11979 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11980 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11981 Likewise.
11982 * valops.c (value_cast_pointers, value_cast)
11983 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11984 (value_struct_elt, value_struct_elt_bitpos)
11985 (value_find_oload_method_list, find_overload_match)
11986 (value_rtti_indirect_type): Likewise.
11987 * valprint.c (val_print_scalar_type_p, generic_val_print):
11988 Likewise.
11989 * value.c (value_actual_type, value_as_address, unpack_long)
11990 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11991 (coerce_ref): Likewise.
11992 * varobj.c (varobj_get_value_type): Likewise.
11993
11994 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11995
11996 PR gdb/14441
11997 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11998 table of constants.
11999 * python/lib/gdb/command/explore.py: Support exploring values
12000 of rvalue reference types.
12001 * python/lib/gdb/types.py: Implement get_basic_type() for
12002 rvalue reference types.
12003 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12004 constant.
12005 * python/py-value.c (valpy_getitem): Add an rvalue reference
12006 check.
12007 (valpy_reference_value): Add new parameter "refcode".
12008 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12009 New wrappers for valpy_reference_value().
12010 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12011 (gdbpy_invoke_xmethod): Likewise.
12012
12013 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12014
12015 PR gdb/14441
12016 * dwarf2read.c (process_die, read_type_die_1): Handle the
12017 DW_TAG_rvalue_reference_type DIE.
12018 (read_tag_reference_type): Add new parameter "refcode".
12019
12020 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12021
12022 PR gdb/14441
12023 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12024 (c_type_print_modifier, c_type_print_varspec_suffix)
12025 (c_type_print_base): Support printing rvalue reference types.
12026 * c-valprint.c (c_val_print, c_value_print): Support printing
12027 rvalue reference values.
12028
12029 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12030
12031 PR gdb/14441
12032 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12033 typename.
12034 * cp-support.c (replace_typedefs): Handle
12035 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12036 * python/py-type.c (typy_lookup_type): Likewise.
12037
12038 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12039
12040 PR gdb/14441
12041 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12042 * parse.c (insert_type): Change assert statement.
12043 (follow_types): Handle rvalue reference types.
12044 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12045 constant.
12046
12047 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12048
12049 PR gdb/14441
12050 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12051 value_ref() interface.
12052 * c-valprint.c (c_value_print): Likewise.
12053 * infcall.c (value_arg_coerce): Likewise.
12054 * python/py-value.c (valpy_reference_value): Likewise.
12055 * valops.c (value_cast, value_reinterpret_cast)
12056 (value_dynamic_cast, typecmp): Likewise.
12057 (value_ref): Parameterize by kind of return value reference type.
12058 * value.h (value_ref): Add new parameter "refcode".
12059
12060 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12061
12062 PR gdb/14441
12063 * dwarf2read.c (read_tag_reference_type): Use
12064 lookup_lvalue_reference_type() instead of lookup_reference_type().
12065 * eval.c (evaluate_subexp_standard): Likewise.
12066 * f-exp.y: Likewise.
12067 * gdbtypes.c (make_reference_type, lookup_reference_type):
12068 Generalize with rvalue reference types.
12069 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12070 convenience wrappers for lookup_reference_type().
12071 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12072 reference kind parameter.
12073 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12074 wrappers for lookup_reference_type().
12075 * guile/scm-type.c (gdbscm_type_reference): Use
12076 lookup_lvalue_reference_type() instead of lookup_reference_type().
12077 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12078 * parse.c (follow_types): Likewise.
12079 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12080 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12081 Likewise.
12082 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12083 (gdbpy_invoke_xmethod): Likewise.
12084 * stabsread.c: Provide extra argument to make_reference_type()
12085 call.
12086 * valops.c (value_ref, value_rtti_indirect_type): Use
12087 lookup_lvalue_reference_type() instead of lookup_reference_type().
12088
12089 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12090
12091 PR gdb/14441
12092 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12093 (TYPE_IS_REFERENCE): New macro.
12094 (struct type): Add rvalue_reference_type field.
12095 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12096
12097 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12098
12099 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12100 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12101 New function definition.
12102 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12103 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12104 New function declaration.
12105 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12106 * mi/mi-interp.h: New file.
12107 * solib.c (info_sharedlibrary_command): Replace for loop with
12108 ALL_SO_LIBS macro
12109 * solib.h (update_solib_list): New function declaration.
12110 (so_list_head): Move macro.
12111 * solist.h (ALL_SO_LIBS): New macro.
12112
12113 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12114
12115 * infcmd.c (post_create_inferior): Remove unused argument in
12116 call to solib_add.
12117 * remote.c (remote_start_remote): Likewise.
12118 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12119 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12120 (enable_break): Likewise.
12121 * solib.c (update_solib_list): Remove unused target argument
12122 and its documentation.
12123 (solib_add): Remove unused target argument. Remove unused
12124 argument in call to update_solib_list.
12125 (info_sharedlibrary_command): Remove unused argument in call
12126 to update_solib_list.
12127 (sharedlibrary_command): Remove unused argument in call to
12128 solib_add.
12129 (handle_solib_event): Likewise.
12130 (reload_shared_libraries): Likewise.
12131 * solib.h (solib_add): Remove unused target argument.
12132
12133 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
12134
12135 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12136 (s390_displaced_step_fixup): Cover relative branches with the
12137 default fixup handling. This fixes lack of support for some
12138 relative branch instructions.
12139
12140 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12141
12142 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12143 ptid from regcache.
12144
12145 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12146
12147 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12148 i386_darwin_store_inferior_registers): Use ptid from regcache.
12149
12150 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12151
12152 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12153 i386bsd_store_inferior_registers): Use ptid from regcache.
12154
12155 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12156
12157 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12158 hppaobsd_store_registers): Use ptid from regcache.
12159
12160 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12161
12162 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12163 hppanbsd_store_registers): Use ptid from regcache.
12164
12165 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12166
12167 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12168 from regcache. Use get_ptrace_pid.
12169
12170 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12171
12172 * corelow.c (get_core_register_section): Use ptid from regcache,
12173 update doc.
12174
12175 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12176
12177 * bsd-uthread.c (bsd_uthread_fetch_registers,
12178 bsd_uthread_store_registers): Use ptid from regcache, set and
12179 restore inferior_ptid.
12180
12181 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12182
12183 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12184 fetch_fp_regs, store_register, store_regs, store_fp_register,
12185 store_fp_regs): Use ptid from regcache.
12186
12187 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12188
12189 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12190 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12191 store_vfp_regs): Use ptid from regcache.
12192
12193 2017-03-17 Pedro Alves <palves@redhat.com>
12194
12195 PR remote/21188
12196 * ser-base.c (ser_base_wait_for): Add comment.
12197 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12198 version.
12199 * ser-unix.c (hardwire_raw): Remove reference to
12200 scb->current_timeout.
12201 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12202 (hardwire_ops): Install ser_base_readchar instead of
12203 hardwire_readchar.
12204 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12205 Remove fields.
12206
12207 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
12208
12209 PR gdb/19637
12210 * python/lib/gdb/printer/bound_registers.py: Add support for
12211 Python 3.
12212
12213 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12214
12215 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12216 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12217 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12218 byte_offset to subobj_byte_offset. Fix the handling of
12219 DWARF_VALUE_STACK on big-endian targets when coming via an
12220 implicit pointer.
12221 (dwarf2_evaluate_loc_desc): Adjust call to
12222 dwarf2_evaluate_loc_desc_full.
12223 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12224 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12225
12226 2017-03-16 Yao Qi <yao.qi@linaro.org>
12227
12228 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12229 and REVSH instructions.
12230
12231 2017-03-16 Yao Qi <yao.qi@linaro.org>
12232
12233 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12234 (arm_record_test): Declare.
12235 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12236 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12237 align with the manual.
12238 (thumb_record_misc): Adjust the code order to align with the
12239 manual.
12240 (thumb2_record_decode_insn_handler): Fix instruction matching.
12241 (instruction_reader_thumb): New class.
12242 (arm_record_test): New function.
12243
12244 2017-03-16 Yao Qi <yao.qi@linaro.org>
12245
12246 * arm-tdep.c (abstract_memory_reader): New class.
12247 (instruction_reader): New class.
12248 (extract_arm_insn): Add argument 'reader'. Callers updated.
12249 (decode_insn): Likewise.
12250
12251 2017-03-16 Doug Evans <dje@google.com>
12252
12253 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12254 member. Change type of TYPE member to SCM. All uses updated.
12255 (lsscm_make_lazy_string_smob): Add assert.
12256 (lsscm_make_lazy_string): Flag bad length values.
12257 (lsscm_elt_type): New function.
12258 (gdbscm_lazy_string_to_value): Rewrite to use
12259 lsscm_safe_lazy_string_to_value.
12260 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12261 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12262 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12263 in incoming type.
12264 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12265 * guile/scm-type.c (tyscm_scm_to_type): New function.
12266
12267 2017-03-15 Doug Evans <dje@google.com>
12268
12269 PR python/17728, python/18439, python/18779
12270 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12271 member. Change type of TYPE member to PyObject *. All uses updated.
12272 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12273 (gdbpy_create_lazy_string_object): Flag bad length values.
12274 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12275 Handle typedefs in incoming type.
12276 (stpy_lazy_string_elt_type): New function.
12277 (gdbpy_extract_lazy_string): Call it.
12278 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12279 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12280 typedefs in incoming type.
12281
12282 2017-03-16 Doug Evans <dje@google.com>
12283
12284 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12285 * guile/scm-type.c (tyscm_scm_to_type): New function.
12286
12287 2017-03-16 Jiong Wang <jiong.wang@arm.com>
12288
12289 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12290 "ULONGEST" for "skip".
12291
12292 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12293
12294 PR gdb/21220
12295 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12296 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12297 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12298 over ptrace peek/poke until end of buffer or error.
12299
12300 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12301
12302 * parse.c (length_of_subexp): Make static.
12303 * parser-defs.h (length_of_subexp): Remove.
12304
12305 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12306
12307 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12308 as well.
12309
12310 2017-03-14 Pedro Alves <palves@redhat.com>
12311
12312 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12313 (main): Use std::unique_ptr. Remove calls to
12314 cp_demangled_name_parse_free.
12315
12316 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12317
12318 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12319 alphabsd_store_inferior_registers): Use regcache->ptid instead
12320 of inferior_ptid.
12321
12322 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12323
12324 * aix-thread.c (aix_thread_fetch_registers,
12325 aix_thread_store_registers): Use regcache->ptid instead of
12326 inferior_ptid.
12327
12328 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12329
12330 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12331 store_gregs_to_thread, fetch_fpregs_from_thread,
12332 store_fpregs_to_thread): Use regcache->ptid instead of
12333 inferior_ptid.
12334
12335 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12336
12337 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12338 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12339 instead of inferior_ptid.
12340
12341 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12342
12343 * target.c (target_fetch_registers, target_store_registers): Add
12344 assert.
12345
12346 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12347
12348 * regcache.h (regcache_get_ptid): New function.
12349 * regcache.c (regcache_get_ptid): New function.
12350
12351 2017-03-13 Mark Wielaard <mark@klomp.org>
12352
12353 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12354
12355 2017-03-10 Keith Seitz <keiths@redhat.com>
12356
12357 PR c++/8218
12358 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12359
12360 2017-03-08 Pedro Alves <palves@redhat.com>
12361
12362 PR gdb/18360
12363 * infrun.c (start_step_over, do_target_resume, resume)
12364 (restart_threads): Assert we're not resuming a thread that is
12365 meant to be stopped.
12366 (infrun_thread_stop_requested_callback): Delete.
12367 (infrun_thread_stop_requested): If the thread is internally
12368 stopped, queue a pending stop event and clear the thread's
12369 inline-frame state.
12370 (handle_stop_requested): New function.
12371 (handle_syscall_event, handle_inferior_event_1): Use
12372 handle_stop_requested.
12373 (handle_stop_requested): New function.
12374 (handle_signal_stop): Set the thread's stop_signal here instead of
12375 at caller.
12376 (finish_step_over): Clear step over info unconditionally.
12377 (handle_signal_stop): If the user had interrupted the event
12378 thread, consider the stop a random signal.
12379 (handle_signal_stop) <signal arrived while stepping over
12380 breakpoint>: Don't restart threads here.
12381 (stop_waiting): Don't clear step-over info here.
12382
12383 2017-03-08 Pedro Alves <palves@redhat.com>
12384
12385 PR 21206
12386 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12387 goes to argument 2, not 1.
12388
12389 2017-03-08 Pedro Alves <palves@redhat.com>
12390
12391 PR cli/21218
12392 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12393 display_gdb_prompt.
12394 (command_line_input): Add comment.
12395
12396 2017-03-08 Pedro Alves <palves@redhat.com>
12397
12398 PR tui/21216
12399 * tui/tui-file.c (tui_file::write): New.
12400 * tui/tui-file.h (tui_file): Override "write".
12401 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12402 factored out from ...
12403 (tui_puts): ... here.
12404 (tui_putc): Use them.
12405 (tui_write): New function.
12406 * tui/tui-io.h (tui_write): Declare.
12407
12408 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12409
12410 * Makefile.in (SFILES): Replace "environ.c" with
12411 "common/environ.c".
12412 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12413 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12414 to...
12415 * common/environ.c: ... here.
12416 * environ.h: Moved to...
12417 * common/environ.h: ... here.
12418
12419 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12420
12421 * gdbarch.sh (pstring_ptr): New static function.
12422 (gdbarch_disassembler_options): Use it.
12423 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12424 not valid_disassembler_option->name.
12425 * gdbarch.c: Regenerate.
12426
12427 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12428
12429 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12430
12431 2017-03-07 Pedro Alves <palves@redhat.com>
12432
12433 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12434
12435 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
12436
12437 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12438 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12439 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12440 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12441
12442 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12443
12444 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12445
12446 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12447
12448 * remote.c (remote_add_target_side_commands): Use range-based
12449 for loop.
12450
12451 2017-03-03 Yao Qi <yao.qi@linaro.org>
12452
12453 PR gdb/21165
12454 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12455 value is lazy.
12456 * valprint.c (common_val_print): Likewise.
12457
12458 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12459
12460 * NEWS: Mention new set/show disassembler-options commands.
12461 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12462 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12463 (prospective_options): New static variable.
12464 (gdb_disassembler::gdb_disassembler): Initialize
12465 m_di.disassembler_options.
12466 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12467 (get_disassembler_options): New function.
12468 (set_disassembler_options): Likewise.
12469 (set_disassembler_options_sfunc): Likewise.
12470 (show_disassembler_options_sfunc): Likewise.
12471 (disassembler_options_completer): Likewise.
12472 (_initialize_disasm): Likewise.
12473 * disasm.h (get_disassembler_options): New prototype.
12474 (set_disassembler_options): Likewise.
12475 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12476 (gdbarch_verify_disassembler_options): Likewise.
12477 * gdbarch.c: Regenerate.
12478 * gdbarch.h: Likewise.
12479 * arm-tdep.c (num_disassembly_options): Delete.
12480 (set_disassembly_style): Likewise.
12481 (arm_disassembler_options): New static variable.
12482 (set_disassembly_style_sfunc): Convert short style name into long
12483 option name. Call set_disassembler_options.
12484 (show_disassembly_style_sfunc): New function.
12485 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12486 set_gdbarch_verify_disassembler_options.
12487 (_initialize_arm_tdep): Delete regnames variable and update callers.
12488 (arm_disassembler_options): Initialize.
12489 (disasm_options): New variable.
12490 (num_disassembly_options): Rename from this...
12491 (num_disassembly_styles): ...to this. Compute by scanning through
12492 disasm_options.
12493 (valid_disassembly_styles): Initialize using disasm_options.
12494 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12495 set_arm_regname_option.
12496 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12497 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12498 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12499 set_gdbarch_verify_disassembler_options.
12500 * s390-tdep.c (s390_disassembler_options): New static variable.
12501 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12502 set_gdbarch_verify_disassembler_options.
12503
12504 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12505
12506 * remote.c (remote_add_target_side_condition): Remove "struct"
12507 keyword from range-based for loop.
12508
12509 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12510
12511 * remote.c (remote_add_target_side_condition): Use range-based
12512 for loop. Update comment.
12513
12514 2017-02-27 Yao Qi <yao.qi@linaro.org>
12515
12516 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12517
12518 2017-02-26 Alan Hayward <alan.hayward@arm.com>
12519
12520 * regcache.c (regcache_raw_update): New function.
12521 (regcache_raw_read): Move code to regcache_raw_update.
12522 * regcache.h (regcache_raw_update): New declaration.
12523 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12524
12525 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12526
12527 * dwarf2read.c (create_debug_type_hash_table): Initialize
12528 header.signature and header.type_offset_in_tu.
12529
12530 2017-02-24 Pedro Alves <palves@redhat.com>
12531
12532 * symtab.c (make_file_symbol_completion_list_1): Use
12533 add_symtab_completions.
12534
12535 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12536
12537 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12538
12539 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12540
12541 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12542 I386_MAX_REGISTER_SIZE.
12543 (i386_pseudo_register_write): Likewise.
12544 (i386_process_record): Likewise.
12545 * i387-tdep.c (i387_supply_xsave): Likewise.
12546 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12547 (store_register): Likewise.
12548
12549 2017-02-23 Pedro Alves <palves@redhat.com>
12550
12551 * ada-lang.c: Include "common/function-view.h".
12552 (ada_iterate_over_symbols): Adjust to use function_view as
12553 callback type.
12554 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12555 (ada_make_symbol_completion_list): Use a lambda.
12556 (ada_exc_search_name_matches): Delete.
12557 (name_matches_regex): New.
12558 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12559 * compile/compile-c-support.c: Include "common/function-view.h".
12560 (print_one_macro): Change prototype to accept a ui_file pointer.
12561 (write_macro_definitions): Use a lambda.
12562 * dwarf2read.c: Include "common/function-view.h".
12563 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12564 (dw2_expand_symtabs_matching): Adjust to use function_view as
12565 callback type.
12566 * language.h: Include "common/function-view.h".
12567 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12568 function_view as callback type.
12569 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12570 * linespec.c: Include "common/function-view.h".
12571 (collect_info::add_symbol): New method.
12572 (struct symbol_and_data_callback, iterate_inline_only, struct
12573 symbol_matcher_data, iterate_name_matcher): Delete.
12574 (iterate_over_all_matching_symtabs): Adjust to use function_view
12575 as callback type and lambdas.
12576 (iterate_over_file_blocks): Adjust to use function_view as
12577 callback type.
12578 (decode_compound_collector): Now a class with private fields.
12579 (decode_compound_collector::release_symbols): New method.
12580 (collect_one_symbol): Rename to...
12581 (decode_compound_collector::operator()): ... this and adjust.
12582 (lookup_prefix_sym): decode_compound_collector construction bits
12583 move to decode_compound_collector ctor. Pass the
12584 decode_compound_collector object directly as callback. Remove
12585 cleanups and use decode_compound_collector::release_symbols
12586 instead.
12587 (symtab_collector): Now a class with private fields.
12588 (symtab_collector::release_symtabs): New method.
12589 (add_symtabs_to_list): Rename to...
12590 (symtab_collector::operator()): ... this and adjust.
12591 (collect_symtabs_from_filename): symtab_collector construction
12592 bits move to symtab_collector ctor. Pass the symtab_collector
12593 object directly as callback. Remove cleanups and use
12594 symtab_collector::release_symtabs instead.
12595 (collect_symbols): Delete.
12596 (add_matching_symbols_to_info): Use lambdas.
12597 * macrocmd.c (print_macro_callback): Delete.
12598 (info_macro_command): Use a lambda.
12599 (info_macros_command): Pass print_macro_definition as callable
12600 directly.
12601 (print_one_macro): Remove 'ignore' parameter.
12602 (macro_list_command): Adjust.
12603 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12604 (macro_for_each_data::user_data): Delete field.
12605 (foreach_macro): Adjust to call the function_view.
12606 (macro_for_each): Adjust to use function_view as callback type.
12607 (foreach_macro_in_scope): Adjust to call the function_view.
12608 (macro_for_each_in_scope): Adjust to use function_view as callback
12609 type.
12610 * macrotab.h: Include "common/function-view.h".
12611 (macro_callback_fn): Declare a prototype instead of a pointer.
12612 Remove "user_data" parameter.
12613 (macro_for_each, macro_for_each_in_scope): Adjust to use
12614 function_view as callback type.
12615 * psymtab.c (partial_map_expand_apply)
12616 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12617 Adjust to use function_view as callback type and to return bool.
12618 (psym_expand_symtabs_matching): Adjust to use function_view as
12619 callback types.
12620 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12621 to use function_view as callback type and to return bool.
12622 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12623 callback types.
12624 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12625 as callback types.
12626 * symfile.h: Include "common/function-view.h".
12627 (expand_symtabs_file_matcher_ftype)
12628 (expand_symtabs_symbol_matcher_ftype)
12629 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12630 return bool.
12631 (quick_symbol_functions::map_symtabs_matching_filename)
12632 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12633 function_view as callback type and return bool.
12634 (expand_symtabs_matching): Adjust to use function_view as callback
12635 type.
12636 (maintenance_expand_name_matcher)
12637 (maintenance_expand_file_matcher): Delete.
12638 (maintenance_expand_symtabs): Use lambdas.
12639 * symtab.c (iterate_over_some_symtabs): Adjust to use
12640 function_view as callback types and return bool.
12641 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12642 of a cleanup.
12643 (lookup_symtab_callback): Delete.
12644 (lookup_symtab): Use a lambda.
12645 (iterate_over_symbols): Adjust to use function_view as callback
12646 type.
12647 (struct search_symbols_data, search_symbols_file_matches)
12648 (search_symbols_name_matches): Delete.
12649 (search_symbols): Use a pair of lambdas.
12650 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12651 (symtab_expansion_callback): Delete.
12652 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12653 * symtab.h: Include "common/function-view.h".
12654 (iterate_over_some_symtabs): Adjust to use function_view as
12655 callback type and return bool.
12656 (iterate_over_symtabs): Adjust to use function_view as callback
12657 type.
12658 (symbol_found_callback_ftype): Remove 'data' parameter and return
12659 bool.
12660 (iterate_over_symbols): Adjust to use function_view as callback
12661 type.
12662
12663 2017-02-23 Pedro Alves <palves@redhat.com>
12664
12665 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12666 (%.o) <unittests/%.c>: New pattern.
12667 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12668 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12669 * common/function-view.h: New file.
12670 * unittests/function-view-selftests.c: New file.
12671 * configure: Regenerate.
12672
12673 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12674
12675 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12676 inferior_ptid.
12677 * go32-nat.c (go32_thread_alive): Likewise.
12678
12679 2017-02-23 Yao Qi <yao.qi@linaro.org>
12680
12681 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12682 delete.
12683
12684 2017-02-23 Yao Qi <yao.qi@linaro.org>
12685
12686 * varobj.c (varobj_clear_saved_item): Use delete instead of
12687 xfree.
12688 (update_dynamic_varobj_children): Likewise.
12689
12690 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12691
12692 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12693
12694 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12695
12696 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12697 m_enum_value to 0 in default constructor.
12698
12699 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12700
12701 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12702 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12703 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12704 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12705 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12706 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12707 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12708 IS_STORE_CONDITIONAL_INSN.
12709
12710 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12711
12712 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12713
12714 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12715
12716 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12717
12718 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12719
12720 * dwarf2read.c (skip_one_die, read_attribute_value)
12721 (dwarf2_const_value_attr, dump_die_shallow)
12722 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12723 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12724
12725 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12726
12727 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12728 (dwarf_parse_macro_header): Accept DWARF version 5.
12729 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12730
12731 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12732
12733 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12734 DW_AT_GNU_*.
12735 * common/common-exceptions.h (enum errors): Likewise.
12736 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12737 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12738 (dwarf_expr_context::execute_stack_op): Likewise.
12739 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12740 Likewise.
12741 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12742 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12743 (show_entry_values_debug, call_site_to_target_addr)
12744 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12745 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12746 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12747 (value_of_dwarf_block_entry, indirect_pieced_value)
12748 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12749 (disassemble_dwarf_expression): Likewise.
12750 * dwarf2read.c (process_die, inherit_abstract_dies)
12751 (read_call_site_scope): Likewise.
12752 * gdbtypes.h (struct func_type, struct call_site_parameter)
12753 (struct call_site): Likewise.
12754 * stack.c (read_frame_arg): Likewise.
12755 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12756
12757 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12758
12759 * defs.h (read_unsigned_leb128): New declaration.
12760 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12761 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12762 (dwarf2_find_location_expression): Call also
12763 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12764 * dwarf2loc.h (dwarf2_version): New declaration.
12765 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12766 rnglists.
12767 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12768 .debug_rnglists.
12769 (struct dwop_section_names): Add loclists_dwo.
12770 (dwop_section_names): Add .debug_loclists.dwo.
12771 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12772 (struct dwarf2_per_cu_data): Add dwarf_version.
12773 (struct dwo_sections): Add loclists.
12774 (struct attr_abbrev): Add implicit_const.
12775 (read_indirect_line_string): New declaration.
12776 (read_unsigned_leb128): Delete declaration.
12777 (rcuh_kind): New definition.
12778 (read_and_check_comp_unit_head): Change parameter
12779 is_debug_types_section to section_kind.
12780 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12781 (read_comp_unit_head): Change parameter abfd to section, add parameter
12782 section_kind. Handle DWARF-5.
12783 (error_check_comp_unit_head): Accept also DWARF version 5.
12784 (read_and_check_comp_unit_head): Change parameter
12785 is_debug_types_section to section_kind.
12786 (read_and_check_type_unit_head): Delete function.
12787 (read_abbrev_offset): Handle DWARF-5.
12788 (create_debug_type_hash_table): Add parameter section_kind. Process
12789 only DW_UT_type. Use signature and type_offset_in_tu from struct
12790 comp_unit_head.
12791 (create_debug_types_hash_table): Update create_debug_type_hash_table
12792 caller.
12793 (create_all_type_units): Call create_debug_type_hash_table.
12794 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12795 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12796 caller.
12797 (skip_one_die): Handle DW_FORM_implicit_const.
12798 (dwarf2_rnglists_process): New function.
12799 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12800 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12801 (read_attribute_value): Handle DW_FORM_implicit_const,
12802 DW_FORM_line_strp.
12803 (read_attribute): Handle DW_FORM_implicit_const.
12804 (read_indirect_string_at_offset_from): New function from
12805 read_indirect_string_at_offset.
12806 (read_indirect_string_at_offset): Call
12807 read_indirect_string_at_offset_from.
12808 (read_indirect_line_string_at_offset): New function.
12809 (read_indirect_string): New function comment.
12810 (read_indirect_line_string): New function.
12811 (read_unsigned_leb128): Make it global.
12812 (dwarf2_string_attr): Handle DWARF-5.
12813 (add_include_dir_stub, read_formatted_entries): New functions.
12814 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12815 Handle DWARF-5.
12816 (per_cu_header_read_in): Update read_comp_unit_head caller.
12817 (dwarf2_version): New function.
12818 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12819 rnglists.
12820 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12821 fields.
12822
12823 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12824
12825 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12826
12827 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12828
12829 * dwarf2read.c (dwarf2_ranges_process): New function from
12830 dwarf2_ranges_read.
12831 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12832 dwarf2_ranges_process.
12833
12834 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12835
12836 * dwarf2read.c (create_debug_type_hash_table): New function from
12837 create_debug_types_hash_table.
12838 (create_debug_types_hash_table): Call create_debug_type_hash_table.
12839 (create_all_type_units, open_and_init_dwo_file): Update
12840 create_debug_types_hash_table callers.
12841
12842 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12843
12844 PR gdb/16188
12845 * fork-child.c (trace_start_error): Fix thinko. va_end should
12846 refer to 'ap', not 'args'.
12847
12848 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12849 Pedro Alves <palves@redhat.com>
12850
12851 PR gdb/16188
12852 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12853 calls succeeded.
12854 * fork-child.c (trace_start_error): New function.
12855 (trace_start_error_with_name): Likewise.
12856 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12857 * inf-ptrace.c (inf_ptrace_me): Likewise.
12858 * inferior.h (trace_start_error): New prototype.
12859 (trace_start_error_with_name): Likewise.
12860
12861 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
12862
12863 PR gdb/21164
12864 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12865 NULL before using it.
12866 * symmisc.c (maintenance_print_symbols): Likewise.
12867 (maintenance_print_msymbols): Likewise.
12868
12869 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12870
12871 * NEWS: Add record Python bindings entry.
12872
12873 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12874
12875 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12876 py-record-full.o.
12877 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12878 * python/py-record-btrace.c, python/py-record-btrace.h,
12879 python/py-record-full.c, python/py-record-full.h: New file.
12880 * python/py-record.c: Add include for py-record-btrace.h and
12881 py-record-full.h.
12882 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12883 recpy_instruction_history, recpy_function_call_history, recpy_begin,
12884 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12885 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12886 New definition.
12887 (gdbpy_initialize_btrace): New export.
12888 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12889
12890 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12891
12892 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12893 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12894 * python/py-record.c: New file.
12895 * python/python-internal.h (gdbpy_start_recording,
12896 gdbpy_current_recording, gdpy_stop_recording,
12897 gdbpy_initialize_record): New export.
12898 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12899 (python_GdbMethods): Add gdbpy_start_recording,
12900 gdbpy_current_recording and gdbpy_stop_recording.
12901
12902 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12903
12904 * record-btrace.c (record_btrace_record_method): New function.
12905 (init_record_btrace_ops): Initialize to_record_method.
12906 * record-full.c (record_full_record_method): New function.
12907 (init_record_full_ops, init_record_full_core_ops): Add
12908 record_full_record_method.
12909 * record.h (enum record_method): New enum.
12910 * target-debug.h (target_debug_print_enum_record_method: New define.
12911 * target-delegates.c: Regenerate.
12912 * target.c (target_record_method): New function.
12913 * target.h: Include record.h.
12914 (struct target_ops) <to_record_method>: New field.
12915 (target_record_method): New export.
12916
12917 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12918
12919 * record.h (record_start, record_stop): New export.
12920 * record.c (record_start, record_stop): New function.
12921
12922 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12923
12924 * btrace.c (btrace_fetch): Copy function call segments pointer
12925 into a vector.
12926 (btrace_clear): Clear the vector.
12927 (btrace_find_insn_by_number): Use binary search to find the correct
12928 function call segment.
12929 * btrace.h (brace_fun_p): New typedef.
12930 (struct btrace_thread_info) <functions>: New field.
12931
12932 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12933
12934 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12935 * btrace.c (btrace_decode_error): ... here. New function.
12936 * btrace.h (btrace_decode_error): New export.
12937
12938 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12939
12940 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12941 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12942 btrace_find_insn_by_number): Remove special case for gaps.
12943 * btrace.h (btrace_insn_get_error): New export.
12944 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12945 * record-btrace.c (btrace_insn_history): Print number for gaps.
12946 (record_btrace_info, record_btrace_goto): Handle gaps.
12947
12948 2017-02-14 Tom Tromey <tom@tromey.com>
12949
12950 PR python/13598:
12951 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12952 event.
12953 * python/py-evts.c (gdbpy_initialize_py_events): Add
12954 before_prompt registry.
12955 * python/py-events.h (events_object) <before_prompt>: New field.
12956
12957 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
12958
12959 * btrace.c (ftrace_new_switch): Preserve up link and flags.
12960
12961 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
12962
12963 * symfile (_initialize_symfile): Add usage text to the load command's
12964 help text.
12965
12966 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
12967
12968 * utils.c (defaulted_query): Don't query on secondary UIs.
12969
12970 2017-02-10 Tom Tromey <tom@tromey.com>
12971
12972 * rust-lang.c (rust_get_disr_info): Remove unused variable.
12973
12974 2017-02-10 Tom Tromey <tom@tromey.com>
12975
12976 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12977 "cleanup" local.
12978 * python/py-type.c (typy_legacy_template_argument): Remove
12979 unnecessary "cleanup" local.
12980
12981 2017-02-10 Tom Tromey <tom@tromey.com>
12982
12983 * python/python.c (do_start_initialization): New function, from
12984 _initialize_python.
12985 (_initialize_python): Call do_start_initialization.
12986 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12987 goto.
12988
12989 2017-02-10 Tom Tromey <tom@tromey.com>
12990
12991 * python/py-prettyprint.c (pretty_print_one_value): Use
12992 gdbpy_ref.
12993
12994 2017-02-10 Tom Tromey <tom@tromey.com>
12995
12996 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12997 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12998 gdbpy_ref.
12999 * python/py-type.c (field_new): Use gdbpy_ref.
13000 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13001 gdbpy_ref.
13002 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13003 (py_free_pspace): Likewise.
13004 (pspace_to_pspace_object): Likewise.
13005 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13006 (py_free_objfile): Likewise.
13007 (objfile_to_objfile_object): Likewise.
13008 * python/py-inferior.c (delete_thread_object): Use
13009 gdbpy_ref.
13010 (infpy_read_memory): Likewise.
13011 (py_free_inferior): Likewise.
13012 * python/py-evtregistry.c (create_eventregistry_object): Use
13013 gdbpy_ref.
13014 * python/py-event.c (create_event_object): Use gdbpy_ref.
13015
13016 2017-02-10 Tom Tromey <tom@tromey.com>
13017
13018 * python/py-ref.h (gdbpy_ref_policy): Now a template.
13019 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13020 used.
13021 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13022 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13023 python/py-exitedevent.c, python/py-finishbreakpoint.c,
13024 python/py-framefilter.c, python/py-function.c,
13025 python/py-inferior.c, python/py-infevents.c,
13026 python/py-linetable.c, python/py-newobjfileevent.c,
13027 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13028 python/py-signalevent.c, python/py-stopevent.c,
13029 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13030 python/py-unwind.c, python/py-utils.c, python/py-value.c,
13031 python/py-varobj.c, python/py-xmethods.c, python/python.c,
13032 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13033
13034 2017-02-10 Tom Tromey <tom@tromey.com>
13035
13036 * ui-out.h (ui_out_emit_type): New class.
13037 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13038 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13039 and ui_out_emit_tuple.
13040 (enumerate_locals): Likewise.
13041 (py_mi_print_variables, py_print_locals, py_print_args): Use
13042 ui_out_emit_list.
13043 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13044 ui_out_emit_list.
13045 * common/gdb_optional.h: New file.
13046
13047 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13048
13049 * MAINTAINERS (Write After Approval): Update my e-mail address.
13050
13051 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13052
13053 PR gdb/21122
13054 * breakpoint.c (_initialize_breakpoint): Update the help description
13055 of the 'commands' command to indicate that it takes a list argument.
13056
13057 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
13058
13059 * interps.c (current_interp_set_logging): Remove "return".
13060
13061 2017-02-09 Gary Benson <gbenson@redhat.com>
13062
13063 * symtab.c (add_symtab_completions): Prevent NULL pointer
13064 dereference.
13065
13066 2017-02-08 Pedro Alves <palves@redhat.com>
13067
13068 * interps.c (interp::interp): Remove reference to quiet_p.
13069 (interp_set): Make static. Remove dead "Switching to" output
13070 code.
13071 (interp_quiet_p, interp_set_quiet): Delete.
13072 (interpreter_exec_cmd): Don't set the interpreter quiet.
13073 * interps.h (interp_quiet_p): Make static.
13074 (class interp) <quiet_p>: Remove field
13075
13076 2017-02-08 Jerome Guitton <guitton@adacore.com>
13077
13078 * cli/cli-decode.c (find_command_name_length): Make it extern.
13079 * cli/cli-decode.h (find_command_name_length): Declare.
13080 * cli/cli-script.c (command_name_equals, line_first_arg):
13081 New functions.
13082 (process_next_line): Use cli-decode to parse command names.
13083 (build_command_line): Make args a constant pointer.
13084
13085 2017-02-08 Jerome Guitton <guitton@adacore.com>
13086
13087 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13088 Remove case-insensitive search.
13089
13090 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
13091
13092 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13093 at the end of the line. Avoids an ARI warning.
13094
13095 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
13096
13097 * NEWS: Mention support for record/replay of Intel 64 rdrand and
13098 rdseed instructions.
13099 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13100
13101 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
13102
13103 PR tdep/20936
13104 Provide and use sparc32 and sparc64 target description XML files.
13105 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13106 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13107 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13108 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13109 * features/sparc/sparc32-solaris.xml: New file.
13110 * features/sparc/sparc64-solaris.xml: New file.
13111 * features/sparc/sparc32-solaris.c: Generated.
13112 * features/sparc/sparc64-solaris.c: Generated.
13113 * sparc-tdep.h: Account for differences in target descriptions.
13114 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13115 (sparc32_register_type): Use target provided registers.
13116 (validate_tdesc_registers): New function.
13117 (sparc32_gdbarch_init): Use tdesc_has_registers.
13118 Set pseudoregister functions.
13119 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13120 (sparc64_register_type): Use target provided registers.
13121 (sparc64_init_abi): Set pseudoregister functions.
13122
13123 2017-02-03 Tom Tromey <tom@tromey.com>
13124
13125 PR rust/21097:
13126 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13127 with a single member.
13128
13129 2017-02-03 Pedro Alves <palves@redhat.com>
13130
13131 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13132 (cli_interp_base::~cli_interp_base): New.
13133 (cli_interp): New struct.
13134 (as_cli_interp): Cast the interp itself to cli_interp.
13135 (cli_interpreter_pre_command_loop): Rename to ...
13136 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
13137 parameter.
13138 (cli_interpreter_init): Rename to ...
13139 (cli_interp::init): ... this. Remove 'self' parameter. Use
13140 boolean. Make extern.
13141 (cli_interpreter_resume): Rename to ...
13142 (cli_interp::resume): ... this. Remove 'data' parameter. Make
13143 extern.
13144 (cli_interpreter_suspend): Rename to ...
13145 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
13146 extern.
13147 (cli_interpreter_exec): Rename to ...
13148 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13149 extern.
13150 (cli_interpreter_supports_command_editing): Rename to ...
13151 (cli_interp_base::supports_command_editing): ... this. Remove
13152 'interp' parameter. Make extern.
13153 (cli_ui_out): Rename to ...
13154 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13155 Make extern.
13156 (cli_set_logging): Rename to ...
13157 (cli_interp_base::set_logging): ... this. Remove 'interp'
13158 parameter. Make extern.
13159 (cli_interp_procs): Delete.
13160 (cli_interp_factory): Adjust to use "new".
13161 * cli/cli-interp.h: Include "interps.h".
13162 (struct cli_interp_base): New struct.
13163 * interps.c (struct interp): Delete. Fields moved to interps.h.
13164 (interp_new): Delete.
13165 (interp::interp, interp::~interp): New.
13166 (interp_set): Use bool, and return void. Assume the interpreter
13167 has suspend, init and resume methods, and that the all return
13168 void.
13169 (set_top_level_interpreter): interp_set returns void.
13170 (interp_ui_out): Adapt.
13171 (current_interp_set_logging): Adapt.
13172 (interp_data): Delete.
13173 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13174 (interp_exec): Adapt.
13175 (top_level_interpreter_data): Delete.
13176 * interps.h (interp_init_ftype, interp_resume_ftype)
13177 (interp_suspend_ftype, interp_exec_ftype)
13178 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13179 (class interp): New.
13180 (interp_new): Delete.
13181 (interp_set): Now returns void. Use bool.
13182 (interp_data, top_level_interpreter_data): Delete.
13183 * mi/mi-common.h: Include interps.h.
13184 (class mi_interp): Inherit from interp. Define a ctor. Declare
13185 init, resume, suspect, exec, interp_ui_out, set_logging and
13186 pre_command_loop methods.
13187 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13188 (mi_interpreter_init): Rename to ...
13189 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13190 bool, return void and make extern. Adjust.
13191 (mi_interpreter_resume): ... Rename to ...
13192 (mi_interp::resume): ... this. Remove the 'data' parameter,
13193 return void and make extern. Adjust.
13194 (mi_interpreter_suspend): ... Rename to ...
13195 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13196 return void and make extern. Adjust.
13197 (mi_interpreter_exec): ... Rename to ...
13198 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13199 extern. Adjust.
13200 (mi_interpreter_pre_command_loop): ... Rename to ...
13201 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13202 parameter and make extern.
13203 (mi_on_normal_stop_1): Adjust.
13204 (mi_ui_out): Rename to ...
13205 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13206 parameter and make extern. Adjust.
13207 (mi_set_logging): Rename to ...
13208 (mi_interp::set_logging): ... this. Remove the 'interp'
13209 parameter and make extern. Adjust.
13210 (mi_interp_procs): Delete.
13211 (mi_interp_factory): Adjust to use 'new'.
13212 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13213 (mi_print_exception, mi_execute_command, mi_load_progress):
13214 Adjust.
13215 * tui/tui-interp.c (tui_interp): New class.
13216 (as_tui_interp): Return a tui_interp pointer.
13217 (tui_on_normal_stop, tui_on_signal_received)
13218 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13219 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13220 to use interp::interp_ui_out.
13221 (tui_init): Rename to ...
13222 (tui_interp::init): ... this. Remove the 'self' parameter, use
13223 bool, return void and make extern. Adjust.
13224 (tui_resume): Rename to ...
13225 (tui_interp::resume): ... this. Remove the 'data' parameter,
13226 return void and make extern. Adjust.
13227 (tui_suspend): Rename to ...
13228 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13229 return void and make extern. Adjust.
13230 (tui_ui_out): Rename to ...
13231 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13232 parameter, and make extern. Adjust.
13233 (tui_exec): Rename to ...
13234 (tui_interp::exec): ... this. Remove the 'data' parameter and
13235 make extern.
13236 (tui_interp_procs): Delete.
13237 (tui_interp_factory): Use "new".
13238
13239 2017-02-02 Tom Tromey <tom@tromey.com>
13240
13241 * rust-exp.y (ends_raw_string, space_then_number)
13242 (rust_identifier_start_p): Return bool.
13243 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13244 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13245 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13246 (rust_chartype_p): Return bool.
13247 (val_print_struct, rust_print_struct_def, rust_print_type):
13248 Update.
13249 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13250 Return bool.
13251
13252 2017-02-02 Tom Tromey <tom@tromey.com>
13253
13254 * rust-lang.c: Reindent.
13255
13256 2017-02-02 Tom Tromey <tom@tromey.com>
13257
13258 * rust-lang.h (rust_crate_for_block): Update.
13259 * rust-lang.c (rust_crate_for_block): Return std::string.
13260 (rust_get_disr_info): Use std:;string, not
13261 gdb::unique_xmalloc_ptr.
13262 * rust-exp.y (crate_name): Update.
13263
13264 2017-02-02 Pedro Alves <palves@redhat.com>
13265
13266 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13267 field out of gdb_disassembler_test and make it static.
13268
13269 2017-02-02 Pedro Alves <palves@redhat.com>
13270
13271 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13272 mi1_interp and mi_interp fields.
13273
13274 2017-02-02 Pedro Alves <palves@redhat.com>
13275
13276 * cli/cli-interp.c (struct saved_output_files, saved_output):
13277 Moved from cli/cli-logging.c.
13278 (cli_set_logging): New function.
13279 (cli_interp_procs): Install cli_set_logging.
13280 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13281 Declare.
13282 * cli/cli-logging.c (struct saved_output_files, saved_output):
13283 Moved to cli/cli-interp.c.
13284 (pop_output_files): Don't save outputs here.
13285 (make_logging_output): New function.
13286 (handle_redirections): Don't build tee nor save previous outputs
13287 here.
13288 * interps.c (current_interp_set_logging): Change prototype.
13289 Assume there's always a set_logging_proc method installed.
13290 * interps.h (interp_set_logging_ftype): Change prototype.
13291 (current_interp_set_logging): Change prototype and adjust comment.
13292 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13293 use make_logging_output.
13294 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13295 2017-02-02 Pedro Alves <palves@redhat.com>
13296
13297 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13298 from ...
13299 (set_logging_overwrite): ... here.
13300 (logging_no_redirect_file): Delete.
13301 (set_logging_redirect): Don't handle redirection on the fly.
13302 Instead warn that "logging off" / "logging on" is necessary.
13303 (pop_output_files): Delete references to logging_no_redirect_file.
13304 (show_logging_command): Always speak in terms of what will happen
13305 once logging is reenabled.
13306
13307 2017-02-02 Pedro Alves <palves@redhat.com>
13308
13309 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13310
13311 2017-02-02 Pedro Alves <palves@redhat.com>
13312
13313 * disasm.c (gdb_pretty_print_insn): Rename to ...
13314 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13315 Remove gdbarch parameter. Adapt to clear the object's buffers
13316 instead of allocating new buffers, and to print using the object's
13317 gdb_disassembler instead of calling gdb_print_insn.
13318 (dump_insns): Use gdb_pretty_print_disassembler.
13319 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13320 (gdb_pretty_print_disassembler): New class.
13321 * record-btrace.c (btrace_insn_history): Use
13322 gdb_pretty_print_disassembler.
13323
13324 2017-02-02 Pedro Alves <palves@redhat.com>
13325
13326 * ada-lang.c (type_as_string): Use string_file.
13327 * ada-valprint.c (ada_print_floating): Use string_file.
13328 * ada-varobj.c (ada_varobj_scalar_image)
13329 (ada_varobj_get_value_image): Use string_file.
13330 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13331 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13332 * breakpoint.c (update_inserted_breakpoint_locations)
13333 (insert_breakpoint_locations, reattach_breakpoints)
13334 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13335 (print_it_watchpoint): Use string_file.
13336 (save_breakpoints): Use stdio_file.
13337 * c-exp.y (oper): Use string_file.
13338 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13339 tee_file.
13340 (pop_output_files): Use delete.
13341 (handle_redirections): Use stdio_file and tee_file.
13342 * cli/cli-setshow.c (do_show_command): Use string_file.
13343 * compile/compile-c-support.c (c_compute_program): Use
13344 string_file.
13345 * compile/compile-c-symbols.c (generate_vla_size): Take a
13346 'string_file &' instead of a 'ui_file *'.
13347 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13348 of a 'ui_file *'. Use string_file.
13349 (generate_c_for_variable_locations): Take a 'string_file &'
13350 instead of a 'ui_file *'.
13351 * compile/compile-internal.h (generate_c_for_for_one_variable):
13352 Take a 'string_file &' instead of a 'ui_file *'.
13353 * compile/compile-loc2c.c (push, pushf, unary, binary)
13354 (print_label, pushf_register_address, pushf_register)
13355 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13356 'ui_file *'. Adjust.
13357 * compile/compile.c (compile_to_object): Use string_file.
13358 * compile/compile.h (compile_dwarf_expr_to_c)
13359 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13360 'ui_file *'.
13361 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13362 (replace_typedefs_qualified_name): Use string_file and
13363 obstack_copy0.
13364 * disasm.c (gdb_pretty_print_insn): Use string_file.
13365 (gdb_disassembly): Adjust reference the null_stream global.
13366 (do_ui_file_delete): Delete.
13367 (gdb_insn_length): Use null_stream.
13368 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13369 * dwarf2loc.c (dwarf2_compile_property_to_c)
13370 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13371 'string_file &' instead of a 'ui_file *'.
13372 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13373 * dwarf2read.c (do_ui_file_peek_last): Delete.
13374 (dwarf2_compute_name): Use string_file.
13375 * event-top.c (gdb_setup_readline): Use stdio_file.
13376 * gdbarch.sh (verify_gdbarch): Use string_file.
13377 * gdbtypes.c (safe_parse_type): Use null_stream.
13378 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13379 string_file.
13380 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13381 'string_file *' instead of a 'ui_file *'.
13382 (gdbscm_arch_disassemble): Use string_file.
13383 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13384 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13385 inherits from ui_file.
13386 (ioscm_file_port_delete, ioscm_file_port_rewind)
13387 (ioscm_file_port_put): Delete.
13388 (ioscm_file_port_write): Rename to ...
13389 (ioscm_file_port::write): ... this. Remove file_port_magic
13390 checks.
13391 (ioscm_file_port_new): Delete.
13392 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13393 ui_file_up.
13394 * guile/scm-type.c (tyscm_type_name): Use string_file.
13395 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13396 Use string_file.
13397 * infcmd.c (print_return_value_1): Use string_file.
13398 * infrun.c (print_target_wait_results): Use string_file.
13399 * language.c (add_language): Use string_file.
13400 * location.c (explicit_to_string_internal): Use string_file.
13401 * main.c (captured_main_1): Use null_file.
13402 * maint.c (maintenance_print_architecture): Use stdio_file.
13403 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13404 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13405 event_channel>: Change type to mi_console_file pointer.
13406 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13407 (mi_console_file_delete): Delete.
13408 (struct mi_console_file): Delete.
13409 (mi_console_file_magic): Delete.
13410 (mi_console_file_new): Delete.
13411 (mi_console_file::mi_console_file): New.
13412 (mi_console_file_delete): Delete.
13413 (mi_console_file_fputs): Delete.
13414 (mi_console_file::write): New.
13415 (mi_console_raw_packet): Delete.
13416 (mi_console_file::flush): New.
13417 (mi_console_file_flush): Delete.
13418 (mi_console_set_raw): Rename to ...
13419 (mi_console_file::set_raw): ... this.
13420 * mi/mi-console.h (class mi_console_file): New class.
13421 (mi_console_file_new, mi_console_set_raw): Delete.
13422 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13423 (mi_set_logging): Use delete and tee_file. Adjust.
13424 * mi/mi-main.c (output_register): Use string_file.
13425 (mi_cmd_data_evaluate_expression): Use string_file.
13426 (mi_cmd_data_read_memory): Use string_file.
13427 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13428 * mi/mi-out.c (mi_ui_out::main_stream): New.
13429 (mi_ui_out::rewind): Use main_stream and
13430 string_file.
13431 (mi_ui_out::put): Use main_stream and string_file.
13432 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13433 Allocate a 'string_file' instead.
13434 (mi_out_new): Don't allocate a mem_fileopen stream here.
13435 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13436 (mi_ui_out::main_stream): Declare method.
13437 * printcmd.c (eval_command): Use string_file.
13438 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13439 * python/py-arch.c (archpy_disassemble): Use string_file.
13440 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13441 * python/py-frame.c (frapy_str): Use string_file.
13442 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13443 Use string_file.
13444 * python/py-type.c (typy_str): Use string_file.
13445 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13446 * python/py-value.c (valpy_str): Use string_file.
13447 * record-btrace.c (btrace_insn_history): Use string_file.
13448 * regcache.c (regcache_print): Use stdio_file.
13449 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13450 * remote.c (escape_buffer): Use string_file.
13451 * rust-lang.c (rust_get_disr_info): Use string_file.
13452 * serial.c (serial_open_ops_1): Use stdio_file.
13453 (do_serial_close): Use delete.
13454 * stack.c (print_frame_arg): Use string_file.
13455 (print_frame_args): Remove local mem_fileopen stream, not used.
13456 (print_frame): Use string_file.
13457 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13458 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13459 Take a 'string_file *' instead of a 'ui_file *'.
13460 * top.c (new_ui): Use stdio_file and stderr_file.
13461 (free_ui): Use delete.
13462 (execute_command_to_string): Use string_file.
13463 (quit_confirm): Use string_file.
13464 * tracepoint.c (collection_list::append_exp): Use string_file.
13465 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13466 * tui/tui-file.c: Don't include "ui-file.h".
13467 (enum streamtype, struct tui_stream): Delete.
13468 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13469 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13470 (tui_file::tui_file): New method.
13471 (tui_file_fputs): Delete.
13472 (tui_file_get_strbuf): Delete.
13473 (tui_file::puts): New method.
13474 (tui_file_adjust_strbuf): Delete.
13475 (tui_file_flush): Delete.
13476 (tui_file::flush): New method.
13477 * tui/tui-file.h: Tweak intro comment.
13478 Include ui-file.h.
13479 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13480 (tui_file_adjust_strbuf): Delete declarations.
13481 (class tui_file): New class.
13482 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13483 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13484 (tui_register_format): Use string_stream.
13485 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13486 (tui_get_function_from_frame): Use string_file.
13487 * typeprint.c (type_to_string): Use string_file.
13488 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13489 (null_stream): New global.
13490 (ui_file_delete): Delete.
13491 (ui_file::ui_file): New.
13492 (null_file_isatty): Delete.
13493 (ui_file::~ui_file): New.
13494 (null_file_rewind): Delete.
13495 (ui_file::printf): New.
13496 (null_file_put): Delete.
13497 (null_file_flush): Delete.
13498 (ui_file::putstr): New.
13499 (null_file_write): Delete.
13500 (ui_file::putstrn): New.
13501 (null_file_read): Delete.
13502 (ui_file::putc): New.
13503 (null_file_fputs): Delete.
13504 (null_file_write_async_safe): Delete.
13505 (ui_file::vprintf): New.
13506 (null_file_delete): Delete.
13507 (null_file::write): New.
13508 (null_file_fseek): Delete.
13509 (null_file::puts): New.
13510 (ui_file_data): Delete.
13511 (null_file::write_async_safe): New.
13512 (gdb_flush, ui_file_isatty): Adjust.
13513 (ui_file_put, ui_file_rewind): Delete.
13514 (ui_file_write): Adjust.
13515 (ui_file_write_for_put): Delete.
13516 (ui_file_write_async_safe, ui_file_read): Adjust.
13517 (ui_file_fseek): Delete.
13518 (fputs_unfiltered): Adjust.
13519 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13520 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13521 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13522 (set_ui_file_data): Delete.
13523 (string_file::~string_file, string_file::write)
13524 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13525 (do_ui_file_as_string, ui_file_as_string): Delete.
13526 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13527 (struct mem_file): Delete.
13528 (mem_file_new): Delete.
13529 (stdio_file::stdio_file): New.
13530 (mem_file_delete): Delete.
13531 (stdio_file::stdio_file): New.
13532 (mem_fileopen): Delete.
13533 (stdio_file::~stdio_file): New.
13534 (mem_file_rewind): Delete.
13535 (stdio_file::set_stream): New.
13536 (mem_file_put): Delete.
13537 (stdio_file::open): New.
13538 (mem_file_write): Delete.
13539 (stdio_file_magic, struct stdio_file): Delete.
13540 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13541 (stdio_file::flush): New.
13542 (stdio_file_read): Rename to ...
13543 (stdio_file::read): ... this. Adjust.
13544 (stdio_file_write): Rename to ...
13545 (stdio_file::write): ... this. Adjust.
13546 (stdio_file_write_async_safe): Rename to ...
13547 (stdio_file::write_async_safe) ... this. Adjust.
13548 (stdio_file_fputs): Rename to ...
13549 (stdio_file::puts) ... this. Adjust.
13550 (stdio_file_isatty): Delete.
13551 (stdio_file_fseek): Delete.
13552 (stdio_file::isatty): New.
13553 (stderr_file_write): Rename to ...
13554 (stderr_file::write) ... this. Adjust.
13555 (stderr_file_fputs): Rename to ...
13556 (stderr_file::puts) ... this. Adjust.
13557 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13558 (stderr_file::stderr_file): New.
13559 (tee_file_magic): Delete.
13560 (struct tee_file): Delete.
13561 (tee_file::tee_file): New.
13562 (tee_file_new): Delete.
13563 (tee_file::~tee_file): New.
13564 (tee_file_delete): Delete.
13565 (tee_file_flush): Rename to ...
13566 (tee_file::flush): ... this. Adjust.
13567 (tee_file_write): Rename to ...
13568 (tee_file::write): ... this. Adjust.
13569 (tee_file::write_async_safe): New.
13570 (tee_file_fputs): Rename to ...
13571 (tee_file::puts): ... this. Adjust.
13572 (tee_file_isatty): Rename to ...
13573 (tee_file::isatty): ... this. Adjust.
13574 * ui-file.h (struct obstack, struct ui_file): Don't
13575 forward-declare.
13576 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13577 (ui_file_write_ftype)
13578 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13579 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13580 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13581 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13582 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13583 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13584 (set_ui_file_fseek): Delete.
13585 (ui_file_data, ui_file_delete, ui_file_rewind)
13586 (struct ui_file): New.
13587 (ui_file_up): New.
13588 (class null_file): New.
13589 (null_stream): Declare.
13590 (ui_file_write_for_put, ui_file_put): Delete.
13591 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13592 Delete.
13593 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13594 (gdb_fopen, tee_file_new): Delete.
13595 (struct string_file): New.
13596 (struct stdio_file): New.
13597 (stdio_file_up): New.
13598 (struct stderr_file): New.
13599 (class tee_file): New.
13600 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13601 of a 'ui_file *'. Adjust.
13602 * ui-out.h (class ui_out) <field_stream>: Likewise.
13603 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13604 (null_stream): Delete.
13605 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13606 Adjust.
13607 * utils.h (struct ui_file): Delete forward declaration..
13608 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13609 (error_stream): Take a 'string_file &' instead of a
13610 'ui_file *'.
13611 * varobj.c (varobj_value_get_print_value): Use string_file.
13612 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13613 * gdbarch.c: Regenerate.
13614
13615 2017-02-02 Pedro Alves <palves@redhat.com>
13616
13617 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13618 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13619 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13620 Adjust to call gdb_print_insn instead of
13621 gdb_disassembler::print_insn.
13622 (dump_insns, do_mixed_source_and_assembly_deprecated)
13623 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13624 'gdbarch' parameter. Remove gdb_disassembler parameter.
13625 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13626 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13627 declaration.
13628 (gdb_pretty_print_insn): Re-add declaration.
13629 * record-btrace.c (btrace_insn_history): Don't allocate a
13630 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13631
13632 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13633
13634 * disasm.h (gdb_disassembly): Remove file_string parameter.
13635 * disasm.c (gdb_disassembly): Likewise.
13636 * cli/cli-cmds.c (print_disassembly): Adapt.
13637 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13638 * stack.c (do_gdb_disassembly): Likewise.
13639
13640 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13641
13642 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13643 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13644 targets. And if the implicit value is longer than needed, extract
13645 the first bytes instead of the "least significant" ones.
13646
13647 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13648
13649 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13650 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13651 (btrace_fetch): Assert can_access_registers_ptid.
13652 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13653 validate_registers_access.
13654
13655 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13656
13657 * gdbthread.h (can_access_registers_ptid): New.
13658 * thread.c (can_access_registers_ptid): New.
13659
13660 2017-02-01 Pedro Alves <palves@redhat.com>
13661
13662 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13663
13664 2017-01-31 Pedro Alves <palves@redhat.com>
13665
13666 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13667 Fix typos.
13668
13669 2017-01-31 Pedro Alves <palves@redhat.com>
13670
13671 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13672 not used.
13673
13674 2017-01-31 Pedro Alves <palves@redhat.com>
13675
13676 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13677
13678 2017-01-31 Pedro Alves <palves@redhat.com>
13679
13680 * common/scoped_restore.h
13681 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13682 change the value's parameter type to T2.
13683 (make_scoped_restore): Likewise.
13684
13685 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13686 Richard Henderson <rth@redhat.com>
13687
13688 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13689 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13690 GS_BASE for older kernels.
13691 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13692 GS_BASE for older kernels.
13693 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13694 and GS_BASE to the offset table.
13695 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13696 system register group.
13697 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13698 for older kernels.
13699 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13700 amd64 ABI.
13701 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13702 AMD64_GSBASE_REGNUM.
13703 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13704 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13705 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13706 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13707 i386/64bit-segments.xml in those rules.
13708 * features/i386/64bit-segments.xml: New file.
13709 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13710 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13711 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13712 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13713 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13714 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13715 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13716 * features/i386/amd64-avx-linux.c: Regenerated.
13717 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13718 * features/i386/amd64-avx-mpx.c: Regenerated.
13719 * features/i386/amd64-avx512-linux.c: Regenerated.
13720 * features/i386/amd64-linux.c: Regenerated.
13721 * features/i386/amd64-mpx-linux.c: Regenerated.
13722 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13723 * features/i386/i386-avx-mpx.c: Regenerated.
13724 * features/i386/x32-avx-linux.c: Regenerated.
13725 * features/i386/x32-avx512-linux.c: Regenerated.
13726 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13727 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13728 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13729 * regformats/i386/amd64-linux.dat: Regenerated.
13730 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13731 * regformats/i386/x32-avx-linux.dat: Regenerated.
13732 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13733 * regformats/i386/x32-linux.dat: Regenerated.
13734
13735 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13736
13737 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13738 Set to AMD64_NUM_REGS.
13739
13740 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13741
13742 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13743 that checks validity of a register number.
13744
13745 2017-01-27 Kees Cook <keescook@google.com>
13746
13747 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13748 fetch_fpregs if target has fpa registers.
13749 (arm_linux_store_inferior_registers): Call store_fpregs if target
13750 has fpa registers.
13751
13752 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13753
13754 * cris-tdep.c (cris_gdbarch_init): Remove check for
13755 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13756
13757 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13758
13759 * corelow.c (get_core_register_section): Check for regset
13760 existence before checking for REGSET_VARIABLE_SIZE.
13761
13762 2017-01-26 Yao Qi <yao.qi@linaro.org>
13763 Pedro Alves <palves@redhat.com>
13764
13765 PR gdb/20939
13766 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13767 call memory_error, save memaddr instead.
13768 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13769 negative, cal memory_error.
13770 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13771
13772 2017-01-26 Yao Qi <yao.qi@linaro.org>
13773
13774 * disasm-selftests.c (memory_error_test): New function.
13775 (_initialize_disasm_selftests): Register memory_error_test.
13776
13777 2017-01-26 Yao Qi <yao.qi@linaro.org>
13778
13779 * Makefile.in (SFILES): Add disasm-selftests.c and
13780 selftest-arch.c.
13781 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13782 * disasm-selftests.c: New file.
13783 * selftest-arch.c: New file.
13784 * selftest-arch.h: New file.
13785
13786 2017-01-26 Yao Qi <yao.qi@linaro.org>
13787
13788 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13789 to bfd_arch_mep. Don't return 0 if section is not
13790 found. Call print_insn_mep.
13791
13792 2017-01-26 Pedro Alves <palves@redhat.com>
13793 Yao Qi <yao.qi@linaro.org>
13794
13795 * arm-tdep.c: Include "disasm.h".
13796 (gdb_print_insn_arm): Update code to get gdbarch.
13797 * disasm.c (dis_asm_read_memory): Change it to
13798 gdb_disassembler::dis_asm_read_memory.
13799 (dis_asm_memory_error): Likewise.
13800 (dis_asm_print_address): Likewise.
13801 (gdb_pretty_print_insn): Change it to
13802 gdb_disassembler::pretty_print_insn.
13803 (dump_insns): Add one argument gdb_disassemlber. All
13804 callers updated.
13805 (do_mixed_source_and_assembly_deprecated): Likewise.
13806 (do_mixed_source_and_assembly): Likewise.
13807 (do_assembly_only): Likewise.
13808 (gdb_disassembler::gdb_disassembler): New.
13809 (gdb_disassembler::print_insn): New.
13810 * disasm.h (class gdb_disassembler): New.
13811 (gdb_pretty_print_insn): Remove declaration.
13812 (gdb_disassemble_info): Likewise.
13813 * guile/scm-disasm.c (class gdbscm_disassembler): New.
13814 (gdbscm_disasm_read_memory_worker): Update.
13815 (gdbscm_disasm_read_memory): Update.
13816 (gdbscm_disasm_memory_error): Remove.
13817 (gdbscm_disasm_print_address): Remove.
13818 (gdbscm_disassembler::gdbscm_disassembler): New.
13819 (gdbscm_print_insn_from_port): Update.
13820 * mips-tdep.c: Include disasm.h.
13821 (gdb_print_insn_mips): Update code to get gdbarch.
13822 * record-btrace.c (btrace_insn_history): Update.
13823 * spu-tdep.c: Include disasm.h.
13824 (struct spu_dis_asm_data): Remove.
13825 (struct spu_dis_asm_info): New.
13826 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13827 SPU id.
13828 (gdb_print_insn_spu): Cast disassemble_info to
13829 spu_dis_asm_info.
13830
13831 2017-01-26 Yao Qi <yao.qi@linaro.org>
13832
13833 * disasm.c (do_ui_file_delete): Delete.
13834 (gdb_insn_length): Move code creating stream to ...
13835 * utils.c (null_stream): ... here. New function.
13836 * utils.h (null_stream): Declare.
13837
13838 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
13839
13840 * python/py-inferior.c (find_thread_object): Return directly
13841 from the loop. Remove "found" variable.
13842
13843 2017-01-21 Joel Brobecker <brobecker@adacore.com>
13844
13845 GDB 7.12.1 released.
13846
13847 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13848
13849 * python/py-function.c (fnpy_call): Reorder declarations to have
13850 the gdbpy_enter object declared first.
13851 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13852
13853 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13854
13855 PR python/21068
13856 * python/python-internal.h (PyMem_RawMalloc): Define for
13857 Python < 3.4.
13858 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13859 PyMem_RawMalloc instead of PyMem_Malloc.
13860
13861 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
13862 Luis Machado <lgustavo@codesourcery.com>
13863
13864 * NEWS (New commands): Mention flash-erase.
13865 (New MI commands): Mention target-flash-erase.
13866 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13867 command.
13868 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13869 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13870 * target.c (flash_erase_command): New function.
13871 (initialize_targets): Add new flash-erase command.
13872 * target.h (flash_erase_command): New declaration.
13873
13874 2017-01-20 Joel Brobecker <brobecker@adacore.com>
13875
13876 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13877 HAVE_SYS_PROCFS_H is defined.
13878
13879 2017-01-18 Alan Hayward <alan.hayward@arm.com>
13880
13881 * remote.c (struct cached_reg): Change data into a pointer.
13882 * (stop_reply_dtr): Free data pointers before deleting vector.
13883 (process_stop_reply): Likewise.
13884 (remote_parse_stop_reply): Allocate space for data
13885
13886 2017-01-18 Alan Hayward <alan.hayward@arm.com>
13887
13888 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13889 MAX_REGISTER_SIZE.
13890 (amd64_pseudo_register_read_value): Likewise.
13891 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13892 (store_register_using_P): Likewise.
13893 * regcache.c (regcache_xfer_part): Likewise.
13894
13895 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
13896
13897 Split real and pseudo registers.
13898 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13899 (sparc32_pseudo_regnum): New enum.
13900 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13901 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13902 (SPARC32_CP0_REGISTERS): New macro.
13903 (sparc32_pseudo_register_name): New function.
13904 (sparc32_register_name): Use sparc32_pseudo_register_name.
13905 (sparc32_pseudo_register_type): New function.
13906 (sparc32_register_type): Use sparc32_pseudo_register_type.
13907 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13908 pseudo register numbers.
13909 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13910 (SPARC64_CP0_REGISTERS): New macro.
13911 (sparc64_pseudo_register_name): New function.
13912 (sparc64_register_name): Use sparc64_pseudo_register_name.
13913 (sparc64_pseudo_register_type): New function.
13914 (sparc64_register_type): Use sparc64_pseudo_register_type.
13915 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13916 pseudo register numbers.
13917 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13918 sparc64_store_arguments): Handle pseudo register numbers.
13919
13920 2017-01-13 Yao Qi <yao.qi@linaro.org>
13921
13922 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13923 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13924 output.
13925 (getpkt_or_notif_sane_1): Likewise.
13926
13927 2017-01-13 Yao Qi <yao.qi@linaro.org>
13928
13929 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13930 of CC. Pass "-x c++-header" instead of "-x c".
13931
13932 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13933
13934 * remote.c (remote_can_async_p): Update comment.
13935
13936 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13937
13938 * linux-nat.c (linux_nat_can_async_p): Update comment.
13939
13940 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13941
13942 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13943
13944 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
13945
13946 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13947
13948 2017-01-10 Tom Tromey <tom@tromey.com>
13949
13950 * python/py-type.c (typy_legacy_template_argument): Update.
13951 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13952 ~demangle_parse_info): Declare new members.
13953 (cp_demangled_name_to_comp): Return unique_ptr.
13954 (cp_demangled_name_parse_free)
13955 (make_cleanup_cp_demangled_name_parse_free)
13956 (cp_new_demangle_parse_info): Remove.
13957 * cp-support.c (do_demangled_name_parse_free_cleanup)
13958 (make_cleanup_cp_demangled_name_parse_free): Remove.
13959 (inspect_type, cp_canonicalize_string_full)
13960 (cp_canonicalize_string): Update.
13961 (mangled_name_to_comp): Change return type.
13962 (cp_class_name_from_physname, method_name_from_physname)
13963 (cp_func_name, cp_remove_params): Update.
13964 * cp-name-parser.y (demangle_parse_info): New constructor, from
13965 cp_new_demangle_parse_info.
13966 (~demangle_parse_info): New destructor, from
13967 cp_demangled_name_parse_free.
13968 (cp_merge_demangle_parse_infos): Update.
13969 (cp_demangled_name_to_comp): Change return type.
13970
13971 2017-01-10 Tom Tromey <tom@tromey.com>
13972
13973 * top.c (prevent_dont_repeat): Change return type.
13974 * python/python.c (execute_gdb_command): Use std::string.
13975 Update.
13976 * guile/guile.c (gdbscm_execute_gdb_command): Update.
13977 * command.h (prevent_dont_repeat): Change return type.
13978 * breakpoint.c (bpstat_do_actions_1): Update.
13979
13980 2017-01-10 Tom Tromey <tom@tromey.com>
13981
13982 * value.h (scoped_value_mark::~scoped_value_mark): Call
13983 free_to_mark.
13984 (scoped_value_mark::free_to_mark): New method.
13985 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13986 scoped_value_mark.
13987
13988 2017-01-10 Tom Tromey <tom@tromey.com>
13989
13990 * python/py-value.c (valpy_dereference, valpy_referenced_value)
13991 (valpy_reference_value, valpy_const_value, valpy_get_address)
13992 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13993 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13994 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13995 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13996 scoped_value_mark.
13997 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13998 * value.h (scoped_value_mark): New class.
13999
14000 2017-01-10 Tom Tromey <tom@tromey.com>
14001
14002 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14003 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14004 * psymtab.c (discard_psymtabs_upto): Remove.
14005 (make_cleanup_discard_psymtabs): Remove.
14006 (struct psymtab_state): Remove.
14007
14008 2017-01-10 Tom Tromey <tom@tromey.com>
14009
14010 * record-full.c (record_full_save_cleanups): Remove.
14011 (record_full_save): Use gdb::unlinker.
14012 * gcore.c (do_bfd_delete_cleanup): Remove.
14013 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
14014 cleanups.
14015 * dwarf2read.c (unlink_if_set): Remove.
14016 (write_psymtabs_to_index): Use gdb::unlinker.
14017 * common/gdb_unlinker.h: New file.
14018
14019 2017-01-10 Tom Tromey <tom@tromey.com>
14020
14021 * windows-tdep.c (windows_xfer_shared_library): Update.
14022 * windows-nat.c (windows_make_so): Update.
14023 * utils.h (make_cleanup_bfd_unref): Remove.
14024 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14025 * symfile.h (symfile_bfd_open)
14026 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14027 * symfile.c (read_symbols, symbol_file_add)
14028 (separate_debug_file_exists): Update.
14029 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14030 (generic_load, reread_symbols): Update.
14031 * symfile-mem.c (symbol_file_add_from_memory): Update.
14032 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14033 (spu_symbol_file_add_from_memory): Update.
14034 * solist.h (struct target_so_ops) <bfd_open>: Return
14035 gdb_bfd_ref_ptr.
14036 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14037 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14038 gdb_bfd_ref_ptr.
14039 (solib_map_sections, reload_shared_libraries_1): Update.
14040 * solib-svr4.c (enable_break): Update.
14041 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14042 * solib-frv.c (enable_break2): Update.
14043 * solib-dsbt.c (enable_break): Update.
14044 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14045 gdb_bfd_ref_ptr.
14046 (darwin_solib_get_all_image_info_addr_at_init): Update.
14047 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14048 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14049 * record-full.c (record_full_save): Update.
14050 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14051 * procfs.c (insert_dbx_link_bpt_in_file): Update.
14052 * minidebug.c (find_separate_debug_file_in_section): Return
14053 gdb_bfd_ref_ptr.
14054 * machoread.c (macho_add_oso_symfile): Change abfd to
14055 gdb_bfd_ref_ptr.
14056 (macho_symfile_read_all_oso): Update.
14057 (macho_check_dsym): Return gdb_bfd_ref_ptr.
14058 (macho_symfile_read): Update.
14059 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14060 (jit_bfd_try_read_symtab): Update.
14061 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14062 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14063 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14064 gdb_bfd_ref_ptr.
14065 (gdb_bfd_ref_policy): New struct.
14066 (gdb_bfd_ref_ptr): New typedef.
14067 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14068 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14069 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14070 gdb_bfd_ref_ptr.
14071 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14072 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14073 (gcore_command): Update.
14074 * exec.c (exec_file_attach): Update.
14075 * elfread.c (elf_symfile_read): Update.
14076 * dwarf2read.c (dwarf2_get_dwz_file): Update.
14077 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14078 (open_and_init_dwo_file): Update.
14079 (open_dwp_file): Return gdb_bfd_ref_ptr.
14080 (open_and_init_dwp_file): Update.
14081 * corelow.c (core_open): Update.
14082 * compile/compile-object-load.c (compile_object_load): Update.
14083 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14084 * coffread.c (coff_symfile_read): Update.
14085 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14086 gdb_bfd_ref_ptr. Rename.
14087 (dump_bfd_file, restore_command): Update.
14088 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14089 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14090 (find_separate_debug_file_by_buildid): Update.
14091
14092 2017-01-10 Tom Tromey <tom@tromey.com>
14093
14094 * common/gdb_ref_ptr.h: New file.
14095 * python/py-ref.h (struct gdbpy_ref_policy): New.
14096 (gdbpy_ref): Now a typedef.
14097
14098 2017-01-10 Tom Tromey <tom@tromey.com>
14099
14100 * utils.h (make_cleanup_htab_delete): Don't declare.
14101 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14102 Remove.
14103 * linespec.c (decode_compound_collector): Add constructor,
14104 destructor.
14105 (lookup_prefix_sym): Remove cleanup.
14106 (symtab_collector): Add constructor, destructor.
14107 (collect_symtabs_from_filename): Remove cleanup.
14108 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14109 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14110 Use htab_up.
14111 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14112 * dwarf2read.c (dw2_expand_symtabs_matching)
14113 (dw2_map_symbol_filenames, dwarf_decode_macros)
14114 (write_psymtabs_to_index): Use htab_up.
14115 * dwarf2loc.c (func_verify_no_selftailcall)
14116 (call_site_find_chain_1, func_verify_no_selftailcall)
14117 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14118 std::vector, gdb::unique_xmalloc_ptr.
14119 (call_sitep): Remove typedef.
14120 (dwarf2_locexpr_baton_eval): Remove unused variable.
14121
14122 2017-01-10 Tom Tromey <tom@tromey.com>
14123
14124 * python/python-internal.h (make_cleanup_py_decref)
14125 (make_cleanup_py_xdecref): Don't declare.
14126 * python/py-utils.c (py_decref, make_cleanup_py_decref)
14127 (py_xdecref, make_cleanup_py_xdecref): Remove.
14128
14129 2017-01-10 Tom Tromey <tom@tromey.com>
14130
14131 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14132 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14133
14134 2017-01-10 Tom Tromey <tom@tromey.com>
14135
14136 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14137
14138 2017-01-10 Tom Tromey <tom@tromey.com>
14139
14140 * python/py-utils.c (unicode_to_encoded_string)
14141 (python_string_to_target_string)
14142 (python_string_to_target_python_string)
14143 (python_string_to_host_string, gdbpy_obj_to_string)
14144 (get_addr_from_python): Use gdbpy_ref.
14145
14146 2017-01-10 Tom Tromey <tom@tromey.com>
14147
14148 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14149 gdbpy_ref.
14150
14151 2017-01-10 Tom Tromey <tom@tromey.com>
14152
14153 * python/python.c (eval_python_command, gdbpy_decode_line)
14154 (gdbpy_run_events, gdbpy_start_type_printers)
14155 (gdbpy_apply_type_printers): Use gdbpy_ref.
14156
14157 2017-01-10 Tom Tromey <tom@tromey.com>
14158
14159 * python/py-param.c (get_doc_string, compute_enum_values): Use
14160 gdbpy_ref.
14161
14162 2017-01-10 Tom Tromey <tom@tromey.com>
14163
14164 * python/py-inferior.c (find_thread_object, build_inferior_list):
14165 Use gdbpy_ref.
14166
14167 2017-01-10 Tom Tromey <tom@tromey.com>
14168
14169 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14170
14171 2017-01-10 Tom Tromey <tom@tromey.com>
14172
14173 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14174 gdbpy_ref.
14175
14176 2017-01-10 Tom Tromey <tom@tromey.com>
14177
14178 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14179 extra incref.
14180 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14181 Use gdbpy_ref.
14182
14183 2017-01-10 Tom Tromey <tom@tromey.com>
14184
14185 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14186 gdbpy_ref.
14187
14188 2017-01-10 Tom Tromey <tom@tromey.com>
14189
14190 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14191 decref results of PyArg_ParseTupleAndKeywords.
14192
14193 2017-01-10 Tom Tromey <tom@tromey.com>
14194
14195 * python/python.c (python_run_simple_file): Use
14196 unique_xmalloc_ptr, gdbpy_ref.
14197
14198 2017-01-10 Tom Tromey <tom@tromey.com>
14199
14200 * python/py-prettyprint.c (print_stack_unless_memory_error)
14201 (print_string_repr, print_children): Use gdbpy_ref.
14202 (dummy_python_frame): New class.
14203 (dummy_python_frame::dummy_python_frame): Rename from
14204 push_dummy_python_frame.
14205 (py_restore_tstate): Remove.
14206
14207 2017-01-10 Tom Tromey <tom@tromey.com>
14208
14209 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14210
14211 2017-01-10 Tom Tromey <tom@tromey.com>
14212
14213 * python/python.c (ensure_python_env, restore_python_env):
14214 Remove.
14215 * python/python-internal.h (ensure_python_env): Don't declare.
14216 * varobj.h (varobj_ensure_python_env): Don't declare.
14217 * varobj.c (varobj_ensure_python_env): Remove.
14218
14219 2017-01-10 Tom Tromey <tom@tromey.com>
14220
14221 * varobj.c (varobj_value_get_print_value): Use
14222 gdbpy_enter_varobj.
14223
14224 2017-01-10 Tom Tromey <tom@tromey.com>
14225
14226 * python/py-prettyprint.c (print_string_repr, print_children):
14227 Update.
14228 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14229 of "encoding".
14230 * varobj.c (varobj_value_get_print_value): Update.
14231 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14232
14233 2017-01-10 Tom Tromey <tom@tromey.com>
14234
14235 * varobj.c (varobj_get_display_hint)
14236 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14237 (varobj_set_visualizer, free_variable): Use
14238 gdbpy_enter_varobj.
14239
14240 2017-01-10 Tom Tromey <tom@tromey.com>
14241
14242 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14243 (do_finish_initialization): New function. Use gdbpy_ref.
14244 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14245 do_finish_initialization.
14246
14247 2017-01-10 Tom Tromey <tom@tromey.com>
14248
14249 * python/py-param.c (get_set_value, get_show_value): Use
14250 gdbpy_enter, gdbpy_ref.
14251
14252 2017-01-10 Tom Tromey <tom@tromey.com>
14253
14254 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14255
14256 2017-01-10 Tom Tromey <tom@tromey.com>
14257
14258 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14259
14260 2017-01-10 Tom Tromey <tom@tromey.com>
14261
14262 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14263 Use gdbpy_enter_varobj.
14264
14265 2017-01-10 Tom Tromey <tom@tromey.com>
14266
14267 * varobj.c (gdbpy_enter_varobj): New constructor.
14268 * python/python-internal.h (gdbpy_enter_varobj): New class.
14269 * python/py-varobj.c (py_varobj_get_iterator): Use
14270 gdbpy_enter_varobj.
14271
14272 2017-01-10 Tom Tromey <tom@tromey.com>
14273
14274 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14275 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14276 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14277 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14278 unique_xmalloc_ptr.
14279 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14280
14281 2017-01-10 Tom Tromey <tom@tromey.com>
14282
14283 * python/py-xmethods.c (invoke_match_method): Use
14284 gdbpy_ref.
14285
14286 2017-01-10 Tom Tromey <tom@tromey.com>
14287
14288 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14289 gdbpy_enter, gdbpy_ref.
14290
14291 2017-01-10 Tom Tromey <tom@tromey.com>
14292
14293 * python/python.c (python_interactive_command): Use gdbpy_enter.
14294
14295 2017-01-10 Tom Tromey <tom@tromey.com>
14296
14297 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14298 gdbpy_ref.
14299
14300 2017-01-10 Tom Tromey <tom@tromey.com>
14301
14302 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14303 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14304
14305 2017-01-10 Tom Tromey <tom@tromey.com>
14306
14307 * utils.h (htab_deleter): New struct.
14308 (htab_up): New typedef.
14309 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14310 gdbpy_enter, gdbpy_ref, htab_up.
14311
14312 2017-01-10 Tom Tromey <tom@tromey.com>
14313
14314 * python/py-unwind.c (pending_frame_invalidate): Remove.
14315 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14316
14317 2017-01-10 Tom Tromey <tom@tromey.com>
14318
14319 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14320 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14321
14322 2017-01-10 Tom Tromey <tom@tromey.com>
14323
14324 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14325
14326 2017-01-10 Tom Tromey <tom@tromey.com>
14327
14328 * python/python.c (gdbpy_eval_from_control_command)
14329 (gdbpy_source_script, gdbpy_run_events)
14330 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14331 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14332 gdbpy_enter.
14333
14334 2017-01-10 Tom Tromey <tom@tromey.com>
14335
14336 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14337
14338 2017-01-10 Tom Tromey <tom@tromey.com>
14339
14340 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14341
14342 2017-01-10 Tom Tromey <tom@tromey.com>
14343
14344 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14345 (python_on_inferior_call_pre, python_on_inferior_call_post)
14346 (python_on_memory_change, python_on_register_change)
14347 (python_inferior_exit, python_new_objfile, add_thread_object)
14348 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14349
14350 2017-01-10 Tom Tromey <tom@tromey.com>
14351
14352 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14353 (bpfinishpy_handle_exit): Use gdbpy_enter.
14354
14355 2017-01-10 Tom Tromey <tom@tromey.com>
14356
14357 * python/py-cmd.c (cmdpy_destroyer)
14358 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14359 gdbpy_enter.
14360
14361 2017-01-10 Tom Tromey <tom@tromey.com>
14362
14363 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14364 gdbpy_enter.
14365 (gdbpy_breakpoint_has_cond): Likewise.
14366
14367 2017-01-10 Tom Tromey <tom@tromey.com>
14368
14369 * python/python.c (gdbpy_enter): New constructor.
14370 (~gdbpy_enter): New destructor.
14371 (restore_python_env, ensure_python_env): Rewrite.
14372 * python/python-internal.h (gdbpy_enter): New class.
14373
14374 2017-01-10 Tom Tromey <tom@tromey.com>
14375
14376 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14377
14378 2017-01-10 Tom Tromey <tom@tromey.com>
14379
14380 * python/py-value.c (value_has_field, get_field_flag)
14381 (get_field_type, valpy_getitem, convert_value_from_python): Use
14382 gdbpy_ref.
14383
14384 2017-01-10 Tom Tromey <tom@tromey.com>
14385
14386 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14387 gdbpy_ref.
14388
14389 2017-01-10 Tom Tromey <tom@tromey.com>
14390
14391 * python/py-prettyprint.c (search_pp_list)
14392 (find_pretty_printer_from_objfiles)
14393 (find_pretty_printer_from_progspace)
14394 (find_pretty_printer_from_gdb, find_pretty_printer)
14395 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14396 gdbpy_ref.
14397
14398 2017-01-10 Tom Tromey <tom@tromey.com>
14399
14400 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14401
14402 2017-01-10 Tom Tromey <tom@tromey.com>
14403
14404 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14405 (ltpy_get_all_source_lines): Use gdbpy_ref.
14406
14407 2017-01-10 Tom Tromey <tom@tromey.com>
14408
14409 * python/py-framefilter.c (extract_sym, extract_value)
14410 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14411 gdbpy_ref.
14412
14413 2017-01-10 Tom Tromey <tom@tromey.com>
14414
14415 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14416
14417 2017-01-10 Tom Tromey <tom@tromey.com>
14418
14419 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14420
14421 2017-01-10 Tom Tromey <tom@tromey.com>
14422
14423 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14424 gdbpy_ref.
14425
14426 2017-01-10 Tom Tromey <tom@tromey.com>
14427
14428 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14429
14430 2017-01-10 Tom Tromey <tom@tromey.com>
14431
14432 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14433 (typy_range): Use gdbpy_ref.
14434
14435 2017-01-10 Tom Tromey <tom@tromey.com>
14436
14437 * python/py-threadevent.c (create_thread_event_object): Use
14438 gdbpy_ref.
14439 * python/py-stopevent.c (create_stop_event_object): Simplify.
14440 (emit_stop_event): Use gdbpy_ref.
14441 * python/py-signalevent.c (create_signal_event_object): Use
14442 gdbpy_ref.
14443 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14444 (emit_new_objfile_event, create_clear_objfiles_event_object)
14445 (emit_clear_objfiles_event): Use gdbpy_ref.
14446 * python/py-infevents.c (create_inferior_call_event_object)
14447 (create_register_changed_event_object)
14448 (create_memory_changed_event_object, emit_inferior_call_event)
14449 (emit_memory_changed_event, emit_register_changed_event): Use
14450 gdbpy_ref.
14451 * python/py-exitedevent.c (create_exited_event_object)
14452 (emit_exited_event): Use gdbpy_ref.
14453 * python/py-event.h (evpy_emit_event): Remove
14454 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14455 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14456 * python/py-continueevent.c (emit_continue_event): Use
14457 gdbpy_ref.
14458 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14459 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14460 gdbpy_ref.
14461 * python/py-bpevent.c (create_breakpoint_event_object): Use
14462 gdbpy_ref.
14463
14464 2017-01-10 Tom Tromey <tom@tromey.com>
14465
14466 * python/py-ref.h: New file.
14467
14468 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14469
14470 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14471 void.
14472 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14473 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14474 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14475 * ui-out.c (ui_out::redirect): Likewise.
14476 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14477 * cli/cli-logging.c (set_logging_redirect): Update call site of
14478 ui_out::redirect.
14479 (handle_redirections): Likewise.
14480 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14481 * top.c (execute_command_to_string): Likewise.
14482 * utils.c (do_ui_out_redirect_pop): Likewise.
14483
14484 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14485
14486 * stack.c (_initialize_stack): Update "frame" command help message.
14487
14488 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14489
14490 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14491
14492 2017-01-06 Yao Qi <yao.qi@linaro.org>
14493
14494 * x86-linux-nat.h: Include gdb_proc_service.h.
14495
14496 2017-01-06 Yao Qi <yao.qi@linaro.org>
14497
14498 * ser-base.h: Include serial.h.
14499
14500 2017-01-06 Yao Qi <yao.qi@linaro.org>
14501
14502 * ppc-linux-tdep.h: Include ppc-tdep.h.
14503
14504 2017-01-06 Yao Qi <yao.qi@linaro.org>
14505
14506 * nat/amd64-linux-siginfo.h: Include signal.h.
14507
14508 2017-01-06 Yao Qi <yao.qi@linaro.org>
14509
14510 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14511
14512 2017-01-06 Yao Qi <yao.qi@linaro.org>
14513
14514 * mi/mi-parse.h: Include mi-cmds.h.
14515
14516 2017-01-06 Yao Qi <yao.qi@linaro.org>
14517
14518 * inf-loop.c: Don't include "target.h".
14519 * inf-loop.h: Include it here.
14520
14521 2017-01-06 Yao Qi <yao.qi@linaro.org>
14522
14523 * dfp.h: Include "dboulest.h" and "expression.h".
14524
14525 2017-01-06 Yao Qi <yao.qi@linaro.org>
14526
14527 * ax-gdb.h: Include "ax.h".
14528
14529 2017-01-06 Yao Qi <yao.qi@linaro.org>
14530
14531 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14532 with nat/gdb_ptrace.h.
14533
14534 2017-01-05 Yao Qi <yao.qi@linaro.org>
14535
14536 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14537 new line.
14538 (mips64_fbsd_sigframe_init): Likewise.
14539
14540 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14541
14542 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14543 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14544
14545 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14546
14547 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14548 * NEWS: Mention new FreeBSD/mips native configuration.
14549 * config/mips/fbsd.mh: New file.
14550 * configure.host: Add mips*-*-freebsd*.
14551 * mips-fbsd-nat.c: New file.
14552
14553 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14554
14555 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14556 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14557 * NEWS: Mention new FreeBSD/mips target.
14558 * configure.tgt: Add mips*-*-freebsd*.
14559 * mips-fbsd-tdep.c: New file.
14560 * mips-fbsd-tdep.h: New file.
14561
14562 2017-01-04 Yao Qi <yao.qi@linaro.org>
14563
14564 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14565 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14566
14567 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14568
14569 Update copyright year range in all GDB files.
14570
14571 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14572
14573 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14574
14575 For older changes see ChangeLog-2016.
14576 \f
14577 Local Variables:
14578 mode: change-log
14579 left-margin: 8
14580 fill-column: 74
14581 version-control: never
14582 coding: utf-8
14583 End:
This page took 0.344911 seconds and 4 git commands to generate.