1770b1f02a8e94ba4fe598fb40bb8b81ca0847bb
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-07 Xavier Roirand <roirand@adacore.com>
2 Pedro Alves <palves@redhat.com>
3
4 * breakpoint.c (map_breakpoint_number_range): New, factored out
5 from ...
6 (map_breakpoint_numbers): ... here.
7 (find_location_by_number): Change parameters from string to
8 breakpoint number and location.
9 (extract_bp_number_and_location): New function.
10 (enable_disable_bp_num_loc)
11 (enable_disable_breakpoint_location_range)
12 (enable_disable_command): New functions, factored out ...
13 (enable_command, disable_command): ... these functions, and
14 adjusted to support ranges.
15 * NEWS: Document enable/disable breakpoint location range feature.
16
17 2017-11-06 Luis Machado <luis.machado@linaro.org>
18
19 * MAINTAINERS (Write After Approval): Update my e-mail address.
20
21 2017-11-06 Pedro Alves <palves@redhat.com>
22
23 * gnu-nat.c (gnu_terminal_init): Delete.
24 (gnu_target): Don't install gnu_terminal_init.
25 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
26 (child_terminal_init): ... this function.
27
28 2017-11-06 Pedro Alves <palves@redhat.com>
29
30 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
31 sgtty.h.
32 * config.in, configure: Regenerate.
33
34 2017-11-06 Pedro Alves <palves@redhat.com>
35
36 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
37 (async_init_signals): Adjust.
38 (handle_stop_sig): Rename to ...
39 (handle_sigtstp): ... this.
40 (async_stop_sig): Rename to ...
41 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
42 SIGTSTP path.
43 * event-top.h: Move signal.h include to the top. Check SIGTSTP
44 instead of STOP_SIGNAL thoughout.
45 (handle_stop_sig): Rename to ...
46 (handle_sigtstp): ... this.
47 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
48
49 2017-11-06 Pedro Alves <palves@redhat.com>
50
51 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
52 longer set flags twice in row.
53
54 2017-11-06 Pedro Alves <palves@redhat.com>
55
56 * Makefile.in (SER_HARDWIRE): Update comment.
57 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
58 * common/gdb_termios.h: Delete file.
59 * common/job-control.c: Include termios.h and unistd.h instead of
60 gdb_termios.h.
61 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
62 check.
63 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
64 Remove sgtty code.
65 * configure.ac: No longer check for termio.h and sgtty.h.
66 * configure: Regenerate.
67 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
68 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
69 Replace PROCESS_GROUP_TYPE references with pid_t references
70 throughout.
71 (gdb_getpgrp): Delete.
72 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
73 (child_terminal_inferior): Remove comment. Remove sgtty code.
74 (child_terminal_ours_1): Use tcgetpgrp directly instead of
75 gdb_getpgrp. Use serial_set_tty_state instead aof
76 serial_noflush_set_tty_state. Remove sgtty code.
77 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
78 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
79 (inferior_process_group): Now returns pid_t.
80 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
81 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
82 * ser-event.c (serial_event_ops): Update.
83 * ser-go32.c (dos_noflush_set_tty_state): Delete.
84 (dos_ops): Update.
85 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
86 * ser-pipe.c (pipe_ops): Update.
87 * ser-tcp.c (tcp_ops): Update.
88 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
89 HAVE_TERMIOS checks.
90 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
91 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
92 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
93 assume termios.
94 (hardwire_noflush_set_tty_state): Delete.
95 (hardwire_print_tty_state, hardwire_drain_output)
96 (hardwire_flush_output, hardwire_flush_input)
97 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
98 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
99 code, and assume termios.
100 (hardwire_ops): Update.
101 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
102 * serial.c (serial_noflush_set_tty_state): Delete.
103 * serial.h (serial_noflush_set_tty_state): Delete.
104 (serial_ops::noflush_set_tty_state): Delete.
105
106 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
107
108 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
109 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
110 (COMMON_OBS): Remove doublest.o and dfp.o.
111 Do not build target-float.c (instead of doublest.c)
112 with -Wformat-nonliteral.
113
114 * doublest.c: Remove file.
115 * doublest.h: Remove file.
116 * dfp.c: Remove file.
117 * dfp.h: Remove file.
118
119 * target-float.c: Do not include "doublest.h" and "dfp.h".
120 (DOUBLEST): Move here from doublest.h.
121 (enum float_kind): Likewise.
122 (FLOATFORMAT_CHAR_BIT): Likewise.
123 (FLOATFORMAT_LARGEST_BYTES): Likewise.
124 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
125 (floatformat_precision): Likewise.
126 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
127 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
128 Likewise.
129 (host_float_format, host_double_format, host_long_double_format):
130 Likewise.
131 (floatformat_to_string, floatformat_from_string): Likewise.
132 (floatformat_to_doublest): Likewise. Also, inline the original
133 convert_floatformat_to_doublest.
134 (floatformat_from_doublest): Likewise. Also, inline the original
135 convert_floatformat_from_doublest.
136
137 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
138 (MAX_DECIMAL_STRING): Move here from dfp.c.
139 (match_endianness): Likewise.
140 (set_decnumber_context, decimal_check_errors): Likewise.
141 (decimal_from_number, decimal_to_number): Likewise.
142 (decimal_to_string, decimal_from_string): Likewise. Make static.
143 (decimal_from_longest, decimal_from_ulongest): Likewise.
144 (decimal_to_longest): Likewise.
145 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
146 (decimal_convert): Likewise.
147
148 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
149
150 * doublest.c: Do not include "gdbtypes.h".
151 (extract_typed_floating): Remove.
152 (store_typed_floating): Remove.
153 (convert_typed_floating): Remove.
154 * doublest.h (struct type): Remove.
155 (DOUBLEST_PRINT_FORMAT): Remove.
156 (DOUBLEST_SCAN_FORMAT): Remove.
157 (extract_typed_floating): Remove.
158 (store_typed_floating): Remove.
159 (convert_typed_floating): Remove.
160
161 * dfp.c (decimal_from_doublest): Remove.
162 (decimal_to_doublest): Remove.
163 * dfp.h: Do not include "doublest.h".
164 (decimal_from_doublest): Remove.
165 (decimal_to_doublest): Remove.
166
167 * value.c: Do not include "doublest.h" and "dfp.h".
168 (value_as_double): Remove.
169 (unpack_double): Remove.
170 (value_from_double): Remove.
171 (value_from_decfloat): Remove.
172 * value.h: Do not include "doublest.h".
173 (value_as_double): Remove.
174 (unpack_double): Remove.
175 (value_from_double): Remove.
176 (value_from_decfloat): Remove.
177
178 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
179
180 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
181 (i386_extract_return_value): Use target_float_convert.
182 (i386_store_return_value): Likewise.
183 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
184 (i387_value_to_register): Likewise.
185 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
186 (ia64_register_to_value): Use target_float_convert.
187 (ia64_value_to_register): Likewise.
188 (ia64_extract_return_value): Likewise.
189 (ia64_store_return_value): Likewise.
190 (ia64_push_dummy_call): Likewise.
191 * m68k-tdep.c: Include "target-float.h".
192 (m68k_register_to_value): Use target_float_convert.
193 (m68k_value_to_register): Likewise.
194 (m68k_svr4_extract_return_value): Likewise.
195 (m68k_svr4_store_return_value): Likewise.
196 * ppc-sysv-tdep.c: Include "target-float.h".
197 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
198 (do_ppc_sysv_return_value): Likewise.
199 (ppc64_sysv_abi_push_freg): Likewise.
200 (ppc64_sysv_abi_return_value_base): Likewise.
201 * rs6000-aix-tdep.c: Include "target-float.h".
202 (rs6000_push_dummy_call): Use target_float_convert.
203 (rs6000_return_value): Likewise.
204 * rs6000-lynx178-tdep.c: Include "target-float.h".
205 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
206 (rs6000_lynx178_return_value): Likewise.
207 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
208 (rs6000_register_to_value): Use target_float_convert.
209 (rs6000_value_to_register): Likewise.
210 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
211 (arm_extract_return_value): Use target_float_convert.
212 (arm_store_return_value): Likewise.
213 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
214 (sh_register_convert_to_virtual): Use target_float_convert.
215 (sh_register_convert_to_raw): Likewise.
216 * sh64-tdep.c: Include "target-float.h".
217 (sh64_extract_return_value): Use target_float_convert.
218 (sh64_register_convert_to_virtual): Likewise.
219 (sh64_register_convert_to_raw): Likewise. Fix argument types.
220
221 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
222
223 * target-float.c (floatformat_to_host_double): New function.
224 (floatformat_from_host_double): Likewise.
225 (target_float_to_host_double): Likewise.
226 (target_float_from_host_double): Likewise.
227 * target-float.h (target_float_to_host_double): Add prototype.
228 (target_float_from_host_double): Likewise.
229
230 * guile/scm-value.c: Include "target-float.h".
231 (gdbscm_value_to_real): Use target_float_to_host_double.
232 Handle integer source values via value_as_long.
233 * guile/scm-math.c: Include "target-float.h". Do not include
234 "doublest.h", "dfp.h", and "expression.h".
235 (vlscm_convert_typed_number): Use target_float_from_host_double.
236 (vlscm_convert_number): Likewise.
237
238 * python/py-value.c (valpy_float): Use target_float_to_host_double.
239 (convert_value_from_python): Use target_float_from_host_double.
240
241 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
242
243 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
244 (cast_from_fixed): Likewise.
245 (ada_scaling_type): New function.
246 (ada_delta): Return value instead of DOUBLEST. Perform target
247 arithmetic instead of host arithmetic.
248 (scaling_factor): Rename to ...
249 (ada_scaling_factor) ... this. Make non-static. Return value instead
250 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
251 (ada_fixed_to_float): Remove.
252 (ada_float_to_fixed): Remove.
253 * ada-lang.h (ada_fixed_to_float): Remove.
254 (ada_float_to_fixed): Remove.
255 (ada_delta): Return value instead of DOUBLEST.
256 (ada_scaling_factor): Add prototype.
257
258 * ada-typeprint.c: Include "target-float.h".
259 (print_fixed_point_type): Perform target arithmetic instead of
260 host arithmetic.
261 * ada-valprint.c: Include "target-float.h".
262 (ada_val_print_num): Perform target arithmetic instead of
263 host arithmetic for fixed-point types.
264
265 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
266
267 * target-float.c: Include <math.h>.
268 (floatformat_binop): New function.
269 (floatformat_compare): Likewise.
270 (target_float_binop): Likewise.
271 (target_float_compare): Likewise.
272 * target-float.h: Include "expression.h".
273 (target_float_binop): Add prototype.
274 (target_float_compare): Likewise.
275
276 * valarith.c: Do not include "doublest.h" and "dfp.h".
277 Include "common/byte-vector.h".
278 (value_args_as_decimal): Remove, replace by ...
279 (value_args_as_target_float): ... this function. Handle both
280 binary and decimal target floating-point formats.
281 (scalar_binop): Handle both binary and decimal FP using
282 value_args_as_target_float and target_float_binop.
283 (value_equal): Handle both binary and decimal FP using
284 value_args_as_target_float and target_float_compare.
285 (value_less): Likewise.
286 (value_pos): Handle all scalar types as simple copy.
287 (value_neg): Handle all scalar types via BINOP_SUB from 0.
288 * dfp.c (decimal_binop): Throw error instead of internal_error
289 when called with an unsupported operation code.
290
291 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
292
293 * target-float.c (target_float_to_string): New function.
294 (target_float_from_string): New function.
295 * target-float.h (target_float_to_string): Add prototype.
296 (target_float_from_string): Add prototype.
297
298 * valprint.c: Include "target-float.h". Do not include
299 "doublest.h" and "dfp.h".
300 (print_floating): Use target_float_to_string.
301 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
302 (printf_floating): Use target_float_to_string.
303 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
304 (print_i387_value): Use target_float_to_string.
305 * mips-tdep.c: Include "target-float.h".
306 (mips_print_fp_register): Use target_float_to_string.
307 * sh64-tdep.c: Include "target-float.h".
308 (sh64_do_fp_register): Use target_float_to_string.
309
310 * parse.c: Include "target-float.h". Do not include
311 "doublest.h" and "dfp.h".
312 (parse_float): Use target_float_from_string.
313 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
314 (define_symbol): Use target_float_from_string.
315 * gdbarch-selftests.c: Include "target-float.h".
316 (register_to_value_test): Use target_float_from_string.
317
318 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
319
320 * Makefile.c (SFILES): Add target-float.c.
321 (HFILES_NO_SRCDIR): Add target-float.h.
322 (COMMON_OBS): Add target-float.o.
323 * target-float.h: New file.
324 * target-float.c: New file.
325
326 * doublest.c (floatformat_classify): Fix detection of float_zero.
327
328 * gdbtypes.c (is_floating_type): New function.
329 * gdbtypes.h (is_floating_type): Add prototype.
330
331 * value.c: Do not include "floatformat.h".
332 (unpack_double): Use target_float_is_valid.
333 (is_floating_value): New function.
334 * value.h (is_floating_value): Add prototype-
335
336 * valarith.c: Include "target-float.h".
337 (value_logical_not): Use target_float_is_zero.
338
339 * python/py-value.c: Include "target-float.h".
340 (valpy_nonzero): Use target_float_is_zero.
341
342 2017-11-04 Tom Tromey <tom@tromey.com>
343
344 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
345
346 2017-11-04 Tom Tromey <tom@tromey.com>
347
348 * breakpoint.c (set_momentary_breakpoint): Return
349 breakpoint_up.
350 (until_break_command): Update.
351 (new_until_break_fsm): Change argument types to
352 breakpoint_up.
353 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
354 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
355 Remove.
356 * infcmd.c (finish_forward): Update.
357 * breakpoint.h (set_momentary_breakpoint)
358 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
359 (make_cleanup_delete_breakpoint): Remove.
360 (struct breakpoint_deleter): New.
361 (breakpoint_up): New typedef.
362 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
363 (insert_exception_resume_breakpoint): Update.
364 (insert_exception_resume_from_probe): Update.
365 (insert_longjmp_resume_breakpoint): Update.
366 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
367 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
368 * infcall.c (call_function_by_hand_dummy): Update
369
370 2017-11-04 Tom Tromey <tom@tromey.com>
371
372 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
373
374 2017-11-04 Tom Tromey <tom@tromey.com>
375
376 * linux-tdep.c (linux_core_info_proc_mappings): Use
377 gdb::def_vector.
378 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
379 "size" argument.
380 (linux_corefile_thread): Update.
381 (linux_make_corefile_notes): Remove unused variable.
382
383 2017-11-04 Tom Tromey <tom@tromey.com>
384
385 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
386 gdb::byte_vector.
387
388 2017-11-04 Tom Tromey <tom@tromey.com>
389
390 * objfiles.c (do_free_objfile_cleanup): Remove.
391 * compile/compile-object-load.c (compile_object_load): Update.
392 * objfiles.h (make_cleanup_free_objfile): Remove.
393
394 2017-11-04 Tom Tromey <tom@tromey.com>
395
396 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
397 (adi_read_versions): Change "tags" to "gdb_byte *".
398 (adi_print_versions): Likewise.
399
400 2017-11-04 Tom Tromey <tom@tromey.com>
401
402 * breakpoint.c
403 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
404 from start_rbreak_breakpoints.
405 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
406 * breakpoint.h (class scoped_rbreak_breakpoints): New.
407 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
408 * symtab.c (do_end_rbreak_breakpoints): Remove.
409 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
410
411 2017-11-04 Tom Tromey <tom@tromey.com>
412
413 * cp-namespace.c (reset_directive_searched): Remove.
414 (cp_lookup_symbol_via_imports): Use scoped_restore.
415 * cp-support.c (reset_directive_searched): Remove.
416 (make_symbol_overload_list_using): Use scoped_restore.
417 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
418 (reset_directive_searched): Remove.
419
420 2017-11-04 Tom Tromey <tom@tromey.com>
421
422 * symfile.c (find_separate_debug_file_by_debuglink): Use
423 unique_xmalloc_ptr.
424
425 2017-11-04 Tom Tromey <tom@tromey.com>
426
427 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
428 type of "info".
429 (compute_stack_depth): Likewise.
430 (do_compile_dwarf_expr_to_c): Use std::vector.
431
432 2017-11-04 Tom Tromey <tom@tromey.com>
433
434 * compile/compile-object-load.c (link_callbacks_einfo): Use
435 std::string.
436
437 2017-11-04 Tom Tromey <tom@tromey.com>
438
439 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
440 Use scoped_free_pendings.
441 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
442 scoped_free_pendings.
443 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
444 (xcoff_initial_scan): Likewise.
445 * buildsym.c (reset_symtab_globals): Update comment.
446 (scoped_free_pendings): Rename from really_free_pendings.
447 (prepare_for_building): Update comment.
448 (buildsym_init): Likewise.
449 * buildsym.h (class scoped_free_pendings): New class.
450 (really_free_pendings): Don't declare.
451
452 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
453
454 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
455 output when converting a zero value to a special byteorder format.
456
457 2017-11-02 Yao Qi <yao.qi@linaro.org>
458
459 * frame.c (do_frame_register_read): Remove aspace.
460 * jit.c (jit_frame_sniffer): Likwise.
461 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
462 * regcache.c (regcache::regcache): Pass nullptr.
463 (regcache_print): Caller updated.
464 * regcache.h (regcache::regcache): Remove one constructor
465 parameter aspace.
466
467 2017-11-02 Yao Qi <yao.qi@linaro.org>
468
469 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
470
471 2017-11-02 Yao Qi <yao.qi@linaro.org>
472
473 * breakpoint.c (insert_single_step_breakpoints): Update.
474 * frame.c (struct frame_info) <aspace>: Add const.
475 (frame_save_as_regcache): Add const.
476 (get_frame_address_space): Return const address_space *.
477 * frame.h (get_frame_address_space): Update declaration.
478 * infrun.c (struct step_over_info) <aspace>: Add const.
479 (set_step_over_info): Make aspace const.
480 (displaced_step_prepare_throw): Change variable const.
481 (resume): Likewise.
482 (proceed): Likewise.
483 (adjust_pc_after_break): Likewise.
484 (save_waitstatus): Likewise.
485 (handle_signal_stop): Likewise.
486 (keep_going_pass_signal): Likewise.
487 * jit.c (jit_frame_sniffer): Add const.
488 * mips-tdep.c (mips_single_step_through_delay): Likewise.
489 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
490 * record-full.c (record_full_wait_1): Likewise.
491 * regcache.c (regcache::regcache): Change parameter to const.
492 * regcache.h (regcache::regcache): Likewise.
493 (regcache::aspace): Return const address_space *.
494 (regcache) <m_aspace>: Add const.
495
496 2017-11-02 Yao Qi <yao.qi@linaro.org>
497
498 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
499 * frame.c (create_sentinel_frame): Likewise.
500 * infrun.c (displaced_step_prepare_throw): Likewise.
501 (resume): Likewise.
502 (thread_still_needs_step_over_bp): Likewise.
503 (proceed): Likewise.
504 (do_target_wait): Likewise.
505 (adjust_pc_after_break): Likewise.
506 (handle_syscall_event): Likewise.
507 (save_waitstatus): Likewise.
508 (handle_inferior_event_1): Likewise.
509 (handle_signal_stop): Likewise.
510 (keep_going_pass_signal): Likewise.
511 * linux-nat.c (status_callback): Likewise.
512 (save_stop_reason): Likewise.
513 (resume_stopped_resumed_lwps): Likewise.
514 * record-full.c (record_full_exec_insn): Likewise.
515 (record_full_wait_1): Likewise.
516 * regcache.c (get_regcache_aspace): Remove.
517 * regcache.h (get_regcache_aspace): Remove.
518
519 2017-11-02 Yao Qi <yao.qi@linaro.org>
520
521 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
522 (init_regcache_descr): Use gdbarch_num_regs.
523 (regcache::regcache): Likewise.
524 (regcache::get_register_status): Likewise.
525 (regcache::assert_raw_regnum): Likewise.
526 (regcache::cooked_read): Likewise.
527 (regcache::cooked_read_value): Likewise.
528 (regcache::cooked_write): Likewise.
529 (regcache::dump): Likewise.
530 (regcache::num_raw_registers): New method.
531 * regcache.h (class regcache) <num_raw_registers>: New.
532
533 2017-11-02 Yao Qi <yao.qi@linaro.org>
534
535 * regcache.c (regcache::assert_regnum): New method.
536 (regcache::invalidate): Call assert_regnum.
537 (regcache::raw_update): Likewise.
538 (regcache::raw_write): Likewise.
539 (regcache::raw_read_part): Likewise.
540 (regcache::raw_write_part): Likewise.
541 (regcache::raw_supply): Likewise.
542 (regcache::raw_supply_integer): Likewise.
543 (regcache::raw_supply_zeroed): Likewise.
544 (regcache::raw_collect): Likewise.
545 (regcache::raw_collect_integer): Likewise.
546 * regcache.h (regcache::assert_regnum): Declare.
547
548 2017-11-02 Yao Qi <yao.qi@linaro.org>
549
550 * regcache.c (regcache::dump): Remove code.
551
552 2017-11-02 Yao Qi <yao.qi@linaro.org>
553
554 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
555 Remove.
556 <sizeof_cooked_register_status>: Remove.
557 (init_regcache_descr): Update.
558 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
559 (regcache::save): Likewise.
560 (regcache::dump): Likewise.
561
562 2017-11-01 James Bowman <james.bowman@ftdichip.com>
563
564 * ft32-tdep.c (ft32_fetch_instruction): New function.
565 (ft32_analyze_prologue): Use ft32_fetch_instruction().
566
567 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
568
569 * cli/cli-script.c (execute_control_command): Rename to ...
570 (execute_control_command_1): ... this.
571 (execute_control_command): New function.
572
573 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
574
575 * tracepoint.c (tfind_command): Remove const_cast.
576
577 2017-10-30 Mike Gulick <mgulick@mathworks.com>
578
579 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
580
581 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
582
583 * common/common-utils.h (in_inclusive_range): New function.
584 * arm-tdep.c (arm_record_extension_space): Use
585 in_inclusive_range.
586 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
587 * cris-tdep.c (cris_spec_reg_applicable): Use
588 in_inclusive_range.
589
590 2017-10-30 Pedro Alves <palves@redhat.com>
591 Simon Marchi <simon.marchi@ericsson.com>
592
593 * remote.c (remote_set_syscall_catchpoint): Build a std::string
594 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
595
596 2017-10-30 Pedro Alves <palves@redhat.com>
597
598 * common/common-utils.c (string_appendf, string_vappendf): New
599 functions.
600 * common/common-utils.h (string_appendf, string_vappendf): New
601 declarations.
602 * unittests/common-utils-selftests.c (string_appendf_func)
603 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
604 (string_vappendf_tests): New functions.
605 (_initialize_common_utils_selftests): Register "string_appendf" and
606 "string_vappendf tests".
607
608 2017-10-30 Pedro Alves <palves@redhat.com>
609
610 * unittests/common-utils-selftests.c (format_func): New typedef.
611 (string_printf_tests, string_vprintf_tests): Tests factored out
612 and merged to ...
613 (test_format_func): ... this new function.
614 (string_printf_tests, string_vprintf_tests): Reimplement on top of
615 test_format_func.
616
617 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
618
619 * darwin-nat.c: Remove include of gdb.h.
620
621 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
622
623 * xtensa-xtregs.c: Fix formatting issues.
624
625 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
626
627 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
628
629 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
630
631 PR python/21213
632 * python/py-infthread.c (thpy_get_inferior): Increment reference
633 of inferior before returning it.
634
635 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
636
637 * unittests/common-utils-selftests.c (format): Add
638 ATTRIBUTE_PRINTF.
639
640 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
641
642 * xml-syscall.c (struct syscall_desc): Add constructor.
643 <name>: Change type to std::string.
644 (syscall_desc_up): New typedef.
645 (syscall_desc_p): Remove typeder.
646 (DEF_VEC_P(syscall_desc_p)): Remove.
647 (struct syscall_group_desc): Add constructor.
648 <name>: Change type to std::string.
649 <syscalls>: Change type to std::vector.
650 (syscall_group_desc_up): New typedef.
651 (syscall_group_desc_p): Remove typedef.
652 (DEF_VEC_P(syscall_group_desc_p)): Remove.
653 (struct syscalls_info) <syscalls>: Change type to std::vector of
654 unique_ptr.
655 <groups>: Likewise.
656 <my_gdb_datadir>: Change type to std::string.
657 (syscalls_info_up): New typedef.
658 (allocate_syscalls_info): Remove.
659 (syscalls_info_free_syscalls_desc): Remove.
660 (syscalls_info_free_syscall_group_desc): Remove.
661 (free_syscalls_info): Remove.
662 (make_cleanup_free_syscalls_info): Remove.
663 (syscall_group_create_syscall_group_desc): Adjust.
664 (syscall_group_add_syscall): Adjust.
665 (syscall_create_syscall_desc): Adjust.
666 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
667 (init_syscalls_info): Adjust.
668 (syscall_group_get_group_by_name): Adjust.
669 (xml_get_syscall_number): Adjust.
670 (xml_get_syscall_name): Adjust.
671 (xml_list_of_syscalls): Adjust.
672 (xml_list_syscalls_by_group): Adjust.
673 (xml_list_of_groups): Adjust.
674
675 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
676
677 * probe.h: Don't include gdb_vecs.h.
678 (DEF_VEC_P (probe_p)): Remove.
679 (find_probes_in_objfile): Return an std::vector.
680 * probe.c (find_probes_in_objfile): Likewise.
681 * breakpoint.c (breakpoint_objfile_data)
682 <longjmp_probes>: Change type to std::vector.
683 <exception_probes>: Likewise.
684 (free_breakpoint_probes): Don't manually free vectors.
685 (create_longjmp_master_breakpoint): Adjust.
686 (create_exception_master_breakpoint): Adjust.
687 * solib-svr4.c (svr4_create_probe_breakpoints): Change
688 parameter type, adjust.
689 (svr4_create_solib_event_breakpoints): Adjust.
690
691 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
692
693 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
694 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
695 with new.
696 (free_breakpoint_probes): Rename to ...
697 (free_breakpoint_objfile_data): ... this, and call delete on
698 bp_objfile_data..
699
700 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
701
702 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
703 (loaded_script_ptr): Remove typedef.
704 (DEF_VEC_P (loaded_script_ptr)): Remove.
705 (struct collect_matching_scripts_data): Add constructor.
706 <scripts_p>: Change type to (pointer to) std::vector.
707 (collect_matching_scripts_data): Adjust.
708 (sort_scripts_by_name): Make suitable for std::sort.
709 (print_scripts): Don't sort vector, adjust to std::vector.
710 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
711
712 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
713
714 * symfile.c (filename_language): Make struct, not typedef. Add
715 constructor.
716 <ext>: Change type to std::string.
717 (DEF_VEC_O (filename_language)): Remove.
718 (filename_language_table): Change type to std::vector.
719 (add_filename_language): Adjust.
720 (set_ext_lang_command): Adjust.
721 (info_ext_lang_command): Adjust.
722 (deduce_language_from_filename): Adjust.
723 (class scoped_restore_filename_language_table): Remove.
724 (test_filename_language): Use scoped_restore.
725 (test_set_ext_lang_command): Use scoped_restore, adjust to
726 std::vector change.
727
728 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
729
730 * symfile.c: Include selftest.h.
731 (class scoped_restore_filename_language_table): New.
732 (test_filename_language): New test.
733 (test_set_ext_lang_command): New test.
734 (_initialize_symfile): Register tests.
735
736 2017-10-27 Keith Seitz <keiths@redhat.com>
737
738 * breakpoint.c (print_breakpoint_location): Use the symbol saved
739 in the bp_location, falling back to find_pc_sect_function when
740 needed.
741 (add_location_to_breakpoint): Save sal->symbol.
742 * breakpoint.h (struct bp_location) <symbol>: New field.
743 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
744 * symtab.h (struct symtab_and_line) <symbol>: New field.
745
746 2017-10-26 Patrick Frants <osscontribute@gmail.com>
747
748 PR gdb/13669
749 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
750 to rewind obstack.
751
752 2017-10-26 Pedro Alves <palves@redhat.com>
753
754 * remote.c (remote_async_terminal_ours_p): Delete.
755 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
756 Remove references to 'remote_async_terminal_ours_p'.
757
758 2017-10-26 Yao Qi <yao.qi@linaro.org>
759
760 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
761
762 2017-10-26 Yao Qi <yao.qi@linaro.org>
763
764 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
765 aspace const.
766 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
767 Likewise.
768 * breakpoint.c (bpstat_check_location): Remove cast.
769 (breakpoint_hit_catch_fork): Make aspce const.
770 (breakpoint_hit_catch_solib): Likewise.
771 (breakpoint_hit_catch_exec): Likewise.
772 (breakpoint_hit_ranged_breakpoint): Likewise.
773 (breakpoint_hit_watchpoint): Likewise.
774 (base_breakpoint_breakpoint_hit): Likewise.
775 (bkpt_breakpoint_hit): Likewise.
776 (dprintf_breakpoint_hit): Likewise.
777 (tracepoint_breakpoint_hit): Likewise.
778 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
779
780 2017-10-26 Yao Qi <yao.qi@linaro.org>
781
782 * breakpoint.c (breakpoint_location_address_match): Change
783 "struct address_space *" to "const address_space".
784 (breakpoint_location_address_range_overlap): Likewise.
785 (breakpoint_here_p): Likewise.
786 (breakpoint_in_range_p): Likewise.
787 (moribund_breakpoint_here_p): Likewise.
788 (bp_location_inserted_here_p): Likewise.
789 (software_breakpoint_inserted_here_p): Likewise.
790 (hardware_breakpoint_inserted_here_p): Likewise.
791 (hardware_watchpoint_inserted_in_range): Likewise.
792 (bpstat_check_location): Likewise.
793 (bpstat_stop_status): Likewise.
794 (breakpoint_address_match): Likewise.
795 (breakpoint_address_match_range): Likewise.
796 (breakpoint_location_address_match): Likewise.
797 (breakpoint_location_address_range_overlap): Likewise.
798 (insert_single_step_breakpoint): Likewise.
799 (breakpoint_has_location_inserted_here): Likewise.
800 (single_step_breakpoint_inserted_here_p): Likewise.
801 (pc_at_non_inline_function): Likewise.
802 * breakpoint.h (bpstat_stop_status): Update declaration.
803 (breakpoint_here_p): Likewise.
804 (breakpoint_in_range_p): Likewise.
805 (moribund_breakpoint_here_p): Likewise.
806 (breakpoint_inserted_here_p): Likewise.
807 (software_breakpoint_inserted_here_p): Likewise.
808 (hardware_breakpoint_inserted_here_p): Likewise.
809 (breakpoint_has_location_inserted_here): Likewise.
810 (single_step_breakpoint_inserted_here_p): Likewise.
811 (hardware_watchpoint_inserted_in_range): Likewise.
812 (breakpoint_address_match): Likewise.
813 (insert_single_step_breakpoint): Likewise.
814 (pc_at_non_inline_function): Likewise.
815 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
816 * record.c (record_check_stopped_by_breakpoint): Likewise.
817 * record.h (record_check_stopped_by_breakpoint): Likewise.
818 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
819
820 2017-10-25 Yao Qi <yao.qi@linaro.org>
821
822 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
823 regcache->arch () instead get_regcache_arch.
824 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
825 Likewise.
826 (aarch64_fbsd_store_inferior_registers): Likewise.
827 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
828 (store_gregs_to_thread): Likewise.
829 (fetch_fpregs_from_thread): Likewise.
830 (store_fpregs_to_thread): Likewise.
831 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
832 (aarch64_store_return_value): Likewise.
833 (aarch64_software_single_step): Likewise.
834 * aix-thread.c (aix_thread_wait): Likewise.
835 (supply_reg32): Likewise.
836 (supply_sprs64): Likewise.
837 (supply_sprs32): Likewise.
838 (fill_gprs64): Likewise.
839 (fill_gprs32): Likewise.
840 (fill_sprs64): Likewise.
841 (fill_sprs32): Likewise.
842 (store_regs_user_thread): Likewise.
843 (store_regs_kernel_thread): Likewise.
844 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
845 (alphabsd_store_inferior_registers): Likewise.
846 * alpha-tdep.c (alpha_extract_return_value): Likewise.
847 (alpha_store_return_value): Likewise.
848 (alpha_deal_with_atomic_sequence): Likewise.
849 (alpha_next_pc): Likewise.
850 (alpha_software_single_step): Likewise.
851 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
852 (amd64bsd_store_inferior_registers): Likewise.
853 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
854 Likewise.
855 (amd64_linux_store_inferior_registers): Likewise.
856 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
857 (amd64_collect_native_gregset): Likewise.
858 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
859 (amd64obsd_collect_uthread): Likewise.
860 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
861 (amd64_collect_fpregset): Likewise.
862 (amd64_supply_fxsave): Likewise.
863 (amd64_supply_xsave): Likewise.
864 (amd64_collect_fxsave): Likewise.
865 (amd64_collect_xsave): Likewise.
866 * arc-tdep.c (arc_write_pc): Likewise.
867 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
868 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
869 (arm_fbsd_store_inferior_registers): Likewise.
870 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
871 (store_vfp_regs): Likewise.
872 (arm_linux_fetch_inferior_registers): Likewise.
873 (arm_linux_store_inferior_registers): Likewise.
874 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
875 (arm_linux_sigreturn_next_pc): Likewise.
876 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
877 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
878 (fetch_register): Likewise.
879 (store_register): Likewise.
880 * arm-tdep.c (arm_is_thumb): Likewise.
881 (displaced_in_arm_mode): Likewise.
882 (bx_write_pc): Likewise.
883 (arm_get_next_pcs_addr_bits_remove): Likewise.
884 (arm_software_single_step): Likewise.
885 (arm_extract_return_value): Likewise.
886 (arm_store_return_value): Likewise.
887 (arm_write_pc): Likewise.
888 * bfin-tdep.c (bfin_extract_return_value): Likewise.
889 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
890 (bsd_uthread_store_registers): Likewise.
891 * core-regset.c (fetch_core_registers): Likewise.
892 * corelow.c (get_core_registers): Likewise.
893 * cris-tdep.c (cris_store_return_value): Likewise.
894 (cris_extract_return_value): Likewise.
895 (find_step_target): Likewise.
896 (find_step_target): Likewise.
897 (cris_software_single_step): Likewise.
898 * ctf.c (ctf_fetch_registers): Likewise.
899 * darwin-nat.c (cancel_breakpoint): Likewise.
900 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
901 * frv-tdep.c (frv_extract_return_value): Likewise.
902 * ft32-tdep.c (ft32_store_return_value): Likewise.
903 (ft32_extract_return_value): Likewise.
904 * go32-nat.c (fetch_register): Likewise.
905 (go32_fetch_registers): Likewise.
906 (go32_store_registers): Likewise.
907 (store_register): Likewise.
908 * h8300-tdep.c (h8300_extract_return_value): Likewise.
909 (h8300_store_return_value): Likewise.
910 * hppa-linux-nat.c (fetch_register): Likewise.
911 (store_register): Likewise.
912 (hppa_linux_fetch_inferior_registers): Likewise.
913 (hppa_linux_store_inferior_registers): Likewise.
914 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
915 (i386_darwin_store_inferior_registers): Likewise.
916 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
917 (gnu_store_registers): Likewise.
918 * i386-linux-nat.c (fetch_register): Likewise.
919 (store_register): Likewise.
920 (supply_gregset): Likewise.
921 (fill_gregset): Likewise.
922 (i386_linux_fetch_inferior_registers): Likewise.
923 (i386_linux_store_inferior_registers): Likewise.
924 (i386_linux_resume): Likewise.
925 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
926 Likewise.
927 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
928 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
929 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
930 (i386obsd_collect_uthread): Likewise.
931 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
932 (i386_supply_gregset): Likewise.
933 (i386_collect_gregset): Likewise.
934 (i386_supply_fpregset): Likewise.
935 (i386_collect_fpregset): Likewise.
936 (i386_mpx_bd_base): Likewise.
937 * i386-v4-nat.c (supply_fpregset): Likewise.
938 (fill_fpregset): Likewise.
939 * i387-tdep.c (i387_supply_fsave): Likewise.
940 (i387_collect_fsave): Likewise.
941 (i387_supply_fxsave): Likewise.
942 (i387_collect_fxsave): Likewise.
943 (i387_supply_xsave): Likewise.
944 (i387_collect_xsave): Likewise.
945 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
946 (ia64_linux_store_registers): Likewise.
947 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
948 (ia64_extract_return_value): Likewise.
949 (ia64_store_return_value): Likewise.
950 (find_func_descr): Likewise.
951 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
952 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
953 (inf_ptrace_store_registers): Likewise.
954 * infrun.c (use_displaced_stepping): Likewise.
955 (displaced_step_prepare_throw): Likewise.
956 (resume): Likewise.
957 (proceed): Likewise.
958 (do_target_wait): Likewise.
959 (adjust_pc_after_break): Likewise.
960 (handle_inferior_event_1): Likewise.
961 (handle_signal_stop): Likewise.
962 (save_infcall_suspend_state): Likewise.
963 (restore_infcall_suspend_state): Likewise.
964 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
965 * jit.c (jit_frame_prev_register): Likewise.
966 * linux-nat.c (save_stop_reason): Likewise.
967 (linux_nat_wait_1): Likewise.
968 (resume_stopped_resumed_lwps): Likewise.
969 * linux-record.c (record_linux_sockaddr): Likewise.
970 (record_linux_msghdr): Likewise.
971 (record_linux_system_call): Likewise.
972 * linux-tdep.c (linux_collect_thread_registers): Likewise.
973 * lm32-tdep.c (lm32_extract_return_value): Likewise.
974 (lm32_store_return_value): Likewise.
975 * m32c-tdep.c (m32c_read_flg): Likewise.
976 (m32c_pseudo_register_read): Likewise.
977 (m32c_pseudo_register_write): Likewise.
978 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
979 (m32r_linux_collect_gregset): Likewise.
980 * m32r-tdep.c (m32r_store_return_value): Likewise.
981 (m32r_extract_return_value): Likewise.
982 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
983 (m68kbsd_collect_fpregset): Likewise.
984 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
985 * m68k-linux-nat.c (fetch_register): Likewise.
986 (old_fetch_inferior_registers): Likewise.
987 (old_store_inferior_registers): Likewise.
988 (store_regs): Likewise.
989 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
990 (m68k_svr4_store_return_value): Likewise.
991 * m88k-tdep.c (m88k_store_arguments): Likewise.
992 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
993 (mi_cmd_data_write_register_values): Likewise.
994 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
995 (mips_fbsd_store_inferior_registers): Likewise.
996 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
997 (mips_fbsd_supply_gregs): Likewise.
998 (mips_fbsd_collect_fpregs): Likewise.
999 (mips_fbsd_collect_gregs): Likewise.
1000 (mips_fbsd_supply_fpregset): Likewise.
1001 (mips_fbsd_collect_fpregset): Likewise.
1002 (mips_fbsd_supply_gregset): Likewise.
1003 (mips_fbsd_collect_gregset): Likewise.
1004 * mips-linux-nat.c (supply_gregset): Likewise.
1005 (fill_gregset): Likewise.
1006 (supply_fpregset): Likewise.
1007 (fill_fpregset): Likewise.
1008 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1009 (mips_fill_gregset): Likewise.
1010 (mips_supply_fpregset): Likewise.
1011 (mips_fill_fpregset): Likewise.
1012 (mips64_supply_gregset): Likewise.
1013 (micromips_linux_sigframe_validate): Likewise.
1014 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1015 (mipsnbsd_fetch_inferior_registers): Likewise.
1016 (mipsnbsd_store_inferior_registers): Likewise.
1017 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1018 (mipsnbsd_supply_gregset): Likewise.
1019 (mipsnbsd_iterate_over_regset_sections): Likewise.
1020 (mipsnbsd_supply_reg): Likewise.
1021 (mipsnbsd_supply_fpreg): Likewise.
1022 * mips-tdep.c (mips_in_frame_stub): Likewise.
1023 (mips_dummy_id): Likewise.
1024 (is_octeon_bbit_op): Likewise.
1025 (micromips_bc1_pc): Likewise.
1026 (extended_mips16_next_pc): Likewise.
1027 (mips16_next_pc): Likewise.
1028 (deal_with_atomic_sequence): Likewise.
1029 * moxie-tdep.c (moxie_process_readu): Likewise.
1030 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1031 * nto-procfs.c (procfs_store_registers): Likewise.
1032 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1033 (ppcfbsd_store_inferior_registers): Likewise.
1034 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1035 (fetch_altivec_register): Likewise.
1036 (get_spe_registers): Likewise.
1037 (fetch_spe_register): Likewise.
1038 (fetch_altivec_registers): Likewise.
1039 (fetch_all_gp_regs): Likewise.
1040 (fetch_all_fp_regs): Likewise.
1041 (store_vsx_register): Likewise.
1042 (store_altivec_register): Likewise.
1043 (set_spe_registers): Likewise.
1044 (store_spe_register): Likewise.
1045 (store_altivec_registers): Likewise.
1046 (store_all_gp_regs): Likewise.
1047 (store_all_fp_regs): Likewise.
1048 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1049 (ppc_linux_collect_gregset): Likewise.
1050 (ppc_canonicalize_syscall): Likewise.
1051 (ppc_linux_record_signal): Likewise.
1052 (ppu2spu_prev_register): Likewise.
1053 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1054 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1055 (ppcobsd_store_registers): Likewise.
1056 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1057 Likewise.
1058 (ppc_ravenscar_generic_store_registers): Likewise.
1059 * procfs.c (procfs_fetch_registers): Likewise.
1060 (procfs_store_registers): Likewise.
1061 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1062 (ravenscar_store_registers): Likewise.
1063 (ravenscar_prepare_to_store): Likewise.
1064 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1065 * record-full.c (record_full_wait_1): Likewise.
1066 (record_full_registers_change): Likewise.
1067 (record_full_store_registers): Likewise.
1068 (record_full_core_fetch_registers): Likewise.
1069 (record_full_save): Likewise.
1070 (record_full_goto_insn): Likewise.
1071 * regcache.c (regcache_register_size): Likewise.
1072 (get_regcache_arch): Remove.
1073 (regcache_read_pc): Likewise.
1074 * regcache.h (get_regcache_arch): Remove.
1075 * remote-sim.c (gdbsim_fetch_register): Likewise.
1076 (gdbsim_store_register): Likewise.
1077 * remote.c (fetch_register_using_p): Likewise.
1078 (send_g_packet): Likewise.
1079 (remote_prepare_to_store): Likewise.
1080 (store_registers_using_G): Likewise.
1081 * reverse.c (save_bookmark_command): Likewise.
1082 (goto_bookmark_command): Likewise.
1083 * rs6000-aix-tdep.c (branch_dest): Likewise.
1084 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1085 (fetch_register): Likewise.
1086 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1087 (ppc_collect_reg): Likewise.
1088 (ppc_collect_gregset): Likewise.
1089 (ppc_collect_fpregset): Likewise.
1090 (ppc_collect_vsxregset): Likewise.
1091 (ppc_collect_vrregset): Likewise.
1092 (ppc_displaced_step_hw_singlestep): Likewise.
1093 (rs6000_pseudo_register_read): Likewise.
1094 (rs6000_pseudo_register_write): Likewise.
1095 * s390-linux-nat.c (supply_gregset): Likewise.
1096 (fill_gregset): Likewise.
1097 (s390_linux_fetch_inferior_registers): Likewise.
1098 * s390-linux-tdep.c (s390_write_pc): Likewise.
1099 (s390_software_single_step): Likewise.
1100 (s390_all_but_pc_registers_record): Likewise.
1101 (s390_linux_syscall_record): Likewise.
1102 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1103 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1104 (shnbsd_store_inferior_registers): Likewise.
1105 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1106 (sh_extract_return_value_fpu): Likewise.
1107 (sh_store_return_value_nofpu): Likewise.
1108 (sh_corefile_supply_regset): Likewise.
1109 (sh_corefile_collect_regset): Likewise.
1110 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1111 (sh64_store_return_value): Likewise.
1112 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1113 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1114 (sparc_store_inferior_registers): Likewise.
1115 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1116 (sparc_ravenscar_prepare_to_store): Likewise.
1117 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1118 (sparc_analyze_control_transfer): Likewise.
1119 (sparc_step_trap): Likewise.
1120 (sparc_software_single_step): Likewise.
1121 (sparc32_gdbarch_init): Likewise.
1122 (sparc_supply_rwindow): Likewise.
1123 (sparc_collect_rwindow): Likewise.
1124 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1125 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1126 (sparc64nbsd_collect_gregset): Likewise.
1127 (sparc64nbsd_supply_fpregset): Likewise.
1128 (sparc64nbsd_collect_fpregset): Likewise.
1129 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1130 (sparc64_supply_gregset): Likewise.
1131 (sparc64_collect_gregset): Likewise.
1132 (sparc64_supply_fpregset): Likewise.
1133 (sparc64_collect_fpregset): Likewise.
1134 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1135 * spu-tdep.c (spu_unwind_sp): Likewise.
1136 (spu2ppu_prev_register): Likewise.
1137 (spu_memory_remove_breakpoint): Likewise.
1138 * stack.c (return_command): Likewise.
1139 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1140 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1141 * tracefile.c (trace_save_ctf): Likewise.
1142 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1143 (do_windows_store_inferior_registers): Likewise.
1144 (windows_resume): Likewise.
1145 * xtensa-linux-nat.c (fill_gregset): Likewise.
1146 (supply_gregset_reg): Likewise.
1147 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1148 (xtensa_register_read_masked): Likewise.
1149 (xtensa_supply_gregset): Likewise.
1150 (xtensa_extract_return_value): Likewise.
1151 (xtensa_store_return_value): Likewise.
1152
1153 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
1154
1155 * doublest.c (floatformat_from_string): New function.
1156 * doublest.h (floatformat_from_string): Add prototype.
1157
1158 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1159 (OP_FLOAT): ... this.
1160 * expression.h: Do not include "doublest.h".
1161 (union exp_element): Replace doubleconst and decfloatconst by
1162 new element floatconst.
1163 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1164 (ada_evaluate_subexp): Likewise.
1165 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1166 OP_DOUBLE and OP_DECFLOAT.
1167 * expprint.c (print_subexp_standard): Likewise.
1168 (dump_subexp_body_standard): Likewise.
1169 * breakpoint.c (watchpoint_exp_is_const): Likewise.
1170
1171 * parse.c: Include "dfp.h".
1172 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1173 (write_exp_elt_floatcst): New function.
1174 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1175 and OP_DECFLOAT.
1176 (operator_check_standard): Likewise.
1177 (parse_float): Do not accept suffix. Take type as input. Return bool.
1178 Return target format buffer instead of host DOUBLEST.
1179 Use floatformat_from_string and decimal_from_string to parse
1180 either binary or decimal floating-point types.
1181 (parse_c_float): Remove.
1182 * parser-defs.h: Do not include "doublest.h".
1183 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1184 (write_exp_elt_floatcst): Add prototype.
1185 (parse_float): Update prototype.
1186 (parse_c_float): Remove.
1187
1188 * c-exp.y: Do not include "dfp.h".
1189 (typed_val_float): Use byte buffer instead of DOUBLEST.
1190 (typed_val_decfloat): Remove.
1191 (DECFLOAT): Remove.
1192 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1193 (parse_number): Update to new parse_float interface.
1194 Parse suffixes and determine type before calling parse_float.
1195 Handle decimal and binary FP types the same way.
1196
1197 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1198 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1199 (parse_number): Update to new parse_float interface.
1200 Parse suffixes and determine type before calling parse_float.
1201
1202 * f-exp.y: Replace dval by typed_val_float.
1203 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1204 (parse_number): Use parse_float instead of atof.
1205
1206 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1207 (parse_go_float): Remove.
1208 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1209 (parse_number): Call parse_float instead of parse_go_float.
1210 Parse suffixes and determine type before calling parse_float.
1211
1212 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1213 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1214 (parse_number): Update to new parse_float interface.
1215 Parse suffixes and determine type before calling parse_float.
1216
1217 * m2-exp.y: Replace dval by byte buffer val.
1218 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1219 (parse_number): Call parse_float instead of atof.
1220
1221 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1222 (lex_number): Call parse_float instead of strtod.
1223 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1224 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1225 Use write_exp_elt_floatcst.
1226 (unit_testing): Remove static variable.
1227 (rust_type): Do not check unit_testing.
1228 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
1229
1230 * ada-exp.y (type_float, type_double): Remove.
1231 (typed_val_float): Use byte buffer instead of DOUBLEST.
1232 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1233 * ada-lex.l (processReal): Use parse_float instead of sscanf.
1234
1235 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1236
1237 * aarch64-tdep.h (enum aarch64_regnum): Remove.
1238 * arch/aarch64.h: New file.
1239
1240 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1241
1242 * dfp.h (decimal_from_string): Use const reference for argument.
1243 * dfp.c (decimal_from_string): Likewise.
1244
1245 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1246
1247 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1248 * sh64-tdep.c (sh64_do_fp_register): Likewise.
1249 * mips-tdep.c (mips_print_fp_register): Likewise.
1250
1251 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1252
1253 * common/format.h (enum argclass): Replace decfloat_arg by
1254 dec32float_arg, dec64float_arg, and dec128float_arg.
1255 * common/format.c (parse_format_string): Update to return
1256 new decimal float argument classes.
1257
1258 * printcmd.c (printf_decfloat): Rename to ...
1259 (printf_floating): ... this. Add argclass argument, and use it
1260 instead of parsing the format string again. Add support for
1261 binary floating-point values, using floatformat_to_string.
1262 Convert value to the target format if it doesn't already match.
1263 (ui_printf): Call printf_floating instead of printf_decfloat,
1264 also for double_arg / long_double_arg. Pass argclass.
1265
1266 * dfp.c (decimal_to_string): Add format string argument.
1267 * dfp.h (decimal_to_string): Likewise.
1268
1269 * doublest.c (floatformat_to_string): Add format string argument.
1270 * doublest.h (floatformat_to_string): Likewise.
1271
1272 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1273
1274 * doublest.c (floatformat_precision): New routine.
1275 (floatformat_to_string): Likewise.
1276 * doublest.c (floatformat_to_string): Add prototype.
1277
1278 * printcmd.c (print_scalar_formatted): Only call print_floating
1279 on floating-point types.
1280 * valprint.c: Do not include "floatformat.h".
1281 (generic_val_print_decfloat): Remove.
1282 (generic_val_print): Call generic_val_print_float for both
1283 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1284 (print_floating): Use floatformat_to_string. Handle decimal float.
1285 (print_decimal_floating): Remove, merge into floatformat_to_string.
1286 * value.h (print_decimal_floating): Remove.
1287
1288 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1289
1290 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1291
1292 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1293
1294 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1295
1296 * memattr.h: Don't include vec.h.
1297 (struct mem_attrib): Initialize fields.
1298 <unknown>: New static method.
1299 (struct mem_region): Add constructors, operator<, initialize
1300 fields.
1301 * memattr.c: Include algorithm.
1302 (default_mem_attrib, unknown_mem_attrib): Remove.
1303 (user_mem_region_list): New global.
1304 (target_mem_region_list, mem_region_list): Change type to
1305 std::vector<mem_region>.
1306 (mem_use_target): Now a function.
1307 (target_mem_regions_valid): Change type to bool.
1308 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1309 (require_user_regions): Adjust.
1310 (require_target_regions): Adjust.
1311 (create_mem_region): Adjust.
1312 (lookup_mem_region): Adjust.
1313 (invalidate_target_mem_regions): Adjust.
1314 (mem_clear): Rename to...
1315 (user_mem_clear): ... this, and adjust.
1316 (mem_command): Adjust.
1317 (info_mem_command): Adjust.
1318 (mem_enable, enable_mem_command, mem_disable,
1319 disable_mem_command): Adjust.
1320 (mem_delete): Adjust.
1321 (delete_mem_command): Adjust.
1322 * memory-map.h (parse_memory_map): Return an std::vector.
1323 * memory-map.c (parse_memory_map): Likewise.
1324 (struct memory_map_parsing_data): Add constructor.
1325 <memory_map>: Point to std::vector.
1326 (memory_map_start_memory): Adjust.
1327 (memory_map_end_memory): Adjust.
1328 (memory_map_end_property): Adjust.
1329 (clear_result): Remove.
1330 * remote.c (remote_memory_map): Return an std::vector.
1331 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1332 Remove.
1333 (target_debug_print_mem_region_vector): New.
1334 * target-delegates.c: Regenerate.
1335 * target.h (mem_region_vector): New typedef.
1336 (to_memory_map): Return mem_region_vector.
1337 (target_memory_map): Return an std::vector.
1338 * target.c (target_memory_map): Return an std::vector.
1339 (flash_erase_command): Adjust.
1340
1341 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1342
1343 * memory-map.c (struct memory_map_parsing_data) <property_name>:
1344 Change type to std::string.
1345 (memory_map_start_property): Adjust.
1346 (memory_map_end_property): Adjust.
1347
1348 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1349
1350 * infrun.h: Include common/byte-vector.h.
1351 (struct displaced_step_closure): New struct.
1352 (struct buf_displaced_step_closure): New struct.
1353 * infrun.c (displaced_step_closure::~displaced_step_closure):
1354 Provide default implementation.
1355 (displaced_step_clear): Deallocate step closure with delete.
1356 * aarch64-tdep.c (displaced_step_closure): Rename to ...
1357 (aarch64_displaced_step_closure): ... this, extend
1358 displaced_step_closure.
1359 (aarch64_displaced_step_data) <dsc>: Change type to
1360 aarch64_displaced_step_closure.
1361 (aarch64_displaced_step_copy_insn): Adjust to type change, use
1362 unique_ptr.
1363 (aarch64_displaced_step_fixup): Add cast for displaced step
1364 closure.
1365 * amd64-tdep.c (displaced_step_closure): Rename to ...
1366 (amd64_displaced_step_closure): ... this, extend
1367 displaced_step_closure.
1368 <insn_buf>: Change type to std::vector<gdb_byte>.
1369 <max_len>: Remove.
1370 (fixup_riprel): Change type of DSC parameter, adjust to type
1371 change of insn_buf.
1372 (fixup_displaced_copy): Change type of DSC parameter.
1373 (amd64_displaced_step_copy_insn): Instantiate
1374 amd64_displaced_step_closure.
1375 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1376 to type change of insn_buf.
1377 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1378 parameter DSC.
1379 (arm_linux_copy_svc): Likewise.
1380 (cleanup_kernel_helper_return): Likewise.
1381 (arm_catch_kernel_helper_return): Likewise.
1382 (arm_linux_displaced_step_copy_insn): Instantiate
1383 arm_displaced_step_closure.
1384 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1385 (displaced_read_reg): Change type of parameter DSC.
1386 (branch_write_pc): Likewise.
1387 (load_write_pc): Likewise.
1388 (alu_write_pc): Likewise.
1389 (displaced_write_reg): Likewise.
1390 (arm_copy_unmodified): Likewise.
1391 (thumb_copy_unmodified_32bit): Likewise.
1392 (thumb_copy_unmodified_16bit): Likewise.
1393 (cleanup_preload): Likewise.
1394 (install_preload): Likewise.
1395 (arm_copy_preload): Likewise.
1396 (thumb2_copy_preload): Likewise.
1397 (install_preload_reg): Likewise.
1398 (arm_copy_preload_reg): Likewise.
1399 (cleanup_copro_load_store): Likewise.
1400 (install_copro_load_store): Likewise.
1401 (arm_copy_copro_load_store) Likewise.
1402 (thumb2_copy_copro_load_store): Likewise.
1403 (cleanup_branch): Likewise.
1404 (install_b_bl_blx): Likewise.
1405 (arm_copy_b_bl_blx): Likewise.
1406 (thumb2_copy_b_bl_blx): Likewise.
1407 (thumb_copy_b): Likewise.
1408 (install_bx_blx_reg): Likewise.
1409 (arm_copy_bx_blx_reg): Likewise.
1410 (thumb_copy_bx_blx_reg): Likewise.
1411 (cleanup_alu_imm): Likewise.
1412 (arm_copy_alu_imm): Likewise.
1413 (thumb2_copy_alu_imm): Likewise.
1414 (cleanup_alu_reg): Likewise.
1415 (install_alu_reg): Likewise.
1416 (arm_copy_alu_reg): Likewise.
1417 (thumb_copy_alu_reg): Likewise.
1418 (cleanup_alu_shifted_reg): Likewise.
1419 (install_alu_shifted_reg): Likewise.
1420 (arm_copy_alu_shifted_reg): Likewise.
1421 (cleanup_load): Likewise.
1422 (cleanup_store): Likewise.
1423 (arm_copy_extra_ld_st): Likewise.
1424 (install_load_store): Likewise.
1425 (thumb2_copy_load_literal): Likewise.
1426 (thumb2_copy_load_reg_imm): Likewise.
1427 (arm_copy_ldr_str_ldrb_strb): Likewise.
1428 (cleanup_block_load_all): Likewise.
1429 (cleanup_block_store_pc): Likewise.
1430 (cleanup_block_load_pc): Likewise.
1431 (arm_copy_block_xfer): Likewise.
1432 (thumb2_copy_block_xfer): Likewise.
1433 (cleanup_svc): Likewise.
1434 (install_svc): Likewise.
1435 (arm_copy_svc): Likewise.
1436 (thumb_copy_svc): Likewise.
1437 (arm_copy_undef): Likewise.
1438 (thumb_32bit_copy_undef): Likewise.
1439 (arm_copy_unpred): Likewise.
1440 (arm_decode_misc_memhint_neon): Likewise.
1441 (arm_decode_unconditional): Likewise.
1442 (arm_decode_miscellaneous): Likewise.
1443 (arm_decode_dp_misc): Likewise.
1444 (arm_decode_ld_st_word_ubyte): Likewise.
1445 (arm_decode_media): Likewise.
1446 (arm_decode_b_bl_ldmstm): Likewise.
1447 (arm_decode_ext_reg_ld_st): Likewise.
1448 (thumb2_decode_dp_shift_reg): Likewise.
1449 (thumb2_decode_ext_reg_ld_st): Likewise.
1450 (arm_decode_svc_copro): Likewise.
1451 (thumb2_decode_svc_copro): Likewise.
1452 (install_pc_relative): Likewise.
1453 (thumb_copy_pc_relative_16bit): Likewise.
1454 (thumb_decode_pc_relative_16bit): Likewise.
1455 (thumb_copy_pc_relative_32bit): Likewise.
1456 (thumb_copy_16bit_ldr_literal): Likewise.
1457 (thumb_copy_cbnz_cbz): Likewise.
1458 (thumb2_copy_table_branch): Likewise.
1459 (cleanup_pop_pc_16bit_all): Likewise.
1460 (thumb_copy_pop_pc_16bit): Likewise.
1461 (thumb_process_displaced_16bit_insn): Likewise.
1462 (decode_thumb_32bit_ld_mem_hints): Likewise.
1463 (thumb_process_displaced_32bit_insn): Likewise.
1464 (thumb_process_displaced_insn): Likewise.
1465 (arm_process_displaced_insn): Likewise.
1466 (arm_displaced_init_closure): Likewise.
1467 (arm_displaced_step_fixup): Add cast for closure.
1468 * arm-tdep.h: Include infrun.h.
1469 (displaced_step_closure): Rename to ...
1470 (arm_displaced_step_closure): ... this, extend
1471 displaced_step_closure.
1472 <u::svc::copy_svc_os>: Change type of parameter DSC.
1473 <cleanup>: Likewise.
1474 (arm_process_displaced_insn): Likewise.
1475 (arm_displaced_init_closure): Likewise.
1476 (displaced_read_reg): Likewise.
1477 (displaced_write_reg): Likewise.
1478 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1479 Adjust.
1480 * i386-tdep.h: Include infrun.h.
1481 (i386_displaced_step_closure): New typedef.
1482 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1483 i386_displaced_step_closure.
1484 (i386_displaced_step_fixup): Adjust.
1485 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1486 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1487 and unique_ptr.
1488 (ppc_displaced_step_fixup): Adjust.
1489 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1490 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1491 and unique_ptr.
1492 (s390_displaced_step_fixup): Adjust.
1493
1494 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1495
1496 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1497 Remove declarations.
1498
1499 2017-10-20 Tom Tromey <tom@tromey.com>
1500
1501 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1502 std::vector.
1503 (gdb_bfd_record_inclusion): Update.
1504 (bfdp): Remove typedef.
1505
1506 2017-10-20 Tom Tromey <tom@tromey.com>
1507
1508 * gdb_bfd.c (gdb_bfd_ref): Use new.
1509 (struct gdb_bfd_data): Add constructor, destructor, and member
1510 initializers.
1511 (gdb_bfd_unref): Use delete.
1512
1513 2017-10-20 Tom Tromey <tom@tromey.com>
1514
1515 * exec.c (exec_file_attach): Use new_bfd_ref.
1516 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1517 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1518 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1519 new_bfd_ref.
1520 * gdb_bfd.h (new_bfd_ref): New function.
1521
1522 2017-10-20 Pedro Alves <palves@redhat.com>
1523
1524 * main.c (captured_command_loop): Add attribute noinline.
1525
1526 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1527
1528 * interps.c (struct interp_factory): Add constructor.
1529 (interp_factory_p): Remove typedef.
1530 (DEF_VEC_P(interp_factory_p)): Remove.
1531 (interpreter_factories): Change type to std::vector.
1532 (interp_factory_register): Adjust.
1533 (interp_lookup): Adjust.
1534 (interpreter_completer): Adjust.
1535
1536 2017-10-19 Tom Tromey <tom@tromey.com>
1537
1538 * break-catch-syscall.c (catch_syscall_completer): Use
1539 std::string, gdb::unique_xmalloc_ptr.
1540
1541 2017-10-19 Tom Tromey <tom@tromey.com>
1542
1543 * infcall.c (call_function_by_hand_dummy): Use std::string.
1544
1545 2017-10-19 Tom Tromey <tom@tromey.com>
1546
1547 * mi/mi-main.c (mi_cmd_execute): Update.
1548 * top.h (prepare_execute_command): Return scoped_value_mark.
1549 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1550 Add move constructor.
1551 * top.c (prepare_execute_command): Return scoped_value_mark.
1552 (execute_command): Update.
1553
1554 2017-10-19 Pedro Alves <palves@redhat.com>
1555
1556 * xml-support.c (xml_fetch_content_from_file): Check fread's
1557 return.
1558
1559 2017-10-19 Pedro Alves <palves@redhat.com>
1560
1561 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1562 async.
1563 (handle_error_fd): New function.
1564 (ser_base_async): Add/delete an event loop file handler for
1565 error_fd.
1566
1567 2017-10-19 Pedro Alves <palves@redhat.com>
1568
1569 * xml-support.c (xml_fetch_content_from_file): Don't read in
1570 chunks. Instead use fseek to determine the file's size, and read
1571 it in one go.
1572
1573 2017-11-18 Keith Seitz <keiths@redhat.com>
1574
1575 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1576 types.
1577 Add whitespace to front of type name.
1578
1579 2017-10-18 Keith Seitz <keiths@redhat.com>
1580
1581 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1582 DW_AT_accessibility.
1583
1584 2017-10-18 Yao Qi <yao.qi@linaro.org>
1585
1586 * features/tic6x-c62x-linux.c: Remove.
1587
1588 2017-10-17 Tom Tromey <tom@tromey.com>
1589
1590 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1591 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1592 (do_mixed_source_and_assembly): Likewise.
1593
1594 2017-10-17 Tom Tromey <tom@tromey.com>
1595
1596 * regcache.c (regcache::xfer_part): Remove assertion.
1597
1598 2017-10-17 Pedro Alves <palves@redhat.com>
1599
1600 * xml-support.c (xml_fetch_content_from_file): Call
1601 unique_ptr::release() instead unique_ptr::get() when passing
1602 through xrealloc.
1603
1604 2017-10-17 Yao Qi <yao.qi@linaro.org>
1605
1606 * regcache.c (regcache::xfer_part): Remove parameters read and
1607 write, add parameter is_raw. All callers are updated.
1608
1609 2017-10-16 Keith Seitz <keiths@redhat.com>
1610
1611 * c-typeprint.c (enum access_specifier): Moved here from
1612 c_type_print_base.
1613 (output_access_specifier): New function.
1614 (c_type_print_base): Consider typedefs when assessing
1615 whether access labels are needed.
1616 Use output_access_specifier as needed.
1617 Output access specifier for typedefs, if needed.
1618 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1619 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1620 fields.
1621 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1622 accessor macros.
1623
1624 2017-10-16 Tom Tromey <tom@tromey.com>
1625
1626 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1627 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1628 * target.c (target_fileio_read_stralloc): Update.
1629 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1630 * target.h (target_fileio_read_stralloc): Return
1631 unique_xmalloc_ptr.
1632
1633 2017-10-16 Tom Tromey <tom@tromey.com>
1634
1635 * xml-syscall.c (xml_init_syscalls_info): Update.
1636 * xml-support.c (xinclude_start_include): Update.
1637 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1638 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1639 (xml_fetch_content_from_file): Likewise.
1640 * osdata.c (get_osdata): Update.
1641 * target.h (target_read_stralloc, target_get_osdata): Return
1642 unique_xmalloc_ptr.
1643 * solib-aix.c (solib_aix_get_library_list): Update.
1644 * solib-target.c (solib_target_current_sos): Update.
1645 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1646 * xml-tdesc.c (fetch_available_features_from_target): Update.
1647 (target_fetch_description_xml): Update.
1648 (file_read_description_xml): Update.
1649 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1650 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1651 (remote_pid_to_exec_file): Update.
1652 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1653 (target_get_osdata): Likewise.
1654
1655 2017-10-16 Tom Tromey <tom@tromey.com>
1656
1657 * remote.c (remote_register_number_and_offset): Use std::vector.
1658 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1659 (putpkt_binary): Use gdb::def_vector.
1660 (compare_sections_command): Use gdb::byte_vector.
1661
1662 2017-10-16 Tom Tromey <tom@tromey.com>
1663
1664 * ppc-linux-nat.c (hwdebug_insert_point): Use
1665 gdb::unique_xmalloc_ptr, XDUP.
1666
1667 2017-10-16 Tom Tromey <tom@tromey.com>
1668
1669 * probe.c (parse_probes): Use std::string.
1670 (info_probes_for_ops, enable_probes_command)
1671 (disable_probes_command): Remove cleanups.
1672
1673 2017-10-16 Tom Tromey <tom@tromey.com>
1674
1675 * buildsym.c (block_compar): Remove.
1676 (end_symtab_get_static_block): Use std::vector.
1677
1678 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1679
1680 * memrange.h (struct mem_range): Define operator< and operator==.
1681 (mem_range_s): Remove.
1682 (DEF_VEC_O (mem_range_s)): Remove.
1683 (normalize_mem_ranges): Change parameter type to std::vector.
1684 * memrange.c (compare_mem_ranges): Remove.
1685 (normalize_mem_ranges): Change parameter type to std::vector,
1686 adjust to vector change.
1687 * exec.c (section_table_available_memory): Return vector, remove
1688 parameter.
1689 (section_table_read_available_memory): Adjust to std::vector
1690 change.
1691 * remote.c (remote_read_bytes): Adjust to std::vector
1692 change.
1693 * tracepoint.h (traceframe_available_memory): Change parameter
1694 type to std::vector.
1695 * tracepoint.c (traceframe_available_memory): Change parameter
1696 type to std::vector, adjust.
1697 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1698 std::vector change.
1699 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1700 unittests/memrange-selftests.c.
1701 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1702 * gdb/unittests/memrange-selftests.c: New file.
1703
1704 2017-10-16 Pedro Alves <palves@redhat.com>
1705
1706 * elfread.c (probe_key_free): Rename range-for variable.
1707 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1708 (find_probe_by_pc, collect_probes): Rename range-for variable.
1709
1710 2017-10-16 Yao Qi <yao.qi@linaro.org>
1711
1712 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1713 * features/tic6x-c62x.c: Remove.
1714 * features/tic6x-c64x-linux.c: Remove.
1715 * features/tic6x-c64x.c: Remove.
1716 * features/tic6x-c64xp-linux.c: Remove.
1717 * features/tic6x-c64xp.c: Remove.
1718 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1719 initialize_tdesc_tic6x_*_linux functions.
1720 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1721 initialize_tdesc_tic6x_* functions.
1722
1723 2017-10-16 Yao Qi <yao.qi@linaro.org>
1724
1725 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1726 tic6x-c62x.
1727 * regformats/tic6x-c62x.dat: Remove.
1728 * regformats/tic6x-c64x.dat: Remove.
1729 * regformats/tic6x-c64xp.dat: Remove.
1730
1731 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1732
1733 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1734 (the !HAVE_LIBEXPAT version).
1735
1736 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1737
1738 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1739 const.
1740
1741 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1742
1743 * target.h: Include tracepoint.h.
1744 (enum trace_find_type): Move to tracepoint.h.
1745 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1746 * tracepoint.h: Don't include target.h
1747 (enum trace_find_type): Move from target.h.
1748 (parse_traceframe_info): Return a unique ptr.
1749 * tracepoint.c (current_traceframe_info): Change type to unique
1750 ptr.
1751 (free_traceframe_info): Remove.
1752 (clear_traceframe_info): Don't manually free
1753 current_traceframe_info.
1754 (free_result): Remove.
1755 (parse_traceframe_info): Return a unique ptr.
1756 (get_traceframe_info): Adjust to unique ptr.
1757 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1758 * remote.c (remote_traceframe_info): Return a unique ptr.
1759 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1760 ptr.
1761 * target-debug.h (target_debug_print_traceframe_info_up): New
1762 macro.
1763 * target-delegates.c: Regenerate.
1764
1765 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1766
1767 * memrange.h (struct mem_range): Add constructors.
1768 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1769 std::vector<mem_range>.
1770 * tracepoint.c (free_traceframe_info): Don't manually free
1771 vector.
1772 (traceframe_info_start_memory): Adjust to vector change.
1773 (traceframe_available_memory): Likewise.
1774 * tracefile-tfile.c (build_traceframe_info): Likewise.
1775 * ctf.c (ctf_traceframe_info): Likewise.
1776
1777 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1778
1779 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1780 std::vector<int>.
1781 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1782 (traceframe_info_start_tvar): Adjust to vector change.
1783 (parse_traceframe_info): Allocate with new.
1784 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1785 vector change.
1786 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1787 change.
1788 tfile_traceframe_info): Allocate with new.
1789 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1790 change.
1791
1792 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1793
1794 * tracepoint.c (traceframe_info): Rename to...
1795 (current_traceframe_info): ...this.
1796 (clear_traceframe_info): Adjust.
1797 (get_traceframe_info): Adjust.
1798
1799 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1800
1801 * nat/linux-osdata.c: Include algorithm.
1802 (compare_processes): Remove.
1803 (struct pid_pgid_entry): New struct.
1804 (linux_xfer_osdata_processgroups): Use std::vector instead of
1805 XNEWVEC.
1806
1807 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1808
1809 * objfiles.h: Don't include symfile.h.
1810 (struct partial_symbol): Remove forward-declaration.
1811 (struct objfile) <global_psymbols, static_psymbols>: Change type
1812 to std::vector<partial_symbol *>.
1813 * objfiles.c (objfile::objfile): Don't memset those fields.
1814 (objfile::~objfile): Don't free those fields.
1815 * psympriv.h (struct psymbol_allocation_list): Remove
1816 forward-declaration.
1817 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1818 to std::vector.
1819 (start_psymtab_common): Change parameters to std::vector.
1820 * psymtab.c: Include algorithm.
1821 (require_partial_symbols): Call shrink_to_fit.
1822 (find_pc_sect_psymbol): Adjust to vector change.
1823 (match_partial_symbol): Likewise.
1824 (lookup_partial_symbol): Likewise.
1825 (psym_relocate): Likewise.
1826 (dump_psymtab): Likewise.
1827 (recursively_search_psymtabs): Likewise.
1828 (compare_psymbols): Remove.
1829 (sort_pst_symbols): Adjust to vector change.
1830 (start_psymtab_common): Likewise.
1831 (end_psymtab_common): Likewise.
1832 (psymbol_bcache_full): De-constify return value.
1833 (add_psymbol_to_bcache): Likewise.
1834 (extend_psymbol_list): Remove.
1835 (append_psymbol_to_list): Adjust to vector change.
1836 (add_psymbol_to_list): Likewise.
1837 (init_psymbol_list): Likewise.
1838 (maintenance_info_psymtabs): Likewise.
1839 (maintenance_check_psymtabs): Likewise.
1840 * symfile.h (struct psymbol_allocation_list): Remove.
1841 * symfile.c (reread_symbols): Adjust to vector change.
1842 * dbxread.c (start_psymtab): Change type of parameters.
1843 (dbx_symfile_read): Adjust to vector change.
1844 (read_dbx_symtab): Likewise.
1845 (start_psymtab): Change type of parameters.
1846 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1847 (create_partial_symtab): Likewise.
1848 (add_partial_symbol): Likewise.
1849 (write_one_signatured_type): Likewise.
1850 (recursively_write_psymbols): Likewise.
1851 * mdebugread.c (parse_partial_symbols): Likewise.
1852 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1853 (scan_xcoff_symtab): Adjust to vector change.
1854 (xcoff_initial_scan): Likewise.
1855
1856 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1857
1858 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1859
1860 2017-10-13 Yao Qi <yao.qi@linaro.org>
1861
1862 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1863 Remove s390x-*-expedite, add s390x-expedite.
1864
1865 2017-10-13 Yao Qi <yao.qi@linaro.org>
1866
1867 * features/s390-gs-linux64.c: Regenerated.
1868 * features/s390x-gs-linux64.c: Regenerated.
1869
1870 2017-10-13 Tom Tromey <tom@tromey.com>
1871
1872 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1873 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1874 delete.
1875 * symfile.c (symbol_file_add_with_addrs): Use new.
1876 (symbol_file_add_separate): Update comment.
1877 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1878 * jit.c (jit_object_close_impl): Use new.
1879 (jit_unregister_code): Use delete.
1880 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1881 (~objfile): Rename from free_objfile.
1882 (free_objfile_separate_debug, do_free_objfile_cleanup)
1883 (free_all_objfiles, objfile_purge_solibs): Use delete.
1884 * objfiles.h (struct objfile): Add constructor and destructor.
1885 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1886 (allocate_objfile, free_objfile): Don't declare.
1887 (struct objstats): Add initializers.
1888
1889 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1890
1891 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1892 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1893 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1894 * gdbarch.h: Regenerate.
1895 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1896 Adjust comment.
1897 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1898 (i386_displaced_step_fixup): Adjust comment.
1899 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1900
1901 2017-10-12 Tom Tromey <tom@tromey.com>
1902
1903 * prologue-value.h (pv_area::store_would_trash): Return bool.
1904 (pv_area::find_reg): Likewise.
1905 * prologue-value.c (pv_area::store_would_trash): Return bool.
1906 (pv_area::find_reg): Likewise.
1907
1908 2017-10-12 Tom Tromey <tom@tromey.com>
1909
1910 * s390-linux-tdep.c (s390_store, s390_load)
1911 (s390_check_for_saved, s390_analyze_prologue): Update.
1912 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1913 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1914 * prologue-value.h (class pv_area): Move from prologue-value.c.
1915 Change names of members. Add constructor, destructor, member
1916 functions.
1917 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1918 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1919 (pv_area_fetch, pv_area_scan): Don't declare.
1920 * prologue-value.c (struct pv_area::area_entry): Now member of
1921 pv_area.
1922 (struct pv_area): Move to prologue-value.h.
1923 (pv_area::pv_area): Rename from make_pv_area.
1924 (pv_area::~pv_area): Rename from free_pv_area.
1925 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1926 (clear_entries, find_entry, overlaps, store_would_trash, store)
1927 (fetch, find_reg, scan): Now member of pv_area.
1928 Remove "area" argument. Update.
1929 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1930 Update.
1931 * mn10300-tdep.c (push_reg, check_for_saved)
1932 (mn10300_analyze_prologue): Update.
1933 * mep-tdep.c (is_arg_spill, check_for_saved)
1934 (mep_analyze_prologue): Update.
1935 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1936 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1937 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1938 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1939 Update.
1940 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1941 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1942
1943 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1944
1945 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1946 * linux-nat.c (linux_nat_delete_thread): New variable.
1947 (lwp_free): Invoke linux_nat_delete_thread if set.
1948 (linux_nat_set_delete_thread): New function.
1949 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1950 thread delete callback.
1951 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1952 (_initialize_arm_linux_nat): Assign thread delete callback.
1953 * s390-linux-nat.c (s390_delete_thread): New function.
1954 (_initialize_s390_nat): Assign thread delete callback.
1955 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1956 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1957 function.
1958 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1959 declaration.
1960 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1961 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1962
1963 2017-10-09 Tom Tromey <tom@tromey.com>
1964
1965 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1966 std::string.
1967 * tui/tui-layout.c (enum tui_status): Use std::string.
1968
1969 2017-10-11 Tom Tromey <tom@tromey.com>
1970
1971 * gdbthread.h (thread_command): Constify.
1972 * inferior.h (detach_command): Constify.
1973 * top.h (set_history, show_history): Constify.
1974 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1975 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1976 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1977 * printcmd.c (set_command): Constify.
1978 (non_const_set_command): New function.
1979 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1980 * breakpoint.c (enable_command, disable_command, delete_command)
1981 (catch_command, tcatch_command, set_breakpoint_cmd)
1982 (show_breakpoint_cmd): Constify.
1983 * macrocmd.c (macro_command): Constify.
1984 * infcmd.c (unset_command, kill_command, detach_command)
1985 (info_proc_cmd): Constify.
1986 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1987 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1988 (info_auto_load_cmd): Constify.
1989 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1990 (unset_tdesc_cmd): Constify.
1991 * ada-lang.c (set_ada_command, show_ada_command)
1992 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1993 * guile/guile.c (set_guile_command, show_guile_command)
1994 (info_guile_command): Constify.
1995 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1996 Constify.
1997 * skip.c (skip_command): Constify.
1998 * compile/compile.c (_initialize_compile): Constify.
1999 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2000 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2001 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2002 (maint_btrace_pt_show_cmd): Constify.
2003 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2004 Constify.
2005 * python/python.c (user_show_python, user_set_python): Constify.
2006 * mips-tdep.c (set_mips_command, show_mips_command)
2007 (set_mipsfpu_command): Constify.
2008 * record-btrace.c (cmd_record_btrace_start)
2009 (cmd_set_record_btrace, cmd_show_record_btrace)
2010 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2011 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2012 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2013 Constify.
2014 * symfile.c (overlay_command): Constify.
2015 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2016 * cli/cli-logging.c (set_logging_command, show_logging_command):
2017 Constify.
2018 * cli/cli-dump.c (dump_command, append_command)
2019 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2020 (tekhex_dump_command, binary_dump_command)
2021 (binary_append_command): Constify.
2022 * cli/cli-decode.c (struct cmd_list_element): Change type of
2023 "fun".
2024 * cli/cli-cmds.c (info_command, show_command, set_debug)
2025 (show_debug): Constify.
2026 (show_command): Add non-const overload.
2027 * top.c (set_history, show_history): Constify.
2028 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2029 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2030 * target.c (target_command): Constify.
2031 * sparc64-tdep.c (info_adi_command): Constify.
2032 * record-full.c (cmd_record_full_start): Constify.
2033 (set_record_full_command): Constify. Fix typo.
2034 (show_record_full_command): Constify.
2035 * thread.c (thread_command, thread_apply_command): Constify.
2036 * memattr.c (dummy_cmd): Constify.
2037 * value.c (function_command): Constify.
2038 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2039 * probe.c (info_probes_command): Constify.
2040 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2041 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2042 (show_thread_cmd, set_thread_default_cmd)
2043 (show_thread_default_cmd): Constify.
2044 (check_empty): Constify.
2045 * tracepoint.c (tfind_command): Constify.
2046 * cp-support.c (maint_cplus_command): Constify.
2047 * windows-tdep.c (info_w32_command): Constify.
2048 * record.c (cmd_record_start, set_record_command)
2049 (show_record_command, info_record_command, cmd_record_goto):
2050 Constify.
2051 * ravenscar-thread.c (set_ravenscar_command)
2052 (show_ravenscar_command): Constify.
2053 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2054 Constify.
2055 (add_internal_problem_command): Remove casts.
2056 * arc-tdep.c (maintenance_print_arc_command): Constify.
2057 * valprint.c (set_print, show_print, set_print_raw)
2058 (show_print_raw): Constify.
2059 * maint.c (maintenance_command, maintenance_info_command)
2060 (maintenance_print_command, maintenance_set_cmd)
2061 (maintenance_show_cmd, set_per_command_cmd)
2062 (show_per_command_cmd, maintenance_check_command): Constify.
2063 * language.c (set_check, show_check): Constify.
2064 * typeprint.c (show_print_type, set_print_type): Constify.
2065 * go32-nat.c (go32_info_dos_command): Constify.
2066
2067 2017-10-11 Tom Tromey <tom@tromey.com>
2068
2069 * breakpoint.c (prepare_re_set_context): Remove.
2070 (breakpoint_re_set_one): Update. Don't use cleanups.
2071 (breakpoint_re_set): Use scoped_restore, std::string, and
2072 scoped_restore_current_language.
2073
2074 2017-10-11 Tom Tromey <tom@tromey.com>
2075
2076 * breakpoint.c (commands_command_1): Use std::string.
2077 (cleanup_executing_breakpoints): Remove.
2078 (bpstat_do_actions_1): Use scoped_restore.
2079 (bpstat_check_watchpoint): Use std::string.
2080 (decode_static_tracepoint_spec): Likewise.
2081 (break_range_command): Likewise.
2082 (watch_command_1): Likewise.
2083 (compare_breakpoints): Change argument types.
2084 (clear_command): Use std::vector.
2085 (cleanup_executing_breakpoints): Remove.
2086 (update_global_location_list): Use unique_xmalloc_ptr.
2087 (strace_command): Remove unused declaration.
2088
2089 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2090
2091 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2092 * NEWS: Mention new FreeBSD/arm native configuration.
2093 * configure.host: Add arm*-*-freebsd*.
2094 * configure.nat: Likewise.
2095 * arm-fbsd-nat.c: New file.
2096
2097 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2098
2099 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2100 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2101 * NEWS: Mention new FreeBSD/arm target.
2102 * configure.tgt: Add arm*-*-freebsd*.
2103 * arm-fbsd-tdep.c: New file.
2104 * arm-fbsd-tdep.h: New file.
2105
2106 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2107
2108 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2109 `gdbarch_elfcore_write_linux_prpsinfo'.
2110 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2111 method.
2112 (elf_internal_linux_prpsinfo): Remove declaration.
2113 * gdbarch.h: Regenerate.
2114 * gdbarch.c: Regenerate.
2115
2116 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2117
2118 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2119 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2120
2121 2017-10-11 Pedro Alves <palves@redhat.com>
2122
2123 * breakpoint.c (reattach_breakpoints): Delete.
2124 * breakpoint.h (reattach_breakpoints): Delete.
2125
2126 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2127
2128 * symfile.c (registered_sym_fns): Make struct, not typedef.
2129 (DEF_VEC_O (registered_sym_fns)): Remove.
2130 (symtab_fns): Change type to std::vector.
2131 (add_symtab_fns): Adjust.
2132 (find_sym_fns): Adjust.
2133
2134 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2135
2136 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2137 * arc-tdep.h (arc_arch_is_em): New function.
2138 (arc_arch_is_hs): Likewise.
2139
2140 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2141
2142 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2143 parentheses in the declaration.
2144 (macro_lookup_inclusion): Likewise.
2145 (macro_lookup_definition): Likewise.
2146 * p-lang.h (pascal_builtin_types): Likewise.
2147 * tui/tui-data.c (tui_win_list): Likewise.
2148 * tui/tui-data.h (tui_win_list): Likewise.
2149 * utils.h (make_cleanup_free_section_addr_info): Likewise.
2150
2151 2017-10-11 Mark Rages <markrages@gmail.com>
2152
2153 * target-memory.c (block_boundaries): Fix for block address not
2154 aligned on block size.
2155
2156 2017-10-10 Pedro Alves <palves@redhat.com>
2157 Tom Tromey <tom@tromey.com>
2158
2159 * breakpoint.c (struct captured_breakpoint_query_args)
2160 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2161 (print_breakpoint): New.
2162 * breakpoint.h (print_breakpoint): Declare.
2163 * common/common-exceptions.h (enum return_reason): Remove
2164 references to catch_exceptions.
2165 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2166 Delete.
2167 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2168 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2169 * gdb.h: Delete.
2170 * gdbthread.h (thread_select): Declare.
2171 * mi/mi-cmd-break.c: Don't include gdb.h.
2172 (breakpoint_notify): Use print_breakpoint.
2173 * mi/mi-cmd-catch.c: Don't include gdb.h.
2174 * mi/mi-interp.c: Don't include gdb.h.
2175 (mi_print_breakpoint_for_event): New.
2176 (mi_breakpoint_created, mi_breakpoint_modified): Use
2177 mi_print_breakpoint_for_event.
2178 * mi/mi-main.c: Don't include gdb.h.
2179 (mi_cmd_thread_select): Parse the global thread ID here. Use
2180 thread_select instead of gdb_thread_select.
2181 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2182 of using gdb_list_thread_ids.
2183 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
2184 FILEIO_ENOSYS here.
2185 (remote_fileio_request): Use TRY/CATCH instead of
2186 catch_exceptions.
2187 * symfile-mem.c (struct symbol_file_add_from_memory_args)
2188 (symbol_file_add_from_memory_wrapper): Delete.
2189 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2190 * thread.c: Don't include gdb.h.
2191 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2192 (thread_alive): Use thread_select.
2193 (do_captured_thread_select): Delete, parts salvaged as ...
2194 (thread_select): ... this new function.
2195 (gdb_thread_select): Delete.
2196
2197 2017-10-10 Pedro Alves <palves@redhat.com>
2198 Tom Tromey <tom@tromey.com>
2199
2200 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2201 and reverse logic.
2202 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2203 No longer macros. Instead ...
2204 (enum wp_check_result): They're now values of this new
2205 enumeration.
2206 (watchpoint_check): Change return type to wp_check_result and
2207 parameter type to bpstat.
2208 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2209 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2210 catch_errors. Reverse logic of watchpoint_check call.
2211 (breakpoint_re_set_one): Now returns void and takes a breakpoint
2212 pointer as parameter.
2213 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2214 * common/common-exceptions.c (throw_exception_sjlj): Update
2215 comments to avoid mentioning catch_errors.
2216 * exceptions.c (catch_errors): Delete.
2217 * exceptions.h: Update comments to avoid mentioning catch_errors.
2218 (catch_errors_ftype, catch_errors): Delete.
2219 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2220 (hook_stop_stub): Delete.
2221 (restore_selected_frame): Change return type to void, and
2222 parameter type to const frame_id &.
2223 (restore_infcall_control_state): Use TRY/CATCH instead of
2224 catch_errors.
2225 * main.c (captured_command_loop): Return void and remove
2226 parameter. Remove references to catch_errors.
2227 (captured_main): Use TRY/CATCH instead of catch_errors.
2228 * objc-lang.c (objc_submethod_helper_data)
2229 (find_objc_msgcall_submethod_helper): Delete.
2230 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2231 catch_errors.
2232 * record-full.c (record_full_message): Return void.
2233 (record_full_message_args, record_full_message_wrapper): Delete.
2234 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2235 instead of catch_errors.
2236 * solib-aix.c (solib_aix_open_symbol_file_object): Change
2237 parameter type to int.
2238 * solib-darwin.c (open_symbol_file_object): Ditto.
2239 * solib-dsbt.c (open_symbol_file_object): Ditto.
2240 * solib-frv.c (open_symbol_file_object): Ditto.
2241 * solib-svr4.c (open_symbol_file_object): Ditto.
2242 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2243 * solib.c (update_solib_list): Use TRY/CATCH instead of
2244 catch_errors.
2245 * solist.h (struct target_so_ops) <open_symbol_file_object>:
2246 Change type.
2247 * symmisc.c (struct print_symbol_args): Remove.
2248 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2249 (print_symbol): Change type.
2250 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2251 and remove parameters.
2252 (catch_errors): New.
2253 (get_windows_debug_event): Adjust.
2254
2255 2017-10-09 Tom Tromey <tom@tromey.com>
2256
2257 * mi/mi-main.c (free_splay_tree): Remove.
2258 (list_available_thread_groups): Use splay_tree_up.
2259 * common/gdb_splay_tree.h: New file.
2260
2261 2017-10-09 Tom Tromey <tom@tromey.com>
2262
2263 * mi/mi-main.c (do_nothing): Remove.
2264 (list_available_thread_groups): Update.
2265
2266 2017-10-09 Pedro Alves <palves@redhat.com>
2267
2268 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2269 reading registers when switching context.
2270
2271 2017-10-09 John Baldwin <jhb@FreeBSD.org>
2272
2273 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2274 (fbsd_convert_siginfo): Likewise.
2275 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2276
2277 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
2278
2279 * configure.ac (try_guile_versions): Remove guile-2.2.
2280 * configure: Regenerate.
2281
2282 2017-10-09 Tom Tromey <tom@tromey.com>
2283
2284 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2285 (COMPILE.pre): Use $(CXX).
2286
2287 2017-10-09 Pedro Alves <palves@redhat.com>
2288
2289 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2290 Use bool.
2291 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2292 * cp-support.h (cp_remove_params): Now returns a
2293 gdb::unique_xmalloc_ptr.
2294 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2295 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2296 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2297 returning a gdb::unique_xmalloc_ptr.
2298 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2299 * stack.c (find_frame_funname): Adjust to cp_remove_params
2300 returning a gdb::unique_xmalloc_ptr.
2301
2302 2017-10-08 Tom Tromey <tom@tromey.com>
2303
2304 * dwarf2read.c (dwarf2_get_dwz_file): Use
2305 gdb::unique_xmalloc_ptr.
2306 (find_slot_in_mapped_hash): Likewise.
2307 (dwarf2_physname): Likewise.
2308 (create_dwo_unit_in_dwp_v1): Use std::string.
2309 (create_dwo_unit_in_dwp_v2): Likewise.
2310 (lookup_dwo_cutu): Likewise.
2311 (inherit_abstract_dies): Use std::vector.
2312 (read_array_type): Likewise.
2313 (dwarf_decode_macros): Remove unused declaration.
2314 (unsigned_int_compar): Remove.
2315 (dwarf2_build_psymtabs_hard): Use scoped_restore.
2316 (psymtabs_addrmap_cleanup): Remove.
2317
2318 2017-10-08 Tom Tromey <tom@tromey.com>
2319
2320 * frame-unwind.c (frame_unwind_try_unwinder): Update.
2321 * frame.h (frame_cleanup_after_sniffer): Declare.
2322 (frame_prepare_for_sniffer): Return void.
2323 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
2324 type of argument.
2325 (frame_prepare_for_sniffer): Return void.
2326
2327 2017-10-08 Tom Tromey <tom@tromey.com>
2328
2329 * utils.h (make_cleanup_value_free): Remove.
2330 * utils.c (do_value_free, struct cleanup): Remove.
2331 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2332 Use gdb_value_up.
2333 * value.h (struct value_deleter): New.
2334 (gdb_value_up): New typedef.
2335
2336 2017-10-08 Tom Tromey <tom@tromey.com>
2337
2338 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2339 (make_cleanup_free_search_symbols): Remove.
2340 (search_symbols): Return std::vector.
2341 (symbol_search::compare_search_syms): Now member of
2342 symbol_search. Change arguments.
2343 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
2344 (symtab_symbol_info, rbreak_command): Update.
2345 * symtab.h (struct symbol_search) <next>: Remove.
2346 Add constructors.
2347 (symbol_search::operator<): New function.
2348 (symbol_search::operator==): New function.
2349 (search_symbols): Remove std::vector.
2350 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2351 (symbol_search::compare_search_syms): Declare.
2352
2353 2017-10-06 Yao Qi <yao.qi@linaro.org>
2354
2355 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2356 arch/aarch64-insn.o.
2357 Remove one rule.
2358 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2359
2360 2017-10-06 Yao Qi <yao.qi@linaro.org>
2361
2362 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2363 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2364 arch/arm-linux.o respectively.
2365 * configure.tgt: Likewise.
2366
2367 2017-10-06 Yao Qi <yao.qi@linaro.org>
2368
2369 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2370 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2371
2372 2017-10-06 Pedro Alves <palves@redhat.com>
2373
2374 * windows-nat.c: Include <algorithm>.
2375
2376 2017-10-06 Yao Qi <yao.qi@linaro.org>
2377
2378 * configure.tgt (i386_tobjs): New variable.
2379 (amd64_tobjs): New variable.
2380 Set $cpu_obs and $os_obs.
2381
2382 2017-10-06 Yao Qi <yao.qi@linaro.org>
2383
2384 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2385 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2386 (clean): Remove object files and dependency files.
2387 (distclean): Remove the directory.
2388 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2389 * configure: Re-generated.
2390 * configure.tgt: Replace amd64.o with arch/amd64.o.
2391
2392 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2393
2394 PR build/22188
2395 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2396 and SETEND.
2397
2398 2017-10-05 Pedro Alves <palves@redhat.com>
2399
2400 * linux-nat.c (linux_child_follow_fork): When following the parent
2401 and detaching the child, consult the parent thread's architecture
2402 instead of the child's.
2403
2404 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2405
2406 * ax.h: Do not include "doublest.h".
2407 (union agent_val): Remove.
2408
2409 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2410
2411 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2412 (decimal_to_string): Return std::string object.
2413 (decimal_from_string): Accept std::string object. Return bool.
2414 (decimal_from_integral, decimal_from_doublest): Remove.
2415 (decimal_from_longest): Add prototype.
2416 (decimal_from_ulongest): Likewise.
2417 (decimal_to_longest): Likewise.
2418 (decimal_from_doublest): Likewise.
2419 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2420 (MAX_DECIMAL_STRING): Move here.
2421 (decimal_to_string): Return std::string object.
2422 (decimal_from_string): Accept std::string object. Return bool.
2423 (decimal_from_integral): Remove, replace by ...
2424 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2425 (decimal_to_longest): New function.
2426 (decimal_from_floating): Remove, replace by ...
2427 (decimal_from_doublest): ... this new function.
2428 (decimal_to_doublest): Update to new decimal_to_string interface.
2429
2430 * value.c (unpack_long): Use decimal_to_longest.
2431 * valops.c (value_cast): Use decimal_from_doublest instead of
2432 decimal_from_floating. Use decimal_from_[u]longest isntead of
2433 decimal_from_integral.
2434 * valarith.c (value_args_as_decimal): Likewise.
2435 * valprint.c (print_decimal_floating): Update to new
2436 decimal_to_string interface.
2437 * printcmd.c (printf_decfloat): Likewise.
2438 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2439
2440 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2441
2442 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2443 * gdbtypes.c: Include "floatformat.h".
2444 * value.c: Likewise.
2445 * m68k-tdep.c: Likewise.
2446
2447 * findvar.c: Do not include "floatformat.h".
2448 * amd64-darwin-tdep.c: Likewise.
2449 * arm-linux-tdep.c: Likewise.
2450 * i386-darwin-tdep.c: Likewise.
2451 * i387-tdep.c: Likewise.
2452 * m68k-linux-tdep.c: Likewise.
2453 * mep-tdep.c: Likewise.
2454 * mips-tdep.c: Likewise.
2455 * nios2-tdep.c: Likewise.
2456 * s390-linux-tdep.c: Likewise.
2457 * sparc-obsd-tdep.c: Likewise.
2458 * sparc-tdep.c: Likewise.
2459 * sparc64-tdep.c: Likewise.
2460 * spu-tdep.c: Likewise.
2461 * tic6x-tdep.c: Likewise.
2462 * tilegx-tdep.c: Likewise.
2463 * vax-tdep.c: Likewise.
2464 * xstormy16-tdep.c: Likewise.
2465 * xtensa-tdep.c: Likewise.
2466
2467 * top.c: Do not include "doublest.h".
2468 * aarch64-tdep.c: Likewise.
2469 * alpha-tdep.c: Likewise.
2470 * arm-linux-tdep.c: Likewise.
2471 * m68k-linux-tdep.c: Likewise.
2472 * tilegx-tdep.c: Likewise.
2473 * xstormy16-tdep.c: Likewise.
2474
2475 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2476
2477 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2478 (mipsn32_fbsd_sigframe): Define.
2479 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2480 for FreeBSD/mipsn32.
2481
2482 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2483
2484 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2485 AT_HWCAP.
2486
2487 2017-10-05 Tristan Gingold <tgingold@free.fr>
2488
2489 * MAINTAINERS (Misc): Update my email address.
2490
2491 2017-10-04 Pedro Alves <palves@redhat.com>
2492
2493 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2494 it instead of target_gdbarch.
2495 (get_remote_state, get_remote_packet_size): Adjust
2496 get_remote_arch_state calls, passing down target_gdbarch
2497 explicitly.
2498 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2499 'gdbarch' and use it instead of target_gdbarch.
2500 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2501 passing down target_gdbarch explicitly.
2502 (struct stop_reply) <arch>: New field.
2503 (remote_parse_stop_reply): Use the stopped thread's architecture,
2504 not the current inferior's. Save the architecture in the
2505 stop_reply.
2506 (process_stop_reply): Use the stop reply's architecture.
2507 (process_g_packet, remote_fetch_registers)
2508 (remote_prepare_to_store, store_registers_using_G)
2509 (remote_store_registers): Adjust get_remote_arch_state calls,
2510 using the regcache's architecture.
2511 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2512 passing down target_gdbarch explicitly.
2513 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2514 beneath instead of calling target_gdbarch.
2515 * target.c (default_thread_architecture): Use the specified
2516 inferior's architecture, instead of the current inferior's
2517 architecture (via target_gdbarch).
2518
2519 2017-10-04 Pedro Alves <palves@redhat.com>
2520
2521 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2522 case.
2523 (regcache_print): Handle !target_has_registers here instead.
2524
2525 2017-10-04 Pedro Alves <palves@redhat.com>
2526
2527 * frame.c (create_test_frame): Delete.
2528 * frame.h (create_test_frame): Delete.
2529 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2530 (class regcache_test): Delete.
2531 (test_target_has_registers, test_target_has_stack)
2532 (test_target_has_memory, test_target_prepare_to_store)
2533 (test_target_store_registers): New functions.
2534 (test_target_ops): New class.
2535 (register_to_value_test): Error out if there's already a
2536 process_stratum (or higher) target pushed. Create a fuller mock
2537 environment, with mock target_ops, inferior, address space, thread
2538 and inferior_ptid.
2539 * progspace.c (struct address_space): Move to ...
2540 * progspace.h (struct address_space): ... here.
2541 * regcache.h (regcache::~regcache, regcache::raw_write)
2542 [GDB_SELF_TEST]: No longer virtual.
2543
2544 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2545
2546 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2547
2548 2017-10-04 Pedro Alves <palves@redhat.com>
2549
2550 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2551 out of 'between TRY and CATCH'.
2552
2553 2017-10-04 Pedro Alves <palves@redhat.com>
2554
2555 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2556 * common/common-exceptions.h (TRY): Open an outermost scope.
2557 Expand intro comment.
2558 (CATCH): Reindent.
2559 (END_CATCH): Close the outermost scope.
2560 * completer.c (complete_line_internal): Add missing END_CATCH.
2561
2562 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2563
2564 * NEWS (Changes since GDB 8.0): Add entry about new
2565 'set-cwd-on-gdbserver' feature.
2566 (New remote packets): Add entry for QSetWorkingDir.
2567 * common/common-inferior.h (set_inferior_cwd): New prototype.
2568 * infcmd.c (set_inferior_cwd): Remove "static".
2569 (show_cwd_command): Expand text to include remote debugging.
2570 * remote.c: Add PACKET_QSetWorkingDir.
2571 (remote_protocol_features) <QSetWorkingDir>: New entry for
2572 PACKET_QSetWorkingDir.
2573 (extended_remote_set_inferior_cwd): New function.
2574 (extended_remote_create_inferior): Call
2575 "extended_remote_set_inferior_cwd".
2576 (_initialize_remote): Call "add_packet_config_cmd" for
2577 QSetWorkingDir.
2578
2579 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2580
2581 * NEWS (New commands): Mention "set/show cwd".
2582 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2583 "cd" command's help text.
2584 * common/common-inferior.h (get_inferior_cwd): New prototype.
2585 * infcmd.c (inferior_cwd_scratch): New global variable.
2586 (set_inferior_cwd): New function.
2587 (get_inferior_cwd): Likewise.
2588 (set_cwd_command): Likewise.
2589 (show_cwd_command): Likewise.
2590 (_initialize_infcmd): Add "set/show cwd" commands.
2591 * inferior.h (class inferior) <cwd>: New field.
2592 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2593 (fork_inferior): Change inferior's cwd before its execution.
2594 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2595 to CreateProcess.
2596
2597 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2598
2599 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2600 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2601 (COMMON_OBS): Add gdb_tilde_expand.o.
2602 * common/gdb_tilde_expand.c: New file.
2603 * common/gdb_tilde_expand.h: Likewise.
2604
2605 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2606
2607 * gdbarch.sh (objfile): Remove duplicate declaration.
2608 * gdbarch.h: Regenerate.
2609
2610 2017-10-03 Tom Tromey <tom@tromey.com>
2611
2612 * utils.c (internal_vproblem): Use string_vprintf.
2613
2614 2017-10-03 Tom Tromey <tom@tromey.com>
2615
2616 * printcmd.c (info_symbol_command): Use std::string.
2617
2618 2017-10-03 Tom Tromey <tom@tromey.com>
2619
2620 * top.c (gdb_safe_append_history): Use std::string.
2621
2622 2017-10-03 Tom Tromey <tom@tromey.com>
2623
2624 * event-top.c (stdin_event_handler): Update.
2625 * main.c (captured_main_1): Update.
2626 * top.h (make_delete_ui_cleanup): Remove.
2627 (struct ui): Add constructor and destructor.
2628 (new_ui, delete_ui): Remove.
2629 * top.c (make_delete_ui_cleanup): Remove.
2630 (new_ui_command): Use std::unique_ptr.
2631 (delete_ui_cleanup): Remove.
2632 (ui::ui): Rename from new_ui. Update.
2633 (free_ui): Remove.
2634 (ui::~ui): Rename from delete_ui. Update.
2635
2636 2017-10-03 Tom Tromey <tom@tromey.com>
2637
2638 * symfile.c (load_progress): Use gdb::byte_vector.
2639
2640 2017-10-03 Tom Tromey <tom@tromey.com>
2641
2642 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2643 declaration.
2644 * printcmd.c (x_command): Remove unused declaration.
2645 * symfile.c (symbol_file_command): Remove unused declaration.
2646
2647 2017-10-03 Tom Tromey <tom@tromey.com>
2648
2649 * utils.c (internal_vproblem): Use std::string.
2650 (defaulted_query): Likewise.
2651
2652 2017-10-03 Tom Tromey <tom@tromey.com>
2653
2654 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2655 * top.c (execute_command_to_string): Update.
2656 * utils.c (make_cleanup_restore_page_info): Remove.
2657 (do_restore_page_info_cleanup): Remove.
2658 (set_batch_flag_and_restore_page_info):
2659 New.
2660 (make_cleanup_restore_page_info): Remove.
2661 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2662 (~set_batch_flag_and_restore_page_info): New
2663 (make_cleanup_restore_uinteger): Remove.
2664 (make_cleanup_restore_integer): Remove.
2665 (struct restore_integer_closure): Remove.
2666 (restore_integer): Remove.
2667 * utils.h (struct set_batch_flag_and_restore_page_info): New
2668 class.
2669 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2670 (make_cleanup_restore_page_info): Remove.
2671 (make_cleanup_restore_uinteger) Remove.
2672 (make_cleanup_restore_integer) Remove.
2673
2674 2017-10-03 Tom Tromey <tom@tromey.com>
2675
2676 * record-full.h (record_full_gdb_operation_disable_set): Return
2677 scoped_restore_tmpl<int>.
2678 * infrun.c (adjust_pc_after_break): Update.
2679 (handle_signal_stop): Update.
2680 * record-full.c (record_full_gdb_operation_disable_set): Return
2681 scoped_restore_tmpl<int>.
2682 (record_full_wait_1, record_full_insert_breakpoint)
2683 (record_full_remove_breakpoint, record_full_save)
2684 (record_full_goto_insn): Update.
2685
2686 2017-10-02 Tom Tromey <tom@tromey.com>
2687
2688 PR rust/22236:
2689 * rust-lang.c (rust_val_print_str): New function.
2690 (val_print_struct): Call it.
2691 (rust_subscript): Preserve name of slice type.
2692
2693 2017-10-02 Tom Tromey <tom@tromey.com>
2694
2695 * rust-lang.c (rust_subscript): Handle slices in
2696 EVAL_AVOID_SIDE_EFFECTS case.
2697
2698 2017-10-02 Tom Tromey <tom@tromey.com>
2699
2700 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2701
2702 2017-10-02 Tom Tromey <tom@tromey.com>
2703
2704 * rust-lang.h (rust_slice_type): Add "extern".
2705
2706 2017-10-02 Tom Tromey <tom@tromey.com>
2707 Pedro Alves <palves@redhat.com>
2708
2709 * ada-lang.h (ada_exc_info::operator<): Make const.
2710 (ada_exc_info::operator==): Make const.
2711 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2712 Make const.
2713
2714 2017-09-29 Tom Tromey <tom@tromey.com>
2715
2716 * target.c (read_whatever_is_readable): Change type of "result".
2717 Update.
2718 (free_memory_read_result_vector): Remove.
2719 (read_memory_robust): Change return type. Update.
2720 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2721 bin2hex, std::string.
2722 * target.h (memory_read_result_s): Remove typedef.
2723 (free_memory_read_result_vector): Remove.
2724 (read_memory_robust): Return std::vector.
2725
2726 2017-09-29 Tom Tromey <tom@tromey.com>
2727
2728 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2729
2730 2017-09-29 Tom Tromey <tom@tromey.com>
2731
2732 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2733 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2734 operator< and operator==.
2735 (ada_exceptions_list): Return a std::vector.
2736 * ada-lang.c (ada_exc_info::operator<): Rename from
2737 compare_ada_exception_info.
2738 (ada_exc_info::operator==): New.
2739 (sort_remove_dups_ada_exceptions_list): Change type of
2740 "exceptions".
2741 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2742 (ada_add_global_exceptions): Likewise.
2743 (ada_exceptions_list_1): Return a std::vector.
2744 (ada_exceptions_list): Likewise.
2745
2746 2017-09-29 Tom Tromey <tom@tromey.com>
2747
2748 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2749 'std::set *'.
2750 (print_one_inferior): Update.
2751 (free_vector_of_ints): Remove.
2752 (list_available_thread_groups): Change "ids" to std::set.
2753 (mi_cmd_list_thread_groups): Update.
2754 (struct collect_cores_data) <core>: Now a std::set.
2755 (collect_cores): Update.
2756 (unique): Remove.
2757 (print_one_inferior): Update.
2758
2759 2017-09-29 Tom Tromey <tom@tromey.com>
2760
2761 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2762 (mi_execute_async_cli_command): Likewise.
2763 (mi_cmd_trace_frame_collected): Use field_fmt.
2764
2765 2017-09-29 Tom Tromey <tom@tromey.com>
2766
2767 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2768 gdb::byte_vector.
2769
2770 2017-09-29 Tom Tromey <tom@tromey.com>
2771
2772 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2773
2774 2017-09-29 Tom Tromey <tom@tromey.com>
2775
2776 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2777
2778 2017-09-29 Tom Tromey <tom@tromey.com>
2779
2780 * varobj.h (varobj_gen_name): Return std::string.
2781 * varobj.c (varobj_gen_name): Return std::string.
2782 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2783 (mi_cmd_var_delete): Don't copy "name".
2784
2785 2017-09-29 Tom Tromey <tom@tromey.com>
2786
2787 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2788 (mi_cmd_break_insert_1): Update.
2789
2790 2017-09-29 Tom Tromey <tom@tromey.com>
2791
2792 * target.h (make_scoped_defer_target_commit_resume): Update.
2793 * target.c (make_scoped_defer_target_commit_resume): Rename from
2794 make_cleanup_defer_target_commit_resume. Return a
2795 scoped_restore.
2796 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2797
2798 2017-09-29 Tom Tromey <tom@tromey.com>
2799
2800 * main.c (captured_main_1): Remove unused declaration.
2801 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2802
2803 2017-09-29 Tom Tromey <tom@tromey.com>
2804
2805 * symtab.c (search_symbols): Remove unused outer cleanup.
2806 (make_source_files_completion_list): Remove unused declaration.
2807
2808 2017-09-29 Tom Tromey <tom@tromey.com>
2809
2810 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2811
2812 2017-09-29 Tom Tromey <tom@tromey.com>
2813
2814 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2815 gdb::byte_vector.
2816
2817 2017-09-29 Tom Tromey <tom@tromey.com>
2818
2819 * complaints.c (vcomplaint): Use std::string.
2820
2821 2017-09-29 Tom Tromey <tom@tromey.com>
2822
2823 * tracepoint.c (trace_variable_command): Use std::string.
2824 (encode_actions_1): Remove unused declarations.
2825 (create_tsv_from_upload): Use std::string.
2826
2827 2017-09-29 Tom Tromey <tom@tromey.com>
2828
2829 * cp-support.c (gdb_demangle): Use std::string.
2830
2831 2017-09-29 Tom Tromey <tom@tromey.com>
2832
2833 * stack.c (parse_frame_specification): Use std::string
2834 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2835
2836 2017-09-29 Tom Tromey <tom@tromey.com>
2837
2838 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2839
2840 2017-09-29 Tom Tromey <tom@tromey.com>
2841
2842 * utils.c (vfprintf_maybe_filtered): Use std::string.
2843 (vfprintf_unfiltered): Likewise.
2844
2845 2017-09-29 Tom Tromey <tom@tromey.com>
2846
2847 * event-top.c (top_level_prompt): Return std::string.
2848 (display_gdb_prompt): Update.
2849
2850 2017-09-29 Tom Tromey <tom@tromey.com>
2851
2852 * unittests/common-utils-selftests.c (format): New function.
2853 (string_vprintf_tests): New function.
2854 (_initialize_common_utils_selftests): Register new tests.
2855 * common/common-utils.c (string_vprintf): New function.
2856 * common/common-utils.h (string_vprintf): Declare.
2857
2858 2017-09-29 Pedro Alves <palves@redhat.com>
2859
2860 * common/rsp-low.c (unpack_varlen_hex): Constify.
2861 * common/rsp-low.h (unpack_varlen_hex): Constify.
2862 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2863 Constify.
2864 * remote.c (remote_set_permissions, read_ptid)
2865 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2866 (remote_static_tracepoint_marker_at)
2867 (remote_static_tracepoint_markers_by_strid)
2868 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2869 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2870 (parse_tracepoint_definition, parse_tsv_definition)
2871 (parse_static_tracepoint_marker_definition): Constify.
2872 * tracepoint.h (parse_static_tracepoint_marker_definition)
2873 (parse_trace_status, parse_tracepoint_status)
2874 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2875
2876 2017-09-29 Pedro Alves <palves@redhat.com>
2877
2878 * remote.c (target_buf, target_buf_size): Delete.
2879 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2880 Use the connection's packet buffer instead.
2881 All callers adjusted.
2882 (_initialize_remote): Remove references to target_buf and
2883 target_buf_size.
2884
2885 2017-09-28 Pedro Alves <palves@redhat.com>
2886
2887 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2888 unittests/common-utils-selftests.c.
2889 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2890 (COMMON_OBS): Remove utils-selftests.o.
2891 * utils-selftests.c: Move to ...
2892 * unittests/common-utils-selftests.c: ... here and rename self
2893 test to "string_printf".
2894
2895 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2896
2897 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2898 having NULL cus or tus.
2899
2900 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2901
2902 * arm-tdep.c: (convert_from_extended): Remove.
2903 (convert_to_extended): Likewise.
2904 (arm_extract_return_value): Use convert_typed_floating.
2905 (arm_store_return_value): Likewise.
2906
2907 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2908 * sh-tdep.c: Do not include "floatformat.h".
2909 (sh_littlebyte_bigword_type): New function.
2910 (sh_register_convert_to_virtual): Use convert_typed_floating.
2911 (sh_register_convert_to_raw): Likewise.
2912 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2913 (sh64_littlebyte_bigword_type): New function.
2914 (sh64_extract_return_value): Use convert_typed_floating.
2915 (sh64_register_convert_to_virtual): Likewise.
2916 (sh64_register_convert_to_raw): Likewise.
2917
2918 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2919
2920 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2921 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2922
2923 * gdbtypes.h (union type_specific): Make field floatformat hold
2924 just a single struct floatformat, not an array.
2925 (floatformat_from_type): Move here.
2926 * gdbtypes.c (floatformat_from_type): Move here. Update to
2927 changed TYPE_FLOATFORMAT definition.
2928 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2929 (recursive_dump_type): Likewise.
2930 (init_float_type): Install correct floatformat for byte order.
2931 (arch_float_type): Likewise.
2932
2933 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2934
2935 * gdbtypes.c (init_type): Change incoming argument from
2936 length-in-bytes to length-in-bits. Assert length is a
2937 multiple of TARGET_CHAR_BITS.
2938 (arch_type, arch_flags_type): Likewise.
2939 (init_integer_type): Update call to init_type.
2940 (init_character_type): Likewise.
2941 (init_boolean_type): Likewise.
2942 (init_float_type): Likewise.
2943 (init_decfloat_type): Likewise.
2944 (init_complex_type): Likewise.
2945 (init_pointer_type): Likewise.
2946 (objfile_type): Likewise.
2947 (arch_integer_type): Update call to arch_type.
2948 (arch_character_type): Likewise.
2949 (arch_boolean_type): Likewise.
2950 (arch_float_type): Likewise.
2951 (arch_decfloat_type): Likewise.
2952 (arch_complex_type): Likewise.
2953 (arch_pointer_type): Likewise.
2954 (gdbtypes_post_init): Likewise.
2955
2956 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2957 (read_base_type): Likewise.
2958 * mdebugread.c (basic_type): Likewise.
2959 * stabsread.c (dbx_init_float_type): Likewise.
2960 (rs6000_builtin_type): Likewise.
2961 (read_range_type): Likewise. Also, fix call to init_integer_type
2962 with erroneous length argument.
2963
2964 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2965 * d-lang.c (build_d_types): Likewise.
2966 * f-lang.c (build_fortran_types): Likewise.
2967 * go-lang.c (build_go_types): Likewise.
2968 * opencl-lang.c (build_opencl_types): Likewise.
2969 * jit.c (finalize_symtab): Likewise.
2970 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2971 (build_std_type_info_type): Likewise.
2972 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2973 update call to arch_flags_type.
2974
2975 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2976 arch_type.
2977 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2978 * windows-tdep.c (windows_get_tlb_type): Likewise.
2979
2980 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2981 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2982 * m32c-tdep.c (make_types): Likewise.
2983 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2984 (rl78_psw_type): Update call to arch_flags_type.
2985 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2986 * rx-tdep.c (rx_psw_type): Likewise.
2987 (rx_fpsw_type): Likewise.
2988 * sparc-tdep.c (sparc_psr_type): Likewise.
2989 (sparc_fsr_type): Likewise.
2990 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2991 (sparc64_ccr_type): Likewise.
2992 (sparc64_fsr_type): Likewise.
2993 (sparc64_fprs_type): Likewise.
2994
2995 2017-09-27 Tom Tromey <tom@tromey.com>
2996
2997 * findcmd.c (find_command): Constify.
2998
2999 2017-09-27 Tom Tromey <tom@tromey.com>
3000
3001 * ada-tasks.c (task_command_1, task_command): Constify.
3002
3003 2017-09-27 Tom Tromey <tom@tromey.com>
3004
3005 * symtab.c (maintenance_print_symbol_cache)
3006 (maintenance_flush_symbol_cache)
3007 (maintenance_print_symbol_cache_statistics): Constify.
3008
3009 2017-09-27 Tom Tromey <tom@tromey.com>
3010
3011 * inferior.c (detach_inferior_command, kill_inferior_command)
3012 (inferior_command): Constify.
3013
3014 2017-09-27 Tom Tromey <tom@tromey.com>
3015
3016 * regcache.c (regcache_print, maintenance_print_registers)
3017 (maintenance_print_raw_registers)
3018 (maintenance_print_cooked_registers)
3019 (maintenance_print_register_groups)
3020 (maintenance_print_remote_registers): Constify.
3021
3022 2017-09-27 Tom Tromey <tom@tromey.com>
3023
3024 * printcmd.c (map_display_numbers, undisplay_command)
3025 (enable_disable_display_command, enable_display_command)
3026 (disable_display_command): Constify.
3027
3028 2017-09-27 Tom Tromey <tom@tromey.com>
3029
3030 * breakpoint.h (delete_command): Don't declare.
3031 * breakpoint.c (delete_command, enable_once_command)
3032 (enable_count_command, enable_delete_command, breakpoint_1)
3033 (maintenance_info_breakpoints, stopin_command, stopat_command)
3034 (delete_command, delete_trace_command, save_breakpoints)
3035 (save_breakpoints_command, save_tracepoints_command): Constify.
3036
3037 2017-09-27 Tom Tromey <tom@tromey.com>
3038
3039 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3040 (skip_ws, extract_identifier, macro_define_command)
3041 (macro_undef_command, macro_list_command): Constify.
3042
3043 2017-09-27 Tom Tromey <tom@tromey.com>
3044
3045 * infcmd.c (environment_info, set_environment_command)
3046 (unset_environment_command, path_info, info_proc_cmd_1)
3047 (info_proc_cmd_mappings, info_proc_cmd_stat)
3048 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3049 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3050
3051 2017-09-27 Tom Tromey <tom@tromey.com>
3052
3053 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3054 Constify.
3055
3056 2017-09-27 Tom Tromey <tom@tromey.com>
3057
3058 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3059
3060 2017-09-27 Tom Tromey <tom@tromey.com>
3061
3062 * demangle.c (demangle_command): Constify.
3063
3064 2017-09-27 Tom Tromey <tom@tromey.com>
3065
3066 * progspace.c (maintenance_info_program_spaces_command):
3067 Constify.
3068
3069 2017-09-27 Tom Tromey <tom@tromey.com>
3070
3071 * compile/compile.c (check_raw_argument, compile_file_command)
3072 (compile_code_command, compile_print_command): Constify.
3073
3074 2017-09-27 Tom Tromey <tom@tromey.com>
3075
3076 * reggroups.c (maintenance_print_reggroups): Constify.
3077
3078 2017-09-27 Tom Tromey <tom@tromey.com>
3079
3080 * dwarf2read.c (save_gdb_index_command): Constify.
3081
3082 2017-09-27 Tom Tromey <tom@tromey.com>
3083
3084 * stap-probe.c (info_probes_stap_command): Constify.
3085
3086 2017-09-27 Tom Tromey <tom@tromey.com>
3087
3088 * fork-child.c (unset_exec_wrapper_command): Constify.
3089
3090 2017-09-27 Tom Tromey <tom@tromey.com>
3091
3092 * btrace.c (get_uint, get_context_size, no_chunk)
3093 (maint_btrace_packet_history_cmd)
3094 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3095 (maint_info_btrace_cmd): Constify.
3096
3097 2017-09-27 Tom Tromey <tom@tromey.com>
3098
3099 * reverse.c (delete_bookmark_command): Constify.
3100
3101 2017-09-27 Tom Tromey <tom@tromey.com>
3102
3103 * remote.c (set_memory_packet_size)
3104 (set_memory_write_packet_size, show_memory_write_packet_size)
3105 (set_memory_read_packet_size, show_memory_read_packet_size)
3106 (compare_sections_command, packet_command, remote_put_command)
3107 (remote_get_command, remote_delete_command): Constify.
3108
3109 2017-09-27 Tom Tromey <tom@tromey.com>
3110
3111 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3112 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3113 (set_mipsfpu_auto_command): Constify.
3114
3115 2017-09-27 Tom Tromey <tom@tromey.com>
3116
3117 * cli/cli-cmds.h (cd_command): Constify.
3118 * cli/cli-cmds.c (cd_command): Constify.
3119
3120 2017-09-27 Tom Tromey <tom@tromey.com>
3121
3122 * thread.c (thread_name_command, thread_find_command): Constify.
3123
3124 2017-09-27 Tom Tromey <tom@tromey.com>
3125
3126 * probe.c (enable_probes_command, disable_probes_command):
3127 Constify.
3128
3129 2017-09-27 Tom Tromey <tom@tromey.com>
3130
3131 * symfile.c (symbol_file_command): Constify.
3132 * gdbcore.h (deprecated_file_changed_hook): Constify.
3133 * exec.c (deprecated_file_changed_hook, exec_file_command)
3134 (file_command): Constify.
3135 * defs.h (symbol_file_command): Constify.
3136
3137 2017-09-27 Tom Tromey <tom@tromey.com>
3138
3139 * remote-fileio.c (set_system_call_allowed)
3140 (show_system_call_allowed): Constify.
3141
3142 2017-09-27 Tom Tromey <tom@tromey.com>
3143
3144 * tracepoint.c (delete_trace_variable_command)
3145 (tfind_end_command, tfind_start_command, tfind_pc_command)
3146 (tfind_tracepoint_command, tfind_line_command)
3147 (tfind_range_command, tfind_outside_command): Constify.
3148
3149 2017-09-27 Tom Tromey <tom@tromey.com>
3150
3151 * ax-gdb.c (maint_agent_printf_command, agent_command)
3152 (agent_eval_command): Constify.
3153
3154 2017-09-27 Tom Tromey <tom@tromey.com>
3155
3156 * tracepoint.c (info_scope_command): Constify.
3157 * python/python.c (gdbpy_decode_line): Constify.
3158 * python/py-breakpoint.c (bppy_init): Constify.
3159 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3160 * location.h: (new_linespec_location)
3161 (string_to_event_location_basic, string_to_event_location):
3162 Constify.
3163 * location.c (new_linespec_location)
3164 (string_to_event_location_basic, string_to_event_location):
3165 Constify.
3166 * linespec.h (decode_line_with_current_source)
3167 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3168 * linespec.c (linespec_lex_to_end)
3169 (decode_line_with_current_source)
3170 (decode_line_with_last_displayed): Constify.
3171 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3172 Constify.
3173 * cli/cli-cmds.c (edit_command, list_command): Constify.
3174 * breakpoint.h (until_break_command, watch_command_wrapper)
3175 (awatch_command_wrapper, rwatch_command_wrapper)
3176 (init_ada_exception_breakpoint): Constify.
3177 * breakpoint.c (break_command_1, dprintf_command)
3178 (break_range_command, watch_command_wrapper)
3179 (rwatch_command_wrapper, awatch_command_wrapper)
3180 (until_break_command, init_ada_exception_breakpoint)
3181 (strace_marker_create_sals_from_location, trace_command)
3182 (ftrace_command, strace_command, struct tracepoint): Constify.
3183 * ax-gdb.c (agent_command_1): Constify.
3184 * ada-lang.c (ada_exception_sal): Constify.
3185
3186 2017-09-27 Tom Tromey <tom@tromey.com>
3187
3188 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3189 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3190 (get_context_size, no_chunk, get_insn_history_modifiers)
3191 (cmd_record_insn_history, get_call_history_modifiers)
3192 (cmd_record_call_history): Constify.
3193
3194 2017-09-27 Tom Tromey <tom@tromey.com>
3195
3196 * source.c (show_substitute_path_command)
3197 (unset_substitute_path_command, set_substitute_path_command):
3198 Constify.
3199
3200 2017-09-27 Tom Tromey <tom@tromey.com>
3201
3202 * typeprint.c (maintenance_print_type): Constify.
3203 * maint.c (maintenance_dump_me, maintenance_demangle)
3204 (maintenance_time_display, maintenance_info_sections)
3205 (maintenance_print_statistics, maintenance_deprecate)
3206 (maintenance_undeprecate): Constify.
3207 (maintenance_do_deprecate): Constify. Use std::string.
3208 (maintenance_selftest): Constify.
3209 * gdbtypes.h (maintenance_print_type): Constify.
3210
3211 2017-09-27 Tom Tromey <tom@tromey.com>
3212
3213 * hppa-tdep.c (unwind_command): Constify.
3214
3215 2017-09-27 Tom Tromey <tom@tromey.com>
3216
3217 * target-descriptions.c (unset_tdesc_filename_cmd)
3218 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3219 Constify.
3220
3221 2017-09-27 Tom Tromey <tom@tromey.com>
3222
3223 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3224
3225 2017-09-27 Tom Tromey <tom@tromey.com>
3226
3227 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3228
3229 2017-09-27 Tom Tromey <tom@tromey.com>
3230
3231 * tui/tui-regs.c (tui_reg_command): Constify.
3232
3233 2017-09-27 Tom Tromey <tom@tromey.com>
3234
3235 * skip.c (skip_file_command, skip_function_command)
3236 (skip_enable_command, skip_disable_command, skip_delete_command):
3237 Constify.
3238
3239 2017-09-27 Tom Tromey <tom@tromey.com>
3240
3241 * record-btrace.c (cmd_record_btrace_bts_start)
3242 (cmd_record_btrace_pt_start): Constify.
3243
3244 2017-09-27 Tom Tromey <tom@tromey.com>
3245
3246 * symmisc.c (maintenance_print_symbols)
3247 (maintenance_print_msymbols, maintenance_print_objfiles)
3248 (maintenance_info_symtabs, maintenance_check_symtabs)
3249 (maintenance_expand_symtabs, maintenance_info_line_tables):
3250 Constify.
3251
3252 2017-09-27 Tom Tromey <tom@tromey.com>
3253
3254 * top.c (new_ui_command): Constify.
3255
3256 2017-09-27 Tom Tromey <tom@tromey.com>
3257
3258 * symfile.c (add_symbol_file_command)
3259 (remove_symbol_file_command, list_overlays_command)
3260 (map_overlay_command, unmap_overlay_command)
3261 (overlay_auto_command, overlay_manual_command)
3262 (overlay_off_command, overlay_load_command): Constify.
3263
3264 2017-09-27 Tom Tromey <tom@tromey.com>
3265
3266 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3267 (info_spu_mailbox_command, info_spu_dma_command)
3268 (info_spu_proxydma_command): Constify.
3269
3270 2017-09-27 Tom Tromey <tom@tromey.com>
3271
3272 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3273
3274 2017-09-27 Tom Tromey <tom@tromey.com>
3275
3276 * cli/cli-script.c (user_defined_command): Constify.
3277
3278 2017-09-27 Tom Tromey <tom@tromey.com>
3279
3280 * cli/cli-dump.c (dump_memory_command, dump_value_command)
3281 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3282 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3283 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3284 (dump_binary_value, append_binary_memory, append_binary_value):
3285 Constify.
3286 (struct dump_context) <func>: Constify.
3287 (add_dump_command): Update.
3288
3289 2017-09-27 Tom Tromey <tom@tromey.com>
3290
3291 * cli/cli-cmds.c (show_version, show_configuration)
3292 (source_command, show_user): Constify.
3293
3294 2017-09-27 Tom Tromey <tom@tromey.com>
3295
3296 * target.c (maintenance_print_target_stack): Constify.
3297
3298 2017-09-27 Tom Tromey <tom@tromey.com>
3299
3300 * interps.c (interpreter_exec_cmd): Constify.
3301
3302 2017-09-27 Tom Tromey <tom@tromey.com>
3303
3304 * record-full.c (cmd_record_full_restore): Constify.
3305
3306 2017-09-27 Tom Tromey <tom@tromey.com>
3307
3308 * memattr.c (enable_mem_command, disable_mem_command)
3309 (delete_mem_command): Constify.
3310
3311 2017-09-27 Tom Tromey <tom@tromey.com>
3312
3313 * value.c (show_convenience): Constify.
3314
3315 2017-09-27 Tom Tromey <tom@tromey.com>
3316
3317 * gdbcore.h (core_file_command): Update.
3318 * corefile.c (core_file_command): Constify.
3319
3320 2017-09-27 Tom Tromey <tom@tromey.com>
3321
3322 * user-regs.c (maintenance_print_user_registers): Constify.
3323
3324 2017-09-27 Tom Tromey <tom@tromey.com>
3325
3326 * cp-namespace.c (maintenance_cplus_namespace): Constify.
3327
3328 2017-09-27 Tom Tromey <tom@tromey.com>
3329
3330 * cp-support.c (first_component_command): Constify.
3331
3332 2017-09-27 Tom Tromey <tom@tromey.com>
3333
3334 * psymtab.c (maintenance_print_psymbols)
3335 (maintenance_info_psymtabs, maintenance_check_psymtabs):
3336 Constify.
3337
3338 2017-09-27 Tom Tromey <tom@tromey.com>
3339
3340 * windows-tdep.c (display_tib): Constify.
3341
3342 2017-09-27 Tom Tromey <tom@tromey.com>
3343
3344 * linux-fork.c (delete_checkpoint_command)
3345 (detach_checkpoint_command): Constify.
3346
3347 2017-09-27 Tom Tromey <tom@tromey.com>
3348
3349 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3350
3351 2017-09-27 Tom Tromey <tom@tromey.com>
3352
3353 * arc-tdep.c (dump_arc_instruction_command): Constify.
3354
3355 2017-09-27 Tom Tromey <tom@tromey.com>
3356
3357 * valprint.c (set_radix, show_radix): Constify.
3358
3359 2017-09-27 Tom Tromey <tom@tromey.com>
3360
3361 * dtrace-probe.c (info_probes_dtrace_command): Constify.
3362
3363 2017-09-27 Tom Tromey <tom@tromey.com>
3364
3365 * command.h (not_just_help_class_command): Update.
3366 * cli/cli-decode.h (not_just_help_class_command): Update.
3367 * cli/cli-decode.c (not_just_help_class_command): Constify.
3368
3369 2017-09-27 Tom Tromey <tom@tromey.com>
3370
3371 * gdb_bfd.c (maintenance_info_bfds): Constify.
3372
3373 2017-09-27 Tom Tromey <tom@tromey.com>
3374
3375 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3376 overloads.
3377 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3378 (do_const_cfunc): New function.
3379 (cmd_cfunc_eq): New overload.
3380 (cli_user_command_p): Check do_const_cfunc.
3381 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3382 const_cfunc.
3383 * command.h (add_cmd): Add const overload and no-function
3384 overload.
3385 (set_cmd_cfunc): Add const overload.
3386 (cmd_const_cfunc_ftype): Declare.
3387 (cmd_cfunc_eq): Add const overload.
3388 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3389 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3390 overload.
3391
3392 2017-09-27 Tom Tromey <tom@tromey.com>
3393
3394 * macroexp.c (get_next_token_for_substitution): New function.
3395 (substitute_args): Call it. Check for __VA_OPT__.
3396
3397 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3398 Pedro Alves <palves@redhat.com>
3399
3400 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3401 producer_is_icc_lt_14.
3402 (producer_is_icc_lt_14): New function.
3403 (check_producer): Add code for checking version of ICC.
3404 (producer_is_icc): Move to producer.c.
3405 (read_structure_type): Restrict ICC workaround to ICC<14.
3406 * producer.c: Include selftest.h.
3407 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3408 New functions.
3409 * producer.h (producer_is_icc): New declaration.
3410
3411 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3412
3413 * Makefile.in (SFILES): Add producer.c.
3414 (COMMON_OBS): Add producer.o
3415 * amd64-tdep.c (producer.h): Add new include.
3416 * dwarf2read.c (producer.h): Add new include.
3417 * producer.c: New file.
3418 * producer.h: New file.
3419 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3420 producer.c.
3421 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3422 producer.h.
3423
3424 2017-09-26 Matthias Klose <doko@ubuntu.com>
3425
3426 * configure.ac: Search ncursesw before ncurses.
3427 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3428 * gdb_curses.h: Include <ncursesw/ncurses.h>
3429 * config.in, configure: Regenerate.
3430
3431 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3432
3433 PR gdb/22185
3434 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3435 obsolete.
3436 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3437 Remove i386sol2 support.
3438 * configure.nat <i386sol2>: Remove.
3439 <sol2-64>: Fold into ...
3440 <sol2>: ... this.
3441 Move common settings to default section.
3442 Add sol-thread.o.
3443 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3444 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3445 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3446 <i[34567]86-*-solaris*>: Remove.
3447 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3448
3449 * configure.ac: Remove wctype in libw check.
3450 (_MSE_INT_H): Don't define on Solaris 7-9.
3451 <solaris*>: Remove libthread_db.so.1 check.
3452 * configure: Regenerate.
3453 * config.in: Regenerate.
3454
3455 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3456 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3457 (gdb_ps_size_t): Remove.
3458 Use base types in users.
3459 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3460
3461 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3462
3463 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3464
3465 PR build/22206
3466 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3467 (adi_is_addr_mapped): Likewise.
3468 (PSR_ICC): Don't redefine.
3469 (PSR_IMPL): Likewise.
3470
3471 2017-09-25 Tom Tromey <tom@tromey.com>
3472
3473 * regcache.c (regcache::dump): Use string_printf.
3474
3475 2017-09-25 Tom Tromey <tom@tromey.com>
3476
3477 * regcache.c (class regcache_invalidator): New.
3478 (struct register_to_invalidate): Remove.
3479 (make_cleanup_regcache_invalidate): Remove.
3480 (regcache::raw_write): Use regcache_invalidator.
3481
3482 2017-09-25 Tom Tromey <tom@tromey.com>
3483
3484 * spu-tdep.c (spu2ppu_sniffer): Update.
3485 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3486 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3487 Remove.
3488 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3489 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3490 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3491 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3492 (frame_pop): Update.
3493
3494 2017-09-25 Tom Tromey <tom@tromey.com>
3495
3496 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3497 * regcache.h (regcache_xfree): Don't declare.
3498 * regcache.c (regcache_xfree): Remove.
3499 (do_regcache_xfree): Use delete.
3500 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3501 * linux-fork.c (free_fork): Use delete.
3502 (fork_save_infrun_state): Likewise.
3503 * jit.c (jit_dealloc_cache): Use delete.
3504 * infrun.c (discard_infcall_suspend_state): Use delete.
3505
3506 2017-09-25 Tom Tromey <tom@tromey.com>
3507
3508 * regcache.h (regcache_xmalloc): Don't declare.
3509 (regcache_raw_set_cached_value): Update comment.
3510 * regcache.c (regcache_xmalloc): Remove.
3511 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3512 * jit.c (jit_frame_sniffer): Use new.
3513 * frame.c (frame_save_as_regcache): Use new.
3514
3515 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3516
3517 * NEWS: Advertise support for guarded-storage registers on IBM z.
3518
3519 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3520
3521 * s390-linux-nat.c (have_regset_gs): New static variable.
3522 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3523 control block and guarded-storage broadcast control regsets.
3524 (s390_read_description): Detect whether the target has
3525 guarded-storage support, return appropriate tdesc.
3526 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3527 (features/s390x-gs-linux64.c): Likewise.
3528 (struct gdbarch_tdep) <have_gs>: New field.
3529 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3530 (s390_gsbc_regset): New variables.
3531 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3532 and s390_gsbc_regset, if applicable.
3533 (s390_core_read_description): Check whether core file was from a
3534 target with guarded-storage support; include appropriate regsets.
3535 (s390_gdbarch_init): Add registers for guarded-storage support.
3536 (_initialize_s390_tdep): Initialize new target descriptions that
3537 include registers for guarded-storage support.
3538 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3539 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3540 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3541 (S390_NUM_REGS): Adjust macro definition.
3542 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3543 (tdesc_s390x_gs_linux64): New declarations.
3544
3545 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3546
3547 * features/s390-gs-linux64.xml: New file.
3548 * features/s390-gs.xml: New file.
3549 * features/s390-gsbc.xml: New file.
3550 * features/s390x-gs-linux64.xml: New file.
3551 * features/Makefile (WHICH): Add s390-gs-linux64 and
3552 s390x-gs-linux64.
3553 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3554 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3555 * features/s390-gs-linux64.c: New generated file.
3556 * features/s390x-gs-linux64.c: New file.
3557 * regformats/s390-gs-linux64.dat: New file.
3558 * regformats/s390x-gs-linux64.dat: New file.
3559
3560 2017-09-23 Tom Tromey <tom@tromey.com>
3561
3562 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3563
3564 2017-09-22 Tom Tromey <tom@tromey.com>
3565
3566 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3567 type to scoped_restore_tmpl.
3568 <scoped_input_handler>: Initialize m_quit_handler directly.
3569
3570 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3571
3572 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3573 (cd_command): Likewise. Free "current_directory" before
3574 assigning to it.
3575 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3576 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3577 * top.c (gdb_dirbuf): Remove global declaration.
3578 * top.h (gdb_dirbuf): Likewise.
3579
3580 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3581
3582 * gnulib/aclocal.m4: Regenerate.
3583 * gnulib/config.in: Regenerate.
3584 * gnulib/configure: Regenerate.
3585 * gnulib/import/Makefile.am: Regenerate.
3586 * gnulib/import/Makefile.in: Regenerate.
3587 * gnulib/import/assure.h: New file.
3588 * gnulib/import/at-func.c: Likewise
3589 * gnulib/import/chdir-long.c: New file.
3590 * gnulib/import/chdir-long.h: New file.
3591 * gnulib/import/cloexec.c: New file.
3592 * gnulib/import/cloexec.h: New file.
3593 * gnulib/import/close.c: New file.
3594 * gnulib/import/closedir.c: New file.
3595 * gnulib/import/dirent-private.h: New file.
3596 * gnulib/import/dup-safer.c: New file.
3597 * gnulib/import/dup.c: New file.
3598 * gnulib/import/dup2.c: New file.
3599 * gnulib/import/error.c: New file.
3600 * gnulib/import/error.h: New file.
3601 * gnulib/import/exitfail.c: New file.
3602 * gnulib/import/exitfail.h: New file.
3603 * gnulib/import/fchdir.c: New file.
3604 * gnulib/import/fcntl.c: New file.
3605 * gnulib/import/fcntl.in.h: New file.
3606 * gnulib/import/fd-hook.c: New file.
3607 * gnulib/import/fd-hook.h: New file.
3608 * gnulib/import/fd-safer.c: New file.
3609 * gnulib/import/fdopendir.c: New file.
3610 * gnulib/import/filename.h: New file.
3611 * gnulib/import/filenamecat-lgpl.c: New file.
3612 * gnulib/import/filenamecat.h: New file.
3613 * gnulib/import/fstat.c: New file.
3614 * gnulib/import/fstatat.c: New file.
3615 * gnulib/import/getcwd-lgpl.c: New file.
3616 * gnulib/import/getcwd.c: New file.
3617 * gnulib/import/getdtablesize.c: New file.
3618 * gnulib/import/getlogin_r.c: New file.
3619 * gnulib/import/getprogname.c: New file.
3620 * gnulib/import/getprogname.h: New file.
3621 * gnulib/import/gettext.h: New file.
3622 * gnulib/import/glob-libc.h: New file.
3623 * gnulib/import/glob.c: New file.
3624 * gnulib/import/glob.in.h: New file.
3625 * gnulib/import/intprops.h: New file.
3626 * gnulib/import/m4/chdir-long.m4: New file.
3627 * gnulib/import/m4/close.m4: New file.
3628 * gnulib/import/m4/closedir.m4: New file.
3629 * gnulib/import/m4/d-ino.m4: New file.
3630 * gnulib/import/m4/d-type.m4: New file.
3631 * gnulib/import/m4/dup.m4: New file.
3632 * gnulib/import/m4/dup2.m4: New file.
3633 * gnulib/import/m4/error.m4: New file.
3634 * gnulib/import/m4/fchdir.m4: New file.
3635 * gnulib/import/m4/fcntl.m4: New file.
3636 * gnulib/import/m4/fcntl_h.m4: New file.
3637 * gnulib/import/m4/fdopendir.m4: New file.
3638 * gnulib/import/m4/filenamecat.m4: New file.
3639 * gnulib/import/m4/fstat.m4: New file.
3640 * gnulib/import/m4/fstatat.m4: New file.
3641 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3642 * gnulib/import/m4/getcwd-path-max.m4: New file.
3643 * gnulib/import/m4/getcwd.m4: New file.
3644 * gnulib/import/m4/getdtablesize.m4: New file.
3645 * gnulib/import/m4/getlogin_r.m4: New file.
3646 * gnulib/import/m4/getprogname.m4: New file.
3647 * gnulib/import/m4/glob.m4: New file.
3648 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3649 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3650 * gnulib/import/m4/mempcpy.m4: New file.
3651 * gnulib/import/m4/memrchr.m4: New file.
3652 * gnulib/import/m4/mode_t.m4: New file.
3653 * gnulib/import/m4/msvc-inval.m4: New file.
3654 * gnulib/import/m4/msvc-nothrow.m4: New file.
3655 * gnulib/import/m4/open.m4: New file.
3656 * gnulib/import/m4/openat.m4: New file.
3657 * gnulib/import/m4/opendir.m4: New file.
3658 * gnulib/import/m4/readdir.m4: New file.
3659 * gnulib/import/m4/realloc.m4: New file.
3660 * gnulib/import/m4/rewinddir.m4: New file.
3661 * gnulib/import/m4/save-cwd.m4: New file.
3662 * gnulib/import/m4/strdup.m4: New file.
3663 * gnulib/import/m4/strerror.m4: New file.
3664 * gnulib/import/m4/unistd-safer.m4: New file.
3665 * gnulib/import/mempcpy.c: New file.
3666 * gnulib/import/memrchr.c: New file.
3667 * gnulib/import/msvc-inval.c: New file.
3668 * gnulib/import/msvc-inval.h: New file.
3669 * gnulib/import/msvc-nothrow.c: New file.
3670 * gnulib/import/msvc-nothrow.h: New file.
3671 * gnulib/import/open.c: New file.
3672 * gnulib/import/openat-die.c: New file.
3673 * gnulib/import/openat-priv.h: New file.
3674 * gnulib/import/openat-proc.c: New file.
3675 * gnulib/import/openat.c: New file.
3676 * gnulib/import/openat.h: New file.
3677 * gnulib/import/opendir.c: New file.
3678 * gnulib/import/pipe-safer.c: New file.
3679 * gnulib/import/readdir.c: New file.
3680 * gnulib/import/realloc.c: New file.
3681 * gnulib/import/rewinddir.c: New file.
3682 * gnulib/import/save-cwd.c: New file.
3683 * gnulib/import/save-cwd.h: New file.
3684 * gnulib/import/strdup.c: New file.
3685 * gnulib/import/strerror-override.c: New file.
3686 * gnulib/import/strerror-override.h: New file.
3687 * gnulib/import/strerror.c: New file.
3688 * gnulib/import/unistd--.h: New file.
3689 * gnulib/import/unistd-safer.h: New file.
3690 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3691 "getcwd" and "glob".
3692 * ser-tcp.c: Undefine "close" before redefining it.
3693
3694 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3695
3696 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3697 get rid of res_val.
3698
3699 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3700
3701 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3702 <sol2,sparc>: Likewise.
3703 <sol2-64,i386>: Likewise.
3704
3705 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3706 -Wdeprecated-declarations on *-*-solaris*.
3707 * configure: Regenerate.
3708
3709 * procfs.c: Include "nat/inferior.h".
3710 (procfs_info_proc): Fix typo.
3711
3712 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3713
3714 * remote.c (vector): Include.
3715 (struct private_thread_info): Add field, thread_handle.
3716 (free_private_thread_info): Deallocate storage associated with
3717 thread handle.
3718 (get_private_info_thread): Initialize `thread_handle' field.
3719 (struct thread_item): Add field, thread_handle.
3720 (clear_threads_listing_context): Deallocate storage associated
3721 with thread handle.
3722 (start_thread): Add support for "handle" attribute.
3723 (thread_attributes): Add "handle".
3724 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3725 field.
3726 (remote_update_thread_list): Update thread_handle.
3727 (remote_thread_handle_to_thread_info): New function.
3728 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3729
3730 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3731
3732 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3733 function.
3734 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3735 * python/python-internal.h (thread_object_type): Declare.
3736
3737 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3738
3739 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3740 (target_thread_handle_to_thread_info): Declare.
3741 * target.c (target_thread_handle_to_thread_info): New function.
3742 * target-delegates.c: Regenerate.
3743 * gdbthread.h (find_thread_by_handle): Declare.
3744 * thread.c (find_thread_by_handle): New function.
3745 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3746 function.
3747 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3748
3749 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3750
3751 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3752
3753 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3754
3755 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3756
3757 2017-09-21 Yao Qi <yao.qi@linaro.org>
3758
3759 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3760 to gdb_target_obs.
3761
3762 2017-09-20 Tom Tromey <tom@tromey.com>
3763
3764 * breakpoint.c (struct counted_command_line): Remove.
3765 (breakpoint_commands): Update.
3766 (alloc_counted_command_line, incref_counted_command_line)
3767 (decref_counted_command_line, do_cleanup_counted_command_line)
3768 (make_cleanup_decref_counted_command_line): Remove.
3769 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3770 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3771 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3772 (save_breakpoints): Update.
3773 * breakpoint.h (counted_command_line): Now a typedef to
3774 shared_ptr.
3775 (struct breakpoint) <commands>: Now a counted_command_line.
3776 (struct bpstats) <command>: Likewise.
3777
3778 2017-09-20 Tom Tromey <tom@tromey.com>
3779
3780 * breakpoint.c (struct commands_info, do_map_commands_command):
3781 Remove.
3782 (commands_command_1): Update.
3783 (iterate_over_related_breakpoints): Take a function_view.
3784 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3785 (delete_command): Update.
3786 (map_breakpoint_numbers): Take a function_view.
3787 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3788 (disable_command): Update.
3789 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3790 (enable_command): Update.
3791 (struct disp_data, do_enable_breakpoint_disp)
3792 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3793 (do_map_enable_delete_breakpoint): Remove.
3794 (enable_once_command, enable_count_command, enable_delete_command)
3795 (delete_trace_variable_command): Update.
3796
3797 2017-09-20 Tom Tromey <tom@tromey.com>
3798
3799 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3800 (bpstat_clear): Use delete.
3801 (bpstats): New constructors.
3802 (bpstat_copy, bpstat_stop_status): Use new.
3803 (dprintf_after_condition_true): Update.
3804 * breakpoint.h (bpstats::bpstats): Add constructors.
3805 (bpstats::~bpstats): Add destructor.
3806
3807 2017-09-20 Pedro Alves <palves@redhat.com>
3808
3809 * eval.c (make_params): Delete, refactored as ...
3810 (class fake_method): ... this new type's ctor.
3811 (fake_method::~fake_method): New.
3812 (evaluate_subexp_standard): Use 'fake_method'.
3813
3814 2017-09-20 Tom Tromey <tom@tromey.com>
3815
3816 * windows-nat.c (get_windows_debug_event, windows_wait)
3817 (do_initial_windows_stuff, windows_attach): Update.
3818 * utils.c (vwarning, internal_vproblem): Update.
3819 (ui_unregister_input_event_handler_cleanup)
3820 (prepare_to_handle_input): Remove.
3821 (class scoped_input_handler): New.
3822 (defaulted_query, prompt_for_continue): Update.
3823 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3824 Update.
3825 * top.c (undo_terminal_modifications_before_exit): Update.
3826 * target/target.h (target_terminal_init, target_terminal_inferior)
3827 (target_terminal_ours): Don't declare.
3828 (class target_terminal): New.
3829 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3830 (target_terminal_ours_for_output)
3831 (make_cleanup_restore_target_terminal): Don't declare.
3832 (target_terminal_info): Remove.
3833 * target.c (enum terminal_state, terminal_state): Remove.
3834 (target_terminal::terminal_state): Define.
3835 (target_terminal::init): Rename from target_terminal_init.
3836 (target_terminal::inferior): Rename from
3837 target_terminal_inferior.
3838 (target_terminal::ours): Rename from target_terminal_ours.
3839 (target_terminal::ours_for_output): Rename from
3840 target_terminal_ours_for_output.
3841 (target_terminal::info): New method.
3842 (cleanup_restore_target_terminal)
3843 (make_cleanup_restore_target_terminal): Remove.
3844 * solib.c (handle_solib_event): Update.
3845 * remote.c (remote_serial_quit_handler): Update.
3846 (remote_terminal_inferior, remote_wait_as): Update.
3847 * record-full.c (record_full_wait_1): Update.
3848 * nto-procfs.c (procfs_create_inferior): Update.
3849 * nat/fork-inferior.c (startup_inferior): Update.
3850 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3851 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3852 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3853 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3854 (mi_breakpoint_created, mi_breakpoint_deleted)
3855 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3856 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3857 (mi_user_selected_context_changed, report_initial_inferior):
3858 Update.
3859 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3860 (linux_nat_terminal_inferior): Update.
3861 * infrun.c (follow_fork_inferior)
3862 (handle_vfork_child_exec_or_exit, do_target_resume)
3863 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3864 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3865 Update.
3866 * inflow.c (child_terminal_init, info_terminal_command): Update.
3867 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3868 (attach_command): Update.
3869 * infcall.c (call_thread_fsm_should_stop): Update.
3870 * gnu-nat.c (gnu_attach): Update.
3871 * extension.c (struct active_ext_lang_state)
3872 (restore_active_ext_lang): Update.
3873 * exceptions.c (print_flush): Update.
3874 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3875 (struct quit_handler_cleanup_data, restore_quit_handler)
3876 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3877 Remove.
3878 * cp-support.c (gdb_demangle): Update.
3879 * breakpoint.c (update_inserted_breakpoint_locations)
3880 (insert_breakpoint_locations, handle_jit_event)
3881 (disable_breakpoints_in_unloaded_shlib): Update.
3882 * annotate.c (annotate_breakpoints_invalid)
3883 (annotate_frames_invalid): Update.
3884
3885 2017-09-20 Tom Tromey <tom@tromey.com>
3886
3887 * main.c (catch_command_errors): Rename from
3888 catch_command_errors_const.
3889 (captured_main_1): Update.
3890
3891 2017-09-20 Pedro Alves <palves@redhat.com>
3892
3893 * cli/cli-cmds.c (list_command): Use print_sal_location.
3894 (print_sal_location): New function.
3895 (ambiguous_line_spec): Use print_sal_location.
3896 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3897 * symtab.c (find_function_start_sal): Likewise.
3898 * symtab.h (symtab_and_line::symbol): New field.
3899
3900 2017-09-20 Pedro Alves <palves@redhat.com>
3901
3902 * linespec.c (minsym_found): Handle non-text minsyms.
3903 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3904
3905 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3906
3907 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3908 backslash.
3909
3910 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3911
3912 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3913 vmovups instead vmovaps.
3914 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3915
3916 2017-09-19 John Baldwin <jhb@FreeBSD.org>
3917
3918 * NEWS (Changes since GDB 8.0): Add starti.
3919 * infcmd.c (enum run_break): New.
3920 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3921 case.
3922 (run_command): Use enum run_how.
3923 (start_command): Likewise.
3924 (starti_command): New function.
3925 (RUN_ARGS_HELP): New macro.
3926 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3927 commands. Add starti command.
3928
3929 2017-09-19 Yao Qi <yao.qi@linaro.org>
3930
3931 * Makefile.in (monitor.o): Remove the rule.
3932
3933 2017-09-19 Yao Qi <yao.qi@linaro.org>
3934
3935 * annotate.h (struct annotate_arg_emitter): Use
3936 DISABLE_COPY_AND_ASSIGN.
3937 * common/refcounted-object.h (refcounted_object): Likewise.
3938 * completer.h (struct completion_result): Likewise.
3939 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3940 * filename-seen-cache.h (filename_seen_cache): Likewise.
3941 * gdbcore.h (thread_section_name): Likewise.
3942 * gdb_regex.h (compiled_regex): Likewise.
3943 * gdbthread.h (scoped_restore_current_thread): Likewise.
3944 * inferior.h (scoped_restore_current_inferior): Likewise.
3945 * jit.c (jit_reader): Likewise.
3946 * linespec.h (struct linespec_result): Likewise.
3947 * mi/mi-parse.h (struct mi_parse): Likewise.
3948 * nat/fork-inferior.c (execv_argv): Likewise.
3949 * progspace.h (scoped_restore_current_program_space): Likewise.
3950 * python/python-internal.h (class gdbpy_enter): Likewise.
3951 * regcache.h (regcache): Likewise.
3952 * target-descriptions.c (struct tdesc_reg): Likewise.
3953 (struct tdesc_type): Likewise.
3954 (struct tdesc_feature): Likewise.
3955 * ui-out.h (ui_out_emit_type): Likewise.
3956
3957 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3958
3959 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3960 label abort_expression.
3961
3962 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3963
3964 * common/buffer.c (buffer_xml_printf): Adjust.
3965 * common/xml-utils.c (xml_escape_text): Change return type to
3966 std::string, update code accordingly.
3967 * common/xml-utils.h (xml_escape_text): Change return type to
3968 std::string.
3969 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3970 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3971 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3972 Adjust.
3973
3974 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3975
3976 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3977 (SUBDIR_UNITTESTS_OBS): Add new object file.
3978 * unittests/xml-utils-selftests.c: New file.
3979
3980 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3981
3982 * common/selftest.h (selftest): New struct/interface.
3983 (register_test): Add name parameter, add new overload.
3984 (run_tests): Add filter parameter.
3985 (for_each_selftest_ftype): New typedef.
3986 (for_each_selftest): New declaration.
3987 * common/selftest.c (tests): Change type to
3988 map<string, unique_ptr<selftest>>.
3989 (simple_selftest): New struct.
3990 (register_test): New function.
3991 (register_test): Add name parameter and use it.
3992 (run_tests): Add filter parameter and use it. Add prints.
3993 Adjust to vector -> map change.
3994 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3995 registering selftests.
3996 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3997 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3998 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3999 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4000 * findvar.c (_initialize_findvar): Likewise.
4001 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4002 * maint.c (maintenance_selftest): Update call to run_tests.
4003 (maintenance_info_selftests): New function.
4004 (_initialize_maint_cmds): Register "maintenance info selftests"
4005 command. Update "maintenance selftest" doc.
4006 * regcache.c (_initialize_regcache): Add names when registering
4007 selftests.
4008 * rust-exp.y (_initialize_rust_exp): Likewise.
4009 * selftest-arch.c (gdbarch_selftest): New struct.
4010 (gdbarch_tests): Remove.
4011 (register_test_foreach_arch): Add name parameter. Call
4012 register_test.
4013 (tests_with_arch): Remove, move most content to
4014 gdbarch_selftest::operator().
4015 (_initialize_selftests_foreach_arch): Remove.
4016 * selftest-arch.h (register_test_foreach_arch): Add name
4017 parameter.
4018 (run_tests_with_arch): New declaration.
4019 * utils-selftests.c (_initialize_utils_selftests): Add names
4020 when registering selftests.
4021 * utils.c (_initialize_utils): Likewise.
4022 * unittests/array-view-selftests.c
4023 (_initialize_array_view_selftests): Likewise.
4024 * unittests/environ-selftests.c (_initialize_environ_selftests):
4025 Likewise.
4026 * unittests/function-view-selftests.c
4027 (_initialize_function_view_selftests): Likewise.
4028 * unittests/offset-type-selftests.c
4029 (_initialize_offset_type_selftests): Likewise.
4030 * unittests/optional-selftests.c
4031 (_initialize_optional_selftests): Likewise.
4032 * unittests/scoped_restore-selftests.c
4033 (_initialize_scoped_restore_selftests): Likewise.
4034 * NEWS: Document "maintenance selftest" and "maint info
4035 selftests".
4036
4037 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4038
4039 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4040 scoped_restore.
4041
4042 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4043
4044 * mi/mi-main.c (mi_load_progress): Make uiout variable
4045 a unique_ptr.
4046
4047 2017-09-15 Pedro Alves <palves@redhat.com>
4048
4049 * compile/compile-c-types.c (convert_enum, convert_int)
4050 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4051
4052 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4053
4054 * dwarf2read.c (copy_string): Remove.
4055 (parse_macro_definition): Replace copy_string with savestring.
4056
4057 2017-09-15 Yao Qi <yao.qi@linaro.org>
4058
4059 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4060 gdb_target_obs.
4061 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4062 Likewise.
4063 (i[34567]86-*-linux*): Likewise.
4064
4065 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4066
4067 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4068 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4069 <stack>: Change type to std::vector.
4070 <stack_len, stack_allocated>: Remove.
4071 <grow_stack>: Remove.
4072 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4073 (dwarf_expr_context::~dwarf_expr_context): Remove.
4074 (dwarf_expr_context::grow_stack): Remove.
4075 (dwarf_expr_context::push): Adjust.
4076 (dwarf_expr_context::pop): Adjust.
4077 (dwarf_expr_context::fetch): Adjust.
4078 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4079 (dwarf_expr_context::stack_empty_p): Adjust.
4080 (dwarf_expr_context::execute_stack_op): Adjust.
4081
4082 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4083
4084 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4085 return type to bool.
4086 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4087
4088 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4089
4090 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4091 Change type to bool.
4092 (dwarf_stack_value) <in_stack_memory>: Likewise.
4093 (dwarf_expr_context) <push_address>: Change parameter type to
4094 bool.
4095 <fetch_in_stack_memory>: Change return type to bool.
4096 <push>: Change parameter type to bool.
4097 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4098 to bool.
4099 (dwarf_expr_context::push_address): Likewise.
4100 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4101 to bool.
4102 (dwarf_expr_context::execute_stack_op): Adjust.
4103 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4104
4105 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4106
4107 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4108 (struct dwarf_expr_context) <n_pieces>: Remove.
4109 <pieces>: Change type to std::vector.
4110 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4111 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4112 pieces.
4113 (dwarf_expr_context::add_piece): Adjust.
4114 * dwarf2loc.c (struct piece_closure): Initialize fields.
4115 <n_pieces>: Remove.
4116 <pieces>: Change type to std::vector.
4117 (allocate_piece_closure): Adjust, change parameter to
4118 std::vector rvalue and std::move it to piece_closure.
4119 (rw_pieced_value): Adjust.
4120 (check_pieced_synthetic_pointer): Adjust.
4121 (indirect_synthetic_pointer): Adjust.
4122 (coerce_pieced_ref): Adjust.
4123 (free_pieced_value_closure): Adjust. Use delete to free
4124 piece_closure.
4125 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4126 to allocate_piece_closure.
4127 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4128
4129 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4130
4131 * probe.h (probe_ops_cp): Remove typedef.
4132 (DEF_VEC_P (probe_ops_cp)): Remove.
4133 (all_probe_ops): Change type to std::vector.
4134 * probe.c (info_probes_for_ops): Adjust to vector change.
4135 (probe_linespec_to_ops): Likewise.
4136 (all_probe_ops): Change type to std::vector.
4137 (_initialize_probe): Adjust to vector change.
4138 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4139 * elfread.c (elf_get_probes): Likewise.
4140 * stap-probe.c (_initialize_stap_probe): Likewise.
4141
4142 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4143
4144 * probe.h (struct bound_probe): Define constructors.
4145 * probe.c (bound_probe_s): Remove typedef.
4146 (DEF_VEC_O (bound_probe_s)): Remove VEC.
4147 (collect_probes): Change return type to std::vector, remove
4148 cleanup.
4149 (compare_probes): Return bool, change parameter type. Change
4150 semantic to "less than".
4151 (gen_ui_out_table_header_info): Change parameter to std::vector
4152 and update.
4153 (exists_probe_with_pops): Likewise.
4154 (info_probes_for_ops): Update to std::vector change.
4155 (enable_probes_command): Likewise.
4156 (disable_probes_command): Likewise.
4157
4158 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4159
4160 * probe.h (struct probe_ops) <get_probes>: Change parameter from
4161 vec to std::vector.
4162 * probe.c (parse_probes_in_pspace): Update.
4163 (find_probes_in_objfile): Update.
4164 (find_probe_by_pc): Update.
4165 (collect_probes): Update.
4166 (probe_any_get_probes): Update.
4167 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4168 return type to reference to std::vector.
4169 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4170 std::vector and update.
4171 (dtrace_process_dof): Likewise.
4172 (dtrace_get_probes): Likewise.
4173 * elfread.c (elf_get_probes): Change return type to std::vector,
4174 store an std::vector in bfd_data.
4175 (probe_key_free): Update to std::vector.
4176 * stap-probe.c (handle_stap_probe): Change parameter to
4177 std::vector and update.
4178 (stap_get_probes): Likewise.
4179 * symfile-debug.c (debug_sym_get_probes): Change return type to
4180 std::vector and update.
4181
4182 2017-09-11 Tom Tromey <tom@tromey.com>
4183
4184 * breakpoint.c (program_breakpoint_here_p): Update.
4185 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4186 from make_show_memory_breakpoints_cleanup. Return a
4187 scoped_restore_tmpl<int>.
4188 (restore_show_memory_breakpoints): Remove.
4189 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4190 * mem-break.c (memory_validate_breakpoint): Update.
4191 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4192 (ia64_memory_remove_breakpoint): Update.
4193 (ia64_breakpoint_from_pc): Update.
4194 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4195 from make_show_memory_breakpoints_cleanup.
4196
4197 2017-09-11 Tom Tromey <tom@tromey.com>
4198
4199 * d-namespace.c (d_lookup_symbol): Use std::string.
4200 (find_symbol_in_baseclass): Likewise.
4201
4202 2017-09-11 Tom Tromey <tom@tromey.com>
4203
4204 * ctf.c (ctf_start): Use std::string.
4205
4206 2017-09-11 Tom Tromey <tom@tromey.com>
4207
4208 * ada-lang.c (is_known_support_routine): Update.
4209 (ada_unhandled_exception_name_addr_from_raise): Update.
4210 * guile/scm-frame.c (gdbscm_frame_name): Update.
4211 * python/py-frame.c (frapy_name): Update.
4212 (frapy_function): Update.
4213 * stack.h (find_frame_funname): Update.
4214 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4215 (print_frame): Update.
4216
4217 2017-09-11 Tom Tromey <tom@tromey.com>
4218
4219 * findcmd.c (put_bits): Take a gdb::byte_vector.
4220 (parse_find_args): Return gdb::byte_vector. "args" now const.
4221 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
4222 cleanups.
4223 (find_command): Update.
4224
4225 2017-09-11 Tom Tromey <tom@tromey.com>
4226
4227 * cli/cli-script.c (class scoped_restore_hook_in): New.
4228 (clear_hook_in_cleanup): Remove.
4229 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4230 scoped_restore_hook_in.
4231
4232 2017-09-11 Tom Tromey <tom@tromey.com>
4233
4234 * cli/cli-script.c (restore_interp): Remove.
4235 (read_command_lines): Use scoped_restore_interp.
4236 * interps.c (scoped_restore_interp::set_temp): Rename from
4237 interp_set_temp.
4238 * interps.h (class scoped_restore_interp): New.
4239 (interp_set_temp): Remove.
4240
4241 2017-09-11 Tom Tromey <tom@tromey.com>
4242
4243 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4244 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4245 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4246 scoped_restore.
4247 (mi_cmd_break_insert_1): Update.
4248 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4249 scoped_restore.
4250
4251 2017-09-11 Tom Tromey <tom@tromey.com>
4252
4253 * demangle.c (demangle_command): Update.
4254 * breakpoint.c (disable_command): Update.
4255 (enable_command): Update.
4256 (find_location_by_number): Make "number" const. Use
4257 get_number_trailer.
4258 * cli/cli-utils.c (extract_arg): Return std::string.
4259 * probe.c (parse_probe_linespec): Update. Change types.
4260 (collect_probes): Take string arguments.
4261 (parse_probe_linespec): Likewise.
4262 (info_probes_for_ops): Update.
4263 (enable_probes_command): Update.
4264 (disable_probes_command): Update.
4265 * break-catch-sig.c (catch_signal_split_args): Update.
4266 * mi/mi-parse.c (mi_parse): Update.
4267
4268 2017-09-11 Tom Tromey <tom@tromey.com>
4269
4270 * language.h (language_enum): Make argument const.
4271 * language.c (language_enum): Make argument const.
4272
4273 2017-09-11 Tom Tromey <tom@tromey.com>
4274
4275 * common/common-utils.h (skip_to_space): Remove macro, redeclare
4276 as function.
4277 (skip_to_space): Rename from skip_to_space_const.
4278 * common/common-utils.c (skip_to_space): New function.
4279 (skip_to_space): Rename from skip_to_space_const.
4280 * cli/cli-utils.h (get_number): Rename from get_number_const.
4281 (extract_arg): Rename from extract_arg_const.
4282 * cli/cli-utils.c (get_number): Rename from get_number_const.
4283 (extract_arg): Rename from extract_arg_const.
4284 (number_or_range_parser::get_number): Use ::get_number.
4285 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4286 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4287 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4288 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4289 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4290 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4291 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4292 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4293
4294 2017-09-11 Tom Tromey <tom@tromey.com>
4295
4296 * python/python.c (do_start_initialization): Use
4297 py-event-types.def to initialize types.
4298 Define all object type structures.
4299 * python/python-internal.h: Don't declare event initialization
4300 functions.
4301 * python/py-threadevent.c (thread_event_object_type): Don't
4302 define.
4303 * python/py-stopevent.c (stop_event_object_type): Don't define.
4304 * python/py-signalevent.c (signal_event_object_type): Don't
4305 declare or define.
4306 * python/py-newobjfileevent.c (new_objfile_event_object_type)
4307 (clear_objfiles_event_object_type): Don't declare or define.
4308 * python/py-infevents.c (inferior_call_pre_event_object_type)
4309 (inferior_call_post_event_object_type)
4310 (register_changed_event_object_type)
4311 (memory_changed_event_object_type): Don't declare or define.
4312 * python/py-inferior.c (new_thread_event_object_type)
4313 (new_inferior_event_object_type)
4314 (inferior_deleted_event_object_type): Don't declare or define.
4315 * python/py-exitedevent.c (exited_event_object_type): Don't
4316 declare or define.
4317 * python/py-evts.c (gdbpy_initialize_py_events): Use
4318 py-all-events.def.
4319 * python/py-events.h (thread_event_object_type): Don't declare.
4320 (events_object): Use py-all-events.def.
4321 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
4322 py-event-types.def.
4323 * python/py-event-types.def: New file.
4324 * python/py-continueevent.c (create_continue_event_object): Don't
4325 declare or define.
4326 * python/py-bpevent.c (breakpoint_event_object_type): Don't
4327 declare or define.
4328 * python/py-all-events.def: New file.
4329
4330 2017-09-11 Tom Tromey <tom@tromey.com>
4331
4332 * python/py-threadevent.c (create_thread_event_object): Return
4333 gdbpy_ref.
4334 * python/py-stopevent.h (create_stop_event_object)
4335 (create_breakpoint_event_object, create_signal_event_object):
4336 Update.
4337 * python/py-stopevent.c (create_stop_event_object): Return
4338 gdbpy_ref.
4339 (emit_stop_event): Update.
4340 * python/py-signalevent.c (create_signal_event_object): Return
4341 gdbpy_ref.
4342 * python/py-infevents.c (create_inferior_call_event_object):
4343 Update.
4344 * python/py-event.h (create_event_object)
4345 (create_thread_event_object): Update.
4346 * python/py-event.c (create_event_object): Return gdbpy_ref.
4347 * python/py-continueevent.c: Return gdbpy_ref.
4348 * python/py-bpevent.c (create_breakpoint_event_object): Return
4349 gdbpy_ref.
4350
4351 2017-09-11 Tom Tromey <tom@tromey.com>
4352
4353 PR python/15622:
4354 * NEWS: Add entry.
4355 * python/python.c (do_start_initialization): Initialize new event
4356 types.
4357 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4358 (gdbpy_initialize_inferior_deleted_event)
4359 (gdbpy_initialize_new_thread_event): Declare.
4360 * python/py-threadevent.c (create_thread_event_object): Add option
4361 "thread" parameter.
4362 * python/py-inferior.c (new_thread_event_object_type)
4363 (new_inferior_event_object_type)
4364 (inferior_deleted_event_object_type): Declare.
4365 (python_new_inferior, python_inferior_deleted): New functions.
4366 (add_thread_object): Emit new_thread event.
4367 (gdbpy_initialize_inferior): Attach new functions to corresponding
4368 observers.
4369 (new_thread, new_inferior, inferior_deleted): Define new event
4370 types.
4371 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4372 registries.
4373 * python/py-events.h (events_object) <new_inferior,
4374 inferior_deleted, new_thread>: New fields.
4375 * python/py-event.h (create_thread_event_breakpoint): Add optional
4376 "thread" parameter.
4377
4378 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4379
4380 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4381 check current_ui instead.
4382 (internal_vproblem): Likewise.
4383
4384 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4385
4386 * thread.c (print_thread_info_1): Remove unnecessary calls to
4387 uiout->is_mi_like_p.
4388
4389 2017-09-09 Tom Tromey <tom@tromey.com>
4390
4391 * namespace.h (add_using_directive): Update.
4392 * namespace.c (add_using_directive): Change type of excludes to
4393 std::vector.
4394 * dwarf2read.c (read_import_statement): Use std::vector.
4395 (read_namespace): Update.
4396 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4397
4398 2017-09-09 Tom Tromey <tom@tromey.com>
4399
4400 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4401
4402 2017-09-09 Tom Tromey <tom@tromey.com>
4403
4404 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4405
4406 2017-09-09 Tom Tromey <tom@tromey.com>
4407
4408 * stack.c (func_command): Use gdb::def_vector.
4409
4410 2017-09-09 Tom Tromey <tom@tromey.com>
4411
4412 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4413 ui_out_emit_list, ui_out_emit_tuple.
4414 (mi_cmd_var_update): Likewise.
4415
4416 2017-09-09 Tom Tromey <tom@tromey.com>
4417
4418 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4419 ui_out_redirect_pop.
4420 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4421 ui_out_redirect_pop.
4422 * utils.c (do_ui_out_redirect_pop)
4423 (make_cleanup_ui_out_redirect_pop): Remove.
4424 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4425 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4426 * ui-out.h (ui_out_redirect_pop): New class.
4427
4428 2017-09-09 Tom Tromey <tom@tromey.com>
4429
4430 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4431 (list_available_thread_groups, mi_cmd_list_thread_groups)
4432 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4433 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4434 Likewise.
4435
4436 2017-09-09 Tom Tromey <tom@tromey.com>
4437
4438 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4439 ui_out_emit_tuple.
4440
4441 2017-09-09 Tom Tromey <tom@tromey.com>
4442
4443 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4444 * stack.c (print_frame): Use ui_out_emit_tuple.
4445 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4446 (info_spu_mailbox_command, info_spu_dma_command)
4447 (info_spu_proxydma_command): Likewise.
4448 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4449 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4450 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4451 ui_out_emit_tuple.
4452 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4453
4454 2017-09-09 Tom Tromey <tom@tromey.com>
4455
4456 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4457 (class ui_out_emit_table): Update comment.
4458 * ui-out.c (do_cleanup_table_end)
4459 (make_cleanup_ui_out_table_begin_end): Remove.
4460 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4461 (info_spu_dma_cmdlist): Likewise.
4462 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4463 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4464 ui_out_emit_table.
4465
4466 2017-09-09 Tom Tromey <tom@tromey.com>
4467
4468 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4469 ui_out_emit_list, gdb::optional.
4470
4471 2017-09-09 John Baldwin <jhb@FreeBSD.org>
4472
4473 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4474 prototype.
4475 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4476 prototype.
4477 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4478 prototype.
4479 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4480 * ada-exp.y: Remove _initialize_ada_exp prototype.
4481 * ada-lang.c: Remove _initialize_ada_language prototype.
4482 * ada-tasks.c: Remove _initialize_tasks prototype.
4483 * addrmap.c: Remove _initialize_addrmap prototype.
4484 * agent.c: Remove _initialize_agent prototype.
4485 * aix-thread.c: Remove _initialize_aix_thread prototype.
4486 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4487 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4488 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4489 prototype.
4490 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4491 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4492 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4493 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4494 prototype.
4495 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4496 prototype.
4497 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4498 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4499 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4500 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4501 prototype.
4502 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4503 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4504 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4505 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4506 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4507 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4508 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4509 prototype.
4510 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4511 prototype.
4512 * annotate.c: Remove _initialize_annotate prototype.
4513 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4514 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4515 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4516 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4517 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4518 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4519 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4520 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4521 prototype.
4522 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4523 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4524 * auto-load.c: Remove _initialize_auto_load prototype.
4525 * auxv.c: Remove _initialize_auxv prototype.
4526 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4527 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4528 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4529 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4530 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4531 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4532 prototype.
4533 * break-catch-throw.c: Remove _initialize_break_catch_throw
4534 prototype.
4535 * breakpoint.c: Remove _initialize_breakpoint prototype.
4536 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4537 * btrace.c: Remove _initialize_btrace prototype.
4538 * charset.c: Remove _initialize_charset prototype.
4539 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4540 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4541 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4542 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4543 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4544 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4545 * coffread.c: Remove _initialize_coffread prototype.
4546 * compile/compile.c: Remove _initialize_compile prototype.
4547 * complaints.c: Remove _initialize_complaints prototype.
4548 * completer.c: Remove _initialize_completer prototype.
4549 * copying.awk: Remove _initialize_copying prototype.
4550 * copying.c: Regenerate.
4551 * core-regset.c: Remove _initialize_core_regset prototype.
4552 * corefile.c: Remove _initialize_core prototype.
4553 * corelow.c: Remove _initialize_corelow prototype.
4554 * cp-abi.c: Remove _initialize_cp_abi prototype.
4555 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4556 * cp-support.c: Remove _initialize_cp_support prototype.
4557 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4558 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4559 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4560 * ctf.c: Remove _initialize_ctf prototype.
4561 * d-lang.c: Remove _initialize_d_language prototype.
4562 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4563 prototype.
4564 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4565 * dbxread.c: Remove _initialize_dbxread prototype.
4566 * dcache.c: Remove _initialize_dcache prototype.
4567 * demangle.c: Remove _initialize_demangler prototype.
4568 * disasm-selftests.c: Remove _initialize_disasm_selftests
4569 prototype.
4570 * disasm.c: Remove _initialize_disasm prototype.
4571 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4572 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4573 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4574 prototype.
4575 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4576 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4577 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4578 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4579 * elfread.c: Remove _initialize_elfread prototype.
4580 * exec.c: Remove _initialize_exec prototype.
4581 * extension.c: Remove _initialize_extension prototype.
4582 * f-lang.c: Remove _initialize_f_language prototype.
4583 * f-valprint.c: Remove _initialize_f_valprint prototype.
4584 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4585 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4586 * filesystem.c: Remove _initialize_filesystem prototype.
4587 * findcmd.c: Remove _initialize_mem_search prototype.
4588 * fork-child.c: Remove _initialize_fork_child prototype.
4589 * frame-base.c: Remove _initialize_frame_base prototype.
4590 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4591 * frame.c: Remove _initialize_frame prototype.
4592 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4593 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4594 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4595 * gcore.c: Remove _initialize_gcore prototype.
4596 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4597 * gdbarch.c: Regenerate.
4598 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4599 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4600 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4601 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4602 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4603 * go-lang.c: Remove _initialize_go_language prototype.
4604 * go32-nat.c: Remove _initialize_go32_nat prototype.
4605 * guile/guile.c: Remove _initialize_guile prototype.
4606 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4607 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4608 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4609 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4610 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4611 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4612 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4613 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4614 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4615 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4616 prototype.
4617 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4618 prototype.
4619 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4620 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4621 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4622 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4623 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4624 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4625 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4626 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4627 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4628 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4629 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4630 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4631 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4632 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4633 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4634 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4635 prototype.
4636 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4637 prototype.
4638 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4639 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4640 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4641 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4642 * infcall.c: Remove _initialize_infcall prototype.
4643 * infcmd.c: Remove _initialize_infcmd prototype.
4644 * inferior.c: Remove _initialize_inferiors prototype.
4645 * inflow.c: Remove _initialize_inflow prototype.
4646 * infrun.c: Remove _initialize_infrun prototype.
4647 * interps.c: Remove _initialize_interpreter prototype.
4648 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4649 * jit.c: Remove _initialize_jit prototype.
4650 * language.c: Remove _initialize_language prototype.
4651 * linux-fork.c: Remove _initialize_linux_fork prototype.
4652 * linux-nat.c: Remove _initialize_linux_nat prototype.
4653 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4654 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4655 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4656 * m2-lang.c: Remove _initialize_m2_language prototype.
4657 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4658 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4659 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4660 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4661 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4662 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4663 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4664 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4665 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4666 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4667 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4668 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4669 * machoread.c: Remove _initialize_machoread prototype.
4670 * macrocmd.c: Remove _initialize_macrocmd prototype.
4671 * macroscope.c: Remove _initialize_macroscope prototype.
4672 * maint.c: Remove _initialize_maint_cmds prototype.
4673 * mdebugread.c: Remove _initialize_mdebugread prototype.
4674 * memattr.c: Remove _initialize_mem prototype.
4675 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4676 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4677 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4678 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4679 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4680 * microblaze-linux-tdep.c: Remove
4681 _initialize_microblaze_linux_tdep prototype.
4682 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4683 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4684 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4685 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4686 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4687 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4688 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4689 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4690 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4691 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4692 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4693 prototype.
4694 * mipsread.c: Remove _initialize_mipsread prototype.
4695 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4696 prototype.
4697 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4698 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4699 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4700 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4701 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4702 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4703 prototype.
4704 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4705 * nto-procfs.c: Remove _initialize_procfs prototype.
4706 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4707 * objc-lang.c: Remove _initialize_objc_language prototype.
4708 * objfiles.c: Remove _initialize_objfiles prototype.
4709 * observer.c: Remove observer_test_first_notification_function,
4710 observer_test_second_notification_function,
4711 observer_test_third_notification_function, and
4712 _initialize_observer prototypes.
4713 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4714 * osabi.c: Remove _initialize_gdb_osabi prototype.
4715 * osdata.c: Remove _initialize_osdata prototype.
4716 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4717 * parse.c: Remove _initialize_parse prototype.
4718 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4719 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4720 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4721 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4722 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4723 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4724 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4725 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4726 * printcmd.c: Remove _initialize_printcmd prototype.
4727 * probe.c: Remove _initialize_probe prototype.
4728 * proc-api.c: Remove _initialize_proc_api prototype.
4729 * proc-events.c: Remove _initialize_proc_events prototype.
4730 * proc-service.c: Remove _initialize_proc_service prototype.
4731 * procfs.c: Remove _initialize_procfs prototype.
4732 * psymtab.c: Remove _initialize_psymtab prototype.
4733 * python/python.c: Remove _initialize_python prototype.
4734 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4735 * record-btrace.c: Remove _initialize_record_btrace prototype.
4736 * record-full.c: Remove _initialize_record_full prototype.
4737 * record.c: Remove _initialize_record prototype.
4738 * regcache.c: Remove _initialize_regcache prototype.
4739 * reggroups.c: Remove _initialize_reggroup prototype.
4740 * remote-notif.c: Remove _initialize_notif prototype.
4741 * remote-sim.c: Remove _initialize_remote_sim prototype.
4742 * remote.c: Remove _initialize_remote prototype.
4743 * reverse.c: Remove _initialize_reverse prototype.
4744 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4745 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4746 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4747 prototype.
4748 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4749 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4750 * rust-exp.y: Remove _initialize_rust_exp prototype.
4751 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4752 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4753 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4754 * score-tdep.c: Remove _initialize_score_tdep prototype.
4755 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4756 prototype.
4757 * ser-go32.c: Remove _initialize_ser_dos prototype.
4758 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4759 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4760 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4761 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4762 * serial.c: Remove _initialize_serial prototype.
4763 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4764 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4765 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4766 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4767 * skip.c: Remove _initialize_step_skip prototype.
4768 * sol-thread.c: Remove _initialize_sol_thread prototype.
4769 * solib-aix.c: Remove _initialize_solib_aix prototype.
4770 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4771 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4772 * solib-frv.c: Remove _initialize_frv_solib prototype.
4773 * solib-spu.c: Remove _initialize_spu_solib prototype.
4774 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4775 * solib-target.c: Remove _initialize_solib_target prototype.
4776 * solib.c: Remove _initialize_solib prototype.
4777 * source.c: Remove _initialize_source prototype.
4778 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4779 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4780 prototype.
4781 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4782 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4783 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4784 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4785 prototype.
4786 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4787 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4788 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4789 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4790 prototype.
4791 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4792 prototype.
4793 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4794 prototype.
4795 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4796 prototype.
4797 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4798 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4799 prototype.
4800 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4801 prototype.
4802 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4803 prototype.
4804 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4805 prototype.
4806 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4807 prototype.
4808 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4809 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4810 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4811 * stabsread.c: Remove _initialize_stabsread prototype.
4812 * stack.c: Remove _initialize_stack prototype.
4813 * stap-probe.c: Remove _initialize_stap_probe prototype.
4814 * std-regs.c: Remove _initialize_frame_reg prototype.
4815 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4816 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4817 * symfile.c: Remove _initialize_symfile prototype.
4818 * symmisc.c: Remove _initialize_symmisc prototype.
4819 * symtab.c: Remove _initialize_symtab prototype.
4820 * target-dcache.c: Remove _initialize_target_dcache prototype.
4821 * target-descriptions.c: Remove _initialize_target_descriptions
4822 prototype.
4823 * thread.c: Remove _initialize_thread prototype.
4824 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4825 prototype.
4826 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4827 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4828 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4829 prototype.
4830 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4831 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4832 * tracefile.c: Remove _initialize_tracefile prototype.
4833 * tracepoint.c: Remove _initialize_tracepoint prototype.
4834 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4835 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4836 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4837 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4838 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4839 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4840 * tui/tui.c: Remove _initialize_tui prototype.
4841 * typeprint.c: Remove _initialize_typeprint prototype.
4842 * user-regs.c: Remove _initialize_user_regs prototype.
4843 * utils.c: Remove _initialize_utils prototype.
4844 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4845 * valarith.c: Remove _initialize_valarith prototype.
4846 * valops.c: Remove _initialize_valops prototype.
4847 * valprint.c: Remove _initialize_valprint prototype.
4848 * value.c: Remove _initialize_values prototype.
4849 * varobj.c: Remove _initialize_varobj prototype.
4850 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4851 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4852 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4853 * windows-nat.c: Remove _initialize_windows_nat,
4854 _initialize_check_for_gdb_ini, and _initialize_loadable
4855 prototypes.
4856 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4857 * xcoffread.c: Remove _initialize_xcoffread prototype.
4858 * xml-support.c: Remove _initialize_xml_support prototype.
4859 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4860 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4861 prototype.
4862 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4863 prototype.
4864 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4865
4866 2017-09-08 Keith Seitz <keiths@redhat.com>
4867
4868 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4869 field.
4870
4871 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4872
4873 * f-valprint.c (f_val_print): Remove check for one byte
4874 sized integers. Remove printing of character type.
4875
4876 2017-09-08 Frank Penczek <frank.penczek@intel.com>
4877 Christoph Weinmann <christoph.t.weinmann@intel.com>
4878 Bernhard Heckel <bernhard.heckel@intel.com>
4879
4880 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4881 to maintain proper indentation when printing pointers/refs.
4882
4883 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4884
4885 GDB 8.0.1 released.
4886
4887 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4888
4889 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4890
4891 2017-09-05 Tom Tromey <tom@tromey.com>
4892
4893 * parse.c (funcall_chain): Now a std::vector.
4894 (start_arglist, end_arglist): Simplify.
4895 (free_funcalls): Remove.
4896 (parse_exp_in_context_1): Remove cleanup.
4897
4898 2017-09-05 Tom Tromey <tom@tromey.com>
4899
4900 * go-exp.y (go_parse): Don't create a cleanup.
4901
4902 2017-09-05 Tom Tromey <tom@tromey.com>
4903
4904 * d-exp.y (PrimaryExpression): Use std::string.
4905 (d_parse): Don't create a cleanup.
4906
4907 2017-09-05 Tom Tromey <tom@tromey.com>
4908
4909 * utils.c (do_clear_parser_state): Remove.
4910 (make_cleanup_clear_parser_state): Remove.
4911 * p-exp.y (pascal_parse): Use scoped_restore.
4912 * m2-exp.y (m2_parse): Use scoped_restore.
4913 * f-exp.y (f_parse): Use scoped_restore.
4914 * d-exp.y (d_parse): Use scoped_restore.
4915 * c-exp.y (c_parse): Use scoped_restore.
4916 * ada-exp.y (ada_parse): Use scoped_restore.
4917 * utils.h (make_cleanup_clear_parser_state): Remove.
4918
4919 2017-09-06 Keith Seitz <keiths@redhat.com>
4920
4921 * dwarf2read.c (dw2_linkage_name_attr): New function.
4922 (dw2_linkage_name): New function.
4923 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4924 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4925 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4926
4927 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4928
4929 * config/djgpp/djconfig.sh: Correct shell portability issue.
4930
4931 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4932
4933 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4934
4935 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4936
4937 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4938 * NEWS: Mention new FreeBSD/mips native configuration.
4939 * configure.host: Add aarch64*-*-freebsd*.
4940 * configure.nat: Likewise.
4941 * aarch64-fbsd-nat.c: New file.
4942
4943 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4944
4945 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4946 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4947 * NEWS: Mention new FreeBSD/aarch64 target.
4948 * configure.tgt: Add aarch64*-*-freebsd*.
4949 * aarch64-fbsd-tdep.c: New file.
4950 * aarch64-fbsd-tdep.h: New file.
4951
4952 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4953
4954 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4955
4956 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4957
4958 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4959 of TLS symbols.
4960
4961 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4962
4963 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4964 call.
4965
4966 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4967
4968 * infrun.c (follow_exec): Call add_thread after
4969 target_find_description.
4970
4971 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4972
4973 * infrun.c (handle_inferior_event_1): When exec'ing, read
4974 stop_pc after follow_exec.
4975
4976 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4977
4978 * remote.c (process_g_packet): Update error message.
4979
4980 2017-09-05 Yao Qi <yao.qi@linaro.org>
4981
4982 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4983 targets.
4984
4985 2017-09-05 Pedro Alves <palves@redhat.com>
4986
4987 * eval.c (eval_call, evaluate_funcall): New functions, factored
4988 out from ...
4989 (evaluate_subexp_standard): ... this.
4990
4991 2017-09-05 Yao Qi <yao.qi@linaro.org>
4992
4993 * amd64-tdep.c (amd64_target_description): Create target
4994 descriptions.
4995 (_initialize_amd64_tdep): Don't call functions
4996 initialize_tdesc_amd64_*. Add self tests.
4997 * arch/amd64.c (amd64_create_target_description): Add parameter
4998 is_linux. Call set_tdesc_osabi if is_linux is true.
4999 * arch/amd64.h (amd64_create_target_description): Update the
5000 declaration.
5001 * arch/i386.c (i386_create_target_description): Add parameter
5002 is_linux. Call set_tdesc_osabi if is_linux is true.
5003 * arch/i386.h (i386_create_target_description): Update
5004 declaration.
5005 * configure.tgt: Add i386.o to gdb_target_obs.
5006 * features/Makefile (XMLTOC): Remove i386/*.xml.
5007 * features/i386/amd64-avx-avx512.c: Remove.
5008 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5009 * features/i386/amd64-avx-mpx.c: Remove.
5010 * features/i386/amd64-avx.c: Remove.
5011 * features/i386/amd64-mpx.c: Remove.
5012 * features/i386/amd64.c: Remove.
5013 * features/i386/i386-avx-avx512.c: Remove.
5014 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5015 * features/i386/i386-avx-mpx.c: Remove.
5016 * features/i386/i386-avx.c: Remove.
5017 * features/i386/i386-mmx.c: Remove.
5018 * features/i386/i386-mpx.c: Remove.
5019 * features/i386/i386.c: Remove.
5020 * i386-tdep.c: Don't include features/i386/i386*.c., include
5021 target-descriptions.h and arch/i386.h.
5022 (i386_target_description): Create target descriptions.
5023 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5024 functions. Do self tests.
5025
5026 2017-09-05 Yao Qi <yao.qi@linaro.org>
5027
5028 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5029 * features/i386/amd64-avx-avx512-linux.c: Removed.
5030 * features/i386/amd64-avx-linux.c: Removed.
5031 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5032 * features/i386/amd64-avx-mpx-linux.c: Removed.
5033 * features/i386/amd64-linux.c: Removed.
5034 * features/i386/amd64-mpx-linux.c: Removed.
5035 * features/i386/x32-avx-avx512-linux.c: Removed.
5036 * features/i386/x32-avx-linux.c: Removed.
5037 * features/i386/x32-linux.c: Removed.
5038
5039 2017-09-05 Yao Qi <yao.qi@linaro.org>
5040
5041 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5042 features/i386/*.c.
5043 (amd64_linux_read_description): Call
5044 amd64_create_target_description.
5045 * arch/amd64.c: New file.
5046 * arch/amd64.h: New file.
5047 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5048 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5049
5050 2017-09-05 Yao Qi <yao.qi@linaro.org>
5051
5052 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5053 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5054 (amd64_linux_read_description): Create target descriptions.
5055 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5056 functions. Add unit tests.
5057 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5058 x32-core.xml.
5059 * features/i386/64bit-avx.c: Generated.
5060 * features/i386/64bit-avx512.c: Generated.
5061 * features/i386/64bit-core.c: Generated.
5062 * features/i386/64bit-linux.c: Generated.
5063 * features/i386/64bit-mpx.c: Generated.
5064 * features/i386/64bit-pkeys.c: Generated.
5065 * features/i386/64bit-segments.c: Generated.
5066 * features/i386/64bit-sse.c: Generated.
5067 * features/i386/x32-core.c: Generated.
5068 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5069 c files for amd64-linux and x32-linux.
5070
5071 2017-09-05 Yao Qi <yao.qi@linaro.org>
5072
5073 * amd64-linux-tdep.c (amd64_linux_read_description): New
5074 function.
5075 (amd64_linux_core_read_description): Call
5076 amd64_linux_read_description.
5077 (amd64_linux_init_abi): Likewise.
5078 (amd64_x32_linux_init_abi): Likewise.
5079 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5080 * x86-linux-nat.c (x86_linux_read_description): Call
5081 amd64_linux_read_description.
5082
5083 2017-09-05 Yao Qi <yao.qi@linaro.org>
5084
5085 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5086 comments.
5087
5088 2017-09-05 Yao Qi <yao.qi@linaro.org>
5089
5090 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5091 * features/i386/i386-avx-avx512-linux.c: Remove.
5092 * features/i386/i386-avx-linux.c: Remove.
5093 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5094 * features/i386/i386-avx-mpx-linux.c: Remove.
5095 * features/i386/i386-linux.c: Remove.
5096 * features/i386/i386-mmx-linux.c: Remove.
5097 * features/i386/i386-mpx-linux.c: Remove.
5098
5099 2017-09-05 Yao Qi <yao.qi@linaro.org>
5100
5101 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5102 (SFILES): Add arch/i386.c.
5103 (HFILES_NO_SRCDIR): Add arch/i386.h.
5104 * arch/i386.c: New file.
5105 * arch/i386.h: New file.
5106 * arch/tdesc.h (allocate_target_description): Declare.
5107 (set_tdesc_architecture): Declare.
5108 (set_tdesc_osabi): Declare.
5109 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5110 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5111 include arch/i386.h.
5112 (i386_linux_read_description): Remove code and call
5113 i386_create_target_description.
5114 (set_tdesc_architecture): New function.
5115 (set_tdesc_osabi): New function.
5116 * target-descriptions.h (allocate_target_description): Remove.
5117
5118 2017-09-05 Yao Qi <yao.qi@linaro.org>
5119
5120 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5121 * target-descriptions.c (tdesc_create_feature): Likewise, and
5122 adjust code.
5123 * features/i386/32bit-avx.c: Re-generated.
5124 * features/i386/32bit-avx512.c: Re-generated.
5125 * features/i386/32bit-core.c: Re-generated.
5126 * features/i386/32bit-linux.c: Re-generated.
5127 * features/i386/32bit-mpx.c: Re-generated.
5128 * features/i386/32bit-pkeys.c: Re-generated.
5129 * features/i386/32bit-sse.c: Re-generated.
5130
5131 2017-09-05 Yao Qi <yao.qi@linaro.org>
5132
5133 * regformats/regdef.h (struct reg): Override operator == and !=.
5134
5135 2017-09-05 Yao Qi <yao.qi@linaro.org>
5136
5137 * arch/tdesc.h: New file.
5138 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5139 * target-descriptions.c: Update comments.
5140 * target-descriptions.h: Include "arch/tdesc.h". Remove the
5141 declarations.
5142 * features/i386/32bit-avx.c: Re-generated.
5143 * features/i386/32bit-avx512.c: Re-generated.
5144 * features/i386/32bit-core.c: Re-generated.
5145 * features/i386/32bit-linux.c: Re-generated.
5146 * features/i386/32bit-mpx.c: Re-generated.
5147 * features/i386/32bit-pkeys.c: Re-generated.
5148 * features/i386/32bit-sse.c: Re-generated.
5149
5150 2017-09-05 Yao Qi <yao.qi@linaro.org>
5151
5152 * regformats/regdat.sh: Update generated code.
5153
5154 2017-09-05 Yao Qi <yao.qi@linaro.org>
5155
5156 * regformats/regdat.sh: Adjust code order.
5157
5158 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5159
5160 * expprint.c (dump_subexp_body_standard): Use constant format
5161 string in fprintf_filtered call.
5162
5163 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5164
5165 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5166 NetBSD/i386.
5167 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5168
5169 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5170
5171 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5172
5173 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5174
5175 * bsd-kvm.o: Define _KMEMUSER.
5176 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5177 * configure: Regenerate.
5178
5179 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5180
5181 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5182 * i386-fbsd-nat.c: Likewise.
5183
5184 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5185
5186 * unittests/array-view-selftests.c: Add include of <array>.
5187
5188 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5189
5190 * spu-tdep.c (flush_ea_cache): Add missing argument to
5191 call_function_by_hand.
5192
5193 2017-09-04 Pedro Alves <palves@redhat.com>
5194
5195 * NEWS (Safer support for debugging with no debug info): New.
5196
5197 2017-09-04 Pedro Alves <palves@redhat.com>
5198
5199 * c-exp.y (function_method, function_method_void): Add current
5200 instance flags to TYPE_INSTANCE.
5201 * dwarf2read.c (check_modifier): New.
5202 (compute_delayed_physnames): Assert that only C++ adds delayed
5203 physnames. Mark fn_fields as const/volatile depending on
5204 physname.
5205 * eval.c (make_params): New type_instance_flags parameter. Use
5206 it as the new type's instance flags.
5207 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5208 flags element and pass it to make_params.
5209 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5210 instance flags element.
5211 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5212 * gdbtypes.h: Include "enum-flags.h".
5213 (type_instance_flags): New enum-flags type.
5214 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5215 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5216 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5217 (follow_type_instance_flags): New function.
5218 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5219 * parser-defs.h (follow_type_instance_flags): Declare.
5220 * valops.c (value_struct_elt_for_reference): const/volatile must
5221 match too.
5222
5223 2017-09-04 Pedro Alves <palves@redhat.com>
5224
5225 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5226 function/method scopes; lookup the nested name as a function local
5227 static variable.
5228
5229 2017-09-04 Pedro Alves <palves@redhat.com>
5230
5231 (%type <voidval>): Add function_method.
5232 * c-exp.y (exp): New production for calls with no arguments.
5233 (function_method, function_method_void_or_typelist): New
5234 productions.
5235 (exp): New production for "method()::static_var".
5236 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5237 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5238 Handle OP_FUNC_STATIC_VAR.
5239 * parse.c (operator_length_standard):
5240 Handle OP_FUNC_STATIC_VAR.
5241
5242 2017-09-04 Pedro Alves <palves@redhat.com>
5243
5244 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5245 handling.
5246 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5247 Ditto.
5248 * parse.c (operator_length_standard, operator_check_standard):
5249 Ditto.
5250 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5251
5252 2017-09-04 Pedro Alves <palves@redhat.com>
5253
5254 * ax-gdb.c: Include "typeprint.h".
5255 (gen_expr_for_cast): New function.
5256 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5257 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5258 type is unknown.
5259 * dwarf2read.c (new_symbol_full): Fallback to int instead of
5260 nodebug_data_symbol.
5261 * eval.c: Include "typeprint.h".
5262 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5263 Error out if symbol has unknown type.
5264 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5265 evaluate_subexp_for_cast.
5266 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5267 OP_VAR_MSYM_VALUE.
5268 (evaluate_subexp_for_cast): New function.
5269 * gdbtypes.c (init_nodebug_var_type): New function.
5270 (objfile_type): Use it to initialize types of variables with no
5271 debug info.
5272 * typeprint.c (error_unknown_type): New.
5273 * typeprint.h (error_unknown_type): New declaration.
5274 * compile/compile-c-types.c (convert_type_basic): Handle
5275 TYPE_CODE_ERROR; warn and fallback to int for variables with
5276 unknown type.
5277
5278 2017-09-04 Pedro Alves <palves@redhat.com>
5279
5280 * eval.c (evaluate_var_value): New function, factored out from ...
5281 (evaluate_subexp_standard): ... here.
5282
5283 2017-09-04 Pedro Alves <palves@redhat.com>
5284
5285 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5286 Remove useless assignments to 'op'.
5287
5288 2017-09-04 Pedro Alves <palves@redhat.com>
5289
5290 * eval.c (eval_skip_value): New function.
5291 (evaluate_subexp_standard): Use it.
5292
5293 2017-09-04 Pedro Alves <palves@redhat.com>
5294
5295 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5296 function name from symbol/minsym and pass it to
5297 error_call_unknown_return_type.
5298
5299 2017-09-04 Pedro Alves <palves@redhat.com>
5300
5301 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5302 * ax-gdb.c (gen_msym_var_ref): New function.
5303 (gen_expr): Handle OP_VAR_MSYM_VALUE.
5304 * eval.c (evaluate_var_msym_value): New function.
5305 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5306 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5307 to call_function_by_hand.
5308 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5309 Handle OP_VAR_MSYM_VALUE.
5310 (union exp_element) <msymbol>: New field.
5311 * minsyms.h (struct type): Forward declare.
5312 (find_minsym_type_and_address): Declare.
5313 * parse.c (write_exp_elt_msym): New function.
5314 (write_exp_msymbol): Delete, refactored as ...
5315 (find_minsym_type_and_address): ... this new function.
5316 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5317 (operator_length_standard, operator_check_standard): Handle
5318 OP_VAR_MSYM_VALUE.
5319 * std-operator.def (OP_VAR_MSYM_VALUE): New.
5320
5321 2017-09-04 Pedro Alves <palves@redhat.com>
5322
5323 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5324 TYPE_GNU_IFUNC specially here. Throw error if return type is
5325 unknown.
5326 * ada-typeprint.c (print_func_type): Handle functions with unknown
5327 return type.
5328 * c-typeprint.c (c_type_print_base): Handle functions and methods
5329 with unknown return type.
5330 * compile/compile-c-symbols.c (convert_symbol_bmsym)
5331 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5332 * compile/compile-c-types.c: Include "objfiles.h".
5333 (convert_func): For functions with unknown return type, warn and
5334 default to int.
5335 * compile/compile-object-run.c (compile_object_run): Adjust call
5336 to call_function_by_hand_dummy.
5337 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5338 call_function_by_hand.
5339 * eval.c (evaluate_subexp_standard): Adjust calls to
5340 call_function_by_hand. Handle functions and methods with unknown
5341 return type. Pass expect_type to call_function_by_hand.
5342 * f-typeprint.c (f_type_print_base): Handle functions with unknown
5343 return type.
5344 * gcore.c (call_target_sbrk): Adjust call to
5345 call_function_by_hand.
5346 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5347 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
5348 an integer address type instead of nodebug.
5349 * guile/scm-value.c (gdbscm_value_call): Adjust call to
5350 call_function_by_hand.
5351 * infcall.c (error_call_unknown_return_type): New function.
5352 (call_function_by_hand): New "default_return_type" parameter.
5353 Pass it down.
5354 (call_function_by_hand_dummy): New "default_return_type"
5355 parameter. Use it instead of defaulting to int. If there's no
5356 default and the return type is unknown, throw an error. If
5357 there's a default return type, and the called function has no
5358 debug info, then assume the function is prototyped.
5359 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5360 New "default_return_type" parameter.
5361 (error_call_unknown_return_type): New declaration.
5362 * linux-fork.c (call_lseek): Cast return type of lseek.
5363 (inferior_call_waitpid, checkpoint_command): Adjust calls to
5364 call_function_by_hand.
5365 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5366 calls to call_function_by_hand.
5367 * m2-typeprint.c (m2_procedure): Handle functions with unknown
5368 return type.
5369 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5370 (value_nsstring, print_object_command): Adjust calls to
5371 call_function_by_hand.
5372 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5373 functions with unknown return type.
5374 (pascal_type_print_func_varspec_suffix): New function.
5375 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5376 TYPE_CODE_METHOD>: Use it.
5377 * python/py-value.c (valpy_call): Adjust call to
5378 call_function_by_hand.
5379 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5380 call_function_by_hand.
5381 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5382 call_function_by_hand.
5383 * valops.c (value_allocate_space_in_inferior): Adjust call to
5384 call_function_by_hand.
5385 * typeprint.c (type_print_unknown_return_type): New function.
5386 * typeprint.h (type_print_unknown_return_type): New declaration.
5387
5388 2017-09-04 Pedro Alves <palves@redhat.com>
5389
5390 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5391 types with more than one parameter as prototyped.
5392
5393 2017-09-04 Pedro Alves <palves@redhat.com>
5394
5395 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5396 (disassemble_command): Use gdb_disassembly_flags instead of bare
5397 int.
5398 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5399 (dump_insns, do_mixed_source_and_assembly_deprecated)
5400 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5401 Use gdb_disassembly_flags instead of bare int.
5402 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5403 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5404 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5405 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5406 (enum gdb_disassembly_flag): ... values of this new enumeration.
5407 (gdb_disassembly_flags): Define.
5408 (gdb_disassembly)
5409 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5410 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5411 gdb_disassembly_flags instead of bare int.
5412 * record-btrace.c (btrace_insn_history)
5413 (record_btrace_insn_history, record_btrace_insn_history_range)
5414 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5415 instead of bare int.
5416 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5417 Use gdb_disassembly_flags instead of bare int.
5418 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5419 Define.
5420 * target-delegates.c: Regenerate.
5421 * target.c (target_insn_history, target_insn_history_from)
5422 (target_insn_history_range): Use gdb_disassembly_flags instead of
5423 bare int.
5424 * target.h: Include "disasm.h".
5425 (struct target_ops) <to_insn_history, to_insn_history_from,
5426 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5427 int.
5428 (target_insn_history, target_insn_history_from)
5429 (target_insn_history_range): Use gdb_disassembly_flags instead of
5430 bare int.
5431
5432 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5433
5434 * cli/cli-script.c (build_command_line): For if/while commands,
5435 check whether args is empty.
5436
5437 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5438
5439 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5440 (enum command_control_type): Likewise.
5441 (struct command_line): Likewise.
5442 (free_command_lines): Likewise.
5443 (struct command_lines_deleter): Likewise.
5444 (command_line_up): Likewise.
5445 (read_command_lines): Likewise.
5446 (read_command_lines_1): Likewise.
5447 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5448 (enum command_control_type): Likewise.
5449 (struct command_line): Likewise.
5450 (free_command_lines): Likewise.
5451 (struct command_lines_deleter): Likewise.
5452 (command_line_up): Likewise.
5453 (read_command_lines): Likewise.
5454 (read_command_lines_1): Likewise.
5455 * breakpoint.h: Include cli/cli-script.h.
5456 * extension-priv.h: Likewise.
5457 * gdbcmd.h: Likewise.
5458
5459 2017-09-04 Pedro Alves <palves@redhat.com>
5460
5461 * ada-lang.c (is_known_support_routine): Move sal declaration to
5462 where it is initialized.
5463 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5464 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5465 (clear_command, update_static_tracepoint): Remove init_sal
5466 references. Move declarations closer to initializations.
5467 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5468 initializations.
5469 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5470 references. Move sal declarations closer to initializations.
5471 * frame.c (find_frame_sal): Return a symtab_and_line via function
5472 return instead of output parameter. Remove init_sal references.
5473 * frame.h (find_frame_sal): Return a symtab_and_line via function
5474 return instead of output parameter.
5475 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5476 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5477 instead of memset.
5478 (gdbscm_find_pc_line): Remove init_sal reference.
5479 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5480 references. Move declarations closer to initializations.
5481 * infcmd.c (set_step_frame): Update. Move declarations closer to
5482 initializations.
5483 (finish_backward): Remove init_sal references. Move declarations
5484 closer to initializations.
5485 * infrun.c (process_event_stop_test, handle_step_into_function)
5486 (insert_hp_step_resume_breakpoint_at_frame)
5487 (insert_step_resume_breakpoint_at_caller): Likewise.
5488 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5489 (symbol_to_sal): Likewise.
5490 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5491 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5492 to its initialization.
5493 * reverse.c (save_bookmark_command): Use new/delete. Remove
5494 init_sal references. Move declarations closer to initializations.
5495 * source.c (get_current_source_symtab_and_line): Remove brace
5496 initialization.
5497 (set_current_source_symtab_and_line): Now takes the sal by const
5498 reference. Remove brace initialization.
5499 (line_info): Remove init_sal reference.
5500 * source.h (set_current_source_symtab_and_line): Now takes a
5501 symtab_and_line via const reference.
5502 * stack.c (set_current_sal_from_frame): Adjust.
5503 (print_frame_info): Adjust.
5504 (get_last_displayed_sal): Return the sal via function return
5505 instead of via output parameter. Simplify.
5506 (frame_info): Adjust.
5507 * stack.h (get_last_displayed_sal): Return the sal via function
5508 return instead of via output parameter.
5509 * symtab.c (init_sal): Delete.
5510 (find_pc_sect_line): Remove init_sal references. Move
5511 declarations closer to initializations.
5512 (find_function_start_sal): Remove init_sal references. Move
5513 declarations closer to initializations.
5514 * symtab.h (struct symtab_and_line): In-class initialize all
5515 fields.
5516 * tracepoint.c (set_traceframe_context)
5517 (print_one_static_tracepoint_marker): Remove init_sal references.
5518 Move declarations closer to initializations.
5519 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5520 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5521 declarations closer to initializations.
5522 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5523 init_sal references. Adjust.
5524
5525 2017-09-04 Pedro Alves <palves@redhat.com>
5526
5527 * ax-gdb.c (agent_command_1): Use range-for.
5528 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5529 * breakpoint.c: Include "common/array-view.h".
5530 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5531 parameter from struct symtabs_and_lines to
5532 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5533 (breakpoint_sals_to_pc): Change sals parameter from struct
5534 symtabs_and_lines to std::vector reference.
5535 (check_fast_tracepoint_sals): Change sals parameter from struct
5536 symtabs_and_lines to std::array_view. Use range-for.
5537 (decode_static_tracepoint_spec): Return a std::vector instead of
5538 symtabs_and_lines. Update.
5539 (create_breakpoint): Update.
5540 (break_range_command, until_break_command, clear_command): Update.
5541 (base_breakpoint_decode_location, bkpt_decode_location)
5542 (bkpt_probe_create_sals_from_location)
5543 (bkpt_probe_decode_location, tracepoint_decode_location)
5544 (tracepoint_probe_decode_location)
5545 (strace_marker_create_sals_from_location): Return a std::vector
5546 instead of symtabs_and_lines.
5547 (strace_marker_create_breakpoints_sal): Update.
5548 (strace_marker_decode_location): Return a std::vector instead of
5549 symtabs_and_lines. Update.
5550 (update_breakpoint_locations): Change struct symtabs_and_lines
5551 parameters to gdb::array_view. Adjust.
5552 (location_to_sals): Return a std::vector instead of
5553 symtabs_and_lines. Update.
5554 (breakpoint_re_set_default): Use std::vector instead of struct
5555 symtabs_and_lines.
5556 (decode_location_default): Return a std::vector instead of
5557 symtabs_and_lines. Update.
5558 * breakpoint.h: Include "common/array-view.h".
5559 (struct breakpoint_ops) <decode_location>: Now returns a
5560 std::vector instead of returning a symtabs_and_lines via output
5561 parameter.
5562 (update_breakpoint_locations): Change sals parameters to use
5563 gdb::array_view.
5564 * cli/cli-cmds.c (edit_command, list_command): Update to use
5565 std::vector and gdb::array_view.
5566 (ambiguous_line_spec): Adjust to use gdb::array_view and
5567 range-for.
5568 (compare_symtabs): Rename to ...
5569 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5570 const reference and adjust.
5571 (filter_sals): Rewrite using std::vector and standard algorithms.
5572 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5573 (jump_command): Update to use std::vector.
5574 * linespec.c (struct linespec_state) <canonical_names>: Update
5575 comment.
5576 (add_sal_to_sals_basic): Delete.
5577 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5578 (decode_line_2, create_sals_line_offset)
5579 (convert_address_location_to_sals, convert_linespec_to_sals)
5580 (convert_explicit_location_to_sals, parse_linespec)
5581 (event_location_to_sals, decode_line_full, decode_line_1)
5582 (decode_line_with_current_source)
5583 (decode_line_with_last_displayed, decode_objc)
5584 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5585 (linespec_result::~linespec_result): Adjust to use std::vector
5586 instead of symtabs_and_lines.
5587 * linespec.h (linespec_sals::sals): Now a std::vector.
5588 (struct linespec_result): Use std::vector, bool, and in-class
5589 initialization.
5590 (decode_line_1, decode_line_with_current_source)
5591 (decode_line_with_last_displayed): Return std::vector.
5592 * macrocmd.c (info_macros_command): Use std::vector.
5593 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5594 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5595 std::vector.
5596 * probe.h (parse_probes): Return a std::vector.
5597 * python/python.c (gdbpy_decode_line): Use std::vector and
5598 gdb::array_view.
5599 * source.c (select_source_symtab, line_info): Use std::vector.
5600 * stack.c (func_command): Use std::vector.
5601 * symtab.h (struct symtabs_and_lines): Delete.
5602 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5603
5604 2017-09-04 Pedro Alves <palves@redhat.com>
5605
5606 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5607 unittests/array-view-selftests.c.
5608 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5609 * common/array-view.h: New file.
5610 * unittests/array-view-selftests.c: New file.
5611
5612 2017-09-04 Pedro Alves <palves@redhat.com>
5613
5614 * cli/cli-cmds.c (edit_command): Pass message to
5615 ambiguous_line_spec.
5616 (list_command): Pass message to ambiguous_line_spec. Say
5617 "first"/"last" instead of "start" and "end" to be consistent with
5618 the manual.
5619 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5620 them to print formatted message.
5621
5622 2017-09-04 Pedro Alves <palves@redhat.com>
5623
5624 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5625 ftrace_update_insns by reference instead of pointer.
5626
5627 2017-09-04 Yao Qi <yao.qi@linaro.org>
5628
5629 * i386-go32-tdep.c: Include x86-xstate.h.
5630 (i386_go32_init_abi): Call i386_target_description.
5631 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5632 if xcr0 is X86_XSTATE_X87_MASK.
5633 * i386-tdep.h (tdesc_i386): Remove the declaration.
5634 (tdesc_i386_mmx): Likewise.
5635
5636 2017-09-04 Yao Qi <yao.qi@linaro.org>
5637
5638 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5639 X86_XSTATE_SSE_MASK instead of 0.
5640
5641 2017-09-04 Yao Qi <yao.qi@linaro.org>
5642
5643 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5644 i386_target_description.
5645 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5646 i386_target_description.
5647 * i386-tdep.c (i386_gdbarch_init): Likewise.
5648
5649 2017-09-04 Yao Qi <yao.qi@linaro.org>
5650
5651 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5652 (x86_darwin_init_abi_64): Call amd64_target_description.
5653 * amd64-dicos-tdep.c: Likewise.
5654 * amd64-fbsd-nat.c: Likewise.
5655 * amd64-fbsd-tdep.c: Likewise.
5656 * amd64-nbsd-tdep.c: Likewise.
5657 * amd64-obsd-tdep.c: Likewise.
5658 * amd64-sol2-tdep.c: Likewise.
5659 * amd64-windows-tdep.c: Likewise.
5660 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5661
5662 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5663
5664 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5665 (btrace_function) <insn>: Change type to use std::vector.
5666 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5667 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5668 ftrace_update_insns, ftrace_compute_global_level_offset,
5669 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5670 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5671 change to std::vector.
5672 (ftrace_update_insns): Adjust to change to std::vector, change
5673 type of INSN parameter.
5674 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5675 * record-btrace.c (btrace_call_history_insn_range,
5676 btrace_compute_src_line_range,
5677 record_btrace_frame_prev_register): Adjust to change to
5678 std::vector.
5679 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5680 to change to std::vector.
5681
5682 2017-09-03 Tom Tromey <tom@tromey.com>
5683
5684 * corefile.c (reopen_exec_file): Use std::string.
5685
5686 2017-09-03 Tom Tromey <tom@tromey.com>
5687
5688 * compile/compile.c (compile_register_name_mangled): Return
5689 std::string.
5690 * compile/compile-loc2c.c (pushf_register_address): Update.
5691 (pushf_register): Update.
5692 * compile/compile-c-types.c (convert_array): Update.
5693 * compile/compile-c-symbols.c (generate_vla_size): Update.
5694 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5695 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5696 (convert_one_symbol): Update.
5697 (generate_c_for_for_one_variable): Update.
5698 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5699 std::string.
5700 (generate_register_struct): Update.
5701 * compile/compile-internal.h (c_get_range_decl_name): Return a
5702 std::string.
5703 (compile_register_name_mangled): Return std::string.
5704
5705 2017-09-03 Tom Tromey <tom@tromey.com>
5706
5707 * utils.c (perror_string): Return a std::string.
5708 (throw_perror_with_name, perror_warning_with_name): Update.
5709
5710 2017-09-03 Tom Tromey <tom@tromey.com>
5711
5712 * demangle.c (demangle_command): Use std::string,
5713 unique_xmalloc_ptr.
5714
5715 2017-09-03 Tom Tromey <tom@tromey.com>
5716
5717 * cli/cli-setshow.c (do_set_command): Use std::string.
5718
5719 2017-09-03 Tom Tromey <tom@tromey.com>
5720
5721 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5722
5723 2017-09-03 Tom Tromey <tom@tromey.com>
5724
5725 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5726
5727 2017-09-03 Tom Tromey <tom@tromey.com>
5728
5729 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5730 gdb::unique_xmalloc_ptr.
5731
5732 2017-09-03 Tom Tromey <tom@tromey.com>
5733
5734 * thread.c (print_thread_info_1): Use string_printf.
5735 (thread_apply_command, thread_apply_all_command): Use
5736 std::string.
5737
5738 2017-09-03 Tom Tromey <tom@tromey.com>
5739
5740 * valprint.c (val_print_string): Update.
5741 * gdbcore.h (memory_error_message): Return std::string.
5742 * corefile.c (memory_error_message): Return std::string.
5743 (memory_error): Update.
5744 * breakpoint.c (insert_bp_location): Update.
5745
5746 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5747
5748 * target/waitstatus.h (target_waitstatus_to_string): Change
5749 return type to std::string.
5750 * target/waitstatus.c (target_waitstatus_to_string): Return
5751 std::string.
5752 * target.h (target_waitstatus_to_string): Remove declaration.
5753 * infrun.c (resume, clear_proceed_status_thread,
5754 print_target_wait_results, do_target_wait, save_waitstatus,
5755 stop_all_threads): Adjust.
5756 * record-btrace.c (record_btrace_wait): Adjust.
5757 * target-debug.h
5758 (target_debug_print_struct_target_waitstatus_p): Adjust.
5759
5760 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5761
5762 PR gdb/22046
5763 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5764 detection.
5765
5766 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5767
5768 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5769 for setting/unsetting environment variables on the remote target.
5770 (New remote packets): Add entries for QEnvironmentHexEncoded,
5771 QEnvironmentUnset and QEnvironmentReset.
5772 * common/environ.c (gdb_environ::operator=): Extend method to
5773 handle m_user_set_env_list and m_user_unset_env_list.
5774 (gdb_environ::clear): Likewise.
5775 (match_var_in_string): Change type of first parameter from 'char
5776 *' to 'const char *'.
5777 (gdb_environ::set): Extend method to handle
5778 m_user_set_env_list and m_user_unset_env_list.
5779 (gdb_environ::unset): Likewise.
5780 (gdb_environ::clear_user_set_env): New method.
5781 (gdb_environ::user_set_envp): Likewise.
5782 (gdb_environ::user_unset_envp): Likewise.
5783 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5784 m_user_unset_env_list on move constructor/assignment.
5785 (unset): Add new default parameter 'update_unset_list = true'.
5786 (clear_user_set_env): New method.
5787 (user_set_envp): Likewise.
5788 (user_unset_envp): Likewise.
5789 (m_user_set_env_list): New std::set.
5790 (m_user_unset_env_list): Likewise.
5791 * common/rsp-low.c (hex2str): New function.
5792 (bin2hex): New overload for bin2hex function.
5793 * common/rsp-low.c (hex2str): New prototype.
5794 (str2hex): New overload prototype.
5795 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5796 QEnvironmentUnset and QEnvironmentReset.
5797 (remote_protocol_features): Add QEnvironmentHexEncoded,
5798 QEnvironmentUnset and QEnvironmentReset packets.
5799 (send_environment_packet): New function.
5800 (extended_remote_environment_support): Likewise.
5801 (extended_remote_create_inferior): Call
5802 extended_remote_environment_support.
5803 (_initialize_remote): Add QEnvironmentHexEncoded,
5804 QEnvironmentUnset and QEnvironmentReset packet configs.
5805 * unittests/environ-selftests.c (gdb_selftest_env_var):
5806 New variable.
5807 (test_vector_initialization): New function.
5808 (test_init_from_host_environ): Likewise.
5809 (test_reinit_from_host_environ): Likewise.
5810 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5811 Likewise.
5812 (test_unset_set_empty_vector): Likewise.
5813 (test_vector_clear): Likewise.
5814 (test_std_move): Likewise.
5815 (test_move_constructor):
5816 (test_self_move): Likewise.
5817 (test_set_unset_reset): Likewise.
5818 (run_tests): Rewrite in terms of the functions above.
5819
5820 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
5821
5822 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5823 (adi_available): Use a temp variable of type CORE_ADDR as argument
5824 3 when calling target_auxv_search.
5825 (adi_normalize_address): Use masks and xor operators to calculate
5826 normalized address.
5827 (adi_read_versions, adi_write_versions, adi_print_versions)
5828 (do_examine, do_assign): Use paddress.
5829
5830 2017-08-29 John Baldwin <jhb@FreeBSD.org>
5831
5832 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5833 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5834 out of loop and add supply of FIR.
5835 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5836 add collect of FIR.
5837
5838 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5839
5840 PR gdb/21827
5841 * cli/cli-script.c (define_command): Don't convert command name
5842 to lower case.
5843
5844 2017-08-25 Joel Brobecker <brobecker@adacore.com>
5845
5846 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5847 Update all callers accordingly. Remove all code blocks handling
5848 the case where DISPP is not NULL.
5849
5850 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5851
5852 PR symtab/22003
5853 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5854 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5855 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5856
5857 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5858
5859 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5860 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5861 (read_comp_units_from_section): New parameter abbrev_section, use
5862 read_and_check_comp_unit_head, allocate signatured_type if needed.
5863 (create_all_comp_units): Update read_comp_units_from_section caller.
5864
5865 2017-08-23 Pedro Alves <palves@redhat.com>
5866
5867 PR remote/21852
5868 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5869 to null_ptid and switch to thread without reading the registers
5870 after adding the inferior.
5871
5872 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5873
5874 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5875 compile-gcc.
5876 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5877 (compile_to_object): Implement compile_gcc.
5878 (_initialize_compile): Install "set compile-gcc". Initialize
5879 compile_gcc.
5880
5881 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5882
5883 * compile/compile.c (compile_to_object): Conditionally call
5884 set_verbose. Conditionally call compile or compile_v0.
5885
5886 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
5887
5888 * sparc64-tdep.h: (adi_normalize_address): New export.
5889 * sparc-nat.h: (open_adi_tag_fd): New export.
5890 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5891 * sparc64-linux-tdep.c:
5892 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5893 (sparc64_linux_handle_segmentation_fault): New function.
5894 (sparc64_linux_init_abi): Register
5895 sparc64_linux_handle_segmentation_fault
5896 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5897 (sparc64_addr_bits_remove): New function.
5898 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5899 (MAX_PROC_NAME_SIZE): New macro.
5900 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5901 (sparc64adilist): New variable.
5902 (adi_proc_list): New variable.
5903 (find_adi_info): New function.
5904 (add_adi_info): New function.
5905 (get_adi_info_proc): New function.
5906 (get_adi_info): New function.
5907 (info_adi_command): New function.
5908 (read_maps_entry): New function.
5909 (adi_available): New function.
5910 (adi_normalize_address): New function.
5911 (adi_align_address): New function.
5912 (adi_convert_byte_count): New function.
5913 (adi_tag_fd): New function.
5914 (adi_is_addr_mapped): New function.
5915 (adi_read_versions): New function.
5916 (adi_write_versions): New function.
5917 (adi_print_versions): New function.
5918 (do_examine): New function.
5919 (do_assign): New function.
5920 (adi_examine_command): New function.
5921 (adi_assign_command): New function.
5922 (_initialize_sparc64_adi_tdep): New function.
5923
5924 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5925
5926 * breakpoint.c (breakpoints_info): Rename to ...
5927 (info_breakpoints_command): ... this.
5928 (watchpoints_info): Rename to ...
5929 (info_watchpoints_command): ... this.
5930 (tracepoints_info): Rename to ...
5931 (info_tracepoints_command): ... this.
5932 (_initialize_breakpoint): Adjust.
5933 * dcache.c (dcache_info): Rename to ...
5934 (info_display_command): ... this.
5935 (_initialize_dcache): Adjust.
5936 * frame.h (args_info): Rename to ...
5937 (info_args_command): ... this.
5938 (locals_info): Rename to ...
5939 (info_locals_command): ... this.
5940 * infcmd.c (nofp_registers_info): Rename to ...
5941 (info_registers_command): ... this.
5942 (float_info): Rename to ...
5943 (info_float_command): ... this.
5944 (program_info): Rename to ...
5945 (info_program_command): ... this.
5946 (all_registers_info): Rename to ...
5947 (info_all_registers_command): ... this.
5948 (vector_info): Rename to ...
5949 (info_vector_command): ... this.
5950 (float_info): Rename to ...
5951 (info_float_command): ... this.
5952 (_initialize_infcmd): Adjust.
5953 * inferior.h (term_info): Rename to ...
5954 (info_terminal_command): ... this.
5955 * inflow.c (term_info): Rename to ...
5956 (info_terminal_command): ... this.
5957 (_initialize_inflow): Adjust.
5958 * infrun.c (signals_info): Rename to ...
5959 (info_signals_command): ... this.
5960 (_initialize_infrun): Adjust.
5961 * objc-lang.c (classes_info): Rename to ...
5962 (info_classes_command): ... this.
5963 (selectors_info): Rename to ...
5964 (info_selectors_command): ... this.
5965 (_initialize_objc_language): Adjust.
5966 * printcmd.c (sym_info): Rename to ...
5967 (info_symbol_command): ... this.
5968 (address_info): Rename to ...
5969 (info_address_command): ... this.
5970 (display_info): Rename to ...
5971 (info_display_command): ... this.
5972 (_initialize_printcmd): Adjust.
5973 * reverse.c (bookmarks_info): Rename to ...
5974 (info_breakpoints_command): ... this.
5975 (_initialize_reverse): Adjust.
5976 * ser-go32.c (dos_info): Rename to ...
5977 (info_serial_command): ... this.
5978 (_initialize_ser_dos): Adjust.
5979 * skip.c (skip_info): Rename to ...
5980 (info_skip_command): ... this.
5981 (_initialize_step_skip): Adjust.
5982 * source.c (line_info): Rename to ...
5983 (info_line_command): ... this.
5984 (source_info): Rename to ...
5985 (info_source_command)
5986 * stack.c (frame_info): Rename to ...
5987 (info_frame_command): ... this.
5988 (locals_info): Rename to ...
5989 (info_locals_command): ... this.
5990 (args_info): Rename to ...
5991 (info_args_command): ... this.
5992 (_initialize_stack): Adjust.
5993 * symtab.c (sources_info): Rename to ...
5994 (info_sources_command): ... this.
5995 (variables_info): Rename to ...
5996 (info_variables_command): ... this.
5997 (functions_info): Rename to ...
5998 (info_functions_command): ... this.
5999 (types_info): Rename to ...
6000 (info_types_command): ... this.
6001 (_initialize_symtab): Adjust.
6002 * target.c (target_info): Rename to ...
6003 (info_target_command): ... this.
6004 (initialize_targets): Adjust.
6005 * tracepoint.c (tvariables_info): Rename to ...
6006 (info_tvariables_command): ... this.
6007 (scope_info): Rename to ...
6008 (info_scope_command): ... this.
6009 (trace_dump_actions): Adjust.
6010 (_initialize_tracepoint): Adjust.
6011
6012 2017-08-22 Tom Tromey <tom@tromey.com>
6013
6014 * breakpoint.h (install_breakpoint): Update.
6015 * breakpoint.c (add_solib_catchpoint): Update.
6016 (install_breakpoint): Change argument to a std::unique_ptr.
6017 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6018 (create_breakpoint_sal, create_breakpoint): Update.
6019 (watch_command_1, catch_exec_command_1)
6020 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6021 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6022 Return the breakpoint.
6023 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6024 (new_single_step_breakpoint): Update.
6025 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6026 std::unique_ptr.
6027 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6028 std::unique_ptr.
6029 * break-catch-sig.c (create_signal_catchpoint): Use
6030 std::unique_ptr.
6031 * ada-lang.c (create_ada_exception_catchpoint): Use
6032 std::unique_ptr.
6033
6034 2017-08-22 Tom Tromey <tom@tromey.com>
6035
6036 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6037
6038 2017-08-22 Tom Tromey <tom@tromey.com>
6039
6040 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6041 (lookup_partial_symbol): Update.
6042
6043 2017-08-22 Tom Tromey <tom@tromey.com>
6044
6045 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6046 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6047 (find_and_open_source, symtab_to_fullname): Update.
6048 * psymtab.c (psymtab_to_fullname): Update.
6049
6050 2017-08-22 Tom Tromey <tom@tromey.com>
6051
6052 * exec.c (exec_file_attach): Update.
6053 * linux-thread-db.c (try_thread_db_load): Update.
6054 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6055 * utils.c (gdb_realpath): Change return type.
6056 (gdb_realpath_keepfile): Update.
6057 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6058 (_initialize_utils): Register the new self test.
6059 * source.c (openp): Update.
6060 (find_and_open_source): Update.
6061 * nto-tdep.c (nto_find_and_open_solib): Update.
6062 * main.c (set_gdb_data_directory): Update.
6063 (captured_main_1): Update.
6064 * dwarf2read.c (dwarf2_get_dwz_file): Update
6065 (dw2_map_symbol_filenames): Update.
6066 * auto-load.c (auto_load_safe_path_vec_update): Update.
6067 (filename_is_in_auto_load_safe_path_vec): Change type of
6068 "filename_realp".
6069 (auto_load_objfile_script): Update.
6070 (file_is_auto_load_safe): Update. Use std::string.
6071 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6072
6073 2017-08-22 Tom Tromey <tom@tromey.com>
6074
6075 * utils.c (gdb_realpath_keepfile): Return a
6076 gdb::unique_xmalloc_ptr.
6077 * exec.c (exec_file_attach): Update.
6078 * utils.h (gdb_realpath_keepfile): Return a
6079 gdb::unique_xmalloc_ptr.
6080
6081 2017-08-22 Tom Tromey <tom@tromey.com>
6082
6083 * compile/compile.c (compile_file_command): Use
6084 gdb::unique_xmalloc_ptr, std::string.
6085 * utils.c (gdb_abspath): Change return type.
6086 * source.c (openp): Update.
6087 * objfiles.c (allocate_objfile): Update.
6088 * main.c (set_gdb_data_directory): Update.
6089 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6090
6091 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6092
6093 * cli-cmds.c (list_commands): List actual code around more than
6094 one location.
6095
6096 2017-08-21 John Baldwin <jhb@FreeBSD.org>
6097
6098 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6099
6100 2017-08-21 Pedro Alves <palves@redhat.com>
6101
6102 PR gdb/19487
6103 * c-exp.y (variable production): Handle function aliases.
6104 * minsyms.c (msymbol_is_text): New function.
6105 * minsyms.h (msymbol_is_text): Declare.
6106 * symtab.c (find_function_alias_target): New function.
6107 * symtab.h (find_function_alias_target): Declare.
6108
6109 2017-08-21 Pedro Alves <palves@redhat.com>
6110
6111 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6112 typedefs.
6113 * typeprint.c (whatis_exp): If handling "whatis", and expression
6114 is OP_TYPE, strip one typedef level. Otherwise don't strip
6115 typedefs here.
6116 * valops.c (value_cast): Save "to" type before resolving
6117 stubs/typedefs. Use that type as resulting value's type.
6118
6119 2017-08-18 Tom Tromey <tom@tromey.com>
6120 Pedro Alves <palves@redhat.com>
6121
6122 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6123 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6124 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6125 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6126 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6127 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6128 (linux_get_siginfo_data): Add "thread" argument. Use
6129 scoped_restore.
6130 * linux-nat.c (linux_child_follow_fork)
6131 (check_stopped_by_watchpoint): Use scoped_restore.
6132 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6133 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6134 (restore_inferior_ptid, save_inferior_ptid): Remove.
6135 * btrace.c (btrace_fetch): Use scoped_restore.
6136 * bsd-uthread.c (bsd_uthread_fetch_registers)
6137 (bsd_uthread_store_registers): Use scoped_restore.
6138 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6139 scoped_restore.
6140 * aix-thread.c (aix_thread_resume, aix_thread_wait)
6141 (aix_thread_xfer_partial): Use scoped_restore.
6142 * inferior.h (save_inferior_ptid): Remove.
6143
6144 2017-08-18 Yao Qi <yao.qi@linaro.org>
6145
6146 PR tdep/21818
6147 * arm-tdep.c (gdb_print_insn_arm): Mark
6148 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6149
6150 2017-08-18 Yao Qi <yao.qi@linaro.org>
6151
6152 * NEWS: Mention GDBserver's new option "--selftest".
6153 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6154 * selftest.c: Move it to common/selftest.c.
6155 * selftest.h: Move it to common/selftest.h.
6156 * selftest-arch.c (reset): New function.
6157 (tests_with_arch): Call reset.
6158
6159 2017-08-18 Yao Qi <yao.qi@linaro.org>
6160
6161 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
6162 instead of exception_fprintf and printf_filtered.
6163
6164 2017-08-18 Yao Qi <yao.qi@linaro.org>
6165
6166 * selftest.c (register_self_test): Rename it to
6167 selftests::register_test.
6168 (run_self_tests): selftest::run_tests.
6169 * selftest.h: Update declarations.
6170 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6171 selftests::register_test_foreach_arch.
6172 * selftest-arch.h: Update declaration.
6173 * aarch64-tdep.c: Update.
6174 * arm-tdep.c: Likewise.
6175 * disasm-selftests.c: Likewise.
6176 * dwarf2loc.c: Likewise.
6177 * dwarf2-frame.c: Likewise.
6178 * findvar.c: Likewise.
6179 * gdbarch-selftests.c: Likewise.
6180 * maint.c (maintenance_selftest): Likewise.
6181 * regcache.c: Likewise.
6182 * rust-exp.y: Likewise.
6183 * selftest-arch.c: Likewise.
6184 * unittests/environ-selftests.c: Likewise.
6185 * unittests/function-view-selftests.c: Likewise.
6186 * unittests/offset-type-selftests.c: Likewise.
6187 * unittests/optional-selftests.c: Likewise.
6188 * unittests/scoped_restore-selftests.c: Likewise.
6189 * utils-selftests.c: Likewise.
6190
6191 2017-08-17 Pedro Alves <palves@redhat.com>
6192
6193 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6194 local.
6195
6196 2017-08-17 Pedro Alves <palves@redhat.com>
6197
6198 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6199 field.
6200 (reset_die_in_process): Delete, replaced by ...
6201 (process_die_scope): ... this new class. Make it responsible for
6202 freeing cu->line_header too.
6203 (process_die): Use process_die_scope.
6204 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6205 cu->line_header_die_owner. Don't release the line header if it's
6206 owned by the CU.
6207 (setup_type_unit_groups): Make the CU/DIE own the line header.
6208 Don't release the line header here.
6209
6210 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
6211
6212 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6213
6214 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
6215
6216 * NEWS: Mention new shortcuts for nexti and stepi in TUI
6217 Single-Key mode
6218
6219 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
6220
6221 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6222 mode command list.
6223
6224 2017-08-15 Stafford Horne <shorne@gmail.com>
6225
6226 * MAINTAINERS (Write After Approval): Add Stafford Horne.
6227
6228 2017-08-15 Stafford Horne <shorne@gmail.com>
6229
6230 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6231
6232 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
6233
6234 PR gdb/21954
6235 * infcmd.c (unset_environment_command): Use the 'clear' method on
6236 the environment instead of resetting it.
6237
6238 2017-08-15 John Baldwin <jhb@FreeBSD.org>
6239
6240 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6241 platforms.
6242
6243 2017-08-14 Tom Tromey <tom@tromey.com>
6244
6245 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6246 (print_binary_chars): Likewise.
6247 (BITS_IN_BYTES): Remove.
6248
6249 2017-08-14 Tom Tromey <tom@tromey.com>
6250
6251 PR gdb/21675
6252 * valprint.c (LOW_ZERO): Change value to 034.
6253 (print_octal_chars): Add static_asserts for octal constants.
6254 * printcmd.c (print_scalar_formatted): Add 'd' case.
6255
6256 2017-08-11 Tom Tromey <tom@tromey.com>
6257
6258 * symfile.c (add_symbol_file_command): Use std::vector.
6259
6260 2017-08-14 Tom Tromey <tom@tromey.com>
6261
6262 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6263 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6264 std::move.
6265 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6266
6267 2017-08-11 Pedro Alves <palves@redhat.com>
6268
6269 * infrun.c (process_event_stop_test): Adjust
6270 function_name_is_marked_for_skip call.
6271 * skip.c: Include <list>.
6272 (skiplist_entry): Make it a class with private fields, and
6273 getters/setters.
6274 (skiplist_entry_chain): Delete.
6275 (skiplist_entries): New.
6276 (skiplist_entry_count): Delete.
6277 (highest_skiplist_entry_num): New.
6278 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6279 (add_skiplist_entry): Delete.
6280 (skiplist_entry::skiplist_entry): New.
6281 (skiplist_entry::add_entry): New.
6282 (skip_file_command, skip_function): Adjust.
6283 (compile_skip_regexp): Delete.
6284 (skip_command): Don't compile regexp here. Adjust to use
6285 skiplist_entry::add_entry.
6286 (skip_info): Adjust to use range-for and getters.
6287 (skip_enable_command, skip_disable_command): Adjust to use
6288 range-for and setters.
6289 (skip_delete_command): Adjust to use std::list.
6290 (add_skiplist_entry): Delete.
6291 (skip_file_p): Delete, refactored as ...
6292 (skiplist_entry::do_skip_file_p): ... this new method.
6293 (skip_gfile_p): Delete, refactored as ...
6294 (skiplist_entry::do_gskip_file_p): ... this new method.
6295 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6296 (skiplist_entry::skip_function_p): ... this new method.
6297 (function_name_is_marked_for_skip): Now returns bool, and takes
6298 the function sal by const reference. Adjust to use range-for and
6299 skiplist_entry methods.
6300 (_initialize_step_skip): Remove references to
6301 skiplist_entry_chain, skiplist_entry_count.
6302 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6303 takes the function sal by const reference.
6304
6305 2017-08-11 Yao Qi <yao.qi@linaro.org>
6306
6307 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6308 (dwarf2_frame_cache): Remove reset_cache_cleanup.
6309 (dwarf2_frame_cache):
6310 * frame-unwind.c (frame_unwind_try_unwinder): Catch
6311 RETURN_MASK_ALL and set *this_case to NULL.
6312 * frame-unwind.h: Update comments.
6313
6314 2017-08-11 Yao Qi <yao.qi@linaro.org>
6315
6316 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6317 (dwarf2_frame_state_copy_regs): Remove.
6318 (dwarf2_frame_state_free_regs): Remove.
6319 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6320 (dwarf2_restore_rule): Call method .alloc_regs instead of
6321 dwarf2_frame_state_alloc_regs.
6322 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
6323 constructor. Call std::move.
6324 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6325 (dwarf2_frame_cache): Likewise.
6326
6327 [GDB_SELF_TEST]: Include selftest.h and
6328 selftest-arch.h.
6329 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6330 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6331 execute_cfa_program_test.
6332
6333 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6334 copy ctor, assignment operator, move assignment.
6335 <alloc_regs>: New method.
6336 <swap>: New method.
6337 (struct dwarf2_frame_state): Delete dtor.
6338 (dwarf2_frame_state_alloc_regs): Remove declaration.
6339 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6340 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6341
6342 2017-08-11 Yao Qi <yao.qi@linaro.org>
6343
6344 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6345 (dwarf2_frame_state::dwarf2_frame_state): New.
6346 (dwarf2_frame_state::~dwarf2_frame_state): New.
6347 (dwarf2_fetch_cfa_info): Update.
6348 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
6349 rather than a pointer. Update code.
6350 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6351 dtor.
6352 <data_align, code_align, retaddr_column>: Change them to const.
6353 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6354 to bool.
6355
6356 2017-08-11 Yao Qi <yao.qi@linaro.org>
6357
6358 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6359 <loc.exp>: New field.
6360 * dwarf2-frame.c (execute_cfa_program): Update.
6361 (dwarf2_frame_prev_register): Update.
6362
6363 2017-08-10 Pedro Alves <palves@redhat.com>
6364
6365 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6366
6367 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6368
6369 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6370 (fbsd_pending_children): Use std::list.
6371 (fbsd_remember_child): Likewise.
6372 (fbsd_is_child_pending): Likewise.
6373 (fbsd_pending_vfork_done): Use std::forward_list.
6374 (fbsd_add_vfork_done): Likewise.
6375 (fbsd_is_vfork_done_pending): Likewise.
6376 (fbsd_next_vfork_done): Likewise.
6377
6378 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6379
6380 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6381 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6382 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6383 for `mapfilename'.
6384 (fbsd_xfer_partial): Use gdb::byte_vector.
6385 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6386
6387 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6388
6389 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6390 "filestuff.h".
6391 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6392
6393 2017-08-09 Tom Tromey <tom@tromey.com>
6394
6395 * skip.c (skiplist_entry): New constructor.
6396 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6397 (skiplist_entry::file_is_glob): Now bool.
6398 (skiplist_entry::file, skiplist_entry::function): Now
6399 std::string.
6400 (make_skip_entry): Return a unique_ptr. Use new.
6401 (free_skiplist_entry, free_skiplist_entry_cleanup)
6402 (make_free_skiplist_entry_cleanup): Remove.
6403 (skip_command, skip_disable_command, add_skiplist_entry)
6404 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6405 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6406 (function_name_is_marked_for_skip): Update.
6407 (skip_delete_command): Update. Use delete.
6408
6409 2017-08-09 Jiong Wang <jiong.wang@arm.com>
6410
6411 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6412 (aarch64_linux_core_read_description): New function.
6413 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6414
6415 2017-08-09 Pedro Alves <palves@redhat.com>
6416
6417 * cp-name-parser.y (cp_comp_to_string): Return a
6418 gdb::unique_xmalloc_ptr<char>.
6419 * cp-support.c (replace_typedefs_qualified_name)
6420 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6421 (cp_canonicalize_string_full): Use op= instead of explicit
6422 convertion.
6423 (cp_class_name_from_physname, method_name_from_physname)
6424 (cp_func_name, cp_remove_params): Adjust to use
6425 gdb::unique_xmalloc_ptr<char>.
6426 * cp-support.h (cp_comp_to_string): Return a
6427 gdb::unique_xmalloc_ptr<char>.
6428 * python/py-type.c (typy_lookup_type): Adjust to use
6429 gdb::unique_xmalloc_ptr<char>.
6430
6431 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6432
6433 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6434
6435 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6436 Yao Qi <yao.qi@linaro.org>
6437
6438 * cp-support.c (cp_canonicalize_string_full): Use
6439 gdb::unique_xmalloc_ptr<char>.
6440 (cp_canonicalize_string): Likewise.
6441
6442 2017-08-09 Yao Qi <yao.qi@linaro.org>
6443
6444 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6445 * regformats/i386/amd64-avx-avx512.dat: Remove.
6446 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6447 * regformats/i386/amd64-avx-mpx.dat:Remove.
6448 * regformats/i386/amd64-avx.dat: Remove.
6449 * regformats/i386/amd64-mpx.dat: Remove.
6450 * regformats/i386/i386-avx-avx512.dat: Remove.
6451 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6452 * regformats/i386/i386-avx-mpx.dat: Remove.
6453 * regformats/i386/i386-mmx.dat: Remove.
6454 * regformats/i386/i386-mpx.dat: Remove.
6455
6456 2017-08-09 Yao Qi <yao.qi@linaro.org>
6457
6458 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6459 * amd64-tdep.c: Don't include features/i386/x32*.c.
6460 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6461 functions.
6462 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6463 and i386/x32-avx-avx512.
6464 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6465 and i386/x32.xml.
6466 * features/i386/x32-avx-avx512.c: Removed.
6467 * features/i386/x32-avx-avx512.xml: Removed.
6468 * features/i386/x32-avx.c: Removed.
6469 * features/i386/x32-avx.xml: Removed.
6470 * features/i386/x32.c: Removed.
6471 * features/i386/x32.xml: Removed.
6472 * regformats/i386/x32-avx-avx512.dat: Removed.
6473 * regformats/i386/x32-avx.dat: Removed.
6474 * regformats/i386/x32.dat: Removed.
6475
6476 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6477
6478 PR breakpoints/21886
6479 * mem-break.c (default_memory_insert_breakpoint): Use
6480 `->placed_address' rather than `->reqstd_address' for the
6481 breakpoint location.
6482
6483 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6484
6485 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6486 assertions.
6487
6488 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6489
6490 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6491 a union of `tdep_info', `tdesc_data' and `id'.
6492 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6493 rather than `info.tdep_info'.
6494 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6495 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6496 * i386-tdep.c (i386_gdbarch_init): Likewise.
6497 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6498 * mips-tdep.c (mips_gdbarch_init): Likewise.
6499 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6500 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6501 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6502 `info.tdep_info'.
6503 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6504 `info.tdep_info'.
6505 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6506 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6507 `info.tdep_info'.
6508 * spu-tdep.c (spu_gdbarch_init): Likewise.
6509 * gdbarch.h: Regenerate.
6510
6511 2017-08-07 Leszek Swirski <leszeks@google.com>
6512
6513 PR symtab/20899
6514 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6515
6516 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6517
6518 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6519 (gdbsim_open): Rename gdb_argv args object to argv.
6520
6521 2017-08-05 Tom Tromey <tom@tromey.com>
6522
6523 * compile/compile-object-load.c (compile_object_load): Use
6524 gdb::unique_xmalloc_ptr.
6525 * cli/cli-dump.c (scan_filename): Rename from
6526 scan_filename_with_cleanup. Change return type.
6527 (scan_expression): Rename from scan_expression_with_cleanup.
6528 Change return type.
6529 (dump_memory_to_file, dump_value_to_file, restore_command):
6530 Use gdb::unique_xmalloc_ptr. Update.
6531 * cli/cli-cmds.c (find_and_open_script): Use
6532 gdb::unique_xmalloc_ptr.
6533 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6534 * symmisc.c (maintenance_print_symbols)
6535 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6536 * symfile.c (symfile_bfd_open, generic_load)
6537 (add_symbol_file_command, remove_symbol_file_command): Use
6538 gdb::unique_xmalloc_ptr.
6539 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6540 * psymtab.c (maintenance_print_psymbols): Use
6541 gdb::unique_xmalloc_ptr.
6542 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6543 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6544 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6545 (reload_shared_libraries_1): Likewise.
6546
6547 2017-08-05 Tom Tromey <tom@tromey.com>
6548
6549 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6550 (rust_op_vector, rust_set_vector): New typedefs.
6551 (current_parser): New global.
6552 (work_obstack): Change to pointer type. Update all users.
6553 (rust_ast, pstate): Remove globals.
6554 (struct rust_parser): New.
6555 (%union) <params, field_inits>: Change type.
6556 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6557 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6558 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6559 (convert_params_to_types, convert_params_to_expression): Change
6560 type of "params".
6561 (ast_string): Change type of "fields".
6562 (rust_parse): Make a rust_parser. Remove cleanups.
6563 (rust_lex_tests): Make and install an auto_obstack.
6564
6565 2017-08-04 Yao Qi <yao.qi@linaro.org>
6566
6567 * configure.srv (ipa_x32_linux_regobj): New.
6568 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6569 instead of X86_TDESC_AVX512.
6570 (initialize_low_tracepoint): Call
6571 init_registers_x32_avx_avx512_linux.
6572
6573 2017-08-04 Yao Qi <yao.qi@linaro.org>
6574
6575 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6576
6577 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6578
6579 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6580
6581 2017-08-03 Tom Tromey <tom@tromey.com>
6582
6583 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6584 Remove.
6585 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6586
6587 2017-08-03 Tom Tromey <tom@tromey.com>
6588
6589 * python/py-param.c (compute_enum_values): Use gdb_argv.
6590
6591 2017-08-03 Tom Tromey <tom@tromey.com>
6592
6593 * utils.h (struct gdb_argv_deleter): New.
6594 (gdb_argv): New class.
6595 * utils.c (gdb_argv::reset): New method.
6596 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6597 * tracefile.c (tsave_command): Use gdb_argv.
6598 * top.c (new_ui_command): Use gdb_argv.
6599 * symmisc.c (maintenance_print_symbols)
6600 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6601 * symfile.c (symbol_file_command, generic_load)
6602 (remove_symbol_file_command): Use gdb_argv.
6603 * stack.c (backtrace_command): Use gdb_argv.
6604 * source.c (add_path, show_substitute_path_command)
6605 (unset_substitute_path_command, set_substitute_path_command):
6606 Use gdb_argv.
6607 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6608 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6609 * remote.c (extended_remote_run, remote_put_command)
6610 (remote_get_command, remote_delete_command): Use gdb_argv.
6611 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6612 (gdbsim_open): Use gdb_argv.
6613 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6614 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6615 * procfs.c (procfs_info_proc): Use gdb_argv.
6616 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6617 * infrun.c (handle_command): Use gdb_argv.
6618 * inferior.c (add_inferior_command, clone_inferior_command):
6619 Use gdb_argv.
6620 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6621 * exec.c (exec_file_command): Use gdb_argv.
6622 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6623 * compile/compile.c (build_argc_argv): Use gdb_argv.
6624
6625 2017-08-03 Tom Tromey <tom@tromey.com>
6626
6627 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6628
6629 2017-08-03 Tom Tromey <tom@tromey.com>
6630
6631 * python/python.c (compute_python_string): Return std::string.
6632 (gdbpy_eval_from_control_command): Update.
6633 (do_start_initialization): Use std::string.
6634 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6635 xstrprintf.
6636 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6637 xstrprintf.
6638
6639 2017-08-03 Tom Tromey <tom@tromey.com>
6640
6641 * top.h (do_restore_instream_cleanup): Remove.
6642 * top.c (do_restore_instream_cleanup): Remove.
6643 (read_command_file): Use scoped_restore.
6644 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6645
6646 2017-08-03 Tom Tromey <tom@tromey.com>
6647
6648 * cli/cli-script.c (execute_user_command)
6649 (execute_control_command): Use scoped_restore.
6650
6651 2017-08-03 Tom Tromey <tom@tromey.com>
6652
6653 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6654 (execute_user_command): Remove user_call_depth; use
6655 user_args_stack's size instead.
6656
6657 2017-08-03 Tom Tromey <tom@tromey.com>
6658
6659 * top.h (in_user_command): Remove.
6660 * top.c (in_user_command): Remove.
6661 * cli/cli-script.c (do_restore_user_call_depth)
6662 (execute_user_command): Update.
6663
6664 2017-08-03 Tom Tromey <tom@tromey.com>
6665
6666 * valops.c (search_struct_method): Use gdb::byte_vector.
6667 * valarith.c (value_concat): Use std::vector.
6668 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6669 (simple_search_memory): Likewise.
6670 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6671 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6672 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6673 * elfread.c (elf_rel_plt_read): Use std::string.
6674 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6675 * cli/cli-dump.c (restore_section_callback): Use
6676 gdb::byte_vector.
6677
6678 2017-08-03 Tom Tromey <tom@tromey.com>
6679
6680 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6681
6682 2017-08-03 Tom Tromey <tom@tromey.com>
6683
6684 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6685 (tui_register_format): Use scoped_restore.
6686
6687 2017-08-03 Tom Tromey <tom@tromey.com>
6688
6689 * reverse.c (exec_direction_default): Remove.
6690 (exec_reverse_once): Use scoped_restore.
6691 * remote.c (restore_remote_timeout): Remove.
6692 (remote_flash_erase, remote_flash_write, remote_flash_done)
6693 (readchar, remote_serial_write): Use scoped_restore.
6694 * cli/cli-script.c (struct source_cleanup_lines_args)
6695 (source_cleanup_lines): Remove.
6696 (script_from_file): Use scoped_restore.
6697 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6698 (source_command): Use scoped_restore.
6699
6700 2017-08-03 Tom Tromey <tom@tromey.com>
6701
6702 * utils.h (make_cleanup_free_so): Remove.
6703 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6704 * solist.h (struct so_deleter): New.
6705 (so_list_up): New typedef.
6706 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6707
6708 2017-08-03 Tom Tromey <tom@tromey.com>
6709
6710 * utils.h (make_cleanup_restore_current_language): Remove.
6711 * utils.c (do_restore_current_language)
6712 (make_cleanup_restore_current_language): Remove.
6713 * parse.c (parse_exp_in_context_1)
6714 (parse_expression_with_language): Use
6715 scoped_restore_current_language.
6716 * mi/mi-main.c (mi_cmd_execute): Use
6717 scoped_restore_current_language.
6718 * language.h (scoped_restore_current_language): New class.
6719
6720 2017-08-03 Tom Tromey <tom@tromey.com>
6721
6722 * compile/compile.c (cleanup_unlink_file): Remove.
6723 (compile_to_object): Use gdb::unlinker.
6724 (eval_compile_command): Likewise.
6725
6726 2017-08-03 Tom Tromey <tom@tromey.com>
6727
6728 * utils.h (make_cleanup_fclose): Remove.
6729 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6730
6731 2017-08-03 Tom Tromey <tom@tromey.com>
6732
6733 * top.c (open_terminal_stream): Return gdb_file_up.
6734 (new_ui_command): Update.
6735
6736 2017-08-03 Tom Tromey <tom@tromey.com>
6737
6738 * source.c (print_source_lines_base, forward_search_command)
6739 (reverse_search_command): Use gdb_file_up.
6740
6741 2017-08-03 Tom Tromey <tom@tromey.com>
6742
6743 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6744
6745 2017-08-03 Tom Tromey <tom@tromey.com>
6746
6747 * cli/cli-cmds.c (find_and_open_script): Change return type.
6748 Remove "streamp" and "full_path" parameters.
6749 (source_script_with_search): Update.
6750 * auto-load.c (source_script_file): Update.
6751 * cli/cli-cmds.h (find_and_open_script): Change type.
6752 (open_script): New struct.
6753
6754 2017-08-03 Tom Tromey <tom@tromey.com>
6755
6756 * xml-support.c (xml_fetch_content_from_file): Update.
6757 * ui-file.c (stdio_file::open): Update.
6758 * tracefile-tfile.c (tfile_start): Update.
6759 * remote.c (remote_file_put, remote_file_get): Update.
6760 * nat/linux-procfs.c (linux_proc_get_int)
6761 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6762 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6763 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6764 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6765 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6766 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6767 * linux-nat.c (linux_proc_pending_signals): Update.
6768 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6769 (file_closer): Remove.
6770 * compile/compile.c (compile_to_object): Update.
6771 * common/filestuff.h (struct gdb_file_deleter): New.
6772 (gdb_file_up): New typedef.
6773 (gdb_fopen_cloexec): Change return type.
6774 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6775 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6776 (dump_binary_file, restore_binary_file): Update.
6777 * auto-load.c (auto_load_objfile_script_1): Update.
6778
6779 2017-08-03 Tom Tromey <tom@tromey.com>
6780
6781 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6782 (info_static_tracepoint_markers_command): Likewise.
6783 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6784 * skip.c (skip_info): Use ui_out_emit_table.
6785 * progspace.c (print_program_space): Use ui_out_emit_table.
6786 * osdata.c (info_osdata): Use ui_out_emit_table.
6787 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6788 ui_out_emit_table.
6789 * linux-thread-db.c (info_auto_load_libthread_db): Use
6790 ui_out_emit_table.
6791 * inferior.c (print_inferior): Use ui_out_emit_table.
6792 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6793 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6794 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6795 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6796 * ui-out.h (class ui_out_emit_table): New.
6797
6798 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6799
6800 * mips-tdep.c (mips_fpu_type_str): New function.
6801 (mips_dump_tdep): Call it.
6802
6803 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6804
6805 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6806 `->mips_fpu_type'.
6807
6808 2017-07-31 Xavier Roirand <roirand@adacore.com>
6809
6810 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6811
6812 2017-07-27 Xavier Roirand <roirand@adacore.com>
6813
6814 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6815
6816 2017-07-26 Yao Qi <yao.qi@linaro.org>
6817
6818 * cli/cli-cmds.c (maintenancechecklist): New variable.
6819 * gdbcmd.h (maintenancechecklist): Declare it.
6820 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6821 Call i386_linux_read_description with different masks.
6822 * maint.c (maintenance_check_command): New function.
6823 (_initialize_maint_cmds): Call add_prefix_cmd.
6824 * target-descriptions.c (tdesc_reg): override operator != and ==.
6825 (tdesc_type): Likewise.
6826 (tdesc_feature): Likewise.
6827 (target_desc): Likewise.
6828 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6829 (maintenance_check_xml_descriptions): New function.
6830 (_initialize_target_descriptions) Add command "xml-descriptions".
6831 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6832
6833 2017-07-26 Yao Qi <yao.qi@linaro.org>
6834
6835 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6836 Include features/i386/32bit-*.c.
6837 (i386_linux_read_description): Generate target description if it
6838 doesn't exist.
6839 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6840 functions.
6841 * features/i386/32bit-linux.c: Re-generated.
6842 * features/i386/32bit-sse.c: Likewise.
6843 * target-descriptions.c (print_c_feature::visit): Print code to
6844 set register number if needed.
6845 (print_c_feature) <m_next_regnum>: New field.
6846
6847 2017-07-26 Yao Qi <yao.qi@linaro.org>
6848
6849 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6850 (FEATURE_XMLFILES): New.
6851 (FEATURE_CFILES): New.
6852 New rules.
6853 (clean-cfiles): Remove generated c files.
6854 * features/i386/32bit-avx.c: Generated.
6855 * features/i386/32bit-avx512.c: Generated.
6856 * features/i386/32bit-core.c: Generated.
6857 * features/i386/32bit-linux.c: Generated.
6858 * features/i386/32bit-mpx.c: Generated.
6859 * features/i386/32bit-pkeys.c: Generated.
6860 * features/i386/32bit-sse.c: Generated.
6861 * target-descriptions.c: Include algorithm.
6862 (tdesc_element_visitor): Add method visit_end.
6863 (print_c_tdesc): Implement visit_end.
6864 (print_c_tdesc:: m_filename_after_features): Move it to
6865 protected.
6866 (print_c_feature): New class.
6867 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6868 name starts with "i386/32bit-".
6869
6870 2017-07-26 Yao Qi <yao.qi@linaro.org>
6871
6872 * target-descriptions.c (tdesc_element_visitor): New class.
6873 (tdesc_element): New class.
6874 (tdesc_reg): Inherit from tdesc_element.
6875 (tdesc_reg::accept): New function.
6876 (tdesc_type): Inherit from tdesc_element.
6877 (tdesc_type::accept): New function.
6878 (tdesc_feature): Inherit from tdesc_element.
6879 (tdesc_feature::accept): New function.
6880 (target_desc): Inherit from tdesc_element.
6881 (target_desc::target_desc): New.
6882 (target_desc::~target_desc): New.
6883 (target_desc::accept): New.
6884 (allocate_target_description): Use new.
6885 (free_target_description): Use delete.
6886 (print_c_tdesc): New class.
6887 (maint_print_c_tdesc_cmd): Adjust.
6888
6889 * features/aarch64.c: Re-generated.
6890 * features/arc-arcompact.c: Re-generated.
6891 * features/arc-v2.c: Re-generated.
6892 * features/arm/arm-with-iwmmxt.c: Re-generated.
6893 * features/arm/arm-with-m.c: Re-generated.
6894 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6895 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6896 * features/arm/arm-with-neon.c: Re-generated.
6897 * features/arm/arm-with-vfpv2.c: Re-generated.
6898 * features/arm/arm-with-vfpv3.c: Re-generated.
6899 * features/i386/amd64-avx-avx512.c: Re-generated.
6900 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6901 * features/i386/amd64-avx.c: Re-generated.
6902 * features/i386/amd64-avx-linux.c: Re-generated.
6903 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6904 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6905 * features/i386/amd64-avx-mpx.c: Re-generated.
6906 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6907 * features/i386/amd64.c: Re-generated.
6908 * features/i386/amd64-linux.c: Re-generated.
6909 * features/i386/amd64-mpx.c: Re-generated.
6910 * features/i386/amd64-mpx-linux.c: Re-generated.
6911 * features/i386/i386-avx-avx512.c: Re-generated.
6912 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6913 * features/i386/i386-avx.c: Re-generated.
6914 * features/i386/i386-avx-linux.c: Re-generated.
6915 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6916 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6917 * features/i386/i386-avx-mpx.c: Re-generated.
6918 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6919 * features/i386/i386.c: Re-generated.
6920 * features/i386/i386-linux.c: Re-generated.
6921 * features/i386/i386-mmx.c: Re-generated.
6922 * features/i386/i386-mmx-linux.c: Re-generated.
6923 * features/i386/i386-mpx.c: Re-generated.
6924 * features/i386/i386-mpx-linux.c: Re-generated.
6925 * features/i386/x32-avx-avx512.c: Re-generated.
6926 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6927 * features/i386/x32-avx.c: Re-generated.
6928 * features/i386/x32-avx-linux.c: Re-generated.
6929 * features/i386/x32.c: Re-generated.
6930 * features/i386/x32-linux.c: Re-generated.
6931 * features/microblaze.c: Re-generated.
6932 * features/microblaze-with-stack-protect.c: Re-generated.
6933 * features/mips64-dsp-linux.c: Re-generated.
6934 * features/mips64-linux.c: Re-generated.
6935 * features/mips-dsp-linux.c: Re-generated.
6936 * features/mips-linux.c: Re-generated.
6937 * features/nds32.c: Re-generated.
6938 * features/nios2.c: Re-generated.
6939 * features/nios2-linux.c: Re-generated.
6940 * features/rs6000/powerpc-32.c: Re-generated.
6941 * features/rs6000/powerpc-32l.c: Re-generated.
6942 * features/rs6000/powerpc-403.c: Re-generated.
6943 * features/rs6000/powerpc-403gc.c : Re-generated.
6944 * features/rs6000/powerpc-405.c: Re-generated.
6945 * features/rs6000/powerpc-505.c: Re-generated.
6946 * features/rs6000/powerpc-601.c: Re-generated.
6947 * features/rs6000/powerpc-602.c: Re-generated.
6948 * features/rs6000/powerpc-603.c: Re-generated.
6949 * features/rs6000/powerpc-604.c: Re-generated.
6950 * features/rs6000/powerpc-64.c: Re-generated.
6951 * features/rs6000/powerpc-64l.c: Re-generated.
6952 * features/rs6000/powerpc-7400.c: Re-generated.
6953 * features/rs6000/powerpc-750.c: Re-generated.
6954 * features/rs6000/powerpc-860.c: Re-generated.
6955 * features/rs6000/powerpc-altivec32.c: Re-generated.
6956 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6957 * features/rs6000/powerpc-altivec64.c: Re-generated.
6958 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6959 * features/rs6000/powerpc-cell32l.c: Re-generated.
6960 * features/rs6000/powerpc-cell64l.c: Re-generated.
6961 * features/rs6000/powerpc-e500.c: Re-generated.
6962 * features/rs6000/powerpc-e500l.c: Re-generated.
6963 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6964 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6965 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6966 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6967 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6968 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6969 * features/rs6000/powerpc-vsx32.c: Re-generated.
6970 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6971 * features/rs6000/powerpc-vsx64.c: Re-generated.
6972 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6973 * features/rs6000/rs6000.c: Re-generated.
6974 * features/s390-linux32.c: Re-generated.
6975 * features/s390-linux32v1.c: Re-generated.
6976 * features/s390-linux32v2.c: Re-generated.
6977 * features/s390-linux64.c: Re-generated.
6978 * features/s390-linux64v1.c: Re-generated.
6979 * features/s390-linux64v2.c: Re-generated.
6980 * features/s390-te-linux64.c: Re-generated.
6981 * features/s390-tevx-linux64.c: Re-generated.
6982 * features/s390-vx-linux64.c: Re-generated.
6983 * features/s390x-linux64.c: Re-generated.
6984 * features/s390x-linux64v1.c: Re-generated.
6985 * features/s390x-linux64v2.c: Re-generated.
6986 * features/s390x-te-linux64.c: Re-generated.
6987 * features/s390x-tevx-linux64.c: Re-generated.
6988 * features/s390x-vx-linux64.c: Re-generated.
6989 * features/sparc/sparc32-solaris.c: Re-generated.
6990 * features/sparc/sparc64-solaris.c: Re-generated.
6991 * features/tic6x-c62x.c: Re-generated.
6992 * features/tic6x-c62x-linux.c: Re-generated.
6993 * features/tic6x-c64x.c: Re-generated.
6994 * features/tic6x-c64x-linux.c: Re-generated.
6995 * features/tic6x-c64xp.c: Re-generated.
6996 * features/tic6x-c64xp-linux.c: Re-generated.
6997
6998 2017-07-26 Yao Qi <yao.qi@linaro.org>
6999
7000 * i386-linux-tdep.c (i386_linux_read_description): New function.
7001 (i386_linux_core_read_description): Call
7002 i386_linux_read_description.
7003 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7004 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7005 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7006 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7007 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7008 * x86-linux-nat.c (x86_linux_read_description): Call
7009 i386_linux_read_description.
7010
7011 2017-07-26 Yao Qi <yao.qi@linaro.org>
7012
7013 * NEWS: Mention it.
7014 * features/Makefile (%.c: %.xml): Pass the xml file name to
7015 command "maint print c-tdesc".
7016 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7017 name from 'arg'.
7018
7019 2017-07-26 Yao Qi <yao.qi@linaro.org>
7020
7021 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7022 in-class initialization.
7023 (tdesc_create_feature): Call new instead of XCNEW.
7024 (free_target_description): Ue delete.
7025
7026 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7027
7028 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7029
7030 2017-07-25 Yao Qi <yao.qi@linaro.org>
7031
7032 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7033 constant.
7034 (amd64_x32_init_abi): Likewise.
7035 * amd64-tdep.h (amd64_init_abi): Update declaration.
7036 (amd64_x32_init_abi): Likewise.
7037
7038 2017-07-25 Yao Qi <yao.qi@linaro.org>
7039
7040 PR tdep/21717
7041 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7042 condition for FPSCR.
7043 (arm_linux_store_inferior_registers): Likewise.
7044
7045 2017-07-22 Tom Tromey <tom@tromey.com>
7046
7047 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7048 <syscalls_counts>: Now a std::vector.
7049 (get_catch_syscall_inferior_data): Use "new".
7050 (catch_syscall_inferior_data_cleanup): Use "delete".
7051 (insert_catch_syscall, remove_catch_syscall)
7052 (clear_syscall_counts): Update.
7053
7054 2017-07-22 Tom Tromey <tom@tromey.com>
7055
7056 * break-catch-syscall.c (syscall_catchpoint)
7057 <syscalls_to_be_caught>: Now a std::vector<int>
7058 (~syscall_catchpoint): Remove.
7059 (insert_catch_syscall, remove_catch_syscall)
7060 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7061 (print_mention_catch_syscall, print_recreate_catch_syscall):
7062 Update.
7063 (create_syscall_event_catchpoint): Change type of "filter"
7064 parameter.
7065 (catch_syscall_split_args): Return a std::vector.
7066 (catch_syscall_command_1, catching_syscall_number_1): Update.
7067
7068 2017-07-22 Tom Tromey <tom@tromey.com>
7069
7070 * break-catch-throw.c (struct exception_catchpoint)
7071 <exception_rx>: Now a std::string.
7072 (~exception_catchpoint): Remove.
7073 (print_one_detail_exception_catchpoint): Update.
7074 (handle_gnu_v3_exceptions): Change type of except_rx.
7075 (extract_exception_regexp): Return a std::string.
7076 (catch_exception_command_1): Update.
7077
7078 2017-07-22 Tom Tromey <tom@tromey.com>
7079
7080 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7081 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7082 std::vector.
7083 <catch_all>: Now a bool.
7084 (~signal_catchpoint): Remove.
7085 (signal_catchpoint_insert_location)
7086 (signal_catchpoint_remove_location)
7087 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7088 (signal_catchpoint_print_mention)
7089 (signal_catchpoint_print_recreate)
7090 (signal_catchpoint_explains_signal): Update.
7091 (create_signal_catchpoint): Change type of "filter" and
7092 "catch_all".
7093 (catch_signal_split_args): Return a std::vector. Change type of
7094 "catch_all".
7095 (catch_signal_command): Update.
7096
7097 2017-07-20 Pedro Alves <palves@redhat.com>
7098
7099 * ada-lang.c (ada_language_defn): Make extern.
7100 (_initialize_ada_language): Remove add_language call.
7101 * c-lang.c (c_language_defn, cplus_language_defn)
7102 (asm_language_defn, minimal_language_defn): Make extern.
7103 (_initialize_c_language): Delete.
7104 * completer.c (compare_cstrings): Delete, moved to utils.h.
7105 * d-lang.c (d_language_defn): Make extern.
7106 (_initialize_d_language): Remove add_language calls.
7107 * defs.h (enum language): Add comment.
7108 * f-lang.c (f_language_defn): Make extern.
7109 (_initialize_f_language): Remove add_language call.
7110 * go-lang.c (go_language_defn): Make extern.
7111 (_initialize_go_language): Remove add_language call.
7112 * language.c: Include <algorithm>.
7113 (languages): Redefine as const array.
7114 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7115 (set_language_command): Handle "local". Use for-range loop.
7116 (set_language): Remove loop.
7117 (language_enum): Rewrite.
7118 (language_def, language_str): Remove loops.
7119 (add_language): Delete.
7120 (add_set_language_command): New, based on add_languages.
7121 (skip_language_trampoline): Adjust.
7122 (local_language_defn): Delete.
7123 (language_gdbarch_post_init): Adjust.
7124 (_initialize_language): Remove add_language calls. Call
7125 add_set_language_command.
7126 * language.h (add_language): Delete.
7127 (auto_language_defn)
7128 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7129 (asm_language_defn, c_language_defn, cplus_language_defn)
7130 (d_language_defn, f_language_defn, go_language_defn)
7131 (m2_language_defn, objc_language_defn, opencl_language_defn)
7132 (pascal_language_defn, rust_language_defn): Declare.
7133 * m2-lang.c (m2_language_defn): Make extern.
7134 (_initialize_m2_language): Remove add_language call.
7135 * objc-lang.c (objc_language_defn): Make extern.
7136 (_initialize_objc_language): Remove add_language call.
7137 * opencl-lang.c (opencl_language_defn): Make extern.
7138 (_initialize_opencl_language): Remove add_language call.
7139 * p-lang.c (pascal_language_defn): Make extern.
7140 (_initialize_pascal_language): Delete.
7141 * rust-lang.c (rust_language_defn): Make extern.
7142 (_initialize_rust_language): Delete.
7143 * utils.h (compare_cstrings): New static inline function.
7144
7145 2017-07-20 Pedro Alves <palves@redhat.com>
7146
7147 * ada-lang.c (ada_to_fixed_type_1): Adjust.
7148 (get_var_value): Constify parameters.
7149 (get_int_var_value): Change prototype.
7150 (to_fixed_range_type): Adjust.
7151 * ada-lang.h (get_int_var_value): Change prototype.
7152
7153 2017-07-20 Pedro Alves <palves@redhat.com>
7154
7155 * dwarf2read.c (dw2_lookup_symbol): Use
7156 SYMBOL_MATCHES_SEARCH_NAME.
7157 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7158
7159 2017-07-20 Pedro Alves <palves@redhat.com>
7160
7161 * block.c (block_iter_name_step, block_iter_name_first)
7162 (block_iter_name_next): Delete.
7163 (block_lookup_symbol_primary): Adjust to use
7164 dict_iter_match_first/dict_iter_match_next.
7165 * block.h (block_iter_name_first, block_iter_name_next): Delete
7166 declarations.
7167 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7168 dict_iter_match_first/dict_iter_match_next.
7169
7170 2017-07-20 Pedro Alves <palves@redhat.com>
7171
7172 * cp-support.c (cp_find_first_component_aux): Add missing case for
7173 end of string.
7174
7175 2017-07-18 David Blaikie <dblaikie@gmail.com>
7176
7177 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7178 of dwo_cu's dwo_file.
7179
7180 2017-07-18 Yao Qi <yao.qi@linaro.org>
7181
7182 * remote.c (store_registers_using_G): Remove one line comment.
7183
7184 2017-07-18 Yao Qi <yao.qi@linaro.org>
7185
7186 * regcache.c (regcache_cpy): Simplify it.
7187 (regcache::cpy_no_passthrough): Remove it.
7188 * regcache.h (cpy_no_passthrough): Remove it.
7189 (regcache_dup, regcache_cpy): Update comments.
7190
7191 2017-07-18 Pedro Alves <palves@redhat.com>
7192
7193 * remote-sim.c (sim_command_completer): Adjust to work with a
7194 completion_tracker instead of a VEC.
7195
7196 2017-07-17 Pedro Alves <palves@redhat.com>
7197
7198 * completer.c (complete_source_filenames): New function.
7199 (complete_address_and_linespec_locations): New function.
7200 (location_completer): Use complete_address_and_linespec_locations.
7201 (completion_tracker::build_completion_result): Honor the tracker's
7202 request to suppress append.
7203 * completer.h (completion_tracker::suppress_append_ws)
7204 (completion_tracker::set_suppress_append_ws): New methods.
7205 (completion_tracker::m_suppress_append_ws): New field.
7206 (complete_source_filenames): New declaration.
7207 * linespec.c (linespec_complete_what): New.
7208 (struct ls_parser) <complete_what, completion_word,
7209 completion_quote_char, completion_quote_end, completion_tracker>:
7210 New fields.
7211 (string_find_incomplete_keyword_at_end): New.
7212 (linespec_lexer_lex_string): Record quote char. If in completion
7213 mode, don't throw.
7214 (linespec_lexer_consume_token): Advance the completion word point.
7215 (linespec_lexer_peek_token): Save/restore completion info.
7216 (save_stream_and_consume_token): New.
7217 (set_completion_after_number): New.
7218 (linespec_parse_basic): Set what to complete next depending on
7219 token. Handle function and label completions specially.
7220 (parse_linespec): Disable objc shortcut in completion mode. Set
7221 what to complete next depending on token type. Skip keyword if in
7222 completion mode.
7223 (complete_linespec_component, linespec_complete): New.
7224 * linespec.h (linespec_complete): Declare.
7225
7226 2017-07-17 Pedro Alves <palves@redhat.com>
7227
7228 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7229 Handle 'operator<' / 'operator<<'.
7230
7231 2017-07-17 Pedro Alves <palves@redhat.com>
7232
7233 * completer.c (collect_explicit_location_matches): Handle
7234 MATCH_LABEL.
7235 (convert_explicit_location_to_linespec): New, factored out from
7236 ...
7237 (convert_explicit_location_to_sals): ... this.
7238 (complete_label): New.
7239 (linespec_complete_label, find_label_symbols_in_block): New.
7240 (find_label_symbols): Add completion_mode parameter and adjust to
7241 call find_label_symbols_in_block.
7242 * linespec.h (linespec_complete_label): Declare.
7243
7244 2017-07-17 Pedro Alves <palves@redhat.com>
7245
7246 * ada-lang.c (ada_collect_symbol_completion_matches): Add
7247 complete_symbol_mode parameter.
7248 * cli/cli-cmds.c (complete_command): Get the completion result out
7249 of the handle_brkchars tracker if used a custom word point.
7250 * completer.c: Include "linespec.h".
7251 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7252 (advance_to_expression_complete_word_point): New.
7253 (completion_tracker::completes_to_completion_word): New.
7254 (complete_files_symbols): Pass down
7255 complete_symbol_mode::EXPRESSION.
7256 (explicit_options, probe_options): New.
7257 (collect_explicit_location_matches): Complete on the
7258 explictit_loc->foo instead of word. Use
7259 linespec_complete_function. Handle MATCH_LINE. Handle offering
7260 keyword and options completions.
7261 (backup_text_ptr): Delete.
7262 (skip_keyword): New.
7263 (complete_explicit_location): Remove 'word' parameter. Add
7264 language, quoted_arg_start and quoted_arg_end parameters.
7265 Rewrite, parsing left to right.
7266 (location_completer): Rewrite.
7267 (location_completer_handle_brkchars): New function.
7268 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7269 (enum complete_line_internal_reason): Adjust comments.
7270 (completion_tracker::discard_completions): New.
7271 (completer_handle_brkchars_func_for_completer): Handle
7272 location_completer.
7273 (gdb_custom_word_point_brkchars)
7274 (gdb_org_rl_basic_quote_characters): New.
7275 (gdb_completion_word_break_characters_throw)
7276 (completion_find_completion_word): Handle trackers that use a
7277 custom word point.
7278 (completion_tracker::advance_custom_word_point_by): New.
7279 (completion_tracker::build_completion_result): Don't rely on
7280 readline appending the quote char.
7281 (gdb_rl_attempted_completion_function_throw): Handle trackers that
7282 use a custom word point.
7283 (gdb_rl_attempted_completion_function): Restore
7284 rl_basic_quote_characters.
7285 * completer.h (class completion_tracker): Extend intro comment.
7286 (completion_tracker::set_quote_char)
7287 (completion_tracker::quote_char)
7288 (completion_tracker::set_use_custom_word_point)
7289 (completion_tracker::use_custom_word_point)
7290 (completion_tracker::custom_word_point)
7291 (completion_tracker::set_custom_word_point)
7292 (completion_tracker::advance_custom_word_point_by)
7293 (completion_tracker::completes_to_completion_word)
7294 (completion_tracker::discard_completions): New methods.
7295 (completion_tracker::m_quote_char)
7296 (completion_tracker::m_use_custom_word_point)
7297 (completion_tracker::m_custom_word_point): New fields.
7298 (advance_to_expression_complete_word_point): Declare.
7299 * f-lang.c (f_collect_symbol_completion_matches): Add
7300 complete_symbol_mode parameter.
7301 * language.h (struct language_defn)
7302 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7303 parameter.
7304 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
7305 (linespec_complete_function): New function.
7306 (linespec_lexer_lex_keyword): Adjust.
7307 * linespec.h (linespec_keywords, linespec_complete_function): New
7308 declarations.
7309 * location.c (find_end_quote): New function.
7310 (explicit_location_lex_one): Add explicit_completion_info
7311 parameter. Save quoting info. Don't throw if being called for
7312 completion. Don't handle Ada operators here.
7313 (is_cp_operator, skip_op_false_positives, first_of)
7314 (explicit_location_lex_one_function): New function.
7315 (string_to_explicit_location): Replace 'dont_throw' parameter with
7316 an explicit_completion_info pointer parameter. Handle it. Don't
7317 use explicit_location_lex_one to lex function names. Use
7318 explicit_location_lex_one_function instead.
7319 * location.h (struct explicit_completion_info): New.
7320 (string_to_explicit_location): Replace 'dont_throw' parameter with
7321 an explicit_completion_info pointer parameter.
7322 * symtab.c (default_collect_symbol_completion_matches_break_on):
7323 Add complete_symbol_mode parameter. Handle LINESPEC mode.
7324 (default_collect_symbol_completion_matches)
7325 (collect_symbol_completion_matches): Add complete_symbol_mode
7326 parameter.
7327 (collect_symbol_completion_matches_type): Pass down
7328 complete_symbol_mode::EXPRESSION.
7329 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7330 parameter. Handle LINESPEC mode.
7331 * symtab.h (complete_symbol_mode): New.
7332 (default_collect_symbol_completion_matches_break_on)
7333 (default_collect_symbol_completion_matches)
7334 (collect_symbol_completion_matches)
7335 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7336 parameter.
7337
7338 2017-07-17 Pedro Alves <palves@redhat.com>
7339
7340 * utils.c (enum class strncmp_iw_mode): New.
7341 (strcmp_iw): Rename to ...
7342 (strncmp_iw_with_mode): ... this. Add string2_len and mode
7343 parameters. Handle them.
7344 (strncmp_iw): New.
7345 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7346 * utils.h (strncmp_iw): Declare.
7347 (strcmp_iw): Move describing comments here.
7348
7349 2017-07-17 Pedro Alves <palves@redhat.com>
7350
7351 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7352 CP_OPERATOR_STR.
7353 * c-typeprint.c (is_type_conversion_operator): Use
7354 CP_OPERATOR_STR.
7355 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7356 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7357 CP_OPERATOR_LEN.
7358 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7359 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7360 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7361 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7362 CP_OPERATOR_STR.
7363 * location.c: Include "cp-support.h".
7364 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7365 CP_OPERATOR_STR.
7366 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7367 CP_OPERATOR_LEN.
7368
7369 2017-07-17 Pedro Alves <palves@redhat.com>
7370
7371 * cli/cli-cmds.c (complete_command): Use a completion tracker
7372 along with completion_find_completion_word for handle_brkchars
7373 phase.
7374 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7375 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7376 (struct gdb_rl_completion_word_info): New.
7377 (gdb_rl_find_completion_word): New.
7378 (completion_find_completion_word): New.
7379 * completer.h (completion_find_completion_word): Declare.
7380
7381 2017-07-17 Pedro Alves <palves@redhat.com>
7382
7383 * ada-lang.c (symbol_completion_match): Adjust comments.
7384 (symbol_completion_add): Replace vector parameter with
7385 completion_tracker parameter. Use it.
7386 (ada_make_symbol_completion_list): Rename to...
7387 (ada_collect_symbol_completion_matches): ... this. Add
7388 completion_tracker parameter and use it.
7389 (ada_language_defn): Adjust.
7390 * break-catch-syscall.c (catch_syscall_completer): Adjust
7391 prototype and work with completion_tracker instead of VEC.
7392 * breakpoint.c (condition_completer): Adjust prototype and work
7393 with completion_tracker instead of VEC.
7394 * c-lang.c (c_language_defn, cplus_language_defn)
7395 (asm_language_defn, minimal_language_defn): Adjust to renames.
7396 * cli/cli-cmds.c (complete_command): Rework using
7397 completion_tracker. Catch exceptions when completing.
7398 * cli/cli-decode.c (integer_unlimited_completer)
7399 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7400 with completion_tracker instead of VEC.
7401 * command.h (struct completion_tracker): Forward declare.
7402 (completer_ftype, completer_handle_brkchars_ftype): Change
7403 types.
7404 (complete_on_cmdlist, complete_on_enum): Adjust.
7405 * completer.c: Include <algorithm>.
7406 (struct gdb_completer_state): New.
7407 (current_completion): New global.
7408 (readline_line_completion_function): Delete.
7409 (noop_completer, filename_completer)
7410 (filename_completer_handle_brkchars, complete_files_symbols)
7411 (linespec_location_completer): Adjust to work with a
7412 completion_tracker instead of a VEC.
7413 (string_or_empty): New.
7414 (collect_explicit_location_matches): Adjust to work with a
7415 completion_tracker instead of a VEC.
7416 (explicit_location_completer): Rename to ...
7417 (complete_explicit_location): ... this and adjust to work with a
7418 completion_tracker instead of a VEC.
7419 (location_completer): Adjust to work with a completion_tracker
7420 instead of a VEC.
7421 (add_struct_fields): Adjust to work with a completion_list instead
7422 of VEC.
7423 (expression_completer): Rename to ...
7424 (complete_expression): ... this and adjust to work with a
7425 completion_tracker instead of a VEC. Use complete_files_symbols.
7426 (expression_completer): Reimplement on top of complete_expression.
7427 (symbol_completer): Adjust to work with a completion_tracker
7428 instead of a VEC.
7429 (enum complete_line_internal_reason): Add describing comments.
7430 (complete_line_internal_normal_command): Adjust to work with a
7431 completion_tracker instead of a VEC.
7432 (complete_line_internal): Rename to ...
7433 (complete_line_internal_1): ... this and adjust to work with a
7434 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7435 handle_brkchars phase.
7436 (new_completion_tracker): Delete.
7437 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7438 complete_line_internal_1.
7439 (free_completion_tracker): Delete.
7440 (INITIAL_COMPLETION_HTAB_SIZE): New.
7441 (completion_tracker::completion_tracker)
7442 (completion_tracker::~completion_tracker): New.
7443 (maybe_add_completion): Delete.
7444 (completion_tracker::maybe_add_completion)
7445 (completion_tracker::add_completion)
7446 (completion_tracker::add_completions): New.
7447 (throw_max_completions_reached_error): Delete.
7448 (complete_line): Adjust to work with a completion_tracker instead
7449 of a VEC. Don't create a completion_tracker_t or check for max
7450 completions here.
7451 (command_completer, command_completer_handle_brkchars)
7452 (signal_completer, reg_or_group_completer_1)
7453 (reg_or_group_completer, default_completer_handle_brkchars):
7454 Adjust to work with a completion_tracker.
7455 (gdb_completion_word_break_characters_throw): New.
7456 (gdb_completion_word_break_characters): Reimplement.
7457 (line_completion_function): Delete.
7458 (completion_tracker::recompute_lowest_common_denominator)
7459 (expand_preserving_ws)
7460 (completion_tracker::build_completion_result)
7461 (completion_result::completion_result)
7462 (completion_result::completion_result)
7463 (completion_result::~completion_result)
7464 (completion_result::completion_result)
7465 (completion_result::release_match_list, compare_cstrings)
7466 (completion_result::sort_match_list)
7467 (completion_result::reset_match_list)
7468 (gdb_rl_attempted_completion_function_throw)
7469 (gdb_rl_attempted_completion_function): New.
7470 * completer.h (completion_list, struct completion_result)
7471 (class completion_tracker): New.
7472 (complete_line): Add completion_tracker parameter.
7473 (readline_line_completion_function): Delete.
7474 (gdb_rl_attempted_completion_function): New.
7475 (noop_completer, filename_completer, expression_completer)
7476 (location_completer, symbol_completer, command_completer)
7477 (signal_completer, reg_or_group_completer): Update prototypes.
7478 (completion_tracker_t, new_completion_tracker)
7479 (make_cleanup_free_completion_tracker): Delete.
7480 (enum maybe_add_completion_enum): Delete.
7481 (maybe_add_completion): Delete.
7482 (throw_max_completions_reached_error): Delete.
7483 * corefile.c (complete_set_gnutarget): Adjust to work with a
7484 completion_tracker instead of a VEC.
7485 * cp-abi.c (cp_abi_completer): Adjust to work with a
7486 completion_tracker instead of a VEC.
7487 * d-lang.c (d_language_defn): Adjust.
7488 * disasm.c (disassembler_options_completer): Adjust to work with a
7489 completion_tracker instead of a VEC.
7490 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7491 (f_collect_symbol_completion_matches): ... this. Adjust to work
7492 with a completion_tracker instead of a VEC.
7493 (f_language_defn): Adjust.
7494 * go-lang.c (go_language_defn): Adjust.
7495 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7496 Adjust to work with a completion_tracker instead of a VEC.
7497 * infrun.c (handle_completer): Likewise.
7498 * interps.c (interpreter_completer): Likewise.
7499 * interps.h (interpreter_completer): Likewise.
7500 * language.c (unknown_language_defn, auto_language_defn)
7501 (local_language_defn): Adjust.
7502 * language.h (language_defn::la_make_symbol_completion_list):
7503 Rename to ...
7504 (language_defn::la_collect_symbol_completion_matches): ... this
7505 and adjust to work with a completion_tracker instead of a VEC.
7506 * m2-lang.c (m2_language_defn): Adjust.
7507 * objc-lang.c (objc_language_defn): Adjust.
7508 * opencl-lang.c (opencl_language_defn): Adjust.
7509 * p-lang.c (pascal_language_defn): Adjust.
7510 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7511 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7512 with a completion_tracker.
7513 * rust-lang.c (rust_language_defn): Adjust.
7514 * symtab.c (free_completion_list, do_free_completion_list)
7515 (return_val, completion_tracker): Delete.
7516 (completion_list_add_name, completion_list_add_symbol)
7517 (completion_list_add_msymbol, completion_list_objc_symbol)
7518 (completion_list_add_fields, add_symtab_completions): Add
7519 completion_tracker parameter and use it.
7520 (default_make_symbol_completion_list_break_on_1): Rename to...
7521 (default_collect_symbol_completion_matches_break_on): ... this.
7522 Add completion_tracker parameter and use it instead of allocating
7523 a completion tracker here.
7524 (default_make_symbol_completion_list_break_on): Delete old
7525 implementation.
7526 (default_make_symbol_completion_list): Delete.
7527 (default_collect_symbol_completion_matches): New.
7528 (make_symbol_completion_list): Delete.
7529 (collect_symbol_completion_matches): New.
7530 (make_symbol_completion_type): Rename to ...
7531 (collect_symbol_completion_matches_type): ... this. Add
7532 completion_tracker parameter and use it instead of VEC.
7533 (make_file_symbol_completion_list_1): Rename to...
7534 (collect_file_symbol_completion_matches): ... this. Add
7535 completion_tracker parameter and use it instead of VEC.
7536 (make_file_symbol_completion_list): Delete.
7537 (add_filename_to_list): Use completion_list instead of a VEC.
7538 (add_partial_filename_data::list): Now a completion_list.
7539 (make_source_files_completion_list): Work with a completion_list
7540 instead of a VEC.
7541 * symtab.h: Include "completer.h".
7542 (default_make_symbol_completion_list_break_on)
7543 (default_make_symbol_completion_list, make_symbol_completion_list)
7544 (make_symbol_completion_type, make_file_symbol_completion_list)
7545 (make_source_files_completion_list): Delete.
7546 (default_collect_symbol_completion_matches_break_on)
7547 (default_collect_symbol_completion_matches)
7548 (collect_symbol_completion_matches)
7549 (collect_symbol_completion_matches_type)
7550 (collect_file_symbol_completion_matches)
7551 (make_source_files_completion_list): New.
7552 * top.c (init_main): Don't install a rl_completion_entry_function
7553 hook. Install a rl_attempted_completion_function hook instead.
7554 * tui/tui-layout.c (layout_completer): Adjust to work with a
7555 completion_tracker.
7556 * tui/tui-regs.c (tui_reggroup_completer):
7557 * tui/tui-win.c (window_name_completer, focus_completer)
7558 (winheight_completer): Adjust to work with a completion_tracker.
7559 * value.c: Include "completer.h".
7560 (complete_internalvar): Adjust to work with a completion_tracker.
7561 * value.h (complete_internalvar): Likewise.
7562
7563 2017-07-17 Pedro Alves <palves@redhat.com>
7564
7565 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7566 renames.
7567 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7568 comments to completer_ftype's declaration.
7569 <completer_handle_brkchars>: Change type to
7570 completer_handle_brkchars_ftype.
7571 * command.h (completer_ftype): Add describing comment and give
7572 names to parameters.
7573 (completer_ftype_void): Rename to ...
7574 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7575 (set_cmd_completer_handle_brkchars): Adjust.
7576 * completer.c (filename_completer_handle_brkchars): New function.
7577 (complete_line_internal_normal_command): New function, factored
7578 out from ...
7579 (complete_line_internal): ... here.
7580 (command_completer_handle_brkchars)
7581 (default_completer_handle_brkchars)
7582 (completer_handle_brkchars_func_for_completer): New functions.
7583 * completer.h (set_gdb_completion_word_break_characters): Delete
7584 declaration.
7585 (completer_handle_brkchars_func_for_completer): New declaration.
7586 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7587 completer_handle_brkchars_func_for_completer.
7588
7589 2017-07-17 Pedro Alves <palves@redhat.com>
7590
7591 * completer.c (symbol_completer): New function, based on
7592 make_symbol_completion_list_fn.
7593 * completer.h (symbol_completer): New declaration.
7594 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7595 * python/py-cmd.c (completers): Adjust.
7596 * symtab.c (make_symbol_completion_list_fn): Delete.
7597 * symtab.h (make_symbol_completion_list_fn): Delete.
7598 * cli/cli-decode.c (add_cmd): Adjust.
7599
7600 2017-07-17 Pedro Alves <palves@redhat.com>
7601
7602 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7603 * dwarf2read.c: Include "filename-seen-cache.h".
7604 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7605 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7606 * filename-seen-cache.c: New file.
7607 * filename-seen-cache.h: New file.
7608 * symtab.c: Include "filename-seen-cache.h".
7609 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7610 (create_filename_seen_cache, clear_filename_seen_cache)
7611 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7612 to filename-seen-cache.h/filename-seen-cache.c.
7613 (output_source_filename, sources_info)
7614 (maybe_add_partial_symtab_filename)
7615 (make_source_files_completion_list): Adjust to use
7616 filename_seen_cache.
7617
7618 2017-07-17 Pedro Alves <palves@redhat.com>
7619
7620 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7621 fields.
7622 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7623 dwarf2_debug_sections*)): New.
7624 (dwarf2_per_objfile::dwarf2_per_objfile(const
7625 dwarf2_per_objfile&)): Declare as deleted.
7626 (dwarf2_per_objfile::operator=): Declare as deleted.
7627 (dwarf2_per_objfile::dwarf2_per_objfile)
7628 (dwarf2_per_objfile::~dwarf2_per_objfile)
7629 (dwarf2_per_objfile::free_cached_comp_units): New.
7630 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7631 ctor. Call dwarf2_per_objfile's ctor manually.
7632 (dwarf2_locate_sections): Deleted/refactored as ...
7633 (dwarf2_per_objfile::locate_sections): ... this new method.
7634 (free_cached_comp_units): Defer to
7635 dwarf2_per_objfile::free_cached_comp_units.
7636 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7637
7638 2017-07-14 Tom Tromey <tom@tromey.com>
7639
7640 PR rust/21764:
7641 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7642 parameter.
7643 <UNOP_SIZEOF>: Split into separate case.
7644 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7645
7646 2017-07-14 Tom Tromey <tom@tromey.com>
7647
7648 PR rust/21763:
7649 * symtab.c (symbol_matches_domain): Add language_rust to special
7650 case.
7651 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7652 treat LOC_TYPEDEF symbols as variables.
7653
7654 2017-07-14 Pedro Alves <palves@redhat.com>
7655
7656 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7657 symtabs matching all symtabs with SRCFILE as file name instead of
7658 only considering the first hit, with lookup_symtab.
7659
7660 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7661
7662 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7663 operator_name parameters.
7664 (gen_expr): Update function call.
7665
7666 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7667
7668 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7669 parameter.
7670 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7671 Likewise.
7672 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7673 parameter, use agent_expr::gdbarch instead, update function
7674 calls.
7675 (locexpr_tracepoint_var_ref): Likewise.
7676 (loclist_tracepoint_var_ref): Likewise.
7677 * ax-gdb.c (gen_trace_static_fields): Likewise.
7678 (gen_traced_pop): Likewise.
7679 (gen_frame_args_address): Likewise.
7680 (gen_frame_locals_address): Likewise.
7681 (gen_var_ref): Likewise.
7682 (gen_struct_ref_recursive): Likewise.
7683 (gen_static_field): Likewise.
7684 (gen_maybe_namespace_elt): Likewise.
7685 (gen_expr): Likewise.
7686 (gen_trace_for_var): Likewise.
7687 (gen_trace_for_expr): Likewise.
7688 (gen_trace_for_return_address): Likewise.
7689
7690 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7691
7692 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7693 parameter.
7694 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7695
7696 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7697
7698 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7699 from ax, update calls.
7700 (gen_usual_arithmetic): Likewise.
7701 (gen_integral_promotions): Likewise.
7702 (gen_bitfield_ref): Likewise.
7703 (gen_primitive_field): Likewise.
7704 (gen_struct_ref_recursive): Likewise.
7705 (gen_struct_ref): Likewise.
7706 (gen_maybe_namespace_elt): Likewise.
7707 (gen_struct_elt_for_reference): Likewise.
7708 (gen_namespace_elt): Likewise.
7709 (gen_aggregate_elt_ref): Likewise.
7710 (gen_expr): Get gdbarch from ax, update calls.
7711 (gen_expr_binop_rest): Likewise.
7712
7713 2017-07-13 Pedro Alves <palves@redhat.com>
7714
7715 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7716 as default tdesc.
7717 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7718 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7719 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7720 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7721 tdep.
7722 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7723 Get final tdesc from the tdep.
7724 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7725 default tdesc.
7726 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7727 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7728 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7729 Use it as default tdesc.
7730 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7731 down to amd_init_abi. No longer handle fallback tdesc here.
7732 * amd64-tdep.h (tdesc_x32): Declare.
7733 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7734 parameter.
7735 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7736 as default tdesc.
7737
7738 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7739
7740 * s390-linux-tdep.c (s390_process_record): Add support for
7741 instructions new in arch12.
7742
7743 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7744
7745 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7746 PT_GETFSBASE and PT_GETGSBASE.
7747 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7748 PT_SETGSBASE.
7749
7750 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7751
7752 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7753 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7754 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7755 those rules.
7756 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7757 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7758 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7759 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7760 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7761 * features/i386/amd64.xml: Add 64bit-segments.xml.
7762 * features/i386/amd64-avx-avx512.c: Regenerated.
7763 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7764 * features/i386/amd64-avx-mpx.c: Regenerated.
7765 * features/i386/amd64-avx.c: Regenerated.
7766 * features/i386/amd64-mpx.c: Regenerated.
7767 * features/i386/amd64.c: Regenerated.
7768 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7769 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7770 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7771 * regformats/i386/amd64-avx.dat: Regenerated.
7772 * regformats/i386/amd64-mpx.dat: Regenerated.
7773 * regformats/i386/amd64.dat: Regenerated.
7774
7775 2017-07-10 Yao Qi <yao.qi@linaro.org>
7776
7777 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7778 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7779
7780 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7781
7782 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7783 unsetenv.
7784 * gnulib/aclocal.m4: Regenerate.
7785 * gnulib/config.in: Regenerate.
7786 * gnulib/configure: Regenerate.
7787 * gnulib/import/Makefile.am: Regenerate.
7788 * gnulib/import/Makefile.in: Regenerate.
7789 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7790 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7791 * gnulib/import/m4/environ.m4: New file.
7792 * gnulib/import/m4/setenv.m4: New file.
7793 * gnulib/import/setenv.c: New file.
7794 * gnulib/import/unsetenv.c: New file.
7795
7796 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7797
7798 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7799 address when op is DW_OP_addr.
7800
7801 2017-07-09 Tom Tromey <tom@tromey.com>
7802
7803 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7804 check and apply to outer type.
7805
7806 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7807
7808 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7809 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7810 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7811 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7812
7813 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7814
7815 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7816
7817 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7818
7819 * corelow.c (get_core_siginfo): Remove.
7820 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7821 instead of get_core_siginfo.
7822 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7823 * gdbarch.h: Re-generate.
7824 * gdbarch.c: Re-generate.
7825 * linux-tdep.c (linux_core_xfer_siginfo): New.
7826 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7827
7828 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7829
7830 * corelow.c (thread_section_name): Move to ...
7831 * gdbcore.h (thread_section_name): ... here.
7832
7833 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7834
7835 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7836 (struct siginfo32): New.
7837 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7838 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7839 via ptrace(PT_LWPINFO).
7840
7841 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7842
7843 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7844 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7845 (fbsd_get_siginfo_type): New.
7846 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7847 (_initialize_fbsd_tdep): New.
7848
7849 2017-07-06 David Blaikie <dblaikie@gmail.com>
7850
7851 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7852 a singular dwo_unit*) to support multiple CUs in the same way that
7853 multiple TUs are supported.
7854 (create_cus_hash_table): Replace create_dwo_cu with a function for
7855 parsing multiple CUs from a DWO file.
7856 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7857 create_dwo_cu.
7858 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7859 htab_find, rather than comparing the signature to a singleton CU in
7860 the dwo_file.
7861
7862 2017-07-06 Pedro Alves <palves@redhat.com>
7863
7864 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7865
7866 2017-07-04 Pedro Alves <palves@redhat.com>
7867
7868 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7869 * gdbtypes.h (TYPE_STATIC): Delete.
7870 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7871 is_synchronized, is_native>: Delete.
7872 <dummy>: Bump.
7873 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7874 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7875 (TYPE_FN_FIELD_ABSTRACT): Delete.
7876
7877 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7878
7879 * buffer.h (buffer_finish): Fix spelling mistakes.
7880
7881 2017-07-01 Eli Zaretskii <eliz@gnu.org>
7882
7883 * .dir-locals.el: Automatically switch to C-style comments in
7884 versions of Emacs that support the feature.
7885
7886 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7887 Pedro Alves <palves@redhat.com>
7888
7889 PR cli/21688
7890 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7891 (process_next_line): New variable 'inline_cmd'.
7892 Adjust 'if' clauses for "python", "compile" and "guile" to use
7893 'command_name_equals' and check for '!inline_cmd'.
7894
7895 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7896
7897 PR cli/21688
7898 * cli/cli-script.c (command_name_equals_not_inline): New function.
7899 (process_next_line): Adjust 'if' clauses for "python", "compile"
7900 and "guile" to use command_name_equals_not_inline.
7901
7902 2017-06-29 Pedro Alves <palves@redhat.com>
7903
7904 * completer.c (expression_completer): Call
7905 linespec_location_completer instead of location_completer.
7906
7907 2017-06-29 Pedro Alves <palves@redhat.com>
7908
7909 * completer.c (expression_completer): Remove code that recomputes
7910 'text' from 'word'.
7911
7912 2017-06-29 Yao Qi <yao.qi@linaro.org>
7913
7914 * regformats/regdat.sh: Generate code with
7915 "ifndef IN_PROCESS_AGENT".
7916
7917 2017-06-28 Pedro Alves <palves@redhat.com>
7918
7919 * command.h: Include "common/scoped_restore.h".
7920
7921 2017-06-28 Yao Qi <yao.qi@linaro.org>
7922
7923 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7924 instead of obstack_grow.
7925
7926 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7927
7928 PR gdb/21337
7929 * symfile.c (reread_symbols): Call objfiles_changed just before
7930 read_symbols.
7931
7932 2017-06-27 Pedro Alves <palves@redhat.com>
7933
7934 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7935 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7936 (completion_list_add_symbol, completion_list_add_msymbol):
7937 ... these new functions.
7938 (add_symtab_completions)
7939 (default_make_symbol_completion_list_break_on_1): Adjust.
7940
7941 2017-06-27 Pedro Alves <palves@redhat.com>
7942
7943 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7944 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7945 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7946 dtor.
7947 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7948 'storage_obstack' field an auto_obstack. In-class initialize all
7949 non-bitfield fields. Make minsyms_read bool.
7950 * symfile.c (read_symbols): Adjust.
7951
7952 2017-06-27 Alan Hayward <alan.hayward@arm.com>
7953
7954 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7955 (gdbsim_store_register): Likewise.
7956
7957 2017-06-27 Pedro Alves <palves@redhat.com>
7958
7959 * c-exp.y (name_obstack): Now an auto_obstack.
7960 (yylex): Use auto_obstack::clear.
7961 (c_parse): Use auto_obstack::clear instead of reinitializing and
7962 freeing the obstack.
7963 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7964 * d-exp.y (name_obstack): Now an auto_obstack.
7965 (yylex): Use auto_obstack::clear.
7966 (d_parse): Use auto_obstack::clear instead of reinitializing and
7967 freeing the obstack.
7968 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7969 auto_obstack.
7970 * dwarf2read.c (create_addrmap_from_index)
7971 (dwarf2_build_psymtabs_hard)
7972 (update_enumeration_type_from_children): Likewise.
7973 * gdb_obstack.h (auto_obstack): New type.
7974 * go-exp.y (name_obstack): Now an auto_obstack.
7975 (build_packaged_name): Use auto_obstack::clear.
7976 (go_parse): Use auto_obstack::clear instead of reinitializing and
7977 freeing the obstack.
7978 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7979 auto_obstack.
7980 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7981 * rust-exp.y (work_obstack): Now an auto_obstack.
7982 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7983 reinitializing and freeing the obstack.
7984 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7985 (host_char_to_target): Use auto_obstack.
7986 * utils.h (make_cleanup_obstack_free): Delete declaration.
7987 * valprint.c (generic_emit_char, generic_printstr): Use
7988 auto_obstack.
7989
7990 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7991
7992 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7993 thread.
7994 (darwin_init_thread_list): Don't update dummy thread.
7995 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7996
7997 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7998
7999 * record-full.c (netorder16): Remove.
8000
8001 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8002
8003 * common/diagnostics.h: Define macros for GCC.
8004 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8005 * common/vec.h: Include diagnostics.h.
8006 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8007 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8008 warning.
8009
8010 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8011
8012 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8013 New macro.
8014 * ada-lex.l: Ignore deprecated register warnings.
8015
8016 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8017
8018 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8019 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8020
8021 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8022
8023 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8024 its own line.
8025
8026 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8027
8028 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8029
8030 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8031
8032 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8033 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8034 (xtensa_register_read_masked): Likewise.
8035
8036 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8037
8038 * common/environ.c (gdb_environ::unset): Update comment.
8039
8040 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8041
8042 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8043 registers.
8044
8045 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8046
8047 * record-full.c (record_full_exec_insn): Use byte_vector.
8048
8049 2017-06-22 Yao Qi <yao.qi@linaro.org>
8050
8051 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8052 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8053
8054 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8055
8056 * remote.c (cached_reg): Move from here...
8057 * regcache.h (cached_reg): ...to here.
8058 * python/py-unwind.c (struct reg_info): Remove.
8059 (cached_frame_info): Use cached_reg_t.
8060 (pyuw_prev_register): Likewise.
8061 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8062 (pyuw_dealloc_cache): Free all registers.
8063
8064 2017-06-22 Pedro Alves <palves@redhat.com>
8065 Simon Marchi <simon.marchi@ericsson.com>
8066
8067 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8068 warning.
8069 * common/diagnostics.h: New file.
8070
8071 2017-06-22 Pedro Alves <palves@redhat.com>
8072
8073 * common/agent.h: Add include guards.
8074
8075 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8076
8077 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8078 talk about addressable units instead of bytes.
8079
8080 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8081
8082 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8083 of '::const_iterator'.
8084
8085 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8086
8087 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8088 'unittests/environ-selftests.c'.
8089 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8090 * charset.c (find_charset_names): Declare object 'iconv_env'.
8091 Update code to use 'iconv_env' object. Remove call to
8092 'free_environ'.
8093 * common/environ.c: Include <utility>.
8094 (make_environ): Delete function.
8095 (free_environ): Delete function.
8096 (gdb_environ::clear): New function.
8097 (gdb_environ::operator=): New function.
8098 (gdb_environ::get): Likewise.
8099 (environ_vector): Delete function.
8100 (set_in_environ): Delete function.
8101 (gdb_environ::set): New function.
8102 (unset_in_environ): Delete function.
8103 (gdb_environ::unset): New function.
8104 (gdb_environ::envp): Likewise.
8105 * common/environ.h: Include <vector>.
8106 (struct gdb_environ): Delete; transform into...
8107 (class gdb_environ): ... this class.
8108 (free_environ): Delete prototype.
8109 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8110 environ_vector): Likewise.
8111 * infcmd.c (run_command_1): Update code to call
8112 'envp' from 'gdb_environ' class.
8113 (environment_info): Update code to call methods from 'gdb_environ'
8114 class.
8115 (unset_environment_command): Likewise.
8116 (path_info): Likewise.
8117 (path_command): Likewise.
8118 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8119 (inferior::inferior): Initialize 'environment' using the host's
8120 information.
8121 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8122 Include "environ.h".
8123 (class inferior) <environment>: Change type from 'struct
8124 gdb_environ' to 'gdb_environ'.
8125 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8126 methods from 'gdb_environ' class.
8127 * solib.c (solib_find_1): Likewise
8128 * unittests/environ-selftests.c: New file.
8129
8130 2017-06-20 Yao Qi <yao.qi@linaro.org>
8131
8132 * features/i386/i386-linux.xml: Exchange the order of including
8133 32bit-linux.xml and 32bit-sse.xml.
8134 * features/i386/i386-linux.c: Regenerated.
8135
8136 2017-06-20 Yao Qi <yao.qi@linaro.org>
8137
8138 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8139 Delete copy ctor and assignment operator.
8140 (tdesc_type): Likewise.
8141 (tdesc_feature): Likewise.
8142 (tdesc_free_reg): Remove.
8143 (tdesc_create_reg): Use new.
8144 (tdesc_free_type): Remove.
8145 (tdesc_create_vector): Use new.
8146 (tdesc_create_union): Likewise.
8147 (tdesc_create_flags): Likewise.
8148 (tdesc_create_enum): Likewise.
8149 (tdesc_free_feature): Delete.
8150 (free_target_description): Use delete.
8151
8152 2017-06-19 John Baldwin <jhb@FreeBSD.org>
8153
8154 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8155 registers.
8156
8157 2017-06-19 Pedro Alves <palves@redhat.com>
8158
8159 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8160 after gdb::unlinker.
8161
8162 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
8163
8164 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8165 gdb_environ to access an environment variable.
8166
8167 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8168
8169 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8170 gdb_byte*.
8171
8172 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8173
8174 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8175
8176 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8177
8178 * configure: Re-generate.
8179 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8180
8181 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8182
8183 * configure: Re-generate.
8184 * warning.m4: Pass -Werror to compiler when checking for
8185 supported warning flags.
8186
8187 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8188
8189 * Makefile.in (COMPILE.pre): Add "-x c++".
8190
8191 2017-06-16 Alan Hayward <alan.hayward@arm.com>
8192 Pedro Alves <palves@redhat.com>
8193 Yao Qi <yao.qi@linaro.org>
8194
8195 * defs.h (RequireLongest): New.
8196 (extract_integer): Declare function template.
8197 (extract_signed_integer): Remove the declaration, but define it
8198 static inline.
8199 (extract_unsigned_integer): Likewise.
8200 (store_integer): Declare function template.
8201 (store_signed_integer): Remove the declaration, but define it
8202 static inline.
8203 (store_unsigned_integer): Likewise.
8204 * findvar.c (extract_integer): New function template.
8205 (extract_signed_integer): Remove.
8206 (extract_unsigned_integer): Remove.
8207 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8208 instantiations.
8209 (store_integer): New function template.
8210 (store_signed_integer): Remove.
8211 (store_unsigned_integer): Remove.
8212 (store_integer): Explicit instantiations.
8213 * regcache.c (regcache_raw_read_signed): Update.
8214 (regcache::raw_read): New function.
8215 (regcache::raw_read_signed): Remove.
8216 (regcache::raw_read_unsigned): Remove.
8217 (regcache_raw_read_unsigned): Update.
8218 (regcache_raw_write_unsigned): Update.
8219 (regcache::raw_write_signed): Remove.
8220 (regcache::raw_write): New function.
8221 (regcache_cooked_read_signed): Update.
8222 (regcache::raw_write_unsigned): Remove.
8223 (regcache::cooked_read_signed): Remove.
8224 (regcache_cooked_read_unsigned): Update.
8225 (regcache::cooked_read_unsigned): Remove.
8226 (regcache_cooked_write_signed): Update.
8227 (regcache_cooked_write_unsigned): Update.
8228 * regcache.h (regcache) <raw_read_signed>: Remove.
8229 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8230 <raw_read, raw_write>: New.
8231 <cooked_read_signed, cooked_write_signed>: Remove.
8232 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8233 <cooked_read, cooked_write>: New.
8234 * sh64-tdep.c (sh64_pseudo_register_read): Update.
8235 (sh64_pseudo_register_write): Update.
8236
8237 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
8238
8239 * arc-tdep.c (arc_disassembler_options): New variable.
8240 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8241 of default_print_insn.
8242 (arc_delayed_print_insn): Set info->section when needed,
8243 use default_print_insn to retrieve a disassembler.
8244
8245 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
8246
8247 PR gdb/21574
8248 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8249 to mention $SHELL and startup-with-shell.
8250
8251 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
8252
8253 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8254
8255 2017-06-14 Yao Qi <yao.qi@linaro.org>
8256
8257 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8258 default_print_insn instead of print_insn_aarch64.
8259 * arm-tdep.c (gdb_print_insn_arm): Call
8260 default_print_insn instead of print_insn_big_arm
8261 and print_insn_little_arm.
8262 * i386-tdep.c (i386_print_insn): Call default_print_insn
8263 instead of print_insn_i386.
8264 * ia64-tdep.c (ia64_print_insn): Call
8265 default_print_insn instead of print_insn_ia64.
8266 * mips-tdep.c (gdb_print_insn_mips): Call
8267 default_print_insn instead of print_insn_big_mips
8268 and print_insn_little_mips.
8269 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8270 instead of print_insn_spu.
8271
8272 2017-06-14 Pedro Alves <palves@redhat.com>
8273
8274 * ada-lang.c: Include "common/byte-vector.h".
8275 (ada_value_primitive_packed_val): Use gdb::byte_vector.
8276 * charset.c (wchar_iterator::iterate): Resize the vector instead
8277 of reserving it.
8278 * common/byte-vector.h: Include "common/def-vector.h".
8279 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8280 * cli/cli-dump.c: Include "common/byte-vector.h".
8281 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8282 * common/byte-vector.h: New file.
8283 * common/def-vector.h: New file.
8284 * common/default-init-alloc.h: New file.
8285 * dwarf2loc.c: Include "common/byte-vector.h".
8286 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8287 instead of reserving it.
8288 * dwarf2read.c: Include "common/byte-vector.h".
8289 (data_buf::m_vec): Now a gdb::byte_vector.
8290 * gdb_regex.c: Include "common/def-vector.h".
8291 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8292 * mi/mi-main.c: Include "common/byte-vector.h".
8293 (mi_cmd_data_read_memory): Use gdb::byte_vector.
8294 * printcmd.c: Include "common/byte-vector.h".
8295 (print_scalar_formatted): Use gdb::byte_vector.
8296 * valprint.c: Include "common/byte-vector.h".
8297 (maybe_negate_by_bytes, print_decimal_chars): Use
8298 gdb::byte_vector.
8299
8300 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8301
8302 * darwin-nat.c: Include "nat/fork-inferior.h".
8303
8304 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8305
8306 * configure.nat: Factor out Darwin bits that are not
8307 architecture-specific. Add fork-inferior.o.
8308
8309 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8310
8311 * configure.nat: Factor out AIX bits that are not
8312 architecture-specific. Add fork-inferior.o.
8313
8314 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8315
8316 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
8317 (read_pieced_value, write_pieced_value): ...here. Reduce to
8318 wrappers that just call rw_pieced_value.
8319
8320 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8321
8322 * dwarf2loc.c (write_pieced_value): When writing the data for a
8323 memory piece, use write_memory_with_notification instead of
8324 write_memory.
8325
8326 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8327
8328 * valops.c (read_value_memory): Change embedded_offset to
8329 represent a bit offset instead of a byte offset.
8330 * value.h (read_value_memory): Adjust comment.
8331
8332 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8333
8334 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8335 dest_offset_bits and source_offset_bits.
8336 (write_pieced_value): Likewise.
8337
8338 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8339
8340 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8341 given by DW_OP_bit_piece.
8342 (write_pieced_value): Likewise.
8343
8344 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8345
8346 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8347 some other preparations to the places where sufficient information
8348 is available.
8349 (write_pieced_value): Likewise.
8350
8351 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8352
8353 * dwarf2loc.c (bits_to_bytes): New function.
8354 (read_pieced_value): Fix offset calculations for register pieces
8355 on big-endian targets.
8356 (write_pieced_value): Likewise.
8357
8358 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8359
8360 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8361 (write_pieced_value): Likewise.
8362
8363 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8364
8365 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8366 transfer the source value's least significant bits, instead of its
8367 lowest-addressed ones. Rename type_len to max_offset.
8368 (read_pieced_value): Mirror above changes to write_pieced_value as
8369 applicable.
8370
8371 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8372
8373 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8374 truncate full bytes from dest_offset_bits before using it as an
8375 offset into the buffer.
8376
8377 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8378
8379 * dwarf2loc.c (write_pieced_value): Include transfer size in
8380 byte-wise check.
8381
8382 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8383
8384 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8385 calculation of this_size.
8386
8387 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8388
8389 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8390 when targeting a bit-field.
8391 (write_pieced_value): Likewise.
8392
8393 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8394
8395 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8396 (allocate_piece_closure): Drop addr_size parameter.
8397 (dwarf2_evaluate_loc_desc_full): Adjust call to
8398 allocate_piece_closure.
8399
8400 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8401
8402 PR gdb/21226
8403 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8404 the LSB end, independent of endianness.
8405
8406 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8407
8408 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8409 size capping.
8410
8411 2017-06-13 Yao Qi <yao.qi@linaro.org>
8412
8413 * mips-linux-nat.c: Move include features/mips*-linux.c to
8414 mips-linux-tdep.c.
8415 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8416 to mips-linux-tdep.c.
8417 * mips-linux-tdep.c: Include features/mips*-linux.c
8418 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8419 functions.
8420 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8421 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8422 (tdesc_mips64_dsp_linux): Declare.
8423
8424 2017-06-12 Tom Tromey <tom@tromey.com>
8425
8426 * valprint.h (val_print_type_code_int): Remove.
8427 * valprint.c (generic_val_print_int): Always call
8428 val_print_scalar_formatted.
8429 (val_print_type_code_int): Remove.
8430 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8431 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8432 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8433 * ada-valprint.c (ada_val_print_num): Use
8434 val_print_scalar_formatted.
8435
8436 2017-06-12 Tom Tromey <tom@tromey.com>
8437
8438 * printcmd.c (print_scalar_formatted): Unify the two switches.
8439 Don't convert scalars to LONGEST.
8440
8441 2017-06-12 Tom Tromey <tom@tromey.com>
8442
8443 PR exp/16225:
8444 * valprint.h (print_decimal_chars): Update.
8445 * valprint.c (maybe_negate_by_bytes): New function.
8446 (print_decimal_chars): Add "is_signed" argument.
8447 * printcmd.c (print_scalar_formatted): Update.
8448
8449 2017-06-12 Tom Tromey <tom@tromey.com>
8450
8451 PR exp/16225:
8452 * valprint.h (print_binary_chars, print_hex_chars): Update.
8453 * valprint.c (val_print_type_code_int): Update.
8454 (print_binary_chars): Add "zero_pad" argument.
8455 (emit_octal_digit): New function.
8456 (print_octal_chars): Don't zero-pad.
8457 (print_decimal_chars): Likewise.
8458 (print_hex_chars): Add "zero_pad" argument.
8459 * sh64-tdep.c (sh64_do_fp_register): Update.
8460 * regcache.c (regcache::dump): Update.
8461 * printcmd.c (print_scalar_formatted): Update.
8462 * infcmd.c (default_print_one_register_info): Update.
8463
8464 2017-06-12 Pedro Alves <palves@redhat.com>
8465 Alan Hayward <alan.hayward@arm.com>
8466
8467 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8468 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8469 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8470 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8471 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8472
8473 2017-06-12 Pedro Alves <palves@redhat.com>
8474
8475 * dwarf2read.c (mapped_symtab::data): Now a vector of
8476 symtab_index_entry instead of vector of
8477 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8478 whether an element's name is NULL instead of checking whether the
8479 element itself is NULL.
8480 (find_slot): Change return type. Adjust.
8481 (hash_expand, , add_index_entry, uniquify_cu_indices)
8482 (write_hash_table): Adjust.
8483
8484 2017-06-12 Pedro Alves <palves@redhat.com>
8485
8486 * dwarf2read.c (recursively_count_psymbols): New function.
8487 (write_psymtabs_to_index): Call it to compute number of psyms and
8488 pass estimate size of psyms_seen to unordered_set's ctor.
8489
8490 2017-06-12 Pedro Alves <palves@redhat.com>
8491
8492 * dwarf2read.c (write_hash_table): Check if key already exists
8493 before emplacing.
8494
8495 2017-06-12 Pedro Alves <palves@redhat.com>
8496
8497 * dwarf2read.c (data_buf::append_space): Rename to...
8498 (data_buf::grow): ... this, and make private. Adjust all callers.
8499 (data_buf::append_uint): New method.
8500 (add_address_entry, write_one_signatured_type)
8501 (write_psymtabs_to_index): Use it.
8502
8503 2017-06-12 Pedro Alves <palves@redhat.com>
8504
8505 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8506 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8507 (data_buf::file_write): Call ::fwrite directly.
8508
8509 2017-06-12 Pedro Alves <palves@redhat.com>
8510
8511 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8512 std::vector::erase.
8513
8514 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8515
8516 Code cleanup: C++ify .gdb_index producer.
8517 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8518 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8519 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8520 (create_strtab, add_string): Remove.
8521 (file_write, data_buf): New.
8522 (struct symtab_index_entry): Use std::vector for cu_indices.
8523 (struct mapped_symtab): Use std::vector for data.
8524 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8525 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8526 Remove.
8527 (find_slot): Change return type. Update it to the new data structures.
8528 (hash_expand, add_index_entry): Update it to the new data structures.
8529 (offset_type_compare): Remove.
8530 (uniquify_cu_indices): Update it to the new data structures.
8531 (c_str_view, c_str_view_hasher, vector_hasher): New.
8532 (add_indices_to_cpool): Remove.
8533 (write_hash_table): Update it to the new data structures.
8534 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8535 (eq_psymtab_cu_index): Remove.
8536 (psym_index_map): New typedef.
8537 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8538 reference and std::unordered_map for cu_index_htab.
8539 (add_address_entry, add_address_entry_worker, write_address_map)
8540 (write_psymbols): Update it to the new data structures.
8541 (write_obstack): Remove.
8542 (struct signatured_type_index_data): Change types_list to a data_buf
8543 reference and psyms_seen to a std::unordered_set reference.
8544 (write_one_signatured_type, recursively_write_psymbols)
8545 (write_psymtabs_to_index): Update it to the new data structures.
8546
8547 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8548
8549 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8550 separate-debug-file commands.
8551 * symfile.h (separate_debug_file_debug): New global.
8552 * symfile.c (separate_debug_file_debug): New global.
8553 (separate_debug_file_exists, find_separate_debug_file): Add
8554 debug output.
8555 (_initialize_symfile): Add "set debug separate-debug-file"
8556 command.
8557 * build-id.c (build_id_to_debug_bfd,
8558 find_separate_debug_file_by_buildid): Add debug output.
8559
8560 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8561
8562 * gdbarch.sh (displaced_step_free_closure): Remove.
8563 * gdbarch.h, gdbarch.c: Re-generate.
8564 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8565 displaced_step_free_closure.
8566 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8567 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8568 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8569 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8570 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8571 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8572 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8573 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8574 * infrun.c (displaced_step_clear): Call xfree instead of
8575 gdbarch_displaced_step_free_closure.
8576
8577 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8578
8579 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8580 NULL".
8581
8582 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8583
8584 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8585 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8586 (mn10300_push_dummy_call): Likewise.
8587
8588 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8589
8590 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8591
8592 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8593
8594 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8595
8596 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8597
8598 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8599 able to start inferiors using a shell.
8600 (New remote packets): Announce new packet "QStartupWithShell".
8601 * remote.c: Add PACKET_QStartupWithShell.
8602 (extended_remote_create_inferior): Handle new
8603 PACKET_QStartupWithShell.
8604 (remote_protocol_features) <QStartupWithShell>: New entry for
8605 PACKET_QStartupWithShell.
8606 (_initialize_remote): Call "add_packet_config_cmd" for
8607 QStartupShell.
8608
8609 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8610 Pedro Alves <palves@redhat.com>
8611
8612 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8613 and "nat/fork-inferior.h".
8614 * common/common-inferior.h: New file, with contents from
8615 "gdb/inferior.h".
8616 * commom/common-utils.c: Include "common-utils.h".
8617 (stringify_argv): New function.
8618 * common/common-utils.h (stringify_argv): New prototype.
8619 * configure.nat: Add "fork-inferior.o" as a dependency for
8620 "*linux*", "fbsd*" and "nbsd*" hosts.
8621 * corefile.c (get_exec_file): Update comment.
8622 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8623 instead of "startup_inferior".
8624 (darwin_create_inferior): Call "add_thread_silent" after
8625 "fork_inferior".
8626 * fork-child.c: Cleanup unnecessary includes.
8627 (SHELL_FILE): Move to "common/common-fork-child.c".
8628 (environ): Likewise.
8629 (exec_wrapper): Initialize.
8630 (get_exec_wrapper): New function.
8631 (breakup_args): Move to "common/common-fork-child.c"; rename to
8632 "breakup_args_for_exec".
8633 (escape_bang_in_quoted_argument): Move to
8634 "common/common-fork-child.c".
8635 (saved_ui): New variable.
8636 (prefork_hook): New function.
8637 (postfork_hook): Likewise.
8638 (postfork_child_hook): Likewise.
8639 (gdb_startup_inferior): Likewise.
8640 (fork_inferior): Move to "common/common-fork-child.c". Update
8641 function to support gdbserver.
8642 (startup_inferior): Likewise.
8643 * gdbcore.h (get_exec_file): Remove declaration.
8644 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8645 instead of "startup_inferior". Call "add_thread_silent" after
8646 "fork_inferior".
8647 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8648 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8649 instead of "startup_inferior". Call "add_thread_silent" after
8650 "fork_inferior".
8651 * inferior.h: Include "common-inferior.h".
8652 (trace_start_error): Move to "common/common-utils.h".
8653 (trace_start_error_with_name): Likewise.
8654 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8655 (startup_inferior): Likewise.
8656 (gdb_startup_inferior): New prototype.
8657 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8658 * nat/fork-inferior.h: New file.
8659 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8660 instead of "startup_inferior". Call "add_thread_silent" after
8661 "fork_inferior".
8662 * target.h (target_terminal_init): Move prototype to
8663 "target/target.h".
8664 (target_terminal_inferior): Likewise.
8665 (target_terminal_ours): Likewise.
8666 * target/target.h (target_terminal_init): New prototype, moved
8667 from "target.h".
8668 (target_terminal_inferior): Likewise.
8669 (target_terminal_ours): Likewise.
8670 * utils.c (gdb_flush_out_err): New function.
8671
8672 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8673
8674 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8675 * common/common-gdbthread.h: New file, with parts from
8676 "gdb/gdbthread.h".
8677 * gdbthread.h: Include "common-gdbthread.h".
8678 (switch_to_thread): Moved to "common/common-gdbthread.h".
8679
8680 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8681
8682 * Makefile.in (SFILES): Add "common/job-control.c".
8683 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8684 (COMMON_OBS): Add "job-control.o".
8685 * common/job-control.c: New file, with contents from
8686 "gdb/inflow.c".
8687 * common/job-control.h: New file, with contents from "terminal.h".
8688 * fork-child.c: Include "job-control.h".
8689 * inflow.c: Include "job-control.h".
8690 (gdb_setpgid): Move to "common/common-inflow.c".
8691 (_initialize_inflow): Move setting of "job_control" to
8692 "handle_job_control".
8693 * terminal.h (job_control): Moved to "common/common-terminal.h".
8694 (gdb_setpgid): Likewise.
8695 * top.c: Include "job_control.h".
8696 * utils.c: Likewise.
8697 (job_control): Moved to "job-control.c".
8698
8699 2017-06-07 Pedro Alves <palves@redhat.com>
8700
8701 * Makefile.in (SFILES): Add gdb_regex.c.
8702 (COMMON_OBS): Add gdb_regex.o.
8703 * ada-lang.c (ada_add_standard_exceptions)
8704 (ada_add_exceptions_from_frame, name_matches_regex)
8705 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8706 parameter type to compiled_regex. Adjust.
8707 (ada_exceptions_list): Use compiled_regex.
8708 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8709 std::unique_ptr<compiled_regex>.
8710 (exception_catchpoint::~exception_catchpoint): Remove regfree
8711 call.
8712 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8713 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8714 * breakpoint.c (solib_catchpoint::compiled): Now a
8715 std::unique_ptr<compiled_regex>.
8716 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8717 (check_status_catch_solib): Adjust to use compiled_regex.
8718 (add_solib_catchpoint): Adjust to use compiled_regex.
8719 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8720 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8721 compiled_regex reference. Adjust to use it.
8722 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8723 declaration. Include "gdb_regex.h".
8724 (apropos_cmd): Change regex parameter to compiled_regex reference.
8725 * gdb_regex.c: New file.
8726 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8727 declarations.
8728 (class compiled_regex): New.
8729 * linux-tdep.c: Include "common/gdb_optional.h".
8730 (struct mapping_regexes): New, factored out from
8731 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8732 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8733 gdb::optional and remove cleanups. Adjust to compiled_regex.
8734 * probe.c: Include "common/gdb_optional.h".
8735 (collect_probes): Use compiled_regex and gdb::optional and remove
8736 cleanups.
8737 * skip.c: Include "common/gdb_optional.h".
8738 (skiplist_entry::compiled_function_regexp): Now a
8739 gdb::optional<compiled_regex>.
8740 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8741 (free_skiplist_entry): Remove regfree call.
8742 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8743 compiled_regex and gdb::optional.
8744 * symtab.c: Include "common/gdb_optional.h".
8745 (search_symbols): Use compiled_regex and gdb::optional.
8746 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8747 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8748 to gdb_regex.c.
8749
8750 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8751
8752 * regcache.c (regcache::save): Avoid buffer use.
8753 (regcache::dump): Likewise.
8754
8755 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8756
8757 * sh-tdep.c (sh_pseudo_register_read): Remove
8758 MAX_REGISTER_SIZE.
8759 (sh_pseudo_register_write): Likewise.
8760 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8761 (sh64_pseudo_register_write): Likewise
8762
8763 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8764
8765 * aarch64-tdep.c (aarch64_store_return_value): Use
8766 V_REGISTER_SIZE.
8767 (aarch64_pseudo_read_value): Likewise.
8768 (aarch64_pseudo_write): Likewise.
8769
8770 2017-06-06 Yao Qi <yao.qi@linaro.org>
8771
8772 * regformats/regdef.h (set_register_cache): Remove the
8773 declaration.
8774
8775 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8776
8777 * frame.c (frame_unwind_register_signed): Use
8778 frame_unwind_register_value.
8779
8780 2017-06-06 Pedro Alves <palves@redhat.com>
8781
8782 PR breakpoints/21553
8783 * breakpoint.c (create_breakpoints_sal_default)
8784 (init_breakpoint_sal, create_breakpoint_sal): Use
8785 gdb::unique_xmalloc_ptr for string parameters.
8786 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8787 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8788 (base_breakpoint_create_breakpoints_sal)
8789 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8790 (strace_marker_create_breakpoints_sal)
8791 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8792 string parameters.
8793 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8794 gdb::unique_xmalloc_ptr for string parameters.
8795 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8796 parameters.
8797
8798 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8799
8800 * alpha-tdep.c (alpha_register_to_value): Use
8801 get_frame_register_value.
8802 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8803
8804 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8805
8806 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8807 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8808 (ia64_value_to_register): Likewise.
8809 (ia64_extract_return_value): Likewise.
8810 (ia64_store_return_value): Likewise.
8811 (ia64_push_dummy_call): Likewise.
8812
8813 2017-06-04 Joel Brobecker <brobecker@adacore.com>
8814
8815 GDB 8.0 released.
8816
8817 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8818
8819 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8820
8821 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8822
8823 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8824 parameter.
8825 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8826
8827 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8828
8829 * event-loop.c (poll_timers): Unallocate timer using delete
8830 instead of xfree.
8831
8832 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8833
8834 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8835 (struct breakpoint) <~breakpoint>: New.
8836 (struct watchpoint): Inherit from breakpoint.
8837 <~watchpoint>: New.
8838 <base>: Remove.
8839 (struct tracepoint): Inherit from breakpoint.
8840 <base>: Remove.
8841 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8842 (struct longjmp_breakpoint): Inherit from breakpoint.
8843 <~longjmp_breakpoint>: New.
8844 <base>: Remove.
8845 (new_breakpoint_from_type): Remove casts.
8846 (watchpoint_in_thread_scope): Remove reference to base field.
8847 (watchpoint_del_at_next_stop): Likewise.
8848 (update_watchpoint): Likewise.
8849 (watchpoint_check): Likewise.
8850 (bpstat_check_watchpoint): Likewise.
8851 (set_longjmp_breakpoint): Likewise.
8852 (struct fork_catchpoint): Inherit from breakpoint.
8853 <base>: Remove.
8854 (struct solib_catchpoint): Inherit from breakpoint.
8855 <~solib_catchpoint>: New.
8856 <base>: Remove.
8857 (dtor_catch_solib): Change to ...
8858 (solib_catchpoint::~solib_catchpoint): ... this.
8859 (breakpoint_hit_catch_solib): Remove reference to base field.
8860 (add_solib_catchpoint): Likewise.
8861 (create_fork_vfork_event_catchpoint): Likewise.
8862 (struct exec_catchpoint): Inherit from breakpoint.
8863 <~exec_catchpoint>: New.
8864 <base>: Remove.
8865 (dtor_catch_exec): Change to ...
8866 (exec_catchpoint::~exec_catchpoint): ... this.
8867 (dtor_watchpoint): Change to ...
8868 (watchpoint::~watchpoint): ... this.
8869 (watch_command_1): Remove reference to base field.
8870 (catch_exec_command_1): Likewise.
8871 (base_breakpoint_dtor): Change to ...
8872 (breakpoint::~breakpoint): ... this.
8873 (base_breakpoint_ops): Remove dtor field value.
8874 (longjmp_bkpt_dtor): Change to ...
8875 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8876 (strace_marker_create_breakpoints_sal): Remove reference to base
8877 field.
8878 (delete_breakpoint): Don't manually call breakpoint destructor.
8879 (create_tracepoint_from_upload): Remove reference to base field.
8880 (trace_pass_set_count): Likewise.
8881 (initialize_breakpoint_ops): Don't initialize
8882 momentary_breakpoint_ops, don't set dtors.
8883 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8884 <~ada_catchpoint>: New.
8885 <base>: Remove.
8886 (create_excep_cond_exprs): Remove reference to base field.
8887 (dtor_exception): Change to ...
8888 (ada_catchpoint::~ada_catchpoint): ... this.
8889 (dtor_catch_exception): Remove.
8890 (dtor_catch_exception_unhandled): Remove.
8891 (dtor_catch_assert): Remove.
8892 (create_ada_exception_catchpoint): Remove reference to base
8893 field.
8894 (initialize_ada_catchpoint_ops): Don't set dtors.
8895 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8896 breakpoint.
8897 <~signal_catchpoint>: New.
8898 <base>: Remove.
8899 (signal_catchpoint_dtor): Change to ...
8900 (signal_catchpoint::~signal_catchpoint): ... this.
8901 (create_signal_catchpoint): Remove reference to base field.
8902 (initialize_signal_catchpoint_ops): Don't set dtor.
8903 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8904 from breakpoint.
8905 <~syscall_catchpoint>: New.
8906 <base>: Remove.
8907 (dtor_catch_syscall): Change to ...
8908 (syscall_catchpoint::~syscall_catchpoint): ... this.
8909 (create_syscall_event_catchpoint): Remove reference to base
8910 field.
8911 (initialize_syscall_catchpoint_ops): Don't set dtor.
8912 * break-catch-throw.c (struct exception_catchpoint): Inherit
8913 from breakpoint.
8914 <~exception_catchpoint>: New.
8915 <base>: Remove.
8916 (dtor_exception_catchpoint): Change to ...
8917 (exception_catchpoint::~exception_catchpoint): ... this.
8918 (handle_gnu_v3_exceptions): Remove reference to base field.
8919 (initialize_throw_catchpoint_ops): Don't set dtor.
8920 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8921 field.
8922 * remote.c (remote_get_tracepoint_status): Likewise.
8923 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8924 * tracefile.c (tracefile_fetch_registers): Likewise.
8925 * tracepoint.c (actions_command): Likewise.
8926 (validate_actionline): Likewise.
8927 (tfind_1): Likewise.
8928 (get_traceframe_location): Likewise.
8929 (find_matching_tracepoint_location): Likewise.
8930 (parse_tracepoint_status): Likewise.
8931 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8932
8933 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8934
8935 * breakpoint.c (struct longjmp_breakpoint): New struct.
8936 (is_tracepoint_type): Change return type to bool.
8937 (is_longjmp_type): New function.
8938 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8939 (set_raw_breakpoint_without_location): Use
8940 new_breakpoint_from_type.
8941 (set_raw_breakpoint): Likewise.
8942
8943 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8944
8945 * breakpoint.c (new_breakpoint_from_type): New function.
8946 (create_breakpoint_sal): Use new_breakpoint_from_type and
8947 unique_ptr.
8948 (create_breakpoint): Likewise.
8949
8950 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8951
8952 * memattr.c (mem_info_command): Rename to ...
8953 (info_mem_command): ... this.
8954 (mem_enable_command): Rename to ...
8955 (enable_mem_command): ... this.
8956 (mem_disable_command): Rename to ...
8957 (disable_mem_command): ... this.
8958 (mem_delete_command): Rename to ...
8959 (delete_mem_command): ... this.
8960 (_initialize_mem): Adjust function names.
8961
8962 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8963
8964 * btrace.c (handle_pt_insn_events): New.
8965 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8966 STATUS. Split into this and ...
8967 (handle_pt_insn_event_flags): ... this.
8968
8969 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8970
8971 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8972 and struct pt_insn.resynced.
8973 * configure: Regenerated.
8974 * config.in: Regenerated.
8975
8976 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8977
8978 * btrace.c (ftrace_find_call_by_number): New function.
8979 (ftrace_new_function): Store objects, not pointers.
8980 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8981 ftrace_new_gap, ftrace_update_function,
8982 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8983 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8984 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8985 btrace_ends_with_single_insn, btrace_call_get): Account for
8986 btrace_thread_info::functions now storing objects.
8987 * btrace.h (struct btrace_thread_info): Add constructor.
8988 (struct btrace_thread_info) <functions>: Make std::vector.
8989 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8990 Initialize with default values.
8991 * record-btrace.c (record_btrace_frame_sniffer): Account for
8992 btrace_thread_info::functions now storing objects.
8993
8994 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8995
8996 * btrace.c: Remove typedef bfun_s.
8997 (ftrace_new_gap): Directly add gaps to the list of gaps.
8998 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8999 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9000 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9001 instead of gdb VEC.
9002
9003 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9004
9005 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9006 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9007 with btrace_thread_info::next_segment and
9008 btrace_thread_info::prev_segment.
9009 * btrace.h: Remove struct btrace_func_link.
9010 (struct btrace_function): Replace pair of function segment pointers
9011 with pair of indices.
9012 * python/py-record-btrace.c (btpy_call_prev_sibling,
9013 btpy_call_next_sibling): Replace references to
9014 btrace_thread_info::segment with btrace_thread_info::next_segment and
9015 btrace_thread_info::prev_segment.
9016 * record-btrace.c (record_btrace_frame_this_id): Use
9017 btrace_find_call_by_number.
9018
9019 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9020
9021 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9022 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9023 btrace_insn_next, btrace_insn_prev): Remove references to
9024 btrace_thread_info::flow.
9025 * btrace.h (struct btrace_function): Remove FLOW.
9026
9027 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9028
9029 * btrace.c (ftrace_find_call_by_number): New function.
9030 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9031 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9032 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9033 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9034 index.
9035 * btrace.h (struct btrace_function): Turn UP into an index.
9036 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9037 as an index.
9038 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9039 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9040 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9041
9042 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9043
9044 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9045 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9046 ftrace_update_function, ftrace_compute_global_level_offset,
9047 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9048 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9049 btrace_insn_end, btrace_is_empty): Remove references to
9050 btrace_thread_info::begin and btrace_thread_info::end.
9051 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9052 (struct btrace_thread_info) <functions>: Adjust comment.
9053 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9054 btrace_thread_info::begin.
9055
9056 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9057
9058 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9059 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9060 ftrace_update_function): Remove arguments that implicitly were always
9061 BTINFO->END.
9062 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9063 Don't pass BTINFO->END.
9064
9065 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9066
9067 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9068 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9069 btrace_find_insn_by_number): Replace function segment pointer with
9070 index.
9071 (btrace_insn_cmp): Simplify.
9072 * btrace.h: (struct btrace_insn_iterator) Rename index to
9073 insn_index. Replace function segment pointer with index into function
9074 segment vector.
9075 * record-btrace.c (record_btrace_call_history): Replace function
9076 segment pointer use with index.
9077 (record_btrace_frame_sniffer): Retrieve function call segment through
9078 vector.
9079 (record_btrace_set_replay): Remove defunc't safety check.
9080
9081 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9082
9083 * btrace.c (btrace_ends_with_single_insn): New function.
9084 (btrace_call_get, btrace_call_number, btrace_call_begin,
9085 btrace_call_end, btrace_call_next, btrace_call_prev,
9086 btrace_find_call_by_number): Use index into call segment vector
9087 instead of pointer.
9088 (btrace_call_cmp): Simplify.
9089 * btrace.h (struct btrace_call_iterator): Replace function call segment
9090 pointer with index into vector.
9091 * record-btrace.c (record_btrace_call_history): Use index instead of
9092 pointer.
9093
9094 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9095
9096 * btrace.c (btrace_insn_begin, btrace_insn_end,
9097 btrace_find_insn_by_number): Add btinfo to iterator.
9098 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9099
9100 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9101
9102 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9103 and save pointers directly.
9104 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9105 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9106 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9107 changed signature of functions.
9108 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9109 (btrace_fetch): Remove code that adds btrace_function pointers to
9110 vector of btrace_functions.
9111 (btrace_clear): Simplify freeing vector of btrace_functions.
9112
9113 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9114
9115 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9116 Replace VEC_* with std::vector functions.
9117 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9118 (struct btrace_thread_info)<functions>: Change type to std::vector.
9119
9120 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9121
9122 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9123 "Removed targets and native configurations" up. Merge duplicate
9124 "New commands" sub-sections. Add "New options" sub-sections.
9125
9126 2017-05-26 Alan Hayward <alan.hayward@arm.com>
9127
9128 * defs.h (copy_integer_to_size): New declaration.
9129 * findvar.c (copy_integer_to_size): New function.
9130 (do_cint_test): New selftest function.
9131 (copy_integer_to_size_test): Likewise.
9132 (_initialize_findvar): Likewise.
9133 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9134 (mips_fbsd_collect_reg): Use raw_collect_integer.
9135 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9136 (mips64_fill_gregset): Use raw_collect_integer
9137 (mips64_fill_fpregset): Use raw_supply_integer.
9138 * regcache.c (regcache::raw_supply_integer): New function.
9139 (regcache::raw_collect_integer): Likewise.
9140 * regcache.h: (regcache::raw_supply_integer): New declaration.
9141 (regcache::raw_collect_integer): Likewise.
9142
9143 2017-05-24 Yao Qi <yao.qi@linaro.org>
9144
9145 * Makefile.in (SFILES): Add gdbarch-selftests.c.
9146 (COMMON_OBS): Add gdbarch-selftests.o.
9147 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9148 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9149 * gdbarch-selftests.c: New file.
9150 * regcache.h (regcache) <~regcache>: Mark it virtual if
9151 GDB_SELF_TEST.
9152 <raw_write>: Likewise.
9153
9154 2017-05-24 Yao Qi <yao.qi@linaro.org>
9155
9156 * regcache.c (current_regcache): Change it to
9157 regcache::current_regcache.
9158 (regcache_observer_target_changed): Update.
9159 (regcache_thread_ptid_changed): Make it a regcache static
9160 method.
9161 (regcache_thread_ptid_changed): Update.
9162 (class regcache_access): New.
9163 (current_regcache_test): Update.
9164 (_initialize_regcache): Update.
9165 * regcache.h: Include forward_list.
9166 (regcache): Declare regcache_thread_ptid_changed and declare
9167 registers_changed_ptid as friend.
9168
9169 2017-05-24 Yao Qi <yao.qi@linaro.org>
9170
9171 * i387-tdep.c (i387_register_to_value): Use register_size
9172 instead of TYPE_LENGTH.
9173 * m68k-tdep.c (m68k_register_to_value): Likewise.
9174
9175 2017-05-24 Yao Qi <yao.qi@linaro.org>
9176
9177 * i387-tdep.c (i387_convert_register_p): Return false if type
9178 code isn't TYPE_CODE_FLT.
9179
9180 2017-05-24 Yao Qi <yao.qi@linaro.org>
9181
9182 * alpha-tdep.c (alpha_convert_register_p): Return true if type
9183 length is 4.
9184 (alpha_register_to_value): Remove type length check.
9185 (alpha_value_to_register): Likewise.
9186
9187 2017-05-24 Yao Qi <yao.qi@linaro.org>
9188
9189 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9190 TYPE_CODE_FLT.
9191
9192 2017-05-24 Yao Qi <yao.qi@linaro.org>
9193
9194 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9195 TYPE_CODE_FLT or not.
9196
9197 2017-05-24 Yao Qi <yao.qi@linaro.org>
9198
9199 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9200 * avr-tdep.c (avr_gdbarch_init): Likewise.
9201 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9202 * cris-tdep.c (cris_gdbarch_init): Likewise.
9203 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9204 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9205 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9206 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9207 * mep-tdep.c (mep_gdbarch_init): Likewise.
9208 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9209 * mips-tdep.c (mips_gdbarch_init): Likewise.
9210 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9211 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9212 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9213 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9214 * v850-tdep.c (v850_gdbarch_init): Likewise.
9215
9216 2017-05-24 Yao Qi <yao.qi@linaro.org>
9217
9218 * selftest-arch.c (tests_with_arch): Call registers_changed
9219 and reinit_frame_cache.
9220 * selftest.c (run_self_tests): Likewise.
9221
9222 2017-05-24 Yao Qi <yao.qi@linaro.org>
9223
9224 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9225 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9226
9227 2017-05-24 Yao Qi <yao.qi@linaro.org>
9228
9229 * rl78-tdep.c (rl78_gdbarch_init): Don't call
9230 set_gdbarch_print_insn.
9231
9232 2017-05-24 Yao Qi <yao.qi@linaro.org>
9233
9234 * h8300-tdep.c (h8300_gdbarch_init): Don't call
9235 set_gdbarch_print_insn.
9236
9237 2017-05-24 Yao Qi <yao.qi@linaro.org>
9238
9239 * alpha-tdep.c (alpha_gdbarch_init): Don't call
9240 set_gdbarch_print_insn.
9241 * arc-tdep.c (arc_gdbarch_init): Likewise.
9242 * arch-utils.c: include dis-asm.h.
9243 (default_print_insn): New function.
9244 * arch-utils.h (default_print_insn): Declare.
9245 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9246 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9247 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9248 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9249 * frv-tdep.c (frv_gdbarch_init): Likewise.
9250 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9251 * gdbarch.sh (print_insn): Use default_print_insn.
9252 * gdbarch.c: Regenerated.
9253 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9254 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9255 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9256 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9257 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9258 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9259 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9260 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9261 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9262 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9263 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9264 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9265 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9266 * mt-tdep.c (mt_gdbarch_init): Likewise.
9267 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9268 * nios2-tdep.c (nios2_print_insn): Remove.
9269 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9270 * rx-tdep.c (rx_gdbarch_init): Likewise.
9271 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9272 * score-tdep.c (score_print_insn): Remove.
9273 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9274 * sh-tdep.c (sh_gdbarch_init): Likewise.
9275 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9276 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9277 * tic6x-tdep.c (tic6x_print_insn): Remove.
9278 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9279 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9280 * v850-tdep.c (v850_gdbarch_init): Likewise.
9281 * vax-tdep.c (vax_gdbarch_init): Likewise.
9282 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9283 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9284
9285 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9286
9287 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9288 (MIPS_FP0_REGNUM): Remove.
9289 (MIPS_FSR_REGNUM): Remove.
9290 (mips_fbsd_supply_fpregs): Use mips_regnum.
9291 (mips_fbsd_supply_gregs): Likewise.
9292 (mips_fbsd_collect_fpregs): Likewise.
9293 (mips_fbsd_collect_gregs): Likewise.
9294
9295 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9296
9297 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9298 (getpfpregs_supplies): New function.
9299 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9300 getfpregs_supplies.
9301 (mips_fbsd_store_inferior_registers): Likewise.
9302
9303 2017-05-22 Pedro Alves <palves@redhat.com>
9304
9305 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9306 maintainer.
9307
9308 2017-05-22 Alan Hayward <alan.hayward@arm.com>
9309
9310 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9311 (store_register): Likewise.
9312 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9313 (get_decimal_float_return_value): Likewise.
9314 (do_ppc_sysv_return_value): Likewise.
9315 (ppc64_sysv_abi_push_integer): Likewise.
9316 (ppc64_sysv_abi_push_freg): Likewise.
9317 (ppc64_sysv_abi_return_value_base): Likewise.
9318 (ppc64_sysv_abi_return_value): Likewise.
9319 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9320 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9321 * rs6000-nat.c: Likewise.
9322 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9323 (rs6000_value_to_register): Likewise.
9324 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9325
9326 2017-05-21 Tom Tromey <tom@tromey.com>
9327
9328 PR rust/21466:
9329 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9330 arrays as "[T]", not "[T; ]".
9331
9332 2017-05-19 Tom Tromey <tom@tromey.com>
9333
9334 PR rust/21484:
9335 * rust-lang.c (exp_descriptor_rust): New function.
9336 (rust_language_defn): Use it.
9337 * p-lang.c (pascal_language_defn): Update.
9338 * opencl-lang.c (opencl_language_defn): Update.
9339 * objc-lang.c (objc_language_defn): Update.
9340 * m2-lang.c (m2_language_defn): Update.
9341 * language.h (struct language_defn)
9342 <la_watch_location_expression>: New member.
9343 * language.c (unknown_language_defn, auto_language_defn)
9344 (local_language_defn): Update.
9345 * go-lang.c (go_language_defn): Update.
9346 * f-lang.c (f_language_defn): Update.
9347 * d-lang.c (d_language_defn): Update.
9348 * c-lang.h (c_watch_location_expression): Declare.
9349 * c-lang.c (c_watch_location_expression): New function.
9350 (c_language_defn, cplus_language_defn, asm_language_defn)
9351 (minimal_language_defn): Use it.
9352 * breakpoint.c (watch_command_1): Call
9353 la_watch_location_expression.
9354 * ada-lang.c (ada_language_defn): Update.
9355
9356 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9357
9358 PR tui/21482
9359 * gdb_curses.h (NOMACROS): Define.
9360 (NCURSES_NOMACROS): Define.
9361
9362 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9363
9364 PR tui/21482
9365 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9366 arg to char *.
9367 * tui/tui-wingeneral.c (box_win): Likewise.
9368 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9369 (tui_show_source_line): Likewise.
9370 (tui_show_exec_info_content): Likewise.
9371
9372 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9373
9374 * sparc-tdep.c (sparc_structure_return_p)
9375 (sparc_arg_on_registers_p): New functions.
9376 (sparc32_store_arguments): Use them.
9377 * sparc64-tdep.c (sparc64_16_byte_align_p)
9378 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9379 Handle TYPE_CODE_ARRAY.
9380
9381 2017-05-17 Yao Qi <yao.qi@linaro.org>
9382
9383 * cli/cli-decode.c (add_alias_cmd): New function.
9384 * command.h (add_alias_cmd): Declare.
9385 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9386 instead call add_alias_cmd.
9387
9388 2017-05-17 Pedro Alves <palves@redhat.com>
9389
9390 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9391 (nat_makefile_frag): ... this. All references updated.
9392 * configure.ac: Likewise.
9393 * configure.nat: Likewise. Enhance comments.
9394 * configure: Regenerate.
9395
9396 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9397
9398 * procfs.c (procfs_create_inferior): Change prototype to match
9399 definition.
9400
9401 2017-05-13 Eli Zaretskii <eliz@gnu.org>
9402
9403 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9404 C++ compiler warning.
9405
9406 2017-05-12 Tom Tromey <tom@tromey.com>
9407
9408 PR rust/21483:
9409 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9410 recurse, just call value_struct_elt directly.
9411
9412 2017-05-12 Tom Tromey <tom@tromey.com>
9413
9414 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9415 OP_RUST_ARRAY>: Fix.
9416
9417 2017-05-12 Tom Tromey <tom@tromey.com>
9418
9419 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9420
9421 2017-05-09 Yao Qi <yao.qi@linaro.org>
9422
9423 * regcache.c: Include <forward_list>.
9424 (struct regcache_list): Remove.
9425 (current_regcache): Update.
9426 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9427 (regcache_thread_ptid_changed): Likewise.
9428 (registers_changed_ptid): Likewise.
9429 (current_regcache_size): Likewise.
9430
9431 2017-05-09 Yao Qi <yao.qi@linaro.org>
9432
9433 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9434 (current_regcache_size): New function.
9435 (current_regcache_test): New function.
9436 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9437
9438 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9439
9440 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9441 (print_gp_register_row): Use get_frame_register_value.
9442
9443 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9444
9445 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9446 (mips_supply_fpregset): Likewise.
9447 (mips64_supply_gregset): Likewise.
9448
9449 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9450
9451 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9452 regcache->raw_supply_zeroed.
9453
9454 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9455
9456 * configure.nat: Rearrange 'case' statements to match
9457 host before cpu.
9458
9459 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9460
9461 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9462 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9463 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9464 "@nat_extra_makefile_frag@".
9465 (Makefile): Remove dependency on "@frags@".
9466 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9467 (data-directory/Makefile): Likewise.
9468 * config/aarch64/linux.mh: Deleted; moved contents to
9469 "gdb/configure.nat".
9470 * config/alpha/alpha-linux.mh: Likewise.
9471 * config/alpha/nbsd.mh: Likewise.
9472 * config/arm/linux.mh: Likewise.
9473 * config/arm/nbsdelf.mh: Likewise.
9474 * config/i386/cygwin.mh: Likewise.
9475 * config/i386/cygwin64.mh: Likewise.
9476 * config/i386/darwin.mh: Likewise.
9477 * config/i386/fbsd.mh: Likewise.
9478 * config/i386/fbsd64.mh: Likewise.
9479 * config/i386/go32.mh: Likewise.
9480 * config/i386/i386gnu.mh: Likewise.
9481 * config/i386/i386sol2.mh: Likewise.
9482 * config/i386/linux.mh: Likewise.
9483 * config/i386/linux64.mh: Likewise.
9484 * config/i386/mingw.mh: Likewise.
9485 * config/i386/mingw64.mh: Likewise.
9486 * config/i386/nbsd64.mh: Likewise.
9487 * config/i386/nbsdelf.mh: Likewise.
9488 * config/i386/nto.mh: Likewise.
9489 * config/i386/obsd.mh: Likewise.
9490 * config/i386/obsd64.mh: Likewise.
9491 * config/i386/sol2-64.mh: Likewise.
9492 * config/ia64/linux.mh: Likewise.
9493 * config/m32r/linux.mh: Likewise.
9494 * config/m68k/linux.mh: Likewise.
9495 * config/m68k/nbsdelf.mh: Likewise.
9496 * config/m68k/obsd.mh: Likewise.
9497 * config/m88k/obsd.mh: Likewise.
9498 * config/mips/fbsd.mh: Likewise.
9499 * config/mips/linux.mh: Likewise.
9500 * config/mips/nbsd.mh: Likewise.
9501 * config/mips/obsd64.mh: Likewise.
9502 * config/pa/linux.mh: Likewise.
9503 * config/pa/nbsd.mh: Likewise.
9504 * config/pa/obsd.mh: Likewise.
9505 * config/powerpc/aix.mh: Likewise.
9506 * config/powerpc/fbsd.mh: Likewise.
9507 * config/powerpc/linux.mh: Likewise.
9508 * config/powerpc/nbsd.mh: Likewise.
9509 * config/powerpc/obsd.mh: Likewise.
9510 * config/powerpc/ppc64-linux.mh: Likewise.
9511 * config/powerpc/spu-linux.mh: Likewise.
9512 * config/s390/linux.mh: Likewise.
9513 * config/sh/nbsd.mh: Likewise.
9514 * config/sparc/fbsd.mh: Likewise.
9515 * config/sparc/linux.mh: Likewise.
9516 * config/sparc/linux64.mh: Likewise.
9517 * config/sparc/nbsd64.mh: Likewise.
9518 * config/sparc/nbsdelf.mh: Likewise.
9519 * config/sparc/obsd64.mh: Likewise.
9520 * config/sparc/sol2.mh: Likewise.
9521 * config/tilegx/linux.mh: Likewise.
9522 * config/vax/nbsdelf.mh: Likewise.
9523 * config/vax/obsd.mh: Likewise.
9524 * config/xtensa/linux.mh: Likewise.
9525 * config/i386/i386gnu.mn: New file, with excerpts from
9526 "config/i386/i386gnu.mh".
9527 * configure: Regenerate.
9528 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9529 *.mh files under "gdb/config".
9530 * configure.nat: New file, with contents from the
9531 "gdb/config/*/*.mh" files.
9532
9533 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9534
9535 * btrace.c (btrace_clear): Free insn vector.
9536
9537 2017-05-05 Pedro Alves <palves@redhat.com>
9538
9539 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9540 * configure: Regenerate.
9541
9542 2017-05-04 Pedro Alves <palves@redhat.com>
9543
9544 * Makefile.in (SFILES): Add progspace-and-thread.c.
9545 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9546 (COMMON_OBS): Add progspace-and-thread.o.
9547 * breakpoint.c: Include "progspace-and-thread.h".
9548 (update_inserted_breakpoint_locations)
9549 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9550 Use scoped_restore_current_pspace_and_thread.
9551 (create_std_terminate_master_breakpoint): Use
9552 scoped_restore_current_program_space.
9553 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9554 (print_breakpoint_location): Use
9555 scoped_restore_current_program_space.
9556 (bp_loc_is_permanent): Use
9557 scoped_restore_current_pspace_and_thread.
9558 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9559 (download_tracepoint_locations): Use
9560 scoped_restore_current_pspace_and_thread.
9561 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9562 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9563 (enum step_over_calls_kind): Moved from inferior.h.
9564 (class scoped_restore_current_thread): New class.
9565 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9566 declaration.
9567 (scoped_restore_current_thread): New class.
9568 * infcmd.c: Include "common/gdb_optional.h".
9569 (continue_1, proceed_after_attach): Use
9570 scoped_restore_current_thread.
9571 (notice_new_inferior): Use scoped_restore_current_thread.
9572 * inferior.c: Include "progspace-and-thread.h".
9573 (restore_inferior, save_current_inferior): Delete.
9574 (add_inferior_command, clone_inferior_command): Use
9575 scoped_restore_current_pspace_and_thread.
9576 * inferior.h (scoped_restore_current_inferior): New class.
9577 * infrun.c: Include "progspace-and-thread.h" and
9578 "common/gdb_optional.h".
9579 (follow_fork_inferior): Use
9580 scoped_restore_current_pspace_and_thread.
9581 (scoped_restore_exited_inferior): New class.
9582 (handle_vfork_child_exec_or_exit): Use
9583 scoped_restore_exited_inferior,
9584 scoped_restore_current_pspace_and_thread,
9585 scoped_restore_current_thread and scoped_restore.
9586 (fetch_inferior_event): Use scoped_restore_current_thread.
9587 * linespec.c (decode_line_full, decode_line_1): Use
9588 scoped_restore_current_program_space.
9589 * mi/mi-main.c: Include "progspace-and-thread.h".
9590 (exec_continue): Use scoped_restore_current_thread.
9591 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9592 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9593 * proc-service.c (ps_pglobal_lookup): Use
9594 scoped_restore_current_program_space.
9595 * progspace-and-thread.c: New file.
9596 * progspace-and-thread.h: New file.
9597 * progspace.c (release_program_space, clone_program_space): Use
9598 scoped_restore_current_program_space.
9599 (restore_program_space, save_current_program_space)
9600 (save_current_space_and_thread): Delete.
9601 (switch_to_program_space_and_thread): Moved to
9602 progspace-and-thread.c.
9603 * progspace.h (save_current_program_space)
9604 (save_current_space_and_thread): Delete declarations.
9605 (scoped_restore_current_program_space): New class.
9606 * remote.c (remote_btrace_maybe_reopen): Use
9607 scoped_restore_current_thread.
9608 * symtab.c: Include "progspace-and-thread.h".
9609 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9610 * thread.c (print_thread_info_1): Use
9611 scoped_restore_current_thread.
9612 (struct current_thread_cleanup): Delete.
9613 (do_restore_current_thread_cleanup)
9614 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9615 (scoped_restore_current_thread::~scoped_restore_current_thread):
9616 ... this new dtor.
9617 (make_cleanup_restore_current_thread): Rename/convert to ...
9618 (scoped_restore_current_thread::scoped_restore_current_thread):
9619 ... this new ctor.
9620 (thread_apply_all_command): Use scoped_restore_current_thread.
9621 (thread_apply_command): Use scoped_restore_current_thread.
9622 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9623 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9624
9625 2017-05-04 Pedro Alves <palves@redhat.com>
9626
9627 * thread.c (make_cleanup_restore_current_thread): Move
9628 find_thread_ptid call before the is_stopped call. Assert that the
9629 thread is found. Replace is_stopped call by checking the thread's
9630 state directly. Remove unnecessary NULL-thread check.
9631
9632 2017-05-04 Pedro Alves <palves@redhat.com>
9633
9634 * corelow.c (thread_section_name): New class.
9635 (get_core_register_section, get_core_siginfo): Use it.
9636
9637 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9638
9639 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9640 (get_core_register_section): Remove xfree of NULL pointer.
9641
9642 2017-05-03 Alan Hayward <alan.hayward@arm.com>
9643
9644 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9645 * regcache.c (regcache::raw_supply_zeroed): New function.
9646 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9647
9648 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9649
9650 * gdbarch.sh: Remove commented out definition of
9651 TARGET_CHAR_BIT.
9652 * gdbarch.h: Re-generate.
9653
9654 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9655
9656 * configure: Regenerate.
9657
9658 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9659
9660 * solib-target.c (solib_target_relocate_section_addresses):
9661 Remove num_section_bases, num_bases, segment_bases variables.
9662
9663 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9664
9665 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9666
9667 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9668
9669 * solib-target.c: Include <vector>
9670 (struct lm_info_target) <~lm_info_target>: Remove.
9671 <segment_bases, section_bases>: Change type to
9672 std::vector<CORE_ADDR>.
9673 (library_list_start_segment, library_list_start_section,
9674 library_list_end_library,
9675 solib_target_relocate_section_addresses): Adjust.
9676
9677 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9678
9679 * gdbarch.sh (software_single_step): Change return type to
9680 std::vector<CORE_ADDR>.
9681 * gdbarch.c, gdbarch.h: Re-generate.
9682 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9683 Adjust.
9684 (arm_deal_with_atomic_sequence_raw): Adjust.
9685 (thumb_get_next_pcs_raw): Adjust.
9686 (arm_get_next_pcs_raw): Adjust.
9687 (arm_get_next_pcs): Adjust.
9688 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9689 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9690 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9691 (alpha_software_single_step): Adjust.
9692 * alpha-tdep.h (alpha_software_single_step): Adjust.
9693 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9694 * arm-tdep.c (arm_software_single_step): Adjust.
9695 (arm_breakpoint_kind_from_current_state): Adjust.
9696 * arm-tdep.h (arm_software_single_step): Adjust.
9697 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9698 * cris-tdep.c (cris_software_single_step): Adjust.
9699 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9700 (micromips_deal_with_atomic_sequence): Adjust.
9701 (deal_with_atomic_sequence): Adjust.
9702 (mips_software_single_step): Adjust.
9703 * mips-tdep.h (mips_software_single_step): Adjust.
9704 * moxie-tdep.c (moxie_software_single_step): Adjust.
9705 * nios2-tdep.c (nios2_software_single_step): Adjust.
9706 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9707 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9708 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9709 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9710 * sparc-tdep.c (sparc_software_single_step): Adjust.
9711 * spu-tdep.c (spu_software_single_step): Adjust.
9712 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9713
9714 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9715
9716 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9717 * gdbarch.h: Re-generate.
9718
9719 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9720
9721 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9722 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9723 * python/py-instruction.c, python/py-instruction.h: New file.
9724 * python/py-record.c: Add py-instruction.h include.
9725 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9726 gdb.RecordInstruction.
9727 * python/python-internal.h: Add gdbpy_initialize_instruction
9728 declaration.
9729 * python/python.c (do_start_initialization): Add
9730 gdbpy_initialize_instruction.
9731
9732 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9733
9734 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9735 Remove.
9736 (btrace_func_from_recpy_func): New function.
9737 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9738 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9739 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9740 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9741 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9742 Also, use new helper functions.
9743 (btpy_list_item): Use new helper functions.
9744 (recpy_bt_function_call_history): Use new type name.
9745 (btpy_call_getset): Remove.
9746 (gdbpy_initialize_btrace): Remove code to initialize
9747 gdb.BtraceFunctionCall.
9748 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9749 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9750 recpy_bt_func_prev, recpy_bt_func_next): New export.
9751 * python/py-record.c (recpy_func_type): New static object.
9752 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9753 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9754 recpy_func_next): New function.
9755 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9756 (recpy_func_getset): New static object.
9757 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9758 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9759
9760 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9761
9762 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9763 (btpy_object, btpy_insn_type, btpy_new): Remove.
9764 (btpy_list_object): Use gdb.RecordInstruction type instead of
9765 gdb.BtraceInstruction type.
9766 (btrace_insn_from_recpy_insn): New function.
9767 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9768 btpy_new.
9769 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9770 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9771 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9772 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9773 instead of btpy_object.
9774 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9775 btpy_insn_data, btpy_insn_decode): Rename to ...
9776 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9777 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9778 recpy_bt_insn_decode): This. Also, use new helper functions.
9779 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9780 recpy_insn_type.
9781 (btpy_insn_getset): Remove.
9782 (gdbpy_initialize_btrace): Remove code to initialize
9783 gdb.BtraceInstruction. Use recpy_element_object.
9784 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9785 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9786 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9787 * python/py-record.c (recpy_insn_type): New static object.
9788 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9789 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9790 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9791 New function.
9792 (recpy_insn_getset): New static object.
9793 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9794 * python/py-record.h (recpy_element_object): New typedef.
9795 (recpy_insn_type, recpy_insn_new): New export.
9796
9797 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9798
9799 * py-record-btrace.c (btpy_insn_new): Removed.
9800 (btpy_insn_or_gap_new): New function.
9801 (btpy_insn_error): Removed.
9802 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9803 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9804 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9805 btpy_insn_or_gap_new instead of btpy_insn_new.
9806 (btpy_insn_getset): Remove btpy_insn_error.
9807 * py-record.c (recpy_gap_type): New static object.
9808 (recpy_gap_object): New typedef.
9809 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9810 recpy_gap_reason_string): New function.
9811 (recpy_gap_getset): New static object.
9812 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9813 * py-record.h (recpy_gap_new): New export.
9814
9815 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9816
9817 * python/py-record.c (recpy_ptid): Remove.
9818 (recpy_record_getset): Remove recpy_ptid.
9819
9820 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9821
9822 * btrace.c (btrace_fetch): Set inferior_ptid.
9823 * python/py-record-btrace.c: Add "py-record.h" include.
9824 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9825 recpy_bt_end, recpy_bt_instruction_history,
9826 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9827 in gdb.Record object instead of current ptid.
9828 * python/py-record.c: Include new "py-record.h" file.
9829 (recpy_record_object): Moved to py-record.h.
9830 * python/py-record.h: New file.
9831
9832 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9833
9834 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9835 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9836 indentation.
9837
9838 2017-05-01 Joel Brobecker <brobecker@adacore.com>
9839
9840 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9841 the past maintainers section.
9842
9843 2017-04-28 Yao Qi <yao.qi@linaro.org>
9844
9845 * infcmd.c (get_return_value): Use regcache ctor, and remove
9846 cleanup.
9847
9848 2017-04-28 Yao Qi <yao.qi@linaro.org>
9849 Pedro Alves <palves@redhat.com>
9850
9851 * regcache.c (regcache::regcache): New tag dispatch ctor.
9852 (do_cooked_read): Moved above.
9853 (regcache_dup): Use the tag dispatch ctor..
9854 * regcache.h (regcache): Declare ctor, delete copy ctor and
9855 assignment operator, remove friend regcache_dup.
9856
9857 2017-04-28 Yao Qi <yao.qi@linaro.org>
9858
9859 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9860 call method save instead of regcache_cpy.
9861 * regcache.h (struct regcache): Make regcache_dup a friend.
9862
9863 2017-04-28 Yao Qi <yao.qi@linaro.org>
9864
9865 * regcache.c (struct regcache): Move to regcache.h
9866 (regcache::arch): New method.
9867 (regcache_get_ptid): Update.
9868 (get_regcache_arch): Call arch method.
9869 (get_regcache_aspace): Call method aspace.
9870 (register_buffer): Change it to method.
9871 (regcache_save): Change it to regcache::save.
9872 (regcache_restore): Likewise.
9873 (regcache_cpy_no_passthrough): Remove the declaration.
9874 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9875 (regcache_cpy_no_passthrough): Change it to method
9876 cpy_no_passthrough.
9877 (regcache_register_status): Change it to method
9878 get_register_status.
9879 (regcache_invalidate): Change it to method invalidate.
9880 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9881 (regcache_raw_update): Change it to method raw_update.
9882 (regcache_raw_read): Likewise.
9883 (regcache_raw_read_signed): Likewise.
9884 (regcache_raw_read_unsigned): Likewise.
9885 (regcache_raw_write_signed): Likewise.
9886 (regcache_raw_write_unsigned): Likewise.
9887 (regcache_cooked_read): Likewise.
9888 (regcache_cooked_read_value): Likewise.
9889 (regcache_cooked_read_signed): Likewise.
9890 (regcache_cooked_read_unsigned): Likewise.
9891 (regcache_cooked_write_signed): Likewise.
9892 (regcache_cooked_write_unsigned): Likewise.
9893 (regcache_raw_set_cached_value): Likewise.
9894 (regcache_raw_write): Likewise.
9895 (regcache_cooked_write): Likewise.
9896 (regcache_xfer_part): Likewise.
9897 (regcache_raw_read_part): Likewise.
9898 (regcache_raw_write_part): Likewise.
9899 (regcache_cooked_read_part): Likewise.
9900 (regcache_cooked_write_part): Likewise.
9901 (regcache_raw_supply): Likewise.
9902 (regcache_raw_collect): Likewise.
9903 (regcache_transfer_regset): Likewise.
9904 (regcache_supply_regset): Likewise.
9905 (regcache_collect_regset): Likewise.
9906 (regcache_debug_print_register): Likewise.
9907 (enum regcache_dump_what): Move it to regcache.h.
9908 (regcache_dump): Change it to method dump.
9909 * regcache.h (enum regcache_dump_what): New.
9910 (class regcache): New.
9911 * target.c (target_fetch_registers): Call method
9912 debug_print_register.
9913 (target_store_registers): Likewise.
9914
9915 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9916
9917 * windows-nat.c (struct lm_info_windows): Initialize field.
9918 (windows_make_so): Allocate lm_info_windows with new.
9919 (windows_free_so): Free lm_info_windows with delete.
9920
9921 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9922
9923 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9924 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9925 cleanup.
9926 (darwin_free_so): Free lm_info_darwin with delete.
9927
9928 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9929
9930 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9931 <l_addr_p>: Change type to bool.
9932 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9933 (svr4_free_so): Free lm_info_svr4 with delete.
9934 (svr4_copy_library_list): Replace memcpy with call to copy
9935 constructor.
9936 (library_list_start_library, svr4_default_sos): Allocate
9937 lm_info_svr4 with new.
9938
9939 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9940
9941 * solib-target.c (struct lm_info_target): Add destructor,
9942 initialize fields.
9943 <name>: Change type to std::string.
9944 (library_list_start_library): Allocate lm_info_target with new.
9945 (solib_target_free_library_list): Free lm_info_target with
9946 delete.
9947 (solib_target_current_sos): Adapt to std::string.
9948 (solib_target_free_so): Free lm_info_target with delete.
9949
9950 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9951
9952 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9953 fields.
9954 (frv_current_sos): Allocate lm_info_frv with new.
9955 (frv_relocate_main_executable): Free lm_info_frv with delete,
9956 allocate with new.
9957 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9958
9959 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9960
9961 * solib-frv.c (struct lm_info_frv): Fix indentation.
9962
9963 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9964
9965 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9966 map field.
9967 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9968 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9969 and allocate with new.
9970 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9971
9972 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9973
9974 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9975 <filename, member_name>: Change type to std::string.
9976 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9977 (library_list_start_library): Allocate lm_info_aix with new.
9978 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9979 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9980 with copy constructor.
9981
9982 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9983
9984 * solist.h (struct lm_info): Remove.
9985 (struct lm_info_base): New class.
9986 (struct so_list) <lm_info>: Change type to lm_info_base *.
9987 * nto-tdep.c (struct lm_info): Remove.
9988 (lm_addr): Adjust.
9989 * solib-aix.c (struct lm_info): Rename to ...
9990 (struct lm_info_aix): ... this. Extend lm_info_base.
9991 (lm_info_p): Rename to ...
9992 (lm_info_aix_p): ... this, and adjust.
9993 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9994 solib_aix_parse_libraries, library_list_start_library,
9995 solib_aix_free_library_list, solib_aix_parse_libraries,
9996 solib_aix_get_library_list,
9997 solib_aix_relocate_section_addresses, solib_aix_free_so,
9998 solib_aix_get_section_offsets,
9999 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10000 Adjust.
10001 (struct solib_aix_inferior_data) <library_list>: Adjust.
10002 * solib-darwin.c (struct lm_info): Rename to ...
10003 (struct lm_info_darwin): ... this. Extend lm_info_base.
10004 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10005 * solib-dsbt.c (struct lm_info): Rename to ...
10006 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10007 (struct dsbt_info) <main_executable_lm_info): Adjust.
10008 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10009 dsbt_relocate_section_addresses): Adjust.
10010 * solib-frv.c (struct lm_info): Rename to ...
10011 (struct lm_info_frv): ... this. Extend lm_info_base.
10012 (main_executable_lm_info): Adjust.
10013 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10014 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10015 find_canonical_descriptor_in_load_object,
10016 frv_fdpic_find_canonical_descriptor): Adjust.
10017 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10018 to lm_info_svr4.
10019 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10020 svr4_clear_so, svr4_copy_library_list,
10021 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10022 svr4_current_sos, svr4_fetch_objfile_link_map,
10023 solist_update_incremental): Adjust.
10024 * solib-svr4.h (struct lm_info_svr4): Move here from
10025 solib-svr4.c.
10026 * solib-target.c (struct lm_info): Rename to ...
10027 (struct lm_info_target): ... this. Extend lm_info_base.
10028 (lm_info_p): Rename to ...
10029 (lm_info_target_p): ... this.
10030 (solib_target_parse_libraries, library_list_start_segment,
10031 library_list_start_section, library_list_start_library,
10032 library_list_end_library, solib_target_free_library_list,
10033 solib_target_current_sos, solib_target_free_so,
10034 solib_target_relocate_section_addresses): Adjust.
10035 * windows-nat.c (struct lm_info): Rename to ...
10036 (struct lm_info_windows): ... this. Extend lm_info_base.
10037 (windows_make_so, handle_load_dll, handle_unload_dll,
10038 windows_xfer_shared_libraries): Adjust.
10039
10040 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10041
10042 * solib-darwin.c (struct darwin_so_list): Remove.
10043 (darwin_current_sos): Allocate an so_list object instead of a
10044 darwin_so_list, separately allocate an lm_info object.
10045 (darwin_free_so): Free lm_info.
10046
10047 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10048
10049 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10050 with fprintf_filtered.
10051
10052 2017-04-28 Yao Qi <yao.qi@linaro.org>
10053
10054 * regcache.c (regcache::regcache): New function.
10055 (regcache::~regcache): New function.
10056 (regcache_xmalloc_1): Remove.
10057 (regcache_xmalloc): Call new regcache.
10058 (regcache_xfree): Call delete regcache.
10059 (get_thread_arch_aspace_regcache): Call new regcache.
10060
10061 2017-04-28 Yao Qi <yao.qi@linaro.org>
10062
10063 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10064 lwp instead of ptid_get_lwp.
10065
10066 2017-04-28 Yao Qi <yao.qi@linaro.org>
10067
10068 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10069 lwp_info instead of getting from inferior_ptid.
10070
10071 2017-04-27 Keith Seitz <keiths@redhat.com>
10072
10073 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10074 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10075 (CV_CONVERSION_BADNESS): Define.
10076 (rank_one_type): Remove overly restrictive rvalue reference
10077 rank checks.
10078 Add cv-qualifier checks and subranks for type equality.
10079 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10080 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10081 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10082
10083 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10084
10085 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10086 count when creating the object.
10087
10088 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10089 Ulrich Weigand <uweigand@de.ibm.com>
10090
10091 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10092 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10093 is used in AIX.
10094 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10095 (process_xcoff_symbol): Likewise.
10096 (scan_xcoff_symtab): Likewise.
10097
10098 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10099
10100 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10101 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10102 (ia64_access_reg): Use get_frame_register_unsigned.
10103 (ia64_access_rse_reg): Likewise.
10104 (ia64_libunwind_frame_prev_register): Likewise.
10105
10106 2017-04-26 Jiong Wang <jiong.wang@arm.com>
10107
10108 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10109 * gdbarch.c: Regenerated.
10110 * gdbarch.h: Regenerated.
10111 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10112 visibility external.
10113 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10114 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10115 (enum cfa_how_kind): Move to ...
10116 (struct dwarf2_frame_state_reg_info): Likewise.
10117 (struct dwarf2_frame_state): Likewise.
10118 * dwarf2-frame.h: ... here.
10119 (dwarf2_frame_state_alloc_regs): New declaration.
10120 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10121 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10122
10123 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10124
10125 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10126 regcache_raw_read_unsigned.
10127 (xtensa_pseudo_register_write): Likewise.
10128
10129 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10130
10131 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10132 (nds32_pseudo_register_write): Likewise.
10133
10134 2017-04-25 Yao Qi <yao.qi@linaro.org>
10135
10136 * regcache.c (struct regcache) <readonly_p>: Change its type
10137 to bool.
10138 (regcache_xmalloc_1): Update parameter type and callers update.
10139
10140 2017-04-25 Yao Qi <yao.qi@linaro.org>
10141
10142 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10143 set_gdbarch_wchar_bit.
10144 * arm-tdep.c (arm_gdbarch_init): Likewise.
10145
10146 2017-04-25 Pedro Alves <palves@redhat.com>
10147
10148 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10149 (BothAreRelocatable, memcopy, memmove): Don't define.
10150 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10151 macros.
10152
10153 2017-04-25 Pedro Alves <palves@redhat.com>
10154
10155 * common/common-defs.h: Include "common/poison.h".
10156 * common/function-view.h: (Not, Or, Requires): Move to traits.h
10157 and adjust.
10158 * common/poison.h: New file.
10159 * common/traits.h: Include <type_traits>.
10160 (Not, Or, Requires): New, moved from common/function-view.h.
10161
10162 2017-04-25 Pedro Alves <palves@redhat.com>
10163
10164 * breakpoint.h (struct breakpoint): In-class initialize all
10165 fields. Make boolean fields "bool".
10166 * breakpoint.c (init_raw_breakpoint_without_location): Remove
10167 memset call and initializations no longer necessary.
10168
10169 2017-04-25 Pedro Alves <palves@redhat.com>
10170
10171 * btrace.c (pt_btrace_insn_flags): Change parameter type to
10172 reference.
10173 (pt_btrace_insn): New function.
10174 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10175
10176 2017-04-25 Pedro Alves <palves@redhat.com>
10177
10178 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
10179 "base" field and inherit from "bp_location" instead. Add
10180 non-default ctor.
10181 (allocate_location_exception): Use new non-default ctor.
10182 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10183 (init_bp_location): Convert to ...
10184 (bp_location::bp_location): ... this new ctor, and remove memset
10185 call.
10186 (base_breakpoint_allocate_location): Use the new non-default ctor.
10187 * breakpoint.h (bp_location): Now a class. Declare default and
10188 non-default ctors. In-class initialize all members.
10189 (init_bp_location): Remove declaration.
10190
10191 2017-04-25 Pedro Alves <palves@redhat.com>
10192
10193 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10194 assignment operator.
10195
10196 2017-04-24 Yao Qi <yao.qi@linaro.org>
10197
10198 * doublest.c (convert_doublest_to_floatformat): Call
10199 floatformat_totalsize_bytes.
10200
10201 2017-04-22 Tom Tromey <tom@tromey.com>
10202
10203 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10204 ui_out_emit_list.
10205 * stack.c (print_frame): Use ui_out_emit_list.
10206 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10207 ui_out_emit_list.
10208 * mi/mi-main.c (print_one_inferior)
10209 (mi_cmd_data_list_register_names)
10210 (mi_cmd_data_list_register_values, mi_cmd_list_features)
10211 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10212 ui_out_emit_list.
10213 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10214 (mi_output_solib_attribs): Use ui_out_emit_list,
10215 ui_out_emit_tuple.
10216 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10217 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10218 (mi_cmd_stack_list_args, list_args_or_locals): Use
10219 ui_out_emit_list.
10220 * disasm.c (do_assembly_only): Use ui_out_emit_list.
10221 * breakpoint.c (print_solib_event, output_thread_groups): Use
10222 ui_out_emit_list.
10223
10224 2017-04-22 Tom Tromey <tom@tromey.com>
10225
10226 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10227 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10228 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10229
10230 2017-04-22 Tom Tromey <tom@tromey.com>
10231
10232 * tracepoint.c (tvariables_info_1)
10233 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10234
10235 2017-04-22 Tom Tromey <tom@tromey.com>
10236
10237 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10238 annotate_arg_emitter.
10239 * breakpoint.c (print_mention_watchpoint)
10240 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10241 * annotate.h (struct annotate_arg_emitter): New.
10242
10243 2017-04-22 Tom Tromey <tom@tromey.com>
10244
10245 * record-btrace.c (record_btrace_insn_history)
10246 (record_btrace_insn_history_range, record_btrace_call_history)
10247 (record_btrace_call_history_range): Use ui_out_emit_tuple.
10248 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10249 ui_out_emit_tuple.
10250 * stack.c (print_frame_info): Use ui_out_emit_tuple.
10251 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10252 * skip.c (skip_info): Use ui_out_emit_tuple.
10253 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10254 * progspace.c (print_program_space): Use ui_out_emit_tuple.
10255 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10256 * osdata.c (info_osdata): Use ui_out_emit_tuple.
10257 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10258 ui_out_emit_tuple.
10259 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10260 (output_register, mi_cmd_data_read_memory)
10261 (mi_cmd_data_read_memory_bytes, mi_load_progress)
10262 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10263 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10264 Use ui_out_emit_tuple.
10265 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10266 ui_out_emit_tuple.
10267 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10268 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10269 * linux-thread-db.c (info_auto_load_libthread_db): Use
10270 ui_out_emit_tuple.
10271 * inferior.c (print_inferior): Use ui_out_emit_tuple.
10272 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10273 * disasm.c (do_mixed_source_and_assembly_deprecated)
10274 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10275 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10276 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10277 * breakpoint.c (print_one_breakpoint_location)
10278 (print_one_breakpoint): Use ui_out_emit_tuple.
10279 * auto-load.c (print_script, info_auto_load_cmd): Use
10280 ui_out_emit_tuple.
10281 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10282
10283 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
10284
10285 * thread.c (print_thread_info_1): Remove dead code.
10286
10287 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10288
10289 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10290 GDB_SELF_TEST.
10291 * arm-tdep.c (selftests::arm_record_test): Likewise.
10292
10293 2017-04-21 Yao Qi <yao.qi@linaro.org>
10294
10295 * regcache.c (regcache_restore): Remove argument 2. Replace
10296 argument 3 with regcache. Get register status from
10297 src->register_status and get register contents from
10298 register_buffer (src, regnum).
10299 (regcache_cpy): Update.
10300
10301 2017-04-19 Pedro Alves <palves@redhat.com>
10302
10303 * gdbthread.h (thread): Add missing closing parenthesis in
10304 comment.
10305
10306 2017-04-19 Pedro Alves <palves@redhat.com>
10307
10308 * common/refcounted-object.h: New file.
10309 * gdbthread.h: Include "common/refcounted-object.h".
10310 (thread_info): Inherit from refcounted_object and add comments.
10311 (thread_info::incref, thread_info::decref)
10312 (thread_info::m_refcount): Delete.
10313 (thread_info::deletable): Use the refcounted_object::refcount()
10314 method.
10315 * inferior.c (current_inferior_): Add comment.
10316 (set_current_inferior): Increment/decrement refcounts.
10317 (prune_inferiors, remove_inferior_command): Skip inferiors marked
10318 not-deletable instead of comparing with the current inferior.
10319 (initialize_inferiors): Increment the initial inferior's refcount.
10320 * inferior.h (struct inferior): Forward declare.
10321 Include "common/refcounted-object.h".
10322 (current_inferior, set_current_inferior): Move declaration to
10323 before struct inferior's definition, and fix comment.
10324 (inferior): Inherit from refcounted_object. Add comments.
10325 * thread.c (switch_to_thread_no_regs): Reference the thread's
10326 inferior pointer directly instead of doing a ptid lookup.
10327 (switch_to_no_thread): New function.
10328 (switch_to_thread(thread_info *)): New function, factored out
10329 from ...
10330 (switch_to_thread(ptid_t)): ... this.
10331 (restore_current_thread): Delete.
10332 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10333 fields, and add 'inf' field.
10334 (do_restore_current_thread_cleanup): Check whether old->inf is
10335 alive instead of looking up an inferior by ptid. Use
10336 switch_to_thread and switch_to_no_thread.
10337 (restore_current_thread_cleanup_dtor): Use old->inf directly
10338 instead of lookup up an inferior by id. Decref the inferior.
10339 Don't restore 'removable'.
10340 (make_cleanup_restore_current_thread): Same the inferior pointer
10341 in old, instead of the inferior number. Incref the inferior.
10342 Don't save/clear 'removable'.
10343
10344 2017-04-19 Pedro Alves <palves@redhat.com>
10345
10346 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10347 unittests/scoped_restore-selftests.c.
10348 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10349 * common/scoped_restore.h (scoped_restore_base): Make "class".
10350 (scoped_restore_base::release): New public method.
10351 (scoped_restore_base::scoped_restore_base): New protected ctor.
10352 (scoped_restore_base::m_saved_var): New protected field.
10353 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10354 scoped_restore_base base class instead of m_saved_var directly.
10355 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10356 (scoped_restore_tmpl::scoped_restore_tmpl(const
10357 scoped_restore_tmpl<T>&)): Likewise.
10358 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10359 method.
10360 (scoped_restore_tmpl::saved_var): New method.
10361 (scoped_restore_tmpl::m_saved_var): Delete.
10362 * inferior.h (inferior::detaching): Now a bool.
10363 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10364 cleanup.
10365 * unittests/scoped_restore-selftests.c: New file.
10366
10367 2017-04-19 Pedro Alves <palves@redhat.com>
10368
10369 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10370 Re-sort in alphabetic order.
10371
10372 2017-04-18 Pedro Alves <palves@redhat.com>
10373
10374 * xml-support.c (obstack_xml_printf): Delete.
10375 * xml-support.h (obstack_xml_printf): Delete.
10376
10377 2017-04-18 Pedro Alves <palves@redhat.com>
10378
10379 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10380 vdebug, verror, body_text, start_element, end_element, name,
10381 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10382 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10383 is_xinclude>: Make private and add m_ prefix.
10384 (gdb_xml_parser::body_text): New method, based on ...
10385 (gdb_xml_body_text): ... this. Adjust.
10386 (gdb_xml_parser::vdebug): New method, based on ...
10387 (gdb_xml_debug): ... this. Adjust.
10388 (gdb_xml_parser::verror): New method, based on ...
10389 (gdb_xml_error): ... this. Adjust.
10390 (gdb_xml_parser::start_element): New method, based on ...
10391 (gdb_xml_start_element): ... this. Adjust.
10392 (gdb_xml_start_element_wrapper): Defer to
10393 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10394 (gdb_xml_parser::end_element): New method, based on ...
10395 (gdb_xml_end_element_wrapper): ... this. Adjust.
10396 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10397 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10398 (gdb_xml_parser::use_dtd): New method, based on ...
10399 (gdb_xml_use_dtd): ... this. Adjust.
10400 (gdb_xml_parser::parse): New method, based on ...
10401 (gdb_xml_parse): ... this. Adjust.
10402 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10403 (xinclude_start_include): Adjust to call the parser's name method.
10404 (xml_xinclude_default, xml_xinclude_start_doctype)
10405 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10406 method.
10407 (xml_process_xincludes): Adjust to call parser methods.
10408 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10409 declarations.
10410
10411 2017-04-18 Pedro Alves <palves@redhat.com>
10412
10413 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10414 gdb::optional<std::string>.
10415 * xml-support.c: Include <string>.
10416 (scope_level::scope_level(scope_level &&))
10417 (scope_level::~scope_level): Delete.
10418 (scope_level::body): Now a std::string.
10419 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10420 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10421 parameter.
10422 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10423 (xinclude_parsing_data::output): Now a std::string reference.
10424 (xinclude_start_include): Adjust.
10425 (xml_xinclude_default): Adjust.
10426 (xml_process_xincludes): Add 'output' parameter, and return bool.
10427 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10428 and return bool.
10429 * xml-tdesc.c: Include <unordered_map> and <string>.
10430 (tdesc_xml_cache): Delete.
10431 (tdesc_xml_cache_s): Delete.
10432 (xml_cache): Now an std::unordered_map.
10433 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10434 (target_fetch_description_xml): Change return type to
10435 gdb::optional<std::string>, and adjust.
10436 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10437 (target_fetch_description_xml): Change return type to
10438 gdb::optional<std::string>.
10439
10440 2017-04-18 Pedro Alves <palves@redhat.com>
10441
10442 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10443 unittests/optional-selftests.c.
10444 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10445 * unittests/optional-selftests.c: New file.
10446 * unittests/optional/assignment/1.cc: New file.
10447 * unittests/optional/assignment/2.cc: New file.
10448 * unittests/optional/assignment/3.cc: New file.
10449 * unittests/optional/assignment/4.cc: New file.
10450 * unittests/optional/assignment/5.cc: New file.
10451 * unittests/optional/assignment/6.cc: New file.
10452 * unittests/optional/assignment/7.cc: New file.
10453 * unittests/optional/cons/copy.cc: New file.
10454 * unittests/optional/cons/default.cc: New file.
10455 * unittests/optional/cons/move.cc: New file.
10456 * unittests/optional/cons/value.cc: New file.
10457 * unittests/optional/in_place.cc: New file.
10458 * unittests/optional/observers/1.cc: New file.
10459 * unittests/optional/observers/2.cc: New file.
10460
10461 2017-04-18 Pedro Alves <palves@redhat.com>
10462
10463 * common/gdb_optional.h: Include common/traits.h.
10464 (in_place_t): New type.
10465 (in_place): New constexpr variable.
10466 (optional::optional): Remove member initialization of
10467 m_instantiated.
10468 (optional::optional(in_place_t...)): New constructor.
10469 (optional::~optional): Use reset.
10470 (optional::optional(const optional&)): New.
10471 (optional::optional(const optional&&)): New.
10472 (optional::optional(T &)): New.
10473 (optional::optional(T &&)): New.
10474 (operator::operator=(const optional &)): New.
10475 (operator::operator=(optional &&)): New.
10476 (operator::operator= (const T &))
10477 (operator::operator= (T &&))
10478 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10479 (operator::reset): New.
10480 (operator::m_instantiated):: Add in-class initializer.
10481 * common/traits.h: Include <type_traits>.
10482 (struct And): New types.
10483
10484 2017-04-18 Pedro Alves <palves@redhat.com>
10485
10486 * xml-support.c: Include <vector>.
10487 (scope_level::scope_level(const gdb_xml_element *))
10488 (scope_level::scope_level(scope_level&&)): New.
10489 (scope_level::~scope_level): New.
10490 (scope_level_s): Delete.
10491 (gdb_xml_parser::scopes): Now a std::vector.
10492 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10493 Use std::vector.
10494 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10495 scope cleanup code.
10496 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10497 of the scopes member. Use std::vector::emplace_back.
10498
10499 2017-04-18 Pedro Alves <palves@redhat.com>
10500
10501 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10502 a bool.
10503 (gdb_xml_end_element): Change type of first parameter.
10504 (gdb_xml_cleanup): Rename to ...
10505 (gdb_xml_parser::~gdb_xml_parser): ... this.
10506 (gdb_xml_create_parser_and_cleanup): Delete with ...
10507 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10508 to this new ctor.
10509 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10510 using gdb_xml_create_parser_and_cleanup.
10511 (xinclude_parsing_data): Add ctor/dtor.
10512 (xml_xinclude_cleanup): Delete.
10513 (xml_process_xincludes): Create a local xinclude_parsing_data
10514 instead of heap-allocating one. Create a local gdb_xml_parser
10515 instead of heap-allocating one with
10516 gdb_xml_create_parser_and_cleanup.
10517
10518 2017-04-18 John Baldwin <jhb@FreeBSD.org>
10519
10520 PR threads/20743
10521 * fbsd-nat.c (resume_one_thread_cb): Remove.
10522 (resume_all_threads_cb): Remove.
10523 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10524 iterate_over_threads.
10525
10526 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10527
10528 * NEWS: Create a new section for the next release branch.
10529 Rename the section of the current branch, now that it has
10530 been cut.
10531
10532 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10533
10534 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10535 * version.in: Bump version to 8.0.50.DATE-git.
10536
10537 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10538
10539 PR gdb/21385
10540 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10541 independently of the host, and fix build breakage on Cygwin.
10542
10543 2017-04-13 Pedro Alves <palves@redhat.com>
10544
10545 * inferior.c (free_inferior): Convert to ...
10546 (inferior::~inferior): ... this dtor.
10547 (inferior::inferior): New ctor, factored out from ...
10548 (add_inferior_silent): ... here. Allocate the inferior with a new
10549 expression.
10550 (delete_inferior): Call delete instead of free_inferior.
10551 * inferior.h (gdb_environ, continuation): Forward declare.
10552 (inferior): Now a class. Add in-class initialization to all
10553 members. Make boolean fields bool, except 'detaching'.
10554 (inferior::inferior): New explicit ctor.
10555 (inferior::~inferior): New.
10556
10557 2017-04-13 Pedro Alves <palves@redhat.com>
10558
10559 * inferior.c (init_inferior_list): Delete.
10560 * inferior.h (init_inferior_list): Delete.
10561
10562 2017-04-13 Pedro Alves <palves@redhat.com>
10563
10564 PR threads/13217
10565 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10566 (top level): Call it twice, with different thread sets.
10567
10568 2017-04-13 Pedro Alves <palves@redhat.com>
10569
10570 * thread.c: Include <algorithm>.
10571 (thread_array_cleanup): Delete.
10572 (scoped_inc_dec_ref): New class.
10573 (live_threads_count): New function.
10574 (set_thread_refcount): Delete.
10575 (tp_array_compar_ascending): Now a bool.
10576 (tp_array_compar): Convert to a std::sort comparison function.
10577 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10578 and live_threads_count.
10579
10580 2017-04-13 Pedro Alves <palves@redhat.com>
10581
10582 * infrun.c (follow_fork_inferior): Also switch the current
10583 inferior.
10584
10585 2017-04-13 Pedro Alves <palves@redhat.com>
10586
10587 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10588 before calling create_internal_breakpoint.
10589
10590 2017-04-13 Pedro Alves <palves@redhat.com>
10591
10592 * fork-child.c (execv_argv): New class.
10593 (breakup_args): Refactored as ...
10594 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10595 Copy arguments to storage and replace separators with NULL
10596 terminators in place.
10597 (escape_bang_in_quoted_argument): Adjust to return bool.
10598 (execv_argv::execv_argv): New ctor.
10599 (execv_argv::init_for_shell): New method, factored out from
10600 fork_inferior. Don't strdup strings into the vector.
10601 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10602 Remove free_vector_argv call.
10603
10604 2017-04-13 Yao Qi <yao.qi@linaro.org>
10605
10606 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10607 tdep->rx_psw_type.
10608
10609 2017-04-13 Yao Qi <yao.qi@linaro.org>
10610
10611 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10612 * rx-tdep.c (rx_gdbarch_init): Likewise.
10613
10614 2017-04-13 Pedro Alves <palves@redhat.com>
10615
10616 * breakpoint.h (struct breakpoint): Reindent.
10617
10618 2017-04-13 Pedro Alves <palves@redhat.com>
10619
10620 * breakpoint.c (bp_location): Rename to ...
10621 (bp_locations): ... this. All references updated.
10622 (bp_location_count): Rename to ...
10623 (bp_locations_count): ... this. All references updated.
10624 (bp_location_placed_address_before_address_max): Rename to ...
10625 (bp_locations_placed_address_before_address_max): ... this. All
10626 references updated.
10627 (bp_location_shadow_len_after_address_max): Rename to ...
10628 (bp_locations_shadow_len_after_address_max): ... this. All
10629 references updated.
10630 (bp_location_compare_addrs): Rename to ...
10631 (bp_locations_compare_addrs): ... this. All references updated.
10632 (bp_location_compare):Rename to ...
10633 (bp_locations_compare): ... this. All references updated.
10634 (bp_location_target_extensions_update): Rename to ...
10635 (bp_locations_target_extensions_update): ... this. All references
10636 updated.
10637
10638 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10639
10640 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10641 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10642 'sgtty.h'.
10643 * common/gdb_termios.h: New file, with parts of "terminal.h".
10644 * inflow.c: Include "gdb_termios.h".
10645 * ser-unix.c: Include "gdb_termios.h".
10646 * terminal.h: Move terminal-related defines to
10647 "common/gdb_termios.h".
10648
10649 2017-04-12 Tom Tromey <tom@tromey.com>
10650
10651 * probe.c (parse_probes): Update.
10652 * location.h (delete_event_location): Don't declare.
10653 (event_location_deleter::operator()): Update.
10654 * location.c (event_location_deleter::operator()): Rename from
10655 delete_event_location.
10656 * linespec.h (linespec_result) <location>: Change type to
10657 event_location_up.
10658 * linespec.c (canonicalize_linespec, event_location_to_sals)
10659 (decode_objc): Update.
10660 (linespec_result): Don't call delete_event_location.
10661 * breakpoint.c (create_breakpoints_sal)
10662 (bkpt_probe_create_sals_from_location)
10663 (strace_marker_create_sals_from_location): Update.
10664
10665 2017-04-12 Tom Tromey <tom@tromey.com>
10666
10667 * linespec.h (struct linespec_result): Add constructor and
10668 destructor.
10669 (init_linespec_result, destroy_linespec_result)
10670 (make_cleanup_destroy_linespec_result): Don't declare.
10671 * linespec.c (init_linespec_result): Remove.
10672 (linespec_result::~linespec_result): Rename from
10673 destroy_linespec_result. Update.
10674 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10675 Remove.
10676 * breakpoint.c (create_breakpoint, break_range_command)
10677 (decode_location_default): Update.
10678 * ax-gdb.c (agent_command_1): Update.
10679
10680 2017-04-12 Tom Tromey <tom@tromey.com>
10681
10682 * remote.c (remote_download_tracepoint): Update.
10683 * python/py-breakpoint.c (bppy_get_location): Update.
10684 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10685 (gdbscm_breakpoint_location): Update.
10686 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10687 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10688 Change type to event_location_up.
10689 * breakpoint.c (create_overlay_event_breakpoint)
10690 (create_longjmp_master_breakpoint)
10691 (create_std_terminate_master_breakpoint)
10692 (create_exception_master_breakpoint)
10693 (breakpoint_event_location_empty_p, print_breakpoint_location)
10694 (print_one_breakpoint_location, create_thread_event_breakpoint)
10695 (init_breakpoint_sal, create_breakpoint)
10696 (print_recreate_ranged_breakpoint, break_range_command)
10697 (init_ada_exception_breakpoint, say_where): Update.
10698 (base_breakpoint_dtor): Don't call delete_event_location.
10699 (bkpt_print_recreate, tracepoint_print_recreate)
10700 (dprintf_print_recreate, update_static_tracepoint)
10701 (breakpoint_re_set_default): Update.
10702
10703 2017-04-12 Tom Tromey <tom@tromey.com>
10704
10705 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10706 type of "to_do". Update.
10707 (compute_stack_depth): Use std::vector.
10708
10709 2017-04-12 Tom Tromey <tom@tromey.com>
10710
10711 * printcmd.c (find_instruction_backward): Use std::vector.
10712
10713 2017-04-12 Tom Tromey <tom@tromey.com>
10714
10715 * symfile.c (objfilep): Remove typedef.
10716 (reread_symbols): Use a std::vector.
10717
10718 2017-04-12 Tom Tromey <tom@tromey.com>
10719
10720 * mi/mi-main.c (exec_direction_forward): Remove.
10721 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10722 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10723 scoped_restore.
10724 * guile/guile.c (guile_repl_command, guile_command)
10725 (gdbscm_execute_gdb_command): Use scoped_restore.
10726 * go-exp.y (go_parse): Use scoped_restore.
10727 * d-exp.y (d_parse): Use scoped_restore.
10728 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10729 * c-exp.y (c_parse): Use scoped_restore.
10730
10731 2017-04-12 Tom Tromey <tom@tromey.com>
10732
10733 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10734 (mi_parse): Update return type.
10735 (mi_parse_free): Remove.
10736 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10737 (mi_parse::~mi_parse): Rename from mi_parse_free.
10738 (mi_parse_cleanup): Remove.
10739 (mi_parse): Return a unique_ptr. Use new.
10740 * mi/mi-main.c (mi_execute_command): Update.
10741
10742 2017-04-12 Tom Tromey <tom@tromey.com>
10743
10744 * location.c (explicit_location_lex_one): Return a
10745 unique_xmalloc_ptr.
10746 (string_to_explicit_location): Update. Remove cleanups.
10747
10748 2017-04-12 Tom Tromey <tom@tromey.com>
10749
10750 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10751 (compare_value_and_voffset): Change type. Update.
10752 (compute_vtable_size): Change type of "offset_vec".
10753 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10754 (gnuv3_get_typeid): Remove extraneous declaration.
10755
10756 2017-04-12 Tom Tromey <tom@tromey.com>
10757
10758 * charset.h (wchar_iterator): Fix comment.
10759
10760 2017-04-12 Tom Tromey <tom@tromey.com>
10761
10762 * charset.c (iconv_wrapper): New class.
10763 (cleanup_iconv): Remove.
10764 (convert_between_encodings): Use it.
10765
10766 2017-04-12 Tom Tromey <tom@tromey.com>
10767
10768 * symfile.h (increment_reading_symtab): Update type.
10769 * symfile.c (decrement_reading_symtab): Remove.
10770 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10771 * psymtab.c (psymtab_to_symtab): Update.
10772 * dwarf2read.c (dw2_instantiate_symtab): Update.
10773
10774 2017-04-12 Tom Tromey <tom@tromey.com>
10775
10776 * jit.c (struct jit_reader): Declare separately. Add constructor
10777 and destructor. Change type of "handle".
10778 (loaded_jit_reader): Define separately.
10779 (jit_reader_load): Update. New "new".
10780 (jit_reader_unload_command): Use "delete".
10781 * gdb-dlfcn.h (struct dlclose_deleter): New.
10782 (gdb_dlhandle_up): New typedef.
10783 (gdb_dlopen, gdb_dlsym): Update types.
10784 (gdb_dlclose): Remove.
10785 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10786 (gdb_dlsym): Change type of "handle".
10787 (make_cleanup_dlclose): Remove.
10788 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10789 * compile/compile-c-support.c (load_libcc): Update.
10790
10791 2017-04-12 Tom Tromey <tom@tromey.com>
10792
10793 * symtab.h (find_pcs_for_symtab_line): Change return type.
10794 * symtab.c (find_pcs_for_symtab_line): Change return type.
10795 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10796 type of "vec". Update.
10797 (ltpy_get_pcs_for_line): Update.
10798 * linespec.c (decode_digits_ordinary): Update.
10799
10800 2017-04-12 Tom Tromey <tom@tromey.com>
10801
10802 * tracepoint.c (actions_command): Update.
10803 * python/python.c (python_command, python_interactive_command):
10804 Update.
10805 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10806 * guile/guile.c (guile_command): Update.
10807 * defs.h (read_command_lines, read_command_lines_1): Return
10808 command_line_up.
10809 (command_lines_deleter): New struct.
10810 (command_line_up): New typedef.
10811 * compile/compile.c (compile_code_command)
10812 (compile_print_command): Update.
10813 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10814 command_line_up.
10815 (make_cleanup_free_command_lines): Remove.
10816 * cli/cli-script.c (get_command_line, read_command_lines_1)
10817 (copy_command_lines): Return command_line_up.
10818 (while_command, if_command, read_command_lines, define_command)
10819 (document_command): Update.
10820 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10821 Remove.
10822 * breakpoint.h (breakpoint_set_commands): Change type of
10823 "commands".
10824 * breakpoint.c (breakpoint_set_commands): Change type of
10825 "commands". Update.
10826 (do_map_commands_command, update_dprintf_command_list)
10827 (create_tracepoint_from_upload): Update.
10828
10829 2017-04-12 Tom Tromey <tom@tromey.com>
10830
10831 * tracepoint.c (scope_info): Update.
10832 * spu-tdep.c (spu_catch_start): Update.
10833 * python/python.c (gdbpy_decode_line): Update.
10834 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10835 * python/py-breakpoint.c (bppy_init): Update.
10836 * probe.c (parse_probes): Update.
10837 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10838 * location.h (event_location_deleter): New struct.
10839 (event_location_up): New typedef.
10840 (new_linespec_location, new_address_location, new_probe_location)
10841 (new_explicit_location, copy_event_location)
10842 (string_to_event_location, string_to_event_location_basic)
10843 (string_to_explicit_location): Update return type.
10844 (make_cleanup_delete_event_location): Remove.
10845 * location.c (new_linespec_location, new_address_location)
10846 (new_probe_location, new_explicit_location, copy_event_location):
10847 Return event_location_up.
10848 (delete_event_location_cleanup)
10849 (make_cleanup_delete_event_location): Remove.
10850 (string_to_explicit_location, string_to_event_location_basic)
10851 (string_to_event_location): Return event_location_up.
10852 * linespec.c (canonicalize_linespec, event_location_to_sals)
10853 (decode_line_with_current_source)
10854 (decode_line_with_last_displayed, decode_objc): Update.
10855 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10856 * completer.c (location_completer): Update.
10857 * cli/cli-cmds.c (edit_command, list_command): Update.
10858 * breakpoint.c (create_overlay_event_breakpoint)
10859 (create_longjmp_master_breakpoint)
10860 (create_std_terminate_master_breakpoint)
10861 (create_exception_master_breakpoint)
10862 (create_thread_event_breakpoint): Update.
10863 (init_breakpoint_sal): Update. Remove some dead code.
10864 (create_breakpoint_sal): Change type of "location". Update.
10865 (create_breakpoints_sal, create_breakpoint, break_command_1)
10866 (dprintf_command, break_range_command, until_break_command)
10867 (init_ada_exception_breakpoint)
10868 (strace_marker_create_sals_from_location)
10869 (update_static_tracepoint, trace_command, ftrace_command)
10870 (strace_command, create_tracepoint_from_upload): Update.
10871 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10872 * ax-gdb.c (agent_command_1): Update.
10873
10874 2017-04-12 Pedro Alves <palves@redhat.com>
10875
10876 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10877 * configure.tgt: Handle i[34567]86-*-go32* and
10878 i[34567]86-*-msdosdjgpp*.
10879 * i386-tdep.c (i386_svr4_reg_to_regnum):
10880 Make extern.
10881 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10882 i386-go32-tdep.c.
10883 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10884 * i386-go32-tdep.c: New file.
10885 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10886 declarations.
10887
10888 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10889
10890 * aix-thread.c (pd_status2str): Change return type to const char *.
10891
10892 2017-04-12 Pedro Alves <palves@redhat.com>
10893
10894 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10895 calls to set_gdbarch_gnu_triplet_regexp.
10896
10897 2017-04-12 Pedro Alves <palves@redhat.com>
10898
10899 PR gdb/21323
10900 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10901 New enum value.
10902 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10903 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10904 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10905 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10906 * gdbarch.h, gdbarch.c: Regenerate.
10907 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10908 gdbarch_wchar_bit and gdbarch_wchar_signed.
10909 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10910 * arm-tdep.c (arm_gdbarch_init): Likewise.
10911 * avr-tdep.c (avr_gdbarch_init): Likewise.
10912 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10913 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10914 * i386-tdep.c (i386_go32_init_abi): Likewise.
10915 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10916 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10917 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10918 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10919 * sh-tdep.c (sh_gdbarch_init): Likewise.
10920 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10921 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10922 * windows-tdep.c (windows_init_abi): Likewise.
10923 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10924
10925 2017-04-12 Pedro Alves <palves@redhat.com>
10926
10927 PR c++/21323
10928 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10929 cplus_primitive_type_char32_t>: New enum values.
10930 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10931 and cplus_primitive_type_char32_t.
10932 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10933 32, use the archtecture's built-in type for char16_t and char32_t,
10934 respectively. Otherwise, fallback to init_integer_type as before,
10935 but make the type unsigned, and issue a complaint.
10936 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10937
10938 2017-04-12 Alan Hayward <alan.hayward@arm.com>
10939
10940 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10941 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10942
10943 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10944
10945 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10946 'const char *'.
10947
10948 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10949
10950 * common/common-utils.c (free_vector_argv): New function.
10951 * common/common-utils.h: Include <vector>.
10952 (free_vector_argv): New prototype.
10953 * darwin-nat.c (darwin_create_inferior): Rewrite function
10954 prototype in order to constify "exec_file" and accept a
10955 "std::string" for "allargs".
10956 * fork-child.c: Include <vector>.
10957 (breakup_args): Rewrite function, using C++.
10958 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10959 and accept "std::string" for "allargs". Update the code to
10960 calculate "argv" based on "allargs". Update calls to "exec_fun"
10961 and "execvp".
10962 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10963 order to constify "exec_file" and accept a "std::string" for
10964 "allargs".
10965 * go32-nat.c (go32_create_inferior): Likewise.
10966 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10967 * infcmd.c (run_command_1): Constify "exec_file". Use
10968 "std::string" for inferior arguments.
10969 * inferior.h (fork_inferior): Update prototype.
10970 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10971 prototype in order to constify "exec_file" and accept a
10972 "std::string" for "allargs".
10973 * nto-procfs.c (procfs_create_inferior): Likewise.
10974 * procfs.c (procfs_create_inferior): Likewise.
10975 * remote-sim.c (gdbsim_create_inferior): Likewise.
10976 * remote.c (extended_remote_run): Update code to accept
10977 "std::string" as argument.
10978 (extended_remote_create_inferior): Rewrite function prototype in
10979 order to constify "exec_file" and accept a "std::string" for
10980 "allargs".
10981 * rs6000-nat.c (super_create_inferior): Likewise.
10982 (rs6000_create_inferior): Likewise.
10983 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10984 * windows-nat.c (windows_create_inferior): Likewise.
10985
10986 2017-04-11 Pedro Alves <palves@redhat.com>
10987
10988 * thread.c: Fix whitespace throughout.
10989
10990 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10991
10992 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10993
10994 2017-04-11 Alan Hayward <alan.hayward@arm.com>
10995
10996 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10997
10998 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10999
11000 PR gdb/21364
11001 * osdata.c (info_osdata): Check if 'type' is an empty string
11002 instead of NULL.
11003
11004 2017-04-10 Pedro Alves <palves@redhat.com>
11005
11006 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11007 (ptid_to_global_thread_id, in_thread_list)
11008 (do_captured_list_thread_ids, set_resumed, set_running)
11009 (set_executing, set_stop_requested, finish_thread_state)
11010 (validate_registers_access, can_access_registers_ptid)
11011 (print_thread_info_1, switch_to_thread)
11012 (do_restore_current_thread_cleanup)
11013 (make_cleanup_restore_current_thread, thread_command)
11014 (thread_name_command): Use operator== instead of ptid_equal.
11015
11016 2017-04-10 Pedro Alves <palves@redhat.com>
11017
11018 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11019 (current_thread_cleanup_chain): Delete.
11020 (restore_current_thread_cleanup_dtor)
11021 (make_cleanup_restore_current_thread): Remove references to
11022 current_thread_cleanup_chain.
11023
11024 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11025
11026 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11027 REG_UNKNOWN.
11028
11029 2017-04-10 Yao Qi <yao.qi@linaro.org>
11030
11031 PR gdb/19942
11032 * gdbthread.h (thread_info::deletable): New method.
11033 (thread_info::incref): New method.
11034 (thread_info::decref): New method.
11035 (thread_info::refcount): Move it to private.
11036 * infrun.c (save_stop_context): Call inc_refcount.
11037 (release_stop_context_cleanup): Likewise.
11038 * thread.c (set_thread_exited): New function.
11039 (init_thread_list): Delete "tp" only it is deletable, otherwise
11040 call set_thread_exited.
11041 (delete_thread_1): Call set_thread_exited.
11042 (current_thread_cleanup) <inferior_pid>: Remove.
11043 <thread>: New field.
11044 (restore_current_thread_ptid_changed): Removed.
11045 (do_restore_current_thread_cleanup): Adjust.
11046 (restore_current_thread_cleanup_dtor): Don't call
11047 find_thread_ptid.
11048 (set_thread_refcount): Use dec_refcount.
11049 (make_cleanup_restore_current_thread): Adjust.
11050 (thread_apply_all_command): Call inc_refcount.
11051 (_initialize_thread): Don't call
11052 observer_attach_thread_ptid_changed.
11053
11054 2017-04-10 Yao Qi <yao.qi@linaro.org>
11055
11056 * thread.c (delete_thread_1): Hoist code on marking thread as
11057 exited.
11058
11059 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11060
11061 * windows-nat.c (windows_detach): Initialize ptid with
11062 minus_one_ptid.
11063
11064 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11065
11066 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11067
11068 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11069
11070 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11071 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11072 (bfin_pseudo_register_write): Likewise
11073
11074 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11075
11076 * common/ptid.h (struct ptid): Change to...
11077 (class ptid_t): ... this.
11078 <ptid_t>: New constructors.
11079 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11080 matches>: New methods.
11081 <make_null, make_minus_one>: New static methods.
11082 <pid>: Rename to...
11083 <m_pid>: ...this.
11084 <lwp>: Rename to...
11085 <m_lwp>: ...this.
11086 <tid>: Rename to...
11087 <m_tid>: ...this.
11088 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11089 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11090 as references, move comment to class ptid_t.
11091 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11092 ptid_t static methods.
11093 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11094 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11095 Take ptid arguments as references, implement using ptid_t methods.
11096 * unittests/ptid-selftests.c: New file.
11097 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11098 unittests/ptid-selftests.c.
11099 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11100
11101 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11102
11103 * python/python.c (python_run_simple_file): Cast mode literal to
11104 non-const char pointer as expected by PyFile_FromString.
11105
11106 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11107
11108 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11109 minus_one_ptid and null_ptid.
11110
11111 2017-04-05 Pedro Alves <palves@redhat.com>
11112
11113 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11114 * configure: Regenerate.
11115
11116 2017-04-05 Pedro Alves <palves@redhat.com>
11117
11118 * ada-exp.y (yyerror): Constify.
11119 * ada-lang.c (bound_name, get_selections)
11120 (ada_variant_discrim_type)
11121 (ada_variant_discrim_name, ada_value_struct_elt)
11122 (ada_lookup_struct_elt_type, is_unchecked_variant)
11123 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11124 (catch_ada_exception_command_split)
11125 (catch_ada_assert_command_split, catch_assert_command)
11126 (ada_op_name): Constify.
11127 * ada-lang.h (ada_yyerror, get_selections)
11128 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11129 * arc-tdep.c (arc_print_frame_cache): Constify.
11130 * arm-tdep.c (arm_skip_stub): Constify.
11131 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11132 (gen_aggregate_elt_ref): Constify.
11133 * bcache.c (print_bcache_statistics): Constify.
11134 * bcache.h (print_bcache_statistics): Constify.
11135 * break-catch-throw.c (catch_exception_command_1):
11136 * breakpoint.c (struct ep_type_description::description):
11137 Constify.
11138 (add_solib_catchpoint): Constify.
11139 (catch_fork_command_1): Add cast.
11140 (add_catch_command): Constify.
11141 * breakpoint.h (add_catch_command, add_solib_catchpoint):
11142 Constify.
11143 * bsd-uthread.c (bsd_uthread_state): Constify.
11144 * buildsym.c (patch_subfile_names): Constify.
11145 * buildsym.h (next_symbol_text_func, patch_subfile_names):
11146 Constify.
11147 * c-exp.y (yyerror): Constify.
11148 (token::oper): Constify.
11149 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11150 * c-varobj.c (cplus_describe_child): Constify.
11151 * charset.c (find_charset_names): Add cast.
11152 (find_charset_names): Constify array and add const_cast.
11153 * cli/cli-cmds.c (complete_command, cd_command): Constify.
11154 (edit_command): Constify.
11155 * cli/cli-decode.c (lookup_cmd): Constify.
11156 * cli/cli-dump.c (dump_memory_command, dump_value_command):
11157 Constify.
11158 (struct dump_context): Constify.
11159 (add_dump_command, restore_command): Constify.
11160 * cli/cli-script.c (get_command_line): Constify.
11161 * cli/cli-script.h (get_command_line): Constify.
11162 * cli/cli-utils.c (check_for_argument): Constify.
11163 * cli/cli-utils.h (check_for_argument): Constify.
11164 * coff-pe-read.c (struct read_pe_section_data): Constify.
11165 * command.h (lookup_cmd): Constify.
11166 * common/print-utils.c (decimal2str): Constify.
11167 * completer.c (gdb_print_filename): Constify.
11168 * corefile.c (set_gnutarget): Constify.
11169 * cp-name-parser.y (yyerror): Constify.
11170 * cp-valprint.c (cp_print_class_member): Constify.
11171 * cris-tdep.c (cris_register_name, crisv32_register_name):
11172 Constify.
11173 * d-exp.y (yyerror): Constify.
11174 (struct token::oper): Constify.
11175 * d-lang.h (d_yyerror): Constify.
11176 * dbxread.c (struct header_file_location::name): Constify.
11177 (add_old_header_file, add_new_header_file, last_function_name)
11178 (dbx_next_symbol_text, add_bincl_to_list)
11179 (find_corresponding_bincl_psymtab, set_namestring)
11180 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11181 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11182 * defs.h (command_line_input, print_address_symbolic)
11183 (deprecated_readline_begin_hook): Constify.
11184 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11185 Constify.
11186 * event-top.c (handle_line_of_input): Constify and add cast.
11187 * exceptions.c (catch_errors): Constify.
11188 * exceptions.h (catch_errors): Constify.
11189 * expprint.c (print_subexp_standard, op_string, op_name)
11190 (op_name_standard, dump_raw_expression, dump_raw_expression):
11191 * expression.h (op_name, op_string, dump_raw_expression):
11192 Constify.
11193 * f-exp.y (yyerror): Constify.
11194 (struct token::oper): Constify.
11195 (struct f77_boolean_val::name): Constify.
11196 * f-lang.c (f_word_break_characters): Constify.
11197 * f-lang.h (f_yyerror): Constify.
11198 * fork-child.c (fork_inferior): Add cast.
11199 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11200 (new_variant): Constify.
11201 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11202 * gdbarch.c: Regenerate.
11203 * gdbcore.h (set_gnutarget): Constify.
11204 * go-exp.y (yyerror): Constify.
11205 (token::oper): Constify.
11206 * go-lang.h (go_yyerror): Constify.
11207 * go32-nat.c (go32_sysinfo): Constify.
11208 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11209 * guile/scm-cmd.c (cmdscm_function): Constify.
11210 * guile/scm-param.c (pascm_param_value): Constify.
11211 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11212 (h8300sx_register_name): Constify.
11213 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11214 Constify.
11215 * ia64-tdep.c (ia64_register_names): Constify.
11216 * infcmd.c (construct_inferior_arguments): Constify.
11217 (path_command, attach_post_wait): Constify.
11218 * language.c (show_range_command, show_case_command)
11219 (unk_lang_error): Constify.
11220 * language.h (language_defn::la_error)
11221 (language_defn::la_name_of_this): Constify.
11222 * linespec.c (decode_line_2): Constify.
11223 * linux-thread-db.c (thread_db_err_str): Constify.
11224 * lm32-tdep.c (lm32_register_name): Constify.
11225 * m2-exp.y (yyerror): Constify.
11226 * m2-lang.h (m2_yyerror): Constify.
11227 * m32r-tdep.c (m32r_register_names): Constify and make static.
11228 * m68hc11-tdep.c (m68hc11_register_names): Constify.
11229 * m88k-tdep.c (m88k_register_name): Constify.
11230 * macroexp.c (appendmem): Constify.
11231 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11232 (upgrade_type, parse_external, parse_partial_symbols)
11233 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11234 (new_symbol): Constify.
11235 * memattr.c (mem_info_command): Constify.
11236 * mep-tdep.c (register_name_from_keyword): Constify.
11237 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11238 Constify.
11239 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11240 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11241 * mi/mi-main.c (captured_mi_execute_command): Constify and add
11242 cast.
11243 (mi_execute_async_cli_command): Constify.
11244 * mips-tdep.c (mips_register_name): Constify.
11245 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11246 (am33_register_name, am33_2_register_name)
11247 * moxie-tdep.c (moxie_register_names): Constify.
11248 * nat/linux-osdata.c (osdata_type): Constify fields.
11249 * nto-tdep.c (nto_parse_redirection): Constify.
11250 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11251 (lookup_child_selector): Constify.
11252 (objc_methcall::name): Constify.
11253 * objc-lang.h (lookup_objc_class, lookup_child_selector)
11254 (lookup_struct_typedef): Constify.
11255 * objfiles.c (pc_in_section): Constify.
11256 * objfiles.h (pc_in_section): Constify.
11257 * p-exp.y (struct token::oper): Constify.
11258 (yyerror): Constify.
11259 * p-lang.h (pascal_yyerror): Constify.
11260 * parser-defs.h (op_name_standard): Constify.
11261 (op_print::string): Constify.
11262 (exp_descriptor::op_name): Constify.
11263 * printcmd.c (print_address_symbolic): Constify.
11264 * psymtab.c (print_partial_symbols): Constify.
11265 * python/py-breakpoint.c (stop_func): Constify.
11266 (bppy_get_expression): Constify.
11267 * python/py-cmd.c (cmdpy_completer::name): Constify.
11268 (cmdpy_function): Constify.
11269 * python/py-event.c (evpy_add_attribute)
11270 (gdbpy_initialize_event_generic): Constify.
11271 * python/py-event.h (evpy_add_attribute)
11272 (gdbpy_initialize_event_generic): Constify.
11273 * python/py-evts.c (add_new_registry): Constify.
11274 * python/py-finishbreakpoint.c (outofscope_func): Constify.
11275 * python/py-framefilter.c (get_py_iter_from_func): Constify.
11276 * python/py-inferior.c (get_buffer): Add cast.
11277 * python/py-param.c (parm_constant::name): Constify.
11278 * python/py-unwind.c (fprint_frame_id): Constify.
11279 * python/python.c (gdbpy_parameter_value): Constify.
11280 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11281 * remote.c (memory_packet_config::name): Constify.
11282 (show_packet_config_cmd, remote_write_bytes)
11283 (remote_buffer_add_string):
11284 * reverse.c (exec_reverse_once): Constify.
11285 * rs6000-tdep.c (variant::name, variant::description): Constify.
11286 * rust-exp.y (rustyyerror): Constify.
11287 * rust-lang.c (rust_op_name): Constify.
11288 * rust-lang.h (rustyyerror): Constify.
11289 * serial.h (serial_ops::name): Constify.
11290 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11291 (sh_sh3e_register_name, sh_sh2e_register_name)
11292 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11293 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11294 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11295 (sh_sh4al_dsp_register_name): Constify.
11296 * sh64-tdep.c (sh64_register_name): Constify.
11297 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11298 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11299 * stabsread.c (patch_block_stabs, read_type_number)
11300 (ref_map::stabs, ref_add, process_reference)
11301 (symbol_reference_defined, define_symbol, define_symbol)
11302 (error_type, read_type, read_member_functions, read_cpp_abbrev)
11303 (read_one_struct_field, read_struct_fields, read_baseclasses)
11304 (read_tilde_fields, read_struct_type, read_array_type)
11305 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11306 (read_huge_number, read_range_type, read_args, common_block_start)
11307 (find_name_end): Constify.
11308 * stabsread.h (common_block_start, define_symbol)
11309 (process_one_symbol, symbol_reference_defined, ref_add):
11310 * symfile.c (get_section_index, add_symbol_file_command):
11311 * symfile.h (get_section_index): Constify.
11312 * target-descriptions.c (tdesc_type::name): Constify.
11313 (tdesc_free_type): Add cast.
11314 * target.c (find_default_run_target):
11315 (add_deprecated_target_alias, find_default_run_target)
11316 (target_announce_detach): Constify.
11317 (do_option): Constify.
11318 * target.h (add_deprecated_target_alias): Constify.
11319 * thread.c (print_thread_info_1): Constify.
11320 * top.c (deprecated_readline_begin_hook, command_line_input):
11321 Constify.
11322 (init_main): Add casts.
11323 * top.h (handle_line_of_input): Constify.
11324 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11325 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11326 (tfind_command): Rename to ...
11327 (tfind_command_1): ... this and constify.
11328 (tfind_command): New function.
11329 (tfind_end_command, tfind_start_command): Adjust.
11330 (encode_source_string): Constify.
11331 * tracepoint.h (encode_source_string): Constify.
11332 * tui/tui-data.c (tui_partial_win_by_name): Constify.
11333 * tui/tui-data.h (tui_partial_win_by_name): Constify.
11334 * tui/tui-source.c (tui_set_source_content_nil): Constify.
11335 * tui/tui-source.h (tui_set_source_content_nil): Constify.
11336 * tui/tui-win.c (parse_scrolling_args): Constify.
11337 * tui/tui-windata.c (tui_erase_data_content): Constify.
11338 * tui/tui-windata.h (tui_erase_data_content): Constify.
11339 * tui/tui-winsource.c (tui_erase_source_content): Constify.
11340 * tui/tui.c (tui_enable): Add cast.
11341 * utils.c (defaulted_query): Constify.
11342 (init_page_info): Add cast.
11343 (puts_debug, subset_compare): Constify.
11344 * utils.h (subset_compare): Constify.
11345 * varobj.c (varobj_format_string): Constify.
11346 * varobj.h (varobj_format_string): Constify.
11347 * vax-tdep.c (vax_register_name): Constify.
11348 * windows-nat.c (windows_detach): Constify.
11349 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11350 * xml-support.c (gdb_xml_end_element): Constify.
11351 * xml-tdesc.c (tdesc_start_reg): Constify.
11352 * xstormy16-tdep.c (xstormy16_register_name): Constify.
11353 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11354 * xtensa-tdep.h (xtensa_register_t::name): Constify.
11355
11356 2017-04-05 Pedro Alves <palves@redhat.com>
11357
11358 * proc-api.c (struct trans): Constify.
11359 (procfs_note): Constify.
11360 * proc-events.c (struct trans, syscall_table):
11361 * proc-flags.c (struct trans): Constify.
11362 * proc-utils.h (procfs_note): Constify.
11363 * proc-why.c (struct trans): Constify.
11364 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11365 (procfs_detach): Constify.
11366 * sol-thread.c (struct string_map): Constify.
11367 (td_err_string, td_state_string): Constify.
11368
11369 2017-04-05 Pedro Alves <palves@redhat.com>
11370
11371 * proc-api.c (procfs_filename): Don't initialize
11372 procfs_filename.
11373 (prepare_to_trace): Assume procfs_filename is non-NULL.
11374 (_initialize_proc_api): Give procfs_filename a default value here.
11375
11376 2017-04-05 Pedro Alves <palves@redhat.com>
11377
11378 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11379 'cond_string' parameter.
11380 (extract_exception_regexp): Constify 'string' parameter.
11381 (catch_exception_command_1): Constify.
11382 * breakpoint.c (init_catchpoint)
11383 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11384 parameter.
11385 (ep_parse_optional_if_clause, catch_fork_command_1)
11386 (catch_exec_command_1): Constify.
11387 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11388 parameter.
11389 (ep_parse_optional_if_clause): Constify.
11390 * cli/cli-utils.c (remove_trailing_whitespace)
11391 (check_for_argument): Constify.
11392 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11393 non-const overload.
11394 (check_for_argument): Likewise.
11395
11396 2017-04-05 Pedro Alves <palves@redhat.com>
11397
11398 * event-top.c (command_line_handler): Add cast to execute_command
11399 call.
11400 * record-btrace.c (cmd_record_btrace_bts_start)
11401 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11402 (cmd_record_btrace_start): Add cast to execute_command call.
11403 * record-full.c (record_full_goto_insn):
11404 * record.c (record_start, record_stop): Add cast to
11405 execute_command_to_string calls.
11406 (cmd_record_start): Add cast to execute_command calls.
11407
11408 2017-04-05 Pedro Alves <palves@redhat.com>
11409
11410 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11411 static inline function.
11412 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11413 array and use gdb_PyArg_ParseTupleAndKeywords.
11414 * python/py-cmd.c (cmdpy_init): Likewise.
11415 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11416 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11417 (infpy_search_memory): Likewise.
11418 * python/py-objfile.c (objfpy_add_separate_debug_file)
11419 (gdbpy_lookup_objfile): Likewise.
11420 * python/py-symbol.c (gdbpy_lookup_symbol)
11421 (gdbpy_lookup_global_symbol): Likewise.
11422 * python/py-type.c (gdbpy_lookup_type): Likewise.
11423 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11424 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11425 Likewise.
11426
11427 2017-04-05 Pedro Alves <palves@redhat.com>
11428
11429 * python/python-internal.h (gdb_PyGetSetDef): New type.
11430 * python/py-block.c (block_object_getset)
11431 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11432 * python/py-event.c (event_object_getset)
11433 (finish_breakpoint_object_getset): Likewise.
11434 * python/py-inferior.c (inferior_object_getset): Likewise.
11435 * python/py-infthread.c (thread_object_getset): Likewise.
11436 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11437 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11438 * python/py-objfile.c (objfile_getset): Likewise.
11439 * python/py-progspace.c (pspace_getset): Likewise.
11440 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11441 Likewise.
11442 * python/py-record.c (recpy_record_getset): Likewise.
11443 * python/py-symbol.c (symbol_object_getset): Likewise.
11444 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11445 Likewise.
11446 * python/py-type.c (type_object_getset, field_object_getset):
11447 Likewise.
11448 * python/py-value.c (value_object_getset): Likewise.
11449
11450 2017-04-05 Pedro Alves <palves@redhat.com>
11451
11452 * python/python-internal.h (gdb_PyObject_CallMethod)
11453 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11454 New functions.
11455 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11456 (PySys_GetObject, PySys_SetPath): New macros.
11457
11458 2017-04-05 Pedro Alves <palves@redhat.com>
11459
11460 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11461 info_osdata_command.
11462 * osdata.c (info_osdata_command): Rename to ...
11463 (info_osdata): ... this. Constify 'type' parameter, and remove
11464 the 'from_tty' parameter. Accept NULL TYPE.
11465 (info_osdata_command): New function.
11466 * osdata.h (info_osdata_command): Remove declaration.
11467 (info_osdata): New declaration.
11468
11469 2017-04-05 Pedro Alves <palves@redhat.com>
11470
11471 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11472 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11473 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11474 parameter.
11475 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11476 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11477 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11478 parameter.
11479 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11480 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11481 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11482 (mi_cmd_file_list_exec_source_files)
11483 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11484 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11485 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11486 parameter.
11487 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11488 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11489 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11490 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11491 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11492 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11493 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11494 'command' parameter.
11495 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11496 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11497 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11498 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11499 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11500 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11501 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11502 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11503 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11504 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11505 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11506 parameter.
11507 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11508 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11509 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11510 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11511 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11512 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11513 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11514 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11515 (mi_cmd_data_list_changed_registers)
11516 (mi_cmd_data_write_register_values)
11517 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11518 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11519 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11520 (mi_cmd_list_features, mi_cmd_list_target_features)
11521 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11522 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11523 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11524 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11525 (mi_cmd_trace_frame_collected): Constify 'command'
11526 parameter.
11527 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11528 'command' parameter.
11529
11530 2017-04-05 Pedro Alves <palves@redhat.com>
11531
11532 * ada-lang.c (ada_completer_word_break_characters): Now a const
11533 array.
11534 (ada_get_gdb_completer_word_break_characters): Constify.
11535 * completer.c (gdb_completer_command_word_break_characters)
11536 (gdb_completer_file_name_break_characters)
11537 (gdb_completer_quote_characters): Now const arrays.
11538 (get_gdb_completer_quote_characters): Constify.
11539 (set_rl_completer_word_break_characters): New function.
11540 (set_gdb_completion_word_break_characters)
11541 (complete_line_internal): Use it.
11542 * completer.h (get_gdb_completer_quote_characters): Constify.
11543 (set_rl_completer_word_break_characters): Declare.
11544 * f-lang.c (f_word_break_characters): Constify.
11545 * language.c (default_word_break_characters): Constify.
11546 * language.h (language_defn::la_word_break_characters): Constify.
11547 (default_word_break_characters): Constify.
11548 * top.c (init_main): Use set_rl_completer_word_break_characters.
11549
11550 2017-04-05 Pedro Alves <palves@redhat.com>
11551
11552 * aix-thread.c (aix_thread_pid_to_str)
11553 (aix_thread_extra_thread_info): Constify.
11554 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11555 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11556 (bsd_uthread_pid_to_str): Constify.
11557 * corelow.c (core_pid_to_str): Constify.
11558 * darwin-nat.c (darwin_pid_to_str): Constify.
11559 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11560 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11561 Constify.
11562 * gnu-nat.c (gnu_pid_to_str): Constify.
11563 * go32-nat.c (go32_pid_to_str): Constify.
11564 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11565 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11566 * inferior.c (inferior_pid_to_str): Constify.
11567 * linux-nat.c (linux_nat_pid_to_str): Constify.
11568 * linux-tdep.c (linux_core_pid_to_str): Constify.
11569 * linux-thread-db.c (thread_db_pid_to_str)
11570 (thread_db_extra_thread_info): Constify.
11571 * nto-tdep.c (nto_extra_thread_info): Constify.
11572 * nto-tdep.h (nto_extra_thread_info): Constify.
11573 * obsd-nat.c (obsd_pid_to_str): Constify.
11574 * procfs.c (procfs_pid_to_str): Constify.
11575 * ravenscar-thread.c (ravenscar_extra_thread_info)
11576 (ravenscar_pid_to_str): Constify.
11577 * remote-sim.c (gdbsim_pid_to_str): Constify.
11578 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11579 Constify.
11580 * sol-thread.c (solaris_pid_to_str): Constify.
11581 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11582 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11583 * target.c (default_pid_to_str, target_pid_to_str)
11584 (normal_pid_to_str, default_pid_to_str): Constify.
11585 * target.h (target_ops::to_pid_to_str)
11586 (target_ops::to_extra_thread_info): Constify.
11587 (target_pid_to_str, normal_pid_to_str): Constify.
11588 * windows-nat.c (windows_pid_to_str): Constify.
11589 * gdbarch.sh (core_pid_to_str): Constify.
11590 * target-delegates.c: Regenerate.
11591 * gdbarch.h, gdbarch.c: Regenerate.
11592
11593 2017-04-05 Pedro Alves <palves@redhat.com>
11594
11595 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11596 the memory of the temporary warning_pre_print override.
11597 * utils.c (warning_pre_print): Constify.
11598 * utils.h (warning_pre_print): Constify.
11599
11600 2017-04-05 Pedro Alves <palves@redhat.com>
11601
11602 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11603 (shell_command): New function.
11604 (make_command): Use std::string.
11605 (init_cli_cmds): Register shell_command instead of shell_escape.
11606
11607 2017-04-05 Pedro Alves <palves@redhat.com>
11608
11609 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11610 * tracepoint.c (default_collect): Don't initialize.
11611
11612 2017-04-05 Pedro Alves <palves@redhat.com>
11613
11614 * macroexp.c (macro_buffer::shared): Now a bool.
11615 (init_buffer): Update.
11616 (init_shared_buffer): Constify 'addr' parameter.
11617 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11618 casts.
11619
11620 2017-04-05 Pedro Alves <palves@redhat.com>
11621
11622 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11623 * disasm.c (set_disassembler_options): Constify local.
11624 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11625
11626 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11627
11628 PR gdb/21352
11629 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11630 option.
11631
11632 2017-04-05 Yao Qi <yao.qi@linaro.org>
11633
11634 * frame.c (frame_unwind_register_unsigned): Call
11635 frame_unwind_register_value.
11636
11637 2017-04-05 Yao Qi <yao.qi@linaro.org>
11638
11639 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11640 Use gdb_test_multiple, and don't match anchor.
11641
11642 2017-04-05 Pedro Alves <palves@redhat.com>
11643
11644 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11645 (Write After Approval): Remove Simon Marchi.
11646
11647 2017-04-05 Pedro Alves <palves@redhat.com>
11648
11649 * common/gdb_optional.h (optional::optional): Make constexpr and
11650 initialize m_dummy.
11651
11652 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11653
11654 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11655 (amd64fbsd_jmp_buf_reg_offset): Remove.
11656 (amd64fbsd_supply_uthread): Remove function.
11657 (amd64fbsd_collect_uthread): Remove function.
11658 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11659 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11660 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11661 (fbsd-nat.c): Update comment.
11662 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11663 (i386fbsd_jmp_buf_reg_offset): Remove.
11664 (i386fbsd_supply_uthread): Remove function.
11665 (i386fbsd_collect_uthread): Remove function.
11666 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11667
11668 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11669
11670 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11671 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11672 * NEWS: Mention that support for FreeBSD/alpha was removed.
11673 * alpha-fbsd-tdep.c: Delete file.
11674 * config/alpha/fbsd.mh: Delete file.
11675 * configure.host: Delete alpha*-*-freebsd* and
11676 alpha*-*-kfreebsd*-gnu.
11677 * configure.tgt: Delete alpha*-*-freebsd* and
11678 alpha*-*-kfreebsd*-gnu.
11679
11680 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11681
11682 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11683 amd64bsd_store_inferior_registers): Use ptid from regcache.
11684
11685 2017-04-04 Pedro Alves <palves@redhat.com>
11686
11687 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11688 data fields, make them private and add "m_" prefixes.
11689 (lnp_state_machine::lnp_state_machine): New ctor.
11690 (record_line, check_line_address, handle_set_discriminator)
11691 (handle_set_address, handle_advance_pc, handle_special_opcode)
11692 (handle_advance_line, handle_set_file, handle_negate_stmt)
11693 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11694 (end_sequence, advance_line): New methods.
11695 (m_gdbarch, m_record_lines_p): New fields.
11696 (lnp_reader_state): Delete.
11697 (dwarf_record_line): Rename to ...
11698 (lnp_state_machine::record_line): ... adjust.
11699 (init_lnp_state_machine): Delete.
11700 (lnp_state_machine::lnp_state_machine): New.
11701 (check_line_address): Rename to ...
11702 (lnp_state_machine::check_line_address): This.
11703 (dwarf_decode_lines_1): Remove reference to "reader_state".
11704 Adjust lnp_state_machine having a non-default ctor. Use bool.
11705 State machine internal state manipulation moved to
11706 lnp_state_machine methods.
11707
11708 2017-04-04 Pedro Alves <palves@redhat.com>
11709
11710 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11711 unittests/offset-type-selftests.c.
11712 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11713 * common/offset-type.h: New file.
11714 * common/preprocessor.h: New file.
11715 * common/traits.h: New file.
11716 * common/valid-expr.h: New file.
11717 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11718 sect_offset and cu_offset strong typedefs throughout.
11719 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11720 typedefs throughout.
11721 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11722 sect_offset and cu_offset strong typedefs throughout.
11723 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11724 typedefs throughout.
11725 * gdbtypes.h: Include "common/offset-type.h".
11726 (cu_offset): Now an offset type (strong typedef) instead of a
11727 struct.
11728 (sect_offset): Likewise.
11729 (union call_site_parameter_u): Rename "param_offset" field to
11730 "param_cu_off".
11731 * unittests/offset-type-selftests.c: New file.
11732
11733 2017-04-04 Pedro Alves <palves@redhat.com>
11734
11735 * common/underlying.h: New file.
11736 * dwarf2read.c: Include "common/gdb_optional.h" and
11737 "common/underlying.h".
11738 (dir_index, file_name_index): New types.
11739 (file_entry): Use them.
11740 (file_entry::include): Use to_underlying.
11741 (line_header::add_file_name): Use dir_index.
11742 (read_formatted_entries): Use gdb::optional. Read form before
11743 writting to file_entry.
11744 (dwarf_decode_line_header): Use dir_index.
11745 (lnp_state_machine::current_file): Use to_underlying.
11746 (lnp_state_machine::file): Change type to file_name_index.
11747 (dwarf_record_line): Use to_underlying.
11748 (init_lnp_state_machine): Use file_name_index.
11749 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11750
11751 2017-04-04 Pedro Alves <palves@redhat.com>
11752
11753 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11754 operator bool, has_value and get methods.
11755
11756 2017-04-04 Pedro Alves <palves@redhat.com>
11757
11758 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11759 fields.
11760 (line_header): Initialize all data fields. Change type of
11761 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11762 Change type of include_dirs to std::vector<const char *>. Remove
11763 num_include_dirs, include_dirs_size. Change type of file_names to
11764 std::vector<file_entry>. Remove num_file_names, file_names_size.
11765 (line_header::line_header): New.
11766 (line_header::add_include_dir, line_header::add_file_name): New
11767 methods.
11768 (line_header::include_dir_at): Remove NULL check.
11769 (line_header::file_name_at): Add const overload.
11770 (line_header_up): New unique_ptr typedef.
11771 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11772 std::vector. Remove free_line_header call.
11773 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11774 free_line_header call.
11775 (free_cu_line_header): Delete.
11776 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11777 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11778 Adjust to use std::vector.
11779 (free_line_header): Delete.
11780 (free_line_header_voidp): Use delete.
11781 (add_include_dir): Replace with ...
11782 (line_header::add_include_dir): ... this method. Use std::vector.
11783 (add_file_name): Replace with ...
11784 (line_header::add_file_name): ... this method. Use std::vector.
11785 (add_include_dir_stub): Delete.
11786 (read_formatted_entries): Remove memset.
11787 (dwarf_decode_line_header): Return a line_header_up instead of a
11788 raw pointer. Remove cleanup handling. Pass lambdas to
11789 read_formatted_entries. Adjust to use line_header methods.
11790 (dwarf_decode_lines_1): Adjust to use line_header methods.
11791 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11792 use std::vector.
11793
11794 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11795
11796 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11797 instead of struct ptid.
11798
11799 2017-05-04 Alan Hayward <alan.hayward@arm.com>
11800
11801 * frame.c (get_frame_register_bytes): Unwind using value.
11802 (put_frame_register_bytes): Likewise.
11803
11804 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11805
11806 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11807 aggregate-like.
11808
11809 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11810
11811 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11812
11813 2017-03-29 Yao Qi <yao.qi@linaro.org>
11814
11815 * gdbthread.h (struct thread_info): Declare constructor and
11816 destructor. Add some in-class member initializers.
11817 * thread.c (free_thread): Remove.
11818 (init_thread_list): Call delete instead of free_thread.
11819 (new_thread): Call thread_info constructor.
11820 (thread_info::thread_info): New function.
11821 (thread_info::~thread_info): New function.
11822 (delete_thread_1): Call delete instead of free_thread.
11823 (make_cleanup_restore_current_thread): Move tp and frame to
11824 inner block.
11825
11826 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11827
11828 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11829 (arc_skip_prologue): Likewise.
11830 (arc_make_frame_cache): Likewise.
11831 (arc_pv_get_operand): New function.
11832 (arc_is_in_prologue): Likewise.
11833 (arc_analyze_prologue): Likewise.
11834 (arc_print_frame_cache): Likewise.
11835 (MAX_PROLOGUE_LENGTH): New constant.
11836
11837 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11838
11839 * configure.tgt: Add arc-insn.o.
11840 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11841 (dump_arc_instruction_command): New function.
11842 (arc_fprintf_disasm): Likewise.
11843 (arc_disassemble_info): Likewise.
11844 (arc_insn_get_operand_value): Likewise.
11845 (arc_insn_get_operand_value_signed): Likewise.
11846 (arc_insn_get_memory_base_reg): Likewise.
11847 (arc_insn_get_memory_offset): Likewise.
11848 (arc_insn_get_branch_target): Likewise.
11849 (arc_insn_dump): Likewise.
11850 (arc_insn_get_linear_next_pc): Likewise.
11851 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11852 (arc_disassemble_info): Likewise.
11853 (arc_insn_get_branch_target): Likewise.
11854 (arc_insn_get_linear_next_pc): Likewise.
11855 * NEWS: Mention new "maint print arc arc-instruction".
11856
11857 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11858
11859 * arc-tdep (maintenance_print_arc_list): New variable.
11860 (maintenance_print_arc_command): New function.
11861
11862 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11863
11864 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11865 Add "limm" and "reserved".
11866 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11867 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11868 * arc-tdep.h (arc_regnum): Likewise.
11869
11870 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11871
11872 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11873 for THREADPTR register.
11874 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11875 register.
11876 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11877 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11878 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11879
11880 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11881
11882 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11883 registers above gdbarch_num_regs (gdbarch) as privileged in
11884 call0 ABI.
11885
11886 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11887
11888 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11889 for a single specified register or for all registers in
11890 a0_base..a0_base + C0_NREGS range.
11891 (supply_gregset_reg): Call regcache_raw_supply for a single
11892 specified register or for all registers in a0_base..a0_base +
11893 C0_NREGS range.
11894
11895 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11896
11897 * arch/xtensa.h (C0_NREGS): Add definition.
11898 * xtensa-tdep.c (C0_NREGS): Remove definition.
11899
11900 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11901
11902 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11903 Drop xtensa_default_isa initialization.
11904 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11905
11906 2017-03-27 Pedro Alves <palves@redhat.com>
11907
11908 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11909 (file_entry::include_dir): New method.
11910 (line_header::include_dir_at, line_header::file_name_at): New
11911 methods.
11912 (setup_type_unit_groups, setup_type_unit_groups)
11913 (psymtab_include_file_name): Simplify using the new methods.
11914 (lnp_state_machine) <the_line_header>: New field.
11915 <file>: Add comment.
11916 (lnp_state_machine::current_file): New method.
11917 (dwarf_record_line): Simplify using the new methods.
11918 (init_lnp_state_machine): Initialize the "the_line_header" field.
11919 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11920 Simplify using the new methods.
11921
11922 2017-03-27 Pedro Alves <palves@redhat.com>
11923
11924 * cp-name-parser.y (make_empty): Delete.
11925 (demangler_special, nested_name, ptr_operator, array_indicator)
11926 (direct_declarator, declarator_1): Use fill_comp instead of
11927 make_empty.
11928
11929 2017-03-27 Pedro Alves <palves@redhat.com>
11930
11931 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11932 to ATTRIBUTE_PRINTF.
11933 * solib-target.c (library_list_start_list): Print "string" not
11934 "version".
11935 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11936 gdb_xml_error call.
11937
11938 2017-03-27 Pedro Alves <palves@redhat.com>
11939
11940 * dwarf2read.c (struct file_and_directory): New.
11941 (dwarf2_get_dwz_file): Adjust to use std::string.
11942 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11943 (find_file_and_directory): Adjust to return a file_and_directory
11944 object.
11945 (read_file_scope): Adjust to use file_and_directory. Remove
11946 make_cleanup/do_cleanups calls.
11947 (open_and_init_dwp_file): Adjust to use std::string. Remove
11948 make_cleanup/do_cleanups calls.
11949 * python/python.c (do_start_initialization): Adjust to ldirname
11950 returning a std::string.
11951 * utils.c (ldirname): Now returns a std::string.
11952 * utils.h (ldirname): Change return type to std::string.
11953 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11954 returning a std::string.
11955 * xml-tdesc.c (file_read_description_xml): Likewise.
11956
11957 2017-03-24 Alan Hayward <alan.hayward@arm.com>
11958
11959 * regcache.c (regcache_debug_print_register): New function.
11960 * regcache.h (regcache_debug_print_register): New declaration.
11961 * target.c (debug_print_register): Remove.
11962 (target_fetch_registers): Call regcache_debug_print_register.
11963 (target_store_registers): Likewise.
11964
11965 2017-03-24 Pádraig Brady <pbrady@fb.com>
11966
11967 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11968 reference beyond the 'lh->include_dirs' array before accessing to
11969 it.
11970 (psymtab_include_file_name): Likewise.
11971 (dwarf_decode_lines_1): Likewise.
11972 (dwarf_decode_lines): Likewise.
11973 (file_file_name): Likewise.
11974
11975 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11976
11977 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11978 inferior_ptid.
11979 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11980 ps_lsetfpregs): Likewise.
11981 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11982 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11983 ps_lsetfpregs): Likewise.
11984 * target.c (target_fetch_registers, target_store_registers):
11985 Remove asserts.
11986
11987 2017-03-23 Alan Hayward <alan.hayward@arm.com>
11988
11989 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11990
11991 2017-03-23 Yao Qi <yao.qi@linaro.org>
11992
11993 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11994 (_initialize_aarch64_tdep): Register it.
11995 (aarch64_record_load_store): Handle PRFM instruction.
11996 (aarch64_process_record_test): New function.
11997
11998 2017-03-23 Yao Qi <yao.qi@linaro.org>
11999
12000 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12001 indentation.
12002
12003 2017-03-23 Yao Qi <yao.qi@linaro.org>
12004
12005 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12006
12007 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12008
12009 python/python.c (do_start_initialization): Fix memory leak.
12010
12011 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12012
12013 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12014 using get_ptrace_pid.
12015 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12016 inferior_ptid.
12017 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12018 inferior_ptid instead of pid.
12019
12020 2017-03-22 Yao Qi <yao.qi@linaro.org>
12021
12022 * aarch64-tdep.c: Wrap locally used classes in anonymous
12023 namespace.
12024 * arm-tdep.c: Likewise.
12025 * linespec.c: Likewise.
12026 * ui-out.c: Likewise.
12027
12028 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12029
12030 PR gdb/19637
12031 * python/lib/gdb/printer/bound_registers.py: Import sys.
12032
12033 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12034
12035 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12036 windows_thread_info parameter and use it instead of
12037 current_thread.
12038 (windows_fetch_inferior_registers): Don't set current_thread,
12039 pass the thread to do_windows_fetch_inferior_registers. Use
12040 ptid from regcache instead of inferior_ptid.
12041 (do_windows_store_inferior_registers): Add windows_thread_info
12042 parameter and use it instead of current_thread.
12043 (windows_store_inferior_registers): Don't set current_thread,
12044 pass the thread to do_windows_store_inferior_registers. Use
12045 ptid from regcache instead of inferior_ptid.
12046
12047 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12048
12049 * ser-mingw.c (ser_windows_raw): Remove reference to
12050 struct serial::current_timeout.
12051
12052 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12053
12054 PR tdep/20928
12055 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12056 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12057 (sparc64_fsr_type): Fix %fsr decoding.
12058
12059 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12060
12061 * python/py-record-btrace.c (btpy_insn_data): Change return type
12062 for Python 2.
12063
12064 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12065
12066 * spu-linux-nat.c (spu_fetch_inferior_registers,
12067 spu_store_inferior_registers): Use ptid from regcache, set and
12068 restore inferior_ptid.
12069 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12070 Likewise.
12071
12072 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12073
12074 * i386-linux-nat.c (fetch_register, store_register,
12075 i386_linux_fetch_inferior_registers,
12076 i386_linux_store_inferior_registers): Use ptid from regcache.
12077 * ia64-linux-nat.c (ia64_linux_fetch_register,
12078 ia64_linux_store_register): Likewise.
12079 * inf-ptrace.c (inf_ptrace_fetch_register,
12080 inf_ptrace_store_register): Likewise.
12081 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12082 m32r_linux_store_inferior_registers): Likewise.
12083 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12084 m68kbsd_store_inferior_registers): Likewise.
12085 * m68k-linux-nat.c (fetch_register, store_register,
12086 m68k_linux_fetch_inferior_registers,
12087 m68k_linux_store_inferior_registers): Likewise.
12088 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12089 m88kbsd_store_inferior_registers): Likewise.
12090 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12091 mips_fbsd_store_inferior_registers): Likewise.
12092 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12093 mips64_linux_regsets_store_registers): Likewise.
12094 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12095 mipsnbsd_store_inferior_registers): Likewise.
12096 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12097 mips64obsd_store_inferior_registers): Likewise.
12098 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12099 Likewise.
12100 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12101 ppcfbsd_store_inferior_registers): Likewise.
12102 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12103 ppc_linux_store_inferior_registers): Likewise.
12104 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12105 ppcnbsd_store_inferior_registers): Likewise.
12106 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12107 ppcobsd_store_registers): Likewise.
12108 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12109 Likewise.
12110 * ravenscar-thread.c (ravenscar_fetch_registers,
12111 ravenscar_store_registers, ravenscar_prepare_to_store):
12112 Likewise.
12113 * record-btrace.c (record_btrace_fetch_registers,
12114 record_btrace_store_registers, record_btrace_prepare_to_store):
12115 Likewise.
12116 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12117 Lookup inferior using ptid from regcache, instead of
12118 current_inferior.
12119 * remote.c (remote_fetch_registers, remote_store_registers): Use
12120 ptid from regcache.
12121 * rs6000-nat.c (fetch_register, store_register): Likewise.
12122 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12123 s390_linux_store_inferior_registers): Likewise.
12124 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12125 shnbsd_store_inferior_registers): Likewise.
12126 * sol-thread.c (sol_thread_fetch_registers,
12127 sol_thread_store_registers): Likewise.
12128 * sparc-nat.c (sparc_fetch_inferior_registers,
12129 sparc_store_inferior_registers): Likewise.
12130 * tilegx-linux-nat.c (fetch_inferior_registers,
12131 store_inferior_registers): Likewise.
12132 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12133 vaxbsd_store_inferior_registers): Likewise.
12134 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12135 store_xtregs): Likewise.
12136
12137 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12138
12139 PR gdb/14441
12140 * NEWS: Mention support for rvalue references in GDB and python.
12141 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12142 supports both lvalue and rvalue references.
12143
12144 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12145
12146 PR gdb/14441
12147 * gdbtypes.c (rank_one_type): Implement overloading
12148 resolution rules regarding rvalue references.
12149
12150 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12151
12152 PR gdb/14441
12153 * aarch64-tdep.c (aarch64_type_align)
12154 (aarch64_extract_return_value, aarch64_store_return_value): Change
12155 lvalue reference type checks to general reference type checks.
12156 * amd64-tdep.c (amd64_classify): Likewise.
12157 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12158 Likewise.
12159 * arm-tdep.c (arm_type_align, arm_extract_return_value)
12160 (arm_store_return_value): Likewise.
12161 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12162 * c-typeprint.c (c_print_type): Likewise.
12163 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12164 (cplus_number_of_children, cplus_describe_child): Likewise.
12165 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12166 * completer.c (expression_completer): Likewise.
12167 * cp-support.c (make_symbol_overload_list_adl_namespace):
12168 Likewise.
12169 * darwin-nat-info.c (info_mach_region_command): Likewise.
12170 * dwarf2loc.c (entry_data_value_coerce_ref)
12171 (value_of_dwarf_reg_entry): Likewise.
12172 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12173 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12174 Likewise.
12175 * findvar.c (extract_typed_address, store_typed_address):
12176 Likewise.
12177 * gdbtypes.c (rank_one_type): Likewise.
12178 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12179 * infcall.c (value_arg_coerce): Likewise.
12180 * language.c (pointer_type): Likewise.
12181 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12182 Likewise.
12183 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12184 * mn10300-tdep.c (mn10300_type_align): Likewise.
12185 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12186 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12187 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12188 Likewise.
12189 * printcmd.c (print_formatted, x_command): Likewise.
12190 * python/py-type.c (typy_get_composite, typy_template_argument):
12191 Likewise.
12192 * python/py-value.c (valpy_referenced_value)
12193 (valpy_get_dynamic_type, value_has_field): Likewise.
12194 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12195 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12196 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12197 * spu-tdep.c (spu_scalar_value_p): Likewise.
12198 * symtab.c (lookup_symbol_aux): Likewise.
12199 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12200 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12201 Likewise.
12202 * valops.c (value_cast_pointers, value_cast)
12203 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12204 (value_struct_elt, value_struct_elt_bitpos)
12205 (value_find_oload_method_list, find_overload_match)
12206 (value_rtti_indirect_type): Likewise.
12207 * valprint.c (val_print_scalar_type_p, generic_val_print):
12208 Likewise.
12209 * value.c (value_actual_type, value_as_address, unpack_long)
12210 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12211 (coerce_ref): Likewise.
12212 * varobj.c (varobj_get_value_type): Likewise.
12213
12214 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12215
12216 PR gdb/14441
12217 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12218 table of constants.
12219 * python/lib/gdb/command/explore.py: Support exploring values
12220 of rvalue reference types.
12221 * python/lib/gdb/types.py: Implement get_basic_type() for
12222 rvalue reference types.
12223 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12224 constant.
12225 * python/py-value.c (valpy_getitem): Add an rvalue reference
12226 check.
12227 (valpy_reference_value): Add new parameter "refcode".
12228 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12229 New wrappers for valpy_reference_value().
12230 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12231 (gdbpy_invoke_xmethod): Likewise.
12232
12233 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12234
12235 PR gdb/14441
12236 * dwarf2read.c (process_die, read_type_die_1): Handle the
12237 DW_TAG_rvalue_reference_type DIE.
12238 (read_tag_reference_type): Add new parameter "refcode".
12239
12240 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12241
12242 PR gdb/14441
12243 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12244 (c_type_print_modifier, c_type_print_varspec_suffix)
12245 (c_type_print_base): Support printing rvalue reference types.
12246 * c-valprint.c (c_val_print, c_value_print): Support printing
12247 rvalue reference values.
12248
12249 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12250
12251 PR gdb/14441
12252 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12253 typename.
12254 * cp-support.c (replace_typedefs): Handle
12255 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12256 * python/py-type.c (typy_lookup_type): Likewise.
12257
12258 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12259
12260 PR gdb/14441
12261 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12262 * parse.c (insert_type): Change assert statement.
12263 (follow_types): Handle rvalue reference types.
12264 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12265 constant.
12266
12267 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12268
12269 PR gdb/14441
12270 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12271 value_ref() interface.
12272 * c-valprint.c (c_value_print): Likewise.
12273 * infcall.c (value_arg_coerce): Likewise.
12274 * python/py-value.c (valpy_reference_value): Likewise.
12275 * valops.c (value_cast, value_reinterpret_cast)
12276 (value_dynamic_cast, typecmp): Likewise.
12277 (value_ref): Parameterize by kind of return value reference type.
12278 * value.h (value_ref): Add new parameter "refcode".
12279
12280 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12281
12282 PR gdb/14441
12283 * dwarf2read.c (read_tag_reference_type): Use
12284 lookup_lvalue_reference_type() instead of lookup_reference_type().
12285 * eval.c (evaluate_subexp_standard): Likewise.
12286 * f-exp.y: Likewise.
12287 * gdbtypes.c (make_reference_type, lookup_reference_type):
12288 Generalize with rvalue reference types.
12289 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12290 convenience wrappers for lookup_reference_type().
12291 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12292 reference kind parameter.
12293 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12294 wrappers for lookup_reference_type().
12295 * guile/scm-type.c (gdbscm_type_reference): Use
12296 lookup_lvalue_reference_type() instead of lookup_reference_type().
12297 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12298 * parse.c (follow_types): Likewise.
12299 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12300 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12301 Likewise.
12302 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12303 (gdbpy_invoke_xmethod): Likewise.
12304 * stabsread.c: Provide extra argument to make_reference_type()
12305 call.
12306 * valops.c (value_ref, value_rtti_indirect_type): Use
12307 lookup_lvalue_reference_type() instead of lookup_reference_type().
12308
12309 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12310
12311 PR gdb/14441
12312 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12313 (TYPE_IS_REFERENCE): New macro.
12314 (struct type): Add rvalue_reference_type field.
12315 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12316
12317 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12318
12319 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12320 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12321 New function definition.
12322 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12323 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12324 New function declaration.
12325 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12326 * mi/mi-interp.h: New file.
12327 * solib.c (info_sharedlibrary_command): Replace for loop with
12328 ALL_SO_LIBS macro
12329 * solib.h (update_solib_list): New function declaration.
12330 (so_list_head): Move macro.
12331 * solist.h (ALL_SO_LIBS): New macro.
12332
12333 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12334
12335 * infcmd.c (post_create_inferior): Remove unused argument in
12336 call to solib_add.
12337 * remote.c (remote_start_remote): Likewise.
12338 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12339 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12340 (enable_break): Likewise.
12341 * solib.c (update_solib_list): Remove unused target argument
12342 and its documentation.
12343 (solib_add): Remove unused target argument. Remove unused
12344 argument in call to update_solib_list.
12345 (info_sharedlibrary_command): Remove unused argument in call
12346 to update_solib_list.
12347 (sharedlibrary_command): Remove unused argument in call to
12348 solib_add.
12349 (handle_solib_event): Likewise.
12350 (reload_shared_libraries): Likewise.
12351 * solib.h (solib_add): Remove unused target argument.
12352
12353 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
12354
12355 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12356 (s390_displaced_step_fixup): Cover relative branches with the
12357 default fixup handling. This fixes lack of support for some
12358 relative branch instructions.
12359
12360 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12361
12362 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12363 ptid from regcache.
12364
12365 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12366
12367 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12368 i386_darwin_store_inferior_registers): Use ptid from regcache.
12369
12370 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12371
12372 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12373 i386bsd_store_inferior_registers): Use ptid from regcache.
12374
12375 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12376
12377 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12378 hppaobsd_store_registers): Use ptid from regcache.
12379
12380 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12381
12382 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12383 hppanbsd_store_registers): Use ptid from regcache.
12384
12385 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12386
12387 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12388 from regcache. Use get_ptrace_pid.
12389
12390 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12391
12392 * corelow.c (get_core_register_section): Use ptid from regcache,
12393 update doc.
12394
12395 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12396
12397 * bsd-uthread.c (bsd_uthread_fetch_registers,
12398 bsd_uthread_store_registers): Use ptid from regcache, set and
12399 restore inferior_ptid.
12400
12401 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12402
12403 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12404 fetch_fp_regs, store_register, store_regs, store_fp_register,
12405 store_fp_regs): Use ptid from regcache.
12406
12407 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12408
12409 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12410 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12411 store_vfp_regs): Use ptid from regcache.
12412
12413 2017-03-17 Pedro Alves <palves@redhat.com>
12414
12415 PR remote/21188
12416 * ser-base.c (ser_base_wait_for): Add comment.
12417 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12418 version.
12419 * ser-unix.c (hardwire_raw): Remove reference to
12420 scb->current_timeout.
12421 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12422 (hardwire_ops): Install ser_base_readchar instead of
12423 hardwire_readchar.
12424 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12425 Remove fields.
12426
12427 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
12428
12429 PR gdb/19637
12430 * python/lib/gdb/printer/bound_registers.py: Add support for
12431 Python 3.
12432
12433 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12434
12435 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12436 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12437 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12438 byte_offset to subobj_byte_offset. Fix the handling of
12439 DWARF_VALUE_STACK on big-endian targets when coming via an
12440 implicit pointer.
12441 (dwarf2_evaluate_loc_desc): Adjust call to
12442 dwarf2_evaluate_loc_desc_full.
12443 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12444 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12445
12446 2017-03-16 Yao Qi <yao.qi@linaro.org>
12447
12448 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12449 and REVSH instructions.
12450
12451 2017-03-16 Yao Qi <yao.qi@linaro.org>
12452
12453 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12454 (arm_record_test): Declare.
12455 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12456 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12457 align with the manual.
12458 (thumb_record_misc): Adjust the code order to align with the
12459 manual.
12460 (thumb2_record_decode_insn_handler): Fix instruction matching.
12461 (instruction_reader_thumb): New class.
12462 (arm_record_test): New function.
12463
12464 2017-03-16 Yao Qi <yao.qi@linaro.org>
12465
12466 * arm-tdep.c (abstract_memory_reader): New class.
12467 (instruction_reader): New class.
12468 (extract_arm_insn): Add argument 'reader'. Callers updated.
12469 (decode_insn): Likewise.
12470
12471 2017-03-16 Doug Evans <dje@google.com>
12472
12473 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12474 member. Change type of TYPE member to SCM. All uses updated.
12475 (lsscm_make_lazy_string_smob): Add assert.
12476 (lsscm_make_lazy_string): Flag bad length values.
12477 (lsscm_elt_type): New function.
12478 (gdbscm_lazy_string_to_value): Rewrite to use
12479 lsscm_safe_lazy_string_to_value.
12480 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12481 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12482 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12483 in incoming type.
12484 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12485 * guile/scm-type.c (tyscm_scm_to_type): New function.
12486
12487 2017-03-15 Doug Evans <dje@google.com>
12488
12489 PR python/17728, python/18439, python/18779
12490 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12491 member. Change type of TYPE member to PyObject *. All uses updated.
12492 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12493 (gdbpy_create_lazy_string_object): Flag bad length values.
12494 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12495 Handle typedefs in incoming type.
12496 (stpy_lazy_string_elt_type): New function.
12497 (gdbpy_extract_lazy_string): Call it.
12498 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12499 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12500 typedefs in incoming type.
12501
12502 2017-03-16 Doug Evans <dje@google.com>
12503
12504 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12505 * guile/scm-type.c (tyscm_scm_to_type): New function.
12506
12507 2017-03-16 Jiong Wang <jiong.wang@arm.com>
12508
12509 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12510 "ULONGEST" for "skip".
12511
12512 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12513
12514 PR gdb/21220
12515 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12516 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12517 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12518 over ptrace peek/poke until end of buffer or error.
12519
12520 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12521
12522 * parse.c (length_of_subexp): Make static.
12523 * parser-defs.h (length_of_subexp): Remove.
12524
12525 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12526
12527 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12528 as well.
12529
12530 2017-03-14 Pedro Alves <palves@redhat.com>
12531
12532 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12533 (main): Use std::unique_ptr. Remove calls to
12534 cp_demangled_name_parse_free.
12535
12536 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12537
12538 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12539 alphabsd_store_inferior_registers): Use regcache->ptid instead
12540 of inferior_ptid.
12541
12542 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12543
12544 * aix-thread.c (aix_thread_fetch_registers,
12545 aix_thread_store_registers): Use regcache->ptid instead of
12546 inferior_ptid.
12547
12548 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12549
12550 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12551 store_gregs_to_thread, fetch_fpregs_from_thread,
12552 store_fpregs_to_thread): Use regcache->ptid instead of
12553 inferior_ptid.
12554
12555 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12556
12557 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12558 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12559 instead of inferior_ptid.
12560
12561 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12562
12563 * target.c (target_fetch_registers, target_store_registers): Add
12564 assert.
12565
12566 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12567
12568 * regcache.h (regcache_get_ptid): New function.
12569 * regcache.c (regcache_get_ptid): New function.
12570
12571 2017-03-13 Mark Wielaard <mark@klomp.org>
12572
12573 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12574
12575 2017-03-10 Keith Seitz <keiths@redhat.com>
12576
12577 PR c++/8218
12578 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12579
12580 2017-03-08 Pedro Alves <palves@redhat.com>
12581
12582 PR gdb/18360
12583 * infrun.c (start_step_over, do_target_resume, resume)
12584 (restart_threads): Assert we're not resuming a thread that is
12585 meant to be stopped.
12586 (infrun_thread_stop_requested_callback): Delete.
12587 (infrun_thread_stop_requested): If the thread is internally
12588 stopped, queue a pending stop event and clear the thread's
12589 inline-frame state.
12590 (handle_stop_requested): New function.
12591 (handle_syscall_event, handle_inferior_event_1): Use
12592 handle_stop_requested.
12593 (handle_stop_requested): New function.
12594 (handle_signal_stop): Set the thread's stop_signal here instead of
12595 at caller.
12596 (finish_step_over): Clear step over info unconditionally.
12597 (handle_signal_stop): If the user had interrupted the event
12598 thread, consider the stop a random signal.
12599 (handle_signal_stop) <signal arrived while stepping over
12600 breakpoint>: Don't restart threads here.
12601 (stop_waiting): Don't clear step-over info here.
12602
12603 2017-03-08 Pedro Alves <palves@redhat.com>
12604
12605 PR 21206
12606 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12607 goes to argument 2, not 1.
12608
12609 2017-03-08 Pedro Alves <palves@redhat.com>
12610
12611 PR cli/21218
12612 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12613 display_gdb_prompt.
12614 (command_line_input): Add comment.
12615
12616 2017-03-08 Pedro Alves <palves@redhat.com>
12617
12618 PR tui/21216
12619 * tui/tui-file.c (tui_file::write): New.
12620 * tui/tui-file.h (tui_file): Override "write".
12621 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12622 factored out from ...
12623 (tui_puts): ... here.
12624 (tui_putc): Use them.
12625 (tui_write): New function.
12626 * tui/tui-io.h (tui_write): Declare.
12627
12628 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12629
12630 * Makefile.in (SFILES): Replace "environ.c" with
12631 "common/environ.c".
12632 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12633 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12634 to...
12635 * common/environ.c: ... here.
12636 * environ.h: Moved to...
12637 * common/environ.h: ... here.
12638
12639 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12640
12641 * gdbarch.sh (pstring_ptr): New static function.
12642 (gdbarch_disassembler_options): Use it.
12643 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12644 not valid_disassembler_option->name.
12645 * gdbarch.c: Regenerate.
12646
12647 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12648
12649 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12650
12651 2017-03-07 Pedro Alves <palves@redhat.com>
12652
12653 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12654
12655 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
12656
12657 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12658 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12659 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12660 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12661
12662 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12663
12664 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12665
12666 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12667
12668 * remote.c (remote_add_target_side_commands): Use range-based
12669 for loop.
12670
12671 2017-03-03 Yao Qi <yao.qi@linaro.org>
12672
12673 PR gdb/21165
12674 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12675 value is lazy.
12676 * valprint.c (common_val_print): Likewise.
12677
12678 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12679
12680 * NEWS: Mention new set/show disassembler-options commands.
12681 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12682 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12683 (prospective_options): New static variable.
12684 (gdb_disassembler::gdb_disassembler): Initialize
12685 m_di.disassembler_options.
12686 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12687 (get_disassembler_options): New function.
12688 (set_disassembler_options): Likewise.
12689 (set_disassembler_options_sfunc): Likewise.
12690 (show_disassembler_options_sfunc): Likewise.
12691 (disassembler_options_completer): Likewise.
12692 (_initialize_disasm): Likewise.
12693 * disasm.h (get_disassembler_options): New prototype.
12694 (set_disassembler_options): Likewise.
12695 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12696 (gdbarch_verify_disassembler_options): Likewise.
12697 * gdbarch.c: Regenerate.
12698 * gdbarch.h: Likewise.
12699 * arm-tdep.c (num_disassembly_options): Delete.
12700 (set_disassembly_style): Likewise.
12701 (arm_disassembler_options): New static variable.
12702 (set_disassembly_style_sfunc): Convert short style name into long
12703 option name. Call set_disassembler_options.
12704 (show_disassembly_style_sfunc): New function.
12705 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12706 set_gdbarch_verify_disassembler_options.
12707 (_initialize_arm_tdep): Delete regnames variable and update callers.
12708 (arm_disassembler_options): Initialize.
12709 (disasm_options): New variable.
12710 (num_disassembly_options): Rename from this...
12711 (num_disassembly_styles): ...to this. Compute by scanning through
12712 disasm_options.
12713 (valid_disassembly_styles): Initialize using disasm_options.
12714 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12715 set_arm_regname_option.
12716 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12717 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12718 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12719 set_gdbarch_verify_disassembler_options.
12720 * s390-tdep.c (s390_disassembler_options): New static variable.
12721 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12722 set_gdbarch_verify_disassembler_options.
12723
12724 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12725
12726 * remote.c (remote_add_target_side_condition): Remove "struct"
12727 keyword from range-based for loop.
12728
12729 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12730
12731 * remote.c (remote_add_target_side_condition): Use range-based
12732 for loop. Update comment.
12733
12734 2017-02-27 Yao Qi <yao.qi@linaro.org>
12735
12736 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12737
12738 2017-02-26 Alan Hayward <alan.hayward@arm.com>
12739
12740 * regcache.c (regcache_raw_update): New function.
12741 (regcache_raw_read): Move code to regcache_raw_update.
12742 * regcache.h (regcache_raw_update): New declaration.
12743 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12744
12745 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12746
12747 * dwarf2read.c (create_debug_type_hash_table): Initialize
12748 header.signature and header.type_offset_in_tu.
12749
12750 2017-02-24 Pedro Alves <palves@redhat.com>
12751
12752 * symtab.c (make_file_symbol_completion_list_1): Use
12753 add_symtab_completions.
12754
12755 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12756
12757 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12758
12759 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12760
12761 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12762 I386_MAX_REGISTER_SIZE.
12763 (i386_pseudo_register_write): Likewise.
12764 (i386_process_record): Likewise.
12765 * i387-tdep.c (i387_supply_xsave): Likewise.
12766 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12767 (store_register): Likewise.
12768
12769 2017-02-23 Pedro Alves <palves@redhat.com>
12770
12771 * ada-lang.c: Include "common/function-view.h".
12772 (ada_iterate_over_symbols): Adjust to use function_view as
12773 callback type.
12774 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12775 (ada_make_symbol_completion_list): Use a lambda.
12776 (ada_exc_search_name_matches): Delete.
12777 (name_matches_regex): New.
12778 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12779 * compile/compile-c-support.c: Include "common/function-view.h".
12780 (print_one_macro): Change prototype to accept a ui_file pointer.
12781 (write_macro_definitions): Use a lambda.
12782 * dwarf2read.c: Include "common/function-view.h".
12783 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12784 (dw2_expand_symtabs_matching): Adjust to use function_view as
12785 callback type.
12786 * language.h: Include "common/function-view.h".
12787 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12788 function_view as callback type.
12789 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12790 * linespec.c: Include "common/function-view.h".
12791 (collect_info::add_symbol): New method.
12792 (struct symbol_and_data_callback, iterate_inline_only, struct
12793 symbol_matcher_data, iterate_name_matcher): Delete.
12794 (iterate_over_all_matching_symtabs): Adjust to use function_view
12795 as callback type and lambdas.
12796 (iterate_over_file_blocks): Adjust to use function_view as
12797 callback type.
12798 (decode_compound_collector): Now a class with private fields.
12799 (decode_compound_collector::release_symbols): New method.
12800 (collect_one_symbol): Rename to...
12801 (decode_compound_collector::operator()): ... this and adjust.
12802 (lookup_prefix_sym): decode_compound_collector construction bits
12803 move to decode_compound_collector ctor. Pass the
12804 decode_compound_collector object directly as callback. Remove
12805 cleanups and use decode_compound_collector::release_symbols
12806 instead.
12807 (symtab_collector): Now a class with private fields.
12808 (symtab_collector::release_symtabs): New method.
12809 (add_symtabs_to_list): Rename to...
12810 (symtab_collector::operator()): ... this and adjust.
12811 (collect_symtabs_from_filename): symtab_collector construction
12812 bits move to symtab_collector ctor. Pass the symtab_collector
12813 object directly as callback. Remove cleanups and use
12814 symtab_collector::release_symtabs instead.
12815 (collect_symbols): Delete.
12816 (add_matching_symbols_to_info): Use lambdas.
12817 * macrocmd.c (print_macro_callback): Delete.
12818 (info_macro_command): Use a lambda.
12819 (info_macros_command): Pass print_macro_definition as callable
12820 directly.
12821 (print_one_macro): Remove 'ignore' parameter.
12822 (macro_list_command): Adjust.
12823 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12824 (macro_for_each_data::user_data): Delete field.
12825 (foreach_macro): Adjust to call the function_view.
12826 (macro_for_each): Adjust to use function_view as callback type.
12827 (foreach_macro_in_scope): Adjust to call the function_view.
12828 (macro_for_each_in_scope): Adjust to use function_view as callback
12829 type.
12830 * macrotab.h: Include "common/function-view.h".
12831 (macro_callback_fn): Declare a prototype instead of a pointer.
12832 Remove "user_data" parameter.
12833 (macro_for_each, macro_for_each_in_scope): Adjust to use
12834 function_view as callback type.
12835 * psymtab.c (partial_map_expand_apply)
12836 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12837 Adjust to use function_view as callback type and to return bool.
12838 (psym_expand_symtabs_matching): Adjust to use function_view as
12839 callback types.
12840 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12841 to use function_view as callback type and to return bool.
12842 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12843 callback types.
12844 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12845 as callback types.
12846 * symfile.h: Include "common/function-view.h".
12847 (expand_symtabs_file_matcher_ftype)
12848 (expand_symtabs_symbol_matcher_ftype)
12849 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12850 return bool.
12851 (quick_symbol_functions::map_symtabs_matching_filename)
12852 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12853 function_view as callback type and return bool.
12854 (expand_symtabs_matching): Adjust to use function_view as callback
12855 type.
12856 (maintenance_expand_name_matcher)
12857 (maintenance_expand_file_matcher): Delete.
12858 (maintenance_expand_symtabs): Use lambdas.
12859 * symtab.c (iterate_over_some_symtabs): Adjust to use
12860 function_view as callback types and return bool.
12861 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12862 of a cleanup.
12863 (lookup_symtab_callback): Delete.
12864 (lookup_symtab): Use a lambda.
12865 (iterate_over_symbols): Adjust to use function_view as callback
12866 type.
12867 (struct search_symbols_data, search_symbols_file_matches)
12868 (search_symbols_name_matches): Delete.
12869 (search_symbols): Use a pair of lambdas.
12870 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12871 (symtab_expansion_callback): Delete.
12872 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12873 * symtab.h: Include "common/function-view.h".
12874 (iterate_over_some_symtabs): Adjust to use function_view as
12875 callback type and return bool.
12876 (iterate_over_symtabs): Adjust to use function_view as callback
12877 type.
12878 (symbol_found_callback_ftype): Remove 'data' parameter and return
12879 bool.
12880 (iterate_over_symbols): Adjust to use function_view as callback
12881 type.
12882
12883 2017-02-23 Pedro Alves <palves@redhat.com>
12884
12885 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12886 (%.o) <unittests/%.c>: New pattern.
12887 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12888 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12889 * common/function-view.h: New file.
12890 * unittests/function-view-selftests.c: New file.
12891 * configure: Regenerate.
12892
12893 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12894
12895 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12896 inferior_ptid.
12897 * go32-nat.c (go32_thread_alive): Likewise.
12898
12899 2017-02-23 Yao Qi <yao.qi@linaro.org>
12900
12901 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12902 delete.
12903
12904 2017-02-23 Yao Qi <yao.qi@linaro.org>
12905
12906 * varobj.c (varobj_clear_saved_item): Use delete instead of
12907 xfree.
12908 (update_dynamic_varobj_children): Likewise.
12909
12910 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12911
12912 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12913
12914 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12915
12916 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12917 m_enum_value to 0 in default constructor.
12918
12919 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12920
12921 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12922 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12923 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12924 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12925 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12926 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12927 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12928 IS_STORE_CONDITIONAL_INSN.
12929
12930 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12931
12932 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12933
12934 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12935
12936 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12937
12938 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12939
12940 * dwarf2read.c (skip_one_die, read_attribute_value)
12941 (dwarf2_const_value_attr, dump_die_shallow)
12942 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12943 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12944
12945 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12946
12947 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12948 (dwarf_parse_macro_header): Accept DWARF version 5.
12949 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12950
12951 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12952
12953 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12954 DW_AT_GNU_*.
12955 * common/common-exceptions.h (enum errors): Likewise.
12956 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12957 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12958 (dwarf_expr_context::execute_stack_op): Likewise.
12959 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12960 Likewise.
12961 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12962 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12963 (show_entry_values_debug, call_site_to_target_addr)
12964 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12965 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12966 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12967 (value_of_dwarf_block_entry, indirect_pieced_value)
12968 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12969 (disassemble_dwarf_expression): Likewise.
12970 * dwarf2read.c (process_die, inherit_abstract_dies)
12971 (read_call_site_scope): Likewise.
12972 * gdbtypes.h (struct func_type, struct call_site_parameter)
12973 (struct call_site): Likewise.
12974 * stack.c (read_frame_arg): Likewise.
12975 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12976
12977 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12978
12979 * defs.h (read_unsigned_leb128): New declaration.
12980 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12981 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12982 (dwarf2_find_location_expression): Call also
12983 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12984 * dwarf2loc.h (dwarf2_version): New declaration.
12985 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12986 rnglists.
12987 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12988 .debug_rnglists.
12989 (struct dwop_section_names): Add loclists_dwo.
12990 (dwop_section_names): Add .debug_loclists.dwo.
12991 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12992 (struct dwarf2_per_cu_data): Add dwarf_version.
12993 (struct dwo_sections): Add loclists.
12994 (struct attr_abbrev): Add implicit_const.
12995 (read_indirect_line_string): New declaration.
12996 (read_unsigned_leb128): Delete declaration.
12997 (rcuh_kind): New definition.
12998 (read_and_check_comp_unit_head): Change parameter
12999 is_debug_types_section to section_kind.
13000 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13001 (read_comp_unit_head): Change parameter abfd to section, add parameter
13002 section_kind. Handle DWARF-5.
13003 (error_check_comp_unit_head): Accept also DWARF version 5.
13004 (read_and_check_comp_unit_head): Change parameter
13005 is_debug_types_section to section_kind.
13006 (read_and_check_type_unit_head): Delete function.
13007 (read_abbrev_offset): Handle DWARF-5.
13008 (create_debug_type_hash_table): Add parameter section_kind. Process
13009 only DW_UT_type. Use signature and type_offset_in_tu from struct
13010 comp_unit_head.
13011 (create_debug_types_hash_table): Update create_debug_type_hash_table
13012 caller.
13013 (create_all_type_units): Call create_debug_type_hash_table.
13014 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13015 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13016 caller.
13017 (skip_one_die): Handle DW_FORM_implicit_const.
13018 (dwarf2_rnglists_process): New function.
13019 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13020 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13021 (read_attribute_value): Handle DW_FORM_implicit_const,
13022 DW_FORM_line_strp.
13023 (read_attribute): Handle DW_FORM_implicit_const.
13024 (read_indirect_string_at_offset_from): New function from
13025 read_indirect_string_at_offset.
13026 (read_indirect_string_at_offset): Call
13027 read_indirect_string_at_offset_from.
13028 (read_indirect_line_string_at_offset): New function.
13029 (read_indirect_string): New function comment.
13030 (read_indirect_line_string): New function.
13031 (read_unsigned_leb128): Make it global.
13032 (dwarf2_string_attr): Handle DWARF-5.
13033 (add_include_dir_stub, read_formatted_entries): New functions.
13034 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13035 Handle DWARF-5.
13036 (per_cu_header_read_in): Update read_comp_unit_head caller.
13037 (dwarf2_version): New function.
13038 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13039 rnglists.
13040 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13041 fields.
13042
13043 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13044
13045 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13046
13047 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13048
13049 * dwarf2read.c (dwarf2_ranges_process): New function from
13050 dwarf2_ranges_read.
13051 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13052 dwarf2_ranges_process.
13053
13054 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13055
13056 * dwarf2read.c (create_debug_type_hash_table): New function from
13057 create_debug_types_hash_table.
13058 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13059 (create_all_type_units, open_and_init_dwo_file): Update
13060 create_debug_types_hash_table callers.
13061
13062 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13063
13064 PR gdb/16188
13065 * fork-child.c (trace_start_error): Fix thinko. va_end should
13066 refer to 'ap', not 'args'.
13067
13068 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13069 Pedro Alves <palves@redhat.com>
13070
13071 PR gdb/16188
13072 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13073 calls succeeded.
13074 * fork-child.c (trace_start_error): New function.
13075 (trace_start_error_with_name): Likewise.
13076 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13077 * inf-ptrace.c (inf_ptrace_me): Likewise.
13078 * inferior.h (trace_start_error): New prototype.
13079 (trace_start_error_with_name): Likewise.
13080
13081 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13082
13083 PR gdb/21164
13084 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13085 NULL before using it.
13086 * symmisc.c (maintenance_print_symbols): Likewise.
13087 (maintenance_print_msymbols): Likewise.
13088
13089 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13090
13091 * NEWS: Add record Python bindings entry.
13092
13093 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13094
13095 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13096 py-record-full.o.
13097 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13098 * python/py-record-btrace.c, python/py-record-btrace.h,
13099 python/py-record-full.c, python/py-record-full.h: New file.
13100 * python/py-record.c: Add include for py-record-btrace.h and
13101 py-record-full.h.
13102 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13103 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13104 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13105 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13106 New definition.
13107 (gdbpy_initialize_btrace): New export.
13108 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13109
13110 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13111
13112 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13113 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13114 * python/py-record.c: New file.
13115 * python/python-internal.h (gdbpy_start_recording,
13116 gdbpy_current_recording, gdpy_stop_recording,
13117 gdbpy_initialize_record): New export.
13118 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13119 (python_GdbMethods): Add gdbpy_start_recording,
13120 gdbpy_current_recording and gdbpy_stop_recording.
13121
13122 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13123
13124 * record-btrace.c (record_btrace_record_method): New function.
13125 (init_record_btrace_ops): Initialize to_record_method.
13126 * record-full.c (record_full_record_method): New function.
13127 (init_record_full_ops, init_record_full_core_ops): Add
13128 record_full_record_method.
13129 * record.h (enum record_method): New enum.
13130 * target-debug.h (target_debug_print_enum_record_method: New define.
13131 * target-delegates.c: Regenerate.
13132 * target.c (target_record_method): New function.
13133 * target.h: Include record.h.
13134 (struct target_ops) <to_record_method>: New field.
13135 (target_record_method): New export.
13136
13137 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13138
13139 * record.h (record_start, record_stop): New export.
13140 * record.c (record_start, record_stop): New function.
13141
13142 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13143
13144 * btrace.c (btrace_fetch): Copy function call segments pointer
13145 into a vector.
13146 (btrace_clear): Clear the vector.
13147 (btrace_find_insn_by_number): Use binary search to find the correct
13148 function call segment.
13149 * btrace.h (brace_fun_p): New typedef.
13150 (struct btrace_thread_info) <functions>: New field.
13151
13152 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13153
13154 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13155 * btrace.c (btrace_decode_error): ... here. New function.
13156 * btrace.h (btrace_decode_error): New export.
13157
13158 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13159
13160 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13161 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13162 btrace_find_insn_by_number): Remove special case for gaps.
13163 * btrace.h (btrace_insn_get_error): New export.
13164 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13165 * record-btrace.c (btrace_insn_history): Print number for gaps.
13166 (record_btrace_info, record_btrace_goto): Handle gaps.
13167
13168 2017-02-14 Tom Tromey <tom@tromey.com>
13169
13170 PR python/13598:
13171 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13172 event.
13173 * python/py-evts.c (gdbpy_initialize_py_events): Add
13174 before_prompt registry.
13175 * python/py-events.h (events_object) <before_prompt>: New field.
13176
13177 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
13178
13179 * btrace.c (ftrace_new_switch): Preserve up link and flags.
13180
13181 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
13182
13183 * symfile (_initialize_symfile): Add usage text to the load command's
13184 help text.
13185
13186 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
13187
13188 * utils.c (defaulted_query): Don't query on secondary UIs.
13189
13190 2017-02-10 Tom Tromey <tom@tromey.com>
13191
13192 * rust-lang.c (rust_get_disr_info): Remove unused variable.
13193
13194 2017-02-10 Tom Tromey <tom@tromey.com>
13195
13196 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13197 "cleanup" local.
13198 * python/py-type.c (typy_legacy_template_argument): Remove
13199 unnecessary "cleanup" local.
13200
13201 2017-02-10 Tom Tromey <tom@tromey.com>
13202
13203 * python/python.c (do_start_initialization): New function, from
13204 _initialize_python.
13205 (_initialize_python): Call do_start_initialization.
13206 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13207 goto.
13208
13209 2017-02-10 Tom Tromey <tom@tromey.com>
13210
13211 * python/py-prettyprint.c (pretty_print_one_value): Use
13212 gdbpy_ref.
13213
13214 2017-02-10 Tom Tromey <tom@tromey.com>
13215
13216 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13217 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13218 gdbpy_ref.
13219 * python/py-type.c (field_new): Use gdbpy_ref.
13220 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13221 gdbpy_ref.
13222 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13223 (py_free_pspace): Likewise.
13224 (pspace_to_pspace_object): Likewise.
13225 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13226 (py_free_objfile): Likewise.
13227 (objfile_to_objfile_object): Likewise.
13228 * python/py-inferior.c (delete_thread_object): Use
13229 gdbpy_ref.
13230 (infpy_read_memory): Likewise.
13231 (py_free_inferior): Likewise.
13232 * python/py-evtregistry.c (create_eventregistry_object): Use
13233 gdbpy_ref.
13234 * python/py-event.c (create_event_object): Use gdbpy_ref.
13235
13236 2017-02-10 Tom Tromey <tom@tromey.com>
13237
13238 * python/py-ref.h (gdbpy_ref_policy): Now a template.
13239 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13240 used.
13241 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13242 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13243 python/py-exitedevent.c, python/py-finishbreakpoint.c,
13244 python/py-framefilter.c, python/py-function.c,
13245 python/py-inferior.c, python/py-infevents.c,
13246 python/py-linetable.c, python/py-newobjfileevent.c,
13247 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13248 python/py-signalevent.c, python/py-stopevent.c,
13249 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13250 python/py-unwind.c, python/py-utils.c, python/py-value.c,
13251 python/py-varobj.c, python/py-xmethods.c, python/python.c,
13252 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13253
13254 2017-02-10 Tom Tromey <tom@tromey.com>
13255
13256 * ui-out.h (ui_out_emit_type): New class.
13257 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13258 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13259 and ui_out_emit_tuple.
13260 (enumerate_locals): Likewise.
13261 (py_mi_print_variables, py_print_locals, py_print_args): Use
13262 ui_out_emit_list.
13263 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13264 ui_out_emit_list.
13265 * common/gdb_optional.h: New file.
13266
13267 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13268
13269 * MAINTAINERS (Write After Approval): Update my e-mail address.
13270
13271 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13272
13273 PR gdb/21122
13274 * breakpoint.c (_initialize_breakpoint): Update the help description
13275 of the 'commands' command to indicate that it takes a list argument.
13276
13277 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
13278
13279 * interps.c (current_interp_set_logging): Remove "return".
13280
13281 2017-02-09 Gary Benson <gbenson@redhat.com>
13282
13283 * symtab.c (add_symtab_completions): Prevent NULL pointer
13284 dereference.
13285
13286 2017-02-08 Pedro Alves <palves@redhat.com>
13287
13288 * interps.c (interp::interp): Remove reference to quiet_p.
13289 (interp_set): Make static. Remove dead "Switching to" output
13290 code.
13291 (interp_quiet_p, interp_set_quiet): Delete.
13292 (interpreter_exec_cmd): Don't set the interpreter quiet.
13293 * interps.h (interp_quiet_p): Make static.
13294 (class interp) <quiet_p>: Remove field
13295
13296 2017-02-08 Jerome Guitton <guitton@adacore.com>
13297
13298 * cli/cli-decode.c (find_command_name_length): Make it extern.
13299 * cli/cli-decode.h (find_command_name_length): Declare.
13300 * cli/cli-script.c (command_name_equals, line_first_arg):
13301 New functions.
13302 (process_next_line): Use cli-decode to parse command names.
13303 (build_command_line): Make args a constant pointer.
13304
13305 2017-02-08 Jerome Guitton <guitton@adacore.com>
13306
13307 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13308 Remove case-insensitive search.
13309
13310 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
13311
13312 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13313 at the end of the line. Avoids an ARI warning.
13314
13315 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
13316
13317 * NEWS: Mention support for record/replay of Intel 64 rdrand and
13318 rdseed instructions.
13319 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13320
13321 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
13322
13323 PR tdep/20936
13324 Provide and use sparc32 and sparc64 target description XML files.
13325 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13326 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13327 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13328 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13329 * features/sparc/sparc32-solaris.xml: New file.
13330 * features/sparc/sparc64-solaris.xml: New file.
13331 * features/sparc/sparc32-solaris.c: Generated.
13332 * features/sparc/sparc64-solaris.c: Generated.
13333 * sparc-tdep.h: Account for differences in target descriptions.
13334 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13335 (sparc32_register_type): Use target provided registers.
13336 (validate_tdesc_registers): New function.
13337 (sparc32_gdbarch_init): Use tdesc_has_registers.
13338 Set pseudoregister functions.
13339 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13340 (sparc64_register_type): Use target provided registers.
13341 (sparc64_init_abi): Set pseudoregister functions.
13342
13343 2017-02-03 Tom Tromey <tom@tromey.com>
13344
13345 PR rust/21097:
13346 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13347 with a single member.
13348
13349 2017-02-03 Pedro Alves <palves@redhat.com>
13350
13351 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13352 (cli_interp_base::~cli_interp_base): New.
13353 (cli_interp): New struct.
13354 (as_cli_interp): Cast the interp itself to cli_interp.
13355 (cli_interpreter_pre_command_loop): Rename to ...
13356 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
13357 parameter.
13358 (cli_interpreter_init): Rename to ...
13359 (cli_interp::init): ... this. Remove 'self' parameter. Use
13360 boolean. Make extern.
13361 (cli_interpreter_resume): Rename to ...
13362 (cli_interp::resume): ... this. Remove 'data' parameter. Make
13363 extern.
13364 (cli_interpreter_suspend): Rename to ...
13365 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
13366 extern.
13367 (cli_interpreter_exec): Rename to ...
13368 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13369 extern.
13370 (cli_interpreter_supports_command_editing): Rename to ...
13371 (cli_interp_base::supports_command_editing): ... this. Remove
13372 'interp' parameter. Make extern.
13373 (cli_ui_out): Rename to ...
13374 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13375 Make extern.
13376 (cli_set_logging): Rename to ...
13377 (cli_interp_base::set_logging): ... this. Remove 'interp'
13378 parameter. Make extern.
13379 (cli_interp_procs): Delete.
13380 (cli_interp_factory): Adjust to use "new".
13381 * cli/cli-interp.h: Include "interps.h".
13382 (struct cli_interp_base): New struct.
13383 * interps.c (struct interp): Delete. Fields moved to interps.h.
13384 (interp_new): Delete.
13385 (interp::interp, interp::~interp): New.
13386 (interp_set): Use bool, and return void. Assume the interpreter
13387 has suspend, init and resume methods, and that the all return
13388 void.
13389 (set_top_level_interpreter): interp_set returns void.
13390 (interp_ui_out): Adapt.
13391 (current_interp_set_logging): Adapt.
13392 (interp_data): Delete.
13393 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13394 (interp_exec): Adapt.
13395 (top_level_interpreter_data): Delete.
13396 * interps.h (interp_init_ftype, interp_resume_ftype)
13397 (interp_suspend_ftype, interp_exec_ftype)
13398 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13399 (class interp): New.
13400 (interp_new): Delete.
13401 (interp_set): Now returns void. Use bool.
13402 (interp_data, top_level_interpreter_data): Delete.
13403 * mi/mi-common.h: Include interps.h.
13404 (class mi_interp): Inherit from interp. Define a ctor. Declare
13405 init, resume, suspect, exec, interp_ui_out, set_logging and
13406 pre_command_loop methods.
13407 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13408 (mi_interpreter_init): Rename to ...
13409 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13410 bool, return void and make extern. Adjust.
13411 (mi_interpreter_resume): ... Rename to ...
13412 (mi_interp::resume): ... this. Remove the 'data' parameter,
13413 return void and make extern. Adjust.
13414 (mi_interpreter_suspend): ... Rename to ...
13415 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13416 return void and make extern. Adjust.
13417 (mi_interpreter_exec): ... Rename to ...
13418 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13419 extern. Adjust.
13420 (mi_interpreter_pre_command_loop): ... Rename to ...
13421 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13422 parameter and make extern.
13423 (mi_on_normal_stop_1): Adjust.
13424 (mi_ui_out): Rename to ...
13425 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13426 parameter and make extern. Adjust.
13427 (mi_set_logging): Rename to ...
13428 (mi_interp::set_logging): ... this. Remove the 'interp'
13429 parameter and make extern. Adjust.
13430 (mi_interp_procs): Delete.
13431 (mi_interp_factory): Adjust to use 'new'.
13432 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13433 (mi_print_exception, mi_execute_command, mi_load_progress):
13434 Adjust.
13435 * tui/tui-interp.c (tui_interp): New class.
13436 (as_tui_interp): Return a tui_interp pointer.
13437 (tui_on_normal_stop, tui_on_signal_received)
13438 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13439 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13440 to use interp::interp_ui_out.
13441 (tui_init): Rename to ...
13442 (tui_interp::init): ... this. Remove the 'self' parameter, use
13443 bool, return void and make extern. Adjust.
13444 (tui_resume): Rename to ...
13445 (tui_interp::resume): ... this. Remove the 'data' parameter,
13446 return void and make extern. Adjust.
13447 (tui_suspend): Rename to ...
13448 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13449 return void and make extern. Adjust.
13450 (tui_ui_out): Rename to ...
13451 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13452 parameter, and make extern. Adjust.
13453 (tui_exec): Rename to ...
13454 (tui_interp::exec): ... this. Remove the 'data' parameter and
13455 make extern.
13456 (tui_interp_procs): Delete.
13457 (tui_interp_factory): Use "new".
13458
13459 2017-02-02 Tom Tromey <tom@tromey.com>
13460
13461 * rust-exp.y (ends_raw_string, space_then_number)
13462 (rust_identifier_start_p): Return bool.
13463 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13464 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13465 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13466 (rust_chartype_p): Return bool.
13467 (val_print_struct, rust_print_struct_def, rust_print_type):
13468 Update.
13469 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13470 Return bool.
13471
13472 2017-02-02 Tom Tromey <tom@tromey.com>
13473
13474 * rust-lang.c: Reindent.
13475
13476 2017-02-02 Tom Tromey <tom@tromey.com>
13477
13478 * rust-lang.h (rust_crate_for_block): Update.
13479 * rust-lang.c (rust_crate_for_block): Return std::string.
13480 (rust_get_disr_info): Use std:;string, not
13481 gdb::unique_xmalloc_ptr.
13482 * rust-exp.y (crate_name): Update.
13483
13484 2017-02-02 Pedro Alves <palves@redhat.com>
13485
13486 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13487 field out of gdb_disassembler_test and make it static.
13488
13489 2017-02-02 Pedro Alves <palves@redhat.com>
13490
13491 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13492 mi1_interp and mi_interp fields.
13493
13494 2017-02-02 Pedro Alves <palves@redhat.com>
13495
13496 * cli/cli-interp.c (struct saved_output_files, saved_output):
13497 Moved from cli/cli-logging.c.
13498 (cli_set_logging): New function.
13499 (cli_interp_procs): Install cli_set_logging.
13500 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13501 Declare.
13502 * cli/cli-logging.c (struct saved_output_files, saved_output):
13503 Moved to cli/cli-interp.c.
13504 (pop_output_files): Don't save outputs here.
13505 (make_logging_output): New function.
13506 (handle_redirections): Don't build tee nor save previous outputs
13507 here.
13508 * interps.c (current_interp_set_logging): Change prototype.
13509 Assume there's always a set_logging_proc method installed.
13510 * interps.h (interp_set_logging_ftype): Change prototype.
13511 (current_interp_set_logging): Change prototype and adjust comment.
13512 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13513 use make_logging_output.
13514 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13515 2017-02-02 Pedro Alves <palves@redhat.com>
13516
13517 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13518 from ...
13519 (set_logging_overwrite): ... here.
13520 (logging_no_redirect_file): Delete.
13521 (set_logging_redirect): Don't handle redirection on the fly.
13522 Instead warn that "logging off" / "logging on" is necessary.
13523 (pop_output_files): Delete references to logging_no_redirect_file.
13524 (show_logging_command): Always speak in terms of what will happen
13525 once logging is reenabled.
13526
13527 2017-02-02 Pedro Alves <palves@redhat.com>
13528
13529 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13530
13531 2017-02-02 Pedro Alves <palves@redhat.com>
13532
13533 * disasm.c (gdb_pretty_print_insn): Rename to ...
13534 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13535 Remove gdbarch parameter. Adapt to clear the object's buffers
13536 instead of allocating new buffers, and to print using the object's
13537 gdb_disassembler instead of calling gdb_print_insn.
13538 (dump_insns): Use gdb_pretty_print_disassembler.
13539 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13540 (gdb_pretty_print_disassembler): New class.
13541 * record-btrace.c (btrace_insn_history): Use
13542 gdb_pretty_print_disassembler.
13543
13544 2017-02-02 Pedro Alves <palves@redhat.com>
13545
13546 * ada-lang.c (type_as_string): Use string_file.
13547 * ada-valprint.c (ada_print_floating): Use string_file.
13548 * ada-varobj.c (ada_varobj_scalar_image)
13549 (ada_varobj_get_value_image): Use string_file.
13550 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13551 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13552 * breakpoint.c (update_inserted_breakpoint_locations)
13553 (insert_breakpoint_locations, reattach_breakpoints)
13554 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13555 (print_it_watchpoint): Use string_file.
13556 (save_breakpoints): Use stdio_file.
13557 * c-exp.y (oper): Use string_file.
13558 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13559 tee_file.
13560 (pop_output_files): Use delete.
13561 (handle_redirections): Use stdio_file and tee_file.
13562 * cli/cli-setshow.c (do_show_command): Use string_file.
13563 * compile/compile-c-support.c (c_compute_program): Use
13564 string_file.
13565 * compile/compile-c-symbols.c (generate_vla_size): Take a
13566 'string_file &' instead of a 'ui_file *'.
13567 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13568 of a 'ui_file *'. Use string_file.
13569 (generate_c_for_variable_locations): Take a 'string_file &'
13570 instead of a 'ui_file *'.
13571 * compile/compile-internal.h (generate_c_for_for_one_variable):
13572 Take a 'string_file &' instead of a 'ui_file *'.
13573 * compile/compile-loc2c.c (push, pushf, unary, binary)
13574 (print_label, pushf_register_address, pushf_register)
13575 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13576 'ui_file *'. Adjust.
13577 * compile/compile.c (compile_to_object): Use string_file.
13578 * compile/compile.h (compile_dwarf_expr_to_c)
13579 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13580 'ui_file *'.
13581 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13582 (replace_typedefs_qualified_name): Use string_file and
13583 obstack_copy0.
13584 * disasm.c (gdb_pretty_print_insn): Use string_file.
13585 (gdb_disassembly): Adjust reference the null_stream global.
13586 (do_ui_file_delete): Delete.
13587 (gdb_insn_length): Use null_stream.
13588 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13589 * dwarf2loc.c (dwarf2_compile_property_to_c)
13590 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13591 'string_file &' instead of a 'ui_file *'.
13592 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13593 * dwarf2read.c (do_ui_file_peek_last): Delete.
13594 (dwarf2_compute_name): Use string_file.
13595 * event-top.c (gdb_setup_readline): Use stdio_file.
13596 * gdbarch.sh (verify_gdbarch): Use string_file.
13597 * gdbtypes.c (safe_parse_type): Use null_stream.
13598 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13599 string_file.
13600 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13601 'string_file *' instead of a 'ui_file *'.
13602 (gdbscm_arch_disassemble): Use string_file.
13603 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13604 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13605 inherits from ui_file.
13606 (ioscm_file_port_delete, ioscm_file_port_rewind)
13607 (ioscm_file_port_put): Delete.
13608 (ioscm_file_port_write): Rename to ...
13609 (ioscm_file_port::write): ... this. Remove file_port_magic
13610 checks.
13611 (ioscm_file_port_new): Delete.
13612 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13613 ui_file_up.
13614 * guile/scm-type.c (tyscm_type_name): Use string_file.
13615 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13616 Use string_file.
13617 * infcmd.c (print_return_value_1): Use string_file.
13618 * infrun.c (print_target_wait_results): Use string_file.
13619 * language.c (add_language): Use string_file.
13620 * location.c (explicit_to_string_internal): Use string_file.
13621 * main.c (captured_main_1): Use null_file.
13622 * maint.c (maintenance_print_architecture): Use stdio_file.
13623 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13624 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13625 event_channel>: Change type to mi_console_file pointer.
13626 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13627 (mi_console_file_delete): Delete.
13628 (struct mi_console_file): Delete.
13629 (mi_console_file_magic): Delete.
13630 (mi_console_file_new): Delete.
13631 (mi_console_file::mi_console_file): New.
13632 (mi_console_file_delete): Delete.
13633 (mi_console_file_fputs): Delete.
13634 (mi_console_file::write): New.
13635 (mi_console_raw_packet): Delete.
13636 (mi_console_file::flush): New.
13637 (mi_console_file_flush): Delete.
13638 (mi_console_set_raw): Rename to ...
13639 (mi_console_file::set_raw): ... this.
13640 * mi/mi-console.h (class mi_console_file): New class.
13641 (mi_console_file_new, mi_console_set_raw): Delete.
13642 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13643 (mi_set_logging): Use delete and tee_file. Adjust.
13644 * mi/mi-main.c (output_register): Use string_file.
13645 (mi_cmd_data_evaluate_expression): Use string_file.
13646 (mi_cmd_data_read_memory): Use string_file.
13647 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13648 * mi/mi-out.c (mi_ui_out::main_stream): New.
13649 (mi_ui_out::rewind): Use main_stream and
13650 string_file.
13651 (mi_ui_out::put): Use main_stream and string_file.
13652 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13653 Allocate a 'string_file' instead.
13654 (mi_out_new): Don't allocate a mem_fileopen stream here.
13655 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13656 (mi_ui_out::main_stream): Declare method.
13657 * printcmd.c (eval_command): Use string_file.
13658 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13659 * python/py-arch.c (archpy_disassemble): Use string_file.
13660 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13661 * python/py-frame.c (frapy_str): Use string_file.
13662 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13663 Use string_file.
13664 * python/py-type.c (typy_str): Use string_file.
13665 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13666 * python/py-value.c (valpy_str): Use string_file.
13667 * record-btrace.c (btrace_insn_history): Use string_file.
13668 * regcache.c (regcache_print): Use stdio_file.
13669 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13670 * remote.c (escape_buffer): Use string_file.
13671 * rust-lang.c (rust_get_disr_info): Use string_file.
13672 * serial.c (serial_open_ops_1): Use stdio_file.
13673 (do_serial_close): Use delete.
13674 * stack.c (print_frame_arg): Use string_file.
13675 (print_frame_args): Remove local mem_fileopen stream, not used.
13676 (print_frame): Use string_file.
13677 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13678 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13679 Take a 'string_file *' instead of a 'ui_file *'.
13680 * top.c (new_ui): Use stdio_file and stderr_file.
13681 (free_ui): Use delete.
13682 (execute_command_to_string): Use string_file.
13683 (quit_confirm): Use string_file.
13684 * tracepoint.c (collection_list::append_exp): Use string_file.
13685 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13686 * tui/tui-file.c: Don't include "ui-file.h".
13687 (enum streamtype, struct tui_stream): Delete.
13688 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13689 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13690 (tui_file::tui_file): New method.
13691 (tui_file_fputs): Delete.
13692 (tui_file_get_strbuf): Delete.
13693 (tui_file::puts): New method.
13694 (tui_file_adjust_strbuf): Delete.
13695 (tui_file_flush): Delete.
13696 (tui_file::flush): New method.
13697 * tui/tui-file.h: Tweak intro comment.
13698 Include ui-file.h.
13699 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13700 (tui_file_adjust_strbuf): Delete declarations.
13701 (class tui_file): New class.
13702 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13703 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13704 (tui_register_format): Use string_stream.
13705 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13706 (tui_get_function_from_frame): Use string_file.
13707 * typeprint.c (type_to_string): Use string_file.
13708 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13709 (null_stream): New global.
13710 (ui_file_delete): Delete.
13711 (ui_file::ui_file): New.
13712 (null_file_isatty): Delete.
13713 (ui_file::~ui_file): New.
13714 (null_file_rewind): Delete.
13715 (ui_file::printf): New.
13716 (null_file_put): Delete.
13717 (null_file_flush): Delete.
13718 (ui_file::putstr): New.
13719 (null_file_write): Delete.
13720 (ui_file::putstrn): New.
13721 (null_file_read): Delete.
13722 (ui_file::putc): New.
13723 (null_file_fputs): Delete.
13724 (null_file_write_async_safe): Delete.
13725 (ui_file::vprintf): New.
13726 (null_file_delete): Delete.
13727 (null_file::write): New.
13728 (null_file_fseek): Delete.
13729 (null_file::puts): New.
13730 (ui_file_data): Delete.
13731 (null_file::write_async_safe): New.
13732 (gdb_flush, ui_file_isatty): Adjust.
13733 (ui_file_put, ui_file_rewind): Delete.
13734 (ui_file_write): Adjust.
13735 (ui_file_write_for_put): Delete.
13736 (ui_file_write_async_safe, ui_file_read): Adjust.
13737 (ui_file_fseek): Delete.
13738 (fputs_unfiltered): Adjust.
13739 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13740 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13741 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13742 (set_ui_file_data): Delete.
13743 (string_file::~string_file, string_file::write)
13744 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13745 (do_ui_file_as_string, ui_file_as_string): Delete.
13746 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13747 (struct mem_file): Delete.
13748 (mem_file_new): Delete.
13749 (stdio_file::stdio_file): New.
13750 (mem_file_delete): Delete.
13751 (stdio_file::stdio_file): New.
13752 (mem_fileopen): Delete.
13753 (stdio_file::~stdio_file): New.
13754 (mem_file_rewind): Delete.
13755 (stdio_file::set_stream): New.
13756 (mem_file_put): Delete.
13757 (stdio_file::open): New.
13758 (mem_file_write): Delete.
13759 (stdio_file_magic, struct stdio_file): Delete.
13760 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13761 (stdio_file::flush): New.
13762 (stdio_file_read): Rename to ...
13763 (stdio_file::read): ... this. Adjust.
13764 (stdio_file_write): Rename to ...
13765 (stdio_file::write): ... this. Adjust.
13766 (stdio_file_write_async_safe): Rename to ...
13767 (stdio_file::write_async_safe) ... this. Adjust.
13768 (stdio_file_fputs): Rename to ...
13769 (stdio_file::puts) ... this. Adjust.
13770 (stdio_file_isatty): Delete.
13771 (stdio_file_fseek): Delete.
13772 (stdio_file::isatty): New.
13773 (stderr_file_write): Rename to ...
13774 (stderr_file::write) ... this. Adjust.
13775 (stderr_file_fputs): Rename to ...
13776 (stderr_file::puts) ... this. Adjust.
13777 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13778 (stderr_file::stderr_file): New.
13779 (tee_file_magic): Delete.
13780 (struct tee_file): Delete.
13781 (tee_file::tee_file): New.
13782 (tee_file_new): Delete.
13783 (tee_file::~tee_file): New.
13784 (tee_file_delete): Delete.
13785 (tee_file_flush): Rename to ...
13786 (tee_file::flush): ... this. Adjust.
13787 (tee_file_write): Rename to ...
13788 (tee_file::write): ... this. Adjust.
13789 (tee_file::write_async_safe): New.
13790 (tee_file_fputs): Rename to ...
13791 (tee_file::puts): ... this. Adjust.
13792 (tee_file_isatty): Rename to ...
13793 (tee_file::isatty): ... this. Adjust.
13794 * ui-file.h (struct obstack, struct ui_file): Don't
13795 forward-declare.
13796 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13797 (ui_file_write_ftype)
13798 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13799 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13800 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13801 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13802 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13803 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13804 (set_ui_file_fseek): Delete.
13805 (ui_file_data, ui_file_delete, ui_file_rewind)
13806 (struct ui_file): New.
13807 (ui_file_up): New.
13808 (class null_file): New.
13809 (null_stream): Declare.
13810 (ui_file_write_for_put, ui_file_put): Delete.
13811 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13812 Delete.
13813 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13814 (gdb_fopen, tee_file_new): Delete.
13815 (struct string_file): New.
13816 (struct stdio_file): New.
13817 (stdio_file_up): New.
13818 (struct stderr_file): New.
13819 (class tee_file): New.
13820 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13821 of a 'ui_file *'. Adjust.
13822 * ui-out.h (class ui_out) <field_stream>: Likewise.
13823 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13824 (null_stream): Delete.
13825 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13826 Adjust.
13827 * utils.h (struct ui_file): Delete forward declaration..
13828 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13829 (error_stream): Take a 'string_file &' instead of a
13830 'ui_file *'.
13831 * varobj.c (varobj_value_get_print_value): Use string_file.
13832 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13833 * gdbarch.c: Regenerate.
13834
13835 2017-02-02 Pedro Alves <palves@redhat.com>
13836
13837 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13838 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13839 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13840 Adjust to call gdb_print_insn instead of
13841 gdb_disassembler::print_insn.
13842 (dump_insns, do_mixed_source_and_assembly_deprecated)
13843 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13844 'gdbarch' parameter. Remove gdb_disassembler parameter.
13845 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13846 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13847 declaration.
13848 (gdb_pretty_print_insn): Re-add declaration.
13849 * record-btrace.c (btrace_insn_history): Don't allocate a
13850 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13851
13852 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13853
13854 * disasm.h (gdb_disassembly): Remove file_string parameter.
13855 * disasm.c (gdb_disassembly): Likewise.
13856 * cli/cli-cmds.c (print_disassembly): Adapt.
13857 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13858 * stack.c (do_gdb_disassembly): Likewise.
13859
13860 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13861
13862 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13863 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13864 targets. And if the implicit value is longer than needed, extract
13865 the first bytes instead of the "least significant" ones.
13866
13867 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13868
13869 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13870 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13871 (btrace_fetch): Assert can_access_registers_ptid.
13872 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13873 validate_registers_access.
13874
13875 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13876
13877 * gdbthread.h (can_access_registers_ptid): New.
13878 * thread.c (can_access_registers_ptid): New.
13879
13880 2017-02-01 Pedro Alves <palves@redhat.com>
13881
13882 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13883
13884 2017-01-31 Pedro Alves <palves@redhat.com>
13885
13886 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13887 Fix typos.
13888
13889 2017-01-31 Pedro Alves <palves@redhat.com>
13890
13891 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13892 not used.
13893
13894 2017-01-31 Pedro Alves <palves@redhat.com>
13895
13896 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13897
13898 2017-01-31 Pedro Alves <palves@redhat.com>
13899
13900 * common/scoped_restore.h
13901 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13902 change the value's parameter type to T2.
13903 (make_scoped_restore): Likewise.
13904
13905 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13906 Richard Henderson <rth@redhat.com>
13907
13908 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13909 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13910 GS_BASE for older kernels.
13911 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13912 GS_BASE for older kernels.
13913 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13914 and GS_BASE to the offset table.
13915 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13916 system register group.
13917 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13918 for older kernels.
13919 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13920 amd64 ABI.
13921 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13922 AMD64_GSBASE_REGNUM.
13923 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13924 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13925 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13926 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13927 i386/64bit-segments.xml in those rules.
13928 * features/i386/64bit-segments.xml: New file.
13929 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13930 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13931 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13932 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13933 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13934 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13935 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13936 * features/i386/amd64-avx-linux.c: Regenerated.
13937 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13938 * features/i386/amd64-avx-mpx.c: Regenerated.
13939 * features/i386/amd64-avx512-linux.c: Regenerated.
13940 * features/i386/amd64-linux.c: Regenerated.
13941 * features/i386/amd64-mpx-linux.c: Regenerated.
13942 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13943 * features/i386/i386-avx-mpx.c: Regenerated.
13944 * features/i386/x32-avx-linux.c: Regenerated.
13945 * features/i386/x32-avx512-linux.c: Regenerated.
13946 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13947 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13948 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13949 * regformats/i386/amd64-linux.dat: Regenerated.
13950 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13951 * regformats/i386/x32-avx-linux.dat: Regenerated.
13952 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13953 * regformats/i386/x32-linux.dat: Regenerated.
13954
13955 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13956
13957 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13958 Set to AMD64_NUM_REGS.
13959
13960 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13961
13962 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13963 that checks validity of a register number.
13964
13965 2017-01-27 Kees Cook <keescook@google.com>
13966
13967 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13968 fetch_fpregs if target has fpa registers.
13969 (arm_linux_store_inferior_registers): Call store_fpregs if target
13970 has fpa registers.
13971
13972 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13973
13974 * cris-tdep.c (cris_gdbarch_init): Remove check for
13975 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13976
13977 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13978
13979 * corelow.c (get_core_register_section): Check for regset
13980 existence before checking for REGSET_VARIABLE_SIZE.
13981
13982 2017-01-26 Yao Qi <yao.qi@linaro.org>
13983 Pedro Alves <palves@redhat.com>
13984
13985 PR gdb/20939
13986 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13987 call memory_error, save memaddr instead.
13988 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13989 negative, cal memory_error.
13990 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13991
13992 2017-01-26 Yao Qi <yao.qi@linaro.org>
13993
13994 * disasm-selftests.c (memory_error_test): New function.
13995 (_initialize_disasm_selftests): Register memory_error_test.
13996
13997 2017-01-26 Yao Qi <yao.qi@linaro.org>
13998
13999 * Makefile.in (SFILES): Add disasm-selftests.c and
14000 selftest-arch.c.
14001 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14002 * disasm-selftests.c: New file.
14003 * selftest-arch.c: New file.
14004 * selftest-arch.h: New file.
14005
14006 2017-01-26 Yao Qi <yao.qi@linaro.org>
14007
14008 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14009 to bfd_arch_mep. Don't return 0 if section is not
14010 found. Call print_insn_mep.
14011
14012 2017-01-26 Pedro Alves <palves@redhat.com>
14013 Yao Qi <yao.qi@linaro.org>
14014
14015 * arm-tdep.c: Include "disasm.h".
14016 (gdb_print_insn_arm): Update code to get gdbarch.
14017 * disasm.c (dis_asm_read_memory): Change it to
14018 gdb_disassembler::dis_asm_read_memory.
14019 (dis_asm_memory_error): Likewise.
14020 (dis_asm_print_address): Likewise.
14021 (gdb_pretty_print_insn): Change it to
14022 gdb_disassembler::pretty_print_insn.
14023 (dump_insns): Add one argument gdb_disassemlber. All
14024 callers updated.
14025 (do_mixed_source_and_assembly_deprecated): Likewise.
14026 (do_mixed_source_and_assembly): Likewise.
14027 (do_assembly_only): Likewise.
14028 (gdb_disassembler::gdb_disassembler): New.
14029 (gdb_disassembler::print_insn): New.
14030 * disasm.h (class gdb_disassembler): New.
14031 (gdb_pretty_print_insn): Remove declaration.
14032 (gdb_disassemble_info): Likewise.
14033 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14034 (gdbscm_disasm_read_memory_worker): Update.
14035 (gdbscm_disasm_read_memory): Update.
14036 (gdbscm_disasm_memory_error): Remove.
14037 (gdbscm_disasm_print_address): Remove.
14038 (gdbscm_disassembler::gdbscm_disassembler): New.
14039 (gdbscm_print_insn_from_port): Update.
14040 * mips-tdep.c: Include disasm.h.
14041 (gdb_print_insn_mips): Update code to get gdbarch.
14042 * record-btrace.c (btrace_insn_history): Update.
14043 * spu-tdep.c: Include disasm.h.
14044 (struct spu_dis_asm_data): Remove.
14045 (struct spu_dis_asm_info): New.
14046 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14047 SPU id.
14048 (gdb_print_insn_spu): Cast disassemble_info to
14049 spu_dis_asm_info.
14050
14051 2017-01-26 Yao Qi <yao.qi@linaro.org>
14052
14053 * disasm.c (do_ui_file_delete): Delete.
14054 (gdb_insn_length): Move code creating stream to ...
14055 * utils.c (null_stream): ... here. New function.
14056 * utils.h (null_stream): Declare.
14057
14058 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14059
14060 * python/py-inferior.c (find_thread_object): Return directly
14061 from the loop. Remove "found" variable.
14062
14063 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14064
14065 GDB 7.12.1 released.
14066
14067 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14068
14069 * python/py-function.c (fnpy_call): Reorder declarations to have
14070 the gdbpy_enter object declared first.
14071 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14072
14073 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14074
14075 PR python/21068
14076 * python/python-internal.h (PyMem_RawMalloc): Define for
14077 Python < 3.4.
14078 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14079 PyMem_RawMalloc instead of PyMem_Malloc.
14080
14081 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14082 Luis Machado <lgustavo@codesourcery.com>
14083
14084 * NEWS (New commands): Mention flash-erase.
14085 (New MI commands): Mention target-flash-erase.
14086 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14087 command.
14088 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14089 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14090 * target.c (flash_erase_command): New function.
14091 (initialize_targets): Add new flash-erase command.
14092 * target.h (flash_erase_command): New declaration.
14093
14094 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14095
14096 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14097 HAVE_SYS_PROCFS_H is defined.
14098
14099 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14100
14101 * remote.c (struct cached_reg): Change data into a pointer.
14102 * (stop_reply_dtr): Free data pointers before deleting vector.
14103 (process_stop_reply): Likewise.
14104 (remote_parse_stop_reply): Allocate space for data
14105
14106 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14107
14108 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14109 MAX_REGISTER_SIZE.
14110 (amd64_pseudo_register_read_value): Likewise.
14111 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14112 (store_register_using_P): Likewise.
14113 * regcache.c (regcache_xfer_part): Likewise.
14114
14115 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14116
14117 Split real and pseudo registers.
14118 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14119 (sparc32_pseudo_regnum): New enum.
14120 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14121 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14122 (SPARC32_CP0_REGISTERS): New macro.
14123 (sparc32_pseudo_register_name): New function.
14124 (sparc32_register_name): Use sparc32_pseudo_register_name.
14125 (sparc32_pseudo_register_type): New function.
14126 (sparc32_register_type): Use sparc32_pseudo_register_type.
14127 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14128 pseudo register numbers.
14129 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14130 (SPARC64_CP0_REGISTERS): New macro.
14131 (sparc64_pseudo_register_name): New function.
14132 (sparc64_register_name): Use sparc64_pseudo_register_name.
14133 (sparc64_pseudo_register_type): New function.
14134 (sparc64_register_type): Use sparc64_pseudo_register_type.
14135 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14136 pseudo register numbers.
14137 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14138 sparc64_store_arguments): Handle pseudo register numbers.
14139
14140 2017-01-13 Yao Qi <yao.qi@linaro.org>
14141
14142 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14143 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14144 output.
14145 (getpkt_or_notif_sane_1): Likewise.
14146
14147 2017-01-13 Yao Qi <yao.qi@linaro.org>
14148
14149 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14150 of CC. Pass "-x c++-header" instead of "-x c".
14151
14152 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14153
14154 * remote.c (remote_can_async_p): Update comment.
14155
14156 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14157
14158 * linux-nat.c (linux_nat_can_async_p): Update comment.
14159
14160 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14161
14162 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14163
14164 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
14165
14166 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14167
14168 2017-01-10 Tom Tromey <tom@tromey.com>
14169
14170 * python/py-type.c (typy_legacy_template_argument): Update.
14171 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14172 ~demangle_parse_info): Declare new members.
14173 (cp_demangled_name_to_comp): Return unique_ptr.
14174 (cp_demangled_name_parse_free)
14175 (make_cleanup_cp_demangled_name_parse_free)
14176 (cp_new_demangle_parse_info): Remove.
14177 * cp-support.c (do_demangled_name_parse_free_cleanup)
14178 (make_cleanup_cp_demangled_name_parse_free): Remove.
14179 (inspect_type, cp_canonicalize_string_full)
14180 (cp_canonicalize_string): Update.
14181 (mangled_name_to_comp): Change return type.
14182 (cp_class_name_from_physname, method_name_from_physname)
14183 (cp_func_name, cp_remove_params): Update.
14184 * cp-name-parser.y (demangle_parse_info): New constructor, from
14185 cp_new_demangle_parse_info.
14186 (~demangle_parse_info): New destructor, from
14187 cp_demangled_name_parse_free.
14188 (cp_merge_demangle_parse_infos): Update.
14189 (cp_demangled_name_to_comp): Change return type.
14190
14191 2017-01-10 Tom Tromey <tom@tromey.com>
14192
14193 * top.c (prevent_dont_repeat): Change return type.
14194 * python/python.c (execute_gdb_command): Use std::string.
14195 Update.
14196 * guile/guile.c (gdbscm_execute_gdb_command): Update.
14197 * command.h (prevent_dont_repeat): Change return type.
14198 * breakpoint.c (bpstat_do_actions_1): Update.
14199
14200 2017-01-10 Tom Tromey <tom@tromey.com>
14201
14202 * value.h (scoped_value_mark::~scoped_value_mark): Call
14203 free_to_mark.
14204 (scoped_value_mark::free_to_mark): New method.
14205 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14206 scoped_value_mark.
14207
14208 2017-01-10 Tom Tromey <tom@tromey.com>
14209
14210 * python/py-value.c (valpy_dereference, valpy_referenced_value)
14211 (valpy_reference_value, valpy_const_value, valpy_get_address)
14212 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14213 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14214 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14215 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14216 scoped_value_mark.
14217 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14218 * value.h (scoped_value_mark): New class.
14219
14220 2017-01-10 Tom Tromey <tom@tromey.com>
14221
14222 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14223 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14224 * psymtab.c (discard_psymtabs_upto): Remove.
14225 (make_cleanup_discard_psymtabs): Remove.
14226 (struct psymtab_state): Remove.
14227
14228 2017-01-10 Tom Tromey <tom@tromey.com>
14229
14230 * record-full.c (record_full_save_cleanups): Remove.
14231 (record_full_save): Use gdb::unlinker.
14232 * gcore.c (do_bfd_delete_cleanup): Remove.
14233 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
14234 cleanups.
14235 * dwarf2read.c (unlink_if_set): Remove.
14236 (write_psymtabs_to_index): Use gdb::unlinker.
14237 * common/gdb_unlinker.h: New file.
14238
14239 2017-01-10 Tom Tromey <tom@tromey.com>
14240
14241 * windows-tdep.c (windows_xfer_shared_library): Update.
14242 * windows-nat.c (windows_make_so): Update.
14243 * utils.h (make_cleanup_bfd_unref): Remove.
14244 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14245 * symfile.h (symfile_bfd_open)
14246 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14247 * symfile.c (read_symbols, symbol_file_add)
14248 (separate_debug_file_exists): Update.
14249 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14250 (generic_load, reread_symbols): Update.
14251 * symfile-mem.c (symbol_file_add_from_memory): Update.
14252 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14253 (spu_symbol_file_add_from_memory): Update.
14254 * solist.h (struct target_so_ops) <bfd_open>: Return
14255 gdb_bfd_ref_ptr.
14256 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14257 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14258 gdb_bfd_ref_ptr.
14259 (solib_map_sections, reload_shared_libraries_1): Update.
14260 * solib-svr4.c (enable_break): Update.
14261 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14262 * solib-frv.c (enable_break2): Update.
14263 * solib-dsbt.c (enable_break): Update.
14264 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14265 gdb_bfd_ref_ptr.
14266 (darwin_solib_get_all_image_info_addr_at_init): Update.
14267 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14268 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14269 * record-full.c (record_full_save): Update.
14270 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14271 * procfs.c (insert_dbx_link_bpt_in_file): Update.
14272 * minidebug.c (find_separate_debug_file_in_section): Return
14273 gdb_bfd_ref_ptr.
14274 * machoread.c (macho_add_oso_symfile): Change abfd to
14275 gdb_bfd_ref_ptr.
14276 (macho_symfile_read_all_oso): Update.
14277 (macho_check_dsym): Return gdb_bfd_ref_ptr.
14278 (macho_symfile_read): Update.
14279 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14280 (jit_bfd_try_read_symtab): Update.
14281 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14282 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14283 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14284 gdb_bfd_ref_ptr.
14285 (gdb_bfd_ref_policy): New struct.
14286 (gdb_bfd_ref_ptr): New typedef.
14287 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14288 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14289 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14290 gdb_bfd_ref_ptr.
14291 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14292 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14293 (gcore_command): Update.
14294 * exec.c (exec_file_attach): Update.
14295 * elfread.c (elf_symfile_read): Update.
14296 * dwarf2read.c (dwarf2_get_dwz_file): Update.
14297 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14298 (open_and_init_dwo_file): Update.
14299 (open_dwp_file): Return gdb_bfd_ref_ptr.
14300 (open_and_init_dwp_file): Update.
14301 * corelow.c (core_open): Update.
14302 * compile/compile-object-load.c (compile_object_load): Update.
14303 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14304 * coffread.c (coff_symfile_read): Update.
14305 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14306 gdb_bfd_ref_ptr. Rename.
14307 (dump_bfd_file, restore_command): Update.
14308 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14309 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14310 (find_separate_debug_file_by_buildid): Update.
14311
14312 2017-01-10 Tom Tromey <tom@tromey.com>
14313
14314 * common/gdb_ref_ptr.h: New file.
14315 * python/py-ref.h (struct gdbpy_ref_policy): New.
14316 (gdbpy_ref): Now a typedef.
14317
14318 2017-01-10 Tom Tromey <tom@tromey.com>
14319
14320 * utils.h (make_cleanup_htab_delete): Don't declare.
14321 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14322 Remove.
14323 * linespec.c (decode_compound_collector): Add constructor,
14324 destructor.
14325 (lookup_prefix_sym): Remove cleanup.
14326 (symtab_collector): Add constructor, destructor.
14327 (collect_symtabs_from_filename): Remove cleanup.
14328 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14329 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14330 Use htab_up.
14331 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14332 * dwarf2read.c (dw2_expand_symtabs_matching)
14333 (dw2_map_symbol_filenames, dwarf_decode_macros)
14334 (write_psymtabs_to_index): Use htab_up.
14335 * dwarf2loc.c (func_verify_no_selftailcall)
14336 (call_site_find_chain_1, func_verify_no_selftailcall)
14337 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14338 std::vector, gdb::unique_xmalloc_ptr.
14339 (call_sitep): Remove typedef.
14340 (dwarf2_locexpr_baton_eval): Remove unused variable.
14341
14342 2017-01-10 Tom Tromey <tom@tromey.com>
14343
14344 * python/python-internal.h (make_cleanup_py_decref)
14345 (make_cleanup_py_xdecref): Don't declare.
14346 * python/py-utils.c (py_decref, make_cleanup_py_decref)
14347 (py_xdecref, make_cleanup_py_xdecref): Remove.
14348
14349 2017-01-10 Tom Tromey <tom@tromey.com>
14350
14351 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14352 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14353
14354 2017-01-10 Tom Tromey <tom@tromey.com>
14355
14356 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14357
14358 2017-01-10 Tom Tromey <tom@tromey.com>
14359
14360 * python/py-utils.c (unicode_to_encoded_string)
14361 (python_string_to_target_string)
14362 (python_string_to_target_python_string)
14363 (python_string_to_host_string, gdbpy_obj_to_string)
14364 (get_addr_from_python): Use gdbpy_ref.
14365
14366 2017-01-10 Tom Tromey <tom@tromey.com>
14367
14368 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14369 gdbpy_ref.
14370
14371 2017-01-10 Tom Tromey <tom@tromey.com>
14372
14373 * python/python.c (eval_python_command, gdbpy_decode_line)
14374 (gdbpy_run_events, gdbpy_start_type_printers)
14375 (gdbpy_apply_type_printers): Use gdbpy_ref.
14376
14377 2017-01-10 Tom Tromey <tom@tromey.com>
14378
14379 * python/py-param.c (get_doc_string, compute_enum_values): Use
14380 gdbpy_ref.
14381
14382 2017-01-10 Tom Tromey <tom@tromey.com>
14383
14384 * python/py-inferior.c (find_thread_object, build_inferior_list):
14385 Use gdbpy_ref.
14386
14387 2017-01-10 Tom Tromey <tom@tromey.com>
14388
14389 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14390
14391 2017-01-10 Tom Tromey <tom@tromey.com>
14392
14393 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14394 gdbpy_ref.
14395
14396 2017-01-10 Tom Tromey <tom@tromey.com>
14397
14398 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14399 extra incref.
14400 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14401 Use gdbpy_ref.
14402
14403 2017-01-10 Tom Tromey <tom@tromey.com>
14404
14405 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14406 gdbpy_ref.
14407
14408 2017-01-10 Tom Tromey <tom@tromey.com>
14409
14410 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14411 decref results of PyArg_ParseTupleAndKeywords.
14412
14413 2017-01-10 Tom Tromey <tom@tromey.com>
14414
14415 * python/python.c (python_run_simple_file): Use
14416 unique_xmalloc_ptr, gdbpy_ref.
14417
14418 2017-01-10 Tom Tromey <tom@tromey.com>
14419
14420 * python/py-prettyprint.c (print_stack_unless_memory_error)
14421 (print_string_repr, print_children): Use gdbpy_ref.
14422 (dummy_python_frame): New class.
14423 (dummy_python_frame::dummy_python_frame): Rename from
14424 push_dummy_python_frame.
14425 (py_restore_tstate): Remove.
14426
14427 2017-01-10 Tom Tromey <tom@tromey.com>
14428
14429 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14430
14431 2017-01-10 Tom Tromey <tom@tromey.com>
14432
14433 * python/python.c (ensure_python_env, restore_python_env):
14434 Remove.
14435 * python/python-internal.h (ensure_python_env): Don't declare.
14436 * varobj.h (varobj_ensure_python_env): Don't declare.
14437 * varobj.c (varobj_ensure_python_env): Remove.
14438
14439 2017-01-10 Tom Tromey <tom@tromey.com>
14440
14441 * varobj.c (varobj_value_get_print_value): Use
14442 gdbpy_enter_varobj.
14443
14444 2017-01-10 Tom Tromey <tom@tromey.com>
14445
14446 * python/py-prettyprint.c (print_string_repr, print_children):
14447 Update.
14448 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14449 of "encoding".
14450 * varobj.c (varobj_value_get_print_value): Update.
14451 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14452
14453 2017-01-10 Tom Tromey <tom@tromey.com>
14454
14455 * varobj.c (varobj_get_display_hint)
14456 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14457 (varobj_set_visualizer, free_variable): Use
14458 gdbpy_enter_varobj.
14459
14460 2017-01-10 Tom Tromey <tom@tromey.com>
14461
14462 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14463 (do_finish_initialization): New function. Use gdbpy_ref.
14464 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14465 do_finish_initialization.
14466
14467 2017-01-10 Tom Tromey <tom@tromey.com>
14468
14469 * python/py-param.c (get_set_value, get_show_value): Use
14470 gdbpy_enter, gdbpy_ref.
14471
14472 2017-01-10 Tom Tromey <tom@tromey.com>
14473
14474 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14475
14476 2017-01-10 Tom Tromey <tom@tromey.com>
14477
14478 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14479
14480 2017-01-10 Tom Tromey <tom@tromey.com>
14481
14482 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14483 Use gdbpy_enter_varobj.
14484
14485 2017-01-10 Tom Tromey <tom@tromey.com>
14486
14487 * varobj.c (gdbpy_enter_varobj): New constructor.
14488 * python/python-internal.h (gdbpy_enter_varobj): New class.
14489 * python/py-varobj.c (py_varobj_get_iterator): Use
14490 gdbpy_enter_varobj.
14491
14492 2017-01-10 Tom Tromey <tom@tromey.com>
14493
14494 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14495 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14496 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14497 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14498 unique_xmalloc_ptr.
14499 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14500
14501 2017-01-10 Tom Tromey <tom@tromey.com>
14502
14503 * python/py-xmethods.c (invoke_match_method): Use
14504 gdbpy_ref.
14505
14506 2017-01-10 Tom Tromey <tom@tromey.com>
14507
14508 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14509 gdbpy_enter, gdbpy_ref.
14510
14511 2017-01-10 Tom Tromey <tom@tromey.com>
14512
14513 * python/python.c (python_interactive_command): Use gdbpy_enter.
14514
14515 2017-01-10 Tom Tromey <tom@tromey.com>
14516
14517 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14518 gdbpy_ref.
14519
14520 2017-01-10 Tom Tromey <tom@tromey.com>
14521
14522 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14523 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14524
14525 2017-01-10 Tom Tromey <tom@tromey.com>
14526
14527 * utils.h (htab_deleter): New struct.
14528 (htab_up): New typedef.
14529 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14530 gdbpy_enter, gdbpy_ref, htab_up.
14531
14532 2017-01-10 Tom Tromey <tom@tromey.com>
14533
14534 * python/py-unwind.c (pending_frame_invalidate): Remove.
14535 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14536
14537 2017-01-10 Tom Tromey <tom@tromey.com>
14538
14539 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14540 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14541
14542 2017-01-10 Tom Tromey <tom@tromey.com>
14543
14544 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14545
14546 2017-01-10 Tom Tromey <tom@tromey.com>
14547
14548 * python/python.c (gdbpy_eval_from_control_command)
14549 (gdbpy_source_script, gdbpy_run_events)
14550 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14551 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14552 gdbpy_enter.
14553
14554 2017-01-10 Tom Tromey <tom@tromey.com>
14555
14556 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14557
14558 2017-01-10 Tom Tromey <tom@tromey.com>
14559
14560 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14561
14562 2017-01-10 Tom Tromey <tom@tromey.com>
14563
14564 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14565 (python_on_inferior_call_pre, python_on_inferior_call_post)
14566 (python_on_memory_change, python_on_register_change)
14567 (python_inferior_exit, python_new_objfile, add_thread_object)
14568 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14569
14570 2017-01-10 Tom Tromey <tom@tromey.com>
14571
14572 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14573 (bpfinishpy_handle_exit): Use gdbpy_enter.
14574
14575 2017-01-10 Tom Tromey <tom@tromey.com>
14576
14577 * python/py-cmd.c (cmdpy_destroyer)
14578 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14579 gdbpy_enter.
14580
14581 2017-01-10 Tom Tromey <tom@tromey.com>
14582
14583 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14584 gdbpy_enter.
14585 (gdbpy_breakpoint_has_cond): Likewise.
14586
14587 2017-01-10 Tom Tromey <tom@tromey.com>
14588
14589 * python/python.c (gdbpy_enter): New constructor.
14590 (~gdbpy_enter): New destructor.
14591 (restore_python_env, ensure_python_env): Rewrite.
14592 * python/python-internal.h (gdbpy_enter): New class.
14593
14594 2017-01-10 Tom Tromey <tom@tromey.com>
14595
14596 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14597
14598 2017-01-10 Tom Tromey <tom@tromey.com>
14599
14600 * python/py-value.c (value_has_field, get_field_flag)
14601 (get_field_type, valpy_getitem, convert_value_from_python): Use
14602 gdbpy_ref.
14603
14604 2017-01-10 Tom Tromey <tom@tromey.com>
14605
14606 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14607 gdbpy_ref.
14608
14609 2017-01-10 Tom Tromey <tom@tromey.com>
14610
14611 * python/py-prettyprint.c (search_pp_list)
14612 (find_pretty_printer_from_objfiles)
14613 (find_pretty_printer_from_progspace)
14614 (find_pretty_printer_from_gdb, find_pretty_printer)
14615 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14616 gdbpy_ref.
14617
14618 2017-01-10 Tom Tromey <tom@tromey.com>
14619
14620 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14621
14622 2017-01-10 Tom Tromey <tom@tromey.com>
14623
14624 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14625 (ltpy_get_all_source_lines): Use gdbpy_ref.
14626
14627 2017-01-10 Tom Tromey <tom@tromey.com>
14628
14629 * python/py-framefilter.c (extract_sym, extract_value)
14630 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14631 gdbpy_ref.
14632
14633 2017-01-10 Tom Tromey <tom@tromey.com>
14634
14635 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14636
14637 2017-01-10 Tom Tromey <tom@tromey.com>
14638
14639 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14640
14641 2017-01-10 Tom Tromey <tom@tromey.com>
14642
14643 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14644 gdbpy_ref.
14645
14646 2017-01-10 Tom Tromey <tom@tromey.com>
14647
14648 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14649
14650 2017-01-10 Tom Tromey <tom@tromey.com>
14651
14652 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14653 (typy_range): Use gdbpy_ref.
14654
14655 2017-01-10 Tom Tromey <tom@tromey.com>
14656
14657 * python/py-threadevent.c (create_thread_event_object): Use
14658 gdbpy_ref.
14659 * python/py-stopevent.c (create_stop_event_object): Simplify.
14660 (emit_stop_event): Use gdbpy_ref.
14661 * python/py-signalevent.c (create_signal_event_object): Use
14662 gdbpy_ref.
14663 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14664 (emit_new_objfile_event, create_clear_objfiles_event_object)
14665 (emit_clear_objfiles_event): Use gdbpy_ref.
14666 * python/py-infevents.c (create_inferior_call_event_object)
14667 (create_register_changed_event_object)
14668 (create_memory_changed_event_object, emit_inferior_call_event)
14669 (emit_memory_changed_event, emit_register_changed_event): Use
14670 gdbpy_ref.
14671 * python/py-exitedevent.c (create_exited_event_object)
14672 (emit_exited_event): Use gdbpy_ref.
14673 * python/py-event.h (evpy_emit_event): Remove
14674 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14675 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14676 * python/py-continueevent.c (emit_continue_event): Use
14677 gdbpy_ref.
14678 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14679 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14680 gdbpy_ref.
14681 * python/py-bpevent.c (create_breakpoint_event_object): Use
14682 gdbpy_ref.
14683
14684 2017-01-10 Tom Tromey <tom@tromey.com>
14685
14686 * python/py-ref.h: New file.
14687
14688 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14689
14690 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14691 void.
14692 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14693 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14694 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14695 * ui-out.c (ui_out::redirect): Likewise.
14696 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14697 * cli/cli-logging.c (set_logging_redirect): Update call site of
14698 ui_out::redirect.
14699 (handle_redirections): Likewise.
14700 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14701 * top.c (execute_command_to_string): Likewise.
14702 * utils.c (do_ui_out_redirect_pop): Likewise.
14703
14704 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14705
14706 * stack.c (_initialize_stack): Update "frame" command help message.
14707
14708 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14709
14710 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14711
14712 2017-01-06 Yao Qi <yao.qi@linaro.org>
14713
14714 * x86-linux-nat.h: Include gdb_proc_service.h.
14715
14716 2017-01-06 Yao Qi <yao.qi@linaro.org>
14717
14718 * ser-base.h: Include serial.h.
14719
14720 2017-01-06 Yao Qi <yao.qi@linaro.org>
14721
14722 * ppc-linux-tdep.h: Include ppc-tdep.h.
14723
14724 2017-01-06 Yao Qi <yao.qi@linaro.org>
14725
14726 * nat/amd64-linux-siginfo.h: Include signal.h.
14727
14728 2017-01-06 Yao Qi <yao.qi@linaro.org>
14729
14730 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14731
14732 2017-01-06 Yao Qi <yao.qi@linaro.org>
14733
14734 * mi/mi-parse.h: Include mi-cmds.h.
14735
14736 2017-01-06 Yao Qi <yao.qi@linaro.org>
14737
14738 * inf-loop.c: Don't include "target.h".
14739 * inf-loop.h: Include it here.
14740
14741 2017-01-06 Yao Qi <yao.qi@linaro.org>
14742
14743 * dfp.h: Include "dboulest.h" and "expression.h".
14744
14745 2017-01-06 Yao Qi <yao.qi@linaro.org>
14746
14747 * ax-gdb.h: Include "ax.h".
14748
14749 2017-01-06 Yao Qi <yao.qi@linaro.org>
14750
14751 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14752 with nat/gdb_ptrace.h.
14753
14754 2017-01-05 Yao Qi <yao.qi@linaro.org>
14755
14756 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14757 new line.
14758 (mips64_fbsd_sigframe_init): Likewise.
14759
14760 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14761
14762 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14763 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14764
14765 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14766
14767 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14768 * NEWS: Mention new FreeBSD/mips native configuration.
14769 * config/mips/fbsd.mh: New file.
14770 * configure.host: Add mips*-*-freebsd*.
14771 * mips-fbsd-nat.c: New file.
14772
14773 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14774
14775 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14776 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14777 * NEWS: Mention new FreeBSD/mips target.
14778 * configure.tgt: Add mips*-*-freebsd*.
14779 * mips-fbsd-tdep.c: New file.
14780 * mips-fbsd-tdep.h: New file.
14781
14782 2017-01-04 Yao Qi <yao.qi@linaro.org>
14783
14784 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14785 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14786
14787 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14788
14789 Update copyright year range in all GDB files.
14790
14791 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14792
14793 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14794
14795 For older changes see ChangeLog-2016.
14796 \f
14797 Local Variables:
14798 mode: change-log
14799 left-margin: 8
14800 fill-column: 74
14801 version-control: never
14802 coding: utf-8
14803 End:
This page took 0.377036 seconds and 4 git commands to generate.