]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
58cb4eb1346105b44c540eee2ae9474c561e6ea9
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
4 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
5 (COMMON_OBS): Remove doublest.o and dfp.o.
6 Do not build target-float.c (instead of doublest.c)
7 with -Wformat-nonliteral.
8
9 * doublest.c: Remove file.
10 * doublest.h: Remove file.
11 * dfp.c: Remove file.
12 * dfp.h: Remove file.
13
14 * target-float.c: Do not include "doublest.h" and "dfp.h".
15 (DOUBLEST): Move here from doublest.h.
16 (enum float_kind): Likewise.
17 (FLOATFORMAT_CHAR_BIT): Likewise.
18 (FLOATFORMAT_LARGEST_BYTES): Likewise.
19 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
20 (floatformat_precision): Likewise.
21 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
22 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
23 Likewise.
24 (host_float_format, host_double_format, host_long_double_format):
25 Likewise.
26 (floatformat_to_string, floatformat_from_string): Likewise.
27 (floatformat_to_doublest): Likewise. Also, inline the original
28 convert_floatformat_to_doublest.
29 (floatformat_from_doublest): Likewise. Also, inline the original
30 convert_floatformat_from_doublest.
31
32 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
33 (MAX_DECIMAL_STRING): Move here from dfp.c.
34 (match_endianness): Likewise.
35 (set_decnumber_context, decimal_check_errors): Likewise.
36 (decimal_from_number, decimal_to_number): Likewise.
37 (decimal_to_string, decimal_from_string): Likewise. Make static.
38 (decimal_from_longest, decimal_from_ulongest): Likewise.
39 (decimal_to_longest): Likewise.
40 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
41 (decimal_convert): Likewise.
42
43 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
44
45 * doublest.c: Do not include "gdbtypes.h".
46 (extract_typed_floating): Remove.
47 (store_typed_floating): Remove.
48 (convert_typed_floating): Remove.
49 * doublest.h (struct type): Remove.
50 (DOUBLEST_PRINT_FORMAT): Remove.
51 (DOUBLEST_SCAN_FORMAT): Remove.
52 (extract_typed_floating): Remove.
53 (store_typed_floating): Remove.
54 (convert_typed_floating): Remove.
55
56 * dfp.c (decimal_from_doublest): Remove.
57 (decimal_to_doublest): Remove.
58 * dfp.h: Do not include "doublest.h".
59 (decimal_from_doublest): Remove.
60 (decimal_to_doublest): Remove.
61
62 * value.c: Do not include "doublest.h" and "dfp.h".
63 (value_as_double): Remove.
64 (unpack_double): Remove.
65 (value_from_double): Remove.
66 (value_from_decfloat): Remove.
67 * value.h: Do not include "doublest.h".
68 (value_as_double): Remove.
69 (unpack_double): Remove.
70 (value_from_double): Remove.
71 (value_from_decfloat): Remove.
72
73 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
74
75 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
76 (i386_extract_return_value): Use target_float_convert.
77 (i386_store_return_value): Likewise.
78 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
79 (i387_value_to_register): Likewise.
80 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
81 (ia64_register_to_value): Use target_float_convert.
82 (ia64_value_to_register): Likewise.
83 (ia64_extract_return_value): Likewise.
84 (ia64_store_return_value): Likewise.
85 (ia64_push_dummy_call): Likewise.
86 * m68k-tdep.c: Include "target-float.h".
87 (m68k_register_to_value): Use target_float_convert.
88 (m68k_value_to_register): Likewise.
89 (m68k_svr4_extract_return_value): Likewise.
90 (m68k_svr4_store_return_value): Likewise.
91 * ppc-sysv-tdep.c: Include "target-float.h".
92 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
93 (do_ppc_sysv_return_value): Likewise.
94 (ppc64_sysv_abi_push_freg): Likewise.
95 (ppc64_sysv_abi_return_value_base): Likewise.
96 * rs6000-aix-tdep.c: Include "target-float.h".
97 (rs6000_push_dummy_call): Use target_float_convert.
98 (rs6000_return_value): Likewise.
99 * rs6000-lynx178-tdep.c: Include "target-float.h".
100 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
101 (rs6000_lynx178_return_value): Likewise.
102 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
103 (rs6000_register_to_value): Use target_float_convert.
104 (rs6000_value_to_register): Likewise.
105 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
106 (arm_extract_return_value): Use target_float_convert.
107 (arm_store_return_value): Likewise.
108 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
109 (sh_register_convert_to_virtual): Use target_float_convert.
110 (sh_register_convert_to_raw): Likewise.
111 * sh64-tdep.c: Include "target-float.h".
112 (sh64_extract_return_value): Use target_float_convert.
113 (sh64_register_convert_to_virtual): Likewise.
114 (sh64_register_convert_to_raw): Likewise. Fix argument types.
115
116 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
117
118 * target-float.c (floatformat_to_host_double): New function.
119 (floatformat_from_host_double): Likewise.
120 (target_float_to_host_double): Likewise.
121 (target_float_from_host_double): Likewise.
122 * target-float.h (target_float_to_host_double): Add prototype.
123 (target_float_from_host_double): Likewise.
124
125 * guile/scm-value.c: Include "target-float.h".
126 (gdbscm_value_to_real): Use target_float_to_host_double.
127 Handle integer source values via value_as_long.
128 * guile/scm-math.c: Include "target-float.h". Do not include
129 "doublest.h", "dfp.h", and "expression.h".
130 (vlscm_convert_typed_number): Use target_float_from_host_double.
131 (vlscm_convert_number): Likewise.
132
133 * python/py-value.c (valpy_float): Use target_float_to_host_double.
134 (convert_value_from_python): Use target_float_from_host_double.
135
136 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
137
138 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
139 (cast_from_fixed): Likewise.
140 (ada_scaling_type): New function.
141 (ada_delta): Return value instead of DOUBLEST. Perform target
142 arithmetic instead of host arithmetic.
143 (scaling_factor): Rename to ...
144 (ada_scaling_factor) ... this. Make non-static. Return value instead
145 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
146 (ada_fixed_to_float): Remove.
147 (ada_float_to_fixed): Remove.
148 * ada-lang.h (ada_fixed_to_float): Remove.
149 (ada_float_to_fixed): Remove.
150 (ada_delta): Return value instead of DOUBLEST.
151 (ada_scaling_factor): Add prototype.
152
153 * ada-typeprint.c: Include "target-float.h".
154 (print_fixed_point_type): Perform target arithmetic instead of
155 host arithmetic.
156 * ada-valprint.c: Include "target-float.h".
157 (ada_val_print_num): Perform target arithmetic instead of
158 host arithmetic for fixed-point types.
159
160 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
161
162 * target-float.c: Include <math.h>.
163 (floatformat_binop): New function.
164 (floatformat_compare): Likewise.
165 (target_float_binop): Likewise.
166 (target_float_compare): Likewise.
167 * target-float.h: Include "expression.h".
168 (target_float_binop): Add prototype.
169 (target_float_compare): Likewise.
170
171 * valarith.c: Do not include "doublest.h" and "dfp.h".
172 Include "common/byte-vector.h".
173 (value_args_as_decimal): Remove, replace by ...
174 (value_args_as_target_float): ... this function. Handle both
175 binary and decimal target floating-point formats.
176 (scalar_binop): Handle both binary and decimal FP using
177 value_args_as_target_float and target_float_binop.
178 (value_equal): Handle both binary and decimal FP using
179 value_args_as_target_float and target_float_compare.
180 (value_less): Likewise.
181 (value_pos): Handle all scalar types as simple copy.
182 (value_neg): Handle all scalar types via BINOP_SUB from 0.
183 * dfp.c (decimal_binop): Throw error instead of internal_error
184 when called with an unsupported operation code.
185
186 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
187
188 * target-float.c (target_float_to_string): New function.
189 (target_float_from_string): New function.
190 * target-float.h (target_float_to_string): Add prototype.
191 (target_float_from_string): Add prototype.
192
193 * valprint.c: Include "target-float.h". Do not include
194 "doublest.h" and "dfp.h".
195 (print_floating): Use target_float_to_string.
196 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
197 (printf_floating): Use target_float_to_string.
198 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
199 (print_i387_value): Use target_float_to_string.
200 * mips-tdep.c: Include "target-float.h".
201 (mips_print_fp_register): Use target_float_to_string.
202 * sh64-tdep.c: Include "target-float.h".
203 (sh64_do_fp_register): Use target_float_to_string.
204
205 * parse.c: Include "target-float.h". Do not include
206 "doublest.h" and "dfp.h".
207 (parse_float): Use target_float_from_string.
208 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
209 (define_symbol): Use target_float_from_string.
210 * gdbarch-selftests.c: Include "target-float.h".
211 (register_to_value_test): Use target_float_from_string.
212
213 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
214
215 * Makefile.c (SFILES): Add target-float.c.
216 (HFILES_NO_SRCDIR): Add target-float.h.
217 (COMMON_OBS): Add target-float.o.
218 * target-float.h: New file.
219 * target-float.c: New file.
220
221 * doublest.c (floatformat_classify): Fix detection of float_zero.
222
223 * gdbtypes.c (is_floating_type): New function.
224 * gdbtypes.h (is_floating_type): Add prototype.
225
226 * value.c: Do not include "floatformat.h".
227 (unpack_double): Use target_float_is_valid.
228 (is_floating_value): New function.
229 * value.h (is_floating_value): Add prototype-
230
231 * valarith.c: Include "target-float.h".
232 (value_logical_not): Use target_float_is_zero.
233
234 * python/py-value.c: Include "target-float.h".
235 (valpy_nonzero): Use target_float_is_zero.
236
237 2017-11-04 Tom Tromey <tom@tromey.com>
238
239 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
240
241 2017-11-04 Tom Tromey <tom@tromey.com>
242
243 * breakpoint.c (set_momentary_breakpoint): Return
244 breakpoint_up.
245 (until_break_command): Update.
246 (new_until_break_fsm): Change argument types to
247 breakpoint_up.
248 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
249 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
250 Remove.
251 * infcmd.c (finish_forward): Update.
252 * breakpoint.h (set_momentary_breakpoint)
253 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
254 (make_cleanup_delete_breakpoint): Remove.
255 (struct breakpoint_deleter): New.
256 (breakpoint_up): New typedef.
257 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
258 (insert_exception_resume_breakpoint): Update.
259 (insert_exception_resume_from_probe): Update.
260 (insert_longjmp_resume_breakpoint): Update.
261 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
262 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
263 * infcall.c (call_function_by_hand_dummy): Update
264
265 2017-11-04 Tom Tromey <tom@tromey.com>
266
267 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
268
269 2017-11-04 Tom Tromey <tom@tromey.com>
270
271 * linux-tdep.c (linux_core_info_proc_mappings): Use
272 gdb::def_vector.
273 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
274 "size" argument.
275 (linux_corefile_thread): Update.
276 (linux_make_corefile_notes): Remove unused variable.
277
278 2017-11-04 Tom Tromey <tom@tromey.com>
279
280 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
281 gdb::byte_vector.
282
283 2017-11-04 Tom Tromey <tom@tromey.com>
284
285 * objfiles.c (do_free_objfile_cleanup): Remove.
286 * compile/compile-object-load.c (compile_object_load): Update.
287 * objfiles.h (make_cleanup_free_objfile): Remove.
288
289 2017-11-04 Tom Tromey <tom@tromey.com>
290
291 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
292 (adi_read_versions): Change "tags" to "gdb_byte *".
293 (adi_print_versions): Likewise.
294
295 2017-11-04 Tom Tromey <tom@tromey.com>
296
297 * breakpoint.c
298 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
299 from start_rbreak_breakpoints.
300 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
301 * breakpoint.h (class scoped_rbreak_breakpoints): New.
302 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
303 * symtab.c (do_end_rbreak_breakpoints): Remove.
304 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
305
306 2017-11-04 Tom Tromey <tom@tromey.com>
307
308 * cp-namespace.c (reset_directive_searched): Remove.
309 (cp_lookup_symbol_via_imports): Use scoped_restore.
310 * cp-support.c (reset_directive_searched): Remove.
311 (make_symbol_overload_list_using): Use scoped_restore.
312 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
313 (reset_directive_searched): Remove.
314
315 2017-11-04 Tom Tromey <tom@tromey.com>
316
317 * symfile.c (find_separate_debug_file_by_debuglink): Use
318 unique_xmalloc_ptr.
319
320 2017-11-04 Tom Tromey <tom@tromey.com>
321
322 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
323 type of "info".
324 (compute_stack_depth): Likewise.
325 (do_compile_dwarf_expr_to_c): Use std::vector.
326
327 2017-11-04 Tom Tromey <tom@tromey.com>
328
329 * compile/compile-object-load.c (link_callbacks_einfo): Use
330 std::string.
331
332 2017-11-04 Tom Tromey <tom@tromey.com>
333
334 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
335 Use scoped_free_pendings.
336 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
337 scoped_free_pendings.
338 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
339 (xcoff_initial_scan): Likewise.
340 * buildsym.c (reset_symtab_globals): Update comment.
341 (scoped_free_pendings): Rename from really_free_pendings.
342 (prepare_for_building): Update comment.
343 (buildsym_init): Likewise.
344 * buildsym.h (class scoped_free_pendings): New class.
345 (really_free_pendings): Don't declare.
346
347 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
348
349 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
350 output when converting a zero value to a special byteorder format.
351
352 2017-11-02 Yao Qi <yao.qi@linaro.org>
353
354 * frame.c (do_frame_register_read): Remove aspace.
355 * jit.c (jit_frame_sniffer): Likwise.
356 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
357 * regcache.c (regcache::regcache): Pass nullptr.
358 (regcache_print): Caller updated.
359 * regcache.h (regcache::regcache): Remove one constructor
360 parameter aspace.
361
362 2017-11-02 Yao Qi <yao.qi@linaro.org>
363
364 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
365
366 2017-11-02 Yao Qi <yao.qi@linaro.org>
367
368 * breakpoint.c (insert_single_step_breakpoints): Update.
369 * frame.c (struct frame_info) <aspace>: Add const.
370 (frame_save_as_regcache): Add const.
371 (get_frame_address_space): Return const address_space *.
372 * frame.h (get_frame_address_space): Update declaration.
373 * infrun.c (struct step_over_info) <aspace>: Add const.
374 (set_step_over_info): Make aspace const.
375 (displaced_step_prepare_throw): Change variable const.
376 (resume): Likewise.
377 (proceed): Likewise.
378 (adjust_pc_after_break): Likewise.
379 (save_waitstatus): Likewise.
380 (handle_signal_stop): Likewise.
381 (keep_going_pass_signal): Likewise.
382 * jit.c (jit_frame_sniffer): Add const.
383 * mips-tdep.c (mips_single_step_through_delay): Likewise.
384 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
385 * record-full.c (record_full_wait_1): Likewise.
386 * regcache.c (regcache::regcache): Change parameter to const.
387 * regcache.h (regcache::regcache): Likewise.
388 (regcache::aspace): Return const address_space *.
389 (regcache) <m_aspace>: Add const.
390
391 2017-11-02 Yao Qi <yao.qi@linaro.org>
392
393 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
394 * frame.c (create_sentinel_frame): Likewise.
395 * infrun.c (displaced_step_prepare_throw): Likewise.
396 (resume): Likewise.
397 (thread_still_needs_step_over_bp): Likewise.
398 (proceed): Likewise.
399 (do_target_wait): Likewise.
400 (adjust_pc_after_break): Likewise.
401 (handle_syscall_event): Likewise.
402 (save_waitstatus): Likewise.
403 (handle_inferior_event_1): Likewise.
404 (handle_signal_stop): Likewise.
405 (keep_going_pass_signal): Likewise.
406 * linux-nat.c (status_callback): Likewise.
407 (save_stop_reason): Likewise.
408 (resume_stopped_resumed_lwps): Likewise.
409 * record-full.c (record_full_exec_insn): Likewise.
410 (record_full_wait_1): Likewise.
411 * regcache.c (get_regcache_aspace): Remove.
412 * regcache.h (get_regcache_aspace): Remove.
413
414 2017-11-02 Yao Qi <yao.qi@linaro.org>
415
416 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
417 (init_regcache_descr): Use gdbarch_num_regs.
418 (regcache::regcache): Likewise.
419 (regcache::get_register_status): Likewise.
420 (regcache::assert_raw_regnum): Likewise.
421 (regcache::cooked_read): Likewise.
422 (regcache::cooked_read_value): Likewise.
423 (regcache::cooked_write): Likewise.
424 (regcache::dump): Likewise.
425 (regcache::num_raw_registers): New method.
426 * regcache.h (class regcache) <num_raw_registers>: New.
427
428 2017-11-02 Yao Qi <yao.qi@linaro.org>
429
430 * regcache.c (regcache::assert_regnum): New method.
431 (regcache::invalidate): Call assert_regnum.
432 (regcache::raw_update): Likewise.
433 (regcache::raw_write): Likewise.
434 (regcache::raw_read_part): Likewise.
435 (regcache::raw_write_part): Likewise.
436 (regcache::raw_supply): Likewise.
437 (regcache::raw_supply_integer): Likewise.
438 (regcache::raw_supply_zeroed): Likewise.
439 (regcache::raw_collect): Likewise.
440 (regcache::raw_collect_integer): Likewise.
441 * regcache.h (regcache::assert_regnum): Declare.
442
443 2017-11-02 Yao Qi <yao.qi@linaro.org>
444
445 * regcache.c (regcache::dump): Remove code.
446
447 2017-11-02 Yao Qi <yao.qi@linaro.org>
448
449 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
450 Remove.
451 <sizeof_cooked_register_status>: Remove.
452 (init_regcache_descr): Update.
453 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
454 (regcache::save): Likewise.
455 (regcache::dump): Likewise.
456
457 2017-11-01 James Bowman <james.bowman@ftdichip.com>
458
459 * ft32-tdep.c (ft32_fetch_instruction): New function.
460 (ft32_analyze_prologue): Use ft32_fetch_instruction().
461
462 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
463
464 * cli/cli-script.c (execute_control_command): Rename to ...
465 (execute_control_command_1): ... this.
466 (execute_control_command): New function.
467
468 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
469
470 * tracepoint.c (tfind_command): Remove const_cast.
471
472 2017-10-30 Mike Gulick <mgulick@mathworks.com>
473
474 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
475
476 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
477
478 * common/common-utils.h (in_inclusive_range): New function.
479 * arm-tdep.c (arm_record_extension_space): Use
480 in_inclusive_range.
481 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
482 * cris-tdep.c (cris_spec_reg_applicable): Use
483 in_inclusive_range.
484
485 2017-10-30 Pedro Alves <palves@redhat.com>
486 Simon Marchi <simon.marchi@ericsson.com>
487
488 * remote.c (remote_set_syscall_catchpoint): Build a std::string
489 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
490
491 2017-10-30 Pedro Alves <palves@redhat.com>
492
493 * common/common-utils.c (string_appendf, string_vappendf): New
494 functions.
495 * common/common-utils.h (string_appendf, string_vappendf): New
496 declarations.
497 * unittests/common-utils-selftests.c (string_appendf_func)
498 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
499 (string_vappendf_tests): New functions.
500 (_initialize_common_utils_selftests): Register "string_appendf" and
501 "string_vappendf tests".
502
503 2017-10-30 Pedro Alves <palves@redhat.com>
504
505 * unittests/common-utils-selftests.c (format_func): New typedef.
506 (string_printf_tests, string_vprintf_tests): Tests factored out
507 and merged to ...
508 (test_format_func): ... this new function.
509 (string_printf_tests, string_vprintf_tests): Reimplement on top of
510 test_format_func.
511
512 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
513
514 * darwin-nat.c: Remove include of gdb.h.
515
516 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
517
518 * xtensa-xtregs.c: Fix formatting issues.
519
520 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
521
522 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
523
524 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
525
526 PR python/21213
527 * python/py-infthread.c (thpy_get_inferior): Increment reference
528 of inferior before returning it.
529
530 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
531
532 * unittests/common-utils-selftests.c (format): Add
533 ATTRIBUTE_PRINTF.
534
535 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
536
537 * xml-syscall.c (struct syscall_desc): Add constructor.
538 <name>: Change type to std::string.
539 (syscall_desc_up): New typedef.
540 (syscall_desc_p): Remove typeder.
541 (DEF_VEC_P(syscall_desc_p)): Remove.
542 (struct syscall_group_desc): Add constructor.
543 <name>: Change type to std::string.
544 <syscalls>: Change type to std::vector.
545 (syscall_group_desc_up): New typedef.
546 (syscall_group_desc_p): Remove typedef.
547 (DEF_VEC_P(syscall_group_desc_p)): Remove.
548 (struct syscalls_info) <syscalls>: Change type to std::vector of
549 unique_ptr.
550 <groups>: Likewise.
551 <my_gdb_datadir>: Change type to std::string.
552 (syscalls_info_up): New typedef.
553 (allocate_syscalls_info): Remove.
554 (syscalls_info_free_syscalls_desc): Remove.
555 (syscalls_info_free_syscall_group_desc): Remove.
556 (free_syscalls_info): Remove.
557 (make_cleanup_free_syscalls_info): Remove.
558 (syscall_group_create_syscall_group_desc): Adjust.
559 (syscall_group_add_syscall): Adjust.
560 (syscall_create_syscall_desc): Adjust.
561 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
562 (init_syscalls_info): Adjust.
563 (syscall_group_get_group_by_name): Adjust.
564 (xml_get_syscall_number): Adjust.
565 (xml_get_syscall_name): Adjust.
566 (xml_list_of_syscalls): Adjust.
567 (xml_list_syscalls_by_group): Adjust.
568 (xml_list_of_groups): Adjust.
569
570 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
571
572 * probe.h: Don't include gdb_vecs.h.
573 (DEF_VEC_P (probe_p)): Remove.
574 (find_probes_in_objfile): Return an std::vector.
575 * probe.c (find_probes_in_objfile): Likewise.
576 * breakpoint.c (breakpoint_objfile_data)
577 <longjmp_probes>: Change type to std::vector.
578 <exception_probes>: Likewise.
579 (free_breakpoint_probes): Don't manually free vectors.
580 (create_longjmp_master_breakpoint): Adjust.
581 (create_exception_master_breakpoint): Adjust.
582 * solib-svr4.c (svr4_create_probe_breakpoints): Change
583 parameter type, adjust.
584 (svr4_create_solib_event_breakpoints): Adjust.
585
586 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
587
588 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
589 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
590 with new.
591 (free_breakpoint_probes): Rename to ...
592 (free_breakpoint_objfile_data): ... this, and call delete on
593 bp_objfile_data..
594
595 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
596
597 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
598 (loaded_script_ptr): Remove typedef.
599 (DEF_VEC_P (loaded_script_ptr)): Remove.
600 (struct collect_matching_scripts_data): Add constructor.
601 <scripts_p>: Change type to (pointer to) std::vector.
602 (collect_matching_scripts_data): Adjust.
603 (sort_scripts_by_name): Make suitable for std::sort.
604 (print_scripts): Don't sort vector, adjust to std::vector.
605 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
606
607 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
608
609 * symfile.c (filename_language): Make struct, not typedef. Add
610 constructor.
611 <ext>: Change type to std::string.
612 (DEF_VEC_O (filename_language)): Remove.
613 (filename_language_table): Change type to std::vector.
614 (add_filename_language): Adjust.
615 (set_ext_lang_command): Adjust.
616 (info_ext_lang_command): Adjust.
617 (deduce_language_from_filename): Adjust.
618 (class scoped_restore_filename_language_table): Remove.
619 (test_filename_language): Use scoped_restore.
620 (test_set_ext_lang_command): Use scoped_restore, adjust to
621 std::vector change.
622
623 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
624
625 * symfile.c: Include selftest.h.
626 (class scoped_restore_filename_language_table): New.
627 (test_filename_language): New test.
628 (test_set_ext_lang_command): New test.
629 (_initialize_symfile): Register tests.
630
631 2017-10-27 Keith Seitz <keiths@redhat.com>
632
633 * breakpoint.c (print_breakpoint_location): Use the symbol saved
634 in the bp_location, falling back to find_pc_sect_function when
635 needed.
636 (add_location_to_breakpoint): Save sal->symbol.
637 * breakpoint.h (struct bp_location) <symbol>: New field.
638 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
639 * symtab.h (struct symtab_and_line) <symbol>: New field.
640
641 2017-10-26 Patrick Frants <osscontribute@gmail.com>
642
643 PR gdb/13669
644 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
645 to rewind obstack.
646
647 2017-10-26 Pedro Alves <palves@redhat.com>
648
649 * remote.c (remote_async_terminal_ours_p): Delete.
650 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
651 Remove references to 'remote_async_terminal_ours_p'.
652
653 2017-10-26 Yao Qi <yao.qi@linaro.org>
654
655 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
656
657 2017-10-26 Yao Qi <yao.qi@linaro.org>
658
659 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
660 aspace const.
661 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
662 Likewise.
663 * breakpoint.c (bpstat_check_location): Remove cast.
664 (breakpoint_hit_catch_fork): Make aspce const.
665 (breakpoint_hit_catch_solib): Likewise.
666 (breakpoint_hit_catch_exec): Likewise.
667 (breakpoint_hit_ranged_breakpoint): Likewise.
668 (breakpoint_hit_watchpoint): Likewise.
669 (base_breakpoint_breakpoint_hit): Likewise.
670 (bkpt_breakpoint_hit): Likewise.
671 (dprintf_breakpoint_hit): Likewise.
672 (tracepoint_breakpoint_hit): Likewise.
673 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
674
675 2017-10-26 Yao Qi <yao.qi@linaro.org>
676
677 * breakpoint.c (breakpoint_location_address_match): Change
678 "struct address_space *" to "const address_space".
679 (breakpoint_location_address_range_overlap): Likewise.
680 (breakpoint_here_p): Likewise.
681 (breakpoint_in_range_p): Likewise.
682 (moribund_breakpoint_here_p): Likewise.
683 (bp_location_inserted_here_p): Likewise.
684 (software_breakpoint_inserted_here_p): Likewise.
685 (hardware_breakpoint_inserted_here_p): Likewise.
686 (hardware_watchpoint_inserted_in_range): Likewise.
687 (bpstat_check_location): Likewise.
688 (bpstat_stop_status): Likewise.
689 (breakpoint_address_match): Likewise.
690 (breakpoint_address_match_range): Likewise.
691 (breakpoint_location_address_match): Likewise.
692 (breakpoint_location_address_range_overlap): Likewise.
693 (insert_single_step_breakpoint): Likewise.
694 (breakpoint_has_location_inserted_here): Likewise.
695 (single_step_breakpoint_inserted_here_p): Likewise.
696 (pc_at_non_inline_function): Likewise.
697 * breakpoint.h (bpstat_stop_status): Update declaration.
698 (breakpoint_here_p): Likewise.
699 (breakpoint_in_range_p): Likewise.
700 (moribund_breakpoint_here_p): Likewise.
701 (breakpoint_inserted_here_p): Likewise.
702 (software_breakpoint_inserted_here_p): Likewise.
703 (hardware_breakpoint_inserted_here_p): Likewise.
704 (breakpoint_has_location_inserted_here): Likewise.
705 (single_step_breakpoint_inserted_here_p): Likewise.
706 (hardware_watchpoint_inserted_in_range): Likewise.
707 (breakpoint_address_match): Likewise.
708 (insert_single_step_breakpoint): Likewise.
709 (pc_at_non_inline_function): Likewise.
710 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
711 * record.c (record_check_stopped_by_breakpoint): Likewise.
712 * record.h (record_check_stopped_by_breakpoint): Likewise.
713 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
714
715 2017-10-25 Yao Qi <yao.qi@linaro.org>
716
717 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
718 regcache->arch () instead get_regcache_arch.
719 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
720 Likewise.
721 (aarch64_fbsd_store_inferior_registers): Likewise.
722 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
723 (store_gregs_to_thread): Likewise.
724 (fetch_fpregs_from_thread): Likewise.
725 (store_fpregs_to_thread): Likewise.
726 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
727 (aarch64_store_return_value): Likewise.
728 (aarch64_software_single_step): Likewise.
729 * aix-thread.c (aix_thread_wait): Likewise.
730 (supply_reg32): Likewise.
731 (supply_sprs64): Likewise.
732 (supply_sprs32): Likewise.
733 (fill_gprs64): Likewise.
734 (fill_gprs32): Likewise.
735 (fill_sprs64): Likewise.
736 (fill_sprs32): Likewise.
737 (store_regs_user_thread): Likewise.
738 (store_regs_kernel_thread): Likewise.
739 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
740 (alphabsd_store_inferior_registers): Likewise.
741 * alpha-tdep.c (alpha_extract_return_value): Likewise.
742 (alpha_store_return_value): Likewise.
743 (alpha_deal_with_atomic_sequence): Likewise.
744 (alpha_next_pc): Likewise.
745 (alpha_software_single_step): Likewise.
746 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
747 (amd64bsd_store_inferior_registers): Likewise.
748 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
749 Likewise.
750 (amd64_linux_store_inferior_registers): Likewise.
751 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
752 (amd64_collect_native_gregset): Likewise.
753 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
754 (amd64obsd_collect_uthread): Likewise.
755 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
756 (amd64_collect_fpregset): Likewise.
757 (amd64_supply_fxsave): Likewise.
758 (amd64_supply_xsave): Likewise.
759 (amd64_collect_fxsave): Likewise.
760 (amd64_collect_xsave): Likewise.
761 * arc-tdep.c (arc_write_pc): Likewise.
762 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
763 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
764 (arm_fbsd_store_inferior_registers): Likewise.
765 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
766 (store_vfp_regs): Likewise.
767 (arm_linux_fetch_inferior_registers): Likewise.
768 (arm_linux_store_inferior_registers): Likewise.
769 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
770 (arm_linux_sigreturn_next_pc): Likewise.
771 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
772 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
773 (fetch_register): Likewise.
774 (store_register): Likewise.
775 * arm-tdep.c (arm_is_thumb): Likewise.
776 (displaced_in_arm_mode): Likewise.
777 (bx_write_pc): Likewise.
778 (arm_get_next_pcs_addr_bits_remove): Likewise.
779 (arm_software_single_step): Likewise.
780 (arm_extract_return_value): Likewise.
781 (arm_store_return_value): Likewise.
782 (arm_write_pc): Likewise.
783 * bfin-tdep.c (bfin_extract_return_value): Likewise.
784 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
785 (bsd_uthread_store_registers): Likewise.
786 * core-regset.c (fetch_core_registers): Likewise.
787 * corelow.c (get_core_registers): Likewise.
788 * cris-tdep.c (cris_store_return_value): Likewise.
789 (cris_extract_return_value): Likewise.
790 (find_step_target): Likewise.
791 (find_step_target): Likewise.
792 (cris_software_single_step): Likewise.
793 * ctf.c (ctf_fetch_registers): Likewise.
794 * darwin-nat.c (cancel_breakpoint): Likewise.
795 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
796 * frv-tdep.c (frv_extract_return_value): Likewise.
797 * ft32-tdep.c (ft32_store_return_value): Likewise.
798 (ft32_extract_return_value): Likewise.
799 * go32-nat.c (fetch_register): Likewise.
800 (go32_fetch_registers): Likewise.
801 (go32_store_registers): Likewise.
802 (store_register): Likewise.
803 * h8300-tdep.c (h8300_extract_return_value): Likewise.
804 (h8300_store_return_value): Likewise.
805 * hppa-linux-nat.c (fetch_register): Likewise.
806 (store_register): Likewise.
807 (hppa_linux_fetch_inferior_registers): Likewise.
808 (hppa_linux_store_inferior_registers): Likewise.
809 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
810 (i386_darwin_store_inferior_registers): Likewise.
811 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
812 (gnu_store_registers): Likewise.
813 * i386-linux-nat.c (fetch_register): Likewise.
814 (store_register): Likewise.
815 (supply_gregset): Likewise.
816 (fill_gregset): Likewise.
817 (i386_linux_fetch_inferior_registers): Likewise.
818 (i386_linux_store_inferior_registers): Likewise.
819 (i386_linux_resume): Likewise.
820 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
821 Likewise.
822 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
823 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
824 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
825 (i386obsd_collect_uthread): Likewise.
826 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
827 (i386_supply_gregset): Likewise.
828 (i386_collect_gregset): Likewise.
829 (i386_supply_fpregset): Likewise.
830 (i386_collect_fpregset): Likewise.
831 (i386_mpx_bd_base): Likewise.
832 * i386-v4-nat.c (supply_fpregset): Likewise.
833 (fill_fpregset): Likewise.
834 * i387-tdep.c (i387_supply_fsave): Likewise.
835 (i387_collect_fsave): Likewise.
836 (i387_supply_fxsave): Likewise.
837 (i387_collect_fxsave): Likewise.
838 (i387_supply_xsave): Likewise.
839 (i387_collect_xsave): Likewise.
840 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
841 (ia64_linux_store_registers): Likewise.
842 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
843 (ia64_extract_return_value): Likewise.
844 (ia64_store_return_value): Likewise.
845 (find_func_descr): Likewise.
846 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
847 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
848 (inf_ptrace_store_registers): Likewise.
849 * infrun.c (use_displaced_stepping): Likewise.
850 (displaced_step_prepare_throw): Likewise.
851 (resume): Likewise.
852 (proceed): Likewise.
853 (do_target_wait): Likewise.
854 (adjust_pc_after_break): Likewise.
855 (handle_inferior_event_1): Likewise.
856 (handle_signal_stop): Likewise.
857 (save_infcall_suspend_state): Likewise.
858 (restore_infcall_suspend_state): Likewise.
859 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
860 * jit.c (jit_frame_prev_register): Likewise.
861 * linux-nat.c (save_stop_reason): Likewise.
862 (linux_nat_wait_1): Likewise.
863 (resume_stopped_resumed_lwps): Likewise.
864 * linux-record.c (record_linux_sockaddr): Likewise.
865 (record_linux_msghdr): Likewise.
866 (record_linux_system_call): Likewise.
867 * linux-tdep.c (linux_collect_thread_registers): Likewise.
868 * lm32-tdep.c (lm32_extract_return_value): Likewise.
869 (lm32_store_return_value): Likewise.
870 * m32c-tdep.c (m32c_read_flg): Likewise.
871 (m32c_pseudo_register_read): Likewise.
872 (m32c_pseudo_register_write): Likewise.
873 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
874 (m32r_linux_collect_gregset): Likewise.
875 * m32r-tdep.c (m32r_store_return_value): Likewise.
876 (m32r_extract_return_value): Likewise.
877 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
878 (m68kbsd_collect_fpregset): Likewise.
879 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
880 * m68k-linux-nat.c (fetch_register): Likewise.
881 (old_fetch_inferior_registers): Likewise.
882 (old_store_inferior_registers): Likewise.
883 (store_regs): Likewise.
884 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
885 (m68k_svr4_store_return_value): Likewise.
886 * m88k-tdep.c (m88k_store_arguments): Likewise.
887 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
888 (mi_cmd_data_write_register_values): Likewise.
889 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
890 (mips_fbsd_store_inferior_registers): Likewise.
891 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
892 (mips_fbsd_supply_gregs): Likewise.
893 (mips_fbsd_collect_fpregs): Likewise.
894 (mips_fbsd_collect_gregs): Likewise.
895 (mips_fbsd_supply_fpregset): Likewise.
896 (mips_fbsd_collect_fpregset): Likewise.
897 (mips_fbsd_supply_gregset): Likewise.
898 (mips_fbsd_collect_gregset): Likewise.
899 * mips-linux-nat.c (supply_gregset): Likewise.
900 (fill_gregset): Likewise.
901 (supply_fpregset): Likewise.
902 (fill_fpregset): Likewise.
903 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
904 (mips_fill_gregset): Likewise.
905 (mips_supply_fpregset): Likewise.
906 (mips_fill_fpregset): Likewise.
907 (mips64_supply_gregset): Likewise.
908 (micromips_linux_sigframe_validate): Likewise.
909 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
910 (mipsnbsd_fetch_inferior_registers): Likewise.
911 (mipsnbsd_store_inferior_registers): Likewise.
912 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
913 (mipsnbsd_supply_gregset): Likewise.
914 (mipsnbsd_iterate_over_regset_sections): Likewise.
915 (mipsnbsd_supply_reg): Likewise.
916 (mipsnbsd_supply_fpreg): Likewise.
917 * mips-tdep.c (mips_in_frame_stub): Likewise.
918 (mips_dummy_id): Likewise.
919 (is_octeon_bbit_op): Likewise.
920 (micromips_bc1_pc): Likewise.
921 (extended_mips16_next_pc): Likewise.
922 (mips16_next_pc): Likewise.
923 (deal_with_atomic_sequence): Likewise.
924 * moxie-tdep.c (moxie_process_readu): Likewise.
925 * nios2-tdep.c (nios2_get_next_pc): Likewise.
926 * nto-procfs.c (procfs_store_registers): Likewise.
927 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
928 (ppcfbsd_store_inferior_registers): Likewise.
929 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
930 (fetch_altivec_register): Likewise.
931 (get_spe_registers): Likewise.
932 (fetch_spe_register): Likewise.
933 (fetch_altivec_registers): Likewise.
934 (fetch_all_gp_regs): Likewise.
935 (fetch_all_fp_regs): Likewise.
936 (store_vsx_register): Likewise.
937 (store_altivec_register): Likewise.
938 (set_spe_registers): Likewise.
939 (store_spe_register): Likewise.
940 (store_altivec_registers): Likewise.
941 (store_all_gp_regs): Likewise.
942 (store_all_fp_regs): Likewise.
943 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
944 (ppc_linux_collect_gregset): Likewise.
945 (ppc_canonicalize_syscall): Likewise.
946 (ppc_linux_record_signal): Likewise.
947 (ppu2spu_prev_register): Likewise.
948 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
949 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
950 (ppcobsd_store_registers): Likewise.
951 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
952 Likewise.
953 (ppc_ravenscar_generic_store_registers): Likewise.
954 * procfs.c (procfs_fetch_registers): Likewise.
955 (procfs_store_registers): Likewise.
956 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
957 (ravenscar_store_registers): Likewise.
958 (ravenscar_prepare_to_store): Likewise.
959 * record-btrace.c (record_btrace_fetch_registers): Likewise.
960 * record-full.c (record_full_wait_1): Likewise.
961 (record_full_registers_change): Likewise.
962 (record_full_store_registers): Likewise.
963 (record_full_core_fetch_registers): Likewise.
964 (record_full_save): Likewise.
965 (record_full_goto_insn): Likewise.
966 * regcache.c (regcache_register_size): Likewise.
967 (get_regcache_arch): Remove.
968 (regcache_read_pc): Likewise.
969 * regcache.h (get_regcache_arch): Remove.
970 * remote-sim.c (gdbsim_fetch_register): Likewise.
971 (gdbsim_store_register): Likewise.
972 * remote.c (fetch_register_using_p): Likewise.
973 (send_g_packet): Likewise.
974 (remote_prepare_to_store): Likewise.
975 (store_registers_using_G): Likewise.
976 * reverse.c (save_bookmark_command): Likewise.
977 (goto_bookmark_command): Likewise.
978 * rs6000-aix-tdep.c (branch_dest): Likewise.
979 * rs6000-nat.c (rs6000_ptrace64): Likewise.
980 (fetch_register): Likewise.
981 * rs6000-tdep.c (ppc_supply_reg): Likewise.
982 (ppc_collect_reg): Likewise.
983 (ppc_collect_gregset): Likewise.
984 (ppc_collect_fpregset): Likewise.
985 (ppc_collect_vsxregset): Likewise.
986 (ppc_collect_vrregset): Likewise.
987 (ppc_displaced_step_hw_singlestep): Likewise.
988 (rs6000_pseudo_register_read): Likewise.
989 (rs6000_pseudo_register_write): Likewise.
990 * s390-linux-nat.c (supply_gregset): Likewise.
991 (fill_gregset): Likewise.
992 (s390_linux_fetch_inferior_registers): Likewise.
993 * s390-linux-tdep.c (s390_write_pc): Likewise.
994 (s390_software_single_step): Likewise.
995 (s390_all_but_pc_registers_record): Likewise.
996 (s390_linux_syscall_record): Likewise.
997 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
998 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
999 (shnbsd_store_inferior_registers): Likewise.
1000 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1001 (sh_extract_return_value_fpu): Likewise.
1002 (sh_store_return_value_nofpu): Likewise.
1003 (sh_corefile_supply_regset): Likewise.
1004 (sh_corefile_collect_regset): Likewise.
1005 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1006 (sh64_store_return_value): Likewise.
1007 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1008 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1009 (sparc_store_inferior_registers): Likewise.
1010 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1011 (sparc_ravenscar_prepare_to_store): Likewise.
1012 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1013 (sparc_analyze_control_transfer): Likewise.
1014 (sparc_step_trap): Likewise.
1015 (sparc_software_single_step): Likewise.
1016 (sparc32_gdbarch_init): Likewise.
1017 (sparc_supply_rwindow): Likewise.
1018 (sparc_collect_rwindow): Likewise.
1019 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1020 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1021 (sparc64nbsd_collect_gregset): Likewise.
1022 (sparc64nbsd_supply_fpregset): Likewise.
1023 (sparc64nbsd_collect_fpregset): Likewise.
1024 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1025 (sparc64_supply_gregset): Likewise.
1026 (sparc64_collect_gregset): Likewise.
1027 (sparc64_supply_fpregset): Likewise.
1028 (sparc64_collect_fpregset): Likewise.
1029 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1030 * spu-tdep.c (spu_unwind_sp): Likewise.
1031 (spu2ppu_prev_register): Likewise.
1032 (spu_memory_remove_breakpoint): Likewise.
1033 * stack.c (return_command): Likewise.
1034 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1035 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1036 * tracefile.c (trace_save_ctf): Likewise.
1037 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1038 (do_windows_store_inferior_registers): Likewise.
1039 (windows_resume): Likewise.
1040 * xtensa-linux-nat.c (fill_gregset): Likewise.
1041 (supply_gregset_reg): Likewise.
1042 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1043 (xtensa_register_read_masked): Likewise.
1044 (xtensa_supply_gregset): Likewise.
1045 (xtensa_extract_return_value): Likewise.
1046 (xtensa_store_return_value): Likewise.
1047
1048 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
1049
1050 * doublest.c (floatformat_from_string): New function.
1051 * doublest.h (floatformat_from_string): Add prototype.
1052
1053 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1054 (OP_FLOAT): ... this.
1055 * expression.h: Do not include "doublest.h".
1056 (union exp_element): Replace doubleconst and decfloatconst by
1057 new element floatconst.
1058 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1059 (ada_evaluate_subexp): Likewise.
1060 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1061 OP_DOUBLE and OP_DECFLOAT.
1062 * expprint.c (print_subexp_standard): Likewise.
1063 (dump_subexp_body_standard): Likewise.
1064 * breakpoint.c (watchpoint_exp_is_const): Likewise.
1065
1066 * parse.c: Include "dfp.h".
1067 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1068 (write_exp_elt_floatcst): New function.
1069 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1070 and OP_DECFLOAT.
1071 (operator_check_standard): Likewise.
1072 (parse_float): Do not accept suffix. Take type as input. Return bool.
1073 Return target format buffer instead of host DOUBLEST.
1074 Use floatformat_from_string and decimal_from_string to parse
1075 either binary or decimal floating-point types.
1076 (parse_c_float): Remove.
1077 * parser-defs.h: Do not include "doublest.h".
1078 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1079 (write_exp_elt_floatcst): Add prototype.
1080 (parse_float): Update prototype.
1081 (parse_c_float): Remove.
1082
1083 * c-exp.y: Do not include "dfp.h".
1084 (typed_val_float): Use byte buffer instead of DOUBLEST.
1085 (typed_val_decfloat): Remove.
1086 (DECFLOAT): Remove.
1087 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1088 (parse_number): Update to new parse_float interface.
1089 Parse suffixes and determine type before calling parse_float.
1090 Handle decimal and binary FP types the same way.
1091
1092 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1093 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1094 (parse_number): Update to new parse_float interface.
1095 Parse suffixes and determine type before calling parse_float.
1096
1097 * f-exp.y: Replace dval by typed_val_float.
1098 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1099 (parse_number): Use parse_float instead of atof.
1100
1101 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1102 (parse_go_float): Remove.
1103 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1104 (parse_number): Call parse_float instead of parse_go_float.
1105 Parse suffixes and determine type before calling parse_float.
1106
1107 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1108 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1109 (parse_number): Update to new parse_float interface.
1110 Parse suffixes and determine type before calling parse_float.
1111
1112 * m2-exp.y: Replace dval by byte buffer val.
1113 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1114 (parse_number): Call parse_float instead of atof.
1115
1116 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1117 (lex_number): Call parse_float instead of strtod.
1118 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1119 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1120 Use write_exp_elt_floatcst.
1121 (unit_testing): Remove static variable.
1122 (rust_type): Do not check unit_testing.
1123 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
1124
1125 * ada-exp.y (type_float, type_double): Remove.
1126 (typed_val_float): Use byte buffer instead of DOUBLEST.
1127 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1128 * ada-lex.l (processReal): Use parse_float instead of sscanf.
1129
1130 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1131
1132 * aarch64-tdep.h (enum aarch64_regnum): Remove.
1133 * arch/aarch64.h: New file.
1134
1135 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1136
1137 * dfp.h (decimal_from_string): Use const reference for argument.
1138 * dfp.c (decimal_from_string): Likewise.
1139
1140 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1141
1142 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1143 * sh64-tdep.c (sh64_do_fp_register): Likewise.
1144 * mips-tdep.c (mips_print_fp_register): Likewise.
1145
1146 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1147
1148 * common/format.h (enum argclass): Replace decfloat_arg by
1149 dec32float_arg, dec64float_arg, and dec128float_arg.
1150 * common/format.c (parse_format_string): Update to return
1151 new decimal float argument classes.
1152
1153 * printcmd.c (printf_decfloat): Rename to ...
1154 (printf_floating): ... this. Add argclass argument, and use it
1155 instead of parsing the format string again. Add support for
1156 binary floating-point values, using floatformat_to_string.
1157 Convert value to the target format if it doesn't already match.
1158 (ui_printf): Call printf_floating instead of printf_decfloat,
1159 also for double_arg / long_double_arg. Pass argclass.
1160
1161 * dfp.c (decimal_to_string): Add format string argument.
1162 * dfp.h (decimal_to_string): Likewise.
1163
1164 * doublest.c (floatformat_to_string): Add format string argument.
1165 * doublest.h (floatformat_to_string): Likewise.
1166
1167 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1168
1169 * doublest.c (floatformat_precision): New routine.
1170 (floatformat_to_string): Likewise.
1171 * doublest.c (floatformat_to_string): Add prototype.
1172
1173 * printcmd.c (print_scalar_formatted): Only call print_floating
1174 on floating-point types.
1175 * valprint.c: Do not include "floatformat.h".
1176 (generic_val_print_decfloat): Remove.
1177 (generic_val_print): Call generic_val_print_float for both
1178 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1179 (print_floating): Use floatformat_to_string. Handle decimal float.
1180 (print_decimal_floating): Remove, merge into floatformat_to_string.
1181 * value.h (print_decimal_floating): Remove.
1182
1183 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1184
1185 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1186
1187 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1188
1189 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1190
1191 * memattr.h: Don't include vec.h.
1192 (struct mem_attrib): Initialize fields.
1193 <unknown>: New static method.
1194 (struct mem_region): Add constructors, operator<, initialize
1195 fields.
1196 * memattr.c: Include algorithm.
1197 (default_mem_attrib, unknown_mem_attrib): Remove.
1198 (user_mem_region_list): New global.
1199 (target_mem_region_list, mem_region_list): Change type to
1200 std::vector<mem_region>.
1201 (mem_use_target): Now a function.
1202 (target_mem_regions_valid): Change type to bool.
1203 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1204 (require_user_regions): Adjust.
1205 (require_target_regions): Adjust.
1206 (create_mem_region): Adjust.
1207 (lookup_mem_region): Adjust.
1208 (invalidate_target_mem_regions): Adjust.
1209 (mem_clear): Rename to...
1210 (user_mem_clear): ... this, and adjust.
1211 (mem_command): Adjust.
1212 (info_mem_command): Adjust.
1213 (mem_enable, enable_mem_command, mem_disable,
1214 disable_mem_command): Adjust.
1215 (mem_delete): Adjust.
1216 (delete_mem_command): Adjust.
1217 * memory-map.h (parse_memory_map): Return an std::vector.
1218 * memory-map.c (parse_memory_map): Likewise.
1219 (struct memory_map_parsing_data): Add constructor.
1220 <memory_map>: Point to std::vector.
1221 (memory_map_start_memory): Adjust.
1222 (memory_map_end_memory): Adjust.
1223 (memory_map_end_property): Adjust.
1224 (clear_result): Remove.
1225 * remote.c (remote_memory_map): Return an std::vector.
1226 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1227 Remove.
1228 (target_debug_print_mem_region_vector): New.
1229 * target-delegates.c: Regenerate.
1230 * target.h (mem_region_vector): New typedef.
1231 (to_memory_map): Return mem_region_vector.
1232 (target_memory_map): Return an std::vector.
1233 * target.c (target_memory_map): Return an std::vector.
1234 (flash_erase_command): Adjust.
1235
1236 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1237
1238 * memory-map.c (struct memory_map_parsing_data) <property_name>:
1239 Change type to std::string.
1240 (memory_map_start_property): Adjust.
1241 (memory_map_end_property): Adjust.
1242
1243 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1244
1245 * infrun.h: Include common/byte-vector.h.
1246 (struct displaced_step_closure): New struct.
1247 (struct buf_displaced_step_closure): New struct.
1248 * infrun.c (displaced_step_closure::~displaced_step_closure):
1249 Provide default implementation.
1250 (displaced_step_clear): Deallocate step closure with delete.
1251 * aarch64-tdep.c (displaced_step_closure): Rename to ...
1252 (aarch64_displaced_step_closure): ... this, extend
1253 displaced_step_closure.
1254 (aarch64_displaced_step_data) <dsc>: Change type to
1255 aarch64_displaced_step_closure.
1256 (aarch64_displaced_step_copy_insn): Adjust to type change, use
1257 unique_ptr.
1258 (aarch64_displaced_step_fixup): Add cast for displaced step
1259 closure.
1260 * amd64-tdep.c (displaced_step_closure): Rename to ...
1261 (amd64_displaced_step_closure): ... this, extend
1262 displaced_step_closure.
1263 <insn_buf>: Change type to std::vector<gdb_byte>.
1264 <max_len>: Remove.
1265 (fixup_riprel): Change type of DSC parameter, adjust to type
1266 change of insn_buf.
1267 (fixup_displaced_copy): Change type of DSC parameter.
1268 (amd64_displaced_step_copy_insn): Instantiate
1269 amd64_displaced_step_closure.
1270 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1271 to type change of insn_buf.
1272 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1273 parameter DSC.
1274 (arm_linux_copy_svc): Likewise.
1275 (cleanup_kernel_helper_return): Likewise.
1276 (arm_catch_kernel_helper_return): Likewise.
1277 (arm_linux_displaced_step_copy_insn): Instantiate
1278 arm_displaced_step_closure.
1279 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1280 (displaced_read_reg): Change type of parameter DSC.
1281 (branch_write_pc): Likewise.
1282 (load_write_pc): Likewise.
1283 (alu_write_pc): Likewise.
1284 (displaced_write_reg): Likewise.
1285 (arm_copy_unmodified): Likewise.
1286 (thumb_copy_unmodified_32bit): Likewise.
1287 (thumb_copy_unmodified_16bit): Likewise.
1288 (cleanup_preload): Likewise.
1289 (install_preload): Likewise.
1290 (arm_copy_preload): Likewise.
1291 (thumb2_copy_preload): Likewise.
1292 (install_preload_reg): Likewise.
1293 (arm_copy_preload_reg): Likewise.
1294 (cleanup_copro_load_store): Likewise.
1295 (install_copro_load_store): Likewise.
1296 (arm_copy_copro_load_store) Likewise.
1297 (thumb2_copy_copro_load_store): Likewise.
1298 (cleanup_branch): Likewise.
1299 (install_b_bl_blx): Likewise.
1300 (arm_copy_b_bl_blx): Likewise.
1301 (thumb2_copy_b_bl_blx): Likewise.
1302 (thumb_copy_b): Likewise.
1303 (install_bx_blx_reg): Likewise.
1304 (arm_copy_bx_blx_reg): Likewise.
1305 (thumb_copy_bx_blx_reg): Likewise.
1306 (cleanup_alu_imm): Likewise.
1307 (arm_copy_alu_imm): Likewise.
1308 (thumb2_copy_alu_imm): Likewise.
1309 (cleanup_alu_reg): Likewise.
1310 (install_alu_reg): Likewise.
1311 (arm_copy_alu_reg): Likewise.
1312 (thumb_copy_alu_reg): Likewise.
1313 (cleanup_alu_shifted_reg): Likewise.
1314 (install_alu_shifted_reg): Likewise.
1315 (arm_copy_alu_shifted_reg): Likewise.
1316 (cleanup_load): Likewise.
1317 (cleanup_store): Likewise.
1318 (arm_copy_extra_ld_st): Likewise.
1319 (install_load_store): Likewise.
1320 (thumb2_copy_load_literal): Likewise.
1321 (thumb2_copy_load_reg_imm): Likewise.
1322 (arm_copy_ldr_str_ldrb_strb): Likewise.
1323 (cleanup_block_load_all): Likewise.
1324 (cleanup_block_store_pc): Likewise.
1325 (cleanup_block_load_pc): Likewise.
1326 (arm_copy_block_xfer): Likewise.
1327 (thumb2_copy_block_xfer): Likewise.
1328 (cleanup_svc): Likewise.
1329 (install_svc): Likewise.
1330 (arm_copy_svc): Likewise.
1331 (thumb_copy_svc): Likewise.
1332 (arm_copy_undef): Likewise.
1333 (thumb_32bit_copy_undef): Likewise.
1334 (arm_copy_unpred): Likewise.
1335 (arm_decode_misc_memhint_neon): Likewise.
1336 (arm_decode_unconditional): Likewise.
1337 (arm_decode_miscellaneous): Likewise.
1338 (arm_decode_dp_misc): Likewise.
1339 (arm_decode_ld_st_word_ubyte): Likewise.
1340 (arm_decode_media): Likewise.
1341 (arm_decode_b_bl_ldmstm): Likewise.
1342 (arm_decode_ext_reg_ld_st): Likewise.
1343 (thumb2_decode_dp_shift_reg): Likewise.
1344 (thumb2_decode_ext_reg_ld_st): Likewise.
1345 (arm_decode_svc_copro): Likewise.
1346 (thumb2_decode_svc_copro): Likewise.
1347 (install_pc_relative): Likewise.
1348 (thumb_copy_pc_relative_16bit): Likewise.
1349 (thumb_decode_pc_relative_16bit): Likewise.
1350 (thumb_copy_pc_relative_32bit): Likewise.
1351 (thumb_copy_16bit_ldr_literal): Likewise.
1352 (thumb_copy_cbnz_cbz): Likewise.
1353 (thumb2_copy_table_branch): Likewise.
1354 (cleanup_pop_pc_16bit_all): Likewise.
1355 (thumb_copy_pop_pc_16bit): Likewise.
1356 (thumb_process_displaced_16bit_insn): Likewise.
1357 (decode_thumb_32bit_ld_mem_hints): Likewise.
1358 (thumb_process_displaced_32bit_insn): Likewise.
1359 (thumb_process_displaced_insn): Likewise.
1360 (arm_process_displaced_insn): Likewise.
1361 (arm_displaced_init_closure): Likewise.
1362 (arm_displaced_step_fixup): Add cast for closure.
1363 * arm-tdep.h: Include infrun.h.
1364 (displaced_step_closure): Rename to ...
1365 (arm_displaced_step_closure): ... this, extend
1366 displaced_step_closure.
1367 <u::svc::copy_svc_os>: Change type of parameter DSC.
1368 <cleanup>: Likewise.
1369 (arm_process_displaced_insn): Likewise.
1370 (arm_displaced_init_closure): Likewise.
1371 (displaced_read_reg): Likewise.
1372 (displaced_write_reg): Likewise.
1373 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1374 Adjust.
1375 * i386-tdep.h: Include infrun.h.
1376 (i386_displaced_step_closure): New typedef.
1377 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1378 i386_displaced_step_closure.
1379 (i386_displaced_step_fixup): Adjust.
1380 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1381 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1382 and unique_ptr.
1383 (ppc_displaced_step_fixup): Adjust.
1384 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1385 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1386 and unique_ptr.
1387 (s390_displaced_step_fixup): Adjust.
1388
1389 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1390
1391 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1392 Remove declarations.
1393
1394 2017-10-20 Tom Tromey <tom@tromey.com>
1395
1396 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1397 std::vector.
1398 (gdb_bfd_record_inclusion): Update.
1399 (bfdp): Remove typedef.
1400
1401 2017-10-20 Tom Tromey <tom@tromey.com>
1402
1403 * gdb_bfd.c (gdb_bfd_ref): Use new.
1404 (struct gdb_bfd_data): Add constructor, destructor, and member
1405 initializers.
1406 (gdb_bfd_unref): Use delete.
1407
1408 2017-10-20 Tom Tromey <tom@tromey.com>
1409
1410 * exec.c (exec_file_attach): Use new_bfd_ref.
1411 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1412 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1413 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1414 new_bfd_ref.
1415 * gdb_bfd.h (new_bfd_ref): New function.
1416
1417 2017-10-20 Pedro Alves <palves@redhat.com>
1418
1419 * main.c (captured_command_loop): Add attribute noinline.
1420
1421 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1422
1423 * interps.c (struct interp_factory): Add constructor.
1424 (interp_factory_p): Remove typedef.
1425 (DEF_VEC_P(interp_factory_p)): Remove.
1426 (interpreter_factories): Change type to std::vector.
1427 (interp_factory_register): Adjust.
1428 (interp_lookup): Adjust.
1429 (interpreter_completer): Adjust.
1430
1431 2017-10-19 Tom Tromey <tom@tromey.com>
1432
1433 * break-catch-syscall.c (catch_syscall_completer): Use
1434 std::string, gdb::unique_xmalloc_ptr.
1435
1436 2017-10-19 Tom Tromey <tom@tromey.com>
1437
1438 * infcall.c (call_function_by_hand_dummy): Use std::string.
1439
1440 2017-10-19 Tom Tromey <tom@tromey.com>
1441
1442 * mi/mi-main.c (mi_cmd_execute): Update.
1443 * top.h (prepare_execute_command): Return scoped_value_mark.
1444 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1445 Add move constructor.
1446 * top.c (prepare_execute_command): Return scoped_value_mark.
1447 (execute_command): Update.
1448
1449 2017-10-19 Pedro Alves <palves@redhat.com>
1450
1451 * xml-support.c (xml_fetch_content_from_file): Check fread's
1452 return.
1453
1454 2017-10-19 Pedro Alves <palves@redhat.com>
1455
1456 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1457 async.
1458 (handle_error_fd): New function.
1459 (ser_base_async): Add/delete an event loop file handler for
1460 error_fd.
1461
1462 2017-10-19 Pedro Alves <palves@redhat.com>
1463
1464 * xml-support.c (xml_fetch_content_from_file): Don't read in
1465 chunks. Instead use fseek to determine the file's size, and read
1466 it in one go.
1467
1468 2017-11-18 Keith Seitz <keiths@redhat.com>
1469
1470 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1471 types.
1472 Add whitespace to front of type name.
1473
1474 2017-10-18 Keith Seitz <keiths@redhat.com>
1475
1476 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1477 DW_AT_accessibility.
1478
1479 2017-10-18 Yao Qi <yao.qi@linaro.org>
1480
1481 * features/tic6x-c62x-linux.c: Remove.
1482
1483 2017-10-17 Tom Tromey <tom@tromey.com>
1484
1485 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1486 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1487 (do_mixed_source_and_assembly): Likewise.
1488
1489 2017-10-17 Tom Tromey <tom@tromey.com>
1490
1491 * regcache.c (regcache::xfer_part): Remove assertion.
1492
1493 2017-10-17 Pedro Alves <palves@redhat.com>
1494
1495 * xml-support.c (xml_fetch_content_from_file): Call
1496 unique_ptr::release() instead unique_ptr::get() when passing
1497 through xrealloc.
1498
1499 2017-10-17 Yao Qi <yao.qi@linaro.org>
1500
1501 * regcache.c (regcache::xfer_part): Remove parameters read and
1502 write, add parameter is_raw. All callers are updated.
1503
1504 2017-10-16 Keith Seitz <keiths@redhat.com>
1505
1506 * c-typeprint.c (enum access_specifier): Moved here from
1507 c_type_print_base.
1508 (output_access_specifier): New function.
1509 (c_type_print_base): Consider typedefs when assessing
1510 whether access labels are needed.
1511 Use output_access_specifier as needed.
1512 Output access specifier for typedefs, if needed.
1513 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1514 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1515 fields.
1516 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1517 accessor macros.
1518
1519 2017-10-16 Tom Tromey <tom@tromey.com>
1520
1521 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1522 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1523 * target.c (target_fileio_read_stralloc): Update.
1524 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1525 * target.h (target_fileio_read_stralloc): Return
1526 unique_xmalloc_ptr.
1527
1528 2017-10-16 Tom Tromey <tom@tromey.com>
1529
1530 * xml-syscall.c (xml_init_syscalls_info): Update.
1531 * xml-support.c (xinclude_start_include): Update.
1532 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1533 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1534 (xml_fetch_content_from_file): Likewise.
1535 * osdata.c (get_osdata): Update.
1536 * target.h (target_read_stralloc, target_get_osdata): Return
1537 unique_xmalloc_ptr.
1538 * solib-aix.c (solib_aix_get_library_list): Update.
1539 * solib-target.c (solib_target_current_sos): Update.
1540 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1541 * xml-tdesc.c (fetch_available_features_from_target): Update.
1542 (target_fetch_description_xml): Update.
1543 (file_read_description_xml): Update.
1544 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1545 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1546 (remote_pid_to_exec_file): Update.
1547 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1548 (target_get_osdata): Likewise.
1549
1550 2017-10-16 Tom Tromey <tom@tromey.com>
1551
1552 * remote.c (remote_register_number_and_offset): Use std::vector.
1553 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1554 (putpkt_binary): Use gdb::def_vector.
1555 (compare_sections_command): Use gdb::byte_vector.
1556
1557 2017-10-16 Tom Tromey <tom@tromey.com>
1558
1559 * ppc-linux-nat.c (hwdebug_insert_point): Use
1560 gdb::unique_xmalloc_ptr, XDUP.
1561
1562 2017-10-16 Tom Tromey <tom@tromey.com>
1563
1564 * probe.c (parse_probes): Use std::string.
1565 (info_probes_for_ops, enable_probes_command)
1566 (disable_probes_command): Remove cleanups.
1567
1568 2017-10-16 Tom Tromey <tom@tromey.com>
1569
1570 * buildsym.c (block_compar): Remove.
1571 (end_symtab_get_static_block): Use std::vector.
1572
1573 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1574
1575 * memrange.h (struct mem_range): Define operator< and operator==.
1576 (mem_range_s): Remove.
1577 (DEF_VEC_O (mem_range_s)): Remove.
1578 (normalize_mem_ranges): Change parameter type to std::vector.
1579 * memrange.c (compare_mem_ranges): Remove.
1580 (normalize_mem_ranges): Change parameter type to std::vector,
1581 adjust to vector change.
1582 * exec.c (section_table_available_memory): Return vector, remove
1583 parameter.
1584 (section_table_read_available_memory): Adjust to std::vector
1585 change.
1586 * remote.c (remote_read_bytes): Adjust to std::vector
1587 change.
1588 * tracepoint.h (traceframe_available_memory): Change parameter
1589 type to std::vector.
1590 * tracepoint.c (traceframe_available_memory): Change parameter
1591 type to std::vector, adjust.
1592 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1593 std::vector change.
1594 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1595 unittests/memrange-selftests.c.
1596 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1597 * gdb/unittests/memrange-selftests.c: New file.
1598
1599 2017-10-16 Pedro Alves <palves@redhat.com>
1600
1601 * elfread.c (probe_key_free): Rename range-for variable.
1602 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1603 (find_probe_by_pc, collect_probes): Rename range-for variable.
1604
1605 2017-10-16 Yao Qi <yao.qi@linaro.org>
1606
1607 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1608 * features/tic6x-c62x.c: Remove.
1609 * features/tic6x-c64x-linux.c: Remove.
1610 * features/tic6x-c64x.c: Remove.
1611 * features/tic6x-c64xp-linux.c: Remove.
1612 * features/tic6x-c64xp.c: Remove.
1613 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1614 initialize_tdesc_tic6x_*_linux functions.
1615 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1616 initialize_tdesc_tic6x_* functions.
1617
1618 2017-10-16 Yao Qi <yao.qi@linaro.org>
1619
1620 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1621 tic6x-c62x.
1622 * regformats/tic6x-c62x.dat: Remove.
1623 * regformats/tic6x-c64x.dat: Remove.
1624 * regformats/tic6x-c64xp.dat: Remove.
1625
1626 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1627
1628 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1629 (the !HAVE_LIBEXPAT version).
1630
1631 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1632
1633 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1634 const.
1635
1636 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1637
1638 * target.h: Include tracepoint.h.
1639 (enum trace_find_type): Move to tracepoint.h.
1640 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1641 * tracepoint.h: Don't include target.h
1642 (enum trace_find_type): Move from target.h.
1643 (parse_traceframe_info): Return a unique ptr.
1644 * tracepoint.c (current_traceframe_info): Change type to unique
1645 ptr.
1646 (free_traceframe_info): Remove.
1647 (clear_traceframe_info): Don't manually free
1648 current_traceframe_info.
1649 (free_result): Remove.
1650 (parse_traceframe_info): Return a unique ptr.
1651 (get_traceframe_info): Adjust to unique ptr.
1652 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1653 * remote.c (remote_traceframe_info): Return a unique ptr.
1654 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1655 ptr.
1656 * target-debug.h (target_debug_print_traceframe_info_up): New
1657 macro.
1658 * target-delegates.c: Regenerate.
1659
1660 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1661
1662 * memrange.h (struct mem_range): Add constructors.
1663 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1664 std::vector<mem_range>.
1665 * tracepoint.c (free_traceframe_info): Don't manually free
1666 vector.
1667 (traceframe_info_start_memory): Adjust to vector change.
1668 (traceframe_available_memory): Likewise.
1669 * tracefile-tfile.c (build_traceframe_info): Likewise.
1670 * ctf.c (ctf_traceframe_info): Likewise.
1671
1672 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1675 std::vector<int>.
1676 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1677 (traceframe_info_start_tvar): Adjust to vector change.
1678 (parse_traceframe_info): Allocate with new.
1679 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1680 vector change.
1681 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1682 change.
1683 tfile_traceframe_info): Allocate with new.
1684 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1685 change.
1686
1687 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1688
1689 * tracepoint.c (traceframe_info): Rename to...
1690 (current_traceframe_info): ...this.
1691 (clear_traceframe_info): Adjust.
1692 (get_traceframe_info): Adjust.
1693
1694 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1695
1696 * nat/linux-osdata.c: Include algorithm.
1697 (compare_processes): Remove.
1698 (struct pid_pgid_entry): New struct.
1699 (linux_xfer_osdata_processgroups): Use std::vector instead of
1700 XNEWVEC.
1701
1702 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1703
1704 * objfiles.h: Don't include symfile.h.
1705 (struct partial_symbol): Remove forward-declaration.
1706 (struct objfile) <global_psymbols, static_psymbols>: Change type
1707 to std::vector<partial_symbol *>.
1708 * objfiles.c (objfile::objfile): Don't memset those fields.
1709 (objfile::~objfile): Don't free those fields.
1710 * psympriv.h (struct psymbol_allocation_list): Remove
1711 forward-declaration.
1712 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1713 to std::vector.
1714 (start_psymtab_common): Change parameters to std::vector.
1715 * psymtab.c: Include algorithm.
1716 (require_partial_symbols): Call shrink_to_fit.
1717 (find_pc_sect_psymbol): Adjust to vector change.
1718 (match_partial_symbol): Likewise.
1719 (lookup_partial_symbol): Likewise.
1720 (psym_relocate): Likewise.
1721 (dump_psymtab): Likewise.
1722 (recursively_search_psymtabs): Likewise.
1723 (compare_psymbols): Remove.
1724 (sort_pst_symbols): Adjust to vector change.
1725 (start_psymtab_common): Likewise.
1726 (end_psymtab_common): Likewise.
1727 (psymbol_bcache_full): De-constify return value.
1728 (add_psymbol_to_bcache): Likewise.
1729 (extend_psymbol_list): Remove.
1730 (append_psymbol_to_list): Adjust to vector change.
1731 (add_psymbol_to_list): Likewise.
1732 (init_psymbol_list): Likewise.
1733 (maintenance_info_psymtabs): Likewise.
1734 (maintenance_check_psymtabs): Likewise.
1735 * symfile.h (struct psymbol_allocation_list): Remove.
1736 * symfile.c (reread_symbols): Adjust to vector change.
1737 * dbxread.c (start_psymtab): Change type of parameters.
1738 (dbx_symfile_read): Adjust to vector change.
1739 (read_dbx_symtab): Likewise.
1740 (start_psymtab): Change type of parameters.
1741 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1742 (create_partial_symtab): Likewise.
1743 (add_partial_symbol): Likewise.
1744 (write_one_signatured_type): Likewise.
1745 (recursively_write_psymbols): Likewise.
1746 * mdebugread.c (parse_partial_symbols): Likewise.
1747 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1748 (scan_xcoff_symtab): Adjust to vector change.
1749 (xcoff_initial_scan): Likewise.
1750
1751 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1752
1753 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1754
1755 2017-10-13 Yao Qi <yao.qi@linaro.org>
1756
1757 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1758 Remove s390x-*-expedite, add s390x-expedite.
1759
1760 2017-10-13 Yao Qi <yao.qi@linaro.org>
1761
1762 * features/s390-gs-linux64.c: Regenerated.
1763 * features/s390x-gs-linux64.c: Regenerated.
1764
1765 2017-10-13 Tom Tromey <tom@tromey.com>
1766
1767 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1768 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1769 delete.
1770 * symfile.c (symbol_file_add_with_addrs): Use new.
1771 (symbol_file_add_separate): Update comment.
1772 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1773 * jit.c (jit_object_close_impl): Use new.
1774 (jit_unregister_code): Use delete.
1775 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1776 (~objfile): Rename from free_objfile.
1777 (free_objfile_separate_debug, do_free_objfile_cleanup)
1778 (free_all_objfiles, objfile_purge_solibs): Use delete.
1779 * objfiles.h (struct objfile): Add constructor and destructor.
1780 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1781 (allocate_objfile, free_objfile): Don't declare.
1782 (struct objstats): Add initializers.
1783
1784 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1785
1786 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1787 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1788 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1789 * gdbarch.h: Regenerate.
1790 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1791 Adjust comment.
1792 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1793 (i386_displaced_step_fixup): Adjust comment.
1794 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1795
1796 2017-10-12 Tom Tromey <tom@tromey.com>
1797
1798 * prologue-value.h (pv_area::store_would_trash): Return bool.
1799 (pv_area::find_reg): Likewise.
1800 * prologue-value.c (pv_area::store_would_trash): Return bool.
1801 (pv_area::find_reg): Likewise.
1802
1803 2017-10-12 Tom Tromey <tom@tromey.com>
1804
1805 * s390-linux-tdep.c (s390_store, s390_load)
1806 (s390_check_for_saved, s390_analyze_prologue): Update.
1807 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1808 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1809 * prologue-value.h (class pv_area): Move from prologue-value.c.
1810 Change names of members. Add constructor, destructor, member
1811 functions.
1812 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1813 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1814 (pv_area_fetch, pv_area_scan): Don't declare.
1815 * prologue-value.c (struct pv_area::area_entry): Now member of
1816 pv_area.
1817 (struct pv_area): Move to prologue-value.h.
1818 (pv_area::pv_area): Rename from make_pv_area.
1819 (pv_area::~pv_area): Rename from free_pv_area.
1820 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1821 (clear_entries, find_entry, overlaps, store_would_trash, store)
1822 (fetch, find_reg, scan): Now member of pv_area.
1823 Remove "area" argument. Update.
1824 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1825 Update.
1826 * mn10300-tdep.c (push_reg, check_for_saved)
1827 (mn10300_analyze_prologue): Update.
1828 * mep-tdep.c (is_arg_spill, check_for_saved)
1829 (mep_analyze_prologue): Update.
1830 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1831 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1832 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1833 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1834 Update.
1835 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1836 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1837
1838 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1839
1840 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1841 * linux-nat.c (linux_nat_delete_thread): New variable.
1842 (lwp_free): Invoke linux_nat_delete_thread if set.
1843 (linux_nat_set_delete_thread): New function.
1844 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1845 thread delete callback.
1846 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1847 (_initialize_arm_linux_nat): Assign thread delete callback.
1848 * s390-linux-nat.c (s390_delete_thread): New function.
1849 (_initialize_s390_nat): Assign thread delete callback.
1850 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1851 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1852 function.
1853 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1854 declaration.
1855 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1856 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1857
1858 2017-10-09 Tom Tromey <tom@tromey.com>
1859
1860 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1861 std::string.
1862 * tui/tui-layout.c (enum tui_status): Use std::string.
1863
1864 2017-10-11 Tom Tromey <tom@tromey.com>
1865
1866 * gdbthread.h (thread_command): Constify.
1867 * inferior.h (detach_command): Constify.
1868 * top.h (set_history, show_history): Constify.
1869 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1870 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1871 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1872 * printcmd.c (set_command): Constify.
1873 (non_const_set_command): New function.
1874 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1875 * breakpoint.c (enable_command, disable_command, delete_command)
1876 (catch_command, tcatch_command, set_breakpoint_cmd)
1877 (show_breakpoint_cmd): Constify.
1878 * macrocmd.c (macro_command): Constify.
1879 * infcmd.c (unset_command, kill_command, detach_command)
1880 (info_proc_cmd): Constify.
1881 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1882 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1883 (info_auto_load_cmd): Constify.
1884 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1885 (unset_tdesc_cmd): Constify.
1886 * ada-lang.c (set_ada_command, show_ada_command)
1887 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1888 * guile/guile.c (set_guile_command, show_guile_command)
1889 (info_guile_command): Constify.
1890 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1891 Constify.
1892 * skip.c (skip_command): Constify.
1893 * compile/compile.c (_initialize_compile): Constify.
1894 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1895 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1896 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1897 (maint_btrace_pt_show_cmd): Constify.
1898 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1899 Constify.
1900 * python/python.c (user_show_python, user_set_python): Constify.
1901 * mips-tdep.c (set_mips_command, show_mips_command)
1902 (set_mipsfpu_command): Constify.
1903 * record-btrace.c (cmd_record_btrace_start)
1904 (cmd_set_record_btrace, cmd_show_record_btrace)
1905 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1906 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1907 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1908 Constify.
1909 * symfile.c (overlay_command): Constify.
1910 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1911 * cli/cli-logging.c (set_logging_command, show_logging_command):
1912 Constify.
1913 * cli/cli-dump.c (dump_command, append_command)
1914 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1915 (tekhex_dump_command, binary_dump_command)
1916 (binary_append_command): Constify.
1917 * cli/cli-decode.c (struct cmd_list_element): Change type of
1918 "fun".
1919 * cli/cli-cmds.c (info_command, show_command, set_debug)
1920 (show_debug): Constify.
1921 (show_command): Add non-const overload.
1922 * top.c (set_history, show_history): Constify.
1923 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1924 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1925 * target.c (target_command): Constify.
1926 * sparc64-tdep.c (info_adi_command): Constify.
1927 * record-full.c (cmd_record_full_start): Constify.
1928 (set_record_full_command): Constify. Fix typo.
1929 (show_record_full_command): Constify.
1930 * thread.c (thread_command, thread_apply_command): Constify.
1931 * memattr.c (dummy_cmd): Constify.
1932 * value.c (function_command): Constify.
1933 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1934 * probe.c (info_probes_command): Constify.
1935 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1936 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1937 (show_thread_cmd, set_thread_default_cmd)
1938 (show_thread_default_cmd): Constify.
1939 (check_empty): Constify.
1940 * tracepoint.c (tfind_command): Constify.
1941 * cp-support.c (maint_cplus_command): Constify.
1942 * windows-tdep.c (info_w32_command): Constify.
1943 * record.c (cmd_record_start, set_record_command)
1944 (show_record_command, info_record_command, cmd_record_goto):
1945 Constify.
1946 * ravenscar-thread.c (set_ravenscar_command)
1947 (show_ravenscar_command): Constify.
1948 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1949 Constify.
1950 (add_internal_problem_command): Remove casts.
1951 * arc-tdep.c (maintenance_print_arc_command): Constify.
1952 * valprint.c (set_print, show_print, set_print_raw)
1953 (show_print_raw): Constify.
1954 * maint.c (maintenance_command, maintenance_info_command)
1955 (maintenance_print_command, maintenance_set_cmd)
1956 (maintenance_show_cmd, set_per_command_cmd)
1957 (show_per_command_cmd, maintenance_check_command): Constify.
1958 * language.c (set_check, show_check): Constify.
1959 * typeprint.c (show_print_type, set_print_type): Constify.
1960 * go32-nat.c (go32_info_dos_command): Constify.
1961
1962 2017-10-11 Tom Tromey <tom@tromey.com>
1963
1964 * breakpoint.c (prepare_re_set_context): Remove.
1965 (breakpoint_re_set_one): Update. Don't use cleanups.
1966 (breakpoint_re_set): Use scoped_restore, std::string, and
1967 scoped_restore_current_language.
1968
1969 2017-10-11 Tom Tromey <tom@tromey.com>
1970
1971 * breakpoint.c (commands_command_1): Use std::string.
1972 (cleanup_executing_breakpoints): Remove.
1973 (bpstat_do_actions_1): Use scoped_restore.
1974 (bpstat_check_watchpoint): Use std::string.
1975 (decode_static_tracepoint_spec): Likewise.
1976 (break_range_command): Likewise.
1977 (watch_command_1): Likewise.
1978 (compare_breakpoints): Change argument types.
1979 (clear_command): Use std::vector.
1980 (cleanup_executing_breakpoints): Remove.
1981 (update_global_location_list): Use unique_xmalloc_ptr.
1982 (strace_command): Remove unused declaration.
1983
1984 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1985
1986 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1987 * NEWS: Mention new FreeBSD/arm native configuration.
1988 * configure.host: Add arm*-*-freebsd*.
1989 * configure.nat: Likewise.
1990 * arm-fbsd-nat.c: New file.
1991
1992 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1993
1994 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1995 (ALLDEPFILES): Add arm-fbsd-tdep.c.
1996 * NEWS: Mention new FreeBSD/arm target.
1997 * configure.tgt: Add arm*-*-freebsd*.
1998 * arm-fbsd-tdep.c: New file.
1999 * arm-fbsd-tdep.h: New file.
2000
2001 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2002
2003 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2004 `gdbarch_elfcore_write_linux_prpsinfo'.
2005 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2006 method.
2007 (elf_internal_linux_prpsinfo): Remove declaration.
2008 * gdbarch.h: Regenerate.
2009 * gdbarch.c: Regenerate.
2010
2011 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2012
2013 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2014 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2015
2016 2017-10-11 Pedro Alves <palves@redhat.com>
2017
2018 * breakpoint.c (reattach_breakpoints): Delete.
2019 * breakpoint.h (reattach_breakpoints): Delete.
2020
2021 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2022
2023 * symfile.c (registered_sym_fns): Make struct, not typedef.
2024 (DEF_VEC_O (registered_sym_fns)): Remove.
2025 (symtab_fns): Change type to std::vector.
2026 (add_symtab_fns): Adjust.
2027 (find_sym_fns): Adjust.
2028
2029 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2030
2031 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2032 * arc-tdep.h (arc_arch_is_em): New function.
2033 (arc_arch_is_hs): Likewise.
2034
2035 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2036
2037 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2038 parentheses in the declaration.
2039 (macro_lookup_inclusion): Likewise.
2040 (macro_lookup_definition): Likewise.
2041 * p-lang.h (pascal_builtin_types): Likewise.
2042 * tui/tui-data.c (tui_win_list): Likewise.
2043 * tui/tui-data.h (tui_win_list): Likewise.
2044 * utils.h (make_cleanup_free_section_addr_info): Likewise.
2045
2046 2017-10-11 Mark Rages <markrages@gmail.com>
2047
2048 * target-memory.c (block_boundaries): Fix for block address not
2049 aligned on block size.
2050
2051 2017-10-10 Pedro Alves <palves@redhat.com>
2052 Tom Tromey <tom@tromey.com>
2053
2054 * breakpoint.c (struct captured_breakpoint_query_args)
2055 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2056 (print_breakpoint): New.
2057 * breakpoint.h (print_breakpoint): Declare.
2058 * common/common-exceptions.h (enum return_reason): Remove
2059 references to catch_exceptions.
2060 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2061 Delete.
2062 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2063 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2064 * gdb.h: Delete.
2065 * gdbthread.h (thread_select): Declare.
2066 * mi/mi-cmd-break.c: Don't include gdb.h.
2067 (breakpoint_notify): Use print_breakpoint.
2068 * mi/mi-cmd-catch.c: Don't include gdb.h.
2069 * mi/mi-interp.c: Don't include gdb.h.
2070 (mi_print_breakpoint_for_event): New.
2071 (mi_breakpoint_created, mi_breakpoint_modified): Use
2072 mi_print_breakpoint_for_event.
2073 * mi/mi-main.c: Don't include gdb.h.
2074 (mi_cmd_thread_select): Parse the global thread ID here. Use
2075 thread_select instead of gdb_thread_select.
2076 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2077 of using gdb_list_thread_ids.
2078 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
2079 FILEIO_ENOSYS here.
2080 (remote_fileio_request): Use TRY/CATCH instead of
2081 catch_exceptions.
2082 * symfile-mem.c (struct symbol_file_add_from_memory_args)
2083 (symbol_file_add_from_memory_wrapper): Delete.
2084 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2085 * thread.c: Don't include gdb.h.
2086 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2087 (thread_alive): Use thread_select.
2088 (do_captured_thread_select): Delete, parts salvaged as ...
2089 (thread_select): ... this new function.
2090 (gdb_thread_select): Delete.
2091
2092 2017-10-10 Pedro Alves <palves@redhat.com>
2093 Tom Tromey <tom@tromey.com>
2094
2095 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2096 and reverse logic.
2097 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2098 No longer macros. Instead ...
2099 (enum wp_check_result): They're now values of this new
2100 enumeration.
2101 (watchpoint_check): Change return type to wp_check_result and
2102 parameter type to bpstat.
2103 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2104 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2105 catch_errors. Reverse logic of watchpoint_check call.
2106 (breakpoint_re_set_one): Now returns void and takes a breakpoint
2107 pointer as parameter.
2108 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2109 * common/common-exceptions.c (throw_exception_sjlj): Update
2110 comments to avoid mentioning catch_errors.
2111 * exceptions.c (catch_errors): Delete.
2112 * exceptions.h: Update comments to avoid mentioning catch_errors.
2113 (catch_errors_ftype, catch_errors): Delete.
2114 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2115 (hook_stop_stub): Delete.
2116 (restore_selected_frame): Change return type to void, and
2117 parameter type to const frame_id &.
2118 (restore_infcall_control_state): Use TRY/CATCH instead of
2119 catch_errors.
2120 * main.c (captured_command_loop): Return void and remove
2121 parameter. Remove references to catch_errors.
2122 (captured_main): Use TRY/CATCH instead of catch_errors.
2123 * objc-lang.c (objc_submethod_helper_data)
2124 (find_objc_msgcall_submethod_helper): Delete.
2125 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2126 catch_errors.
2127 * record-full.c (record_full_message): Return void.
2128 (record_full_message_args, record_full_message_wrapper): Delete.
2129 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2130 instead of catch_errors.
2131 * solib-aix.c (solib_aix_open_symbol_file_object): Change
2132 parameter type to int.
2133 * solib-darwin.c (open_symbol_file_object): Ditto.
2134 * solib-dsbt.c (open_symbol_file_object): Ditto.
2135 * solib-frv.c (open_symbol_file_object): Ditto.
2136 * solib-svr4.c (open_symbol_file_object): Ditto.
2137 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2138 * solib.c (update_solib_list): Use TRY/CATCH instead of
2139 catch_errors.
2140 * solist.h (struct target_so_ops) <open_symbol_file_object>:
2141 Change type.
2142 * symmisc.c (struct print_symbol_args): Remove.
2143 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2144 (print_symbol): Change type.
2145 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2146 and remove parameters.
2147 (catch_errors): New.
2148 (get_windows_debug_event): Adjust.
2149
2150 2017-10-09 Tom Tromey <tom@tromey.com>
2151
2152 * mi/mi-main.c (free_splay_tree): Remove.
2153 (list_available_thread_groups): Use splay_tree_up.
2154 * common/gdb_splay_tree.h: New file.
2155
2156 2017-10-09 Tom Tromey <tom@tromey.com>
2157
2158 * mi/mi-main.c (do_nothing): Remove.
2159 (list_available_thread_groups): Update.
2160
2161 2017-10-09 Pedro Alves <palves@redhat.com>
2162
2163 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2164 reading registers when switching context.
2165
2166 2017-10-09 John Baldwin <jhb@FreeBSD.org>
2167
2168 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2169 (fbsd_convert_siginfo): Likewise.
2170 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2171
2172 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
2173
2174 * configure.ac (try_guile_versions): Remove guile-2.2.
2175 * configure: Regenerate.
2176
2177 2017-10-09 Tom Tromey <tom@tromey.com>
2178
2179 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2180 (COMPILE.pre): Use $(CXX).
2181
2182 2017-10-09 Pedro Alves <palves@redhat.com>
2183
2184 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2185 Use bool.
2186 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2187 * cp-support.h (cp_remove_params): Now returns a
2188 gdb::unique_xmalloc_ptr.
2189 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2190 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2191 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2192 returning a gdb::unique_xmalloc_ptr.
2193 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2194 * stack.c (find_frame_funname): Adjust to cp_remove_params
2195 returning a gdb::unique_xmalloc_ptr.
2196
2197 2017-10-08 Tom Tromey <tom@tromey.com>
2198
2199 * dwarf2read.c (dwarf2_get_dwz_file): Use
2200 gdb::unique_xmalloc_ptr.
2201 (find_slot_in_mapped_hash): Likewise.
2202 (dwarf2_physname): Likewise.
2203 (create_dwo_unit_in_dwp_v1): Use std::string.
2204 (create_dwo_unit_in_dwp_v2): Likewise.
2205 (lookup_dwo_cutu): Likewise.
2206 (inherit_abstract_dies): Use std::vector.
2207 (read_array_type): Likewise.
2208 (dwarf_decode_macros): Remove unused declaration.
2209 (unsigned_int_compar): Remove.
2210 (dwarf2_build_psymtabs_hard): Use scoped_restore.
2211 (psymtabs_addrmap_cleanup): Remove.
2212
2213 2017-10-08 Tom Tromey <tom@tromey.com>
2214
2215 * frame-unwind.c (frame_unwind_try_unwinder): Update.
2216 * frame.h (frame_cleanup_after_sniffer): Declare.
2217 (frame_prepare_for_sniffer): Return void.
2218 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
2219 type of argument.
2220 (frame_prepare_for_sniffer): Return void.
2221
2222 2017-10-08 Tom Tromey <tom@tromey.com>
2223
2224 * utils.h (make_cleanup_value_free): Remove.
2225 * utils.c (do_value_free, struct cleanup): Remove.
2226 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2227 Use gdb_value_up.
2228 * value.h (struct value_deleter): New.
2229 (gdb_value_up): New typedef.
2230
2231 2017-10-08 Tom Tromey <tom@tromey.com>
2232
2233 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2234 (make_cleanup_free_search_symbols): Remove.
2235 (search_symbols): Return std::vector.
2236 (symbol_search::compare_search_syms): Now member of
2237 symbol_search. Change arguments.
2238 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
2239 (symtab_symbol_info, rbreak_command): Update.
2240 * symtab.h (struct symbol_search) <next>: Remove.
2241 Add constructors.
2242 (symbol_search::operator<): New function.
2243 (symbol_search::operator==): New function.
2244 (search_symbols): Remove std::vector.
2245 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2246 (symbol_search::compare_search_syms): Declare.
2247
2248 2017-10-06 Yao Qi <yao.qi@linaro.org>
2249
2250 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2251 arch/aarch64-insn.o.
2252 Remove one rule.
2253 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2254
2255 2017-10-06 Yao Qi <yao.qi@linaro.org>
2256
2257 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2258 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2259 arch/arm-linux.o respectively.
2260 * configure.tgt: Likewise.
2261
2262 2017-10-06 Yao Qi <yao.qi@linaro.org>
2263
2264 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2265 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2266
2267 2017-10-06 Pedro Alves <palves@redhat.com>
2268
2269 * windows-nat.c: Include <algorithm>.
2270
2271 2017-10-06 Yao Qi <yao.qi@linaro.org>
2272
2273 * configure.tgt (i386_tobjs): New variable.
2274 (amd64_tobjs): New variable.
2275 Set $cpu_obs and $os_obs.
2276
2277 2017-10-06 Yao Qi <yao.qi@linaro.org>
2278
2279 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2280 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2281 (clean): Remove object files and dependency files.
2282 (distclean): Remove the directory.
2283 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2284 * configure: Re-generated.
2285 * configure.tgt: Replace amd64.o with arch/amd64.o.
2286
2287 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2288
2289 PR build/22188
2290 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2291 and SETEND.
2292
2293 2017-10-05 Pedro Alves <palves@redhat.com>
2294
2295 * linux-nat.c (linux_child_follow_fork): When following the parent
2296 and detaching the child, consult the parent thread's architecture
2297 instead of the child's.
2298
2299 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2300
2301 * ax.h: Do not include "doublest.h".
2302 (union agent_val): Remove.
2303
2304 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2305
2306 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2307 (decimal_to_string): Return std::string object.
2308 (decimal_from_string): Accept std::string object. Return bool.
2309 (decimal_from_integral, decimal_from_doublest): Remove.
2310 (decimal_from_longest): Add prototype.
2311 (decimal_from_ulongest): Likewise.
2312 (decimal_to_longest): Likewise.
2313 (decimal_from_doublest): Likewise.
2314 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2315 (MAX_DECIMAL_STRING): Move here.
2316 (decimal_to_string): Return std::string object.
2317 (decimal_from_string): Accept std::string object. Return bool.
2318 (decimal_from_integral): Remove, replace by ...
2319 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2320 (decimal_to_longest): New function.
2321 (decimal_from_floating): Remove, replace by ...
2322 (decimal_from_doublest): ... this new function.
2323 (decimal_to_doublest): Update to new decimal_to_string interface.
2324
2325 * value.c (unpack_long): Use decimal_to_longest.
2326 * valops.c (value_cast): Use decimal_from_doublest instead of
2327 decimal_from_floating. Use decimal_from_[u]longest isntead of
2328 decimal_from_integral.
2329 * valarith.c (value_args_as_decimal): Likewise.
2330 * valprint.c (print_decimal_floating): Update to new
2331 decimal_to_string interface.
2332 * printcmd.c (printf_decfloat): Likewise.
2333 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2334
2335 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2336
2337 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2338 * gdbtypes.c: Include "floatformat.h".
2339 * value.c: Likewise.
2340 * m68k-tdep.c: Likewise.
2341
2342 * findvar.c: Do not include "floatformat.h".
2343 * amd64-darwin-tdep.c: Likewise.
2344 * arm-linux-tdep.c: Likewise.
2345 * i386-darwin-tdep.c: Likewise.
2346 * i387-tdep.c: Likewise.
2347 * m68k-linux-tdep.c: Likewise.
2348 * mep-tdep.c: Likewise.
2349 * mips-tdep.c: Likewise.
2350 * nios2-tdep.c: Likewise.
2351 * s390-linux-tdep.c: Likewise.
2352 * sparc-obsd-tdep.c: Likewise.
2353 * sparc-tdep.c: Likewise.
2354 * sparc64-tdep.c: Likewise.
2355 * spu-tdep.c: Likewise.
2356 * tic6x-tdep.c: Likewise.
2357 * tilegx-tdep.c: Likewise.
2358 * vax-tdep.c: Likewise.
2359 * xstormy16-tdep.c: Likewise.
2360 * xtensa-tdep.c: Likewise.
2361
2362 * top.c: Do not include "doublest.h".
2363 * aarch64-tdep.c: Likewise.
2364 * alpha-tdep.c: Likewise.
2365 * arm-linux-tdep.c: Likewise.
2366 * m68k-linux-tdep.c: Likewise.
2367 * tilegx-tdep.c: Likewise.
2368 * xstormy16-tdep.c: Likewise.
2369
2370 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2371
2372 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2373 (mipsn32_fbsd_sigframe): Define.
2374 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2375 for FreeBSD/mipsn32.
2376
2377 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2378
2379 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2380 AT_HWCAP.
2381
2382 2017-10-05 Tristan Gingold <tgingold@free.fr>
2383
2384 * MAINTAINERS (Misc): Update my email address.
2385
2386 2017-10-04 Pedro Alves <palves@redhat.com>
2387
2388 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2389 it instead of target_gdbarch.
2390 (get_remote_state, get_remote_packet_size): Adjust
2391 get_remote_arch_state calls, passing down target_gdbarch
2392 explicitly.
2393 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2394 'gdbarch' and use it instead of target_gdbarch.
2395 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2396 passing down target_gdbarch explicitly.
2397 (struct stop_reply) <arch>: New field.
2398 (remote_parse_stop_reply): Use the stopped thread's architecture,
2399 not the current inferior's. Save the architecture in the
2400 stop_reply.
2401 (process_stop_reply): Use the stop reply's architecture.
2402 (process_g_packet, remote_fetch_registers)
2403 (remote_prepare_to_store, store_registers_using_G)
2404 (remote_store_registers): Adjust get_remote_arch_state calls,
2405 using the regcache's architecture.
2406 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2407 passing down target_gdbarch explicitly.
2408 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2409 beneath instead of calling target_gdbarch.
2410 * target.c (default_thread_architecture): Use the specified
2411 inferior's architecture, instead of the current inferior's
2412 architecture (via target_gdbarch).
2413
2414 2017-10-04 Pedro Alves <palves@redhat.com>
2415
2416 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2417 case.
2418 (regcache_print): Handle !target_has_registers here instead.
2419
2420 2017-10-04 Pedro Alves <palves@redhat.com>
2421
2422 * frame.c (create_test_frame): Delete.
2423 * frame.h (create_test_frame): Delete.
2424 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2425 (class regcache_test): Delete.
2426 (test_target_has_registers, test_target_has_stack)
2427 (test_target_has_memory, test_target_prepare_to_store)
2428 (test_target_store_registers): New functions.
2429 (test_target_ops): New class.
2430 (register_to_value_test): Error out if there's already a
2431 process_stratum (or higher) target pushed. Create a fuller mock
2432 environment, with mock target_ops, inferior, address space, thread
2433 and inferior_ptid.
2434 * progspace.c (struct address_space): Move to ...
2435 * progspace.h (struct address_space): ... here.
2436 * regcache.h (regcache::~regcache, regcache::raw_write)
2437 [GDB_SELF_TEST]: No longer virtual.
2438
2439 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2442
2443 2017-10-04 Pedro Alves <palves@redhat.com>
2444
2445 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2446 out of 'between TRY and CATCH'.
2447
2448 2017-10-04 Pedro Alves <palves@redhat.com>
2449
2450 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2451 * common/common-exceptions.h (TRY): Open an outermost scope.
2452 Expand intro comment.
2453 (CATCH): Reindent.
2454 (END_CATCH): Close the outermost scope.
2455 * completer.c (complete_line_internal): Add missing END_CATCH.
2456
2457 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2458
2459 * NEWS (Changes since GDB 8.0): Add entry about new
2460 'set-cwd-on-gdbserver' feature.
2461 (New remote packets): Add entry for QSetWorkingDir.
2462 * common/common-inferior.h (set_inferior_cwd): New prototype.
2463 * infcmd.c (set_inferior_cwd): Remove "static".
2464 (show_cwd_command): Expand text to include remote debugging.
2465 * remote.c: Add PACKET_QSetWorkingDir.
2466 (remote_protocol_features) <QSetWorkingDir>: New entry for
2467 PACKET_QSetWorkingDir.
2468 (extended_remote_set_inferior_cwd): New function.
2469 (extended_remote_create_inferior): Call
2470 "extended_remote_set_inferior_cwd".
2471 (_initialize_remote): Call "add_packet_config_cmd" for
2472 QSetWorkingDir.
2473
2474 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2475
2476 * NEWS (New commands): Mention "set/show cwd".
2477 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2478 "cd" command's help text.
2479 * common/common-inferior.h (get_inferior_cwd): New prototype.
2480 * infcmd.c (inferior_cwd_scratch): New global variable.
2481 (set_inferior_cwd): New function.
2482 (get_inferior_cwd): Likewise.
2483 (set_cwd_command): Likewise.
2484 (show_cwd_command): Likewise.
2485 (_initialize_infcmd): Add "set/show cwd" commands.
2486 * inferior.h (class inferior) <cwd>: New field.
2487 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2488 (fork_inferior): Change inferior's cwd before its execution.
2489 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2490 to CreateProcess.
2491
2492 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2493
2494 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2495 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2496 (COMMON_OBS): Add gdb_tilde_expand.o.
2497 * common/gdb_tilde_expand.c: New file.
2498 * common/gdb_tilde_expand.h: Likewise.
2499
2500 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2501
2502 * gdbarch.sh (objfile): Remove duplicate declaration.
2503 * gdbarch.h: Regenerate.
2504
2505 2017-10-03 Tom Tromey <tom@tromey.com>
2506
2507 * utils.c (internal_vproblem): Use string_vprintf.
2508
2509 2017-10-03 Tom Tromey <tom@tromey.com>
2510
2511 * printcmd.c (info_symbol_command): Use std::string.
2512
2513 2017-10-03 Tom Tromey <tom@tromey.com>
2514
2515 * top.c (gdb_safe_append_history): Use std::string.
2516
2517 2017-10-03 Tom Tromey <tom@tromey.com>
2518
2519 * event-top.c (stdin_event_handler): Update.
2520 * main.c (captured_main_1): Update.
2521 * top.h (make_delete_ui_cleanup): Remove.
2522 (struct ui): Add constructor and destructor.
2523 (new_ui, delete_ui): Remove.
2524 * top.c (make_delete_ui_cleanup): Remove.
2525 (new_ui_command): Use std::unique_ptr.
2526 (delete_ui_cleanup): Remove.
2527 (ui::ui): Rename from new_ui. Update.
2528 (free_ui): Remove.
2529 (ui::~ui): Rename from delete_ui. Update.
2530
2531 2017-10-03 Tom Tromey <tom@tromey.com>
2532
2533 * symfile.c (load_progress): Use gdb::byte_vector.
2534
2535 2017-10-03 Tom Tromey <tom@tromey.com>
2536
2537 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2538 declaration.
2539 * printcmd.c (x_command): Remove unused declaration.
2540 * symfile.c (symbol_file_command): Remove unused declaration.
2541
2542 2017-10-03 Tom Tromey <tom@tromey.com>
2543
2544 * utils.c (internal_vproblem): Use std::string.
2545 (defaulted_query): Likewise.
2546
2547 2017-10-03 Tom Tromey <tom@tromey.com>
2548
2549 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2550 * top.c (execute_command_to_string): Update.
2551 * utils.c (make_cleanup_restore_page_info): Remove.
2552 (do_restore_page_info_cleanup): Remove.
2553 (set_batch_flag_and_restore_page_info):
2554 New.
2555 (make_cleanup_restore_page_info): Remove.
2556 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2557 (~set_batch_flag_and_restore_page_info): New
2558 (make_cleanup_restore_uinteger): Remove.
2559 (make_cleanup_restore_integer): Remove.
2560 (struct restore_integer_closure): Remove.
2561 (restore_integer): Remove.
2562 * utils.h (struct set_batch_flag_and_restore_page_info): New
2563 class.
2564 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2565 (make_cleanup_restore_page_info): Remove.
2566 (make_cleanup_restore_uinteger) Remove.
2567 (make_cleanup_restore_integer) Remove.
2568
2569 2017-10-03 Tom Tromey <tom@tromey.com>
2570
2571 * record-full.h (record_full_gdb_operation_disable_set): Return
2572 scoped_restore_tmpl<int>.
2573 * infrun.c (adjust_pc_after_break): Update.
2574 (handle_signal_stop): Update.
2575 * record-full.c (record_full_gdb_operation_disable_set): Return
2576 scoped_restore_tmpl<int>.
2577 (record_full_wait_1, record_full_insert_breakpoint)
2578 (record_full_remove_breakpoint, record_full_save)
2579 (record_full_goto_insn): Update.
2580
2581 2017-10-02 Tom Tromey <tom@tromey.com>
2582
2583 PR rust/22236:
2584 * rust-lang.c (rust_val_print_str): New function.
2585 (val_print_struct): Call it.
2586 (rust_subscript): Preserve name of slice type.
2587
2588 2017-10-02 Tom Tromey <tom@tromey.com>
2589
2590 * rust-lang.c (rust_subscript): Handle slices in
2591 EVAL_AVOID_SIDE_EFFECTS case.
2592
2593 2017-10-02 Tom Tromey <tom@tromey.com>
2594
2595 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2596
2597 2017-10-02 Tom Tromey <tom@tromey.com>
2598
2599 * rust-lang.h (rust_slice_type): Add "extern".
2600
2601 2017-10-02 Tom Tromey <tom@tromey.com>
2602 Pedro Alves <palves@redhat.com>
2603
2604 * ada-lang.h (ada_exc_info::operator<): Make const.
2605 (ada_exc_info::operator==): Make const.
2606 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2607 Make const.
2608
2609 2017-09-29 Tom Tromey <tom@tromey.com>
2610
2611 * target.c (read_whatever_is_readable): Change type of "result".
2612 Update.
2613 (free_memory_read_result_vector): Remove.
2614 (read_memory_robust): Change return type. Update.
2615 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2616 bin2hex, std::string.
2617 * target.h (memory_read_result_s): Remove typedef.
2618 (free_memory_read_result_vector): Remove.
2619 (read_memory_robust): Return std::vector.
2620
2621 2017-09-29 Tom Tromey <tom@tromey.com>
2622
2623 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2624
2625 2017-09-29 Tom Tromey <tom@tromey.com>
2626
2627 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2628 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2629 operator< and operator==.
2630 (ada_exceptions_list): Return a std::vector.
2631 * ada-lang.c (ada_exc_info::operator<): Rename from
2632 compare_ada_exception_info.
2633 (ada_exc_info::operator==): New.
2634 (sort_remove_dups_ada_exceptions_list): Change type of
2635 "exceptions".
2636 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2637 (ada_add_global_exceptions): Likewise.
2638 (ada_exceptions_list_1): Return a std::vector.
2639 (ada_exceptions_list): Likewise.
2640
2641 2017-09-29 Tom Tromey <tom@tromey.com>
2642
2643 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2644 'std::set *'.
2645 (print_one_inferior): Update.
2646 (free_vector_of_ints): Remove.
2647 (list_available_thread_groups): Change "ids" to std::set.
2648 (mi_cmd_list_thread_groups): Update.
2649 (struct collect_cores_data) <core>: Now a std::set.
2650 (collect_cores): Update.
2651 (unique): Remove.
2652 (print_one_inferior): Update.
2653
2654 2017-09-29 Tom Tromey <tom@tromey.com>
2655
2656 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2657 (mi_execute_async_cli_command): Likewise.
2658 (mi_cmd_trace_frame_collected): Use field_fmt.
2659
2660 2017-09-29 Tom Tromey <tom@tromey.com>
2661
2662 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2663 gdb::byte_vector.
2664
2665 2017-09-29 Tom Tromey <tom@tromey.com>
2666
2667 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2668
2669 2017-09-29 Tom Tromey <tom@tromey.com>
2670
2671 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2672
2673 2017-09-29 Tom Tromey <tom@tromey.com>
2674
2675 * varobj.h (varobj_gen_name): Return std::string.
2676 * varobj.c (varobj_gen_name): Return std::string.
2677 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2678 (mi_cmd_var_delete): Don't copy "name".
2679
2680 2017-09-29 Tom Tromey <tom@tromey.com>
2681
2682 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2683 (mi_cmd_break_insert_1): Update.
2684
2685 2017-09-29 Tom Tromey <tom@tromey.com>
2686
2687 * target.h (make_scoped_defer_target_commit_resume): Update.
2688 * target.c (make_scoped_defer_target_commit_resume): Rename from
2689 make_cleanup_defer_target_commit_resume. Return a
2690 scoped_restore.
2691 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2692
2693 2017-09-29 Tom Tromey <tom@tromey.com>
2694
2695 * main.c (captured_main_1): Remove unused declaration.
2696 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2697
2698 2017-09-29 Tom Tromey <tom@tromey.com>
2699
2700 * symtab.c (search_symbols): Remove unused outer cleanup.
2701 (make_source_files_completion_list): Remove unused declaration.
2702
2703 2017-09-29 Tom Tromey <tom@tromey.com>
2704
2705 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2706
2707 2017-09-29 Tom Tromey <tom@tromey.com>
2708
2709 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2710 gdb::byte_vector.
2711
2712 2017-09-29 Tom Tromey <tom@tromey.com>
2713
2714 * complaints.c (vcomplaint): Use std::string.
2715
2716 2017-09-29 Tom Tromey <tom@tromey.com>
2717
2718 * tracepoint.c (trace_variable_command): Use std::string.
2719 (encode_actions_1): Remove unused declarations.
2720 (create_tsv_from_upload): Use std::string.
2721
2722 2017-09-29 Tom Tromey <tom@tromey.com>
2723
2724 * cp-support.c (gdb_demangle): Use std::string.
2725
2726 2017-09-29 Tom Tromey <tom@tromey.com>
2727
2728 * stack.c (parse_frame_specification): Use std::string
2729 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2730
2731 2017-09-29 Tom Tromey <tom@tromey.com>
2732
2733 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2734
2735 2017-09-29 Tom Tromey <tom@tromey.com>
2736
2737 * utils.c (vfprintf_maybe_filtered): Use std::string.
2738 (vfprintf_unfiltered): Likewise.
2739
2740 2017-09-29 Tom Tromey <tom@tromey.com>
2741
2742 * event-top.c (top_level_prompt): Return std::string.
2743 (display_gdb_prompt): Update.
2744
2745 2017-09-29 Tom Tromey <tom@tromey.com>
2746
2747 * unittests/common-utils-selftests.c (format): New function.
2748 (string_vprintf_tests): New function.
2749 (_initialize_common_utils_selftests): Register new tests.
2750 * common/common-utils.c (string_vprintf): New function.
2751 * common/common-utils.h (string_vprintf): Declare.
2752
2753 2017-09-29 Pedro Alves <palves@redhat.com>
2754
2755 * common/rsp-low.c (unpack_varlen_hex): Constify.
2756 * common/rsp-low.h (unpack_varlen_hex): Constify.
2757 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2758 Constify.
2759 * remote.c (remote_set_permissions, read_ptid)
2760 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2761 (remote_static_tracepoint_marker_at)
2762 (remote_static_tracepoint_markers_by_strid)
2763 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2764 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2765 (parse_tracepoint_definition, parse_tsv_definition)
2766 (parse_static_tracepoint_marker_definition): Constify.
2767 * tracepoint.h (parse_static_tracepoint_marker_definition)
2768 (parse_trace_status, parse_tracepoint_status)
2769 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2770
2771 2017-09-29 Pedro Alves <palves@redhat.com>
2772
2773 * remote.c (target_buf, target_buf_size): Delete.
2774 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2775 Use the connection's packet buffer instead.
2776 All callers adjusted.
2777 (_initialize_remote): Remove references to target_buf and
2778 target_buf_size.
2779
2780 2017-09-28 Pedro Alves <palves@redhat.com>
2781
2782 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2783 unittests/common-utils-selftests.c.
2784 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2785 (COMMON_OBS): Remove utils-selftests.o.
2786 * utils-selftests.c: Move to ...
2787 * unittests/common-utils-selftests.c: ... here and rename self
2788 test to "string_printf".
2789
2790 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2791
2792 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2793 having NULL cus or tus.
2794
2795 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2796
2797 * arm-tdep.c: (convert_from_extended): Remove.
2798 (convert_to_extended): Likewise.
2799 (arm_extract_return_value): Use convert_typed_floating.
2800 (arm_store_return_value): Likewise.
2801
2802 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2803 * sh-tdep.c: Do not include "floatformat.h".
2804 (sh_littlebyte_bigword_type): New function.
2805 (sh_register_convert_to_virtual): Use convert_typed_floating.
2806 (sh_register_convert_to_raw): Likewise.
2807 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2808 (sh64_littlebyte_bigword_type): New function.
2809 (sh64_extract_return_value): Use convert_typed_floating.
2810 (sh64_register_convert_to_virtual): Likewise.
2811 (sh64_register_convert_to_raw): Likewise.
2812
2813 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2814
2815 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2816 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2817
2818 * gdbtypes.h (union type_specific): Make field floatformat hold
2819 just a single struct floatformat, not an array.
2820 (floatformat_from_type): Move here.
2821 * gdbtypes.c (floatformat_from_type): Move here. Update to
2822 changed TYPE_FLOATFORMAT definition.
2823 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2824 (recursive_dump_type): Likewise.
2825 (init_float_type): Install correct floatformat for byte order.
2826 (arch_float_type): Likewise.
2827
2828 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2829
2830 * gdbtypes.c (init_type): Change incoming argument from
2831 length-in-bytes to length-in-bits. Assert length is a
2832 multiple of TARGET_CHAR_BITS.
2833 (arch_type, arch_flags_type): Likewise.
2834 (init_integer_type): Update call to init_type.
2835 (init_character_type): Likewise.
2836 (init_boolean_type): Likewise.
2837 (init_float_type): Likewise.
2838 (init_decfloat_type): Likewise.
2839 (init_complex_type): Likewise.
2840 (init_pointer_type): Likewise.
2841 (objfile_type): Likewise.
2842 (arch_integer_type): Update call to arch_type.
2843 (arch_character_type): Likewise.
2844 (arch_boolean_type): Likewise.
2845 (arch_float_type): Likewise.
2846 (arch_decfloat_type): Likewise.
2847 (arch_complex_type): Likewise.
2848 (arch_pointer_type): Likewise.
2849 (gdbtypes_post_init): Likewise.
2850
2851 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2852 (read_base_type): Likewise.
2853 * mdebugread.c (basic_type): Likewise.
2854 * stabsread.c (dbx_init_float_type): Likewise.
2855 (rs6000_builtin_type): Likewise.
2856 (read_range_type): Likewise. Also, fix call to init_integer_type
2857 with erroneous length argument.
2858
2859 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2860 * d-lang.c (build_d_types): Likewise.
2861 * f-lang.c (build_fortran_types): Likewise.
2862 * go-lang.c (build_go_types): Likewise.
2863 * opencl-lang.c (build_opencl_types): Likewise.
2864 * jit.c (finalize_symtab): Likewise.
2865 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2866 (build_std_type_info_type): Likewise.
2867 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2868 update call to arch_flags_type.
2869
2870 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2871 arch_type.
2872 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2873 * windows-tdep.c (windows_get_tlb_type): Likewise.
2874
2875 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2876 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2877 * m32c-tdep.c (make_types): Likewise.
2878 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2879 (rl78_psw_type): Update call to arch_flags_type.
2880 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2881 * rx-tdep.c (rx_psw_type): Likewise.
2882 (rx_fpsw_type): Likewise.
2883 * sparc-tdep.c (sparc_psr_type): Likewise.
2884 (sparc_fsr_type): Likewise.
2885 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2886 (sparc64_ccr_type): Likewise.
2887 (sparc64_fsr_type): Likewise.
2888 (sparc64_fprs_type): Likewise.
2889
2890 2017-09-27 Tom Tromey <tom@tromey.com>
2891
2892 * findcmd.c (find_command): Constify.
2893
2894 2017-09-27 Tom Tromey <tom@tromey.com>
2895
2896 * ada-tasks.c (task_command_1, task_command): Constify.
2897
2898 2017-09-27 Tom Tromey <tom@tromey.com>
2899
2900 * symtab.c (maintenance_print_symbol_cache)
2901 (maintenance_flush_symbol_cache)
2902 (maintenance_print_symbol_cache_statistics): Constify.
2903
2904 2017-09-27 Tom Tromey <tom@tromey.com>
2905
2906 * inferior.c (detach_inferior_command, kill_inferior_command)
2907 (inferior_command): Constify.
2908
2909 2017-09-27 Tom Tromey <tom@tromey.com>
2910
2911 * regcache.c (regcache_print, maintenance_print_registers)
2912 (maintenance_print_raw_registers)
2913 (maintenance_print_cooked_registers)
2914 (maintenance_print_register_groups)
2915 (maintenance_print_remote_registers): Constify.
2916
2917 2017-09-27 Tom Tromey <tom@tromey.com>
2918
2919 * printcmd.c (map_display_numbers, undisplay_command)
2920 (enable_disable_display_command, enable_display_command)
2921 (disable_display_command): Constify.
2922
2923 2017-09-27 Tom Tromey <tom@tromey.com>
2924
2925 * breakpoint.h (delete_command): Don't declare.
2926 * breakpoint.c (delete_command, enable_once_command)
2927 (enable_count_command, enable_delete_command, breakpoint_1)
2928 (maintenance_info_breakpoints, stopin_command, stopat_command)
2929 (delete_command, delete_trace_command, save_breakpoints)
2930 (save_breakpoints_command, save_tracepoints_command): Constify.
2931
2932 2017-09-27 Tom Tromey <tom@tromey.com>
2933
2934 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2935 (skip_ws, extract_identifier, macro_define_command)
2936 (macro_undef_command, macro_list_command): Constify.
2937
2938 2017-09-27 Tom Tromey <tom@tromey.com>
2939
2940 * infcmd.c (environment_info, set_environment_command)
2941 (unset_environment_command, path_info, info_proc_cmd_1)
2942 (info_proc_cmd_mappings, info_proc_cmd_stat)
2943 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2944 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2945
2946 2017-09-27 Tom Tromey <tom@tromey.com>
2947
2948 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2949 Constify.
2950
2951 2017-09-27 Tom Tromey <tom@tromey.com>
2952
2953 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2954
2955 2017-09-27 Tom Tromey <tom@tromey.com>
2956
2957 * demangle.c (demangle_command): Constify.
2958
2959 2017-09-27 Tom Tromey <tom@tromey.com>
2960
2961 * progspace.c (maintenance_info_program_spaces_command):
2962 Constify.
2963
2964 2017-09-27 Tom Tromey <tom@tromey.com>
2965
2966 * compile/compile.c (check_raw_argument, compile_file_command)
2967 (compile_code_command, compile_print_command): Constify.
2968
2969 2017-09-27 Tom Tromey <tom@tromey.com>
2970
2971 * reggroups.c (maintenance_print_reggroups): Constify.
2972
2973 2017-09-27 Tom Tromey <tom@tromey.com>
2974
2975 * dwarf2read.c (save_gdb_index_command): Constify.
2976
2977 2017-09-27 Tom Tromey <tom@tromey.com>
2978
2979 * stap-probe.c (info_probes_stap_command): Constify.
2980
2981 2017-09-27 Tom Tromey <tom@tromey.com>
2982
2983 * fork-child.c (unset_exec_wrapper_command): Constify.
2984
2985 2017-09-27 Tom Tromey <tom@tromey.com>
2986
2987 * btrace.c (get_uint, get_context_size, no_chunk)
2988 (maint_btrace_packet_history_cmd)
2989 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2990 (maint_info_btrace_cmd): Constify.
2991
2992 2017-09-27 Tom Tromey <tom@tromey.com>
2993
2994 * reverse.c (delete_bookmark_command): Constify.
2995
2996 2017-09-27 Tom Tromey <tom@tromey.com>
2997
2998 * remote.c (set_memory_packet_size)
2999 (set_memory_write_packet_size, show_memory_write_packet_size)
3000 (set_memory_read_packet_size, show_memory_read_packet_size)
3001 (compare_sections_command, packet_command, remote_put_command)
3002 (remote_get_command, remote_delete_command): Constify.
3003
3004 2017-09-27 Tom Tromey <tom@tromey.com>
3005
3006 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3007 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3008 (set_mipsfpu_auto_command): Constify.
3009
3010 2017-09-27 Tom Tromey <tom@tromey.com>
3011
3012 * cli/cli-cmds.h (cd_command): Constify.
3013 * cli/cli-cmds.c (cd_command): Constify.
3014
3015 2017-09-27 Tom Tromey <tom@tromey.com>
3016
3017 * thread.c (thread_name_command, thread_find_command): Constify.
3018
3019 2017-09-27 Tom Tromey <tom@tromey.com>
3020
3021 * probe.c (enable_probes_command, disable_probes_command):
3022 Constify.
3023
3024 2017-09-27 Tom Tromey <tom@tromey.com>
3025
3026 * symfile.c (symbol_file_command): Constify.
3027 * gdbcore.h (deprecated_file_changed_hook): Constify.
3028 * exec.c (deprecated_file_changed_hook, exec_file_command)
3029 (file_command): Constify.
3030 * defs.h (symbol_file_command): Constify.
3031
3032 2017-09-27 Tom Tromey <tom@tromey.com>
3033
3034 * remote-fileio.c (set_system_call_allowed)
3035 (show_system_call_allowed): Constify.
3036
3037 2017-09-27 Tom Tromey <tom@tromey.com>
3038
3039 * tracepoint.c (delete_trace_variable_command)
3040 (tfind_end_command, tfind_start_command, tfind_pc_command)
3041 (tfind_tracepoint_command, tfind_line_command)
3042 (tfind_range_command, tfind_outside_command): Constify.
3043
3044 2017-09-27 Tom Tromey <tom@tromey.com>
3045
3046 * ax-gdb.c (maint_agent_printf_command, agent_command)
3047 (agent_eval_command): Constify.
3048
3049 2017-09-27 Tom Tromey <tom@tromey.com>
3050
3051 * tracepoint.c (info_scope_command): Constify.
3052 * python/python.c (gdbpy_decode_line): Constify.
3053 * python/py-breakpoint.c (bppy_init): Constify.
3054 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3055 * location.h: (new_linespec_location)
3056 (string_to_event_location_basic, string_to_event_location):
3057 Constify.
3058 * location.c (new_linespec_location)
3059 (string_to_event_location_basic, string_to_event_location):
3060 Constify.
3061 * linespec.h (decode_line_with_current_source)
3062 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3063 * linespec.c (linespec_lex_to_end)
3064 (decode_line_with_current_source)
3065 (decode_line_with_last_displayed): Constify.
3066 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3067 Constify.
3068 * cli/cli-cmds.c (edit_command, list_command): Constify.
3069 * breakpoint.h (until_break_command, watch_command_wrapper)
3070 (awatch_command_wrapper, rwatch_command_wrapper)
3071 (init_ada_exception_breakpoint): Constify.
3072 * breakpoint.c (break_command_1, dprintf_command)
3073 (break_range_command, watch_command_wrapper)
3074 (rwatch_command_wrapper, awatch_command_wrapper)
3075 (until_break_command, init_ada_exception_breakpoint)
3076 (strace_marker_create_sals_from_location, trace_command)
3077 (ftrace_command, strace_command, struct tracepoint): Constify.
3078 * ax-gdb.c (agent_command_1): Constify.
3079 * ada-lang.c (ada_exception_sal): Constify.
3080
3081 2017-09-27 Tom Tromey <tom@tromey.com>
3082
3083 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3084 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3085 (get_context_size, no_chunk, get_insn_history_modifiers)
3086 (cmd_record_insn_history, get_call_history_modifiers)
3087 (cmd_record_call_history): Constify.
3088
3089 2017-09-27 Tom Tromey <tom@tromey.com>
3090
3091 * source.c (show_substitute_path_command)
3092 (unset_substitute_path_command, set_substitute_path_command):
3093 Constify.
3094
3095 2017-09-27 Tom Tromey <tom@tromey.com>
3096
3097 * typeprint.c (maintenance_print_type): Constify.
3098 * maint.c (maintenance_dump_me, maintenance_demangle)
3099 (maintenance_time_display, maintenance_info_sections)
3100 (maintenance_print_statistics, maintenance_deprecate)
3101 (maintenance_undeprecate): Constify.
3102 (maintenance_do_deprecate): Constify. Use std::string.
3103 (maintenance_selftest): Constify.
3104 * gdbtypes.h (maintenance_print_type): Constify.
3105
3106 2017-09-27 Tom Tromey <tom@tromey.com>
3107
3108 * hppa-tdep.c (unwind_command): Constify.
3109
3110 2017-09-27 Tom Tromey <tom@tromey.com>
3111
3112 * target-descriptions.c (unset_tdesc_filename_cmd)
3113 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3114 Constify.
3115
3116 2017-09-27 Tom Tromey <tom@tromey.com>
3117
3118 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3119
3120 2017-09-27 Tom Tromey <tom@tromey.com>
3121
3122 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3123
3124 2017-09-27 Tom Tromey <tom@tromey.com>
3125
3126 * tui/tui-regs.c (tui_reg_command): Constify.
3127
3128 2017-09-27 Tom Tromey <tom@tromey.com>
3129
3130 * skip.c (skip_file_command, skip_function_command)
3131 (skip_enable_command, skip_disable_command, skip_delete_command):
3132 Constify.
3133
3134 2017-09-27 Tom Tromey <tom@tromey.com>
3135
3136 * record-btrace.c (cmd_record_btrace_bts_start)
3137 (cmd_record_btrace_pt_start): Constify.
3138
3139 2017-09-27 Tom Tromey <tom@tromey.com>
3140
3141 * symmisc.c (maintenance_print_symbols)
3142 (maintenance_print_msymbols, maintenance_print_objfiles)
3143 (maintenance_info_symtabs, maintenance_check_symtabs)
3144 (maintenance_expand_symtabs, maintenance_info_line_tables):
3145 Constify.
3146
3147 2017-09-27 Tom Tromey <tom@tromey.com>
3148
3149 * top.c (new_ui_command): Constify.
3150
3151 2017-09-27 Tom Tromey <tom@tromey.com>
3152
3153 * symfile.c (add_symbol_file_command)
3154 (remove_symbol_file_command, list_overlays_command)
3155 (map_overlay_command, unmap_overlay_command)
3156 (overlay_auto_command, overlay_manual_command)
3157 (overlay_off_command, overlay_load_command): Constify.
3158
3159 2017-09-27 Tom Tromey <tom@tromey.com>
3160
3161 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3162 (info_spu_mailbox_command, info_spu_dma_command)
3163 (info_spu_proxydma_command): Constify.
3164
3165 2017-09-27 Tom Tromey <tom@tromey.com>
3166
3167 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3168
3169 2017-09-27 Tom Tromey <tom@tromey.com>
3170
3171 * cli/cli-script.c (user_defined_command): Constify.
3172
3173 2017-09-27 Tom Tromey <tom@tromey.com>
3174
3175 * cli/cli-dump.c (dump_memory_command, dump_value_command)
3176 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3177 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3178 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3179 (dump_binary_value, append_binary_memory, append_binary_value):
3180 Constify.
3181 (struct dump_context) <func>: Constify.
3182 (add_dump_command): Update.
3183
3184 2017-09-27 Tom Tromey <tom@tromey.com>
3185
3186 * cli/cli-cmds.c (show_version, show_configuration)
3187 (source_command, show_user): Constify.
3188
3189 2017-09-27 Tom Tromey <tom@tromey.com>
3190
3191 * target.c (maintenance_print_target_stack): Constify.
3192
3193 2017-09-27 Tom Tromey <tom@tromey.com>
3194
3195 * interps.c (interpreter_exec_cmd): Constify.
3196
3197 2017-09-27 Tom Tromey <tom@tromey.com>
3198
3199 * record-full.c (cmd_record_full_restore): Constify.
3200
3201 2017-09-27 Tom Tromey <tom@tromey.com>
3202
3203 * memattr.c (enable_mem_command, disable_mem_command)
3204 (delete_mem_command): Constify.
3205
3206 2017-09-27 Tom Tromey <tom@tromey.com>
3207
3208 * value.c (show_convenience): Constify.
3209
3210 2017-09-27 Tom Tromey <tom@tromey.com>
3211
3212 * gdbcore.h (core_file_command): Update.
3213 * corefile.c (core_file_command): Constify.
3214
3215 2017-09-27 Tom Tromey <tom@tromey.com>
3216
3217 * user-regs.c (maintenance_print_user_registers): Constify.
3218
3219 2017-09-27 Tom Tromey <tom@tromey.com>
3220
3221 * cp-namespace.c (maintenance_cplus_namespace): Constify.
3222
3223 2017-09-27 Tom Tromey <tom@tromey.com>
3224
3225 * cp-support.c (first_component_command): Constify.
3226
3227 2017-09-27 Tom Tromey <tom@tromey.com>
3228
3229 * psymtab.c (maintenance_print_psymbols)
3230 (maintenance_info_psymtabs, maintenance_check_psymtabs):
3231 Constify.
3232
3233 2017-09-27 Tom Tromey <tom@tromey.com>
3234
3235 * windows-tdep.c (display_tib): Constify.
3236
3237 2017-09-27 Tom Tromey <tom@tromey.com>
3238
3239 * linux-fork.c (delete_checkpoint_command)
3240 (detach_checkpoint_command): Constify.
3241
3242 2017-09-27 Tom Tromey <tom@tromey.com>
3243
3244 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3245
3246 2017-09-27 Tom Tromey <tom@tromey.com>
3247
3248 * arc-tdep.c (dump_arc_instruction_command): Constify.
3249
3250 2017-09-27 Tom Tromey <tom@tromey.com>
3251
3252 * valprint.c (set_radix, show_radix): Constify.
3253
3254 2017-09-27 Tom Tromey <tom@tromey.com>
3255
3256 * dtrace-probe.c (info_probes_dtrace_command): Constify.
3257
3258 2017-09-27 Tom Tromey <tom@tromey.com>
3259
3260 * command.h (not_just_help_class_command): Update.
3261 * cli/cli-decode.h (not_just_help_class_command): Update.
3262 * cli/cli-decode.c (not_just_help_class_command): Constify.
3263
3264 2017-09-27 Tom Tromey <tom@tromey.com>
3265
3266 * gdb_bfd.c (maintenance_info_bfds): Constify.
3267
3268 2017-09-27 Tom Tromey <tom@tromey.com>
3269
3270 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3271 overloads.
3272 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3273 (do_const_cfunc): New function.
3274 (cmd_cfunc_eq): New overload.
3275 (cli_user_command_p): Check do_const_cfunc.
3276 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3277 const_cfunc.
3278 * command.h (add_cmd): Add const overload and no-function
3279 overload.
3280 (set_cmd_cfunc): Add const overload.
3281 (cmd_const_cfunc_ftype): Declare.
3282 (cmd_cfunc_eq): Add const overload.
3283 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3284 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3285 overload.
3286
3287 2017-09-27 Tom Tromey <tom@tromey.com>
3288
3289 * macroexp.c (get_next_token_for_substitution): New function.
3290 (substitute_args): Call it. Check for __VA_OPT__.
3291
3292 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3293 Pedro Alves <palves@redhat.com>
3294
3295 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3296 producer_is_icc_lt_14.
3297 (producer_is_icc_lt_14): New function.
3298 (check_producer): Add code for checking version of ICC.
3299 (producer_is_icc): Move to producer.c.
3300 (read_structure_type): Restrict ICC workaround to ICC<14.
3301 * producer.c: Include selftest.h.
3302 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3303 New functions.
3304 * producer.h (producer_is_icc): New declaration.
3305
3306 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3307
3308 * Makefile.in (SFILES): Add producer.c.
3309 (COMMON_OBS): Add producer.o
3310 * amd64-tdep.c (producer.h): Add new include.
3311 * dwarf2read.c (producer.h): Add new include.
3312 * producer.c: New file.
3313 * producer.h: New file.
3314 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3315 producer.c.
3316 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3317 producer.h.
3318
3319 2017-09-26 Matthias Klose <doko@ubuntu.com>
3320
3321 * configure.ac: Search ncursesw before ncurses.
3322 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3323 * gdb_curses.h: Include <ncursesw/ncurses.h>
3324 * config.in, configure: Regenerate.
3325
3326 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3327
3328 PR gdb/22185
3329 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3330 obsolete.
3331 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3332 Remove i386sol2 support.
3333 * configure.nat <i386sol2>: Remove.
3334 <sol2-64>: Fold into ...
3335 <sol2>: ... this.
3336 Move common settings to default section.
3337 Add sol-thread.o.
3338 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3339 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3340 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3341 <i[34567]86-*-solaris*>: Remove.
3342 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3343
3344 * configure.ac: Remove wctype in libw check.
3345 (_MSE_INT_H): Don't define on Solaris 7-9.
3346 <solaris*>: Remove libthread_db.so.1 check.
3347 * configure: Regenerate.
3348 * config.in: Regenerate.
3349
3350 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3351 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3352 (gdb_ps_size_t): Remove.
3353 Use base types in users.
3354 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3355
3356 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3357
3358 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3359
3360 PR build/22206
3361 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3362 (adi_is_addr_mapped): Likewise.
3363 (PSR_ICC): Don't redefine.
3364 (PSR_IMPL): Likewise.
3365
3366 2017-09-25 Tom Tromey <tom@tromey.com>
3367
3368 * regcache.c (regcache::dump): Use string_printf.
3369
3370 2017-09-25 Tom Tromey <tom@tromey.com>
3371
3372 * regcache.c (class regcache_invalidator): New.
3373 (struct register_to_invalidate): Remove.
3374 (make_cleanup_regcache_invalidate): Remove.
3375 (regcache::raw_write): Use regcache_invalidator.
3376
3377 2017-09-25 Tom Tromey <tom@tromey.com>
3378
3379 * spu-tdep.c (spu2ppu_sniffer): Update.
3380 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3381 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3382 Remove.
3383 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3384 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3385 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3386 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3387 (frame_pop): Update.
3388
3389 2017-09-25 Tom Tromey <tom@tromey.com>
3390
3391 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3392 * regcache.h (regcache_xfree): Don't declare.
3393 * regcache.c (regcache_xfree): Remove.
3394 (do_regcache_xfree): Use delete.
3395 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3396 * linux-fork.c (free_fork): Use delete.
3397 (fork_save_infrun_state): Likewise.
3398 * jit.c (jit_dealloc_cache): Use delete.
3399 * infrun.c (discard_infcall_suspend_state): Use delete.
3400
3401 2017-09-25 Tom Tromey <tom@tromey.com>
3402
3403 * regcache.h (regcache_xmalloc): Don't declare.
3404 (regcache_raw_set_cached_value): Update comment.
3405 * regcache.c (regcache_xmalloc): Remove.
3406 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3407 * jit.c (jit_frame_sniffer): Use new.
3408 * frame.c (frame_save_as_regcache): Use new.
3409
3410 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3411
3412 * NEWS: Advertise support for guarded-storage registers on IBM z.
3413
3414 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3415
3416 * s390-linux-nat.c (have_regset_gs): New static variable.
3417 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3418 control block and guarded-storage broadcast control regsets.
3419 (s390_read_description): Detect whether the target has
3420 guarded-storage support, return appropriate tdesc.
3421 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3422 (features/s390x-gs-linux64.c): Likewise.
3423 (struct gdbarch_tdep) <have_gs>: New field.
3424 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3425 (s390_gsbc_regset): New variables.
3426 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3427 and s390_gsbc_regset, if applicable.
3428 (s390_core_read_description): Check whether core file was from a
3429 target with guarded-storage support; include appropriate regsets.
3430 (s390_gdbarch_init): Add registers for guarded-storage support.
3431 (_initialize_s390_tdep): Initialize new target descriptions that
3432 include registers for guarded-storage support.
3433 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3434 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3435 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3436 (S390_NUM_REGS): Adjust macro definition.
3437 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3438 (tdesc_s390x_gs_linux64): New declarations.
3439
3440 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3441
3442 * features/s390-gs-linux64.xml: New file.
3443 * features/s390-gs.xml: New file.
3444 * features/s390-gsbc.xml: New file.
3445 * features/s390x-gs-linux64.xml: New file.
3446 * features/Makefile (WHICH): Add s390-gs-linux64 and
3447 s390x-gs-linux64.
3448 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3449 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3450 * features/s390-gs-linux64.c: New generated file.
3451 * features/s390x-gs-linux64.c: New file.
3452 * regformats/s390-gs-linux64.dat: New file.
3453 * regformats/s390x-gs-linux64.dat: New file.
3454
3455 2017-09-23 Tom Tromey <tom@tromey.com>
3456
3457 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3458
3459 2017-09-22 Tom Tromey <tom@tromey.com>
3460
3461 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3462 type to scoped_restore_tmpl.
3463 <scoped_input_handler>: Initialize m_quit_handler directly.
3464
3465 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3466
3467 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3468 (cd_command): Likewise. Free "current_directory" before
3469 assigning to it.
3470 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3471 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3472 * top.c (gdb_dirbuf): Remove global declaration.
3473 * top.h (gdb_dirbuf): Likewise.
3474
3475 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3476
3477 * gnulib/aclocal.m4: Regenerate.
3478 * gnulib/config.in: Regenerate.
3479 * gnulib/configure: Regenerate.
3480 * gnulib/import/Makefile.am: Regenerate.
3481 * gnulib/import/Makefile.in: Regenerate.
3482 * gnulib/import/assure.h: New file.
3483 * gnulib/import/at-func.c: Likewise
3484 * gnulib/import/chdir-long.c: New file.
3485 * gnulib/import/chdir-long.h: New file.
3486 * gnulib/import/cloexec.c: New file.
3487 * gnulib/import/cloexec.h: New file.
3488 * gnulib/import/close.c: New file.
3489 * gnulib/import/closedir.c: New file.
3490 * gnulib/import/dirent-private.h: New file.
3491 * gnulib/import/dup-safer.c: New file.
3492 * gnulib/import/dup.c: New file.
3493 * gnulib/import/dup2.c: New file.
3494 * gnulib/import/error.c: New file.
3495 * gnulib/import/error.h: New file.
3496 * gnulib/import/exitfail.c: New file.
3497 * gnulib/import/exitfail.h: New file.
3498 * gnulib/import/fchdir.c: New file.
3499 * gnulib/import/fcntl.c: New file.
3500 * gnulib/import/fcntl.in.h: New file.
3501 * gnulib/import/fd-hook.c: New file.
3502 * gnulib/import/fd-hook.h: New file.
3503 * gnulib/import/fd-safer.c: New file.
3504 * gnulib/import/fdopendir.c: New file.
3505 * gnulib/import/filename.h: New file.
3506 * gnulib/import/filenamecat-lgpl.c: New file.
3507 * gnulib/import/filenamecat.h: New file.
3508 * gnulib/import/fstat.c: New file.
3509 * gnulib/import/fstatat.c: New file.
3510 * gnulib/import/getcwd-lgpl.c: New file.
3511 * gnulib/import/getcwd.c: New file.
3512 * gnulib/import/getdtablesize.c: New file.
3513 * gnulib/import/getlogin_r.c: New file.
3514 * gnulib/import/getprogname.c: New file.
3515 * gnulib/import/getprogname.h: New file.
3516 * gnulib/import/gettext.h: New file.
3517 * gnulib/import/glob-libc.h: New file.
3518 * gnulib/import/glob.c: New file.
3519 * gnulib/import/glob.in.h: New file.
3520 * gnulib/import/intprops.h: New file.
3521 * gnulib/import/m4/chdir-long.m4: New file.
3522 * gnulib/import/m4/close.m4: New file.
3523 * gnulib/import/m4/closedir.m4: New file.
3524 * gnulib/import/m4/d-ino.m4: New file.
3525 * gnulib/import/m4/d-type.m4: New file.
3526 * gnulib/import/m4/dup.m4: New file.
3527 * gnulib/import/m4/dup2.m4: New file.
3528 * gnulib/import/m4/error.m4: New file.
3529 * gnulib/import/m4/fchdir.m4: New file.
3530 * gnulib/import/m4/fcntl.m4: New file.
3531 * gnulib/import/m4/fcntl_h.m4: New file.
3532 * gnulib/import/m4/fdopendir.m4: New file.
3533 * gnulib/import/m4/filenamecat.m4: New file.
3534 * gnulib/import/m4/fstat.m4: New file.
3535 * gnulib/import/m4/fstatat.m4: New file.
3536 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3537 * gnulib/import/m4/getcwd-path-max.m4: New file.
3538 * gnulib/import/m4/getcwd.m4: New file.
3539 * gnulib/import/m4/getdtablesize.m4: New file.
3540 * gnulib/import/m4/getlogin_r.m4: New file.
3541 * gnulib/import/m4/getprogname.m4: New file.
3542 * gnulib/import/m4/glob.m4: New file.
3543 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3544 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3545 * gnulib/import/m4/mempcpy.m4: New file.
3546 * gnulib/import/m4/memrchr.m4: New file.
3547 * gnulib/import/m4/mode_t.m4: New file.
3548 * gnulib/import/m4/msvc-inval.m4: New file.
3549 * gnulib/import/m4/msvc-nothrow.m4: New file.
3550 * gnulib/import/m4/open.m4: New file.
3551 * gnulib/import/m4/openat.m4: New file.
3552 * gnulib/import/m4/opendir.m4: New file.
3553 * gnulib/import/m4/readdir.m4: New file.
3554 * gnulib/import/m4/realloc.m4: New file.
3555 * gnulib/import/m4/rewinddir.m4: New file.
3556 * gnulib/import/m4/save-cwd.m4: New file.
3557 * gnulib/import/m4/strdup.m4: New file.
3558 * gnulib/import/m4/strerror.m4: New file.
3559 * gnulib/import/m4/unistd-safer.m4: New file.
3560 * gnulib/import/mempcpy.c: New file.
3561 * gnulib/import/memrchr.c: New file.
3562 * gnulib/import/msvc-inval.c: New file.
3563 * gnulib/import/msvc-inval.h: New file.
3564 * gnulib/import/msvc-nothrow.c: New file.
3565 * gnulib/import/msvc-nothrow.h: New file.
3566 * gnulib/import/open.c: New file.
3567 * gnulib/import/openat-die.c: New file.
3568 * gnulib/import/openat-priv.h: New file.
3569 * gnulib/import/openat-proc.c: New file.
3570 * gnulib/import/openat.c: New file.
3571 * gnulib/import/openat.h: New file.
3572 * gnulib/import/opendir.c: New file.
3573 * gnulib/import/pipe-safer.c: New file.
3574 * gnulib/import/readdir.c: New file.
3575 * gnulib/import/realloc.c: New file.
3576 * gnulib/import/rewinddir.c: New file.
3577 * gnulib/import/save-cwd.c: New file.
3578 * gnulib/import/save-cwd.h: New file.
3579 * gnulib/import/strdup.c: New file.
3580 * gnulib/import/strerror-override.c: New file.
3581 * gnulib/import/strerror-override.h: New file.
3582 * gnulib/import/strerror.c: New file.
3583 * gnulib/import/unistd--.h: New file.
3584 * gnulib/import/unistd-safer.h: New file.
3585 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3586 "getcwd" and "glob".
3587 * ser-tcp.c: Undefine "close" before redefining it.
3588
3589 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3590
3591 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3592 get rid of res_val.
3593
3594 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3595
3596 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3597 <sol2,sparc>: Likewise.
3598 <sol2-64,i386>: Likewise.
3599
3600 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3601 -Wdeprecated-declarations on *-*-solaris*.
3602 * configure: Regenerate.
3603
3604 * procfs.c: Include "nat/inferior.h".
3605 (procfs_info_proc): Fix typo.
3606
3607 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3608
3609 * remote.c (vector): Include.
3610 (struct private_thread_info): Add field, thread_handle.
3611 (free_private_thread_info): Deallocate storage associated with
3612 thread handle.
3613 (get_private_info_thread): Initialize `thread_handle' field.
3614 (struct thread_item): Add field, thread_handle.
3615 (clear_threads_listing_context): Deallocate storage associated
3616 with thread handle.
3617 (start_thread): Add support for "handle" attribute.
3618 (thread_attributes): Add "handle".
3619 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3620 field.
3621 (remote_update_thread_list): Update thread_handle.
3622 (remote_thread_handle_to_thread_info): New function.
3623 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3624
3625 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3626
3627 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3628 function.
3629 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3630 * python/python-internal.h (thread_object_type): Declare.
3631
3632 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3633
3634 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3635 (target_thread_handle_to_thread_info): Declare.
3636 * target.c (target_thread_handle_to_thread_info): New function.
3637 * target-delegates.c: Regenerate.
3638 * gdbthread.h (find_thread_by_handle): Declare.
3639 * thread.c (find_thread_by_handle): New function.
3640 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3641 function.
3642 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3643
3644 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3645
3646 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3647
3648 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3649
3650 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3651
3652 2017-09-21 Yao Qi <yao.qi@linaro.org>
3653
3654 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3655 to gdb_target_obs.
3656
3657 2017-09-20 Tom Tromey <tom@tromey.com>
3658
3659 * breakpoint.c (struct counted_command_line): Remove.
3660 (breakpoint_commands): Update.
3661 (alloc_counted_command_line, incref_counted_command_line)
3662 (decref_counted_command_line, do_cleanup_counted_command_line)
3663 (make_cleanup_decref_counted_command_line): Remove.
3664 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3665 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3666 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3667 (save_breakpoints): Update.
3668 * breakpoint.h (counted_command_line): Now a typedef to
3669 shared_ptr.
3670 (struct breakpoint) <commands>: Now a counted_command_line.
3671 (struct bpstats) <command>: Likewise.
3672
3673 2017-09-20 Tom Tromey <tom@tromey.com>
3674
3675 * breakpoint.c (struct commands_info, do_map_commands_command):
3676 Remove.
3677 (commands_command_1): Update.
3678 (iterate_over_related_breakpoints): Take a function_view.
3679 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3680 (delete_command): Update.
3681 (map_breakpoint_numbers): Take a function_view.
3682 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3683 (disable_command): Update.
3684 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3685 (enable_command): Update.
3686 (struct disp_data, do_enable_breakpoint_disp)
3687 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3688 (do_map_enable_delete_breakpoint): Remove.
3689 (enable_once_command, enable_count_command, enable_delete_command)
3690 (delete_trace_variable_command): Update.
3691
3692 2017-09-20 Tom Tromey <tom@tromey.com>
3693
3694 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3695 (bpstat_clear): Use delete.
3696 (bpstats): New constructors.
3697 (bpstat_copy, bpstat_stop_status): Use new.
3698 (dprintf_after_condition_true): Update.
3699 * breakpoint.h (bpstats::bpstats): Add constructors.
3700 (bpstats::~bpstats): Add destructor.
3701
3702 2017-09-20 Pedro Alves <palves@redhat.com>
3703
3704 * eval.c (make_params): Delete, refactored as ...
3705 (class fake_method): ... this new type's ctor.
3706 (fake_method::~fake_method): New.
3707 (evaluate_subexp_standard): Use 'fake_method'.
3708
3709 2017-09-20 Tom Tromey <tom@tromey.com>
3710
3711 * windows-nat.c (get_windows_debug_event, windows_wait)
3712 (do_initial_windows_stuff, windows_attach): Update.
3713 * utils.c (vwarning, internal_vproblem): Update.
3714 (ui_unregister_input_event_handler_cleanup)
3715 (prepare_to_handle_input): Remove.
3716 (class scoped_input_handler): New.
3717 (defaulted_query, prompt_for_continue): Update.
3718 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3719 Update.
3720 * top.c (undo_terminal_modifications_before_exit): Update.
3721 * target/target.h (target_terminal_init, target_terminal_inferior)
3722 (target_terminal_ours): Don't declare.
3723 (class target_terminal): New.
3724 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3725 (target_terminal_ours_for_output)
3726 (make_cleanup_restore_target_terminal): Don't declare.
3727 (target_terminal_info): Remove.
3728 * target.c (enum terminal_state, terminal_state): Remove.
3729 (target_terminal::terminal_state): Define.
3730 (target_terminal::init): Rename from target_terminal_init.
3731 (target_terminal::inferior): Rename from
3732 target_terminal_inferior.
3733 (target_terminal::ours): Rename from target_terminal_ours.
3734 (target_terminal::ours_for_output): Rename from
3735 target_terminal_ours_for_output.
3736 (target_terminal::info): New method.
3737 (cleanup_restore_target_terminal)
3738 (make_cleanup_restore_target_terminal): Remove.
3739 * solib.c (handle_solib_event): Update.
3740 * remote.c (remote_serial_quit_handler): Update.
3741 (remote_terminal_inferior, remote_wait_as): Update.
3742 * record-full.c (record_full_wait_1): Update.
3743 * nto-procfs.c (procfs_create_inferior): Update.
3744 * nat/fork-inferior.c (startup_inferior): Update.
3745 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3746 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3747 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3748 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3749 (mi_breakpoint_created, mi_breakpoint_deleted)
3750 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3751 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3752 (mi_user_selected_context_changed, report_initial_inferior):
3753 Update.
3754 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3755 (linux_nat_terminal_inferior): Update.
3756 * infrun.c (follow_fork_inferior)
3757 (handle_vfork_child_exec_or_exit, do_target_resume)
3758 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3759 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3760 Update.
3761 * inflow.c (child_terminal_init, info_terminal_command): Update.
3762 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3763 (attach_command): Update.
3764 * infcall.c (call_thread_fsm_should_stop): Update.
3765 * gnu-nat.c (gnu_attach): Update.
3766 * extension.c (struct active_ext_lang_state)
3767 (restore_active_ext_lang): Update.
3768 * exceptions.c (print_flush): Update.
3769 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3770 (struct quit_handler_cleanup_data, restore_quit_handler)
3771 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3772 Remove.
3773 * cp-support.c (gdb_demangle): Update.
3774 * breakpoint.c (update_inserted_breakpoint_locations)
3775 (insert_breakpoint_locations, handle_jit_event)
3776 (disable_breakpoints_in_unloaded_shlib): Update.
3777 * annotate.c (annotate_breakpoints_invalid)
3778 (annotate_frames_invalid): Update.
3779
3780 2017-09-20 Tom Tromey <tom@tromey.com>
3781
3782 * main.c (catch_command_errors): Rename from
3783 catch_command_errors_const.
3784 (captured_main_1): Update.
3785
3786 2017-09-20 Pedro Alves <palves@redhat.com>
3787
3788 * cli/cli-cmds.c (list_command): Use print_sal_location.
3789 (print_sal_location): New function.
3790 (ambiguous_line_spec): Use print_sal_location.
3791 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3792 * symtab.c (find_function_start_sal): Likewise.
3793 * symtab.h (symtab_and_line::symbol): New field.
3794
3795 2017-09-20 Pedro Alves <palves@redhat.com>
3796
3797 * linespec.c (minsym_found): Handle non-text minsyms.
3798 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3799
3800 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3801
3802 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3803 backslash.
3804
3805 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3806
3807 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3808 vmovups instead vmovaps.
3809 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3810
3811 2017-09-19 John Baldwin <jhb@FreeBSD.org>
3812
3813 * NEWS (Changes since GDB 8.0): Add starti.
3814 * infcmd.c (enum run_break): New.
3815 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3816 case.
3817 (run_command): Use enum run_how.
3818 (start_command): Likewise.
3819 (starti_command): New function.
3820 (RUN_ARGS_HELP): New macro.
3821 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3822 commands. Add starti command.
3823
3824 2017-09-19 Yao Qi <yao.qi@linaro.org>
3825
3826 * Makefile.in (monitor.o): Remove the rule.
3827
3828 2017-09-19 Yao Qi <yao.qi@linaro.org>
3829
3830 * annotate.h (struct annotate_arg_emitter): Use
3831 DISABLE_COPY_AND_ASSIGN.
3832 * common/refcounted-object.h (refcounted_object): Likewise.
3833 * completer.h (struct completion_result): Likewise.
3834 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3835 * filename-seen-cache.h (filename_seen_cache): Likewise.
3836 * gdbcore.h (thread_section_name): Likewise.
3837 * gdb_regex.h (compiled_regex): Likewise.
3838 * gdbthread.h (scoped_restore_current_thread): Likewise.
3839 * inferior.h (scoped_restore_current_inferior): Likewise.
3840 * jit.c (jit_reader): Likewise.
3841 * linespec.h (struct linespec_result): Likewise.
3842 * mi/mi-parse.h (struct mi_parse): Likewise.
3843 * nat/fork-inferior.c (execv_argv): Likewise.
3844 * progspace.h (scoped_restore_current_program_space): Likewise.
3845 * python/python-internal.h (class gdbpy_enter): Likewise.
3846 * regcache.h (regcache): Likewise.
3847 * target-descriptions.c (struct tdesc_reg): Likewise.
3848 (struct tdesc_type): Likewise.
3849 (struct tdesc_feature): Likewise.
3850 * ui-out.h (ui_out_emit_type): Likewise.
3851
3852 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3853
3854 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3855 label abort_expression.
3856
3857 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3858
3859 * common/buffer.c (buffer_xml_printf): Adjust.
3860 * common/xml-utils.c (xml_escape_text): Change return type to
3861 std::string, update code accordingly.
3862 * common/xml-utils.h (xml_escape_text): Change return type to
3863 std::string.
3864 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3865 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3866 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3867 Adjust.
3868
3869 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3870
3871 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3872 (SUBDIR_UNITTESTS_OBS): Add new object file.
3873 * unittests/xml-utils-selftests.c: New file.
3874
3875 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3876
3877 * common/selftest.h (selftest): New struct/interface.
3878 (register_test): Add name parameter, add new overload.
3879 (run_tests): Add filter parameter.
3880 (for_each_selftest_ftype): New typedef.
3881 (for_each_selftest): New declaration.
3882 * common/selftest.c (tests): Change type to
3883 map<string, unique_ptr<selftest>>.
3884 (simple_selftest): New struct.
3885 (register_test): New function.
3886 (register_test): Add name parameter and use it.
3887 (run_tests): Add filter parameter and use it. Add prints.
3888 Adjust to vector -> map change.
3889 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3890 registering selftests.
3891 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3892 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3893 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3894 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3895 * findvar.c (_initialize_findvar): Likewise.
3896 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3897 * maint.c (maintenance_selftest): Update call to run_tests.
3898 (maintenance_info_selftests): New function.
3899 (_initialize_maint_cmds): Register "maintenance info selftests"
3900 command. Update "maintenance selftest" doc.
3901 * regcache.c (_initialize_regcache): Add names when registering
3902 selftests.
3903 * rust-exp.y (_initialize_rust_exp): Likewise.
3904 * selftest-arch.c (gdbarch_selftest): New struct.
3905 (gdbarch_tests): Remove.
3906 (register_test_foreach_arch): Add name parameter. Call
3907 register_test.
3908 (tests_with_arch): Remove, move most content to
3909 gdbarch_selftest::operator().
3910 (_initialize_selftests_foreach_arch): Remove.
3911 * selftest-arch.h (register_test_foreach_arch): Add name
3912 parameter.
3913 (run_tests_with_arch): New declaration.
3914 * utils-selftests.c (_initialize_utils_selftests): Add names
3915 when registering selftests.
3916 * utils.c (_initialize_utils): Likewise.
3917 * unittests/array-view-selftests.c
3918 (_initialize_array_view_selftests): Likewise.
3919 * unittests/environ-selftests.c (_initialize_environ_selftests):
3920 Likewise.
3921 * unittests/function-view-selftests.c
3922 (_initialize_function_view_selftests): Likewise.
3923 * unittests/offset-type-selftests.c
3924 (_initialize_offset_type_selftests): Likewise.
3925 * unittests/optional-selftests.c
3926 (_initialize_optional_selftests): Likewise.
3927 * unittests/scoped_restore-selftests.c
3928 (_initialize_scoped_restore_selftests): Likewise.
3929 * NEWS: Document "maintenance selftest" and "maint info
3930 selftests".
3931
3932 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3933
3934 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3935 scoped_restore.
3936
3937 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3938
3939 * mi/mi-main.c (mi_load_progress): Make uiout variable
3940 a unique_ptr.
3941
3942 2017-09-15 Pedro Alves <palves@redhat.com>
3943
3944 * compile/compile-c-types.c (convert_enum, convert_int)
3945 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3946
3947 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3948
3949 * dwarf2read.c (copy_string): Remove.
3950 (parse_macro_definition): Replace copy_string with savestring.
3951
3952 2017-09-15 Yao Qi <yao.qi@linaro.org>
3953
3954 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3955 gdb_target_obs.
3956 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3957 Likewise.
3958 (i[34567]86-*-linux*): Likewise.
3959
3960 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3961
3962 * dwarf2expr.h (dwarf_stack_value): Add constructor.
3963 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3964 <stack>: Change type to std::vector.
3965 <stack_len, stack_allocated>: Remove.
3966 <grow_stack>: Remove.
3967 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3968 (dwarf_expr_context::~dwarf_expr_context): Remove.
3969 (dwarf_expr_context::grow_stack): Remove.
3970 (dwarf_expr_context::push): Adjust.
3971 (dwarf_expr_context::pop): Adjust.
3972 (dwarf_expr_context::fetch): Adjust.
3973 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3974 (dwarf_expr_context::stack_empty_p): Adjust.
3975 (dwarf_expr_context::execute_stack_op): Adjust.
3976
3977 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3978
3979 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3980 return type to bool.
3981 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3982
3983 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3984
3985 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3986 Change type to bool.
3987 (dwarf_stack_value) <in_stack_memory>: Likewise.
3988 (dwarf_expr_context) <push_address>: Change parameter type to
3989 bool.
3990 <fetch_in_stack_memory>: Change return type to bool.
3991 <push>: Change parameter type to bool.
3992 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3993 to bool.
3994 (dwarf_expr_context::push_address): Likewise.
3995 (dwarf_expr_context::fetch_in_stack_memory): Change return type
3996 to bool.
3997 (dwarf_expr_context::execute_stack_op): Adjust.
3998 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3999
4000 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4001
4002 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4003 (struct dwarf_expr_context) <n_pieces>: Remove.
4004 <pieces>: Change type to std::vector.
4005 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4006 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4007 pieces.
4008 (dwarf_expr_context::add_piece): Adjust.
4009 * dwarf2loc.c (struct piece_closure): Initialize fields.
4010 <n_pieces>: Remove.
4011 <pieces>: Change type to std::vector.
4012 (allocate_piece_closure): Adjust, change parameter to
4013 std::vector rvalue and std::move it to piece_closure.
4014 (rw_pieced_value): Adjust.
4015 (check_pieced_synthetic_pointer): Adjust.
4016 (indirect_synthetic_pointer): Adjust.
4017 (coerce_pieced_ref): Adjust.
4018 (free_pieced_value_closure): Adjust. Use delete to free
4019 piece_closure.
4020 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4021 to allocate_piece_closure.
4022 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4023
4024 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4025
4026 * probe.h (probe_ops_cp): Remove typedef.
4027 (DEF_VEC_P (probe_ops_cp)): Remove.
4028 (all_probe_ops): Change type to std::vector.
4029 * probe.c (info_probes_for_ops): Adjust to vector change.
4030 (probe_linespec_to_ops): Likewise.
4031 (all_probe_ops): Change type to std::vector.
4032 (_initialize_probe): Adjust to vector change.
4033 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4034 * elfread.c (elf_get_probes): Likewise.
4035 * stap-probe.c (_initialize_stap_probe): Likewise.
4036
4037 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4038
4039 * probe.h (struct bound_probe): Define constructors.
4040 * probe.c (bound_probe_s): Remove typedef.
4041 (DEF_VEC_O (bound_probe_s)): Remove VEC.
4042 (collect_probes): Change return type to std::vector, remove
4043 cleanup.
4044 (compare_probes): Return bool, change parameter type. Change
4045 semantic to "less than".
4046 (gen_ui_out_table_header_info): Change parameter to std::vector
4047 and update.
4048 (exists_probe_with_pops): Likewise.
4049 (info_probes_for_ops): Update to std::vector change.
4050 (enable_probes_command): Likewise.
4051 (disable_probes_command): Likewise.
4052
4053 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4054
4055 * probe.h (struct probe_ops) <get_probes>: Change parameter from
4056 vec to std::vector.
4057 * probe.c (parse_probes_in_pspace): Update.
4058 (find_probes_in_objfile): Update.
4059 (find_probe_by_pc): Update.
4060 (collect_probes): Update.
4061 (probe_any_get_probes): Update.
4062 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4063 return type to reference to std::vector.
4064 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4065 std::vector and update.
4066 (dtrace_process_dof): Likewise.
4067 (dtrace_get_probes): Likewise.
4068 * elfread.c (elf_get_probes): Change return type to std::vector,
4069 store an std::vector in bfd_data.
4070 (probe_key_free): Update to std::vector.
4071 * stap-probe.c (handle_stap_probe): Change parameter to
4072 std::vector and update.
4073 (stap_get_probes): Likewise.
4074 * symfile-debug.c (debug_sym_get_probes): Change return type to
4075 std::vector and update.
4076
4077 2017-09-11 Tom Tromey <tom@tromey.com>
4078
4079 * breakpoint.c (program_breakpoint_here_p): Update.
4080 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4081 from make_show_memory_breakpoints_cleanup. Return a
4082 scoped_restore_tmpl<int>.
4083 (restore_show_memory_breakpoints): Remove.
4084 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4085 * mem-break.c (memory_validate_breakpoint): Update.
4086 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4087 (ia64_memory_remove_breakpoint): Update.
4088 (ia64_breakpoint_from_pc): Update.
4089 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4090 from make_show_memory_breakpoints_cleanup.
4091
4092 2017-09-11 Tom Tromey <tom@tromey.com>
4093
4094 * d-namespace.c (d_lookup_symbol): Use std::string.
4095 (find_symbol_in_baseclass): Likewise.
4096
4097 2017-09-11 Tom Tromey <tom@tromey.com>
4098
4099 * ctf.c (ctf_start): Use std::string.
4100
4101 2017-09-11 Tom Tromey <tom@tromey.com>
4102
4103 * ada-lang.c (is_known_support_routine): Update.
4104 (ada_unhandled_exception_name_addr_from_raise): Update.
4105 * guile/scm-frame.c (gdbscm_frame_name): Update.
4106 * python/py-frame.c (frapy_name): Update.
4107 (frapy_function): Update.
4108 * stack.h (find_frame_funname): Update.
4109 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4110 (print_frame): Update.
4111
4112 2017-09-11 Tom Tromey <tom@tromey.com>
4113
4114 * findcmd.c (put_bits): Take a gdb::byte_vector.
4115 (parse_find_args): Return gdb::byte_vector. "args" now const.
4116 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
4117 cleanups.
4118 (find_command): Update.
4119
4120 2017-09-11 Tom Tromey <tom@tromey.com>
4121
4122 * cli/cli-script.c (class scoped_restore_hook_in): New.
4123 (clear_hook_in_cleanup): Remove.
4124 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4125 scoped_restore_hook_in.
4126
4127 2017-09-11 Tom Tromey <tom@tromey.com>
4128
4129 * cli/cli-script.c (restore_interp): Remove.
4130 (read_command_lines): Use scoped_restore_interp.
4131 * interps.c (scoped_restore_interp::set_temp): Rename from
4132 interp_set_temp.
4133 * interps.h (class scoped_restore_interp): New.
4134 (interp_set_temp): Remove.
4135
4136 2017-09-11 Tom Tromey <tom@tromey.com>
4137
4138 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4139 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4140 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4141 scoped_restore.
4142 (mi_cmd_break_insert_1): Update.
4143 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4144 scoped_restore.
4145
4146 2017-09-11 Tom Tromey <tom@tromey.com>
4147
4148 * demangle.c (demangle_command): Update.
4149 * breakpoint.c (disable_command): Update.
4150 (enable_command): Update.
4151 (find_location_by_number): Make "number" const. Use
4152 get_number_trailer.
4153 * cli/cli-utils.c (extract_arg): Return std::string.
4154 * probe.c (parse_probe_linespec): Update. Change types.
4155 (collect_probes): Take string arguments.
4156 (parse_probe_linespec): Likewise.
4157 (info_probes_for_ops): Update.
4158 (enable_probes_command): Update.
4159 (disable_probes_command): Update.
4160 * break-catch-sig.c (catch_signal_split_args): Update.
4161 * mi/mi-parse.c (mi_parse): Update.
4162
4163 2017-09-11 Tom Tromey <tom@tromey.com>
4164
4165 * language.h (language_enum): Make argument const.
4166 * language.c (language_enum): Make argument const.
4167
4168 2017-09-11 Tom Tromey <tom@tromey.com>
4169
4170 * common/common-utils.h (skip_to_space): Remove macro, redeclare
4171 as function.
4172 (skip_to_space): Rename from skip_to_space_const.
4173 * common/common-utils.c (skip_to_space): New function.
4174 (skip_to_space): Rename from skip_to_space_const.
4175 * cli/cli-utils.h (get_number): Rename from get_number_const.
4176 (extract_arg): Rename from extract_arg_const.
4177 * cli/cli-utils.c (get_number): Rename from get_number_const.
4178 (extract_arg): Rename from extract_arg_const.
4179 (number_or_range_parser::get_number): Use ::get_number.
4180 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4181 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4182 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4183 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4184 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4185 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4186 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4187 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4188
4189 2017-09-11 Tom Tromey <tom@tromey.com>
4190
4191 * python/python.c (do_start_initialization): Use
4192 py-event-types.def to initialize types.
4193 Define all object type structures.
4194 * python/python-internal.h: Don't declare event initialization
4195 functions.
4196 * python/py-threadevent.c (thread_event_object_type): Don't
4197 define.
4198 * python/py-stopevent.c (stop_event_object_type): Don't define.
4199 * python/py-signalevent.c (signal_event_object_type): Don't
4200 declare or define.
4201 * python/py-newobjfileevent.c (new_objfile_event_object_type)
4202 (clear_objfiles_event_object_type): Don't declare or define.
4203 * python/py-infevents.c (inferior_call_pre_event_object_type)
4204 (inferior_call_post_event_object_type)
4205 (register_changed_event_object_type)
4206 (memory_changed_event_object_type): Don't declare or define.
4207 * python/py-inferior.c (new_thread_event_object_type)
4208 (new_inferior_event_object_type)
4209 (inferior_deleted_event_object_type): Don't declare or define.
4210 * python/py-exitedevent.c (exited_event_object_type): Don't
4211 declare or define.
4212 * python/py-evts.c (gdbpy_initialize_py_events): Use
4213 py-all-events.def.
4214 * python/py-events.h (thread_event_object_type): Don't declare.
4215 (events_object): Use py-all-events.def.
4216 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
4217 py-event-types.def.
4218 * python/py-event-types.def: New file.
4219 * python/py-continueevent.c (create_continue_event_object): Don't
4220 declare or define.
4221 * python/py-bpevent.c (breakpoint_event_object_type): Don't
4222 declare or define.
4223 * python/py-all-events.def: New file.
4224
4225 2017-09-11 Tom Tromey <tom@tromey.com>
4226
4227 * python/py-threadevent.c (create_thread_event_object): Return
4228 gdbpy_ref.
4229 * python/py-stopevent.h (create_stop_event_object)
4230 (create_breakpoint_event_object, create_signal_event_object):
4231 Update.
4232 * python/py-stopevent.c (create_stop_event_object): Return
4233 gdbpy_ref.
4234 (emit_stop_event): Update.
4235 * python/py-signalevent.c (create_signal_event_object): Return
4236 gdbpy_ref.
4237 * python/py-infevents.c (create_inferior_call_event_object):
4238 Update.
4239 * python/py-event.h (create_event_object)
4240 (create_thread_event_object): Update.
4241 * python/py-event.c (create_event_object): Return gdbpy_ref.
4242 * python/py-continueevent.c: Return gdbpy_ref.
4243 * python/py-bpevent.c (create_breakpoint_event_object): Return
4244 gdbpy_ref.
4245
4246 2017-09-11 Tom Tromey <tom@tromey.com>
4247
4248 PR python/15622:
4249 * NEWS: Add entry.
4250 * python/python.c (do_start_initialization): Initialize new event
4251 types.
4252 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4253 (gdbpy_initialize_inferior_deleted_event)
4254 (gdbpy_initialize_new_thread_event): Declare.
4255 * python/py-threadevent.c (create_thread_event_object): Add option
4256 "thread" parameter.
4257 * python/py-inferior.c (new_thread_event_object_type)
4258 (new_inferior_event_object_type)
4259 (inferior_deleted_event_object_type): Declare.
4260 (python_new_inferior, python_inferior_deleted): New functions.
4261 (add_thread_object): Emit new_thread event.
4262 (gdbpy_initialize_inferior): Attach new functions to corresponding
4263 observers.
4264 (new_thread, new_inferior, inferior_deleted): Define new event
4265 types.
4266 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4267 registries.
4268 * python/py-events.h (events_object) <new_inferior,
4269 inferior_deleted, new_thread>: New fields.
4270 * python/py-event.h (create_thread_event_breakpoint): Add optional
4271 "thread" parameter.
4272
4273 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4274
4275 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4276 check current_ui instead.
4277 (internal_vproblem): Likewise.
4278
4279 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4280
4281 * thread.c (print_thread_info_1): Remove unnecessary calls to
4282 uiout->is_mi_like_p.
4283
4284 2017-09-09 Tom Tromey <tom@tromey.com>
4285
4286 * namespace.h (add_using_directive): Update.
4287 * namespace.c (add_using_directive): Change type of excludes to
4288 std::vector.
4289 * dwarf2read.c (read_import_statement): Use std::vector.
4290 (read_namespace): Update.
4291 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4292
4293 2017-09-09 Tom Tromey <tom@tromey.com>
4294
4295 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4296
4297 2017-09-09 Tom Tromey <tom@tromey.com>
4298
4299 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4300
4301 2017-09-09 Tom Tromey <tom@tromey.com>
4302
4303 * stack.c (func_command): Use gdb::def_vector.
4304
4305 2017-09-09 Tom Tromey <tom@tromey.com>
4306
4307 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4308 ui_out_emit_list, ui_out_emit_tuple.
4309 (mi_cmd_var_update): Likewise.
4310
4311 2017-09-09 Tom Tromey <tom@tromey.com>
4312
4313 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4314 ui_out_redirect_pop.
4315 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4316 ui_out_redirect_pop.
4317 * utils.c (do_ui_out_redirect_pop)
4318 (make_cleanup_ui_out_redirect_pop): Remove.
4319 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4320 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4321 * ui-out.h (ui_out_redirect_pop): New class.
4322
4323 2017-09-09 Tom Tromey <tom@tromey.com>
4324
4325 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4326 (list_available_thread_groups, mi_cmd_list_thread_groups)
4327 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4328 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4329 Likewise.
4330
4331 2017-09-09 Tom Tromey <tom@tromey.com>
4332
4333 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4334 ui_out_emit_tuple.
4335
4336 2017-09-09 Tom Tromey <tom@tromey.com>
4337
4338 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4339 * stack.c (print_frame): Use ui_out_emit_tuple.
4340 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4341 (info_spu_mailbox_command, info_spu_dma_command)
4342 (info_spu_proxydma_command): Likewise.
4343 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4344 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4345 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4346 ui_out_emit_tuple.
4347 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4348
4349 2017-09-09 Tom Tromey <tom@tromey.com>
4350
4351 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4352 (class ui_out_emit_table): Update comment.
4353 * ui-out.c (do_cleanup_table_end)
4354 (make_cleanup_ui_out_table_begin_end): Remove.
4355 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4356 (info_spu_dma_cmdlist): Likewise.
4357 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4358 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4359 ui_out_emit_table.
4360
4361 2017-09-09 Tom Tromey <tom@tromey.com>
4362
4363 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4364 ui_out_emit_list, gdb::optional.
4365
4366 2017-09-09 John Baldwin <jhb@FreeBSD.org>
4367
4368 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4369 prototype.
4370 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4371 prototype.
4372 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4373 prototype.
4374 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4375 * ada-exp.y: Remove _initialize_ada_exp prototype.
4376 * ada-lang.c: Remove _initialize_ada_language prototype.
4377 * ada-tasks.c: Remove _initialize_tasks prototype.
4378 * addrmap.c: Remove _initialize_addrmap prototype.
4379 * agent.c: Remove _initialize_agent prototype.
4380 * aix-thread.c: Remove _initialize_aix_thread prototype.
4381 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4382 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4383 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4384 prototype.
4385 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4386 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4387 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4388 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4389 prototype.
4390 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4391 prototype.
4392 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4393 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4394 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4395 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4396 prototype.
4397 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4398 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4399 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4400 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4401 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4402 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4403 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4404 prototype.
4405 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4406 prototype.
4407 * annotate.c: Remove _initialize_annotate prototype.
4408 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4409 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4410 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4411 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4412 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4413 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4414 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4415 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4416 prototype.
4417 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4418 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4419 * auto-load.c: Remove _initialize_auto_load prototype.
4420 * auxv.c: Remove _initialize_auxv prototype.
4421 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4422 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4423 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4424 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4425 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4426 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4427 prototype.
4428 * break-catch-throw.c: Remove _initialize_break_catch_throw
4429 prototype.
4430 * breakpoint.c: Remove _initialize_breakpoint prototype.
4431 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4432 * btrace.c: Remove _initialize_btrace prototype.
4433 * charset.c: Remove _initialize_charset prototype.
4434 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4435 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4436 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4437 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4438 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4439 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4440 * coffread.c: Remove _initialize_coffread prototype.
4441 * compile/compile.c: Remove _initialize_compile prototype.
4442 * complaints.c: Remove _initialize_complaints prototype.
4443 * completer.c: Remove _initialize_completer prototype.
4444 * copying.awk: Remove _initialize_copying prototype.
4445 * copying.c: Regenerate.
4446 * core-regset.c: Remove _initialize_core_regset prototype.
4447 * corefile.c: Remove _initialize_core prototype.
4448 * corelow.c: Remove _initialize_corelow prototype.
4449 * cp-abi.c: Remove _initialize_cp_abi prototype.
4450 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4451 * cp-support.c: Remove _initialize_cp_support prototype.
4452 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4453 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4454 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4455 * ctf.c: Remove _initialize_ctf prototype.
4456 * d-lang.c: Remove _initialize_d_language prototype.
4457 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4458 prototype.
4459 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4460 * dbxread.c: Remove _initialize_dbxread prototype.
4461 * dcache.c: Remove _initialize_dcache prototype.
4462 * demangle.c: Remove _initialize_demangler prototype.
4463 * disasm-selftests.c: Remove _initialize_disasm_selftests
4464 prototype.
4465 * disasm.c: Remove _initialize_disasm prototype.
4466 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4467 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4468 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4469 prototype.
4470 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4471 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4472 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4473 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4474 * elfread.c: Remove _initialize_elfread prototype.
4475 * exec.c: Remove _initialize_exec prototype.
4476 * extension.c: Remove _initialize_extension prototype.
4477 * f-lang.c: Remove _initialize_f_language prototype.
4478 * f-valprint.c: Remove _initialize_f_valprint prototype.
4479 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4480 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4481 * filesystem.c: Remove _initialize_filesystem prototype.
4482 * findcmd.c: Remove _initialize_mem_search prototype.
4483 * fork-child.c: Remove _initialize_fork_child prototype.
4484 * frame-base.c: Remove _initialize_frame_base prototype.
4485 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4486 * frame.c: Remove _initialize_frame prototype.
4487 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4488 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4489 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4490 * gcore.c: Remove _initialize_gcore prototype.
4491 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4492 * gdbarch.c: Regenerate.
4493 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4494 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4495 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4496 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4497 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4498 * go-lang.c: Remove _initialize_go_language prototype.
4499 * go32-nat.c: Remove _initialize_go32_nat prototype.
4500 * guile/guile.c: Remove _initialize_guile prototype.
4501 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4502 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4503 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4504 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4505 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4506 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4507 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4508 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4509 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4510 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4511 prototype.
4512 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4513 prototype.
4514 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4515 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4516 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4517 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4518 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4519 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4520 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4521 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4522 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4523 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4524 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4525 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4526 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4527 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4528 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4529 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4530 prototype.
4531 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4532 prototype.
4533 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4534 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4535 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4536 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4537 * infcall.c: Remove _initialize_infcall prototype.
4538 * infcmd.c: Remove _initialize_infcmd prototype.
4539 * inferior.c: Remove _initialize_inferiors prototype.
4540 * inflow.c: Remove _initialize_inflow prototype.
4541 * infrun.c: Remove _initialize_infrun prototype.
4542 * interps.c: Remove _initialize_interpreter prototype.
4543 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4544 * jit.c: Remove _initialize_jit prototype.
4545 * language.c: Remove _initialize_language prototype.
4546 * linux-fork.c: Remove _initialize_linux_fork prototype.
4547 * linux-nat.c: Remove _initialize_linux_nat prototype.
4548 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4549 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4550 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4551 * m2-lang.c: Remove _initialize_m2_language prototype.
4552 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4553 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4554 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4555 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4556 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4557 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4558 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4559 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4560 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4561 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4562 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4563 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4564 * machoread.c: Remove _initialize_machoread prototype.
4565 * macrocmd.c: Remove _initialize_macrocmd prototype.
4566 * macroscope.c: Remove _initialize_macroscope prototype.
4567 * maint.c: Remove _initialize_maint_cmds prototype.
4568 * mdebugread.c: Remove _initialize_mdebugread prototype.
4569 * memattr.c: Remove _initialize_mem prototype.
4570 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4571 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4572 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4573 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4574 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4575 * microblaze-linux-tdep.c: Remove
4576 _initialize_microblaze_linux_tdep prototype.
4577 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4578 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4579 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4580 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4581 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4582 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4583 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4584 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4585 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4586 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4587 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4588 prototype.
4589 * mipsread.c: Remove _initialize_mipsread prototype.
4590 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4591 prototype.
4592 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4593 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4594 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4595 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4596 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4597 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4598 prototype.
4599 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4600 * nto-procfs.c: Remove _initialize_procfs prototype.
4601 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4602 * objc-lang.c: Remove _initialize_objc_language prototype.
4603 * objfiles.c: Remove _initialize_objfiles prototype.
4604 * observer.c: Remove observer_test_first_notification_function,
4605 observer_test_second_notification_function,
4606 observer_test_third_notification_function, and
4607 _initialize_observer prototypes.
4608 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4609 * osabi.c: Remove _initialize_gdb_osabi prototype.
4610 * osdata.c: Remove _initialize_osdata prototype.
4611 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4612 * parse.c: Remove _initialize_parse prototype.
4613 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4614 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4615 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4616 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4617 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4618 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4619 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4620 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4621 * printcmd.c: Remove _initialize_printcmd prototype.
4622 * probe.c: Remove _initialize_probe prototype.
4623 * proc-api.c: Remove _initialize_proc_api prototype.
4624 * proc-events.c: Remove _initialize_proc_events prototype.
4625 * proc-service.c: Remove _initialize_proc_service prototype.
4626 * procfs.c: Remove _initialize_procfs prototype.
4627 * psymtab.c: Remove _initialize_psymtab prototype.
4628 * python/python.c: Remove _initialize_python prototype.
4629 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4630 * record-btrace.c: Remove _initialize_record_btrace prototype.
4631 * record-full.c: Remove _initialize_record_full prototype.
4632 * record.c: Remove _initialize_record prototype.
4633 * regcache.c: Remove _initialize_regcache prototype.
4634 * reggroups.c: Remove _initialize_reggroup prototype.
4635 * remote-notif.c: Remove _initialize_notif prototype.
4636 * remote-sim.c: Remove _initialize_remote_sim prototype.
4637 * remote.c: Remove _initialize_remote prototype.
4638 * reverse.c: Remove _initialize_reverse prototype.
4639 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4640 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4641 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4642 prototype.
4643 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4644 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4645 * rust-exp.y: Remove _initialize_rust_exp prototype.
4646 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4647 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4648 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4649 * score-tdep.c: Remove _initialize_score_tdep prototype.
4650 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4651 prototype.
4652 * ser-go32.c: Remove _initialize_ser_dos prototype.
4653 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4654 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4655 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4656 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4657 * serial.c: Remove _initialize_serial prototype.
4658 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4659 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4660 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4661 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4662 * skip.c: Remove _initialize_step_skip prototype.
4663 * sol-thread.c: Remove _initialize_sol_thread prototype.
4664 * solib-aix.c: Remove _initialize_solib_aix prototype.
4665 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4666 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4667 * solib-frv.c: Remove _initialize_frv_solib prototype.
4668 * solib-spu.c: Remove _initialize_spu_solib prototype.
4669 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4670 * solib-target.c: Remove _initialize_solib_target prototype.
4671 * solib.c: Remove _initialize_solib prototype.
4672 * source.c: Remove _initialize_source prototype.
4673 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4674 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4675 prototype.
4676 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4677 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4678 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4679 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4680 prototype.
4681 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4682 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4683 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4684 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4685 prototype.
4686 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4687 prototype.
4688 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4689 prototype.
4690 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4691 prototype.
4692 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4693 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4694 prototype.
4695 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4696 prototype.
4697 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4698 prototype.
4699 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4700 prototype.
4701 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4702 prototype.
4703 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4704 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4705 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4706 * stabsread.c: Remove _initialize_stabsread prototype.
4707 * stack.c: Remove _initialize_stack prototype.
4708 * stap-probe.c: Remove _initialize_stap_probe prototype.
4709 * std-regs.c: Remove _initialize_frame_reg prototype.
4710 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4711 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4712 * symfile.c: Remove _initialize_symfile prototype.
4713 * symmisc.c: Remove _initialize_symmisc prototype.
4714 * symtab.c: Remove _initialize_symtab prototype.
4715 * target-dcache.c: Remove _initialize_target_dcache prototype.
4716 * target-descriptions.c: Remove _initialize_target_descriptions
4717 prototype.
4718 * thread.c: Remove _initialize_thread prototype.
4719 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4720 prototype.
4721 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4722 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4723 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4724 prototype.
4725 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4726 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4727 * tracefile.c: Remove _initialize_tracefile prototype.
4728 * tracepoint.c: Remove _initialize_tracepoint prototype.
4729 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4730 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4731 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4732 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4733 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4734 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4735 * tui/tui.c: Remove _initialize_tui prototype.
4736 * typeprint.c: Remove _initialize_typeprint prototype.
4737 * user-regs.c: Remove _initialize_user_regs prototype.
4738 * utils.c: Remove _initialize_utils prototype.
4739 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4740 * valarith.c: Remove _initialize_valarith prototype.
4741 * valops.c: Remove _initialize_valops prototype.
4742 * valprint.c: Remove _initialize_valprint prototype.
4743 * value.c: Remove _initialize_values prototype.
4744 * varobj.c: Remove _initialize_varobj prototype.
4745 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4746 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4747 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4748 * windows-nat.c: Remove _initialize_windows_nat,
4749 _initialize_check_for_gdb_ini, and _initialize_loadable
4750 prototypes.
4751 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4752 * xcoffread.c: Remove _initialize_xcoffread prototype.
4753 * xml-support.c: Remove _initialize_xml_support prototype.
4754 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4755 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4756 prototype.
4757 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4758 prototype.
4759 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4760
4761 2017-09-08 Keith Seitz <keiths@redhat.com>
4762
4763 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4764 field.
4765
4766 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4767
4768 * f-valprint.c (f_val_print): Remove check for one byte
4769 sized integers. Remove printing of character type.
4770
4771 2017-09-08 Frank Penczek <frank.penczek@intel.com>
4772 Christoph Weinmann <christoph.t.weinmann@intel.com>
4773 Bernhard Heckel <bernhard.heckel@intel.com>
4774
4775 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4776 to maintain proper indentation when printing pointers/refs.
4777
4778 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4779
4780 GDB 8.0.1 released.
4781
4782 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4783
4784 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4785
4786 2017-09-05 Tom Tromey <tom@tromey.com>
4787
4788 * parse.c (funcall_chain): Now a std::vector.
4789 (start_arglist, end_arglist): Simplify.
4790 (free_funcalls): Remove.
4791 (parse_exp_in_context_1): Remove cleanup.
4792
4793 2017-09-05 Tom Tromey <tom@tromey.com>
4794
4795 * go-exp.y (go_parse): Don't create a cleanup.
4796
4797 2017-09-05 Tom Tromey <tom@tromey.com>
4798
4799 * d-exp.y (PrimaryExpression): Use std::string.
4800 (d_parse): Don't create a cleanup.
4801
4802 2017-09-05 Tom Tromey <tom@tromey.com>
4803
4804 * utils.c (do_clear_parser_state): Remove.
4805 (make_cleanup_clear_parser_state): Remove.
4806 * p-exp.y (pascal_parse): Use scoped_restore.
4807 * m2-exp.y (m2_parse): Use scoped_restore.
4808 * f-exp.y (f_parse): Use scoped_restore.
4809 * d-exp.y (d_parse): Use scoped_restore.
4810 * c-exp.y (c_parse): Use scoped_restore.
4811 * ada-exp.y (ada_parse): Use scoped_restore.
4812 * utils.h (make_cleanup_clear_parser_state): Remove.
4813
4814 2017-09-06 Keith Seitz <keiths@redhat.com>
4815
4816 * dwarf2read.c (dw2_linkage_name_attr): New function.
4817 (dw2_linkage_name): New function.
4818 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4819 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4820 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4821
4822 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4823
4824 * config/djgpp/djconfig.sh: Correct shell portability issue.
4825
4826 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4827
4828 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4829
4830 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4831
4832 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4833 * NEWS: Mention new FreeBSD/mips native configuration.
4834 * configure.host: Add aarch64*-*-freebsd*.
4835 * configure.nat: Likewise.
4836 * aarch64-fbsd-nat.c: New file.
4837
4838 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4839
4840 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4841 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4842 * NEWS: Mention new FreeBSD/aarch64 target.
4843 * configure.tgt: Add aarch64*-*-freebsd*.
4844 * aarch64-fbsd-tdep.c: New file.
4845 * aarch64-fbsd-tdep.h: New file.
4846
4847 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4848
4849 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4850
4851 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4852
4853 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4854 of TLS symbols.
4855
4856 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4857
4858 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4859 call.
4860
4861 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4862
4863 * infrun.c (follow_exec): Call add_thread after
4864 target_find_description.
4865
4866 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4867
4868 * infrun.c (handle_inferior_event_1): When exec'ing, read
4869 stop_pc after follow_exec.
4870
4871 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4872
4873 * remote.c (process_g_packet): Update error message.
4874
4875 2017-09-05 Yao Qi <yao.qi@linaro.org>
4876
4877 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4878 targets.
4879
4880 2017-09-05 Pedro Alves <palves@redhat.com>
4881
4882 * eval.c (eval_call, evaluate_funcall): New functions, factored
4883 out from ...
4884 (evaluate_subexp_standard): ... this.
4885
4886 2017-09-05 Yao Qi <yao.qi@linaro.org>
4887
4888 * amd64-tdep.c (amd64_target_description): Create target
4889 descriptions.
4890 (_initialize_amd64_tdep): Don't call functions
4891 initialize_tdesc_amd64_*. Add self tests.
4892 * arch/amd64.c (amd64_create_target_description): Add parameter
4893 is_linux. Call set_tdesc_osabi if is_linux is true.
4894 * arch/amd64.h (amd64_create_target_description): Update the
4895 declaration.
4896 * arch/i386.c (i386_create_target_description): Add parameter
4897 is_linux. Call set_tdesc_osabi if is_linux is true.
4898 * arch/i386.h (i386_create_target_description): Update
4899 declaration.
4900 * configure.tgt: Add i386.o to gdb_target_obs.
4901 * features/Makefile (XMLTOC): Remove i386/*.xml.
4902 * features/i386/amd64-avx-avx512.c: Remove.
4903 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4904 * features/i386/amd64-avx-mpx.c: Remove.
4905 * features/i386/amd64-avx.c: Remove.
4906 * features/i386/amd64-mpx.c: Remove.
4907 * features/i386/amd64.c: Remove.
4908 * features/i386/i386-avx-avx512.c: Remove.
4909 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4910 * features/i386/i386-avx-mpx.c: Remove.
4911 * features/i386/i386-avx.c: Remove.
4912 * features/i386/i386-mmx.c: Remove.
4913 * features/i386/i386-mpx.c: Remove.
4914 * features/i386/i386.c: Remove.
4915 * i386-tdep.c: Don't include features/i386/i386*.c., include
4916 target-descriptions.h and arch/i386.h.
4917 (i386_target_description): Create target descriptions.
4918 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4919 functions. Do self tests.
4920
4921 2017-09-05 Yao Qi <yao.qi@linaro.org>
4922
4923 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4924 * features/i386/amd64-avx-avx512-linux.c: Removed.
4925 * features/i386/amd64-avx-linux.c: Removed.
4926 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4927 * features/i386/amd64-avx-mpx-linux.c: Removed.
4928 * features/i386/amd64-linux.c: Removed.
4929 * features/i386/amd64-mpx-linux.c: Removed.
4930 * features/i386/x32-avx-avx512-linux.c: Removed.
4931 * features/i386/x32-avx-linux.c: Removed.
4932 * features/i386/x32-linux.c: Removed.
4933
4934 2017-09-05 Yao Qi <yao.qi@linaro.org>
4935
4936 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
4937 features/i386/*.c.
4938 (amd64_linux_read_description): Call
4939 amd64_create_target_description.
4940 * arch/amd64.c: New file.
4941 * arch/amd64.h: New file.
4942 * configure.tgt (x86_64-*-linux*): Append amd64.o.
4943 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4944
4945 2017-09-05 Yao Qi <yao.qi@linaro.org>
4946
4947 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4948 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
4949 (amd64_linux_read_description): Create target descriptions.
4950 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4951 functions. Add unit tests.
4952 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4953 x32-core.xml.
4954 * features/i386/64bit-avx.c: Generated.
4955 * features/i386/64bit-avx512.c: Generated.
4956 * features/i386/64bit-core.c: Generated.
4957 * features/i386/64bit-linux.c: Generated.
4958 * features/i386/64bit-mpx.c: Generated.
4959 * features/i386/64bit-pkeys.c: Generated.
4960 * features/i386/64bit-segments.c: Generated.
4961 * features/i386/64bit-sse.c: Generated.
4962 * features/i386/x32-core.c: Generated.
4963 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4964 c files for amd64-linux and x32-linux.
4965
4966 2017-09-05 Yao Qi <yao.qi@linaro.org>
4967
4968 * amd64-linux-tdep.c (amd64_linux_read_description): New
4969 function.
4970 (amd64_linux_core_read_description): Call
4971 amd64_linux_read_description.
4972 (amd64_linux_init_abi): Likewise.
4973 (amd64_x32_linux_init_abi): Likewise.
4974 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4975 * x86-linux-nat.c (x86_linux_read_description): Call
4976 amd64_linux_read_description.
4977
4978 2017-09-05 Yao Qi <yao.qi@linaro.org>
4979
4980 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4981 comments.
4982
4983 2017-09-05 Yao Qi <yao.qi@linaro.org>
4984
4985 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4986 * features/i386/i386-avx-avx512-linux.c: Remove.
4987 * features/i386/i386-avx-linux.c: Remove.
4988 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4989 * features/i386/i386-avx-mpx-linux.c: Remove.
4990 * features/i386/i386-linux.c: Remove.
4991 * features/i386/i386-mmx-linux.c: Remove.
4992 * features/i386/i386-mpx-linux.c: Remove.
4993
4994 2017-09-05 Yao Qi <yao.qi@linaro.org>
4995
4996 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4997 (SFILES): Add arch/i386.c.
4998 (HFILES_NO_SRCDIR): Add arch/i386.h.
4999 * arch/i386.c: New file.
5000 * arch/i386.h: New file.
5001 * arch/tdesc.h (allocate_target_description): Declare.
5002 (set_tdesc_architecture): Declare.
5003 (set_tdesc_osabi): Declare.
5004 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5005 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5006 include arch/i386.h.
5007 (i386_linux_read_description): Remove code and call
5008 i386_create_target_description.
5009 (set_tdesc_architecture): New function.
5010 (set_tdesc_osabi): New function.
5011 * target-descriptions.h (allocate_target_description): Remove.
5012
5013 2017-09-05 Yao Qi <yao.qi@linaro.org>
5014
5015 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5016 * target-descriptions.c (tdesc_create_feature): Likewise, and
5017 adjust code.
5018 * features/i386/32bit-avx.c: Re-generated.
5019 * features/i386/32bit-avx512.c: Re-generated.
5020 * features/i386/32bit-core.c: Re-generated.
5021 * features/i386/32bit-linux.c: Re-generated.
5022 * features/i386/32bit-mpx.c: Re-generated.
5023 * features/i386/32bit-pkeys.c: Re-generated.
5024 * features/i386/32bit-sse.c: Re-generated.
5025
5026 2017-09-05 Yao Qi <yao.qi@linaro.org>
5027
5028 * regformats/regdef.h (struct reg): Override operator == and !=.
5029
5030 2017-09-05 Yao Qi <yao.qi@linaro.org>
5031
5032 * arch/tdesc.h: New file.
5033 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5034 * target-descriptions.c: Update comments.
5035 * target-descriptions.h: Include "arch/tdesc.h". Remove the
5036 declarations.
5037 * features/i386/32bit-avx.c: Re-generated.
5038 * features/i386/32bit-avx512.c: Re-generated.
5039 * features/i386/32bit-core.c: Re-generated.
5040 * features/i386/32bit-linux.c: Re-generated.
5041 * features/i386/32bit-mpx.c: Re-generated.
5042 * features/i386/32bit-pkeys.c: Re-generated.
5043 * features/i386/32bit-sse.c: Re-generated.
5044
5045 2017-09-05 Yao Qi <yao.qi@linaro.org>
5046
5047 * regformats/regdat.sh: Update generated code.
5048
5049 2017-09-05 Yao Qi <yao.qi@linaro.org>
5050
5051 * regformats/regdat.sh: Adjust code order.
5052
5053 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5054
5055 * expprint.c (dump_subexp_body_standard): Use constant format
5056 string in fprintf_filtered call.
5057
5058 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5059
5060 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5061 NetBSD/i386.
5062 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5063
5064 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5065
5066 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5067
5068 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5069
5070 * bsd-kvm.o: Define _KMEMUSER.
5071 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5072 * configure: Regenerate.
5073
5074 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5075
5076 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5077 * i386-fbsd-nat.c: Likewise.
5078
5079 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5080
5081 * unittests/array-view-selftests.c: Add include of <array>.
5082
5083 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5084
5085 * spu-tdep.c (flush_ea_cache): Add missing argument to
5086 call_function_by_hand.
5087
5088 2017-09-04 Pedro Alves <palves@redhat.com>
5089
5090 * NEWS (Safer support for debugging with no debug info): New.
5091
5092 2017-09-04 Pedro Alves <palves@redhat.com>
5093
5094 * c-exp.y (function_method, function_method_void): Add current
5095 instance flags to TYPE_INSTANCE.
5096 * dwarf2read.c (check_modifier): New.
5097 (compute_delayed_physnames): Assert that only C++ adds delayed
5098 physnames. Mark fn_fields as const/volatile depending on
5099 physname.
5100 * eval.c (make_params): New type_instance_flags parameter. Use
5101 it as the new type's instance flags.
5102 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5103 flags element and pass it to make_params.
5104 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5105 instance flags element.
5106 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5107 * gdbtypes.h: Include "enum-flags.h".
5108 (type_instance_flags): New enum-flags type.
5109 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5110 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5111 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5112 (follow_type_instance_flags): New function.
5113 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5114 * parser-defs.h (follow_type_instance_flags): Declare.
5115 * valops.c (value_struct_elt_for_reference): const/volatile must
5116 match too.
5117
5118 2017-09-04 Pedro Alves <palves@redhat.com>
5119
5120 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5121 function/method scopes; lookup the nested name as a function local
5122 static variable.
5123
5124 2017-09-04 Pedro Alves <palves@redhat.com>
5125
5126 (%type <voidval>): Add function_method.
5127 * c-exp.y (exp): New production for calls with no arguments.
5128 (function_method, function_method_void_or_typelist): New
5129 productions.
5130 (exp): New production for "method()::static_var".
5131 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5132 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5133 Handle OP_FUNC_STATIC_VAR.
5134 * parse.c (operator_length_standard):
5135 Handle OP_FUNC_STATIC_VAR.
5136
5137 2017-09-04 Pedro Alves <palves@redhat.com>
5138
5139 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5140 handling.
5141 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5142 Ditto.
5143 * parse.c (operator_length_standard, operator_check_standard):
5144 Ditto.
5145 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5146
5147 2017-09-04 Pedro Alves <palves@redhat.com>
5148
5149 * ax-gdb.c: Include "typeprint.h".
5150 (gen_expr_for_cast): New function.
5151 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5152 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5153 type is unknown.
5154 * dwarf2read.c (new_symbol_full): Fallback to int instead of
5155 nodebug_data_symbol.
5156 * eval.c: Include "typeprint.h".
5157 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5158 Error out if symbol has unknown type.
5159 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5160 evaluate_subexp_for_cast.
5161 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5162 OP_VAR_MSYM_VALUE.
5163 (evaluate_subexp_for_cast): New function.
5164 * gdbtypes.c (init_nodebug_var_type): New function.
5165 (objfile_type): Use it to initialize types of variables with no
5166 debug info.
5167 * typeprint.c (error_unknown_type): New.
5168 * typeprint.h (error_unknown_type): New declaration.
5169 * compile/compile-c-types.c (convert_type_basic): Handle
5170 TYPE_CODE_ERROR; warn and fallback to int for variables with
5171 unknown type.
5172
5173 2017-09-04 Pedro Alves <palves@redhat.com>
5174
5175 * eval.c (evaluate_var_value): New function, factored out from ...
5176 (evaluate_subexp_standard): ... here.
5177
5178 2017-09-04 Pedro Alves <palves@redhat.com>
5179
5180 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5181 Remove useless assignments to 'op'.
5182
5183 2017-09-04 Pedro Alves <palves@redhat.com>
5184
5185 * eval.c (eval_skip_value): New function.
5186 (evaluate_subexp_standard): Use it.
5187
5188 2017-09-04 Pedro Alves <palves@redhat.com>
5189
5190 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5191 function name from symbol/minsym and pass it to
5192 error_call_unknown_return_type.
5193
5194 2017-09-04 Pedro Alves <palves@redhat.com>
5195
5196 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5197 * ax-gdb.c (gen_msym_var_ref): New function.
5198 (gen_expr): Handle OP_VAR_MSYM_VALUE.
5199 * eval.c (evaluate_var_msym_value): New function.
5200 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5201 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5202 to call_function_by_hand.
5203 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5204 Handle OP_VAR_MSYM_VALUE.
5205 (union exp_element) <msymbol>: New field.
5206 * minsyms.h (struct type): Forward declare.
5207 (find_minsym_type_and_address): Declare.
5208 * parse.c (write_exp_elt_msym): New function.
5209 (write_exp_msymbol): Delete, refactored as ...
5210 (find_minsym_type_and_address): ... this new function.
5211 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5212 (operator_length_standard, operator_check_standard): Handle
5213 OP_VAR_MSYM_VALUE.
5214 * std-operator.def (OP_VAR_MSYM_VALUE): New.
5215
5216 2017-09-04 Pedro Alves <palves@redhat.com>
5217
5218 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5219 TYPE_GNU_IFUNC specially here. Throw error if return type is
5220 unknown.
5221 * ada-typeprint.c (print_func_type): Handle functions with unknown
5222 return type.
5223 * c-typeprint.c (c_type_print_base): Handle functions and methods
5224 with unknown return type.
5225 * compile/compile-c-symbols.c (convert_symbol_bmsym)
5226 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5227 * compile/compile-c-types.c: Include "objfiles.h".
5228 (convert_func): For functions with unknown return type, warn and
5229 default to int.
5230 * compile/compile-object-run.c (compile_object_run): Adjust call
5231 to call_function_by_hand_dummy.
5232 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5233 call_function_by_hand.
5234 * eval.c (evaluate_subexp_standard): Adjust calls to
5235 call_function_by_hand. Handle functions and methods with unknown
5236 return type. Pass expect_type to call_function_by_hand.
5237 * f-typeprint.c (f_type_print_base): Handle functions with unknown
5238 return type.
5239 * gcore.c (call_target_sbrk): Adjust call to
5240 call_function_by_hand.
5241 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5242 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
5243 an integer address type instead of nodebug.
5244 * guile/scm-value.c (gdbscm_value_call): Adjust call to
5245 call_function_by_hand.
5246 * infcall.c (error_call_unknown_return_type): New function.
5247 (call_function_by_hand): New "default_return_type" parameter.
5248 Pass it down.
5249 (call_function_by_hand_dummy): New "default_return_type"
5250 parameter. Use it instead of defaulting to int. If there's no
5251 default and the return type is unknown, throw an error. If
5252 there's a default return type, and the called function has no
5253 debug info, then assume the function is prototyped.
5254 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5255 New "default_return_type" parameter.
5256 (error_call_unknown_return_type): New declaration.
5257 * linux-fork.c (call_lseek): Cast return type of lseek.
5258 (inferior_call_waitpid, checkpoint_command): Adjust calls to
5259 call_function_by_hand.
5260 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5261 calls to call_function_by_hand.
5262 * m2-typeprint.c (m2_procedure): Handle functions with unknown
5263 return type.
5264 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5265 (value_nsstring, print_object_command): Adjust calls to
5266 call_function_by_hand.
5267 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5268 functions with unknown return type.
5269 (pascal_type_print_func_varspec_suffix): New function.
5270 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5271 TYPE_CODE_METHOD>: Use it.
5272 * python/py-value.c (valpy_call): Adjust call to
5273 call_function_by_hand.
5274 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5275 call_function_by_hand.
5276 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5277 call_function_by_hand.
5278 * valops.c (value_allocate_space_in_inferior): Adjust call to
5279 call_function_by_hand.
5280 * typeprint.c (type_print_unknown_return_type): New function.
5281 * typeprint.h (type_print_unknown_return_type): New declaration.
5282
5283 2017-09-04 Pedro Alves <palves@redhat.com>
5284
5285 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5286 types with more than one parameter as prototyped.
5287
5288 2017-09-04 Pedro Alves <palves@redhat.com>
5289
5290 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5291 (disassemble_command): Use gdb_disassembly_flags instead of bare
5292 int.
5293 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5294 (dump_insns, do_mixed_source_and_assembly_deprecated)
5295 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5296 Use gdb_disassembly_flags instead of bare int.
5297 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5298 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5299 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5300 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5301 (enum gdb_disassembly_flag): ... values of this new enumeration.
5302 (gdb_disassembly_flags): Define.
5303 (gdb_disassembly)
5304 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5305 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5306 gdb_disassembly_flags instead of bare int.
5307 * record-btrace.c (btrace_insn_history)
5308 (record_btrace_insn_history, record_btrace_insn_history_range)
5309 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5310 instead of bare int.
5311 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5312 Use gdb_disassembly_flags instead of bare int.
5313 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5314 Define.
5315 * target-delegates.c: Regenerate.
5316 * target.c (target_insn_history, target_insn_history_from)
5317 (target_insn_history_range): Use gdb_disassembly_flags instead of
5318 bare int.
5319 * target.h: Include "disasm.h".
5320 (struct target_ops) <to_insn_history, to_insn_history_from,
5321 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5322 int.
5323 (target_insn_history, target_insn_history_from)
5324 (target_insn_history_range): Use gdb_disassembly_flags instead of
5325 bare int.
5326
5327 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5328
5329 * cli/cli-script.c (build_command_line): For if/while commands,
5330 check whether args is empty.
5331
5332 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5333
5334 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5335 (enum command_control_type): Likewise.
5336 (struct command_line): Likewise.
5337 (free_command_lines): Likewise.
5338 (struct command_lines_deleter): Likewise.
5339 (command_line_up): Likewise.
5340 (read_command_lines): Likewise.
5341 (read_command_lines_1): Likewise.
5342 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5343 (enum command_control_type): Likewise.
5344 (struct command_line): Likewise.
5345 (free_command_lines): Likewise.
5346 (struct command_lines_deleter): Likewise.
5347 (command_line_up): Likewise.
5348 (read_command_lines): Likewise.
5349 (read_command_lines_1): Likewise.
5350 * breakpoint.h: Include cli/cli-script.h.
5351 * extension-priv.h: Likewise.
5352 * gdbcmd.h: Likewise.
5353
5354 2017-09-04 Pedro Alves <palves@redhat.com>
5355
5356 * ada-lang.c (is_known_support_routine): Move sal declaration to
5357 where it is initialized.
5358 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5359 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5360 (clear_command, update_static_tracepoint): Remove init_sal
5361 references. Move declarations closer to initializations.
5362 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5363 initializations.
5364 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5365 references. Move sal declarations closer to initializations.
5366 * frame.c (find_frame_sal): Return a symtab_and_line via function
5367 return instead of output parameter. Remove init_sal references.
5368 * frame.h (find_frame_sal): Return a symtab_and_line via function
5369 return instead of output parameter.
5370 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5371 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5372 instead of memset.
5373 (gdbscm_find_pc_line): Remove init_sal reference.
5374 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5375 references. Move declarations closer to initializations.
5376 * infcmd.c (set_step_frame): Update. Move declarations closer to
5377 initializations.
5378 (finish_backward): Remove init_sal references. Move declarations
5379 closer to initializations.
5380 * infrun.c (process_event_stop_test, handle_step_into_function)
5381 (insert_hp_step_resume_breakpoint_at_frame)
5382 (insert_step_resume_breakpoint_at_caller): Likewise.
5383 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5384 (symbol_to_sal): Likewise.
5385 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5386 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5387 to its initialization.
5388 * reverse.c (save_bookmark_command): Use new/delete. Remove
5389 init_sal references. Move declarations closer to initializations.
5390 * source.c (get_current_source_symtab_and_line): Remove brace
5391 initialization.
5392 (set_current_source_symtab_and_line): Now takes the sal by const
5393 reference. Remove brace initialization.
5394 (line_info): Remove init_sal reference.
5395 * source.h (set_current_source_symtab_and_line): Now takes a
5396 symtab_and_line via const reference.
5397 * stack.c (set_current_sal_from_frame): Adjust.
5398 (print_frame_info): Adjust.
5399 (get_last_displayed_sal): Return the sal via function return
5400 instead of via output parameter. Simplify.
5401 (frame_info): Adjust.
5402 * stack.h (get_last_displayed_sal): Return the sal via function
5403 return instead of via output parameter.
5404 * symtab.c (init_sal): Delete.
5405 (find_pc_sect_line): Remove init_sal references. Move
5406 declarations closer to initializations.
5407 (find_function_start_sal): Remove init_sal references. Move
5408 declarations closer to initializations.
5409 * symtab.h (struct symtab_and_line): In-class initialize all
5410 fields.
5411 * tracepoint.c (set_traceframe_context)
5412 (print_one_static_tracepoint_marker): Remove init_sal references.
5413 Move declarations closer to initializations.
5414 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5415 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5416 declarations closer to initializations.
5417 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5418 init_sal references. Adjust.
5419
5420 2017-09-04 Pedro Alves <palves@redhat.com>
5421
5422 * ax-gdb.c (agent_command_1): Use range-for.
5423 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5424 * breakpoint.c: Include "common/array-view.h".
5425 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5426 parameter from struct symtabs_and_lines to
5427 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5428 (breakpoint_sals_to_pc): Change sals parameter from struct
5429 symtabs_and_lines to std::vector reference.
5430 (check_fast_tracepoint_sals): Change sals parameter from struct
5431 symtabs_and_lines to std::array_view. Use range-for.
5432 (decode_static_tracepoint_spec): Return a std::vector instead of
5433 symtabs_and_lines. Update.
5434 (create_breakpoint): Update.
5435 (break_range_command, until_break_command, clear_command): Update.
5436 (base_breakpoint_decode_location, bkpt_decode_location)
5437 (bkpt_probe_create_sals_from_location)
5438 (bkpt_probe_decode_location, tracepoint_decode_location)
5439 (tracepoint_probe_decode_location)
5440 (strace_marker_create_sals_from_location): Return a std::vector
5441 instead of symtabs_and_lines.
5442 (strace_marker_create_breakpoints_sal): Update.
5443 (strace_marker_decode_location): Return a std::vector instead of
5444 symtabs_and_lines. Update.
5445 (update_breakpoint_locations): Change struct symtabs_and_lines
5446 parameters to gdb::array_view. Adjust.
5447 (location_to_sals): Return a std::vector instead of
5448 symtabs_and_lines. Update.
5449 (breakpoint_re_set_default): Use std::vector instead of struct
5450 symtabs_and_lines.
5451 (decode_location_default): Return a std::vector instead of
5452 symtabs_and_lines. Update.
5453 * breakpoint.h: Include "common/array-view.h".
5454 (struct breakpoint_ops) <decode_location>: Now returns a
5455 std::vector instead of returning a symtabs_and_lines via output
5456 parameter.
5457 (update_breakpoint_locations): Change sals parameters to use
5458 gdb::array_view.
5459 * cli/cli-cmds.c (edit_command, list_command): Update to use
5460 std::vector and gdb::array_view.
5461 (ambiguous_line_spec): Adjust to use gdb::array_view and
5462 range-for.
5463 (compare_symtabs): Rename to ...
5464 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5465 const reference and adjust.
5466 (filter_sals): Rewrite using std::vector and standard algorithms.
5467 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5468 (jump_command): Update to use std::vector.
5469 * linespec.c (struct linespec_state) <canonical_names>: Update
5470 comment.
5471 (add_sal_to_sals_basic): Delete.
5472 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5473 (decode_line_2, create_sals_line_offset)
5474 (convert_address_location_to_sals, convert_linespec_to_sals)
5475 (convert_explicit_location_to_sals, parse_linespec)
5476 (event_location_to_sals, decode_line_full, decode_line_1)
5477 (decode_line_with_current_source)
5478 (decode_line_with_last_displayed, decode_objc)
5479 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5480 (linespec_result::~linespec_result): Adjust to use std::vector
5481 instead of symtabs_and_lines.
5482 * linespec.h (linespec_sals::sals): Now a std::vector.
5483 (struct linespec_result): Use std::vector, bool, and in-class
5484 initialization.
5485 (decode_line_1, decode_line_with_current_source)
5486 (decode_line_with_last_displayed): Return std::vector.
5487 * macrocmd.c (info_macros_command): Use std::vector.
5488 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5489 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5490 std::vector.
5491 * probe.h (parse_probes): Return a std::vector.
5492 * python/python.c (gdbpy_decode_line): Use std::vector and
5493 gdb::array_view.
5494 * source.c (select_source_symtab, line_info): Use std::vector.
5495 * stack.c (func_command): Use std::vector.
5496 * symtab.h (struct symtabs_and_lines): Delete.
5497 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5498
5499 2017-09-04 Pedro Alves <palves@redhat.com>
5500
5501 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5502 unittests/array-view-selftests.c.
5503 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5504 * common/array-view.h: New file.
5505 * unittests/array-view-selftests.c: New file.
5506
5507 2017-09-04 Pedro Alves <palves@redhat.com>
5508
5509 * cli/cli-cmds.c (edit_command): Pass message to
5510 ambiguous_line_spec.
5511 (list_command): Pass message to ambiguous_line_spec. Say
5512 "first"/"last" instead of "start" and "end" to be consistent with
5513 the manual.
5514 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5515 them to print formatted message.
5516
5517 2017-09-04 Pedro Alves <palves@redhat.com>
5518
5519 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5520 ftrace_update_insns by reference instead of pointer.
5521
5522 2017-09-04 Yao Qi <yao.qi@linaro.org>
5523
5524 * i386-go32-tdep.c: Include x86-xstate.h.
5525 (i386_go32_init_abi): Call i386_target_description.
5526 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5527 if xcr0 is X86_XSTATE_X87_MASK.
5528 * i386-tdep.h (tdesc_i386): Remove the declaration.
5529 (tdesc_i386_mmx): Likewise.
5530
5531 2017-09-04 Yao Qi <yao.qi@linaro.org>
5532
5533 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5534 X86_XSTATE_SSE_MASK instead of 0.
5535
5536 2017-09-04 Yao Qi <yao.qi@linaro.org>
5537
5538 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5539 i386_target_description.
5540 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5541 i386_target_description.
5542 * i386-tdep.c (i386_gdbarch_init): Likewise.
5543
5544 2017-09-04 Yao Qi <yao.qi@linaro.org>
5545
5546 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5547 (x86_darwin_init_abi_64): Call amd64_target_description.
5548 * amd64-dicos-tdep.c: Likewise.
5549 * amd64-fbsd-nat.c: Likewise.
5550 * amd64-fbsd-tdep.c: Likewise.
5551 * amd64-nbsd-tdep.c: Likewise.
5552 * amd64-obsd-tdep.c: Likewise.
5553 * amd64-sol2-tdep.c: Likewise.
5554 * amd64-windows-tdep.c: Likewise.
5555 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5556
5557 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5558
5559 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5560 (btrace_function) <insn>: Change type to use std::vector.
5561 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5562 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5563 ftrace_update_insns, ftrace_compute_global_level_offset,
5564 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5565 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5566 change to std::vector.
5567 (ftrace_update_insns): Adjust to change to std::vector, change
5568 type of INSN parameter.
5569 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5570 * record-btrace.c (btrace_call_history_insn_range,
5571 btrace_compute_src_line_range,
5572 record_btrace_frame_prev_register): Adjust to change to
5573 std::vector.
5574 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5575 to change to std::vector.
5576
5577 2017-09-03 Tom Tromey <tom@tromey.com>
5578
5579 * corefile.c (reopen_exec_file): Use std::string.
5580
5581 2017-09-03 Tom Tromey <tom@tromey.com>
5582
5583 * compile/compile.c (compile_register_name_mangled): Return
5584 std::string.
5585 * compile/compile-loc2c.c (pushf_register_address): Update.
5586 (pushf_register): Update.
5587 * compile/compile-c-types.c (convert_array): Update.
5588 * compile/compile-c-symbols.c (generate_vla_size): Update.
5589 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5590 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5591 (convert_one_symbol): Update.
5592 (generate_c_for_for_one_variable): Update.
5593 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5594 std::string.
5595 (generate_register_struct): Update.
5596 * compile/compile-internal.h (c_get_range_decl_name): Return a
5597 std::string.
5598 (compile_register_name_mangled): Return std::string.
5599
5600 2017-09-03 Tom Tromey <tom@tromey.com>
5601
5602 * utils.c (perror_string): Return a std::string.
5603 (throw_perror_with_name, perror_warning_with_name): Update.
5604
5605 2017-09-03 Tom Tromey <tom@tromey.com>
5606
5607 * demangle.c (demangle_command): Use std::string,
5608 unique_xmalloc_ptr.
5609
5610 2017-09-03 Tom Tromey <tom@tromey.com>
5611
5612 * cli/cli-setshow.c (do_set_command): Use std::string.
5613
5614 2017-09-03 Tom Tromey <tom@tromey.com>
5615
5616 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5617
5618 2017-09-03 Tom Tromey <tom@tromey.com>
5619
5620 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5621
5622 2017-09-03 Tom Tromey <tom@tromey.com>
5623
5624 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5625 gdb::unique_xmalloc_ptr.
5626
5627 2017-09-03 Tom Tromey <tom@tromey.com>
5628
5629 * thread.c (print_thread_info_1): Use string_printf.
5630 (thread_apply_command, thread_apply_all_command): Use
5631 std::string.
5632
5633 2017-09-03 Tom Tromey <tom@tromey.com>
5634
5635 * valprint.c (val_print_string): Update.
5636 * gdbcore.h (memory_error_message): Return std::string.
5637 * corefile.c (memory_error_message): Return std::string.
5638 (memory_error): Update.
5639 * breakpoint.c (insert_bp_location): Update.
5640
5641 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5642
5643 * target/waitstatus.h (target_waitstatus_to_string): Change
5644 return type to std::string.
5645 * target/waitstatus.c (target_waitstatus_to_string): Return
5646 std::string.
5647 * target.h (target_waitstatus_to_string): Remove declaration.
5648 * infrun.c (resume, clear_proceed_status_thread,
5649 print_target_wait_results, do_target_wait, save_waitstatus,
5650 stop_all_threads): Adjust.
5651 * record-btrace.c (record_btrace_wait): Adjust.
5652 * target-debug.h
5653 (target_debug_print_struct_target_waitstatus_p): Adjust.
5654
5655 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5656
5657 PR gdb/22046
5658 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5659 detection.
5660
5661 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5662
5663 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5664 for setting/unsetting environment variables on the remote target.
5665 (New remote packets): Add entries for QEnvironmentHexEncoded,
5666 QEnvironmentUnset and QEnvironmentReset.
5667 * common/environ.c (gdb_environ::operator=): Extend method to
5668 handle m_user_set_env_list and m_user_unset_env_list.
5669 (gdb_environ::clear): Likewise.
5670 (match_var_in_string): Change type of first parameter from 'char
5671 *' to 'const char *'.
5672 (gdb_environ::set): Extend method to handle
5673 m_user_set_env_list and m_user_unset_env_list.
5674 (gdb_environ::unset): Likewise.
5675 (gdb_environ::clear_user_set_env): New method.
5676 (gdb_environ::user_set_envp): Likewise.
5677 (gdb_environ::user_unset_envp): Likewise.
5678 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5679 m_user_unset_env_list on move constructor/assignment.
5680 (unset): Add new default parameter 'update_unset_list = true'.
5681 (clear_user_set_env): New method.
5682 (user_set_envp): Likewise.
5683 (user_unset_envp): Likewise.
5684 (m_user_set_env_list): New std::set.
5685 (m_user_unset_env_list): Likewise.
5686 * common/rsp-low.c (hex2str): New function.
5687 (bin2hex): New overload for bin2hex function.
5688 * common/rsp-low.c (hex2str): New prototype.
5689 (str2hex): New overload prototype.
5690 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5691 QEnvironmentUnset and QEnvironmentReset.
5692 (remote_protocol_features): Add QEnvironmentHexEncoded,
5693 QEnvironmentUnset and QEnvironmentReset packets.
5694 (send_environment_packet): New function.
5695 (extended_remote_environment_support): Likewise.
5696 (extended_remote_create_inferior): Call
5697 extended_remote_environment_support.
5698 (_initialize_remote): Add QEnvironmentHexEncoded,
5699 QEnvironmentUnset and QEnvironmentReset packet configs.
5700 * unittests/environ-selftests.c (gdb_selftest_env_var):
5701 New variable.
5702 (test_vector_initialization): New function.
5703 (test_init_from_host_environ): Likewise.
5704 (test_reinit_from_host_environ): Likewise.
5705 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5706 Likewise.
5707 (test_unset_set_empty_vector): Likewise.
5708 (test_vector_clear): Likewise.
5709 (test_std_move): Likewise.
5710 (test_move_constructor):
5711 (test_self_move): Likewise.
5712 (test_set_unset_reset): Likewise.
5713 (run_tests): Rewrite in terms of the functions above.
5714
5715 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
5716
5717 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5718 (adi_available): Use a temp variable of type CORE_ADDR as argument
5719 3 when calling target_auxv_search.
5720 (adi_normalize_address): Use masks and xor operators to calculate
5721 normalized address.
5722 (adi_read_versions, adi_write_versions, adi_print_versions)
5723 (do_examine, do_assign): Use paddress.
5724
5725 2017-08-29 John Baldwin <jhb@FreeBSD.org>
5726
5727 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5728 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5729 out of loop and add supply of FIR.
5730 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5731 add collect of FIR.
5732
5733 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5734
5735 PR gdb/21827
5736 * cli/cli-script.c (define_command): Don't convert command name
5737 to lower case.
5738
5739 2017-08-25 Joel Brobecker <brobecker@adacore.com>
5740
5741 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5742 Update all callers accordingly. Remove all code blocks handling
5743 the case where DISPP is not NULL.
5744
5745 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5746
5747 PR symtab/22003
5748 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5749 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5750 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5751
5752 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5753
5754 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5755 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5756 (read_comp_units_from_section): New parameter abbrev_section, use
5757 read_and_check_comp_unit_head, allocate signatured_type if needed.
5758 (create_all_comp_units): Update read_comp_units_from_section caller.
5759
5760 2017-08-23 Pedro Alves <palves@redhat.com>
5761
5762 PR remote/21852
5763 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5764 to null_ptid and switch to thread without reading the registers
5765 after adding the inferior.
5766
5767 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5768
5769 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5770 compile-gcc.
5771 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5772 (compile_to_object): Implement compile_gcc.
5773 (_initialize_compile): Install "set compile-gcc". Initialize
5774 compile_gcc.
5775
5776 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5777
5778 * compile/compile.c (compile_to_object): Conditionally call
5779 set_verbose. Conditionally call compile or compile_v0.
5780
5781 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
5782
5783 * sparc64-tdep.h: (adi_normalize_address): New export.
5784 * sparc-nat.h: (open_adi_tag_fd): New export.
5785 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5786 * sparc64-linux-tdep.c:
5787 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5788 (sparc64_linux_handle_segmentation_fault): New function.
5789 (sparc64_linux_init_abi): Register
5790 sparc64_linux_handle_segmentation_fault
5791 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5792 (sparc64_addr_bits_remove): New function.
5793 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5794 (MAX_PROC_NAME_SIZE): New macro.
5795 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5796 (sparc64adilist): New variable.
5797 (adi_proc_list): New variable.
5798 (find_adi_info): New function.
5799 (add_adi_info): New function.
5800 (get_adi_info_proc): New function.
5801 (get_adi_info): New function.
5802 (info_adi_command): New function.
5803 (read_maps_entry): New function.
5804 (adi_available): New function.
5805 (adi_normalize_address): New function.
5806 (adi_align_address): New function.
5807 (adi_convert_byte_count): New function.
5808 (adi_tag_fd): New function.
5809 (adi_is_addr_mapped): New function.
5810 (adi_read_versions): New function.
5811 (adi_write_versions): New function.
5812 (adi_print_versions): New function.
5813 (do_examine): New function.
5814 (do_assign): New function.
5815 (adi_examine_command): New function.
5816 (adi_assign_command): New function.
5817 (_initialize_sparc64_adi_tdep): New function.
5818
5819 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5820
5821 * breakpoint.c (breakpoints_info): Rename to ...
5822 (info_breakpoints_command): ... this.
5823 (watchpoints_info): Rename to ...
5824 (info_watchpoints_command): ... this.
5825 (tracepoints_info): Rename to ...
5826 (info_tracepoints_command): ... this.
5827 (_initialize_breakpoint): Adjust.
5828 * dcache.c (dcache_info): Rename to ...
5829 (info_display_command): ... this.
5830 (_initialize_dcache): Adjust.
5831 * frame.h (args_info): Rename to ...
5832 (info_args_command): ... this.
5833 (locals_info): Rename to ...
5834 (info_locals_command): ... this.
5835 * infcmd.c (nofp_registers_info): Rename to ...
5836 (info_registers_command): ... this.
5837 (float_info): Rename to ...
5838 (info_float_command): ... this.
5839 (program_info): Rename to ...
5840 (info_program_command): ... this.
5841 (all_registers_info): Rename to ...
5842 (info_all_registers_command): ... this.
5843 (vector_info): Rename to ...
5844 (info_vector_command): ... this.
5845 (float_info): Rename to ...
5846 (info_float_command): ... this.
5847 (_initialize_infcmd): Adjust.
5848 * inferior.h (term_info): Rename to ...
5849 (info_terminal_command): ... this.
5850 * inflow.c (term_info): Rename to ...
5851 (info_terminal_command): ... this.
5852 (_initialize_inflow): Adjust.
5853 * infrun.c (signals_info): Rename to ...
5854 (info_signals_command): ... this.
5855 (_initialize_infrun): Adjust.
5856 * objc-lang.c (classes_info): Rename to ...
5857 (info_classes_command): ... this.
5858 (selectors_info): Rename to ...
5859 (info_selectors_command): ... this.
5860 (_initialize_objc_language): Adjust.
5861 * printcmd.c (sym_info): Rename to ...
5862 (info_symbol_command): ... this.
5863 (address_info): Rename to ...
5864 (info_address_command): ... this.
5865 (display_info): Rename to ...
5866 (info_display_command): ... this.
5867 (_initialize_printcmd): Adjust.
5868 * reverse.c (bookmarks_info): Rename to ...
5869 (info_breakpoints_command): ... this.
5870 (_initialize_reverse): Adjust.
5871 * ser-go32.c (dos_info): Rename to ...
5872 (info_serial_command): ... this.
5873 (_initialize_ser_dos): Adjust.
5874 * skip.c (skip_info): Rename to ...
5875 (info_skip_command): ... this.
5876 (_initialize_step_skip): Adjust.
5877 * source.c (line_info): Rename to ...
5878 (info_line_command): ... this.
5879 (source_info): Rename to ...
5880 (info_source_command)
5881 * stack.c (frame_info): Rename to ...
5882 (info_frame_command): ... this.
5883 (locals_info): Rename to ...
5884 (info_locals_command): ... this.
5885 (args_info): Rename to ...
5886 (info_args_command): ... this.
5887 (_initialize_stack): Adjust.
5888 * symtab.c (sources_info): Rename to ...
5889 (info_sources_command): ... this.
5890 (variables_info): Rename to ...
5891 (info_variables_command): ... this.
5892 (functions_info): Rename to ...
5893 (info_functions_command): ... this.
5894 (types_info): Rename to ...
5895 (info_types_command): ... this.
5896 (_initialize_symtab): Adjust.
5897 * target.c (target_info): Rename to ...
5898 (info_target_command): ... this.
5899 (initialize_targets): Adjust.
5900 * tracepoint.c (tvariables_info): Rename to ...
5901 (info_tvariables_command): ... this.
5902 (scope_info): Rename to ...
5903 (info_scope_command): ... this.
5904 (trace_dump_actions): Adjust.
5905 (_initialize_tracepoint): Adjust.
5906
5907 2017-08-22 Tom Tromey <tom@tromey.com>
5908
5909 * breakpoint.h (install_breakpoint): Update.
5910 * breakpoint.c (add_solib_catchpoint): Update.
5911 (install_breakpoint): Change argument to a std::unique_ptr.
5912 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5913 (create_breakpoint_sal, create_breakpoint): Update.
5914 (watch_command_1, catch_exec_command_1)
5915 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5916 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5917 Return the breakpoint.
5918 (set_raw_breakpoint_without_location, set_raw_breakpoint)
5919 (new_single_step_breakpoint): Update.
5920 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5921 std::unique_ptr.
5922 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5923 std::unique_ptr.
5924 * break-catch-sig.c (create_signal_catchpoint): Use
5925 std::unique_ptr.
5926 * ada-lang.c (create_ada_exception_catchpoint): Use
5927 std::unique_ptr.
5928
5929 2017-08-22 Tom Tromey <tom@tromey.com>
5930
5931 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5932
5933 2017-08-22 Tom Tromey <tom@tromey.com>
5934
5935 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5936 (lookup_partial_symbol): Update.
5937
5938 2017-08-22 Tom Tromey <tom@tromey.com>
5939
5940 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5941 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5942 (find_and_open_source, symtab_to_fullname): Update.
5943 * psymtab.c (psymtab_to_fullname): Update.
5944
5945 2017-08-22 Tom Tromey <tom@tromey.com>
5946
5947 * exec.c (exec_file_attach): Update.
5948 * linux-thread-db.c (try_thread_db_load): Update.
5949 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5950 * utils.c (gdb_realpath): Change return type.
5951 (gdb_realpath_keepfile): Update.
5952 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5953 (_initialize_utils): Register the new self test.
5954 * source.c (openp): Update.
5955 (find_and_open_source): Update.
5956 * nto-tdep.c (nto_find_and_open_solib): Update.
5957 * main.c (set_gdb_data_directory): Update.
5958 (captured_main_1): Update.
5959 * dwarf2read.c (dwarf2_get_dwz_file): Update
5960 (dw2_map_symbol_filenames): Update.
5961 * auto-load.c (auto_load_safe_path_vec_update): Update.
5962 (filename_is_in_auto_load_safe_path_vec): Change type of
5963 "filename_realp".
5964 (auto_load_objfile_script): Update.
5965 (file_is_auto_load_safe): Update. Use std::string.
5966 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5967
5968 2017-08-22 Tom Tromey <tom@tromey.com>
5969
5970 * utils.c (gdb_realpath_keepfile): Return a
5971 gdb::unique_xmalloc_ptr.
5972 * exec.c (exec_file_attach): Update.
5973 * utils.h (gdb_realpath_keepfile): Return a
5974 gdb::unique_xmalloc_ptr.
5975
5976 2017-08-22 Tom Tromey <tom@tromey.com>
5977
5978 * compile/compile.c (compile_file_command): Use
5979 gdb::unique_xmalloc_ptr, std::string.
5980 * utils.c (gdb_abspath): Change return type.
5981 * source.c (openp): Update.
5982 * objfiles.c (allocate_objfile): Update.
5983 * main.c (set_gdb_data_directory): Update.
5984 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5985
5986 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
5987
5988 * cli-cmds.c (list_commands): List actual code around more than
5989 one location.
5990
5991 2017-08-21 John Baldwin <jhb@FreeBSD.org>
5992
5993 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5994
5995 2017-08-21 Pedro Alves <palves@redhat.com>
5996
5997 PR gdb/19487
5998 * c-exp.y (variable production): Handle function aliases.
5999 * minsyms.c (msymbol_is_text): New function.
6000 * minsyms.h (msymbol_is_text): Declare.
6001 * symtab.c (find_function_alias_target): New function.
6002 * symtab.h (find_function_alias_target): Declare.
6003
6004 2017-08-21 Pedro Alves <palves@redhat.com>
6005
6006 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6007 typedefs.
6008 * typeprint.c (whatis_exp): If handling "whatis", and expression
6009 is OP_TYPE, strip one typedef level. Otherwise don't strip
6010 typedefs here.
6011 * valops.c (value_cast): Save "to" type before resolving
6012 stubs/typedefs. Use that type as resulting value's type.
6013
6014 2017-08-18 Tom Tromey <tom@tromey.com>
6015 Pedro Alves <palves@redhat.com>
6016
6017 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6018 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6019 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6020 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6021 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6022 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6023 (linux_get_siginfo_data): Add "thread" argument. Use
6024 scoped_restore.
6025 * linux-nat.c (linux_child_follow_fork)
6026 (check_stopped_by_watchpoint): Use scoped_restore.
6027 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6028 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6029 (restore_inferior_ptid, save_inferior_ptid): Remove.
6030 * btrace.c (btrace_fetch): Use scoped_restore.
6031 * bsd-uthread.c (bsd_uthread_fetch_registers)
6032 (bsd_uthread_store_registers): Use scoped_restore.
6033 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6034 scoped_restore.
6035 * aix-thread.c (aix_thread_resume, aix_thread_wait)
6036 (aix_thread_xfer_partial): Use scoped_restore.
6037 * inferior.h (save_inferior_ptid): Remove.
6038
6039 2017-08-18 Yao Qi <yao.qi@linaro.org>
6040
6041 PR tdep/21818
6042 * arm-tdep.c (gdb_print_insn_arm): Mark
6043 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6044
6045 2017-08-18 Yao Qi <yao.qi@linaro.org>
6046
6047 * NEWS: Mention GDBserver's new option "--selftest".
6048 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6049 * selftest.c: Move it to common/selftest.c.
6050 * selftest.h: Move it to common/selftest.h.
6051 * selftest-arch.c (reset): New function.
6052 (tests_with_arch): Call reset.
6053
6054 2017-08-18 Yao Qi <yao.qi@linaro.org>
6055
6056 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
6057 instead of exception_fprintf and printf_filtered.
6058
6059 2017-08-18 Yao Qi <yao.qi@linaro.org>
6060
6061 * selftest.c (register_self_test): Rename it to
6062 selftests::register_test.
6063 (run_self_tests): selftest::run_tests.
6064 * selftest.h: Update declarations.
6065 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6066 selftests::register_test_foreach_arch.
6067 * selftest-arch.h: Update declaration.
6068 * aarch64-tdep.c: Update.
6069 * arm-tdep.c: Likewise.
6070 * disasm-selftests.c: Likewise.
6071 * dwarf2loc.c: Likewise.
6072 * dwarf2-frame.c: Likewise.
6073 * findvar.c: Likewise.
6074 * gdbarch-selftests.c: Likewise.
6075 * maint.c (maintenance_selftest): Likewise.
6076 * regcache.c: Likewise.
6077 * rust-exp.y: Likewise.
6078 * selftest-arch.c: Likewise.
6079 * unittests/environ-selftests.c: Likewise.
6080 * unittests/function-view-selftests.c: Likewise.
6081 * unittests/offset-type-selftests.c: Likewise.
6082 * unittests/optional-selftests.c: Likewise.
6083 * unittests/scoped_restore-selftests.c: Likewise.
6084 * utils-selftests.c: Likewise.
6085
6086 2017-08-17 Pedro Alves <palves@redhat.com>
6087
6088 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6089 local.
6090
6091 2017-08-17 Pedro Alves <palves@redhat.com>
6092
6093 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6094 field.
6095 (reset_die_in_process): Delete, replaced by ...
6096 (process_die_scope): ... this new class. Make it responsible for
6097 freeing cu->line_header too.
6098 (process_die): Use process_die_scope.
6099 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6100 cu->line_header_die_owner. Don't release the line header if it's
6101 owned by the CU.
6102 (setup_type_unit_groups): Make the CU/DIE own the line header.
6103 Don't release the line header here.
6104
6105 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
6106
6107 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6108
6109 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
6110
6111 * NEWS: Mention new shortcuts for nexti and stepi in TUI
6112 Single-Key mode
6113
6114 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
6115
6116 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6117 mode command list.
6118
6119 2017-08-15 Stafford Horne <shorne@gmail.com>
6120
6121 * MAINTAINERS (Write After Approval): Add Stafford Horne.
6122
6123 2017-08-15 Stafford Horne <shorne@gmail.com>
6124
6125 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6126
6127 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
6128
6129 PR gdb/21954
6130 * infcmd.c (unset_environment_command): Use the 'clear' method on
6131 the environment instead of resetting it.
6132
6133 2017-08-15 John Baldwin <jhb@FreeBSD.org>
6134
6135 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6136 platforms.
6137
6138 2017-08-14 Tom Tromey <tom@tromey.com>
6139
6140 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6141 (print_binary_chars): Likewise.
6142 (BITS_IN_BYTES): Remove.
6143
6144 2017-08-14 Tom Tromey <tom@tromey.com>
6145
6146 PR gdb/21675
6147 * valprint.c (LOW_ZERO): Change value to 034.
6148 (print_octal_chars): Add static_asserts for octal constants.
6149 * printcmd.c (print_scalar_formatted): Add 'd' case.
6150
6151 2017-08-11 Tom Tromey <tom@tromey.com>
6152
6153 * symfile.c (add_symbol_file_command): Use std::vector.
6154
6155 2017-08-14 Tom Tromey <tom@tromey.com>
6156
6157 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6158 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6159 std::move.
6160 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6161
6162 2017-08-11 Pedro Alves <palves@redhat.com>
6163
6164 * infrun.c (process_event_stop_test): Adjust
6165 function_name_is_marked_for_skip call.
6166 * skip.c: Include <list>.
6167 (skiplist_entry): Make it a class with private fields, and
6168 getters/setters.
6169 (skiplist_entry_chain): Delete.
6170 (skiplist_entries): New.
6171 (skiplist_entry_count): Delete.
6172 (highest_skiplist_entry_num): New.
6173 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6174 (add_skiplist_entry): Delete.
6175 (skiplist_entry::skiplist_entry): New.
6176 (skiplist_entry::add_entry): New.
6177 (skip_file_command, skip_function): Adjust.
6178 (compile_skip_regexp): Delete.
6179 (skip_command): Don't compile regexp here. Adjust to use
6180 skiplist_entry::add_entry.
6181 (skip_info): Adjust to use range-for and getters.
6182 (skip_enable_command, skip_disable_command): Adjust to use
6183 range-for and setters.
6184 (skip_delete_command): Adjust to use std::list.
6185 (add_skiplist_entry): Delete.
6186 (skip_file_p): Delete, refactored as ...
6187 (skiplist_entry::do_skip_file_p): ... this new method.
6188 (skip_gfile_p): Delete, refactored as ...
6189 (skiplist_entry::do_gskip_file_p): ... this new method.
6190 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6191 (skiplist_entry::skip_function_p): ... this new method.
6192 (function_name_is_marked_for_skip): Now returns bool, and takes
6193 the function sal by const reference. Adjust to use range-for and
6194 skiplist_entry methods.
6195 (_initialize_step_skip): Remove references to
6196 skiplist_entry_chain, skiplist_entry_count.
6197 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6198 takes the function sal by const reference.
6199
6200 2017-08-11 Yao Qi <yao.qi@linaro.org>
6201
6202 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6203 (dwarf2_frame_cache): Remove reset_cache_cleanup.
6204 (dwarf2_frame_cache):
6205 * frame-unwind.c (frame_unwind_try_unwinder): Catch
6206 RETURN_MASK_ALL and set *this_case to NULL.
6207 * frame-unwind.h: Update comments.
6208
6209 2017-08-11 Yao Qi <yao.qi@linaro.org>
6210
6211 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6212 (dwarf2_frame_state_copy_regs): Remove.
6213 (dwarf2_frame_state_free_regs): Remove.
6214 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6215 (dwarf2_restore_rule): Call method .alloc_regs instead of
6216 dwarf2_frame_state_alloc_regs.
6217 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
6218 constructor. Call std::move.
6219 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6220 (dwarf2_frame_cache): Likewise.
6221
6222 [GDB_SELF_TEST]: Include selftest.h and
6223 selftest-arch.h.
6224 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6225 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6226 execute_cfa_program_test.
6227
6228 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6229 copy ctor, assignment operator, move assignment.
6230 <alloc_regs>: New method.
6231 <swap>: New method.
6232 (struct dwarf2_frame_state): Delete dtor.
6233 (dwarf2_frame_state_alloc_regs): Remove declaration.
6234 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6235 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6236
6237 2017-08-11 Yao Qi <yao.qi@linaro.org>
6238
6239 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6240 (dwarf2_frame_state::dwarf2_frame_state): New.
6241 (dwarf2_frame_state::~dwarf2_frame_state): New.
6242 (dwarf2_fetch_cfa_info): Update.
6243 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
6244 rather than a pointer. Update code.
6245 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6246 dtor.
6247 <data_align, code_align, retaddr_column>: Change them to const.
6248 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6249 to bool.
6250
6251 2017-08-11 Yao Qi <yao.qi@linaro.org>
6252
6253 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6254 <loc.exp>: New field.
6255 * dwarf2-frame.c (execute_cfa_program): Update.
6256 (dwarf2_frame_prev_register): Update.
6257
6258 2017-08-10 Pedro Alves <palves@redhat.com>
6259
6260 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6261
6262 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6263
6264 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6265 (fbsd_pending_children): Use std::list.
6266 (fbsd_remember_child): Likewise.
6267 (fbsd_is_child_pending): Likewise.
6268 (fbsd_pending_vfork_done): Use std::forward_list.
6269 (fbsd_add_vfork_done): Likewise.
6270 (fbsd_is_vfork_done_pending): Likewise.
6271 (fbsd_next_vfork_done): Likewise.
6272
6273 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6274
6275 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6276 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6277 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6278 for `mapfilename'.
6279 (fbsd_xfer_partial): Use gdb::byte_vector.
6280 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6281
6282 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6283
6284 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6285 "filestuff.h".
6286 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6287
6288 2017-08-09 Tom Tromey <tom@tromey.com>
6289
6290 * skip.c (skiplist_entry): New constructor.
6291 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6292 (skiplist_entry::file_is_glob): Now bool.
6293 (skiplist_entry::file, skiplist_entry::function): Now
6294 std::string.
6295 (make_skip_entry): Return a unique_ptr. Use new.
6296 (free_skiplist_entry, free_skiplist_entry_cleanup)
6297 (make_free_skiplist_entry_cleanup): Remove.
6298 (skip_command, skip_disable_command, add_skiplist_entry)
6299 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6300 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6301 (function_name_is_marked_for_skip): Update.
6302 (skip_delete_command): Update. Use delete.
6303
6304 2017-08-09 Jiong Wang <jiong.wang@arm.com>
6305
6306 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6307 (aarch64_linux_core_read_description): New function.
6308 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6309
6310 2017-08-09 Pedro Alves <palves@redhat.com>
6311
6312 * cp-name-parser.y (cp_comp_to_string): Return a
6313 gdb::unique_xmalloc_ptr<char>.
6314 * cp-support.c (replace_typedefs_qualified_name)
6315 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6316 (cp_canonicalize_string_full): Use op= instead of explicit
6317 convertion.
6318 (cp_class_name_from_physname, method_name_from_physname)
6319 (cp_func_name, cp_remove_params): Adjust to use
6320 gdb::unique_xmalloc_ptr<char>.
6321 * cp-support.h (cp_comp_to_string): Return a
6322 gdb::unique_xmalloc_ptr<char>.
6323 * python/py-type.c (typy_lookup_type): Adjust to use
6324 gdb::unique_xmalloc_ptr<char>.
6325
6326 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6327
6328 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6329
6330 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6331 Yao Qi <yao.qi@linaro.org>
6332
6333 * cp-support.c (cp_canonicalize_string_full): Use
6334 gdb::unique_xmalloc_ptr<char>.
6335 (cp_canonicalize_string): Likewise.
6336
6337 2017-08-09 Yao Qi <yao.qi@linaro.org>
6338
6339 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6340 * regformats/i386/amd64-avx-avx512.dat: Remove.
6341 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6342 * regformats/i386/amd64-avx-mpx.dat:Remove.
6343 * regformats/i386/amd64-avx.dat: Remove.
6344 * regformats/i386/amd64-mpx.dat: Remove.
6345 * regformats/i386/i386-avx-avx512.dat: Remove.
6346 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6347 * regformats/i386/i386-avx-mpx.dat: Remove.
6348 * regformats/i386/i386-mmx.dat: Remove.
6349 * regformats/i386/i386-mpx.dat: Remove.
6350
6351 2017-08-09 Yao Qi <yao.qi@linaro.org>
6352
6353 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6354 * amd64-tdep.c: Don't include features/i386/x32*.c.
6355 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6356 functions.
6357 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6358 and i386/x32-avx-avx512.
6359 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6360 and i386/x32.xml.
6361 * features/i386/x32-avx-avx512.c: Removed.
6362 * features/i386/x32-avx-avx512.xml: Removed.
6363 * features/i386/x32-avx.c: Removed.
6364 * features/i386/x32-avx.xml: Removed.
6365 * features/i386/x32.c: Removed.
6366 * features/i386/x32.xml: Removed.
6367 * regformats/i386/x32-avx-avx512.dat: Removed.
6368 * regformats/i386/x32-avx.dat: Removed.
6369 * regformats/i386/x32.dat: Removed.
6370
6371 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6372
6373 PR breakpoints/21886
6374 * mem-break.c (default_memory_insert_breakpoint): Use
6375 `->placed_address' rather than `->reqstd_address' for the
6376 breakpoint location.
6377
6378 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6379
6380 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6381 assertions.
6382
6383 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6384
6385 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6386 a union of `tdep_info', `tdesc_data' and `id'.
6387 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6388 rather than `info.tdep_info'.
6389 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6390 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6391 * i386-tdep.c (i386_gdbarch_init): Likewise.
6392 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6393 * mips-tdep.c (mips_gdbarch_init): Likewise.
6394 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6395 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6396 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6397 `info.tdep_info'.
6398 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6399 `info.tdep_info'.
6400 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6401 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6402 `info.tdep_info'.
6403 * spu-tdep.c (spu_gdbarch_init): Likewise.
6404 * gdbarch.h: Regenerate.
6405
6406 2017-08-07 Leszek Swirski <leszeks@google.com>
6407
6408 PR symtab/20899
6409 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6410
6411 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6412
6413 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6414 (gdbsim_open): Rename gdb_argv args object to argv.
6415
6416 2017-08-05 Tom Tromey <tom@tromey.com>
6417
6418 * compile/compile-object-load.c (compile_object_load): Use
6419 gdb::unique_xmalloc_ptr.
6420 * cli/cli-dump.c (scan_filename): Rename from
6421 scan_filename_with_cleanup. Change return type.
6422 (scan_expression): Rename from scan_expression_with_cleanup.
6423 Change return type.
6424 (dump_memory_to_file, dump_value_to_file, restore_command):
6425 Use gdb::unique_xmalloc_ptr. Update.
6426 * cli/cli-cmds.c (find_and_open_script): Use
6427 gdb::unique_xmalloc_ptr.
6428 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6429 * symmisc.c (maintenance_print_symbols)
6430 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6431 * symfile.c (symfile_bfd_open, generic_load)
6432 (add_symbol_file_command, remove_symbol_file_command): Use
6433 gdb::unique_xmalloc_ptr.
6434 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6435 * psymtab.c (maintenance_print_psymbols): Use
6436 gdb::unique_xmalloc_ptr.
6437 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6438 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6439 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6440 (reload_shared_libraries_1): Likewise.
6441
6442 2017-08-05 Tom Tromey <tom@tromey.com>
6443
6444 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6445 (rust_op_vector, rust_set_vector): New typedefs.
6446 (current_parser): New global.
6447 (work_obstack): Change to pointer type. Update all users.
6448 (rust_ast, pstate): Remove globals.
6449 (struct rust_parser): New.
6450 (%union) <params, field_inits>: Change type.
6451 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6452 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6453 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6454 (convert_params_to_types, convert_params_to_expression): Change
6455 type of "params".
6456 (ast_string): Change type of "fields".
6457 (rust_parse): Make a rust_parser. Remove cleanups.
6458 (rust_lex_tests): Make and install an auto_obstack.
6459
6460 2017-08-04 Yao Qi <yao.qi@linaro.org>
6461
6462 * configure.srv (ipa_x32_linux_regobj): New.
6463 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6464 instead of X86_TDESC_AVX512.
6465 (initialize_low_tracepoint): Call
6466 init_registers_x32_avx_avx512_linux.
6467
6468 2017-08-04 Yao Qi <yao.qi@linaro.org>
6469
6470 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6471
6472 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6473
6474 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6475
6476 2017-08-03 Tom Tromey <tom@tromey.com>
6477
6478 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6479 Remove.
6480 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6481
6482 2017-08-03 Tom Tromey <tom@tromey.com>
6483
6484 * python/py-param.c (compute_enum_values): Use gdb_argv.
6485
6486 2017-08-03 Tom Tromey <tom@tromey.com>
6487
6488 * utils.h (struct gdb_argv_deleter): New.
6489 (gdb_argv): New class.
6490 * utils.c (gdb_argv::reset): New method.
6491 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6492 * tracefile.c (tsave_command): Use gdb_argv.
6493 * top.c (new_ui_command): Use gdb_argv.
6494 * symmisc.c (maintenance_print_symbols)
6495 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6496 * symfile.c (symbol_file_command, generic_load)
6497 (remove_symbol_file_command): Use gdb_argv.
6498 * stack.c (backtrace_command): Use gdb_argv.
6499 * source.c (add_path, show_substitute_path_command)
6500 (unset_substitute_path_command, set_substitute_path_command):
6501 Use gdb_argv.
6502 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6503 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6504 * remote.c (extended_remote_run, remote_put_command)
6505 (remote_get_command, remote_delete_command): Use gdb_argv.
6506 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6507 (gdbsim_open): Use gdb_argv.
6508 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6509 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6510 * procfs.c (procfs_info_proc): Use gdb_argv.
6511 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6512 * infrun.c (handle_command): Use gdb_argv.
6513 * inferior.c (add_inferior_command, clone_inferior_command):
6514 Use gdb_argv.
6515 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6516 * exec.c (exec_file_command): Use gdb_argv.
6517 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6518 * compile/compile.c (build_argc_argv): Use gdb_argv.
6519
6520 2017-08-03 Tom Tromey <tom@tromey.com>
6521
6522 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6523
6524 2017-08-03 Tom Tromey <tom@tromey.com>
6525
6526 * python/python.c (compute_python_string): Return std::string.
6527 (gdbpy_eval_from_control_command): Update.
6528 (do_start_initialization): Use std::string.
6529 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6530 xstrprintf.
6531 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6532 xstrprintf.
6533
6534 2017-08-03 Tom Tromey <tom@tromey.com>
6535
6536 * top.h (do_restore_instream_cleanup): Remove.
6537 * top.c (do_restore_instream_cleanup): Remove.
6538 (read_command_file): Use scoped_restore.
6539 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6540
6541 2017-08-03 Tom Tromey <tom@tromey.com>
6542
6543 * cli/cli-script.c (execute_user_command)
6544 (execute_control_command): Use scoped_restore.
6545
6546 2017-08-03 Tom Tromey <tom@tromey.com>
6547
6548 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6549 (execute_user_command): Remove user_call_depth; use
6550 user_args_stack's size instead.
6551
6552 2017-08-03 Tom Tromey <tom@tromey.com>
6553
6554 * top.h (in_user_command): Remove.
6555 * top.c (in_user_command): Remove.
6556 * cli/cli-script.c (do_restore_user_call_depth)
6557 (execute_user_command): Update.
6558
6559 2017-08-03 Tom Tromey <tom@tromey.com>
6560
6561 * valops.c (search_struct_method): Use gdb::byte_vector.
6562 * valarith.c (value_concat): Use std::vector.
6563 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6564 (simple_search_memory): Likewise.
6565 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6566 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6567 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6568 * elfread.c (elf_rel_plt_read): Use std::string.
6569 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6570 * cli/cli-dump.c (restore_section_callback): Use
6571 gdb::byte_vector.
6572
6573 2017-08-03 Tom Tromey <tom@tromey.com>
6574
6575 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6576
6577 2017-08-03 Tom Tromey <tom@tromey.com>
6578
6579 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6580 (tui_register_format): Use scoped_restore.
6581
6582 2017-08-03 Tom Tromey <tom@tromey.com>
6583
6584 * reverse.c (exec_direction_default): Remove.
6585 (exec_reverse_once): Use scoped_restore.
6586 * remote.c (restore_remote_timeout): Remove.
6587 (remote_flash_erase, remote_flash_write, remote_flash_done)
6588 (readchar, remote_serial_write): Use scoped_restore.
6589 * cli/cli-script.c (struct source_cleanup_lines_args)
6590 (source_cleanup_lines): Remove.
6591 (script_from_file): Use scoped_restore.
6592 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6593 (source_command): Use scoped_restore.
6594
6595 2017-08-03 Tom Tromey <tom@tromey.com>
6596
6597 * utils.h (make_cleanup_free_so): Remove.
6598 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6599 * solist.h (struct so_deleter): New.
6600 (so_list_up): New typedef.
6601 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6602
6603 2017-08-03 Tom Tromey <tom@tromey.com>
6604
6605 * utils.h (make_cleanup_restore_current_language): Remove.
6606 * utils.c (do_restore_current_language)
6607 (make_cleanup_restore_current_language): Remove.
6608 * parse.c (parse_exp_in_context_1)
6609 (parse_expression_with_language): Use
6610 scoped_restore_current_language.
6611 * mi/mi-main.c (mi_cmd_execute): Use
6612 scoped_restore_current_language.
6613 * language.h (scoped_restore_current_language): New class.
6614
6615 2017-08-03 Tom Tromey <tom@tromey.com>
6616
6617 * compile/compile.c (cleanup_unlink_file): Remove.
6618 (compile_to_object): Use gdb::unlinker.
6619 (eval_compile_command): Likewise.
6620
6621 2017-08-03 Tom Tromey <tom@tromey.com>
6622
6623 * utils.h (make_cleanup_fclose): Remove.
6624 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6625
6626 2017-08-03 Tom Tromey <tom@tromey.com>
6627
6628 * top.c (open_terminal_stream): Return gdb_file_up.
6629 (new_ui_command): Update.
6630
6631 2017-08-03 Tom Tromey <tom@tromey.com>
6632
6633 * source.c (print_source_lines_base, forward_search_command)
6634 (reverse_search_command): Use gdb_file_up.
6635
6636 2017-08-03 Tom Tromey <tom@tromey.com>
6637
6638 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6639
6640 2017-08-03 Tom Tromey <tom@tromey.com>
6641
6642 * cli/cli-cmds.c (find_and_open_script): Change return type.
6643 Remove "streamp" and "full_path" parameters.
6644 (source_script_with_search): Update.
6645 * auto-load.c (source_script_file): Update.
6646 * cli/cli-cmds.h (find_and_open_script): Change type.
6647 (open_script): New struct.
6648
6649 2017-08-03 Tom Tromey <tom@tromey.com>
6650
6651 * xml-support.c (xml_fetch_content_from_file): Update.
6652 * ui-file.c (stdio_file::open): Update.
6653 * tracefile-tfile.c (tfile_start): Update.
6654 * remote.c (remote_file_put, remote_file_get): Update.
6655 * nat/linux-procfs.c (linux_proc_get_int)
6656 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6657 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6658 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6659 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6660 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6661 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6662 * linux-nat.c (linux_proc_pending_signals): Update.
6663 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6664 (file_closer): Remove.
6665 * compile/compile.c (compile_to_object): Update.
6666 * common/filestuff.h (struct gdb_file_deleter): New.
6667 (gdb_file_up): New typedef.
6668 (gdb_fopen_cloexec): Change return type.
6669 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6670 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6671 (dump_binary_file, restore_binary_file): Update.
6672 * auto-load.c (auto_load_objfile_script_1): Update.
6673
6674 2017-08-03 Tom Tromey <tom@tromey.com>
6675
6676 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6677 (info_static_tracepoint_markers_command): Likewise.
6678 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6679 * skip.c (skip_info): Use ui_out_emit_table.
6680 * progspace.c (print_program_space): Use ui_out_emit_table.
6681 * osdata.c (info_osdata): Use ui_out_emit_table.
6682 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6683 ui_out_emit_table.
6684 * linux-thread-db.c (info_auto_load_libthread_db): Use
6685 ui_out_emit_table.
6686 * inferior.c (print_inferior): Use ui_out_emit_table.
6687 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6688 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6689 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6690 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6691 * ui-out.h (class ui_out_emit_table): New.
6692
6693 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6694
6695 * mips-tdep.c (mips_fpu_type_str): New function.
6696 (mips_dump_tdep): Call it.
6697
6698 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6699
6700 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6701 `->mips_fpu_type'.
6702
6703 2017-07-31 Xavier Roirand <roirand@adacore.com>
6704
6705 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6706
6707 2017-07-27 Xavier Roirand <roirand@adacore.com>
6708
6709 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6710
6711 2017-07-26 Yao Qi <yao.qi@linaro.org>
6712
6713 * cli/cli-cmds.c (maintenancechecklist): New variable.
6714 * gdbcmd.h (maintenancechecklist): Declare it.
6715 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6716 Call i386_linux_read_description with different masks.
6717 * maint.c (maintenance_check_command): New function.
6718 (_initialize_maint_cmds): Call add_prefix_cmd.
6719 * target-descriptions.c (tdesc_reg): override operator != and ==.
6720 (tdesc_type): Likewise.
6721 (tdesc_feature): Likewise.
6722 (target_desc): Likewise.
6723 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6724 (maintenance_check_xml_descriptions): New function.
6725 (_initialize_target_descriptions) Add command "xml-descriptions".
6726 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6727
6728 2017-07-26 Yao Qi <yao.qi@linaro.org>
6729
6730 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6731 Include features/i386/32bit-*.c.
6732 (i386_linux_read_description): Generate target description if it
6733 doesn't exist.
6734 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6735 functions.
6736 * features/i386/32bit-linux.c: Re-generated.
6737 * features/i386/32bit-sse.c: Likewise.
6738 * target-descriptions.c (print_c_feature::visit): Print code to
6739 set register number if needed.
6740 (print_c_feature) <m_next_regnum>: New field.
6741
6742 2017-07-26 Yao Qi <yao.qi@linaro.org>
6743
6744 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6745 (FEATURE_XMLFILES): New.
6746 (FEATURE_CFILES): New.
6747 New rules.
6748 (clean-cfiles): Remove generated c files.
6749 * features/i386/32bit-avx.c: Generated.
6750 * features/i386/32bit-avx512.c: Generated.
6751 * features/i386/32bit-core.c: Generated.
6752 * features/i386/32bit-linux.c: Generated.
6753 * features/i386/32bit-mpx.c: Generated.
6754 * features/i386/32bit-pkeys.c: Generated.
6755 * features/i386/32bit-sse.c: Generated.
6756 * target-descriptions.c: Include algorithm.
6757 (tdesc_element_visitor): Add method visit_end.
6758 (print_c_tdesc): Implement visit_end.
6759 (print_c_tdesc:: m_filename_after_features): Move it to
6760 protected.
6761 (print_c_feature): New class.
6762 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6763 name starts with "i386/32bit-".
6764
6765 2017-07-26 Yao Qi <yao.qi@linaro.org>
6766
6767 * target-descriptions.c (tdesc_element_visitor): New class.
6768 (tdesc_element): New class.
6769 (tdesc_reg): Inherit from tdesc_element.
6770 (tdesc_reg::accept): New function.
6771 (tdesc_type): Inherit from tdesc_element.
6772 (tdesc_type::accept): New function.
6773 (tdesc_feature): Inherit from tdesc_element.
6774 (tdesc_feature::accept): New function.
6775 (target_desc): Inherit from tdesc_element.
6776 (target_desc::target_desc): New.
6777 (target_desc::~target_desc): New.
6778 (target_desc::accept): New.
6779 (allocate_target_description): Use new.
6780 (free_target_description): Use delete.
6781 (print_c_tdesc): New class.
6782 (maint_print_c_tdesc_cmd): Adjust.
6783
6784 * features/aarch64.c: Re-generated.
6785 * features/arc-arcompact.c: Re-generated.
6786 * features/arc-v2.c: Re-generated.
6787 * features/arm/arm-with-iwmmxt.c: Re-generated.
6788 * features/arm/arm-with-m.c: Re-generated.
6789 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6790 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6791 * features/arm/arm-with-neon.c: Re-generated.
6792 * features/arm/arm-with-vfpv2.c: Re-generated.
6793 * features/arm/arm-with-vfpv3.c: Re-generated.
6794 * features/i386/amd64-avx-avx512.c: Re-generated.
6795 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6796 * features/i386/amd64-avx.c: Re-generated.
6797 * features/i386/amd64-avx-linux.c: Re-generated.
6798 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6799 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6800 * features/i386/amd64-avx-mpx.c: Re-generated.
6801 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6802 * features/i386/amd64.c: Re-generated.
6803 * features/i386/amd64-linux.c: Re-generated.
6804 * features/i386/amd64-mpx.c: Re-generated.
6805 * features/i386/amd64-mpx-linux.c: Re-generated.
6806 * features/i386/i386-avx-avx512.c: Re-generated.
6807 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6808 * features/i386/i386-avx.c: Re-generated.
6809 * features/i386/i386-avx-linux.c: Re-generated.
6810 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6811 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6812 * features/i386/i386-avx-mpx.c: Re-generated.
6813 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6814 * features/i386/i386.c: Re-generated.
6815 * features/i386/i386-linux.c: Re-generated.
6816 * features/i386/i386-mmx.c: Re-generated.
6817 * features/i386/i386-mmx-linux.c: Re-generated.
6818 * features/i386/i386-mpx.c: Re-generated.
6819 * features/i386/i386-mpx-linux.c: Re-generated.
6820 * features/i386/x32-avx-avx512.c: Re-generated.
6821 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6822 * features/i386/x32-avx.c: Re-generated.
6823 * features/i386/x32-avx-linux.c: Re-generated.
6824 * features/i386/x32.c: Re-generated.
6825 * features/i386/x32-linux.c: Re-generated.
6826 * features/microblaze.c: Re-generated.
6827 * features/microblaze-with-stack-protect.c: Re-generated.
6828 * features/mips64-dsp-linux.c: Re-generated.
6829 * features/mips64-linux.c: Re-generated.
6830 * features/mips-dsp-linux.c: Re-generated.
6831 * features/mips-linux.c: Re-generated.
6832 * features/nds32.c: Re-generated.
6833 * features/nios2.c: Re-generated.
6834 * features/nios2-linux.c: Re-generated.
6835 * features/rs6000/powerpc-32.c: Re-generated.
6836 * features/rs6000/powerpc-32l.c: Re-generated.
6837 * features/rs6000/powerpc-403.c: Re-generated.
6838 * features/rs6000/powerpc-403gc.c : Re-generated.
6839 * features/rs6000/powerpc-405.c: Re-generated.
6840 * features/rs6000/powerpc-505.c: Re-generated.
6841 * features/rs6000/powerpc-601.c: Re-generated.
6842 * features/rs6000/powerpc-602.c: Re-generated.
6843 * features/rs6000/powerpc-603.c: Re-generated.
6844 * features/rs6000/powerpc-604.c: Re-generated.
6845 * features/rs6000/powerpc-64.c: Re-generated.
6846 * features/rs6000/powerpc-64l.c: Re-generated.
6847 * features/rs6000/powerpc-7400.c: Re-generated.
6848 * features/rs6000/powerpc-750.c: Re-generated.
6849 * features/rs6000/powerpc-860.c: Re-generated.
6850 * features/rs6000/powerpc-altivec32.c: Re-generated.
6851 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6852 * features/rs6000/powerpc-altivec64.c: Re-generated.
6853 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6854 * features/rs6000/powerpc-cell32l.c: Re-generated.
6855 * features/rs6000/powerpc-cell64l.c: Re-generated.
6856 * features/rs6000/powerpc-e500.c: Re-generated.
6857 * features/rs6000/powerpc-e500l.c: Re-generated.
6858 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6859 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6860 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6861 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6862 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6863 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6864 * features/rs6000/powerpc-vsx32.c: Re-generated.
6865 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6866 * features/rs6000/powerpc-vsx64.c: Re-generated.
6867 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6868 * features/rs6000/rs6000.c: Re-generated.
6869 * features/s390-linux32.c: Re-generated.
6870 * features/s390-linux32v1.c: Re-generated.
6871 * features/s390-linux32v2.c: Re-generated.
6872 * features/s390-linux64.c: Re-generated.
6873 * features/s390-linux64v1.c: Re-generated.
6874 * features/s390-linux64v2.c: Re-generated.
6875 * features/s390-te-linux64.c: Re-generated.
6876 * features/s390-tevx-linux64.c: Re-generated.
6877 * features/s390-vx-linux64.c: Re-generated.
6878 * features/s390x-linux64.c: Re-generated.
6879 * features/s390x-linux64v1.c: Re-generated.
6880 * features/s390x-linux64v2.c: Re-generated.
6881 * features/s390x-te-linux64.c: Re-generated.
6882 * features/s390x-tevx-linux64.c: Re-generated.
6883 * features/s390x-vx-linux64.c: Re-generated.
6884 * features/sparc/sparc32-solaris.c: Re-generated.
6885 * features/sparc/sparc64-solaris.c: Re-generated.
6886 * features/tic6x-c62x.c: Re-generated.
6887 * features/tic6x-c62x-linux.c: Re-generated.
6888 * features/tic6x-c64x.c: Re-generated.
6889 * features/tic6x-c64x-linux.c: Re-generated.
6890 * features/tic6x-c64xp.c: Re-generated.
6891 * features/tic6x-c64xp-linux.c: Re-generated.
6892
6893 2017-07-26 Yao Qi <yao.qi@linaro.org>
6894
6895 * i386-linux-tdep.c (i386_linux_read_description): New function.
6896 (i386_linux_core_read_description): Call
6897 i386_linux_read_description.
6898 * i386-linux-tdep.h (i386_linux_read_description): Declare.
6899 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6900 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6901 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6902 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6903 * x86-linux-nat.c (x86_linux_read_description): Call
6904 i386_linux_read_description.
6905
6906 2017-07-26 Yao Qi <yao.qi@linaro.org>
6907
6908 * NEWS: Mention it.
6909 * features/Makefile (%.c: %.xml): Pass the xml file name to
6910 command "maint print c-tdesc".
6911 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6912 name from 'arg'.
6913
6914 2017-07-26 Yao Qi <yao.qi@linaro.org>
6915
6916 * target-descriptions.c (target_desc): Add ctor and dtor. Do
6917 in-class initialization.
6918 (tdesc_create_feature): Call new instead of XCNEW.
6919 (free_target_description): Ue delete.
6920
6921 2017-07-25 John Baldwin <jhb@FreeBSD.org>
6922
6923 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6924
6925 2017-07-25 Yao Qi <yao.qi@linaro.org>
6926
6927 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6928 constant.
6929 (amd64_x32_init_abi): Likewise.
6930 * amd64-tdep.h (amd64_init_abi): Update declaration.
6931 (amd64_x32_init_abi): Likewise.
6932
6933 2017-07-25 Yao Qi <yao.qi@linaro.org>
6934
6935 PR tdep/21717
6936 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6937 condition for FPSCR.
6938 (arm_linux_store_inferior_registers): Likewise.
6939
6940 2017-07-22 Tom Tromey <tom@tromey.com>
6941
6942 * break-catch-syscall.c (struct catch_syscall_inferior_data)
6943 <syscalls_counts>: Now a std::vector.
6944 (get_catch_syscall_inferior_data): Use "new".
6945 (catch_syscall_inferior_data_cleanup): Use "delete".
6946 (insert_catch_syscall, remove_catch_syscall)
6947 (clear_syscall_counts): Update.
6948
6949 2017-07-22 Tom Tromey <tom@tromey.com>
6950
6951 * break-catch-syscall.c (syscall_catchpoint)
6952 <syscalls_to_be_caught>: Now a std::vector<int>
6953 (~syscall_catchpoint): Remove.
6954 (insert_catch_syscall, remove_catch_syscall)
6955 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6956 (print_mention_catch_syscall, print_recreate_catch_syscall):
6957 Update.
6958 (create_syscall_event_catchpoint): Change type of "filter"
6959 parameter.
6960 (catch_syscall_split_args): Return a std::vector.
6961 (catch_syscall_command_1, catching_syscall_number_1): Update.
6962
6963 2017-07-22 Tom Tromey <tom@tromey.com>
6964
6965 * break-catch-throw.c (struct exception_catchpoint)
6966 <exception_rx>: Now a std::string.
6967 (~exception_catchpoint): Remove.
6968 (print_one_detail_exception_catchpoint): Update.
6969 (handle_gnu_v3_exceptions): Change type of except_rx.
6970 (extract_exception_regexp): Return a std::string.
6971 (catch_exception_command_1): Update.
6972
6973 2017-07-22 Tom Tromey <tom@tromey.com>
6974
6975 * break-catch-sig.c (gdb_signal_type): Remove typedef.
6976 (struct signal_catchpoint) <signals_to_be_caught>: Now a
6977 std::vector.
6978 <catch_all>: Now a bool.
6979 (~signal_catchpoint): Remove.
6980 (signal_catchpoint_insert_location)
6981 (signal_catchpoint_remove_location)
6982 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6983 (signal_catchpoint_print_mention)
6984 (signal_catchpoint_print_recreate)
6985 (signal_catchpoint_explains_signal): Update.
6986 (create_signal_catchpoint): Change type of "filter" and
6987 "catch_all".
6988 (catch_signal_split_args): Return a std::vector. Change type of
6989 "catch_all".
6990 (catch_signal_command): Update.
6991
6992 2017-07-20 Pedro Alves <palves@redhat.com>
6993
6994 * ada-lang.c (ada_language_defn): Make extern.
6995 (_initialize_ada_language): Remove add_language call.
6996 * c-lang.c (c_language_defn, cplus_language_defn)
6997 (asm_language_defn, minimal_language_defn): Make extern.
6998 (_initialize_c_language): Delete.
6999 * completer.c (compare_cstrings): Delete, moved to utils.h.
7000 * d-lang.c (d_language_defn): Make extern.
7001 (_initialize_d_language): Remove add_language calls.
7002 * defs.h (enum language): Add comment.
7003 * f-lang.c (f_language_defn): Make extern.
7004 (_initialize_f_language): Remove add_language call.
7005 * go-lang.c (go_language_defn): Make extern.
7006 (_initialize_go_language): Remove add_language call.
7007 * language.c: Include <algorithm>.
7008 (languages): Redefine as const array.
7009 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7010 (set_language_command): Handle "local". Use for-range loop.
7011 (set_language): Remove loop.
7012 (language_enum): Rewrite.
7013 (language_def, language_str): Remove loops.
7014 (add_language): Delete.
7015 (add_set_language_command): New, based on add_languages.
7016 (skip_language_trampoline): Adjust.
7017 (local_language_defn): Delete.
7018 (language_gdbarch_post_init): Adjust.
7019 (_initialize_language): Remove add_language calls. Call
7020 add_set_language_command.
7021 * language.h (add_language): Delete.
7022 (auto_language_defn)
7023 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7024 (asm_language_defn, c_language_defn, cplus_language_defn)
7025 (d_language_defn, f_language_defn, go_language_defn)
7026 (m2_language_defn, objc_language_defn, opencl_language_defn)
7027 (pascal_language_defn, rust_language_defn): Declare.
7028 * m2-lang.c (m2_language_defn): Make extern.
7029 (_initialize_m2_language): Remove add_language call.
7030 * objc-lang.c (objc_language_defn): Make extern.
7031 (_initialize_objc_language): Remove add_language call.
7032 * opencl-lang.c (opencl_language_defn): Make extern.
7033 (_initialize_opencl_language): Remove add_language call.
7034 * p-lang.c (pascal_language_defn): Make extern.
7035 (_initialize_pascal_language): Delete.
7036 * rust-lang.c (rust_language_defn): Make extern.
7037 (_initialize_rust_language): Delete.
7038 * utils.h (compare_cstrings): New static inline function.
7039
7040 2017-07-20 Pedro Alves <palves@redhat.com>
7041
7042 * ada-lang.c (ada_to_fixed_type_1): Adjust.
7043 (get_var_value): Constify parameters.
7044 (get_int_var_value): Change prototype.
7045 (to_fixed_range_type): Adjust.
7046 * ada-lang.h (get_int_var_value): Change prototype.
7047
7048 2017-07-20 Pedro Alves <palves@redhat.com>
7049
7050 * dwarf2read.c (dw2_lookup_symbol): Use
7051 SYMBOL_MATCHES_SEARCH_NAME.
7052 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7053
7054 2017-07-20 Pedro Alves <palves@redhat.com>
7055
7056 * block.c (block_iter_name_step, block_iter_name_first)
7057 (block_iter_name_next): Delete.
7058 (block_lookup_symbol_primary): Adjust to use
7059 dict_iter_match_first/dict_iter_match_next.
7060 * block.h (block_iter_name_first, block_iter_name_next): Delete
7061 declarations.
7062 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7063 dict_iter_match_first/dict_iter_match_next.
7064
7065 2017-07-20 Pedro Alves <palves@redhat.com>
7066
7067 * cp-support.c (cp_find_first_component_aux): Add missing case for
7068 end of string.
7069
7070 2017-07-18 David Blaikie <dblaikie@gmail.com>
7071
7072 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7073 of dwo_cu's dwo_file.
7074
7075 2017-07-18 Yao Qi <yao.qi@linaro.org>
7076
7077 * remote.c (store_registers_using_G): Remove one line comment.
7078
7079 2017-07-18 Yao Qi <yao.qi@linaro.org>
7080
7081 * regcache.c (regcache_cpy): Simplify it.
7082 (regcache::cpy_no_passthrough): Remove it.
7083 * regcache.h (cpy_no_passthrough): Remove it.
7084 (regcache_dup, regcache_cpy): Update comments.
7085
7086 2017-07-18 Pedro Alves <palves@redhat.com>
7087
7088 * remote-sim.c (sim_command_completer): Adjust to work with a
7089 completion_tracker instead of a VEC.
7090
7091 2017-07-17 Pedro Alves <palves@redhat.com>
7092
7093 * completer.c (complete_source_filenames): New function.
7094 (complete_address_and_linespec_locations): New function.
7095 (location_completer): Use complete_address_and_linespec_locations.
7096 (completion_tracker::build_completion_result): Honor the tracker's
7097 request to suppress append.
7098 * completer.h (completion_tracker::suppress_append_ws)
7099 (completion_tracker::set_suppress_append_ws): New methods.
7100 (completion_tracker::m_suppress_append_ws): New field.
7101 (complete_source_filenames): New declaration.
7102 * linespec.c (linespec_complete_what): New.
7103 (struct ls_parser) <complete_what, completion_word,
7104 completion_quote_char, completion_quote_end, completion_tracker>:
7105 New fields.
7106 (string_find_incomplete_keyword_at_end): New.
7107 (linespec_lexer_lex_string): Record quote char. If in completion
7108 mode, don't throw.
7109 (linespec_lexer_consume_token): Advance the completion word point.
7110 (linespec_lexer_peek_token): Save/restore completion info.
7111 (save_stream_and_consume_token): New.
7112 (set_completion_after_number): New.
7113 (linespec_parse_basic): Set what to complete next depending on
7114 token. Handle function and label completions specially.
7115 (parse_linespec): Disable objc shortcut in completion mode. Set
7116 what to complete next depending on token type. Skip keyword if in
7117 completion mode.
7118 (complete_linespec_component, linespec_complete): New.
7119 * linespec.h (linespec_complete): Declare.
7120
7121 2017-07-17 Pedro Alves <palves@redhat.com>
7122
7123 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7124 Handle 'operator<' / 'operator<<'.
7125
7126 2017-07-17 Pedro Alves <palves@redhat.com>
7127
7128 * completer.c (collect_explicit_location_matches): Handle
7129 MATCH_LABEL.
7130 (convert_explicit_location_to_linespec): New, factored out from
7131 ...
7132 (convert_explicit_location_to_sals): ... this.
7133 (complete_label): New.
7134 (linespec_complete_label, find_label_symbols_in_block): New.
7135 (find_label_symbols): Add completion_mode parameter and adjust to
7136 call find_label_symbols_in_block.
7137 * linespec.h (linespec_complete_label): Declare.
7138
7139 2017-07-17 Pedro Alves <palves@redhat.com>
7140
7141 * ada-lang.c (ada_collect_symbol_completion_matches): Add
7142 complete_symbol_mode parameter.
7143 * cli/cli-cmds.c (complete_command): Get the completion result out
7144 of the handle_brkchars tracker if used a custom word point.
7145 * completer.c: Include "linespec.h".
7146 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7147 (advance_to_expression_complete_word_point): New.
7148 (completion_tracker::completes_to_completion_word): New.
7149 (complete_files_symbols): Pass down
7150 complete_symbol_mode::EXPRESSION.
7151 (explicit_options, probe_options): New.
7152 (collect_explicit_location_matches): Complete on the
7153 explictit_loc->foo instead of word. Use
7154 linespec_complete_function. Handle MATCH_LINE. Handle offering
7155 keyword and options completions.
7156 (backup_text_ptr): Delete.
7157 (skip_keyword): New.
7158 (complete_explicit_location): Remove 'word' parameter. Add
7159 language, quoted_arg_start and quoted_arg_end parameters.
7160 Rewrite, parsing left to right.
7161 (location_completer): Rewrite.
7162 (location_completer_handle_brkchars): New function.
7163 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7164 (enum complete_line_internal_reason): Adjust comments.
7165 (completion_tracker::discard_completions): New.
7166 (completer_handle_brkchars_func_for_completer): Handle
7167 location_completer.
7168 (gdb_custom_word_point_brkchars)
7169 (gdb_org_rl_basic_quote_characters): New.
7170 (gdb_completion_word_break_characters_throw)
7171 (completion_find_completion_word): Handle trackers that use a
7172 custom word point.
7173 (completion_tracker::advance_custom_word_point_by): New.
7174 (completion_tracker::build_completion_result): Don't rely on
7175 readline appending the quote char.
7176 (gdb_rl_attempted_completion_function_throw): Handle trackers that
7177 use a custom word point.
7178 (gdb_rl_attempted_completion_function): Restore
7179 rl_basic_quote_characters.
7180 * completer.h (class completion_tracker): Extend intro comment.
7181 (completion_tracker::set_quote_char)
7182 (completion_tracker::quote_char)
7183 (completion_tracker::set_use_custom_word_point)
7184 (completion_tracker::use_custom_word_point)
7185 (completion_tracker::custom_word_point)
7186 (completion_tracker::set_custom_word_point)
7187 (completion_tracker::advance_custom_word_point_by)
7188 (completion_tracker::completes_to_completion_word)
7189 (completion_tracker::discard_completions): New methods.
7190 (completion_tracker::m_quote_char)
7191 (completion_tracker::m_use_custom_word_point)
7192 (completion_tracker::m_custom_word_point): New fields.
7193 (advance_to_expression_complete_word_point): Declare.
7194 * f-lang.c (f_collect_symbol_completion_matches): Add
7195 complete_symbol_mode parameter.
7196 * language.h (struct language_defn)
7197 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7198 parameter.
7199 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
7200 (linespec_complete_function): New function.
7201 (linespec_lexer_lex_keyword): Adjust.
7202 * linespec.h (linespec_keywords, linespec_complete_function): New
7203 declarations.
7204 * location.c (find_end_quote): New function.
7205 (explicit_location_lex_one): Add explicit_completion_info
7206 parameter. Save quoting info. Don't throw if being called for
7207 completion. Don't handle Ada operators here.
7208 (is_cp_operator, skip_op_false_positives, first_of)
7209 (explicit_location_lex_one_function): New function.
7210 (string_to_explicit_location): Replace 'dont_throw' parameter with
7211 an explicit_completion_info pointer parameter. Handle it. Don't
7212 use explicit_location_lex_one to lex function names. Use
7213 explicit_location_lex_one_function instead.
7214 * location.h (struct explicit_completion_info): New.
7215 (string_to_explicit_location): Replace 'dont_throw' parameter with
7216 an explicit_completion_info pointer parameter.
7217 * symtab.c (default_collect_symbol_completion_matches_break_on):
7218 Add complete_symbol_mode parameter. Handle LINESPEC mode.
7219 (default_collect_symbol_completion_matches)
7220 (collect_symbol_completion_matches): Add complete_symbol_mode
7221 parameter.
7222 (collect_symbol_completion_matches_type): Pass down
7223 complete_symbol_mode::EXPRESSION.
7224 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7225 parameter. Handle LINESPEC mode.
7226 * symtab.h (complete_symbol_mode): New.
7227 (default_collect_symbol_completion_matches_break_on)
7228 (default_collect_symbol_completion_matches)
7229 (collect_symbol_completion_matches)
7230 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7231 parameter.
7232
7233 2017-07-17 Pedro Alves <palves@redhat.com>
7234
7235 * utils.c (enum class strncmp_iw_mode): New.
7236 (strcmp_iw): Rename to ...
7237 (strncmp_iw_with_mode): ... this. Add string2_len and mode
7238 parameters. Handle them.
7239 (strncmp_iw): New.
7240 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7241 * utils.h (strncmp_iw): Declare.
7242 (strcmp_iw): Move describing comments here.
7243
7244 2017-07-17 Pedro Alves <palves@redhat.com>
7245
7246 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7247 CP_OPERATOR_STR.
7248 * c-typeprint.c (is_type_conversion_operator): Use
7249 CP_OPERATOR_STR.
7250 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7251 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7252 CP_OPERATOR_LEN.
7253 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7254 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7255 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7256 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7257 CP_OPERATOR_STR.
7258 * location.c: Include "cp-support.h".
7259 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7260 CP_OPERATOR_STR.
7261 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7262 CP_OPERATOR_LEN.
7263
7264 2017-07-17 Pedro Alves <palves@redhat.com>
7265
7266 * cli/cli-cmds.c (complete_command): Use a completion tracker
7267 along with completion_find_completion_word for handle_brkchars
7268 phase.
7269 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7270 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7271 (struct gdb_rl_completion_word_info): New.
7272 (gdb_rl_find_completion_word): New.
7273 (completion_find_completion_word): New.
7274 * completer.h (completion_find_completion_word): Declare.
7275
7276 2017-07-17 Pedro Alves <palves@redhat.com>
7277
7278 * ada-lang.c (symbol_completion_match): Adjust comments.
7279 (symbol_completion_add): Replace vector parameter with
7280 completion_tracker parameter. Use it.
7281 (ada_make_symbol_completion_list): Rename to...
7282 (ada_collect_symbol_completion_matches): ... this. Add
7283 completion_tracker parameter and use it.
7284 (ada_language_defn): Adjust.
7285 * break-catch-syscall.c (catch_syscall_completer): Adjust
7286 prototype and work with completion_tracker instead of VEC.
7287 * breakpoint.c (condition_completer): Adjust prototype and work
7288 with completion_tracker instead of VEC.
7289 * c-lang.c (c_language_defn, cplus_language_defn)
7290 (asm_language_defn, minimal_language_defn): Adjust to renames.
7291 * cli/cli-cmds.c (complete_command): Rework using
7292 completion_tracker. Catch exceptions when completing.
7293 * cli/cli-decode.c (integer_unlimited_completer)
7294 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7295 with completion_tracker instead of VEC.
7296 * command.h (struct completion_tracker): Forward declare.
7297 (completer_ftype, completer_handle_brkchars_ftype): Change
7298 types.
7299 (complete_on_cmdlist, complete_on_enum): Adjust.
7300 * completer.c: Include <algorithm>.
7301 (struct gdb_completer_state): New.
7302 (current_completion): New global.
7303 (readline_line_completion_function): Delete.
7304 (noop_completer, filename_completer)
7305 (filename_completer_handle_brkchars, complete_files_symbols)
7306 (linespec_location_completer): Adjust to work with a
7307 completion_tracker instead of a VEC.
7308 (string_or_empty): New.
7309 (collect_explicit_location_matches): Adjust to work with a
7310 completion_tracker instead of a VEC.
7311 (explicit_location_completer): Rename to ...
7312 (complete_explicit_location): ... this and adjust to work with a
7313 completion_tracker instead of a VEC.
7314 (location_completer): Adjust to work with a completion_tracker
7315 instead of a VEC.
7316 (add_struct_fields): Adjust to work with a completion_list instead
7317 of VEC.
7318 (expression_completer): Rename to ...
7319 (complete_expression): ... this and adjust to work with a
7320 completion_tracker instead of a VEC. Use complete_files_symbols.
7321 (expression_completer): Reimplement on top of complete_expression.
7322 (symbol_completer): Adjust to work with a completion_tracker
7323 instead of a VEC.
7324 (enum complete_line_internal_reason): Add describing comments.
7325 (complete_line_internal_normal_command): Adjust to work with a
7326 completion_tracker instead of a VEC.
7327 (complete_line_internal): Rename to ...
7328 (complete_line_internal_1): ... this and adjust to work with a
7329 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7330 handle_brkchars phase.
7331 (new_completion_tracker): Delete.
7332 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7333 complete_line_internal_1.
7334 (free_completion_tracker): Delete.
7335 (INITIAL_COMPLETION_HTAB_SIZE): New.
7336 (completion_tracker::completion_tracker)
7337 (completion_tracker::~completion_tracker): New.
7338 (maybe_add_completion): Delete.
7339 (completion_tracker::maybe_add_completion)
7340 (completion_tracker::add_completion)
7341 (completion_tracker::add_completions): New.
7342 (throw_max_completions_reached_error): Delete.
7343 (complete_line): Adjust to work with a completion_tracker instead
7344 of a VEC. Don't create a completion_tracker_t or check for max
7345 completions here.
7346 (command_completer, command_completer_handle_brkchars)
7347 (signal_completer, reg_or_group_completer_1)
7348 (reg_or_group_completer, default_completer_handle_brkchars):
7349 Adjust to work with a completion_tracker.
7350 (gdb_completion_word_break_characters_throw): New.
7351 (gdb_completion_word_break_characters): Reimplement.
7352 (line_completion_function): Delete.
7353 (completion_tracker::recompute_lowest_common_denominator)
7354 (expand_preserving_ws)
7355 (completion_tracker::build_completion_result)
7356 (completion_result::completion_result)
7357 (completion_result::completion_result)
7358 (completion_result::~completion_result)
7359 (completion_result::completion_result)
7360 (completion_result::release_match_list, compare_cstrings)
7361 (completion_result::sort_match_list)
7362 (completion_result::reset_match_list)
7363 (gdb_rl_attempted_completion_function_throw)
7364 (gdb_rl_attempted_completion_function): New.
7365 * completer.h (completion_list, struct completion_result)
7366 (class completion_tracker): New.
7367 (complete_line): Add completion_tracker parameter.
7368 (readline_line_completion_function): Delete.
7369 (gdb_rl_attempted_completion_function): New.
7370 (noop_completer, filename_completer, expression_completer)
7371 (location_completer, symbol_completer, command_completer)
7372 (signal_completer, reg_or_group_completer): Update prototypes.
7373 (completion_tracker_t, new_completion_tracker)
7374 (make_cleanup_free_completion_tracker): Delete.
7375 (enum maybe_add_completion_enum): Delete.
7376 (maybe_add_completion): Delete.
7377 (throw_max_completions_reached_error): Delete.
7378 * corefile.c (complete_set_gnutarget): Adjust to work with a
7379 completion_tracker instead of a VEC.
7380 * cp-abi.c (cp_abi_completer): Adjust to work with a
7381 completion_tracker instead of a VEC.
7382 * d-lang.c (d_language_defn): Adjust.
7383 * disasm.c (disassembler_options_completer): Adjust to work with a
7384 completion_tracker instead of a VEC.
7385 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7386 (f_collect_symbol_completion_matches): ... this. Adjust to work
7387 with a completion_tracker instead of a VEC.
7388 (f_language_defn): Adjust.
7389 * go-lang.c (go_language_defn): Adjust.
7390 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7391 Adjust to work with a completion_tracker instead of a VEC.
7392 * infrun.c (handle_completer): Likewise.
7393 * interps.c (interpreter_completer): Likewise.
7394 * interps.h (interpreter_completer): Likewise.
7395 * language.c (unknown_language_defn, auto_language_defn)
7396 (local_language_defn): Adjust.
7397 * language.h (language_defn::la_make_symbol_completion_list):
7398 Rename to ...
7399 (language_defn::la_collect_symbol_completion_matches): ... this
7400 and adjust to work with a completion_tracker instead of a VEC.
7401 * m2-lang.c (m2_language_defn): Adjust.
7402 * objc-lang.c (objc_language_defn): Adjust.
7403 * opencl-lang.c (opencl_language_defn): Adjust.
7404 * p-lang.c (pascal_language_defn): Adjust.
7405 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7406 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7407 with a completion_tracker.
7408 * rust-lang.c (rust_language_defn): Adjust.
7409 * symtab.c (free_completion_list, do_free_completion_list)
7410 (return_val, completion_tracker): Delete.
7411 (completion_list_add_name, completion_list_add_symbol)
7412 (completion_list_add_msymbol, completion_list_objc_symbol)
7413 (completion_list_add_fields, add_symtab_completions): Add
7414 completion_tracker parameter and use it.
7415 (default_make_symbol_completion_list_break_on_1): Rename to...
7416 (default_collect_symbol_completion_matches_break_on): ... this.
7417 Add completion_tracker parameter and use it instead of allocating
7418 a completion tracker here.
7419 (default_make_symbol_completion_list_break_on): Delete old
7420 implementation.
7421 (default_make_symbol_completion_list): Delete.
7422 (default_collect_symbol_completion_matches): New.
7423 (make_symbol_completion_list): Delete.
7424 (collect_symbol_completion_matches): New.
7425 (make_symbol_completion_type): Rename to ...
7426 (collect_symbol_completion_matches_type): ... this. Add
7427 completion_tracker parameter and use it instead of VEC.
7428 (make_file_symbol_completion_list_1): Rename to...
7429 (collect_file_symbol_completion_matches): ... this. Add
7430 completion_tracker parameter and use it instead of VEC.
7431 (make_file_symbol_completion_list): Delete.
7432 (add_filename_to_list): Use completion_list instead of a VEC.
7433 (add_partial_filename_data::list): Now a completion_list.
7434 (make_source_files_completion_list): Work with a completion_list
7435 instead of a VEC.
7436 * symtab.h: Include "completer.h".
7437 (default_make_symbol_completion_list_break_on)
7438 (default_make_symbol_completion_list, make_symbol_completion_list)
7439 (make_symbol_completion_type, make_file_symbol_completion_list)
7440 (make_source_files_completion_list): Delete.
7441 (default_collect_symbol_completion_matches_break_on)
7442 (default_collect_symbol_completion_matches)
7443 (collect_symbol_completion_matches)
7444 (collect_symbol_completion_matches_type)
7445 (collect_file_symbol_completion_matches)
7446 (make_source_files_completion_list): New.
7447 * top.c (init_main): Don't install a rl_completion_entry_function
7448 hook. Install a rl_attempted_completion_function hook instead.
7449 * tui/tui-layout.c (layout_completer): Adjust to work with a
7450 completion_tracker.
7451 * tui/tui-regs.c (tui_reggroup_completer):
7452 * tui/tui-win.c (window_name_completer, focus_completer)
7453 (winheight_completer): Adjust to work with a completion_tracker.
7454 * value.c: Include "completer.h".
7455 (complete_internalvar): Adjust to work with a completion_tracker.
7456 * value.h (complete_internalvar): Likewise.
7457
7458 2017-07-17 Pedro Alves <palves@redhat.com>
7459
7460 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7461 renames.
7462 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7463 comments to completer_ftype's declaration.
7464 <completer_handle_brkchars>: Change type to
7465 completer_handle_brkchars_ftype.
7466 * command.h (completer_ftype): Add describing comment and give
7467 names to parameters.
7468 (completer_ftype_void): Rename to ...
7469 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7470 (set_cmd_completer_handle_brkchars): Adjust.
7471 * completer.c (filename_completer_handle_brkchars): New function.
7472 (complete_line_internal_normal_command): New function, factored
7473 out from ...
7474 (complete_line_internal): ... here.
7475 (command_completer_handle_brkchars)
7476 (default_completer_handle_brkchars)
7477 (completer_handle_brkchars_func_for_completer): New functions.
7478 * completer.h (set_gdb_completion_word_break_characters): Delete
7479 declaration.
7480 (completer_handle_brkchars_func_for_completer): New declaration.
7481 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7482 completer_handle_brkchars_func_for_completer.
7483
7484 2017-07-17 Pedro Alves <palves@redhat.com>
7485
7486 * completer.c (symbol_completer): New function, based on
7487 make_symbol_completion_list_fn.
7488 * completer.h (symbol_completer): New declaration.
7489 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7490 * python/py-cmd.c (completers): Adjust.
7491 * symtab.c (make_symbol_completion_list_fn): Delete.
7492 * symtab.h (make_symbol_completion_list_fn): Delete.
7493 * cli/cli-decode.c (add_cmd): Adjust.
7494
7495 2017-07-17 Pedro Alves <palves@redhat.com>
7496
7497 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7498 * dwarf2read.c: Include "filename-seen-cache.h".
7499 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7500 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7501 * filename-seen-cache.c: New file.
7502 * filename-seen-cache.h: New file.
7503 * symtab.c: Include "filename-seen-cache.h".
7504 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7505 (create_filename_seen_cache, clear_filename_seen_cache)
7506 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7507 to filename-seen-cache.h/filename-seen-cache.c.
7508 (output_source_filename, sources_info)
7509 (maybe_add_partial_symtab_filename)
7510 (make_source_files_completion_list): Adjust to use
7511 filename_seen_cache.
7512
7513 2017-07-17 Pedro Alves <palves@redhat.com>
7514
7515 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7516 fields.
7517 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7518 dwarf2_debug_sections*)): New.
7519 (dwarf2_per_objfile::dwarf2_per_objfile(const
7520 dwarf2_per_objfile&)): Declare as deleted.
7521 (dwarf2_per_objfile::operator=): Declare as deleted.
7522 (dwarf2_per_objfile::dwarf2_per_objfile)
7523 (dwarf2_per_objfile::~dwarf2_per_objfile)
7524 (dwarf2_per_objfile::free_cached_comp_units): New.
7525 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7526 ctor. Call dwarf2_per_objfile's ctor manually.
7527 (dwarf2_locate_sections): Deleted/refactored as ...
7528 (dwarf2_per_objfile::locate_sections): ... this new method.
7529 (free_cached_comp_units): Defer to
7530 dwarf2_per_objfile::free_cached_comp_units.
7531 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7532
7533 2017-07-14 Tom Tromey <tom@tromey.com>
7534
7535 PR rust/21764:
7536 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7537 parameter.
7538 <UNOP_SIZEOF>: Split into separate case.
7539 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7540
7541 2017-07-14 Tom Tromey <tom@tromey.com>
7542
7543 PR rust/21763:
7544 * symtab.c (symbol_matches_domain): Add language_rust to special
7545 case.
7546 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7547 treat LOC_TYPEDEF symbols as variables.
7548
7549 2017-07-14 Pedro Alves <palves@redhat.com>
7550
7551 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7552 symtabs matching all symtabs with SRCFILE as file name instead of
7553 only considering the first hit, with lookup_symtab.
7554
7555 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7556
7557 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7558 operator_name parameters.
7559 (gen_expr): Update function call.
7560
7561 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7562
7563 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7564 parameter.
7565 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7566 Likewise.
7567 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7568 parameter, use agent_expr::gdbarch instead, update function
7569 calls.
7570 (locexpr_tracepoint_var_ref): Likewise.
7571 (loclist_tracepoint_var_ref): Likewise.
7572 * ax-gdb.c (gen_trace_static_fields): Likewise.
7573 (gen_traced_pop): Likewise.
7574 (gen_frame_args_address): Likewise.
7575 (gen_frame_locals_address): Likewise.
7576 (gen_var_ref): Likewise.
7577 (gen_struct_ref_recursive): Likewise.
7578 (gen_static_field): Likewise.
7579 (gen_maybe_namespace_elt): Likewise.
7580 (gen_expr): Likewise.
7581 (gen_trace_for_var): Likewise.
7582 (gen_trace_for_expr): Likewise.
7583 (gen_trace_for_return_address): Likewise.
7584
7585 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7586
7587 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7588 parameter.
7589 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7590
7591 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7592
7593 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7594 from ax, update calls.
7595 (gen_usual_arithmetic): Likewise.
7596 (gen_integral_promotions): Likewise.
7597 (gen_bitfield_ref): Likewise.
7598 (gen_primitive_field): Likewise.
7599 (gen_struct_ref_recursive): Likewise.
7600 (gen_struct_ref): Likewise.
7601 (gen_maybe_namespace_elt): Likewise.
7602 (gen_struct_elt_for_reference): Likewise.
7603 (gen_namespace_elt): Likewise.
7604 (gen_aggregate_elt_ref): Likewise.
7605 (gen_expr): Get gdbarch from ax, update calls.
7606 (gen_expr_binop_rest): Likewise.
7607
7608 2017-07-13 Pedro Alves <palves@redhat.com>
7609
7610 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7611 as default tdesc.
7612 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7613 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7614 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7615 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7616 tdep.
7617 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7618 Get final tdesc from the tdep.
7619 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7620 default tdesc.
7621 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7622 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7623 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7624 Use it as default tdesc.
7625 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7626 down to amd_init_abi. No longer handle fallback tdesc here.
7627 * amd64-tdep.h (tdesc_x32): Declare.
7628 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7629 parameter.
7630 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7631 as default tdesc.
7632
7633 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7634
7635 * s390-linux-tdep.c (s390_process_record): Add support for
7636 instructions new in arch12.
7637
7638 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7639
7640 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7641 PT_GETFSBASE and PT_GETGSBASE.
7642 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7643 PT_SETGSBASE.
7644
7645 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7646
7647 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7648 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7649 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7650 those rules.
7651 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7652 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7653 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7654 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7655 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7656 * features/i386/amd64.xml: Add 64bit-segments.xml.
7657 * features/i386/amd64-avx-avx512.c: Regenerated.
7658 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7659 * features/i386/amd64-avx-mpx.c: Regenerated.
7660 * features/i386/amd64-avx.c: Regenerated.
7661 * features/i386/amd64-mpx.c: Regenerated.
7662 * features/i386/amd64.c: Regenerated.
7663 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7664 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7665 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7666 * regformats/i386/amd64-avx.dat: Regenerated.
7667 * regformats/i386/amd64-mpx.dat: Regenerated.
7668 * regformats/i386/amd64.dat: Regenerated.
7669
7670 2017-07-10 Yao Qi <yao.qi@linaro.org>
7671
7672 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7673 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7674
7675 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7676
7677 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7678 unsetenv.
7679 * gnulib/aclocal.m4: Regenerate.
7680 * gnulib/config.in: Regenerate.
7681 * gnulib/configure: Regenerate.
7682 * gnulib/import/Makefile.am: Regenerate.
7683 * gnulib/import/Makefile.in: Regenerate.
7684 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7685 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7686 * gnulib/import/m4/environ.m4: New file.
7687 * gnulib/import/m4/setenv.m4: New file.
7688 * gnulib/import/setenv.c: New file.
7689 * gnulib/import/unsetenv.c: New file.
7690
7691 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7692
7693 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7694 address when op is DW_OP_addr.
7695
7696 2017-07-09 Tom Tromey <tom@tromey.com>
7697
7698 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7699 check and apply to outer type.
7700
7701 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7702
7703 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7704 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7705 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7706 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7707
7708 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7709
7710 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7711
7712 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7713
7714 * corelow.c (get_core_siginfo): Remove.
7715 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7716 instead of get_core_siginfo.
7717 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7718 * gdbarch.h: Re-generate.
7719 * gdbarch.c: Re-generate.
7720 * linux-tdep.c (linux_core_xfer_siginfo): New.
7721 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7722
7723 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7724
7725 * corelow.c (thread_section_name): Move to ...
7726 * gdbcore.h (thread_section_name): ... here.
7727
7728 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7729
7730 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7731 (struct siginfo32): New.
7732 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7733 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7734 via ptrace(PT_LWPINFO).
7735
7736 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7737
7738 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7739 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7740 (fbsd_get_siginfo_type): New.
7741 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7742 (_initialize_fbsd_tdep): New.
7743
7744 2017-07-06 David Blaikie <dblaikie@gmail.com>
7745
7746 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7747 a singular dwo_unit*) to support multiple CUs in the same way that
7748 multiple TUs are supported.
7749 (create_cus_hash_table): Replace create_dwo_cu with a function for
7750 parsing multiple CUs from a DWO file.
7751 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7752 create_dwo_cu.
7753 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7754 htab_find, rather than comparing the signature to a singleton CU in
7755 the dwo_file.
7756
7757 2017-07-06 Pedro Alves <palves@redhat.com>
7758
7759 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7760
7761 2017-07-04 Pedro Alves <palves@redhat.com>
7762
7763 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7764 * gdbtypes.h (TYPE_STATIC): Delete.
7765 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7766 is_synchronized, is_native>: Delete.
7767 <dummy>: Bump.
7768 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7769 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7770 (TYPE_FN_FIELD_ABSTRACT): Delete.
7771
7772 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7773
7774 * buffer.h (buffer_finish): Fix spelling mistakes.
7775
7776 2017-07-01 Eli Zaretskii <eliz@gnu.org>
7777
7778 * .dir-locals.el: Automatically switch to C-style comments in
7779 versions of Emacs that support the feature.
7780
7781 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7782 Pedro Alves <palves@redhat.com>
7783
7784 PR cli/21688
7785 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7786 (process_next_line): New variable 'inline_cmd'.
7787 Adjust 'if' clauses for "python", "compile" and "guile" to use
7788 'command_name_equals' and check for '!inline_cmd'.
7789
7790 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7791
7792 PR cli/21688
7793 * cli/cli-script.c (command_name_equals_not_inline): New function.
7794 (process_next_line): Adjust 'if' clauses for "python", "compile"
7795 and "guile" to use command_name_equals_not_inline.
7796
7797 2017-06-29 Pedro Alves <palves@redhat.com>
7798
7799 * completer.c (expression_completer): Call
7800 linespec_location_completer instead of location_completer.
7801
7802 2017-06-29 Pedro Alves <palves@redhat.com>
7803
7804 * completer.c (expression_completer): Remove code that recomputes
7805 'text' from 'word'.
7806
7807 2017-06-29 Yao Qi <yao.qi@linaro.org>
7808
7809 * regformats/regdat.sh: Generate code with
7810 "ifndef IN_PROCESS_AGENT".
7811
7812 2017-06-28 Pedro Alves <palves@redhat.com>
7813
7814 * command.h: Include "common/scoped_restore.h".
7815
7816 2017-06-28 Yao Qi <yao.qi@linaro.org>
7817
7818 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7819 instead of obstack_grow.
7820
7821 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7822
7823 PR gdb/21337
7824 * symfile.c (reread_symbols): Call objfiles_changed just before
7825 read_symbols.
7826
7827 2017-06-27 Pedro Alves <palves@redhat.com>
7828
7829 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7830 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7831 (completion_list_add_symbol, completion_list_add_msymbol):
7832 ... these new functions.
7833 (add_symtab_completions)
7834 (default_make_symbol_completion_list_break_on_1): Adjust.
7835
7836 2017-06-27 Pedro Alves <palves@redhat.com>
7837
7838 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7839 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7840 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7841 dtor.
7842 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7843 'storage_obstack' field an auto_obstack. In-class initialize all
7844 non-bitfield fields. Make minsyms_read bool.
7845 * symfile.c (read_symbols): Adjust.
7846
7847 2017-06-27 Alan Hayward <alan.hayward@arm.com>
7848
7849 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7850 (gdbsim_store_register): Likewise.
7851
7852 2017-06-27 Pedro Alves <palves@redhat.com>
7853
7854 * c-exp.y (name_obstack): Now an auto_obstack.
7855 (yylex): Use auto_obstack::clear.
7856 (c_parse): Use auto_obstack::clear instead of reinitializing and
7857 freeing the obstack.
7858 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7859 * d-exp.y (name_obstack): Now an auto_obstack.
7860 (yylex): Use auto_obstack::clear.
7861 (d_parse): Use auto_obstack::clear instead of reinitializing and
7862 freeing the obstack.
7863 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7864 auto_obstack.
7865 * dwarf2read.c (create_addrmap_from_index)
7866 (dwarf2_build_psymtabs_hard)
7867 (update_enumeration_type_from_children): Likewise.
7868 * gdb_obstack.h (auto_obstack): New type.
7869 * go-exp.y (name_obstack): Now an auto_obstack.
7870 (build_packaged_name): Use auto_obstack::clear.
7871 (go_parse): Use auto_obstack::clear instead of reinitializing and
7872 freeing the obstack.
7873 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7874 auto_obstack.
7875 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7876 * rust-exp.y (work_obstack): Now an auto_obstack.
7877 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7878 reinitializing and freeing the obstack.
7879 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7880 (host_char_to_target): Use auto_obstack.
7881 * utils.h (make_cleanup_obstack_free): Delete declaration.
7882 * valprint.c (generic_emit_char, generic_printstr): Use
7883 auto_obstack.
7884
7885 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7886
7887 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7888 thread.
7889 (darwin_init_thread_list): Don't update dummy thread.
7890 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7891
7892 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7893
7894 * record-full.c (netorder16): Remove.
7895
7896 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7897
7898 * common/diagnostics.h: Define macros for GCC.
7899 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7900 * common/vec.h: Include diagnostics.h.
7901 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7902 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7903 warning.
7904
7905 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7906
7907 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7908 New macro.
7909 * ada-lex.l: Ignore deprecated register warnings.
7910
7911 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7912
7913 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7914 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7915
7916 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7917
7918 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7919 its own line.
7920
7921 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7922
7923 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7924
7925 2017-06-23 Alan Hayward <alan.hayward@arm.com>
7926
7927 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7928 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7929 (xtensa_register_read_masked): Likewise.
7930
7931 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
7932
7933 * common/environ.c (gdb_environ::unset): Update comment.
7934
7935 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7936
7937 * python/py-unwind.c (pyuw_sniffer): Allocate space for
7938 registers.
7939
7940 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7941
7942 * record-full.c (record_full_exec_insn): Use byte_vector.
7943
7944 2017-06-22 Yao Qi <yao.qi@linaro.org>
7945
7946 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7947 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7948
7949 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7950
7951 * remote.c (cached_reg): Move from here...
7952 * regcache.h (cached_reg): ...to here.
7953 * python/py-unwind.c (struct reg_info): Remove.
7954 (cached_frame_info): Use cached_reg_t.
7955 (pyuw_prev_register): Likewise.
7956 (pyuw_sniffer): Use cached_reg_t and allocate registers.
7957 (pyuw_dealloc_cache): Free all registers.
7958
7959 2017-06-22 Pedro Alves <palves@redhat.com>
7960 Simon Marchi <simon.marchi@ericsson.com>
7961
7962 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7963 warning.
7964 * common/diagnostics.h: New file.
7965
7966 2017-06-22 Pedro Alves <palves@redhat.com>
7967
7968 * common/agent.h: Add include guards.
7969
7970 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
7971
7972 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7973 talk about addressable units instead of bytes.
7974
7975 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7976
7977 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7978 of '::const_iterator'.
7979
7980 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7981
7982 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7983 'unittests/environ-selftests.c'.
7984 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7985 * charset.c (find_charset_names): Declare object 'iconv_env'.
7986 Update code to use 'iconv_env' object. Remove call to
7987 'free_environ'.
7988 * common/environ.c: Include <utility>.
7989 (make_environ): Delete function.
7990 (free_environ): Delete function.
7991 (gdb_environ::clear): New function.
7992 (gdb_environ::operator=): New function.
7993 (gdb_environ::get): Likewise.
7994 (environ_vector): Delete function.
7995 (set_in_environ): Delete function.
7996 (gdb_environ::set): New function.
7997 (unset_in_environ): Delete function.
7998 (gdb_environ::unset): New function.
7999 (gdb_environ::envp): Likewise.
8000 * common/environ.h: Include <vector>.
8001 (struct gdb_environ): Delete; transform into...
8002 (class gdb_environ): ... this class.
8003 (free_environ): Delete prototype.
8004 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8005 environ_vector): Likewise.
8006 * infcmd.c (run_command_1): Update code to call
8007 'envp' from 'gdb_environ' class.
8008 (environment_info): Update code to call methods from 'gdb_environ'
8009 class.
8010 (unset_environment_command): Likewise.
8011 (path_info): Likewise.
8012 (path_command): Likewise.
8013 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8014 (inferior::inferior): Initialize 'environment' using the host's
8015 information.
8016 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8017 Include "environ.h".
8018 (class inferior) <environment>: Change type from 'struct
8019 gdb_environ' to 'gdb_environ'.
8020 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8021 methods from 'gdb_environ' class.
8022 * solib.c (solib_find_1): Likewise
8023 * unittests/environ-selftests.c: New file.
8024
8025 2017-06-20 Yao Qi <yao.qi@linaro.org>
8026
8027 * features/i386/i386-linux.xml: Exchange the order of including
8028 32bit-linux.xml and 32bit-sse.xml.
8029 * features/i386/i386-linux.c: Regenerated.
8030
8031 2017-06-20 Yao Qi <yao.qi@linaro.org>
8032
8033 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8034 Delete copy ctor and assignment operator.
8035 (tdesc_type): Likewise.
8036 (tdesc_feature): Likewise.
8037 (tdesc_free_reg): Remove.
8038 (tdesc_create_reg): Use new.
8039 (tdesc_free_type): Remove.
8040 (tdesc_create_vector): Use new.
8041 (tdesc_create_union): Likewise.
8042 (tdesc_create_flags): Likewise.
8043 (tdesc_create_enum): Likewise.
8044 (tdesc_free_feature): Delete.
8045 (free_target_description): Use delete.
8046
8047 2017-06-19 John Baldwin <jhb@FreeBSD.org>
8048
8049 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8050 registers.
8051
8052 2017-06-19 Pedro Alves <palves@redhat.com>
8053
8054 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8055 after gdb::unlinker.
8056
8057 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
8058
8059 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8060 gdb_environ to access an environment variable.
8061
8062 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8063
8064 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8065 gdb_byte*.
8066
8067 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8068
8069 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8070
8071 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8072
8073 * configure: Re-generate.
8074 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8075
8076 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8077
8078 * configure: Re-generate.
8079 * warning.m4: Pass -Werror to compiler when checking for
8080 supported warning flags.
8081
8082 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8083
8084 * Makefile.in (COMPILE.pre): Add "-x c++".
8085
8086 2017-06-16 Alan Hayward <alan.hayward@arm.com>
8087 Pedro Alves <palves@redhat.com>
8088 Yao Qi <yao.qi@linaro.org>
8089
8090 * defs.h (RequireLongest): New.
8091 (extract_integer): Declare function template.
8092 (extract_signed_integer): Remove the declaration, but define it
8093 static inline.
8094 (extract_unsigned_integer): Likewise.
8095 (store_integer): Declare function template.
8096 (store_signed_integer): Remove the declaration, but define it
8097 static inline.
8098 (store_unsigned_integer): Likewise.
8099 * findvar.c (extract_integer): New function template.
8100 (extract_signed_integer): Remove.
8101 (extract_unsigned_integer): Remove.
8102 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8103 instantiations.
8104 (store_integer): New function template.
8105 (store_signed_integer): Remove.
8106 (store_unsigned_integer): Remove.
8107 (store_integer): Explicit instantiations.
8108 * regcache.c (regcache_raw_read_signed): Update.
8109 (regcache::raw_read): New function.
8110 (regcache::raw_read_signed): Remove.
8111 (regcache::raw_read_unsigned): Remove.
8112 (regcache_raw_read_unsigned): Update.
8113 (regcache_raw_write_unsigned): Update.
8114 (regcache::raw_write_signed): Remove.
8115 (regcache::raw_write): New function.
8116 (regcache_cooked_read_signed): Update.
8117 (regcache::raw_write_unsigned): Remove.
8118 (regcache::cooked_read_signed): Remove.
8119 (regcache_cooked_read_unsigned): Update.
8120 (regcache::cooked_read_unsigned): Remove.
8121 (regcache_cooked_write_signed): Update.
8122 (regcache_cooked_write_unsigned): Update.
8123 * regcache.h (regcache) <raw_read_signed>: Remove.
8124 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8125 <raw_read, raw_write>: New.
8126 <cooked_read_signed, cooked_write_signed>: Remove.
8127 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8128 <cooked_read, cooked_write>: New.
8129 * sh64-tdep.c (sh64_pseudo_register_read): Update.
8130 (sh64_pseudo_register_write): Update.
8131
8132 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
8133
8134 * arc-tdep.c (arc_disassembler_options): New variable.
8135 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8136 of default_print_insn.
8137 (arc_delayed_print_insn): Set info->section when needed,
8138 use default_print_insn to retrieve a disassembler.
8139
8140 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
8141
8142 PR gdb/21574
8143 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8144 to mention $SHELL and startup-with-shell.
8145
8146 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
8147
8148 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8149
8150 2017-06-14 Yao Qi <yao.qi@linaro.org>
8151
8152 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8153 default_print_insn instead of print_insn_aarch64.
8154 * arm-tdep.c (gdb_print_insn_arm): Call
8155 default_print_insn instead of print_insn_big_arm
8156 and print_insn_little_arm.
8157 * i386-tdep.c (i386_print_insn): Call default_print_insn
8158 instead of print_insn_i386.
8159 * ia64-tdep.c (ia64_print_insn): Call
8160 default_print_insn instead of print_insn_ia64.
8161 * mips-tdep.c (gdb_print_insn_mips): Call
8162 default_print_insn instead of print_insn_big_mips
8163 and print_insn_little_mips.
8164 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8165 instead of print_insn_spu.
8166
8167 2017-06-14 Pedro Alves <palves@redhat.com>
8168
8169 * ada-lang.c: Include "common/byte-vector.h".
8170 (ada_value_primitive_packed_val): Use gdb::byte_vector.
8171 * charset.c (wchar_iterator::iterate): Resize the vector instead
8172 of reserving it.
8173 * common/byte-vector.h: Include "common/def-vector.h".
8174 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8175 * cli/cli-dump.c: Include "common/byte-vector.h".
8176 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8177 * common/byte-vector.h: New file.
8178 * common/def-vector.h: New file.
8179 * common/default-init-alloc.h: New file.
8180 * dwarf2loc.c: Include "common/byte-vector.h".
8181 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8182 instead of reserving it.
8183 * dwarf2read.c: Include "common/byte-vector.h".
8184 (data_buf::m_vec): Now a gdb::byte_vector.
8185 * gdb_regex.c: Include "common/def-vector.h".
8186 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8187 * mi/mi-main.c: Include "common/byte-vector.h".
8188 (mi_cmd_data_read_memory): Use gdb::byte_vector.
8189 * printcmd.c: Include "common/byte-vector.h".
8190 (print_scalar_formatted): Use gdb::byte_vector.
8191 * valprint.c: Include "common/byte-vector.h".
8192 (maybe_negate_by_bytes, print_decimal_chars): Use
8193 gdb::byte_vector.
8194
8195 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8196
8197 * darwin-nat.c: Include "nat/fork-inferior.h".
8198
8199 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8200
8201 * configure.nat: Factor out Darwin bits that are not
8202 architecture-specific. Add fork-inferior.o.
8203
8204 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8205
8206 * configure.nat: Factor out AIX bits that are not
8207 architecture-specific. Add fork-inferior.o.
8208
8209 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8210
8211 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
8212 (read_pieced_value, write_pieced_value): ...here. Reduce to
8213 wrappers that just call rw_pieced_value.
8214
8215 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8216
8217 * dwarf2loc.c (write_pieced_value): When writing the data for a
8218 memory piece, use write_memory_with_notification instead of
8219 write_memory.
8220
8221 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8222
8223 * valops.c (read_value_memory): Change embedded_offset to
8224 represent a bit offset instead of a byte offset.
8225 * value.h (read_value_memory): Adjust comment.
8226
8227 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8228
8229 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8230 dest_offset_bits and source_offset_bits.
8231 (write_pieced_value): Likewise.
8232
8233 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8234
8235 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8236 given by DW_OP_bit_piece.
8237 (write_pieced_value): Likewise.
8238
8239 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8240
8241 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8242 some other preparations to the places where sufficient information
8243 is available.
8244 (write_pieced_value): Likewise.
8245
8246 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8247
8248 * dwarf2loc.c (bits_to_bytes): New function.
8249 (read_pieced_value): Fix offset calculations for register pieces
8250 on big-endian targets.
8251 (write_pieced_value): Likewise.
8252
8253 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8254
8255 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8256 (write_pieced_value): Likewise.
8257
8258 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8259
8260 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8261 transfer the source value's least significant bits, instead of its
8262 lowest-addressed ones. Rename type_len to max_offset.
8263 (read_pieced_value): Mirror above changes to write_pieced_value as
8264 applicable.
8265
8266 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8267
8268 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8269 truncate full bytes from dest_offset_bits before using it as an
8270 offset into the buffer.
8271
8272 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8273
8274 * dwarf2loc.c (write_pieced_value): Include transfer size in
8275 byte-wise check.
8276
8277 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8278
8279 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8280 calculation of this_size.
8281
8282 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8283
8284 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8285 when targeting a bit-field.
8286 (write_pieced_value): Likewise.
8287
8288 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8289
8290 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8291 (allocate_piece_closure): Drop addr_size parameter.
8292 (dwarf2_evaluate_loc_desc_full): Adjust call to
8293 allocate_piece_closure.
8294
8295 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8296
8297 PR gdb/21226
8298 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8299 the LSB end, independent of endianness.
8300
8301 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8302
8303 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8304 size capping.
8305
8306 2017-06-13 Yao Qi <yao.qi@linaro.org>
8307
8308 * mips-linux-nat.c: Move include features/mips*-linux.c to
8309 mips-linux-tdep.c.
8310 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8311 to mips-linux-tdep.c.
8312 * mips-linux-tdep.c: Include features/mips*-linux.c
8313 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8314 functions.
8315 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8316 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8317 (tdesc_mips64_dsp_linux): Declare.
8318
8319 2017-06-12 Tom Tromey <tom@tromey.com>
8320
8321 * valprint.h (val_print_type_code_int): Remove.
8322 * valprint.c (generic_val_print_int): Always call
8323 val_print_scalar_formatted.
8324 (val_print_type_code_int): Remove.
8325 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8326 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8327 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8328 * ada-valprint.c (ada_val_print_num): Use
8329 val_print_scalar_formatted.
8330
8331 2017-06-12 Tom Tromey <tom@tromey.com>
8332
8333 * printcmd.c (print_scalar_formatted): Unify the two switches.
8334 Don't convert scalars to LONGEST.
8335
8336 2017-06-12 Tom Tromey <tom@tromey.com>
8337
8338 PR exp/16225:
8339 * valprint.h (print_decimal_chars): Update.
8340 * valprint.c (maybe_negate_by_bytes): New function.
8341 (print_decimal_chars): Add "is_signed" argument.
8342 * printcmd.c (print_scalar_formatted): Update.
8343
8344 2017-06-12 Tom Tromey <tom@tromey.com>
8345
8346 PR exp/16225:
8347 * valprint.h (print_binary_chars, print_hex_chars): Update.
8348 * valprint.c (val_print_type_code_int): Update.
8349 (print_binary_chars): Add "zero_pad" argument.
8350 (emit_octal_digit): New function.
8351 (print_octal_chars): Don't zero-pad.
8352 (print_decimal_chars): Likewise.
8353 (print_hex_chars): Add "zero_pad" argument.
8354 * sh64-tdep.c (sh64_do_fp_register): Update.
8355 * regcache.c (regcache::dump): Update.
8356 * printcmd.c (print_scalar_formatted): Update.
8357 * infcmd.c (default_print_one_register_info): Update.
8358
8359 2017-06-12 Pedro Alves <palves@redhat.com>
8360 Alan Hayward <alan.hayward@arm.com>
8361
8362 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8363 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8364 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8365 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8366 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8367
8368 2017-06-12 Pedro Alves <palves@redhat.com>
8369
8370 * dwarf2read.c (mapped_symtab::data): Now a vector of
8371 symtab_index_entry instead of vector of
8372 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8373 whether an element's name is NULL instead of checking whether the
8374 element itself is NULL.
8375 (find_slot): Change return type. Adjust.
8376 (hash_expand, , add_index_entry, uniquify_cu_indices)
8377 (write_hash_table): Adjust.
8378
8379 2017-06-12 Pedro Alves <palves@redhat.com>
8380
8381 * dwarf2read.c (recursively_count_psymbols): New function.
8382 (write_psymtabs_to_index): Call it to compute number of psyms and
8383 pass estimate size of psyms_seen to unordered_set's ctor.
8384
8385 2017-06-12 Pedro Alves <palves@redhat.com>
8386
8387 * dwarf2read.c (write_hash_table): Check if key already exists
8388 before emplacing.
8389
8390 2017-06-12 Pedro Alves <palves@redhat.com>
8391
8392 * dwarf2read.c (data_buf::append_space): Rename to...
8393 (data_buf::grow): ... this, and make private. Adjust all callers.
8394 (data_buf::append_uint): New method.
8395 (add_address_entry, write_one_signatured_type)
8396 (write_psymtabs_to_index): Use it.
8397
8398 2017-06-12 Pedro Alves <palves@redhat.com>
8399
8400 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8401 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8402 (data_buf::file_write): Call ::fwrite directly.
8403
8404 2017-06-12 Pedro Alves <palves@redhat.com>
8405
8406 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8407 std::vector::erase.
8408
8409 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8410
8411 Code cleanup: C++ify .gdb_index producer.
8412 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8413 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8414 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8415 (create_strtab, add_string): Remove.
8416 (file_write, data_buf): New.
8417 (struct symtab_index_entry): Use std::vector for cu_indices.
8418 (struct mapped_symtab): Use std::vector for data.
8419 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8420 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8421 Remove.
8422 (find_slot): Change return type. Update it to the new data structures.
8423 (hash_expand, add_index_entry): Update it to the new data structures.
8424 (offset_type_compare): Remove.
8425 (uniquify_cu_indices): Update it to the new data structures.
8426 (c_str_view, c_str_view_hasher, vector_hasher): New.
8427 (add_indices_to_cpool): Remove.
8428 (write_hash_table): Update it to the new data structures.
8429 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8430 (eq_psymtab_cu_index): Remove.
8431 (psym_index_map): New typedef.
8432 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8433 reference and std::unordered_map for cu_index_htab.
8434 (add_address_entry, add_address_entry_worker, write_address_map)
8435 (write_psymbols): Update it to the new data structures.
8436 (write_obstack): Remove.
8437 (struct signatured_type_index_data): Change types_list to a data_buf
8438 reference and psyms_seen to a std::unordered_set reference.
8439 (write_one_signatured_type, recursively_write_psymbols)
8440 (write_psymtabs_to_index): Update it to the new data structures.
8441
8442 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8443
8444 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8445 separate-debug-file commands.
8446 * symfile.h (separate_debug_file_debug): New global.
8447 * symfile.c (separate_debug_file_debug): New global.
8448 (separate_debug_file_exists, find_separate_debug_file): Add
8449 debug output.
8450 (_initialize_symfile): Add "set debug separate-debug-file"
8451 command.
8452 * build-id.c (build_id_to_debug_bfd,
8453 find_separate_debug_file_by_buildid): Add debug output.
8454
8455 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8456
8457 * gdbarch.sh (displaced_step_free_closure): Remove.
8458 * gdbarch.h, gdbarch.c: Re-generate.
8459 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8460 displaced_step_free_closure.
8461 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8462 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8463 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8464 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8465 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8466 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8467 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8468 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8469 * infrun.c (displaced_step_clear): Call xfree instead of
8470 gdbarch_displaced_step_free_closure.
8471
8472 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8473
8474 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8475 NULL".
8476
8477 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8478
8479 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8480 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8481 (mn10300_push_dummy_call): Likewise.
8482
8483 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8484
8485 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8486
8487 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8488
8489 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8490
8491 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8492
8493 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8494 able to start inferiors using a shell.
8495 (New remote packets): Announce new packet "QStartupWithShell".
8496 * remote.c: Add PACKET_QStartupWithShell.
8497 (extended_remote_create_inferior): Handle new
8498 PACKET_QStartupWithShell.
8499 (remote_protocol_features) <QStartupWithShell>: New entry for
8500 PACKET_QStartupWithShell.
8501 (_initialize_remote): Call "add_packet_config_cmd" for
8502 QStartupShell.
8503
8504 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8505 Pedro Alves <palves@redhat.com>
8506
8507 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8508 and "nat/fork-inferior.h".
8509 * common/common-inferior.h: New file, with contents from
8510 "gdb/inferior.h".
8511 * commom/common-utils.c: Include "common-utils.h".
8512 (stringify_argv): New function.
8513 * common/common-utils.h (stringify_argv): New prototype.
8514 * configure.nat: Add "fork-inferior.o" as a dependency for
8515 "*linux*", "fbsd*" and "nbsd*" hosts.
8516 * corefile.c (get_exec_file): Update comment.
8517 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8518 instead of "startup_inferior".
8519 (darwin_create_inferior): Call "add_thread_silent" after
8520 "fork_inferior".
8521 * fork-child.c: Cleanup unnecessary includes.
8522 (SHELL_FILE): Move to "common/common-fork-child.c".
8523 (environ): Likewise.
8524 (exec_wrapper): Initialize.
8525 (get_exec_wrapper): New function.
8526 (breakup_args): Move to "common/common-fork-child.c"; rename to
8527 "breakup_args_for_exec".
8528 (escape_bang_in_quoted_argument): Move to
8529 "common/common-fork-child.c".
8530 (saved_ui): New variable.
8531 (prefork_hook): New function.
8532 (postfork_hook): Likewise.
8533 (postfork_child_hook): Likewise.
8534 (gdb_startup_inferior): Likewise.
8535 (fork_inferior): Move to "common/common-fork-child.c". Update
8536 function to support gdbserver.
8537 (startup_inferior): Likewise.
8538 * gdbcore.h (get_exec_file): Remove declaration.
8539 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8540 instead of "startup_inferior". Call "add_thread_silent" after
8541 "fork_inferior".
8542 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8543 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8544 instead of "startup_inferior". Call "add_thread_silent" after
8545 "fork_inferior".
8546 * inferior.h: Include "common-inferior.h".
8547 (trace_start_error): Move to "common/common-utils.h".
8548 (trace_start_error_with_name): Likewise.
8549 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8550 (startup_inferior): Likewise.
8551 (gdb_startup_inferior): New prototype.
8552 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8553 * nat/fork-inferior.h: New file.
8554 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8555 instead of "startup_inferior". Call "add_thread_silent" after
8556 "fork_inferior".
8557 * target.h (target_terminal_init): Move prototype to
8558 "target/target.h".
8559 (target_terminal_inferior): Likewise.
8560 (target_terminal_ours): Likewise.
8561 * target/target.h (target_terminal_init): New prototype, moved
8562 from "target.h".
8563 (target_terminal_inferior): Likewise.
8564 (target_terminal_ours): Likewise.
8565 * utils.c (gdb_flush_out_err): New function.
8566
8567 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8568
8569 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8570 * common/common-gdbthread.h: New file, with parts from
8571 "gdb/gdbthread.h".
8572 * gdbthread.h: Include "common-gdbthread.h".
8573 (switch_to_thread): Moved to "common/common-gdbthread.h".
8574
8575 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8576
8577 * Makefile.in (SFILES): Add "common/job-control.c".
8578 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8579 (COMMON_OBS): Add "job-control.o".
8580 * common/job-control.c: New file, with contents from
8581 "gdb/inflow.c".
8582 * common/job-control.h: New file, with contents from "terminal.h".
8583 * fork-child.c: Include "job-control.h".
8584 * inflow.c: Include "job-control.h".
8585 (gdb_setpgid): Move to "common/common-inflow.c".
8586 (_initialize_inflow): Move setting of "job_control" to
8587 "handle_job_control".
8588 * terminal.h (job_control): Moved to "common/common-terminal.h".
8589 (gdb_setpgid): Likewise.
8590 * top.c: Include "job_control.h".
8591 * utils.c: Likewise.
8592 (job_control): Moved to "job-control.c".
8593
8594 2017-06-07 Pedro Alves <palves@redhat.com>
8595
8596 * Makefile.in (SFILES): Add gdb_regex.c.
8597 (COMMON_OBS): Add gdb_regex.o.
8598 * ada-lang.c (ada_add_standard_exceptions)
8599 (ada_add_exceptions_from_frame, name_matches_regex)
8600 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8601 parameter type to compiled_regex. Adjust.
8602 (ada_exceptions_list): Use compiled_regex.
8603 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8604 std::unique_ptr<compiled_regex>.
8605 (exception_catchpoint::~exception_catchpoint): Remove regfree
8606 call.
8607 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8608 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8609 * breakpoint.c (solib_catchpoint::compiled): Now a
8610 std::unique_ptr<compiled_regex>.
8611 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8612 (check_status_catch_solib): Adjust to use compiled_regex.
8613 (add_solib_catchpoint): Adjust to use compiled_regex.
8614 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8615 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8616 compiled_regex reference. Adjust to use it.
8617 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8618 declaration. Include "gdb_regex.h".
8619 (apropos_cmd): Change regex parameter to compiled_regex reference.
8620 * gdb_regex.c: New file.
8621 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8622 declarations.
8623 (class compiled_regex): New.
8624 * linux-tdep.c: Include "common/gdb_optional.h".
8625 (struct mapping_regexes): New, factored out from
8626 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8627 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8628 gdb::optional and remove cleanups. Adjust to compiled_regex.
8629 * probe.c: Include "common/gdb_optional.h".
8630 (collect_probes): Use compiled_regex and gdb::optional and remove
8631 cleanups.
8632 * skip.c: Include "common/gdb_optional.h".
8633 (skiplist_entry::compiled_function_regexp): Now a
8634 gdb::optional<compiled_regex>.
8635 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8636 (free_skiplist_entry): Remove regfree call.
8637 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8638 compiled_regex and gdb::optional.
8639 * symtab.c: Include "common/gdb_optional.h".
8640 (search_symbols): Use compiled_regex and gdb::optional.
8641 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8642 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8643 to gdb_regex.c.
8644
8645 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8646
8647 * regcache.c (regcache::save): Avoid buffer use.
8648 (regcache::dump): Likewise.
8649
8650 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8651
8652 * sh-tdep.c (sh_pseudo_register_read): Remove
8653 MAX_REGISTER_SIZE.
8654 (sh_pseudo_register_write): Likewise.
8655 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8656 (sh64_pseudo_register_write): Likewise
8657
8658 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8659
8660 * aarch64-tdep.c (aarch64_store_return_value): Use
8661 V_REGISTER_SIZE.
8662 (aarch64_pseudo_read_value): Likewise.
8663 (aarch64_pseudo_write): Likewise.
8664
8665 2017-06-06 Yao Qi <yao.qi@linaro.org>
8666
8667 * regformats/regdef.h (set_register_cache): Remove the
8668 declaration.
8669
8670 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8671
8672 * frame.c (frame_unwind_register_signed): Use
8673 frame_unwind_register_value.
8674
8675 2017-06-06 Pedro Alves <palves@redhat.com>
8676
8677 PR breakpoints/21553
8678 * breakpoint.c (create_breakpoints_sal_default)
8679 (init_breakpoint_sal, create_breakpoint_sal): Use
8680 gdb::unique_xmalloc_ptr for string parameters.
8681 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8682 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8683 (base_breakpoint_create_breakpoints_sal)
8684 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8685 (strace_marker_create_breakpoints_sal)
8686 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8687 string parameters.
8688 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8689 gdb::unique_xmalloc_ptr for string parameters.
8690 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8691 parameters.
8692
8693 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8694
8695 * alpha-tdep.c (alpha_register_to_value): Use
8696 get_frame_register_value.
8697 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8698
8699 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8700
8701 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8702 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8703 (ia64_value_to_register): Likewise.
8704 (ia64_extract_return_value): Likewise.
8705 (ia64_store_return_value): Likewise.
8706 (ia64_push_dummy_call): Likewise.
8707
8708 2017-06-04 Joel Brobecker <brobecker@adacore.com>
8709
8710 GDB 8.0 released.
8711
8712 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8713
8714 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8715
8716 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8717
8718 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8719 parameter.
8720 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8721
8722 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8723
8724 * event-loop.c (poll_timers): Unallocate timer using delete
8725 instead of xfree.
8726
8727 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8728
8729 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8730 (struct breakpoint) <~breakpoint>: New.
8731 (struct watchpoint): Inherit from breakpoint.
8732 <~watchpoint>: New.
8733 <base>: Remove.
8734 (struct tracepoint): Inherit from breakpoint.
8735 <base>: Remove.
8736 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8737 (struct longjmp_breakpoint): Inherit from breakpoint.
8738 <~longjmp_breakpoint>: New.
8739 <base>: Remove.
8740 (new_breakpoint_from_type): Remove casts.
8741 (watchpoint_in_thread_scope): Remove reference to base field.
8742 (watchpoint_del_at_next_stop): Likewise.
8743 (update_watchpoint): Likewise.
8744 (watchpoint_check): Likewise.
8745 (bpstat_check_watchpoint): Likewise.
8746 (set_longjmp_breakpoint): Likewise.
8747 (struct fork_catchpoint): Inherit from breakpoint.
8748 <base>: Remove.
8749 (struct solib_catchpoint): Inherit from breakpoint.
8750 <~solib_catchpoint>: New.
8751 <base>: Remove.
8752 (dtor_catch_solib): Change to ...
8753 (solib_catchpoint::~solib_catchpoint): ... this.
8754 (breakpoint_hit_catch_solib): Remove reference to base field.
8755 (add_solib_catchpoint): Likewise.
8756 (create_fork_vfork_event_catchpoint): Likewise.
8757 (struct exec_catchpoint): Inherit from breakpoint.
8758 <~exec_catchpoint>: New.
8759 <base>: Remove.
8760 (dtor_catch_exec): Change to ...
8761 (exec_catchpoint::~exec_catchpoint): ... this.
8762 (dtor_watchpoint): Change to ...
8763 (watchpoint::~watchpoint): ... this.
8764 (watch_command_1): Remove reference to base field.
8765 (catch_exec_command_1): Likewise.
8766 (base_breakpoint_dtor): Change to ...
8767 (breakpoint::~breakpoint): ... this.
8768 (base_breakpoint_ops): Remove dtor field value.
8769 (longjmp_bkpt_dtor): Change to ...
8770 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8771 (strace_marker_create_breakpoints_sal): Remove reference to base
8772 field.
8773 (delete_breakpoint): Don't manually call breakpoint destructor.
8774 (create_tracepoint_from_upload): Remove reference to base field.
8775 (trace_pass_set_count): Likewise.
8776 (initialize_breakpoint_ops): Don't initialize
8777 momentary_breakpoint_ops, don't set dtors.
8778 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8779 <~ada_catchpoint>: New.
8780 <base>: Remove.
8781 (create_excep_cond_exprs): Remove reference to base field.
8782 (dtor_exception): Change to ...
8783 (ada_catchpoint::~ada_catchpoint): ... this.
8784 (dtor_catch_exception): Remove.
8785 (dtor_catch_exception_unhandled): Remove.
8786 (dtor_catch_assert): Remove.
8787 (create_ada_exception_catchpoint): Remove reference to base
8788 field.
8789 (initialize_ada_catchpoint_ops): Don't set dtors.
8790 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8791 breakpoint.
8792 <~signal_catchpoint>: New.
8793 <base>: Remove.
8794 (signal_catchpoint_dtor): Change to ...
8795 (signal_catchpoint::~signal_catchpoint): ... this.
8796 (create_signal_catchpoint): Remove reference to base field.
8797 (initialize_signal_catchpoint_ops): Don't set dtor.
8798 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8799 from breakpoint.
8800 <~syscall_catchpoint>: New.
8801 <base>: Remove.
8802 (dtor_catch_syscall): Change to ...
8803 (syscall_catchpoint::~syscall_catchpoint): ... this.
8804 (create_syscall_event_catchpoint): Remove reference to base
8805 field.
8806 (initialize_syscall_catchpoint_ops): Don't set dtor.
8807 * break-catch-throw.c (struct exception_catchpoint): Inherit
8808 from breakpoint.
8809 <~exception_catchpoint>: New.
8810 <base>: Remove.
8811 (dtor_exception_catchpoint): Change to ...
8812 (exception_catchpoint::~exception_catchpoint): ... this.
8813 (handle_gnu_v3_exceptions): Remove reference to base field.
8814 (initialize_throw_catchpoint_ops): Don't set dtor.
8815 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8816 field.
8817 * remote.c (remote_get_tracepoint_status): Likewise.
8818 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8819 * tracefile.c (tracefile_fetch_registers): Likewise.
8820 * tracepoint.c (actions_command): Likewise.
8821 (validate_actionline): Likewise.
8822 (tfind_1): Likewise.
8823 (get_traceframe_location): Likewise.
8824 (find_matching_tracepoint_location): Likewise.
8825 (parse_tracepoint_status): Likewise.
8826 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8827
8828 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8829
8830 * breakpoint.c (struct longjmp_breakpoint): New struct.
8831 (is_tracepoint_type): Change return type to bool.
8832 (is_longjmp_type): New function.
8833 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8834 (set_raw_breakpoint_without_location): Use
8835 new_breakpoint_from_type.
8836 (set_raw_breakpoint): Likewise.
8837
8838 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8839
8840 * breakpoint.c (new_breakpoint_from_type): New function.
8841 (create_breakpoint_sal): Use new_breakpoint_from_type and
8842 unique_ptr.
8843 (create_breakpoint): Likewise.
8844
8845 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8846
8847 * memattr.c (mem_info_command): Rename to ...
8848 (info_mem_command): ... this.
8849 (mem_enable_command): Rename to ...
8850 (enable_mem_command): ... this.
8851 (mem_disable_command): Rename to ...
8852 (disable_mem_command): ... this.
8853 (mem_delete_command): Rename to ...
8854 (delete_mem_command): ... this.
8855 (_initialize_mem): Adjust function names.
8856
8857 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8858
8859 * btrace.c (handle_pt_insn_events): New.
8860 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8861 STATUS. Split into this and ...
8862 (handle_pt_insn_event_flags): ... this.
8863
8864 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8865
8866 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8867 and struct pt_insn.resynced.
8868 * configure: Regenerated.
8869 * config.in: Regenerated.
8870
8871 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8872
8873 * btrace.c (ftrace_find_call_by_number): New function.
8874 (ftrace_new_function): Store objects, not pointers.
8875 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8876 ftrace_new_gap, ftrace_update_function,
8877 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8878 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8879 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8880 btrace_ends_with_single_insn, btrace_call_get): Account for
8881 btrace_thread_info::functions now storing objects.
8882 * btrace.h (struct btrace_thread_info): Add constructor.
8883 (struct btrace_thread_info) <functions>: Make std::vector.
8884 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8885 Initialize with default values.
8886 * record-btrace.c (record_btrace_frame_sniffer): Account for
8887 btrace_thread_info::functions now storing objects.
8888
8889 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8890
8891 * btrace.c: Remove typedef bfun_s.
8892 (ftrace_new_gap): Directly add gaps to the list of gaps.
8893 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8894 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8895 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8896 instead of gdb VEC.
8897
8898 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8899
8900 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8901 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8902 with btrace_thread_info::next_segment and
8903 btrace_thread_info::prev_segment.
8904 * btrace.h: Remove struct btrace_func_link.
8905 (struct btrace_function): Replace pair of function segment pointers
8906 with pair of indices.
8907 * python/py-record-btrace.c (btpy_call_prev_sibling,
8908 btpy_call_next_sibling): Replace references to
8909 btrace_thread_info::segment with btrace_thread_info::next_segment and
8910 btrace_thread_info::prev_segment.
8911 * record-btrace.c (record_btrace_frame_this_id): Use
8912 btrace_find_call_by_number.
8913
8914 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8915
8916 * btrace.c (ftrace_new_function, ftrace_fixup_level,
8917 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8918 btrace_insn_next, btrace_insn_prev): Remove references to
8919 btrace_thread_info::flow.
8920 * btrace.h (struct btrace_function): Remove FLOW.
8921
8922 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8923
8924 * btrace.c (ftrace_find_call_by_number): New function.
8925 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8926 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8927 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8928 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8929 index.
8930 * btrace.h (struct btrace_function): Turn UP into an index.
8931 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8932 as an index.
8933 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8934 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8935 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8936
8937 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8938
8939 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8940 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8941 ftrace_update_function, ftrace_compute_global_level_offset,
8942 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8943 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8944 btrace_insn_end, btrace_is_empty): Remove references to
8945 btrace_thread_info::begin and btrace_thread_info::end.
8946 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8947 (struct btrace_thread_info) <functions>: Adjust comment.
8948 * record-btrace.c (record_btrace_start_replaying): Remove reference to
8949 btrace_thread_info::begin.
8950
8951 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8952
8953 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8954 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8955 ftrace_update_function): Remove arguments that implicitly were always
8956 BTINFO->END.
8957 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8958 Don't pass BTINFO->END.
8959
8960 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8961
8962 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8963 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8964 btrace_find_insn_by_number): Replace function segment pointer with
8965 index.
8966 (btrace_insn_cmp): Simplify.
8967 * btrace.h: (struct btrace_insn_iterator) Rename index to
8968 insn_index. Replace function segment pointer with index into function
8969 segment vector.
8970 * record-btrace.c (record_btrace_call_history): Replace function
8971 segment pointer use with index.
8972 (record_btrace_frame_sniffer): Retrieve function call segment through
8973 vector.
8974 (record_btrace_set_replay): Remove defunc't safety check.
8975
8976 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8977
8978 * btrace.c (btrace_ends_with_single_insn): New function.
8979 (btrace_call_get, btrace_call_number, btrace_call_begin,
8980 btrace_call_end, btrace_call_next, btrace_call_prev,
8981 btrace_find_call_by_number): Use index into call segment vector
8982 instead of pointer.
8983 (btrace_call_cmp): Simplify.
8984 * btrace.h (struct btrace_call_iterator): Replace function call segment
8985 pointer with index into vector.
8986 * record-btrace.c (record_btrace_call_history): Use index instead of
8987 pointer.
8988
8989 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8990
8991 * btrace.c (btrace_insn_begin, btrace_insn_end,
8992 btrace_find_insn_by_number): Add btinfo to iterator.
8993 * btrace.h (struct btrace_insn_iterator): Add btinfo.
8994
8995 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8996
8997 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8998 and save pointers directly.
8999 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9000 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9001 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9002 changed signature of functions.
9003 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9004 (btrace_fetch): Remove code that adds btrace_function pointers to
9005 vector of btrace_functions.
9006 (btrace_clear): Simplify freeing vector of btrace_functions.
9007
9008 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9009
9010 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9011 Replace VEC_* with std::vector functions.
9012 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9013 (struct btrace_thread_info)<functions>: Change type to std::vector.
9014
9015 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9016
9017 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9018 "Removed targets and native configurations" up. Merge duplicate
9019 "New commands" sub-sections. Add "New options" sub-sections.
9020
9021 2017-05-26 Alan Hayward <alan.hayward@arm.com>
9022
9023 * defs.h (copy_integer_to_size): New declaration.
9024 * findvar.c (copy_integer_to_size): New function.
9025 (do_cint_test): New selftest function.
9026 (copy_integer_to_size_test): Likewise.
9027 (_initialize_findvar): Likewise.
9028 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9029 (mips_fbsd_collect_reg): Use raw_collect_integer.
9030 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9031 (mips64_fill_gregset): Use raw_collect_integer
9032 (mips64_fill_fpregset): Use raw_supply_integer.
9033 * regcache.c (regcache::raw_supply_integer): New function.
9034 (regcache::raw_collect_integer): Likewise.
9035 * regcache.h: (regcache::raw_supply_integer): New declaration.
9036 (regcache::raw_collect_integer): Likewise.
9037
9038 2017-05-24 Yao Qi <yao.qi@linaro.org>
9039
9040 * Makefile.in (SFILES): Add gdbarch-selftests.c.
9041 (COMMON_OBS): Add gdbarch-selftests.o.
9042 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9043 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9044 * gdbarch-selftests.c: New file.
9045 * regcache.h (regcache) <~regcache>: Mark it virtual if
9046 GDB_SELF_TEST.
9047 <raw_write>: Likewise.
9048
9049 2017-05-24 Yao Qi <yao.qi@linaro.org>
9050
9051 * regcache.c (current_regcache): Change it to
9052 regcache::current_regcache.
9053 (regcache_observer_target_changed): Update.
9054 (regcache_thread_ptid_changed): Make it a regcache static
9055 method.
9056 (regcache_thread_ptid_changed): Update.
9057 (class regcache_access): New.
9058 (current_regcache_test): Update.
9059 (_initialize_regcache): Update.
9060 * regcache.h: Include forward_list.
9061 (regcache): Declare regcache_thread_ptid_changed and declare
9062 registers_changed_ptid as friend.
9063
9064 2017-05-24 Yao Qi <yao.qi@linaro.org>
9065
9066 * i387-tdep.c (i387_register_to_value): Use register_size
9067 instead of TYPE_LENGTH.
9068 * m68k-tdep.c (m68k_register_to_value): Likewise.
9069
9070 2017-05-24 Yao Qi <yao.qi@linaro.org>
9071
9072 * i387-tdep.c (i387_convert_register_p): Return false if type
9073 code isn't TYPE_CODE_FLT.
9074
9075 2017-05-24 Yao Qi <yao.qi@linaro.org>
9076
9077 * alpha-tdep.c (alpha_convert_register_p): Return true if type
9078 length is 4.
9079 (alpha_register_to_value): Remove type length check.
9080 (alpha_value_to_register): Likewise.
9081
9082 2017-05-24 Yao Qi <yao.qi@linaro.org>
9083
9084 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9085 TYPE_CODE_FLT.
9086
9087 2017-05-24 Yao Qi <yao.qi@linaro.org>
9088
9089 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9090 TYPE_CODE_FLT or not.
9091
9092 2017-05-24 Yao Qi <yao.qi@linaro.org>
9093
9094 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9095 * avr-tdep.c (avr_gdbarch_init): Likewise.
9096 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9097 * cris-tdep.c (cris_gdbarch_init): Likewise.
9098 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9099 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9100 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9101 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9102 * mep-tdep.c (mep_gdbarch_init): Likewise.
9103 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9104 * mips-tdep.c (mips_gdbarch_init): Likewise.
9105 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9106 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9107 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9108 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9109 * v850-tdep.c (v850_gdbarch_init): Likewise.
9110
9111 2017-05-24 Yao Qi <yao.qi@linaro.org>
9112
9113 * selftest-arch.c (tests_with_arch): Call registers_changed
9114 and reinit_frame_cache.
9115 * selftest.c (run_self_tests): Likewise.
9116
9117 2017-05-24 Yao Qi <yao.qi@linaro.org>
9118
9119 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9120 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9121
9122 2017-05-24 Yao Qi <yao.qi@linaro.org>
9123
9124 * rl78-tdep.c (rl78_gdbarch_init): Don't call
9125 set_gdbarch_print_insn.
9126
9127 2017-05-24 Yao Qi <yao.qi@linaro.org>
9128
9129 * h8300-tdep.c (h8300_gdbarch_init): Don't call
9130 set_gdbarch_print_insn.
9131
9132 2017-05-24 Yao Qi <yao.qi@linaro.org>
9133
9134 * alpha-tdep.c (alpha_gdbarch_init): Don't call
9135 set_gdbarch_print_insn.
9136 * arc-tdep.c (arc_gdbarch_init): Likewise.
9137 * arch-utils.c: include dis-asm.h.
9138 (default_print_insn): New function.
9139 * arch-utils.h (default_print_insn): Declare.
9140 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9141 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9142 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9143 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9144 * frv-tdep.c (frv_gdbarch_init): Likewise.
9145 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9146 * gdbarch.sh (print_insn): Use default_print_insn.
9147 * gdbarch.c: Regenerated.
9148 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9149 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9150 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9151 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9152 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9153 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9154 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9155 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9156 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9157 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9158 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9159 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9160 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9161 * mt-tdep.c (mt_gdbarch_init): Likewise.
9162 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9163 * nios2-tdep.c (nios2_print_insn): Remove.
9164 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9165 * rx-tdep.c (rx_gdbarch_init): Likewise.
9166 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9167 * score-tdep.c (score_print_insn): Remove.
9168 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9169 * sh-tdep.c (sh_gdbarch_init): Likewise.
9170 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9171 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9172 * tic6x-tdep.c (tic6x_print_insn): Remove.
9173 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9174 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9175 * v850-tdep.c (v850_gdbarch_init): Likewise.
9176 * vax-tdep.c (vax_gdbarch_init): Likewise.
9177 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9178 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9179
9180 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9181
9182 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9183 (MIPS_FP0_REGNUM): Remove.
9184 (MIPS_FSR_REGNUM): Remove.
9185 (mips_fbsd_supply_fpregs): Use mips_regnum.
9186 (mips_fbsd_supply_gregs): Likewise.
9187 (mips_fbsd_collect_fpregs): Likewise.
9188 (mips_fbsd_collect_gregs): Likewise.
9189
9190 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9191
9192 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9193 (getpfpregs_supplies): New function.
9194 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9195 getfpregs_supplies.
9196 (mips_fbsd_store_inferior_registers): Likewise.
9197
9198 2017-05-22 Pedro Alves <palves@redhat.com>
9199
9200 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9201 maintainer.
9202
9203 2017-05-22 Alan Hayward <alan.hayward@arm.com>
9204
9205 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9206 (store_register): Likewise.
9207 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9208 (get_decimal_float_return_value): Likewise.
9209 (do_ppc_sysv_return_value): Likewise.
9210 (ppc64_sysv_abi_push_integer): Likewise.
9211 (ppc64_sysv_abi_push_freg): Likewise.
9212 (ppc64_sysv_abi_return_value_base): Likewise.
9213 (ppc64_sysv_abi_return_value): Likewise.
9214 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9215 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9216 * rs6000-nat.c: Likewise.
9217 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9218 (rs6000_value_to_register): Likewise.
9219 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9220
9221 2017-05-21 Tom Tromey <tom@tromey.com>
9222
9223 PR rust/21466:
9224 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9225 arrays as "[T]", not "[T; ]".
9226
9227 2017-05-19 Tom Tromey <tom@tromey.com>
9228
9229 PR rust/21484:
9230 * rust-lang.c (exp_descriptor_rust): New function.
9231 (rust_language_defn): Use it.
9232 * p-lang.c (pascal_language_defn): Update.
9233 * opencl-lang.c (opencl_language_defn): Update.
9234 * objc-lang.c (objc_language_defn): Update.
9235 * m2-lang.c (m2_language_defn): Update.
9236 * language.h (struct language_defn)
9237 <la_watch_location_expression>: New member.
9238 * language.c (unknown_language_defn, auto_language_defn)
9239 (local_language_defn): Update.
9240 * go-lang.c (go_language_defn): Update.
9241 * f-lang.c (f_language_defn): Update.
9242 * d-lang.c (d_language_defn): Update.
9243 * c-lang.h (c_watch_location_expression): Declare.
9244 * c-lang.c (c_watch_location_expression): New function.
9245 (c_language_defn, cplus_language_defn, asm_language_defn)
9246 (minimal_language_defn): Use it.
9247 * breakpoint.c (watch_command_1): Call
9248 la_watch_location_expression.
9249 * ada-lang.c (ada_language_defn): Update.
9250
9251 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9252
9253 PR tui/21482
9254 * gdb_curses.h (NOMACROS): Define.
9255 (NCURSES_NOMACROS): Define.
9256
9257 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9258
9259 PR tui/21482
9260 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9261 arg to char *.
9262 * tui/tui-wingeneral.c (box_win): Likewise.
9263 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9264 (tui_show_source_line): Likewise.
9265 (tui_show_exec_info_content): Likewise.
9266
9267 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9268
9269 * sparc-tdep.c (sparc_structure_return_p)
9270 (sparc_arg_on_registers_p): New functions.
9271 (sparc32_store_arguments): Use them.
9272 * sparc64-tdep.c (sparc64_16_byte_align_p)
9273 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9274 Handle TYPE_CODE_ARRAY.
9275
9276 2017-05-17 Yao Qi <yao.qi@linaro.org>
9277
9278 * cli/cli-decode.c (add_alias_cmd): New function.
9279 * command.h (add_alias_cmd): Declare.
9280 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9281 instead call add_alias_cmd.
9282
9283 2017-05-17 Pedro Alves <palves@redhat.com>
9284
9285 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9286 (nat_makefile_frag): ... this. All references updated.
9287 * configure.ac: Likewise.
9288 * configure.nat: Likewise. Enhance comments.
9289 * configure: Regenerate.
9290
9291 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9292
9293 * procfs.c (procfs_create_inferior): Change prototype to match
9294 definition.
9295
9296 2017-05-13 Eli Zaretskii <eliz@gnu.org>
9297
9298 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9299 C++ compiler warning.
9300
9301 2017-05-12 Tom Tromey <tom@tromey.com>
9302
9303 PR rust/21483:
9304 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9305 recurse, just call value_struct_elt directly.
9306
9307 2017-05-12 Tom Tromey <tom@tromey.com>
9308
9309 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9310 OP_RUST_ARRAY>: Fix.
9311
9312 2017-05-12 Tom Tromey <tom@tromey.com>
9313
9314 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9315
9316 2017-05-09 Yao Qi <yao.qi@linaro.org>
9317
9318 * regcache.c: Include <forward_list>.
9319 (struct regcache_list): Remove.
9320 (current_regcache): Update.
9321 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9322 (regcache_thread_ptid_changed): Likewise.
9323 (registers_changed_ptid): Likewise.
9324 (current_regcache_size): Likewise.
9325
9326 2017-05-09 Yao Qi <yao.qi@linaro.org>
9327
9328 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9329 (current_regcache_size): New function.
9330 (current_regcache_test): New function.
9331 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9332
9333 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9334
9335 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9336 (print_gp_register_row): Use get_frame_register_value.
9337
9338 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9339
9340 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9341 (mips_supply_fpregset): Likewise.
9342 (mips64_supply_gregset): Likewise.
9343
9344 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9345
9346 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9347 regcache->raw_supply_zeroed.
9348
9349 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9350
9351 * configure.nat: Rearrange 'case' statements to match
9352 host before cpu.
9353
9354 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9355
9356 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9357 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9358 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9359 "@nat_extra_makefile_frag@".
9360 (Makefile): Remove dependency on "@frags@".
9361 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9362 (data-directory/Makefile): Likewise.
9363 * config/aarch64/linux.mh: Deleted; moved contents to
9364 "gdb/configure.nat".
9365 * config/alpha/alpha-linux.mh: Likewise.
9366 * config/alpha/nbsd.mh: Likewise.
9367 * config/arm/linux.mh: Likewise.
9368 * config/arm/nbsdelf.mh: Likewise.
9369 * config/i386/cygwin.mh: Likewise.
9370 * config/i386/cygwin64.mh: Likewise.
9371 * config/i386/darwin.mh: Likewise.
9372 * config/i386/fbsd.mh: Likewise.
9373 * config/i386/fbsd64.mh: Likewise.
9374 * config/i386/go32.mh: Likewise.
9375 * config/i386/i386gnu.mh: Likewise.
9376 * config/i386/i386sol2.mh: Likewise.
9377 * config/i386/linux.mh: Likewise.
9378 * config/i386/linux64.mh: Likewise.
9379 * config/i386/mingw.mh: Likewise.
9380 * config/i386/mingw64.mh: Likewise.
9381 * config/i386/nbsd64.mh: Likewise.
9382 * config/i386/nbsdelf.mh: Likewise.
9383 * config/i386/nto.mh: Likewise.
9384 * config/i386/obsd.mh: Likewise.
9385 * config/i386/obsd64.mh: Likewise.
9386 * config/i386/sol2-64.mh: Likewise.
9387 * config/ia64/linux.mh: Likewise.
9388 * config/m32r/linux.mh: Likewise.
9389 * config/m68k/linux.mh: Likewise.
9390 * config/m68k/nbsdelf.mh: Likewise.
9391 * config/m68k/obsd.mh: Likewise.
9392 * config/m88k/obsd.mh: Likewise.
9393 * config/mips/fbsd.mh: Likewise.
9394 * config/mips/linux.mh: Likewise.
9395 * config/mips/nbsd.mh: Likewise.
9396 * config/mips/obsd64.mh: Likewise.
9397 * config/pa/linux.mh: Likewise.
9398 * config/pa/nbsd.mh: Likewise.
9399 * config/pa/obsd.mh: Likewise.
9400 * config/powerpc/aix.mh: Likewise.
9401 * config/powerpc/fbsd.mh: Likewise.
9402 * config/powerpc/linux.mh: Likewise.
9403 * config/powerpc/nbsd.mh: Likewise.
9404 * config/powerpc/obsd.mh: Likewise.
9405 * config/powerpc/ppc64-linux.mh: Likewise.
9406 * config/powerpc/spu-linux.mh: Likewise.
9407 * config/s390/linux.mh: Likewise.
9408 * config/sh/nbsd.mh: Likewise.
9409 * config/sparc/fbsd.mh: Likewise.
9410 * config/sparc/linux.mh: Likewise.
9411 * config/sparc/linux64.mh: Likewise.
9412 * config/sparc/nbsd64.mh: Likewise.
9413 * config/sparc/nbsdelf.mh: Likewise.
9414 * config/sparc/obsd64.mh: Likewise.
9415 * config/sparc/sol2.mh: Likewise.
9416 * config/tilegx/linux.mh: Likewise.
9417 * config/vax/nbsdelf.mh: Likewise.
9418 * config/vax/obsd.mh: Likewise.
9419 * config/xtensa/linux.mh: Likewise.
9420 * config/i386/i386gnu.mn: New file, with excerpts from
9421 "config/i386/i386gnu.mh".
9422 * configure: Regenerate.
9423 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9424 *.mh files under "gdb/config".
9425 * configure.nat: New file, with contents from the
9426 "gdb/config/*/*.mh" files.
9427
9428 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9429
9430 * btrace.c (btrace_clear): Free insn vector.
9431
9432 2017-05-05 Pedro Alves <palves@redhat.com>
9433
9434 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9435 * configure: Regenerate.
9436
9437 2017-05-04 Pedro Alves <palves@redhat.com>
9438
9439 * Makefile.in (SFILES): Add progspace-and-thread.c.
9440 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9441 (COMMON_OBS): Add progspace-and-thread.o.
9442 * breakpoint.c: Include "progspace-and-thread.h".
9443 (update_inserted_breakpoint_locations)
9444 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9445 Use scoped_restore_current_pspace_and_thread.
9446 (create_std_terminate_master_breakpoint): Use
9447 scoped_restore_current_program_space.
9448 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9449 (print_breakpoint_location): Use
9450 scoped_restore_current_program_space.
9451 (bp_loc_is_permanent): Use
9452 scoped_restore_current_pspace_and_thread.
9453 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9454 (download_tracepoint_locations): Use
9455 scoped_restore_current_pspace_and_thread.
9456 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9457 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9458 (enum step_over_calls_kind): Moved from inferior.h.
9459 (class scoped_restore_current_thread): New class.
9460 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9461 declaration.
9462 (scoped_restore_current_thread): New class.
9463 * infcmd.c: Include "common/gdb_optional.h".
9464 (continue_1, proceed_after_attach): Use
9465 scoped_restore_current_thread.
9466 (notice_new_inferior): Use scoped_restore_current_thread.
9467 * inferior.c: Include "progspace-and-thread.h".
9468 (restore_inferior, save_current_inferior): Delete.
9469 (add_inferior_command, clone_inferior_command): Use
9470 scoped_restore_current_pspace_and_thread.
9471 * inferior.h (scoped_restore_current_inferior): New class.
9472 * infrun.c: Include "progspace-and-thread.h" and
9473 "common/gdb_optional.h".
9474 (follow_fork_inferior): Use
9475 scoped_restore_current_pspace_and_thread.
9476 (scoped_restore_exited_inferior): New class.
9477 (handle_vfork_child_exec_or_exit): Use
9478 scoped_restore_exited_inferior,
9479 scoped_restore_current_pspace_and_thread,
9480 scoped_restore_current_thread and scoped_restore.
9481 (fetch_inferior_event): Use scoped_restore_current_thread.
9482 * linespec.c (decode_line_full, decode_line_1): Use
9483 scoped_restore_current_program_space.
9484 * mi/mi-main.c: Include "progspace-and-thread.h".
9485 (exec_continue): Use scoped_restore_current_thread.
9486 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9487 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9488 * proc-service.c (ps_pglobal_lookup): Use
9489 scoped_restore_current_program_space.
9490 * progspace-and-thread.c: New file.
9491 * progspace-and-thread.h: New file.
9492 * progspace.c (release_program_space, clone_program_space): Use
9493 scoped_restore_current_program_space.
9494 (restore_program_space, save_current_program_space)
9495 (save_current_space_and_thread): Delete.
9496 (switch_to_program_space_and_thread): Moved to
9497 progspace-and-thread.c.
9498 * progspace.h (save_current_program_space)
9499 (save_current_space_and_thread): Delete declarations.
9500 (scoped_restore_current_program_space): New class.
9501 * remote.c (remote_btrace_maybe_reopen): Use
9502 scoped_restore_current_thread.
9503 * symtab.c: Include "progspace-and-thread.h".
9504 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9505 * thread.c (print_thread_info_1): Use
9506 scoped_restore_current_thread.
9507 (struct current_thread_cleanup): Delete.
9508 (do_restore_current_thread_cleanup)
9509 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9510 (scoped_restore_current_thread::~scoped_restore_current_thread):
9511 ... this new dtor.
9512 (make_cleanup_restore_current_thread): Rename/convert to ...
9513 (scoped_restore_current_thread::scoped_restore_current_thread):
9514 ... this new ctor.
9515 (thread_apply_all_command): Use scoped_restore_current_thread.
9516 (thread_apply_command): Use scoped_restore_current_thread.
9517 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9518 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9519
9520 2017-05-04 Pedro Alves <palves@redhat.com>
9521
9522 * thread.c (make_cleanup_restore_current_thread): Move
9523 find_thread_ptid call before the is_stopped call. Assert that the
9524 thread is found. Replace is_stopped call by checking the thread's
9525 state directly. Remove unnecessary NULL-thread check.
9526
9527 2017-05-04 Pedro Alves <palves@redhat.com>
9528
9529 * corelow.c (thread_section_name): New class.
9530 (get_core_register_section, get_core_siginfo): Use it.
9531
9532 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9533
9534 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9535 (get_core_register_section): Remove xfree of NULL pointer.
9536
9537 2017-05-03 Alan Hayward <alan.hayward@arm.com>
9538
9539 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9540 * regcache.c (regcache::raw_supply_zeroed): New function.
9541 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9542
9543 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9544
9545 * gdbarch.sh: Remove commented out definition of
9546 TARGET_CHAR_BIT.
9547 * gdbarch.h: Re-generate.
9548
9549 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9550
9551 * configure: Regenerate.
9552
9553 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9554
9555 * solib-target.c (solib_target_relocate_section_addresses):
9556 Remove num_section_bases, num_bases, segment_bases variables.
9557
9558 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9559
9560 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9561
9562 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9563
9564 * solib-target.c: Include <vector>
9565 (struct lm_info_target) <~lm_info_target>: Remove.
9566 <segment_bases, section_bases>: Change type to
9567 std::vector<CORE_ADDR>.
9568 (library_list_start_segment, library_list_start_section,
9569 library_list_end_library,
9570 solib_target_relocate_section_addresses): Adjust.
9571
9572 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9573
9574 * gdbarch.sh (software_single_step): Change return type to
9575 std::vector<CORE_ADDR>.
9576 * gdbarch.c, gdbarch.h: Re-generate.
9577 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9578 Adjust.
9579 (arm_deal_with_atomic_sequence_raw): Adjust.
9580 (thumb_get_next_pcs_raw): Adjust.
9581 (arm_get_next_pcs_raw): Adjust.
9582 (arm_get_next_pcs): Adjust.
9583 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9584 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9585 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9586 (alpha_software_single_step): Adjust.
9587 * alpha-tdep.h (alpha_software_single_step): Adjust.
9588 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9589 * arm-tdep.c (arm_software_single_step): Adjust.
9590 (arm_breakpoint_kind_from_current_state): Adjust.
9591 * arm-tdep.h (arm_software_single_step): Adjust.
9592 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9593 * cris-tdep.c (cris_software_single_step): Adjust.
9594 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9595 (micromips_deal_with_atomic_sequence): Adjust.
9596 (deal_with_atomic_sequence): Adjust.
9597 (mips_software_single_step): Adjust.
9598 * mips-tdep.h (mips_software_single_step): Adjust.
9599 * moxie-tdep.c (moxie_software_single_step): Adjust.
9600 * nios2-tdep.c (nios2_software_single_step): Adjust.
9601 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9602 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9603 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9604 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9605 * sparc-tdep.c (sparc_software_single_step): Adjust.
9606 * spu-tdep.c (spu_software_single_step): Adjust.
9607 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9608
9609 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9610
9611 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9612 * gdbarch.h: Re-generate.
9613
9614 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9615
9616 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9617 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9618 * python/py-instruction.c, python/py-instruction.h: New file.
9619 * python/py-record.c: Add py-instruction.h include.
9620 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9621 gdb.RecordInstruction.
9622 * python/python-internal.h: Add gdbpy_initialize_instruction
9623 declaration.
9624 * python/python.c (do_start_initialization): Add
9625 gdbpy_initialize_instruction.
9626
9627 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9628
9629 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9630 Remove.
9631 (btrace_func_from_recpy_func): New function.
9632 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9633 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9634 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9635 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9636 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9637 Also, use new helper functions.
9638 (btpy_list_item): Use new helper functions.
9639 (recpy_bt_function_call_history): Use new type name.
9640 (btpy_call_getset): Remove.
9641 (gdbpy_initialize_btrace): Remove code to initialize
9642 gdb.BtraceFunctionCall.
9643 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9644 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9645 recpy_bt_func_prev, recpy_bt_func_next): New export.
9646 * python/py-record.c (recpy_func_type): New static object.
9647 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9648 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9649 recpy_func_next): New function.
9650 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9651 (recpy_func_getset): New static object.
9652 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9653 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9654
9655 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9656
9657 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9658 (btpy_object, btpy_insn_type, btpy_new): Remove.
9659 (btpy_list_object): Use gdb.RecordInstruction type instead of
9660 gdb.BtraceInstruction type.
9661 (btrace_insn_from_recpy_insn): New function.
9662 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9663 btpy_new.
9664 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9665 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9666 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9667 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9668 instead of btpy_object.
9669 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9670 btpy_insn_data, btpy_insn_decode): Rename to ...
9671 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9672 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9673 recpy_bt_insn_decode): This. Also, use new helper functions.
9674 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9675 recpy_insn_type.
9676 (btpy_insn_getset): Remove.
9677 (gdbpy_initialize_btrace): Remove code to initialize
9678 gdb.BtraceInstruction. Use recpy_element_object.
9679 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9680 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9681 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9682 * python/py-record.c (recpy_insn_type): New static object.
9683 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9684 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9685 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9686 New function.
9687 (recpy_insn_getset): New static object.
9688 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9689 * python/py-record.h (recpy_element_object): New typedef.
9690 (recpy_insn_type, recpy_insn_new): New export.
9691
9692 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9693
9694 * py-record-btrace.c (btpy_insn_new): Removed.
9695 (btpy_insn_or_gap_new): New function.
9696 (btpy_insn_error): Removed.
9697 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9698 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9699 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9700 btpy_insn_or_gap_new instead of btpy_insn_new.
9701 (btpy_insn_getset): Remove btpy_insn_error.
9702 * py-record.c (recpy_gap_type): New static object.
9703 (recpy_gap_object): New typedef.
9704 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9705 recpy_gap_reason_string): New function.
9706 (recpy_gap_getset): New static object.
9707 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9708 * py-record.h (recpy_gap_new): New export.
9709
9710 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9711
9712 * python/py-record.c (recpy_ptid): Remove.
9713 (recpy_record_getset): Remove recpy_ptid.
9714
9715 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9716
9717 * btrace.c (btrace_fetch): Set inferior_ptid.
9718 * python/py-record-btrace.c: Add "py-record.h" include.
9719 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9720 recpy_bt_end, recpy_bt_instruction_history,
9721 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9722 in gdb.Record object instead of current ptid.
9723 * python/py-record.c: Include new "py-record.h" file.
9724 (recpy_record_object): Moved to py-record.h.
9725 * python/py-record.h: New file.
9726
9727 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9728
9729 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9730 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9731 indentation.
9732
9733 2017-05-01 Joel Brobecker <brobecker@adacore.com>
9734
9735 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9736 the past maintainers section.
9737
9738 2017-04-28 Yao Qi <yao.qi@linaro.org>
9739
9740 * infcmd.c (get_return_value): Use regcache ctor, and remove
9741 cleanup.
9742
9743 2017-04-28 Yao Qi <yao.qi@linaro.org>
9744 Pedro Alves <palves@redhat.com>
9745
9746 * regcache.c (regcache::regcache): New tag dispatch ctor.
9747 (do_cooked_read): Moved above.
9748 (regcache_dup): Use the tag dispatch ctor..
9749 * regcache.h (regcache): Declare ctor, delete copy ctor and
9750 assignment operator, remove friend regcache_dup.
9751
9752 2017-04-28 Yao Qi <yao.qi@linaro.org>
9753
9754 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9755 call method save instead of regcache_cpy.
9756 * regcache.h (struct regcache): Make regcache_dup a friend.
9757
9758 2017-04-28 Yao Qi <yao.qi@linaro.org>
9759
9760 * regcache.c (struct regcache): Move to regcache.h
9761 (regcache::arch): New method.
9762 (regcache_get_ptid): Update.
9763 (get_regcache_arch): Call arch method.
9764 (get_regcache_aspace): Call method aspace.
9765 (register_buffer): Change it to method.
9766 (regcache_save): Change it to regcache::save.
9767 (regcache_restore): Likewise.
9768 (regcache_cpy_no_passthrough): Remove the declaration.
9769 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9770 (regcache_cpy_no_passthrough): Change it to method
9771 cpy_no_passthrough.
9772 (regcache_register_status): Change it to method
9773 get_register_status.
9774 (regcache_invalidate): Change it to method invalidate.
9775 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9776 (regcache_raw_update): Change it to method raw_update.
9777 (regcache_raw_read): Likewise.
9778 (regcache_raw_read_signed): Likewise.
9779 (regcache_raw_read_unsigned): Likewise.
9780 (regcache_raw_write_signed): Likewise.
9781 (regcache_raw_write_unsigned): Likewise.
9782 (regcache_cooked_read): Likewise.
9783 (regcache_cooked_read_value): Likewise.
9784 (regcache_cooked_read_signed): Likewise.
9785 (regcache_cooked_read_unsigned): Likewise.
9786 (regcache_cooked_write_signed): Likewise.
9787 (regcache_cooked_write_unsigned): Likewise.
9788 (regcache_raw_set_cached_value): Likewise.
9789 (regcache_raw_write): Likewise.
9790 (regcache_cooked_write): Likewise.
9791 (regcache_xfer_part): Likewise.
9792 (regcache_raw_read_part): Likewise.
9793 (regcache_raw_write_part): Likewise.
9794 (regcache_cooked_read_part): Likewise.
9795 (regcache_cooked_write_part): Likewise.
9796 (regcache_raw_supply): Likewise.
9797 (regcache_raw_collect): Likewise.
9798 (regcache_transfer_regset): Likewise.
9799 (regcache_supply_regset): Likewise.
9800 (regcache_collect_regset): Likewise.
9801 (regcache_debug_print_register): Likewise.
9802 (enum regcache_dump_what): Move it to regcache.h.
9803 (regcache_dump): Change it to method dump.
9804 * regcache.h (enum regcache_dump_what): New.
9805 (class regcache): New.
9806 * target.c (target_fetch_registers): Call method
9807 debug_print_register.
9808 (target_store_registers): Likewise.
9809
9810 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9811
9812 * windows-nat.c (struct lm_info_windows): Initialize field.
9813 (windows_make_so): Allocate lm_info_windows with new.
9814 (windows_free_so): Free lm_info_windows with delete.
9815
9816 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9817
9818 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9819 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9820 cleanup.
9821 (darwin_free_so): Free lm_info_darwin with delete.
9822
9823 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9824
9825 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9826 <l_addr_p>: Change type to bool.
9827 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9828 (svr4_free_so): Free lm_info_svr4 with delete.
9829 (svr4_copy_library_list): Replace memcpy with call to copy
9830 constructor.
9831 (library_list_start_library, svr4_default_sos): Allocate
9832 lm_info_svr4 with new.
9833
9834 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9835
9836 * solib-target.c (struct lm_info_target): Add destructor,
9837 initialize fields.
9838 <name>: Change type to std::string.
9839 (library_list_start_library): Allocate lm_info_target with new.
9840 (solib_target_free_library_list): Free lm_info_target with
9841 delete.
9842 (solib_target_current_sos): Adapt to std::string.
9843 (solib_target_free_so): Free lm_info_target with delete.
9844
9845 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9846
9847 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9848 fields.
9849 (frv_current_sos): Allocate lm_info_frv with new.
9850 (frv_relocate_main_executable): Free lm_info_frv with delete,
9851 allocate with new.
9852 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9853
9854 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9855
9856 * solib-frv.c (struct lm_info_frv): Fix indentation.
9857
9858 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9859
9860 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9861 map field.
9862 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9863 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9864 and allocate with new.
9865 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9866
9867 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9868
9869 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9870 <filename, member_name>: Change type to std::string.
9871 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9872 (library_list_start_library): Allocate lm_info_aix with new.
9873 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9874 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9875 with copy constructor.
9876
9877 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9878
9879 * solist.h (struct lm_info): Remove.
9880 (struct lm_info_base): New class.
9881 (struct so_list) <lm_info>: Change type to lm_info_base *.
9882 * nto-tdep.c (struct lm_info): Remove.
9883 (lm_addr): Adjust.
9884 * solib-aix.c (struct lm_info): Rename to ...
9885 (struct lm_info_aix): ... this. Extend lm_info_base.
9886 (lm_info_p): Rename to ...
9887 (lm_info_aix_p): ... this, and adjust.
9888 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9889 solib_aix_parse_libraries, library_list_start_library,
9890 solib_aix_free_library_list, solib_aix_parse_libraries,
9891 solib_aix_get_library_list,
9892 solib_aix_relocate_section_addresses, solib_aix_free_so,
9893 solib_aix_get_section_offsets,
9894 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9895 Adjust.
9896 (struct solib_aix_inferior_data) <library_list>: Adjust.
9897 * solib-darwin.c (struct lm_info): Rename to ...
9898 (struct lm_info_darwin): ... this. Extend lm_info_base.
9899 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9900 * solib-dsbt.c (struct lm_info): Rename to ...
9901 (struct lm_info_dsbt): ... this. Extend lm_info_base.
9902 (struct dsbt_info) <main_executable_lm_info): Adjust.
9903 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9904 dsbt_relocate_section_addresses): Adjust.
9905 * solib-frv.c (struct lm_info): Rename to ...
9906 (struct lm_info_frv): ... this. Extend lm_info_base.
9907 (main_executable_lm_info): Adjust.
9908 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9909 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9910 find_canonical_descriptor_in_load_object,
9911 frv_fdpic_find_canonical_descriptor): Adjust.
9912 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9913 to lm_info_svr4.
9914 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9915 svr4_clear_so, svr4_copy_library_list,
9916 library_list_start_library, svr4_default_sos, svr4_read_so_list,
9917 svr4_current_sos, svr4_fetch_objfile_link_map,
9918 solist_update_incremental): Adjust.
9919 * solib-svr4.h (struct lm_info_svr4): Move here from
9920 solib-svr4.c.
9921 * solib-target.c (struct lm_info): Rename to ...
9922 (struct lm_info_target): ... this. Extend lm_info_base.
9923 (lm_info_p): Rename to ...
9924 (lm_info_target_p): ... this.
9925 (solib_target_parse_libraries, library_list_start_segment,
9926 library_list_start_section, library_list_start_library,
9927 library_list_end_library, solib_target_free_library_list,
9928 solib_target_current_sos, solib_target_free_so,
9929 solib_target_relocate_section_addresses): Adjust.
9930 * windows-nat.c (struct lm_info): Rename to ...
9931 (struct lm_info_windows): ... this. Extend lm_info_base.
9932 (windows_make_so, handle_load_dll, handle_unload_dll,
9933 windows_xfer_shared_libraries): Adjust.
9934
9935 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9936
9937 * solib-darwin.c (struct darwin_so_list): Remove.
9938 (darwin_current_sos): Allocate an so_list object instead of a
9939 darwin_so_list, separately allocate an lm_info object.
9940 (darwin_free_so): Free lm_info.
9941
9942 2017-04-28 John Baldwin <jhb@FreeBSD.org>
9943
9944 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9945 with fprintf_filtered.
9946
9947 2017-04-28 Yao Qi <yao.qi@linaro.org>
9948
9949 * regcache.c (regcache::regcache): New function.
9950 (regcache::~regcache): New function.
9951 (regcache_xmalloc_1): Remove.
9952 (regcache_xmalloc): Call new regcache.
9953 (regcache_xfree): Call delete regcache.
9954 (get_thread_arch_aspace_regcache): Call new regcache.
9955
9956 2017-04-28 Yao Qi <yao.qi@linaro.org>
9957
9958 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9959 lwp instead of ptid_get_lwp.
9960
9961 2017-04-28 Yao Qi <yao.qi@linaro.org>
9962
9963 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9964 lwp_info instead of getting from inferior_ptid.
9965
9966 2017-04-27 Keith Seitz <keiths@redhat.com>
9967
9968 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9969 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9970 (CV_CONVERSION_BADNESS): Define.
9971 (rank_one_type): Remove overly restrictive rvalue reference
9972 rank checks.
9973 Add cv-qualifier checks and subranks for type equality.
9974 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9975 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9976 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9977
9978 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
9979
9980 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9981 count when creating the object.
9982
9983 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
9984 Ulrich Weigand <uweigand@de.ibm.com>
9985
9986 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9987 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9988 is used in AIX.
9989 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9990 (process_xcoff_symbol): Likewise.
9991 (scan_xcoff_symtab): Likewise.
9992
9993 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9994
9995 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9996 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9997 (ia64_access_reg): Use get_frame_register_unsigned.
9998 (ia64_access_rse_reg): Likewise.
9999 (ia64_libunwind_frame_prev_register): Likewise.
10000
10001 2017-04-26 Jiong Wang <jiong.wang@arm.com>
10002
10003 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10004 * gdbarch.c: Regenerated.
10005 * gdbarch.h: Regenerated.
10006 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10007 visibility external.
10008 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10009 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10010 (enum cfa_how_kind): Move to ...
10011 (struct dwarf2_frame_state_reg_info): Likewise.
10012 (struct dwarf2_frame_state): Likewise.
10013 * dwarf2-frame.h: ... here.
10014 (dwarf2_frame_state_alloc_regs): New declaration.
10015 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10016 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10017
10018 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10019
10020 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10021 regcache_raw_read_unsigned.
10022 (xtensa_pseudo_register_write): Likewise.
10023
10024 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10025
10026 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10027 (nds32_pseudo_register_write): Likewise.
10028
10029 2017-04-25 Yao Qi <yao.qi@linaro.org>
10030
10031 * regcache.c (struct regcache) <readonly_p>: Change its type
10032 to bool.
10033 (regcache_xmalloc_1): Update parameter type and callers update.
10034
10035 2017-04-25 Yao Qi <yao.qi@linaro.org>
10036
10037 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10038 set_gdbarch_wchar_bit.
10039 * arm-tdep.c (arm_gdbarch_init): Likewise.
10040
10041 2017-04-25 Pedro Alves <palves@redhat.com>
10042
10043 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10044 (BothAreRelocatable, memcopy, memmove): Don't define.
10045 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10046 macros.
10047
10048 2017-04-25 Pedro Alves <palves@redhat.com>
10049
10050 * common/common-defs.h: Include "common/poison.h".
10051 * common/function-view.h: (Not, Or, Requires): Move to traits.h
10052 and adjust.
10053 * common/poison.h: New file.
10054 * common/traits.h: Include <type_traits>.
10055 (Not, Or, Requires): New, moved from common/function-view.h.
10056
10057 2017-04-25 Pedro Alves <palves@redhat.com>
10058
10059 * breakpoint.h (struct breakpoint): In-class initialize all
10060 fields. Make boolean fields "bool".
10061 * breakpoint.c (init_raw_breakpoint_without_location): Remove
10062 memset call and initializations no longer necessary.
10063
10064 2017-04-25 Pedro Alves <palves@redhat.com>
10065
10066 * btrace.c (pt_btrace_insn_flags): Change parameter type to
10067 reference.
10068 (pt_btrace_insn): New function.
10069 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10070
10071 2017-04-25 Pedro Alves <palves@redhat.com>
10072
10073 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
10074 "base" field and inherit from "bp_location" instead. Add
10075 non-default ctor.
10076 (allocate_location_exception): Use new non-default ctor.
10077 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10078 (init_bp_location): Convert to ...
10079 (bp_location::bp_location): ... this new ctor, and remove memset
10080 call.
10081 (base_breakpoint_allocate_location): Use the new non-default ctor.
10082 * breakpoint.h (bp_location): Now a class. Declare default and
10083 non-default ctors. In-class initialize all members.
10084 (init_bp_location): Remove declaration.
10085
10086 2017-04-25 Pedro Alves <palves@redhat.com>
10087
10088 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10089 assignment operator.
10090
10091 2017-04-24 Yao Qi <yao.qi@linaro.org>
10092
10093 * doublest.c (convert_doublest_to_floatformat): Call
10094 floatformat_totalsize_bytes.
10095
10096 2017-04-22 Tom Tromey <tom@tromey.com>
10097
10098 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10099 ui_out_emit_list.
10100 * stack.c (print_frame): Use ui_out_emit_list.
10101 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10102 ui_out_emit_list.
10103 * mi/mi-main.c (print_one_inferior)
10104 (mi_cmd_data_list_register_names)
10105 (mi_cmd_data_list_register_values, mi_cmd_list_features)
10106 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10107 ui_out_emit_list.
10108 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10109 (mi_output_solib_attribs): Use ui_out_emit_list,
10110 ui_out_emit_tuple.
10111 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10112 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10113 (mi_cmd_stack_list_args, list_args_or_locals): Use
10114 ui_out_emit_list.
10115 * disasm.c (do_assembly_only): Use ui_out_emit_list.
10116 * breakpoint.c (print_solib_event, output_thread_groups): Use
10117 ui_out_emit_list.
10118
10119 2017-04-22 Tom Tromey <tom@tromey.com>
10120
10121 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10122 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10123 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10124
10125 2017-04-22 Tom Tromey <tom@tromey.com>
10126
10127 * tracepoint.c (tvariables_info_1)
10128 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10129
10130 2017-04-22 Tom Tromey <tom@tromey.com>
10131
10132 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10133 annotate_arg_emitter.
10134 * breakpoint.c (print_mention_watchpoint)
10135 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10136 * annotate.h (struct annotate_arg_emitter): New.
10137
10138 2017-04-22 Tom Tromey <tom@tromey.com>
10139
10140 * record-btrace.c (record_btrace_insn_history)
10141 (record_btrace_insn_history_range, record_btrace_call_history)
10142 (record_btrace_call_history_range): Use ui_out_emit_tuple.
10143 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10144 ui_out_emit_tuple.
10145 * stack.c (print_frame_info): Use ui_out_emit_tuple.
10146 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10147 * skip.c (skip_info): Use ui_out_emit_tuple.
10148 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10149 * progspace.c (print_program_space): Use ui_out_emit_tuple.
10150 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10151 * osdata.c (info_osdata): Use ui_out_emit_tuple.
10152 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10153 ui_out_emit_tuple.
10154 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10155 (output_register, mi_cmd_data_read_memory)
10156 (mi_cmd_data_read_memory_bytes, mi_load_progress)
10157 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10158 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10159 Use ui_out_emit_tuple.
10160 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10161 ui_out_emit_tuple.
10162 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10163 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10164 * linux-thread-db.c (info_auto_load_libthread_db): Use
10165 ui_out_emit_tuple.
10166 * inferior.c (print_inferior): Use ui_out_emit_tuple.
10167 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10168 * disasm.c (do_mixed_source_and_assembly_deprecated)
10169 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10170 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10171 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10172 * breakpoint.c (print_one_breakpoint_location)
10173 (print_one_breakpoint): Use ui_out_emit_tuple.
10174 * auto-load.c (print_script, info_auto_load_cmd): Use
10175 ui_out_emit_tuple.
10176 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10177
10178 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
10179
10180 * thread.c (print_thread_info_1): Remove dead code.
10181
10182 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10183
10184 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10185 GDB_SELF_TEST.
10186 * arm-tdep.c (selftests::arm_record_test): Likewise.
10187
10188 2017-04-21 Yao Qi <yao.qi@linaro.org>
10189
10190 * regcache.c (regcache_restore): Remove argument 2. Replace
10191 argument 3 with regcache. Get register status from
10192 src->register_status and get register contents from
10193 register_buffer (src, regnum).
10194 (regcache_cpy): Update.
10195
10196 2017-04-19 Pedro Alves <palves@redhat.com>
10197
10198 * gdbthread.h (thread): Add missing closing parenthesis in
10199 comment.
10200
10201 2017-04-19 Pedro Alves <palves@redhat.com>
10202
10203 * common/refcounted-object.h: New file.
10204 * gdbthread.h: Include "common/refcounted-object.h".
10205 (thread_info): Inherit from refcounted_object and add comments.
10206 (thread_info::incref, thread_info::decref)
10207 (thread_info::m_refcount): Delete.
10208 (thread_info::deletable): Use the refcounted_object::refcount()
10209 method.
10210 * inferior.c (current_inferior_): Add comment.
10211 (set_current_inferior): Increment/decrement refcounts.
10212 (prune_inferiors, remove_inferior_command): Skip inferiors marked
10213 not-deletable instead of comparing with the current inferior.
10214 (initialize_inferiors): Increment the initial inferior's refcount.
10215 * inferior.h (struct inferior): Forward declare.
10216 Include "common/refcounted-object.h".
10217 (current_inferior, set_current_inferior): Move declaration to
10218 before struct inferior's definition, and fix comment.
10219 (inferior): Inherit from refcounted_object. Add comments.
10220 * thread.c (switch_to_thread_no_regs): Reference the thread's
10221 inferior pointer directly instead of doing a ptid lookup.
10222 (switch_to_no_thread): New function.
10223 (switch_to_thread(thread_info *)): New function, factored out
10224 from ...
10225 (switch_to_thread(ptid_t)): ... this.
10226 (restore_current_thread): Delete.
10227 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10228 fields, and add 'inf' field.
10229 (do_restore_current_thread_cleanup): Check whether old->inf is
10230 alive instead of looking up an inferior by ptid. Use
10231 switch_to_thread and switch_to_no_thread.
10232 (restore_current_thread_cleanup_dtor): Use old->inf directly
10233 instead of lookup up an inferior by id. Decref the inferior.
10234 Don't restore 'removable'.
10235 (make_cleanup_restore_current_thread): Same the inferior pointer
10236 in old, instead of the inferior number. Incref the inferior.
10237 Don't save/clear 'removable'.
10238
10239 2017-04-19 Pedro Alves <palves@redhat.com>
10240
10241 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10242 unittests/scoped_restore-selftests.c.
10243 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10244 * common/scoped_restore.h (scoped_restore_base): Make "class".
10245 (scoped_restore_base::release): New public method.
10246 (scoped_restore_base::scoped_restore_base): New protected ctor.
10247 (scoped_restore_base::m_saved_var): New protected field.
10248 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10249 scoped_restore_base base class instead of m_saved_var directly.
10250 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10251 (scoped_restore_tmpl::scoped_restore_tmpl(const
10252 scoped_restore_tmpl<T>&)): Likewise.
10253 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10254 method.
10255 (scoped_restore_tmpl::saved_var): New method.
10256 (scoped_restore_tmpl::m_saved_var): Delete.
10257 * inferior.h (inferior::detaching): Now a bool.
10258 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10259 cleanup.
10260 * unittests/scoped_restore-selftests.c: New file.
10261
10262 2017-04-19 Pedro Alves <palves@redhat.com>
10263
10264 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10265 Re-sort in alphabetic order.
10266
10267 2017-04-18 Pedro Alves <palves@redhat.com>
10268
10269 * xml-support.c (obstack_xml_printf): Delete.
10270 * xml-support.h (obstack_xml_printf): Delete.
10271
10272 2017-04-18 Pedro Alves <palves@redhat.com>
10273
10274 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10275 vdebug, verror, body_text, start_element, end_element, name,
10276 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10277 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10278 is_xinclude>: Make private and add m_ prefix.
10279 (gdb_xml_parser::body_text): New method, based on ...
10280 (gdb_xml_body_text): ... this. Adjust.
10281 (gdb_xml_parser::vdebug): New method, based on ...
10282 (gdb_xml_debug): ... this. Adjust.
10283 (gdb_xml_parser::verror): New method, based on ...
10284 (gdb_xml_error): ... this. Adjust.
10285 (gdb_xml_parser::start_element): New method, based on ...
10286 (gdb_xml_start_element): ... this. Adjust.
10287 (gdb_xml_start_element_wrapper): Defer to
10288 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10289 (gdb_xml_parser::end_element): New method, based on ...
10290 (gdb_xml_end_element_wrapper): ... this. Adjust.
10291 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10292 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10293 (gdb_xml_parser::use_dtd): New method, based on ...
10294 (gdb_xml_use_dtd): ... this. Adjust.
10295 (gdb_xml_parser::parse): New method, based on ...
10296 (gdb_xml_parse): ... this. Adjust.
10297 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10298 (xinclude_start_include): Adjust to call the parser's name method.
10299 (xml_xinclude_default, xml_xinclude_start_doctype)
10300 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10301 method.
10302 (xml_process_xincludes): Adjust to call parser methods.
10303 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10304 declarations.
10305
10306 2017-04-18 Pedro Alves <palves@redhat.com>
10307
10308 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10309 gdb::optional<std::string>.
10310 * xml-support.c: Include <string>.
10311 (scope_level::scope_level(scope_level &&))
10312 (scope_level::~scope_level): Delete.
10313 (scope_level::body): Now a std::string.
10314 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10315 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10316 parameter.
10317 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10318 (xinclude_parsing_data::output): Now a std::string reference.
10319 (xinclude_start_include): Adjust.
10320 (xml_xinclude_default): Adjust.
10321 (xml_process_xincludes): Add 'output' parameter, and return bool.
10322 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10323 and return bool.
10324 * xml-tdesc.c: Include <unordered_map> and <string>.
10325 (tdesc_xml_cache): Delete.
10326 (tdesc_xml_cache_s): Delete.
10327 (xml_cache): Now an std::unordered_map.
10328 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10329 (target_fetch_description_xml): Change return type to
10330 gdb::optional<std::string>, and adjust.
10331 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10332 (target_fetch_description_xml): Change return type to
10333 gdb::optional<std::string>.
10334
10335 2017-04-18 Pedro Alves <palves@redhat.com>
10336
10337 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10338 unittests/optional-selftests.c.
10339 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10340 * unittests/optional-selftests.c: New file.
10341 * unittests/optional/assignment/1.cc: New file.
10342 * unittests/optional/assignment/2.cc: New file.
10343 * unittests/optional/assignment/3.cc: New file.
10344 * unittests/optional/assignment/4.cc: New file.
10345 * unittests/optional/assignment/5.cc: New file.
10346 * unittests/optional/assignment/6.cc: New file.
10347 * unittests/optional/assignment/7.cc: New file.
10348 * unittests/optional/cons/copy.cc: New file.
10349 * unittests/optional/cons/default.cc: New file.
10350 * unittests/optional/cons/move.cc: New file.
10351 * unittests/optional/cons/value.cc: New file.
10352 * unittests/optional/in_place.cc: New file.
10353 * unittests/optional/observers/1.cc: New file.
10354 * unittests/optional/observers/2.cc: New file.
10355
10356 2017-04-18 Pedro Alves <palves@redhat.com>
10357
10358 * common/gdb_optional.h: Include common/traits.h.
10359 (in_place_t): New type.
10360 (in_place): New constexpr variable.
10361 (optional::optional): Remove member initialization of
10362 m_instantiated.
10363 (optional::optional(in_place_t...)): New constructor.
10364 (optional::~optional): Use reset.
10365 (optional::optional(const optional&)): New.
10366 (optional::optional(const optional&&)): New.
10367 (optional::optional(T &)): New.
10368 (optional::optional(T &&)): New.
10369 (operator::operator=(const optional &)): New.
10370 (operator::operator=(optional &&)): New.
10371 (operator::operator= (const T &))
10372 (operator::operator= (T &&))
10373 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10374 (operator::reset): New.
10375 (operator::m_instantiated):: Add in-class initializer.
10376 * common/traits.h: Include <type_traits>.
10377 (struct And): New types.
10378
10379 2017-04-18 Pedro Alves <palves@redhat.com>
10380
10381 * xml-support.c: Include <vector>.
10382 (scope_level::scope_level(const gdb_xml_element *))
10383 (scope_level::scope_level(scope_level&&)): New.
10384 (scope_level::~scope_level): New.
10385 (scope_level_s): Delete.
10386 (gdb_xml_parser::scopes): Now a std::vector.
10387 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10388 Use std::vector.
10389 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10390 scope cleanup code.
10391 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10392 of the scopes member. Use std::vector::emplace_back.
10393
10394 2017-04-18 Pedro Alves <palves@redhat.com>
10395
10396 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10397 a bool.
10398 (gdb_xml_end_element): Change type of first parameter.
10399 (gdb_xml_cleanup): Rename to ...
10400 (gdb_xml_parser::~gdb_xml_parser): ... this.
10401 (gdb_xml_create_parser_and_cleanup): Delete with ...
10402 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10403 to this new ctor.
10404 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10405 using gdb_xml_create_parser_and_cleanup.
10406 (xinclude_parsing_data): Add ctor/dtor.
10407 (xml_xinclude_cleanup): Delete.
10408 (xml_process_xincludes): Create a local xinclude_parsing_data
10409 instead of heap-allocating one. Create a local gdb_xml_parser
10410 instead of heap-allocating one with
10411 gdb_xml_create_parser_and_cleanup.
10412
10413 2017-04-18 John Baldwin <jhb@FreeBSD.org>
10414
10415 PR threads/20743
10416 * fbsd-nat.c (resume_one_thread_cb): Remove.
10417 (resume_all_threads_cb): Remove.
10418 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10419 iterate_over_threads.
10420
10421 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10422
10423 * NEWS: Create a new section for the next release branch.
10424 Rename the section of the current branch, now that it has
10425 been cut.
10426
10427 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10428
10429 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10430 * version.in: Bump version to 8.0.50.DATE-git.
10431
10432 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10433
10434 PR gdb/21385
10435 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10436 independently of the host, and fix build breakage on Cygwin.
10437
10438 2017-04-13 Pedro Alves <palves@redhat.com>
10439
10440 * inferior.c (free_inferior): Convert to ...
10441 (inferior::~inferior): ... this dtor.
10442 (inferior::inferior): New ctor, factored out from ...
10443 (add_inferior_silent): ... here. Allocate the inferior with a new
10444 expression.
10445 (delete_inferior): Call delete instead of free_inferior.
10446 * inferior.h (gdb_environ, continuation): Forward declare.
10447 (inferior): Now a class. Add in-class initialization to all
10448 members. Make boolean fields bool, except 'detaching'.
10449 (inferior::inferior): New explicit ctor.
10450 (inferior::~inferior): New.
10451
10452 2017-04-13 Pedro Alves <palves@redhat.com>
10453
10454 * inferior.c (init_inferior_list): Delete.
10455 * inferior.h (init_inferior_list): Delete.
10456
10457 2017-04-13 Pedro Alves <palves@redhat.com>
10458
10459 PR threads/13217
10460 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10461 (top level): Call it twice, with different thread sets.
10462
10463 2017-04-13 Pedro Alves <palves@redhat.com>
10464
10465 * thread.c: Include <algorithm>.
10466 (thread_array_cleanup): Delete.
10467 (scoped_inc_dec_ref): New class.
10468 (live_threads_count): New function.
10469 (set_thread_refcount): Delete.
10470 (tp_array_compar_ascending): Now a bool.
10471 (tp_array_compar): Convert to a std::sort comparison function.
10472 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10473 and live_threads_count.
10474
10475 2017-04-13 Pedro Alves <palves@redhat.com>
10476
10477 * infrun.c (follow_fork_inferior): Also switch the current
10478 inferior.
10479
10480 2017-04-13 Pedro Alves <palves@redhat.com>
10481
10482 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10483 before calling create_internal_breakpoint.
10484
10485 2017-04-13 Pedro Alves <palves@redhat.com>
10486
10487 * fork-child.c (execv_argv): New class.
10488 (breakup_args): Refactored as ...
10489 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10490 Copy arguments to storage and replace separators with NULL
10491 terminators in place.
10492 (escape_bang_in_quoted_argument): Adjust to return bool.
10493 (execv_argv::execv_argv): New ctor.
10494 (execv_argv::init_for_shell): New method, factored out from
10495 fork_inferior. Don't strdup strings into the vector.
10496 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10497 Remove free_vector_argv call.
10498
10499 2017-04-13 Yao Qi <yao.qi@linaro.org>
10500
10501 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10502 tdep->rx_psw_type.
10503
10504 2017-04-13 Yao Qi <yao.qi@linaro.org>
10505
10506 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10507 * rx-tdep.c (rx_gdbarch_init): Likewise.
10508
10509 2017-04-13 Pedro Alves <palves@redhat.com>
10510
10511 * breakpoint.h (struct breakpoint): Reindent.
10512
10513 2017-04-13 Pedro Alves <palves@redhat.com>
10514
10515 * breakpoint.c (bp_location): Rename to ...
10516 (bp_locations): ... this. All references updated.
10517 (bp_location_count): Rename to ...
10518 (bp_locations_count): ... this. All references updated.
10519 (bp_location_placed_address_before_address_max): Rename to ...
10520 (bp_locations_placed_address_before_address_max): ... this. All
10521 references updated.
10522 (bp_location_shadow_len_after_address_max): Rename to ...
10523 (bp_locations_shadow_len_after_address_max): ... this. All
10524 references updated.
10525 (bp_location_compare_addrs): Rename to ...
10526 (bp_locations_compare_addrs): ... this. All references updated.
10527 (bp_location_compare):Rename to ...
10528 (bp_locations_compare): ... this. All references updated.
10529 (bp_location_target_extensions_update): Rename to ...
10530 (bp_locations_target_extensions_update): ... this. All references
10531 updated.
10532
10533 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10534
10535 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10536 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10537 'sgtty.h'.
10538 * common/gdb_termios.h: New file, with parts of "terminal.h".
10539 * inflow.c: Include "gdb_termios.h".
10540 * ser-unix.c: Include "gdb_termios.h".
10541 * terminal.h: Move terminal-related defines to
10542 "common/gdb_termios.h".
10543
10544 2017-04-12 Tom Tromey <tom@tromey.com>
10545
10546 * probe.c (parse_probes): Update.
10547 * location.h (delete_event_location): Don't declare.
10548 (event_location_deleter::operator()): Update.
10549 * location.c (event_location_deleter::operator()): Rename from
10550 delete_event_location.
10551 * linespec.h (linespec_result) <location>: Change type to
10552 event_location_up.
10553 * linespec.c (canonicalize_linespec, event_location_to_sals)
10554 (decode_objc): Update.
10555 (linespec_result): Don't call delete_event_location.
10556 * breakpoint.c (create_breakpoints_sal)
10557 (bkpt_probe_create_sals_from_location)
10558 (strace_marker_create_sals_from_location): Update.
10559
10560 2017-04-12 Tom Tromey <tom@tromey.com>
10561
10562 * linespec.h (struct linespec_result): Add constructor and
10563 destructor.
10564 (init_linespec_result, destroy_linespec_result)
10565 (make_cleanup_destroy_linespec_result): Don't declare.
10566 * linespec.c (init_linespec_result): Remove.
10567 (linespec_result::~linespec_result): Rename from
10568 destroy_linespec_result. Update.
10569 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10570 Remove.
10571 * breakpoint.c (create_breakpoint, break_range_command)
10572 (decode_location_default): Update.
10573 * ax-gdb.c (agent_command_1): Update.
10574
10575 2017-04-12 Tom Tromey <tom@tromey.com>
10576
10577 * remote.c (remote_download_tracepoint): Update.
10578 * python/py-breakpoint.c (bppy_get_location): Update.
10579 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10580 (gdbscm_breakpoint_location): Update.
10581 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10582 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10583 Change type to event_location_up.
10584 * breakpoint.c (create_overlay_event_breakpoint)
10585 (create_longjmp_master_breakpoint)
10586 (create_std_terminate_master_breakpoint)
10587 (create_exception_master_breakpoint)
10588 (breakpoint_event_location_empty_p, print_breakpoint_location)
10589 (print_one_breakpoint_location, create_thread_event_breakpoint)
10590 (init_breakpoint_sal, create_breakpoint)
10591 (print_recreate_ranged_breakpoint, break_range_command)
10592 (init_ada_exception_breakpoint, say_where): Update.
10593 (base_breakpoint_dtor): Don't call delete_event_location.
10594 (bkpt_print_recreate, tracepoint_print_recreate)
10595 (dprintf_print_recreate, update_static_tracepoint)
10596 (breakpoint_re_set_default): Update.
10597
10598 2017-04-12 Tom Tromey <tom@tromey.com>
10599
10600 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10601 type of "to_do". Update.
10602 (compute_stack_depth): Use std::vector.
10603
10604 2017-04-12 Tom Tromey <tom@tromey.com>
10605
10606 * printcmd.c (find_instruction_backward): Use std::vector.
10607
10608 2017-04-12 Tom Tromey <tom@tromey.com>
10609
10610 * symfile.c (objfilep): Remove typedef.
10611 (reread_symbols): Use a std::vector.
10612
10613 2017-04-12 Tom Tromey <tom@tromey.com>
10614
10615 * mi/mi-main.c (exec_direction_forward): Remove.
10616 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10617 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10618 scoped_restore.
10619 * guile/guile.c (guile_repl_command, guile_command)
10620 (gdbscm_execute_gdb_command): Use scoped_restore.
10621 * go-exp.y (go_parse): Use scoped_restore.
10622 * d-exp.y (d_parse): Use scoped_restore.
10623 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10624 * c-exp.y (c_parse): Use scoped_restore.
10625
10626 2017-04-12 Tom Tromey <tom@tromey.com>
10627
10628 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10629 (mi_parse): Update return type.
10630 (mi_parse_free): Remove.
10631 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10632 (mi_parse::~mi_parse): Rename from mi_parse_free.
10633 (mi_parse_cleanup): Remove.
10634 (mi_parse): Return a unique_ptr. Use new.
10635 * mi/mi-main.c (mi_execute_command): Update.
10636
10637 2017-04-12 Tom Tromey <tom@tromey.com>
10638
10639 * location.c (explicit_location_lex_one): Return a
10640 unique_xmalloc_ptr.
10641 (string_to_explicit_location): Update. Remove cleanups.
10642
10643 2017-04-12 Tom Tromey <tom@tromey.com>
10644
10645 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10646 (compare_value_and_voffset): Change type. Update.
10647 (compute_vtable_size): Change type of "offset_vec".
10648 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10649 (gnuv3_get_typeid): Remove extraneous declaration.
10650
10651 2017-04-12 Tom Tromey <tom@tromey.com>
10652
10653 * charset.h (wchar_iterator): Fix comment.
10654
10655 2017-04-12 Tom Tromey <tom@tromey.com>
10656
10657 * charset.c (iconv_wrapper): New class.
10658 (cleanup_iconv): Remove.
10659 (convert_between_encodings): Use it.
10660
10661 2017-04-12 Tom Tromey <tom@tromey.com>
10662
10663 * symfile.h (increment_reading_symtab): Update type.
10664 * symfile.c (decrement_reading_symtab): Remove.
10665 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10666 * psymtab.c (psymtab_to_symtab): Update.
10667 * dwarf2read.c (dw2_instantiate_symtab): Update.
10668
10669 2017-04-12 Tom Tromey <tom@tromey.com>
10670
10671 * jit.c (struct jit_reader): Declare separately. Add constructor
10672 and destructor. Change type of "handle".
10673 (loaded_jit_reader): Define separately.
10674 (jit_reader_load): Update. New "new".
10675 (jit_reader_unload_command): Use "delete".
10676 * gdb-dlfcn.h (struct dlclose_deleter): New.
10677 (gdb_dlhandle_up): New typedef.
10678 (gdb_dlopen, gdb_dlsym): Update types.
10679 (gdb_dlclose): Remove.
10680 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10681 (gdb_dlsym): Change type of "handle".
10682 (make_cleanup_dlclose): Remove.
10683 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10684 * compile/compile-c-support.c (load_libcc): Update.
10685
10686 2017-04-12 Tom Tromey <tom@tromey.com>
10687
10688 * symtab.h (find_pcs_for_symtab_line): Change return type.
10689 * symtab.c (find_pcs_for_symtab_line): Change return type.
10690 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10691 type of "vec". Update.
10692 (ltpy_get_pcs_for_line): Update.
10693 * linespec.c (decode_digits_ordinary): Update.
10694
10695 2017-04-12 Tom Tromey <tom@tromey.com>
10696
10697 * tracepoint.c (actions_command): Update.
10698 * python/python.c (python_command, python_interactive_command):
10699 Update.
10700 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10701 * guile/guile.c (guile_command): Update.
10702 * defs.h (read_command_lines, read_command_lines_1): Return
10703 command_line_up.
10704 (command_lines_deleter): New struct.
10705 (command_line_up): New typedef.
10706 * compile/compile.c (compile_code_command)
10707 (compile_print_command): Update.
10708 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10709 command_line_up.
10710 (make_cleanup_free_command_lines): Remove.
10711 * cli/cli-script.c (get_command_line, read_command_lines_1)
10712 (copy_command_lines): Return command_line_up.
10713 (while_command, if_command, read_command_lines, define_command)
10714 (document_command): Update.
10715 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10716 Remove.
10717 * breakpoint.h (breakpoint_set_commands): Change type of
10718 "commands".
10719 * breakpoint.c (breakpoint_set_commands): Change type of
10720 "commands". Update.
10721 (do_map_commands_command, update_dprintf_command_list)
10722 (create_tracepoint_from_upload): Update.
10723
10724 2017-04-12 Tom Tromey <tom@tromey.com>
10725
10726 * tracepoint.c (scope_info): Update.
10727 * spu-tdep.c (spu_catch_start): Update.
10728 * python/python.c (gdbpy_decode_line): Update.
10729 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10730 * python/py-breakpoint.c (bppy_init): Update.
10731 * probe.c (parse_probes): Update.
10732 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10733 * location.h (event_location_deleter): New struct.
10734 (event_location_up): New typedef.
10735 (new_linespec_location, new_address_location, new_probe_location)
10736 (new_explicit_location, copy_event_location)
10737 (string_to_event_location, string_to_event_location_basic)
10738 (string_to_explicit_location): Update return type.
10739 (make_cleanup_delete_event_location): Remove.
10740 * location.c (new_linespec_location, new_address_location)
10741 (new_probe_location, new_explicit_location, copy_event_location):
10742 Return event_location_up.
10743 (delete_event_location_cleanup)
10744 (make_cleanup_delete_event_location): Remove.
10745 (string_to_explicit_location, string_to_event_location_basic)
10746 (string_to_event_location): Return event_location_up.
10747 * linespec.c (canonicalize_linespec, event_location_to_sals)
10748 (decode_line_with_current_source)
10749 (decode_line_with_last_displayed, decode_objc): Update.
10750 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10751 * completer.c (location_completer): Update.
10752 * cli/cli-cmds.c (edit_command, list_command): Update.
10753 * breakpoint.c (create_overlay_event_breakpoint)
10754 (create_longjmp_master_breakpoint)
10755 (create_std_terminate_master_breakpoint)
10756 (create_exception_master_breakpoint)
10757 (create_thread_event_breakpoint): Update.
10758 (init_breakpoint_sal): Update. Remove some dead code.
10759 (create_breakpoint_sal): Change type of "location". Update.
10760 (create_breakpoints_sal, create_breakpoint, break_command_1)
10761 (dprintf_command, break_range_command, until_break_command)
10762 (init_ada_exception_breakpoint)
10763 (strace_marker_create_sals_from_location)
10764 (update_static_tracepoint, trace_command, ftrace_command)
10765 (strace_command, create_tracepoint_from_upload): Update.
10766 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10767 * ax-gdb.c (agent_command_1): Update.
10768
10769 2017-04-12 Pedro Alves <palves@redhat.com>
10770
10771 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10772 * configure.tgt: Handle i[34567]86-*-go32* and
10773 i[34567]86-*-msdosdjgpp*.
10774 * i386-tdep.c (i386_svr4_reg_to_regnum):
10775 Make extern.
10776 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10777 i386-go32-tdep.c.
10778 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10779 * i386-go32-tdep.c: New file.
10780 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10781 declarations.
10782
10783 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10784
10785 * aix-thread.c (pd_status2str): Change return type to const char *.
10786
10787 2017-04-12 Pedro Alves <palves@redhat.com>
10788
10789 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10790 calls to set_gdbarch_gnu_triplet_regexp.
10791
10792 2017-04-12 Pedro Alves <palves@redhat.com>
10793
10794 PR gdb/21323
10795 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10796 New enum value.
10797 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10798 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10799 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10800 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10801 * gdbarch.h, gdbarch.c: Regenerate.
10802 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10803 gdbarch_wchar_bit and gdbarch_wchar_signed.
10804 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10805 * arm-tdep.c (arm_gdbarch_init): Likewise.
10806 * avr-tdep.c (avr_gdbarch_init): Likewise.
10807 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10808 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10809 * i386-tdep.c (i386_go32_init_abi): Likewise.
10810 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10811 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10812 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10813 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10814 * sh-tdep.c (sh_gdbarch_init): Likewise.
10815 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10816 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10817 * windows-tdep.c (windows_init_abi): Likewise.
10818 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10819
10820 2017-04-12 Pedro Alves <palves@redhat.com>
10821
10822 PR c++/21323
10823 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10824 cplus_primitive_type_char32_t>: New enum values.
10825 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10826 and cplus_primitive_type_char32_t.
10827 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10828 32, use the archtecture's built-in type for char16_t and char32_t,
10829 respectively. Otherwise, fallback to init_integer_type as before,
10830 but make the type unsigned, and issue a complaint.
10831 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10832
10833 2017-04-12 Alan Hayward <alan.hayward@arm.com>
10834
10835 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10836 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10837
10838 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10839
10840 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10841 'const char *'.
10842
10843 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10844
10845 * common/common-utils.c (free_vector_argv): New function.
10846 * common/common-utils.h: Include <vector>.
10847 (free_vector_argv): New prototype.
10848 * darwin-nat.c (darwin_create_inferior): Rewrite function
10849 prototype in order to constify "exec_file" and accept a
10850 "std::string" for "allargs".
10851 * fork-child.c: Include <vector>.
10852 (breakup_args): Rewrite function, using C++.
10853 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10854 and accept "std::string" for "allargs". Update the code to
10855 calculate "argv" based on "allargs". Update calls to "exec_fun"
10856 and "execvp".
10857 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10858 order to constify "exec_file" and accept a "std::string" for
10859 "allargs".
10860 * go32-nat.c (go32_create_inferior): Likewise.
10861 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10862 * infcmd.c (run_command_1): Constify "exec_file". Use
10863 "std::string" for inferior arguments.
10864 * inferior.h (fork_inferior): Update prototype.
10865 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10866 prototype in order to constify "exec_file" and accept a
10867 "std::string" for "allargs".
10868 * nto-procfs.c (procfs_create_inferior): Likewise.
10869 * procfs.c (procfs_create_inferior): Likewise.
10870 * remote-sim.c (gdbsim_create_inferior): Likewise.
10871 * remote.c (extended_remote_run): Update code to accept
10872 "std::string" as argument.
10873 (extended_remote_create_inferior): Rewrite function prototype in
10874 order to constify "exec_file" and accept a "std::string" for
10875 "allargs".
10876 * rs6000-nat.c (super_create_inferior): Likewise.
10877 (rs6000_create_inferior): Likewise.
10878 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10879 * windows-nat.c (windows_create_inferior): Likewise.
10880
10881 2017-04-11 Pedro Alves <palves@redhat.com>
10882
10883 * thread.c: Fix whitespace throughout.
10884
10885 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10886
10887 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10888
10889 2017-04-11 Alan Hayward <alan.hayward@arm.com>
10890
10891 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10892
10893 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10894
10895 PR gdb/21364
10896 * osdata.c (info_osdata): Check if 'type' is an empty string
10897 instead of NULL.
10898
10899 2017-04-10 Pedro Alves <palves@redhat.com>
10900
10901 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10902 (ptid_to_global_thread_id, in_thread_list)
10903 (do_captured_list_thread_ids, set_resumed, set_running)
10904 (set_executing, set_stop_requested, finish_thread_state)
10905 (validate_registers_access, can_access_registers_ptid)
10906 (print_thread_info_1, switch_to_thread)
10907 (do_restore_current_thread_cleanup)
10908 (make_cleanup_restore_current_thread, thread_command)
10909 (thread_name_command): Use operator== instead of ptid_equal.
10910
10911 2017-04-10 Pedro Alves <palves@redhat.com>
10912
10913 * thread.c (struct current_thread_cleanup) <next>: Delete field.
10914 (current_thread_cleanup_chain): Delete.
10915 (restore_current_thread_cleanup_dtor)
10916 (make_cleanup_restore_current_thread): Remove references to
10917 current_thread_cleanup_chain.
10918
10919 2017-04-10 Alan Hayward <alan.hayward@arm.com>
10920
10921 * msp430-tdep.c (msp430_pseudo_register_read): Never return
10922 REG_UNKNOWN.
10923
10924 2017-04-10 Yao Qi <yao.qi@linaro.org>
10925
10926 PR gdb/19942
10927 * gdbthread.h (thread_info::deletable): New method.
10928 (thread_info::incref): New method.
10929 (thread_info::decref): New method.
10930 (thread_info::refcount): Move it to private.
10931 * infrun.c (save_stop_context): Call inc_refcount.
10932 (release_stop_context_cleanup): Likewise.
10933 * thread.c (set_thread_exited): New function.
10934 (init_thread_list): Delete "tp" only it is deletable, otherwise
10935 call set_thread_exited.
10936 (delete_thread_1): Call set_thread_exited.
10937 (current_thread_cleanup) <inferior_pid>: Remove.
10938 <thread>: New field.
10939 (restore_current_thread_ptid_changed): Removed.
10940 (do_restore_current_thread_cleanup): Adjust.
10941 (restore_current_thread_cleanup_dtor): Don't call
10942 find_thread_ptid.
10943 (set_thread_refcount): Use dec_refcount.
10944 (make_cleanup_restore_current_thread): Adjust.
10945 (thread_apply_all_command): Call inc_refcount.
10946 (_initialize_thread): Don't call
10947 observer_attach_thread_ptid_changed.
10948
10949 2017-04-10 Yao Qi <yao.qi@linaro.org>
10950
10951 * thread.c (delete_thread_1): Hoist code on marking thread as
10952 exited.
10953
10954 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10955
10956 * windows-nat.c (windows_detach): Initialize ptid with
10957 minus_one_ptid.
10958
10959 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
10960
10961 * unittests/ptid-selftests.c: Fix erroneous assert messages.
10962
10963 2017-04-07 Alan Hayward <alan.hayward@arm.com>
10964
10965 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10966 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10967 (bfin_pseudo_register_write): Likewise
10968
10969 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
10970
10971 * common/ptid.h (struct ptid): Change to...
10972 (class ptid_t): ... this.
10973 <ptid_t>: New constructors.
10974 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10975 matches>: New methods.
10976 <make_null, make_minus_one>: New static methods.
10977 <pid>: Rename to...
10978 <m_pid>: ...this.
10979 <lwp>: Rename to...
10980 <m_lwp>: ...this.
10981 <tid>: Rename to...
10982 <m_tid>: ...this.
10983 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10984 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10985 as references, move comment to class ptid_t.
10986 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10987 ptid_t static methods.
10988 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10989 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10990 Take ptid arguments as references, implement using ptid_t methods.
10991 * unittests/ptid-selftests.c: New file.
10992 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10993 unittests/ptid-selftests.c.
10994 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10995
10996 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
10997
10998 * python/python.c (python_run_simple_file): Cast mode literal to
10999 non-const char pointer as expected by PyFile_FromString.
11000
11001 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11002
11003 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11004 minus_one_ptid and null_ptid.
11005
11006 2017-04-05 Pedro Alves <palves@redhat.com>
11007
11008 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11009 * configure: Regenerate.
11010
11011 2017-04-05 Pedro Alves <palves@redhat.com>
11012
11013 * ada-exp.y (yyerror): Constify.
11014 * ada-lang.c (bound_name, get_selections)
11015 (ada_variant_discrim_type)
11016 (ada_variant_discrim_name, ada_value_struct_elt)
11017 (ada_lookup_struct_elt_type, is_unchecked_variant)
11018 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11019 (catch_ada_exception_command_split)
11020 (catch_ada_assert_command_split, catch_assert_command)
11021 (ada_op_name): Constify.
11022 * ada-lang.h (ada_yyerror, get_selections)
11023 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11024 * arc-tdep.c (arc_print_frame_cache): Constify.
11025 * arm-tdep.c (arm_skip_stub): Constify.
11026 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11027 (gen_aggregate_elt_ref): Constify.
11028 * bcache.c (print_bcache_statistics): Constify.
11029 * bcache.h (print_bcache_statistics): Constify.
11030 * break-catch-throw.c (catch_exception_command_1):
11031 * breakpoint.c (struct ep_type_description::description):
11032 Constify.
11033 (add_solib_catchpoint): Constify.
11034 (catch_fork_command_1): Add cast.
11035 (add_catch_command): Constify.
11036 * breakpoint.h (add_catch_command, add_solib_catchpoint):
11037 Constify.
11038 * bsd-uthread.c (bsd_uthread_state): Constify.
11039 * buildsym.c (patch_subfile_names): Constify.
11040 * buildsym.h (next_symbol_text_func, patch_subfile_names):
11041 Constify.
11042 * c-exp.y (yyerror): Constify.
11043 (token::oper): Constify.
11044 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11045 * c-varobj.c (cplus_describe_child): Constify.
11046 * charset.c (find_charset_names): Add cast.
11047 (find_charset_names): Constify array and add const_cast.
11048 * cli/cli-cmds.c (complete_command, cd_command): Constify.
11049 (edit_command): Constify.
11050 * cli/cli-decode.c (lookup_cmd): Constify.
11051 * cli/cli-dump.c (dump_memory_command, dump_value_command):
11052 Constify.
11053 (struct dump_context): Constify.
11054 (add_dump_command, restore_command): Constify.
11055 * cli/cli-script.c (get_command_line): Constify.
11056 * cli/cli-script.h (get_command_line): Constify.
11057 * cli/cli-utils.c (check_for_argument): Constify.
11058 * cli/cli-utils.h (check_for_argument): Constify.
11059 * coff-pe-read.c (struct read_pe_section_data): Constify.
11060 * command.h (lookup_cmd): Constify.
11061 * common/print-utils.c (decimal2str): Constify.
11062 * completer.c (gdb_print_filename): Constify.
11063 * corefile.c (set_gnutarget): Constify.
11064 * cp-name-parser.y (yyerror): Constify.
11065 * cp-valprint.c (cp_print_class_member): Constify.
11066 * cris-tdep.c (cris_register_name, crisv32_register_name):
11067 Constify.
11068 * d-exp.y (yyerror): Constify.
11069 (struct token::oper): Constify.
11070 * d-lang.h (d_yyerror): Constify.
11071 * dbxread.c (struct header_file_location::name): Constify.
11072 (add_old_header_file, add_new_header_file, last_function_name)
11073 (dbx_next_symbol_text, add_bincl_to_list)
11074 (find_corresponding_bincl_psymtab, set_namestring)
11075 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11076 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11077 * defs.h (command_line_input, print_address_symbolic)
11078 (deprecated_readline_begin_hook): Constify.
11079 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11080 Constify.
11081 * event-top.c (handle_line_of_input): Constify and add cast.
11082 * exceptions.c (catch_errors): Constify.
11083 * exceptions.h (catch_errors): Constify.
11084 * expprint.c (print_subexp_standard, op_string, op_name)
11085 (op_name_standard, dump_raw_expression, dump_raw_expression):
11086 * expression.h (op_name, op_string, dump_raw_expression):
11087 Constify.
11088 * f-exp.y (yyerror): Constify.
11089 (struct token::oper): Constify.
11090 (struct f77_boolean_val::name): Constify.
11091 * f-lang.c (f_word_break_characters): Constify.
11092 * f-lang.h (f_yyerror): Constify.
11093 * fork-child.c (fork_inferior): Add cast.
11094 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11095 (new_variant): Constify.
11096 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11097 * gdbarch.c: Regenerate.
11098 * gdbcore.h (set_gnutarget): Constify.
11099 * go-exp.y (yyerror): Constify.
11100 (token::oper): Constify.
11101 * go-lang.h (go_yyerror): Constify.
11102 * go32-nat.c (go32_sysinfo): Constify.
11103 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11104 * guile/scm-cmd.c (cmdscm_function): Constify.
11105 * guile/scm-param.c (pascm_param_value): Constify.
11106 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11107 (h8300sx_register_name): Constify.
11108 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11109 Constify.
11110 * ia64-tdep.c (ia64_register_names): Constify.
11111 * infcmd.c (construct_inferior_arguments): Constify.
11112 (path_command, attach_post_wait): Constify.
11113 * language.c (show_range_command, show_case_command)
11114 (unk_lang_error): Constify.
11115 * language.h (language_defn::la_error)
11116 (language_defn::la_name_of_this): Constify.
11117 * linespec.c (decode_line_2): Constify.
11118 * linux-thread-db.c (thread_db_err_str): Constify.
11119 * lm32-tdep.c (lm32_register_name): Constify.
11120 * m2-exp.y (yyerror): Constify.
11121 * m2-lang.h (m2_yyerror): Constify.
11122 * m32r-tdep.c (m32r_register_names): Constify and make static.
11123 * m68hc11-tdep.c (m68hc11_register_names): Constify.
11124 * m88k-tdep.c (m88k_register_name): Constify.
11125 * macroexp.c (appendmem): Constify.
11126 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11127 (upgrade_type, parse_external, parse_partial_symbols)
11128 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11129 (new_symbol): Constify.
11130 * memattr.c (mem_info_command): Constify.
11131 * mep-tdep.c (register_name_from_keyword): Constify.
11132 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11133 Constify.
11134 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11135 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11136 * mi/mi-main.c (captured_mi_execute_command): Constify and add
11137 cast.
11138 (mi_execute_async_cli_command): Constify.
11139 * mips-tdep.c (mips_register_name): Constify.
11140 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11141 (am33_register_name, am33_2_register_name)
11142 * moxie-tdep.c (moxie_register_names): Constify.
11143 * nat/linux-osdata.c (osdata_type): Constify fields.
11144 * nto-tdep.c (nto_parse_redirection): Constify.
11145 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11146 (lookup_child_selector): Constify.
11147 (objc_methcall::name): Constify.
11148 * objc-lang.h (lookup_objc_class, lookup_child_selector)
11149 (lookup_struct_typedef): Constify.
11150 * objfiles.c (pc_in_section): Constify.
11151 * objfiles.h (pc_in_section): Constify.
11152 * p-exp.y (struct token::oper): Constify.
11153 (yyerror): Constify.
11154 * p-lang.h (pascal_yyerror): Constify.
11155 * parser-defs.h (op_name_standard): Constify.
11156 (op_print::string): Constify.
11157 (exp_descriptor::op_name): Constify.
11158 * printcmd.c (print_address_symbolic): Constify.
11159 * psymtab.c (print_partial_symbols): Constify.
11160 * python/py-breakpoint.c (stop_func): Constify.
11161 (bppy_get_expression): Constify.
11162 * python/py-cmd.c (cmdpy_completer::name): Constify.
11163 (cmdpy_function): Constify.
11164 * python/py-event.c (evpy_add_attribute)
11165 (gdbpy_initialize_event_generic): Constify.
11166 * python/py-event.h (evpy_add_attribute)
11167 (gdbpy_initialize_event_generic): Constify.
11168 * python/py-evts.c (add_new_registry): Constify.
11169 * python/py-finishbreakpoint.c (outofscope_func): Constify.
11170 * python/py-framefilter.c (get_py_iter_from_func): Constify.
11171 * python/py-inferior.c (get_buffer): Add cast.
11172 * python/py-param.c (parm_constant::name): Constify.
11173 * python/py-unwind.c (fprint_frame_id): Constify.
11174 * python/python.c (gdbpy_parameter_value): Constify.
11175 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11176 * remote.c (memory_packet_config::name): Constify.
11177 (show_packet_config_cmd, remote_write_bytes)
11178 (remote_buffer_add_string):
11179 * reverse.c (exec_reverse_once): Constify.
11180 * rs6000-tdep.c (variant::name, variant::description): Constify.
11181 * rust-exp.y (rustyyerror): Constify.
11182 * rust-lang.c (rust_op_name): Constify.
11183 * rust-lang.h (rustyyerror): Constify.
11184 * serial.h (serial_ops::name): Constify.
11185 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11186 (sh_sh3e_register_name, sh_sh2e_register_name)
11187 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11188 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11189 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11190 (sh_sh4al_dsp_register_name): Constify.
11191 * sh64-tdep.c (sh64_register_name): Constify.
11192 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11193 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11194 * stabsread.c (patch_block_stabs, read_type_number)
11195 (ref_map::stabs, ref_add, process_reference)
11196 (symbol_reference_defined, define_symbol, define_symbol)
11197 (error_type, read_type, read_member_functions, read_cpp_abbrev)
11198 (read_one_struct_field, read_struct_fields, read_baseclasses)
11199 (read_tilde_fields, read_struct_type, read_array_type)
11200 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11201 (read_huge_number, read_range_type, read_args, common_block_start)
11202 (find_name_end): Constify.
11203 * stabsread.h (common_block_start, define_symbol)
11204 (process_one_symbol, symbol_reference_defined, ref_add):
11205 * symfile.c (get_section_index, add_symbol_file_command):
11206 * symfile.h (get_section_index): Constify.
11207 * target-descriptions.c (tdesc_type::name): Constify.
11208 (tdesc_free_type): Add cast.
11209 * target.c (find_default_run_target):
11210 (add_deprecated_target_alias, find_default_run_target)
11211 (target_announce_detach): Constify.
11212 (do_option): Constify.
11213 * target.h (add_deprecated_target_alias): Constify.
11214 * thread.c (print_thread_info_1): Constify.
11215 * top.c (deprecated_readline_begin_hook, command_line_input):
11216 Constify.
11217 (init_main): Add casts.
11218 * top.h (handle_line_of_input): Constify.
11219 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11220 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11221 (tfind_command): Rename to ...
11222 (tfind_command_1): ... this and constify.
11223 (tfind_command): New function.
11224 (tfind_end_command, tfind_start_command): Adjust.
11225 (encode_source_string): Constify.
11226 * tracepoint.h (encode_source_string): Constify.
11227 * tui/tui-data.c (tui_partial_win_by_name): Constify.
11228 * tui/tui-data.h (tui_partial_win_by_name): Constify.
11229 * tui/tui-source.c (tui_set_source_content_nil): Constify.
11230 * tui/tui-source.h (tui_set_source_content_nil): Constify.
11231 * tui/tui-win.c (parse_scrolling_args): Constify.
11232 * tui/tui-windata.c (tui_erase_data_content): Constify.
11233 * tui/tui-windata.h (tui_erase_data_content): Constify.
11234 * tui/tui-winsource.c (tui_erase_source_content): Constify.
11235 * tui/tui.c (tui_enable): Add cast.
11236 * utils.c (defaulted_query): Constify.
11237 (init_page_info): Add cast.
11238 (puts_debug, subset_compare): Constify.
11239 * utils.h (subset_compare): Constify.
11240 * varobj.c (varobj_format_string): Constify.
11241 * varobj.h (varobj_format_string): Constify.
11242 * vax-tdep.c (vax_register_name): Constify.
11243 * windows-nat.c (windows_detach): Constify.
11244 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11245 * xml-support.c (gdb_xml_end_element): Constify.
11246 * xml-tdesc.c (tdesc_start_reg): Constify.
11247 * xstormy16-tdep.c (xstormy16_register_name): Constify.
11248 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11249 * xtensa-tdep.h (xtensa_register_t::name): Constify.
11250
11251 2017-04-05 Pedro Alves <palves@redhat.com>
11252
11253 * proc-api.c (struct trans): Constify.
11254 (procfs_note): Constify.
11255 * proc-events.c (struct trans, syscall_table):
11256 * proc-flags.c (struct trans): Constify.
11257 * proc-utils.h (procfs_note): Constify.
11258 * proc-why.c (struct trans): Constify.
11259 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11260 (procfs_detach): Constify.
11261 * sol-thread.c (struct string_map): Constify.
11262 (td_err_string, td_state_string): Constify.
11263
11264 2017-04-05 Pedro Alves <palves@redhat.com>
11265
11266 * proc-api.c (procfs_filename): Don't initialize
11267 procfs_filename.
11268 (prepare_to_trace): Assume procfs_filename is non-NULL.
11269 (_initialize_proc_api): Give procfs_filename a default value here.
11270
11271 2017-04-05 Pedro Alves <palves@redhat.com>
11272
11273 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11274 'cond_string' parameter.
11275 (extract_exception_regexp): Constify 'string' parameter.
11276 (catch_exception_command_1): Constify.
11277 * breakpoint.c (init_catchpoint)
11278 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11279 parameter.
11280 (ep_parse_optional_if_clause, catch_fork_command_1)
11281 (catch_exec_command_1): Constify.
11282 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11283 parameter.
11284 (ep_parse_optional_if_clause): Constify.
11285 * cli/cli-utils.c (remove_trailing_whitespace)
11286 (check_for_argument): Constify.
11287 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11288 non-const overload.
11289 (check_for_argument): Likewise.
11290
11291 2017-04-05 Pedro Alves <palves@redhat.com>
11292
11293 * event-top.c (command_line_handler): Add cast to execute_command
11294 call.
11295 * record-btrace.c (cmd_record_btrace_bts_start)
11296 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11297 (cmd_record_btrace_start): Add cast to execute_command call.
11298 * record-full.c (record_full_goto_insn):
11299 * record.c (record_start, record_stop): Add cast to
11300 execute_command_to_string calls.
11301 (cmd_record_start): Add cast to execute_command calls.
11302
11303 2017-04-05 Pedro Alves <palves@redhat.com>
11304
11305 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11306 static inline function.
11307 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11308 array and use gdb_PyArg_ParseTupleAndKeywords.
11309 * python/py-cmd.c (cmdpy_init): Likewise.
11310 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11311 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11312 (infpy_search_memory): Likewise.
11313 * python/py-objfile.c (objfpy_add_separate_debug_file)
11314 (gdbpy_lookup_objfile): Likewise.
11315 * python/py-symbol.c (gdbpy_lookup_symbol)
11316 (gdbpy_lookup_global_symbol): Likewise.
11317 * python/py-type.c (gdbpy_lookup_type): Likewise.
11318 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11319 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11320 Likewise.
11321
11322 2017-04-05 Pedro Alves <palves@redhat.com>
11323
11324 * python/python-internal.h (gdb_PyGetSetDef): New type.
11325 * python/py-block.c (block_object_getset)
11326 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11327 * python/py-event.c (event_object_getset)
11328 (finish_breakpoint_object_getset): Likewise.
11329 * python/py-inferior.c (inferior_object_getset): Likewise.
11330 * python/py-infthread.c (thread_object_getset): Likewise.
11331 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11332 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11333 * python/py-objfile.c (objfile_getset): Likewise.
11334 * python/py-progspace.c (pspace_getset): Likewise.
11335 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11336 Likewise.
11337 * python/py-record.c (recpy_record_getset): Likewise.
11338 * python/py-symbol.c (symbol_object_getset): Likewise.
11339 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11340 Likewise.
11341 * python/py-type.c (type_object_getset, field_object_getset):
11342 Likewise.
11343 * python/py-value.c (value_object_getset): Likewise.
11344
11345 2017-04-05 Pedro Alves <palves@redhat.com>
11346
11347 * python/python-internal.h (gdb_PyObject_CallMethod)
11348 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11349 New functions.
11350 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11351 (PySys_GetObject, PySys_SetPath): New macros.
11352
11353 2017-04-05 Pedro Alves <palves@redhat.com>
11354
11355 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11356 info_osdata_command.
11357 * osdata.c (info_osdata_command): Rename to ...
11358 (info_osdata): ... this. Constify 'type' parameter, and remove
11359 the 'from_tty' parameter. Accept NULL TYPE.
11360 (info_osdata_command): New function.
11361 * osdata.h (info_osdata_command): Remove declaration.
11362 (info_osdata): New declaration.
11363
11364 2017-04-05 Pedro Alves <palves@redhat.com>
11365
11366 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11367 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11368 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11369 parameter.
11370 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11371 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11372 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11373 parameter.
11374 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11375 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11376 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11377 (mi_cmd_file_list_exec_source_files)
11378 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11379 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11380 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11381 parameter.
11382 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11383 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11384 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11385 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11386 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11387 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11388 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11389 'command' parameter.
11390 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11391 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11392 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11393 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11394 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11395 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11396 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11397 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11398 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11399 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11400 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11401 parameter.
11402 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11403 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11404 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11405 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11406 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11407 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11408 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11409 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11410 (mi_cmd_data_list_changed_registers)
11411 (mi_cmd_data_write_register_values)
11412 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11413 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11414 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11415 (mi_cmd_list_features, mi_cmd_list_target_features)
11416 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11417 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11418 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11419 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11420 (mi_cmd_trace_frame_collected): Constify 'command'
11421 parameter.
11422 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11423 'command' parameter.
11424
11425 2017-04-05 Pedro Alves <palves@redhat.com>
11426
11427 * ada-lang.c (ada_completer_word_break_characters): Now a const
11428 array.
11429 (ada_get_gdb_completer_word_break_characters): Constify.
11430 * completer.c (gdb_completer_command_word_break_characters)
11431 (gdb_completer_file_name_break_characters)
11432 (gdb_completer_quote_characters): Now const arrays.
11433 (get_gdb_completer_quote_characters): Constify.
11434 (set_rl_completer_word_break_characters): New function.
11435 (set_gdb_completion_word_break_characters)
11436 (complete_line_internal): Use it.
11437 * completer.h (get_gdb_completer_quote_characters): Constify.
11438 (set_rl_completer_word_break_characters): Declare.
11439 * f-lang.c (f_word_break_characters): Constify.
11440 * language.c (default_word_break_characters): Constify.
11441 * language.h (language_defn::la_word_break_characters): Constify.
11442 (default_word_break_characters): Constify.
11443 * top.c (init_main): Use set_rl_completer_word_break_characters.
11444
11445 2017-04-05 Pedro Alves <palves@redhat.com>
11446
11447 * aix-thread.c (aix_thread_pid_to_str)
11448 (aix_thread_extra_thread_info): Constify.
11449 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11450 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11451 (bsd_uthread_pid_to_str): Constify.
11452 * corelow.c (core_pid_to_str): Constify.
11453 * darwin-nat.c (darwin_pid_to_str): Constify.
11454 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11455 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11456 Constify.
11457 * gnu-nat.c (gnu_pid_to_str): Constify.
11458 * go32-nat.c (go32_pid_to_str): Constify.
11459 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11460 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11461 * inferior.c (inferior_pid_to_str): Constify.
11462 * linux-nat.c (linux_nat_pid_to_str): Constify.
11463 * linux-tdep.c (linux_core_pid_to_str): Constify.
11464 * linux-thread-db.c (thread_db_pid_to_str)
11465 (thread_db_extra_thread_info): Constify.
11466 * nto-tdep.c (nto_extra_thread_info): Constify.
11467 * nto-tdep.h (nto_extra_thread_info): Constify.
11468 * obsd-nat.c (obsd_pid_to_str): Constify.
11469 * procfs.c (procfs_pid_to_str): Constify.
11470 * ravenscar-thread.c (ravenscar_extra_thread_info)
11471 (ravenscar_pid_to_str): Constify.
11472 * remote-sim.c (gdbsim_pid_to_str): Constify.
11473 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11474 Constify.
11475 * sol-thread.c (solaris_pid_to_str): Constify.
11476 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11477 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11478 * target.c (default_pid_to_str, target_pid_to_str)
11479 (normal_pid_to_str, default_pid_to_str): Constify.
11480 * target.h (target_ops::to_pid_to_str)
11481 (target_ops::to_extra_thread_info): Constify.
11482 (target_pid_to_str, normal_pid_to_str): Constify.
11483 * windows-nat.c (windows_pid_to_str): Constify.
11484 * gdbarch.sh (core_pid_to_str): Constify.
11485 * target-delegates.c: Regenerate.
11486 * gdbarch.h, gdbarch.c: Regenerate.
11487
11488 2017-04-05 Pedro Alves <palves@redhat.com>
11489
11490 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11491 the memory of the temporary warning_pre_print override.
11492 * utils.c (warning_pre_print): Constify.
11493 * utils.h (warning_pre_print): Constify.
11494
11495 2017-04-05 Pedro Alves <palves@redhat.com>
11496
11497 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11498 (shell_command): New function.
11499 (make_command): Use std::string.
11500 (init_cli_cmds): Register shell_command instead of shell_escape.
11501
11502 2017-04-05 Pedro Alves <palves@redhat.com>
11503
11504 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11505 * tracepoint.c (default_collect): Don't initialize.
11506
11507 2017-04-05 Pedro Alves <palves@redhat.com>
11508
11509 * macroexp.c (macro_buffer::shared): Now a bool.
11510 (init_buffer): Update.
11511 (init_shared_buffer): Constify 'addr' parameter.
11512 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11513 casts.
11514
11515 2017-04-05 Pedro Alves <palves@redhat.com>
11516
11517 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11518 * disasm.c (set_disassembler_options): Constify local.
11519 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11520
11521 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11522
11523 PR gdb/21352
11524 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11525 option.
11526
11527 2017-04-05 Yao Qi <yao.qi@linaro.org>
11528
11529 * frame.c (frame_unwind_register_unsigned): Call
11530 frame_unwind_register_value.
11531
11532 2017-04-05 Yao Qi <yao.qi@linaro.org>
11533
11534 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11535 Use gdb_test_multiple, and don't match anchor.
11536
11537 2017-04-05 Pedro Alves <palves@redhat.com>
11538
11539 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11540 (Write After Approval): Remove Simon Marchi.
11541
11542 2017-04-05 Pedro Alves <palves@redhat.com>
11543
11544 * common/gdb_optional.h (optional::optional): Make constexpr and
11545 initialize m_dummy.
11546
11547 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11548
11549 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11550 (amd64fbsd_jmp_buf_reg_offset): Remove.
11551 (amd64fbsd_supply_uthread): Remove function.
11552 (amd64fbsd_collect_uthread): Remove function.
11553 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11554 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11555 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11556 (fbsd-nat.c): Update comment.
11557 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11558 (i386fbsd_jmp_buf_reg_offset): Remove.
11559 (i386fbsd_supply_uthread): Remove function.
11560 (i386fbsd_collect_uthread): Remove function.
11561 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11562
11563 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11564
11565 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11566 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11567 * NEWS: Mention that support for FreeBSD/alpha was removed.
11568 * alpha-fbsd-tdep.c: Delete file.
11569 * config/alpha/fbsd.mh: Delete file.
11570 * configure.host: Delete alpha*-*-freebsd* and
11571 alpha*-*-kfreebsd*-gnu.
11572 * configure.tgt: Delete alpha*-*-freebsd* and
11573 alpha*-*-kfreebsd*-gnu.
11574
11575 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11576
11577 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11578 amd64bsd_store_inferior_registers): Use ptid from regcache.
11579
11580 2017-04-04 Pedro Alves <palves@redhat.com>
11581
11582 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11583 data fields, make them private and add "m_" prefixes.
11584 (lnp_state_machine::lnp_state_machine): New ctor.
11585 (record_line, check_line_address, handle_set_discriminator)
11586 (handle_set_address, handle_advance_pc, handle_special_opcode)
11587 (handle_advance_line, handle_set_file, handle_negate_stmt)
11588 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11589 (end_sequence, advance_line): New methods.
11590 (m_gdbarch, m_record_lines_p): New fields.
11591 (lnp_reader_state): Delete.
11592 (dwarf_record_line): Rename to ...
11593 (lnp_state_machine::record_line): ... adjust.
11594 (init_lnp_state_machine): Delete.
11595 (lnp_state_machine::lnp_state_machine): New.
11596 (check_line_address): Rename to ...
11597 (lnp_state_machine::check_line_address): This.
11598 (dwarf_decode_lines_1): Remove reference to "reader_state".
11599 Adjust lnp_state_machine having a non-default ctor. Use bool.
11600 State machine internal state manipulation moved to
11601 lnp_state_machine methods.
11602
11603 2017-04-04 Pedro Alves <palves@redhat.com>
11604
11605 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11606 unittests/offset-type-selftests.c.
11607 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11608 * common/offset-type.h: New file.
11609 * common/preprocessor.h: New file.
11610 * common/traits.h: New file.
11611 * common/valid-expr.h: New file.
11612 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11613 sect_offset and cu_offset strong typedefs throughout.
11614 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11615 typedefs throughout.
11616 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11617 sect_offset and cu_offset strong typedefs throughout.
11618 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11619 typedefs throughout.
11620 * gdbtypes.h: Include "common/offset-type.h".
11621 (cu_offset): Now an offset type (strong typedef) instead of a
11622 struct.
11623 (sect_offset): Likewise.
11624 (union call_site_parameter_u): Rename "param_offset" field to
11625 "param_cu_off".
11626 * unittests/offset-type-selftests.c: New file.
11627
11628 2017-04-04 Pedro Alves <palves@redhat.com>
11629
11630 * common/underlying.h: New file.
11631 * dwarf2read.c: Include "common/gdb_optional.h" and
11632 "common/underlying.h".
11633 (dir_index, file_name_index): New types.
11634 (file_entry): Use them.
11635 (file_entry::include): Use to_underlying.
11636 (line_header::add_file_name): Use dir_index.
11637 (read_formatted_entries): Use gdb::optional. Read form before
11638 writting to file_entry.
11639 (dwarf_decode_line_header): Use dir_index.
11640 (lnp_state_machine::current_file): Use to_underlying.
11641 (lnp_state_machine::file): Change type to file_name_index.
11642 (dwarf_record_line): Use to_underlying.
11643 (init_lnp_state_machine): Use file_name_index.
11644 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11645
11646 2017-04-04 Pedro Alves <palves@redhat.com>
11647
11648 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11649 operator bool, has_value and get methods.
11650
11651 2017-04-04 Pedro Alves <palves@redhat.com>
11652
11653 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11654 fields.
11655 (line_header): Initialize all data fields. Change type of
11656 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11657 Change type of include_dirs to std::vector<const char *>. Remove
11658 num_include_dirs, include_dirs_size. Change type of file_names to
11659 std::vector<file_entry>. Remove num_file_names, file_names_size.
11660 (line_header::line_header): New.
11661 (line_header::add_include_dir, line_header::add_file_name): New
11662 methods.
11663 (line_header::include_dir_at): Remove NULL check.
11664 (line_header::file_name_at): Add const overload.
11665 (line_header_up): New unique_ptr typedef.
11666 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11667 std::vector. Remove free_line_header call.
11668 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11669 free_line_header call.
11670 (free_cu_line_header): Delete.
11671 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11672 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11673 Adjust to use std::vector.
11674 (free_line_header): Delete.
11675 (free_line_header_voidp): Use delete.
11676 (add_include_dir): Replace with ...
11677 (line_header::add_include_dir): ... this method. Use std::vector.
11678 (add_file_name): Replace with ...
11679 (line_header::add_file_name): ... this method. Use std::vector.
11680 (add_include_dir_stub): Delete.
11681 (read_formatted_entries): Remove memset.
11682 (dwarf_decode_line_header): Return a line_header_up instead of a
11683 raw pointer. Remove cleanup handling. Pass lambdas to
11684 read_formatted_entries. Adjust to use line_header methods.
11685 (dwarf_decode_lines_1): Adjust to use line_header methods.
11686 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11687 use std::vector.
11688
11689 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11690
11691 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11692 instead of struct ptid.
11693
11694 2017-05-04 Alan Hayward <alan.hayward@arm.com>
11695
11696 * frame.c (get_frame_register_bytes): Unwind using value.
11697 (put_frame_register_bytes): Likewise.
11698
11699 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11700
11701 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11702 aggregate-like.
11703
11704 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11705
11706 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11707
11708 2017-03-29 Yao Qi <yao.qi@linaro.org>
11709
11710 * gdbthread.h (struct thread_info): Declare constructor and
11711 destructor. Add some in-class member initializers.
11712 * thread.c (free_thread): Remove.
11713 (init_thread_list): Call delete instead of free_thread.
11714 (new_thread): Call thread_info constructor.
11715 (thread_info::thread_info): New function.
11716 (thread_info::~thread_info): New function.
11717 (delete_thread_1): Call delete instead of free_thread.
11718 (make_cleanup_restore_current_thread): Move tp and frame to
11719 inner block.
11720
11721 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11722
11723 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11724 (arc_skip_prologue): Likewise.
11725 (arc_make_frame_cache): Likewise.
11726 (arc_pv_get_operand): New function.
11727 (arc_is_in_prologue): Likewise.
11728 (arc_analyze_prologue): Likewise.
11729 (arc_print_frame_cache): Likewise.
11730 (MAX_PROLOGUE_LENGTH): New constant.
11731
11732 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11733
11734 * configure.tgt: Add arc-insn.o.
11735 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11736 (dump_arc_instruction_command): New function.
11737 (arc_fprintf_disasm): Likewise.
11738 (arc_disassemble_info): Likewise.
11739 (arc_insn_get_operand_value): Likewise.
11740 (arc_insn_get_operand_value_signed): Likewise.
11741 (arc_insn_get_memory_base_reg): Likewise.
11742 (arc_insn_get_memory_offset): Likewise.
11743 (arc_insn_get_branch_target): Likewise.
11744 (arc_insn_dump): Likewise.
11745 (arc_insn_get_linear_next_pc): Likewise.
11746 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11747 (arc_disassemble_info): Likewise.
11748 (arc_insn_get_branch_target): Likewise.
11749 (arc_insn_get_linear_next_pc): Likewise.
11750 * NEWS: Mention new "maint print arc arc-instruction".
11751
11752 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11753
11754 * arc-tdep (maintenance_print_arc_list): New variable.
11755 (maintenance_print_arc_command): New function.
11756
11757 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11758
11759 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11760 Add "limm" and "reserved".
11761 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11762 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11763 * arc-tdep.h (arc_regnum): Likewise.
11764
11765 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11766
11767 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11768 for THREADPTR register.
11769 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11770 register.
11771 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11772 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11773 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11774
11775 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11776
11777 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11778 registers above gdbarch_num_regs (gdbarch) as privileged in
11779 call0 ABI.
11780
11781 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11782
11783 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11784 for a single specified register or for all registers in
11785 a0_base..a0_base + C0_NREGS range.
11786 (supply_gregset_reg): Call regcache_raw_supply for a single
11787 specified register or for all registers in a0_base..a0_base +
11788 C0_NREGS range.
11789
11790 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11791
11792 * arch/xtensa.h (C0_NREGS): Add definition.
11793 * xtensa-tdep.c (C0_NREGS): Remove definition.
11794
11795 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11796
11797 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11798 Drop xtensa_default_isa initialization.
11799 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11800
11801 2017-03-27 Pedro Alves <palves@redhat.com>
11802
11803 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11804 (file_entry::include_dir): New method.
11805 (line_header::include_dir_at, line_header::file_name_at): New
11806 methods.
11807 (setup_type_unit_groups, setup_type_unit_groups)
11808 (psymtab_include_file_name): Simplify using the new methods.
11809 (lnp_state_machine) <the_line_header>: New field.
11810 <file>: Add comment.
11811 (lnp_state_machine::current_file): New method.
11812 (dwarf_record_line): Simplify using the new methods.
11813 (init_lnp_state_machine): Initialize the "the_line_header" field.
11814 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11815 Simplify using the new methods.
11816
11817 2017-03-27 Pedro Alves <palves@redhat.com>
11818
11819 * cp-name-parser.y (make_empty): Delete.
11820 (demangler_special, nested_name, ptr_operator, array_indicator)
11821 (direct_declarator, declarator_1): Use fill_comp instead of
11822 make_empty.
11823
11824 2017-03-27 Pedro Alves <palves@redhat.com>
11825
11826 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11827 to ATTRIBUTE_PRINTF.
11828 * solib-target.c (library_list_start_list): Print "string" not
11829 "version".
11830 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11831 gdb_xml_error call.
11832
11833 2017-03-27 Pedro Alves <palves@redhat.com>
11834
11835 * dwarf2read.c (struct file_and_directory): New.
11836 (dwarf2_get_dwz_file): Adjust to use std::string.
11837 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11838 (find_file_and_directory): Adjust to return a file_and_directory
11839 object.
11840 (read_file_scope): Adjust to use file_and_directory. Remove
11841 make_cleanup/do_cleanups calls.
11842 (open_and_init_dwp_file): Adjust to use std::string. Remove
11843 make_cleanup/do_cleanups calls.
11844 * python/python.c (do_start_initialization): Adjust to ldirname
11845 returning a std::string.
11846 * utils.c (ldirname): Now returns a std::string.
11847 * utils.h (ldirname): Change return type to std::string.
11848 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11849 returning a std::string.
11850 * xml-tdesc.c (file_read_description_xml): Likewise.
11851
11852 2017-03-24 Alan Hayward <alan.hayward@arm.com>
11853
11854 * regcache.c (regcache_debug_print_register): New function.
11855 * regcache.h (regcache_debug_print_register): New declaration.
11856 * target.c (debug_print_register): Remove.
11857 (target_fetch_registers): Call regcache_debug_print_register.
11858 (target_store_registers): Likewise.
11859
11860 2017-03-24 Pádraig Brady <pbrady@fb.com>
11861
11862 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11863 reference beyond the 'lh->include_dirs' array before accessing to
11864 it.
11865 (psymtab_include_file_name): Likewise.
11866 (dwarf_decode_lines_1): Likewise.
11867 (dwarf_decode_lines): Likewise.
11868 (file_file_name): Likewise.
11869
11870 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11871
11872 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11873 inferior_ptid.
11874 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11875 ps_lsetfpregs): Likewise.
11876 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11877 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11878 ps_lsetfpregs): Likewise.
11879 * target.c (target_fetch_registers, target_store_registers):
11880 Remove asserts.
11881
11882 2017-03-23 Alan Hayward <alan.hayward@arm.com>
11883
11884 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11885
11886 2017-03-23 Yao Qi <yao.qi@linaro.org>
11887
11888 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11889 (_initialize_aarch64_tdep): Register it.
11890 (aarch64_record_load_store): Handle PRFM instruction.
11891 (aarch64_process_record_test): New function.
11892
11893 2017-03-23 Yao Qi <yao.qi@linaro.org>
11894
11895 * aarch64-tdep.c (aarch64_record_load_store): Fix code
11896 indentation.
11897
11898 2017-03-23 Yao Qi <yao.qi@linaro.org>
11899
11900 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11901
11902 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11903
11904 python/python.c (do_start_initialization): Fix memory leak.
11905
11906 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11907
11908 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11909 using get_ptrace_pid.
11910 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11911 inferior_ptid.
11912 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11913 inferior_ptid instead of pid.
11914
11915 2017-03-22 Yao Qi <yao.qi@linaro.org>
11916
11917 * aarch64-tdep.c: Wrap locally used classes in anonymous
11918 namespace.
11919 * arm-tdep.c: Likewise.
11920 * linespec.c: Likewise.
11921 * ui-out.c: Likewise.
11922
11923 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
11924
11925 PR gdb/19637
11926 * python/lib/gdb/printer/bound_registers.py: Import sys.
11927
11928 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11929
11930 * windows-nat.c (do_windows_fetch_inferior_registers): Add
11931 windows_thread_info parameter and use it instead of
11932 current_thread.
11933 (windows_fetch_inferior_registers): Don't set current_thread,
11934 pass the thread to do_windows_fetch_inferior_registers. Use
11935 ptid from regcache instead of inferior_ptid.
11936 (do_windows_store_inferior_registers): Add windows_thread_info
11937 parameter and use it instead of current_thread.
11938 (windows_store_inferior_registers): Don't set current_thread,
11939 pass the thread to do_windows_store_inferior_registers. Use
11940 ptid from regcache instead of inferior_ptid.
11941
11942 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11943
11944 * ser-mingw.c (ser_windows_raw): Remove reference to
11945 struct serial::current_timeout.
11946
11947 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
11948
11949 PR tdep/20928
11950 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11951 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11952 (sparc64_fsr_type): Fix %fsr decoding.
11953
11954 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
11955
11956 * python/py-record-btrace.c (btpy_insn_data): Change return type
11957 for Python 2.
11958
11959 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11960
11961 * spu-linux-nat.c (spu_fetch_inferior_registers,
11962 spu_store_inferior_registers): Use ptid from regcache, set and
11963 restore inferior_ptid.
11964 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11965 Likewise.
11966
11967 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11968
11969 * i386-linux-nat.c (fetch_register, store_register,
11970 i386_linux_fetch_inferior_registers,
11971 i386_linux_store_inferior_registers): Use ptid from regcache.
11972 * ia64-linux-nat.c (ia64_linux_fetch_register,
11973 ia64_linux_store_register): Likewise.
11974 * inf-ptrace.c (inf_ptrace_fetch_register,
11975 inf_ptrace_store_register): Likewise.
11976 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11977 m32r_linux_store_inferior_registers): Likewise.
11978 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11979 m68kbsd_store_inferior_registers): Likewise.
11980 * m68k-linux-nat.c (fetch_register, store_register,
11981 m68k_linux_fetch_inferior_registers,
11982 m68k_linux_store_inferior_registers): Likewise.
11983 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11984 m88kbsd_store_inferior_registers): Likewise.
11985 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11986 mips_fbsd_store_inferior_registers): Likewise.
11987 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11988 mips64_linux_regsets_store_registers): Likewise.
11989 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11990 mipsnbsd_store_inferior_registers): Likewise.
11991 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11992 mips64obsd_store_inferior_registers): Likewise.
11993 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11994 Likewise.
11995 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11996 ppcfbsd_store_inferior_registers): Likewise.
11997 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11998 ppc_linux_store_inferior_registers): Likewise.
11999 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12000 ppcnbsd_store_inferior_registers): Likewise.
12001 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12002 ppcobsd_store_registers): Likewise.
12003 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12004 Likewise.
12005 * ravenscar-thread.c (ravenscar_fetch_registers,
12006 ravenscar_store_registers, ravenscar_prepare_to_store):
12007 Likewise.
12008 * record-btrace.c (record_btrace_fetch_registers,
12009 record_btrace_store_registers, record_btrace_prepare_to_store):
12010 Likewise.
12011 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12012 Lookup inferior using ptid from regcache, instead of
12013 current_inferior.
12014 * remote.c (remote_fetch_registers, remote_store_registers): Use
12015 ptid from regcache.
12016 * rs6000-nat.c (fetch_register, store_register): Likewise.
12017 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12018 s390_linux_store_inferior_registers): Likewise.
12019 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12020 shnbsd_store_inferior_registers): Likewise.
12021 * sol-thread.c (sol_thread_fetch_registers,
12022 sol_thread_store_registers): Likewise.
12023 * sparc-nat.c (sparc_fetch_inferior_registers,
12024 sparc_store_inferior_registers): Likewise.
12025 * tilegx-linux-nat.c (fetch_inferior_registers,
12026 store_inferior_registers): Likewise.
12027 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12028 vaxbsd_store_inferior_registers): Likewise.
12029 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12030 store_xtregs): Likewise.
12031
12032 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12033
12034 PR gdb/14441
12035 * NEWS: Mention support for rvalue references in GDB and python.
12036 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12037 supports both lvalue and rvalue references.
12038
12039 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12040
12041 PR gdb/14441
12042 * gdbtypes.c (rank_one_type): Implement overloading
12043 resolution rules regarding rvalue references.
12044
12045 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12046
12047 PR gdb/14441
12048 * aarch64-tdep.c (aarch64_type_align)
12049 (aarch64_extract_return_value, aarch64_store_return_value): Change
12050 lvalue reference type checks to general reference type checks.
12051 * amd64-tdep.c (amd64_classify): Likewise.
12052 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12053 Likewise.
12054 * arm-tdep.c (arm_type_align, arm_extract_return_value)
12055 (arm_store_return_value): Likewise.
12056 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12057 * c-typeprint.c (c_print_type): Likewise.
12058 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12059 (cplus_number_of_children, cplus_describe_child): Likewise.
12060 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12061 * completer.c (expression_completer): Likewise.
12062 * cp-support.c (make_symbol_overload_list_adl_namespace):
12063 Likewise.
12064 * darwin-nat-info.c (info_mach_region_command): Likewise.
12065 * dwarf2loc.c (entry_data_value_coerce_ref)
12066 (value_of_dwarf_reg_entry): Likewise.
12067 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12068 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12069 Likewise.
12070 * findvar.c (extract_typed_address, store_typed_address):
12071 Likewise.
12072 * gdbtypes.c (rank_one_type): Likewise.
12073 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12074 * infcall.c (value_arg_coerce): Likewise.
12075 * language.c (pointer_type): Likewise.
12076 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12077 Likewise.
12078 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12079 * mn10300-tdep.c (mn10300_type_align): Likewise.
12080 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12081 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12082 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12083 Likewise.
12084 * printcmd.c (print_formatted, x_command): Likewise.
12085 * python/py-type.c (typy_get_composite, typy_template_argument):
12086 Likewise.
12087 * python/py-value.c (valpy_referenced_value)
12088 (valpy_get_dynamic_type, value_has_field): Likewise.
12089 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12090 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12091 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12092 * spu-tdep.c (spu_scalar_value_p): Likewise.
12093 * symtab.c (lookup_symbol_aux): Likewise.
12094 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12095 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12096 Likewise.
12097 * valops.c (value_cast_pointers, value_cast)
12098 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12099 (value_struct_elt, value_struct_elt_bitpos)
12100 (value_find_oload_method_list, find_overload_match)
12101 (value_rtti_indirect_type): Likewise.
12102 * valprint.c (val_print_scalar_type_p, generic_val_print):
12103 Likewise.
12104 * value.c (value_actual_type, value_as_address, unpack_long)
12105 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12106 (coerce_ref): Likewise.
12107 * varobj.c (varobj_get_value_type): Likewise.
12108
12109 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12110
12111 PR gdb/14441
12112 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12113 table of constants.
12114 * python/lib/gdb/command/explore.py: Support exploring values
12115 of rvalue reference types.
12116 * python/lib/gdb/types.py: Implement get_basic_type() for
12117 rvalue reference types.
12118 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12119 constant.
12120 * python/py-value.c (valpy_getitem): Add an rvalue reference
12121 check.
12122 (valpy_reference_value): Add new parameter "refcode".
12123 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12124 New wrappers for valpy_reference_value().
12125 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12126 (gdbpy_invoke_xmethod): Likewise.
12127
12128 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12129
12130 PR gdb/14441
12131 * dwarf2read.c (process_die, read_type_die_1): Handle the
12132 DW_TAG_rvalue_reference_type DIE.
12133 (read_tag_reference_type): Add new parameter "refcode".
12134
12135 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12136
12137 PR gdb/14441
12138 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12139 (c_type_print_modifier, c_type_print_varspec_suffix)
12140 (c_type_print_base): Support printing rvalue reference types.
12141 * c-valprint.c (c_val_print, c_value_print): Support printing
12142 rvalue reference values.
12143
12144 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12145
12146 PR gdb/14441
12147 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12148 typename.
12149 * cp-support.c (replace_typedefs): Handle
12150 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12151 * python/py-type.c (typy_lookup_type): Likewise.
12152
12153 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12154
12155 PR gdb/14441
12156 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12157 * parse.c (insert_type): Change assert statement.
12158 (follow_types): Handle rvalue reference types.
12159 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12160 constant.
12161
12162 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12163
12164 PR gdb/14441
12165 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12166 value_ref() interface.
12167 * c-valprint.c (c_value_print): Likewise.
12168 * infcall.c (value_arg_coerce): Likewise.
12169 * python/py-value.c (valpy_reference_value): Likewise.
12170 * valops.c (value_cast, value_reinterpret_cast)
12171 (value_dynamic_cast, typecmp): Likewise.
12172 (value_ref): Parameterize by kind of return value reference type.
12173 * value.h (value_ref): Add new parameter "refcode".
12174
12175 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12176
12177 PR gdb/14441
12178 * dwarf2read.c (read_tag_reference_type): Use
12179 lookup_lvalue_reference_type() instead of lookup_reference_type().
12180 * eval.c (evaluate_subexp_standard): Likewise.
12181 * f-exp.y: Likewise.
12182 * gdbtypes.c (make_reference_type, lookup_reference_type):
12183 Generalize with rvalue reference types.
12184 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12185 convenience wrappers for lookup_reference_type().
12186 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12187 reference kind parameter.
12188 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12189 wrappers for lookup_reference_type().
12190 * guile/scm-type.c (gdbscm_type_reference): Use
12191 lookup_lvalue_reference_type() instead of lookup_reference_type().
12192 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12193 * parse.c (follow_types): Likewise.
12194 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12195 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12196 Likewise.
12197 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12198 (gdbpy_invoke_xmethod): Likewise.
12199 * stabsread.c: Provide extra argument to make_reference_type()
12200 call.
12201 * valops.c (value_ref, value_rtti_indirect_type): Use
12202 lookup_lvalue_reference_type() instead of lookup_reference_type().
12203
12204 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12205
12206 PR gdb/14441
12207 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12208 (TYPE_IS_REFERENCE): New macro.
12209 (struct type): Add rvalue_reference_type field.
12210 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12211
12212 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12213
12214 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12215 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12216 New function definition.
12217 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12218 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12219 New function declaration.
12220 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12221 * mi/mi-interp.h: New file.
12222 * solib.c (info_sharedlibrary_command): Replace for loop with
12223 ALL_SO_LIBS macro
12224 * solib.h (update_solib_list): New function declaration.
12225 (so_list_head): Move macro.
12226 * solist.h (ALL_SO_LIBS): New macro.
12227
12228 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12229
12230 * infcmd.c (post_create_inferior): Remove unused argument in
12231 call to solib_add.
12232 * remote.c (remote_start_remote): Likewise.
12233 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12234 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12235 (enable_break): Likewise.
12236 * solib.c (update_solib_list): Remove unused target argument
12237 and its documentation.
12238 (solib_add): Remove unused target argument. Remove unused
12239 argument in call to update_solib_list.
12240 (info_sharedlibrary_command): Remove unused argument in call
12241 to update_solib_list.
12242 (sharedlibrary_command): Remove unused argument in call to
12243 solib_add.
12244 (handle_solib_event): Likewise.
12245 (reload_shared_libraries): Likewise.
12246 * solib.h (solib_add): Remove unused target argument.
12247
12248 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
12249
12250 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12251 (s390_displaced_step_fixup): Cover relative branches with the
12252 default fixup handling. This fixes lack of support for some
12253 relative branch instructions.
12254
12255 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12256
12257 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12258 ptid from regcache.
12259
12260 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12261
12262 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12263 i386_darwin_store_inferior_registers): Use ptid from regcache.
12264
12265 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12266
12267 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12268 i386bsd_store_inferior_registers): Use ptid from regcache.
12269
12270 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12271
12272 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12273 hppaobsd_store_registers): Use ptid from regcache.
12274
12275 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12276
12277 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12278 hppanbsd_store_registers): Use ptid from regcache.
12279
12280 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12281
12282 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12283 from regcache. Use get_ptrace_pid.
12284
12285 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12286
12287 * corelow.c (get_core_register_section): Use ptid from regcache,
12288 update doc.
12289
12290 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12291
12292 * bsd-uthread.c (bsd_uthread_fetch_registers,
12293 bsd_uthread_store_registers): Use ptid from regcache, set and
12294 restore inferior_ptid.
12295
12296 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12297
12298 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12299 fetch_fp_regs, store_register, store_regs, store_fp_register,
12300 store_fp_regs): Use ptid from regcache.
12301
12302 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12303
12304 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12305 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12306 store_vfp_regs): Use ptid from regcache.
12307
12308 2017-03-17 Pedro Alves <palves@redhat.com>
12309
12310 PR remote/21188
12311 * ser-base.c (ser_base_wait_for): Add comment.
12312 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12313 version.
12314 * ser-unix.c (hardwire_raw): Remove reference to
12315 scb->current_timeout.
12316 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12317 (hardwire_ops): Install ser_base_readchar instead of
12318 hardwire_readchar.
12319 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12320 Remove fields.
12321
12322 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
12323
12324 PR gdb/19637
12325 * python/lib/gdb/printer/bound_registers.py: Add support for
12326 Python 3.
12327
12328 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12329
12330 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12331 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12332 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12333 byte_offset to subobj_byte_offset. Fix the handling of
12334 DWARF_VALUE_STACK on big-endian targets when coming via an
12335 implicit pointer.
12336 (dwarf2_evaluate_loc_desc): Adjust call to
12337 dwarf2_evaluate_loc_desc_full.
12338 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12339 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12340
12341 2017-03-16 Yao Qi <yao.qi@linaro.org>
12342
12343 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12344 and REVSH instructions.
12345
12346 2017-03-16 Yao Qi <yao.qi@linaro.org>
12347
12348 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12349 (arm_record_test): Declare.
12350 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12351 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12352 align with the manual.
12353 (thumb_record_misc): Adjust the code order to align with the
12354 manual.
12355 (thumb2_record_decode_insn_handler): Fix instruction matching.
12356 (instruction_reader_thumb): New class.
12357 (arm_record_test): New function.
12358
12359 2017-03-16 Yao Qi <yao.qi@linaro.org>
12360
12361 * arm-tdep.c (abstract_memory_reader): New class.
12362 (instruction_reader): New class.
12363 (extract_arm_insn): Add argument 'reader'. Callers updated.
12364 (decode_insn): Likewise.
12365
12366 2017-03-16 Doug Evans <dje@google.com>
12367
12368 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12369 member. Change type of TYPE member to SCM. All uses updated.
12370 (lsscm_make_lazy_string_smob): Add assert.
12371 (lsscm_make_lazy_string): Flag bad length values.
12372 (lsscm_elt_type): New function.
12373 (gdbscm_lazy_string_to_value): Rewrite to use
12374 lsscm_safe_lazy_string_to_value.
12375 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12376 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12377 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12378 in incoming type.
12379 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12380 * guile/scm-type.c (tyscm_scm_to_type): New function.
12381
12382 2017-03-15 Doug Evans <dje@google.com>
12383
12384 PR python/17728, python/18439, python/18779
12385 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12386 member. Change type of TYPE member to PyObject *. All uses updated.
12387 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12388 (gdbpy_create_lazy_string_object): Flag bad length values.
12389 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12390 Handle typedefs in incoming type.
12391 (stpy_lazy_string_elt_type): New function.
12392 (gdbpy_extract_lazy_string): Call it.
12393 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12394 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12395 typedefs in incoming type.
12396
12397 2017-03-16 Doug Evans <dje@google.com>
12398
12399 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12400 * guile/scm-type.c (tyscm_scm_to_type): New function.
12401
12402 2017-03-16 Jiong Wang <jiong.wang@arm.com>
12403
12404 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12405 "ULONGEST" for "skip".
12406
12407 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12408
12409 PR gdb/21220
12410 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12411 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12412 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12413 over ptrace peek/poke until end of buffer or error.
12414
12415 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12416
12417 * parse.c (length_of_subexp): Make static.
12418 * parser-defs.h (length_of_subexp): Remove.
12419
12420 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12421
12422 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12423 as well.
12424
12425 2017-03-14 Pedro Alves <palves@redhat.com>
12426
12427 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12428 (main): Use std::unique_ptr. Remove calls to
12429 cp_demangled_name_parse_free.
12430
12431 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12432
12433 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12434 alphabsd_store_inferior_registers): Use regcache->ptid instead
12435 of inferior_ptid.
12436
12437 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12438
12439 * aix-thread.c (aix_thread_fetch_registers,
12440 aix_thread_store_registers): Use regcache->ptid instead of
12441 inferior_ptid.
12442
12443 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12444
12445 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12446 store_gregs_to_thread, fetch_fpregs_from_thread,
12447 store_fpregs_to_thread): Use regcache->ptid instead of
12448 inferior_ptid.
12449
12450 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12451
12452 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12453 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12454 instead of inferior_ptid.
12455
12456 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12457
12458 * target.c (target_fetch_registers, target_store_registers): Add
12459 assert.
12460
12461 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12462
12463 * regcache.h (regcache_get_ptid): New function.
12464 * regcache.c (regcache_get_ptid): New function.
12465
12466 2017-03-13 Mark Wielaard <mark@klomp.org>
12467
12468 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12469
12470 2017-03-10 Keith Seitz <keiths@redhat.com>
12471
12472 PR c++/8218
12473 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12474
12475 2017-03-08 Pedro Alves <palves@redhat.com>
12476
12477 PR gdb/18360
12478 * infrun.c (start_step_over, do_target_resume, resume)
12479 (restart_threads): Assert we're not resuming a thread that is
12480 meant to be stopped.
12481 (infrun_thread_stop_requested_callback): Delete.
12482 (infrun_thread_stop_requested): If the thread is internally
12483 stopped, queue a pending stop event and clear the thread's
12484 inline-frame state.
12485 (handle_stop_requested): New function.
12486 (handle_syscall_event, handle_inferior_event_1): Use
12487 handle_stop_requested.
12488 (handle_stop_requested): New function.
12489 (handle_signal_stop): Set the thread's stop_signal here instead of
12490 at caller.
12491 (finish_step_over): Clear step over info unconditionally.
12492 (handle_signal_stop): If the user had interrupted the event
12493 thread, consider the stop a random signal.
12494 (handle_signal_stop) <signal arrived while stepping over
12495 breakpoint>: Don't restart threads here.
12496 (stop_waiting): Don't clear step-over info here.
12497
12498 2017-03-08 Pedro Alves <palves@redhat.com>
12499
12500 PR 21206
12501 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12502 goes to argument 2, not 1.
12503
12504 2017-03-08 Pedro Alves <palves@redhat.com>
12505
12506 PR cli/21218
12507 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12508 display_gdb_prompt.
12509 (command_line_input): Add comment.
12510
12511 2017-03-08 Pedro Alves <palves@redhat.com>
12512
12513 PR tui/21216
12514 * tui/tui-file.c (tui_file::write): New.
12515 * tui/tui-file.h (tui_file): Override "write".
12516 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12517 factored out from ...
12518 (tui_puts): ... here.
12519 (tui_putc): Use them.
12520 (tui_write): New function.
12521 * tui/tui-io.h (tui_write): Declare.
12522
12523 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12524
12525 * Makefile.in (SFILES): Replace "environ.c" with
12526 "common/environ.c".
12527 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12528 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12529 to...
12530 * common/environ.c: ... here.
12531 * environ.h: Moved to...
12532 * common/environ.h: ... here.
12533
12534 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12535
12536 * gdbarch.sh (pstring_ptr): New static function.
12537 (gdbarch_disassembler_options): Use it.
12538 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12539 not valid_disassembler_option->name.
12540 * gdbarch.c: Regenerate.
12541
12542 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12543
12544 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12545
12546 2017-03-07 Pedro Alves <palves@redhat.com>
12547
12548 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12549
12550 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
12551
12552 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12553 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12554 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12555 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12556
12557 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12558
12559 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12560
12561 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12562
12563 * remote.c (remote_add_target_side_commands): Use range-based
12564 for loop.
12565
12566 2017-03-03 Yao Qi <yao.qi@linaro.org>
12567
12568 PR gdb/21165
12569 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12570 value is lazy.
12571 * valprint.c (common_val_print): Likewise.
12572
12573 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12574
12575 * NEWS: Mention new set/show disassembler-options commands.
12576 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12577 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12578 (prospective_options): New static variable.
12579 (gdb_disassembler::gdb_disassembler): Initialize
12580 m_di.disassembler_options.
12581 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12582 (get_disassembler_options): New function.
12583 (set_disassembler_options): Likewise.
12584 (set_disassembler_options_sfunc): Likewise.
12585 (show_disassembler_options_sfunc): Likewise.
12586 (disassembler_options_completer): Likewise.
12587 (_initialize_disasm): Likewise.
12588 * disasm.h (get_disassembler_options): New prototype.
12589 (set_disassembler_options): Likewise.
12590 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12591 (gdbarch_verify_disassembler_options): Likewise.
12592 * gdbarch.c: Regenerate.
12593 * gdbarch.h: Likewise.
12594 * arm-tdep.c (num_disassembly_options): Delete.
12595 (set_disassembly_style): Likewise.
12596 (arm_disassembler_options): New static variable.
12597 (set_disassembly_style_sfunc): Convert short style name into long
12598 option name. Call set_disassembler_options.
12599 (show_disassembly_style_sfunc): New function.
12600 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12601 set_gdbarch_verify_disassembler_options.
12602 (_initialize_arm_tdep): Delete regnames variable and update callers.
12603 (arm_disassembler_options): Initialize.
12604 (disasm_options): New variable.
12605 (num_disassembly_options): Rename from this...
12606 (num_disassembly_styles): ...to this. Compute by scanning through
12607 disasm_options.
12608 (valid_disassembly_styles): Initialize using disasm_options.
12609 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12610 set_arm_regname_option.
12611 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12612 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12613 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12614 set_gdbarch_verify_disassembler_options.
12615 * s390-tdep.c (s390_disassembler_options): New static variable.
12616 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12617 set_gdbarch_verify_disassembler_options.
12618
12619 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12620
12621 * remote.c (remote_add_target_side_condition): Remove "struct"
12622 keyword from range-based for loop.
12623
12624 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12625
12626 * remote.c (remote_add_target_side_condition): Use range-based
12627 for loop. Update comment.
12628
12629 2017-02-27 Yao Qi <yao.qi@linaro.org>
12630
12631 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12632
12633 2017-02-26 Alan Hayward <alan.hayward@arm.com>
12634
12635 * regcache.c (regcache_raw_update): New function.
12636 (regcache_raw_read): Move code to regcache_raw_update.
12637 * regcache.h (regcache_raw_update): New declaration.
12638 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12639
12640 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12641
12642 * dwarf2read.c (create_debug_type_hash_table): Initialize
12643 header.signature and header.type_offset_in_tu.
12644
12645 2017-02-24 Pedro Alves <palves@redhat.com>
12646
12647 * symtab.c (make_file_symbol_completion_list_1): Use
12648 add_symtab_completions.
12649
12650 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12651
12652 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12653
12654 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12655
12656 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12657 I386_MAX_REGISTER_SIZE.
12658 (i386_pseudo_register_write): Likewise.
12659 (i386_process_record): Likewise.
12660 * i387-tdep.c (i387_supply_xsave): Likewise.
12661 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12662 (store_register): Likewise.
12663
12664 2017-02-23 Pedro Alves <palves@redhat.com>
12665
12666 * ada-lang.c: Include "common/function-view.h".
12667 (ada_iterate_over_symbols): Adjust to use function_view as
12668 callback type.
12669 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12670 (ada_make_symbol_completion_list): Use a lambda.
12671 (ada_exc_search_name_matches): Delete.
12672 (name_matches_regex): New.
12673 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12674 * compile/compile-c-support.c: Include "common/function-view.h".
12675 (print_one_macro): Change prototype to accept a ui_file pointer.
12676 (write_macro_definitions): Use a lambda.
12677 * dwarf2read.c: Include "common/function-view.h".
12678 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12679 (dw2_expand_symtabs_matching): Adjust to use function_view as
12680 callback type.
12681 * language.h: Include "common/function-view.h".
12682 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12683 function_view as callback type.
12684 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12685 * linespec.c: Include "common/function-view.h".
12686 (collect_info::add_symbol): New method.
12687 (struct symbol_and_data_callback, iterate_inline_only, struct
12688 symbol_matcher_data, iterate_name_matcher): Delete.
12689 (iterate_over_all_matching_symtabs): Adjust to use function_view
12690 as callback type and lambdas.
12691 (iterate_over_file_blocks): Adjust to use function_view as
12692 callback type.
12693 (decode_compound_collector): Now a class with private fields.
12694 (decode_compound_collector::release_symbols): New method.
12695 (collect_one_symbol): Rename to...
12696 (decode_compound_collector::operator()): ... this and adjust.
12697 (lookup_prefix_sym): decode_compound_collector construction bits
12698 move to decode_compound_collector ctor. Pass the
12699 decode_compound_collector object directly as callback. Remove
12700 cleanups and use decode_compound_collector::release_symbols
12701 instead.
12702 (symtab_collector): Now a class with private fields.
12703 (symtab_collector::release_symtabs): New method.
12704 (add_symtabs_to_list): Rename to...
12705 (symtab_collector::operator()): ... this and adjust.
12706 (collect_symtabs_from_filename): symtab_collector construction
12707 bits move to symtab_collector ctor. Pass the symtab_collector
12708 object directly as callback. Remove cleanups and use
12709 symtab_collector::release_symtabs instead.
12710 (collect_symbols): Delete.
12711 (add_matching_symbols_to_info): Use lambdas.
12712 * macrocmd.c (print_macro_callback): Delete.
12713 (info_macro_command): Use a lambda.
12714 (info_macros_command): Pass print_macro_definition as callable
12715 directly.
12716 (print_one_macro): Remove 'ignore' parameter.
12717 (macro_list_command): Adjust.
12718 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12719 (macro_for_each_data::user_data): Delete field.
12720 (foreach_macro): Adjust to call the function_view.
12721 (macro_for_each): Adjust to use function_view as callback type.
12722 (foreach_macro_in_scope): Adjust to call the function_view.
12723 (macro_for_each_in_scope): Adjust to use function_view as callback
12724 type.
12725 * macrotab.h: Include "common/function-view.h".
12726 (macro_callback_fn): Declare a prototype instead of a pointer.
12727 Remove "user_data" parameter.
12728 (macro_for_each, macro_for_each_in_scope): Adjust to use
12729 function_view as callback type.
12730 * psymtab.c (partial_map_expand_apply)
12731 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12732 Adjust to use function_view as callback type and to return bool.
12733 (psym_expand_symtabs_matching): Adjust to use function_view as
12734 callback types.
12735 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12736 to use function_view as callback type and to return bool.
12737 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12738 callback types.
12739 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12740 as callback types.
12741 * symfile.h: Include "common/function-view.h".
12742 (expand_symtabs_file_matcher_ftype)
12743 (expand_symtabs_symbol_matcher_ftype)
12744 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12745 return bool.
12746 (quick_symbol_functions::map_symtabs_matching_filename)
12747 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12748 function_view as callback type and return bool.
12749 (expand_symtabs_matching): Adjust to use function_view as callback
12750 type.
12751 (maintenance_expand_name_matcher)
12752 (maintenance_expand_file_matcher): Delete.
12753 (maintenance_expand_symtabs): Use lambdas.
12754 * symtab.c (iterate_over_some_symtabs): Adjust to use
12755 function_view as callback types and return bool.
12756 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12757 of a cleanup.
12758 (lookup_symtab_callback): Delete.
12759 (lookup_symtab): Use a lambda.
12760 (iterate_over_symbols): Adjust to use function_view as callback
12761 type.
12762 (struct search_symbols_data, search_symbols_file_matches)
12763 (search_symbols_name_matches): Delete.
12764 (search_symbols): Use a pair of lambdas.
12765 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12766 (symtab_expansion_callback): Delete.
12767 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12768 * symtab.h: Include "common/function-view.h".
12769 (iterate_over_some_symtabs): Adjust to use function_view as
12770 callback type and return bool.
12771 (iterate_over_symtabs): Adjust to use function_view as callback
12772 type.
12773 (symbol_found_callback_ftype): Remove 'data' parameter and return
12774 bool.
12775 (iterate_over_symbols): Adjust to use function_view as callback
12776 type.
12777
12778 2017-02-23 Pedro Alves <palves@redhat.com>
12779
12780 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12781 (%.o) <unittests/%.c>: New pattern.
12782 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12783 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12784 * common/function-view.h: New file.
12785 * unittests/function-view-selftests.c: New file.
12786 * configure: Regenerate.
12787
12788 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12789
12790 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12791 inferior_ptid.
12792 * go32-nat.c (go32_thread_alive): Likewise.
12793
12794 2017-02-23 Yao Qi <yao.qi@linaro.org>
12795
12796 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12797 delete.
12798
12799 2017-02-23 Yao Qi <yao.qi@linaro.org>
12800
12801 * varobj.c (varobj_clear_saved_item): Use delete instead of
12802 xfree.
12803 (update_dynamic_varobj_children): Likewise.
12804
12805 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12806
12807 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12808
12809 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12810
12811 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12812 m_enum_value to 0 in default constructor.
12813
12814 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12815
12816 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12817 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12818 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12819 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12820 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12821 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12822 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12823 IS_STORE_CONDITIONAL_INSN.
12824
12825 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12826
12827 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12828
12829 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12830
12831 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12832
12833 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12834
12835 * dwarf2read.c (skip_one_die, read_attribute_value)
12836 (dwarf2_const_value_attr, dump_die_shallow)
12837 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12838 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12839
12840 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12841
12842 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12843 (dwarf_parse_macro_header): Accept DWARF version 5.
12844 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12845
12846 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12847
12848 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12849 DW_AT_GNU_*.
12850 * common/common-exceptions.h (enum errors): Likewise.
12851 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12852 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12853 (dwarf_expr_context::execute_stack_op): Likewise.
12854 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12855 Likewise.
12856 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12857 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12858 (show_entry_values_debug, call_site_to_target_addr)
12859 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12860 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12861 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12862 (value_of_dwarf_block_entry, indirect_pieced_value)
12863 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12864 (disassemble_dwarf_expression): Likewise.
12865 * dwarf2read.c (process_die, inherit_abstract_dies)
12866 (read_call_site_scope): Likewise.
12867 * gdbtypes.h (struct func_type, struct call_site_parameter)
12868 (struct call_site): Likewise.
12869 * stack.c (read_frame_arg): Likewise.
12870 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12871
12872 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12873
12874 * defs.h (read_unsigned_leb128): New declaration.
12875 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12876 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12877 (dwarf2_find_location_expression): Call also
12878 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12879 * dwarf2loc.h (dwarf2_version): New declaration.
12880 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12881 rnglists.
12882 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12883 .debug_rnglists.
12884 (struct dwop_section_names): Add loclists_dwo.
12885 (dwop_section_names): Add .debug_loclists.dwo.
12886 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12887 (struct dwarf2_per_cu_data): Add dwarf_version.
12888 (struct dwo_sections): Add loclists.
12889 (struct attr_abbrev): Add implicit_const.
12890 (read_indirect_line_string): New declaration.
12891 (read_unsigned_leb128): Delete declaration.
12892 (rcuh_kind): New definition.
12893 (read_and_check_comp_unit_head): Change parameter
12894 is_debug_types_section to section_kind.
12895 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12896 (read_comp_unit_head): Change parameter abfd to section, add parameter
12897 section_kind. Handle DWARF-5.
12898 (error_check_comp_unit_head): Accept also DWARF version 5.
12899 (read_and_check_comp_unit_head): Change parameter
12900 is_debug_types_section to section_kind.
12901 (read_and_check_type_unit_head): Delete function.
12902 (read_abbrev_offset): Handle DWARF-5.
12903 (create_debug_type_hash_table): Add parameter section_kind. Process
12904 only DW_UT_type. Use signature and type_offset_in_tu from struct
12905 comp_unit_head.
12906 (create_debug_types_hash_table): Update create_debug_type_hash_table
12907 caller.
12908 (create_all_type_units): Call create_debug_type_hash_table.
12909 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12910 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12911 caller.
12912 (skip_one_die): Handle DW_FORM_implicit_const.
12913 (dwarf2_rnglists_process): New function.
12914 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12915 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12916 (read_attribute_value): Handle DW_FORM_implicit_const,
12917 DW_FORM_line_strp.
12918 (read_attribute): Handle DW_FORM_implicit_const.
12919 (read_indirect_string_at_offset_from): New function from
12920 read_indirect_string_at_offset.
12921 (read_indirect_string_at_offset): Call
12922 read_indirect_string_at_offset_from.
12923 (read_indirect_line_string_at_offset): New function.
12924 (read_indirect_string): New function comment.
12925 (read_indirect_line_string): New function.
12926 (read_unsigned_leb128): Make it global.
12927 (dwarf2_string_attr): Handle DWARF-5.
12928 (add_include_dir_stub, read_formatted_entries): New functions.
12929 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12930 Handle DWARF-5.
12931 (per_cu_header_read_in): Update read_comp_unit_head caller.
12932 (dwarf2_version): New function.
12933 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12934 rnglists.
12935 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12936 fields.
12937
12938 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12939
12940 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12941
12942 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12943
12944 * dwarf2read.c (dwarf2_ranges_process): New function from
12945 dwarf2_ranges_read.
12946 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12947 dwarf2_ranges_process.
12948
12949 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12950
12951 * dwarf2read.c (create_debug_type_hash_table): New function from
12952 create_debug_types_hash_table.
12953 (create_debug_types_hash_table): Call create_debug_type_hash_table.
12954 (create_all_type_units, open_and_init_dwo_file): Update
12955 create_debug_types_hash_table callers.
12956
12957 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12958
12959 PR gdb/16188
12960 * fork-child.c (trace_start_error): Fix thinko. va_end should
12961 refer to 'ap', not 'args'.
12962
12963 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12964 Pedro Alves <palves@redhat.com>
12965
12966 PR gdb/16188
12967 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12968 calls succeeded.
12969 * fork-child.c (trace_start_error): New function.
12970 (trace_start_error_with_name): Likewise.
12971 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12972 * inf-ptrace.c (inf_ptrace_me): Likewise.
12973 * inferior.h (trace_start_error): New prototype.
12974 (trace_start_error_with_name): Likewise.
12975
12976 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
12977
12978 PR gdb/21164
12979 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12980 NULL before using it.
12981 * symmisc.c (maintenance_print_symbols): Likewise.
12982 (maintenance_print_msymbols): Likewise.
12983
12984 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12985
12986 * NEWS: Add record Python bindings entry.
12987
12988 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12989
12990 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12991 py-record-full.o.
12992 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12993 * python/py-record-btrace.c, python/py-record-btrace.h,
12994 python/py-record-full.c, python/py-record-full.h: New file.
12995 * python/py-record.c: Add include for py-record-btrace.h and
12996 py-record-full.h.
12997 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12998 recpy_instruction_history, recpy_function_call_history, recpy_begin,
12999 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13000 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13001 New definition.
13002 (gdbpy_initialize_btrace): New export.
13003 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13004
13005 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13006
13007 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13008 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13009 * python/py-record.c: New file.
13010 * python/python-internal.h (gdbpy_start_recording,
13011 gdbpy_current_recording, gdpy_stop_recording,
13012 gdbpy_initialize_record): New export.
13013 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13014 (python_GdbMethods): Add gdbpy_start_recording,
13015 gdbpy_current_recording and gdbpy_stop_recording.
13016
13017 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13018
13019 * record-btrace.c (record_btrace_record_method): New function.
13020 (init_record_btrace_ops): Initialize to_record_method.
13021 * record-full.c (record_full_record_method): New function.
13022 (init_record_full_ops, init_record_full_core_ops): Add
13023 record_full_record_method.
13024 * record.h (enum record_method): New enum.
13025 * target-debug.h (target_debug_print_enum_record_method: New define.
13026 * target-delegates.c: Regenerate.
13027 * target.c (target_record_method): New function.
13028 * target.h: Include record.h.
13029 (struct target_ops) <to_record_method>: New field.
13030 (target_record_method): New export.
13031
13032 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13033
13034 * record.h (record_start, record_stop): New export.
13035 * record.c (record_start, record_stop): New function.
13036
13037 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13038
13039 * btrace.c (btrace_fetch): Copy function call segments pointer
13040 into a vector.
13041 (btrace_clear): Clear the vector.
13042 (btrace_find_insn_by_number): Use binary search to find the correct
13043 function call segment.
13044 * btrace.h (brace_fun_p): New typedef.
13045 (struct btrace_thread_info) <functions>: New field.
13046
13047 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13048
13049 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13050 * btrace.c (btrace_decode_error): ... here. New function.
13051 * btrace.h (btrace_decode_error): New export.
13052
13053 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13054
13055 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13056 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13057 btrace_find_insn_by_number): Remove special case for gaps.
13058 * btrace.h (btrace_insn_get_error): New export.
13059 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13060 * record-btrace.c (btrace_insn_history): Print number for gaps.
13061 (record_btrace_info, record_btrace_goto): Handle gaps.
13062
13063 2017-02-14 Tom Tromey <tom@tromey.com>
13064
13065 PR python/13598:
13066 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13067 event.
13068 * python/py-evts.c (gdbpy_initialize_py_events): Add
13069 before_prompt registry.
13070 * python/py-events.h (events_object) <before_prompt>: New field.
13071
13072 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
13073
13074 * btrace.c (ftrace_new_switch): Preserve up link and flags.
13075
13076 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
13077
13078 * symfile (_initialize_symfile): Add usage text to the load command's
13079 help text.
13080
13081 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
13082
13083 * utils.c (defaulted_query): Don't query on secondary UIs.
13084
13085 2017-02-10 Tom Tromey <tom@tromey.com>
13086
13087 * rust-lang.c (rust_get_disr_info): Remove unused variable.
13088
13089 2017-02-10 Tom Tromey <tom@tromey.com>
13090
13091 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13092 "cleanup" local.
13093 * python/py-type.c (typy_legacy_template_argument): Remove
13094 unnecessary "cleanup" local.
13095
13096 2017-02-10 Tom Tromey <tom@tromey.com>
13097
13098 * python/python.c (do_start_initialization): New function, from
13099 _initialize_python.
13100 (_initialize_python): Call do_start_initialization.
13101 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13102 goto.
13103
13104 2017-02-10 Tom Tromey <tom@tromey.com>
13105
13106 * python/py-prettyprint.c (pretty_print_one_value): Use
13107 gdbpy_ref.
13108
13109 2017-02-10 Tom Tromey <tom@tromey.com>
13110
13111 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13112 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13113 gdbpy_ref.
13114 * python/py-type.c (field_new): Use gdbpy_ref.
13115 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13116 gdbpy_ref.
13117 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13118 (py_free_pspace): Likewise.
13119 (pspace_to_pspace_object): Likewise.
13120 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13121 (py_free_objfile): Likewise.
13122 (objfile_to_objfile_object): Likewise.
13123 * python/py-inferior.c (delete_thread_object): Use
13124 gdbpy_ref.
13125 (infpy_read_memory): Likewise.
13126 (py_free_inferior): Likewise.
13127 * python/py-evtregistry.c (create_eventregistry_object): Use
13128 gdbpy_ref.
13129 * python/py-event.c (create_event_object): Use gdbpy_ref.
13130
13131 2017-02-10 Tom Tromey <tom@tromey.com>
13132
13133 * python/py-ref.h (gdbpy_ref_policy): Now a template.
13134 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13135 used.
13136 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13137 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13138 python/py-exitedevent.c, python/py-finishbreakpoint.c,
13139 python/py-framefilter.c, python/py-function.c,
13140 python/py-inferior.c, python/py-infevents.c,
13141 python/py-linetable.c, python/py-newobjfileevent.c,
13142 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13143 python/py-signalevent.c, python/py-stopevent.c,
13144 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13145 python/py-unwind.c, python/py-utils.c, python/py-value.c,
13146 python/py-varobj.c, python/py-xmethods.c, python/python.c,
13147 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13148
13149 2017-02-10 Tom Tromey <tom@tromey.com>
13150
13151 * ui-out.h (ui_out_emit_type): New class.
13152 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13153 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13154 and ui_out_emit_tuple.
13155 (enumerate_locals): Likewise.
13156 (py_mi_print_variables, py_print_locals, py_print_args): Use
13157 ui_out_emit_list.
13158 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13159 ui_out_emit_list.
13160 * common/gdb_optional.h: New file.
13161
13162 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13163
13164 * MAINTAINERS (Write After Approval): Update my e-mail address.
13165
13166 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13167
13168 PR gdb/21122
13169 * breakpoint.c (_initialize_breakpoint): Update the help description
13170 of the 'commands' command to indicate that it takes a list argument.
13171
13172 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
13173
13174 * interps.c (current_interp_set_logging): Remove "return".
13175
13176 2017-02-09 Gary Benson <gbenson@redhat.com>
13177
13178 * symtab.c (add_symtab_completions): Prevent NULL pointer
13179 dereference.
13180
13181 2017-02-08 Pedro Alves <palves@redhat.com>
13182
13183 * interps.c (interp::interp): Remove reference to quiet_p.
13184 (interp_set): Make static. Remove dead "Switching to" output
13185 code.
13186 (interp_quiet_p, interp_set_quiet): Delete.
13187 (interpreter_exec_cmd): Don't set the interpreter quiet.
13188 * interps.h (interp_quiet_p): Make static.
13189 (class interp) <quiet_p>: Remove field
13190
13191 2017-02-08 Jerome Guitton <guitton@adacore.com>
13192
13193 * cli/cli-decode.c (find_command_name_length): Make it extern.
13194 * cli/cli-decode.h (find_command_name_length): Declare.
13195 * cli/cli-script.c (command_name_equals, line_first_arg):
13196 New functions.
13197 (process_next_line): Use cli-decode to parse command names.
13198 (build_command_line): Make args a constant pointer.
13199
13200 2017-02-08 Jerome Guitton <guitton@adacore.com>
13201
13202 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13203 Remove case-insensitive search.
13204
13205 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
13206
13207 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13208 at the end of the line. Avoids an ARI warning.
13209
13210 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
13211
13212 * NEWS: Mention support for record/replay of Intel 64 rdrand and
13213 rdseed instructions.
13214 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13215
13216 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
13217
13218 PR tdep/20936
13219 Provide and use sparc32 and sparc64 target description XML files.
13220 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13221 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13222 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13223 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13224 * features/sparc/sparc32-solaris.xml: New file.
13225 * features/sparc/sparc64-solaris.xml: New file.
13226 * features/sparc/sparc32-solaris.c: Generated.
13227 * features/sparc/sparc64-solaris.c: Generated.
13228 * sparc-tdep.h: Account for differences in target descriptions.
13229 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13230 (sparc32_register_type): Use target provided registers.
13231 (validate_tdesc_registers): New function.
13232 (sparc32_gdbarch_init): Use tdesc_has_registers.
13233 Set pseudoregister functions.
13234 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13235 (sparc64_register_type): Use target provided registers.
13236 (sparc64_init_abi): Set pseudoregister functions.
13237
13238 2017-02-03 Tom Tromey <tom@tromey.com>
13239
13240 PR rust/21097:
13241 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13242 with a single member.
13243
13244 2017-02-03 Pedro Alves <palves@redhat.com>
13245
13246 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13247 (cli_interp_base::~cli_interp_base): New.
13248 (cli_interp): New struct.
13249 (as_cli_interp): Cast the interp itself to cli_interp.
13250 (cli_interpreter_pre_command_loop): Rename to ...
13251 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
13252 parameter.
13253 (cli_interpreter_init): Rename to ...
13254 (cli_interp::init): ... this. Remove 'self' parameter. Use
13255 boolean. Make extern.
13256 (cli_interpreter_resume): Rename to ...
13257 (cli_interp::resume): ... this. Remove 'data' parameter. Make
13258 extern.
13259 (cli_interpreter_suspend): Rename to ...
13260 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
13261 extern.
13262 (cli_interpreter_exec): Rename to ...
13263 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13264 extern.
13265 (cli_interpreter_supports_command_editing): Rename to ...
13266 (cli_interp_base::supports_command_editing): ... this. Remove
13267 'interp' parameter. Make extern.
13268 (cli_ui_out): Rename to ...
13269 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13270 Make extern.
13271 (cli_set_logging): Rename to ...
13272 (cli_interp_base::set_logging): ... this. Remove 'interp'
13273 parameter. Make extern.
13274 (cli_interp_procs): Delete.
13275 (cli_interp_factory): Adjust to use "new".
13276 * cli/cli-interp.h: Include "interps.h".
13277 (struct cli_interp_base): New struct.
13278 * interps.c (struct interp): Delete. Fields moved to interps.h.
13279 (interp_new): Delete.
13280 (interp::interp, interp::~interp): New.
13281 (interp_set): Use bool, and return void. Assume the interpreter
13282 has suspend, init and resume methods, and that the all return
13283 void.
13284 (set_top_level_interpreter): interp_set returns void.
13285 (interp_ui_out): Adapt.
13286 (current_interp_set_logging): Adapt.
13287 (interp_data): Delete.
13288 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13289 (interp_exec): Adapt.
13290 (top_level_interpreter_data): Delete.
13291 * interps.h (interp_init_ftype, interp_resume_ftype)
13292 (interp_suspend_ftype, interp_exec_ftype)
13293 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13294 (class interp): New.
13295 (interp_new): Delete.
13296 (interp_set): Now returns void. Use bool.
13297 (interp_data, top_level_interpreter_data): Delete.
13298 * mi/mi-common.h: Include interps.h.
13299 (class mi_interp): Inherit from interp. Define a ctor. Declare
13300 init, resume, suspect, exec, interp_ui_out, set_logging and
13301 pre_command_loop methods.
13302 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13303 (mi_interpreter_init): Rename to ...
13304 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13305 bool, return void and make extern. Adjust.
13306 (mi_interpreter_resume): ... Rename to ...
13307 (mi_interp::resume): ... this. Remove the 'data' parameter,
13308 return void and make extern. Adjust.
13309 (mi_interpreter_suspend): ... Rename to ...
13310 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13311 return void and make extern. Adjust.
13312 (mi_interpreter_exec): ... Rename to ...
13313 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13314 extern. Adjust.
13315 (mi_interpreter_pre_command_loop): ... Rename to ...
13316 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13317 parameter and make extern.
13318 (mi_on_normal_stop_1): Adjust.
13319 (mi_ui_out): Rename to ...
13320 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13321 parameter and make extern. Adjust.
13322 (mi_set_logging): Rename to ...
13323 (mi_interp::set_logging): ... this. Remove the 'interp'
13324 parameter and make extern. Adjust.
13325 (mi_interp_procs): Delete.
13326 (mi_interp_factory): Adjust to use 'new'.
13327 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13328 (mi_print_exception, mi_execute_command, mi_load_progress):
13329 Adjust.
13330 * tui/tui-interp.c (tui_interp): New class.
13331 (as_tui_interp): Return a tui_interp pointer.
13332 (tui_on_normal_stop, tui_on_signal_received)
13333 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13334 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13335 to use interp::interp_ui_out.
13336 (tui_init): Rename to ...
13337 (tui_interp::init): ... this. Remove the 'self' parameter, use
13338 bool, return void and make extern. Adjust.
13339 (tui_resume): Rename to ...
13340 (tui_interp::resume): ... this. Remove the 'data' parameter,
13341 return void and make extern. Adjust.
13342 (tui_suspend): Rename to ...
13343 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13344 return void and make extern. Adjust.
13345 (tui_ui_out): Rename to ...
13346 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13347 parameter, and make extern. Adjust.
13348 (tui_exec): Rename to ...
13349 (tui_interp::exec): ... this. Remove the 'data' parameter and
13350 make extern.
13351 (tui_interp_procs): Delete.
13352 (tui_interp_factory): Use "new".
13353
13354 2017-02-02 Tom Tromey <tom@tromey.com>
13355
13356 * rust-exp.y (ends_raw_string, space_then_number)
13357 (rust_identifier_start_p): Return bool.
13358 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13359 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13360 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13361 (rust_chartype_p): Return bool.
13362 (val_print_struct, rust_print_struct_def, rust_print_type):
13363 Update.
13364 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13365 Return bool.
13366
13367 2017-02-02 Tom Tromey <tom@tromey.com>
13368
13369 * rust-lang.c: Reindent.
13370
13371 2017-02-02 Tom Tromey <tom@tromey.com>
13372
13373 * rust-lang.h (rust_crate_for_block): Update.
13374 * rust-lang.c (rust_crate_for_block): Return std::string.
13375 (rust_get_disr_info): Use std:;string, not
13376 gdb::unique_xmalloc_ptr.
13377 * rust-exp.y (crate_name): Update.
13378
13379 2017-02-02 Pedro Alves <palves@redhat.com>
13380
13381 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13382 field out of gdb_disassembler_test and make it static.
13383
13384 2017-02-02 Pedro Alves <palves@redhat.com>
13385
13386 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13387 mi1_interp and mi_interp fields.
13388
13389 2017-02-02 Pedro Alves <palves@redhat.com>
13390
13391 * cli/cli-interp.c (struct saved_output_files, saved_output):
13392 Moved from cli/cli-logging.c.
13393 (cli_set_logging): New function.
13394 (cli_interp_procs): Install cli_set_logging.
13395 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13396 Declare.
13397 * cli/cli-logging.c (struct saved_output_files, saved_output):
13398 Moved to cli/cli-interp.c.
13399 (pop_output_files): Don't save outputs here.
13400 (make_logging_output): New function.
13401 (handle_redirections): Don't build tee nor save previous outputs
13402 here.
13403 * interps.c (current_interp_set_logging): Change prototype.
13404 Assume there's always a set_logging_proc method installed.
13405 * interps.h (interp_set_logging_ftype): Change prototype.
13406 (current_interp_set_logging): Change prototype and adjust comment.
13407 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13408 use make_logging_output.
13409 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13410 2017-02-02 Pedro Alves <palves@redhat.com>
13411
13412 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13413 from ...
13414 (set_logging_overwrite): ... here.
13415 (logging_no_redirect_file): Delete.
13416 (set_logging_redirect): Don't handle redirection on the fly.
13417 Instead warn that "logging off" / "logging on" is necessary.
13418 (pop_output_files): Delete references to logging_no_redirect_file.
13419 (show_logging_command): Always speak in terms of what will happen
13420 once logging is reenabled.
13421
13422 2017-02-02 Pedro Alves <palves@redhat.com>
13423
13424 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13425
13426 2017-02-02 Pedro Alves <palves@redhat.com>
13427
13428 * disasm.c (gdb_pretty_print_insn): Rename to ...
13429 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13430 Remove gdbarch parameter. Adapt to clear the object's buffers
13431 instead of allocating new buffers, and to print using the object's
13432 gdb_disassembler instead of calling gdb_print_insn.
13433 (dump_insns): Use gdb_pretty_print_disassembler.
13434 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13435 (gdb_pretty_print_disassembler): New class.
13436 * record-btrace.c (btrace_insn_history): Use
13437 gdb_pretty_print_disassembler.
13438
13439 2017-02-02 Pedro Alves <palves@redhat.com>
13440
13441 * ada-lang.c (type_as_string): Use string_file.
13442 * ada-valprint.c (ada_print_floating): Use string_file.
13443 * ada-varobj.c (ada_varobj_scalar_image)
13444 (ada_varobj_get_value_image): Use string_file.
13445 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13446 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13447 * breakpoint.c (update_inserted_breakpoint_locations)
13448 (insert_breakpoint_locations, reattach_breakpoints)
13449 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13450 (print_it_watchpoint): Use string_file.
13451 (save_breakpoints): Use stdio_file.
13452 * c-exp.y (oper): Use string_file.
13453 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13454 tee_file.
13455 (pop_output_files): Use delete.
13456 (handle_redirections): Use stdio_file and tee_file.
13457 * cli/cli-setshow.c (do_show_command): Use string_file.
13458 * compile/compile-c-support.c (c_compute_program): Use
13459 string_file.
13460 * compile/compile-c-symbols.c (generate_vla_size): Take a
13461 'string_file &' instead of a 'ui_file *'.
13462 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13463 of a 'ui_file *'. Use string_file.
13464 (generate_c_for_variable_locations): Take a 'string_file &'
13465 instead of a 'ui_file *'.
13466 * compile/compile-internal.h (generate_c_for_for_one_variable):
13467 Take a 'string_file &' instead of a 'ui_file *'.
13468 * compile/compile-loc2c.c (push, pushf, unary, binary)
13469 (print_label, pushf_register_address, pushf_register)
13470 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13471 'ui_file *'. Adjust.
13472 * compile/compile.c (compile_to_object): Use string_file.
13473 * compile/compile.h (compile_dwarf_expr_to_c)
13474 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13475 'ui_file *'.
13476 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13477 (replace_typedefs_qualified_name): Use string_file and
13478 obstack_copy0.
13479 * disasm.c (gdb_pretty_print_insn): Use string_file.
13480 (gdb_disassembly): Adjust reference the null_stream global.
13481 (do_ui_file_delete): Delete.
13482 (gdb_insn_length): Use null_stream.
13483 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13484 * dwarf2loc.c (dwarf2_compile_property_to_c)
13485 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13486 'string_file &' instead of a 'ui_file *'.
13487 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13488 * dwarf2read.c (do_ui_file_peek_last): Delete.
13489 (dwarf2_compute_name): Use string_file.
13490 * event-top.c (gdb_setup_readline): Use stdio_file.
13491 * gdbarch.sh (verify_gdbarch): Use string_file.
13492 * gdbtypes.c (safe_parse_type): Use null_stream.
13493 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13494 string_file.
13495 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13496 'string_file *' instead of a 'ui_file *'.
13497 (gdbscm_arch_disassemble): Use string_file.
13498 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13499 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13500 inherits from ui_file.
13501 (ioscm_file_port_delete, ioscm_file_port_rewind)
13502 (ioscm_file_port_put): Delete.
13503 (ioscm_file_port_write): Rename to ...
13504 (ioscm_file_port::write): ... this. Remove file_port_magic
13505 checks.
13506 (ioscm_file_port_new): Delete.
13507 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13508 ui_file_up.
13509 * guile/scm-type.c (tyscm_type_name): Use string_file.
13510 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13511 Use string_file.
13512 * infcmd.c (print_return_value_1): Use string_file.
13513 * infrun.c (print_target_wait_results): Use string_file.
13514 * language.c (add_language): Use string_file.
13515 * location.c (explicit_to_string_internal): Use string_file.
13516 * main.c (captured_main_1): Use null_file.
13517 * maint.c (maintenance_print_architecture): Use stdio_file.
13518 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13519 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13520 event_channel>: Change type to mi_console_file pointer.
13521 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13522 (mi_console_file_delete): Delete.
13523 (struct mi_console_file): Delete.
13524 (mi_console_file_magic): Delete.
13525 (mi_console_file_new): Delete.
13526 (mi_console_file::mi_console_file): New.
13527 (mi_console_file_delete): Delete.
13528 (mi_console_file_fputs): Delete.
13529 (mi_console_file::write): New.
13530 (mi_console_raw_packet): Delete.
13531 (mi_console_file::flush): New.
13532 (mi_console_file_flush): Delete.
13533 (mi_console_set_raw): Rename to ...
13534 (mi_console_file::set_raw): ... this.
13535 * mi/mi-console.h (class mi_console_file): New class.
13536 (mi_console_file_new, mi_console_set_raw): Delete.
13537 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13538 (mi_set_logging): Use delete and tee_file. Adjust.
13539 * mi/mi-main.c (output_register): Use string_file.
13540 (mi_cmd_data_evaluate_expression): Use string_file.
13541 (mi_cmd_data_read_memory): Use string_file.
13542 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13543 * mi/mi-out.c (mi_ui_out::main_stream): New.
13544 (mi_ui_out::rewind): Use main_stream and
13545 string_file.
13546 (mi_ui_out::put): Use main_stream and string_file.
13547 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13548 Allocate a 'string_file' instead.
13549 (mi_out_new): Don't allocate a mem_fileopen stream here.
13550 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13551 (mi_ui_out::main_stream): Declare method.
13552 * printcmd.c (eval_command): Use string_file.
13553 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13554 * python/py-arch.c (archpy_disassemble): Use string_file.
13555 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13556 * python/py-frame.c (frapy_str): Use string_file.
13557 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13558 Use string_file.
13559 * python/py-type.c (typy_str): Use string_file.
13560 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13561 * python/py-value.c (valpy_str): Use string_file.
13562 * record-btrace.c (btrace_insn_history): Use string_file.
13563 * regcache.c (regcache_print): Use stdio_file.
13564 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13565 * remote.c (escape_buffer): Use string_file.
13566 * rust-lang.c (rust_get_disr_info): Use string_file.
13567 * serial.c (serial_open_ops_1): Use stdio_file.
13568 (do_serial_close): Use delete.
13569 * stack.c (print_frame_arg): Use string_file.
13570 (print_frame_args): Remove local mem_fileopen stream, not used.
13571 (print_frame): Use string_file.
13572 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13573 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13574 Take a 'string_file *' instead of a 'ui_file *'.
13575 * top.c (new_ui): Use stdio_file and stderr_file.
13576 (free_ui): Use delete.
13577 (execute_command_to_string): Use string_file.
13578 (quit_confirm): Use string_file.
13579 * tracepoint.c (collection_list::append_exp): Use string_file.
13580 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13581 * tui/tui-file.c: Don't include "ui-file.h".
13582 (enum streamtype, struct tui_stream): Delete.
13583 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13584 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13585 (tui_file::tui_file): New method.
13586 (tui_file_fputs): Delete.
13587 (tui_file_get_strbuf): Delete.
13588 (tui_file::puts): New method.
13589 (tui_file_adjust_strbuf): Delete.
13590 (tui_file_flush): Delete.
13591 (tui_file::flush): New method.
13592 * tui/tui-file.h: Tweak intro comment.
13593 Include ui-file.h.
13594 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13595 (tui_file_adjust_strbuf): Delete declarations.
13596 (class tui_file): New class.
13597 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13598 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13599 (tui_register_format): Use string_stream.
13600 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13601 (tui_get_function_from_frame): Use string_file.
13602 * typeprint.c (type_to_string): Use string_file.
13603 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13604 (null_stream): New global.
13605 (ui_file_delete): Delete.
13606 (ui_file::ui_file): New.
13607 (null_file_isatty): Delete.
13608 (ui_file::~ui_file): New.
13609 (null_file_rewind): Delete.
13610 (ui_file::printf): New.
13611 (null_file_put): Delete.
13612 (null_file_flush): Delete.
13613 (ui_file::putstr): New.
13614 (null_file_write): Delete.
13615 (ui_file::putstrn): New.
13616 (null_file_read): Delete.
13617 (ui_file::putc): New.
13618 (null_file_fputs): Delete.
13619 (null_file_write_async_safe): Delete.
13620 (ui_file::vprintf): New.
13621 (null_file_delete): Delete.
13622 (null_file::write): New.
13623 (null_file_fseek): Delete.
13624 (null_file::puts): New.
13625 (ui_file_data): Delete.
13626 (null_file::write_async_safe): New.
13627 (gdb_flush, ui_file_isatty): Adjust.
13628 (ui_file_put, ui_file_rewind): Delete.
13629 (ui_file_write): Adjust.
13630 (ui_file_write_for_put): Delete.
13631 (ui_file_write_async_safe, ui_file_read): Adjust.
13632 (ui_file_fseek): Delete.
13633 (fputs_unfiltered): Adjust.
13634 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13635 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13636 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13637 (set_ui_file_data): Delete.
13638 (string_file::~string_file, string_file::write)
13639 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13640 (do_ui_file_as_string, ui_file_as_string): Delete.
13641 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13642 (struct mem_file): Delete.
13643 (mem_file_new): Delete.
13644 (stdio_file::stdio_file): New.
13645 (mem_file_delete): Delete.
13646 (stdio_file::stdio_file): New.
13647 (mem_fileopen): Delete.
13648 (stdio_file::~stdio_file): New.
13649 (mem_file_rewind): Delete.
13650 (stdio_file::set_stream): New.
13651 (mem_file_put): Delete.
13652 (stdio_file::open): New.
13653 (mem_file_write): Delete.
13654 (stdio_file_magic, struct stdio_file): Delete.
13655 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13656 (stdio_file::flush): New.
13657 (stdio_file_read): Rename to ...
13658 (stdio_file::read): ... this. Adjust.
13659 (stdio_file_write): Rename to ...
13660 (stdio_file::write): ... this. Adjust.
13661 (stdio_file_write_async_safe): Rename to ...
13662 (stdio_file::write_async_safe) ... this. Adjust.
13663 (stdio_file_fputs): Rename to ...
13664 (stdio_file::puts) ... this. Adjust.
13665 (stdio_file_isatty): Delete.
13666 (stdio_file_fseek): Delete.
13667 (stdio_file::isatty): New.
13668 (stderr_file_write): Rename to ...
13669 (stderr_file::write) ... this. Adjust.
13670 (stderr_file_fputs): Rename to ...
13671 (stderr_file::puts) ... this. Adjust.
13672 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13673 (stderr_file::stderr_file): New.
13674 (tee_file_magic): Delete.
13675 (struct tee_file): Delete.
13676 (tee_file::tee_file): New.
13677 (tee_file_new): Delete.
13678 (tee_file::~tee_file): New.
13679 (tee_file_delete): Delete.
13680 (tee_file_flush): Rename to ...
13681 (tee_file::flush): ... this. Adjust.
13682 (tee_file_write): Rename to ...
13683 (tee_file::write): ... this. Adjust.
13684 (tee_file::write_async_safe): New.
13685 (tee_file_fputs): Rename to ...
13686 (tee_file::puts): ... this. Adjust.
13687 (tee_file_isatty): Rename to ...
13688 (tee_file::isatty): ... this. Adjust.
13689 * ui-file.h (struct obstack, struct ui_file): Don't
13690 forward-declare.
13691 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13692 (ui_file_write_ftype)
13693 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13694 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13695 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13696 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13697 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13698 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13699 (set_ui_file_fseek): Delete.
13700 (ui_file_data, ui_file_delete, ui_file_rewind)
13701 (struct ui_file): New.
13702 (ui_file_up): New.
13703 (class null_file): New.
13704 (null_stream): Declare.
13705 (ui_file_write_for_put, ui_file_put): Delete.
13706 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13707 Delete.
13708 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13709 (gdb_fopen, tee_file_new): Delete.
13710 (struct string_file): New.
13711 (struct stdio_file): New.
13712 (stdio_file_up): New.
13713 (struct stderr_file): New.
13714 (class tee_file): New.
13715 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13716 of a 'ui_file *'. Adjust.
13717 * ui-out.h (class ui_out) <field_stream>: Likewise.
13718 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13719 (null_stream): Delete.
13720 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13721 Adjust.
13722 * utils.h (struct ui_file): Delete forward declaration..
13723 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13724 (error_stream): Take a 'string_file &' instead of a
13725 'ui_file *'.
13726 * varobj.c (varobj_value_get_print_value): Use string_file.
13727 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13728 * gdbarch.c: Regenerate.
13729
13730 2017-02-02 Pedro Alves <palves@redhat.com>
13731
13732 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13733 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13734 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13735 Adjust to call gdb_print_insn instead of
13736 gdb_disassembler::print_insn.
13737 (dump_insns, do_mixed_source_and_assembly_deprecated)
13738 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13739 'gdbarch' parameter. Remove gdb_disassembler parameter.
13740 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13741 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13742 declaration.
13743 (gdb_pretty_print_insn): Re-add declaration.
13744 * record-btrace.c (btrace_insn_history): Don't allocate a
13745 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13746
13747 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13748
13749 * disasm.h (gdb_disassembly): Remove file_string parameter.
13750 * disasm.c (gdb_disassembly): Likewise.
13751 * cli/cli-cmds.c (print_disassembly): Adapt.
13752 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13753 * stack.c (do_gdb_disassembly): Likewise.
13754
13755 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13756
13757 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13758 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13759 targets. And if the implicit value is longer than needed, extract
13760 the first bytes instead of the "least significant" ones.
13761
13762 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13763
13764 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13765 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13766 (btrace_fetch): Assert can_access_registers_ptid.
13767 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13768 validate_registers_access.
13769
13770 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13771
13772 * gdbthread.h (can_access_registers_ptid): New.
13773 * thread.c (can_access_registers_ptid): New.
13774
13775 2017-02-01 Pedro Alves <palves@redhat.com>
13776
13777 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13778
13779 2017-01-31 Pedro Alves <palves@redhat.com>
13780
13781 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13782 Fix typos.
13783
13784 2017-01-31 Pedro Alves <palves@redhat.com>
13785
13786 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13787 not used.
13788
13789 2017-01-31 Pedro Alves <palves@redhat.com>
13790
13791 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13792
13793 2017-01-31 Pedro Alves <palves@redhat.com>
13794
13795 * common/scoped_restore.h
13796 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13797 change the value's parameter type to T2.
13798 (make_scoped_restore): Likewise.
13799
13800 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13801 Richard Henderson <rth@redhat.com>
13802
13803 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13804 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13805 GS_BASE for older kernels.
13806 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13807 GS_BASE for older kernels.
13808 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13809 and GS_BASE to the offset table.
13810 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13811 system register group.
13812 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13813 for older kernels.
13814 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13815 amd64 ABI.
13816 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13817 AMD64_GSBASE_REGNUM.
13818 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13819 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13820 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13821 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13822 i386/64bit-segments.xml in those rules.
13823 * features/i386/64bit-segments.xml: New file.
13824 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13825 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13826 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13827 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13828 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13829 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13830 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13831 * features/i386/amd64-avx-linux.c: Regenerated.
13832 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13833 * features/i386/amd64-avx-mpx.c: Regenerated.
13834 * features/i386/amd64-avx512-linux.c: Regenerated.
13835 * features/i386/amd64-linux.c: Regenerated.
13836 * features/i386/amd64-mpx-linux.c: Regenerated.
13837 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13838 * features/i386/i386-avx-mpx.c: Regenerated.
13839 * features/i386/x32-avx-linux.c: Regenerated.
13840 * features/i386/x32-avx512-linux.c: Regenerated.
13841 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13842 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13843 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13844 * regformats/i386/amd64-linux.dat: Regenerated.
13845 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13846 * regformats/i386/x32-avx-linux.dat: Regenerated.
13847 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13848 * regformats/i386/x32-linux.dat: Regenerated.
13849
13850 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13851
13852 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13853 Set to AMD64_NUM_REGS.
13854
13855 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13856
13857 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13858 that checks validity of a register number.
13859
13860 2017-01-27 Kees Cook <keescook@google.com>
13861
13862 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13863 fetch_fpregs if target has fpa registers.
13864 (arm_linux_store_inferior_registers): Call store_fpregs if target
13865 has fpa registers.
13866
13867 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13868
13869 * cris-tdep.c (cris_gdbarch_init): Remove check for
13870 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13871
13872 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13873
13874 * corelow.c (get_core_register_section): Check for regset
13875 existence before checking for REGSET_VARIABLE_SIZE.
13876
13877 2017-01-26 Yao Qi <yao.qi@linaro.org>
13878 Pedro Alves <palves@redhat.com>
13879
13880 PR gdb/20939
13881 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13882 call memory_error, save memaddr instead.
13883 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13884 negative, cal memory_error.
13885 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13886
13887 2017-01-26 Yao Qi <yao.qi@linaro.org>
13888
13889 * disasm-selftests.c (memory_error_test): New function.
13890 (_initialize_disasm_selftests): Register memory_error_test.
13891
13892 2017-01-26 Yao Qi <yao.qi@linaro.org>
13893
13894 * Makefile.in (SFILES): Add disasm-selftests.c and
13895 selftest-arch.c.
13896 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13897 * disasm-selftests.c: New file.
13898 * selftest-arch.c: New file.
13899 * selftest-arch.h: New file.
13900
13901 2017-01-26 Yao Qi <yao.qi@linaro.org>
13902
13903 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13904 to bfd_arch_mep. Don't return 0 if section is not
13905 found. Call print_insn_mep.
13906
13907 2017-01-26 Pedro Alves <palves@redhat.com>
13908 Yao Qi <yao.qi@linaro.org>
13909
13910 * arm-tdep.c: Include "disasm.h".
13911 (gdb_print_insn_arm): Update code to get gdbarch.
13912 * disasm.c (dis_asm_read_memory): Change it to
13913 gdb_disassembler::dis_asm_read_memory.
13914 (dis_asm_memory_error): Likewise.
13915 (dis_asm_print_address): Likewise.
13916 (gdb_pretty_print_insn): Change it to
13917 gdb_disassembler::pretty_print_insn.
13918 (dump_insns): Add one argument gdb_disassemlber. All
13919 callers updated.
13920 (do_mixed_source_and_assembly_deprecated): Likewise.
13921 (do_mixed_source_and_assembly): Likewise.
13922 (do_assembly_only): Likewise.
13923 (gdb_disassembler::gdb_disassembler): New.
13924 (gdb_disassembler::print_insn): New.
13925 * disasm.h (class gdb_disassembler): New.
13926 (gdb_pretty_print_insn): Remove declaration.
13927 (gdb_disassemble_info): Likewise.
13928 * guile/scm-disasm.c (class gdbscm_disassembler): New.
13929 (gdbscm_disasm_read_memory_worker): Update.
13930 (gdbscm_disasm_read_memory): Update.
13931 (gdbscm_disasm_memory_error): Remove.
13932 (gdbscm_disasm_print_address): Remove.
13933 (gdbscm_disassembler::gdbscm_disassembler): New.
13934 (gdbscm_print_insn_from_port): Update.
13935 * mips-tdep.c: Include disasm.h.
13936 (gdb_print_insn_mips): Update code to get gdbarch.
13937 * record-btrace.c (btrace_insn_history): Update.
13938 * spu-tdep.c: Include disasm.h.
13939 (struct spu_dis_asm_data): Remove.
13940 (struct spu_dis_asm_info): New.
13941 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13942 SPU id.
13943 (gdb_print_insn_spu): Cast disassemble_info to
13944 spu_dis_asm_info.
13945
13946 2017-01-26 Yao Qi <yao.qi@linaro.org>
13947
13948 * disasm.c (do_ui_file_delete): Delete.
13949 (gdb_insn_length): Move code creating stream to ...
13950 * utils.c (null_stream): ... here. New function.
13951 * utils.h (null_stream): Declare.
13952
13953 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
13954
13955 * python/py-inferior.c (find_thread_object): Return directly
13956 from the loop. Remove "found" variable.
13957
13958 2017-01-21 Joel Brobecker <brobecker@adacore.com>
13959
13960 GDB 7.12.1 released.
13961
13962 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13963
13964 * python/py-function.c (fnpy_call): Reorder declarations to have
13965 the gdbpy_enter object declared first.
13966 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13967
13968 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13969
13970 PR python/21068
13971 * python/python-internal.h (PyMem_RawMalloc): Define for
13972 Python < 3.4.
13973 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13974 PyMem_RawMalloc instead of PyMem_Malloc.
13975
13976 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
13977 Luis Machado <lgustavo@codesourcery.com>
13978
13979 * NEWS (New commands): Mention flash-erase.
13980 (New MI commands): Mention target-flash-erase.
13981 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13982 command.
13983 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13984 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13985 * target.c (flash_erase_command): New function.
13986 (initialize_targets): Add new flash-erase command.
13987 * target.h (flash_erase_command): New declaration.
13988
13989 2017-01-20 Joel Brobecker <brobecker@adacore.com>
13990
13991 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13992 HAVE_SYS_PROCFS_H is defined.
13993
13994 2017-01-18 Alan Hayward <alan.hayward@arm.com>
13995
13996 * remote.c (struct cached_reg): Change data into a pointer.
13997 * (stop_reply_dtr): Free data pointers before deleting vector.
13998 (process_stop_reply): Likewise.
13999 (remote_parse_stop_reply): Allocate space for data
14000
14001 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14002
14003 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14004 MAX_REGISTER_SIZE.
14005 (amd64_pseudo_register_read_value): Likewise.
14006 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14007 (store_register_using_P): Likewise.
14008 * regcache.c (regcache_xfer_part): Likewise.
14009
14010 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14011
14012 Split real and pseudo registers.
14013 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14014 (sparc32_pseudo_regnum): New enum.
14015 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14016 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14017 (SPARC32_CP0_REGISTERS): New macro.
14018 (sparc32_pseudo_register_name): New function.
14019 (sparc32_register_name): Use sparc32_pseudo_register_name.
14020 (sparc32_pseudo_register_type): New function.
14021 (sparc32_register_type): Use sparc32_pseudo_register_type.
14022 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14023 pseudo register numbers.
14024 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14025 (SPARC64_CP0_REGISTERS): New macro.
14026 (sparc64_pseudo_register_name): New function.
14027 (sparc64_register_name): Use sparc64_pseudo_register_name.
14028 (sparc64_pseudo_register_type): New function.
14029 (sparc64_register_type): Use sparc64_pseudo_register_type.
14030 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14031 pseudo register numbers.
14032 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14033 sparc64_store_arguments): Handle pseudo register numbers.
14034
14035 2017-01-13 Yao Qi <yao.qi@linaro.org>
14036
14037 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14038 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14039 output.
14040 (getpkt_or_notif_sane_1): Likewise.
14041
14042 2017-01-13 Yao Qi <yao.qi@linaro.org>
14043
14044 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14045 of CC. Pass "-x c++-header" instead of "-x c".
14046
14047 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14048
14049 * remote.c (remote_can_async_p): Update comment.
14050
14051 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14052
14053 * linux-nat.c (linux_nat_can_async_p): Update comment.
14054
14055 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14056
14057 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14058
14059 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
14060
14061 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14062
14063 2017-01-10 Tom Tromey <tom@tromey.com>
14064
14065 * python/py-type.c (typy_legacy_template_argument): Update.
14066 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14067 ~demangle_parse_info): Declare new members.
14068 (cp_demangled_name_to_comp): Return unique_ptr.
14069 (cp_demangled_name_parse_free)
14070 (make_cleanup_cp_demangled_name_parse_free)
14071 (cp_new_demangle_parse_info): Remove.
14072 * cp-support.c (do_demangled_name_parse_free_cleanup)
14073 (make_cleanup_cp_demangled_name_parse_free): Remove.
14074 (inspect_type, cp_canonicalize_string_full)
14075 (cp_canonicalize_string): Update.
14076 (mangled_name_to_comp): Change return type.
14077 (cp_class_name_from_physname, method_name_from_physname)
14078 (cp_func_name, cp_remove_params): Update.
14079 * cp-name-parser.y (demangle_parse_info): New constructor, from
14080 cp_new_demangle_parse_info.
14081 (~demangle_parse_info): New destructor, from
14082 cp_demangled_name_parse_free.
14083 (cp_merge_demangle_parse_infos): Update.
14084 (cp_demangled_name_to_comp): Change return type.
14085
14086 2017-01-10 Tom Tromey <tom@tromey.com>
14087
14088 * top.c (prevent_dont_repeat): Change return type.
14089 * python/python.c (execute_gdb_command): Use std::string.
14090 Update.
14091 * guile/guile.c (gdbscm_execute_gdb_command): Update.
14092 * command.h (prevent_dont_repeat): Change return type.
14093 * breakpoint.c (bpstat_do_actions_1): Update.
14094
14095 2017-01-10 Tom Tromey <tom@tromey.com>
14096
14097 * value.h (scoped_value_mark::~scoped_value_mark): Call
14098 free_to_mark.
14099 (scoped_value_mark::free_to_mark): New method.
14100 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14101 scoped_value_mark.
14102
14103 2017-01-10 Tom Tromey <tom@tromey.com>
14104
14105 * python/py-value.c (valpy_dereference, valpy_referenced_value)
14106 (valpy_reference_value, valpy_const_value, valpy_get_address)
14107 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14108 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14109 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14110 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14111 scoped_value_mark.
14112 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14113 * value.h (scoped_value_mark): New class.
14114
14115 2017-01-10 Tom Tromey <tom@tromey.com>
14116
14117 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14118 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14119 * psymtab.c (discard_psymtabs_upto): Remove.
14120 (make_cleanup_discard_psymtabs): Remove.
14121 (struct psymtab_state): Remove.
14122
14123 2017-01-10 Tom Tromey <tom@tromey.com>
14124
14125 * record-full.c (record_full_save_cleanups): Remove.
14126 (record_full_save): Use gdb::unlinker.
14127 * gcore.c (do_bfd_delete_cleanup): Remove.
14128 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
14129 cleanups.
14130 * dwarf2read.c (unlink_if_set): Remove.
14131 (write_psymtabs_to_index): Use gdb::unlinker.
14132 * common/gdb_unlinker.h: New file.
14133
14134 2017-01-10 Tom Tromey <tom@tromey.com>
14135
14136 * windows-tdep.c (windows_xfer_shared_library): Update.
14137 * windows-nat.c (windows_make_so): Update.
14138 * utils.h (make_cleanup_bfd_unref): Remove.
14139 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14140 * symfile.h (symfile_bfd_open)
14141 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14142 * symfile.c (read_symbols, symbol_file_add)
14143 (separate_debug_file_exists): Update.
14144 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14145 (generic_load, reread_symbols): Update.
14146 * symfile-mem.c (symbol_file_add_from_memory): Update.
14147 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14148 (spu_symbol_file_add_from_memory): Update.
14149 * solist.h (struct target_so_ops) <bfd_open>: Return
14150 gdb_bfd_ref_ptr.
14151 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14152 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14153 gdb_bfd_ref_ptr.
14154 (solib_map_sections, reload_shared_libraries_1): Update.
14155 * solib-svr4.c (enable_break): Update.
14156 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14157 * solib-frv.c (enable_break2): Update.
14158 * solib-dsbt.c (enable_break): Update.
14159 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14160 gdb_bfd_ref_ptr.
14161 (darwin_solib_get_all_image_info_addr_at_init): Update.
14162 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14163 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14164 * record-full.c (record_full_save): Update.
14165 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14166 * procfs.c (insert_dbx_link_bpt_in_file): Update.
14167 * minidebug.c (find_separate_debug_file_in_section): Return
14168 gdb_bfd_ref_ptr.
14169 * machoread.c (macho_add_oso_symfile): Change abfd to
14170 gdb_bfd_ref_ptr.
14171 (macho_symfile_read_all_oso): Update.
14172 (macho_check_dsym): Return gdb_bfd_ref_ptr.
14173 (macho_symfile_read): Update.
14174 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14175 (jit_bfd_try_read_symtab): Update.
14176 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14177 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14178 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14179 gdb_bfd_ref_ptr.
14180 (gdb_bfd_ref_policy): New struct.
14181 (gdb_bfd_ref_ptr): New typedef.
14182 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14183 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14184 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14185 gdb_bfd_ref_ptr.
14186 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14187 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14188 (gcore_command): Update.
14189 * exec.c (exec_file_attach): Update.
14190 * elfread.c (elf_symfile_read): Update.
14191 * dwarf2read.c (dwarf2_get_dwz_file): Update.
14192 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14193 (open_and_init_dwo_file): Update.
14194 (open_dwp_file): Return gdb_bfd_ref_ptr.
14195 (open_and_init_dwp_file): Update.
14196 * corelow.c (core_open): Update.
14197 * compile/compile-object-load.c (compile_object_load): Update.
14198 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14199 * coffread.c (coff_symfile_read): Update.
14200 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14201 gdb_bfd_ref_ptr. Rename.
14202 (dump_bfd_file, restore_command): Update.
14203 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14204 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14205 (find_separate_debug_file_by_buildid): Update.
14206
14207 2017-01-10 Tom Tromey <tom@tromey.com>
14208
14209 * common/gdb_ref_ptr.h: New file.
14210 * python/py-ref.h (struct gdbpy_ref_policy): New.
14211 (gdbpy_ref): Now a typedef.
14212
14213 2017-01-10 Tom Tromey <tom@tromey.com>
14214
14215 * utils.h (make_cleanup_htab_delete): Don't declare.
14216 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14217 Remove.
14218 * linespec.c (decode_compound_collector): Add constructor,
14219 destructor.
14220 (lookup_prefix_sym): Remove cleanup.
14221 (symtab_collector): Add constructor, destructor.
14222 (collect_symtabs_from_filename): Remove cleanup.
14223 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14224 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14225 Use htab_up.
14226 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14227 * dwarf2read.c (dw2_expand_symtabs_matching)
14228 (dw2_map_symbol_filenames, dwarf_decode_macros)
14229 (write_psymtabs_to_index): Use htab_up.
14230 * dwarf2loc.c (func_verify_no_selftailcall)
14231 (call_site_find_chain_1, func_verify_no_selftailcall)
14232 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14233 std::vector, gdb::unique_xmalloc_ptr.
14234 (call_sitep): Remove typedef.
14235 (dwarf2_locexpr_baton_eval): Remove unused variable.
14236
14237 2017-01-10 Tom Tromey <tom@tromey.com>
14238
14239 * python/python-internal.h (make_cleanup_py_decref)
14240 (make_cleanup_py_xdecref): Don't declare.
14241 * python/py-utils.c (py_decref, make_cleanup_py_decref)
14242 (py_xdecref, make_cleanup_py_xdecref): Remove.
14243
14244 2017-01-10 Tom Tromey <tom@tromey.com>
14245
14246 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14247 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14248
14249 2017-01-10 Tom Tromey <tom@tromey.com>
14250
14251 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14252
14253 2017-01-10 Tom Tromey <tom@tromey.com>
14254
14255 * python/py-utils.c (unicode_to_encoded_string)
14256 (python_string_to_target_string)
14257 (python_string_to_target_python_string)
14258 (python_string_to_host_string, gdbpy_obj_to_string)
14259 (get_addr_from_python): Use gdbpy_ref.
14260
14261 2017-01-10 Tom Tromey <tom@tromey.com>
14262
14263 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14264 gdbpy_ref.
14265
14266 2017-01-10 Tom Tromey <tom@tromey.com>
14267
14268 * python/python.c (eval_python_command, gdbpy_decode_line)
14269 (gdbpy_run_events, gdbpy_start_type_printers)
14270 (gdbpy_apply_type_printers): Use gdbpy_ref.
14271
14272 2017-01-10 Tom Tromey <tom@tromey.com>
14273
14274 * python/py-param.c (get_doc_string, compute_enum_values): Use
14275 gdbpy_ref.
14276
14277 2017-01-10 Tom Tromey <tom@tromey.com>
14278
14279 * python/py-inferior.c (find_thread_object, build_inferior_list):
14280 Use gdbpy_ref.
14281
14282 2017-01-10 Tom Tromey <tom@tromey.com>
14283
14284 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14285
14286 2017-01-10 Tom Tromey <tom@tromey.com>
14287
14288 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14289 gdbpy_ref.
14290
14291 2017-01-10 Tom Tromey <tom@tromey.com>
14292
14293 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14294 extra incref.
14295 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14296 Use gdbpy_ref.
14297
14298 2017-01-10 Tom Tromey <tom@tromey.com>
14299
14300 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14301 gdbpy_ref.
14302
14303 2017-01-10 Tom Tromey <tom@tromey.com>
14304
14305 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14306 decref results of PyArg_ParseTupleAndKeywords.
14307
14308 2017-01-10 Tom Tromey <tom@tromey.com>
14309
14310 * python/python.c (python_run_simple_file): Use
14311 unique_xmalloc_ptr, gdbpy_ref.
14312
14313 2017-01-10 Tom Tromey <tom@tromey.com>
14314
14315 * python/py-prettyprint.c (print_stack_unless_memory_error)
14316 (print_string_repr, print_children): Use gdbpy_ref.
14317 (dummy_python_frame): New class.
14318 (dummy_python_frame::dummy_python_frame): Rename from
14319 push_dummy_python_frame.
14320 (py_restore_tstate): Remove.
14321
14322 2017-01-10 Tom Tromey <tom@tromey.com>
14323
14324 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14325
14326 2017-01-10 Tom Tromey <tom@tromey.com>
14327
14328 * python/python.c (ensure_python_env, restore_python_env):
14329 Remove.
14330 * python/python-internal.h (ensure_python_env): Don't declare.
14331 * varobj.h (varobj_ensure_python_env): Don't declare.
14332 * varobj.c (varobj_ensure_python_env): Remove.
14333
14334 2017-01-10 Tom Tromey <tom@tromey.com>
14335
14336 * varobj.c (varobj_value_get_print_value): Use
14337 gdbpy_enter_varobj.
14338
14339 2017-01-10 Tom Tromey <tom@tromey.com>
14340
14341 * python/py-prettyprint.c (print_string_repr, print_children):
14342 Update.
14343 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14344 of "encoding".
14345 * varobj.c (varobj_value_get_print_value): Update.
14346 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14347
14348 2017-01-10 Tom Tromey <tom@tromey.com>
14349
14350 * varobj.c (varobj_get_display_hint)
14351 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14352 (varobj_set_visualizer, free_variable): Use
14353 gdbpy_enter_varobj.
14354
14355 2017-01-10 Tom Tromey <tom@tromey.com>
14356
14357 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14358 (do_finish_initialization): New function. Use gdbpy_ref.
14359 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14360 do_finish_initialization.
14361
14362 2017-01-10 Tom Tromey <tom@tromey.com>
14363
14364 * python/py-param.c (get_set_value, get_show_value): Use
14365 gdbpy_enter, gdbpy_ref.
14366
14367 2017-01-10 Tom Tromey <tom@tromey.com>
14368
14369 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14370
14371 2017-01-10 Tom Tromey <tom@tromey.com>
14372
14373 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14374
14375 2017-01-10 Tom Tromey <tom@tromey.com>
14376
14377 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14378 Use gdbpy_enter_varobj.
14379
14380 2017-01-10 Tom Tromey <tom@tromey.com>
14381
14382 * varobj.c (gdbpy_enter_varobj): New constructor.
14383 * python/python-internal.h (gdbpy_enter_varobj): New class.
14384 * python/py-varobj.c (py_varobj_get_iterator): Use
14385 gdbpy_enter_varobj.
14386
14387 2017-01-10 Tom Tromey <tom@tromey.com>
14388
14389 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14390 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14391 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14392 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14393 unique_xmalloc_ptr.
14394 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14395
14396 2017-01-10 Tom Tromey <tom@tromey.com>
14397
14398 * python/py-xmethods.c (invoke_match_method): Use
14399 gdbpy_ref.
14400
14401 2017-01-10 Tom Tromey <tom@tromey.com>
14402
14403 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14404 gdbpy_enter, gdbpy_ref.
14405
14406 2017-01-10 Tom Tromey <tom@tromey.com>
14407
14408 * python/python.c (python_interactive_command): Use gdbpy_enter.
14409
14410 2017-01-10 Tom Tromey <tom@tromey.com>
14411
14412 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14413 gdbpy_ref.
14414
14415 2017-01-10 Tom Tromey <tom@tromey.com>
14416
14417 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14418 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14419
14420 2017-01-10 Tom Tromey <tom@tromey.com>
14421
14422 * utils.h (htab_deleter): New struct.
14423 (htab_up): New typedef.
14424 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14425 gdbpy_enter, gdbpy_ref, htab_up.
14426
14427 2017-01-10 Tom Tromey <tom@tromey.com>
14428
14429 * python/py-unwind.c (pending_frame_invalidate): Remove.
14430 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14431
14432 2017-01-10 Tom Tromey <tom@tromey.com>
14433
14434 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14435 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14436
14437 2017-01-10 Tom Tromey <tom@tromey.com>
14438
14439 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14440
14441 2017-01-10 Tom Tromey <tom@tromey.com>
14442
14443 * python/python.c (gdbpy_eval_from_control_command)
14444 (gdbpy_source_script, gdbpy_run_events)
14445 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14446 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14447 gdbpy_enter.
14448
14449 2017-01-10 Tom Tromey <tom@tromey.com>
14450
14451 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14452
14453 2017-01-10 Tom Tromey <tom@tromey.com>
14454
14455 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14456
14457 2017-01-10 Tom Tromey <tom@tromey.com>
14458
14459 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14460 (python_on_inferior_call_pre, python_on_inferior_call_post)
14461 (python_on_memory_change, python_on_register_change)
14462 (python_inferior_exit, python_new_objfile, add_thread_object)
14463 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14464
14465 2017-01-10 Tom Tromey <tom@tromey.com>
14466
14467 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14468 (bpfinishpy_handle_exit): Use gdbpy_enter.
14469
14470 2017-01-10 Tom Tromey <tom@tromey.com>
14471
14472 * python/py-cmd.c (cmdpy_destroyer)
14473 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14474 gdbpy_enter.
14475
14476 2017-01-10 Tom Tromey <tom@tromey.com>
14477
14478 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14479 gdbpy_enter.
14480 (gdbpy_breakpoint_has_cond): Likewise.
14481
14482 2017-01-10 Tom Tromey <tom@tromey.com>
14483
14484 * python/python.c (gdbpy_enter): New constructor.
14485 (~gdbpy_enter): New destructor.
14486 (restore_python_env, ensure_python_env): Rewrite.
14487 * python/python-internal.h (gdbpy_enter): New class.
14488
14489 2017-01-10 Tom Tromey <tom@tromey.com>
14490
14491 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14492
14493 2017-01-10 Tom Tromey <tom@tromey.com>
14494
14495 * python/py-value.c (value_has_field, get_field_flag)
14496 (get_field_type, valpy_getitem, convert_value_from_python): Use
14497 gdbpy_ref.
14498
14499 2017-01-10 Tom Tromey <tom@tromey.com>
14500
14501 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14502 gdbpy_ref.
14503
14504 2017-01-10 Tom Tromey <tom@tromey.com>
14505
14506 * python/py-prettyprint.c (search_pp_list)
14507 (find_pretty_printer_from_objfiles)
14508 (find_pretty_printer_from_progspace)
14509 (find_pretty_printer_from_gdb, find_pretty_printer)
14510 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14511 gdbpy_ref.
14512
14513 2017-01-10 Tom Tromey <tom@tromey.com>
14514
14515 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14516
14517 2017-01-10 Tom Tromey <tom@tromey.com>
14518
14519 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14520 (ltpy_get_all_source_lines): Use gdbpy_ref.
14521
14522 2017-01-10 Tom Tromey <tom@tromey.com>
14523
14524 * python/py-framefilter.c (extract_sym, extract_value)
14525 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14526 gdbpy_ref.
14527
14528 2017-01-10 Tom Tromey <tom@tromey.com>
14529
14530 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14531
14532 2017-01-10 Tom Tromey <tom@tromey.com>
14533
14534 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14535
14536 2017-01-10 Tom Tromey <tom@tromey.com>
14537
14538 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14539 gdbpy_ref.
14540
14541 2017-01-10 Tom Tromey <tom@tromey.com>
14542
14543 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14544
14545 2017-01-10 Tom Tromey <tom@tromey.com>
14546
14547 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14548 (typy_range): Use gdbpy_ref.
14549
14550 2017-01-10 Tom Tromey <tom@tromey.com>
14551
14552 * python/py-threadevent.c (create_thread_event_object): Use
14553 gdbpy_ref.
14554 * python/py-stopevent.c (create_stop_event_object): Simplify.
14555 (emit_stop_event): Use gdbpy_ref.
14556 * python/py-signalevent.c (create_signal_event_object): Use
14557 gdbpy_ref.
14558 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14559 (emit_new_objfile_event, create_clear_objfiles_event_object)
14560 (emit_clear_objfiles_event): Use gdbpy_ref.
14561 * python/py-infevents.c (create_inferior_call_event_object)
14562 (create_register_changed_event_object)
14563 (create_memory_changed_event_object, emit_inferior_call_event)
14564 (emit_memory_changed_event, emit_register_changed_event): Use
14565 gdbpy_ref.
14566 * python/py-exitedevent.c (create_exited_event_object)
14567 (emit_exited_event): Use gdbpy_ref.
14568 * python/py-event.h (evpy_emit_event): Remove
14569 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14570 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14571 * python/py-continueevent.c (emit_continue_event): Use
14572 gdbpy_ref.
14573 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14574 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14575 gdbpy_ref.
14576 * python/py-bpevent.c (create_breakpoint_event_object): Use
14577 gdbpy_ref.
14578
14579 2017-01-10 Tom Tromey <tom@tromey.com>
14580
14581 * python/py-ref.h: New file.
14582
14583 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14584
14585 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14586 void.
14587 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14588 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14589 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14590 * ui-out.c (ui_out::redirect): Likewise.
14591 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14592 * cli/cli-logging.c (set_logging_redirect): Update call site of
14593 ui_out::redirect.
14594 (handle_redirections): Likewise.
14595 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14596 * top.c (execute_command_to_string): Likewise.
14597 * utils.c (do_ui_out_redirect_pop): Likewise.
14598
14599 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14600
14601 * stack.c (_initialize_stack): Update "frame" command help message.
14602
14603 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14604
14605 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14606
14607 2017-01-06 Yao Qi <yao.qi@linaro.org>
14608
14609 * x86-linux-nat.h: Include gdb_proc_service.h.
14610
14611 2017-01-06 Yao Qi <yao.qi@linaro.org>
14612
14613 * ser-base.h: Include serial.h.
14614
14615 2017-01-06 Yao Qi <yao.qi@linaro.org>
14616
14617 * ppc-linux-tdep.h: Include ppc-tdep.h.
14618
14619 2017-01-06 Yao Qi <yao.qi@linaro.org>
14620
14621 * nat/amd64-linux-siginfo.h: Include signal.h.
14622
14623 2017-01-06 Yao Qi <yao.qi@linaro.org>
14624
14625 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14626
14627 2017-01-06 Yao Qi <yao.qi@linaro.org>
14628
14629 * mi/mi-parse.h: Include mi-cmds.h.
14630
14631 2017-01-06 Yao Qi <yao.qi@linaro.org>
14632
14633 * inf-loop.c: Don't include "target.h".
14634 * inf-loop.h: Include it here.
14635
14636 2017-01-06 Yao Qi <yao.qi@linaro.org>
14637
14638 * dfp.h: Include "dboulest.h" and "expression.h".
14639
14640 2017-01-06 Yao Qi <yao.qi@linaro.org>
14641
14642 * ax-gdb.h: Include "ax.h".
14643
14644 2017-01-06 Yao Qi <yao.qi@linaro.org>
14645
14646 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14647 with nat/gdb_ptrace.h.
14648
14649 2017-01-05 Yao Qi <yao.qi@linaro.org>
14650
14651 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14652 new line.
14653 (mips64_fbsd_sigframe_init): Likewise.
14654
14655 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14656
14657 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14658 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14659
14660 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14661
14662 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14663 * NEWS: Mention new FreeBSD/mips native configuration.
14664 * config/mips/fbsd.mh: New file.
14665 * configure.host: Add mips*-*-freebsd*.
14666 * mips-fbsd-nat.c: New file.
14667
14668 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14669
14670 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14671 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14672 * NEWS: Mention new FreeBSD/mips target.
14673 * configure.tgt: Add mips*-*-freebsd*.
14674 * mips-fbsd-tdep.c: New file.
14675 * mips-fbsd-tdep.h: New file.
14676
14677 2017-01-04 Yao Qi <yao.qi@linaro.org>
14678
14679 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14680 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14681
14682 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14683
14684 Update copyright year range in all GDB files.
14685
14686 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14687
14688 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14689
14690 For older changes see ChangeLog-2016.
14691 \f
14692 Local Variables:
14693 mode: change-log
14694 left-margin: 8
14695 fill-column: 74
14696 version-control: never
14697 coding: utf-8
14698 End: